/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "./.cache/_this_is_virtual_fs_path_/$virtual/ssr-sync-requires":
/*!*********************************************************************!*\
!*** ./.cache/_this_is_virtual_fs_path_/$virtual/ssr-sync-requires ***!
\*********************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
// prefer default export if available
const preferDefault = m => (m && m.default) || m
exports.ssrComponents = {
"component---cache-dev-404-page-js": preferDefault(__webpack_require__(/*! ./.cache/dev-404-page.js */ "./.cache/dev-404-page.js")),
"component---src-templates-reference-page-js": preferDefault(__webpack_require__(/*! ./src/templates/reference-page.js */ "./src/templates/reference-page.js"))
}
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-core/dist/esm/checkOptions.js":
/*!**************************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-core/dist/esm/checkOptions.js ***!
\**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "checkOptions": () => (/* binding */ checkOptions)
/* harmony export */ });
/* harmony import */ var _algolia_autocomplete_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @algolia/autocomplete-shared */ "./node_modules/@algolia/autocomplete-shared/dist/esm/warn.js");
function checkOptions(options) {
true ? (0,_algolia_autocomplete_shared__WEBPACK_IMPORTED_MODULE_0__.warn)(!options.debug, 'The `debug` option is meant for development debugging and should not be used in production.') : 0;
}
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-core/dist/esm/createAutocomplete.js":
/*!********************************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-core/dist/esm/createAutocomplete.js ***!
\********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "createAutocomplete": () => (/* binding */ createAutocomplete)
/* harmony export */ });
/* harmony import */ var _checkOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./checkOptions */ "./node_modules/@algolia/autocomplete-core/dist/esm/checkOptions.js");
/* harmony import */ var _createStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./createStore */ "./node_modules/@algolia/autocomplete-core/dist/esm/createStore.js");
/* harmony import */ var _getAutocompleteSetters__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./getAutocompleteSetters */ "./node_modules/@algolia/autocomplete-core/dist/esm/getAutocompleteSetters.js");
/* harmony import */ var _getDefaultProps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getDefaultProps */ "./node_modules/@algolia/autocomplete-core/dist/esm/getDefaultProps.js");
/* harmony import */ var _getPropGetters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./getPropGetters */ "./node_modules/@algolia/autocomplete-core/dist/esm/getPropGetters.js");
/* harmony import */ var _onInput__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./onInput */ "./node_modules/@algolia/autocomplete-core/dist/esm/onInput.js");
/* harmony import */ var _stateReducer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stateReducer */ "./node_modules/@algolia/autocomplete-core/dist/esm/stateReducer.js");
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function createAutocomplete(options) {
(0,_checkOptions__WEBPACK_IMPORTED_MODULE_0__.checkOptions)(options);
var subscribers = [];
var props = (0,_getDefaultProps__WEBPACK_IMPORTED_MODULE_1__.getDefaultProps)(options, subscribers);
var store = (0,_createStore__WEBPACK_IMPORTED_MODULE_2__.createStore)(_stateReducer__WEBPACK_IMPORTED_MODULE_3__.stateReducer, props, onStoreStateChange);
var setters = (0,_getAutocompleteSetters__WEBPACK_IMPORTED_MODULE_4__.getAutocompleteSetters)({
store: store
});
var propGetters = (0,_getPropGetters__WEBPACK_IMPORTED_MODULE_5__.getPropGetters)(_objectSpread({
props: props,
refresh: refresh,
store: store
}, setters));
function onStoreStateChange(_ref) {
var prevState = _ref.prevState,
state = _ref.state;
props.onStateChange(_objectSpread({
prevState: prevState,
state: state,
refresh: refresh
}, setters));
}
function refresh() {
return (0,_onInput__WEBPACK_IMPORTED_MODULE_6__.onInput)(_objectSpread({
event: new Event('input'),
nextState: {
isOpen: store.getState().isOpen
},
props: props,
query: store.getState().query,
refresh: refresh,
store: store
}, setters));
}
props.plugins.forEach(function (plugin) {
var _plugin$subscribe;
return (_plugin$subscribe = plugin.subscribe) === null || _plugin$subscribe === void 0 ? void 0 : _plugin$subscribe.call(plugin, _objectSpread(_objectSpread({}, setters), {}, {
refresh: refresh,
onSelect: function onSelect(fn) {
subscribers.push({
onSelect: fn
});
},
onActive: function onActive(fn) {
subscribers.push({
onActive: fn
});
}
}));
});
return _objectSpread(_objectSpread({
refresh: refresh
}, propGetters), setters);
}
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-core/dist/esm/createStore.js":
/*!*************************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-core/dist/esm/createStore.js ***!
\*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "createStore": () => (/* binding */ createStore)
/* harmony export */ });
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function createStore(reducer, props, onStoreStateChange) {
var state = props.initialState;
return {
getState: function getState() {
return state;
},
dispatch: function dispatch(action, payload) {
var prevState = _objectSpread({}, state);
state = reducer(state, {
type: action,
props: props,
payload: payload
});
onStoreStateChange({
state: state,
prevState: prevState
});
}
};
}
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-core/dist/esm/getAutocompleteSetters.js":
/*!************************************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-core/dist/esm/getAutocompleteSetters.js ***!
\************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "getAutocompleteSetters": () => (/* binding */ getAutocompleteSetters)
/* harmony export */ });
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./node_modules/@algolia/autocomplete-core/dist/esm/utils/flatten.js");
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function getAutocompleteSetters(_ref) {
var store = _ref.store;
var setActiveItemId = function setActiveItemId(value) {
store.dispatch('setActiveItemId', value);
};
var setQuery = function setQuery(value) {
store.dispatch('setQuery', value);
};
var setCollections = function setCollections(rawValue) {
var baseItemId = 0;
var value = rawValue.map(function (collection) {
return _objectSpread(_objectSpread({}, collection), {}, {
// We flatten the stored items to support calling `getAlgoliaResults`
// from the source itself.
items: (0,_utils__WEBPACK_IMPORTED_MODULE_0__.flatten)(collection.items).map(function (item) {
return _objectSpread(_objectSpread({}, item), {}, {
__autocomplete_id: baseItemId++
});
})
});
});
store.dispatch('setCollections', value);
};
var setIsOpen = function setIsOpen(value) {
store.dispatch('setIsOpen', value);
};
var setStatus = function setStatus(value) {
store.dispatch('setStatus', value);
};
var setContext = function setContext(value) {
store.dispatch('setContext', value);
};
return {
setActiveItemId: setActiveItemId,
setQuery: setQuery,
setCollections: setCollections,
setIsOpen: setIsOpen,
setStatus: setStatus,
setContext: setContext
};
}
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-core/dist/esm/getCompletion.js":
/*!***************************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-core/dist/esm/getCompletion.js ***!
\***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "getCompletion": () => (/* binding */ getCompletion)
/* harmony export */ });
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./node_modules/@algolia/autocomplete-core/dist/esm/utils/getActiveItem.js");
function getCompletion(_ref) {
var _getActiveItem;
var state = _ref.state;
if (state.isOpen === false || state.activeItemId === null) {
return null;
}
return ((_getActiveItem = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.getActiveItem)(state)) === null || _getActiveItem === void 0 ? void 0 : _getActiveItem.itemInputValue) || null;
}
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-core/dist/esm/getDefaultProps.js":
/*!*****************************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-core/dist/esm/getDefaultProps.js ***!
\*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "getDefaultProps": () => (/* binding */ getDefaultProps)
/* harmony export */ });
/* harmony import */ var _algolia_autocomplete_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @algolia/autocomplete-shared */ "./node_modules/@algolia/autocomplete-shared/dist/esm/getItemsCount.js");
/* harmony import */ var _algolia_autocomplete_shared__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @algolia/autocomplete-shared */ "./node_modules/@algolia/autocomplete-shared/dist/esm/generateAutocompleteId.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./node_modules/@algolia/autocomplete-core/dist/esm/utils/getNormalizedSources.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "./node_modules/@algolia/autocomplete-core/dist/esm/utils/flatten.js");
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function getDefaultProps(props, pluginSubscribers) {
var _props$id;
/* eslint-disable no-restricted-globals */
var environment = typeof window !== 'undefined' ? window : {};
/* eslint-enable no-restricted-globals */
var plugins = props.plugins || [];
return _objectSpread(_objectSpread({
debug: false,
openOnFocus: false,
placeholder: '',
autoFocus: false,
defaultActiveItemId: null,
stallThreshold: 300,
environment: environment,
shouldPanelOpen: function shouldPanelOpen(_ref) {
var state = _ref.state;
return (0,_algolia_autocomplete_shared__WEBPACK_IMPORTED_MODULE_0__.getItemsCount)(state) > 0;
}
}, props), {}, {
// Since `generateAutocompleteId` triggers a side effect (it increments
// an internal counter), we don't want to execute it if unnecessary.
id: (_props$id = props.id) !== null && _props$id !== void 0 ? _props$id : (0,_algolia_autocomplete_shared__WEBPACK_IMPORTED_MODULE_1__.generateAutocompleteId)(),
plugins: plugins,
// The following props need to be deeply defaulted.
initialState: _objectSpread({
activeItemId: null,
query: '',
completion: null,
collections: [],
isOpen: false,
status: 'idle',
context: {}
}, props.initialState),
onStateChange: function onStateChange(params) {
var _props$onStateChange;
(_props$onStateChange = props.onStateChange) === null || _props$onStateChange === void 0 ? void 0 : _props$onStateChange.call(props, params);
plugins.forEach(function (x) {
var _x$onStateChange;
return (_x$onStateChange = x.onStateChange) === null || _x$onStateChange === void 0 ? void 0 : _x$onStateChange.call(x, params);
});
},
onSubmit: function onSubmit(params) {
var _props$onSubmit;
(_props$onSubmit = props.onSubmit) === null || _props$onSubmit === void 0 ? void 0 : _props$onSubmit.call(props, params);
plugins.forEach(function (x) {
var _x$onSubmit;
return (_x$onSubmit = x.onSubmit) === null || _x$onSubmit === void 0 ? void 0 : _x$onSubmit.call(x, params);
});
},
onReset: function onReset(params) {
var _props$onReset;
(_props$onReset = props.onReset) === null || _props$onReset === void 0 ? void 0 : _props$onReset.call(props, params);
plugins.forEach(function (x) {
var _x$onReset;
return (_x$onReset = x.onReset) === null || _x$onReset === void 0 ? void 0 : _x$onReset.call(x, params);
});
},
getSources: function getSources(params) {
return Promise.all([].concat(_toConsumableArray(plugins.map(function (plugin) {
return plugin.getSources;
})), [props.getSources]).filter(Boolean).map(function (getSources) {
return (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getNormalizedSources)(getSources, params);
})).then(function (nested) {
return (0,_utils__WEBPACK_IMPORTED_MODULE_3__.flatten)(nested);
}).then(function (sources) {
return sources.map(function (source) {
return _objectSpread(_objectSpread({}, source), {}, {
onSelect: function onSelect(params) {
source.onSelect(params);
pluginSubscribers.forEach(function (x) {
var _x$onSelect;
return (_x$onSelect = x.onSelect) === null || _x$onSelect === void 0 ? void 0 : _x$onSelect.call(x, params);
});
},
onActive: function onActive(params) {
source.onActive(params);
pluginSubscribers.forEach(function (x) {
var _x$onActive;
return (_x$onActive = x.onActive) === null || _x$onActive === void 0 ? void 0 : _x$onActive.call(x, params);
});
}
});
});
});
},
navigator: _objectSpread({
navigate: function navigate(_ref2) {
var itemUrl = _ref2.itemUrl;
environment.location.assign(itemUrl);
},
navigateNewTab: function navigateNewTab(_ref3) {
var itemUrl = _ref3.itemUrl;
var windowReference = environment.open(itemUrl, '_blank', 'noopener');
windowReference === null || windowReference === void 0 ? void 0 : windowReference.focus();
},
navigateNewWindow: function navigateNewWindow(_ref4) {
var itemUrl = _ref4.itemUrl;
environment.open(itemUrl, '_blank', 'noopener');
}
}, props.navigator)
});
}
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-core/dist/esm/getPropGetters.js":
/*!****************************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-core/dist/esm/getPropGetters.js ***!
\****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "getPropGetters": () => (/* binding */ getPropGetters)
/* harmony export */ });
/* harmony import */ var _onInput__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./onInput */ "./node_modules/@algolia/autocomplete-core/dist/esm/onInput.js");
/* harmony import */ var _onKeyDown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./onKeyDown */ "./node_modules/@algolia/autocomplete-core/dist/esm/onKeyDown.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./node_modules/@algolia/autocomplete-core/dist/esm/utils/isOrContainsNode.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./node_modules/@algolia/autocomplete-core/dist/esm/utils/getActiveItem.js");
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function getPropGetters(_ref) {
var props = _ref.props,
refresh = _ref.refresh,
store = _ref.store,
setters = _objectWithoutProperties(_ref, ["props", "refresh", "store"]);
var getEnvironmentProps = function getEnvironmentProps(providedProps) {
var inputElement = providedProps.inputElement,
formElement = providedProps.formElement,
panelElement = providedProps.panelElement,
rest = _objectWithoutProperties(providedProps, ["inputElement", "formElement", "panelElement"]);
return _objectSpread({
// On touch devices, we do not rely on the native `blur` event of the
// input to close the panel, but rather on a custom `touchstart` event
// outside of the autocomplete elements.
// This ensures a working experience on mobile because we blur the input
// on touch devices when the user starts scrolling (`touchmove`).
onTouchStart: function onTouchStart(event) {
if (store.getState().isOpen === false || event.target === inputElement) {
return;
} // @TODO: support cases where there are multiple Autocomplete instances.
// Right now, a second instance makes this computation return false.
var isTargetWithinAutocomplete = [formElement, panelElement].some(function (contextNode) {
return (0,_utils__WEBPACK_IMPORTED_MODULE_0__.isOrContainsNode)(contextNode, event.target) || (0,_utils__WEBPACK_IMPORTED_MODULE_0__.isOrContainsNode)(contextNode, props.environment.document.activeElement);
});
if (isTargetWithinAutocomplete === false) {
store.dispatch('blur', null);
}
},
// When scrolling on touch devices (mobiles, tablets, etc.), we want to
// mimic the native platform behavior where the input is blurred to
// hide the virtual keyboard. This gives more vertical space to
// discover all the suggestions showing up in the panel.
onTouchMove: function onTouchMove(event) {
if (store.getState().isOpen === false || inputElement !== props.environment.document.activeElement || event.target === inputElement) {
return;
}
inputElement.blur();
}
}, rest);
};
var getRootProps = function getRootProps(rest) {
return _objectSpread({
role: 'combobox',
'aria-expanded': store.getState().isOpen,
'aria-haspopup': 'listbox',
'aria-owns': store.getState().isOpen ? "".concat(props.id, "-list") : undefined,
'aria-labelledby': "".concat(props.id, "-label")
}, rest);
};
var getFormProps = function getFormProps(providedProps) {
var inputElement = providedProps.inputElement,
rest = _objectWithoutProperties(providedProps, ["inputElement"]);
return _objectSpread({
action: '',
noValidate: true,
role: 'search',
onSubmit: function onSubmit(event) {
var _providedProps$inputE;
event.preventDefault();
props.onSubmit(_objectSpread({
event: event,
refresh: refresh,
state: store.getState()
}, setters));
store.dispatch('submit', null);
(_providedProps$inputE = providedProps.inputElement) === null || _providedProps$inputE === void 0 ? void 0 : _providedProps$inputE.blur();
},
onReset: function onReset(event) {
var _providedProps$inputE2;
event.preventDefault();
props.onReset(_objectSpread({
event: event,
refresh: refresh,
state: store.getState()
}, setters));
store.dispatch('reset', null);
(_providedProps$inputE2 = providedProps.inputElement) === null || _providedProps$inputE2 === void 0 ? void 0 : _providedProps$inputE2.focus();
}
}, rest);
};
var getInputProps = function getInputProps(providedProps) {
function onFocus(event) {
// We want to trigger a query when `openOnFocus` is true
// because the panel should open with the current query.
if (props.openOnFocus || Boolean(store.getState().query)) {
(0,_onInput__WEBPACK_IMPORTED_MODULE_1__.onInput)(_objectSpread({
event: event,
props: props,
query: store.getState().completion || store.getState().query,
refresh: refresh,
store: store
}, setters));
}
store.dispatch('focus', null);
}
var isTouchDevice = ('ontouchstart' in props.environment);
var _ref2 = providedProps || {},
inputElement = _ref2.inputElement,
_ref2$maxLength = _ref2.maxLength,
maxLength = _ref2$maxLength === void 0 ? 512 : _ref2$maxLength,
rest = _objectWithoutProperties(_ref2, ["inputElement", "maxLength"]);
var activeItem = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getActiveItem)(store.getState());
return _objectSpread({
'aria-autocomplete': 'both',
'aria-activedescendant': store.getState().isOpen && store.getState().activeItemId !== null ? "".concat(props.id, "-item-").concat(store.getState().activeItemId) : undefined,
'aria-controls': store.getState().isOpen ? "".concat(props.id, "-list") : undefined,
'aria-labelledby': "".concat(props.id, "-label"),
value: store.getState().completion || store.getState().query,
id: "".concat(props.id, "-input"),
autoComplete: 'off',
autoCorrect: 'off',
autoCapitalize: 'off',
enterKeyHint: activeItem !== null && activeItem !== void 0 && activeItem.itemUrl ? 'go' : 'search',
spellCheck: 'false',
autoFocus: props.autoFocus,
placeholder: props.placeholder,
maxLength: maxLength,
type: 'search',
onChange: function onChange(event) {
(0,_onInput__WEBPACK_IMPORTED_MODULE_1__.onInput)(_objectSpread({
event: event,
props: props,
query: event.currentTarget.value.slice(0, maxLength),
refresh: refresh,
store: store
}, setters));
},
onKeyDown: function onKeyDown(event) {
(0,_onKeyDown__WEBPACK_IMPORTED_MODULE_3__.onKeyDown)(_objectSpread({
event: event,
props: props,
refresh: refresh,
store: store
}, setters));
},
onFocus: onFocus,
onBlur: function onBlur() {
// We do rely on the `blur` event on touch devices.
// See explanation in `onTouchStart`.
if (!isTouchDevice) {
store.dispatch('blur', null);
}
},
onClick: function onClick(event) {
// When the panel is closed and you click on the input while
// the input is focused, the `onFocus` event is not triggered
// (default browser behavior).
// In an autocomplete context, it makes sense to open the panel in this
// case.
// We mimic this event by catching the `onClick` event which
// triggers the `onFocus` for the panel to open.
if (providedProps.inputElement === props.environment.document.activeElement && !store.getState().isOpen) {
onFocus(event);
}
}
}, rest);
};
var getLabelProps = function getLabelProps(rest) {
return _objectSpread({
htmlFor: "".concat(props.id, "-input"),
id: "".concat(props.id, "-label")
}, rest);
};
var getListProps = function getListProps(rest) {
return _objectSpread({
role: 'listbox',
'aria-labelledby': "".concat(props.id, "-label"),
id: "".concat(props.id, "-list")
}, rest);
};
var getPanelProps = function getPanelProps(rest) {
return _objectSpread({
onMouseDown: function onMouseDown(event) {
// Prevents the `activeElement` from being changed to the panel so
// that the blur event is not triggered, otherwise it closes the
// panel.
event.preventDefault();
},
onMouseLeave: function onMouseLeave() {
store.dispatch('mouseleave', null);
}
}, rest);
};
var getItemProps = function getItemProps(providedProps) {
var item = providedProps.item,
source = providedProps.source,
rest = _objectWithoutProperties(providedProps, ["item", "source"]);
return _objectSpread({
id: "".concat(props.id, "-item-").concat(item.__autocomplete_id),
role: 'option',
'aria-selected': store.getState().activeItemId === item.__autocomplete_id,
onMouseMove: function onMouseMove(event) {
if (item.__autocomplete_id === store.getState().activeItemId) {
return;
}
store.dispatch('mousemove', item.__autocomplete_id);
var activeItem = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getActiveItem)(store.getState());
if (store.getState().activeItemId !== null && activeItem) {
var _item = activeItem.item,
itemInputValue = activeItem.itemInputValue,
itemUrl = activeItem.itemUrl,
_source = activeItem.source;
_source.onActive(_objectSpread({
event: event,
item: _item,
itemInputValue: itemInputValue,
itemUrl: itemUrl,
refresh: refresh,
source: _source,
state: store.getState()
}, setters));
}
},
onMouseDown: function onMouseDown(event) {
// Prevents the `activeElement` from being changed to the item so it
// can remain with the current `activeElement`.
event.preventDefault();
},
onClick: function onClick(event) {
var itemInputValue = source.getItemInputValue({
item: item,
state: store.getState()
});
var itemUrl = source.getItemUrl({
item: item,
state: store.getState()
}); // If `getItemUrl` is provided, it means that the suggestion
// is a link, not plain text that aims at updating the query.
// We can therefore skip the state change because it will update
// the `activeItemId`, resulting in a UI flash, especially
// noticeable on mobile.
var runPreCommand = itemUrl ? Promise.resolve() : (0,_onInput__WEBPACK_IMPORTED_MODULE_1__.onInput)(_objectSpread({
event: event,
nextState: {
isOpen: false
},
props: props,
query: itemInputValue,
refresh: refresh,
store: store
}, setters));
runPreCommand.then(function () {
source.onSelect(_objectSpread({
event: event,
item: item,
itemInputValue: itemInputValue,
itemUrl: itemUrl,
refresh: refresh,
source: source,
state: store.getState()
}, setters));
});
}
}, rest);
};
return {
getEnvironmentProps: getEnvironmentProps,
getRootProps: getRootProps,
getFormProps: getFormProps,
getLabelProps: getLabelProps,
getInputProps: getInputProps,
getPanelProps: getPanelProps,
getListProps: getListProps,
getItemProps: getItemProps
};
}
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-core/dist/esm/onInput.js":
/*!*********************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-core/dist/esm/onInput.js ***!
\*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "onInput": () => (/* binding */ onInput)
/* harmony export */ });
/* harmony import */ var _resolve__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./resolve */ "./node_modules/@algolia/autocomplete-core/dist/esm/resolve.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ "./node_modules/@algolia/autocomplete-core/dist/esm/utils/getActiveItem.js");
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
var lastStalledId = null;
function onInput(_ref) {
var event = _ref.event,
_ref$nextState = _ref.nextState,
nextState = _ref$nextState === void 0 ? {} : _ref$nextState,
props = _ref.props,
query = _ref.query,
refresh = _ref.refresh,
store = _ref.store,
setters = _objectWithoutProperties(_ref, ["event", "nextState", "props", "query", "refresh", "store"]);
if (lastStalledId) {
props.environment.clearTimeout(lastStalledId);
}
var setCollections = setters.setCollections,
setIsOpen = setters.setIsOpen,
setQuery = setters.setQuery,
setActiveItemId = setters.setActiveItemId,
setStatus = setters.setStatus;
setQuery(query);
setActiveItemId(props.defaultActiveItemId);
if (!query && props.openOnFocus === false) {
var _nextState$isOpen;
setStatus('idle');
setCollections(store.getState().collections.map(function (collection) {
return _objectSpread(_objectSpread({}, collection), {}, {
items: []
});
}));
setIsOpen((_nextState$isOpen = nextState.isOpen) !== null && _nextState$isOpen !== void 0 ? _nextState$isOpen : props.shouldPanelOpen({
state: store.getState()
}));
return Promise.resolve();
}
setStatus('loading');
lastStalledId = props.environment.setTimeout(function () {
setStatus('stalled');
}, props.stallThreshold);
return props.getSources(_objectSpread({
query: query,
refresh: refresh,
state: store.getState()
}, setters)).then(function (sources) {
setStatus('loading');
return Promise.all(sources.map(function (source) {
return Promise.resolve(source.getItems(_objectSpread({
query: query,
refresh: refresh,
state: store.getState()
}, setters))).then(function (itemsOrDescription) {
return (0,_resolve__WEBPACK_IMPORTED_MODULE_0__.preResolve)(itemsOrDescription, source.sourceId);
});
})).then(_resolve__WEBPACK_IMPORTED_MODULE_0__.resolve).then(function (responses) {
return (0,_resolve__WEBPACK_IMPORTED_MODULE_0__.postResolve)(responses, sources);
}).then(function (collections) {
var _nextState$isOpen2;
setStatus('idle');
setCollections(collections);
var isPanelOpen = props.shouldPanelOpen({
state: store.getState()
});
setIsOpen((_nextState$isOpen2 = nextState.isOpen) !== null && _nextState$isOpen2 !== void 0 ? _nextState$isOpen2 : props.openOnFocus && !query && isPanelOpen || isPanelOpen);
var highlightedItem = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.getActiveItem)(store.getState());
if (store.getState().activeItemId !== null && highlightedItem) {
var item = highlightedItem.item,
itemInputValue = highlightedItem.itemInputValue,
itemUrl = highlightedItem.itemUrl,
source = highlightedItem.source;
source.onActive(_objectSpread({
event: event,
item: item,
itemInputValue: itemInputValue,
itemUrl: itemUrl,
refresh: refresh,
source: source,
state: store.getState()
}, setters));
}
}).finally(function () {
if (lastStalledId) {
props.environment.clearTimeout(lastStalledId);
}
});
});
}
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-core/dist/esm/onKeyDown.js":
/*!***********************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-core/dist/esm/onKeyDown.js ***!
\***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "onKeyDown": () => (/* binding */ onKeyDown)
/* harmony export */ });
/* harmony import */ var _onInput__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./onInput */ "./node_modules/@algolia/autocomplete-core/dist/esm/onInput.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./node_modules/@algolia/autocomplete-core/dist/esm/utils/getActiveItem.js");
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function onKeyDown(_ref) {
var event = _ref.event,
props = _ref.props,
refresh = _ref.refresh,
store = _ref.store,
setters = _objectWithoutProperties(_ref, ["event", "props", "refresh", "store"]);
if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
// eslint-disable-next-line no-inner-declarations
var triggerScrollIntoView = function triggerScrollIntoView() {
var nodeItem = props.environment.document.getElementById("".concat(props.id, "-item-").concat(store.getState().activeItemId));
if (nodeItem) {
if (nodeItem.scrollIntoViewIfNeeded) {
nodeItem.scrollIntoViewIfNeeded(false);
} else {
nodeItem.scrollIntoView(false);
}
}
}; // eslint-disable-next-line no-inner-declarations
var triggerOnActive = function triggerOnActive() {
var highlightedItem = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.getActiveItem)(store.getState());
if (store.getState().activeItemId !== null && highlightedItem) {
var item = highlightedItem.item,
itemInputValue = highlightedItem.itemInputValue,
itemUrl = highlightedItem.itemUrl,
source = highlightedItem.source;
source.onActive(_objectSpread({
event: event,
item: item,
itemInputValue: itemInputValue,
itemUrl: itemUrl,
refresh: refresh,
source: source,
state: store.getState()
}, setters));
}
}; // Default browser behavior changes the caret placement on ArrowUp and
// ArrowDown.
event.preventDefault(); // When re-opening the panel, we need to split the logic to keep the actions
// synchronized as `onInput` returns a promise.
if (store.getState().isOpen === false && (props.openOnFocus || Boolean(store.getState().query))) {
(0,_onInput__WEBPACK_IMPORTED_MODULE_1__.onInput)(_objectSpread({
event: event,
props: props,
query: store.getState().query,
refresh: refresh,
store: store
}, setters)).then(function () {
store.dispatch(event.key, {
nextActiveItemId: props.defaultActiveItemId
});
triggerOnActive(); // Since we rely on the DOM, we need to wait for all the micro tasks to
// finish (which include re-opening the panel) to make sure all the
// elements are available.
setTimeout(triggerScrollIntoView, 0);
});
} else {
store.dispatch(event.key, {});
triggerOnActive();
triggerScrollIntoView();
}
} else if (event.key === 'Escape') {
// This prevents the default browser behavior on `input[type="search"]`
// from removing the query right away because we first want to close the
// panel.
event.preventDefault();
store.dispatch(event.key, null);
} else if (event.key === 'Enter') {
// No active item, so we let the browser handle the native `onSubmit` form
// event.
if (store.getState().activeItemId === null || store.getState().collections.every(function (collection) {
return collection.items.length === 0;
})) {
return;
} // This prevents the `onSubmit` event to be sent because an item is
// highlighted.
event.preventDefault();
var _ref2 = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.getActiveItem)(store.getState()),
item = _ref2.item,
itemInputValue = _ref2.itemInputValue,
itemUrl = _ref2.itemUrl,
source = _ref2.source;
if (event.metaKey || event.ctrlKey) {
if (itemUrl !== undefined) {
source.onSelect(_objectSpread({
event: event,
item: item,
itemInputValue: itemInputValue,
itemUrl: itemUrl,
refresh: refresh,
source: source,
state: store.getState()
}, setters));
props.navigator.navigateNewTab({
itemUrl: itemUrl,
item: item,
state: store.getState()
});
}
} else if (event.shiftKey) {
if (itemUrl !== undefined) {
source.onSelect(_objectSpread({
event: event,
item: item,
itemInputValue: itemInputValue,
itemUrl: itemUrl,
refresh: refresh,
source: source,
state: store.getState()
}, setters));
props.navigator.navigateNewWindow({
itemUrl: itemUrl,
item: item,
state: store.getState()
});
}
} else if (event.altKey) {// Keep native browser behavior
} else {
if (itemUrl !== undefined) {
source.onSelect(_objectSpread({
event: event,
item: item,
itemInputValue: itemInputValue,
itemUrl: itemUrl,
refresh: refresh,
source: source,
state: store.getState()
}, setters));
props.navigator.navigate({
itemUrl: itemUrl,
item: item,
state: store.getState()
});
return;
}
(0,_onInput__WEBPACK_IMPORTED_MODULE_1__.onInput)(_objectSpread({
event: event,
nextState: {
isOpen: false
},
props: props,
query: itemInputValue,
refresh: refresh,
store: store
}, setters)).then(function () {
source.onSelect(_objectSpread({
event: event,
item: item,
itemInputValue: itemInputValue,
itemUrl: itemUrl,
refresh: refresh,
source: source,
state: store.getState()
}, setters));
});
}
}
}
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-core/dist/esm/resolve.js":
/*!*********************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-core/dist/esm/resolve.js ***!
\*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "preResolve": () => (/* binding */ preResolve),
/* harmony export */ "resolve": () => (/* binding */ resolve),
/* harmony export */ "postResolve": () => (/* binding */ postResolve)
/* harmony export */ });
/* harmony import */ var _algolia_autocomplete_shared__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @algolia/autocomplete-shared */ "./node_modules/@algolia/autocomplete-shared/dist/esm/invariant.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./node_modules/@algolia/autocomplete-core/dist/esm/utils/flatten.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ "./node_modules/@algolia/autocomplete-core/dist/esm/utils/mapToAlgoliaResponse.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function isDescription(item) {
return Boolean(item.execute);
}
function isRequesterDescription(description) {
return Boolean(description === null || description === void 0 ? void 0 : description.execute);
}
function preResolve(itemsOrDescription, sourceId) {
if (isRequesterDescription(itemsOrDescription)) {
return _objectSpread(_objectSpread({}, itemsOrDescription), {}, {
requests: itemsOrDescription.queries.map(function (query) {
return {
query: query,
sourceId: sourceId,
transformResponse: itemsOrDescription.transformResponse
};
})
});
}
return {
items: itemsOrDescription,
sourceId: sourceId
};
}
function resolve(items) {
var packed = items.reduce(function (acc, current) {
if (!isDescription(current)) {
acc.push(current);
return acc;
}
var searchClient = current.searchClient,
execute = current.execute,
requests = current.requests;
var container = acc.find(function (item) {
return isDescription(current) && isDescription(item) && item.searchClient === searchClient && item.execute === execute;
});
if (container) {
var _container$items;
(_container$items = container.items).push.apply(_container$items, _toConsumableArray(requests));
} else {
var request = {
execute: execute,
items: requests,
searchClient: searchClient
};
acc.push(request);
}
return acc;
}, []);
var values = packed.map(function (maybeDescription) {
if (!isDescription(maybeDescription)) {
return Promise.resolve(maybeDescription);
}
var _ref = maybeDescription,
execute = _ref.execute,
items = _ref.items,
searchClient = _ref.searchClient;
return execute({
searchClient: searchClient,
requests: items
});
});
return Promise.all(values).then(function (responses) {
return (0,_utils__WEBPACK_IMPORTED_MODULE_0__.flatten)(responses);
});
}
function postResolve(responses, sources) {
return sources.map(function (source) {
var matches = responses.filter(function (response) {
return response.sourceId === source.sourceId;
});
var results = matches.map(function (_ref2) {
var items = _ref2.items;
return items;
});
var transform = matches[0].transformResponse;
var items = transform ? transform((0,_utils__WEBPACK_IMPORTED_MODULE_1__.mapToAlgoliaResponse)(results)) : results;
(0,_algolia_autocomplete_shared__WEBPACK_IMPORTED_MODULE_2__.invariant)(Array.isArray(items), "The `getItems` function from source \"".concat(source.sourceId, "\" must return an array of items but returned type ").concat(JSON.stringify(_typeof(items)), ":\n\n").concat(JSON.stringify(items, null, 2), ".\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"));
(0,_algolia_autocomplete_shared__WEBPACK_IMPORTED_MODULE_2__.invariant)(items.every(Boolean), "The `getItems` function from source \"".concat(source.sourceId, "\" must return an array of items but returned ").concat(JSON.stringify(undefined), ".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"));
return {
source: source,
items: items
};
});
}
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-core/dist/esm/stateReducer.js":
/*!**************************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-core/dist/esm/stateReducer.js ***!
\**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "stateReducer": () => (/* binding */ stateReducer)
/* harmony export */ });
/* harmony import */ var _algolia_autocomplete_shared__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @algolia/autocomplete-shared */ "./node_modules/@algolia/autocomplete-shared/dist/esm/getItemsCount.js");
/* harmony import */ var _algolia_autocomplete_shared__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @algolia/autocomplete-shared */ "./node_modules/@algolia/autocomplete-shared/dist/esm/invariant.js");
/* harmony import */ var _getCompletion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getCompletion */ "./node_modules/@algolia/autocomplete-core/dist/esm/getCompletion.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./node_modules/@algolia/autocomplete-core/dist/esm/utils/getNextActiveItemId.js");
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var stateReducer = function stateReducer(state, action) {
switch (action.type) {
case 'setActiveItemId':
{
return _objectSpread(_objectSpread({}, state), {}, {
activeItemId: action.payload
});
}
case 'setQuery':
{
return _objectSpread(_objectSpread({}, state), {}, {
query: action.payload,
completion: null
});
}
case 'setCollections':
{
return _objectSpread(_objectSpread({}, state), {}, {
collections: action.payload
});
}
case 'setIsOpen':
{
return _objectSpread(_objectSpread({}, state), {}, {
isOpen: action.payload
});
}
case 'setStatus':
{
return _objectSpread(_objectSpread({}, state), {}, {
status: action.payload
});
}
case 'setContext':
{
return _objectSpread(_objectSpread({}, state), {}, {
context: _objectSpread(_objectSpread({}, state.context), action.payload)
});
}
case 'ArrowDown':
{
var nextState = _objectSpread(_objectSpread({}, state), {}, {
activeItemId: action.payload.hasOwnProperty('nextActiveItemId') ? action.payload.nextActiveItemId : (0,_utils__WEBPACK_IMPORTED_MODULE_0__.getNextActiveItemId)(1, state.activeItemId, (0,_algolia_autocomplete_shared__WEBPACK_IMPORTED_MODULE_1__.getItemsCount)(state), action.props.defaultActiveItemId)
});
return _objectSpread(_objectSpread({}, nextState), {}, {
completion: (0,_getCompletion__WEBPACK_IMPORTED_MODULE_2__.getCompletion)({
state: nextState
})
});
}
case 'ArrowUp':
{
var _nextState = _objectSpread(_objectSpread({}, state), {}, {
activeItemId: (0,_utils__WEBPACK_IMPORTED_MODULE_0__.getNextActiveItemId)(-1, state.activeItemId, (0,_algolia_autocomplete_shared__WEBPACK_IMPORTED_MODULE_1__.getItemsCount)(state), action.props.defaultActiveItemId)
});
return _objectSpread(_objectSpread({}, _nextState), {}, {
completion: (0,_getCompletion__WEBPACK_IMPORTED_MODULE_2__.getCompletion)({
state: _nextState
})
});
}
case 'Escape':
{
if (state.isOpen) {
return _objectSpread(_objectSpread({}, state), {}, {
activeItemId: null,
isOpen: false,
completion: null
});
}
return _objectSpread(_objectSpread({}, state), {}, {
activeItemId: null,
query: '',
status: 'idle',
collections: []
});
}
case 'submit':
{
return _objectSpread(_objectSpread({}, state), {}, {
activeItemId: null,
isOpen: false,
status: 'idle'
});
}
case 'reset':
{
return _objectSpread(_objectSpread({}, state), {}, {
activeItemId: // Since we open the panel on reset when openOnFocus=true
// we need to restore the highlighted index to the defaultActiveItemId. (DocSearch use-case)
// Since we close the panel when openOnFocus=false
// we lose track of the highlighted index. (Query-suggestions use-case)
action.props.openOnFocus === true ? action.props.defaultActiveItemId : null,
status: 'idle',
query: ''
});
}
case 'focus':
{
return _objectSpread(_objectSpread({}, state), {}, {
activeItemId: action.props.defaultActiveItemId,
isOpen: (action.props.openOnFocus || Boolean(state.query)) && action.props.shouldPanelOpen({
state: state
})
});
}
case 'blur':
{
if (action.props.debug) {
return state;
}
return _objectSpread(_objectSpread({}, state), {}, {
isOpen: false,
activeItemId: null
});
}
case 'mousemove':
{
return _objectSpread(_objectSpread({}, state), {}, {
activeItemId: action.payload
});
}
case 'mouseleave':
{
return _objectSpread(_objectSpread({}, state), {}, {
activeItemId: action.props.defaultActiveItemId
});
}
default:
(0,_algolia_autocomplete_shared__WEBPACK_IMPORTED_MODULE_3__.invariant)(false, "The reducer action ".concat(JSON.stringify(action.type), " is not supported."));
return state;
}
};
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-core/dist/esm/utils/flatten.js":
/*!***************************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-core/dist/esm/utils/flatten.js ***!
\***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "flatten": () => (/* binding */ flatten)
/* harmony export */ });
function flatten(values) {
return values.reduce(function (a, b) {
return a.concat(b);
}, []);
}
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-core/dist/esm/utils/getActiveItem.js":
/*!*********************************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-core/dist/esm/utils/getActiveItem.js ***!
\*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "getActiveItem": () => (/* binding */ getActiveItem)
/* harmony export */ });
// We don't have access to the autocomplete source when we call `onKeyDown`
// or `onClick` because those are native browser events.
// However, we can get the source from the suggestion index.
function getCollectionFromActiveItemId(state) {
// Given 3 sources with respectively 1, 2 and 3 suggestions: [1, 2, 3]
// We want to get the accumulated counts:
// [1, 1 + 2, 1 + 2 + 3] = [1, 3, 3 + 3] = [1, 3, 6]
var accumulatedCollectionsCount = state.collections.map(function (collections) {
return collections.items.length;
}).reduce(function (acc, collectionsCount, index) {
var previousValue = acc[index - 1] || 0;
var nextValue = previousValue + collectionsCount;
acc.push(nextValue);
return acc;
}, []); // Based on the accumulated counts, we can infer the index of the suggestion.
var collectionIndex = accumulatedCollectionsCount.reduce(function (acc, current) {
if (current <= state.activeItemId) {
return acc + 1;
}
return acc;
}, 0);
return state.collections[collectionIndex];
}
/**
* Gets the highlighted index relative to a suggestion object (not the absolute
* highlighted index).
*
* Example:
* [['a', 'b'], ['c', 'd', 'e'], ['f']]
* ↑
* (absolute: 3, relative: 1)
*/
function getRelativeActiveItemId(_ref) {
var state = _ref.state,
collection = _ref.collection;
var isOffsetFound = false;
var counter = 0;
var previousItemsOffset = 0;
while (isOffsetFound === false) {
var currentCollection = state.collections[counter];
if (currentCollection === collection) {
isOffsetFound = true;
break;
}
previousItemsOffset += currentCollection.items.length;
counter++;
}
return state.activeItemId - previousItemsOffset;
}
function getActiveItem(state) {
var collection = getCollectionFromActiveItemId(state);
if (!collection) {
return null;
}
var item = collection.items[getRelativeActiveItemId({
state: state,
collection: collection
})];
var source = collection.source;
var itemInputValue = source.getItemInputValue({
item: item,
state: state
});
var itemUrl = source.getItemUrl({
item: item,
state: state
});
return {
item: item,
itemInputValue: itemInputValue,
itemUrl: itemUrl,
source: source
};
}
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-core/dist/esm/utils/getNextActiveItemId.js":
/*!***************************************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-core/dist/esm/utils/getNextActiveItemId.js ***!
\***************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "getNextActiveItemId": () => (/* binding */ getNextActiveItemId)
/* harmony export */ });
/**
* Returns the next active item ID from the current state.
*
* We allow circular keyboard navigation from the base index.
* The base index can either be `null` (nothing is highlighted) or `0`
* (the first item is highlighted).
* The base index is allowed to get assigned `null` only if
* `props.defaultActiveItemId` is `null`. This pattern allows to "stop"
* by the actual query before navigating to other suggestions as seen on
* Google or Amazon.
*
* @param moveAmount The offset to increment (or decrement) the last index
* @param baseIndex The current index to compute the next index from
* @param itemCount The number of items
* @param defaultActiveItemId The default active index to fallback to
*/
function getNextActiveItemId(moveAmount, baseIndex, itemCount, defaultActiveItemId) {
if (!itemCount) {
return null;
}
if (moveAmount < 0 && (baseIndex === null || defaultActiveItemId !== null && baseIndex === 0)) {
return itemCount + moveAmount;
}
var numericIndex = (baseIndex === null ? -1 : baseIndex) + moveAmount;
if (numericIndex <= -1 || numericIndex >= itemCount) {
return defaultActiveItemId === null ? null : 0;
}
return numericIndex;
}
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-core/dist/esm/utils/getNormalizedSources.js":
/*!****************************************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-core/dist/esm/utils/getNormalizedSources.js ***!
\****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "getNormalizedSources": () => (/* binding */ getNormalizedSources)
/* harmony export */ });
/* harmony import */ var _algolia_autocomplete_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @algolia/autocomplete-shared */ "./node_modules/@algolia/autocomplete-shared/dist/esm/invariant.js");
/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./noop */ "./node_modules/@algolia/autocomplete-core/dist/esm/utils/noop.js");
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function getNormalizedSources(getSources, params) {
var seenSourceIds = [];
return Promise.resolve(getSources(params)).then(function (sources) {
(0,_algolia_autocomplete_shared__WEBPACK_IMPORTED_MODULE_0__.invariant)(Array.isArray(sources), "The `getSources` function must return an array of sources but returned type ".concat(JSON.stringify(_typeof(sources)), ":\n\n").concat(JSON.stringify(sources, null, 2)));
return Promise.all(sources // We allow `undefined` and `false` sources to allow users to use
// `Boolean(query) && source` (=> `false`).
// We need to remove these values at this point.
.filter(function (maybeSource) {
return Boolean(maybeSource);
}).map(function (source) {
(0,_algolia_autocomplete_shared__WEBPACK_IMPORTED_MODULE_0__.invariant)(typeof source.sourceId === 'string', 'A source must provide a `sourceId` string.');
if (seenSourceIds.includes(source.sourceId)) {
throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(source.sourceId), " is not unique."));
}
seenSourceIds.push(source.sourceId);
var normalizedSource = _objectSpread({
getItemInputValue: function getItemInputValue(_ref) {
var state = _ref.state;
return state.query;
},
getItemUrl: function getItemUrl() {
return undefined;
},
onSelect: function onSelect(_ref2) {
var setIsOpen = _ref2.setIsOpen;
setIsOpen(false);
},
onActive: _noop__WEBPACK_IMPORTED_MODULE_1__.noop
}, source);
return Promise.resolve(normalizedSource);
}));
});
}
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-core/dist/esm/utils/isOrContainsNode.js":
/*!************************************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-core/dist/esm/utils/isOrContainsNode.js ***!
\************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "isOrContainsNode": () => (/* binding */ isOrContainsNode)
/* harmony export */ });
function isOrContainsNode(parent, child) {
return parent === child || parent.contains(child);
}
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-core/dist/esm/utils/mapToAlgoliaResponse.js":
/*!****************************************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-core/dist/esm/utils/mapToAlgoliaResponse.js ***!
\****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "mapToAlgoliaResponse": () => (/* binding */ mapToAlgoliaResponse)
/* harmony export */ });
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function mapToAlgoliaResponse(rawResults) {
var results = rawResults.map(function (result) {
var _hits;
return _objectSpread(_objectSpread({}, result), {}, {
hits: (_hits = result.hits) === null || _hits === void 0 ? void 0 : _hits.map(function (hit) {
// Bring support for the Insights plugin.
return _objectSpread(_objectSpread({}, hit), {}, {
__autocomplete_indexName: result.index,
__autocomplete_queryID: result.queryID
});
})
});
});
return {
results: results,
hits: results.map(function (result) {
return result.hits;
}).filter(Boolean),
facetHits: results.map(function (result) {
var _facetHits;
return (_facetHits = result.facetHits) === null || _facetHits === void 0 ? void 0 : _facetHits.map(function (facetHit) {
// Bring support for the highlighting components.
return {
label: facetHit.value,
count: facetHit.count,
_highlightResult: {
label: {
value: facetHit.highlighted
}
}
};
});
}).filter(Boolean)
};
}
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-core/dist/esm/utils/noop.js":
/*!************************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-core/dist/esm/utils/noop.js ***!
\************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "noop": () => (/* binding */ noop)
/* harmony export */ });
var noop = function noop() {};
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-shared/dist/esm/generateAutocompleteId.js":
/*!**************************************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-shared/dist/esm/generateAutocompleteId.js ***!
\**************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "generateAutocompleteId": () => (/* binding */ generateAutocompleteId)
/* harmony export */ });
var autocompleteId = 0;
function generateAutocompleteId() {
return "autocomplete-".concat(autocompleteId++);
}
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-shared/dist/esm/getItemsCount.js":
/*!*****************************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-shared/dist/esm/getItemsCount.js ***!
\*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "getItemsCount": () => (/* binding */ getItemsCount)
/* harmony export */ });
function getItemsCount(state) {
if (state.collections.length === 0) {
return 0;
}
return state.collections.reduce(function (sum, collection) {
return sum + collection.items.length;
}, 0);
}
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-shared/dist/esm/invariant.js":
/*!*************************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-shared/dist/esm/invariant.js ***!
\*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "invariant": () => (/* binding */ invariant)
/* harmony export */ });
/**
* Throws an error if the condition is not met in development mode.
* This is used to make development a better experience to provide guidance as
* to where the error comes from.
*/
function invariant(condition, message) {
if (false) {}
if (!condition) {
throw new Error("[Autocomplete] ".concat(message));
}
}
/***/ }),
/***/ "./node_modules/@algolia/autocomplete-shared/dist/esm/warn.js":
/*!********************************************************************!*\
!*** ./node_modules/@algolia/autocomplete-shared/dist/esm/warn.js ***!
\********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "warnCache": () => (/* binding */ warnCache),
/* harmony export */ "warn": () => (/* binding */ warn)
/* harmony export */ });
var warnCache = {
current: {}
};
/**
* Logs a warning if the condition is not met.
* This is used to log issues in development environment only.
*/
function warn(condition, message) {
if (false) {}
if (condition) {
return;
}
var sanitizedMessage = message.trim();
var hasAlreadyPrinted = warnCache.current[sanitizedMessage];
if (!hasAlreadyPrinted) {
warnCache.current[sanitizedMessage] = true; // eslint-disable-next-line no-console
console.warn("[Autocomplete] ".concat(sanitizedMessage));
}
}
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js":
/*!**********************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
\**********************************************************************/
/***/ ((module) => {
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
module.exports = _assertThisInitialized;
module.exports["default"] = module.exports, module.exports.__esModule = true;
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/extends.js":
/*!********************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/extends.js ***!
\********************************************************/
/***/ ((module) => {
function _extends() {
module.exports = _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
module.exports["default"] = module.exports, module.exports.__esModule = true;
return _extends.apply(this, arguments);
}
module.exports = _extends;
module.exports["default"] = module.exports, module.exports.__esModule = true;
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/inheritsLoose.js":
/*!**************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/inheritsLoose.js ***!
\**************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/setPrototypeOf.js");
function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
setPrototypeOf(subClass, superClass);
}
module.exports = _inheritsLoose;
module.exports["default"] = module.exports, module.exports.__esModule = true;
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js":
/*!**********************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
\**********************************************************************/
/***/ ((module) => {
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
module.exports = _interopRequireDefault;
module.exports["default"] = module.exports, module.exports.__esModule = true;
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js":
/*!*****************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js ***!
\*****************************************************************************/
/***/ ((module) => {
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
}
module.exports = _objectWithoutPropertiesLoose;
module.exports["default"] = module.exports, module.exports.__esModule = true;
/***/ }),
/***/ "./node_modules/@babel/runtime/helpers/setPrototypeOf.js":
/*!***************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
\***************************************************************/
/***/ ((module) => {
function _setPrototypeOf(o, p) {
module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
module.exports["default"] = module.exports, module.exports.__esModule = true;
return _setPrototypeOf(o, p);
}
module.exports = _setPrototypeOf;
module.exports["default"] = module.exports, module.exports.__esModule = true;
/***/ }),
/***/ "./node_modules/@babel/runtime/regenerator/index.js":
/*!**********************************************************!*\
!*** ./node_modules/@babel/runtime/regenerator/index.js ***!
\**********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
module.exports = __webpack_require__(/*! regenerator-runtime */ "./node_modules/regenerator-runtime/runtime.js");
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/AlgoliaLogo.js":
/*!***************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/AlgoliaLogo.js ***!
\***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "AlgoliaLogo": () => (/* binding */ AlgoliaLogo)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
function AlgoliaLogo() {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
href: "https://www.algolia.com/docsearch",
target: "_blank",
rel: "noopener noreferrer"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
className: "DocSearch-Label"
}, "Search by"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
width: "77",
height: "19"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M2.5067 0h14.0245c1.384.001 2.5058 1.1205 2.5068 2.5017V16.5c-.0014 1.3808-1.1232 2.4995-2.5068 2.5H2.5067C1.1232 18.9995.0014 17.8808 0 16.5V2.4958A2.495 2.495 0 01.735.7294 2.505 2.505 0 012.5068 0zM37.95 15.0695c-3.7068.0168-3.7068-2.986-3.7068-3.4634L34.2372.3576 36.498 0v11.1794c0 .2715 0 1.9889 1.452 1.994v1.8961zm-9.1666-1.8388c.694 0 1.2086-.0397 1.5678-.1088v-2.2934a5.3639 5.3639 0 00-1.3303-.1679 4.8283 4.8283 0 00-.758.0582 2.2845 2.2845 0 00-.688.2024c-.2029.0979-.371.2362-.4919.4142-.1268.1788-.185.2826-.185.5533 0 .5297.185.8359.5205 1.0375.3355.2016.7928.3053 1.365.3053v-.0008zm-.1969-8.1817c.7463 0 1.3768.092 1.8856.2767.5088.1838.9195.4428 1.2204.7717.3068.334.5147.7777.6423 1.251.1327.4723.196.991.196 1.5603v5.798c-.5235.1036-1.05.192-1.5787.2649-.7048.1037-1.4976.156-2.3774.156-.5832 0-1.1215-.0582-1.6016-.167a3.385 3.385 0 01-1.2432-.5364 2.6034 2.6034 0 01-.8037-.9565c-.191-.3922-.29-.9447-.29-1.5208 0-.5533.11-.905.3246-1.2863a2.7351 2.7351 0 01.8849-.9329c.376-.242.8029-.415 1.2948-.5187a7.4517 7.4517 0 011.5381-.156 7.1162 7.1162 0 011.6667.2024V8.886c0-.259-.0296-.5061-.093-.7372a1.5847 1.5847 0 00-.3245-.6158 1.5079 1.5079 0 00-.6119-.4158 2.6788 2.6788 0 00-.966-.173c-.5206 0-.9948.0634-1.4283.1384a6.5481 6.5481 0 00-1.065.259l-.2712-1.849c.2831-.0986.7048-.1964 1.2491-.2943a9.2979 9.2979 0 011.752-.1501v.0008zm44.6597 8.1193c.6947 0 1.2086-.0405 1.567-.1097v-2.2942a5.3743 5.3743 0 00-1.3303-.1679c-.2485 0-.503.0177-.7573.0582a2.2853 2.2853 0 00-.688.2024 1.2333 1.2333 0 00-.4918.4142c-.1268.1788-.1843.2826-.1843.5533 0 .5297.1843.8359.5198 1.0375.3414.2066.7927.3053 1.365.3053v.0009zm-.191-8.1767c.7463 0 1.3768.0912 1.8856.2759.5087.1847.9195.4436 1.2204.7717.3.329.5147.7786.6414 1.251a5.7248 5.7248 0 01.197 1.562v5.7972c-.3466.0742-.874.1602-1.5788.2648-.7049.1038-1.4976.1552-2.3774.1552-.5832 0-1.1215-.0573-1.6016-.167a3.385 3.385 0 01-1.2432-.5356 2.6034 2.6034 0 01-.8038-.9565c-.191-.3922-.2898-.9447-.2898-1.5216 0-.5533.1098-.905.3245-1.2854a2.7373 2.7373 0 01.8849-.9338c.376-.2412.8029-.4141 1.2947-.5178a7.4545 7.4545 0 012.325-.1097c.2781.0287.5672.081.879.156v-.3686a2.7781 2.7781 0 00-.092-.738 1.5788 1.5788 0 00-.3246-.6166 1.5079 1.5079 0 00-.612-.415 2.6797 2.6797 0 00-.966-.1729c-.5205 0-.9947.0633-1.4282.1384a6.5608 6.5608 0 00-1.065.259l-.2712-1.8498c.283-.0979.7048-.1957 1.2491-.2935a9.8597 9.8597 0 011.752-.1494zm-6.79-1.072c-.7576.001-1.373-.6103-1.3759-1.3664 0-.755.6128-1.3664 1.376-1.3664.764 0 1.3775.6115 1.3775 1.3664s-.6195 1.3664-1.3776 1.3664zm1.1393 11.1507h-2.2726V5.3409l2.2734-.3568v10.0845l-.0008.0017zm-3.984 0c-3.707.0168-3.707-2.986-3.707-3.4642L59.7069.3576 61.9685 0v11.1794c0 .2715 0 1.9889 1.452 1.994V15.0703zm-7.3512-4.979c0-.975-.2138-1.7873-.6305-2.3516-.4167-.571-.9998-.852-1.747-.852-.7454 0-1.3302.281-1.7452.852-.4166.5702-.6195 1.3765-.6195 2.3516 0 .9851.208 1.6473.6254 2.2183.4158.576.9998.8587 1.7461.8587.7454 0 1.3303-.2885 1.747-.8595.4158-.5761.6237-1.2315.6237-2.2184v.0009zm2.3132-.006c0 .7609-.1099 1.3361-.3356 1.9654a4.654 4.654 0 01-.9533 1.6076A4.214 4.214 0 0155.613 14.69c-.579.2412-1.4697.3795-1.9143.3795-.4462-.005-1.3303-.1324-1.9033-.3795a4.307 4.307 0 01-1.474-1.0316c-.4115-.4445-.7293-.9801-.9609-1.6076a5.3423 5.3423 0 01-.3465-1.9653c0-.7608.104-1.493.3356-2.1155a4.683 4.683 0 01.9719-1.5958 4.3383 4.3383 0 011.479-1.0257c.5739-.242 1.2043-.3567 1.8864-.3567.6829 0 1.3125.1197 1.8906.3567a4.1245 4.1245 0 011.4816 1.0257 4.7587 4.7587 0 01.9592 1.5958c.2426.6225.3643 1.3547.3643 2.1155zm-17.0198 0c0 .9448.208 1.9932.6238 2.431.4166.4386.955.6579 1.6142.6579.3584 0 .6998-.0523 1.0176-.1502.3186-.0978.5721-.2134.775-.3517V7.0784a8.8706 8.8706 0 00-1.4926-.1906c-.8206-.0236-1.4452.312-1.8847.8468-.4335.5365-.6533 1.476-.6533 2.3516v-.0008zm6.2863 4.4485c0 1.5385-.3938 2.662-1.1866 3.3773-.791.7136-2.0005 1.0712-3.6308 1.0712-.5958 0-1.834-.1156-2.8228-.334l.3643-1.7865c.8282.173 1.9202.2193 2.4932.2193.9077 0 1.555-.1847 1.943-.5533.388-.3686.578-.916.578-1.643v-.3687a6.8289 6.8289 0 01-.8848.3349c-.3634.1096-.786.167-1.261.167-.6246 0-1.1917-.0979-1.7055-.2944a3.5554 3.5554 0 01-1.3244-.8645c-.3642-.3796-.6541-.8579-.8561-1.4289-.2028-.571-.3068-1.59-.3068-2.339 0-.7034.1099-1.5856.3245-2.1735.2198-.5871.5316-1.0949.9542-1.515.4167-.42.9255-.743 1.5213-.98a5.5923 5.5923 0 012.052-.3855c.7353 0 1.4114.092 2.0707.2024.6592.1088 1.2204.2236 1.6776.35v8.945-.0008zM11.5026 4.2418v-.6511c-.0005-.4553-.3704-.8241-.8266-.8241H8.749c-.4561 0-.826.3688-.8265.824v.669c0 .0742.0693.1264.1445.1096a6.0346 6.0346 0 011.6768-.2362 6.125 6.125 0 011.6202.2185.1116.1116 0 00.1386-.1097zm-5.2806.852l-.3296-.3282a.8266.8266 0 00-1.168 0l-.393.3922a.8199.8199 0 000 1.164l.3237.323c.0524.0515.1268.0397.1733-.0117.191-.259.3989-.507.6305-.7372.2374-.2362.48-.4437.7462-.6335.0575-.0354.0634-.1155.017-.1687zm3.5159 2.069v2.818c0 .081.0879.1392.1622.0987l2.5102-1.2964c.0574-.0287.0752-.0987.0464-.1552a3.1237 3.1237 0 00-2.603-1.574c-.0575 0-.115.0456-.115.1097l-.0008-.0009zm.0008 6.789c-2.0933.0005-3.7915-1.6912-3.7947-3.7804C5.9468 8.0821 7.6452 6.39 9.7387 6.391c2.0932-.0005 3.7911 1.6914 3.794 3.7804a3.7783 3.7783 0 01-1.1124 2.675 3.7936 3.7936 0 01-2.6824 1.1054h.0008zM9.738 4.8002c-1.9218 0-3.6975 1.0232-4.6584 2.6841a5.359 5.359 0 000 5.3683c.9609 1.661 2.7366 2.6841 4.6584 2.6841a5.3891 5.3891 0 003.8073-1.5725 5.3675 5.3675 0 001.578-3.7987 5.3574 5.3574 0 00-1.5771-3.797A5.379 5.379 0 009.7387 4.801l-.0008-.0008z",
fill: "currentColor",
fillRule: "evenodd"
})));
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/DocSearch.js":
/*!*************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/DocSearch.js ***!
\*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "DocSearch": () => (/* binding */ DocSearch)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js");
/* harmony import */ var _DocSearchButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./DocSearchButton */ "./node_modules/@docsearch/react/dist/esm/DocSearchButton.js");
/* harmony import */ var _DocSearchModal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./DocSearchModal */ "./node_modules/@docsearch/react/dist/esm/DocSearchModal.js");
/* harmony import */ var _useDocSearchKeyboardEvents__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./useDocSearchKeyboardEvents */ "./node_modules/@docsearch/react/dist/esm/useDocSearchKeyboardEvents.js");
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function DocSearch(props) {
var searchButtonRef = react__WEBPACK_IMPORTED_MODULE_0___default().useRef(null);
var _React$useState = react__WEBPACK_IMPORTED_MODULE_0___default().useState(false),
_React$useState2 = _slicedToArray(_React$useState, 2),
isOpen = _React$useState2[0],
setIsOpen = _React$useState2[1];
var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_0___default().useState((props === null || props === void 0 ? void 0 : props.initialQuery) || undefined),
_React$useState4 = _slicedToArray(_React$useState3, 2),
initialQuery = _React$useState4[0],
setInitialQuery = _React$useState4[1];
var onOpen = react__WEBPACK_IMPORTED_MODULE_0___default().useCallback(function () {
setIsOpen(true);
}, [setIsOpen]);
var onClose = react__WEBPACK_IMPORTED_MODULE_0___default().useCallback(function () {
setIsOpen(false);
}, [setIsOpen]);
var onInput = react__WEBPACK_IMPORTED_MODULE_0___default().useCallback(function (event) {
setIsOpen(true);
setInitialQuery(event.key);
}, [setIsOpen, setInitialQuery]);
(0,_useDocSearchKeyboardEvents__WEBPACK_IMPORTED_MODULE_2__.useDocSearchKeyboardEvents)({
isOpen: isOpen,
onOpen: onOpen,
onClose: onClose,
onInput: onInput,
searchButtonRef: searchButtonRef
});
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_DocSearchButton__WEBPACK_IMPORTED_MODULE_3__.DocSearchButton, {
onClick: onOpen,
ref: searchButtonRef
}), isOpen && (0,react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal)( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_DocSearchModal__WEBPACK_IMPORTED_MODULE_4__.DocSearchModal, _extends({}, props, {
initialScrollY: window.scrollY,
initialQuery: initialQuery,
onClose: onClose
})), document.body));
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/DocSearchButton.js":
/*!*******************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/DocSearchButton.js ***!
\*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "DocSearchButton": () => (/* binding */ DocSearchButton)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _icons_ControlKeyIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./icons/ControlKeyIcon */ "./node_modules/@docsearch/react/dist/esm/icons/ControlKeyIcon.js");
/* harmony import */ var _icons_SearchIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./icons/SearchIcon */ "./node_modules/@docsearch/react/dist/esm/icons/SearchIcon.js");
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
var ACTION_KEY_DEFAULT = 'Ctrl';
var ACTION_KEY_APPLE = '⌘';
function isAppleDevice() {
return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);
}
var DocSearchButton = react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (_ref, ref) {
var _ref$translations = _ref.translations,
translations = _ref$translations === void 0 ? {} : _ref$translations,
props = _objectWithoutProperties(_ref, ["translations"]);
var _translations$buttonT = translations.buttonText,
buttonText = _translations$buttonT === void 0 ? 'Search' : _translations$buttonT,
_translations$buttonA = translations.buttonAriaLabel,
buttonAriaLabel = _translations$buttonA === void 0 ? 'Search' : _translations$buttonA;
var key = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
if (typeof navigator !== 'undefined') {
return isAppleDevice() ? ACTION_KEY_APPLE : ACTION_KEY_DEFAULT;
}
return null;
}, []);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", _extends({
type: "button",
className: "DocSearch DocSearch-Button",
"aria-label": buttonAriaLabel
}, props, {
ref: ref
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
className: "DocSearch-Button-Container"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_SearchIcon__WEBPACK_IMPORTED_MODULE_1__.SearchIcon, null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
className: "DocSearch-Button-Placeholder"
}, buttonText)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
className: "DocSearch-Button-Keys"
}, key !== null && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
className: "DocSearch-Button-Key"
}, key === ACTION_KEY_DEFAULT ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_ControlKeyIcon__WEBPACK_IMPORTED_MODULE_2__.ControlKeyIcon, null) : key), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
className: "DocSearch-Button-Key"
}, "K"))));
});
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/DocSearchModal.js":
/*!******************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/DocSearchModal.js ***!
\******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "DocSearchModal": () => (/* binding */ DocSearchModal)
/* harmony export */ });
/* harmony import */ var _algolia_autocomplete_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @algolia/autocomplete-core */ "./node_modules/@algolia/autocomplete-core/dist/esm/createAutocomplete.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constants */ "./node_modules/@docsearch/react/dist/esm/constants.js");
/* harmony import */ var _Footer__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Footer */ "./node_modules/@docsearch/react/dist/esm/Footer.js");
/* harmony import */ var _Hit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Hit */ "./node_modules/@docsearch/react/dist/esm/Hit.js");
/* harmony import */ var _ScreenState__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./ScreenState */ "./node_modules/@docsearch/react/dist/esm/ScreenState.js");
/* harmony import */ var _SearchBox__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./SearchBox */ "./node_modules/@docsearch/react/dist/esm/SearchBox.js");
/* harmony import */ var _stored_searches__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./stored-searches */ "./node_modules/@docsearch/react/dist/esm/stored-searches.js");
/* harmony import */ var _useSearchClient__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./useSearchClient */ "./node_modules/@docsearch/react/dist/esm/useSearchClient.js");
/* harmony import */ var _useTouchEvents__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./useTouchEvents */ "./node_modules/@docsearch/react/dist/esm/useTouchEvents.js");
/* harmony import */ var _useTrapFocus__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./useTrapFocus */ "./node_modules/@docsearch/react/dist/esm/useTrapFocus.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ "./node_modules/@docsearch/react/dist/esm/utils/noop.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./node_modules/@docsearch/react/dist/esm/utils/identity.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils */ "./node_modules/@docsearch/react/dist/esm/utils/groupBy.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils */ "./node_modules/@docsearch/react/dist/esm/utils/removeHighlightTags.js");
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function DocSearchModal(_ref) {
var _ref$appId = _ref.appId,
appId = _ref$appId === void 0 ? 'BH4D9OD16A' : _ref$appId,
apiKey = _ref.apiKey,
indexName = _ref.indexName,
_ref$placeholder = _ref.placeholder,
placeholder = _ref$placeholder === void 0 ? 'Search docs' : _ref$placeholder,
searchParameters = _ref.searchParameters,
_ref$onClose = _ref.onClose,
onClose = _ref$onClose === void 0 ? _utils__WEBPACK_IMPORTED_MODULE_1__.noop : _ref$onClose,
_ref$transformItems = _ref.transformItems,
transformItems = _ref$transformItems === void 0 ? _utils__WEBPACK_IMPORTED_MODULE_2__.identity : _ref$transformItems,
_ref$hitComponent = _ref.hitComponent,
hitComponent = _ref$hitComponent === void 0 ? _Hit__WEBPACK_IMPORTED_MODULE_3__.Hit : _ref$hitComponent,
_ref$resultsFooterCom = _ref.resultsFooterComponent,
resultsFooterComponent = _ref$resultsFooterCom === void 0 ? function () {
return null;
} : _ref$resultsFooterCom,
navigator = _ref.navigator,
_ref$initialScrollY = _ref.initialScrollY,
initialScrollY = _ref$initialScrollY === void 0 ? 0 : _ref$initialScrollY,
_ref$transformSearchC = _ref.transformSearchClient,
transformSearchClient = _ref$transformSearchC === void 0 ? _utils__WEBPACK_IMPORTED_MODULE_2__.identity : _ref$transformSearchC,
_ref$disableUserPerso = _ref.disableUserPersonalization,
disableUserPersonalization = _ref$disableUserPerso === void 0 ? false : _ref$disableUserPerso,
_ref$initialQuery = _ref.initialQuery,
initialQueryFromProp = _ref$initialQuery === void 0 ? '' : _ref$initialQuery;
var _React$useState = react__WEBPACK_IMPORTED_MODULE_0___default().useState({
query: '',
collections: [],
completion: null,
context: {},
isOpen: false,
activeItemId: null,
status: 'idle'
}),
_React$useState2 = _slicedToArray(_React$useState, 2),
state = _React$useState2[0],
setState = _React$useState2[1];
var containerRef = react__WEBPACK_IMPORTED_MODULE_0___default().useRef(null);
var modalRef = react__WEBPACK_IMPORTED_MODULE_0___default().useRef(null);
var formElementRef = react__WEBPACK_IMPORTED_MODULE_0___default().useRef(null);
var dropdownRef = react__WEBPACK_IMPORTED_MODULE_0___default().useRef(null);
var inputRef = react__WEBPACK_IMPORTED_MODULE_0___default().useRef(null);
var snippetLength = react__WEBPACK_IMPORTED_MODULE_0___default().useRef(10);
var initialQueryFromSelection = react__WEBPACK_IMPORTED_MODULE_0___default().useRef(typeof window !== 'undefined' ? window.getSelection().toString().slice(0, _constants__WEBPACK_IMPORTED_MODULE_4__.MAX_QUERY_SIZE) : '').current;
var initialQuery = react__WEBPACK_IMPORTED_MODULE_0___default().useRef(initialQueryFromProp || initialQueryFromSelection).current;
var searchClient = (0,_useSearchClient__WEBPACK_IMPORTED_MODULE_5__.useSearchClient)(appId, apiKey, transformSearchClient);
var favoriteSearches = react__WEBPACK_IMPORTED_MODULE_0___default().useRef((0,_stored_searches__WEBPACK_IMPORTED_MODULE_6__.createStoredSearches)({
key: "__DOCSEARCH_FAVORITE_SEARCHES__".concat(indexName),
limit: 10
})).current;
var recentSearches = react__WEBPACK_IMPORTED_MODULE_0___default().useRef((0,_stored_searches__WEBPACK_IMPORTED_MODULE_6__.createStoredSearches)({
key: "__DOCSEARCH_RECENT_SEARCHES__".concat(indexName),
// We display 7 recent searches and there's no favorites, but only
// 4 when there are favorites.
limit: favoriteSearches.getAll().length === 0 ? 7 : 4
})).current;
var saveRecentSearch = react__WEBPACK_IMPORTED_MODULE_0___default().useCallback(function saveRecentSearch(item) {
if (disableUserPersonalization) {
return;
} // We don't store `content` record, but their parent if available.
var search = item.type === 'content' ? item.__docsearch_parent : item; // We save the recent search only if it's not favorited.
if (search && favoriteSearches.getAll().findIndex(function (x) {
return x.objectID === search.objectID;
}) === -1) {
recentSearches.add(search);
}
}, [favoriteSearches, recentSearches, disableUserPersonalization]);
var autocomplete = react__WEBPACK_IMPORTED_MODULE_0___default().useMemo(function () {
return (0,_algolia_autocomplete_core__WEBPACK_IMPORTED_MODULE_7__.createAutocomplete)({
id: 'docsearch',
defaultActiveItemId: 0,
placeholder: placeholder,
openOnFocus: true,
initialState: {
query: initialQuery,
context: {
searchSuggestions: []
}
},
navigator: navigator,
onStateChange: function onStateChange(_ref2) {
var state = _ref2.state;
setState(state);
},
// @ts-ignore Temporarily ignore bad typing in autocomplete-core.
getSources: function getSources(_ref3) {
var query = _ref3.query,
state = _ref3.state,
setContext = _ref3.setContext,
setStatus = _ref3.setStatus;
if (!query) {
if (disableUserPersonalization) {
return [];
}
return [{
sourceId: 'recentSearches',
onSelect: function onSelect(_ref4) {
var item = _ref4.item,
event = _ref4.event;
saveRecentSearch(item);
if (!event.shiftKey && !event.ctrlKey && !event.metaKey) {
onClose();
}
},
getItemUrl: function getItemUrl(_ref5) {
var item = _ref5.item;
return item.url;
},
getItems: function getItems() {
return recentSearches.getAll();
}
}, {
sourceId: 'favoriteSearches',
onSelect: function onSelect(_ref6) {
var item = _ref6.item,
event = _ref6.event;
saveRecentSearch(item);
if (!event.shiftKey && !event.ctrlKey && !event.metaKey) {
onClose();
}
},
getItemUrl: function getItemUrl(_ref7) {
var item = _ref7.item;
return item.url;
},
getItems: function getItems() {
return favoriteSearches.getAll();
}
}];
}
return searchClient.search([{
query: query,
indexName: indexName,
params: _objectSpread({
attributesToRetrieve: ['hierarchy.lvl0', 'hierarchy.lvl1', 'hierarchy.lvl2', 'hierarchy.lvl3', 'hierarchy.lvl4', 'hierarchy.lvl5', 'hierarchy.lvl6', 'content', 'type', 'url'],
attributesToSnippet: ["hierarchy.lvl1:".concat(snippetLength.current), "hierarchy.lvl2:".concat(snippetLength.current), "hierarchy.lvl3:".concat(snippetLength.current), "hierarchy.lvl4:".concat(snippetLength.current), "hierarchy.lvl5:".concat(snippetLength.current), "hierarchy.lvl6:".concat(snippetLength.current), "content:".concat(snippetLength.current)],
snippetEllipsisText: '…',
highlightPreTag: '',
highlightPostTag: '',
hitsPerPage: 20
}, searchParameters)
}]).catch(function (error) {
// The Algolia `RetryError` happens when all the servers have
// failed, meaning that there's no chance the response comes
// back. This is the right time to display an error.
// See https://github.com/algolia/algoliasearch-client-javascript/blob/2ffddf59bc765cd1b664ee0346b28f00229d6e12/packages/transporter/src/errors/createRetryError.ts#L5
if (error.name === 'RetryError') {
setStatus('error');
}
throw error;
}).then(function (_ref8) {
var results = _ref8.results;
var _results$ = results[0],
hits = _results$.hits,
nbHits = _results$.nbHits;
var sources = (0,_utils__WEBPACK_IMPORTED_MODULE_8__.groupBy)(hits, function (hit) {
return (0,_utils__WEBPACK_IMPORTED_MODULE_9__.removeHighlightTags)(hit);
}); // We store the `lvl0`s to display them as search suggestions
// in the "no results" screen.
if (state.context.searchSuggestions.length < Object.keys(sources).length) {
setContext({
searchSuggestions: Object.keys(sources)
});
}
setContext({
nbHits: nbHits
});
return Object.values(sources).map(function (items, index) {
return {
sourceId: "hits".concat(index),
onSelect: function onSelect(_ref9) {
var item = _ref9.item,
event = _ref9.event;
saveRecentSearch(item);
if (!event.shiftKey && !event.ctrlKey && !event.metaKey) {
onClose();
}
},
getItemUrl: function getItemUrl(_ref10) {
var item = _ref10.item;
return item.url;
},
getItems: function getItems() {
return Object.values((0,_utils__WEBPACK_IMPORTED_MODULE_8__.groupBy)(items, function (item) {
return item.hierarchy.lvl1;
})).map(transformItems).map(function (hits) {
return hits.map(function (item) {
return _objectSpread(_objectSpread({}, item), {}, {
// eslint-disable-next-line @typescript-eslint/camelcase
__docsearch_parent: item.type !== 'lvl1' && hits.find(function (siblingItem) {
return siblingItem.type === 'lvl1' && siblingItem.hierarchy.lvl1 === item.hierarchy.lvl1;
})
});
});
}).flat();
}
};
});
});
}
});
}, [indexName, searchParameters, searchClient, onClose, recentSearches, favoriteSearches, saveRecentSearch, initialQuery, placeholder, navigator, transformItems, disableUserPersonalization]);
var getEnvironmentProps = autocomplete.getEnvironmentProps,
getRootProps = autocomplete.getRootProps,
refresh = autocomplete.refresh;
(0,_useTouchEvents__WEBPACK_IMPORTED_MODULE_10__.useTouchEvents)({
getEnvironmentProps: getEnvironmentProps,
panelElement: dropdownRef.current,
formElement: formElementRef.current,
inputElement: inputRef.current
});
(0,_useTrapFocus__WEBPACK_IMPORTED_MODULE_11__.useTrapFocus)({
container: containerRef.current
});
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(function () {
document.body.classList.add('DocSearch--active');
return function () {
var _window$scrollTo, _window;
document.body.classList.remove('DocSearch--active'); // IE11 doesn't support `scrollTo` so we check that the method exists
// first.
(_window$scrollTo = (_window = window).scrollTo) === null || _window$scrollTo === void 0 ? void 0 : _window$scrollTo.call(_window, 0, initialScrollY);
}; // eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(function () {
var isMobileMediaQuery = window.matchMedia('(max-width: 750px)');
if (isMobileMediaQuery.matches) {
snippetLength.current = 5;
}
}, []);
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(function () {
if (dropdownRef.current) {
dropdownRef.current.scrollTop = 0;
}
}, [state.query]); // We don't focus the input when there's an initial query (i.e. Selection
// Search) because users rather want to see the results directly, without the
// keyboard appearing.
// We therefore need to refresh the autocomplete instance to load all the
// results, which is usually triggered on focus.
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(function () {
if (initialQuery.length > 0) {
refresh();
if (inputRef.current) {
inputRef.current.focus();
}
}
}, [initialQuery, refresh]); // We rely on a CSS property to set the modal height to the full viewport height
// because all mobile browsers don't compute their height the same way.
// See https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(function () {
function setFullViewportHeight() {
if (modalRef.current) {
var vh = window.innerHeight * 0.01;
modalRef.current.style.setProperty('--docsearch-vh', "".concat(vh, "px"));
}
}
setFullViewportHeight();
window.addEventListener('resize', setFullViewportHeight);
return function () {
window.removeEventListener('resize', setFullViewportHeight);
};
}, []);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", _extends({
ref: containerRef
}, getRootProps({
'aria-expanded': true
}), {
className: ['DocSearch', 'DocSearch-Container', state.status === 'stalled' && 'DocSearch-Container--Stalled', state.status === 'error' && 'DocSearch-Container--Errored'].filter(Boolean).join(' '),
onMouseDown: function onMouseDown(event) {
if (event.target === event.currentTarget) {
onClose();
}
}
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-Modal",
ref: modalRef
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("header", {
className: "DocSearch-SearchBar",
ref: formElementRef
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_SearchBox__WEBPACK_IMPORTED_MODULE_12__.SearchBox, _extends({}, autocomplete, {
state: state,
autoFocus: initialQuery.length === 0,
onClose: onClose,
inputRef: inputRef,
isFromSelection: Boolean(initialQuery) && initialQuery === initialQueryFromSelection
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-Dropdown",
ref: dropdownRef
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ScreenState__WEBPACK_IMPORTED_MODULE_13__.ScreenState, _extends({}, autocomplete, {
indexName: indexName,
state: state,
hitComponent: hitComponent,
resultsFooterComponent: resultsFooterComponent,
disableUserPersonalization: disableUserPersonalization,
recentSearches: recentSearches,
favoriteSearches: favoriteSearches,
onItemClick: function onItemClick(item) {
saveRecentSearch(item);
onClose();
},
inputRef: inputRef
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("footer", {
className: "DocSearch-Footer"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Footer__WEBPACK_IMPORTED_MODULE_14__.Footer, null))));
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/ErrorScreen.js":
/*!***************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/ErrorScreen.js ***!
\***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "ErrorScreen": () => (/* binding */ ErrorScreen)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./icons */ "./node_modules/@docsearch/react/dist/esm/icons/ErrorIcon.js");
function ErrorScreen() {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-ErrorScreen"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-Screen-Icon"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons__WEBPACK_IMPORTED_MODULE_1__.ErrorIcon, null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", {
className: "DocSearch-Title"
}, "Unable to fetch results"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", {
className: "DocSearch-Help"
}, "You might want to check your network connection."));
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/Footer.js":
/*!**********************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/Footer.js ***!
\**********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Footer": () => (/* binding */ Footer)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _AlgoliaLogo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AlgoliaLogo */ "./node_modules/@docsearch/react/dist/esm/AlgoliaLogo.js");
function Footer() {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-Logo"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_AlgoliaLogo__WEBPACK_IMPORTED_MODULE_1__.AlgoliaLogo, null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", {
className: "DocSearch-Commands"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
className: "DocSearch-Commands-Key"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CommandIcon, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3"
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
className: "DocSearch-Label"
}, "to select")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
className: "DocSearch-Commands-Key"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CommandIcon, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M7.5 3.5v8M10.5 8.5l-3 3-3-3"
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
className: "DocSearch-Commands-Key"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CommandIcon, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M7.5 11.5v-8M10.5 6.5l-3-3-3 3"
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
className: "DocSearch-Label"
}, "to navigate")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
className: "DocSearch-Commands-Key"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CommandIcon, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956"
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
className: "DocSearch-Label"
}, "to close"))));
}
function CommandIcon(props) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
width: "15",
height: "15"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", {
fill: "none",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: "1.2"
}, props.children));
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/Hit.js":
/*!*******************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/Hit.js ***!
\*******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Hit": () => (/* binding */ Hit)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
function Hit(_ref) {
var hit = _ref.hit,
children = _ref.children;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
href: hit.url
}, children);
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/NoResultsScreen.js":
/*!*******************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/NoResultsScreen.js ***!
\*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "NoResultsScreen": () => (/* binding */ NoResultsScreen)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./icons */ "./node_modules/@docsearch/react/dist/esm/icons/NoResultsIcon.js");
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function NoResultsScreen(props) {
var searchSuggestions = props.state.context.searchSuggestions;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-NoResults"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-Screen-Icon"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons__WEBPACK_IMPORTED_MODULE_1__.NoResultsIcon, null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", {
className: "DocSearch-Title"
}, "No results for \"", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("strong", null, props.state.query), "\""), searchSuggestions && searchSuggestions.length > 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-NoResults-Prefill-List"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", {
className: "DocSearch-Help"
}, "Try searching for:"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", null, searchSuggestions.slice(0, 3).reduce(function (acc, search) {
return [].concat(_toConsumableArray(acc), [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", {
key: search
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
className: "DocSearch-Prefill",
key: search,
onClick: function onClick() {
props.setQuery(search.toLowerCase() + ' ');
props.refresh();
props.inputRef.current.focus();
}
}, search))]);
}, []))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", {
className: "DocSearch-Help"
}, "Believe this query should return results?", ' ', /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
href: "https://github.com/algolia/docsearch-configs/issues/new?template=Missing_results.md&title=[".concat(props.indexName, "]+Missing+results+for+query+\"").concat(props.state.query, "\""),
target: "_blank",
rel: "noopener noreferrer"
}, "Let us know"), "."));
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/Results.js":
/*!***********************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/Results.js ***!
\***********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Results": () => (/* binding */ Results)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _Snippet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Snippet */ "./node_modules/@docsearch/react/dist/esm/Snippet.js");
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function Results(props) {
if (!props.collection || props.collection.items.length === 0) {
return null;
}
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("section", {
className: "DocSearch-Hits"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-Hit-source"
}, props.title), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", props.getListProps(), props.collection.items.map(function (item, index) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Result, _extends({
key: [props.title, item.objectID].join(':'),
item: item,
index: index
}, props));
})));
}
function Result(_ref) {
var item = _ref.item,
index = _ref.index,
renderIcon = _ref.renderIcon,
renderAction = _ref.renderAction,
getItemProps = _ref.getItemProps,
onItemClick = _ref.onItemClick,
collection = _ref.collection,
hitComponent = _ref.hitComponent;
var _React$useState = react__WEBPACK_IMPORTED_MODULE_0___default().useState(false),
_React$useState2 = _slicedToArray(_React$useState, 2),
isDeleting = _React$useState2[0],
setIsDeleting = _React$useState2[1];
var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_0___default().useState(false),
_React$useState4 = _slicedToArray(_React$useState3, 2),
isFavoriting = _React$useState4[0],
setIsFavoriting = _React$useState4[1];
var action = react__WEBPACK_IMPORTED_MODULE_0___default().useRef(null);
var Hit = hitComponent;
function runDeleteTransition(cb) {
setIsDeleting(true);
action.current = cb;
}
function runFavoriteTransition(cb) {
setIsFavoriting(true);
action.current = cb;
}
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", _extends({
className: ['DocSearch-Hit', item.__docsearch_parent && 'DocSearch-Hit--Child', isDeleting && 'DocSearch-Hit--deleting', isFavoriting && 'DocSearch-Hit--favoriting'].filter(Boolean).join(' '),
onTransitionEnd: function onTransitionEnd() {
if (action.current) {
action.current();
}
}
}, getItemProps({
item: item,
source: collection.source,
onClick: function onClick() {
onItemClick(item);
}
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Hit, {
hit: item
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-Hit-Container"
}, renderIcon({
item: item,
index: index
}), item.hierarchy[item.type] && item.type === 'lvl1' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-Hit-content-wrapper"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Snippet__WEBPACK_IMPORTED_MODULE_1__.Snippet, {
className: "DocSearch-Hit-title",
hit: item,
attribute: "hierarchy.lvl1"
}), item.content && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Snippet__WEBPACK_IMPORTED_MODULE_1__.Snippet, {
className: "DocSearch-Hit-path",
hit: item,
attribute: "content"
})), item.hierarchy[item.type] && (item.type === 'lvl2' || item.type === 'lvl3' || item.type === 'lvl4' || item.type === 'lvl5' || item.type === 'lvl6') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-Hit-content-wrapper"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Snippet__WEBPACK_IMPORTED_MODULE_1__.Snippet, {
className: "DocSearch-Hit-title",
hit: item,
attribute: "hierarchy.".concat(item.type)
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Snippet__WEBPACK_IMPORTED_MODULE_1__.Snippet, {
className: "DocSearch-Hit-path",
hit: item,
attribute: "hierarchy.lvl1"
})), item.type === 'content' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-Hit-content-wrapper"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Snippet__WEBPACK_IMPORTED_MODULE_1__.Snippet, {
className: "DocSearch-Hit-title",
hit: item,
attribute: "content"
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Snippet__WEBPACK_IMPORTED_MODULE_1__.Snippet, {
className: "DocSearch-Hit-path",
hit: item,
attribute: "hierarchy.lvl1"
})), renderAction({
item: item,
runDeleteTransition: runDeleteTransition,
runFavoriteTransition: runFavoriteTransition
}))));
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/ResultsScreen.js":
/*!*****************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/ResultsScreen.js ***!
\*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "ResultsScreen": () => (/* binding */ ResultsScreen)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./icons */ "./node_modules/@docsearch/react/dist/esm/icons/SourceIcon.js");
/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./icons */ "./node_modules/@docsearch/react/dist/esm/icons/SelectIcon.js");
/* harmony import */ var _Results__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Results */ "./node_modules/@docsearch/react/dist/esm/Results.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ "./node_modules/@docsearch/react/dist/esm/utils/removeHighlightTags.js");
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function ResultsScreen(props) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-Dropdown-Container"
}, props.state.collections.map(function (collection, index) {
if (collection.items.length === 0) {
return null;
}
var title = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.removeHighlightTags)(collection.items[0]);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Results__WEBPACK_IMPORTED_MODULE_2__.Results, _extends({}, props, {
key: index,
title: title,
collection: collection,
renderIcon: function renderIcon(_ref) {
var _collection$items;
var item = _ref.item,
index = _ref.index;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, item.__docsearch_parent && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
className: "DocSearch-Hit-Tree",
viewBox: "0 0 24 54"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", {
stroke: "currentColor",
fill: "none",
fillRule: "evenodd",
strokeLinecap: "round",
strokeLinejoin: "round"
}, item.__docsearch_parent !== ((_collection$items = collection.items[index + 1]) === null || _collection$items === void 0 ? void 0 : _collection$items.__docsearch_parent) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M8 6v21M20 27H8.3"
}) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M8 6v42M20 27H8.3"
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-Hit-icon"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons__WEBPACK_IMPORTED_MODULE_3__.SourceIcon, {
type: item.type
})));
},
renderAction: function renderAction() {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-Hit-action"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons__WEBPACK_IMPORTED_MODULE_4__.SelectIcon, null));
}
}));
}), props.resultsFooterComponent && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("section", {
className: "DocSearch-HitsFooter"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(props.resultsFooterComponent, {
state: props.state
})));
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/ScreenState.js":
/*!***************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/ScreenState.js ***!
\***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "ScreenState": () => (/* binding */ ScreenState)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _ErrorScreen__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ErrorScreen */ "./node_modules/@docsearch/react/dist/esm/ErrorScreen.js");
/* harmony import */ var _NoResultsScreen__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./NoResultsScreen */ "./node_modules/@docsearch/react/dist/esm/NoResultsScreen.js");
/* harmony import */ var _ResultsScreen__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ResultsScreen */ "./node_modules/@docsearch/react/dist/esm/ResultsScreen.js");
/* harmony import */ var _StartScreen__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./StartScreen */ "./node_modules/@docsearch/react/dist/esm/StartScreen.js");
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var ScreenState = react__WEBPACK_IMPORTED_MODULE_0___default().memo(function (props) {
if (props.state.status === 'error') {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ErrorScreen__WEBPACK_IMPORTED_MODULE_1__.ErrorScreen, null);
}
var hasCollections = props.state.collections.some(function (collection) {
return collection.items.length > 0;
});
if (!props.state.query) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_StartScreen__WEBPACK_IMPORTED_MODULE_2__.StartScreen, _extends({}, props, {
hasCollections: hasCollections
}));
}
if (hasCollections === false) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_NoResultsScreen__WEBPACK_IMPORTED_MODULE_3__.NoResultsScreen, props);
}
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ResultsScreen__WEBPACK_IMPORTED_MODULE_4__.ResultsScreen, props);
}, function areEqual(_prevProps, nextProps) {
// We don't update the screen when Autocomplete is loading or stalled to
// avoid UI flashes:
// - Empty screen → Results screen
// - NoResults screen → NoResults screen with another query
return nextProps.state.status === 'loading' || nextProps.state.status === 'stalled';
});
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/SearchBox.js":
/*!*************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/SearchBox.js ***!
\*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "SearchBox": () => (/* binding */ SearchBox)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants */ "./node_modules/@docsearch/react/dist/esm/constants.js");
/* harmony import */ var _icons_LoadingIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./icons/LoadingIcon */ "./node_modules/@docsearch/react/dist/esm/icons/LoadingIcon.js");
/* harmony import */ var _icons_ResetIcon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./icons/ResetIcon */ "./node_modules/@docsearch/react/dist/esm/icons/ResetIcon.js");
/* harmony import */ var _icons_SearchIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./icons/SearchIcon */ "./node_modules/@docsearch/react/dist/esm/icons/SearchIcon.js");
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function SearchBox(props) {
var _props$getFormProps = props.getFormProps({
inputElement: props.inputRef.current
}),
onReset = _props$getFormProps.onReset;
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(function () {
if (props.autoFocus && props.inputRef.current) {
props.inputRef.current.focus();
}
}, [props.autoFocus, props.inputRef]);
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(function () {
if (props.isFromSelection && props.inputRef.current) {
props.inputRef.current.select();
}
}, [props.isFromSelection, props.inputRef]);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("form", {
className: "DocSearch-Form",
onSubmit: function onSubmit(event) {
event.preventDefault();
},
onReset: onReset
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", _extends({
className: "DocSearch-MagnifierLabel"
}, props.getLabelProps()), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_SearchIcon__WEBPACK_IMPORTED_MODULE_1__.SearchIcon, null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-LoadingIndicator"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_LoadingIcon__WEBPACK_IMPORTED_MODULE_2__.LoadingIcon, null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", _extends({
className: "DocSearch-Input",
ref: props.inputRef
}, props.getInputProps({
inputElement: props.inputRef.current,
autoFocus: props.autoFocus,
maxLength: _constants__WEBPACK_IMPORTED_MODULE_3__.MAX_QUERY_SIZE
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
type: "reset",
title: "Clear the query",
className: "DocSearch-Reset",
hidden: !props.state.query
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_ResetIcon__WEBPACK_IMPORTED_MODULE_4__.ResetIcon, null))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
className: "DocSearch-Cancel",
onClick: props.onClose
}, "Cancel"));
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/Snippet.js":
/*!***********************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/Snippet.js ***!
\***********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Snippet": () => (/* binding */ Snippet)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function getPropertyByPath(object, path) {
var parts = path.split('.');
return parts.reduce(function (current, key) {
return current && current[key];
}, object);
}
function Snippet(_ref) {
var hit = _ref.hit,
attribute = _ref.attribute,
_ref$tagName = _ref.tagName,
tagName = _ref$tagName === void 0 ? 'span' : _ref$tagName,
rest = _objectWithoutProperties(_ref, ["hit", "attribute", "tagName"]);
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(tagName, _objectSpread(_objectSpread({}, rest), {}, {
dangerouslySetInnerHTML: {
__html: getPropertyByPath(hit, "_snippetResult.".concat(attribute, ".value")) || getPropertyByPath(hit, attribute)
}
}));
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/StartScreen.js":
/*!***************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/StartScreen.js ***!
\***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "StartScreen": () => (/* binding */ StartScreen)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./icons */ "./node_modules/@docsearch/react/dist/esm/icons/RecentIcon.js");
/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./icons */ "./node_modules/@docsearch/react/dist/esm/icons/StarIcon.js");
/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./icons */ "./node_modules/@docsearch/react/dist/esm/icons/ResetIcon.js");
/* harmony import */ var _Results__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Results */ "./node_modules/@docsearch/react/dist/esm/Results.js");
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function StartScreen(props) {
if (props.state.status === 'idle' && props.hasCollections === false) {
if (props.disableUserPersonalization) {
return null;
}
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-StartScreen"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", {
className: "DocSearch-Help"
}, "No recent searches"));
}
if (props.hasCollections === false) {
return null;
}
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-Dropdown-Container"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Results__WEBPACK_IMPORTED_MODULE_1__.Results, _extends({}, props, {
title: "Recent",
collection: props.state.collections[0],
renderIcon: function renderIcon() {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-Hit-icon"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons__WEBPACK_IMPORTED_MODULE_2__.RecentIcon, null));
},
renderAction: function renderAction(_ref) {
var item = _ref.item,
runFavoriteTransition = _ref.runFavoriteTransition,
runDeleteTransition = _ref.runDeleteTransition;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-Hit-action"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
className: "DocSearch-Hit-action-button",
title: "Save this search",
onClick: function onClick(event) {
event.preventDefault();
event.stopPropagation();
runFavoriteTransition(function () {
props.favoriteSearches.add(item);
props.recentSearches.remove(item);
props.refresh();
});
}
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons__WEBPACK_IMPORTED_MODULE_3__.StarIcon, null))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-Hit-action"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
className: "DocSearch-Hit-action-button",
title: "Remove this search from history",
onClick: function onClick(event) {
event.preventDefault();
event.stopPropagation();
runDeleteTransition(function () {
props.recentSearches.remove(item);
props.refresh();
});
}
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons__WEBPACK_IMPORTED_MODULE_4__.ResetIcon, null))));
}
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Results__WEBPACK_IMPORTED_MODULE_1__.Results, _extends({}, props, {
title: "Favorites",
collection: props.state.collections[1],
renderIcon: function renderIcon() {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-Hit-icon"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons__WEBPACK_IMPORTED_MODULE_3__.StarIcon, null));
},
renderAction: function renderAction(_ref2) {
var item = _ref2.item,
runDeleteTransition = _ref2.runDeleteTransition;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "DocSearch-Hit-action"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
className: "DocSearch-Hit-action-button",
title: "Remove this search from favorites",
onClick: function onClick(event) {
event.preventDefault();
event.stopPropagation();
runDeleteTransition(function () {
props.favoriteSearches.remove(item);
props.refresh();
});
}
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons__WEBPACK_IMPORTED_MODULE_4__.ResetIcon, null)));
}
})));
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/constants.js":
/*!*************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/constants.js ***!
\*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "MAX_QUERY_SIZE": () => (/* binding */ MAX_QUERY_SIZE)
/* harmony export */ });
var MAX_QUERY_SIZE = 64;
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/icons/ControlKeyIcon.js":
/*!************************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/icons/ControlKeyIcon.js ***!
\************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "ControlKeyIcon": () => (/* binding */ ControlKeyIcon)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
function ControlKeyIcon() {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
width: "15",
height: "15",
className: "DocSearch-Control-Key-Icon"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",
strokeWidth: "1.2",
stroke: "currentColor",
fill: "none",
strokeLinecap: "square"
}));
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/icons/ErrorIcon.js":
/*!*******************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/icons/ErrorIcon.js ***!
\*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "ErrorIcon": () => (/* binding */ ErrorIcon)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
function ErrorIcon() {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
width: "40",
height: "40",
viewBox: "0 0 20 20",
fill: "none",
fillRule: "evenodd",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0"
}));
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/icons/LoadingIcon.js":
/*!*********************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/icons/LoadingIcon.js ***!
\*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "LoadingIcon": () => (/* binding */ LoadingIcon)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
function LoadingIcon() {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
viewBox: "0 0 38 38",
stroke: "currentColor",
strokeOpacity: ".5"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", {
fill: "none",
fillRule: "evenodd"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", {
transform: "translate(1 1)",
strokeWidth: "2"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("circle", {
strokeOpacity: ".3",
cx: "18",
cy: "18",
r: "18"
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M36 18c0-9.94-8.06-18-18-18"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("animateTransform", {
attributeName: "transform",
type: "rotate",
from: "0 18 18",
to: "360 18 18",
dur: "1s",
repeatCount: "indefinite"
})))));
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/icons/NoResultsIcon.js":
/*!***********************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/icons/NoResultsIcon.js ***!
\***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "NoResultsIcon": () => (/* binding */ NoResultsIcon)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
function NoResultsIcon() {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
width: "40",
height: "40",
viewBox: "0 0 20 20",
fill: "none",
fillRule: "evenodd",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M15.5 4.8c2 3 1.7 7-1 9.7h0l4.3 4.3-4.3-4.3a7.8 7.8 0 01-9.8 1m-2.2-2.2A7.8 7.8 0 0113.2 2.4M2 18L18 2"
}));
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/icons/RecentIcon.js":
/*!********************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/icons/RecentIcon.js ***!
\********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "RecentIcon": () => (/* binding */ RecentIcon)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
function RecentIcon() {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
width: "20",
height: "20",
viewBox: "0 0 20 20"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", {
stroke: "currentColor",
fill: "none",
fillRule: "evenodd",
strokeLinecap: "round",
strokeLinejoin: "round"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0"
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13"
})));
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/icons/ResetIcon.js":
/*!*******************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/icons/ResetIcon.js ***!
\*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "ResetIcon": () => (/* binding */ ResetIcon)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
function ResetIcon() {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
width: "20",
height: "20",
viewBox: "0 0 20 20"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z",
stroke: "currentColor",
fill: "none",
fillRule: "evenodd",
strokeLinecap: "round",
strokeLinejoin: "round"
}));
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/icons/SearchIcon.js":
/*!********************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/icons/SearchIcon.js ***!
\********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "SearchIcon": () => (/* binding */ SearchIcon)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
function SearchIcon() {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
width: "20",
height: "20",
className: "DocSearch-Search-Icon",
viewBox: "0 0 20 20"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",
stroke: "currentColor",
fill: "none",
fillRule: "evenodd",
strokeLinecap: "round",
strokeLinejoin: "round"
}));
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/icons/SelectIcon.js":
/*!********************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/icons/SelectIcon.js ***!
\********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "SelectIcon": () => (/* binding */ SelectIcon)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
function SelectIcon() {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
className: "DocSearch-Hit-Select-Icon",
width: "20",
height: "20",
viewBox: "0 0 20 20"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", {
stroke: "currentColor",
fill: "none",
fillRule: "evenodd",
strokeLinecap: "round",
strokeLinejoin: "round"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M18 3v4c0 2-2 4-4 4H2"
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M8 17l-6-6 6-6"
})));
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/icons/SourceIcon.js":
/*!********************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/icons/SourceIcon.js ***!
\********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "SourceIcon": () => (/* binding */ SourceIcon)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
function SourceIcon(props) {
switch (props.type) {
case 'lvl1':
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(LvlIcon, null);
case 'content':
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ContentIcon, null);
default:
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(AnchorIcon, null);
}
}
function LvlIcon() {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
width: "20",
height: "20",
viewBox: "0 0 20 20"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",
stroke: "currentColor",
fill: "none",
fillRule: "evenodd",
strokeLinejoin: "round"
}));
}
function AnchorIcon() {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
width: "20",
height: "20",
viewBox: "0 0 20 20"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",
stroke: "currentColor",
fill: "none",
fillRule: "evenodd",
strokeLinecap: "round",
strokeLinejoin: "round"
}));
}
function ContentIcon() {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
width: "20",
height: "20",
viewBox: "0 0 20 20"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M17 5H3h14zm0 5H3h14zm0 5H3h14z",
stroke: "currentColor",
fill: "none",
fillRule: "evenodd",
strokeLinejoin: "round"
}));
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/icons/StarIcon.js":
/*!******************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/icons/StarIcon.js ***!
\******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "StarIcon": () => (/* binding */ StarIcon)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
function StarIcon() {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
width: "20",
height: "20",
viewBox: "0 0 20 20"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z",
stroke: "currentColor",
fill: "none",
fillRule: "evenodd",
strokeLinejoin: "round"
}));
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/stored-searches.js":
/*!*******************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/stored-searches.js ***!
\*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "createStoredSearches": () => (/* binding */ createStoredSearches)
/* harmony export */ });
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function isLocalStorageSupported() {
var key = '__TEST_KEY__';
try {
localStorage.setItem(key, '');
localStorage.removeItem(key);
return true;
} catch (error) {
return false;
}
}
function createStorage(key) {
if (isLocalStorageSupported() === false) {
return {
setItem: function setItem() {},
getItem: function getItem() {
return [];
}
};
}
return {
setItem: function setItem(item) {
return window.localStorage.setItem(key, JSON.stringify(item));
},
getItem: function getItem() {
var item = window.localStorage.getItem(key);
return item ? JSON.parse(item) : [];
}
};
}
function createStoredSearches(_ref) {
var key = _ref.key,
_ref$limit = _ref.limit,
limit = _ref$limit === void 0 ? 5 : _ref$limit;
var storage = createStorage(key);
var items = storage.getItem().slice(0, limit);
return {
add: function add(item) {
var _ref2 = item,
_highlightResult = _ref2._highlightResult,
_snippetResult = _ref2._snippetResult,
hit = _objectWithoutProperties(_ref2, ["_highlightResult", "_snippetResult"]);
var isQueryAlreadySaved = items.findIndex(function (x) {
return x.objectID === hit.objectID;
});
if (isQueryAlreadySaved > -1) {
items.splice(isQueryAlreadySaved, 1);
}
items.unshift(hit);
items = items.slice(0, limit);
storage.setItem(items);
},
remove: function remove(item) {
items = items.filter(function (x) {
return x.objectID !== item.objectID;
});
storage.setItem(items);
},
getAll: function getAll() {
return items;
}
};
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/useDocSearchKeyboardEvents.js":
/*!******************************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/useDocSearchKeyboardEvents.js ***!
\******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "useDocSearchKeyboardEvents": () => (/* binding */ useDocSearchKeyboardEvents)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
function isEditingContent(event) {
var element = event.target;
var tagName = element.tagName;
return element.isContentEditable || tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA';
}
function useDocSearchKeyboardEvents(_ref) {
var isOpen = _ref.isOpen,
onOpen = _ref.onOpen,
onClose = _ref.onClose,
onInput = _ref.onInput,
searchButtonRef = _ref.searchButtonRef;
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(function () {
function onKeyDown(event) {
function open() {
// We check that no other DocSearch modal is showing before opening
// another one.
if (!document.body.classList.contains('DocSearch--active')) {
onOpen();
}
}
if (event.keyCode === 27 && isOpen || event.key === 'k' && (event.metaKey || event.ctrlKey) || !isEditingContent(event) && event.key === '/' && !isOpen) {
event.preventDefault();
if (isOpen) {
onClose();
} else if (!document.body.classList.contains('DocSearch--active')) {
open();
}
}
if (searchButtonRef && searchButtonRef.current === document.activeElement && onInput) {
if (/[a-zA-Z0-9]/.test(String.fromCharCode(event.keyCode))) {
onInput(event);
}
}
}
window.addEventListener('keydown', onKeyDown);
return function () {
window.removeEventListener('keydown', onKeyDown);
};
}, [isOpen, onOpen, onClose, onInput, searchButtonRef]);
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/useSearchClient.js":
/*!*******************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/useSearchClient.js ***!
\*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "useSearchClient": () => (/* binding */ useSearchClient)
/* harmony export */ });
/* harmony import */ var algoliasearch_dist_algoliasearch_lite_esm_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! algoliasearch/dist/algoliasearch-lite.esm.browser */ "./node_modules/algoliasearch/dist/algoliasearch-lite.esm.browser.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./version */ "./node_modules/@docsearch/react/dist/esm/version.js");
function useSearchClient(appId, apiKey, transformSearchClient) {
var searchClient = react__WEBPACK_IMPORTED_MODULE_0___default().useMemo(function () {
var client = (0,algoliasearch_dist_algoliasearch_lite_esm_browser__WEBPACK_IMPORTED_MODULE_1__["default"])(appId, apiKey);
client.addAlgoliaAgent('docsearch', _version__WEBPACK_IMPORTED_MODULE_2__.version); // Since DocSearch.js relies on DocSearch React with an alias to Preact,
// we cannot add the `docsearch-react` user agent by default, otherwise
// it would also be sent on a DocSearch.js integration.
// We therefore only add the `docsearch-react` user agent if `docsearch.js`
// is not present.
if (/docsearch.js \(.*\)/.test(client.transporter.userAgent.value) === false) {
client.addAlgoliaAgent('docsearch-react', _version__WEBPACK_IMPORTED_MODULE_2__.version);
}
return transformSearchClient(client);
}, [appId, apiKey, transformSearchClient]);
return searchClient;
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/useTouchEvents.js":
/*!******************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/useTouchEvents.js ***!
\******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "useTouchEvents": () => (/* binding */ useTouchEvents)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
function useTouchEvents(_ref) {
var getEnvironmentProps = _ref.getEnvironmentProps,
panelElement = _ref.panelElement,
formElement = _ref.formElement,
inputElement = _ref.inputElement;
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(function () {
if (!(panelElement && formElement && inputElement)) {
return undefined;
}
var _getEnvironmentProps = getEnvironmentProps({
panelElement: panelElement,
formElement: formElement,
inputElement: inputElement
}),
onTouchStart = _getEnvironmentProps.onTouchStart,
onTouchMove = _getEnvironmentProps.onTouchMove;
window.addEventListener('touchstart', onTouchStart);
window.addEventListener('touchmove', onTouchMove);
return function () {
window.removeEventListener('touchstart', onTouchStart);
window.removeEventListener('touchmove', onTouchMove);
};
}, [getEnvironmentProps, panelElement, formElement, inputElement]);
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/useTrapFocus.js":
/*!****************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/useTrapFocus.js ***!
\****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "useTrapFocus": () => (/* binding */ useTrapFocus)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
function useTrapFocus(_ref) {
var container = _ref.container;
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(function () {
if (!container) {
return undefined;
}
var focusableElements = container.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), input:not([disabled])');
var firstElement = focusableElements[0];
var lastElement = focusableElements[focusableElements.length - 1];
function trapFocus(event) {
if (event.key !== 'Tab') {
return;
}
if (event.shiftKey) {
if (document.activeElement === firstElement) {
event.preventDefault();
lastElement.focus();
}
} else if (document.activeElement === lastElement) {
event.preventDefault();
firstElement.focus();
}
}
container.addEventListener('keydown', trapFocus);
return function () {
container.removeEventListener('keydown', trapFocus);
};
}, [container]);
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/utils/groupBy.js":
/*!*****************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/utils/groupBy.js ***!
\*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "groupBy": () => (/* binding */ groupBy)
/* harmony export */ });
function groupBy(values, predicate) {
return values.reduce(function (acc, item) {
var key = predicate(item);
if (!acc.hasOwnProperty(key)) {
acc[key] = [];
} // We limit each section to show 5 hits maximum.
// This acts as a frontend alternative to `distinct`.
if (acc[key].length < 5) {
acc[key].push(item);
}
return acc;
}, {});
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/utils/identity.js":
/*!******************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/utils/identity.js ***!
\******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "identity": () => (/* binding */ identity)
/* harmony export */ });
function identity(x) {
return x;
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/utils/noop.js":
/*!**************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/utils/noop.js ***!
\**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "noop": () => (/* binding */ noop)
/* harmony export */ });
function noop() {}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/utils/removeHighlightTags.js":
/*!*****************************************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/utils/removeHighlightTags.js ***!
\*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "removeHighlightTags": () => (/* binding */ removeHighlightTags)
/* harmony export */ });
var regexHighlightTags = /(|<\/mark>)/g;
var regexHasHighlightTags = RegExp(regexHighlightTags.source);
function removeHighlightTags(hit) {
var _internalDocSearchHit, _internalDocSearchHit2, _internalDocSearchHit3, _hit$_highlightResult, _hit$_highlightResult2;
var internalDocSearchHit = hit;
if (!internalDocSearchHit.__docsearch_parent && !hit._highlightResult) {
return hit.hierarchy.lvl0;
}
var _ref = (internalDocSearchHit.__docsearch_parent ? (_internalDocSearchHit = internalDocSearchHit.__docsearch_parent) === null || _internalDocSearchHit === void 0 ? void 0 : (_internalDocSearchHit2 = _internalDocSearchHit._highlightResult) === null || _internalDocSearchHit2 === void 0 ? void 0 : (_internalDocSearchHit3 = _internalDocSearchHit2.hierarchy) === null || _internalDocSearchHit3 === void 0 ? void 0 : _internalDocSearchHit3.lvl0 : (_hit$_highlightResult = hit._highlightResult) === null || _hit$_highlightResult === void 0 ? void 0 : (_hit$_highlightResult2 = _hit$_highlightResult.hierarchy) === null || _hit$_highlightResult2 === void 0 ? void 0 : _hit$_highlightResult2.lvl0) || {},
value = _ref.value;
return value && regexHasHighlightTags.test(value) ? value.replace(regexHighlightTags, '') : value;
}
/***/ }),
/***/ "./node_modules/@docsearch/react/dist/esm/version.js":
/*!***********************************************************!*\
!*** ./node_modules/@docsearch/react/dist/esm/version.js ***!
\***********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "version": () => (/* binding */ version)
/* harmony export */ });
var version = '3.0.0-alpha.41';
/***/ }),
/***/ "./node_modules/@emotion/cache/dist/emotion-cache.esm.js":
/*!***************************************************************!*\
!*** ./node_modules/@emotion/cache/dist/emotion-cache.esm.js ***!
\***************************************************************/
/***/ ((__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 _emotion_sheet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/sheet */ "./node_modules/@emotion/cache/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js");
/* harmony import */ var stylis__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! stylis */ "./node_modules/stylis/src/Tokenizer.js");
/* harmony import */ var stylis__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! stylis */ "./node_modules/stylis/src/Utility.js");
/* harmony import */ var stylis__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! stylis */ "./node_modules/stylis/src/Middleware.js");
/* harmony import */ var stylis__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! stylis */ "./node_modules/stylis/src/Serializer.js");
/* harmony import */ var stylis__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! stylis */ "./node_modules/stylis/src/Enum.js");
/* harmony import */ var stylis__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! stylis */ "./node_modules/stylis/src/Parser.js");
/* harmony import */ var _emotion_weak_memoize__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @emotion/weak-memoize */ "./node_modules/@emotion/weak-memoize/dist/weak-memoize.esm.js");
/* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @emotion/memoize */ "./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js");
var last = function last(arr) {
return arr.length ? arr[arr.length - 1] : null;
}; // based on https://github.com/thysultan/stylis.js/blob/e6843c373ebcbbfade25ebcc23f540ed8508da0a/src/Tokenizer.js#L239-L244
var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
var previous = 0;
var character = 0;
while (true) {
previous = character;
character = (0,stylis__WEBPACK_IMPORTED_MODULE_3__.peek)(); // &\f
if (previous === 38 && character === 12) {
points[index] = 1;
}
if ((0,stylis__WEBPACK_IMPORTED_MODULE_3__.token)(character)) {
break;
}
(0,stylis__WEBPACK_IMPORTED_MODULE_3__.next)();
}
return (0,stylis__WEBPACK_IMPORTED_MODULE_3__.slice)(begin, stylis__WEBPACK_IMPORTED_MODULE_3__.position);
};
var toRules = function toRules(parsed, points) {
// pretend we've started with a comma
var index = -1;
var character = 44;
do {
switch ((0,stylis__WEBPACK_IMPORTED_MODULE_3__.token)(character)) {
case 0:
// &\f
if (character === 38 && (0,stylis__WEBPACK_IMPORTED_MODULE_3__.peek)() === 12) {
// this is not 100% correct, we don't account for literal sequences here - like for example quoted strings
// stylis inserts \f after & to know when & where it should replace this sequence with the context selector
// and when it should just concatenate the outer and inner selectors
// it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here
points[index] = 1;
}
parsed[index] += identifierWithPointTracking(stylis__WEBPACK_IMPORTED_MODULE_3__.position - 1, points, index);
break;
case 2:
parsed[index] += (0,stylis__WEBPACK_IMPORTED_MODULE_3__.delimit)(character);
break;
case 4:
// comma
if (character === 44) {
// colon
parsed[++index] = (0,stylis__WEBPACK_IMPORTED_MODULE_3__.peek)() === 58 ? '&\f' : '';
points[index] = parsed[index].length;
break;
}
// fallthrough
default:
parsed[index] += (0,stylis__WEBPACK_IMPORTED_MODULE_4__.from)(character);
}
} while (character = (0,stylis__WEBPACK_IMPORTED_MODULE_3__.next)());
return parsed;
};
var getRules = function getRules(value, points) {
return (0,stylis__WEBPACK_IMPORTED_MODULE_3__.dealloc)(toRules((0,stylis__WEBPACK_IMPORTED_MODULE_3__.alloc)(value), points));
}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11
var fixedElements = /* #__PURE__ */new WeakMap();
var compat = function compat(element) {
if (element.type !== 'rule' || !element.parent || // .length indicates if this rule contains pseudo or not
!element.length) {
return;
}
var value = element.value,
parent = element.parent;
var isImplicitRule = element.column === parent.column && element.line === parent.line;
while (parent.type !== 'rule') {
parent = parent.parent;
if (!parent) return;
} // short-circuit for the simplest case
if (element.props.length === 1 && value.charCodeAt(0) !== 58
/* colon */
&& !fixedElements.get(parent)) {
return;
} // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)
// then the props has already been manipulated beforehand as they that array is shared between it and its "rule parent"
if (isImplicitRule) {
return;
}
fixedElements.set(element, true);
var points = [];
var rules = getRules(value, points);
var parentRules = parent.props;
for (var i = 0, k = 0; i < rules.length; i++) {
for (var j = 0; j < parentRules.length; j++, k++) {
element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
}
}
};
var removeLabel = function removeLabel(element) {
if (element.type === 'decl') {
var value = element.value;
if ( // charcode for l
value.charCodeAt(0) === 108 && // charcode for b
value.charCodeAt(2) === 98) {
// this ignores label
element["return"] = '';
element.value = '';
}
}
};
var ignoreFlag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';
var isIgnoringComment = function isIgnoringComment(element) {
return !!element && element.type === 'comm' && element.children.indexOf(ignoreFlag) > -1;
};
var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) {
return function (element, index, children) {
if (element.type !== 'rule') return;
var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);
if (unsafePseudoClasses && cache.compat !== true) {
var prevElement = index > 0 ? children[index - 1] : null;
if (prevElement && isIgnoringComment(last(prevElement.children))) {
return;
}
unsafePseudoClasses.forEach(function (unsafePseudoClass) {
console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\".");
});
}
};
};
var isImportRule = function isImportRule(element) {
return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64;
};
var isPrependedWithRegularRules = function isPrependedWithRegularRules(index, children) {
for (var i = index - 1; i >= 0; i--) {
if (!isImportRule(children[i])) {
return true;
}
}
return false;
}; // use this to remove incorrect elements from further processing
// so they don't get handed to the `sheet` (or anything else)
// as that could potentially lead to additional logs which in turn could be overhelming to the user
var nullifyElement = function nullifyElement(element) {
element.type = '';
element.value = '';
element["return"] = '';
element.children = '';
element.props = '';
};
var incorrectImportAlarm = function incorrectImportAlarm(element, index, children) {
if (!isImportRule(element)) {
return;
}
if (element.parent) {
console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles.");
nullifyElement(element);
} else if (isPrependedWithRegularRules(index, children)) {
console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules.");
nullifyElement(element);
}
};
var isBrowser = typeof document !== 'undefined';
var getServerStylisCache = isBrowser ? undefined : (0,_emotion_weak_memoize__WEBPACK_IMPORTED_MODULE_1__["default"])(function () {
return (0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_2__["default"])(function () {
var cache = {};
return function (name) {
return cache[name];
};
});
});
var defaultStylisPlugins = [stylis__WEBPACK_IMPORTED_MODULE_5__.prefixer];
var createCache = function createCache(options) {
var key = options.key;
if ( true && !key) {
throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\n" + "If multiple caches share the same key they might \"fight\" for each other's style elements.");
}
if (isBrowser && key === 'css') {
var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration
// document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
// note this very very intentionally targets all style elements regardless of the key to ensure
// that creating a cache works inside of render of a React component
Array.prototype.forEach.call(ssrStyles, function (node) {
// we want to only move elements which have a space in the data-emotion attribute value
// because that indicates that it is an Emotion 11 server-side rendered style elements
// while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector
// Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)
// so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles
// will not result in the Emotion 10 styles being destroyed
var dataEmotionAttribute = node.getAttribute('data-emotion');
if (dataEmotionAttribute.indexOf(' ') === -1) {
return;
}
document.head.appendChild(node);
node.setAttribute('data-s', '');
});
}
var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
if (true) {
// $FlowFixMe
if (/[^a-z-]/.test(key)) {
throw new Error("Emotion key must only contain lower case alphabetical characters and - but \"" + key + "\" was passed");
}
}
var inserted = {}; // $FlowFixMe
var container;
var nodesToHydrate = [];
if (isBrowser) {
container = options.container || document.head;
Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node) {
var attrib = node.getAttribute("data-emotion").split(' '); // $FlowFixMe
for (var i = 1; i < attrib.length; i++) {
inserted[attrib[i]] = true;
}
nodesToHydrate.push(node);
});
}
var _insert;
var omnipresentPlugins = [compat, removeLabel];
if (true) {
omnipresentPlugins.push(createUnsafeSelectorsAlarm({
get compat() {
return cache.compat;
}
}), incorrectImportAlarm);
}
if (isBrowser) {
var currentSheet;
var finalizingPlugins = [stylis__WEBPACK_IMPORTED_MODULE_6__.stringify, true ? function (element) {
if (!element.root) {
if (element["return"]) {
currentSheet.insert(element["return"]);
} else if (element.value && element.type !== stylis__WEBPACK_IMPORTED_MODULE_7__.COMMENT) {
// insert empty rule in non-production environments
// so @emotion/jest can grab `key` from the (JS)DOM for caches without any rules inserted yet
currentSheet.insert(element.value + "{}");
}
}
} : 0];
var serializer = (0,stylis__WEBPACK_IMPORTED_MODULE_5__.middleware)(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
var stylis = function stylis(styles) {
return (0,stylis__WEBPACK_IMPORTED_MODULE_6__.serialize)((0,stylis__WEBPACK_IMPORTED_MODULE_8__.compile)(styles), serializer);
};
_insert = function insert(selector, serialized, sheet, shouldCache) {
currentSheet = sheet;
if ( true && serialized.map !== undefined) {
currentSheet = {
insert: function insert(rule) {
sheet.insert(rule + serialized.map);
}
};
}
stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
if (shouldCache) {
cache.inserted[serialized.name] = true;
}
};
} else {
var _finalizingPlugins = [stylis__WEBPACK_IMPORTED_MODULE_6__.stringify];
var _serializer = (0,stylis__WEBPACK_IMPORTED_MODULE_5__.middleware)(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
var _stylis = function _stylis(styles) {
return (0,stylis__WEBPACK_IMPORTED_MODULE_6__.serialize)((0,stylis__WEBPACK_IMPORTED_MODULE_8__.compile)(styles), _serializer);
}; // $FlowFixMe
var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
var getRules = function getRules(selector, serialized) {
var name = serialized.name;
if (serverStylisCache[name] === undefined) {
serverStylisCache[name] = _stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
}
return serverStylisCache[name];
};
_insert = function _insert(selector, serialized, sheet, shouldCache) {
var name = serialized.name;
var rules = getRules(selector, serialized);
if (cache.compat === undefined) {
// in regular mode, we don't set the styles on the inserted cache
// since we don't need to and that would be wasting memory
// we return them so that they are rendered in a style tag
if (shouldCache) {
cache.inserted[name] = true;
}
if ( // using === development instead of !== production
// because if people do ssr in tests, the source maps showing up would be annoying
true && serialized.map !== undefined) {
return rules + serialized.map;
}
return rules;
} else {
// in compat mode, we put the styles on the inserted cache so
// that emotion-server can pull out the styles
// except when we don't want to cache it which was in Global but now
// is nowhere but we don't want to do a major right now
// and just in case we're going to leave the case here
// it's also not affecting client side bundle size
// so it's really not a big deal
if (shouldCache) {
cache.inserted[name] = rules;
} else {
return rules;
}
}
};
}
var cache = {
key: key,
sheet: new _emotion_sheet__WEBPACK_IMPORTED_MODULE_0__.StyleSheet({
key: key,
container: container,
nonce: options.nonce,
speedy: options.speedy,
prepend: options.prepend,
insertionPoint: options.insertionPoint
}),
nonce: options.nonce,
inserted: inserted,
registered: {},
insert: _insert
};
cache.sheet.hydrate(nodesToHydrate);
return cache;
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createCache);
/***/ }),
/***/ "./node_modules/@emotion/cache/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js":
/*!*******************************************************************************************!*\
!*** ./node_modules/@emotion/cache/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js ***!
\*******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "StyleSheet": () => (/* binding */ StyleSheet)
/* harmony export */ });
/*
Based off glamor's StyleSheet, thanks Sunil ❤️
high performance StyleSheet for css-in-js systems
- uses multiple style tags behind the scenes for millions of rules
- uses `insertRule` for appending in production for *much* faster performance
// usage
import { StyleSheet } from '@emotion/sheet'
let styleSheet = new StyleSheet({ key: '', container: document.head })
styleSheet.insert('#box { border: 1px solid red; }')
- appends a css rule into the stylesheet
styleSheet.flush()
- empties the stylesheet of all its contents
*/
// $FlowFixMe
function sheetForTag(tag) {
if (tag.sheet) {
// $FlowFixMe
return tag.sheet;
} // this weirdness brought to you by firefox
/* istanbul ignore next */
for (var i = 0; i < document.styleSheets.length; i++) {
if (document.styleSheets[i].ownerNode === tag) {
// $FlowFixMe
return document.styleSheets[i];
}
}
}
function createStyleElement(options) {
var tag = document.createElement('style');
tag.setAttribute('data-emotion', options.key);
if (options.nonce !== undefined) {
tag.setAttribute('nonce', options.nonce);
}
tag.appendChild(document.createTextNode(''));
tag.setAttribute('data-s', '');
return tag;
}
var StyleSheet = /*#__PURE__*/function () {
function StyleSheet(options) {
var _this = this;
this._insertTag = function (tag) {
var before;
if (_this.tags.length === 0) {
if (_this.insertionPoint) {
before = _this.insertionPoint.nextSibling;
} else if (_this.prepend) {
before = _this.container.firstChild;
} else {
before = _this.before;
}
} else {
before = _this.tags[_this.tags.length - 1].nextSibling;
}
_this.container.insertBefore(tag, before);
_this.tags.push(tag);
};
this.isSpeedy = options.speedy === undefined ? "development" === 'production' : options.speedy;
this.tags = [];
this.ctr = 0;
this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
this.key = options.key;
this.container = options.container;
this.prepend = options.prepend;
this.insertionPoint = options.insertionPoint;
this.before = null;
}
var _proto = StyleSheet.prototype;
_proto.hydrate = function hydrate(nodes) {
nodes.forEach(this._insertTag);
};
_proto.insert = function insert(rule) {
// the max length is how many rules we have per style tag, it's 65000 in speedy mode
// it's 1 in dev because we insert source maps that map a single rule to a location
// and you can only have one source map per style tag
if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {
this._insertTag(createStyleElement(this));
}
var tag = this.tags[this.tags.length - 1];
if (true) {
var isImportRule = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105;
if (isImportRule && this._alreadyInsertedOrderInsensitiveRule) {
// this would only cause problem in speedy mode
// but we don't want enabling speedy to affect the observable behavior
// so we report this error at all times
console.error("You're attempting to insert the following rule:\n" + rule + '\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules.');
}
this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule;
}
if (this.isSpeedy) {
var sheet = sheetForTag(tag);
try {
// this is the ultrafast version, works across browsers
// the big drawback is that the css won't be editable in devtools
sheet.insertRule(rule, sheet.cssRules.length);
} catch (e) {
if ( true && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear){/.test(rule)) {
console.error("There was a problem inserting the following rule: \"" + rule + "\"", e);
}
}
} else {
tag.appendChild(document.createTextNode(rule));
}
this.ctr++;
};
_proto.flush = function flush() {
// $FlowFixMe
this.tags.forEach(function (tag) {
return tag.parentNode && tag.parentNode.removeChild(tag);
});
this.tags = [];
this.ctr = 0;
if (true) {
this._alreadyInsertedOrderInsensitiveRule = false;
}
};
return StyleSheet;
}();
/***/ }),
/***/ "./node_modules/@emotion/hash/dist/hash.esm.js":
/*!*****************************************************!*\
!*** ./node_modules/@emotion/hash/dist/hash.esm.js ***!
\*****************************************************/
/***/ ((__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 */ });
/* eslint-disable */
// Inspired by https://github.com/garycourt/murmurhash-js
// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86
function murmur2(str) {
// 'm' and 'r' are mixing constants generated offline.
// They're not really 'magic', they just happen to work well.
// const m = 0x5bd1e995;
// const r = 24;
// Initialize the hash
var h = 0; // Mix 4 bytes at a time into the hash
var k,
i = 0,
len = str.length;
for (; len >= 4; ++i, len -= 4) {
k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
k =
/* Math.imul(k, m): */
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);
k ^=
/* k >>> r: */
k >>> 24;
h =
/* Math.imul(k, m): */
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^
/* Math.imul(h, m): */
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
} // Handle the last few bytes of the input array
switch (len) {
case 3:
h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
case 2:
h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
case 1:
h ^= str.charCodeAt(i) & 0xff;
h =
/* Math.imul(h, m): */
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
} // Do a few final mixes of the hash to ensure the last few
// bytes are well-incorporated.
h ^= h >>> 13;
h =
/* Math.imul(h, m): */
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
return ((h ^ h >>> 15) >>> 0).toString(36);
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (murmur2);
/***/ }),
/***/ "./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js":
/*!***********************************************************************!*\
!*** ./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js ***!
\***********************************************************************/
/***/ ((__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 _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ "./node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize/dist/memoize.esm.js");
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
var index = (0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prop) {
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
/* o */
&& prop.charCodeAt(1) === 110
/* n */
&& prop.charCodeAt(2) < 91;
}
/* Z+1 */
);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (index);
/***/ }),
/***/ "./node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize/dist/memoize.esm.js":
/*!***********************************************************************************************!*\
!*** ./node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize/dist/memoize.esm.js ***!
\***********************************************************************************************/
/***/ ((__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 */ });
function memoize(fn) {
var cache = {};
return function (arg) {
if (cache[arg] === undefined) cache[arg] = fn(arg);
return cache[arg];
};
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoize);
/***/ }),
/***/ "./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js":
/*!*******************************************************************!*\
!*** ./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js ***!
\*******************************************************************/
/***/ ((__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 */ });
function memoize(fn) {
var cache = Object.create(null);
return function (arg) {
if (cache[arg] === undefined) cache[arg] = fn(arg);
return cache[arg];
};
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoize);
/***/ }),
/***/ "./node_modules/@emotion/react/_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js":
/*!*********************************************************************************************!*\
!*** ./node_modules/@emotion/react/_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js ***!
\*********************************************************************************************/
/***/ ((__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 hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hoist-non-react-statics */ "./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js");
/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_0__);
// this file isolates this package that is not tree-shakeable
// and if this module doesn't actually contain any logic of its own
// then Rollup just use 'hoist-non-react-statics' directly in other chunks
var hoistNonReactStatics = (function (targetComponent, sourceComponent) {
return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_0___default()(targetComponent, sourceComponent);
});
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hoistNonReactStatics);
/***/ }),
/***/ "./node_modules/@emotion/react/dist/emotion-element-fc314d24.esm.js":
/*!**************************************************************************!*\
!*** ./node_modules/@emotion/react/dist/emotion-element-fc314d24.esm.js ***!
\**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "C": () => (/* binding */ CacheProvider),
/* harmony export */ "E": () => (/* binding */ Emotion),
/* harmony export */ "T": () => (/* binding */ ThemeContext),
/* harmony export */ "_": () => (/* binding */ __unsafe_useEmotionCache),
/* harmony export */ "a": () => (/* binding */ ThemeProvider),
/* harmony export */ "b": () => (/* binding */ withTheme),
/* harmony export */ "c": () => (/* binding */ createEmotionProps),
/* harmony export */ "h": () => (/* binding */ hasOwnProperty),
/* harmony export */ "i": () => (/* binding */ isBrowser),
/* harmony export */ "u": () => (/* binding */ useTheme),
/* harmony export */ "w": () => (/* binding */ withEmotionCache)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _emotion_cache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @emotion/cache */ "./node_modules/@emotion/cache/dist/emotion-cache.esm.js");
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js");
/* harmony import */ var _emotion_weak_memoize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/weak-memoize */ "./node_modules/@emotion/weak-memoize/dist/weak-memoize.esm.js");
/* harmony import */ var _isolated_hnrs_dist_emotion_react_isolated_hnrs_esm_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js */ "./node_modules/@emotion/react/_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js");
/* harmony import */ var _emotion_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @emotion/utils */ "./node_modules/@emotion/react/node_modules/@emotion/utils/dist/emotion-utils.esm.js");
/* harmony import */ var _emotion_serialize__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @emotion/serialize */ "./node_modules/@emotion/react/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js");
var isBrowser = typeof document !== 'undefined';
var hasOwnProperty = {}.hasOwnProperty;
var EmotionCacheContext = /* #__PURE__ */(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)( // we're doing this to avoid preconstruct's dead code elimination in this one case
// because this module is primarily intended for the browser and node
// but it's also required in react native and similar environments sometimes
// and we could have a special build just for that
// but this is much easier and the native packages
// might use a different theme context in the future anyway
typeof HTMLElement !== 'undefined' ? /* #__PURE__ */(0,_emotion_cache__WEBPACK_IMPORTED_MODULE_1__["default"])({
key: 'css'
}) : null);
if (true) {
EmotionCacheContext.displayName = 'EmotionCacheContext';
}
var CacheProvider = EmotionCacheContext.Provider;
var __unsafe_useEmotionCache = function useEmotionCache() {
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(EmotionCacheContext);
};
var withEmotionCache = function withEmotionCache(func) {
// $FlowFixMe
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) {
// the cache will never be null in the browser
var cache = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(EmotionCacheContext);
return func(props, cache, ref);
});
};
if (!isBrowser) {
withEmotionCache = function withEmotionCache(func) {
return function (props) {
var cache = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(EmotionCacheContext);
if (cache === null) {
// yes, we're potentially creating this on every render
// it doesn't actually matter though since it's only on the server
// so there will only every be a single render
// that could change in the future because of suspense and etc. but for now,
// this works and i don't want to optimise for a future thing that we aren't sure about
cache = (0,_emotion_cache__WEBPACK_IMPORTED_MODULE_1__["default"])({
key: 'css'
});
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(EmotionCacheContext.Provider, {
value: cache
}, func(props, cache));
} else {
return func(props, cache);
}
};
};
}
var ThemeContext = /* #__PURE__ */(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({});
if (true) {
ThemeContext.displayName = 'EmotionThemeContext';
}
var useTheme = function useTheme() {
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(ThemeContext);
};
var getTheme = function getTheme(outerTheme, theme) {
if (typeof theme === 'function') {
var mergedTheme = theme(outerTheme);
if ( true && (mergedTheme == null || typeof mergedTheme !== 'object' || Array.isArray(mergedTheme))) {
throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');
}
return mergedTheme;
}
if ( true && (theme == null || typeof theme !== 'object' || Array.isArray(theme))) {
throw new Error('[ThemeProvider] Please make your theme prop a plain object');
}
return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({}, outerTheme, theme);
};
var createCacheWithTheme = /* #__PURE__ */(0,_emotion_weak_memoize__WEBPACK_IMPORTED_MODULE_3__["default"])(function (outerTheme) {
return (0,_emotion_weak_memoize__WEBPACK_IMPORTED_MODULE_3__["default"])(function (theme) {
return getTheme(outerTheme, theme);
});
});
var ThemeProvider = function ThemeProvider(props) {
var theme = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(ThemeContext);
if (props.theme !== theme) {
theme = createCacheWithTheme(theme)(props.theme);
}
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ThemeContext.Provider, {
value: theme
}, props.children);
};
function withTheme(Component) {
var componentName = Component.displayName || Component.name || 'Component';
var render = function render(props, ref) {
var theme = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(ThemeContext);
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Component, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({
theme: theme,
ref: ref
}, props));
}; // $FlowFixMe
var WithTheme = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(render);
WithTheme.displayName = "WithTheme(" + componentName + ")";
return (0,_isolated_hnrs_dist_emotion_react_isolated_hnrs_esm_js__WEBPACK_IMPORTED_MODULE_6__["default"])(WithTheme, Component);
}
var getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {
// V8
var match = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(line);
if (match) {
// The match may be something like 'Object.createEmotionProps'
var parts = match[1].split('.');
return parts[parts.length - 1];
} // Safari / Firefox
match = /^([A-Za-z0-9$.]+)@/.exec(line);
if (match) return match[1];
return undefined;
};
var internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS
// identifiers, thus we only need to replace what is a valid character for JS,
// but not for CSS.
var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
return identifier.replace(/\$/g, '-');
};
var getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {
if (!stackTrace) return undefined;
var lines = stackTrace.split('\n');
for (var i = 0; i < lines.length; i++) {
var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just "Error"
if (!functionName) continue; // If we reach one of these, we have gone too far and should quit
if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an
// uppercase letter
if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);
}
return undefined;
};
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
var createEmotionProps = function createEmotionProps(type, props) {
if ( true && typeof props.css === 'string' && // check if there is a css declaration
props.css.indexOf(':') !== -1) {
throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`" + props.css + "`");
}
var newProps = {};
for (var key in props) {
if (hasOwnProperty.call(props, key)) {
newProps[key] = props[key];
}
}
newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when
// the label hasn't already been computed
if ( true && !!props.css && (typeof props.css !== 'object' || typeof props.css.name !== 'string' || props.css.name.indexOf('-') === -1)) {
var label = getLabelFromStackTrace(new Error().stack);
if (label) newProps[labelPropName] = label;
}
return newProps;
};
var Noop = function Noop() {
return null;
};
var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works
// not passing the registered cache to serializeStyles because it would
// make certain babel optimisations not possible
if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {
cssProp = cache.registered[cssProp];
}
var type = props[typePropName];
var registeredStyles = [cssProp];
var className = '';
if (typeof props.className === 'string') {
className = (0,_emotion_utils__WEBPACK_IMPORTED_MODULE_4__.getRegisteredStyles)(cache.registered, registeredStyles, props.className);
} else if (props.className != null) {
className = props.className + " ";
}
var serialized = (0,_emotion_serialize__WEBPACK_IMPORTED_MODULE_5__.serializeStyles)(registeredStyles, undefined, (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(ThemeContext));
if ( true && serialized.name.indexOf('-') === -1) {
var labelFromStack = props[labelPropName];
if (labelFromStack) {
serialized = (0,_emotion_serialize__WEBPACK_IMPORTED_MODULE_5__.serializeStyles)([serialized, 'label:' + labelFromStack + ';']);
}
}
var rules = (0,_emotion_utils__WEBPACK_IMPORTED_MODULE_4__.insertStyles)(cache, serialized, typeof type === 'string');
className += cache.key + "-" + serialized.name;
var newProps = {};
for (var key in props) {
if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && ( false || key !== labelPropName)) {
newProps[key] = props[key];
}
}
newProps.ref = ref;
newProps.className = className;
var ele = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(type, newProps);
var possiblyStyleElement = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Noop, null);
if (!isBrowser && rules !== undefined) {
var _ref;
var serializedNames = serialized.name;
var next = serialized.next;
while (next !== undefined) {
serializedNames += ' ' + next.name;
next = next.next;
}
possiblyStyleElement = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("style", (_ref = {}, _ref["data-emotion"] = cache.key + " " + serializedNames, _ref.dangerouslySetInnerHTML = {
__html: rules
}, _ref.nonce = cache.sheet.nonce, _ref));
} // Need to return the same number of siblings or else `React.useId` will cause hydration mismatches.
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, possiblyStyleElement, ele);
});
if (true) {
Emotion.displayName = 'EmotionCssPropInternal';
}
/***/ }),
/***/ "./node_modules/@emotion/react/dist/emotion-react.esm.js":
/*!***************************************************************!*\
!*** ./node_modules/@emotion/react/dist/emotion-react.esm.js ***!
\***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "CacheProvider": () => (/* reexport safe */ _emotion_element_fc314d24_esm_js__WEBPACK_IMPORTED_MODULE_2__.C),
/* harmony export */ "ThemeContext": () => (/* reexport safe */ _emotion_element_fc314d24_esm_js__WEBPACK_IMPORTED_MODULE_2__.T),
/* harmony export */ "ThemeProvider": () => (/* reexport safe */ _emotion_element_fc314d24_esm_js__WEBPACK_IMPORTED_MODULE_2__.a),
/* harmony export */ "__unsafe_useEmotionCache": () => (/* reexport safe */ _emotion_element_fc314d24_esm_js__WEBPACK_IMPORTED_MODULE_2__._),
/* harmony export */ "useTheme": () => (/* reexport safe */ _emotion_element_fc314d24_esm_js__WEBPACK_IMPORTED_MODULE_2__.u),
/* harmony export */ "withEmotionCache": () => (/* reexport safe */ _emotion_element_fc314d24_esm_js__WEBPACK_IMPORTED_MODULE_2__.w),
/* harmony export */ "withTheme": () => (/* reexport safe */ _emotion_element_fc314d24_esm_js__WEBPACK_IMPORTED_MODULE_2__.b),
/* harmony export */ "ClassNames": () => (/* binding */ ClassNames),
/* harmony export */ "Global": () => (/* binding */ Global),
/* harmony export */ "createElement": () => (/* binding */ jsx),
/* harmony export */ "css": () => (/* binding */ css),
/* harmony export */ "jsx": () => (/* binding */ jsx),
/* harmony export */ "keyframes": () => (/* binding */ keyframes)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _emotion_cache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @emotion/cache */ "./node_modules/@emotion/cache/dist/emotion-cache.esm.js");
/* harmony import */ var _emotion_element_fc314d24_esm_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./emotion-element-fc314d24.esm.js */ "./node_modules/@emotion/react/dist/emotion-element-fc314d24.esm.js");
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js");
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _emotion_weak_memoize__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @emotion/weak-memoize */ "./node_modules/@emotion/weak-memoize/dist/weak-memoize.esm.js");
/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! hoist-non-react-statics */ "./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js");
/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _emotion_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @emotion/utils */ "./node_modules/@emotion/react/node_modules/@emotion/utils/dist/emotion-utils.esm.js");
/* harmony import */ var _emotion_serialize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @emotion/serialize */ "./node_modules/@emotion/react/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js");
/* harmony import */ var _emotion_sheet__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @emotion/sheet */ "./node_modules/@emotion/react/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js");
var pkg = {
name: "@emotion/react",
version: "11.7.0",
main: "dist/emotion-react.cjs.js",
module: "dist/emotion-react.esm.js",
browser: {
"./dist/emotion-react.cjs.js": "./dist/emotion-react.browser.cjs.js",
"./dist/emotion-react.esm.js": "./dist/emotion-react.browser.esm.js"
},
types: "types/index.d.ts",
files: [
"src",
"dist",
"jsx-runtime",
"jsx-dev-runtime",
"_isolated-hnrs",
"types/*.d.ts",
"macro.js",
"macro.d.ts",
"macro.js.flow"
],
sideEffects: false,
author: "mitchellhamilton ",
license: "MIT",
scripts: {
"test:typescript": "dtslint types"
},
dependencies: {
"@babel/runtime": "^7.13.10",
"@emotion/cache": "^11.6.0",
"@emotion/serialize": "^1.0.2",
"@emotion/sheet": "^1.1.0",
"@emotion/utils": "^1.0.0",
"@emotion/weak-memoize": "^0.2.5",
"hoist-non-react-statics": "^3.3.1"
},
peerDependencies: {
"@babel/core": "^7.0.0",
react: ">=16.8.0"
},
peerDependenciesMeta: {
"@babel/core": {
optional: true
},
"@types/react": {
optional: true
}
},
devDependencies: {
"@babel/core": "^7.13.10",
"@emotion/css": "11.5.0",
"@emotion/css-prettifier": "1.0.0",
"@emotion/server": "11.4.0",
"@emotion/styled": "11.6.0",
"@types/react": "^16.9.11",
dtslint: "^0.3.0",
"html-tag-names": "^1.1.2",
react: "16.14.0",
"svg-tag-names": "^1.1.1"
},
repository: "https://github.com/emotion-js/emotion/tree/main/packages/react",
publishConfig: {
access: "public"
},
"umd:main": "dist/emotion-react.umd.min.js",
preconstruct: {
entrypoints: [
"./index.js",
"./jsx-runtime.js",
"./jsx-dev-runtime.js",
"./_isolated-hnrs.js"
],
umdName: "emotionReact"
}
};
var jsx = function jsx(type, props) {
var args = arguments;
if (props == null || !_emotion_element_fc314d24_esm_js__WEBPACK_IMPORTED_MODULE_2__.h.call(props, 'css')) {
// $FlowFixMe
return react__WEBPACK_IMPORTED_MODULE_0__.createElement.apply(undefined, args);
}
var argsLength = args.length;
var createElementArgArray = new Array(argsLength);
createElementArgArray[0] = _emotion_element_fc314d24_esm_js__WEBPACK_IMPORTED_MODULE_2__.E;
createElementArgArray[1] = (0,_emotion_element_fc314d24_esm_js__WEBPACK_IMPORTED_MODULE_2__.c)(type, props);
for (var i = 2; i < argsLength; i++) {
createElementArgArray[i] = args[i];
} // $FlowFixMe
return react__WEBPACK_IMPORTED_MODULE_0__.createElement.apply(null, createElementArgArray);
};
var warnedAboutCssPropForGlobal = false; // maintain place over rerenders.
// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild
// initial client-side render from SSR, use place of hydrating tag
var Global = /* #__PURE__ */(0,_emotion_element_fc314d24_esm_js__WEBPACK_IMPORTED_MODULE_2__.w)(function (props, cache) {
if ( true && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is
// probably using the custom createElement which
// means it will be turned into a className prop
// $FlowFixMe I don't really want to add it to the type since it shouldn't be used
props.className || props.css)) {
console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?");
warnedAboutCssPropForGlobal = true;
}
var styles = props.styles;
var serialized = (0,_emotion_serialize__WEBPACK_IMPORTED_MODULE_7__.serializeStyles)([styles], undefined, (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_emotion_element_fc314d24_esm_js__WEBPACK_IMPORTED_MODULE_2__.T));
if (!_emotion_element_fc314d24_esm_js__WEBPACK_IMPORTED_MODULE_2__.i) {
var _ref;
var serializedNames = serialized.name;
var serializedStyles = serialized.styles;
var next = serialized.next;
while (next !== undefined) {
serializedNames += ' ' + next.name;
serializedStyles += next.styles;
next = next.next;
}
var shouldCache = cache.compat === true;
var rules = cache.insert("", {
name: serializedNames,
styles: serializedStyles
}, cache.sheet, shouldCache);
if (shouldCache) {
return null;
}
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("style", (_ref = {}, _ref["data-emotion"] = cache.key + "-global " + serializedNames, _ref.dangerouslySetInnerHTML = {
__html: rules
}, _ref.nonce = cache.sheet.nonce, _ref));
} // yes, i know these hooks are used conditionally
// but it is based on a constant that will never change at runtime
// it's effectively like having two implementations and switching them out
// so it's not actually breaking anything
var sheetRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
(0,react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect)(function () {
var key = cache.key + "-global";
var sheet = new _emotion_sheet__WEBPACK_IMPORTED_MODULE_8__.StyleSheet({
key: key,
nonce: cache.sheet.nonce,
container: cache.sheet.container,
speedy: cache.sheet.isSpeedy
});
var rehydrating = false; // $FlowFixMe
var node = document.querySelector("style[data-emotion=\"" + key + " " + serialized.name + "\"]");
if (cache.sheet.tags.length) {
sheet.before = cache.sheet.tags[0];
}
if (node !== null) {
rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other s
node.setAttribute('data-emotion', key);
sheet.hydrate([node]);
}
sheetRef.current = [sheet, rehydrating];
return function () {
sheet.flush();
};
}, [cache]);
(0,react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect)(function () {
var sheetRefCurrent = sheetRef.current;
var sheet = sheetRefCurrent[0],
rehydrating = sheetRefCurrent[1];
if (rehydrating) {
sheetRefCurrent[1] = false;
return;
}
if (serialized.next !== undefined) {
// insert keyframes
(0,_emotion_utils__WEBPACK_IMPORTED_MODULE_6__.insertStyles)(cache, serialized.next, true);
}
if (sheet.tags.length) {
// if this doesn't exist then it will be null so the style element will be appended
var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;
sheet.before = element;
sheet.flush();
}
cache.insert("", serialized, sheet, false);
}, [cache, serialized.name]);
return null;
});
if (true) {
Global.displayName = 'EmotionGlobal';
}
function css() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return (0,_emotion_serialize__WEBPACK_IMPORTED_MODULE_7__.serializeStyles)(args);
}
var keyframes = function keyframes() {
var insertable = css.apply(void 0, arguments);
var name = "animation-" + insertable.name; // $FlowFixMe
return {
name: name,
styles: "@keyframes " + name + "{" + insertable.styles + "}",
anim: 1,
toString: function toString() {
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
}
};
};
var classnames = function classnames(args) {
var len = args.length;
var i = 0;
var cls = '';
for (; i < len; i++) {
var arg = args[i];
if (arg == null) continue;
var toAdd = void 0;
switch (typeof arg) {
case 'boolean':
break;
case 'object':
{
if (Array.isArray(arg)) {
toAdd = classnames(arg);
} else {
if ( true && arg.styles !== undefined && arg.name !== undefined) {
console.error('You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n' + '`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from component.');
}
toAdd = '';
for (var k in arg) {
if (arg[k] && k) {
toAdd && (toAdd += ' ');
toAdd += k;
}
}
}
break;
}
default:
{
toAdd = arg;
}
}
if (toAdd) {
cls && (cls += ' ');
cls += toAdd;
}
}
return cls;
};
function merge(registered, css, className) {
var registeredStyles = [];
var rawClassName = (0,_emotion_utils__WEBPACK_IMPORTED_MODULE_6__.getRegisteredStyles)(registered, registeredStyles, className);
if (registeredStyles.length < 2) {
return className;
}
return rawClassName + css(registeredStyles);
}
var Noop = function Noop() {
return null;
};
var ClassNames = /* #__PURE__ */(0,_emotion_element_fc314d24_esm_js__WEBPACK_IMPORTED_MODULE_2__.w)(function (props, cache) {
var rules = '';
var serializedHashes = '';
var hasRendered = false;
var css = function css() {
if (hasRendered && "development" !== 'production') {
throw new Error('css can only be used during render');
}
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var serialized = (0,_emotion_serialize__WEBPACK_IMPORTED_MODULE_7__.serializeStyles)(args, cache.registered);
if (_emotion_element_fc314d24_esm_js__WEBPACK_IMPORTED_MODULE_2__.i) {
(0,_emotion_utils__WEBPACK_IMPORTED_MODULE_6__.insertStyles)(cache, serialized, false);
} else {
var res = (0,_emotion_utils__WEBPACK_IMPORTED_MODULE_6__.insertStyles)(cache, serialized, false);
if (res !== undefined) {
rules += res;
}
}
if (!_emotion_element_fc314d24_esm_js__WEBPACK_IMPORTED_MODULE_2__.i) {
serializedHashes += " " + serialized.name;
}
return cache.key + "-" + serialized.name;
};
var cx = function cx() {
if (hasRendered && "development" !== 'production') {
throw new Error('cx can only be used during render');
}
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return merge(cache.registered, css, classnames(args));
};
var content = {
css: css,
cx: cx,
theme: (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_emotion_element_fc314d24_esm_js__WEBPACK_IMPORTED_MODULE_2__.T)
};
var ele = props.children(content);
hasRendered = true;
var possiblyStyleElement = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Noop, null);
if (!_emotion_element_fc314d24_esm_js__WEBPACK_IMPORTED_MODULE_2__.i && rules.length !== 0) {
var _ref;
possiblyStyleElement = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("style", (_ref = {}, _ref["data-emotion"] = cache.key + " " + serializedHashes.substring(1), _ref.dangerouslySetInnerHTML = {
__html: rules
}, _ref.nonce = cache.sheet.nonce, _ref));
} // Need to return the same number of siblings or else `React.useId` will cause hydration mismatches.
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, possiblyStyleElement, ele);
});
if (true) {
ClassNames.displayName = 'EmotionClassNames';
}
if (true) {
var isBrowser = typeof document !== 'undefined'; // #1727 for some reason Jest evaluates modules twice if some consuming module gets mocked with jest.mock
var isJest = typeof jest !== 'undefined';
if (isBrowser && !isJest) {
// globalThis has wide browser support - https://caniuse.com/?search=globalThis, Node.js 12 and later
var globalContext = // $FlowIgnore
typeof globalThis !== 'undefined' ? globalThis // eslint-disable-line no-undef
: isBrowser ? window : global;
var globalKey = "__EMOTION_REACT_" + pkg.version.split('.')[0] + "__";
if (globalContext[globalKey]) {
console.warn('You are loading @emotion/react when it is already loaded. Running ' + 'multiple instances may cause problems. This can happen if multiple ' + 'versions are used, or if multiple builds of the same version are ' + 'used.');
}
globalContext[globalKey] = true;
}
}
/***/ }),
/***/ "./node_modules/@emotion/react/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js":
/*!***************************************************************************************************!*\
!*** ./node_modules/@emotion/react/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js ***!
\***************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "serializeStyles": () => (/* binding */ serializeStyles)
/* harmony export */ });
/* harmony import */ var _emotion_hash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/hash */ "./node_modules/@emotion/hash/dist/hash.esm.js");
/* harmony import */ var _emotion_unitless__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @emotion/unitless */ "./node_modules/@emotion/unitless/dist/unitless.esm.js");
/* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @emotion/memoize */ "./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js");
var ILLEGAL_ESCAPE_SEQUENCE_ERROR = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences";
var UNDEFINED_AS_OBJECT_KEY_ERROR = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).";
var hyphenateRegex = /[A-Z]|^ms/g;
var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
var isCustomProperty = function isCustomProperty(property) {
return property.charCodeAt(1) === 45;
};
var isProcessableValue = function isProcessableValue(value) {
return value != null && typeof value !== 'boolean';
};
var processStyleName = /* #__PURE__ */(0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_2__["default"])(function (styleName) {
return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();
});
var processStyleValue = function processStyleValue(key, value) {
switch (key) {
case 'animation':
case 'animationName':
{
if (typeof value === 'string') {
return value.replace(animationRegex, function (match, p1, p2) {
cursor = {
name: p1,
styles: p2,
next: cursor
};
return p1;
});
}
}
}
if (_emotion_unitless__WEBPACK_IMPORTED_MODULE_1__["default"][key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {
return value + 'px';
}
return value;
};
if (true) {
var contentValuePattern = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];
var oldProcessStyleValue = processStyleValue;
var msPattern = /^-ms-/;
var hyphenPattern = /-(.)/g;
var hyphenatedCache = {};
processStyleValue = function processStyleValue(key, value) {
if (key === 'content') {
if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) {
throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + value + "\"'`");
}
}
var processed = oldProcessStyleValue(key, value);
if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {
hyphenatedCache[key] = true;
console.error("Using kebab-case for css properties in objects is not supported. Did you mean " + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {
return _char.toUpperCase();
}) + "?");
}
return processed;
};
}
function handleInterpolation(mergedProps, registered, interpolation) {
if (interpolation == null) {
return '';
}
if (interpolation.__emotion_styles !== undefined) {
if ( true && interpolation.toString() === 'NO_COMPONENT_SELECTOR') {
throw new Error('Component selectors can only be used in conjunction with @emotion/babel-plugin.');
}
return interpolation;
}
switch (typeof interpolation) {
case 'boolean':
{
return '';
}
case 'object':
{
if (interpolation.anim === 1) {
cursor = {
name: interpolation.name,
styles: interpolation.styles,
next: cursor
};
return interpolation.name;
}
if (interpolation.styles !== undefined) {
var next = interpolation.next;
if (next !== undefined) {
// not the most efficient thing ever but this is a pretty rare case
// and there will be very few iterations of this generally
while (next !== undefined) {
cursor = {
name: next.name,
styles: next.styles,
next: cursor
};
next = next.next;
}
}
var styles = interpolation.styles + ";";
if ( true && interpolation.map !== undefined) {
styles += interpolation.map;
}
return styles;
}
return createStringFromObject(mergedProps, registered, interpolation);
}
case 'function':
{
if (mergedProps !== undefined) {
var previousCursor = cursor;
var result = interpolation(mergedProps);
cursor = previousCursor;
return handleInterpolation(mergedProps, registered, result);
} else if (true) {
console.error('Functions that are interpolated in css calls will be stringified.\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\n' + 'It can be called directly with props or interpolated in a styled call like this\n' + "let SomeComponent = styled('div')`${dynamicStyle}`");
}
break;
}
case 'string':
if (true) {
var matched = [];
var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {
var fakeVarName = "animation" + matched.length;
matched.push("const " + fakeVarName + " = keyframes`" + p2.replace(/^@keyframes animation-\w+/, '') + "`");
return "${" + fakeVarName + "}";
});
if (matched.length) {
console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\n' + 'Instead of doing this:\n\n' + [].concat(matched, ["`" + replaced + "`"]).join('\n') + '\n\nYou should wrap it with `css` like this:\n\n' + ("css`" + replaced + "`"));
}
}
break;
} // finalize string values (regular strings and functions interpolated into css calls)
if (registered == null) {
return interpolation;
}
var cached = registered[interpolation];
return cached !== undefined ? cached : interpolation;
}
function createStringFromObject(mergedProps, registered, obj) {
var string = '';
if (Array.isArray(obj)) {
for (var i = 0; i < obj.length; i++) {
string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
}
} else {
for (var _key in obj) {
var value = obj[_key];
if (typeof value !== 'object') {
if (registered != null && registered[value] !== undefined) {
string += _key + "{" + registered[value] + "}";
} else if (isProcessableValue(value)) {
string += processStyleName(_key) + ":" + processStyleValue(_key, value) + ";";
}
} else {
if (_key === 'NO_COMPONENT_SELECTOR' && "development" !== 'production') {
throw new Error('Component selectors can only be used in conjunction with @emotion/babel-plugin.');
}
if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {
for (var _i = 0; _i < value.length; _i++) {
if (isProcessableValue(value[_i])) {
string += processStyleName(_key) + ":" + processStyleValue(_key, value[_i]) + ";";
}
}
} else {
var interpolated = handleInterpolation(mergedProps, registered, value);
switch (_key) {
case 'animation':
case 'animationName':
{
string += processStyleName(_key) + ":" + interpolated + ";";
break;
}
default:
{
if ( true && _key === 'undefined') {
console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);
}
string += _key + "{" + interpolated + "}";
}
}
}
}
}
}
return string;
}
var labelPattern = /label:\s*([^\s;\n{]+)\s*(;|$)/g;
var sourceMapPattern;
if (true) {
sourceMapPattern = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;
} // this is the cursor for keyframes
// keyframes are stored on the SerializedStyles object as a linked list
var cursor;
var serializeStyles = function serializeStyles(args, registered, mergedProps) {
if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {
return args[0];
}
var stringMode = true;
var styles = '';
cursor = undefined;
var strings = args[0];
if (strings == null || strings.raw === undefined) {
stringMode = false;
styles += handleInterpolation(mergedProps, registered, strings);
} else {
if ( true && strings[0] === undefined) {
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);
}
styles += strings[0];
} // we start at 1 since we've already handled the first arg
for (var i = 1; i < args.length; i++) {
styles += handleInterpolation(mergedProps, registered, args[i]);
if (stringMode) {
if ( true && strings[i] === undefined) {
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);
}
styles += strings[i];
}
}
var sourceMap;
if (true) {
styles = styles.replace(sourceMapPattern, function (match) {
sourceMap = match;
return '';
});
} // using a global regex with .exec is stateful so lastIndex has to be reset each time
labelPattern.lastIndex = 0;
var identifierName = '';
var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5
while ((match = labelPattern.exec(styles)) !== null) {
identifierName += '-' + // $FlowFixMe we know it's not null
match[1];
}
var name = (0,_emotion_hash__WEBPACK_IMPORTED_MODULE_0__["default"])(styles) + identifierName;
if (true) {
// $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)
return {
name: name,
styles: styles,
map: sourceMap,
next: cursor,
toString: function toString() {
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
}
};
}
return {
name: name,
styles: styles,
next: cursor
};
};
/***/ }),
/***/ "./node_modules/@emotion/react/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js":
/*!*******************************************************************************************!*\
!*** ./node_modules/@emotion/react/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js ***!
\*******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "StyleSheet": () => (/* binding */ StyleSheet)
/* harmony export */ });
/*
Based off glamor's StyleSheet, thanks Sunil ❤️
high performance StyleSheet for css-in-js systems
- uses multiple style tags behind the scenes for millions of rules
- uses `insertRule` for appending in production for *much* faster performance
// usage
import { StyleSheet } from '@emotion/sheet'
let styleSheet = new StyleSheet({ key: '', container: document.head })
styleSheet.insert('#box { border: 1px solid red; }')
- appends a css rule into the stylesheet
styleSheet.flush()
- empties the stylesheet of all its contents
*/
// $FlowFixMe
function sheetForTag(tag) {
if (tag.sheet) {
// $FlowFixMe
return tag.sheet;
} // this weirdness brought to you by firefox
/* istanbul ignore next */
for (var i = 0; i < document.styleSheets.length; i++) {
if (document.styleSheets[i].ownerNode === tag) {
// $FlowFixMe
return document.styleSheets[i];
}
}
}
function createStyleElement(options) {
var tag = document.createElement('style');
tag.setAttribute('data-emotion', options.key);
if (options.nonce !== undefined) {
tag.setAttribute('nonce', options.nonce);
}
tag.appendChild(document.createTextNode(''));
tag.setAttribute('data-s', '');
return tag;
}
var StyleSheet = /*#__PURE__*/function () {
function StyleSheet(options) {
var _this = this;
this._insertTag = function (tag) {
var before;
if (_this.tags.length === 0) {
if (_this.insertionPoint) {
before = _this.insertionPoint.nextSibling;
} else if (_this.prepend) {
before = _this.container.firstChild;
} else {
before = _this.before;
}
} else {
before = _this.tags[_this.tags.length - 1].nextSibling;
}
_this.container.insertBefore(tag, before);
_this.tags.push(tag);
};
this.isSpeedy = options.speedy === undefined ? "development" === 'production' : options.speedy;
this.tags = [];
this.ctr = 0;
this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
this.key = options.key;
this.container = options.container;
this.prepend = options.prepend;
this.insertionPoint = options.insertionPoint;
this.before = null;
}
var _proto = StyleSheet.prototype;
_proto.hydrate = function hydrate(nodes) {
nodes.forEach(this._insertTag);
};
_proto.insert = function insert(rule) {
// the max length is how many rules we have per style tag, it's 65000 in speedy mode
// it's 1 in dev because we insert source maps that map a single rule to a location
// and you can only have one source map per style tag
if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {
this._insertTag(createStyleElement(this));
}
var tag = this.tags[this.tags.length - 1];
if (true) {
var isImportRule = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105;
if (isImportRule && this._alreadyInsertedOrderInsensitiveRule) {
// this would only cause problem in speedy mode
// but we don't want enabling speedy to affect the observable behavior
// so we report this error at all times
console.error("You're attempting to insert the following rule:\n" + rule + '\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules.');
}
this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule;
}
if (this.isSpeedy) {
var sheet = sheetForTag(tag);
try {
// this is the ultrafast version, works across browsers
// the big drawback is that the css won't be editable in devtools
sheet.insertRule(rule, sheet.cssRules.length);
} catch (e) {
if ( true && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear){/.test(rule)) {
console.error("There was a problem inserting the following rule: \"" + rule + "\"", e);
}
}
} else {
tag.appendChild(document.createTextNode(rule));
}
this.ctr++;
};
_proto.flush = function flush() {
// $FlowFixMe
this.tags.forEach(function (tag) {
return tag.parentNode && tag.parentNode.removeChild(tag);
});
this.tags = [];
this.ctr = 0;
if (true) {
this._alreadyInsertedOrderInsensitiveRule = false;
}
};
return StyleSheet;
}();
/***/ }),
/***/ "./node_modules/@emotion/react/node_modules/@emotion/utils/dist/emotion-utils.esm.js":
/*!*******************************************************************************************!*\
!*** ./node_modules/@emotion/react/node_modules/@emotion/utils/dist/emotion-utils.esm.js ***!
\*******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "getRegisteredStyles": () => (/* binding */ getRegisteredStyles),
/* harmony export */ "insertStyles": () => (/* binding */ insertStyles)
/* harmony export */ });
var isBrowser = typeof document !== 'undefined';
function getRegisteredStyles(registered, registeredStyles, classNames) {
var rawClassName = '';
classNames.split(' ').forEach(function (className) {
if (registered[className] !== undefined) {
registeredStyles.push(registered[className] + ";");
} else {
rawClassName += className + " ";
}
});
return rawClassName;
}
var insertStyles = function insertStyles(cache, serialized, isStringTag) {
var className = cache.key + "-" + serialized.name;
if ( // we only need to add the styles to the registered cache if the
// class name could be used further down
// the tree but if it's a string tag, we know it won't
// so we don't have to add it to registered cache.
// this improves memory usage since we can avoid storing the whole style string
(isStringTag === false || // we need to always store it if we're in compat mode and
// in node since emotion-server relies on whether a style is in
// the registered cache to know whether a style is global or not
// also, note that this check will be dead code eliminated in the browser
isBrowser === false && cache.compat !== undefined) && cache.registered[className] === undefined) {
cache.registered[className] = serialized.styles;
}
if (cache.inserted[serialized.name] === undefined) {
var stylesForSSR = '';
var current = serialized;
do {
var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
if (!isBrowser && maybeStyles !== undefined) {
stylesForSSR += maybeStyles;
}
current = current.next;
} while (current !== undefined);
if (!isBrowser && stylesForSSR.length !== 0) {
return stylesForSSR;
}
}
};
/***/ }),
/***/ "./node_modules/@emotion/styled/base/dist/emotion-styled-base.esm.js":
/*!***************************************************************************!*\
!*** ./node_modules/@emotion/styled/base/dist/emotion-styled-base.esm.js ***!
\***************************************************************************/
/***/ ((__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 _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @emotion/is-prop-valid */ "./node_modules/@emotion/styled/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-element-fc314d24.esm.js");
/* harmony import */ var _emotion_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/utils */ "./node_modules/@emotion/styled/node_modules/@emotion/utils/dist/emotion-utils.esm.js");
/* harmony import */ var _emotion_serialize__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @emotion/serialize */ "./node_modules/@emotion/styled/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js");
var testOmitPropsOnStringTag = _emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_2__["default"];
var testOmitPropsOnComponent = function testOmitPropsOnComponent(key) {
return key !== 'theme';
};
var getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag) {
return typeof tag === 'string' && // 96 is one less than the char code
// for "a" so this is checking that
// it's a lowercase character
tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;
};
var composeShouldForwardProps = function composeShouldForwardProps(tag, options, isReal) {
var shouldForwardProp;
if (options) {
var optionsShouldForwardProp = options.shouldForwardProp;
shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName) {
return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);
} : optionsShouldForwardProp;
}
if (typeof shouldForwardProp !== 'function' && isReal) {
shouldForwardProp = tag.__emotion_forwardProp;
}
return shouldForwardProp;
};
var ILLEGAL_ESCAPE_SEQUENCE_ERROR = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences";
var isBrowser = typeof document !== 'undefined';
var Noop = function Noop() {
return null;
};
var createStyled = function createStyled(tag, options) {
if (true) {
if (tag === undefined) {
throw new Error('You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.');
}
}
var isReal = tag.__emotion_real === tag;
var baseTag = isReal && tag.__emotion_base || tag;
var identifierName;
var targetClassName;
if (options !== undefined) {
identifierName = options.label;
targetClassName = options.target;
}
var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);
var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);
var shouldUseAs = !defaultShouldForwardProp('as');
return function () {
var args = arguments;
var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : [];
if (identifierName !== undefined) {
styles.push("label:" + identifierName + ";");
}
if (args[0] == null || args[0].raw === undefined) {
styles.push.apply(styles, args);
} else {
if ( true && args[0][0] === undefined) {
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);
}
styles.push(args[0][0]);
var len = args.length;
var i = 1;
for (; i < len; i++) {
if ( true && args[0][i] === undefined) {
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);
}
styles.push(args[i], args[0][i]);
}
} // $FlowFixMe: we need to cast StatelessFunctionalComponent to our PrivateStyledComponent class
var Styled = (0,_emotion_react__WEBPACK_IMPORTED_MODULE_5__.w)(function (props, cache, ref) {
var finalTag = shouldUseAs && props.as || baseTag;
var className = '';
var classInterpolations = [];
var mergedProps = props;
if (props.theme == null) {
mergedProps = {};
for (var key in props) {
mergedProps[key] = props[key];
}
mergedProps.theme = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(_emotion_react__WEBPACK_IMPORTED_MODULE_5__.T);
}
if (typeof props.className === 'string') {
className = (0,_emotion_utils__WEBPACK_IMPORTED_MODULE_3__.getRegisteredStyles)(cache.registered, classInterpolations, props.className);
} else if (props.className != null) {
className = props.className + " ";
}
var serialized = (0,_emotion_serialize__WEBPACK_IMPORTED_MODULE_4__.serializeStyles)(styles.concat(classInterpolations), cache.registered, mergedProps);
var rules = (0,_emotion_utils__WEBPACK_IMPORTED_MODULE_3__.insertStyles)(cache, serialized, typeof finalTag === 'string');
className += cache.key + "-" + serialized.name;
if (targetClassName !== undefined) {
className += " " + targetClassName;
}
var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(finalTag) : defaultShouldForwardProp;
var newProps = {};
for (var _key in props) {
if (shouldUseAs && _key === 'as') continue;
if ( // $FlowFixMe
finalShouldForwardProp(_key)) {
newProps[_key] = props[_key];
}
}
newProps.className = className;
newProps.ref = ref;
var ele = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(finalTag, newProps);
var possiblyStyleElement = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(Noop, null);
if (!isBrowser && rules !== undefined) {
var _ref;
var serializedNames = serialized.name;
var next = serialized.next;
while (next !== undefined) {
serializedNames += ' ' + next.name;
next = next.next;
}
possiblyStyleElement = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)("style", (_ref = {}, _ref["data-emotion"] = cache.key + " " + serializedNames, _ref.dangerouslySetInnerHTML = {
__html: rules
}, _ref.nonce = cache.sheet.nonce, _ref));
} // Need to return the same number of siblings or else `React.useId` will cause hydration mismatches.
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, possiblyStyleElement, ele);
});
Styled.displayName = identifierName !== undefined ? identifierName : "Styled(" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + ")";
Styled.defaultProps = tag.defaultProps;
Styled.__emotion_real = Styled;
Styled.__emotion_base = baseTag;
Styled.__emotion_styles = styles;
Styled.__emotion_forwardProp = shouldForwardProp;
Object.defineProperty(Styled, 'toString', {
value: function value() {
if (targetClassName === undefined && "development" !== 'production') {
return 'NO_COMPONENT_SELECTOR';
} // $FlowFixMe: coerce undefined to string
return "." + targetClassName;
}
});
Styled.withComponent = function (nextTag, nextOptions) {
return createStyled(nextTag, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, options, nextOptions, {
shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)
})).apply(void 0, styles);
};
return Styled;
};
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createStyled);
/***/ }),
/***/ "./node_modules/@emotion/styled/dist/emotion-styled.esm.js":
/*!*****************************************************************!*\
!*** ./node_modules/@emotion/styled/dist/emotion-styled.esm.js ***!
\*****************************************************************/
/***/ ((__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 _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js");
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @emotion/is-prop-valid */ "./node_modules/@emotion/styled/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js");
/* harmony import */ var _base_dist_emotion_styled_base_esm_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/dist/emotion-styled-base.esm.js */ "./node_modules/@emotion/styled/base/dist/emotion-styled-base.esm.js");
/* harmony import */ var _emotion_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @emotion/utils */ "./node_modules/@emotion/styled/node_modules/@emotion/utils/dist/emotion-utils.esm.js");
/* harmony import */ var _emotion_serialize__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @emotion/serialize */ "./node_modules/@emotion/styled/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js");
var tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG
'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
var newStyled = _base_dist_emotion_styled_base_esm_js__WEBPACK_IMPORTED_MODULE_3__["default"].bind();
tags.forEach(function (tagName) {
// $FlowFixMe: we can ignore this because its exposed type is defined by the CreateStyled type
newStyled[tagName] = newStyled(tagName);
});
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (newStyled);
/***/ }),
/***/ "./node_modules/@emotion/styled/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js":
/*!************************************************************************************************************!*\
!*** ./node_modules/@emotion/styled/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js ***!
\************************************************************************************************************/
/***/ ((__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 _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ "./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js");
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
var isPropValid = /* #__PURE__ */(0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prop) {
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
/* o */
&& prop.charCodeAt(1) === 110
/* n */
&& prop.charCodeAt(2) < 91;
}
/* Z+1 */
);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isPropValid);
/***/ }),
/***/ "./node_modules/@emotion/styled/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js":
/*!****************************************************************************************************!*\
!*** ./node_modules/@emotion/styled/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js ***!
\****************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "serializeStyles": () => (/* binding */ serializeStyles)
/* harmony export */ });
/* harmony import */ var _emotion_hash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/hash */ "./node_modules/@emotion/hash/dist/hash.esm.js");
/* harmony import */ var _emotion_unitless__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @emotion/unitless */ "./node_modules/@emotion/unitless/dist/unitless.esm.js");
/* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @emotion/memoize */ "./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js");
var ILLEGAL_ESCAPE_SEQUENCE_ERROR = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences";
var UNDEFINED_AS_OBJECT_KEY_ERROR = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).";
var hyphenateRegex = /[A-Z]|^ms/g;
var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
var isCustomProperty = function isCustomProperty(property) {
return property.charCodeAt(1) === 45;
};
var isProcessableValue = function isProcessableValue(value) {
return value != null && typeof value !== 'boolean';
};
var processStyleName = /* #__PURE__ */(0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_2__["default"])(function (styleName) {
return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();
});
var processStyleValue = function processStyleValue(key, value) {
switch (key) {
case 'animation':
case 'animationName':
{
if (typeof value === 'string') {
return value.replace(animationRegex, function (match, p1, p2) {
cursor = {
name: p1,
styles: p2,
next: cursor
};
return p1;
});
}
}
}
if (_emotion_unitless__WEBPACK_IMPORTED_MODULE_1__["default"][key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {
return value + 'px';
}
return value;
};
if (true) {
var contentValuePattern = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];
var oldProcessStyleValue = processStyleValue;
var msPattern = /^-ms-/;
var hyphenPattern = /-(.)/g;
var hyphenatedCache = {};
processStyleValue = function processStyleValue(key, value) {
if (key === 'content') {
if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) {
throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + value + "\"'`");
}
}
var processed = oldProcessStyleValue(key, value);
if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {
hyphenatedCache[key] = true;
console.error("Using kebab-case for css properties in objects is not supported. Did you mean " + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {
return _char.toUpperCase();
}) + "?");
}
return processed;
};
}
function handleInterpolation(mergedProps, registered, interpolation) {
if (interpolation == null) {
return '';
}
if (interpolation.__emotion_styles !== undefined) {
if ( true && interpolation.toString() === 'NO_COMPONENT_SELECTOR') {
throw new Error('Component selectors can only be used in conjunction with @emotion/babel-plugin.');
}
return interpolation;
}
switch (typeof interpolation) {
case 'boolean':
{
return '';
}
case 'object':
{
if (interpolation.anim === 1) {
cursor = {
name: interpolation.name,
styles: interpolation.styles,
next: cursor
};
return interpolation.name;
}
if (interpolation.styles !== undefined) {
var next = interpolation.next;
if (next !== undefined) {
// not the most efficient thing ever but this is a pretty rare case
// and there will be very few iterations of this generally
while (next !== undefined) {
cursor = {
name: next.name,
styles: next.styles,
next: cursor
};
next = next.next;
}
}
var styles = interpolation.styles + ";";
if ( true && interpolation.map !== undefined) {
styles += interpolation.map;
}
return styles;
}
return createStringFromObject(mergedProps, registered, interpolation);
}
case 'function':
{
if (mergedProps !== undefined) {
var previousCursor = cursor;
var result = interpolation(mergedProps);
cursor = previousCursor;
return handleInterpolation(mergedProps, registered, result);
} else if (true) {
console.error('Functions that are interpolated in css calls will be stringified.\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\n' + 'It can be called directly with props or interpolated in a styled call like this\n' + "let SomeComponent = styled('div')`${dynamicStyle}`");
}
break;
}
case 'string':
if (true) {
var matched = [];
var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {
var fakeVarName = "animation" + matched.length;
matched.push("const " + fakeVarName + " = keyframes`" + p2.replace(/^@keyframes animation-\w+/, '') + "`");
return "${" + fakeVarName + "}";
});
if (matched.length) {
console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\n' + 'Instead of doing this:\n\n' + [].concat(matched, ["`" + replaced + "`"]).join('\n') + '\n\nYou should wrap it with `css` like this:\n\n' + ("css`" + replaced + "`"));
}
}
break;
} // finalize string values (regular strings and functions interpolated into css calls)
if (registered == null) {
return interpolation;
}
var cached = registered[interpolation];
return cached !== undefined ? cached : interpolation;
}
function createStringFromObject(mergedProps, registered, obj) {
var string = '';
if (Array.isArray(obj)) {
for (var i = 0; i < obj.length; i++) {
string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
}
} else {
for (var _key in obj) {
var value = obj[_key];
if (typeof value !== 'object') {
if (registered != null && registered[value] !== undefined) {
string += _key + "{" + registered[value] + "}";
} else if (isProcessableValue(value)) {
string += processStyleName(_key) + ":" + processStyleValue(_key, value) + ";";
}
} else {
if (_key === 'NO_COMPONENT_SELECTOR' && "development" !== 'production') {
throw new Error('Component selectors can only be used in conjunction with @emotion/babel-plugin.');
}
if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {
for (var _i = 0; _i < value.length; _i++) {
if (isProcessableValue(value[_i])) {
string += processStyleName(_key) + ":" + processStyleValue(_key, value[_i]) + ";";
}
}
} else {
var interpolated = handleInterpolation(mergedProps, registered, value);
switch (_key) {
case 'animation':
case 'animationName':
{
string += processStyleName(_key) + ":" + interpolated + ";";
break;
}
default:
{
if ( true && _key === 'undefined') {
console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);
}
string += _key + "{" + interpolated + "}";
}
}
}
}
}
}
return string;
}
var labelPattern = /label:\s*([^\s;\n{]+)\s*(;|$)/g;
var sourceMapPattern;
if (true) {
sourceMapPattern = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;
} // this is the cursor for keyframes
// keyframes are stored on the SerializedStyles object as a linked list
var cursor;
var serializeStyles = function serializeStyles(args, registered, mergedProps) {
if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {
return args[0];
}
var stringMode = true;
var styles = '';
cursor = undefined;
var strings = args[0];
if (strings == null || strings.raw === undefined) {
stringMode = false;
styles += handleInterpolation(mergedProps, registered, strings);
} else {
if ( true && strings[0] === undefined) {
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);
}
styles += strings[0];
} // we start at 1 since we've already handled the first arg
for (var i = 1; i < args.length; i++) {
styles += handleInterpolation(mergedProps, registered, args[i]);
if (stringMode) {
if ( true && strings[i] === undefined) {
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);
}
styles += strings[i];
}
}
var sourceMap;
if (true) {
styles = styles.replace(sourceMapPattern, function (match) {
sourceMap = match;
return '';
});
} // using a global regex with .exec is stateful so lastIndex has to be reset each time
labelPattern.lastIndex = 0;
var identifierName = '';
var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5
while ((match = labelPattern.exec(styles)) !== null) {
identifierName += '-' + // $FlowFixMe we know it's not null
match[1];
}
var name = (0,_emotion_hash__WEBPACK_IMPORTED_MODULE_0__["default"])(styles) + identifierName;
if (true) {
// $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)
return {
name: name,
styles: styles,
map: sourceMap,
next: cursor,
toString: function toString() {
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
}
};
}
return {
name: name,
styles: styles,
next: cursor
};
};
/***/ }),
/***/ "./node_modules/@emotion/styled/node_modules/@emotion/utils/dist/emotion-utils.esm.js":
/*!********************************************************************************************!*\
!*** ./node_modules/@emotion/styled/node_modules/@emotion/utils/dist/emotion-utils.esm.js ***!
\********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "getRegisteredStyles": () => (/* binding */ getRegisteredStyles),
/* harmony export */ "insertStyles": () => (/* binding */ insertStyles)
/* harmony export */ });
var isBrowser = typeof document !== 'undefined';
function getRegisteredStyles(registered, registeredStyles, classNames) {
var rawClassName = '';
classNames.split(' ').forEach(function (className) {
if (registered[className] !== undefined) {
registeredStyles.push(registered[className] + ";");
} else {
rawClassName += className + " ";
}
});
return rawClassName;
}
var insertStyles = function insertStyles(cache, serialized, isStringTag) {
var className = cache.key + "-" + serialized.name;
if ( // we only need to add the styles to the registered cache if the
// class name could be used further down
// the tree but if it's a string tag, we know it won't
// so we don't have to add it to registered cache.
// this improves memory usage since we can avoid storing the whole style string
(isStringTag === false || // we need to always store it if we're in compat mode and
// in node since emotion-server relies on whether a style is in
// the registered cache to know whether a style is global or not
// also, note that this check will be dead code eliminated in the browser
isBrowser === false && cache.compat !== undefined) && cache.registered[className] === undefined) {
cache.registered[className] = serialized.styles;
}
if (cache.inserted[serialized.name] === undefined) {
var stylesForSSR = '';
var current = serialized;
do {
var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
if (!isBrowser && maybeStyles !== undefined) {
stylesForSSR += maybeStyles;
}
current = current.next;
} while (current !== undefined);
if (!isBrowser && stylesForSSR.length !== 0) {
return stylesForSSR;
}
}
};
/***/ }),
/***/ "./node_modules/@emotion/unitless/dist/unitless.esm.js":
/*!*************************************************************!*\
!*** ./node_modules/@emotion/unitless/dist/unitless.esm.js ***!
\*************************************************************/
/***/ ((__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 */ });
var unitlessKeys = {
animationIterationCount: 1,
borderImageOutset: 1,
borderImageSlice: 1,
borderImageWidth: 1,
boxFlex: 1,
boxFlexGroup: 1,
boxOrdinalGroup: 1,
columnCount: 1,
columns: 1,
flex: 1,
flexGrow: 1,
flexPositive: 1,
flexShrink: 1,
flexNegative: 1,
flexOrder: 1,
gridRow: 1,
gridRowEnd: 1,
gridRowSpan: 1,
gridRowStart: 1,
gridColumn: 1,
gridColumnEnd: 1,
gridColumnSpan: 1,
gridColumnStart: 1,
msGridRow: 1,
msGridRowSpan: 1,
msGridColumn: 1,
msGridColumnSpan: 1,
fontWeight: 1,
lineHeight: 1,
opacity: 1,
order: 1,
orphans: 1,
tabSize: 1,
widows: 1,
zIndex: 1,
zoom: 1,
WebkitLineClamp: 1,
// SVG-related properties
fillOpacity: 1,
floodOpacity: 1,
stopOpacity: 1,
strokeDasharray: 1,
strokeDashoffset: 1,
strokeMiterlimit: 1,
strokeOpacity: 1,
strokeWidth: 1
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (unitlessKeys);
/***/ }),
/***/ "./node_modules/@emotion/weak-memoize/dist/weak-memoize.esm.js":
/*!*********************************************************************!*\
!*** ./node_modules/@emotion/weak-memoize/dist/weak-memoize.esm.js ***!
\*********************************************************************/
/***/ ((__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 */ });
var weakMemoize = function weakMemoize(func) {
// $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps
var cache = new WeakMap();
return function (arg) {
if (cache.has(arg)) {
// $FlowFixMe
return cache.get(arg);
}
var ret = func(arg);
cache.set(arg, ret);
return ret;
};
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (weakMemoize);
/***/ }),
/***/ "./node_modules/@gatsbyjs/reach-router/es/lib/history.js":
/*!***************************************************************!*\
!*** ./node_modules/@gatsbyjs/reach-router/es/lib/history.js ***!
\***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "globalHistory": () => (/* binding */ globalHistory),
/* harmony export */ "navigate": () => (/* binding */ navigate),
/* harmony export */ "createHistory": () => (/* binding */ createHistory),
/* harmony export */ "createMemorySource": () => (/* binding */ createMemorySource)
/* harmony export */ });
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var getLocation = function getLocation(source) {
var _source$location = source.location,
search = _source$location.search,
hash = _source$location.hash,
href = _source$location.href,
origin = _source$location.origin,
protocol = _source$location.protocol,
host = _source$location.host,
hostname = _source$location.hostname,
port = _source$location.port;
var pathname = source.location.pathname;
if (!pathname && href && canUseDOM) {
var url = new URL(href);
pathname = url.pathname;
}
return {
pathname: encodeURI(decodeURI(pathname)),
search: search,
hash: hash,
href: href,
origin: origin,
protocol: protocol,
host: host,
hostname: hostname,
port: port,
state: source.history.state,
key: source.history.state && source.history.state.key || "initial"
};
};
var createHistory = function createHistory(source, options) {
var listeners = [];
var location = getLocation(source);
var transitioning = false;
var resolveTransition = function resolveTransition() {};
return {
get location() {
return location;
},
get transitioning() {
return transitioning;
},
_onTransitionComplete: function _onTransitionComplete() {
transitioning = false;
resolveTransition();
},
listen: function listen(listener) {
listeners.push(listener);
var popstateListener = function popstateListener() {
location = getLocation(source);
listener({ location: location, action: "POP" });
};
source.addEventListener("popstate", popstateListener);
return function () {
source.removeEventListener("popstate", popstateListener);
listeners = listeners.filter(function (fn) {
return fn !== listener;
});
};
},
navigate: function navigate(to) {
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
state = _ref.state,
_ref$replace = _ref.replace,
replace = _ref$replace === undefined ? false : _ref$replace;
if (typeof to === "number") {
source.history.go(to);
} else {
state = _extends({}, state, { key: Date.now() + "" });
// try...catch iOS Safari limits to 100 pushState calls
try {
if (transitioning || replace) {
source.history.replaceState(state, null, to);
} else {
source.history.pushState(state, null, to);
}
} catch (e) {
source.location[replace ? "replace" : "assign"](to);
}
}
location = getLocation(source);
transitioning = true;
var transition = new Promise(function (res) {
return resolveTransition = res;
});
listeners.forEach(function (listener) {
return listener({ location: location, action: "PUSH" });
});
return transition;
}
};
};
////////////////////////////////////////////////////////////////////////////////
// Stores history entries in memory for testing or other platforms like Native
var createMemorySource = function createMemorySource() {
var initialPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "/";
var searchIndex = initialPath.indexOf("?");
var initialLocation = {
pathname: searchIndex > -1 ? initialPath.substr(0, searchIndex) : initialPath,
search: searchIndex > -1 ? initialPath.substr(searchIndex) : ""
};
var index = 0;
var stack = [initialLocation];
var states = [null];
return {
get location() {
return stack[index];
},
addEventListener: function addEventListener(name, fn) {},
removeEventListener: function removeEventListener(name, fn) {},
history: {
get entries() {
return stack;
},
get index() {
return index;
},
get state() {
return states[index];
},
pushState: function pushState(state, _, uri) {
var _uri$split = uri.split("?"),
pathname = _uri$split[0],
_uri$split$ = _uri$split[1],
search = _uri$split$ === undefined ? "" : _uri$split$;
index++;
stack.push({ pathname: pathname, search: search.length ? "?" + search : search });
states.push(state);
},
replaceState: function replaceState(state, _, uri) {
var _uri$split2 = uri.split("?"),
pathname = _uri$split2[0],
_uri$split2$ = _uri$split2[1],
search = _uri$split2$ === undefined ? "" : _uri$split2$;
stack[index] = { pathname: pathname, search: search };
states[index] = state;
},
go: function go(to) {
var newIndex = index + to;
if (newIndex < 0 || newIndex > states.length - 1) {
return;
}
index = newIndex;
}
}
};
};
////////////////////////////////////////////////////////////////////////////////
// global history - uses window.history as the source if available, otherwise a
// memory history
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
var getSource = function getSource() {
return canUseDOM ? window : createMemorySource();
};
var globalHistory = createHistory(getSource());
var navigate = globalHistory.navigate;
////////////////////////////////////////////////////////////////////////////////
/***/ }),
/***/ "./node_modules/@gatsbyjs/reach-router/es/lib/utils.js":
/*!*************************************************************!*\
!*** ./node_modules/@gatsbyjs/reach-router/es/lib/utils.js ***!
\*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "startsWith": () => (/* binding */ startsWith),
/* harmony export */ "pick": () => (/* binding */ pick),
/* harmony export */ "match": () => (/* binding */ match),
/* harmony export */ "resolve": () => (/* binding */ resolve),
/* harmony export */ "insertParams": () => (/* binding */ insertParams),
/* harmony export */ "validateRedirect": () => (/* binding */ validateRedirect),
/* harmony export */ "shallowCompare": () => (/* binding */ shallowCompare)
/* harmony export */ });
/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/invariant.js");
/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_0__);
////////////////////////////////////////////////////////////////////////////////
// startsWith(string, search) - Check if `string` starts with `search`
var startsWith = function startsWith(string, search) {
return string.substr(0, search.length) === search;
};
////////////////////////////////////////////////////////////////////////////////
// pick(routes, uri)
//
// Ranks and picks the best route to match. Each segment gets the highest
// amount of points, then the type of segment gets an additional amount of
// points where
//
// static > dynamic > splat > root
//
// This way we don't have to worry about the order of our routes, let the
// computers do it.
//
// A route looks like this
//
// { path, default, value }
//
// And a returned match looks like:
//
// { route, params, uri }
//
// I know, I should use TypeScript not comments for these types.
var pick = function pick(routes, uri) {
var match = void 0;
var default_ = void 0;
var _uri$split = uri.split("?"),
uriPathname = _uri$split[0];
var uriSegments = segmentize(uriPathname);
var isRootUri = uriSegments[0] === "";
var ranked = rankRoutes(routes);
for (var i = 0, l = ranked.length; i < l; i++) {
var missed = false;
var route = ranked[i].route;
if (route.default) {
default_ = {
route: route,
params: {},
uri: uri
};
continue;
}
var routeSegments = segmentize(route.path);
var params = {};
var max = Math.max(uriSegments.length, routeSegments.length);
var index = 0;
for (; index < max; index++) {
var routeSegment = routeSegments[index];
var uriSegment = uriSegments[index];
if (isSplat(routeSegment)) {
// Hit a splat, just grab the rest, and return a match
// uri: /files/documents/work
// route: /files/*
var param = routeSegment.slice(1) || "*";
params[param] = uriSegments.slice(index).map(decodeURIComponent).join("/");
break;
}
if (uriSegment === undefined) {
// URI is shorter than the route, no match
// uri: /users
// route: /users/:userId
missed = true;
break;
}
var dynamicMatch = paramRe.exec(routeSegment);
if (dynamicMatch && !isRootUri) {
var matchIsNotReserved = reservedNames.indexOf(dynamicMatch[1]) === -1;
!matchIsNotReserved ? true ? invariant__WEBPACK_IMPORTED_MODULE_0___default()(false, " dynamic segment \"" + dynamicMatch[1] + "\" is a reserved name. Please use a different name in path \"" + route.path + "\".") : 0 : void 0;
var value = decodeURIComponent(uriSegment);
params[dynamicMatch[1]] = value;
} else if (routeSegment !== uriSegment) {
// Current segments don't match, not dynamic, not splat, so no match
// uri: /users/123/settings
// route: /users/:id/profile
missed = true;
break;
}
}
if (!missed) {
match = {
route: route,
params: params,
uri: "/" + uriSegments.slice(0, index).join("/")
};
break;
}
}
return match || default_ || null;
};
////////////////////////////////////////////////////////////////////////////////
// match(path, uri) - Matches just one path to a uri, also lol
var match = function match(path, uri) {
return pick([{ path: path }], uri);
};
////////////////////////////////////////////////////////////////////////////////
// resolve(to, basepath)
//
// Resolves URIs as though every path is a directory, no files. Relative URIs
// in the browser can feel awkward because not only can you be "in a directory"
// you can be "at a file", too. For example
//
// browserSpecResolve('foo', '/bar/') => /bar/foo
// browserSpecResolve('foo', '/bar') => /foo
//
// But on the command line of a file system, it's not as complicated, you can't
// `cd` from a file, only directories. This way, links have to know less about
// their current path. To go deeper you can do this:
//
//
// // instead of
//
//
// Just like `cd`, if you want to go deeper from the command line, you do this:
//
// cd deeper
// # not
// cd $(pwd)/deeper
//
// By treating every path as a directory, linking to relative paths should
// require less contextual information and (fingers crossed) be more intuitive.
var resolve = function resolve(to, base) {
// /foo/bar, /baz/qux => /foo/bar
if (startsWith(to, "/")) {
return to;
}
var _to$split = to.split("?"),
toPathname = _to$split[0],
toQuery = _to$split[1];
var _base$split = base.split("?"),
basePathname = _base$split[0];
var toSegments = segmentize(toPathname);
var baseSegments = segmentize(basePathname);
// ?a=b, /users?b=c => /users?a=b
if (toSegments[0] === "") {
return addQuery(basePathname, toQuery);
}
// profile, /users/789 => /users/789/profile
if (!startsWith(toSegments[0], ".")) {
var pathname = baseSegments.concat(toSegments).join("/");
return addQuery((basePathname === "/" ? "" : "/") + pathname, toQuery);
}
// ./ /users/123 => /users/123
// ../ /users/123 => /users
// ../.. /users/123 => /
// ../../one /a/b/c/d => /a/b/one
// .././one /a/b/c/d => /a/b/c/one
var allSegments = baseSegments.concat(toSegments);
var segments = [];
for (var i = 0, l = allSegments.length; i < l; i++) {
var segment = allSegments[i];
if (segment === "..") segments.pop();else if (segment !== ".") segments.push(segment);
}
return addQuery("/" + segments.join("/"), toQuery);
};
////////////////////////////////////////////////////////////////////////////////
// insertParams(path, params)
var insertParams = function insertParams(path, params) {
var _path$split = path.split("?"),
pathBase = _path$split[0],
_path$split$ = _path$split[1],
query = _path$split$ === undefined ? "" : _path$split$;
var segments = segmentize(pathBase);
var constructedPath = "/" + segments.map(function (segment) {
var match = paramRe.exec(segment);
return match ? params[match[1]] : segment;
}).join("/");
var _params$location = params.location;
_params$location = _params$location === undefined ? {} : _params$location;
var _params$location$sear = _params$location.search,
search = _params$location$sear === undefined ? "" : _params$location$sear;
var searchSplit = search.split("?")[1] || "";
constructedPath = addQuery(constructedPath, query, searchSplit);
return constructedPath;
};
var validateRedirect = function validateRedirect(from, to) {
var filter = function filter(segment) {
return isDynamic(segment);
};
var fromString = segmentize(from).filter(filter).sort().join("/");
var toString = segmentize(to).filter(filter).sort().join("/");
return fromString === toString;
};
////////////////////////////////////////////////////////////////////////////////
// Junk
var paramRe = /^:(.+)/;
var SEGMENT_POINTS = 4;
var STATIC_POINTS = 3;
var DYNAMIC_POINTS = 2;
var SPLAT_PENALTY = 1;
var ROOT_POINTS = 1;
var isRootSegment = function isRootSegment(segment) {
return segment === "";
};
var isDynamic = function isDynamic(segment) {
return paramRe.test(segment);
};
var isSplat = function isSplat(segment) {
return segment && segment[0] === "*";
};
var rankRoute = function rankRoute(route, index) {
var score = route.default ? 0 : segmentize(route.path).reduce(function (score, segment) {
score += SEGMENT_POINTS;
if (isRootSegment(segment)) score += ROOT_POINTS;else if (isDynamic(segment)) score += DYNAMIC_POINTS;else if (isSplat(segment)) score -= SEGMENT_POINTS + SPLAT_PENALTY;else score += STATIC_POINTS;
return score;
}, 0);
return { route: route, score: score, index: index };
};
var rankRoutes = function rankRoutes(routes) {
return routes.map(rankRoute).sort(function (a, b) {
return a.score < b.score ? 1 : a.score > b.score ? -1 : a.index - b.index;
});
};
var segmentize = function segmentize(uri) {
return uri
// strip starting/ending slashes
.replace(/(^\/+|\/+$)/g, "").split("/");
};
var addQuery = function addQuery(pathname) {
for (var _len = arguments.length, query = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
query[_key - 1] = arguments[_key];
}
query = query.filter(function (q) {
return q && q.length > 0;
});
return pathname + (query && query.length > 0 ? "?" + query.join("&") : "");
};
var reservedNames = ["uri", "path"];
/**
* Shallow compares two objects.
* @param {Object} obj1 The first object to compare.
* @param {Object} obj2 The second object to compare.
*/
var shallowCompare = function shallowCompare(obj1, obj2) {
var obj1Keys = Object.keys(obj1);
return obj1Keys.length === Object.keys(obj2).length && obj1Keys.every(function (key) {
return obj2.hasOwnProperty(key) && obj1[key] === obj2[key];
});
};
////////////////////////////////////////////////////////////////////////////////
/***/ }),
/***/ "./node_modules/@gatsbyjs/reach-router/lib/utils.js":
/*!**********************************************************!*\
!*** ./node_modules/@gatsbyjs/reach-router/lib/utils.js ***!
\**********************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
exports.__esModule = true;
exports.shallowCompare = exports.validateRedirect = exports.insertParams = exports.resolve = exports.match = exports.pick = exports.startsWith = undefined;
var _invariant = __webpack_require__(/*! invariant */ "./node_modules/invariant/invariant.js");
var _invariant2 = _interopRequireDefault(_invariant);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
////////////////////////////////////////////////////////////////////////////////
// startsWith(string, search) - Check if `string` starts with `search`
var startsWith = function startsWith(string, search) {
return string.substr(0, search.length) === search;
};
////////////////////////////////////////////////////////////////////////////////
// pick(routes, uri)
//
// Ranks and picks the best route to match. Each segment gets the highest
// amount of points, then the type of segment gets an additional amount of
// points where
//
// static > dynamic > splat > root
//
// This way we don't have to worry about the order of our routes, let the
// computers do it.
//
// A route looks like this
//
// { path, default, value }
//
// And a returned match looks like:
//
// { route, params, uri }
//
// I know, I should use TypeScript not comments for these types.
var pick = function pick(routes, uri) {
var match = void 0;
var default_ = void 0;
var _uri$split = uri.split("?"),
uriPathname = _uri$split[0];
var uriSegments = segmentize(uriPathname);
var isRootUri = uriSegments[0] === "";
var ranked = rankRoutes(routes);
for (var i = 0, l = ranked.length; i < l; i++) {
var missed = false;
var route = ranked[i].route;
if (route.default) {
default_ = {
route: route,
params: {},
uri: uri
};
continue;
}
var routeSegments = segmentize(route.path);
var params = {};
var max = Math.max(uriSegments.length, routeSegments.length);
var index = 0;
for (; index < max; index++) {
var routeSegment = routeSegments[index];
var uriSegment = uriSegments[index];
if (isSplat(routeSegment)) {
// Hit a splat, just grab the rest, and return a match
// uri: /files/documents/work
// route: /files/*
var param = routeSegment.slice(1) || "*";
params[param] = uriSegments.slice(index).map(decodeURIComponent).join("/");
break;
}
if (uriSegment === undefined) {
// URI is shorter than the route, no match
// uri: /users
// route: /users/:userId
missed = true;
break;
}
var dynamicMatch = paramRe.exec(routeSegment);
if (dynamicMatch && !isRootUri) {
var matchIsNotReserved = reservedNames.indexOf(dynamicMatch[1]) === -1;
!matchIsNotReserved ? true ? (0, _invariant2.default)(false, " dynamic segment \"" + dynamicMatch[1] + "\" is a reserved name. Please use a different name in path \"" + route.path + "\".") : 0 : void 0;
var value = decodeURIComponent(uriSegment);
params[dynamicMatch[1]] = value;
} else if (routeSegment !== uriSegment) {
// Current segments don't match, not dynamic, not splat, so no match
// uri: /users/123/settings
// route: /users/:id/profile
missed = true;
break;
}
}
if (!missed) {
match = {
route: route,
params: params,
uri: "/" + uriSegments.slice(0, index).join("/")
};
break;
}
}
return match || default_ || null;
};
////////////////////////////////////////////////////////////////////////////////
// match(path, uri) - Matches just one path to a uri, also lol
var match = function match(path, uri) {
return pick([{ path: path }], uri);
};
////////////////////////////////////////////////////////////////////////////////
// resolve(to, basepath)
//
// Resolves URIs as though every path is a directory, no files. Relative URIs
// in the browser can feel awkward because not only can you be "in a directory"
// you can be "at a file", too. For example
//
// browserSpecResolve('foo', '/bar/') => /bar/foo
// browserSpecResolve('foo', '/bar') => /foo
//
// But on the command line of a file system, it's not as complicated, you can't
// `cd` from a file, only directories. This way, links have to know less about
// their current path. To go deeper you can do this:
//
//
// // instead of
//
//
// Just like `cd`, if you want to go deeper from the command line, you do this:
//
// cd deeper
// # not
// cd $(pwd)/deeper
//
// By treating every path as a directory, linking to relative paths should
// require less contextual information and (fingers crossed) be more intuitive.
var resolve = function resolve(to, base) {
// /foo/bar, /baz/qux => /foo/bar
if (startsWith(to, "/")) {
return to;
}
var _to$split = to.split("?"),
toPathname = _to$split[0],
toQuery = _to$split[1];
var _base$split = base.split("?"),
basePathname = _base$split[0];
var toSegments = segmentize(toPathname);
var baseSegments = segmentize(basePathname);
// ?a=b, /users?b=c => /users?a=b
if (toSegments[0] === "") {
return addQuery(basePathname, toQuery);
}
// profile, /users/789 => /users/789/profile
if (!startsWith(toSegments[0], ".")) {
var pathname = baseSegments.concat(toSegments).join("/");
return addQuery((basePathname === "/" ? "" : "/") + pathname, toQuery);
}
// ./ /users/123 => /users/123
// ../ /users/123 => /users
// ../.. /users/123 => /
// ../../one /a/b/c/d => /a/b/one
// .././one /a/b/c/d => /a/b/c/one
var allSegments = baseSegments.concat(toSegments);
var segments = [];
for (var i = 0, l = allSegments.length; i < l; i++) {
var segment = allSegments[i];
if (segment === "..") segments.pop();else if (segment !== ".") segments.push(segment);
}
return addQuery("/" + segments.join("/"), toQuery);
};
////////////////////////////////////////////////////////////////////////////////
// insertParams(path, params)
var insertParams = function insertParams(path, params) {
var _path$split = path.split("?"),
pathBase = _path$split[0],
_path$split$ = _path$split[1],
query = _path$split$ === undefined ? "" : _path$split$;
var segments = segmentize(pathBase);
var constructedPath = "/" + segments.map(function (segment) {
var match = paramRe.exec(segment);
return match ? params[match[1]] : segment;
}).join("/");
var _params$location = params.location;
_params$location = _params$location === undefined ? {} : _params$location;
var _params$location$sear = _params$location.search,
search = _params$location$sear === undefined ? "" : _params$location$sear;
var searchSplit = search.split("?")[1] || "";
constructedPath = addQuery(constructedPath, query, searchSplit);
return constructedPath;
};
var validateRedirect = function validateRedirect(from, to) {
var filter = function filter(segment) {
return isDynamic(segment);
};
var fromString = segmentize(from).filter(filter).sort().join("/");
var toString = segmentize(to).filter(filter).sort().join("/");
return fromString === toString;
};
////////////////////////////////////////////////////////////////////////////////
// Junk
var paramRe = /^:(.+)/;
var SEGMENT_POINTS = 4;
var STATIC_POINTS = 3;
var DYNAMIC_POINTS = 2;
var SPLAT_PENALTY = 1;
var ROOT_POINTS = 1;
var isRootSegment = function isRootSegment(segment) {
return segment === "";
};
var isDynamic = function isDynamic(segment) {
return paramRe.test(segment);
};
var isSplat = function isSplat(segment) {
return segment && segment[0] === "*";
};
var rankRoute = function rankRoute(route, index) {
var score = route.default ? 0 : segmentize(route.path).reduce(function (score, segment) {
score += SEGMENT_POINTS;
if (isRootSegment(segment)) score += ROOT_POINTS;else if (isDynamic(segment)) score += DYNAMIC_POINTS;else if (isSplat(segment)) score -= SEGMENT_POINTS + SPLAT_PENALTY;else score += STATIC_POINTS;
return score;
}, 0);
return { route: route, score: score, index: index };
};
var rankRoutes = function rankRoutes(routes) {
return routes.map(rankRoute).sort(function (a, b) {
return a.score < b.score ? 1 : a.score > b.score ? -1 : a.index - b.index;
});
};
var segmentize = function segmentize(uri) {
return uri
// strip starting/ending slashes
.replace(/(^\/+|\/+$)/g, "").split("/");
};
var addQuery = function addQuery(pathname) {
for (var _len = arguments.length, query = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
query[_key - 1] = arguments[_key];
}
query = query.filter(function (q) {
return q && q.length > 0;
});
return pathname + (query && query.length > 0 ? "?" + query.join("&") : "");
};
var reservedNames = ["uri", "path"];
/**
* Shallow compares two objects.
* @param {Object} obj1 The first object to compare.
* @param {Object} obj2 The second object to compare.
*/
var shallowCompare = function shallowCompare(obj1, obj2) {
var obj1Keys = Object.keys(obj1);
return obj1Keys.length === Object.keys(obj2).length && obj1Keys.every(function (key) {
return obj2.hasOwnProperty(key) && obj1[key] === obj2[key];
});
};
////////////////////////////////////////////////////////////////////////////////
exports.startsWith = startsWith;
exports.pick = pick;
exports.match = match;
exports.resolve = resolve;
exports.insertParams = insertParams;
exports.validateRedirect = validateRedirect;
exports.shallowCompare = shallowCompare;
/***/ }),
/***/ "./node_modules/@mdx-js/react/dist/esm.js":
/*!************************************************!*\
!*** ./node_modules/@mdx-js/react/dist/esm.js ***!
\************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "MDXContext": () => (/* binding */ MDXContext),
/* harmony export */ "MDXProvider": () => (/* binding */ MDXProvider),
/* harmony export */ "mdx": () => (/* binding */ createElement),
/* harmony export */ "useMDXComponents": () => (/* binding */ useMDXComponents),
/* harmony export */ "withMDXComponents": () => (/* binding */ withMDXComponents)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function _extends() {
_extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
}
return target;
}
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
}
function _objectWithoutProperties(source, excluded) {
if (source == null) return {};
var target = _objectWithoutPropertiesLoose(source, excluded);
var key, i;
if (Object.getOwnPropertySymbols) {
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
for (i = 0; i < sourceSymbolKeys.length; i++) {
key = sourceSymbolKeys[i];
if (excluded.indexOf(key) >= 0) continue;
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
target[key] = source[key];
}
}
return target;
}
var isFunction = function isFunction(obj) {
return typeof obj === 'function';
};
var MDXContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext({});
var withMDXComponents = function withMDXComponents(Component) {
return function (props) {
var allComponents = useMDXComponents(props.components);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Component, _extends({}, props, {
components: allComponents
}));
};
};
var useMDXComponents = function useMDXComponents(components) {
var contextComponents = react__WEBPACK_IMPORTED_MODULE_0___default().useContext(MDXContext);
var allComponents = contextComponents;
if (components) {
allComponents = isFunction(components) ? components(contextComponents) : _objectSpread2(_objectSpread2({}, contextComponents), components);
}
return allComponents;
};
var MDXProvider = function MDXProvider(props) {
var allComponents = useMDXComponents(props.components);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MDXContext.Provider, {
value: allComponents
}, props.children);
};
var TYPE_PROP_NAME = 'mdxType';
var DEFAULTS = {
inlineCode: 'code',
wrapper: function wrapper(_ref) {
var children = _ref.children;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), {}, children);
}
};
var MDXCreateElement = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (props, ref) {
var propComponents = props.components,
mdxType = props.mdxType,
originalType = props.originalType,
parentName = props.parentName,
etc = _objectWithoutProperties(props, ["components", "mdxType", "originalType", "parentName"]);
var components = useMDXComponents(propComponents);
var type = mdxType;
var Component = components["".concat(parentName, ".").concat(type)] || components[type] || DEFAULTS[type] || originalType;
if (propComponents) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Component, _objectSpread2(_objectSpread2({
ref: ref
}, etc), {}, {
components: propComponents
}));
}
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Component, _objectSpread2({
ref: ref
}, etc));
});
MDXCreateElement.displayName = 'MDXCreateElement';
function createElement (type, props) {
var args = arguments;
var mdxType = props && props.mdxType;
if (typeof type === 'string' || mdxType) {
var argsLength = args.length;
var createElementArgArray = new Array(argsLength);
createElementArgArray[0] = MDXCreateElement;
var newProps = {};
for (var key in props) {
if (hasOwnProperty.call(props, key)) {
newProps[key] = props[key];
}
}
newProps.originalType = type;
newProps[TYPE_PROP_NAME] = typeof type === 'string' ? type : mdxType;
createElementArgArray[1] = newProps;
for (var i = 2; i < argsLength; i++) {
createElementArgArray[i] = args[i];
}
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement.apply(null, createElementArgArray);
}
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement.apply(null, args);
}
/***/ }),
/***/ "./node_modules/@styled-system/background/dist/index.esm.js":
/*!******************************************************************!*\
!*** ./node_modules/@styled-system/background/dist/index.esm.js ***!
\******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "background": () => (/* binding */ background),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _styled_system_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styled-system/core */ "./node_modules/@styled-system/core/dist/index.esm.js");
var config = {
background: true,
backgroundImage: true,
backgroundSize: true,
backgroundPosition: true,
backgroundRepeat: true
};
config.bgImage = config.backgroundImage;
config.bgSize = config.backgroundSize;
config.bgPosition = config.backgroundPosition;
config.bgRepeat = config.backgroundRepeat;
var background = (0,_styled_system_core__WEBPACK_IMPORTED_MODULE_0__.system)(config);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (background);
/***/ }),
/***/ "./node_modules/@styled-system/border/dist/index.esm.js":
/*!**************************************************************!*\
!*** ./node_modules/@styled-system/border/dist/index.esm.js ***!
\**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "border": () => (/* binding */ border),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _styled_system_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styled-system/core */ "./node_modules/@styled-system/core/dist/index.esm.js");
var config = {
border: {
property: 'border',
scale: 'borders'
},
borderWidth: {
property: 'borderWidth',
scale: 'borderWidths'
},
borderStyle: {
property: 'borderStyle',
scale: 'borderStyles'
},
borderColor: {
property: 'borderColor',
scale: 'colors'
},
borderRadius: {
property: 'borderRadius',
scale: 'radii'
},
borderTop: {
property: 'borderTop',
scale: 'borders'
},
borderTopLeftRadius: {
property: 'borderTopLeftRadius',
scale: 'radii'
},
borderTopRightRadius: {
property: 'borderTopRightRadius',
scale: 'radii'
},
borderRight: {
property: 'borderRight',
scale: 'borders'
},
borderBottom: {
property: 'borderBottom',
scale: 'borders'
},
borderBottomLeftRadius: {
property: 'borderBottomLeftRadius',
scale: 'radii'
},
borderBottomRightRadius: {
property: 'borderBottomRightRadius',
scale: 'radii'
},
borderLeft: {
property: 'borderLeft',
scale: 'borders'
},
borderX: {
properties: ['borderLeft', 'borderRight'],
scale: 'borders'
},
borderY: {
properties: ['borderTop', 'borderBottom'],
scale: 'borders'
}
};
config.borderTopWidth = {
property: 'borderTopWidth',
scale: 'borderWidths'
};
config.borderTopColor = {
property: 'borderTopColor',
scale: 'colors'
};
config.borderTopStyle = {
property: 'borderTopStyle',
scale: 'borderStyles'
};
config.borderTopLeftRadius = {
property: 'borderTopLeftRadius',
scale: 'radii'
};
config.borderTopRightRadius = {
property: 'borderTopRightRadius',
scale: 'radii'
};
config.borderBottomWidth = {
property: 'borderBottomWidth',
scale: 'borderWidths'
};
config.borderBottomColor = {
property: 'borderBottomColor',
scale: 'colors'
};
config.borderBottomStyle = {
property: 'borderBottomStyle',
scale: 'borderStyles'
};
config.borderBottomLeftRadius = {
property: 'borderBottomLeftRadius',
scale: 'radii'
};
config.borderBottomRightRadius = {
property: 'borderBottomRightRadius',
scale: 'radii'
};
config.borderLeftWidth = {
property: 'borderLeftWidth',
scale: 'borderWidths'
};
config.borderLeftColor = {
property: 'borderLeftColor',
scale: 'colors'
};
config.borderLeftStyle = {
property: 'borderLeftStyle',
scale: 'borderStyles'
};
config.borderRightWidth = {
property: 'borderRightWidth',
scale: 'borderWidths'
};
config.borderRightColor = {
property: 'borderRightColor',
scale: 'colors'
};
config.borderRightStyle = {
property: 'borderRightStyle',
scale: 'borderStyles'
};
var border = (0,_styled_system_core__WEBPACK_IMPORTED_MODULE_0__.system)(config);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (border);
/***/ }),
/***/ "./node_modules/@styled-system/color/dist/index.esm.js":
/*!*************************************************************!*\
!*** ./node_modules/@styled-system/color/dist/index.esm.js ***!
\*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "color": () => (/* binding */ color),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _styled_system_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styled-system/core */ "./node_modules/@styled-system/core/dist/index.esm.js");
var config = {
color: {
property: 'color',
scale: 'colors'
},
backgroundColor: {
property: 'backgroundColor',
scale: 'colors'
},
opacity: true
};
config.bg = config.backgroundColor;
var color = (0,_styled_system_core__WEBPACK_IMPORTED_MODULE_0__.system)(config);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (color);
/***/ }),
/***/ "./node_modules/@styled-system/core/dist/index.esm.js":
/*!************************************************************!*\
!*** ./node_modules/@styled-system/core/dist/index.esm.js ***!
\************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "merge": () => (/* binding */ merge),
/* harmony export */ "get": () => (/* binding */ get),
/* harmony export */ "createParser": () => (/* binding */ createParser),
/* harmony export */ "createStyleFunction": () => (/* binding */ createStyleFunction),
/* harmony export */ "system": () => (/* binding */ system),
/* harmony export */ "compose": () => (/* binding */ compose)
/* harmony export */ });
/* harmony import */ var object_assign__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! object-assign */ "./node_modules/gatsby/dist/internal-plugins/bundle-optimisations/polyfills/object-assign.js");
/* harmony import */ var object_assign__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(object_assign__WEBPACK_IMPORTED_MODULE_0__);
var merge = function merge(a, b) {
var result = object_assign__WEBPACK_IMPORTED_MODULE_0___default()({}, a, b);
for (var key in a) {
var _assign;
if (!a[key] || typeof b[key] !== 'object') continue;
object_assign__WEBPACK_IMPORTED_MODULE_0___default()(result, (_assign = {}, _assign[key] = object_assign__WEBPACK_IMPORTED_MODULE_0___default()(a[key], b[key]), _assign));
}
return result;
}; // sort object-value responsive styles
var sort = function sort(obj) {
var next = {};
Object.keys(obj).sort(function (a, b) {
return a.localeCompare(b, undefined, {
numeric: true,
sensitivity: 'base'
});
}).forEach(function (key) {
next[key] = obj[key];
});
return next;
};
var defaults = {
breakpoints: [40, 52, 64].map(function (n) {
return n + 'em';
})
};
var createMediaQuery = function createMediaQuery(n) {
return "@media screen and (min-width: " + n + ")";
};
var getValue = function getValue(n, scale) {
return get(scale, n, n);
};
var get = function get(obj, key, def, p, undef) {
key = key && key.split ? key.split('.') : [key];
for (p = 0; p < key.length; p++) {
obj = obj ? obj[key[p]] : undef;
}
return obj === undef ? def : obj;
};
var createParser = function createParser(config) {
var cache = {};
var parse = function parse(props) {
var styles = {};
var shouldSort = false;
var isCacheDisabled = props.theme && props.theme.disableStyledSystemCache;
for (var key in props) {
if (!config[key]) continue;
var sx = config[key];
var raw = props[key];
var scale = get(props.theme, sx.scale, sx.defaults);
if (typeof raw === 'object') {
cache.breakpoints = !isCacheDisabled && cache.breakpoints || get(props.theme, 'breakpoints', defaults.breakpoints);
if (Array.isArray(raw)) {
cache.media = !isCacheDisabled && cache.media || [null].concat(cache.breakpoints.map(createMediaQuery));
styles = merge(styles, parseResponsiveStyle(cache.media, sx, scale, raw, props));
continue;
}
if (raw !== null) {
styles = merge(styles, parseResponsiveObject(cache.breakpoints, sx, scale, raw, props));
shouldSort = true;
}
continue;
}
object_assign__WEBPACK_IMPORTED_MODULE_0___default()(styles, sx(raw, scale, props));
} // sort object-based responsive styles
if (shouldSort) {
styles = sort(styles);
}
return styles;
};
parse.config = config;
parse.propNames = Object.keys(config);
parse.cache = cache;
var keys = Object.keys(config).filter(function (k) {
return k !== 'config';
});
if (keys.length > 1) {
keys.forEach(function (key) {
var _createParser;
parse[key] = createParser((_createParser = {}, _createParser[key] = config[key], _createParser));
});
}
return parse;
};
var parseResponsiveStyle = function parseResponsiveStyle(mediaQueries, sx, scale, raw, _props) {
var styles = {};
raw.slice(0, mediaQueries.length).forEach(function (value, i) {
var media = mediaQueries[i];
var style = sx(value, scale, _props);
if (!media) {
object_assign__WEBPACK_IMPORTED_MODULE_0___default()(styles, style);
} else {
var _assign2;
object_assign__WEBPACK_IMPORTED_MODULE_0___default()(styles, (_assign2 = {}, _assign2[media] = object_assign__WEBPACK_IMPORTED_MODULE_0___default()({}, styles[media], style), _assign2));
}
});
return styles;
};
var parseResponsiveObject = function parseResponsiveObject(breakpoints, sx, scale, raw, _props) {
var styles = {};
for (var key in raw) {
var breakpoint = breakpoints[key];
var value = raw[key];
var style = sx(value, scale, _props);
if (!breakpoint) {
object_assign__WEBPACK_IMPORTED_MODULE_0___default()(styles, style);
} else {
var _assign3;
var media = createMediaQuery(breakpoint);
object_assign__WEBPACK_IMPORTED_MODULE_0___default()(styles, (_assign3 = {}, _assign3[media] = object_assign__WEBPACK_IMPORTED_MODULE_0___default()({}, styles[media], style), _assign3));
}
}
return styles;
};
var createStyleFunction = function createStyleFunction(_ref) {
var properties = _ref.properties,
property = _ref.property,
scale = _ref.scale,
_ref$transform = _ref.transform,
transform = _ref$transform === void 0 ? getValue : _ref$transform,
defaultScale = _ref.defaultScale;
properties = properties || [property];
var sx = function sx(value, scale, _props) {
var result = {};
var n = transform(value, scale, _props);
if (n === null) return;
properties.forEach(function (prop) {
result[prop] = n;
});
return result;
};
sx.scale = scale;
sx.defaults = defaultScale;
return sx;
}; // new v5 API
var system = function system(args) {
if (args === void 0) {
args = {};
}
var config = {};
Object.keys(args).forEach(function (key) {
var conf = args[key];
if (conf === true) {
// shortcut definition
config[key] = createStyleFunction({
property: key,
scale: key
});
return;
}
if (typeof conf === 'function') {
config[key] = conf;
return;
}
config[key] = createStyleFunction(conf);
});
var parser = createParser(config);
return parser;
};
var compose = function compose() {
var config = {};
for (var _len = arguments.length, parsers = new Array(_len), _key = 0; _key < _len; _key++) {
parsers[_key] = arguments[_key];
}
parsers.forEach(function (parser) {
if (!parser || !parser.config) return;
object_assign__WEBPACK_IMPORTED_MODULE_0___default()(config, parser.config);
});
var parser = createParser(config);
return parser;
};
/***/ }),
/***/ "./node_modules/@styled-system/css/dist/index.esm.js":
/*!***********************************************************!*\
!*** ./node_modules/@styled-system/css/dist/index.esm.js ***!
\***********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "get": () => (/* binding */ get),
/* harmony export */ "responsive": () => (/* binding */ responsive),
/* harmony export */ "css": () => (/* binding */ css),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
// based on https://github.com/developit/dlv
var get = function get(obj, key, def, p, undef) {
key = key && key.split ? key.split('.') : [key];
for (p = 0; p < key.length; p++) {
obj = obj ? obj[key[p]] : undef;
}
return obj === undef ? def : obj;
};
var defaultBreakpoints = [40, 52, 64].map(function (n) {
return n + 'em';
});
var defaultTheme = {
space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
fontSizes: [12, 14, 16, 20, 24, 32, 48, 64, 72]
};
var aliases = {
bg: 'backgroundColor',
m: 'margin',
mt: 'marginTop',
mr: 'marginRight',
mb: 'marginBottom',
ml: 'marginLeft',
mx: 'marginX',
my: 'marginY',
p: 'padding',
pt: 'paddingTop',
pr: 'paddingRight',
pb: 'paddingBottom',
pl: 'paddingLeft',
px: 'paddingX',
py: 'paddingY'
};
var multiples = {
marginX: ['marginLeft', 'marginRight'],
marginY: ['marginTop', 'marginBottom'],
paddingX: ['paddingLeft', 'paddingRight'],
paddingY: ['paddingTop', 'paddingBottom'],
size: ['width', 'height']
};
var scales = {
color: 'colors',
backgroundColor: 'colors',
borderColor: 'colors',
margin: 'space',
marginTop: 'space',
marginRight: 'space',
marginBottom: 'space',
marginLeft: 'space',
marginX: 'space',
marginY: 'space',
padding: 'space',
paddingTop: 'space',
paddingRight: 'space',
paddingBottom: 'space',
paddingLeft: 'space',
paddingX: 'space',
paddingY: 'space',
top: 'space',
right: 'space',
bottom: 'space',
left: 'space',
gridGap: 'space',
gridColumnGap: 'space',
gridRowGap: 'space',
gap: 'space',
columnGap: 'space',
rowGap: 'space',
fontFamily: 'fonts',
fontSize: 'fontSizes',
fontWeight: 'fontWeights',
lineHeight: 'lineHeights',
letterSpacing: 'letterSpacings',
border: 'borders',
borderTop: 'borders',
borderRight: 'borders',
borderBottom: 'borders',
borderLeft: 'borders',
borderWidth: 'borderWidths',
borderStyle: 'borderStyles',
borderRadius: 'radii',
borderTopRightRadius: 'radii',
borderTopLeftRadius: 'radii',
borderBottomRightRadius: 'radii',
borderBottomLeftRadius: 'radii',
borderTopWidth: 'borderWidths',
borderTopColor: 'colors',
borderTopStyle: 'borderStyles',
borderBottomWidth: 'borderWidths',
borderBottomColor: 'colors',
borderBottomStyle: 'borderStyles',
borderLeftWidth: 'borderWidths',
borderLeftColor: 'colors',
borderLeftStyle: 'borderStyles',
borderRightWidth: 'borderWidths',
borderRightColor: 'colors',
borderRightStyle: 'borderStyles',
outlineColor: 'colors',
boxShadow: 'shadows',
textShadow: 'shadows',
zIndex: 'zIndices',
width: 'sizes',
minWidth: 'sizes',
maxWidth: 'sizes',
height: 'sizes',
minHeight: 'sizes',
maxHeight: 'sizes',
flexBasis: 'sizes',
size: 'sizes',
// svg
fill: 'colors',
stroke: 'colors'
};
var positiveOrNegative = function positiveOrNegative(scale, value) {
if (typeof value !== 'number' || value >= 0) {
return get(scale, value, value);
}
var absolute = Math.abs(value);
var n = get(scale, absolute, absolute);
if (typeof n === 'string') return '-' + n;
return n * -1;
};
var transforms = ['margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'top', 'bottom', 'left', 'right'].reduce(function (acc, curr) {
var _extends2;
return _extends({}, acc, (_extends2 = {}, _extends2[curr] = positiveOrNegative, _extends2));
}, {});
var responsive = function responsive(styles) {
return function (theme) {
var next = {};
var breakpoints = get(theme, 'breakpoints', defaultBreakpoints);
var mediaQueries = [null].concat(breakpoints.map(function (n) {
return "@media screen and (min-width: " + n + ")";
}));
for (var key in styles) {
var value = typeof styles[key] === 'function' ? styles[key](theme) : styles[key];
if (value == null) continue;
if (!Array.isArray(value)) {
next[key] = value;
continue;
}
for (var i = 0; i < value.slice(0, mediaQueries.length).length; i++) {
var media = mediaQueries[i];
if (!media) {
next[key] = value[i];
continue;
}
next[media] = next[media] || {};
if (value[i] == null) continue;
next[media][key] = value[i];
}
}
return next;
};
};
var css = function css(args) {
return function (props) {
if (props === void 0) {
props = {};
}
var theme = _extends({}, defaultTheme, {}, props.theme || props);
var result = {};
var obj = typeof args === 'function' ? args(theme) : args;
var styles = responsive(obj)(theme);
for (var key in styles) {
var x = styles[key];
var val = typeof x === 'function' ? x(theme) : x;
if (key === 'variant') {
var variant = css(get(theme, val))(theme);
result = _extends({}, result, {}, variant);
continue;
}
if (val && typeof val === 'object') {
result[key] = css(val)(theme);
continue;
}
var prop = get(aliases, key, key);
var scaleName = get(scales, prop);
var scale = get(theme, scaleName, get(theme, prop, {}));
var transform = get(transforms, prop, get);
var value = transform(scale, val, val);
if (multiples[prop]) {
var dirs = multiples[prop];
for (var i = 0; i < dirs.length; i++) {
result[dirs[i]] = value;
}
} else {
result[prop] = value;
}
}
return result;
};
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (css);
/***/ }),
/***/ "./node_modules/@styled-system/flexbox/dist/index.esm.js":
/*!***************************************************************!*\
!*** ./node_modules/@styled-system/flexbox/dist/index.esm.js ***!
\***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "flexbox": () => (/* binding */ flexbox),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _styled_system_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styled-system/core */ "./node_modules/@styled-system/core/dist/index.esm.js");
var config = {
alignItems: true,
alignContent: true,
justifyItems: true,
justifyContent: true,
flexWrap: true,
flexDirection: true,
// item
flex: true,
flexGrow: true,
flexShrink: true,
flexBasis: true,
justifySelf: true,
alignSelf: true,
order: true
};
var flexbox = (0,_styled_system_core__WEBPACK_IMPORTED_MODULE_0__.system)(config);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (flexbox);
/***/ }),
/***/ "./node_modules/@styled-system/grid/dist/index.esm.js":
/*!************************************************************!*\
!*** ./node_modules/@styled-system/grid/dist/index.esm.js ***!
\************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "grid": () => (/* binding */ grid),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _styled_system_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styled-system/core */ "./node_modules/@styled-system/core/dist/index.esm.js");
var defaults = {
space: [0, 4, 8, 16, 32, 64, 128, 256, 512]
};
var config = {
gridGap: {
property: 'gridGap',
scale: 'space',
defaultScale: defaults.space
},
gridColumnGap: {
property: 'gridColumnGap',
scale: 'space',
defaultScale: defaults.space
},
gridRowGap: {
property: 'gridRowGap',
scale: 'space',
defaultScale: defaults.space
},
gridColumn: true,
gridRow: true,
gridAutoFlow: true,
gridAutoColumns: true,
gridAutoRows: true,
gridTemplateColumns: true,
gridTemplateRows: true,
gridTemplateAreas: true,
gridArea: true
};
var grid = (0,_styled_system_core__WEBPACK_IMPORTED_MODULE_0__.system)(config);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (grid);
/***/ }),
/***/ "./node_modules/@styled-system/layout/dist/index.esm.js":
/*!**************************************************************!*\
!*** ./node_modules/@styled-system/layout/dist/index.esm.js ***!
\**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "layout": () => (/* binding */ layout),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _styled_system_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styled-system/core */ "./node_modules/@styled-system/core/dist/index.esm.js");
var isNumber = function isNumber(n) {
return typeof n === 'number' && !isNaN(n);
};
var getWidth = function getWidth(n, scale) {
return (0,_styled_system_core__WEBPACK_IMPORTED_MODULE_0__.get)(scale, n, !isNumber(n) || n > 1 ? n : n * 100 + '%');
};
var config = {
width: {
property: 'width',
scale: 'sizes',
transform: getWidth
},
height: {
property: 'height',
scale: 'sizes'
},
minWidth: {
property: 'minWidth',
scale: 'sizes'
},
minHeight: {
property: 'minHeight',
scale: 'sizes'
},
maxWidth: {
property: 'maxWidth',
scale: 'sizes'
},
maxHeight: {
property: 'maxHeight',
scale: 'sizes'
},
size: {
properties: ['width', 'height'],
scale: 'sizes'
},
overflow: true,
overflowX: true,
overflowY: true,
display: true,
verticalAlign: true
};
var layout = (0,_styled_system_core__WEBPACK_IMPORTED_MODULE_0__.system)(config);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (layout);
/***/ }),
/***/ "./node_modules/@styled-system/position/dist/index.esm.js":
/*!****************************************************************!*\
!*** ./node_modules/@styled-system/position/dist/index.esm.js ***!
\****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "position": () => (/* binding */ position),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _styled_system_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styled-system/core */ "./node_modules/@styled-system/core/dist/index.esm.js");
var defaults = {
space: [0, 4, 8, 16, 32, 64, 128, 256, 512]
};
var config = {
position: true,
zIndex: {
property: 'zIndex',
scale: 'zIndices'
},
top: {
property: 'top',
scale: 'space',
defaultScale: defaults.space
},
right: {
property: 'right',
scale: 'space',
defaultScale: defaults.space
},
bottom: {
property: 'bottom',
scale: 'space',
defaultScale: defaults.space
},
left: {
property: 'left',
scale: 'space',
defaultScale: defaults.space
}
};
var position = (0,_styled_system_core__WEBPACK_IMPORTED_MODULE_0__.system)(config);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (position);
/***/ }),
/***/ "./node_modules/@styled-system/shadow/dist/index.esm.js":
/*!**************************************************************!*\
!*** ./node_modules/@styled-system/shadow/dist/index.esm.js ***!
\**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "shadow": () => (/* binding */ shadow),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _styled_system_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styled-system/core */ "./node_modules/@styled-system/core/dist/index.esm.js");
var shadow = (0,_styled_system_core__WEBPACK_IMPORTED_MODULE_0__.system)({
boxShadow: {
property: 'boxShadow',
scale: 'shadows'
},
textShadow: {
property: 'textShadow',
scale: 'shadows'
}
});
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (shadow);
/***/ }),
/***/ "./node_modules/@styled-system/should-forward-prop/dist/index.esm.js":
/*!***************************************************************************!*\
!*** ./node_modules/@styled-system/should-forward-prop/dist/index.esm.js ***!
\***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "props": () => (/* binding */ props),
/* harmony export */ "createShouldForwardProp": () => (/* binding */ createShouldForwardProp),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ "./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js");
/* harmony import */ var _emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @emotion/is-prop-valid */ "./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js");
/* harmony import */ var styled_system__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-system */ "./node_modules/styled-system/dist/index.esm.js");
var all = (0,styled_system__WEBPACK_IMPORTED_MODULE_2__.compose)(styled_system__WEBPACK_IMPORTED_MODULE_2__.space, styled_system__WEBPACK_IMPORTED_MODULE_2__.typography, styled_system__WEBPACK_IMPORTED_MODULE_2__.color, styled_system__WEBPACK_IMPORTED_MODULE_2__.layout, styled_system__WEBPACK_IMPORTED_MODULE_2__.flexbox, styled_system__WEBPACK_IMPORTED_MODULE_2__.border, styled_system__WEBPACK_IMPORTED_MODULE_2__.background, styled_system__WEBPACK_IMPORTED_MODULE_2__.position, styled_system__WEBPACK_IMPORTED_MODULE_2__.grid, styled_system__WEBPACK_IMPORTED_MODULE_2__.shadow, styled_system__WEBPACK_IMPORTED_MODULE_2__.buttonStyle, styled_system__WEBPACK_IMPORTED_MODULE_2__.textStyle, styled_system__WEBPACK_IMPORTED_MODULE_2__.colorStyle);
var props = all.propNames;
var createShouldForwardProp = function createShouldForwardProp(props) {
var regex = new RegExp("^(" + props.join('|') + ")$");
return (0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prop) {
return (0,_emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_1__["default"])(prop) && !regex.test(prop);
});
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createShouldForwardProp(props));
/***/ }),
/***/ "./node_modules/@styled-system/space/dist/index.esm.js":
/*!*************************************************************!*\
!*** ./node_modules/@styled-system/space/dist/index.esm.js ***!
\*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "margin": () => (/* binding */ margin),
/* harmony export */ "padding": () => (/* binding */ padding),
/* harmony export */ "space": () => (/* binding */ space),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _styled_system_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styled-system/core */ "./node_modules/@styled-system/core/dist/index.esm.js");
var defaults = {
space: [0, 4, 8, 16, 32, 64, 128, 256, 512]
};
var isNumber = function isNumber(n) {
return typeof n === 'number' && !isNaN(n);
};
var getMargin = function getMargin(n, scale) {
if (!isNumber(n)) {
return (0,_styled_system_core__WEBPACK_IMPORTED_MODULE_0__.get)(scale, n, n);
}
var isNegative = n < 0;
var absolute = Math.abs(n);
var value = (0,_styled_system_core__WEBPACK_IMPORTED_MODULE_0__.get)(scale, absolute, absolute);
if (!isNumber(value)) {
return isNegative ? '-' + value : value;
}
return value * (isNegative ? -1 : 1);
};
var configs = {};
configs.margin = {
margin: {
property: 'margin',
scale: 'space',
transform: getMargin,
defaultScale: defaults.space
},
marginTop: {
property: 'marginTop',
scale: 'space',
transform: getMargin,
defaultScale: defaults.space
},
marginRight: {
property: 'marginRight',
scale: 'space',
transform: getMargin,
defaultScale: defaults.space
},
marginBottom: {
property: 'marginBottom',
scale: 'space',
transform: getMargin,
defaultScale: defaults.space
},
marginLeft: {
property: 'marginLeft',
scale: 'space',
transform: getMargin,
defaultScale: defaults.space
},
marginX: {
properties: ['marginLeft', 'marginRight'],
scale: 'space',
transform: getMargin,
defaultScale: defaults.space
},
marginY: {
properties: ['marginTop', 'marginBottom'],
scale: 'space',
transform: getMargin,
defaultScale: defaults.space
}
};
configs.margin.m = configs.margin.margin;
configs.margin.mt = configs.margin.marginTop;
configs.margin.mr = configs.margin.marginRight;
configs.margin.mb = configs.margin.marginBottom;
configs.margin.ml = configs.margin.marginLeft;
configs.margin.mx = configs.margin.marginX;
configs.margin.my = configs.margin.marginY;
configs.padding = {
padding: {
property: 'padding',
scale: 'space',
defaultScale: defaults.space
},
paddingTop: {
property: 'paddingTop',
scale: 'space',
defaultScale: defaults.space
},
paddingRight: {
property: 'paddingRight',
scale: 'space',
defaultScale: defaults.space
},
paddingBottom: {
property: 'paddingBottom',
scale: 'space',
defaultScale: defaults.space
},
paddingLeft: {
property: 'paddingLeft',
scale: 'space',
defaultScale: defaults.space
},
paddingX: {
properties: ['paddingLeft', 'paddingRight'],
scale: 'space',
defaultScale: defaults.space
},
paddingY: {
properties: ['paddingTop', 'paddingBottom'],
scale: 'space',
defaultScale: defaults.space
}
};
configs.padding.p = configs.padding.padding;
configs.padding.pt = configs.padding.paddingTop;
configs.padding.pr = configs.padding.paddingRight;
configs.padding.pb = configs.padding.paddingBottom;
configs.padding.pl = configs.padding.paddingLeft;
configs.padding.px = configs.padding.paddingX;
configs.padding.py = configs.padding.paddingY;
var margin = (0,_styled_system_core__WEBPACK_IMPORTED_MODULE_0__.system)(configs.margin);
var padding = (0,_styled_system_core__WEBPACK_IMPORTED_MODULE_0__.system)(configs.padding);
var space = (0,_styled_system_core__WEBPACK_IMPORTED_MODULE_0__.compose)(margin, padding);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (space);
/***/ }),
/***/ "./node_modules/@styled-system/typography/dist/index.esm.js":
/*!******************************************************************!*\
!*** ./node_modules/@styled-system/typography/dist/index.esm.js ***!
\******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "typography": () => (/* binding */ typography),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _styled_system_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styled-system/core */ "./node_modules/@styled-system/core/dist/index.esm.js");
var defaults = {
fontSizes: [12, 14, 16, 20, 24, 32, 48, 64, 72]
};
var config = {
fontFamily: {
property: 'fontFamily',
scale: 'fonts'
},
fontSize: {
property: 'fontSize',
scale: 'fontSizes',
defaultScale: defaults.fontSizes
},
fontWeight: {
property: 'fontWeight',
scale: 'fontWeights'
},
lineHeight: {
property: 'lineHeight',
scale: 'lineHeights'
},
letterSpacing: {
property: 'letterSpacing',
scale: 'letterSpacings'
},
textAlign: true,
fontStyle: true
};
var typography = (0,_styled_system_core__WEBPACK_IMPORTED_MODULE_0__.system)(config);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typography);
/***/ }),
/***/ "./node_modules/@styled-system/variant/dist/index.esm.js":
/*!***************************************************************!*\
!*** ./node_modules/@styled-system/variant/dist/index.esm.js ***!
\***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "variant": () => (/* binding */ variant),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
/* harmony export */ "buttonStyle": () => (/* binding */ buttonStyle),
/* harmony export */ "textStyle": () => (/* binding */ textStyle),
/* harmony export */ "colorStyle": () => (/* binding */ colorStyle)
/* harmony export */ });
/* harmony import */ var _styled_system_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styled-system/core */ "./node_modules/@styled-system/core/dist/index.esm.js");
/* harmony import */ var _styled_system_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @styled-system/css */ "./node_modules/@styled-system/css/dist/index.esm.js");
var variant = function variant(_ref) {
var _config;
var scale = _ref.scale,
_ref$prop = _ref.prop,
prop = _ref$prop === void 0 ? 'variant' : _ref$prop,
_ref$variants = _ref.variants,
variants = _ref$variants === void 0 ? {} : _ref$variants,
key = _ref.key;
var sx;
if (Object.keys(variants).length) {
sx = function sx(value, scale, props) {
return (0,_styled_system_css__WEBPACK_IMPORTED_MODULE_1__["default"])((0,_styled_system_core__WEBPACK_IMPORTED_MODULE_0__.get)(scale, value, null))(props.theme);
};
} else {
sx = function sx(value, scale) {
return (0,_styled_system_core__WEBPACK_IMPORTED_MODULE_0__.get)(scale, value, null);
};
}
sx.scale = scale || key;
sx.defaults = variants;
var config = (_config = {}, _config[prop] = sx, _config);
var parser = (0,_styled_system_core__WEBPACK_IMPORTED_MODULE_0__.createParser)(config);
return parser;
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (variant);
var buttonStyle = variant({
key: 'buttons'
});
var textStyle = variant({
key: 'textStyles',
prop: 'textStyle'
});
var colorStyle = variant({
key: 'colorStyles',
prop: 'colors'
});
/***/ }),
/***/ "./node_modules/@theme-ui/color-modes/dist/theme-ui-color-modes.esm.js":
/*!*****************************************************************************!*\
!*** ./node_modules/@theme-ui/color-modes/dist/theme-ui-color-modes.esm.js ***!
\*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "ColorModeProvider": () => (/* binding */ ColorModeProvider),
/* harmony export */ "InitializeColorMode": () => (/* binding */ InitializeColorMode),
/* harmony export */ "useColorMode": () => (/* binding */ useColorMode)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _theme_ui_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @theme-ui/core */ "./node_modules/@theme-ui/core/dist/theme-ui-core.esm.js");
/* harmony import */ var _theme_ui_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @theme-ui/css */ "./node_modules/@theme-ui/css/dist/theme-ui-css.esm.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
const toVarName = key => `--theme-ui-${key.replace('-__default', '')}`;
const toVarValue = key => `var(${toVarName(key)})`;
const join = (...args) => args.filter(Boolean).join('-');
const reservedKeys = {
useCustomProperties: true,
initialColorModeName: true,
printColorModeName: true,
initialColorMode: true,
useLocalStorage: true
};
const toCustomProperties = (obj, parent, themeKey) => {
const next = Array.isArray(obj) ? [] : {};
for (let key in obj) {
const value = obj[key];
const name = join(parent, key);
if (value && typeof value === 'object') {
next[key] = toCustomProperties(value, name);
continue;
}
if (reservedKeys[key]) {
next[key] = value;
continue;
}
next[key] = toVarValue(name);
}
return next;
};
const objectToVars = (parent, obj) => {
let vars = {};
for (let key in obj) {
if (key === 'modes') continue;
const name = join(parent, key);
const value = obj[key];
if (value && typeof value === 'object') {
vars = { ...vars,
...objectToVars(name, value)
};
} else {
vars[toVarName(name)] = value;
}
}
return vars;
}; // create root styles for color modes
const createColorStyles = (theme = {}) => {
const {
useCustomProperties,
initialColorModeName,
printColorModeName,
useRootStyles
} = theme.config || theme || {};
const colors = theme.rawColors || theme.colors;
if (!colors || useRootStyles === false) return {};
if (useCustomProperties === false) {
return (0,_theme_ui_css__WEBPACK_IMPORTED_MODULE_1__.css)({
html: {
color: 'text',
bg: 'background'
}
})(theme);
}
const modes = colors.modes || {};
const styles = objectToVars('colors', colors);
Object.keys(modes).forEach(mode => {
const key = `&.theme-ui-${mode}`;
styles[key] = objectToVars('colors', modes[mode]);
});
if (printColorModeName) {
const mode = printColorModeName === 'initial' || printColorModeName === initialColorModeName ? colors : modes[printColorModeName];
styles['@media print'] = objectToVars('colors', mode);
}
const colorToVarValue = color => toVarValue(`colors-${color}`);
return (0,_theme_ui_css__WEBPACK_IMPORTED_MODULE_1__.css)({
html: { ...styles,
color: colorToVarValue('text'),
bg: colorToVarValue('background')
}
})(theme);
};
const STORAGE_KEY = 'theme-ui-color-mode';
const storage = {
get: () => {
try {
return window.localStorage.getItem(STORAGE_KEY);
} catch (e) {
console.warn('localStorage is disabled and color mode might not work as expected.', 'Please check your Site Settings.', e);
}
},
set: value => {
try {
window.localStorage.setItem(STORAGE_KEY, value);
} catch (e) {
console.warn('localStorage is disabled and color mode might not work as expected.', 'Please check your Site Settings.', e);
}
}
};
const getPreferredColorScheme = () => {
if (typeof window !== 'undefined' && window.matchMedia) {
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
return 'dark';
}
if (window.matchMedia('(prefers-color-scheme: light)').matches) {
return 'light';
}
}
return null;
};
const getModeFromClass = () => {
let mode;
if (typeof document !== 'undefined') {
document.documentElement.classList.forEach(className => {
if (className.startsWith('theme-ui-')) {
mode = className.replace('theme-ui-', '');
}
});
}
return mode;
};
const useColorModeState = (theme = {}) => {
const {
initialColorModeName,
useColorSchemeMediaQuery,
useLocalStorage
} = theme.config || theme;
let [mode, setMode] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(() => {
const modeFromClass = getModeFromClass();
if (modeFromClass) {
return modeFromClass;
}
const preferredMode = useColorSchemeMediaQuery !== false && getPreferredColorScheme();
return preferredMode || initialColorModeName;
}); // on first render, we read the color mode from localStorage and
// clear the class on document element body
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
const stored = useLocalStorage !== false && storage.get();
if (typeof document !== 'undefined') {
document.documentElement.classList.remove('theme-ui-' + stored);
document.body.classList.remove('theme-ui-' + stored);
}
if (stored && stored !== mode) {
// eslint-disable-next-line react-hooks/exhaustive-deps
mode = stored;
setMode(stored);
}
}, []); // when mode changes, we save it to localStorage
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
if (mode && useLocalStorage !== false) {
storage.set(mode);
}
}, [mode, useLocalStorage]);
if (true) {
var _theme$colors;
if ((_theme$colors = theme.colors) != null && _theme$colors.modes && initialColorModeName && Object.keys(theme.colors.modes).indexOf(initialColorModeName) > -1) {
console.warn('[theme-ui] The `initialColorModeName` value should be a unique name' + ' and cannot reference a key in `theme.colors.modes`.');
}
}
return [mode, setMode];
};
function useColorMode() {
const {
colorMode,
setColorMode
} = (0,_theme_ui_core__WEBPACK_IMPORTED_MODULE_2__.useThemeUI)();
if (typeof setColorMode !== 'function') {
throw new Error(`[useColorMode] requires the ColorModeProvider component`);
} // We're allowing the user to specify a narrower type for its color mode name.
return [colorMode, setColorMode];
}
const omitModes = colors => {
const res = { ...colors
};
delete res.modes;
return res;
};
function copyRawColors(colors, outerThemeRawColors) {
for (const [key, value] of Object.entries(colors)) {
if (typeof value === 'string' && !value.startsWith('var(')) {
outerThemeRawColors[key] = value;
}
if (typeof value === 'object') {
outerThemeRawColors[key] = { ...outerThemeRawColors[key],
...copyRawColors(value, {})
};
}
}
return outerThemeRawColors;
}
const ColorModeProvider = ({
children
}) => {
const outer = (0,_theme_ui_core__WEBPACK_IMPORTED_MODULE_2__.useThemeUI)();
const outerTheme = outer.theme;
const [colorMode, setColorMode] = useColorModeState(outerTheme);
const theme = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
const res = { ...outerTheme
};
const modes = (0,_theme_ui_css__WEBPACK_IMPORTED_MODULE_1__.get)(res, 'colors.modes', {});
const currentColorMode = (0,_theme_ui_css__WEBPACK_IMPORTED_MODULE_1__.get)(modes, colorMode, {});
if (colorMode) {
res.colors = { ...res.colors,
...currentColorMode
};
}
const {
useCustomProperties,
initialColorModeName = '__default'
} = outerTheme.config || outerTheme;
let outerThemeRawColors = outerTheme.rawColors || outerTheme.colors || {};
if (useCustomProperties !== false) {
const alreadyHasRawColors = res.rawColors != null;
const colors = res.colors || {};
if (alreadyHasRawColors) {
outerThemeRawColors = { ...outerThemeRawColors
};
copyRawColors(colors, outerThemeRawColors);
if ('modes' in outerThemeRawColors) {
var _res$rawColors;
res.rawColors = { ...outerThemeRawColors,
modes: { ...((_res$rawColors = res.rawColors) == null ? void 0 : _res$rawColors.modes),
[initialColorModeName]: omitModes(outerThemeRawColors)
}
};
} else {
res.rawColors = outerThemeRawColors;
}
} else {
if (!('modes' in outerThemeRawColors)) {
res.rawColors = colors;
} else {
const modes = {
[initialColorModeName]: omitModes(outerThemeRawColors),
...outerThemeRawColors.modes
};
res.rawColors = { ...colors,
modes
};
/* modes doesn't match index signature by design */
}
}
res.colors = toCustomProperties(omitModes(outerThemeRawColors), 'colors');
}
return res;
}, [colorMode, outerTheme]);
const context = { ...outer,
theme,
colorMode,
setColorMode
};
const isTopLevelColorModeProvider = outer.setColorMode === undefined;
return (0,_theme_ui_core__WEBPACK_IMPORTED_MODULE_2__.jsx)(_theme_ui_core__WEBPACK_IMPORTED_MODULE_2__.__ThemeUIInternalBaseThemeProvider, {
context
}, isTopLevelColorModeProvider ? (0,_theme_ui_core__WEBPACK_IMPORTED_MODULE_2__.jsx)(_emotion_react__WEBPACK_IMPORTED_MODULE_3__.Global, {
styles: () => {
return createColorStyles(theme);
}
}) : (0,_theme_ui_core__WEBPACK_IMPORTED_MODULE_2__.jsx)('div', {
className: 'theme-ui__nested-color-mode-provider',
style: createColorStyles(theme)['html']
}), children);
};
const noflash = `(function() { try {
var mode = localStorage.getItem('theme-ui-color-mode');
if (!mode) return
document.documentElement.classList.add('theme-ui-' + mode);
document.body.classList.add('theme-ui-' + mode);
} catch (e) {} })();`;
const InitializeColorMode = () => (0,_theme_ui_core__WEBPACK_IMPORTED_MODULE_2__.jsx)('script', {
key: 'theme-ui-no-flash',
dangerouslySetInnerHTML: {
__html: noflash
}
});
/***/ }),
/***/ "./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js":
/*!***************************************************************************!*\
!*** ./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js ***!
\***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Alert": () => (/* binding */ Alert),
/* harmony export */ "AspectImage": () => (/* binding */ AspectImage),
/* harmony export */ "AspectRatio": () => (/* binding */ AspectRatio),
/* harmony export */ "Avatar": () => (/* binding */ Avatar),
/* harmony export */ "Badge": () => (/* binding */ Badge),
/* harmony export */ "Box": () => (/* binding */ Box),
/* harmony export */ "Button": () => (/* binding */ Button),
/* harmony export */ "Card": () => (/* binding */ Card),
/* harmony export */ "Checkbox": () => (/* binding */ Checkbox),
/* harmony export */ "Close": () => (/* binding */ Close),
/* harmony export */ "Container": () => (/* binding */ Container),
/* harmony export */ "Divider": () => (/* binding */ Divider),
/* harmony export */ "Donut": () => (/* binding */ Donut),
/* harmony export */ "Embed": () => (/* binding */ Embed),
/* harmony export */ "Field": () => (/* binding */ Field),
/* harmony export */ "Flex": () => (/* binding */ Flex),
/* harmony export */ "Grid": () => (/* binding */ Grid),
/* harmony export */ "Heading": () => (/* binding */ Heading),
/* harmony export */ "IconButton": () => (/* binding */ IconButton),
/* harmony export */ "Image": () => (/* binding */ Image),
/* harmony export */ "Input": () => (/* binding */ Input),
/* harmony export */ "Label": () => (/* binding */ Label),
/* harmony export */ "Link": () => (/* binding */ Link),
/* harmony export */ "MenuButton": () => (/* binding */ MenuButton),
/* harmony export */ "Message": () => (/* binding */ Message),
/* harmony export */ "NavLink": () => (/* binding */ NavLink),
/* harmony export */ "Paragraph": () => (/* binding */ Paragraph),
/* harmony export */ "Progress": () => (/* binding */ Progress),
/* harmony export */ "Radio": () => (/* binding */ Radio),
/* harmony export */ "Select": () => (/* binding */ Select),
/* harmony export */ "Slider": () => (/* binding */ Slider),
/* harmony export */ "Spinner": () => (/* binding */ Spinner),
/* harmony export */ "Switch": () => (/* binding */ Switch),
/* harmony export */ "Text": () => (/* binding */ Text),
/* harmony export */ "Textarea": () => (/* binding */ Textarea)
/* harmony export */ });
/* harmony import */ var _emotion_styled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/styled */ "./node_modules/@emotion/styled/dist/emotion-styled.esm.js");
/* harmony import */ var _theme_ui_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @theme-ui/css */ "./node_modules/@theme-ui/css/dist/theme-ui-css.esm.js");
/* harmony import */ var _styled_system_should_forward_prop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @styled-system/should-forward-prop */ "./node_modules/@styled-system/should-forward-prop/dist/index.esm.js");
/* harmony import */ var _styled_system_space__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @styled-system/space */ "./node_modules/@styled-system/space/dist/index.esm.js");
/* harmony import */ var _styled_system_color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @styled-system/color */ "./node_modules/@styled-system/color/dist/index.esm.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
const boxSystemProps = [..._styled_system_space__WEBPACK_IMPORTED_MODULE_2__["default"].propNames, ..._styled_system_color__WEBPACK_IMPORTED_MODULE_3__["default"].propNames];
/**
* @internal
* @type {(prop: string) => boolean}
*/
const __isBoxStyledSystemProp = prop => boxSystemProps.includes(prop);
const shouldForwardProp = (0,_styled_system_should_forward_prop__WEBPACK_IMPORTED_MODULE_1__.createShouldForwardProp)(boxSystemProps);
const sx = props => (0,_theme_ui_css__WEBPACK_IMPORTED_MODULE_5__.css)(props.sx)(props.theme);
const base = props => (0,_theme_ui_css__WEBPACK_IMPORTED_MODULE_5__.css)(props.__css)(props.theme);
const variant = ({
theme,
variant,
__themeKey = 'variants'
}) => (0,_theme_ui_css__WEBPACK_IMPORTED_MODULE_5__.css)((0,_theme_ui_css__WEBPACK_IMPORTED_MODULE_5__.get)(theme, __themeKey + '.' + variant, (0,_theme_ui_css__WEBPACK_IMPORTED_MODULE_5__.get)(theme, variant)));
const Box = (0,_emotion_styled__WEBPACK_IMPORTED_MODULE_0__["default"])('div', {
shouldForwardProp
})({
boxSizing: 'border-box',
margin: 0,
minWidth: 0
}, base, variant, _styled_system_space__WEBPACK_IMPORTED_MODULE_2__["default"], _styled_system_color__WEBPACK_IMPORTED_MODULE_3__["default"], sx, props => props.css);
Box.displayName = 'Box';
const Flex = (0,_emotion_styled__WEBPACK_IMPORTED_MODULE_0__["default"])(Box)({
display: 'flex'
});
Flex.displayName = 'Flex';
function _extends() {
_extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
const px = n => typeof n === 'number' ? n + 'px' : n;
const widthToColumns = (width, repeat) => Array.isArray(width) ? width.map(w => widthToColumns(w, repeat)) : !!width && `repeat(auto-${repeat}, minmax(${px(width)}, 1fr))`;
const countToColumns = n => Array.isArray(n) ? n.map(countToColumns) : !!n && (typeof n === 'number' ? `repeat(${n}, 1fr)` : n);
const Grid = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Grid({
width,
columns,
gap = 3,
repeat = 'fit',
...props
}, ref) {
const gridTemplateColumns = !!width ? widthToColumns(width, repeat) : countToColumns(columns);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref
}, props, {
__themeKey: "grids",
__css: {
display: 'grid',
gridGap: gap,
gridTemplateColumns
}
}));
});
const Button = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Button(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
as: "button",
variant: "primary"
}, props, {
__themeKey: "buttons",
__css: {
appearance: 'none',
display: props.hidden ? undefined : 'inline-block',
textAlign: 'center',
lineHeight: 'inherit',
textDecoration: 'none',
fontSize: 'inherit',
px: 3,
py: 2,
color: 'white',
bg: 'primary',
border: 0,
borderRadius: 4
}
}));
});
const Link = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Link(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
as: "a",
variant: "styles.a"
}, props, {
__themeKey: "links"
}));
});
const Paragraph = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Paragraph(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
as: "p",
variant: "paragraph",
__themeKey: "text",
__css: {
fontFamily: 'body',
fontWeight: 'body',
lineHeight: 'body'
}
}, props));
});
const Text = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Text(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
as: "span",
ref: ref,
variant: "default"
}, props, {
__themeKey: "text"
}));
});
const Heading = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Heading(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
as: "h2",
variant: "heading"
}, props, {
__themeKey: "text",
__css: {
fontFamily: 'heading',
fontWeight: 'heading',
lineHeight: 'heading'
}
}));
});
const Image = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Image(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
as: "img"
}, props, {
__themeKey: "images",
__css: {
maxWidth: '100%',
height: 'auto',
...props.__css
}
}));
});
const Card = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Card(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
variant: "primary"
}, props, {
__themeKey: "cards"
}));
});
const Label = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Label(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
as: "label",
variant: "label"
}, props, {
__themeKey: "forms",
__css: {
width: '100%',
display: 'flex'
}
}));
});
/** @type {import('theme-ui').ThemeUIStyleObject} */
const autofillStyles = {
boxShadow: 'inset 0 0 0 1000px var(--theme-ui-input-autofill-bg)',
fontSize: 'inherit',
':first-line': {
fontSize: '1rem'
}
};
/** @type {import('theme-ui').ThemeUIStyleObject} */
const defaultInputStyles = {
display: 'block',
width: '100%',
p: 2,
appearance: 'none',
fontSize: 'inherit',
lineHeight: 'inherit',
border: '1px solid',
borderRadius: 4,
color: 'inherit',
bg: 'transparent',
':autofill, :autofill:hover, :autofill:focus': autofillStyles,
':-webkit-autofill, :-webkit-autofill:hover, :-webkit-autofill:focus': autofillStyles
};
const Input = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Input({
sx,
autofillBackgroundColor = 'background',
...rest
}, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
as: "input",
variant: "input",
sx: {
'--theme-ui-input-autofill-bg': theme => (0,_theme_ui_css__WEBPACK_IMPORTED_MODULE_5__.get)(theme.colors, autofillBackgroundColor, null),
...sx
}
}, rest, {
__themeKey: "forms",
__css: defaultInputStyles
}));
});
const SVG = ({
size = 24,
...props
}) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
as: "svg",
xmlns: "http://www.w3.org/2000/svg",
width: size + '',
height: size + '',
viewBox: "0 0 24 24",
fill: "currentcolor"
}, props));
SVG.displayName = 'SVG';
const getProps = test => props => {
const next = {};
for (const key in props) {
if (test(key || '')) next[key] = props[key];
}
return next;
};
const MRE = /^m[trblxy]?$/;
const getMargin = getProps(k => MRE.test(k));
const omitMargin = getProps(k => !MRE.test(k));
const DownArrow = props => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(SVG, props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement("path", {
d: "M7 10l5 5 5-5z"
}));
const Select = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Select({
arrow,
...props
}, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({}, getMargin(props), {
sx: {
display: 'flex'
}
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
as: "select",
variant: "select"
}, omitMargin(props), {
__themeKey: "forms",
__css: {
display: 'block',
width: '100%',
p: 2,
appearance: 'none',
fontSize: 'inherit',
lineHeight: 'inherit',
border: '1px solid',
borderRadius: 4,
color: 'inherit',
backgroundColor: theme => (0,_theme_ui_css__WEBPACK_IMPORTED_MODULE_5__.get)(theme, 'colors.background', null)
}
})), arrow || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(DownArrow, {
sx: {
ml: -28,
alignSelf: 'center',
pointerEvents: 'none'
}
}));
});
const Textarea = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Textarea(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
as: "textarea",
variant: "textarea"
}, props, {
__themeKey: "forms",
__css: {
display: 'block',
width: '100%',
p: 2,
appearance: 'none',
fontSize: 'inherit',
lineHeight: 'inherit',
border: '1px solid',
borderRadius: 4,
color: 'inherit',
bg: 'transparent'
}
}));
});
const RadioChecked = props => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(SVG, props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement("path", {
d: "M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
}));
const RadioUnchecked = props => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(SVG, props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement("path", {
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
}));
const RadioIcon = props => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement((react__WEBPACK_IMPORTED_MODULE_4___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(RadioChecked, _extends({}, props, {
__css: {
display: 'none',
'input:checked ~ &': {
display: 'block'
}
}
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(RadioUnchecked, _extends({}, props, {
__css: {
display: 'block',
'input:checked ~ &': {
display: 'none'
}
}
})));
const Radio = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Radio({
className,
sx,
variant = 'radio',
...props
}, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, {
sx: {
minWidth: 'min-content'
}
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
as: "input",
type: "radio"
}, props, {
sx: {
position: 'absolute',
opacity: 0,
zIndex: -1,
width: 1,
height: 1,
overflow: 'hidden'
}
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, {
as: RadioIcon,
"aria-hidden": "true",
__themeKey: "forms",
variant: variant,
className: className,
sx: sx,
__css: {
// todo: system props??
mr: 2,
borderRadius: 9999,
color: 'gray',
flexShrink: 0,
'input:checked ~ &': {
color: 'primary'
},
'input:focus ~ &': {
bg: 'highlight'
}
}
}));
});
const CheckboxChecked = props => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(SVG, props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement("path", {
d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
}));
const CheckboxUnchecked = props => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(SVG, props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement("path", {
d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
}));
const CheckboxIcon = props => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement((react__WEBPACK_IMPORTED_MODULE_4___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(CheckboxChecked, _extends({}, props, {
__css: {
display: 'none',
'input:checked ~ &': {
display: 'block'
}
}
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(CheckboxUnchecked, _extends({}, props, {
__css: {
display: 'block',
'input:checked ~ &': {
display: 'none'
}
}
})));
const Checkbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Checkbox({
className,
sx,
variant = 'checkbox',
children,
...props
}, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, {
sx: {
minWidth: 'min-content'
}
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
as: "input",
type: "checkbox"
}, props, {
sx: {
position: 'absolute',
opacity: 0,
zIndex: -1,
width: 1,
height: 1,
overflow: 'hidden'
}
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, {
as: CheckboxIcon,
"aria-hidden": "true",
__themeKey: "forms",
variant: variant,
className: className,
sx: sx,
__css: {
mr: 2,
borderRadius: 4,
color: 'gray',
flexShrink: 0,
'input:checked ~ &': {
color: 'primary'
},
'input:focus ~ &': {
color: 'primary',
bg: 'highlight'
}
}
}), children);
});
const GUTTER = 2;
const SIZE = 18;
const Switch = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Switch({
className,
label,
sx,
variant = 'switch',
...props
}, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Label, {
sx: {
cursor: 'pointer'
}
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
as: "input",
type: "checkbox",
__themeKey: "forms",
"aria-label": label
}, props, {
sx: {
position: 'absolute',
opacity: 0,
zIndex: -1,
width: 1,
height: 1,
overflow: 'hidden'
}
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, {
css: {
padding: GUTTER
},
__themeKey: "forms",
variant: variant,
className: className,
sx: sx,
__css: {
position: 'relative',
bg: 'gray',
borderRadius: SIZE,
height: SIZE + GUTTER * 2,
width: SIZE * 2 + GUTTER * 2,
mr: 2,
'input:disabled ~ &': {
opacity: 0.5,
cursor: 'not-allowed'
},
'& > div': {
display: 'flex',
alignItems: 'center',
borderRadius: '50%',
height: SIZE,
width: SIZE,
bg: 'white',
boxShadow: '0 1px 2px rgba(0, 0, 0, 0.1)',
position: 'relative',
transform: 'translateX(0%)',
transition: `transform 240ms cubic-bezier(0.165, 0.840, 0.440, 1.000)`
},
'input:checked ~ &': {
bg: 'primary',
'> div': {
transform: 'translateX(100%)'
}
}
}
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement("span", null, label));
});
const thumb = {
appearance: 'none',
width: 16,
height: 16,
bg: 'currentcolor',
border: 0,
borderRadius: 9999,
variant: 'forms.slider.thumb'
};
const Slider = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Slider(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
as: "input",
type: "range",
variant: "slider"
}, props, {
__themeKey: "forms",
__css: {
display: 'block',
width: '100%',
height: 4,
my: 2,
cursor: 'pointer',
appearance: 'none',
borderRadius: 9999,
color: 'inherit',
bg: 'gray',
':focus': {
outline: 'none',
color: 'primary'
},
'&::-webkit-slider-thumb': thumb,
'&::-moz-range-thumb': thumb,
'&::-ms-thumb': thumb
}
}));
});
const Field = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Field({
as: Control = Input,
label,
id,
name,
...props
}, ref) {
const fieldIdentifier = id || name;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, getMargin(props), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Label, {
htmlFor: fieldIdentifier
}, label), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Control, _extends({
ref: ref,
id: fieldIdentifier,
name: name
}, omitMargin(props))));
});
const Progress = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Progress(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
as: "progress",
variant: "styles.progress"
}, props, {
__css: {
display: 'block',
width: '100%',
height: '4px',
margin: 0,
padding: 0,
overflow: 'hidden',
appearance: 'none',
color: 'primary',
bg: 'gray',
borderRadius: 9999,
border: 'none',
'&::-webkit-progress-bar': {
bg: 'transparent'
},
'&::-webkit-progress-value': {
bg: 'currentcolor'
},
'&::-moz-progress-bar': {
bg: 'currentcolor'
}
}
}));
});
const Donut = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Donut({
size = 128,
strokeWidth = 2,
value = 0,
min = 0,
max = 1,
title,
...props
}, ref) {
const r = 16 - strokeWidth;
const C = 2 * r * Math.PI;
const offset = C - (value - min) / (max - min) * C;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
as: "svg",
viewBox: "0 0 32 32",
width: size,
height: size,
strokeWidth: strokeWidth,
fill: "none",
stroke: "currentcolor",
role: "img",
"aria-valuenow": value,
"aria-valuemin": min,
"aria-valuemax": max
}, props, {
__css: {
color: 'primary'
}
}), title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement("title", null, title), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement("circle", {
cx: 16,
cy: 16,
r: r,
opacity: 1 / 8
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement("circle", {
cx: 16,
cy: 16,
r: r,
strokeDasharray: C,
strokeDashoffset: offset,
transform: "rotate(-90 16 16)"
}));
});
const spin = (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.keyframes)({
from: {
transform: 'rotate(0deg)'
},
to: {
transform: 'rotate(360deg)'
}
});
const Spinner = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Spinner({
size = 48,
strokeWidth = 4,
max = 1,
title = 'Loading...',
duration = 500,
...props
}, ref) {
const r = 16 - strokeWidth;
const C = 2 * r * Math.PI;
const offset = C - 1 / 4 * C;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
as: "svg",
viewBox: "0 0 32 32",
width: size,
height: size,
strokeWidth: strokeWidth,
fill: "none",
stroke: "currentcolor",
role: "img"
}, props, {
__css: {
color: 'primary',
overflow: 'visible'
}
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement("title", null, title), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement("circle", {
cx: 16,
cy: 16,
r: r,
opacity: 1 / 8
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, {
as: "circle",
cx: 16,
cy: 16,
r: r,
strokeDasharray: C,
strokeDashoffset: offset,
__css: {
transformOrigin: '50% 50%',
animationName: spin.toString(),
animationTimingFunction: 'linear',
animationDuration: duration + 'ms',
animationIterationCount: 'infinite'
}
}));
});
const Avatar = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Avatar({
size = 48,
...props
}, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Image, _extends({
ref: ref,
width: size,
height: size,
variant: "avatar"
}, props, {
__css: {
borderRadius: 9999
}
}));
});
const Badge = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Badge(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
variant: "primary"
}, props, {
__themeKey: "badges",
__css: {
display: 'inline-block',
verticalAlign: 'baseline',
fontSize: 0,
fontWeight: 'bold',
whiteSpace: 'nowrap',
px: 1,
borderRadius: 2,
color: 'white',
bg: 'primary'
}
}));
});
const IconButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function IconButton({
size = 32,
...props
}, ref) {
var _props$__css;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
as: "button",
variant: "icon"
}, props, {
__themeKey: "buttons",
__css: {
label: ((_props$__css = props.__css) == null ? void 0 : _props$__css.label) || 'IconButton',
appearance: 'none',
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
padding: 1,
width: size,
height: size,
color: 'inherit',
bg: 'transparent',
border: 'none',
borderRadius: 4
}
}));
});
const x = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "24",
height: "24",
fill: "currentcolor",
viewBox: "0 0 24 24"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement("path", {
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
}));
const Close = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Close({
size = 32,
...props
}, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(IconButton, _extends({
ref: ref,
size: size,
title: "Close",
"aria-label": "Close",
variant: "close"
}, props, {
children: x
}));
});
const Alert = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Alert(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
variant: "primary"
}, props, {
__themeKey: "alerts",
__css: {
display: 'flex',
alignItems: 'center',
px: 3,
py: 2,
fontWeight: 'bold',
color: 'white',
bg: 'primary',
borderRadius: 4
}
}));
});
const Divider = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Divider(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
as: "hr",
variant: "styles.hr"
}, props, {
__css: {
color: 'gray',
m: 0,
my: 2,
border: 0,
borderBottom: '1px solid'
}
}));
});
const getContainerProps = getProps(__isBoxStyledSystemProp);
const getIframeProps = getProps(str => !__isBoxStyledSystemProp(str));
/** @typedef {import("../index").EmbedProps} EmbedProps */
/** @type {React.ForwardRefExoticComponent} */
const Embed = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Embed({
variant,
sx,
ratio = 16 / 9,
src,
frameBorder = 0,
allowFullScreen = true,
width = 560,
height = 315,
allow,
...rest
}, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
variant: variant,
sx: sx,
__css: {
width: '100%',
height: 0,
paddingBottom: 100 / ratio + '%',
position: 'relative',
overflow: 'hidden'
}
}, getContainerProps(rest)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
as: "iframe",
src: src,
width: width,
height: height,
frameBorder: frameBorder,
allowFullScreen: allowFullScreen,
allow: allow
}, getIframeProps(rest), {
__css: {
position: 'absolute',
width: '100%',
height: '100%',
top: 0,
bottom: 0,
left: 0,
border: 0
}
})));
});
const AspectRatio = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function AspectRatio({
ratio = 4 / 3,
children,
...props
}, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, {
ref: ref,
sx: {
position: 'relative',
overflow: 'hidden'
}
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, {
sx: {
width: '100%',
height: 0,
paddingBottom: 100 / ratio + '%'
}
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({}, props, {
__css: {
position: 'absolute',
top: 0,
right: 0,
bottom: 0,
left: 0
}
}), children));
});
const AspectImage = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function AspectImage({
ratio,
...props
}, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(AspectRatio, {
ratio: ratio
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Image, _extends({
ref: ref
}, props, {
__css: {
objectFit: 'cover'
}
})));
});
const Container = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Container(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref,
variant: "container"
}, props, {
__themeKey: "layout",
__css: {
width: '100%',
maxWidth: 'container',
mx: 'auto'
}
}));
});
const NavLink = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function NavLink(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Link, _extends({
ref: ref,
variant: "nav"
}, props, {
__css: {
color: 'inherit',
textDecoration: 'none',
fontWeight: 'bold',
display: 'inline-block',
'&:hover, &:focus, &.active': {
color: 'primary'
}
}
}));
});
const Message = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function Message(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, _extends({
ref: ref
}, props, {
__themeKey: "messages",
__css: {
padding: 3,
paddingLeft: t => t.space[3] - t.space[1],
borderLeftWidth: t => t.space[1],
borderLeftStyle: 'solid',
borderLeftColor: 'primary',
borderRadius: 4,
bg: 'highlight'
}
}));
});
const MenuIcon = ({
size = 24
}) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Box, {
as: "svg",
xmlns: "http://www.w3.org/2000/svg",
width: size,
height: size,
fill: "currentcolor",
viewBox: "0 0 24 24",
sx: {
display: 'block',
margin: 0
}
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement("path", {
d: "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"
}));
const MenuButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function MenuButton(props, ref) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(IconButton, _extends({
ref: ref,
title: "Menu",
"aria-label": "Toggle Menu",
variant: "menu"
}, props), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(MenuIcon, null));
});
/***/ }),
/***/ "./node_modules/@theme-ui/core/dist/theme-ui-core.esm.js":
/*!***************************************************************!*\
!*** ./node_modules/@theme-ui/core/dist/theme-ui-core.esm.js ***!
\***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "ThemeProvider": () => (/* binding */ ThemeProvider),
/* harmony export */ "__ThemeUIContext": () => (/* binding */ __ThemeUIContext),
/* harmony export */ "__ThemeUIInternalBaseThemeProvider": () => (/* binding */ __ThemeUIInternalBaseThemeProvider),
/* harmony export */ "createElement": () => (/* binding */ createElement),
/* harmony export */ "jsx": () => (/* binding */ jsx),
/* harmony export */ "merge": () => (/* binding */ merge),
/* harmony export */ "useThemeUI": () => (/* binding */ useThemeUI)
/* harmony export */ });
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-element-fc314d24.esm.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var deepmerge__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! deepmerge */ "./node_modules/deepmerge/dist/cjs.js");
/* harmony import */ var deepmerge__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(deepmerge__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _emotion_react_package_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @emotion/react/package.json */ "./node_modules/@emotion/react/package.json");
/* harmony import */ var _theme_ui_parse_props__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @theme-ui/parse-props */ "./node_modules/@theme-ui/parse-props/dist/theme-ui-parse-props.esm.js");
const __EMOTION_VERSION__ = _emotion_react_package_json__WEBPACK_IMPORTED_MODULE_2__.version;
const jsx = (type, props, ...children) => (0,_emotion_react__WEBPACK_IMPORTED_MODULE_3__.jsx)(type, (0,_theme_ui_parse_props__WEBPACK_IMPORTED_MODULE_4__["default"])(props), ...children);
/**
* @internal for Babel JSX pragma
* @see https://github.com/system-ui/theme-ui/issues/1603
*/
const createElement = jsx;
/**
* @internal
*/
const __ThemeUIContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({
__EMOTION_VERSION__,
theme: {}
});
const useThemeUI = () => (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(__ThemeUIContext);
const canUseSymbol = typeof Symbol === 'function' && Symbol.for;
const REACT_ELEMENT = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
const FORWARD_REF = canUseSymbol ? Symbol.for('react.forward_ref') : 0xeac7;
const deepmergeOptions = {
isMergeableObject: n => {
return !!n && typeof n === 'object' && n.$$typeof !== REACT_ELEMENT && n.$$typeof !== FORWARD_REF;
},
arrayMerge: (_leftArray, rightArray) => rightArray
};
/**
* Deeply merge themes
*/
const merge = (a, b) => deepmerge__WEBPACK_IMPORTED_MODULE_1___default()(a, b, deepmergeOptions);
function mergeAll(...args) {
return deepmerge__WEBPACK_IMPORTED_MODULE_1___default().all(args, deepmergeOptions);
}
merge.all = mergeAll;
/**
* @internal
*/
const __ThemeUIInternalBaseThemeProvider = ({
context,
children
}) => jsx(_emotion_react__WEBPACK_IMPORTED_MODULE_5__.T.Provider, {
value: context.theme
}, jsx(__ThemeUIContext.Provider, {
value: context,
children
}));
function ThemeProvider({
theme,
children
}) {
const outer = useThemeUI();
if (true) {
if (outer.__EMOTION_VERSION__ !== __EMOTION_VERSION__) {
console.warn('Multiple versions of Emotion detected,', 'and theming might not work as expected.', 'Please ensure there is only one copy of @emotion/react installed in your application.');
}
}
const context = typeof theme === 'function' ? { ...outer,
theme: theme(outer.theme)
} : merge.all({}, outer, {
theme
});
return jsx(__ThemeUIInternalBaseThemeProvider, {
context
}, children);
}
/***/ }),
/***/ "./node_modules/@theme-ui/css/dist/theme-ui-css.esm.js":
/*!*************************************************************!*\
!*** ./node_modules/@theme-ui/css/dist/theme-ui-css.esm.js ***!
\*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "THEME_UI_DEFAULT_KEY": () => (/* binding */ THEME_UI_DEFAULT_KEY),
/* harmony export */ "css": () => (/* binding */ css),
/* harmony export */ "defaultBreakpoints": () => (/* binding */ defaultBreakpoints),
/* harmony export */ "get": () => (/* binding */ get),
/* harmony export */ "getObjectWithVariants": () => (/* binding */ getObjectWithVariants),
/* harmony export */ "multiples": () => (/* binding */ multiples),
/* harmony export */ "scales": () => (/* binding */ scales)
/* harmony export */ });
/**
* Allows for nested scales with shorthand values
* @example
* {
* colors: {
* primary: { __default: '#00f', light: '#33f' }
* }
* }
* css({ color: 'primary' }); // { color: '#00f' }
* css({ color: 'primary.light' }) // { color: '#33f' }
*/
const THEME_UI_DEFAULT_KEY = '__default';
const hasDefault = x => {
return typeof x === 'object' && x !== null && THEME_UI_DEFAULT_KEY in x;
};
/**
* Extracts value under path from a deeply nested object.
* Used for Themes, variants and Theme UI style objects.
* Given a path to object with `__default` key, returns the value under that key.
*
* @param obj a theme, variant or style object
* @param path path separated with dots (`.`)
* @param fallback default value returned if get(obj, path) is not found
*/
function get(obj, path, fallback, p, undef) {
const pathArray = path && typeof path === 'string' ? path.split('.') : [path];
for (p = 0; p < pathArray.length; p++) {
obj = obj ? obj[pathArray[p]] : undef;
}
if (obj === undef) return fallback;
return hasDefault(obj) ? obj[THEME_UI_DEFAULT_KEY] : obj;
}
const getObjectWithVariants = (obj, theme) => {
if (obj && obj['variant']) {
let result = {};
for (const key in obj) {
const x = obj[key];
if (key === 'variant') {
const val = typeof x === 'function' ? x(theme) : x;
const variant = getObjectWithVariants(get(theme, val), theme);
result = { ...result,
...variant
};
} else {
result[key] = x;
}
}
return result;
}
return obj;
};
const defaultBreakpoints = [40, 52, 64].map(n => n + 'em');
const defaultTheme = {
space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
fontSizes: [12, 14, 16, 20, 24, 32, 48, 64, 72]
};
const aliases = {
bg: 'backgroundColor',
m: 'margin',
mt: 'marginTop',
mr: 'marginRight',
mb: 'marginBottom',
ml: 'marginLeft',
mx: 'marginX',
my: 'marginY',
p: 'padding',
pt: 'paddingTop',
pr: 'paddingRight',
pb: 'paddingBottom',
pl: 'paddingLeft',
px: 'paddingX',
py: 'paddingY'
};
const multiples = {
marginX: ['marginLeft', 'marginRight'],
marginY: ['marginTop', 'marginBottom'],
paddingX: ['paddingLeft', 'paddingRight'],
paddingY: ['paddingTop', 'paddingBottom'],
scrollMarginX: ['scrollMarginLeft', 'scrollMarginRight'],
scrollMarginY: ['scrollMarginTop', 'scrollMarginBottom'],
scrollPaddingX: ['scrollPaddingLeft', 'scrollPaddingRight'],
scrollPaddingY: ['scrollPaddingTop', 'scrollPaddingBottom'],
size: ['width', 'height']
};
const scales = {
color: 'colors',
backgroundColor: 'colors',
borderColor: 'colors',
caretColor: 'colors',
columnRuleColor: 'colors',
textDecorationColor: 'colors',
opacity: 'opacities',
transition: 'transitions',
margin: 'space',
marginTop: 'space',
marginRight: 'space',
marginBottom: 'space',
marginLeft: 'space',
marginX: 'space',
marginY: 'space',
marginBlock: 'space',
marginBlockEnd: 'space',
marginBlockStart: 'space',
marginInline: 'space',
marginInlineEnd: 'space',
marginInlineStart: 'space',
padding: 'space',
paddingTop: 'space',
paddingRight: 'space',
paddingBottom: 'space',
paddingLeft: 'space',
paddingX: 'space',
paddingY: 'space',
paddingBlock: 'space',
paddingBlockEnd: 'space',
paddingBlockStart: 'space',
paddingInline: 'space',
paddingInlineEnd: 'space',
paddingInlineStart: 'space',
scrollMargin: 'space',
scrollMarginTop: 'space',
scrollMarginRight: 'space',
scrollMarginBottom: 'space',
scrollMarginLeft: 'space',
scrollMarginX: 'space',
scrollMarginY: 'space',
scrollPadding: 'space',
scrollPaddingTop: 'space',
scrollPaddingRight: 'space',
scrollPaddingBottom: 'space',
scrollPaddingLeft: 'space',
scrollPaddingX: 'space',
scrollPaddingY: 'space',
inset: 'space',
insetBlock: 'space',
insetBlockEnd: 'space',
insetBlockStart: 'space',
insetInline: 'space',
insetInlineEnd: 'space',
insetInlineStart: 'space',
top: 'space',
right: 'space',
bottom: 'space',
left: 'space',
gridGap: 'space',
gridColumnGap: 'space',
gridRowGap: 'space',
gap: 'space',
columnGap: 'space',
rowGap: 'space',
fontFamily: 'fonts',
fontSize: 'fontSizes',
fontWeight: 'fontWeights',
lineHeight: 'lineHeights',
letterSpacing: 'letterSpacings',
border: 'borders',
borderTop: 'borders',
borderRight: 'borders',
borderBottom: 'borders',
borderLeft: 'borders',
borderWidth: 'borderWidths',
borderStyle: 'borderStyles',
borderRadius: 'radii',
borderTopRightRadius: 'radii',
borderTopLeftRadius: 'radii',
borderBottomRightRadius: 'radii',
borderBottomLeftRadius: 'radii',
borderTopWidth: 'borderWidths',
borderTopColor: 'colors',
borderTopStyle: 'borderStyles',
borderBottomWidth: 'borderWidths',
borderBottomColor: 'colors',
borderBottomStyle: 'borderStyles',
borderLeftWidth: 'borderWidths',
borderLeftColor: 'colors',
borderLeftStyle: 'borderStyles',
borderRightWidth: 'borderWidths',
borderRightColor: 'colors',
borderRightStyle: 'borderStyles',
borderBlock: 'borders',
borderBlockColor: 'colors',
borderBlockEnd: 'borders',
borderBlockEndColor: 'colors',
borderBlockEndStyle: 'borderStyles',
borderBlockEndWidth: 'borderWidths',
borderBlockStart: 'borders',
borderBlockStartColor: 'colors',
borderBlockStartStyle: 'borderStyles',
borderBlockStartWidth: 'borderWidths',
borderBlockStyle: 'borderStyles',
borderBlockWidth: 'borderWidths',
borderEndEndRadius: 'radii',
borderEndStartRadius: 'radii',
borderInline: 'borders',
borderInlineColor: 'colors',
borderInlineEnd: 'borders',
borderInlineEndColor: 'colors',
borderInlineEndStyle: 'borderStyles',
borderInlineEndWidth: 'borderWidths',
borderInlineStart: 'borders',
borderInlineStartColor: 'colors',
borderInlineStartStyle: 'borderStyles',
borderInlineStartWidth: 'borderWidths',
borderInlineStyle: 'borderStyles',
borderInlineWidth: 'borderWidths',
borderStartEndRadius: 'radii',
borderStartStartRadius: 'radii',
columnRuleWidth: 'borderWidths',
outlineColor: 'colors',
boxShadow: 'shadows',
textShadow: 'shadows',
zIndex: 'zIndices',
width: 'sizes',
minWidth: 'sizes',
maxWidth: 'sizes',
height: 'sizes',
minHeight: 'sizes',
maxHeight: 'sizes',
flexBasis: 'sizes',
size: 'sizes',
blockSize: 'sizes',
inlineSize: 'sizes',
maxBlockSize: 'sizes',
maxInlineSize: 'sizes',
minBlockSize: 'sizes',
minInlineSize: 'sizes',
columnWidth: 'sizes',
// svg
fill: 'colors',
stroke: 'colors'
};
const positiveOrNegative = (scale, value) => {
if (typeof value !== 'number' || value >= 0) {
if (typeof value === 'string' && value.startsWith('-')) {
const valueWithoutMinus = value.substring(1);
const n = get(scale, valueWithoutMinus, valueWithoutMinus);
if (typeof n === 'number') {
return n * -1;
}
return `-${n}`;
}
return get(scale, value, value);
}
const absolute = Math.abs(value);
const n = get(scale, absolute, absolute);
if (typeof n === 'string') return '-' + n;
return Number(n) * -1;
};
const transforms = ['margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginBlock', 'marginBlockEnd', 'marginBlockStart', 'marginInline', 'marginInlineEnd', 'marginInlineStart', 'top', 'bottom', 'left', 'right'].reduce((acc, curr) => ({ ...acc,
[curr]: positiveOrNegative
}), {});
const responsive = styles => theme => {
const next = {};
const breakpoints = theme && theme.breakpoints || defaultBreakpoints;
const mediaQueries = [null, ...breakpoints.map(n => n.includes('@media') ? n : `@media screen and (min-width: ${n})`)];
for (const k in styles) {
const key = k;
let value = styles[key];
if (typeof value === 'function') {
value = value(theme || {});
}
if (value === false || value == null) {
continue;
}
if (!Array.isArray(value)) {
next[key] = value;
continue;
}
for (let i = 0; i < value.slice(0, mediaQueries.length).length; i++) {
const media = mediaQueries[i];
if (!media) {
next[key] = value[i];
continue;
}
next[media] = next[media] || {};
if (value[i] == null) continue;
next[media][key] = value[i];
}
}
return next;
};
const css = (args = {}) => (props = {}) => {
const theme = { ...defaultTheme,
...('theme' in props ? props.theme : props)
}; // insert variant props before responsive styles, so they can be merged
// we need to maintain order of the style props, so if a variant is place in the middle
// of other props, it will extends its props at that same location order.
const obj = getObjectWithVariants(typeof args === 'function' ? args(theme) : args, theme);
const styles = responsive(obj)(theme);
let result = {};
for (const key in styles) {
const x = styles[key];
const val = typeof x === 'function' ? x(theme) : x;
if (val && typeof val === 'object') {
if (hasDefault(val)) {
result[key] = val[THEME_UI_DEFAULT_KEY];
continue;
} // On type level, val can also be an array here,
// but we transform all arrays in `responsive` function.
result[key] = css(val)(theme);
continue;
}
const prop = key in aliases ? aliases[key] : key;
const scaleName = prop in scales ? scales[prop] : undefined;
const scale = scaleName ? theme == null ? void 0 : theme[scaleName] : get(theme, prop, {});
const transform = get(transforms, prop, get);
const value = transform(scale, val, val);
if (prop in multiples) {
const dirs = multiples[prop];
for (let i = 0; i < dirs.length; i++) {
result[dirs[i]] = value;
}
} else {
result[prop] = value;
}
}
return result;
};
/***/ }),
/***/ "./node_modules/@theme-ui/mdx/dist/theme-ui-mdx.esm.js":
/*!*************************************************************!*\
!*** ./node_modules/@theme-ui/mdx/dist/theme-ui-mdx.esm.js ***!
\*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "MDXProvider": () => (/* binding */ MDXProvider),
/* harmony export */ "Styled": () => (/* binding */ Styled),
/* harmony export */ "Themed": () => (/* binding */ Themed),
/* harmony export */ "components": () => (/* binding */ components),
/* harmony export */ "themed": () => (/* binding */ themed)
/* harmony export */ });
/* harmony import */ var _theme_ui_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @theme-ui/core */ "./node_modules/@theme-ui/core/dist/theme-ui-core.esm.js");
/* harmony import */ var _theme_ui_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @theme-ui/css */ "./node_modules/@theme-ui/css/dist/theme-ui-css.esm.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _emotion_styled__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @emotion/styled */ "./node_modules/@emotion/styled/dist/emotion-styled.esm.js");
/* harmony import */ var _mdx_js_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mdx-js/react */ "./node_modules/@mdx-js/react/dist/esm.js");
// mdx components
const tags = ['p', 'b', 'i', 'a', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'img', 'pre', 'code', 'ol', 'ul', 'li', 'blockquote', 'hr', 'em', 'table', 'tr', 'th', 'td', 'em', 'strong', 'del', // mdx
'inlineCode', 'thematicBreak', // other
'div', // theme-ui
'root'];
const aliases = {
inlineCode: 'code',
thematicBreak: 'hr',
root: 'div'
};
const isAlias = x => x in aliases;
const alias = n => isAlias(n) ? aliases[n] : n;
const propOverrides = {
th: {
align: 'textAlign'
},
td: {
align: 'textAlign'
}
};
const themed = key => ({
theme,
...rest
}) => {
const propsStyle = propOverrides[key];
const extraStyles = propsStyle ? Object.keys(rest).filter(prop => propsStyle[prop] !== undefined).reduce((acc, prop) => ({ ...acc,
[propsStyle[prop]]: rest[prop]
}), {}) : undefined;
return (0,_theme_ui_css__WEBPACK_IMPORTED_MODULE_3__.css)({ ...(0,_theme_ui_css__WEBPACK_IMPORTED_MODULE_3__.get)(theme, `styles.${key}`),
...extraStyles
})(theme);
}; // opt out of typechecking whenever `as` prop is used
const Themed = (0,_emotion_styled__WEBPACK_IMPORTED_MODULE_1__["default"])('div')(themed('div'));
/**
* @deprecated since 0.6.0.
*
* `Styled` was renamed to `Themed` to avoid confusion with styled components.
*/
const Styled = (0,_emotion_styled__WEBPACK_IMPORTED_MODULE_1__["default"])('div')(themed('div'));
const warnStyled = tag => props => {
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
if (true) {
console.warn('[theme-ui] The Styled component from "@theme-ui/mdx" is deprecated and will be removed in a future version. It has been renamed to Themed with the same API.');
}
}, []);
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(alias(tag), props);
};
const components = {};
tags.forEach(tag => {
// fixme?
components[tag] = (0,_emotion_styled__WEBPACK_IMPORTED_MODULE_1__["default"])(alias(tag))(themed(tag));
Themed[tag] = components[tag];
Styled[tag] = (0,_emotion_styled__WEBPACK_IMPORTED_MODULE_1__["default"])(warnStyled(tag))(themed(tag));
});
const createComponents = comps => {
const next = { ...components
};
const componentKeys = Object.keys(comps);
componentKeys.forEach(key => {
next[key] = (0,_emotion_styled__WEBPACK_IMPORTED_MODULE_1__["default"])(comps[key])(themed(key));
});
return next;
};
const MDXProvider = ({
components,
children
}) => {
const outer = (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_2__.useMDXComponents)();
return (0,_theme_ui_core__WEBPACK_IMPORTED_MODULE_4__.jsx)(_mdx_js_react__WEBPACK_IMPORTED_MODULE_2__.MDXProvider, {
components: createComponents({ ...outer,
...components
}),
children
});
};
/***/ }),
/***/ "./node_modules/@theme-ui/parse-props/dist/theme-ui-parse-props.esm.js":
/*!*****************************************************************************!*\
!*** ./node_modules/@theme-ui/parse-props/dist/theme-ui-parse-props.esm.js ***!
\*****************************************************************************/
/***/ ((__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 _theme_ui_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @theme-ui/css */ "./node_modules/@theme-ui/css/dist/theme-ui-css.esm.js");
const getCSS = props => theme => {
const styles = (0,_theme_ui_css__WEBPACK_IMPORTED_MODULE_0__.css)(props.sx)(theme);
const raw = typeof props.css === 'function' ? props.css(theme) : props.css;
return [styles, raw];
};
const parseProps = props => {
if (!props || !props.sx && !props.css) return props;
const next = {};
for (let key in props) {
if (key === 'sx') continue;
next[key] = props[key];
}
next.css = getCSS(props);
return next;
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (parseProps);
/***/ }),
/***/ "./node_modules/@theme-ui/theme-provider/dist/theme-ui-theme-provider.esm.js":
/*!***********************************************************************************!*\
!*** ./node_modules/@theme-ui/theme-provider/dist/theme-ui-theme-provider.esm.js ***!
\***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "ThemeProvider": () => (/* binding */ ThemeProvider)
/* harmony export */ });
/* harmony import */ var _theme_ui_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @theme-ui/core */ "./node_modules/@theme-ui/core/dist/theme-ui-core.esm.js");
/* harmony import */ var _theme_ui_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @theme-ui/css */ "./node_modules/@theme-ui/css/dist/theme-ui-css.esm.js");
/* harmony import */ var _theme_ui_color_modes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @theme-ui/color-modes */ "./node_modules/@theme-ui/color-modes/dist/theme-ui-color-modes.esm.js");
/* harmony import */ var _theme_ui_mdx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @theme-ui/mdx */ "./node_modules/@theme-ui/mdx/dist/theme-ui-mdx.esm.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
const RootStyles = () => (0,_theme_ui_core__WEBPACK_IMPORTED_MODULE_0__.jsx)(_emotion_react__WEBPACK_IMPORTED_MODULE_1__.Global, {
styles: emotionTheme => {
var _theme$config;
const theme = emotionTheme;
const {
useRootStyles
} = theme.config || theme;
if (useRootStyles === false || theme.styles && !theme.styles.root) {
return null;
}
const boxSizing = ((_theme$config = theme.config) == null ? void 0 : _theme$config.useBorderBox) === false ? undefined : 'border-box';
return (0,_theme_ui_css__WEBPACK_IMPORTED_MODULE_2__.css)({
'*': {
boxSizing
},
html: {
variant: 'styles.root'
},
body: {
margin: 0
}
})(theme);
}
});
const ThemeProvider = ({
theme,
components,
children
}) => {
const outer = (0,_theme_ui_core__WEBPACK_IMPORTED_MODULE_0__.useThemeUI)();
if (typeof outer.setColorMode === 'function') {
return (0,_theme_ui_core__WEBPACK_IMPORTED_MODULE_0__.jsx)(_theme_ui_core__WEBPACK_IMPORTED_MODULE_0__.ThemeProvider, {
theme
}, (0,_theme_ui_core__WEBPACK_IMPORTED_MODULE_0__.jsx)(_theme_ui_mdx__WEBPACK_IMPORTED_MODULE_3__.MDXProvider, {
components,
children
}));
}
return (0,_theme_ui_core__WEBPACK_IMPORTED_MODULE_0__.jsx)(_theme_ui_core__WEBPACK_IMPORTED_MODULE_0__.ThemeProvider, {
theme
}, (0,_theme_ui_core__WEBPACK_IMPORTED_MODULE_0__.jsx)(_theme_ui_color_modes__WEBPACK_IMPORTED_MODULE_4__.ColorModeProvider, null, (0,_theme_ui_core__WEBPACK_IMPORTED_MODULE_0__.jsx)(RootStyles), (0,_theme_ui_core__WEBPACK_IMPORTED_MODULE_0__.jsx)(_theme_ui_mdx__WEBPACK_IMPORTED_MODULE_3__.MDXProvider, {
components,
children
})));
};
/***/ }),
/***/ "./node_modules/algoliasearch/dist/algoliasearch-lite.esm.browser.js":
/*!***************************************************************************!*\
!*** ./node_modules/algoliasearch/dist/algoliasearch-lite.esm.browser.js ***!
\***************************************************************************/
/***/ ((__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 */ });
function createBrowserLocalStorageCache(options) {
const namespaceKey = `algoliasearch-client-js-${options.key}`;
// eslint-disable-next-line functional/no-let
let storage;
const getStorage = () => {
if (storage === undefined) {
storage = options.localStorage || window.localStorage;
}
return storage;
};
const getNamespace = () => {
return JSON.parse(getStorage().getItem(namespaceKey) || '{}');
};
return {
get(key, defaultValue, events = {
miss: () => Promise.resolve(),
}) {
return Promise.resolve()
.then(() => {
const keyAsString = JSON.stringify(key);
const value = getNamespace()[keyAsString];
return Promise.all([value || defaultValue(), value !== undefined]);
})
.then(([value, exists]) => {
return Promise.all([value, exists || events.miss(value)]);
})
.then(([value]) => value);
},
set(key, value) {
return Promise.resolve().then(() => {
const namespace = getNamespace();
// eslint-disable-next-line functional/immutable-data
namespace[JSON.stringify(key)] = value;
getStorage().setItem(namespaceKey, JSON.stringify(namespace));
return value;
});
},
delete(key) {
return Promise.resolve().then(() => {
const namespace = getNamespace();
// eslint-disable-next-line functional/immutable-data
delete namespace[JSON.stringify(key)];
getStorage().setItem(namespaceKey, JSON.stringify(namespace));
});
},
clear() {
return Promise.resolve().then(() => {
getStorage().removeItem(namespaceKey);
});
},
};
}
// @todo Add logger on options to debug when caches go wrong.
function createFallbackableCache(options) {
const caches = [...options.caches];
const current = caches.shift(); // eslint-disable-line functional/immutable-data
if (current === undefined) {
return createNullCache();
}
return {
get(key, defaultValue, events = {
miss: () => Promise.resolve(),
}) {
return current.get(key, defaultValue, events).catch(() => {
return createFallbackableCache({ caches }).get(key, defaultValue, events);
});
},
set(key, value) {
return current.set(key, value).catch(() => {
return createFallbackableCache({ caches }).set(key, value);
});
},
delete(key) {
return current.delete(key).catch(() => {
return createFallbackableCache({ caches }).delete(key);
});
},
clear() {
return current.clear().catch(() => {
return createFallbackableCache({ caches }).clear();
});
},
};
}
function createNullCache() {
return {
get(_key, defaultValue, events = {
miss: () => Promise.resolve(),
}) {
const value = defaultValue();
return value
.then(result => Promise.all([result, events.miss(result)]))
.then(([result]) => result);
},
set(_key, value) {
return Promise.resolve(value);
},
delete(_key) {
return Promise.resolve();
},
clear() {
return Promise.resolve();
},
};
}
function createInMemoryCache(options = { serializable: true }) {
// eslint-disable-next-line functional/no-let
let cache = {};
return {
get(key, defaultValue, events = {
miss: () => Promise.resolve(),
}) {
const keyAsString = JSON.stringify(key);
if (keyAsString in cache) {
return Promise.resolve(options.serializable ? JSON.parse(cache[keyAsString]) : cache[keyAsString]);
}
const promise = defaultValue();
const miss = (events && events.miss) || (() => Promise.resolve());
return promise.then((value) => miss(value)).then(() => promise);
},
set(key, value) {
// eslint-disable-next-line functional/immutable-data
cache[JSON.stringify(key)] = options.serializable ? JSON.stringify(value) : value;
return Promise.resolve(value);
},
delete(key) {
// eslint-disable-next-line functional/immutable-data
delete cache[JSON.stringify(key)];
return Promise.resolve();
},
clear() {
cache = {};
return Promise.resolve();
},
};
}
function createAuth(authMode, appId, apiKey) {
const credentials = {
'x-algolia-api-key': apiKey,
'x-algolia-application-id': appId,
};
return {
headers() {
return authMode === AuthMode.WithinHeaders ? credentials : {};
},
queryParameters() {
return authMode === AuthMode.WithinQueryParameters ? credentials : {};
},
};
}
// eslint-disable-next-line functional/prefer-readonly-type
function shuffle(array) {
let c = array.length - 1; // eslint-disable-line functional/no-let
// eslint-disable-next-line functional/no-loop-statement
for (c; c > 0; c--) {
const b = Math.floor(Math.random() * (c + 1));
const a = array[c];
array[c] = array[b]; // eslint-disable-line functional/immutable-data, no-param-reassign
array[b] = a; // eslint-disable-line functional/immutable-data, no-param-reassign
}
return array;
}
function addMethods(base, methods) {
if (!methods) {
return base;
}
Object.keys(methods).forEach(key => {
// eslint-disable-next-line functional/immutable-data, no-param-reassign
base[key] = methods[key](base);
});
return base;
}
function encode(format, ...args) {
// eslint-disable-next-line functional/no-let
let i = 0;
return format.replace(/%s/g, () => encodeURIComponent(args[i++]));
}
const version = '4.11.0';
const AuthMode = {
/**
* If auth credentials should be in query parameters.
*/
WithinQueryParameters: 0,
/**
* If auth credentials should be in headers.
*/
WithinHeaders: 1,
};
function createMappedRequestOptions(requestOptions, timeout) {
const options = requestOptions || {};
const data = options.data || {};
Object.keys(options).forEach(key => {
if (['timeout', 'headers', 'queryParameters', 'data', 'cacheable'].indexOf(key) === -1) {
data[key] = options[key]; // eslint-disable-line functional/immutable-data
}
});
return {
data: Object.entries(data).length > 0 ? data : undefined,
timeout: options.timeout || timeout,
headers: options.headers || {},
queryParameters: options.queryParameters || {},
cacheable: options.cacheable,
};
}
const CallEnum = {
/**
* If the host is read only.
*/
Read: 1,
/**
* If the host is write only.
*/
Write: 2,
/**
* If the host is both read and write.
*/
Any: 3,
};
const HostStatusEnum = {
Up: 1,
Down: 2,
Timeouted: 3,
};
// By default, API Clients at Algolia have expiration delay
// of 5 mins. In the JavaScript client, we have 2 mins.
const EXPIRATION_DELAY = 2 * 60 * 1000;
function createStatefulHost(host, status = HostStatusEnum.Up) {
return {
...host,
status,
lastUpdate: Date.now(),
};
}
function isStatefulHostUp(host) {
return host.status === HostStatusEnum.Up || Date.now() - host.lastUpdate > EXPIRATION_DELAY;
}
function isStatefulHostTimeouted(host) {
return (host.status === HostStatusEnum.Timeouted && Date.now() - host.lastUpdate <= EXPIRATION_DELAY);
}
function createStatelessHost(options) {
if (typeof options === 'string') {
return {
protocol: 'https',
url: options,
accept: CallEnum.Any,
};
}
return {
protocol: options.protocol || 'https',
url: options.url,
accept: options.accept || CallEnum.Any,
};
}
const MethodEnum = {
Delete: 'DELETE',
Get: 'GET',
Post: 'POST',
Put: 'PUT',
};
function createRetryableOptions(hostsCache, statelessHosts) {
return Promise.all(statelessHosts.map(statelessHost => {
return hostsCache.get(statelessHost, () => {
return Promise.resolve(createStatefulHost(statelessHost));
});
})).then(statefulHosts => {
const hostsUp = statefulHosts.filter(host => isStatefulHostUp(host));
const hostsTimeouted = statefulHosts.filter(host => isStatefulHostTimeouted(host));
/**
* Note, we put the hosts that previously timeouted on the end of the list.
*/
const hostsAvailable = [...hostsUp, ...hostsTimeouted];
const statelessHostsAvailable = hostsAvailable.length > 0
? hostsAvailable.map(host => createStatelessHost(host))
: statelessHosts;
return {
getTimeout(timeoutsCount, baseTimeout) {
/**
* Imagine that you have 4 hosts, if timeouts will increase
* on the following way: 1 (timeouted) > 4 (timeouted) > 5 (200)
*
* Note that, the very next request, we start from the previous timeout
*
* 5 (timeouted) > 6 (timeouted) > 7 ...
*
* This strategy may need to be reviewed, but is the strategy on the our
* current v3 version.
*/
const timeoutMultiplier = hostsTimeouted.length === 0 && timeoutsCount === 0
? 1
: hostsTimeouted.length + 3 + timeoutsCount;
return timeoutMultiplier * baseTimeout;
},
statelessHosts: statelessHostsAvailable,
};
});
}
const isNetworkError = ({ isTimedOut, status }) => {
return !isTimedOut && ~~status === 0;
};
const isRetryable = (response) => {
const status = response.status;
const isTimedOut = response.isTimedOut;
return (isTimedOut || isNetworkError(response) || (~~(status / 100) !== 2 && ~~(status / 100) !== 4));
};
const isSuccess = ({ status }) => {
return ~~(status / 100) === 2;
};
const retryDecision = (response, outcomes) => {
if (isRetryable(response)) {
return outcomes.onRetry(response);
}
if (isSuccess(response)) {
return outcomes.onSuccess(response);
}
return outcomes.onFail(response);
};
function retryableRequest(transporter, statelessHosts, request, requestOptions) {
const stackTrace = []; // eslint-disable-line functional/prefer-readonly-type
/**
* First we prepare the payload that do not depend from hosts.
*/
const data = serializeData(request, requestOptions);
const headers = serializeHeaders(transporter, requestOptions);
const method = request.method;
// On `GET`, the data is proxied to query parameters.
const dataQueryParameters = request.method !== MethodEnum.Get
? {}
: {
...request.data,
...requestOptions.data,
};
const queryParameters = {
'x-algolia-agent': transporter.userAgent.value,
...transporter.queryParameters,
...dataQueryParameters,
...requestOptions.queryParameters,
};
let timeoutsCount = 0; // eslint-disable-line functional/no-let
const retry = (hosts, // eslint-disable-line functional/prefer-readonly-type
getTimeout) => {
/**
* We iterate on each host, until there is no host left.
*/
const host = hosts.pop(); // eslint-disable-line functional/immutable-data
if (host === undefined) {
throw createRetryError(stackTraceWithoutCredentials(stackTrace));
}
const payload = {
data,
headers,
method,
url: serializeUrl(host, request.path, queryParameters),
connectTimeout: getTimeout(timeoutsCount, transporter.timeouts.connect),
responseTimeout: getTimeout(timeoutsCount, requestOptions.timeout),
};
/**
* The stackFrame is pushed to the stackTrace so we
* can have information about onRetry and onFailure
* decisions.
*/
const pushToStackTrace = (response) => {
const stackFrame = {
request: payload,
response,
host,
triesLeft: hosts.length,
};
// eslint-disable-next-line functional/immutable-data
stackTrace.push(stackFrame);
return stackFrame;
};
const decisions = {
onSuccess: response => deserializeSuccess(response),
onRetry(response) {
const stackFrame = pushToStackTrace(response);
/**
* If response is a timeout, we increaset the number of
* timeouts so we can increase the timeout later.
*/
if (response.isTimedOut) {
timeoutsCount++;
}
return Promise.all([
/**
* Failures are individually send the logger, allowing
* the end user to debug / store stack frames even
* when a retry error does not happen.
*/
transporter.logger.info('Retryable failure', stackFrameWithoutCredentials(stackFrame)),
/**
* We also store the state of the host in failure cases. If the host, is
* down it will remain down for the next 2 minutes. In a timeout situation,
* this host will be added end of the list of hosts on the next request.
*/
transporter.hostsCache.set(host, createStatefulHost(host, response.isTimedOut ? HostStatusEnum.Timeouted : HostStatusEnum.Down)),
]).then(() => retry(hosts, getTimeout));
},
onFail(response) {
pushToStackTrace(response);
throw deserializeFailure(response, stackTraceWithoutCredentials(stackTrace));
},
};
return transporter.requester.send(payload).then(response => {
return retryDecision(response, decisions);
});
};
/**
* Finally, for each retryable host perform request until we got a non
* retryable response. Some notes here:
*
* 1. The reverse here is applied so we can apply a `pop` later on => more performant.
* 2. We also get from the retryable options a timeout multiplier that is tailored
* for the current context.
*/
return createRetryableOptions(transporter.hostsCache, statelessHosts).then(options => {
return retry([...options.statelessHosts].reverse(), options.getTimeout);
});
}
function createTransporter(options) {
const { hostsCache, logger, requester, requestsCache, responsesCache, timeouts, userAgent, hosts, queryParameters, headers, } = options;
const transporter = {
hostsCache,
logger,
requester,
requestsCache,
responsesCache,
timeouts,
userAgent,
headers,
queryParameters,
hosts: hosts.map(host => createStatelessHost(host)),
read(request, requestOptions) {
/**
* First, we compute the user request options. Now, keep in mind,
* that using request options the user is able to modified the intire
* payload of the request. Such as headers, query parameters, and others.
*/
const mappedRequestOptions = createMappedRequestOptions(requestOptions, transporter.timeouts.read);
const createRetryableRequest = () => {
/**
* Then, we prepare a function factory that contains the construction of
* the retryable request. At this point, we may *not* perform the actual
* request. But we want to have the function factory ready.
*/
return retryableRequest(transporter, transporter.hosts.filter(host => (host.accept & CallEnum.Read) !== 0), request, mappedRequestOptions);
};
/**
* Once we have the function factory ready, we need to determine of the
* request is "cacheable" - should be cached. Note that, once again,
* the user can force this option.
*/
const cacheable = mappedRequestOptions.cacheable !== undefined
? mappedRequestOptions.cacheable
: request.cacheable;
/**
* If is not "cacheable", we immediatly trigger the retryable request, no
* need to check cache implementations.
*/
if (cacheable !== true) {
return createRetryableRequest();
}
/**
* If the request is "cacheable", we need to first compute the key to ask
* the cache implementations if this request is on progress or if the
* response already exists on the cache.
*/
const key = {
request,
mappedRequestOptions,
transporter: {
queryParameters: transporter.queryParameters,
headers: transporter.headers,
},
};
/**
* With the computed key, we first ask the responses cache
* implemention if this request was been resolved before.
*/
return transporter.responsesCache.get(key, () => {
/**
* If the request has never resolved before, we actually ask if there
* is a current request with the same key on progress.
*/
return transporter.requestsCache.get(key, () => {
return (transporter.requestsCache
/**
* Finally, if there is no request in progress with the same key,
* this `createRetryableRequest()` will actually trigger the
* retryable request.
*/
.set(key, createRetryableRequest())
.then(response => Promise.all([transporter.requestsCache.delete(key), response]), err => Promise.all([transporter.requestsCache.delete(key), Promise.reject(err)]))
.then(([_, response]) => response));
});
}, {
/**
* Of course, once we get this response back from the server, we
* tell response cache to actually store the received response
* to be used later.
*/
miss: response => transporter.responsesCache.set(key, response),
});
},
write(request, requestOptions) {
/**
* On write requests, no cache mechanisms are applied, and we
* proxy the request immediately to the requester.
*/
return retryableRequest(transporter, transporter.hosts.filter(host => (host.accept & CallEnum.Write) !== 0), request, createMappedRequestOptions(requestOptions, transporter.timeouts.write));
},
};
return transporter;
}
function createUserAgent(version) {
const userAgent = {
value: `Algolia for JavaScript (${version})`,
add(options) {
const addedUserAgent = `; ${options.segment}${options.version !== undefined ? ` (${options.version})` : ''}`;
if (userAgent.value.indexOf(addedUserAgent) === -1) {
// eslint-disable-next-line functional/immutable-data
userAgent.value = `${userAgent.value}${addedUserAgent}`;
}
return userAgent;
},
};
return userAgent;
}
function deserializeSuccess(response) {
// eslint-disable-next-line functional/no-try-statement
try {
return JSON.parse(response.content);
}
catch (e) {
throw createDeserializationError(e.message, response);
}
}
function deserializeFailure({ content, status }, stackFrame) {
// eslint-disable-next-line functional/no-let
let message = content;
// eslint-disable-next-line functional/no-try-statement
try {
message = JSON.parse(content).message;
}
catch (e) {
// ..
}
return createApiError(message, status, stackFrame);
}
function serializeUrl(host, path, queryParameters) {
const queryParametersAsString = serializeQueryParameters(queryParameters);
// eslint-disable-next-line functional/no-let
let url = `${host.protocol}://${host.url}/${path.charAt(0) === '/' ? path.substr(1) : path}`;
if (queryParametersAsString.length) {
url += `?${queryParametersAsString}`;
}
return url;
}
function serializeQueryParameters(parameters) {
const isObjectOrArray = (value) => Object.prototype.toString.call(value) === '[object Object]' ||
Object.prototype.toString.call(value) === '[object Array]';
return Object.keys(parameters)
.map(key => encode('%s=%s', key, isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key]))
.join('&');
}
function serializeData(request, requestOptions) {
if (request.method === MethodEnum.Get ||
(request.data === undefined && requestOptions.data === undefined)) {
return undefined;
}
const data = Array.isArray(request.data)
? request.data
: { ...request.data, ...requestOptions.data };
return JSON.stringify(data);
}
function serializeHeaders(transporter, requestOptions) {
const headers = {
...transporter.headers,
...requestOptions.headers,
};
const serializedHeaders = {};
Object.keys(headers).forEach(header => {
const value = headers[header];
// @ts-ignore
// eslint-disable-next-line functional/immutable-data
serializedHeaders[header.toLowerCase()] = value;
});
return serializedHeaders;
}
function stackTraceWithoutCredentials(stackTrace) {
return stackTrace.map(stackFrame => stackFrameWithoutCredentials(stackFrame));
}
function stackFrameWithoutCredentials(stackFrame) {
const modifiedHeaders = stackFrame.request.headers['x-algolia-api-key']
? { 'x-algolia-api-key': '*****' }
: {};
return {
...stackFrame,
request: {
...stackFrame.request,
headers: {
...stackFrame.request.headers,
...modifiedHeaders,
},
},
};
}
function createApiError(message, status, transporterStackTrace) {
return {
name: 'ApiError',
message,
status,
transporterStackTrace,
};
}
function createDeserializationError(message, response) {
return {
name: 'DeserializationError',
message,
response,
};
}
function createRetryError(transporterStackTrace) {
return {
name: 'RetryError',
message: 'Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.',
transporterStackTrace,
};
}
const createSearchClient = options => {
const appId = options.appId;
const auth = createAuth(options.authMode !== undefined ? options.authMode : AuthMode.WithinHeaders, appId, options.apiKey);
const transporter = createTransporter({
hosts: [
{ url: `${appId}-dsn.algolia.net`, accept: CallEnum.Read },
{ url: `${appId}.algolia.net`, accept: CallEnum.Write },
].concat(shuffle([
{ url: `${appId}-1.algolianet.com` },
{ url: `${appId}-2.algolianet.com` },
{ url: `${appId}-3.algolianet.com` },
])),
...options,
headers: {
...auth.headers(),
...{ 'content-type': 'application/x-www-form-urlencoded' },
...options.headers,
},
queryParameters: {
...auth.queryParameters(),
...options.queryParameters,
},
});
const base = {
transporter,
appId,
addAlgoliaAgent(segment, version) {
transporter.userAgent.add({ segment, version });
},
clearCache() {
return Promise.all([
transporter.requestsCache.clear(),
transporter.responsesCache.clear(),
]).then(() => undefined);
},
};
return addMethods(base, options.methods);
};
const customRequest = (base) => {
return (request, requestOptions) => {
if (request.method === MethodEnum.Get) {
return base.transporter.read(request, requestOptions);
}
return base.transporter.write(request, requestOptions);
};
};
const initIndex = (base) => {
return (indexName, options = {}) => {
const searchIndex = {
transporter: base.transporter,
appId: base.appId,
indexName,
};
return addMethods(searchIndex, options.methods);
};
};
const multipleQueries = (base) => {
return (queries, requestOptions) => {
const requests = queries.map(query => {
return {
...query,
params: serializeQueryParameters(query.params || {}),
};
});
return base.transporter.read({
method: MethodEnum.Post,
path: '1/indexes/*/queries',
data: {
requests,
},
cacheable: true,
}, requestOptions);
};
};
const multipleSearchForFacetValues = (base) => {
return (queries, requestOptions) => {
return Promise.all(queries.map(query => {
const { facetName, facetQuery, ...params } = query.params;
return initIndex(base)(query.indexName, {
methods: { searchForFacetValues },
}).searchForFacetValues(facetName, facetQuery, {
...requestOptions,
...params,
});
}));
};
};
const findAnswers = (base) => {
return (query, queryLanguages, requestOptions) => {
return base.transporter.read({
method: MethodEnum.Post,
path: encode('1/answers/%s/prediction', base.indexName),
data: {
query,
queryLanguages,
},
cacheable: true,
}, requestOptions);
};
};
const search = (base) => {
return (query, requestOptions) => {
return base.transporter.read({
method: MethodEnum.Post,
path: encode('1/indexes/%s/query', base.indexName),
data: {
query,
},
cacheable: true,
}, requestOptions);
};
};
const searchForFacetValues = (base) => {
return (facetName, facetQuery, requestOptions) => {
return base.transporter.read({
method: MethodEnum.Post,
path: encode('1/indexes/%s/facets/%s/query', base.indexName, facetName),
data: {
facetQuery,
},
cacheable: true,
}, requestOptions);
};
};
const LogLevelEnum = {
Debug: 1,
Info: 2,
Error: 3,
};
/* eslint no-console: 0 */
function createConsoleLogger(logLevel) {
return {
debug(message, args) {
if (LogLevelEnum.Debug >= logLevel) {
console.debug(message, args);
}
return Promise.resolve();
},
info(message, args) {
if (LogLevelEnum.Info >= logLevel) {
console.info(message, args);
}
return Promise.resolve();
},
error(message, args) {
console.error(message, args);
return Promise.resolve();
},
};
}
function createBrowserXhrRequester() {
return {
send(request) {
return new Promise((resolve) => {
const baseRequester = new XMLHttpRequest();
baseRequester.open(request.method, request.url, true);
Object.keys(request.headers).forEach(key => baseRequester.setRequestHeader(key, request.headers[key]));
const createTimeout = (timeout, content) => {
return setTimeout(() => {
baseRequester.abort();
resolve({
status: 0,
content,
isTimedOut: true,
});
}, timeout * 1000);
};
const connectTimeout = createTimeout(request.connectTimeout, 'Connection timeout');
// eslint-disable-next-line functional/no-let
let responseTimeout;
// eslint-disable-next-line functional/immutable-data
baseRequester.onreadystatechange = () => {
if (baseRequester.readyState > baseRequester.OPENED && responseTimeout === undefined) {
clearTimeout(connectTimeout);
responseTimeout = createTimeout(request.responseTimeout, 'Socket timeout');
}
};
// eslint-disable-next-line functional/immutable-data
baseRequester.onerror = () => {
// istanbul ignore next
if (baseRequester.status === 0) {
clearTimeout(connectTimeout);
clearTimeout(responseTimeout);
resolve({
content: baseRequester.responseText || 'Network request failed',
status: baseRequester.status,
isTimedOut: false,
});
}
};
// eslint-disable-next-line functional/immutable-data
baseRequester.onload = () => {
clearTimeout(connectTimeout);
clearTimeout(responseTimeout);
resolve({
content: baseRequester.responseText,
status: baseRequester.status,
isTimedOut: false,
});
};
baseRequester.send(request.data);
});
},
};
}
function algoliasearch(appId, apiKey, options) {
const commonOptions = {
appId,
apiKey,
timeouts: {
connect: 1,
read: 2,
write: 30,
},
requester: createBrowserXhrRequester(),
logger: createConsoleLogger(LogLevelEnum.Error),
responsesCache: createInMemoryCache(),
requestsCache: createInMemoryCache({ serializable: false }),
hostsCache: createFallbackableCache({
caches: [
createBrowserLocalStorageCache({ key: `${version}-${appId}` }),
createInMemoryCache(),
],
}),
userAgent: createUserAgent(version).add({
segment: 'Browser',
version: 'lite',
}),
authMode: AuthMode.WithinQueryParameters,
};
return createSearchClient({
...commonOptions,
...options,
methods: {
search: multipleQueries,
searchForFacetValues: multipleSearchForFacetValues,
multipleQueries,
multipleSearchForFacetValues,
customRequest,
initIndex: base => (indexName) => {
return initIndex(base)(indexName, {
methods: { search, searchForFacetValues, findAnswers },
});
},
},
});
}
// eslint-disable-next-line functional/immutable-data
algoliasearch.version = version;
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (algoliasearch);
/***/ }),
/***/ "./node_modules/bail/index.js":
/*!************************************!*\
!*** ./node_modules/bail/index.js ***!
\************************************/
/***/ ((module) => {
"use strict";
module.exports = bail
function bail(err) {
if (err) {
throw err
}
}
/***/ }),
/***/ "./node_modules/copy-to-clipboard/index.js":
/*!*************************************************!*\
!*** ./node_modules/copy-to-clipboard/index.js ***!
\*************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var deselectCurrent = __webpack_require__(/*! toggle-selection */ "./node_modules/toggle-selection/index.js");
var clipboardToIE11Formatting = {
"text/plain": "Text",
"text/html": "Url",
"default": "Text"
}
var defaultMessage = "Copy to clipboard: #{key}, Enter";
function format(message) {
var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
return message.replace(/#{\s*key\s*}/g, copyKey);
}
function copy(text, options) {
var debug,
message,
reselectPrevious,
range,
selection,
mark,
success = false;
if (!options) {
options = {};
}
debug = options.debug || false;
try {
reselectPrevious = deselectCurrent();
range = document.createRange();
selection = document.getSelection();
mark = document.createElement("span");
mark.textContent = text;
// reset user styles for span element
mark.style.all = "unset";
// prevents scrolling to the end of the page
mark.style.position = "fixed";
mark.style.top = 0;
mark.style.clip = "rect(0, 0, 0, 0)";
// used to preserve spaces and line breaks
mark.style.whiteSpace = "pre";
// do not inherit user-select (it may be `none`)
mark.style.webkitUserSelect = "text";
mark.style.MozUserSelect = "text";
mark.style.msUserSelect = "text";
mark.style.userSelect = "text";
mark.addEventListener("copy", function(e) {
e.stopPropagation();
if (options.format) {
e.preventDefault();
if (typeof e.clipboardData === "undefined") { // IE 11
debug && console.warn("unable to use e.clipboardData");
debug && console.warn("trying IE specific stuff");
window.clipboardData.clearData();
var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting["default"]
window.clipboardData.setData(format, text);
} else { // all other browsers
e.clipboardData.clearData();
e.clipboardData.setData(options.format, text);
}
}
if (options.onCopy) {
e.preventDefault();
options.onCopy(e.clipboardData);
}
});
document.body.appendChild(mark);
range.selectNodeContents(mark);
selection.addRange(range);
var successful = document.execCommand("copy");
if (!successful) {
throw new Error("copy command was unsuccessful");
}
success = true;
} catch (err) {
debug && console.error("unable to copy using execCommand: ", err);
debug && console.warn("trying IE specific stuff");
try {
window.clipboardData.setData(options.format || "text", text);
options.onCopy && options.onCopy(window.clipboardData);
success = true;
} catch (err) {
debug && console.error("unable to copy using clipboardData: ", err);
debug && console.error("falling back to prompt");
message = format("message" in options ? options.message : defaultMessage);
window.prompt(message, text);
}
} finally {
if (selection) {
if (typeof selection.removeRange == "function") {
selection.removeRange(range);
} else {
selection.removeAllRanges();
}
}
if (mark) {
document.body.removeChild(mark);
}
reselectPrevious();
}
return success;
}
module.exports = copy;
/***/ }),
/***/ "./node_modules/core-js/internals/a-callable.js":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/a-callable.js ***!
\******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/core-js/internals/is-callable.js");
var tryToString = __webpack_require__(/*! ../internals/try-to-string */ "./node_modules/core-js/internals/try-to-string.js");
var TypeError = global.TypeError;
// `Assert: IsCallable(argument) is true`
module.exports = function (argument) {
if (isCallable(argument)) return argument;
throw TypeError(tryToString(argument) + ' is not a function');
};
/***/ }),
/***/ "./node_modules/core-js/internals/add-to-unscopables.js":
/*!**************************************************************!*\
!*** ./node_modules/core-js/internals/add-to-unscopables.js ***!
\**************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
var UNSCOPABLES = wellKnownSymbol('unscopables');
var ArrayPrototype = Array.prototype;
// Array.prototype[@@unscopables]
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
if (ArrayPrototype[UNSCOPABLES] == undefined) {
definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
configurable: true,
value: create(null)
});
}
// add a key to Array.prototype[@@unscopables]
module.exports = function (key) {
ArrayPrototype[UNSCOPABLES][key] = true;
};
/***/ }),
/***/ "./node_modules/core-js/internals/an-object.js":
/*!*****************************************************!*\
!*** ./node_modules/core-js/internals/an-object.js ***!
\*****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
var String = global.String;
var TypeError = global.TypeError;
// `Assert: Type(argument) is Object`
module.exports = function (argument) {
if (isObject(argument)) return argument;
throw TypeError(String(argument) + ' is not an object');
};
/***/ }),
/***/ "./node_modules/core-js/internals/array-includes.js":
/*!**********************************************************!*\
!*** ./node_modules/core-js/internals/array-includes.js ***!
\**********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "./node_modules/core-js/internals/to-absolute-index.js");
var lengthOfArrayLike = __webpack_require__(/*! ../internals/length-of-array-like */ "./node_modules/core-js/internals/length-of-array-like.js");
// `Array.prototype.{ indexOf, includes }` methods implementation
var createMethod = function (IS_INCLUDES) {
return function ($this, el, fromIndex) {
var O = toIndexedObject($this);
var length = lengthOfArrayLike(O);
var index = toAbsoluteIndex(fromIndex, length);
var value;
// Array#includes uses SameValueZero equality algorithm
// eslint-disable-next-line no-self-compare -- NaN check
if (IS_INCLUDES && el != el) while (length > index) {
value = O[index++];
// eslint-disable-next-line no-self-compare -- NaN check
if (value != value) return true;
// Array#indexOf ignores holes, Array#includes - not
} else for (;length > index; index++) {
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
} return !IS_INCLUDES && -1;
};
};
module.exports = {
// `Array.prototype.includes` method
// https://tc39.es/ecma262/#sec-array.prototype.includes
includes: createMethod(true),
// `Array.prototype.indexOf` method
// https://tc39.es/ecma262/#sec-array.prototype.indexof
indexOf: createMethod(false)
};
/***/ }),
/***/ "./node_modules/core-js/internals/array-species-constructor.js":
/*!*********************************************************************!*\
!*** ./node_modules/core-js/internals/array-species-constructor.js ***!
\*********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
var isConstructor = __webpack_require__(/*! ../internals/is-constructor */ "./node_modules/core-js/internals/is-constructor.js");
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
var SPECIES = wellKnownSymbol('species');
var Array = global.Array;
// a part of `ArraySpeciesCreate` abstract operation
// https://tc39.es/ecma262/#sec-arrayspeciescreate
module.exports = function (originalArray) {
var C;
if (isArray(originalArray)) {
C = originalArray.constructor;
// cross-realm fallback
if (isConstructor(C) && (C === Array || isArray(C.prototype))) C = undefined;
else if (isObject(C)) {
C = C[SPECIES];
if (C === null) C = undefined;
}
} return C === undefined ? Array : C;
};
/***/ }),
/***/ "./node_modules/core-js/internals/array-species-create.js":
/*!****************************************************************!*\
!*** ./node_modules/core-js/internals/array-species-create.js ***!
\****************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var arraySpeciesConstructor = __webpack_require__(/*! ../internals/array-species-constructor */ "./node_modules/core-js/internals/array-species-constructor.js");
// `ArraySpeciesCreate` abstract operation
// https://tc39.es/ecma262/#sec-arrayspeciescreate
module.exports = function (originalArray, length) {
return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
};
/***/ }),
/***/ "./node_modules/core-js/internals/classof-raw.js":
/*!*******************************************************!*\
!*** ./node_modules/core-js/internals/classof-raw.js ***!
\*******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/core-js/internals/function-uncurry-this.js");
var toString = uncurryThis({}.toString);
var stringSlice = uncurryThis(''.slice);
module.exports = function (it) {
return stringSlice(toString(it), 8, -1);
};
/***/ }),
/***/ "./node_modules/core-js/internals/classof.js":
/*!***************************************************!*\
!*** ./node_modules/core-js/internals/classof.js ***!
\***************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "./node_modules/core-js/internals/to-string-tag-support.js");
var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/core-js/internals/is-callable.js");
var classofRaw = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var Object = global.Object;
// ES3 wrong here
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
try {
return it[key];
} catch (error) { /* empty */ }
};
// getting tag from ES6+ `Object.prototype.toString`
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
var O, tag, result;
return it === undefined ? 'Undefined' : it === null ? 'Null'
// @@toStringTag case
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
// builtinTag case
: CORRECT_ARGUMENTS ? classofRaw(O)
// ES3 arguments fallback
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
};
/***/ }),
/***/ "./node_modules/core-js/internals/copy-constructor-properties.js":
/*!***********************************************************************!*\
!*** ./node_modules/core-js/internals/copy-constructor-properties.js ***!
\***********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/core-js/internals/has-own-property.js");
var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "./node_modules/core-js/internals/own-keys.js");
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
module.exports = function (target, source) {
var keys = ownKeys(source);
var defineProperty = definePropertyModule.f;
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (!hasOwn(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
}
};
/***/ }),
/***/ "./node_modules/core-js/internals/create-non-enumerable-property.js":
/*!**************************************************************************!*\
!*** ./node_modules/core-js/internals/create-non-enumerable-property.js ***!
\**************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
module.exports = DESCRIPTORS ? function (object, key, value) {
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
/***/ }),
/***/ "./node_modules/core-js/internals/create-property-descriptor.js":
/*!**********************************************************************!*\
!*** ./node_modules/core-js/internals/create-property-descriptor.js ***!
\**********************************************************************/
/***/ ((module) => {
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
/***/ }),
/***/ "./node_modules/core-js/internals/descriptors.js":
/*!*******************************************************!*\
!*** ./node_modules/core-js/internals/descriptors.js ***!
\*******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
// Detect IE8's incomplete defineProperty implementation
module.exports = !fails(function () {
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
});
/***/ }),
/***/ "./node_modules/core-js/internals/document-create-element.js":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/internals/document-create-element.js ***!
\*******************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
var document = global.document;
// typeof document.createElement is 'object' in old IE
var EXISTS = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
return EXISTS ? document.createElement(it) : {};
};
/***/ }),
/***/ "./node_modules/core-js/internals/engine-user-agent.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/engine-user-agent.js ***!
\*************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
module.exports = getBuiltIn('navigator', 'userAgent') || '';
/***/ }),
/***/ "./node_modules/core-js/internals/engine-v8-version.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/engine-v8-version.js ***!
\*************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "./node_modules/core-js/internals/engine-user-agent.js");
var process = global.process;
var Deno = global.Deno;
var versions = process && process.versions || Deno && Deno.version;
var v8 = versions && versions.v8;
var match, version;
if (v8) {
match = v8.split('.');
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
// but their correct versions are not interesting for us
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
}
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
// so check `userAgent` even if `.v8` exists, but 0
if (!version && userAgent) {
match = userAgent.match(/Edge\/(\d+)/);
if (!match || match[1] >= 74) {
match = userAgent.match(/Chrome\/(\d+)/);
if (match) version = +match[1];
}
}
module.exports = version;
/***/ }),
/***/ "./node_modules/core-js/internals/enum-bug-keys.js":
/*!*********************************************************!*\
!*** ./node_modules/core-js/internals/enum-bug-keys.js ***!
\*********************************************************/
/***/ ((module) => {
// IE8- don't enum bug keys
module.exports = [
'constructor',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'toLocaleString',
'toString',
'valueOf'
];
/***/ }),
/***/ "./node_modules/core-js/internals/export.js":
/*!**************************************************!*\
!*** ./node_modules/core-js/internals/export.js ***!
\**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var getOwnPropertyDescriptor = (__webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f);
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
var setGlobal = __webpack_require__(/*! ../internals/set-global */ "./node_modules/core-js/internals/set-global.js");
var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ "./node_modules/core-js/internals/copy-constructor-properties.js");
var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js");
/*
options.target - name of the target object
options.global - target is the global object
options.stat - export as static methods of target
options.proto - export as prototype methods of target
options.real - real prototype method for the `pure` version
options.forced - export even if the native feature is available
options.bind - bind methods to the target, required for the `pure` version
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
options.unsafe - use the simple assignment of property instead of delete + defineProperty
options.sham - add a flag to not completely full polyfills
options.enumerable - export as enumerable property
options.noTargetGet - prevent calling a getter on target
options.name - the .name of the function if it does not match the key
*/
module.exports = function (options, source) {
var TARGET = options.target;
var GLOBAL = options.global;
var STATIC = options.stat;
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
if (GLOBAL) {
target = global;
} else if (STATIC) {
target = global[TARGET] || setGlobal(TARGET, {});
} else {
target = (global[TARGET] || {}).prototype;
}
if (target) for (key in source) {
sourceProperty = source[key];
if (options.noTargetGet) {
descriptor = getOwnPropertyDescriptor(target, key);
targetProperty = descriptor && descriptor.value;
} else targetProperty = target[key];
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
// contained in target
if (!FORCED && targetProperty !== undefined) {
if (typeof sourceProperty == typeof targetProperty) continue;
copyConstructorProperties(sourceProperty, targetProperty);
}
// add a flag to not completely full polyfills
if (options.sham || (targetProperty && targetProperty.sham)) {
createNonEnumerableProperty(sourceProperty, 'sham', true);
}
// extend global
redefine(target, key, sourceProperty, options);
}
};
/***/ }),
/***/ "./node_modules/core-js/internals/fails.js":
/*!*************************************************!*\
!*** ./node_modules/core-js/internals/fails.js ***!
\*************************************************/
/***/ ((module) => {
module.exports = function (exec) {
try {
return !!exec();
} catch (error) {
return true;
}
};
/***/ }),
/***/ "./node_modules/core-js/internals/flatten-into-array.js":
/*!**************************************************************!*\
!*** ./node_modules/core-js/internals/flatten-into-array.js ***!
\**************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
var lengthOfArrayLike = __webpack_require__(/*! ../internals/length-of-array-like */ "./node_modules/core-js/internals/length-of-array-like.js");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
var TypeError = global.TypeError;
// `FlattenIntoArray` abstract operation
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
var flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
var targetIndex = start;
var sourceIndex = 0;
var mapFn = mapper ? bind(mapper, thisArg) : false;
var element, elementLen;
while (sourceIndex < sourceLen) {
if (sourceIndex in source) {
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
if (depth > 0 && isArray(element)) {
elementLen = lengthOfArrayLike(element);
targetIndex = flattenIntoArray(target, original, element, elementLen, targetIndex, depth - 1) - 1;
} else {
if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');
target[targetIndex] = element;
}
targetIndex++;
}
sourceIndex++;
}
return targetIndex;
};
module.exports = flattenIntoArray;
/***/ }),
/***/ "./node_modules/core-js/internals/function-bind-context.js":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/internals/function-bind-context.js ***!
\*****************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/core-js/internals/function-uncurry-this.js");
var aCallable = __webpack_require__(/*! ../internals/a-callable */ "./node_modules/core-js/internals/a-callable.js");
var bind = uncurryThis(uncurryThis.bind);
// optional / simple context binding
module.exports = function (fn, that) {
aCallable(fn);
return that === undefined ? fn : bind ? bind(fn, that) : function (/* ...args */) {
return fn.apply(that, arguments);
};
};
/***/ }),
/***/ "./node_modules/core-js/internals/function-call.js":
/*!*********************************************************!*\
!*** ./node_modules/core-js/internals/function-call.js ***!
\*********************************************************/
/***/ ((module) => {
var call = Function.prototype.call;
module.exports = call.bind ? call.bind(call) : function () {
return call.apply(call, arguments);
};
/***/ }),
/***/ "./node_modules/core-js/internals/function-name.js":
/*!*********************************************************!*\
!*** ./node_modules/core-js/internals/function-name.js ***!
\*********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/core-js/internals/has-own-property.js");
var FunctionPrototype = Function.prototype;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
var EXISTS = hasOwn(FunctionPrototype, 'name');
// additional protection from minified / mangled / dropped function names
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
module.exports = {
EXISTS: EXISTS,
PROPER: PROPER,
CONFIGURABLE: CONFIGURABLE
};
/***/ }),
/***/ "./node_modules/core-js/internals/function-uncurry-this.js":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/internals/function-uncurry-this.js ***!
\*****************************************************************/
/***/ ((module) => {
var FunctionPrototype = Function.prototype;
var bind = FunctionPrototype.bind;
var call = FunctionPrototype.call;
var callBind = bind && bind.bind(call);
module.exports = bind ? function (fn) {
return fn && callBind(call, fn);
} : function (fn) {
return fn && function () {
return call.apply(fn, arguments);
};
};
/***/ }),
/***/ "./node_modules/core-js/internals/get-built-in.js":
/*!********************************************************!*\
!*** ./node_modules/core-js/internals/get-built-in.js ***!
\********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/core-js/internals/is-callable.js");
var aFunction = function (argument) {
return isCallable(argument) ? argument : undefined;
};
module.exports = function (namespace, method) {
return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];
};
/***/ }),
/***/ "./node_modules/core-js/internals/get-method.js":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/get-method.js ***!
\******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var aCallable = __webpack_require__(/*! ../internals/a-callable */ "./node_modules/core-js/internals/a-callable.js");
// `GetMethod` abstract operation
// https://tc39.es/ecma262/#sec-getmethod
module.exports = function (V, P) {
var func = V[P];
return func == null ? undefined : aCallable(func);
};
/***/ }),
/***/ "./node_modules/core-js/internals/global.js":
/*!**************************************************!*\
!*** ./node_modules/core-js/internals/global.js ***!
\**************************************************/
/***/ ((module) => {
var check = function (it) {
return it && it.Math == Math && it;
};
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
module.exports =
// eslint-disable-next-line es/no-global-this -- safe
check(typeof globalThis == 'object' && globalThis) ||
check(typeof window == 'object' && window) ||
// eslint-disable-next-line no-restricted-globals -- safe
check(typeof self == 'object' && self) ||
check(typeof global == 'object' && global) ||
// eslint-disable-next-line no-new-func -- fallback
(function () { return this; })() || Function('return this')();
/***/ }),
/***/ "./node_modules/core-js/internals/has-own-property.js":
/*!************************************************************!*\
!*** ./node_modules/core-js/internals/has-own-property.js ***!
\************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/core-js/internals/function-uncurry-this.js");
var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
var hasOwnProperty = uncurryThis({}.hasOwnProperty);
// `HasOwnProperty` abstract operation
// https://tc39.es/ecma262/#sec-hasownproperty
module.exports = Object.hasOwn || function hasOwn(it, key) {
return hasOwnProperty(toObject(it), key);
};
/***/ }),
/***/ "./node_modules/core-js/internals/hidden-keys.js":
/*!*******************************************************!*\
!*** ./node_modules/core-js/internals/hidden-keys.js ***!
\*******************************************************/
/***/ ((module) => {
module.exports = {};
/***/ }),
/***/ "./node_modules/core-js/internals/html.js":
/*!************************************************!*\
!*** ./node_modules/core-js/internals/html.js ***!
\************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
module.exports = getBuiltIn('document', 'documentElement');
/***/ }),
/***/ "./node_modules/core-js/internals/ie8-dom-define.js":
/*!**********************************************************!*\
!*** ./node_modules/core-js/internals/ie8-dom-define.js ***!
\**********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
var createElement = __webpack_require__(/*! ../internals/document-create-element */ "./node_modules/core-js/internals/document-create-element.js");
// Thank's IE8 for his funny defineProperty
module.exports = !DESCRIPTORS && !fails(function () {
// eslint-disable-next-line es/no-object-defineproperty -- requied for testing
return Object.defineProperty(createElement('div'), 'a', {
get: function () { return 7; }
}).a != 7;
});
/***/ }),
/***/ "./node_modules/core-js/internals/indexed-object.js":
/*!**********************************************************!*\
!*** ./node_modules/core-js/internals/indexed-object.js ***!
\**********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/core-js/internals/function-uncurry-this.js");
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
var Object = global.Object;
var split = uncurryThis(''.split);
// fallback for non-array-like ES3 and non-enumerable old V8 strings
module.exports = fails(function () {
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
// eslint-disable-next-line no-prototype-builtins -- safe
return !Object('z').propertyIsEnumerable(0);
}) ? function (it) {
return classof(it) == 'String' ? split(it, '') : Object(it);
} : Object;
/***/ }),
/***/ "./node_modules/core-js/internals/inspect-source.js":
/*!**********************************************************!*\
!*** ./node_modules/core-js/internals/inspect-source.js ***!
\**********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/core-js/internals/function-uncurry-this.js");
var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/core-js/internals/is-callable.js");
var store = __webpack_require__(/*! ../internals/shared-store */ "./node_modules/core-js/internals/shared-store.js");
var functionToString = uncurryThis(Function.toString);
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
if (!isCallable(store.inspectSource)) {
store.inspectSource = function (it) {
return functionToString(it);
};
}
module.exports = store.inspectSource;
/***/ }),
/***/ "./node_modules/core-js/internals/internal-state.js":
/*!**********************************************************!*\
!*** ./node_modules/core-js/internals/internal-state.js ***!
\**********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/native-weak-map */ "./node_modules/core-js/internals/native-weak-map.js");
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/core-js/internals/function-uncurry-this.js");
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/core-js/internals/has-own-property.js");
var shared = __webpack_require__(/*! ../internals/shared-store */ "./node_modules/core-js/internals/shared-store.js");
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js");
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
var TypeError = global.TypeError;
var WeakMap = global.WeakMap;
var set, get, has;
var enforce = function (it) {
return has(it) ? get(it) : set(it, {});
};
var getterFor = function (TYPE) {
return function (it) {
var state;
if (!isObject(it) || (state = get(it)).type !== TYPE) {
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
} return state;
};
};
if (NATIVE_WEAK_MAP || shared.state) {
var store = shared.state || (shared.state = new WeakMap());
var wmget = uncurryThis(store.get);
var wmhas = uncurryThis(store.has);
var wmset = uncurryThis(store.set);
set = function (it, metadata) {
if (wmhas(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
metadata.facade = it;
wmset(store, it, metadata);
return metadata;
};
get = function (it) {
return wmget(store, it) || {};
};
has = function (it) {
return wmhas(store, it);
};
} else {
var STATE = sharedKey('state');
hiddenKeys[STATE] = true;
set = function (it, metadata) {
if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
metadata.facade = it;
createNonEnumerableProperty(it, STATE, metadata);
return metadata;
};
get = function (it) {
return hasOwn(it, STATE) ? it[STATE] : {};
};
has = function (it) {
return hasOwn(it, STATE);
};
}
module.exports = {
set: set,
get: get,
has: has,
enforce: enforce,
getterFor: getterFor
};
/***/ }),
/***/ "./node_modules/core-js/internals/is-array.js":
/*!****************************************************!*\
!*** ./node_modules/core-js/internals/is-array.js ***!
\****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
// `IsArray` abstract operation
// https://tc39.es/ecma262/#sec-isarray
// eslint-disable-next-line es/no-array-isarray -- safe
module.exports = Array.isArray || function isArray(argument) {
return classof(argument) == 'Array';
};
/***/ }),
/***/ "./node_modules/core-js/internals/is-callable.js":
/*!*******************************************************!*\
!*** ./node_modules/core-js/internals/is-callable.js ***!
\*******************************************************/
/***/ ((module) => {
// `IsCallable` abstract operation
// https://tc39.es/ecma262/#sec-iscallable
module.exports = function (argument) {
return typeof argument == 'function';
};
/***/ }),
/***/ "./node_modules/core-js/internals/is-constructor.js":
/*!**********************************************************!*\
!*** ./node_modules/core-js/internals/is-constructor.js ***!
\**********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/core-js/internals/function-uncurry-this.js");
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/core-js/internals/is-callable.js");
var classof = __webpack_require__(/*! ../internals/classof */ "./node_modules/core-js/internals/classof.js");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "./node_modules/core-js/internals/inspect-source.js");
var noop = function () { /* empty */ };
var empty = [];
var construct = getBuiltIn('Reflect', 'construct');
var constructorRegExp = /^\s*(?:class|function)\b/;
var exec = uncurryThis(constructorRegExp.exec);
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
var isConstructorModern = function (argument) {
if (!isCallable(argument)) return false;
try {
construct(noop, empty, argument);
return true;
} catch (error) {
return false;
}
};
var isConstructorLegacy = function (argument) {
if (!isCallable(argument)) return false;
switch (classof(argument)) {
case 'AsyncFunction':
case 'GeneratorFunction':
case 'AsyncGeneratorFunction': return false;
// we can't check .prototype since constructors produced by .bind haven't it
} return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
};
// `IsConstructor` abstract operation
// https://tc39.es/ecma262/#sec-isconstructor
module.exports = !construct || fails(function () {
var called;
return isConstructorModern(isConstructorModern.call)
|| !isConstructorModern(Object)
|| !isConstructorModern(function () { called = true; })
|| called;
}) ? isConstructorLegacy : isConstructorModern;
/***/ }),
/***/ "./node_modules/core-js/internals/is-forced.js":
/*!*****************************************************!*\
!*** ./node_modules/core-js/internals/is-forced.js ***!
\*****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/core-js/internals/is-callable.js");
var replacement = /#|\.prototype\./;
var isForced = function (feature, detection) {
var value = data[normalize(feature)];
return value == POLYFILL ? true
: value == NATIVE ? false
: isCallable(detection) ? fails(detection)
: !!detection;
};
var normalize = isForced.normalize = function (string) {
return String(string).replace(replacement, '.').toLowerCase();
};
var data = isForced.data = {};
var NATIVE = isForced.NATIVE = 'N';
var POLYFILL = isForced.POLYFILL = 'P';
module.exports = isForced;
/***/ }),
/***/ "./node_modules/core-js/internals/is-object.js":
/*!*****************************************************!*\
!*** ./node_modules/core-js/internals/is-object.js ***!
\*****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/core-js/internals/is-callable.js");
module.exports = function (it) {
return typeof it == 'object' ? it !== null : isCallable(it);
};
/***/ }),
/***/ "./node_modules/core-js/internals/is-pure.js":
/*!***************************************************!*\
!*** ./node_modules/core-js/internals/is-pure.js ***!
\***************************************************/
/***/ ((module) => {
module.exports = false;
/***/ }),
/***/ "./node_modules/core-js/internals/is-symbol.js":
/*!*****************************************************!*\
!*** ./node_modules/core-js/internals/is-symbol.js ***!
\*****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/core-js/internals/is-callable.js");
var isPrototypeOf = __webpack_require__(/*! ../internals/object-is-prototype-of */ "./node_modules/core-js/internals/object-is-prototype-of.js");
var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ "./node_modules/core-js/internals/use-symbol-as-uid.js");
var Object = global.Object;
module.exports = USE_SYMBOL_AS_UID ? function (it) {
return typeof it == 'symbol';
} : function (it) {
var $Symbol = getBuiltIn('Symbol');
return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, Object(it));
};
/***/ }),
/***/ "./node_modules/core-js/internals/length-of-array-like.js":
/*!****************************************************************!*\
!*** ./node_modules/core-js/internals/length-of-array-like.js ***!
\****************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
// `LengthOfArrayLike` abstract operation
// https://tc39.es/ecma262/#sec-lengthofarraylike
module.exports = function (obj) {
return toLength(obj.length);
};
/***/ }),
/***/ "./node_modules/core-js/internals/native-symbol.js":
/*!*********************************************************!*\
!*** ./node_modules/core-js/internals/native-symbol.js ***!
\*********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
/* eslint-disable es/no-symbol -- required for testing */
var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
var symbol = Symbol();
// Chrome 38 Symbol has incorrect toString conversion
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
});
/***/ }),
/***/ "./node_modules/core-js/internals/native-weak-map.js":
/*!***********************************************************!*\
!*** ./node_modules/core-js/internals/native-weak-map.js ***!
\***********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/core-js/internals/is-callable.js");
var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "./node_modules/core-js/internals/inspect-source.js");
var WeakMap = global.WeakMap;
module.exports = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));
/***/ }),
/***/ "./node_modules/core-js/internals/object-create.js":
/*!*********************************************************!*\
!*** ./node_modules/core-js/internals/object-create.js ***!
\*********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
/* global ActiveXObject -- old IE, WSH */
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
var defineProperties = __webpack_require__(/*! ../internals/object-define-properties */ "./node_modules/core-js/internals/object-define-properties.js");
var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "./node_modules/core-js/internals/enum-bug-keys.js");
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");
var html = __webpack_require__(/*! ../internals/html */ "./node_modules/core-js/internals/html.js");
var documentCreateElement = __webpack_require__(/*! ../internals/document-create-element */ "./node_modules/core-js/internals/document-create-element.js");
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js");
var GT = '>';
var LT = '<';
var PROTOTYPE = 'prototype';
var SCRIPT = 'script';
var IE_PROTO = sharedKey('IE_PROTO');
var EmptyConstructor = function () { /* empty */ };
var scriptTag = function (content) {
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
};
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
var NullProtoObjectViaActiveX = function (activeXDocument) {
activeXDocument.write(scriptTag(''));
activeXDocument.close();
var temp = activeXDocument.parentWindow.Object;
activeXDocument = null; // avoid memory leak
return temp;
};
// Create object with fake `null` prototype: use iframe Object with cleared prototype
var NullProtoObjectViaIFrame = function () {
// Thrash, waste and sodomy: IE GC bug
var iframe = documentCreateElement('iframe');
var JS = 'java' + SCRIPT + ':';
var iframeDocument;
iframe.style.display = 'none';
html.appendChild(iframe);
// https://github.com/zloirock/core-js/issues/475
iframe.src = String(JS);
iframeDocument = iframe.contentWindow.document;
iframeDocument.open();
iframeDocument.write(scriptTag('document.F=Object'));
iframeDocument.close();
return iframeDocument.F;
};
// Check for document.domain and active x support
// No need to use active x approach when document.domain is not set
// see https://github.com/es-shims/es5-shim/issues/150
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
// avoid IE GC bug
var activeXDocument;
var NullProtoObject = function () {
try {
activeXDocument = new ActiveXObject('htmlfile');
} catch (error) { /* ignore */ }
NullProtoObject = typeof document != 'undefined'
? document.domain && activeXDocument
? NullProtoObjectViaActiveX(activeXDocument) // old IE
: NullProtoObjectViaIFrame()
: NullProtoObjectViaActiveX(activeXDocument); // WSH
var length = enumBugKeys.length;
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
return NullProtoObject();
};
hiddenKeys[IE_PROTO] = true;
// `Object.create` method
// https://tc39.es/ecma262/#sec-object.create
module.exports = Object.create || function create(O, Properties) {
var result;
if (O !== null) {
EmptyConstructor[PROTOTYPE] = anObject(O);
result = new EmptyConstructor();
EmptyConstructor[PROTOTYPE] = null;
// add "__proto__" for Object.getPrototypeOf polyfill
result[IE_PROTO] = O;
} else result = NullProtoObject();
return Properties === undefined ? result : defineProperties(result, Properties);
};
/***/ }),
/***/ "./node_modules/core-js/internals/object-define-properties.js":
/*!********************************************************************!*\
!*** ./node_modules/core-js/internals/object-define-properties.js ***!
\********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "./node_modules/core-js/internals/object-keys.js");
// `Object.defineProperties` method
// https://tc39.es/ecma262/#sec-object.defineproperties
// eslint-disable-next-line es/no-object-defineproperties -- safe
module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
anObject(O);
var props = toIndexedObject(Properties);
var keys = objectKeys(Properties);
var length = keys.length;
var index = 0;
var key;
while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
return O;
};
/***/ }),
/***/ "./node_modules/core-js/internals/object-define-property.js":
/*!******************************************************************!*\
!*** ./node_modules/core-js/internals/object-define-property.js ***!
\******************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "./node_modules/core-js/internals/ie8-dom-define.js");
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
var toPropertyKey = __webpack_require__(/*! ../internals/to-property-key */ "./node_modules/core-js/internals/to-property-key.js");
var TypeError = global.TypeError;
// eslint-disable-next-line es/no-object-defineproperty -- safe
var $defineProperty = Object.defineProperty;
// `Object.defineProperty` method
// https://tc39.es/ecma262/#sec-object.defineproperty
exports.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPropertyKey(P);
anObject(Attributes);
if (IE8_DOM_DEFINE) try {
return $defineProperty(O, P, Attributes);
} catch (error) { /* empty */ }
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
if ('value' in Attributes) O[P] = Attributes.value;
return O;
};
/***/ }),
/***/ "./node_modules/core-js/internals/object-get-own-property-descriptor.js":
/*!******************************************************************************!*\
!*** ./node_modules/core-js/internals/object-get-own-property-descriptor.js ***!
\******************************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var call = __webpack_require__(/*! ../internals/function-call */ "./node_modules/core-js/internals/function-call.js");
var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "./node_modules/core-js/internals/object-property-is-enumerable.js");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
var toPropertyKey = __webpack_require__(/*! ../internals/to-property-key */ "./node_modules/core-js/internals/to-property-key.js");
var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/core-js/internals/has-own-property.js");
var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "./node_modules/core-js/internals/ie8-dom-define.js");
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// `Object.getOwnPropertyDescriptor` method
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
O = toIndexedObject(O);
P = toPropertyKey(P);
if (IE8_DOM_DEFINE) try {
return $getOwnPropertyDescriptor(O, P);
} catch (error) { /* empty */ }
if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
};
/***/ }),
/***/ "./node_modules/core-js/internals/object-get-own-property-names.js":
/*!*************************************************************************!*\
!*** ./node_modules/core-js/internals/object-get-own-property-names.js ***!
\*************************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ "./node_modules/core-js/internals/object-keys-internal.js");
var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "./node_modules/core-js/internals/enum-bug-keys.js");
var hiddenKeys = enumBugKeys.concat('length', 'prototype');
// `Object.getOwnPropertyNames` method
// https://tc39.es/ecma262/#sec-object.getownpropertynames
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return internalObjectKeys(O, hiddenKeys);
};
/***/ }),
/***/ "./node_modules/core-js/internals/object-get-own-property-symbols.js":
/*!***************************************************************************!*\
!*** ./node_modules/core-js/internals/object-get-own-property-symbols.js ***!
\***************************************************************************/
/***/ ((__unused_webpack_module, exports) => {
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
exports.f = Object.getOwnPropertySymbols;
/***/ }),
/***/ "./node_modules/core-js/internals/object-is-prototype-of.js":
/*!******************************************************************!*\
!*** ./node_modules/core-js/internals/object-is-prototype-of.js ***!
\******************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/core-js/internals/function-uncurry-this.js");
module.exports = uncurryThis({}.isPrototypeOf);
/***/ }),
/***/ "./node_modules/core-js/internals/object-keys-internal.js":
/*!****************************************************************!*\
!*** ./node_modules/core-js/internals/object-keys-internal.js ***!
\****************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/core-js/internals/function-uncurry-this.js");
var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/core-js/internals/has-own-property.js");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
var indexOf = (__webpack_require__(/*! ../internals/array-includes */ "./node_modules/core-js/internals/array-includes.js").indexOf);
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");
var push = uncurryThis([].push);
module.exports = function (object, names) {
var O = toIndexedObject(object);
var i = 0;
var result = [];
var key;
for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
// Don't enum bug & hidden keys
while (names.length > i) if (hasOwn(O, key = names[i++])) {
~indexOf(result, key) || push(result, key);
}
return result;
};
/***/ }),
/***/ "./node_modules/core-js/internals/object-keys.js":
/*!*******************************************************!*\
!*** ./node_modules/core-js/internals/object-keys.js ***!
\*******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ "./node_modules/core-js/internals/object-keys-internal.js");
var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "./node_modules/core-js/internals/enum-bug-keys.js");
// `Object.keys` method
// https://tc39.es/ecma262/#sec-object.keys
// eslint-disable-next-line es/no-object-keys -- safe
module.exports = Object.keys || function keys(O) {
return internalObjectKeys(O, enumBugKeys);
};
/***/ }),
/***/ "./node_modules/core-js/internals/object-property-is-enumerable.js":
/*!*************************************************************************!*\
!*** ./node_modules/core-js/internals/object-property-is-enumerable.js ***!
\*************************************************************************/
/***/ ((__unused_webpack_module, exports) => {
"use strict";
var $propertyIsEnumerable = {}.propertyIsEnumerable;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// Nashorn ~ JDK8 bug
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
// `Object.prototype.propertyIsEnumerable` method implementation
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
var descriptor = getOwnPropertyDescriptor(this, V);
return !!descriptor && descriptor.enumerable;
} : $propertyIsEnumerable;
/***/ }),
/***/ "./node_modules/core-js/internals/ordinary-to-primitive.js":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/internals/ordinary-to-primitive.js ***!
\*****************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var call = __webpack_require__(/*! ../internals/function-call */ "./node_modules/core-js/internals/function-call.js");
var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/core-js/internals/is-callable.js");
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
var TypeError = global.TypeError;
// `OrdinaryToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
module.exports = function (input, pref) {
var fn, val;
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
throw TypeError("Can't convert object to primitive value");
};
/***/ }),
/***/ "./node_modules/core-js/internals/own-keys.js":
/*!****************************************************!*\
!*** ./node_modules/core-js/internals/own-keys.js ***!
\****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/core-js/internals/function-uncurry-this.js");
var getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js");
var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "./node_modules/core-js/internals/object-get-own-property-symbols.js");
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
var concat = uncurryThis([].concat);
// all object keys, includes non-enumerable and symbols
module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
var keys = getOwnPropertyNamesModule.f(anObject(it));
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
};
/***/ }),
/***/ "./node_modules/core-js/internals/redefine.js":
/*!****************************************************!*\
!*** ./node_modules/core-js/internals/redefine.js ***!
\****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/core-js/internals/is-callable.js");
var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/core-js/internals/has-own-property.js");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
var setGlobal = __webpack_require__(/*! ../internals/set-global */ "./node_modules/core-js/internals/set-global.js");
var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "./node_modules/core-js/internals/inspect-source.js");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
var CONFIGURABLE_FUNCTION_NAME = (__webpack_require__(/*! ../internals/function-name */ "./node_modules/core-js/internals/function-name.js").CONFIGURABLE);
var getInternalState = InternalStateModule.get;
var enforceInternalState = InternalStateModule.enforce;
var TEMPLATE = String(String).split('String');
(module.exports = function (O, key, value, options) {
var unsafe = options ? !!options.unsafe : false;
var simple = options ? !!options.enumerable : false;
var noTargetGet = options ? !!options.noTargetGet : false;
var name = options && options.name !== undefined ? options.name : key;
var state;
if (isCallable(value)) {
if (String(name).slice(0, 7) === 'Symbol(') {
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
}
if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
createNonEnumerableProperty(value, 'name', name);
}
state = enforceInternalState(value);
if (!state.source) {
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
}
}
if (O === global) {
if (simple) O[key] = value;
else setGlobal(key, value);
return;
} else if (!unsafe) {
delete O[key];
} else if (!noTargetGet && O[key]) {
simple = true;
}
if (simple) O[key] = value;
else createNonEnumerableProperty(O, key, value);
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, 'toString', function toString() {
return isCallable(this) && getInternalState(this).source || inspectSource(this);
});
/***/ }),
/***/ "./node_modules/core-js/internals/require-object-coercible.js":
/*!********************************************************************!*\
!*** ./node_modules/core-js/internals/require-object-coercible.js ***!
\********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var TypeError = global.TypeError;
// `RequireObjectCoercible` abstract operation
// https://tc39.es/ecma262/#sec-requireobjectcoercible
module.exports = function (it) {
if (it == undefined) throw TypeError("Can't call method on " + it);
return it;
};
/***/ }),
/***/ "./node_modules/core-js/internals/set-global.js":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/set-global.js ***!
\******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
// eslint-disable-next-line es/no-object-defineproperty -- safe
var defineProperty = Object.defineProperty;
module.exports = function (key, value) {
try {
defineProperty(global, key, { value: value, configurable: true, writable: true });
} catch (error) {
global[key] = value;
} return value;
};
/***/ }),
/***/ "./node_modules/core-js/internals/shared-key.js":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/shared-key.js ***!
\******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var shared = __webpack_require__(/*! ../internals/shared */ "./node_modules/core-js/internals/shared.js");
var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js");
var keys = shared('keys');
module.exports = function (key) {
return keys[key] || (keys[key] = uid(key));
};
/***/ }),
/***/ "./node_modules/core-js/internals/shared-store.js":
/*!********************************************************!*\
!*** ./node_modules/core-js/internals/shared-store.js ***!
\********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var setGlobal = __webpack_require__(/*! ../internals/set-global */ "./node_modules/core-js/internals/set-global.js");
var SHARED = '__core-js_shared__';
var store = global[SHARED] || setGlobal(SHARED, {});
module.exports = store;
/***/ }),
/***/ "./node_modules/core-js/internals/shared.js":
/*!**************************************************!*\
!*** ./node_modules/core-js/internals/shared.js ***!
\**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
var store = __webpack_require__(/*! ../internals/shared-store */ "./node_modules/core-js/internals/shared-store.js");
(module.exports = function (key, value) {
return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
version: '3.19.2',
mode: IS_PURE ? 'pure' : 'global',
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
});
/***/ }),
/***/ "./node_modules/core-js/internals/to-absolute-index.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/to-absolute-index.js ***!
\*************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var toIntegerOrInfinity = __webpack_require__(/*! ../internals/to-integer-or-infinity */ "./node_modules/core-js/internals/to-integer-or-infinity.js");
var max = Math.max;
var min = Math.min;
// Helper for a popular repeating case of the spec:
// Let integer be ? ToInteger(index).
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
module.exports = function (index, length) {
var integer = toIntegerOrInfinity(index);
return integer < 0 ? max(integer + length, 0) : min(integer, length);
};
/***/ }),
/***/ "./node_modules/core-js/internals/to-indexed-object.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/to-indexed-object.js ***!
\*************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
// toObject with fallback for non-array-like ES3 strings
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/core-js/internals/indexed-object.js");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
module.exports = function (it) {
return IndexedObject(requireObjectCoercible(it));
};
/***/ }),
/***/ "./node_modules/core-js/internals/to-integer-or-infinity.js":
/*!******************************************************************!*\
!*** ./node_modules/core-js/internals/to-integer-or-infinity.js ***!
\******************************************************************/
/***/ ((module) => {
var ceil = Math.ceil;
var floor = Math.floor;
// `ToIntegerOrInfinity` abstract operation
// https://tc39.es/ecma262/#sec-tointegerorinfinity
module.exports = function (argument) {
var number = +argument;
// eslint-disable-next-line no-self-compare -- safe
return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
};
/***/ }),
/***/ "./node_modules/core-js/internals/to-length.js":
/*!*****************************************************!*\
!*** ./node_modules/core-js/internals/to-length.js ***!
\*****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var toIntegerOrInfinity = __webpack_require__(/*! ../internals/to-integer-or-infinity */ "./node_modules/core-js/internals/to-integer-or-infinity.js");
var min = Math.min;
// `ToLength` abstract operation
// https://tc39.es/ecma262/#sec-tolength
module.exports = function (argument) {
return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
};
/***/ }),
/***/ "./node_modules/core-js/internals/to-object.js":
/*!*****************************************************!*\
!*** ./node_modules/core-js/internals/to-object.js ***!
\*****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
var Object = global.Object;
// `ToObject` abstract operation
// https://tc39.es/ecma262/#sec-toobject
module.exports = function (argument) {
return Object(requireObjectCoercible(argument));
};
/***/ }),
/***/ "./node_modules/core-js/internals/to-primitive.js":
/*!********************************************************!*\
!*** ./node_modules/core-js/internals/to-primitive.js ***!
\********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var call = __webpack_require__(/*! ../internals/function-call */ "./node_modules/core-js/internals/function-call.js");
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
var isSymbol = __webpack_require__(/*! ../internals/is-symbol */ "./node_modules/core-js/internals/is-symbol.js");
var getMethod = __webpack_require__(/*! ../internals/get-method */ "./node_modules/core-js/internals/get-method.js");
var ordinaryToPrimitive = __webpack_require__(/*! ../internals/ordinary-to-primitive */ "./node_modules/core-js/internals/ordinary-to-primitive.js");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
var TypeError = global.TypeError;
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
// `ToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-toprimitive
module.exports = function (input, pref) {
if (!isObject(input) || isSymbol(input)) return input;
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
var result;
if (exoticToPrim) {
if (pref === undefined) pref = 'default';
result = call(exoticToPrim, input, pref);
if (!isObject(result) || isSymbol(result)) return result;
throw TypeError("Can't convert object to primitive value");
}
if (pref === undefined) pref = 'number';
return ordinaryToPrimitive(input, pref);
};
/***/ }),
/***/ "./node_modules/core-js/internals/to-property-key.js":
/*!***********************************************************!*\
!*** ./node_modules/core-js/internals/to-property-key.js ***!
\***********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");
var isSymbol = __webpack_require__(/*! ../internals/is-symbol */ "./node_modules/core-js/internals/is-symbol.js");
// `ToPropertyKey` abstract operation
// https://tc39.es/ecma262/#sec-topropertykey
module.exports = function (argument) {
var key = toPrimitive(argument, 'string');
return isSymbol(key) ? key : key + '';
};
/***/ }),
/***/ "./node_modules/core-js/internals/to-string-tag-support.js":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/internals/to-string-tag-support.js ***!
\*****************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var test = {};
test[TO_STRING_TAG] = 'z';
module.exports = String(test) === '[object z]';
/***/ }),
/***/ "./node_modules/core-js/internals/try-to-string.js":
/*!*********************************************************!*\
!*** ./node_modules/core-js/internals/try-to-string.js ***!
\*********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var String = global.String;
module.exports = function (argument) {
try {
return String(argument);
} catch (error) {
return 'Object';
}
};
/***/ }),
/***/ "./node_modules/core-js/internals/uid.js":
/*!***********************************************!*\
!*** ./node_modules/core-js/internals/uid.js ***!
\***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/core-js/internals/function-uncurry-this.js");
var id = 0;
var postfix = Math.random();
var toString = uncurryThis(1.0.toString);
module.exports = function (key) {
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
};
/***/ }),
/***/ "./node_modules/core-js/internals/use-symbol-as-uid.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/use-symbol-as-uid.js ***!
\*************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
/* eslint-disable es/no-symbol -- required for testing */
var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "./node_modules/core-js/internals/native-symbol.js");
module.exports = NATIVE_SYMBOL
&& !Symbol.sham
&& typeof Symbol.iterator == 'symbol';
/***/ }),
/***/ "./node_modules/core-js/internals/well-known-symbol.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/well-known-symbol.js ***!
\*************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var shared = __webpack_require__(/*! ../internals/shared */ "./node_modules/core-js/internals/shared.js");
var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/core-js/internals/has-own-property.js");
var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js");
var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "./node_modules/core-js/internals/native-symbol.js");
var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ "./node_modules/core-js/internals/use-symbol-as-uid.js");
var WellKnownSymbolsStore = shared('wks');
var Symbol = global.Symbol;
var symbolFor = Symbol && Symbol['for'];
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
module.exports = function (name) {
if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
var description = 'Symbol.' + name;
if (NATIVE_SYMBOL && hasOwn(Symbol, name)) {
WellKnownSymbolsStore[name] = Symbol[name];
} else if (USE_SYMBOL_AS_UID && symbolFor) {
WellKnownSymbolsStore[name] = symbolFor(description);
} else {
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
}
} return WellKnownSymbolsStore[name];
};
/***/ }),
/***/ "./node_modules/core-js/modules/es.array.flat.js":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/es.array.flat.js ***!
\*******************************************************/
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var flattenIntoArray = __webpack_require__(/*! ../internals/flatten-into-array */ "./node_modules/core-js/internals/flatten-into-array.js");
var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
var lengthOfArrayLike = __webpack_require__(/*! ../internals/length-of-array-like */ "./node_modules/core-js/internals/length-of-array-like.js");
var toIntegerOrInfinity = __webpack_require__(/*! ../internals/to-integer-or-infinity */ "./node_modules/core-js/internals/to-integer-or-infinity.js");
var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "./node_modules/core-js/internals/array-species-create.js");
// `Array.prototype.flat` method
// https://tc39.es/ecma262/#sec-array.prototype.flat
$({ target: 'Array', proto: true }, {
flat: function flat(/* depthArg = 1 */) {
var depthArg = arguments.length ? arguments[0] : undefined;
var O = toObject(this);
var sourceLen = lengthOfArrayLike(O);
var A = arraySpeciesCreate(O, 0);
A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toIntegerOrInfinity(depthArg));
return A;
}
});
/***/ }),
/***/ "./node_modules/core-js/modules/es.array.unscopables.flat.js":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/modules/es.array.unscopables.flat.js ***!
\*******************************************************************/
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
// this method was added to unscopables after implementation
// in popular engines, so it's moved to a separate module
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "./node_modules/core-js/internals/add-to-unscopables.js");
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('flat');
/***/ }),
/***/ "./node_modules/decode-uri-component/index.js":
/*!****************************************************!*\
!*** ./node_modules/decode-uri-component/index.js ***!
\****************************************************/
/***/ ((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);
}
};
/***/ }),
/***/ "./node_modules/deepmerge/dist/cjs.js":
/*!********************************************!*\
!*** ./node_modules/deepmerge/dist/cjs.js ***!
\********************************************/
/***/ ((module) => {
"use strict";
var isMergeableObject = function isMergeableObject(value) {
return isNonNullObject(value)
&& !isSpecial(value)
};
function isNonNullObject(value) {
return !!value && typeof value === 'object'
}
function isSpecial(value) {
var stringValue = Object.prototype.toString.call(value);
return stringValue === '[object RegExp]'
|| stringValue === '[object Date]'
|| isReactElement(value)
}
// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
function isReactElement(value) {
return value.$$typeof === REACT_ELEMENT_TYPE
}
function emptyTarget(val) {
return Array.isArray(val) ? [] : {}
}
function cloneUnlessOtherwiseSpecified(value, options) {
return (options.clone !== false && options.isMergeableObject(value))
? deepmerge(emptyTarget(value), value, options)
: value
}
function defaultArrayMerge(target, source, options) {
return target.concat(source).map(function(element) {
return cloneUnlessOtherwiseSpecified(element, options)
})
}
function getMergeFunction(key, options) {
if (!options.customMerge) {
return deepmerge
}
var customMerge = options.customMerge(key);
return typeof customMerge === 'function' ? customMerge : deepmerge
}
function getEnumerableOwnPropertySymbols(target) {
return Object.getOwnPropertySymbols
? Object.getOwnPropertySymbols(target).filter(function(symbol) {
return target.propertyIsEnumerable(symbol)
})
: []
}
function getKeys(target) {
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
}
function propertyIsOnObject(object, property) {
try {
return property in object
} catch(_) {
return false
}
}
// Protects from prototype poisoning and unexpected merging up the prototype chain.
function propertyIsUnsafe(target, key) {
return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
}
function mergeObject(target, source, options) {
var destination = {};
if (options.isMergeableObject(target)) {
getKeys(target).forEach(function(key) {
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
});
}
getKeys(source).forEach(function(key) {
if (propertyIsUnsafe(target, key)) {
return
}
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
} else {
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
}
});
return destination
}
function deepmerge(target, source, options) {
options = options || {};
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
// implementations can use it. The caller may not replace it.
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
var sourceIsArray = Array.isArray(source);
var targetIsArray = Array.isArray(target);
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
if (!sourceAndTargetTypesMatch) {
return cloneUnlessOtherwiseSpecified(source, options)
} else if (sourceIsArray) {
return options.arrayMerge(target, source, options)
} else {
return mergeObject(target, source, options)
}
}
deepmerge.all = function deepmergeAll(array, options) {
if (!Array.isArray(array)) {
throw new Error('first argument should be an array')
}
return array.reduce(function(prev, next) {
return deepmerge(prev, next, options)
}, {})
};
var deepmerge_1 = deepmerge;
module.exports = deepmerge_1;
/***/ }),
/***/ "./node_modules/extend/index.js":
/*!**************************************!*\
!*** ./node_modules/extend/index.js ***!
\**************************************/
/***/ ((module) => {
"use strict";
var hasOwn = Object.prototype.hasOwnProperty;
var toStr = Object.prototype.toString;
var defineProperty = Object.defineProperty;
var gOPD = Object.getOwnPropertyDescriptor;
var isArray = function isArray(arr) {
if (typeof Array.isArray === 'function') {
return Array.isArray(arr);
}
return toStr.call(arr) === '[object Array]';
};
var isPlainObject = function isPlainObject(obj) {
if (!obj || toStr.call(obj) !== '[object Object]') {
return false;
}
var hasOwnConstructor = hasOwn.call(obj, 'constructor');
var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
// Not own constructor property must be Object
if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
return false;
}
// Own properties are enumerated firstly, so to speed up,
// if last one is own, then all properties are own.
var key;
for (key in obj) { /**/ }
return typeof key === 'undefined' || hasOwn.call(obj, key);
};
// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target
var setProperty = function setProperty(target, options) {
if (defineProperty && options.name === '__proto__') {
defineProperty(target, options.name, {
enumerable: true,
configurable: true,
value: options.newValue,
writable: true
});
} else {
target[options.name] = options.newValue;
}
};
// Return undefined instead of __proto__ if '__proto__' is not an own property
var getProperty = function getProperty(obj, name) {
if (name === '__proto__') {
if (!hasOwn.call(obj, name)) {
return void 0;
} else if (gOPD) {
// In early versions of node, obj['__proto__'] is buggy when obj has
// __proto__ as an own property. Object.getOwnPropertyDescriptor() works.
return gOPD(obj, name).value;
}
}
return obj[name];
};
module.exports = function extend() {
var options, name, src, copy, copyIsArray, clone;
var target = arguments[0];
var i = 1;
var length = arguments.length;
var deep = false;
// Handle a deep copy situation
if (typeof target === 'boolean') {
deep = target;
target = arguments[1] || {};
// skip the boolean and the target
i = 2;
}
if (target == null || (typeof target !== 'object' && typeof target !== 'function')) {
target = {};
}
for (; i < length; ++i) {
options = arguments[i];
// Only deal with non-null/undefined values
if (options != null) {
// Extend the base object
for (name in options) {
src = getProperty(target, name);
copy = getProperty(options, name);
// Prevent never-ending loop
if (target !== copy) {
// Recurse if we're merging plain objects or arrays
if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
if (copyIsArray) {
copyIsArray = false;
clone = src && isArray(src) ? src : [];
} else {
clone = src && isPlainObject(src) ? src : {};
}
// Never move original objects, clone them
setProperty(target, { name: name, newValue: extend(deep, clone, copy) });
// Don't bring in undefined values
} else if (typeof copy !== 'undefined') {
setProperty(target, { name: name, newValue: copy });
}
}
}
}
}
// Return the modified object
return target;
};
/***/ }),
/***/ "./node_modules/filter-obj/index.js":
/*!******************************************!*\
!*** ./node_modules/filter-obj/index.js ***!
\******************************************/
/***/ ((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;
};
/***/ }),
/***/ "./node_modules/gatsby-link/index.js":
/*!*******************************************!*\
!*** ./node_modules/gatsby-link/index.js ***!
\*******************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
exports.__esModule = true;
exports.withPrefix = withPrefix;
exports.withAssetPrefix = withAssetPrefix;
exports.navigate = exports["default"] = void 0;
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js"));
var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inheritsLoose */ "./node_modules/@babel/runtime/helpers/inheritsLoose.js"));
var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js"));
var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"));
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
var _reachRouter = __webpack_require__(/*! @gatsbyjs/reach-router */ "./node_modules/@gatsbyjs/reach-router/es/index.js");
var _utils = __webpack_require__(/*! @gatsbyjs/reach-router/lib/utils */ "./node_modules/@gatsbyjs/reach-router/lib/utils.js");
var _parsePath = __webpack_require__(/*! ./parse-path */ "./node_modules/gatsby-link/parse-path.js");
exports.parsePath = _parsePath.parsePath;
var _excluded = ["to", "getProps", "onClick", "onMouseEnter", "activeClassName", "activeStyle", "innerRef", "partiallyActive", "state", "replace", "_location"];
var isAbsolutePath = function isAbsolutePath(path) {
return path === null || path === void 0 ? void 0 : path.startsWith("/");
};
function withPrefix(path, prefix) {
var _ref, _prefix;
if (prefix === void 0) {
prefix = getGlobalBasePrefix();
}
if (!isLocalLink(path)) {
return path;
}
if (path.startsWith("./") || path.startsWith("../")) {
return path;
}
var base = (_ref = (_prefix = prefix) !== null && _prefix !== void 0 ? _prefix : getGlobalPathPrefix()) !== null && _ref !== void 0 ? _ref : "/";
return "" + (base !== null && base !== void 0 && base.endsWith("/") ? base.slice(0, -1) : base) + (path.startsWith("/") ? path : "/" + path);
} // These global values are wrapped in typeof clauses to ensure the values exist.
// This is especially problematic in unit testing of this component.
var getGlobalPathPrefix = function getGlobalPathPrefix() {
return true ? true ? "" : 0 : 0;
};
var getGlobalBasePrefix = function getGlobalBasePrefix() {
return true ? true ? "" : 0 : 0;
};
var isLocalLink = function isLocalLink(path) {
return path && !path.startsWith("http://") && !path.startsWith("https://") && !path.startsWith("//");
};
function withAssetPrefix(path) {
return withPrefix(path, getGlobalPathPrefix());
}
function absolutify(path, current) {
// If it's already absolute, return as-is
if (isAbsolutePath(path)) {
return path;
}
return (0, _utils.resolve)(path, current);
}
var rewriteLinkPath = function rewriteLinkPath(path, relativeTo) {
if (typeof path === "number") {
return path;
}
if (!isLocalLink(path)) {
return path;
}
return isAbsolutePath(path) ? withPrefix(path) : absolutify(path, relativeTo);
};
var NavLinkPropTypes = {
activeClassName: _propTypes.default.string,
activeStyle: _propTypes.default.object,
partiallyActive: _propTypes.default.bool
}; // Set up IntersectionObserver
var createIntersectionObserver = function createIntersectionObserver(el, cb) {
var io = new window.IntersectionObserver(function (entries) {
entries.forEach(function (entry) {
if (el === entry.target) {
// Check if element is within viewport, remove listener, destroy observer, and run link callback.
// MSEdge doesn't currently support isIntersecting, so also test for an intersectionRatio > 0
if (entry.isIntersecting || entry.intersectionRatio > 0) {
io.unobserve(el);
io.disconnect();
cb();
}
}
});
}); // Add element to the observer
io.observe(el);
return {
instance: io,
el: el
};
};
function GatsbyLinkLocationWrapper(props) {
return /*#__PURE__*/_react.default.createElement(_reachRouter.Location, null, function (_ref2) {
var location = _ref2.location;
return /*#__PURE__*/_react.default.createElement(GatsbyLink, (0, _extends2.default)({}, props, {
_location: location
}));
});
}
var GatsbyLink = /*#__PURE__*/function (_React$Component) {
(0, _inheritsLoose2.default)(GatsbyLink, _React$Component);
function GatsbyLink(props) {
var _this;
_this = _React$Component.call(this, props) || this; // Default to no support for IntersectionObserver
_this.defaultGetProps = function (_ref3) {
var isPartiallyCurrent = _ref3.isPartiallyCurrent,
isCurrent = _ref3.isCurrent;
if (_this.props.partiallyActive ? isPartiallyCurrent : isCurrent) {
return {
className: [_this.props.className, _this.props.activeClassName].filter(Boolean).join(" "),
style: (0, _extends2.default)({}, _this.props.style, _this.props.activeStyle)
};
}
return null;
};
var IOSupported = false;
if (typeof window !== "undefined" && window.IntersectionObserver) {
IOSupported = true;
}
_this.state = {
IOSupported: IOSupported
};
_this.handleRef = _this.handleRef.bind((0, _assertThisInitialized2.default)(_this));
return _this;
}
var _proto = GatsbyLink.prototype;
_proto._prefetch = function _prefetch() {
var currentPath = window.location.pathname; // reach router should have the correct state
if (this.props._location && this.props._location.pathname) {
currentPath = this.props._location.pathname;
}
var rewrittenPath = rewriteLinkPath(this.props.to, currentPath);
var newPathName = (0, _parsePath.parsePath)(rewrittenPath).pathname; // Prefech is used to speed up next navigations. When you use it on the current navigation,
// there could be a race-condition where Chrome uses the stale data instead of waiting for the network to complete
if (currentPath !== newPathName) {
___loader.enqueue(newPathName);
}
};
_proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {
// Preserve non IO functionality if no support
if (this.props.to !== prevProps.to && !this.state.IOSupported) {
this._prefetch();
}
};
_proto.componentDidMount = function componentDidMount() {
// Preserve non IO functionality if no support
if (!this.state.IOSupported) {
this._prefetch();
}
};
_proto.componentWillUnmount = function componentWillUnmount() {
if (!this.io) {
return;
}
var _this$io = this.io,
instance = _this$io.instance,
el = _this$io.el;
instance.unobserve(el);
instance.disconnect();
};
_proto.handleRef = function handleRef(ref) {
var _this2 = this;
if (this.props.innerRef && this.props.innerRef.hasOwnProperty("current")) {
this.props.innerRef.current = ref;
} else if (this.props.innerRef) {
this.props.innerRef(ref);
}
if (this.state.IOSupported && ref) {
// If IO supported and element reference found, setup Observer functionality
this.io = createIntersectionObserver(ref, function () {
_this2._prefetch();
});
}
};
_proto.render = function render() {
var _this3 = this;
var _this$props = this.props,
to = _this$props.to,
_this$props$getProps = _this$props.getProps,
getProps = _this$props$getProps === void 0 ? this.defaultGetProps : _this$props$getProps,
_onClick = _this$props.onClick,
_onMouseEnter = _this$props.onMouseEnter,
$activeClassName = _this$props.activeClassName,
$activeStyle = _this$props.activeStyle,
$innerRef = _this$props.innerRef,
partiallyActive = _this$props.partiallyActive,
state = _this$props.state,
replace = _this$props.replace,
_location = _this$props._location,
rest = (0, _objectWithoutPropertiesLoose2.default)(_this$props, _excluded);
if ( true && !isLocalLink(to)) {
console.warn("External link " + to + " was detected in a Link component. Use the Link component only for internal links. See: https://gatsby.dev/internal-links");
}
var prefixedTo = rewriteLinkPath(to, _location.pathname);
if (!isLocalLink(prefixedTo)) {
return /*#__PURE__*/_react.default.createElement("a", (0, _extends2.default)({
href: prefixedTo
}, rest));
}
return /*#__PURE__*/_react.default.createElement(_reachRouter.Link, (0, _extends2.default)({
to: prefixedTo,
state: state,
getProps: getProps,
innerRef: this.handleRef,
onMouseEnter: function onMouseEnter(e) {
if (_onMouseEnter) {
_onMouseEnter(e);
}
___loader.hovering((0, _parsePath.parsePath)(prefixedTo).pathname);
},
onClick: function onClick(e) {
if (_onClick) {
_onClick(e);
}
if (e.button === 0 && // ignore right clicks
!_this3.props.target && // let browser handle "target=_blank"
!e.defaultPrevented && // onClick prevented default
!e.metaKey && // ignore clicks with modifier keys...
!e.altKey && !e.ctrlKey && !e.shiftKey) {
e.preventDefault();
var shouldReplace = replace;
var isCurrent = encodeURI(prefixedTo) === _location.pathname;
if (typeof replace !== "boolean" && isCurrent) {
shouldReplace = true;
} // Make sure the necessary scripts and data are
// loaded before continuing.
window.___navigate(prefixedTo, {
state: state,
replace: shouldReplace
});
}
return true;
}
}, rest));
};
return GatsbyLink;
}(_react.default.Component);
GatsbyLink.propTypes = (0, _extends2.default)({}, NavLinkPropTypes, {
onClick: _propTypes.default.func,
to: _propTypes.default.string.isRequired,
replace: _propTypes.default.bool,
state: _propTypes.default.object
});
var _default = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
return /*#__PURE__*/_react.default.createElement(GatsbyLinkLocationWrapper, (0, _extends2.default)({
innerRef: ref
}, props));
});
exports["default"] = _default;
var navigate = function navigate(to, options) {
window.___navigate(rewriteLinkPath(to, window.location.pathname), options);
};
exports.navigate = navigate;
/***/ }),
/***/ "./node_modules/gatsby-link/parse-path.js":
/*!************************************************!*\
!*** ./node_modules/gatsby-link/parse-path.js ***!
\************************************************/
/***/ ((__unused_webpack_module, exports) => {
"use strict";
exports.__esModule = true;
exports.parsePath = parsePath;
function parsePath(path) {
var pathname = path || "/";
var search = "";
var hash = "";
var hashIndex = pathname.indexOf("#");
if (hashIndex !== -1) {
hash = pathname.substr(hashIndex);
pathname = pathname.substr(0, hashIndex);
}
var searchIndex = pathname.indexOf("?");
if (searchIndex !== -1) {
search = pathname.substr(searchIndex);
pathname = pathname.substr(0, searchIndex);
}
return {
pathname: pathname,
search: search === "?" ? "" : search,
hash: hash === "#" ? "" : hash
};
}
/***/ }),
/***/ "./node_modules/gatsby-react-router-scroll/index.js":
/*!**********************************************************!*\
!*** ./node_modules/gatsby-react-router-scroll/index.js ***!
\**********************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
exports.__esModule = true;
exports.useScrollRestoration = exports.ScrollContext = void 0;
var _scrollHandler = __webpack_require__(/*! ./scroll-handler */ "./node_modules/gatsby-react-router-scroll/scroll-handler.js");
exports.ScrollContext = _scrollHandler.ScrollHandler;
var _useScrollRestoration = __webpack_require__(/*! ./use-scroll-restoration */ "./node_modules/gatsby-react-router-scroll/use-scroll-restoration.js");
exports.useScrollRestoration = _useScrollRestoration.useScrollRestoration;
/***/ }),
/***/ "./node_modules/gatsby-react-router-scroll/scroll-handler.js":
/*!*******************************************************************!*\
!*** ./node_modules/gatsby-react-router-scroll/scroll-handler.js ***!
\*******************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
exports.__esModule = true;
exports.ScrollHandler = exports.ScrollContext = void 0;
var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inheritsLoose */ "./node_modules/@babel/runtime/helpers/inheritsLoose.js"));
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"));
var _sessionStorage = __webpack_require__(/*! ./session-storage */ "./node_modules/gatsby-react-router-scroll/session-storage.js");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var ScrollContext = /*#__PURE__*/React.createContext(new _sessionStorage.SessionStorage());
exports.ScrollContext = ScrollContext;
ScrollContext.displayName = "GatsbyScrollContext";
var ScrollHandler = /*#__PURE__*/function (_React$Component) {
(0, _inheritsLoose2.default)(ScrollHandler, _React$Component);
function ScrollHandler() {
var _this;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
_this._stateStorage = new _sessionStorage.SessionStorage();
_this._isTicking = false;
_this._latestKnownScrollY = 0;
_this.scrollListener = function () {
_this._latestKnownScrollY = window.scrollY;
if (!_this._isTicking) {
_this._isTicking = true;
requestAnimationFrame(_this._saveScroll.bind((0, _assertThisInitialized2.default)(_this)));
}
};
_this.windowScroll = function (position, prevProps) {
if (_this.shouldUpdateScroll(prevProps, _this.props)) {
window.scrollTo(0, position);
}
};
_this.scrollToHash = function (hash, prevProps) {
var node = document.getElementById(hash.substring(1));
if (node && _this.shouldUpdateScroll(prevProps, _this.props)) {
node.scrollIntoView();
}
};
_this.shouldUpdateScroll = function (prevRouterProps, routerProps) {
var shouldUpdateScroll = _this.props.shouldUpdateScroll;
if (!shouldUpdateScroll) {
return true;
} // Hack to allow accessing this._stateStorage.
return shouldUpdateScroll.call((0, _assertThisInitialized2.default)(_this), prevRouterProps, routerProps);
};
return _this;
}
var _proto = ScrollHandler.prototype;
_proto._saveScroll = function _saveScroll() {
var key = this.props.location.key || null;
if (key) {
this._stateStorage.save(this.props.location, key, this._latestKnownScrollY);
}
this._isTicking = false;
};
_proto.componentDidMount = function componentDidMount() {
window.addEventListener("scroll", this.scrollListener);
var scrollPosition;
var _this$props$location = this.props.location,
key = _this$props$location.key,
hash = _this$props$location.hash;
if (key) {
scrollPosition = this._stateStorage.read(this.props.location, key);
}
if (scrollPosition) {
this.windowScroll(scrollPosition, undefined);
} else if (hash) {
this.scrollToHash(decodeURI(hash), undefined);
}
};
_proto.componentWillUnmount = function componentWillUnmount() {
window.removeEventListener("scroll", this.scrollListener);
};
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
var _this$props$location2 = this.props.location,
hash = _this$props$location2.hash,
key = _this$props$location2.key;
var scrollPosition;
if (key) {
scrollPosition = this._stateStorage.read(this.props.location, key);
}
/** There are two pieces of state: the browser url and
* history state which keeps track of scroll position
* Native behaviour prescribes that we ought to restore scroll position
* when a user navigates back in their browser (this is the `POP` action)
* Currently, reach router has a bug that prevents this at https://github.com/reach/router/issues/228
* So we _always_ stick to the url as a source of truth — if the url
* contains a hash, we scroll to it
*/
if (hash) {
this.scrollToHash(decodeURI(hash), prevProps);
} else {
this.windowScroll(scrollPosition, prevProps);
}
};
_proto.render = function render() {
return /*#__PURE__*/React.createElement(ScrollContext.Provider, {
value: this._stateStorage
}, this.props.children);
};
return ScrollHandler;
}(React.Component);
exports.ScrollHandler = ScrollHandler;
ScrollHandler.propTypes = {
shouldUpdateScroll: _propTypes.default.func,
children: _propTypes.default.element.isRequired,
location: _propTypes.default.object.isRequired
};
/***/ }),
/***/ "./node_modules/gatsby-react-router-scroll/session-storage.js":
/*!********************************************************************!*\
!*** ./node_modules/gatsby-react-router-scroll/session-storage.js ***!
\********************************************************************/
/***/ ((__unused_webpack_module, exports) => {
"use strict";
exports.__esModule = true;
exports.SessionStorage = void 0;
var STATE_KEY_PREFIX = "@@scroll|";
var GATSBY_ROUTER_SCROLL_STATE = "___GATSBY_REACT_ROUTER_SCROLL";
var SessionStorage = /*#__PURE__*/function () {
function SessionStorage() {}
var _proto = SessionStorage.prototype;
_proto.read = function read(location, key) {
var stateKey = this.getStateKey(location, key);
try {
var value = window.sessionStorage.getItem(stateKey);
return value ? JSON.parse(value) : 0;
} catch (e) {
if (true) {
console.warn("[gatsby-react-router-scroll] Unable to access sessionStorage; sessionStorage is not available.");
}
if (window && window[GATSBY_ROUTER_SCROLL_STATE] && window[GATSBY_ROUTER_SCROLL_STATE][stateKey]) {
return window[GATSBY_ROUTER_SCROLL_STATE][stateKey];
}
return 0;
}
};
_proto.save = function save(location, key, value) {
var stateKey = this.getStateKey(location, key);
var storedValue = JSON.stringify(value);
try {
window.sessionStorage.setItem(stateKey, storedValue);
} catch (e) {
if (window && window[GATSBY_ROUTER_SCROLL_STATE]) {
window[GATSBY_ROUTER_SCROLL_STATE][stateKey] = JSON.parse(storedValue);
} else {
window[GATSBY_ROUTER_SCROLL_STATE] = {};
window[GATSBY_ROUTER_SCROLL_STATE][stateKey] = JSON.parse(storedValue);
}
if (true) {
console.warn("[gatsby-react-router-scroll] Unable to save state in sessionStorage; sessionStorage is not available.");
}
}
};
_proto.getStateKey = function getStateKey(location, key) {
var stateKeyBase = "" + STATE_KEY_PREFIX + location.pathname;
return key === null || typeof key === "undefined" ? stateKeyBase : stateKeyBase + "|" + key;
};
return SessionStorage;
}();
exports.SessionStorage = SessionStorage;
/***/ }),
/***/ "./node_modules/gatsby-react-router-scroll/use-scroll-restoration.js":
/*!***************************************************************************!*\
!*** ./node_modules/gatsby-react-router-scroll/use-scroll-restoration.js ***!
\***************************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
exports.__esModule = true;
exports.useScrollRestoration = useScrollRestoration;
var _scrollHandler = __webpack_require__(/*! ./scroll-handler */ "./node_modules/gatsby-react-router-scroll/scroll-handler.js");
var _react = __webpack_require__(/*! react */ "react");
var _reachRouter = __webpack_require__(/*! @gatsbyjs/reach-router */ "./node_modules/@gatsbyjs/reach-router/es/index.js");
function useScrollRestoration(identifier) {
var location = (0, _reachRouter.useLocation)();
var state = (0, _react.useContext)(_scrollHandler.ScrollContext);
var ref = (0, _react.useRef)(null);
(0, _react.useLayoutEffect)(function () {
if (ref.current) {
var position = state.read(location, identifier);
ref.current.scrollTo(0, position || 0);
}
}, [location.key]);
return {
ref: ref,
onScroll: function onScroll() {
if (ref.current) {
state.save(location, identifier, ref.current.scrollTop);
}
}
};
}
/***/ }),
/***/ "./node_modules/gatsby/dist/internal-plugins/bundle-optimisations/polyfills/object-assign.js":
/*!***************************************************************************************************!*\
!*** ./node_modules/gatsby/dist/internal-plugins/bundle-optimisations/polyfills/object-assign.js ***!
\***************************************************************************************************/
/***/ ((module) => {
"use strict";
module.exports = Object.assign;
//# sourceMappingURL=object-assign.js.map
/***/ }),
/***/ "./.cache/api-runner-ssr.js":
/*!**********************************!*\
!*** ./.cache/api-runner-ssr.js ***!
\**********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "apiRunner": () => (/* binding */ apiRunner),
/* harmony export */ "apiRunnerAsync": () => (/* binding */ apiRunnerAsync)
/* harmony export */ });
/* harmony import */ var _babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var plugins = [{
name: 'gatsby-plugin-react-helmet',
plugin: __webpack_require__(/*! ./node_modules/gatsby-plugin-react-helmet/gatsby-ssr */ "./node_modules/gatsby-plugin-react-helmet/gatsby-ssr.js"),
options: {
"plugins": []
}
}, {
name: 'gatsby-remark-autolink-headers',
plugin: __webpack_require__(/*! ./node_modules/gatsby-remark-autolink-headers/gatsby-ssr */ "./node_modules/gatsby-remark-autolink-headers/gatsby-ssr.js"),
options: {
"plugins": [],
"elements": ["h2", "h3", "h4"],
"offsetY": 0,
"className": "anchor"
}
}, {
name: 'gatsby-plugin-theme-ui',
plugin: __webpack_require__(/*! ./node_modules/gatsby-plugin-theme-ui/gatsby-ssr */ "./node_modules/gatsby-plugin-theme-ui/gatsby-ssr.js"),
options: {
"plugins": []
}
}, {
name: 'default-site-plugin',
plugin: __webpack_require__(/*! ./gatsby-ssr */ "./gatsby-ssr.js"),
options: {
"plugins": []
}
}];
/* global plugins */
// During bootstrap, we write requires at top of this file which looks like:
// var plugins = [
// {
// plugin: require("/path/to/plugin1/gatsby-ssr.js"),
// options: { ... },
// },
// {
// plugin: require("/path/to/plugin2/gatsby-ssr.js"),
// options: { ... },
// },
// ]
var apis = __webpack_require__(/*! ./api-ssr-docs */ "./.cache/api-ssr-docs.js");
function augmentErrorWithPlugin(plugin, err) {
if (plugin.name !== "default-site-plugin") {
// default-site-plugin is user code and will print proper stack trace,
// so no point in annotating error message pointing out which plugin is root of the problem
err.message += " (from plugin: " + plugin.name + ")";
}
throw err;
}
function apiRunner(api, args, defaultReturn, argTransform) {
if (!apis[api]) {
console.log("This API doesn't exist", api);
}
var results = [];
plugins.forEach(function (plugin) {
var apiFn = plugin.plugin[api];
if (!apiFn) {
return;
}
try {
var result = apiFn(args, plugin.options);
if (result && argTransform) {
args = argTransform({
args: args,
result: result
});
} // This if case keeps behaviour as before, we should allow undefined here as the api is defined
// TODO V4
if (typeof result !== "undefined") {
results.push(result);
}
} catch (e) {
augmentErrorWithPlugin(plugin, e);
}
});
return results.length ? results : [defaultReturn];
}
function apiRunnerAsync(_x, _x2, _x3, _x4) {
return _apiRunnerAsync.apply(this, arguments);
}
function _apiRunnerAsync() {
_apiRunnerAsync = (0,_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee(api, args, defaultReturn, argTransform) {
var results, _iterator, _step, plugin, apiFn, result;
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
if (!apis[api]) {
console.log("This API doesn't exist", api);
}
results = [];
_iterator = _createForOfIteratorHelperLoose(plugins);
case 3:
if ((_step = _iterator()).done) {
_context.next = 21;
break;
}
plugin = _step.value;
apiFn = plugin.plugin[api];
if (apiFn) {
_context.next = 8;
break;
}
return _context.abrupt("continue", 19);
case 8:
_context.prev = 8;
_context.next = 11;
return apiFn(args, plugin.options);
case 11:
result = _context.sent;
if (result && argTransform) {
args = argTransform({
args: args,
result: result
});
} // This if case keeps behaviour as before, we should allow undefined here as the api is defined
// TODO V4
if (typeof result !== "undefined") {
results.push(result);
}
_context.next = 19;
break;
case 16:
_context.prev = 16;
_context.t0 = _context["catch"](8);
augmentErrorWithPlugin(plugin, _context.t0);
case 19:
_context.next = 3;
break;
case 21:
return _context.abrupt("return", results.length ? results : [defaultReturn]);
case 22:
case "end":
return _context.stop();
}
}
}, _callee, null, [[8, 16]]);
}));
return _apiRunnerAsync.apply(this, arguments);
}
/***/ }),
/***/ "./.cache/api-ssr-docs.js":
/*!********************************!*\
!*** ./.cache/api-ssr-docs.js ***!
\********************************/
/***/ ((__unused_webpack_module, exports) => {
/**
* Object containing options defined in `gatsby-config.js`
* @typedef {object} pluginOptions
*/
/**
* Replace the default server renderer. This is useful for integration with
* Redux, css-in-js libraries, etc. that need custom setups for server
* rendering.
* @param {object} $0
* @param {string} $0.pathname The pathname of the page currently being rendered.
* @param {ReactNode} $0.bodyComponent The React element to be rendered as the page body
* @param {function} $0.replaceBodyHTMLString Call this with the HTML string
* you render. **WARNING** if multiple plugins implement this API it's the
* last plugin that "wins". TODO implement an automated warning against this.
* @param {function} $0.setHeadComponents Takes an array of components as its
* first argument which are added to the `headComponents` array which is passed
* to the `html.js` component.
* @param {function} $0.setHtmlAttributes Takes an object of props which will
* spread into the `` component.
* @param {function} $0.setBodyAttributes Takes an object of props which will
* spread into the `` component.
* @param {function} $0.setPreBodyComponents Takes an array of components as its
* first argument which are added to the `preBodyComponents` array which is passed
* to the `html.js` component.
* @param {function} $0.setPostBodyComponents Takes an array of components as its
* first argument which are added to the `postBodyComponents` array which is passed
* to the `html.js` component.
* @param {function} $0.setBodyProps Takes an object of data which
* is merged with other body props and passed to `html.js` as `bodyProps`.
* @param {pluginOptions} pluginOptions
* @example
* // From gatsby-plugin-glamor
* const { renderToString } = require("react-dom/server")
* const inline = require("glamor-inline")
*
* exports.replaceRenderer = ({ bodyComponent, replaceBodyHTMLString }) => {
* const bodyHTML = renderToString(bodyComponent)
* const inlinedHTML = inline(bodyHTML)
*
* replaceBodyHTMLString(inlinedHTML)
* }
*/
exports.replaceRenderer = true;
/**
* Called after every page Gatsby server renders while building HTML so you can
* set head and body components to be rendered in your `html.js`.
*
* Gatsby does a two-pass render for HTML. It loops through your pages first
* rendering only the body and then takes the result body HTML string and
* passes it as the `body` prop to your `html.js` to complete the render.
*
* It's often handy to be able to send custom components to your `html.js`.
* For example, it's a very common pattern for React.js libraries that
* support server rendering to pull out data generated during the render to
* add to your HTML.
*
* Using this API over [`replaceRenderer`](#replaceRenderer) is preferable as
* multiple plugins can implement this API where only one plugin can take
* over server rendering. However, if your plugin requires taking over server
* rendering then that's the one to
* use
* @param {object} $0
* @param {string} $0.pathname The pathname of the page currently being rendered.
* @param {function} $0.setHeadComponents Takes an array of components as its
* first argument which are added to the `headComponents` array which is passed
* to the `html.js` component.
* @param {function} $0.setHtmlAttributes Takes an object of props which will
* spread into the `` component.
* @param {function} $0.setBodyAttributes Takes an object of props which will
* spread into the `` component.
* @param {function} $0.setPreBodyComponents Takes an array of components as its
* first argument which are added to the `preBodyComponents` array which is passed
* to the `html.js` component.
* @param {function} $0.setPostBodyComponents Takes an array of components as its
* first argument which are added to the `postBodyComponents` array which is passed
* to the `html.js` component.
* @param {function} $0.setBodyProps Takes an object of data which
* is merged with other body props and passed to `html.js` as `bodyProps`.
* @param {pluginOptions} pluginOptions
* @example
* // Import React so that you can use JSX in HeadComponents
* const React = require("react")
*
* const HtmlAttributes = {
* lang: "en"
* }
*
* const HeadComponents = [
*
* ]
*
* const BodyAttributes = {
* "data-theme": "dark"
* }
*
* exports.onRenderBody = ({
* setHeadComponents,
* setHtmlAttributes,
* setBodyAttributes
* }, pluginOptions) => {
* setHtmlAttributes(HtmlAttributes)
* setHeadComponents(HeadComponents)
* setBodyAttributes(BodyAttributes)
* }
*/
exports.onRenderBody = true;
/**
* Called after every page Gatsby server renders while building HTML so you can
* replace head components to be rendered in your `html.js`. This is useful if
* you need to reorder scripts or styles added by other plugins.
* @param {object} $0
* @param {string} $0.pathname The pathname of the page currently being rendered.
* @param {Array} $0.getHeadComponents Returns the current `headComponents` array.
* @param {function} $0.replaceHeadComponents Takes an array of components as its
* first argument which replace the `headComponents` array which is passed
* to the `html.js` component. **WARNING** if multiple plugins implement this
* API it's the last plugin that "wins".
* @param {Array} $0.getPreBodyComponents Returns the current `preBodyComponents` array.
* @param {function} $0.replacePreBodyComponents Takes an array of components as its
* first argument which replace the `preBodyComponents` array which is passed
* to the `html.js` component. **WARNING** if multiple plugins implement this
* API it's the last plugin that "wins".
* @param {Array} $0.getPostBodyComponents Returns the current `postBodyComponents` array.
* @param {function} $0.replacePostBodyComponents Takes an array of components as its
* first argument which replace the `postBodyComponents` array which is passed
* to the `html.js` component. **WARNING** if multiple plugins implement this
* API it's the last plugin that "wins".
* @param {pluginOptions} pluginOptions
* @example
* // Move Typography.js styles to the top of the head section so they're loaded first.
* exports.onPreRenderHTML = ({ getHeadComponents, replaceHeadComponents }) => {
* const headComponents = getHeadComponents()
* headComponents.sort((x, y) => {
* if (x.key === 'TypographyStyle') {
* return -1
* } else if (y.key === 'TypographyStyle') {
* return 1
* }
* return 0
* })
* replaceHeadComponents(headComponents)
* }
*/
exports.onPreRenderHTML = true;
/**
* Allow a plugin to wrap the page element.
*
* This is useful for setting wrapper components around pages that won't get
* unmounted on page changes. For setting Provider components, use [wrapRootElement](#wrapRootElement).
*
* _Note:_
* There is an equivalent hook in Gatsby's [Browser API](/docs/browser-apis/#wrapPageElement).
* It is recommended to use both APIs together.
* For example usage, check out [Using i18n](https://github.com/gatsbyjs/gatsby/tree/master/examples/using-i18n).
* @param {object} $0
* @param {ReactNode} $0.element The "Page" React Element built by Gatsby.
* @param {object} $0.props Props object used by page.
* @param {pluginOptions} pluginOptions
* @returns {ReactNode} Wrapped element
* @example
* const React = require("react")
* const Layout = require("./src/components/layout").default
*
* exports.wrapPageElement = ({ element, props }) => {
* // props provide same data to Layout as Page element will get
* // including location, data, etc - you don't need to pass it
* return {element}
* }
*/
exports.wrapPageElement = true;
/**
* Allow a plugin to wrap the root element.
*
* This is useful to set up any Provider components that will wrap your application.
* For setting persistent UI elements around pages use [wrapPageElement](#wrapPageElement).
*
* _Note:_
* There is an equivalent hook in Gatsby's [Browser API](/docs/browser-apis/#wrapRootElement).
* It is recommended to use both APIs together.
* For example usage, check out [Using redux](https://github.com/gatsbyjs/gatsby/tree/master/examples/using-redux).
* @param {object} $0
* @param {ReactNode} $0.element The "Root" React Element built by Gatsby.
* @param {pluginOptions} pluginOptions
* @returns {ReactNode} Wrapped element
* @example
* const React = require("react")
* const { Provider } = require("react-redux")
*
* const createStore = require("./src/state/createStore")
* const store = createStore()
*
* exports.wrapRootElement = ({ element }) => {
* return (
*
* {element}
*
* )
* }
*/
exports.wrapRootElement = true;
/***/ }),
/***/ "./.cache/default-html.js":
/*!********************************!*\
!*** ./.cache/default-html.js ***!
\********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ HTML)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
function HTML(props) {
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)("html", props.htmlAttributes, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)("head", null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)("meta", {
charSet: "utf-8"
}), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)("meta", {
httpEquiv: "x-ua-compatible",
content: "ie=edge"
}), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)("meta", {
name: "viewport",
content: "width=device-width, initial-scale=1, shrink-to-fit=no"
}), props.headComponents), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)("body", props.bodyAttributes, props.preBodyComponents, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", {
key: "body",
id: "___gatsby",
dangerouslySetInnerHTML: {
__html: props.body
}
}), props.postBodyComponents));
}
HTML.propTypes = {
htmlAttributes: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object),
headComponents: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().array),
bodyAttributes: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object),
preBodyComponents: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().array),
body: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
postBodyComponents: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().array)
};
/***/ }),
/***/ "./.cache/dev-404-page.js":
/*!********************************!*\
!*** ./.cache/dev-404-page.js ***!
\********************************/
/***/ ((__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 _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ "./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var gatsby__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! gatsby */ "./.cache/gatsby-browser-entry.js");
/* harmony import */ var query_string__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! query-string */ "./node_modules/query-string/index.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
var Dev404Page = /*#__PURE__*/function (_React$Component) {
(0,_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(Dev404Page, _React$Component);
function Dev404Page(props) {
var _this;
_this = _React$Component.call(this, props) || this;
var _this$props = _this.props,
data = _this$props.data,
location = _this$props.location;
var pagePaths = data.allSitePage.nodes.map(function (node) {
return node.path;
});
var urlState = query_string__WEBPACK_IMPORTED_MODULE_5__.parse(location.search);
var initialPagePathSearchTerms = urlState.filter ? urlState.filter : "";
_this.state = {
hasMounted: false,
showCustom404: ({}).GATSBY_DISABLE_CUSTOM_404 || false,
initPagePaths: pagePaths,
pagePathSearchTerms: initialPagePathSearchTerms,
pagePaths: _this.getFilteredPagePaths(pagePaths, initialPagePathSearchTerms)
};
_this.showCustom404 = _this.showCustom404.bind((0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_0__["default"])(_this));
_this.handlePagePathSearch = _this.handlePagePathSearch.bind((0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_0__["default"])(_this));
_this.handleSearchTermChange = _this.handleSearchTermChange.bind((0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_0__["default"])(_this));
return _this;
}
var _proto = Dev404Page.prototype;
_proto.componentDidMount = function componentDidMount() {
this.setState({
hasMounted: true
});
};
_proto.showCustom404 = function showCustom404() {
this.setState({
showCustom404: true
});
};
_proto.handleSearchTermChange = function handleSearchTermChange(event) {
var searchValue = event.target.value;
this.setSearchUrl(searchValue);
this.setState({
pagePathSearchTerms: searchValue
});
};
_proto.handlePagePathSearch = function handlePagePathSearch(event) {
event.preventDefault();
var allPagePaths = [...this.state.initPagePaths];
this.setState({
pagePaths: this.getFilteredPagePaths(allPagePaths, this.state.pagePathSearchTerms)
});
};
_proto.getFilteredPagePaths = function getFilteredPagePaths(allPagePaths, pagePathSearchTerms) {
var searchTerm = new RegExp("" + pagePathSearchTerms);
return allPagePaths.filter(function (pagePath) {
return searchTerm.test(pagePath);
});
};
_proto.setSearchUrl = function setSearchUrl(searchValue) {
var _this$props$location = this.props.location,
pathname = _this$props$location.pathname,
search = _this$props$location.search;
var searchMap = query_string__WEBPACK_IMPORTED_MODULE_5__.parse(search);
searchMap.filter = searchValue;
var newSearch = query_string__WEBPACK_IMPORTED_MODULE_5__.stringify(searchMap);
if (search !== "?" + newSearch) {
(0,gatsby__WEBPACK_IMPORTED_MODULE_4__.navigate)(pathname + "?" + newSearch, {
replace: true
});
}
};
_proto.render = function render() {
var _this$props$data$allS;
if (!this.state.hasMounted) {
return null;
} // Detect when the query returns the default function node that's added when functions
// are *not* enabled. That seems the simplest way to communicate whether
// functions are enabled or not to this page.
// TODO remove when functions are shipped.
var functionsEnabled = !(((_this$props$data$allS = this.props.data.allSiteFunction.nodes[0]) === null || _this$props$data$allS === void 0 ? void 0 : _this$props$data$allS.functionRoute) === "FAKE");
var pathname = this.props.location.pathname;
var newFilePath;
var newAPIPath;
if (pathname === "/") {
newFilePath = "src/pages/index.js";
} else if (functionsEnabled && pathname.slice(0, 4) === "/api") {
newAPIPath = "src" + pathname + ".js";
} else if (pathname.slice(-1) === "/") {
newFilePath = "src/pages" + pathname.slice(0, -1) + ".js";
} else {
newFilePath = "src/pages" + pathname + ".js";
}
return this.state.showCustom404 ? this.props.custom404 : (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("h1", null, "Gatsby.js development 404 page"), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("p", null, "There's not a page " + (functionsEnabled ? "or function " : "") + "yet at ", (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("code", null, pathname)), this.props.custom404 ? (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("p", null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("button", {
onClick: this.showCustom404
}, "Preview custom 404 page")) : (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("p", null, "A custom 404 page wasn't detected - if you would like to add one, create a component in your site directory at ", (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("code", null, "src/pages/404.js"), "."), newFilePath && (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("h2", null, "Create a page at this url"), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("p", null, "Create a React.js component like the following in your site directory at", " ", "\"", (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("code", null, newFilePath), "\"", " ", "and then refresh to show the new page component you created."), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("pre", {
style: {
border: "1px solid lightgray",
padding: "8px",
maxWidth: "80ch",
background: "#f3f3f3"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("code", {
dangerouslySetInnerHTML: {
__html: "import * as React from \"react\"\n\nexport default function Component () {\n return \"Hello world\"\n}"
}
}))), newAPIPath && (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("h2", null, "Create an API function at this url"), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("p", null, "Create a javascript file like the following in your site directory at", " ", "\"", (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("code", null, newAPIPath), "\"", " ", "and refresh to execute the new API function you created."), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("pre", {
style: {
border: "1px solid lightgray",
padding: "8px",
maxWidth: "80ch",
background: "#f3f3f3"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("code", {
dangerouslySetInnerHTML: {
__html: "\nexport default function API (req, res) {\n res.json({ hello: \"world\" })\n}"
}
}))), this.state.initPagePaths.length > 0 && (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("hr", null), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("p", null, "If you were trying to reach another page", functionsEnabled ? " or function" : "", ", perhaps you can find it below."), functionsEnabled && (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)((react__WEBPACK_IMPORTED_MODULE_2___default().Fragment), null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("h2", null, "Functions (", this.props.data.allSiteFunction.nodes.length, ")"), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("ul", null, this.props.data.allSiteFunction.nodes.map(function (node) {
var functionRoute = "/api/" + node.functionRoute;
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("li", {
key: functionRoute
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("a", {
href: functionRoute
}, functionRoute));
}))), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("h2", null, "Pages (", this.state.pagePaths.length != this.state.initPagePaths.length ? this.state.pagePaths.length + "/" + this.state.initPagePaths.length : this.state.initPagePaths.length, ")"), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("form", {
onSubmit: this.handlePagePathSearch
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("label", null, "Search:", (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("input", {
type: "text",
id: "search",
placeholder: "Search pages...",
value: this.state.pagePathSearchTerms,
onChange: this.handleSearchTermChange
})), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("input", {
type: "submit",
value: "Submit"
})), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("ul", null, this.state.pagePaths.map(function (pagePath, index) {
return index < 100 && (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("li", {
key: pagePath
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)(gatsby__WEBPACK_IMPORTED_MODULE_4__.Link, {
to: pagePath
}, pagePath));
}), this.state.pagePaths.length > 100 && (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("p", {
style: {
fontWeight: "bold"
}
}, "... and ", this.state.pagePaths.length - 100, " more."))));
};
return Dev404Page;
}((react__WEBPACK_IMPORTED_MODULE_2___default().Component));
Dev404Page.propTypes = {
data: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object),
custom404: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().element),
location: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object)
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Dev404Page);
var pagesQuery = "2704779569";
/***/ }),
/***/ "./.cache/emitter.js":
/*!***************************!*\
!*** ./.cache/emitter.js ***!
\***************************/
/***/ ((__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 mitt__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mitt */ "./node_modules/mitt/dist/mitt.es.js");
var emitter = (0,mitt__WEBPACK_IMPORTED_MODULE_0__["default"])();
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (emitter);
/***/ }),
/***/ "./.cache/find-path.js":
/*!*****************************!*\
!*** ./.cache/find-path.js ***!
\*****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "setMatchPaths": () => (/* binding */ setMatchPaths),
/* harmony export */ "findMatchPath": () => (/* binding */ findMatchPath),
/* harmony export */ "grabMatchParams": () => (/* binding */ grabMatchParams),
/* harmony export */ "findPath": () => (/* binding */ findPath),
/* harmony export */ "cleanPath": () => (/* binding */ cleanPath)
/* harmony export */ });
/* harmony import */ var _gatsbyjs_reach_router_lib_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @gatsbyjs/reach-router/lib/utils */ "./node_modules/@gatsbyjs/reach-router/lib/utils.js");
/* harmony import */ var _strip_prefix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./strip-prefix */ "./.cache/strip-prefix.js");
/* harmony import */ var _normalize_page_path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./normalize-page-path */ "./.cache/normalize-page-path.js");
/* harmony import */ var _redirect_utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./redirect-utils.js */ "./.cache/redirect-utils.js");
var pathCache = new Map();
var matchPaths = [];
var trimPathname = function trimPathname(rawPathname) {
var pathname = decodeURIComponent(rawPathname); // Remove the pathPrefix from the pathname.
var trimmedPathname = (0,_strip_prefix__WEBPACK_IMPORTED_MODULE_1__["default"])(pathname, decodeURIComponent("")) // Remove any hashfragment
.split("#")[0] // Remove search query
.split("?")[0];
return trimmedPathname;
};
function absolutify(path) {
// If it's already absolute, return as-is
if (path.startsWith("/") || path.startsWith("https://") || path.startsWith("http://")) {
return path;
} // Calculate path relative to current location, adding a trailing slash to
// match behavior of @reach/router
return new URL(path, window.location.href + (window.location.href.endsWith("/") ? "" : "/")).pathname;
}
/**
* Set list of matchPaths
*
* @param {Array<{path: string, matchPath: string}>} value collection of matchPaths
*/
var setMatchPaths = function setMatchPaths(value) {
matchPaths = value;
};
/**
* Return a matchpath url
* if `match-paths.json` contains `{ "/foo*": "/page1", ...}`, then
* `/foo?bar=far` => `/page1`
*
* @param {string} rawPathname A raw pathname
* @return {string|null}
*/
var findMatchPath = function findMatchPath(rawPathname) {
var trimmedPathname = cleanPath(rawPathname);
var pickPaths = matchPaths.map(function (_ref) {
var path = _ref.path,
matchPath = _ref.matchPath;
return {
path: matchPath,
originalPath: path
};
});
var path = (0,_gatsbyjs_reach_router_lib_utils__WEBPACK_IMPORTED_MODULE_0__.pick)(pickPaths, trimmedPathname);
if (path) {
return (0,_normalize_page_path__WEBPACK_IMPORTED_MODULE_2__["default"])(path.route.originalPath);
}
return null;
};
/**
* Return a matchpath params from reach/router rules
* if `match-paths.json` contains `{ ":bar/*foo" }`, and the path is /baz/zaz/zoo
* then it returns
* { bar: baz, foo: zaz/zoo }
*
* @param {string} rawPathname A raw pathname
* @return {object}
*/
var grabMatchParams = function grabMatchParams(rawPathname) {
var trimmedPathname = cleanPath(rawPathname);
var pickPaths = matchPaths.map(function (_ref2) {
var path = _ref2.path,
matchPath = _ref2.matchPath;
return {
path: matchPath,
originalPath: path
};
});
var path = (0,_gatsbyjs_reach_router_lib_utils__WEBPACK_IMPORTED_MODULE_0__.pick)(pickPaths, trimmedPathname);
if (path) {
return path.params;
}
return {};
}; // Given a raw URL path, returns the cleaned version of it (trim off
// `#` and query params), or if it matches an entry in
// `match-paths.json`, its matched path is returned
//
// E.g. `/foo?bar=far` => `/foo`
//
// Or if `match-paths.json` contains `{ "/foo*": "/page1", ...}`, then
// `/foo?bar=far` => `/page1`
var findPath = function findPath(rawPathname) {
var trimmedPathname = trimPathname(absolutify(rawPathname));
if (pathCache.has(trimmedPathname)) {
return pathCache.get(trimmedPathname);
}
var redirect = (0,_redirect_utils_js__WEBPACK_IMPORTED_MODULE_3__.maybeGetBrowserRedirect)(rawPathname);
if (redirect) {
return findPath(redirect.toPath);
}
var foundPath = findMatchPath(trimmedPathname);
if (!foundPath) {
foundPath = cleanPath(rawPathname);
}
pathCache.set(trimmedPathname, foundPath);
return foundPath;
};
/**
* Clean a url and converts /index.html => /
* E.g. `/foo?bar=far` => `/foo`
*
* @param {string} rawPathname A raw pathname
* @return {string}
*/
var cleanPath = function cleanPath(rawPathname) {
var trimmedPathname = trimPathname(absolutify(rawPathname));
var foundPath = trimmedPathname;
if (foundPath === "/index.html") {
foundPath = "/";
}
foundPath = (0,_normalize_page_path__WEBPACK_IMPORTED_MODULE_2__["default"])(foundPath);
return foundPath;
};
/***/ }),
/***/ "./.cache/gatsby-browser-entry.js":
/*!****************************************!*\
!*** ./.cache/gatsby-browser-entry.js ***!
\****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Link": () => (/* reexport safe */ gatsby_link__WEBPACK_IMPORTED_MODULE_2__["default"]),
/* harmony export */ "withAssetPrefix": () => (/* reexport safe */ gatsby_link__WEBPACK_IMPORTED_MODULE_2__.withAssetPrefix),
/* harmony export */ "withPrefix": () => (/* reexport safe */ gatsby_link__WEBPACK_IMPORTED_MODULE_2__.withPrefix),
/* harmony export */ "graphql": () => (/* binding */ graphql),
/* harmony export */ "parsePath": () => (/* reexport safe */ gatsby_link__WEBPACK_IMPORTED_MODULE_2__.parsePath),
/* harmony export */ "navigate": () => (/* reexport safe */ gatsby_link__WEBPACK_IMPORTED_MODULE_2__.navigate),
/* harmony export */ "useScrollRestoration": () => (/* reexport safe */ gatsby_react_router_scroll__WEBPACK_IMPORTED_MODULE_3__.useScrollRestoration),
/* harmony export */ "StaticQueryContext": () => (/* binding */ StaticQueryContext),
/* harmony export */ "StaticQuery": () => (/* binding */ StaticQuery),
/* harmony export */ "PageRenderer": () => (/* reexport default from dynamic */ _public_page_renderer__WEBPACK_IMPORTED_MODULE_4___default.a),
/* harmony export */ "useStaticQuery": () => (/* binding */ useStaticQuery),
/* harmony export */ "prefetchPathname": () => (/* binding */ prefetchPathname)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var gatsby_link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! gatsby-link */ "./node_modules/gatsby-link/index.js");
/* harmony import */ var gatsby_react_router_scroll__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! gatsby-react-router-scroll */ "./node_modules/gatsby-react-router-scroll/index.js");
/* harmony import */ var _public_page_renderer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./public-page-renderer */ "./.cache/public-page-renderer.js");
/* harmony import */ var _public_page_renderer__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_public_page_renderer__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _loader__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./loader */ "./.cache/loader.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
var prefetchPathname = _loader__WEBPACK_IMPORTED_MODULE_5__["default"].enqueue;
var StaticQueryContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext({});
function StaticQueryDataRenderer(_ref) {
var staticQueryData = _ref.staticQueryData,
data = _ref.data,
query = _ref.query,
render = _ref.render;
var finalData = data ? data.data : staticQueryData[query] && staticQueryData[query].data;
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, finalData && render(finalData), !finalData && (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", null, "Loading (StaticQuery)"));
}
var StaticQuery = function StaticQuery(props) {
var data = props.data,
query = props.query,
render = props.render,
children = props.children;
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)(StaticQueryContext.Consumer, null, function (staticQueryData) {
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)(StaticQueryDataRenderer, {
data: data,
query: query,
render: render || children,
staticQueryData: staticQueryData
});
});
};
var useStaticQuery = function useStaticQuery(query) {
var _context$query;
if (typeof (react__WEBPACK_IMPORTED_MODULE_0___default().useContext) !== "function" && "development" === "development") {
throw new Error("You're likely using a version of React that doesn't support Hooks\n" + "Please update React and ReactDOM to 16.8.0 or later to use the useStaticQuery hook.");
}
var context = react__WEBPACK_IMPORTED_MODULE_0___default().useContext(StaticQueryContext); // query is a stringified number like `3303882` when wrapped with graphql, If a user forgets
// to wrap the query in a grqphql, then casting it to a Number results in `NaN` allowing us to
// catch the misuse of the API and give proper direction
if (isNaN(Number(query))) {
throw new Error("useStaticQuery was called with a string but expects to be called using `graphql`. Try this:\n\nimport { useStaticQuery, graphql } from 'gatsby';\n\nuseStaticQuery(graphql`" + query + "`);\n");
}
if ((_context$query = context[query]) !== null && _context$query !== void 0 && _context$query.data) {
return context[query].data;
} else {
throw new Error("The result of this StaticQuery could not be fetched.\n\n" + "This is likely a bug in Gatsby and if refreshing the page does not fix it, " + "please open an issue in https://github.com/gatsbyjs/gatsby/issues");
}
};
StaticQuery.propTypes = {
data: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object),
query: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string.isRequired),
render: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
children: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func)
};
function graphql() {
throw new Error("It appears like Gatsby is misconfigured. Gatsby related `graphql` calls " + "are supposed to only be evaluated at compile time, and then compiled away. " + "Unfortunately, something went wrong and the query was left in the compiled code.\n\n" + "Unless your site has a complex or custom babel/Gatsby configuration this is likely a bug in Gatsby.");
}
/***/ }),
/***/ "./.cache/loader.js":
/*!**************************!*\
!*** ./.cache/loader.js ***!
\**************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "PageResourceStatus": () => (/* binding */ PageResourceStatus),
/* harmony export */ "BaseLoader": () => (/* binding */ BaseLoader),
/* harmony export */ "ProdLoader": () => (/* binding */ ProdLoader),
/* harmony export */ "setLoader": () => (/* binding */ setLoader),
/* harmony export */ "publicLoader": () => (/* binding */ publicLoader),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
/* harmony export */ "getStaticQueryResults": () => (/* binding */ getStaticQueryResults)
/* harmony export */ });
/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ "./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js");
/* harmony import */ var _prefetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./prefetch */ "./.cache/prefetch.js");
/* harmony import */ var _emitter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./emitter */ "./.cache/emitter.js");
/* harmony import */ var _find_path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./find-path */ "./.cache/find-path.js");
/**
* Available resource loading statuses
*/
var PageResourceStatus = {
/**
* At least one of critical resources failed to load
*/
Error: "error",
/**
* Resources loaded successfully
*/
Success: "success"
};
var preferDefault = function preferDefault(m) {
return m && m.default || m;
};
var stripSurroundingSlashes = function stripSurroundingSlashes(s) {
s = s[0] === "/" ? s.slice(1) : s;
s = s.endsWith("/") ? s.slice(0, -1) : s;
return s;
};
var createPageDataUrl = function createPageDataUrl(path) {
var fixedPath = path === "/" ? "index" : stripSurroundingSlashes(path);
return "" + "/page-data/" + fixedPath + "/page-data.json";
};
function doFetch(url, method) {
if (method === void 0) {
method = "GET";
}
return new Promise(function (resolve, reject) {
var req = new XMLHttpRequest();
req.open(method, url, true);
req.onreadystatechange = function () {
if (req.readyState == 4) {
resolve(req);
}
};
req.send(null);
});
}
var doesConnectionSupportPrefetch = function doesConnectionSupportPrefetch() {
if ("connection" in navigator && typeof navigator.connection !== "undefined") {
if ((navigator.connection.effectiveType || "").includes("2g")) {
return false;
}
if (navigator.connection.saveData) {
return false;
}
}
return true;
};
var toPageResources = function toPageResources(pageData, component) {
if (component === void 0) {
component = null;
}
var page = {
componentChunkName: pageData.componentChunkName,
path: pageData.path,
webpackCompilationHash: pageData.webpackCompilationHash,
matchPath: pageData.matchPath,
staticQueryHashes: pageData.staticQueryHashes
};
return {
component: component,
json: pageData.result,
page: page
};
};
var BaseLoader = /*#__PURE__*/function () {
function BaseLoader(loadComponent, matchPaths) {
this.inFlightNetworkRequests = new Map();
// Map of pagePath -> Page. Where Page is an object with: {
// status: PageResourceStatus.Success || PageResourceStatus.Error,
// payload: PageResources, // undefined if PageResourceStatus.Error
// }
// PageResources is {
// component,
// json: pageData.result,
// page: {
// componentChunkName,
// path,
// webpackCompilationHash,
// staticQueryHashes
// },
// staticQueryResults
// }
this.pageDb = new Map();
this.inFlightDb = new Map();
this.staticQueryDb = {};
this.pageDataDb = new Map();
this.prefetchTriggered = new Set();
this.prefetchCompleted = new Set();
this.loadComponent = loadComponent;
(0,_find_path__WEBPACK_IMPORTED_MODULE_3__.setMatchPaths)(matchPaths);
}
var _proto = BaseLoader.prototype;
_proto.memoizedGet = function memoizedGet(url) {
var _this = this;
var inFlightPromise = this.inFlightNetworkRequests.get(url);
if (!inFlightPromise) {
inFlightPromise = doFetch(url, "GET");
this.inFlightNetworkRequests.set(url, inFlightPromise);
} // Prefer duplication with then + catch over .finally to prevent problems in ie11 + firefox
return inFlightPromise.then(function (response) {
_this.inFlightNetworkRequests.delete(url);
return response;
}).catch(function (err) {
_this.inFlightNetworkRequests.delete(url);
throw err;
});
};
_proto.setApiRunner = function setApiRunner(apiRunner) {
this.apiRunner = apiRunner;
this.prefetchDisabled = apiRunner("disableCorePrefetching").some(function (a) {
return a;
});
};
_proto.fetchPageDataJson = function fetchPageDataJson(loadObj) {
var _this2 = this;
var pagePath = loadObj.pagePath,
_loadObj$retries = loadObj.retries,
retries = _loadObj$retries === void 0 ? 0 : _loadObj$retries;
var url = createPageDataUrl(pagePath);
return this.memoizedGet(url).then(function (req) {
var status = req.status,
responseText = req.responseText; // Handle 200
if (status === 200) {
try {
var jsonPayload = JSON.parse(responseText);
if (jsonPayload.path === undefined) {
throw new Error("not a valid pageData response");
}
return Object.assign(loadObj, {
status: PageResourceStatus.Success,
payload: jsonPayload
});
} catch (err) {// continue regardless of error
}
} // Handle 404
if (status === 404 || status === 200) {
// If the request was for a 404 page and it doesn't exist, we're done
if (pagePath === "/404.html") {
return Object.assign(loadObj, {
status: PageResourceStatus.Error
});
} // Need some code here to cache the 404 request. In case
// multiple loadPageDataJsons result in 404s
return _this2.fetchPageDataJson(Object.assign(loadObj, {
pagePath: "/404.html",
notFound: true
}));
} // handle 500 response (Unrecoverable)
if (status === 500) {
return Object.assign(loadObj, {
status: PageResourceStatus.Error
});
} // Handle everything else, including status === 0, and 503s. Should retry
if (retries < 3) {
return _this2.fetchPageDataJson(Object.assign(loadObj, {
retries: retries + 1
}));
} // Retried 3 times already, result is an error.
return Object.assign(loadObj, {
status: PageResourceStatus.Error
});
});
};
_proto.loadPageDataJson = function loadPageDataJson(rawPath) {
var _this3 = this;
var pagePath = (0,_find_path__WEBPACK_IMPORTED_MODULE_3__.findPath)(rawPath);
if (this.pageDataDb.has(pagePath)) {
var pageData = this.pageDataDb.get(pagePath);
if (true) {
return Promise.resolve(pageData);
}
}
return this.fetchPageDataJson({
pagePath: pagePath
}).then(function (pageData) {
_this3.pageDataDb.set(pagePath, pageData);
return pageData;
});
};
_proto.findMatchPath = function findMatchPath(rawPath) {
return (0,_find_path__WEBPACK_IMPORTED_MODULE_3__.findMatchPath)(rawPath);
} // TODO check all uses of this and whether they use undefined for page resources not exist
;
_proto.loadPage = function loadPage(rawPath) {
var _this4 = this;
var pagePath = (0,_find_path__WEBPACK_IMPORTED_MODULE_3__.findPath)(rawPath);
if (this.pageDb.has(pagePath)) {
var page = this.pageDb.get(pagePath);
if (true) {
if (page.error) {
return {
error: page.error,
status: page.status
};
}
return Promise.resolve(page.payload);
}
}
if (this.inFlightDb.has(pagePath)) {
return this.inFlightDb.get(pagePath);
}
var inFlightPromise = Promise.all([this.loadAppData(), this.loadPageDataJson(pagePath)]).then(function (allData) {
var result = allData[1];
if (result.status === PageResourceStatus.Error) {
return {
status: PageResourceStatus.Error
};
}
var pageData = result.payload;
var _pageData = pageData,
componentChunkName = _pageData.componentChunkName,
_pageData$staticQuery = _pageData.staticQueryHashes,
staticQueryHashes = _pageData$staticQuery === void 0 ? [] : _pageData$staticQuery;
var finalResult = {};
var componentChunkPromise = _this4.loadComponent(componentChunkName).then(function (component) {
finalResult.createdAt = new Date();
var pageResources;
if (!component || component instanceof Error) {
finalResult.status = PageResourceStatus.Error;
finalResult.error = component;
} else {
finalResult.status = PageResourceStatus.Success;
if (result.notFound === true) {
finalResult.notFound = true;
}
pageData = Object.assign(pageData, {
webpackCompilationHash: allData[0] ? allData[0].webpackCompilationHash : ""
});
pageResources = toPageResources(pageData, component);
} // undefined if final result is an error
return pageResources;
});
var staticQueryBatchPromise = Promise.all(staticQueryHashes.map(function (staticQueryHash) {
// Check for cache in case this static query result has already been loaded
if (_this4.staticQueryDb[staticQueryHash]) {
var jsonPayload = _this4.staticQueryDb[staticQueryHash];
return {
staticQueryHash: staticQueryHash,
jsonPayload: jsonPayload
};
}
return _this4.memoizedGet("" + "/page-data/sq/d/" + staticQueryHash + ".json").then(function (req) {
var jsonPayload = JSON.parse(req.responseText);
return {
staticQueryHash: staticQueryHash,
jsonPayload: jsonPayload
};
}).catch(function () {
throw new Error("We couldn't load \"" + "" + "/page-data/sq/d/" + staticQueryHash + ".json\"");
});
})).then(function (staticQueryResults) {
var staticQueryResultsMap = {};
staticQueryResults.forEach(function (_ref) {
var staticQueryHash = _ref.staticQueryHash,
jsonPayload = _ref.jsonPayload;
staticQueryResultsMap[staticQueryHash] = jsonPayload;
_this4.staticQueryDb[staticQueryHash] = jsonPayload;
});
return staticQueryResultsMap;
});
return Promise.all([componentChunkPromise, staticQueryBatchPromise]).then(function (_ref2) {
var pageResources = _ref2[0],
staticQueryResults = _ref2[1];
var payload;
if (pageResources) {
payload = Object.assign({}, pageResources, {
staticQueryResults: staticQueryResults
});
finalResult.payload = payload;
_emitter__WEBPACK_IMPORTED_MODULE_2__["default"].emit("onPostLoadPageResources", {
page: payload,
pageResources: payload
});
}
_this4.pageDb.set(pagePath, finalResult);
if (finalResult.error) {
return {
error: finalResult.error,
status: finalResult.status
};
}
return payload;
}) // when static-query fail to load we throw a better error
.catch(function (err) {
return {
error: err,
status: PageResourceStatus.Error
};
});
});
inFlightPromise.then(function () {
_this4.inFlightDb.delete(pagePath);
}).catch(function (error) {
_this4.inFlightDb.delete(pagePath);
throw error;
});
this.inFlightDb.set(pagePath, inFlightPromise);
return inFlightPromise;
} // returns undefined if the page does not exists in cache
;
_proto.loadPageSync = function loadPageSync(rawPath, options) {
if (options === void 0) {
options = {};
}
var pagePath = (0,_find_path__WEBPACK_IMPORTED_MODULE_3__.findPath)(rawPath);
if (this.pageDb.has(pagePath)) {
var _options;
var pageData = this.pageDb.get(pagePath);
if (pageData.payload) {
return pageData.payload;
}
if ((_options = options) !== null && _options !== void 0 && _options.withErrorDetails) {
return {
error: pageData.error,
status: pageData.status
};
}
}
return undefined;
};
_proto.shouldPrefetch = function shouldPrefetch(pagePath) {
// Skip prefetching if we know user is on slow or constrained connection
if (!doesConnectionSupportPrefetch()) {
return false;
} // Check if the page exists.
if (this.pageDb.has(pagePath)) {
return false;
}
return true;
};
_proto.prefetch = function prefetch(pagePath) {
var _this5 = this;
if (!this.shouldPrefetch(pagePath)) {
return false;
} // Tell plugins with custom prefetching logic that they should start
// prefetching this path.
if (!this.prefetchTriggered.has(pagePath)) {
this.apiRunner("onPrefetchPathname", {
pathname: pagePath
});
this.prefetchTriggered.add(pagePath);
} // If a plugin has disabled core prefetching, stop now.
if (this.prefetchDisabled) {
return false;
}
var realPath = (0,_find_path__WEBPACK_IMPORTED_MODULE_3__.findPath)(pagePath); // Todo make doPrefetch logic cacheable
// eslint-disable-next-line consistent-return
this.doPrefetch(realPath).then(function () {
if (!_this5.prefetchCompleted.has(pagePath)) {
_this5.apiRunner("onPostPrefetchPathname", {
pathname: pagePath
});
_this5.prefetchCompleted.add(pagePath);
}
});
return true;
};
_proto.doPrefetch = function doPrefetch(pagePath) {
var _this6 = this;
var pageDataUrl = createPageDataUrl(pagePath);
return (0,_prefetch__WEBPACK_IMPORTED_MODULE_1__["default"])(pageDataUrl, {
crossOrigin: "anonymous",
as: "fetch"
}).then(function () {
return (// This was just prefetched, so will return a response from
// the cache instead of making another request to the server
_this6.loadPageDataJson(pagePath)
);
});
};
_proto.hovering = function hovering(rawPath) {
this.loadPage(rawPath);
};
_proto.getResourceURLsForPathname = function getResourceURLsForPathname(rawPath) {
var pagePath = (0,_find_path__WEBPACK_IMPORTED_MODULE_3__.findPath)(rawPath);
var page = this.pageDataDb.get(pagePath);
if (page) {
var pageResources = toPageResources(page.payload);
return [...createComponentUrls(pageResources.page.componentChunkName), createPageDataUrl(pagePath)];
} else {
return null;
}
};
_proto.isPageNotFound = function isPageNotFound(rawPath) {
var pagePath = (0,_find_path__WEBPACK_IMPORTED_MODULE_3__.findPath)(rawPath);
var page = this.pageDb.get(pagePath);
return !page || page.notFound;
};
_proto.loadAppData = function loadAppData(retries) {
var _this7 = this;
if (retries === void 0) {
retries = 0;
}
return this.memoizedGet("" + "/page-data/app-data.json").then(function (req) {
var status = req.status,
responseText = req.responseText;
var appData;
if (status !== 200 && retries < 3) {
// Retry 3 times incase of non-200 responses
return _this7.loadAppData(retries + 1);
} // Handle 200
if (status === 200) {
try {
var jsonPayload = JSON.parse(responseText);
if (jsonPayload.webpackCompilationHash === undefined) {
throw new Error("not a valid app-data response");
}
appData = jsonPayload;
} catch (err) {// continue regardless of error
}
}
return appData;
});
};
return BaseLoader;
}();
var createComponentUrls = function createComponentUrls(componentChunkName) {
return (window.___chunkMapping[componentChunkName] || []).map(function (chunk) {
return "" + chunk;
});
};
var ProdLoader = /*#__PURE__*/function (_BaseLoader) {
(0,_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(ProdLoader, _BaseLoader);
function ProdLoader(asyncRequires, matchPaths, pageData) {
var _this8;
var loadComponent = function loadComponent(chunkName) {
if (!asyncRequires.components[chunkName]) {
throw new Error("We couldn't find the correct component chunk with the name " + chunkName);
}
return asyncRequires.components[chunkName]().then(preferDefault) // loader will handle the case when component is error
.catch(function (err) {
return err;
});
};
_this8 = _BaseLoader.call(this, loadComponent, matchPaths) || this;
if (pageData) {
_this8.pageDataDb.set(pageData.path, {
pagePath: pageData.path,
payload: pageData,
status: "success"
});
}
return _this8;
}
var _proto2 = ProdLoader.prototype;
_proto2.doPrefetch = function doPrefetch(pagePath) {
return _BaseLoader.prototype.doPrefetch.call(this, pagePath).then(function (result) {
if (result.status !== PageResourceStatus.Success) {
return Promise.resolve();
}
var pageData = result.payload;
var chunkName = pageData.componentChunkName;
var componentUrls = createComponentUrls(chunkName);
return Promise.all(componentUrls.map(_prefetch__WEBPACK_IMPORTED_MODULE_1__["default"])).then(function () {
return pageData;
});
});
};
_proto2.loadPageDataJson = function loadPageDataJson(rawPath) {
return _BaseLoader.prototype.loadPageDataJson.call(this, rawPath).then(function (data) {
if (data.notFound) {
// check if html file exist using HEAD request:
// if it does we should navigate to it instead of showing 404
return doFetch(rawPath, "HEAD").then(function (req) {
if (req.status === 200) {
// page (.html file) actually exist (or we asked for 404 )
// returning page resources status as errored to trigger
// regular browser navigation to given page
return {
status: PageResourceStatus.Error
};
} // if HEAD request wasn't 200, return notFound result
// and show 404 page
return data;
});
}
return data;
});
};
return ProdLoader;
}(BaseLoader);
var instance;
var setLoader = function setLoader(_loader) {
instance = _loader;
};
var publicLoader = {
enqueue: function enqueue(rawPath) {
return instance.prefetch(rawPath);
},
// Real methods
getResourceURLsForPathname: function getResourceURLsForPathname(rawPath) {
return instance.getResourceURLsForPathname(rawPath);
},
loadPage: function loadPage(rawPath) {
return instance.loadPage(rawPath);
},
// TODO add deprecation to v4 so people use withErrorDetails and then we can remove in v5 and change default behaviour
loadPageSync: function loadPageSync(rawPath, options) {
if (options === void 0) {
options = {};
}
return instance.loadPageSync(rawPath, options);
},
prefetch: function prefetch(rawPath) {
return instance.prefetch(rawPath);
},
isPageNotFound: function isPageNotFound(rawPath) {
return instance.isPageNotFound(rawPath);
},
hovering: function hovering(rawPath) {
return instance.hovering(rawPath);
},
loadAppData: function loadAppData() {
return instance.loadAppData();
}
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (publicLoader);
function getStaticQueryResults() {
if (instance) {
return instance.staticQueryDb;
} else {
return {};
}
}
/***/ }),
/***/ "./.cache/normalize-page-path.js":
/*!***************************************!*\
!*** ./.cache/normalize-page-path.js ***!
\***************************************/
/***/ ((__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 default export */ const __WEBPACK_DEFAULT_EXPORT__ = (function (path) {
if (path === undefined) {
return path;
}
if (path === "/") {
return "/";
}
if (path.charAt(path.length - 1) === "/") {
return path.slice(0, -1);
}
return path;
});
/***/ }),
/***/ "./.cache/prefetch.js":
/*!****************************!*\
!*** ./.cache/prefetch.js ***!
\****************************/
/***/ ((__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 */ });
var support = function support(feature) {
if (typeof document === "undefined") {
return false;
}
var fakeLink = document.createElement("link");
try {
if (fakeLink.relList && typeof fakeLink.relList.supports === "function") {
return fakeLink.relList.supports(feature);
}
} catch (err) {
return false;
}
return false;
};
var linkPrefetchStrategy = function linkPrefetchStrategy(url, options) {
return new Promise(function (resolve, reject) {
if (typeof document === "undefined") {
reject();
return;
}
var link = document.createElement("link");
link.setAttribute("rel", "prefetch");
link.setAttribute("href", url);
Object.keys(options).forEach(function (key) {
link.setAttribute(key, options[key]);
});
link.onload = resolve;
link.onerror = reject;
var parentElement = document.getElementsByTagName("head")[0] || document.getElementsByName("script")[0].parentNode;
parentElement.appendChild(link);
});
};
var xhrPrefetchStrategy = function xhrPrefetchStrategy(url) {
return new Promise(function (resolve, reject) {
var req = new XMLHttpRequest();
req.open("GET", url, true);
req.onload = function () {
if (req.status === 200) {
resolve();
} else {
reject();
}
};
req.send(null);
});
};
var supportedPrefetchStrategy = support("prefetch") ? linkPrefetchStrategy : xhrPrefetchStrategy;
var preFetched = {};
var prefetch = function prefetch(url, options) {
return new Promise(function (resolve) {
if (preFetched[url]) {
resolve();
return;
}
supportedPrefetchStrategy(url, options).then(function () {
resolve();
preFetched[url] = true;
}).catch(function () {}); // 404s are logged to the console anyway
});
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (prefetch);
/***/ }),
/***/ "./.cache/public-page-renderer.js":
/*!****************************************!*\
!*** ./.cache/public-page-renderer.js ***!
\****************************************/
/***/ ((module) => {
var preferDefault = function preferDefault(m) {
return m && m.default || m;
};
if (false) {} else if (false) {} else {
module.exports = function () {
return null;
};
}
/***/ }),
/***/ "./.cache/react-lifecycles-compat.js":
/*!*******************************************!*\
!*** ./.cache/react-lifecycles-compat.js ***!
\*******************************************/
/***/ ((__unused_webpack_module, exports) => {
exports.polyfill = function (Component) {
return Component;
};
/***/ }),
/***/ "./.cache/redirect-utils.js":
/*!**********************************!*\
!*** ./.cache/redirect-utils.js ***!
\**********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "maybeGetBrowserRedirect": () => (/* binding */ maybeGetBrowserRedirect)
/* harmony export */ });
/* harmony import */ var _redirects_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./redirects.json */ "./.cache/redirects.json");
// Convert to a map for faster lookup in maybeRedirect()
var redirectMap = new Map();
var redirectIgnoreCaseMap = new Map();
_redirects_json__WEBPACK_IMPORTED_MODULE_0__.forEach(function (redirect) {
if (redirect.ignoreCase) {
redirectIgnoreCaseMap.set(redirect.fromPath, redirect);
} else {
redirectMap.set(redirect.fromPath, redirect);
}
});
function maybeGetBrowserRedirect(pathname) {
var redirect = redirectMap.get(pathname);
if (!redirect) {
redirect = redirectIgnoreCaseMap.get(pathname.toLowerCase());
}
return redirect;
}
/***/ }),
/***/ "./.cache/route-announcer-props.js":
/*!*****************************************!*\
!*** ./.cache/route-announcer-props.js ***!
\*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "RouteAnnouncerProps": () => (/* binding */ RouteAnnouncerProps)
/* harmony export */ });
// This is extracted to separate module because it's shared
// between browser and SSR code
var RouteAnnouncerProps = {
id: "gatsby-announcer",
style: {
position: "absolute",
top: 0,
width: 1,
height: 1,
padding: 0,
overflow: "hidden",
clip: "rect(0, 0, 0, 0)",
whiteSpace: "nowrap",
border: 0
},
"aria-live": "assertive",
"aria-atomic": "true"
};
/***/ }),
/***/ "./.cache/strip-prefix.js":
/*!********************************!*\
!*** ./.cache/strip-prefix.js ***!
\********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ stripPrefix)
/* harmony export */ });
/**
* Remove a prefix from a string. Return the input string if the given prefix
* isn't found.
*/
function stripPrefix(str, prefix) {
if (prefix === void 0) {
prefix = "";
}
if (!prefix) {
return str;
}
if (str === prefix) {
return "/";
}
if (str.startsWith(prefix + "/")) {
return str.slice(prefix.length);
}
return str;
}
/***/ }),
/***/ "./gatsby-ssr.js":
/*!***********************!*\
!*** ./gatsby-ssr.js ***!
\***********************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "wrapPageElement": () => (/* binding */ wrapPageElement)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _src_context_navigation_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/context/navigation-context */ "./src/context/navigation-context.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
var wrapPageElement = function wrapPageElement(_ref) {
var element = _ref.element;
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(_src_context_navigation_context__WEBPACK_IMPORTED_MODULE_1__.NavigationProvider, null, element);
};
/***/ }),
/***/ "./node_modules/gatsby-plugin-react-helmet/gatsby-ssr.js":
/*!***************************************************************!*\
!*** ./node_modules/gatsby-plugin-react-helmet/gatsby-ssr.js ***!
\***************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
exports.__esModule = true;
exports.onRenderBody = void 0;
var _reactHelmet = __webpack_require__(/*! react-helmet */ "./node_modules/react-helmet/es/Helmet.js");
var onRenderBody = function onRenderBody(_ref) {
var setHeadComponents = _ref.setHeadComponents,
setHtmlAttributes = _ref.setHtmlAttributes,
setBodyAttributes = _ref.setBodyAttributes;
var helmet = _reactHelmet.Helmet.renderStatic(); // These action functions were added partway through the Gatsby 1.x cycle.
if (setHtmlAttributes) {
setHtmlAttributes(helmet.htmlAttributes.toComponent());
}
if (setBodyAttributes) {
setBodyAttributes(helmet.bodyAttributes.toComponent());
}
setHeadComponents([helmet.title.toComponent(), helmet.link.toComponent(), helmet.meta.toComponent(), helmet.noscript.toComponent(), helmet.script.toComponent(), helmet.style.toComponent(), helmet.base.toComponent()]);
};
exports.onRenderBody = onRenderBody;
/***/ }),
/***/ "./node_modules/gatsby-plugin-theme-ui/gatsby-ssr.js":
/*!***********************************************************!*\
!*** ./node_modules/gatsby-plugin-theme-ui/gatsby-ssr.js ***!
\***********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "onRenderBody": () => (/* binding */ onRenderBody),
/* harmony export */ "wrapRootElement": () => (/* binding */ wrapRootElement)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var theme_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! theme-ui */ "./node_modules/theme-ui/dist/theme-ui.esm.js");
/* harmony import */ var theme_ui__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! theme-ui */ "./node_modules/@theme-ui/color-modes/dist/theme-ui-color-modes.esm.js");
/* harmony import */ var _src_provider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./src/provider */ "./node_modules/gatsby-plugin-theme-ui/src/provider.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
const onRenderBody = ({
setPreBodyComponents
}, {
injectColorFlashScript = true
}) => {
if (injectColorFlashScript) {
setPreBodyComponents([(0,theme_ui__WEBPACK_IMPORTED_MODULE_2__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_3__.InitializeColorMode, {
key: 'theme-ui-no-flash'
})]);
}
};
const wrapRootElement = ({
element
}) => (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(_src_provider__WEBPACK_IMPORTED_MODULE_1__.WrapRootElement, {
element: element
});
/***/ }),
/***/ "./node_modules/gatsby-plugin-theme-ui/src/components.js":
/*!***************************************************************!*\
!*** ./node_modules/gatsby-plugin-theme-ui/src/components.js ***!
\***************************************************************/
/***/ ((__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 */ });
// add custom MDX components here
const components = {};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (components);
/***/ }),
/***/ "./node_modules/gatsby-plugin-theme-ui/src/hooks/configOptions.js":
/*!************************************************************************!*\
!*** ./node_modules/gatsby-plugin-theme-ui/src/hooks/configOptions.js ***!
\************************************************************************/
/***/ ((__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 _public_page_data_sq_d_2744905544_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../public/page-data/sq/d/2744905544.json */ "./public/page-data/sq/d/2744905544.json");
const useThemeUiConfig = () => {
const data = _public_page_data_sq_d_2744905544_json__WEBPACK_IMPORTED_MODULE_0__.data;
return data.themeUiConfig;
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useThemeUiConfig);
/***/ }),
/***/ "./node_modules/gatsby-plugin-theme-ui/src/provider.js":
/*!*************************************************************!*\
!*** ./node_modules/gatsby-plugin-theme-ui/src/provider.js ***!
\*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "WrapRootElement": () => (/* binding */ WrapRootElement)
/* harmony export */ });
/* harmony import */ var theme_ui__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! theme-ui */ "./node_modules/@theme-ui/core/dist/theme-ui-core.esm.js");
/* harmony import */ var theme_ui__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! theme-ui */ "./node_modules/@theme-ui/theme-provider/dist/theme-ui-theme-provider.esm.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index */ "./src/gatsby-plugin-theme-ui/index.js");
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components */ "./node_modules/gatsby-plugin-theme-ui/src/components.js");
/* harmony import */ var _hooks_configOptions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hooks/configOptions */ "./node_modules/gatsby-plugin-theme-ui/src/hooks/configOptions.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
const Root = ({
children
}) => {
const themeUiConfig = (0,_hooks_configOptions__WEBPACK_IMPORTED_MODULE_3__["default"])();
const {
preset,
prismPreset
} = themeUiConfig;
const theme = preset.default || preset;
const themeWithPrism = (0,theme_ui__WEBPACK_IMPORTED_MODULE_4__.merge)(theme, {
styles: {
pre: prismPreset
}
});
const fullTheme = (0,theme_ui__WEBPACK_IMPORTED_MODULE_4__.merge)(themeWithPrism, _index__WEBPACK_IMPORTED_MODULE_1__["default"]);
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_5__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_6__.ThemeProvider, {
theme: fullTheme,
components: _components__WEBPACK_IMPORTED_MODULE_2__["default"]
}, children);
};
const WrapRootElement = ({
element
}) => {
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_5__.jsx)(Root, null, element);
};
/***/ }),
/***/ "./node_modules/gatsby-remark-autolink-headers/gatsby-ssr.js":
/*!*******************************************************************!*\
!*** ./node_modules/gatsby-remark-autolink-headers/gatsby-ssr.js ***!
\*******************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
var pluginDefaults = {
className: "anchor",
icon: true,
offsetY: 0
};
exports.onRenderBody = function (_ref, pluginOptions) {
var setHeadComponents = _ref.setHeadComponents;
var _Object$assign = Object.assign(pluginDefaults, pluginOptions),
className = _Object$assign.className,
icon = _Object$assign.icon,
offsetY = _Object$assign.offsetY;
var styles = "\n ." + className + ".before {\n position: absolute;\n top: 0;\n left: 0;\n transform: translateX(-100%);\n padding-right: 4px;\n }\n ." + className + ".after {\n display: inline-block;\n padding-left: 4px;\n }\n h1 ." + className + " svg,\n h2 ." + className + " svg,\n h3 ." + className + " svg,\n h4 ." + className + " svg,\n h5 ." + className + " svg,\n h6 ." + className + " svg {\n visibility: hidden;\n }\n h1:hover ." + className + " svg,\n h2:hover ." + className + " svg,\n h3:hover ." + className + " svg,\n h4:hover ." + className + " svg,\n h5:hover ." + className + " svg,\n h6:hover ." + className + " svg,\n h1 ." + className + ":focus svg,\n h2 ." + className + ":focus svg,\n h3 ." + className + ":focus svg,\n h4 ." + className + ":focus svg,\n h5 ." + className + ":focus svg,\n h6 ." + className + ":focus svg {\n visibility: visible;\n }\n "; // This script used to have `let scrollTop` and `let clientTop` instead of
// current ones which are `var`. It is changed due to incompatibility with
// older browsers (that do not implement `let`). See:
// - https://github.com/gatsbyjs/gatsby/issues/21058
// - https://github.com/gatsbyjs/gatsby/pull/21083
var script = "\n document.addEventListener(\"DOMContentLoaded\", function(event) {\n var hash = window.decodeURI(location.hash.replace('#', ''))\n if (hash !== '') {\n var element = document.getElementById(hash)\n if (element) {\n var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop\n var clientTop = document.documentElement.clientTop || document.body.clientTop || 0\n var offset = element.getBoundingClientRect().top + scrollTop - clientTop\n // Wait for the browser to finish rendering before scrolling.\n setTimeout((function() {\n window.scrollTo(0, offset - " + offsetY + ")\n }), 0)\n }\n }\n })\n ";
var style = icon ? /*#__PURE__*/_react.default.createElement("style", {
key: "gatsby-remark-autolink-headers-style",
type: "text/css"
}, styles) : undefined;
return setHeadComponents([style, /*#__PURE__*/_react.default.createElement("script", {
key: "gatsby-remark-autolink-headers-script",
dangerouslySetInnerHTML: {
__html: script
}
})]);
};
/***/ }),
/***/ "./src/components/CopyToClipboard/index.js":
/*!*************************************************!*\
!*** ./src/components/CopyToClipboard/index.js ***!
\*************************************************/
/***/ ((__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 _emotion_styled_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/styled/base */ "./node_modules/@emotion/styled/base/dist/emotion-styled-base.esm.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var theme_ui__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! theme-ui */ "./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js");
/* harmony import */ var _icons_clipboard__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../icons/clipboard */ "./src/components/icons/clipboard.js");
/* harmony import */ var react_tooltip__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-tooltip */ "./node_modules/react-tooltip/dist/index.es.js");
/* harmony import */ var copy_to_clipboard__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! copy-to-clipboard */ "./node_modules/copy-to-clipboard/index.js");
/* harmony import */ var copy_to_clipboard__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(copy_to_clipboard__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
var StyledTooltip = function StyledTooltip(_ref) {
var id = _ref.id,
text = _ref.text;
var StyledTooltip = /*#__PURE__*/(0,_emotion_styled_base__WEBPACK_IMPORTED_MODULE_0__["default"])(react_tooltip__WEBPACK_IMPORTED_MODULE_3__["default"], false ? 0 : {
target: "e3auwie0",
label: "StyledTooltip"
})( false ? 0 : {
name: "1x8m39p",
styles: "box-shadow:0px 5px 15px 0px rgba(0, 0, 0, 0.08),0px 0px 0px 1px rgba(136, 152, 170, 0.1),0px 4px 4px 0px rgba(136, 152, 170, 0.1)!important;padding:8px 12px;&:after{margin-right:4px;}&.show{opacity:1;}",
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9vbGl2ZXJqdWhsL0Rlc2t0b3AvbWVkdXNhL2NvcmUvd3d3L3JlZmVyZW5jZS9zcmMvY29tcG9uZW50cy9Db3B5VG9DbGlwYm9hcmQvaW5kZXguanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBUTRDIiwiZmlsZSI6Ii9Vc2Vycy9vbGl2ZXJqdWhsL0Rlc2t0b3AvbWVkdXNhL2NvcmUvd3d3L3JlZmVyZW5jZS9zcmMvY29tcG9uZW50cy9Db3B5VG9DbGlwYm9hcmQvaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QsIHsgdXNlU3RhdGUgfSBmcm9tIFwicmVhY3RcIlxuaW1wb3J0IHsgRmxleCwgQm94LCBUZXh0IH0gZnJvbSBcInRoZW1lLXVpXCJcbmltcG9ydCBDbGlwYm9hcmQgZnJvbSAnLi4vaWNvbnMvY2xpcGJvYXJkJ1xuaW1wb3J0IFJlYWN0VG9vbHRpcCBmcm9tIFwicmVhY3QtdG9vbHRpcFwiXG5pbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIlxuaW1wb3J0IGNvcHkgZnJvbSAnY29weS10by1jbGlwYm9hcmQnXG5cbmNvbnN0IFN0eWxlZFRvb2x0aXAgPSAoe2lkLCB0ZXh0fSkgPT4ge1xuICBjb25zdCBTdHlsZWRUb29sdGlwID0gc3R5bGVkKFJlYWN0VG9vbHRpcClgXG4gICAgICBib3gtc2hhZG93OiAwcHggNXB4IDE1cHggMHB4IHJnYmEoMCwgMCwgMCwgMC4wOCksXG4gICAgICAgIDBweCAwcHggMHB4IDFweCByZ2JhKDEzNiwgMTUyLCAxNzAsIDAuMSksXG4gICAgICAgIDBweCA0cHggNHB4IDBweCByZ2JhKDEzNiwgMTUyLCAxNzAsIDAuMSkgIWltcG9ydGFudDtcbiAgICAgIHBhZGRpbmc6IDhweCAxMnB4O1xuICAgICAgJjphZnRlciB7XG4gICAgICAgIG1hcmdpbi1yaWdodDogNHB4O1xuICAgICAgfVxuICAgICAgJi5zaG93IHtcbiAgICAgICAgb3BhY2l0eTogMTtcbiAgICAgIH1cbiAgICBgXG4gIHJldHVybihcbiAgICA8U3R5bGVkVG9vbHRpcFxuICAgICAgcGxhY2U9XCJ0b3BcIlxuICAgICAgYmFja2dyb3VuZENvbG9yPScjRkZGJ1xuICAgICAgdGV4dENvbG9yPSdibGFjaydcbiAgICAgIGVmZmVjdD1cInNvbGlkXCJcbiAgICAgIGlkPXtpZH1cbiAgICAgIHN4PXt7IGJveFNoYWRvdzogYDBweCA1cHggMTVweCAwcHggcmdiYSgwLCAwLCAwLCAwLjA4KSxcbiAgICAgIDBweCAwcHggMHB4IDFweCByZ2JhKDEzNiwgMTUyLCAxNzAsIDAuMSksXG4gICAgICAwcHggNHB4IDRweCAwcHggcmdiYSgxMzYsIDE1MiwgMTcwLCAwLjEpICFpbXBvcnRhbnRgLFxuICAgICAgcGFkZGluZzogYDhweCAxMnB4YFxuICAgIH19XG4gICAgPlxuICAgICAgICA8VGV4dD57dGV4dH08L1RleHQ+XG4gICAgPC9TdHlsZWRUb29sdGlwPlxuICApXG59XG5cbmNvbnN0IENvcHlUb0NsaXBib2FyZCA9ICh7dGV4dCwgY29weVRleHQsIHRvb2x0aXBUZXh0fSkgPT4ge1xuICBjb25zdCBbY29waWVkLCBzZXRDb3BpZWRdID0gdXNlU3RhdGUoZmFsc2UpXG4gIGNvbnN0IGlkID0gKE1hdGgucmFuZG9tKCkqMTAwMDAwMCkudG9TdHJpbmcoKVxuICBjb25zdCBmb3JjZVRvb2x0aXBSZW1vdW50ID0gY29waWVkID8gXCJjb250ZW50LTFcIiA6IFwiY29udGVudC0yXCJcblxuICBjb25zdCBvbkNvcHlDbGlja2VkID0gKCkgPT4ge1xuICAgIGNvcHkoY29weVRleHQgfHwgdG9vbHRpcFRleHQsIHtmb3JtYXQ6ICd0ZXh0L3BsYWluJ30pXG4gIH1cblxuICByZXR1cm4gKFxuICAgIDxCb3hcbiAgICAgIG1yPXsxfVxuICAgICAgb25Nb3VzZUxlYXZlPXsoKSA9PiB7c2V0Q29waWVkKGZhbHNlKX19XG4gICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgIHNldENvcGllZCh0cnVlKVxuICAgICAgICBvbkNvcHlDbGlja2VkKClcbiAgICAgIH19IFxuICAgICAgZGF0YS1mb3I9e2lkfVxuICAgICAgZGF0YS10aXA9e2ZvcmNlVG9vbHRpcFJlbW91bnR9XG4gICAgICBrZXk9e2ZvcmNlVG9vbHRpcFJlbW91bnR9XG4gICAgICBzeD17e2N1cnNvcjogJ3BvaW50ZXInfX1cbiAgICAgID5cbiAgICAgICAge1xuICAgICAgICAgIHRleHQgJiYgKFxuICAgICAgICAgICAgPFRleHQgdmFyaWFudD1cInNtYWxsXCIgbXI9ezJ9IHN4PXt7IGZvbnRXZWlnaHQ6IFwiMzAwXCIgfX0+XG4gICAgICAgICAgICAgIHt0ZXh0LnRvVXBwZXJDYXNlKCl9XG4gICAgICAgICAgICA8L1RleHQ+KVxuICAgICAgICB9XG4gICAgICAgIDxDbGlwYm9hcmQvPiBcbiAgICAgICAge2NvcGllZCA/IFxuICAgICAgICAgIDxTdHlsZWRUb29sdGlwIGlkPXtpZH0gdGV4dD17XCJDb3BpZWQhXCJ9IC8+XG4gICAgICAgICAgOiBcbiAgICAgICAgICA8U3R5bGVkVG9vbHRpcCBpZD17aWR9IHRleHQ9e3Rvb2x0aXBUZXh0fSAvPlxuICAgICAgICAgIH1cbiAgICA8L0JveD4pXG59XG5cbmV4cG9ydCBkZWZhdWx0IENvcHlUb0NsaXBib2FyZCJdfQ== */",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
});
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_5__.jsx)(StyledTooltip, {
place: "top",
backgroundColor: "#FFF",
textColor: "black",
effect: "solid",
id: id,
sx: {
boxShadow: "0px 5px 15px 0px rgba(0, 0, 0, 0.08),\n 0px 0px 0px 1px rgba(136, 152, 170, 0.1),\n 0px 4px 4px 0px rgba(136, 152, 170, 0.1) !important",
padding: "8px 12px"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_5__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_6__.Text, null, text));
};
var CopyToClipboard = function CopyToClipboard(_ref2) {
var text = _ref2.text,
copyText = _ref2.copyText,
tooltipText = _ref2.tooltipText;
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
copied = _useState[0],
setCopied = _useState[1];
var id = (Math.random() * 1000000).toString();
var forceTooltipRemount = copied ? "content-1" : "content-2";
var onCopyClicked = function onCopyClicked() {
copy_to_clipboard__WEBPACK_IMPORTED_MODULE_4___default()(copyText || tooltipText, {
format: 'text/plain'
});
};
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_5__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_6__.Box, {
mr: 1,
onMouseLeave: function onMouseLeave() {
setCopied(false);
},
onClick: function onClick() {
setCopied(true);
onCopyClicked();
},
"data-for": id,
"data-tip": forceTooltipRemount,
key: forceTooltipRemount,
sx: {
cursor: 'pointer'
}
}, text && (0,_emotion_react__WEBPACK_IMPORTED_MODULE_5__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_6__.Text, {
variant: "small",
mr: 2,
sx: {
fontWeight: "300"
}
}, text.toUpperCase()), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_5__.jsx)(_icons_clipboard__WEBPACK_IMPORTED_MODULE_2__["default"], null), copied ? (0,_emotion_react__WEBPACK_IMPORTED_MODULE_5__.jsx)(StyledTooltip, {
id: id,
text: "Copied!"
}) : (0,_emotion_react__WEBPACK_IMPORTED_MODULE_5__.jsx)(StyledTooltip, {
id: id,
text: tooltipText
}));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CopyToClipboard);
/***/ }),
/***/ "./src/components/content/code-box.js":
/*!********************************************!*\
!*** ./src/components/content/code-box.js ***!
\********************************************/
/***/ ((__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__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var theme_ui__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! theme-ui */ "./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js");
/* harmony import */ var _CopyToClipboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../CopyToClipboard */ "./src/components/CopyToClipboard/index.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
var CodeBox = function CodeBox(_ref) {
var header = _ref.header,
children = _ref.children,
shell = _ref.shell,
content = _ref.content,
allowCopy = _ref.allowCopy;
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_3__.Box, {
sx: {
background: "fadedContrast",
borderRadius: "small",
boxShadow: "0 0 0 1px rgb(0 0 0 / 7%)",
alignSelf: "flex-start",
marginLeft: "auto",
marginRight: "auto",
width: "100%",
mb: "4"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_3__.Box, {
sx: {
bg: "faded",
p: "8px 10px",
letterSpacing: "0.01em",
borderRadius: "8px 8px 0 0"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_3__.Flex, {
sx: {
height: "100%",
justifyContent: "space-between",
alignItems: "baseline"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_3__.Text, {
variant: "small",
sx: {
fontWeight: "400"
}
}, header.toUpperCase()), allowCopy ? (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(_CopyToClipboard__WEBPACK_IMPORTED_MODULE_1__["default"], {
copyText: content,
tooltipText: "Copy to clipboard"
}) : (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null))), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_3__.Box, {
sx: {
position: "relative",
boxSizing: "content-box",
maxHeight: "calc(90vh - 20px)",
minHeight: "10px"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_3__.Flex, {
sx: {
flexDirection: "column",
position: "relative",
minHeight: "inherit",
maxHeight: "inherit",
overflowY: "auto"
}
}, children)));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CodeBox);
/***/ }),
/***/ "./src/components/content/collapsible.js":
/*!***********************************************!*\
!*** ./src/components/content/collapsible.js ***!
\***********************************************/
/***/ ((__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__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_collapsible__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-collapsible */ "./node_modules/react-collapsible/dist/index.js");
/* harmony import */ var react_collapsible__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_collapsible__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var theme_ui__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! theme-ui */ "./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js");
/* harmony import */ var react_markdown__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-markdown */ "./node_modules/react-markdown/lib/react-markdown.js");
/* harmony import */ var react_markdown__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_markdown__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _description__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./description */ "./src/components/content/description.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
var NestedCollapsible = function NestedCollapsible(_ref) {
var properties = _ref.properties,
title = _ref.title;
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
isOpen = _useState[0],
setIsOpen = _useState[1];
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Box, {
mt: 2,
sx: {
"& .child-attrs": {
cursor: "pointer",
fontSize: "12px",
p: "6px 10px",
boxSizing: "border-box",
width: "max-content",
borderRadius: "small",
border: "1px solid",
borderColor: "faded"
},
"& .child-attrs.is-open": {
width: "100%",
borderBottom: "none",
borderBottomLeftRadius: "0",
borderBottomRightRadius: "0"
}
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)((react_collapsible__WEBPACK_IMPORTED_MODULE_1___default()), {
transitionTime: 50,
triggerClassName: "child-attrs",
triggerOpenedClassName: "child-attrs",
triggerTagName: "div",
trigger: (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Flex, {
sx: {
alignItems: "baseline",
fontSize: "13px",
fontWeight: "400"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Box, {
mr: 1,
className: isOpen ? "rotated" : null,
sx: {
userSelect: "none",
transition: "all 0.2s ease",
transform: "rotate(45deg)",
"&.rotated": {
transform: "rotate(0deg)"
}
}
}, "\xD7"), " ", (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Text, {
sx: {
fontSize: "0",
fontFamily: "body",
userSelect: "none"
}
}, (isOpen ? "Hide" : "Show") + " child attributes")),
onTriggerOpening: function onTriggerOpening() {
return setIsOpen(true);
},
onTriggerClosing: function onTriggerClosing() {
return setIsOpen(false);
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Box, {
sx: {
padding: "2",
borderRadius: "small",
borderTopLeftRadius: 0,
borderTopRightRadius: 0,
border: "hairline",
borderColor: "faded"
},
mb: "2"
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Heading, {
as: "h3",
p: 2,
sx: {
fontFamily: "body",
fontWeight: "500"
}
}, title), properties.map(function (param, i) {
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Box, {
p: 2,
sx: {
borderTop: "hairline"
},
key: i
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Flex, {
sx: {
fontSize: "0",
alignItems: "baseline",
pb: "1",
fontFamily: "monospace"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Box, {
mr: 2,
fontSize: "12px"
}, param.property), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Text, {
color: "gray",
fontSize: "10px"
}, param.type), param.required && (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Text, {
ml: 1,
fontSize: "10px",
variant: "labels.required"
}, "required")), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(_description__WEBPACK_IMPORTED_MODULE_3__["default"], null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Text, {
sx: {
fontSize: "0",
lineHeight: "26px",
fontFamily: "body"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)((react_markdown__WEBPACK_IMPORTED_MODULE_2___default()), null, param.description))));
}))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NestedCollapsible);
/***/ }),
/***/ "./src/components/content/description.js":
/*!***********************************************!*\
!*** ./src/components/content/description.js ***!
\***********************************************/
/***/ ((__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__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var theme_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! theme-ui */ "./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
var Description = function Description(_ref) {
var children = _ref.children;
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_1__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_2__.Box, {
sx: {
code: {
backgroundColor: "faded",
borderRadius: "4px",
p: "3px"
}
}
}, children);
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Description);
/***/ }),
/***/ "./src/components/content/endpoint-container.js":
/*!******************************************************!*\
!*** ./src/components/content/endpoint-container.js ***!
\******************************************************/
/***/ ((__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__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var theme_ui__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! theme-ui */ "./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js");
/* harmony import */ var _code_box__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./code-box */ "./src/components/content/code-box.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
var EndpointContainer = function EndpointContainer(_ref) {
var endpoints = _ref.endpoints;
if (!endpoints) return null;
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(_code_box__WEBPACK_IMPORTED_MODULE_1__["default"], {
header: "ENDPOINTS"
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_3__.Flex, {
py: 2,
sx: {
flexDirection: "column"
}
}, endpoints.map(function (e, i) {
var method = e.method.toUpperCase();
var endpoint = e.endpoint;
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_3__.Flex, {
key: i,
sx: {
fontSize: "0",
fontFamily: "monospace",
px: "3",
py: "2"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_3__.Text, {
variant: "labels." + method,
sx: {
width: "55px",
textAlign: "right"
},
mr: 2
}, method), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_3__.Text, {
sx: {
color: "dark"
}
}, endpoint.replace(/{(.*?)}/g, ":$1")));
})));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (EndpointContainer);
/***/ }),
/***/ "./src/components/content/index.js":
/*!*****************************************!*\
!*** ./src/components/content/index.js ***!
\*****************************************/
/***/ ((__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__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var theme_ui__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! theme-ui */ "./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js");
/* harmony import */ var _topbar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../topbar */ "./src/components/topbar.js");
/* harmony import */ var _section__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./section */ "./src/components/content/section.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
var Content = function Content(_ref) {
var data = _ref.data,
api = _ref.api;
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_3__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_4__.Flex, {
sx: {
flexDirection: "column"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_3__.jsx)(_topbar__WEBPACK_IMPORTED_MODULE_1__["default"], {
data: data,
api: api
}), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_3__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_4__.Box, {
sx: {
maxHeight: "calc(100vh - 50px)",
overflowY: "scroll",
"@media screen and (max-width: 848px)": {
mt: "50px"
}
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_3__.jsx)("main", {
className: "DocSearch-content"
}, data.sections.map(function (s, i) {
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_3__.jsx)(_section__WEBPACK_IMPORTED_MODULE_2__["default"], {
key: i,
data: s,
api: api
});
}))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Content);
/***/ }),
/***/ "./src/components/content/json-container.js":
/*!**************************************************!*\
!*** ./src/components/content/json-container.js ***!
\**************************************************/
/***/ ((__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__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var theme_ui__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! theme-ui */ "./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js");
/* harmony import */ var _medusa_plugin_themes_prism_theme_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../medusa-plugin-themes/prism/theme.css */ "./src/medusa-plugin-themes/prism/theme.css");
/* harmony import */ var _medusa_plugin_themes_prism_theme_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_medusa_plugin_themes_prism_theme_css__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var prismjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prismjs */ "./node_modules/prismjs/prism.js");
/* harmony import */ var prismjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prismjs__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var prismjs_components_prism_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prismjs/components/prism-json */ "./node_modules/prismjs/components/prism-json.js");
/* harmony import */ var prismjs_components_prism_json__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_json__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _code_box__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./code-box */ "./src/components/content/code-box.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
var JsonContainer = function JsonContainer(_ref) {
var json = _ref.json,
header = _ref.header,
language = _ref.language,
allowCopy = _ref.allowCopy;
var jsonRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
var codeClass = language ? language === "shell" ? "language-shell" : "language-json" : "language-json"; //INVESTIGATE: @theme-ui/prism might be a better solution
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
if (jsonRef.current) {
prismjs__WEBPACK_IMPORTED_MODULE_2___default().highlightAllUnder(jsonRef.current);
}
}, []);
if (typeof json !== "string" || json === "{}") return null;
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_5__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_6__.Box, {
ref: jsonRef,
sx: {
position: "sticky",
top: "20px"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_5__.jsx)(_code_box__WEBPACK_IMPORTED_MODULE_4__["default"], {
allowCopy: allowCopy,
content: json,
shell: language === "shell",
header: header
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_5__.jsx)("pre", null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_5__.jsx)("code", {
className: codeClass
}, json))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JsonContainer);
/***/ }),
/***/ "./src/components/content/method.js":
/*!******************************************!*\
!*** ./src/components/content/method.js ***!
\******************************************/
/***/ ((__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__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_markdown__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-markdown */ "./node_modules/react-markdown/lib/react-markdown.js");
/* harmony import */ var react_markdown__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_markdown__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var theme_ui__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! theme-ui */ "./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js");
/* harmony import */ var _context_navigation_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../context/navigation-context */ "./src/context/navigation-context.js");
/* harmony import */ var _hooks_use_in_view__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../hooks/use-in-view */ "./src/hooks/use-in-view.js");
/* harmony import */ var _utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/convert-to-kebab-case */ "./src/utils/convert-to-kebab-case.js");
/* harmony import */ var _utils_format_parameters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/format-parameters */ "./src/utils/format-parameters.js");
/* harmony import */ var _utils_format_route__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/format-route */ "./src/utils/format-route.js");
/* harmony import */ var _description__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./description */ "./src/components/content/description.js");
/* harmony import */ var _json_container__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./json-container */ "./src/components/content/json-container.js");
/* harmony import */ var _parameters__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./parameters */ "./src/components/content/parameters.js");
/* harmony import */ var _responsive_container__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./responsive-container */ "./src/components/content/responsive-container.js");
/* harmony import */ var _route__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./route */ "./src/components/content/route.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var Method = function Method(_ref) {
var _data$responses$0$con;
var data = _ref.data,
section = _ref.section,
pathname = _ref.pathname,
api = _ref.api;
var parameters = data.parameters,
requestBody = data.requestBody,
description = data.description,
method = data.method,
summary = data.summary;
var jsonResponse = (_data$responses$0$con = data.responses[0].content) === null || _data$responses$0$con === void 0 ? void 0 : _data$responses$0$con[0].json;
var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_navigation_context__WEBPACK_IMPORTED_MODULE_2__["default"]),
updateHash = _useContext.updateHash,
updateMetadata = _useContext.updateMetadata;
var methodRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
var _useInView = (0,_hooks_use_in_view__WEBPACK_IMPORTED_MODULE_3__["default"])({
root: null,
rootMargin: "0px 0px -80% 0px",
threshold: 0
}),
containerRef = _useInView[0],
isInView = _useInView[1];
var formattedParameters = (0,_utils_format_parameters__WEBPACK_IMPORTED_MODULE_5__.formatMethodParams)({
parameters: parameters,
requestBody: requestBody
});
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
if (isInView) {
updateHash(section, (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_4__.convertToKebabCase)(summary));
} // eslint-disable-next-line react-hooks/exhaustive-deps
}, [isInView]);
var handleMetaChange = function handleMetaChange() {
updateMetadata({
title: summary,
description: description
});
if (methodRef.current) {
methodRef.current.scrollIntoView({
behavior: "smooth"
});
}
};
var getExampleValues = function getExampleValues(type, defaultExample) {
switch (type) {
case "integer":
return 1000;
case "boolean":
return false;
case "object":
return {};
default:
return defaultExample;
}
}; // extract required properties or a non-required property from a json object
// based on the extraction method "getPropertyFromObject"
var getPropertiesFromObject = function getPropertiesFromObject(requiredProperties, properties, obj, res, getPropertyFromObject) {
for (var _iterator = _createForOfIteratorHelperLoose(requiredProperties), _step; !(_step = _iterator()).done;) {
var element = _step.value;
try {
res[element.property] = getPropertyFromObject(obj, element.property);
} catch (err) {}
} // if (Object.keys(res) === requiredProperties.map((p) => p.property)) {
// return res
// }
for (var _iterator2 = _createForOfIteratorHelperLoose(properties), _step2; !(_step2 = _iterator2()).done;) {
var _element = _step2.value;
try {
res[_element.property] = getPropertyFromObject(obj, _element.property);
break;
} catch (err) {}
}
return res;
};
var getCurlJson = function getCurlJson(properties, prefix, bodyParameters) {
if (!properties[0]) {
return;
}
var jsonObject = JSON.parse(jsonResponse);
var pathParts = pathname.split("/");
var requiredProperties = bodyParameters.filter(function (p) {
return p.required;
});
var res = {}; // if the endpoint is for a relation i.e. /orders/:id/shipment drill down into the properties of the json object
if (pathParts.length > 3) {
var propertyIndex = pathParts[2].match(/{[A-Za-z_]+}/) ? 3 : 2;
try {
var obj = jsonObject[pathParts[propertyIndex].replace("-", "_")] || jsonObject[Object.keys(jsonObject)[0]][pathParts[propertyIndex].replace("-", "_")];
res = getPropertiesFromObject(requiredProperties, properties, obj, res, function (obj, property) {
return Array.isArray(obj) ? obj.find(function (o) {
return o[property];
})[property] : obj[property];
});
} catch (err) {}
} // if nothing was found drilling down look at the top level properties
if (JSON.stringify(res) === "{}") {
res = getPropertiesFromObject(requiredProperties, properties, jsonObject, res, function (jsonObject, property) {
return jsonObject[property] || jsonObject[Object.keys(jsonObject)[0]][property];
});
} // Last resort, set the first property to an example
if (JSON.stringify(res) === "{}") {
res[properties[0].property] = getExampleValues(properties[0].type, prefix + "_" + properties[0].property);
} // Add values to 'undefined' properties before returning due to JSON.stringify removing 'undefined' but not 'null'
return requiredProperties.reduce(function (prev, curr) {
if (prev[curr.property] === undefined) {
prev[curr.property] = getExampleValues(curr.type, prefix + "_" + curr.property);
}
return prev;
}, res);
};
var getCurlCommand = function getCurlCommand(requestBody) {
var _requestBody$properti;
var body = JSON.stringify(getCurlJson(requestBody.properties, "example_" + section, formattedParameters.body));
return "curl -X " + data.method.toUpperCase() + " https://medusa-url.com/" + api + (0,_utils_format_route__WEBPACK_IMPORTED_MODULE_6__.formatRoute)(pathname) + " \\\n --header \"Authorization: Bearer \" " + (data.method.toUpperCase() === "POST" && ((_requestBody$properti = requestBody.properties) === null || _requestBody$properti === void 0 ? void 0 : _requestBody$properti.length) > 0 ? "\\\n --header \"content-type: application/json\" \\\n --data '" + body + "'" : "");
};
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_12__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_13__.Flex, {
py: "5vw",
sx: {
borderTop: "hairline",
flexDirection: "column"
},
id: (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_4__.convertToKebabCase)(summary),
ref: methodRef
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_12__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_13__.Flex, null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_12__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_13__.Heading, {
as: "h2",
mb: 4,
sx: {
fontSize: "4",
fontWeight: "500",
cursor: "pointer"
},
ref: containerRef,
onClick: function onClick() {
return handleMetaChange();
}
}, summary)), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_12__.jsx)(_responsive_container__WEBPACK_IMPORTED_MODULE_10__["default"], null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_12__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_13__.Flex, {
className: "info",
sx: {
flexDirection: "column",
pr: "5",
"@media screen and (max-width: 848px)": {
pr: "0"
}
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_12__.jsx)(_route__WEBPACK_IMPORTED_MODULE_11__["default"], {
path: pathname,
method: method
}), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_12__.jsx)(_description__WEBPACK_IMPORTED_MODULE_7__["default"], null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_12__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_13__.Text, {
sx: {
lineHeight: "26px"
},
mt: 3
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_12__.jsx)((react_markdown__WEBPACK_IMPORTED_MODULE_1___default()), null, description))), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_12__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_13__.Box, {
mt: 2
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_12__.jsx)(_parameters__WEBPACK_IMPORTED_MODULE_9__["default"], {
params: formattedParameters,
type: "Parameters"
}))), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_12__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_13__.Box, {
className: "code"
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_12__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_13__.Box, null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_12__.jsx)(_json_container__WEBPACK_IMPORTED_MODULE_8__["default"], {
json: getCurlCommand(requestBody),
header: "cURL Example",
language: "shell",
allowCopy: true,
method: (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_4__.convertToKebabCase)(summary)
})), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_12__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_13__.Box, null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_12__.jsx)(_json_container__WEBPACK_IMPORTED_MODULE_8__["default"], {
json: jsonResponse,
header: "RESPONSE",
method: (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_4__.convertToKebabCase)(summary)
})))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Method);
/***/ }),
/***/ "./src/components/content/parameters.js":
/*!**********************************************!*\
!*** ./src/components/content/parameters.js ***!
\**********************************************/
/***/ ((__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__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var theme_ui__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! theme-ui */ "./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js");
/* harmony import */ var react_markdown__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-markdown */ "./node_modules/react-markdown/lib/react-markdown.js");
/* harmony import */ var react_markdown__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_markdown__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _collapsible__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./collapsible */ "./src/components/content/collapsible.js");
/* harmony import */ var _description__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./description */ "./src/components/content/description.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
var Parameters = function Parameters(_ref) {
var params = _ref.params,
type = _ref.type;
var getDescriptions = function getDescriptions(title, items) {
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, (items === null || items === void 0 ? void 0 : items.length) > 0 && (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Text, {
sx: {
borderLeft: "2px solid gray",
alignItems: "center"
},
my: 3,
pl: 2,
py: 1
}, title === "attr" ? "Attributes" : title), items.map(function (prop, i) {
var _prop$items, _prop$schema;
var nested = prop.nestedModel || ((_prop$items = prop.items) === null || _prop$items === void 0 ? void 0 : _prop$items.properties) || null;
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Box, {
py: 2,
pl: 2,
sx: {
borderTop: "hairline",
fontFamily: "monospace",
fontSize: "0"
},
key: i
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Flex, {
sx: {
alignItems: "baseline",
fontSize: "0"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Text, {
mr: 2
}, prop.property || prop.name), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Text, {
color: "gray"
}, prop.type || ((_prop$schema = prop.schema) === null || _prop$schema === void 0 ? void 0 : _prop$schema.type) || (nested === null || nested === void 0 ? void 0 : nested.title)), prop.required ? (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Text, {
ml: 1,
variant: "labels.required"
}, "required") : null), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(_description__WEBPACK_IMPORTED_MODULE_3__["default"], null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Text, {
sx: {
fontSize: "0",
lineHeight: "26px",
fontFamily: "body"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)((react_markdown__WEBPACK_IMPORTED_MODULE_1___default()), null, prop.description))), (nested === null || nested === void 0 ? void 0 : nested.properties) && (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(_collapsible__WEBPACK_IMPORTED_MODULE_2__["default"], {
properties: nested.properties,
title: nested.title
}));
})));
};
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Flex, {
sx: {
flexDirection: "column"
}
}, getDescriptions(type, params.properties), getDescriptions("Request body", params.body));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Parameters);
/***/ }),
/***/ "./src/components/content/responsive-container.js":
/*!********************************************************!*\
!*** ./src/components/content/responsive-container.js ***!
\********************************************************/
/***/ ((__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 _emotion_styled_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/styled/base */ "./node_modules/@emotion/styled/base/dist/emotion-styled-base.esm.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var theme_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! theme-ui */ "./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
var ResponsiveFlex = /*#__PURE__*/(0,_emotion_styled_base__WEBPACK_IMPORTED_MODULE_0__["default"])(theme_ui__WEBPACK_IMPORTED_MODULE_2__.Flex, false ? 0 : {
target: "eq6ebm30",
label: "ResponsiveFlex"
})( false ? 0 : {
name: "vzy6yj",
styles: ".info{width:55%;}.code{width:45%;}@media screen and (max-width: 848px){flex-direction:column;align-items:center;.info,.code{width:100%;}}",
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9vbGl2ZXJqdWhsL0Rlc2t0b3AvbWVkdXNhL2NvcmUvd3d3L3JlZmVyZW5jZS9zcmMvY29tcG9uZW50cy9jb250ZW50L3Jlc3BvbnNpdmUtY29udGFpbmVyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUltQyIsImZpbGUiOiIvVXNlcnMvb2xpdmVyanVobC9EZXNrdG9wL21lZHVzYS9jb3JlL3d3dy9yZWZlcmVuY2Uvc3JjL2NvbXBvbmVudHMvY29udGVudC9yZXNwb25zaXZlLWNvbnRhaW5lci5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCBmcm9tIFwicmVhY3RcIlxuaW1wb3J0IHN0eWxlZCBmcm9tIFwiQGVtb3Rpb24vc3R5bGVkXCJcbmltcG9ydCB7IEZsZXggfSBmcm9tIFwidGhlbWUtdWlcIlxuXG5jb25zdCBSZXNwb25zaXZlRmxleCA9IHN0eWxlZChGbGV4KWBcbiAgLmluZm8ge1xuICAgIHdpZHRoOiA1NSU7XG4gIH1cblxuICAuY29kZSB7XG4gICAgd2lkdGg6IDQ1JTtcbiAgfVxuXG4gIEBtZWRpYSBzY3JlZW4gYW5kIChtYXgtd2lkdGg6IDg0OHB4KSB7XG4gICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcbiAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuXG4gICAgLmluZm8sXG4gICAgLmNvZGUge1xuICAgICAgd2lkdGg6IDEwMCU7XG4gICAgfVxuICB9XG5gXG5cbmNvbnN0IFJlc3BvbnNpdmVDb250YWluZXIgPSAoeyBjaGlsZHJlbiB9KSA9PiB7XG4gIHJldHVybiA8UmVzcG9uc2l2ZUZsZXg+e2NoaWxkcmVufTwvUmVzcG9uc2l2ZUZsZXg+XG59XG5cbmV4cG9ydCBkZWZhdWx0IFJlc3BvbnNpdmVDb250YWluZXJcbiJdfQ== */",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
});
var ResponsiveContainer = function ResponsiveContainer(_ref) {
var children = _ref.children;
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_3__.jsx)(ResponsiveFlex, null, children);
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ResponsiveContainer);
/***/ }),
/***/ "./src/components/content/route.js":
/*!*****************************************!*\
!*** ./src/components/content/route.js ***!
\*****************************************/
/***/ ((__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__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var theme_ui__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! theme-ui */ "./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js");
/* harmony import */ var _utils_format_route__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/format-route */ "./src/utils/format-route.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
var Route = function Route(_ref) {
var method = _ref.method,
path = _ref.path;
var fixedMethod = method.toUpperCase();
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_3__.Flex, {
sx: {
fontFamily: "monospace"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_3__.Text, {
variant: "labels." + fixedMethod,
mr: 1
}, fixedMethod), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_3__.Text, null, (0,_utils_format_route__WEBPACK_IMPORTED_MODULE_1__.formatRoute)(path)));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Route);
/***/ }),
/***/ "./src/components/content/section.js":
/*!*******************************************!*\
!*** ./src/components/content/section.js ***!
\*******************************************/
/***/ ((__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 core_js_modules_es_array_flat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.flat.js */ "./node_modules/core-js/modules/es.array.flat.js");
/* harmony import */ var core_js_modules_es_array_flat_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_flat_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_array_unscopables_flat_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.unscopables.flat.js */ "./node_modules/core-js/modules/es.array.unscopables.flat.js");
/* harmony import */ var core_js_modules_es_array_unscopables_flat_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_unscopables_flat_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var react_markdown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-markdown */ "./node_modules/react-markdown/lib/react-markdown.js");
/* harmony import */ var react_markdown__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_markdown__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var theme_ui__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! theme-ui */ "./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js");
/* harmony import */ var _context_navigation_context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../context/navigation-context */ "./src/context/navigation-context.js");
/* harmony import */ var _hooks_use_in_view__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../hooks/use-in-view */ "./src/hooks/use-in-view.js");
/* harmony import */ var _utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/convert-to-kebab-case */ "./src/utils/convert-to-kebab-case.js");
/* harmony import */ var _icons_chevron_down__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../icons/chevron-down */ "./src/components/icons/chevron-down.js");
/* harmony import */ var _description__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./description */ "./src/components/content/description.js");
/* harmony import */ var _endpoint_container__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./endpoint-container */ "./src/components/content/endpoint-container.js");
/* harmony import */ var _json_container__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./json-container */ "./src/components/content/json-container.js");
/* harmony import */ var _method__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./method */ "./src/components/content/method.js");
/* harmony import */ var _parameters__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./parameters */ "./src/components/content/parameters.js");
/* harmony import */ var _responsive_container__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./responsive-container */ "./src/components/content/responsive-container.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
var Section = function Section(_ref) {
var _section$schema2, _section$schema3;
var data = _ref.data,
api = _ref.api;
var section = data.section;
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(false),
isExpanded = _useState[0],
setIsExpanded = _useState[1];
var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(_context_navigation_context__WEBPACK_IMPORTED_MODULE_4__["default"]),
openSections = _useContext.openSections,
updateSection = _useContext.updateSection,
updateMetadata = _useContext.updateMetadata;
var endpoints = section.paths.map(function (p) {
var path = p.name;
var ep = [];
p.methods.forEach(function (m) {
ep.push({
method: m.method,
endpoint: path
});
});
return ep;
}).flat();
var sectionRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);
var scrollIntoView = function scrollIntoView() {
if (sectionRef.current) {
sectionRef.current.scrollIntoView({
behavior: "smooth"
});
}
};
var handleExpand = function handleExpand() {
var _section$schema;
updateMetadata({
title: section.section_name,
description: (_section$schema = section.schema) === null || _section$schema === void 0 ? void 0 : _section$schema.description
});
setIsExpanded(true);
scrollIntoView();
};
(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
var shouldOpen = openSections.includes((0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_6__.convertToKebabCase)(section.section_name));
if (shouldOpen) {
setIsExpanded(true);
}
}, [section.section_name, openSections, openSections.length]);
var _useInView = (0,_hooks_use_in_view__WEBPACK_IMPORTED_MODULE_5__["default"])({
root: null,
rootMargin: "0px 0px -80% 0px",
threshold: 1.0
}),
containerRef = _useInView[0],
isInView = _useInView[1];
(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
var handleInView = function handleInView() {
if (isInView) {
updateSection((0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_6__.convertToKebabCase)(section.section_name));
}
};
handleInView(); // eslint-disable-next-line react-hooks/exhaustive-deps
}, [isInView]);
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_14__.jsx)("section", {
ref: sectionRef,
id: (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_6__.convertToKebabCase)(section.section_name)
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_14__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_15__.Box, {
sx: {
borderBottom: "hairline",
padding: "5vw",
backgroundColor: isExpanded ? "transparent" : "fadedContrast"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_14__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_15__.Flex, null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_14__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_15__.Heading, {
as: "h1",
sx: {
fontWeight: "500",
fontSize: "22",
mb: "3",
cursor: "pointer"
},
ref: containerRef,
className: "header-" + (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_6__.convertToKebabCase)(section.section_name),
onClick: handleExpand
}, section.section_name)), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_14__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_15__.Flex, {
sx: {
flexDirection: "column"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_14__.jsx)(_responsive_container__WEBPACK_IMPORTED_MODULE_13__["default"], null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_14__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_15__.Flex, {
sx: {
flexDirection: "column",
lineHeight: "26px",
pr: "5",
"@media screen and (max-width: 848px)": {
pr: "0"
}
},
className: "info"
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_14__.jsx)(_description__WEBPACK_IMPORTED_MODULE_8__["default"], null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_14__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_15__.Text, {
mb: 4
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_14__.jsx)((react_markdown__WEBPACK_IMPORTED_MODULE_3___default()), null, (_section$schema2 = section.schema) === null || _section$schema2 === void 0 ? void 0 : _section$schema2.description))), isExpanded && section.schema ? (0,_emotion_react__WEBPACK_IMPORTED_MODULE_14__.jsx)(_parameters__WEBPACK_IMPORTED_MODULE_12__["default"], {
params: section.schema,
type: "attr"
}) : null), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_14__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_15__.Flex, {
className: "code",
sx: {
flexDirection: "column"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_14__.jsx)(_endpoint_container__WEBPACK_IMPORTED_MODULE_9__["default"], {
endpoints: endpoints
}), isExpanded ? (0,_emotion_react__WEBPACK_IMPORTED_MODULE_14__.jsx)(_json_container__WEBPACK_IMPORTED_MODULE_10__["default"], {
json: (_section$schema3 = section.schema) === null || _section$schema3 === void 0 ? void 0 : _section$schema3.object,
header: section.section_name.toUpperCase() + " OBJECT"
}) : null)), !isExpanded && (0,_emotion_react__WEBPACK_IMPORTED_MODULE_14__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_15__.Flex, {
sx: {
justifyContent: "center",
alignItems: "center",
width: "100%"
},
mt: 4
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_14__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_15__.Button, {
onClick: handleExpand,
sx: {
display: "flex",
alignItems: "center",
borderRadius: "24px",
bg: "light",
fontWeight: "500"
}
}, "SHOW ", (0,_emotion_react__WEBPACK_IMPORTED_MODULE_14__.jsx)(_icons_chevron_down__WEBPACK_IMPORTED_MODULE_7__["default"], {
fill: "dark",
styles: {
mr: "-10px"
}
}))), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_14__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_15__.Box, {
id: "method-container",
mt: 4,
sx: {
display: isExpanded ? "block" : "none"
}
}, section.paths.map(function (p, i) {
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_14__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_15__.Flex, {
key: i,
sx: {
flexDirection: "column"
}
}, p.methods.map(function (m, i) {
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_14__.jsx)(_method__WEBPACK_IMPORTED_MODULE_11__["default"], {
api: api,
key: i,
data: m,
section: (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_6__.convertToKebabCase)(section.section_name),
pathname: p.name
});
}));
})))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Section);
/***/ }),
/***/ "./src/components/icons/chevron-down.js":
/*!**********************************************!*\
!*** ./src/components/icons/chevron-down.js ***!
\**********************************************/
/***/ ((__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__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var theme_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! theme-ui */ "./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
var ChevronDown = function ChevronDown(_ref) {
var _ref$fill = _ref.fill,
fill = _ref$fill === void 0 ? "darkContrast" : _ref$fill,
styles = _ref.styles;
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_1__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_2__.Box, {
as: "svg",
xmlns: "http://www.w3.org/2000/svg",
width: "24",
height: "24",
viewBox: "0 0 24 24",
sx: Object.assign({}, styles, {
alignSelf: "center",
pointerEvents: "none",
fill: "" + fill
})
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", {
d: "M7.41 7.84l4.59 4.58 4.59-4.58 1.41 1.41-6 6-6-6z"
}));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChevronDown);
/***/ }),
/***/ "./src/components/icons/clipboard.js":
/*!*******************************************!*\
!*** ./src/components/icons/clipboard.js ***!
\*******************************************/
/***/ ((__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 _theme_ui_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @theme-ui/components */ "./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _assets_clipboard_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../assets/clipboard.svg */ "./src/assets/clipboard.svg");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
var Clipboard = function Clipboard() {
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(_theme_ui_components__WEBPACK_IMPORTED_MODULE_3__.Image, {
src: _assets_clipboard_svg__WEBPACK_IMPORTED_MODULE_1__["default"],
sx: {
height: "100%",
fill: "#000",
cursor: 'pointer'
}
});
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Clipboard);
/***/ }),
/***/ "./src/components/icons/github.js":
/*!****************************************!*\
!*** ./src/components/icons/github.js ***!
\****************************************/
/***/ ((__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 _theme_ui_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @theme-ui/components */ "./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _assets_github_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../assets/github.svg */ "./src/assets/github.svg");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
var GitHub = function GitHub() {
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(_theme_ui_components__WEBPACK_IMPORTED_MODULE_3__.Image, {
src: _assets_github_svg__WEBPACK_IMPORTED_MODULE_1__["default"],
sx: {
height: "20px",
fill: "#000"
}
});
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GitHub);
/***/ }),
/***/ "./src/components/layout.js":
/*!**********************************!*\
!*** ./src/components/layout.js ***!
\**********************************/
/***/ ((__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__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var theme_ui__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! theme-ui */ "./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js");
/* harmony import */ var _side_bar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./side-bar */ "./src/components/side-bar/index.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
var Layout = function Layout(_ref) {
var data = _ref.data,
api = _ref.api,
children = _ref.children;
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_3__.Flex, {
sx: {
p: "0",
m: "0",
overflow: "hidden"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_3__.Flex, {
sx: {
position: "absolute",
top: 0,
left: 0,
right: 0,
bottom: 0,
fontFamily: "body",
flexGrow: "1"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(_side_bar__WEBPACK_IMPORTED_MODULE_1__["default"], {
data: data,
api: api
}), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_2__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_3__.Box, null, children)));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Layout);
/***/ }),
/***/ "./src/components/search/hit-component.js":
/*!************************************************!*\
!*** ./src/components/search/hit-component.js ***!
\************************************************/
/***/ ((__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__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/convert-to-kebab-case */ "./src/utils/convert-to-kebab-case.js");
/* harmony import */ var _context_navigation_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../context/navigation-context */ "./src/context/navigation-context.js");
/* harmony import */ var gatsby__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! gatsby */ "./.cache/gatsby-browser-entry.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
var HitComponent = function HitComponent(_ref) {
var hit = _ref.hit,
children = _ref.children;
var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_navigation_context__WEBPACK_IMPORTED_MODULE_2__["default"]),
goTo = _useContext.goTo,
api = _useContext.api;
var url = hit.url,
type = hit.type,
hierarchy = hit.hierarchy;
/** Get the API that is not currenty being viewed, so we can create
* an URL that goes to the other API.
*/
var getOtherAPI = function getOtherAPI() {
if (api === "store") return "admin";
if (api === "admin") return "store";
};
/** If result is part of currently viewed API then we scroll to the
* concept/method, and update the pages metadata.
*/
var goToHierarchy = function goToHierarchy(e) {
e.preventDefault();
if (hierarchy.lvl2) {
goTo({
section: (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_1__.convertToKebabCase)(hierarchy.lvl1),
method: (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_1__.convertToKebabCase)(hierarchy.lvl2)
});
} else {
goTo({
section: (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_1__.convertToKebabCase)(hierarchy.lvl1)
});
}
};
/** If result is NOT part of currently viewed API, but still a part of
* the Gatsby site, then we use Gatsby's navigate function for improved
* linking.
*/
var navigateHierarchy = function navigateHierarchy(e) {
e.preventDefault();
if (hierarchy.lvl2) {
(0,gatsby__WEBPACK_IMPORTED_MODULE_3__.navigate)("/api/" + getOtherAPI() + "/" + (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_1__.convertToKebabCase)(hierarchy.lvl1) + "/" + (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_1__.convertToKebabCase)(hierarchy.lvl2));
} else {
(0,gatsby__WEBPACK_IMPORTED_MODULE_3__.navigate)("/api/" + getOtherAPI() + "/" + (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_1__.convertToKebabCase)(hierarchy.lvl1));
}
};
/**
* If result is part of the API reference then we want to strip
* the #'s from the URL's. If the result is of LVL2 then we want
* to add the LVL1 to the URL: '/store/#create-cart' -> '/store/cart/create-cart'
*/
var formatURL = function formatURL() {
url = url.replace("#", "/");
if (type === "lvl2") {
var index = url.lastIndexOf("/");
url = url.substring(0, index) + ("/" + (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_1__.convertToKebabCase)(hierarchy.lvl1)) + url.substring(index);
}
};
/**
* If the result is part of the currently viewed API
*/
if (url.includes("api/" + api)) {
formatURL();
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
href: url,
onClick: goToHierarchy
}, children);
}
/**
* If the result is NOT part of the currently viewed API
*/
if (url.includes("api/" + getOtherAPI())) {
formatURL();
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
href: url,
onClick: navigateHierarchy
}, children);
}
/**
* If the result is part of the Docasaurus docs
*/
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)("a", {
href: url
}, children);
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (HitComponent);
/***/ }),
/***/ "./src/components/search/index.js":
/*!****************************************!*\
!*** ./src/components/search/index.js ***!
\****************************************/
/***/ ((__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__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _docsearch_react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @docsearch/react */ "./node_modules/@docsearch/react/dist/esm/DocSearch.js");
/* harmony import */ var _medusa_plugin_themes_docsearch_theme_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../medusa-plugin-themes/docsearch/theme.css */ "./src/medusa-plugin-themes/docsearch/theme.css");
/* harmony import */ var _medusa_plugin_themes_docsearch_theme_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_medusa_plugin_themes_docsearch_theme_css__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _hit_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hit-component */ "./src/components/search/hit-component.js");
/* harmony import */ var _context_navigation_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../context/navigation-context */ "./src/context/navigation-context.js");
/* harmony import */ var _utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/convert-to-kebab-case */ "./src/utils/convert-to-kebab-case.js");
/* harmony import */ var gatsby_link__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! gatsby-link */ "./node_modules/gatsby-link/index.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
var algoliaApiKey = ({}).ALGOLIA_API_KEY || "temp";
var Search = function Search() {
var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_navigation_context__WEBPACK_IMPORTED_MODULE_3__["default"]),
goTo = _useContext.goTo,
api = _useContext.api;
var getOtherAPI = function getOtherAPI() {
if (api === "store") return "admin";
if (api === "admin") return "store";
};
var replaceUrl = function replaceUrl(item) {
var url = item.url,
hierarchy = item.hierarchy;
if (url.includes("api/store") || url.includes("/api/admin")) {
url = url.replace("#", "");
if (hierarchy.lvl2) {
var index = url.lastIndexOf("/");
url = url.substring(0, index) + ("/" + (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_4__.convertToKebabCase)(hierarchy.lvl1)) + url.substring(index);
}
}
return url;
};
/** If result is part of currently viewed API then we scroll to the
* concept/method, and update the pages metadata.
*/
var goToHierarchy = function goToHierarchy(item) {
var hierarchy = item.hierarchy;
if (hierarchy.lvl2) {
goTo({
section: (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_4__.convertToKebabCase)(hierarchy.lvl1),
method: (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_4__.convertToKebabCase)(hierarchy.lvl2)
});
} else {
goTo({
section: (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_4__.convertToKebabCase)(hierarchy.lvl1)
});
}
};
/** If result is NOT part of currently viewed API, but still a part of
* the Gatsby site, then we use Gatsby's navigate function for improved
* linking.
*/
var navigateHierarchy = function navigateHierarchy(item) {
var hierarchy = item.hierarchy;
if (hierarchy.lvl2) {
(0,gatsby_link__WEBPACK_IMPORTED_MODULE_5__.navigate)("/api/" + getOtherAPI() + "/" + (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_4__.convertToKebabCase)(hierarchy.lvl1) + "/" + (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_4__.convertToKebabCase)(hierarchy.lvl2));
} else {
(0,gatsby_link__WEBPACK_IMPORTED_MODULE_5__.navigate)("/api/" + getOtherAPI() + "/" + (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_4__.convertToKebabCase)(hierarchy.lvl1));
}
};
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)(_docsearch_react__WEBPACK_IMPORTED_MODULE_7__.DocSearch, {
apiKey: algoliaApiKey,
indexName: "medusa-commerce",
hitComponent: _hit_component__WEBPACK_IMPORTED_MODULE_2__["default"],
navigator: {
navigate: function navigate(_ref) {
var item = _ref.item;
if (item.url.includes("api/" + api)) {
goToHierarchy(item);
} else if (item.url.includes("api/" + getOtherAPI())) {
navigateHierarchy(item);
} else {
window.location = item.url;
}
},
navigateNewTab: function navigateNewTab(_ref2) {
var item = _ref2.item;
var url = replaceUrl(item);
var windowReference = window.open(url, "_blank", "noopener");
if (windowReference) {
windowReference.focus();
}
},
navigateNewWindow: function navigateNewWindow(_ref3) {
var item = _ref3.item;
var url = replaceUrl(item);
window.open(url, "_blank", "noopener");
}
}
});
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Search);
/***/ }),
/***/ "./src/components/side-bar/index.js":
/*!******************************************!*\
!*** ./src/components/side-bar/index.js ***!
\******************************************/
/***/ ((__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 _emotion_styled_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/styled/base */ "./node_modules/@emotion/styled/base/dist/emotion-styled-base.esm.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var theme_ui__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! theme-ui */ "./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js");
/* harmony import */ var _assets_logo_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../assets/logo.svg */ "./src/assets/logo.svg");
/* harmony import */ var _assets_logo_muted_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../assets/logo-muted.svg */ "./src/assets/logo-muted.svg");
/* harmony import */ var _sidebar_item__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sidebar-item */ "./src/components/side-bar/sidebar-item.js");
/* harmony import */ var _sidebar_selector__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./sidebar-selector */ "./src/components/side-bar/sidebar-selector.js");
/* harmony import */ var gatsby__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! gatsby */ "./.cache/gatsby-browser-entry.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
var SideBarContainer = /*#__PURE__*/(0,_emotion_styled_base__WEBPACK_IMPORTED_MODULE_0__["default"])(theme_ui__WEBPACK_IMPORTED_MODULE_7__.Flex, false ? 0 : {
target: "e1wqs9nw1",
label: "SideBarContainer"
})( false ? 0 : {
name: "1o5mk1d",
styles: "--side-bar-width:220px;@media screen and (min-width: 1680px){--side-bar-width:280px;}@media screen and (max-width: 848px){display:none;}",
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9vbGl2ZXJqdWhsL0Rlc2t0b3AvbWVkdXNhL2NvcmUvd3d3L3JlZmVyZW5jZS9zcmMvY29tcG9uZW50cy9zaWRlLWJhci9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFTcUMiLCJmaWxlIjoiL1VzZXJzL29saXZlcmp1aGwvRGVza3RvcC9tZWR1c2EvY29yZS93d3cvcmVmZXJlbmNlL3NyYy9jb21wb25lbnRzL3NpZGUtYmFyL2luZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0LCB7IHVzZUVmZmVjdCwgdXNlU3RhdGUgfSBmcm9tIFwicmVhY3RcIlxuaW1wb3J0IHsgRmxleCwgSW1hZ2UsIEJveCB9IGZyb20gXCJ0aGVtZS11aVwiXG5pbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIlxuaW1wb3J0IExvZ28gZnJvbSBcIi4uLy4uL2Fzc2V0cy9sb2dvLnN2Z1wiXG5pbXBvcnQgTG9nb011dGVkIGZyb20gXCIuLi8uLi9hc3NldHMvbG9nby1tdXRlZC5zdmdcIlxuaW1wb3J0IFNpZGVCYXJJdGVtIGZyb20gXCIuL3NpZGViYXItaXRlbVwiXG5pbXBvcnQgU2lkZUJhclNlbGVjdG9yIGZyb20gXCIuL3NpZGViYXItc2VsZWN0b3JcIlxuaW1wb3J0IHsgbmF2aWdhdGUgfSBmcm9tIFwiZ2F0c2J5XCJcblxuY29uc3QgU2lkZUJhckNvbnRhaW5lciA9IHN0eWxlZChGbGV4KWBcbiAgLS1zaWRlLWJhci13aWR0aDogMjIwcHg7XG5cbiAgQG1lZGlhIHNjcmVlbiBhbmQgKG1pbi13aWR0aDogMTY4MHB4KSB7XG4gICAgLS1zaWRlLWJhci13aWR0aDogMjgwcHg7XG4gIH1cblxuICBAbWVkaWEgc2NyZWVuIGFuZCAobWF4LXdpZHRoOiA4NDhweCkge1xuICAgIGRpc3BsYXk6IG5vbmU7XG4gIH1cbmBcblxuY29uc3QgU2lkZUJhckZhZGUgPSBzdHlsZWQoQm94KWBcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICB0b3A6IDA7XG4gIGxlZnQ6IDA7XG4gIHdpZHRoOiBjYWxjKHZhcigtLXNpZGUtYmFyLXdpZHRoKSAtIDFweCk7XG4gIGhlaWdodDogNTBweDtcbiAgcG9pbnRlci1ldmVudHM6IG5vbmU7XG4gIGJveC1zaGFkb3c6IGluc2V0IDAgNTBweCAyNXB4IGNhbGMoLTEgKiAyNXB4KSB3aGl0ZTtcbmBcblxuY29uc3QgU2lkZWJhciA9ICh7IGRhdGEsIGFwaSB9KSA9PiB7XG4gIGNvbnN0IFtzY3JvbGxQb3MsIHNldFNjcm9sbFBvc10gPSB1c2VTdGF0ZSgwKVxuXG4gIHVzZUVmZmVjdCgoKSA9PiB7XG4gICAgY29uc3QgbmF2ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcihcIiNuYXZcIilcblxuICAgIGNvbnN0IGhhbmRsZVNjcm9sbCA9IGUgPT4ge1xuICAgICAgY29uc3QgcG9zID0gZS5zcmNFbGVtZW50LnNjcm9sbFRvcCAvIDUwXG4gICAgICBpZiAocG9zIDwgMSkge1xuICAgICAgICBzZXRTY3JvbGxQb3MocG9zKVxuICAgICAgfVxuICAgIH1cbiAgICBuYXYuYWRkRXZlbnRMaXN0ZW5lcihcInNjcm9sbFwiLCBoYW5kbGVTY3JvbGwpXG4gICAgcmV0dXJuICgpID0+IG5hdi5yZW1vdmVFdmVudExpc3RlbmVyKFwic2Nyb2xsXCIsIGhhbmRsZVNjcm9sbClcbiAgfSwgW10pXG5cbiAgcmV0dXJuIChcbiAgICA8U2lkZUJhckNvbnRhaW5lclxuICAgICAgc3g9e3tcbiAgICAgICAgcG9zaXRpb246IFwic3RpY2t5XCIsXG4gICAgICAgIHRvcDogXCIwXCIsXG4gICAgICAgIGJvdHRvbTogXCIwXCIsXG4gICAgICAgIGhlaWdodDogXCIxMDB2aFwiLFxuICAgICAgICBiYWNrZ3JvdW5kQ29sb3I6IFwibGlnaHRcIixcbiAgICAgICAgYm94U2hhZG93OiBcInNpZGViYXJTaGFkb3dcIixcbiAgICAgICAgbWluV2lkdGg6IFwidmFyKC0tc2lkZS1iYXItd2lkdGgpXCIsXG4gICAgICAgIGZsZXhEaXJlY3Rpb246IFwiY29sdW1uXCIsXG4gICAgICB9fVxuICAgID5cbiAgICAgIDxGbGV4XG4gICAgICAgIHN4PXt7XG4gICAgICAgICAgcHg6IFwiNFwiLFxuICAgICAgICAgIHB0OiBcIjNcIixcbiAgICAgICAgICBiYWNrZ3JvdW5kOiBcImxpZ2h0XCIsXG4gICAgICAgICAgd2lkdGg6IFwiY2FsYyh2YXIoLS1zaWRlLWJhci13aWR0aCkgLSAxcHgpXCIsXG4gICAgICAgICAgZmxleERpcmVjdGlvbjogXCJjb2x1bW5cIixcbiAgICAgICAgfX1cbiAgICAgID5cbiAgICAgICAgPEZsZXg+XG4gICAgICAgICAgPEltYWdlXG4gICAgICAgICAgICBzcmM9e0xvZ299XG4gICAgICAgICAgICBhbHQ9XCJNZWR1c2EgbG9nb1wiXG4gICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiBuYXZpZ2F0ZShcIi9cIil9XG4gICAgICAgICAgICBzeD17e1xuICAgICAgICAgICAgICBoZWlnaHQ6IFwiMzJweFwiLFxuICAgICAgICAgICAgICBjdXJzb3I6IFwicG9pbnRlclwiLFxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAvPlxuICAgICAgICA8L0ZsZXg+XG4gICAgICAgIDxGbGV4IHB5PXs0fT5cbiAgICAgICAgICA8U2lkZUJhclNlbGVjdG9yIGFwaT17YXBpfSAvPlxuICAgICAgICA8L0ZsZXg+XG4gICAgICA8L0ZsZXg+XG4gICAgICA8RmxleFxuICAgICAgICBpZD1cIm5hdlwiXG4gICAgICAgIHN4PXt7XG4gICAgICAgICAgZmxleDogMSxcbiAgICAgICAgICBwb3NpdGlvbjogXCJyZWxhdGl2ZVwiLFxuICAgICAgICAgIHB4OiBcIjNcIixcbiAgICAgICAgICBwYjogXCIzXCIsXG4gICAgICAgICAgbXI6IFwiMXB4XCIsXG4gICAgICAgICAgZmxleERpcmVjdGlvbjogXCJjb2x1bW5cIixcbiAgICAgICAgICBvdmVyZmxvd1k6IFwic2Nyb2xsXCIsXG4gICAgICAgICAgcHI6IFwiNnB4XCIsXG4gICAgICAgICAgc2Nyb2xsYmFyQ29sb3I6IFwiZmFkZWQgbGlnaHRcIixcbiAgICAgICAgfX1cbiAgICAgID5cbiAgICAgICAgPFNpZGVCYXJGYWRlIG9wYWNpdHk9e3Njcm9sbFBvc30gLz5cbiAgICAgICAge2RhdGEuc2VjdGlvbnMubWFwKChzLCBpKSA9PiB7XG4gICAgICAgICAgcmV0dXJuIDxTaWRlQmFySXRlbSBpdGVtPXtzfSBrZXk9e2l9IC8+XG4gICAgICAgIH0pfVxuICAgICAgPC9GbGV4PlxuICAgICAgPEZsZXggc3g9e3sgcHk6IDQsIHB4OiA0LCBib3JkZXJUb3A6IFwiMXB4IHNvbGlkICNlZmVmZWZcIiB9fT5cbiAgICAgICAgPEltYWdlIHNyYz17TG9nb011dGVkfSBhbHQ9XCJNZWR1c2EgVHlwZVwiIHN4PXt7IGhlaWdodDogXCIxMHB4XCIgfX0gLz5cbiAgICAgIDwvRmxleD5cbiAgICA8L1NpZGVCYXJDb250YWluZXI+XG4gIClcbn1cblxuZXhwb3J0IGRlZmF1bHQgU2lkZWJhclxuIl19 */",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
});
var SideBarFade = /*#__PURE__*/(0,_emotion_styled_base__WEBPACK_IMPORTED_MODULE_0__["default"])(theme_ui__WEBPACK_IMPORTED_MODULE_7__.Box, false ? 0 : {
target: "e1wqs9nw0",
label: "SideBarFade"
})( false ? 0 : {
name: "1a70ymu",
styles: "position:absolute;top:0;left:0;width:calc(var(--side-bar-width) - 1px);height:50px;pointer-events:none;box-shadow:inset 0 50px 25px calc(-1 * 25px) white",
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9vbGl2ZXJqdWhsL0Rlc2t0b3AvbWVkdXNhL2NvcmUvd3d3L3JlZmVyZW5jZS9zcmMvY29tcG9uZW50cy9zaWRlLWJhci9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQitCIiwiZmlsZSI6Ii9Vc2Vycy9vbGl2ZXJqdWhsL0Rlc2t0b3AvbWVkdXNhL2NvcmUvd3d3L3JlZmVyZW5jZS9zcmMvY29tcG9uZW50cy9zaWRlLWJhci9pbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCwgeyB1c2VFZmZlY3QsIHVzZVN0YXRlIH0gZnJvbSBcInJlYWN0XCJcbmltcG9ydCB7IEZsZXgsIEltYWdlLCBCb3ggfSBmcm9tIFwidGhlbWUtdWlcIlxuaW1wb3J0IHN0eWxlZCBmcm9tIFwiQGVtb3Rpb24vc3R5bGVkXCJcbmltcG9ydCBMb2dvIGZyb20gXCIuLi8uLi9hc3NldHMvbG9nby5zdmdcIlxuaW1wb3J0IExvZ29NdXRlZCBmcm9tIFwiLi4vLi4vYXNzZXRzL2xvZ28tbXV0ZWQuc3ZnXCJcbmltcG9ydCBTaWRlQmFySXRlbSBmcm9tIFwiLi9zaWRlYmFyLWl0ZW1cIlxuaW1wb3J0IFNpZGVCYXJTZWxlY3RvciBmcm9tIFwiLi9zaWRlYmFyLXNlbGVjdG9yXCJcbmltcG9ydCB7IG5hdmlnYXRlIH0gZnJvbSBcImdhdHNieVwiXG5cbmNvbnN0IFNpZGVCYXJDb250YWluZXIgPSBzdHlsZWQoRmxleClgXG4gIC0tc2lkZS1iYXItd2lkdGg6IDIyMHB4O1xuXG4gIEBtZWRpYSBzY3JlZW4gYW5kIChtaW4td2lkdGg6IDE2ODBweCkge1xuICAgIC0tc2lkZS1iYXItd2lkdGg6IDI4MHB4O1xuICB9XG5cbiAgQG1lZGlhIHNjcmVlbiBhbmQgKG1heC13aWR0aDogODQ4cHgpIHtcbiAgICBkaXNwbGF5OiBub25lO1xuICB9XG5gXG5cbmNvbnN0IFNpZGVCYXJGYWRlID0gc3R5bGVkKEJveClgXG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgdG9wOiAwO1xuICBsZWZ0OiAwO1xuICB3aWR0aDogY2FsYyh2YXIoLS1zaWRlLWJhci13aWR0aCkgLSAxcHgpO1xuICBoZWlnaHQ6IDUwcHg7XG4gIHBvaW50ZXItZXZlbnRzOiBub25lO1xuICBib3gtc2hhZG93OiBpbnNldCAwIDUwcHggMjVweCBjYWxjKC0xICogMjVweCkgd2hpdGU7XG5gXG5cbmNvbnN0IFNpZGViYXIgPSAoeyBkYXRhLCBhcGkgfSkgPT4ge1xuICBjb25zdCBbc2Nyb2xsUG9zLCBzZXRTY3JvbGxQb3NdID0gdXNlU3RhdGUoMClcblxuICB1c2VFZmZlY3QoKCkgPT4ge1xuICAgIGNvbnN0IG5hdiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoXCIjbmF2XCIpXG5cbiAgICBjb25zdCBoYW5kbGVTY3JvbGwgPSBlID0+IHtcbiAgICAgIGNvbnN0IHBvcyA9IGUuc3JjRWxlbWVudC5zY3JvbGxUb3AgLyA1MFxuICAgICAgaWYgKHBvcyA8IDEpIHtcbiAgICAgICAgc2V0U2Nyb2xsUG9zKHBvcylcbiAgICAgIH1cbiAgICB9XG4gICAgbmF2LmFkZEV2ZW50TGlzdGVuZXIoXCJzY3JvbGxcIiwgaGFuZGxlU2Nyb2xsKVxuICAgIHJldHVybiAoKSA9PiBuYXYucmVtb3ZlRXZlbnRMaXN0ZW5lcihcInNjcm9sbFwiLCBoYW5kbGVTY3JvbGwpXG4gIH0sIFtdKVxuXG4gIHJldHVybiAoXG4gICAgPFNpZGVCYXJDb250YWluZXJcbiAgICAgIHN4PXt7XG4gICAgICAgIHBvc2l0aW9uOiBcInN0aWNreVwiLFxuICAgICAgICB0b3A6IFwiMFwiLFxuICAgICAgICBib3R0b206IFwiMFwiLFxuICAgICAgICBoZWlnaHQ6IFwiMTAwdmhcIixcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBcImxpZ2h0XCIsXG4gICAgICAgIGJveFNoYWRvdzogXCJzaWRlYmFyU2hhZG93XCIsXG4gICAgICAgIG1pbldpZHRoOiBcInZhcigtLXNpZGUtYmFyLXdpZHRoKVwiLFxuICAgICAgICBmbGV4RGlyZWN0aW9uOiBcImNvbHVtblwiLFxuICAgICAgfX1cbiAgICA+XG4gICAgICA8RmxleFxuICAgICAgICBzeD17e1xuICAgICAgICAgIHB4OiBcIjRcIixcbiAgICAgICAgICBwdDogXCIzXCIsXG4gICAgICAgICAgYmFja2dyb3VuZDogXCJsaWdodFwiLFxuICAgICAgICAgIHdpZHRoOiBcImNhbGModmFyKC0tc2lkZS1iYXItd2lkdGgpIC0gMXB4KVwiLFxuICAgICAgICAgIGZsZXhEaXJlY3Rpb246IFwiY29sdW1uXCIsXG4gICAgICAgIH19XG4gICAgICA+XG4gICAgICAgIDxGbGV4PlxuICAgICAgICAgIDxJbWFnZVxuICAgICAgICAgICAgc3JjPXtMb2dvfVxuICAgICAgICAgICAgYWx0PVwiTWVkdXNhIGxvZ29cIlxuICAgICAgICAgICAgb25DbGljaz17KCkgPT4gbmF2aWdhdGUoXCIvXCIpfVxuICAgICAgICAgICAgc3g9e3tcbiAgICAgICAgICAgICAgaGVpZ2h0OiBcIjMycHhcIixcbiAgICAgICAgICAgICAgY3Vyc29yOiBcInBvaW50ZXJcIixcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgLz5cbiAgICAgICAgPC9GbGV4PlxuICAgICAgICA8RmxleCBweT17NH0+XG4gICAgICAgICAgPFNpZGVCYXJTZWxlY3RvciBhcGk9e2FwaX0gLz5cbiAgICAgICAgPC9GbGV4PlxuICAgICAgPC9GbGV4PlxuICAgICAgPEZsZXhcbiAgICAgICAgaWQ9XCJuYXZcIlxuICAgICAgICBzeD17e1xuICAgICAgICAgIGZsZXg6IDEsXG4gICAgICAgICAgcG9zaXRpb246IFwicmVsYXRpdmVcIixcbiAgICAgICAgICBweDogXCIzXCIsXG4gICAgICAgICAgcGI6IFwiM1wiLFxuICAgICAgICAgIG1yOiBcIjFweFwiLFxuICAgICAgICAgIGZsZXhEaXJlY3Rpb246IFwiY29sdW1uXCIsXG4gICAgICAgICAgb3ZlcmZsb3dZOiBcInNjcm9sbFwiLFxuICAgICAgICAgIHByOiBcIjZweFwiLFxuICAgICAgICAgIHNjcm9sbGJhckNvbG9yOiBcImZhZGVkIGxpZ2h0XCIsXG4gICAgICAgIH19XG4gICAgICA+XG4gICAgICAgIDxTaWRlQmFyRmFkZSBvcGFjaXR5PXtzY3JvbGxQb3N9IC8+XG4gICAgICAgIHtkYXRhLnNlY3Rpb25zLm1hcCgocywgaSkgPT4ge1xuICAgICAgICAgIHJldHVybiA8U2lkZUJhckl0ZW0gaXRlbT17c30ga2V5PXtpfSAvPlxuICAgICAgICB9KX1cbiAgICAgIDwvRmxleD5cbiAgICAgIDxGbGV4IHN4PXt7IHB5OiA0LCBweDogNCwgYm9yZGVyVG9wOiBcIjFweCBzb2xpZCAjZWZlZmVmXCIgfX0+XG4gICAgICAgIDxJbWFnZSBzcmM9e0xvZ29NdXRlZH0gYWx0PVwiTWVkdXNhIFR5cGVcIiBzeD17eyBoZWlnaHQ6IFwiMTBweFwiIH19IC8+XG4gICAgICA8L0ZsZXg+XG4gICAgPC9TaWRlQmFyQ29udGFpbmVyPlxuICApXG59XG5cbmV4cG9ydCBkZWZhdWx0IFNpZGViYXJcbiJdfQ== */",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
});
var Sidebar = function Sidebar(_ref) {
var data = _ref.data,
api = _ref.api;
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0),
scrollPos = _useState[0],
setScrollPos = _useState[1];
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
var nav = document.querySelector("#nav");
var handleScroll = function handleScroll(e) {
var pos = e.srcElement.scrollTop / 50;
if (pos < 1) {
setScrollPos(pos);
}
};
nav.addEventListener("scroll", handleScroll);
return function () {
return nav.removeEventListener("scroll", handleScroll);
};
}, []);
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_8__.jsx)(SideBarContainer, {
sx: {
position: "sticky",
top: "0",
bottom: "0",
height: "100vh",
backgroundColor: "light",
boxShadow: "sidebarShadow",
minWidth: "var(--side-bar-width)",
flexDirection: "column"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_8__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_7__.Flex, {
sx: {
px: "4",
pt: "3",
background: "light",
width: "calc(var(--side-bar-width) - 1px)",
flexDirection: "column"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_8__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_7__.Flex, null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_8__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_7__.Image, {
src: _assets_logo_svg__WEBPACK_IMPORTED_MODULE_2__["default"],
alt: "Medusa logo",
onClick: function onClick() {
return (0,gatsby__WEBPACK_IMPORTED_MODULE_6__.navigate)("/");
},
sx: {
height: "32px",
cursor: "pointer"
}
})), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_8__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_7__.Flex, {
py: 4
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_8__.jsx)(_sidebar_selector__WEBPACK_IMPORTED_MODULE_5__["default"], {
api: api
}))), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_8__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_7__.Flex, {
id: "nav",
sx: {
flex: 1,
position: "relative",
px: "3",
pb: "3",
mr: "1px",
flexDirection: "column",
overflowY: "scroll",
pr: "6px",
scrollbarColor: "faded light"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_8__.jsx)(SideBarFade, {
opacity: scrollPos
}), data.sections.map(function (s, i) {
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_8__.jsx)(_sidebar_item__WEBPACK_IMPORTED_MODULE_4__["default"], {
item: s,
key: i
});
})), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_8__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_7__.Flex, {
sx: {
py: 4,
px: 4,
borderTop: "1px solid #efefef"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_8__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_7__.Image, {
src: _assets_logo_muted_svg__WEBPACK_IMPORTED_MODULE_3__["default"],
alt: "Medusa Type",
sx: {
height: "10px"
}
})));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Sidebar);
/***/ }),
/***/ "./src/components/side-bar/sidebar-item.js":
/*!*************************************************!*\
!*** ./src/components/side-bar/sidebar-item.js ***!
\*************************************************/
/***/ ((__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 _emotion_styled_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/styled/base */ "./node_modules/@emotion/styled/base/dist/emotion-styled-base.esm.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var react_collapsible__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-collapsible */ "./node_modules/react-collapsible/dist/index.js");
/* harmony import */ var react_collapsible__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_collapsible__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var theme_ui__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! theme-ui */ "./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js");
/* harmony import */ var _utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/convert-to-kebab-case */ "./src/utils/convert-to-kebab-case.js");
/* harmony import */ var _icons_chevron_down__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../icons/chevron-down */ "./src/components/icons/chevron-down.js");
/* harmony import */ var _context_navigation_context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../context/navigation-context */ "./src/context/navigation-context.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
var StyledCollapsible = /*#__PURE__*/(0,_emotion_styled_base__WEBPACK_IMPORTED_MODULE_0__["default"])((react_collapsible__WEBPACK_IMPORTED_MODULE_2___default()), false ? 0 : {
target: "e1wnp6kk1",
label: "StyledCollapsible"
})( false ? 0 : {
name: "pr10xp",
styles: "margin-bottom:10px",
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9vbGl2ZXJqdWhsL0Rlc2t0b3AvbWVkdXNhL2NvcmUvd3d3L3JlZmVyZW5jZS9zcmMvY29tcG9uZW50cy9zaWRlLWJhci9zaWRlYmFyLWl0ZW0uanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBUTZDIiwiZmlsZSI6Ii9Vc2Vycy9vbGl2ZXJqdWhsL0Rlc2t0b3AvbWVkdXNhL2NvcmUvd3d3L3JlZmVyZW5jZS9zcmMvY29tcG9uZW50cy9zaWRlLWJhci9zaWRlYmFyLWl0ZW0uanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QsIHsgdXNlQ29udGV4dCB9IGZyb20gXCJyZWFjdFwiXG5pbXBvcnQgQ29sbGFwc2libGUgZnJvbSBcInJlYWN0LWNvbGxhcHNpYmxlXCJcbmltcG9ydCB7IEZsZXgsIEJveCwgVGV4dCB9IGZyb20gXCJ0aGVtZS11aVwiXG5pbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIlxuaW1wb3J0IHsgY29udmVydFRvS2ViYWJDYXNlIH0gZnJvbSBcIi4uLy4uL3V0aWxzL2NvbnZlcnQtdG8ta2ViYWItY2FzZVwiXG5pbXBvcnQgQ2hldnJvbkRvd24gZnJvbSBcIi4uL2ljb25zL2NoZXZyb24tZG93blwiXG5pbXBvcnQgTmF2aWdhdGlvbkNvbnRleHQgZnJvbSBcIi4uLy4uL2NvbnRleHQvbmF2aWdhdGlvbi1jb250ZXh0XCJcblxuY29uc3QgU3R5bGVkQ29sbGFwc2libGUgPSBzdHlsZWQoQ29sbGFwc2libGUpYFxuICBtYXJnaW4tYm90dG9tOiAxMHB4O1xuYFxuXG5jb25zdCBDb250YWluZXIgPSBzdHlsZWQoQm94KWBcbiAgZGl2LkNvbGxhcHNpYmxlIHNwYW4uQ29sbGFwc2libGVfX3RyaWdnZXIuaXMtb3BlbiB7XG4gICAgc3ZnIHtcbiAgICAgIHRyYW5zZm9ybTogcm90YXRlKDE4MGRlZyk7XG4gICAgfVxuICB9XG5gXG5cbmNvbnN0IFNpZGVCYXJJdGVtID0gKHsgaXRlbSB9KSA9PiB7XG4gIGNvbnN0IHtcbiAgICBvcGVuU2VjdGlvbixcbiAgICBvcGVuU2VjdGlvbnMsXG4gICAgY3VycmVudEhhc2gsXG4gICAgY3VycmVudFNlY3Rpb24sXG4gICAgZ29UbyxcbiAgfSA9IHVzZUNvbnRleHQoTmF2aWdhdGlvbkNvbnRleHQpXG4gIGNvbnN0IHsgc2VjdGlvbiB9ID0gaXRlbVxuICBjb25zdCBzdWJJdGVtcyA9IHNlY3Rpb24ucGF0aHNcbiAgICAubWFwKHAgPT4ge1xuICAgICAgcmV0dXJuIHAubWV0aG9kc1xuICAgIH0pXG4gICAgLnJlZHVjZSgocHJlLCBjdXIpID0+IHtcbiAgICAgIHJldHVybiBwcmUuY29uY2F0KGN1cilcbiAgICB9KVxuICAgIC5tYXAobSA9PiB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICB0aXRsZTogbS5zdW1tYXJ5LFxuICAgICAgICBwYXRoOiBjb252ZXJ0VG9LZWJhYkNhc2UobS5zdW1tYXJ5KSxcbiAgICAgIH1cbiAgICB9KVxuXG4gIGNvbnN0IGhhbmRsZUNsaWNrID0gKCkgPT4ge1xuICAgIGNvbnN0IGlkID0gY29udmVydFRvS2ViYWJDYXNlKHNlY3Rpb24uc2VjdGlvbl9uYW1lKVxuICAgIGNvbnN0IGVsZW1lbnQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKGAjJHtpZH1gKVxuICAgIGlmIChlbGVtZW50KSB7XG4gICAgICBlbGVtZW50LnNjcm9sbEludG9WaWV3KClcbiAgICAgIGlmICghb3BlblNlY3Rpb25zLmluY2x1ZGVzKGlkKSkge1xuICAgICAgICBvcGVuU2VjdGlvbihpZClcbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICBjb25zdCBoYW5kbGVTdWJDbGljayA9IHBhdGggPT4ge1xuICAgIGNvbnN0IGlkID0gY29udmVydFRvS2ViYWJDYXNlKHNlY3Rpb24uc2VjdGlvbl9uYW1lKVxuICAgIGdvVG8oeyBzZWN0aW9uOiBpZCwgbWV0aG9kOiBwYXRoIH0pXG4gIH1cblxuICByZXR1cm4gKFxuICAgIDxDb250YWluZXIgaWQ9e2BuYXYtJHtjb252ZXJ0VG9LZWJhYkNhc2Uoc2VjdGlvbi5zZWN0aW9uX25hbWUpfWB9PlxuICAgICAgPFN0eWxlZENvbGxhcHNpYmxlXG4gICAgICAgIHRyaWdnZXI9e1xuICAgICAgICAgIDxGbGV4XG4gICAgICAgICAgICBzeD17e1xuICAgICAgICAgICAgICBmb250U2l6ZTogXCIxXCIsXG4gICAgICAgICAgICAgIHBsOiBcIjE2cHhcIixcbiAgICAgICAgICAgICAgcHI6IFwiMTBweFwiLFxuICAgICAgICAgICAgICBhbGlnbkl0ZW1zOiBcImNlbnRlclwiLFxuICAgICAgICAgICAgICBib3JkZXJSYWRpdXM6IFwic21hbGxcIixcbiAgICAgICAgICAgICAgY3Vyc29yOiBcInBvaW50ZXJcIixcbiAgICAgICAgICAgICAgbXI6IFwiNHB4XCIsXG4gICAgICAgICAgICAgIG1iOiBcIjVweFwiLFxuICAgICAgICAgICAgICBoZWlnaHQ6IFwiMjVweFwiLFxuICAgICAgICAgICAgICBqdXN0aWZ5Q29udGVudDogXCJzcGFjZS1iZXR3ZWVuXCIsXG4gICAgICAgICAgICAgIFwiJjpob3ZlciwgJi5hY3RpdmVcIjoge1xuICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogXCJmYWRlZFwiLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAgIGNsYXNzTmFtZT17XG4gICAgICAgICAgICAgIGN1cnJlbnRTZWN0aW9uID09PSBjb252ZXJ0VG9LZWJhYkNhc2Uoc2VjdGlvbi5zZWN0aW9uX25hbWUpXG4gICAgICAgICAgICAgICAgPyBcImFjdGl2ZVwiXG4gICAgICAgICAgICAgICAgOiBudWxsXG4gICAgICAgICAgICB9XG4gICAgICAgICAgPlxuICAgICAgICAgICAge3NlY3Rpb24uc2VjdGlvbl9uYW1lfSA8Q2hldnJvbkRvd24gLz5cbiAgICAgICAgICA8L0ZsZXg+XG4gICAgICAgIH1cbiAgICAgICAgb3Blbj17XG4gICAgICAgICAgY3VycmVudFNlY3Rpb24gPT09IGNvbnZlcnRUb0tlYmFiQ2FzZShzZWN0aW9uLnNlY3Rpb25fbmFtZSkgfHxcbiAgICAgICAgICBvcGVuU2VjdGlvbnMuaW5jbHVkZXMoY29udmVydFRvS2ViYWJDYXNlKHNlY3Rpb24uc2VjdGlvbl9uYW1lKSlcbiAgICAgICAgfVxuICAgICAgICBvblRyaWdnZXJPcGVuaW5nPXtoYW5kbGVDbGlja31cbiAgICAgICAgdHJhbnNpdGlvblRpbWU9ezF9XG4gICAgICA+XG4gICAgICAgIHtzdWJJdGVtcy5tYXAoKHNpLCBpKSA9PiB7XG4gICAgICAgICAgY29uc3QgcGF0aCA9IGNvbnZlcnRUb0tlYmFiQ2FzZShzaS5wYXRoKVxuICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8RmxleFxuICAgICAgICAgICAgICBrZXk9e2l9XG4gICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3VycmVudEhhc2ggPT09IHBhdGggPyBcImFjdGl2ZVwiIDogbnVsbH1cbiAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4gaGFuZGxlU3ViQ2xpY2socGF0aCl9XG4gICAgICAgICAgICAgIGlkPXtgbmF2LSR7cGF0aH1gfVxuICAgICAgICAgICAgICBzeD17e1xuICAgICAgICAgICAgICAgIG1sOiBcIjEwcHhcIixcbiAgICAgICAgICAgICAgICBwbDogXCIxMHB4XCIsXG4gICAgICAgICAgICAgICAgcHI6IFwiMTBweFwiLFxuICAgICAgICAgICAgICAgIGFsaWduSXRlbXM6IFwiY2VudGVyXCIsXG4gICAgICAgICAgICAgICAgYm9yZGVyUmFkaXVzOiBcInNtYWxsXCIsXG4gICAgICAgICAgICAgICAgY3Vyc29yOiBcInBvaW50ZXJcIixcbiAgICAgICAgICAgICAgICBtYjogXCI4cHhcIixcbiAgICAgICAgICAgICAgICB0ZXh0RGVjb3JhdGlvbjogXCJub25lXCIsXG4gICAgICAgICAgICAgICAgY29sb3I6IFwiYmxhY2tcIixcbiAgICAgICAgICAgICAgICBoZWlnaHQ6IFwiMjVweFwiLFxuICAgICAgICAgICAgICAgIFwiJjpob3ZlclwiOiB7XG4gICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kQ29sb3I6IFwiZmFkZWRcIixcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIFwiJi5hY3RpdmVcIjoge1xuICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZENvbG9yOiBcImZhZGVkXCIsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgPFRleHRcbiAgICAgICAgICAgICAgICBzeD17e1xuICAgICAgICAgICAgICAgICAgZm9udFNpemU6IFwiMFwiLFxuICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICB7c2kudGl0bGV9XG4gICAgICAgICAgICAgIDwvVGV4dD5cbiAgICAgICAgICAgIDwvRmxleD5cbiAgICAgICAgICApXG4gICAgICAgIH0pfVxuICAgICAgPC9TdHlsZWRDb2xsYXBzaWJsZT5cbiAgICA8L0NvbnRhaW5lcj5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBTaWRlQmFySXRlbVxuIl19 */",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
});
var Container = /*#__PURE__*/(0,_emotion_styled_base__WEBPACK_IMPORTED_MODULE_0__["default"])(theme_ui__WEBPACK_IMPORTED_MODULE_6__.Box, false ? 0 : {
target: "e1wnp6kk0",
label: "Container"
})( false ? 0 : {
name: "1n8ck1",
styles: "div.Collapsible span.Collapsible__trigger.is-open{svg{transform:rotate(180deg);}}",
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9vbGl2ZXJqdWhsL0Rlc2t0b3AvbWVkdXNhL2NvcmUvd3d3L3JlZmVyZW5jZS9zcmMvY29tcG9uZW50cy9zaWRlLWJhci9zaWRlYmFyLWl0ZW0uanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBWTZCIiwiZmlsZSI6Ii9Vc2Vycy9vbGl2ZXJqdWhsL0Rlc2t0b3AvbWVkdXNhL2NvcmUvd3d3L3JlZmVyZW5jZS9zcmMvY29tcG9uZW50cy9zaWRlLWJhci9zaWRlYmFyLWl0ZW0uanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QsIHsgdXNlQ29udGV4dCB9IGZyb20gXCJyZWFjdFwiXG5pbXBvcnQgQ29sbGFwc2libGUgZnJvbSBcInJlYWN0LWNvbGxhcHNpYmxlXCJcbmltcG9ydCB7IEZsZXgsIEJveCwgVGV4dCB9IGZyb20gXCJ0aGVtZS11aVwiXG5pbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIlxuaW1wb3J0IHsgY29udmVydFRvS2ViYWJDYXNlIH0gZnJvbSBcIi4uLy4uL3V0aWxzL2NvbnZlcnQtdG8ta2ViYWItY2FzZVwiXG5pbXBvcnQgQ2hldnJvbkRvd24gZnJvbSBcIi4uL2ljb25zL2NoZXZyb24tZG93blwiXG5pbXBvcnQgTmF2aWdhdGlvbkNvbnRleHQgZnJvbSBcIi4uLy4uL2NvbnRleHQvbmF2aWdhdGlvbi1jb250ZXh0XCJcblxuY29uc3QgU3R5bGVkQ29sbGFwc2libGUgPSBzdHlsZWQoQ29sbGFwc2libGUpYFxuICBtYXJnaW4tYm90dG9tOiAxMHB4O1xuYFxuXG5jb25zdCBDb250YWluZXIgPSBzdHlsZWQoQm94KWBcbiAgZGl2LkNvbGxhcHNpYmxlIHNwYW4uQ29sbGFwc2libGVfX3RyaWdnZXIuaXMtb3BlbiB7XG4gICAgc3ZnIHtcbiAgICAgIHRyYW5zZm9ybTogcm90YXRlKDE4MGRlZyk7XG4gICAgfVxuICB9XG5gXG5cbmNvbnN0IFNpZGVCYXJJdGVtID0gKHsgaXRlbSB9KSA9PiB7XG4gIGNvbnN0IHtcbiAgICBvcGVuU2VjdGlvbixcbiAgICBvcGVuU2VjdGlvbnMsXG4gICAgY3VycmVudEhhc2gsXG4gICAgY3VycmVudFNlY3Rpb24sXG4gICAgZ29UbyxcbiAgfSA9IHVzZUNvbnRleHQoTmF2aWdhdGlvbkNvbnRleHQpXG4gIGNvbnN0IHsgc2VjdGlvbiB9ID0gaXRlbVxuICBjb25zdCBzdWJJdGVtcyA9IHNlY3Rpb24ucGF0aHNcbiAgICAubWFwKHAgPT4ge1xuICAgICAgcmV0dXJuIHAubWV0aG9kc1xuICAgIH0pXG4gICAgLnJlZHVjZSgocHJlLCBjdXIpID0+IHtcbiAgICAgIHJldHVybiBwcmUuY29uY2F0KGN1cilcbiAgICB9KVxuICAgIC5tYXAobSA9PiB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICB0aXRsZTogbS5zdW1tYXJ5LFxuICAgICAgICBwYXRoOiBjb252ZXJ0VG9LZWJhYkNhc2UobS5zdW1tYXJ5KSxcbiAgICAgIH1cbiAgICB9KVxuXG4gIGNvbnN0IGhhbmRsZUNsaWNrID0gKCkgPT4ge1xuICAgIGNvbnN0IGlkID0gY29udmVydFRvS2ViYWJDYXNlKHNlY3Rpb24uc2VjdGlvbl9uYW1lKVxuICAgIGNvbnN0IGVsZW1lbnQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKGAjJHtpZH1gKVxuICAgIGlmIChlbGVtZW50KSB7XG4gICAgICBlbGVtZW50LnNjcm9sbEludG9WaWV3KClcbiAgICAgIGlmICghb3BlblNlY3Rpb25zLmluY2x1ZGVzKGlkKSkge1xuICAgICAgICBvcGVuU2VjdGlvbihpZClcbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICBjb25zdCBoYW5kbGVTdWJDbGljayA9IHBhdGggPT4ge1xuICAgIGNvbnN0IGlkID0gY29udmVydFRvS2ViYWJDYXNlKHNlY3Rpb24uc2VjdGlvbl9uYW1lKVxuICAgIGdvVG8oeyBzZWN0aW9uOiBpZCwgbWV0aG9kOiBwYXRoIH0pXG4gIH1cblxuICByZXR1cm4gKFxuICAgIDxDb250YWluZXIgaWQ9e2BuYXYtJHtjb252ZXJ0VG9LZWJhYkNhc2Uoc2VjdGlvbi5zZWN0aW9uX25hbWUpfWB9PlxuICAgICAgPFN0eWxlZENvbGxhcHNpYmxlXG4gICAgICAgIHRyaWdnZXI9e1xuICAgICAgICAgIDxGbGV4XG4gICAgICAgICAgICBzeD17e1xuICAgICAgICAgICAgICBmb250U2l6ZTogXCIxXCIsXG4gICAgICAgICAgICAgIHBsOiBcIjE2cHhcIixcbiAgICAgICAgICAgICAgcHI6IFwiMTBweFwiLFxuICAgICAgICAgICAgICBhbGlnbkl0ZW1zOiBcImNlbnRlclwiLFxuICAgICAgICAgICAgICBib3JkZXJSYWRpdXM6IFwic21hbGxcIixcbiAgICAgICAgICAgICAgY3Vyc29yOiBcInBvaW50ZXJcIixcbiAgICAgICAgICAgICAgbXI6IFwiNHB4XCIsXG4gICAgICAgICAgICAgIG1iOiBcIjVweFwiLFxuICAgICAgICAgICAgICBoZWlnaHQ6IFwiMjVweFwiLFxuICAgICAgICAgICAgICBqdXN0aWZ5Q29udGVudDogXCJzcGFjZS1iZXR3ZWVuXCIsXG4gICAgICAgICAgICAgIFwiJjpob3ZlciwgJi5hY3RpdmVcIjoge1xuICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogXCJmYWRlZFwiLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfX1cbiAgICAgICAgICAgIGNsYXNzTmFtZT17XG4gICAgICAgICAgICAgIGN1cnJlbnRTZWN0aW9uID09PSBjb252ZXJ0VG9LZWJhYkNhc2Uoc2VjdGlvbi5zZWN0aW9uX25hbWUpXG4gICAgICAgICAgICAgICAgPyBcImFjdGl2ZVwiXG4gICAgICAgICAgICAgICAgOiBudWxsXG4gICAgICAgICAgICB9XG4gICAgICAgICAgPlxuICAgICAgICAgICAge3NlY3Rpb24uc2VjdGlvbl9uYW1lfSA8Q2hldnJvbkRvd24gLz5cbiAgICAgICAgICA8L0ZsZXg+XG4gICAgICAgIH1cbiAgICAgICAgb3Blbj17XG4gICAgICAgICAgY3VycmVudFNlY3Rpb24gPT09IGNvbnZlcnRUb0tlYmFiQ2FzZShzZWN0aW9uLnNlY3Rpb25fbmFtZSkgfHxcbiAgICAgICAgICBvcGVuU2VjdGlvbnMuaW5jbHVkZXMoY29udmVydFRvS2ViYWJDYXNlKHNlY3Rpb24uc2VjdGlvbl9uYW1lKSlcbiAgICAgICAgfVxuICAgICAgICBvblRyaWdnZXJPcGVuaW5nPXtoYW5kbGVDbGlja31cbiAgICAgICAgdHJhbnNpdGlvblRpbWU9ezF9XG4gICAgICA+XG4gICAgICAgIHtzdWJJdGVtcy5tYXAoKHNpLCBpKSA9PiB7XG4gICAgICAgICAgY29uc3QgcGF0aCA9IGNvbnZlcnRUb0tlYmFiQ2FzZShzaS5wYXRoKVxuICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8RmxleFxuICAgICAgICAgICAgICBrZXk9e2l9XG4gICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3VycmVudEhhc2ggPT09IHBhdGggPyBcImFjdGl2ZVwiIDogbnVsbH1cbiAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4gaGFuZGxlU3ViQ2xpY2socGF0aCl9XG4gICAgICAgICAgICAgIGlkPXtgbmF2LSR7cGF0aH1gfVxuICAgICAgICAgICAgICBzeD17e1xuICAgICAgICAgICAgICAgIG1sOiBcIjEwcHhcIixcbiAgICAgICAgICAgICAgICBwbDogXCIxMHB4XCIsXG4gICAgICAgICAgICAgICAgcHI6IFwiMTBweFwiLFxuICAgICAgICAgICAgICAgIGFsaWduSXRlbXM6IFwiY2VudGVyXCIsXG4gICAgICAgICAgICAgICAgYm9yZGVyUmFkaXVzOiBcInNtYWxsXCIsXG4gICAgICAgICAgICAgICAgY3Vyc29yOiBcInBvaW50ZXJcIixcbiAgICAgICAgICAgICAgICBtYjogXCI4cHhcIixcbiAgICAgICAgICAgICAgICB0ZXh0RGVjb3JhdGlvbjogXCJub25lXCIsXG4gICAgICAgICAgICAgICAgY29sb3I6IFwiYmxhY2tcIixcbiAgICAgICAgICAgICAgICBoZWlnaHQ6IFwiMjVweFwiLFxuICAgICAgICAgICAgICAgIFwiJjpob3ZlclwiOiB7XG4gICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kQ29sb3I6IFwiZmFkZWRcIixcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIFwiJi5hY3RpdmVcIjoge1xuICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZENvbG9yOiBcImZhZGVkXCIsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgPFRleHRcbiAgICAgICAgICAgICAgICBzeD17e1xuICAgICAgICAgICAgICAgICAgZm9udFNpemU6IFwiMFwiLFxuICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICB7c2kudGl0bGV9XG4gICAgICAgICAgICAgIDwvVGV4dD5cbiAgICAgICAgICAgIDwvRmxleD5cbiAgICAgICAgICApXG4gICAgICAgIH0pfVxuICAgICAgPC9TdHlsZWRDb2xsYXBzaWJsZT5cbiAgICA8L0NvbnRhaW5lcj5cbiAgKVxufVxuXG5leHBvcnQgZGVmYXVsdCBTaWRlQmFySXRlbVxuIl19 */",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
});
var SideBarItem = function SideBarItem(_ref) {
var item = _ref.item;
var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(_context_navigation_context__WEBPACK_IMPORTED_MODULE_5__["default"]),
openSection = _useContext.openSection,
openSections = _useContext.openSections,
currentHash = _useContext.currentHash,
currentSection = _useContext.currentSection,
goTo = _useContext.goTo;
var section = item.section;
var subItems = section.paths.map(function (p) {
return p.methods;
}).reduce(function (pre, cur) {
return pre.concat(cur);
}).map(function (m) {
return {
title: m.summary,
path: (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_3__.convertToKebabCase)(m.summary)
};
});
var handleClick = function handleClick() {
var id = (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_3__.convertToKebabCase)(section.section_name);
var element = document.querySelector("#" + id);
if (element) {
element.scrollIntoView();
if (!openSections.includes(id)) {
openSection(id);
}
}
};
var handleSubClick = function handleSubClick(path) {
var id = (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_3__.convertToKebabCase)(section.section_name);
goTo({
section: id,
method: path
});
};
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_7__.jsx)(Container, {
id: "nav-" + (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_3__.convertToKebabCase)(section.section_name)
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_7__.jsx)(StyledCollapsible, {
trigger: (0,_emotion_react__WEBPACK_IMPORTED_MODULE_7__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_6__.Flex, {
sx: {
fontSize: "1",
pl: "16px",
pr: "10px",
alignItems: "center",
borderRadius: "small",
cursor: "pointer",
mr: "4px",
mb: "5px",
height: "25px",
justifyContent: "space-between",
"&:hover, &.active": {
backgroundColor: "faded"
}
},
className: currentSection === (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_3__.convertToKebabCase)(section.section_name) ? "active" : null
}, section.section_name, " ", (0,_emotion_react__WEBPACK_IMPORTED_MODULE_7__.jsx)(_icons_chevron_down__WEBPACK_IMPORTED_MODULE_4__["default"], null)),
open: currentSection === (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_3__.convertToKebabCase)(section.section_name) || openSections.includes((0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_3__.convertToKebabCase)(section.section_name)),
onTriggerOpening: handleClick,
transitionTime: 1
}, subItems.map(function (si, i) {
var path = (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_3__.convertToKebabCase)(si.path);
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_7__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_6__.Flex, {
key: i,
className: currentHash === path ? "active" : null,
onClick: function onClick() {
return handleSubClick(path);
},
id: "nav-" + path,
sx: {
ml: "10px",
pl: "10px",
pr: "10px",
alignItems: "center",
borderRadius: "small",
cursor: "pointer",
mb: "8px",
textDecoration: "none",
color: "black",
height: "25px",
"&:hover": {
backgroundColor: "faded"
},
"&.active": {
backgroundColor: "faded"
}
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_7__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_6__.Text, {
sx: {
fontSize: "0"
}
}, si.title));
})));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SideBarItem);
/***/ }),
/***/ "./src/components/side-bar/sidebar-selector.js":
/*!*****************************************************!*\
!*** ./src/components/side-bar/sidebar-selector.js ***!
\*****************************************************/
/***/ ((__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__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var theme_ui__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! theme-ui */ "./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js");
/* harmony import */ var gatsby_link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! gatsby-link */ "./node_modules/gatsby-link/index.js");
/* harmony import */ var _context_navigation_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../context/navigation-context */ "./src/context/navigation-context.js");
/* harmony import */ var _icons_chevron_down__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../icons/chevron-down */ "./src/components/icons/chevron-down.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
var SideBarSelector = function SideBarSelector(_ref) {
var api = _ref.api;
var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_navigation_context__WEBPACK_IMPORTED_MODULE_2__["default"]),
reset = _useContext.reset;
var handleSelect = function handleSelect(e) {
reset();
(0,gatsby_link__WEBPACK_IMPORTED_MODULE_1__.navigate)("/api/" + e.target.value);
};
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Flex, {
sx: {
marginLeft: "-16px",
marginRight: "-10px",
width: "calc(100% + 26px)",
"& div": {
width: "100%"
}
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(theme_ui__WEBPACK_IMPORTED_MODULE_5__.Select, {
arrow: (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)(_icons_chevron_down__WEBPACK_IMPORTED_MODULE_3__["default"], {
fill: "dark",
styles: {
ml: "-28px"
}
}),
sx: {
paddingLeft: "16px",
marginRight: "-5px",
borderRadius: "small",
borderColor: "faded",
width: "100%",
fontSize: "1",
fontFamily: "body",
transition: "all .1s ease-in-out",
"&:focus": {
outline: "none !important"
},
boxShadow: "ctaBoxShadow",
"&:hover": {
boxShadow: "buttonBoxShadowHover"
}
},
value: api,
onChange: handleSelect
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)("option", {
value: "admin"
}, "Admin"), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_4__.jsx)("option", {
value: "store"
}, "Storefront")));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SideBarSelector);
/***/ }),
/***/ "./src/components/topbar.js":
/*!**********************************!*\
!*** ./src/components/topbar.js ***!
\**********************************/
/***/ ((__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 _theme_ui_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @theme-ui/components */ "./node_modules/@theme-ui/components/dist/theme-ui-components.esm.js");
/* harmony import */ var gatsby_link__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! gatsby-link */ "./node_modules/gatsby-link/index.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _components_icons_github__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/icons/github */ "./src/components/icons/github.js");
/* harmony import */ var _context_navigation_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../context/navigation-context */ "./src/context/navigation-context.js");
/* harmony import */ var _utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/convert-to-kebab-case */ "./src/utils/convert-to-kebab-case.js");
/* harmony import */ var _icons_chevron_down__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./icons/chevron-down */ "./src/components/icons/chevron-down.js");
/* harmony import */ var _search__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./search */ "./src/components/search/index.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
var Topbar = function Topbar(_ref) {
var data = _ref.data,
api = _ref.api;
var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(_context_navigation_context__WEBPACK_IMPORTED_MODULE_3__["default"]),
goTo = _useContext.goTo,
reset = _useContext.reset,
currentSection = _useContext.currentSection;
var handleChange = function handleChange(e) {
var parts = e.target.value.split(" ");
if (parts[0] === api) {
goTo({
section: parts[1]
});
} else {
reset();
(0,gatsby_link__WEBPACK_IMPORTED_MODULE_0__.navigate)("/api/" + (api === "admin" ? "store" : "admin"));
}
};
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_7__.jsx)(_theme_ui_components__WEBPACK_IMPORTED_MODULE_8__.Flex, {
sx: {
justifyContent: "space-between",
alignItems: "center",
width: "100%",
px: "5vw",
height: "headerHeight",
boxShadow: "topbarShadow",
"@media screen and (max-width: 848px)": {
position: "fixed",
top: "0",
left: "0",
right: "0",
zIndex: "100",
backgroundColor: "light"
}
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_7__.jsx)(_theme_ui_components__WEBPACK_IMPORTED_MODULE_8__.Box, null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_7__.jsx)(_theme_ui_components__WEBPACK_IMPORTED_MODULE_8__.Box, {
sx: {
display: "none",
alignItems: "center",
"@media screen and (max-width: 848px)": {
display: "block"
}
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_7__.jsx)(_theme_ui_components__WEBPACK_IMPORTED_MODULE_8__.Select, {
arrow: (0,_emotion_react__WEBPACK_IMPORTED_MODULE_7__.jsx)(_icons_chevron_down__WEBPACK_IMPORTED_MODULE_5__["default"], {
fill: "dark"
}),
sx: {
border: "none",
width: "100%",
fontSize: "2",
fontFamily: "body",
fontWeight: "500",
flexGrow: "1",
px: "0",
backgroundColor: "light",
transition: "all .1s ease-in-out",
"&:focus": {
outline: "none !important"
}
},
onChange: handleChange,
value: api + " " + currentSection
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_7__.jsx)("optgroup", {
label: "" + api.slice(0, 1).toUpperCase() + api.slice(1)
}, data.sections.map(function (s, i) {
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_7__.jsx)("option", {
key: i,
value: api + " " + (0,_utils_convert_to_kebab_case__WEBPACK_IMPORTED_MODULE_4__.convertToKebabCase)(s.section.section_name)
}, s.section.section_name);
})), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_7__.jsx)("optgroup", {
label: api === "admin" ? "Store" : "Admin"
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_7__.jsx)("option", null, "Go to " + (api === "admin" ? "Storefront API" : "Admin API")))))), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_7__.jsx)(_theme_ui_components__WEBPACK_IMPORTED_MODULE_8__.Flex, {
sx: {
alignItems: "center",
maxWidth: "400px",
flexGrow: "1",
justifyContent: "flex-end"
}
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_7__.jsx)(_theme_ui_components__WEBPACK_IMPORTED_MODULE_8__.Link, {
variant: "topbar",
mr: 3,
href: "https://docs.medusajs.com"
}, "Docs"), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_7__.jsx)(_theme_ui_components__WEBPACK_IMPORTED_MODULE_8__.Link, {
sx: {
pt: "4px"
},
variant: "topbar",
href: "https://github.com/medusajs/medusa"
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_7__.jsx)(_components_icons_github__WEBPACK_IMPORTED_MODULE_2__["default"], null)), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_7__.jsx)(_search__WEBPACK_IMPORTED_MODULE_6__["default"], null)));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Topbar);
/***/ }),
/***/ "./src/context/navigation-context.js":
/*!*******************************************!*\
!*** ./src/context/navigation-context.js ***!
\*******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "defaultNavigationContext": () => (/* binding */ defaultNavigationContext),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
/* harmony export */ "NavigationProvider": () => (/* binding */ NavigationProvider)
/* harmony export */ });
/* harmony import */ var _babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _utils_check_display__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/check-display */ "./src/utils/check-display.js");
/* harmony import */ var _utils_scroll_parent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/scroll-parent */ "./src/utils/scroll-parent.js");
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./types */ "./src/context/types.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
var defaultNavigationContext = {
api: "null",
setApi: function setApi() {},
currentSection: null,
updateSection: function updateSection() {},
currentHash: null,
updateHash: function updateHash() {},
openSections: [],
openSection: function openSection() {},
metadata: null,
updateMetadata: function updateMetadata() {},
reset: function reset() {}
};
var NavigationContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createContext(defaultNavigationContext);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NavigationContext);
var reducer = function reducer(state, action) {
switch (action.type) {
case _types__WEBPACK_IMPORTED_MODULE_5__["default"].SET_API:
{
return Object.assign({}, state, {
api: action.payload
});
}
case _types__WEBPACK_IMPORTED_MODULE_5__["default"].UPDATE_HASH:
return Object.assign({}, state, {
currentSection: action.payload.section,
currentHash: action.payload.method
});
case _types__WEBPACK_IMPORTED_MODULE_5__["default"].UPDATE_SECTION:
return Object.assign({}, state, {
currentSection: action.payload,
currentHash: null
});
case _types__WEBPACK_IMPORTED_MODULE_5__["default"].OPEN_SECTION:
var obj = state.openSections;
obj.push(action.payload);
return Object.assign({}, state, {
openSections: obj
});
case _types__WEBPACK_IMPORTED_MODULE_5__["default"].RESET:
return Object.assign({}, state, {
openSections: [],
currentSection: null,
currentHash: null
});
case _types__WEBPACK_IMPORTED_MODULE_5__["default"].UPDATE_METADATA:
return Object.assign({}, state, {
metadata: {
title: action.payload.title,
description: action.payload.description
}
});
default:
return state;
}
};
var scrollNav = function scrollNav(id) {
var nav = document.querySelector("#nav");
if (nav) {
var element = nav.querySelector("#nav-" + id);
if (element) {
(0,_utils_scroll_parent__WEBPACK_IMPORTED_MODULE_4__["default"])(nav, element);
}
}
};
var scrollToElement = /*#__PURE__*/function () {
var _ref = (0,_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee(id) {
var element;
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
element = document.querySelector("#" + id);
if (element) {
if ((0,_utils_check_display__WEBPACK_IMPORTED_MODULE_3__.checkDisplay)(element)) {
element.scrollIntoView({
block: "start",
inline: "nearest"
});
} else {
setTimeout(function () {
scrollToElement(id);
}, 100);
}
} else {
setTimeout(function () {
scrollToElement(id);
}, 100);
}
case 2:
case "end":
return _context.stop();
}
}
}, _callee);
}));
return function scrollToElement(_x) {
return _ref.apply(this, arguments);
};
}();
var NavigationProvider = function NavigationProvider(_ref2) {
var children = _ref2.children;
var _useReducer = (0,react__WEBPACK_IMPORTED_MODULE_2__.useReducer)(reducer, defaultNavigationContext),
state = _useReducer[0],
dispatch = _useReducer[1];
var setApi = function setApi(api) {
dispatch({
type: _types__WEBPACK_IMPORTED_MODULE_5__["default"].SET_API,
payload: api
});
};
var updateMetadata = function updateMetadata(metadata) {
dispatch({
type: _types__WEBPACK_IMPORTED_MODULE_5__["default"].UPDATE_METADATA,
payload: metadata
});
};
var updateHash = function updateHash(section, method) {
dispatch({
type: _types__WEBPACK_IMPORTED_MODULE_5__["default"].UPDATE_HASH,
payload: {
method: method,
section: section
}
});
window.history.replaceState(null, "", "/api/" + state.api + "/" + section + "/" + method);
scrollNav(method);
};
var updateSection = function updateSection(section) {
dispatch({
type: _types__WEBPACK_IMPORTED_MODULE_5__["default"].UPDATE_SECTION,
payload: section
});
window.history.replaceState(null, "", "/api/" + state.api + "/" + section);
scrollNav(section);
};
var openSection = function openSection(sectionName) {
dispatch({
type: _types__WEBPACK_IMPORTED_MODULE_5__["default"].OPEN_SECTION,
payload: sectionName
});
};
var goTo = function goTo(to) {
var section = to.section,
method = to.method;
if (!state.openSections.includes(section)) {
openSection(section);
}
scrollToElement(method || section);
};
var reset = function reset() {
dispatch({
type: _types__WEBPACK_IMPORTED_MODULE_5__["default"].RESET
});
};
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_6__.jsx)(NavigationContext.Provider, {
value: Object.assign({}, state, {
openSection: openSection,
updateSection: updateSection,
updateHash: updateHash,
setApi: setApi,
goTo: goTo,
reset: reset,
updateMetadata: updateMetadata,
dispatch: dispatch
})
}, children);
};
/***/ }),
/***/ "./src/context/types.js":
/*!******************************!*\
!*** ./src/context/types.js ***!
\******************************/
/***/ ((__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 */ });
var types = {
SET_API: "SET_API",
UPDATE_HASH: "UPDATE_HASH",
UPDATE_SECTION: "UPDATE_SECTION",
OPEN_SECTION: "OPEN_SECTION",
RESET: "RESET",
UPDATE_METADATA: "UPDATE_METADATA"
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (types);
/***/ }),
/***/ "./src/gatsby-plugin-theme-ui/breakpoints.js":
/*!***************************************************!*\
!*** ./src/gatsby-plugin-theme-ui/breakpoints.js ***!
\***************************************************/
/***/ ((__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 */ });
// eslint-disable-next-line import/no-anonymous-default-export
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (["40em", "52em", "64em"]);
/***/ }),
/***/ "./src/gatsby-plugin-theme-ui/buttons.js":
/*!***********************************************!*\
!*** ./src/gatsby-plugin-theme-ui/buttons.js ***!
\***********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "buttons": () => (/* binding */ buttons),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
var buttons = {
pillActive: {
cursor: "pointer",
backgroundColor: "transparent",
color: "dark",
height: "40px",
outline: 0,
borderRadius: "3px",
paddingTop: "3px",
paddingBottom: "3px",
boxShadow: "pillActive",
"&:focus": {
boxShadow: "pillActiveFocus"
}
},
pill: {
cursor: "pointer",
backgroundColor: "transparent",
color: "dark",
height: "40px",
outline: 0,
borderRadius: "3px",
paddingTop: "3px",
paddingBottom: "3px",
boxShadow: "pill",
"&:focus": {
boxShadow: "buttonBoxShadowActive"
}
},
danger: {
minHeight: "28px",
fontWeight: "500",
color: "light",
fontSize: "14px",
lineHeight: "14px",
backgroundColor: "danger",
border: 0,
outline: 0,
paddingTop: "3px",
paddingBottom: "3px",
cursor: "pointer",
borderRadius: "3px",
boxShadow: "buttonBoxShadow",
"&:hover": {
color: "darkest",
boxShadow: "buttonBoxShadowHover"
},
"&:active": {
boxShadow: "buttonBoxShadowActive"
}
},
primary: {
minHeight: "24px",
height: "28px",
fontWeight: "500",
color: "dark",
fontSize: "14px",
lineHeight: "14px",
backgroundColor: "lightest",
border: 0,
outline: 0,
paddingTop: "3px",
paddingBottom: "3px",
cursor: "pointer",
borderRadius: "3px",
boxShadow: "buttonBoxShadow",
"&:hover": {
color: "darkest",
boxShadow: "buttonBoxShadowHover"
},
"&:active": {
boxShadow: "buttonBoxShadowActive"
},
"&:disabled": {
cursor: "not-allowed",
pointerEvents: "none",
opacity: 0.5
}
},
green: {
height: "30px",
color: "lightest",
backgroundColor: "#53725D",
border: 0,
outline: 0,
paddingTop: "3px",
paddingBottom: "3px",
cursor: "pointer",
borderRadius: "3px",
"&:focus": {
boxShadow: "buttonBoxShadowFocus"
},
"&:active": {
boxShadow: "buttonBoxShadowActive"
}
},
secondary: {
height: "30px",
color: "light",
backgroundColor: "dark",
border: 0,
outline: 0,
paddingTop: "3px",
paddingBottom: "3px",
cursor: "pointer",
borderRadius: "3px",
"&:focus": {
boxShadow: "buttonBoxShadowFocus"
},
"&:active": {
boxShadow: "buttonBoxShadowActive"
}
},
cta: {
height: "30px",
color: "white",
backgroundColor: "medusaGreen",
fontWeight: 600,
fontSize: "14px",
lineHeight: "14px",
border: 0,
outline: 0,
paddingTop: "3px",
paddingBottom: "3px",
cursor: "pointer",
borderRadius: "3px",
boxShadow: "ctaBoxShadow",
"&:hover": {
boxShadow: "ctaBoxShadowHover"
},
"&:disabled": {
cursor: "not-allowed",
pointerEvents: "none",
opacity: 0.5
}
},
delete: {
height: "30px",
color: "white",
backgroundColor: "#b02b13",
fontWeight: 600,
fontSize: "14px",
lineHeight: "14px",
border: 0,
outline: 0,
paddingTop: "3px",
paddingBottom: "3px",
cursor: "pointer",
borderRadius: "3px",
boxShadow: "ctaBoxShadow",
"&:hover": {
boxShadow: "ctaBoxShadowHover"
}
},
trigger: {
bg: "faded",
alignItems: "baseline",
fontSize: "13px",
fontWeight: "400"
}
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (buttons);
/***/ }),
/***/ "./src/gatsby-plugin-theme-ui/forms.js":
/*!*********************************************!*\
!*** ./src/gatsby-plugin-theme-ui/forms.js ***!
\*********************************************/
/***/ ((__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 */ });
// eslint-disable-next-line import/no-anonymous-default-export
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
invalidInput: {
color: "dark",
backgroundColor: "lightest",
border: 0,
outline: 0,
cursor: "text",
transition: "all 0.2s ease",
borderRadius: "3px",
boxShadow: "invalidBoxShadow",
"&.tag__focus": {
boxShadow: "inputBoxShadowHover"
},
"&:focus": {
boxShadow: "inputBoxShadowHover"
},
"&::placeholder": {
color: "danger"
}
},
input: {
color: "dark",
backgroundColor: "lightest",
border: 0,
outline: 0,
cursor: "text",
transition: "all 0.2s ease",
borderRadius: "3px",
boxShadow: "inputBoxShadow",
"&.tag__focus": {
boxShadow: "inputBoxShadowHover"
},
"&:focus": {
boxShadow: "inputBoxShadowHover"
},
"&::placeholder": {
color: "placeholder"
}
},
textarea: {
color: "dark",
backgroundColor: "lightest",
border: 0,
outline: 0,
cursor: "text",
transition: "all 0.2s ease",
borderRadius: "3px",
boxShadow: "inputBoxShadow",
"&.tag__focus": {
boxShadow: "inputBoxShadowHover"
},
"&:focus": {
boxShadow: "inputBoxShadowHover"
},
"&::placeholder": {
color: "placeholder"
}
},
dropdown: {
color: "dark",
backgroundColor: "lightest",
border: 0,
outline: 0,
paddingTop: "3px",
paddingBottom: "3px",
cursor: "pointer",
borderRadius: "3px",
boxShadow: "buttonPrimaryBoxShadow",
"&:hover": {
color: "darkest",
boxShadow: "buttonPrimaryBoxShadowHover"
},
"&:active": {
boxShadow: "buttonPrimaryBoxShadowActive"
}
}
});
/***/ }),
/***/ "./src/gatsby-plugin-theme-ui/index.js":
/*!*********************************************!*\
!*** ./src/gatsby-plugin-theme-ui/index.js ***!
\*********************************************/
/***/ ((__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 _fonts_index_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../fonts/index.css */ "./src/fonts/index.css");
/* harmony import */ var _fonts_index_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_fonts_index_css__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./breakpoints */ "./src/gatsby-plugin-theme-ui/breakpoints.js");
/* harmony import */ var _buttons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./buttons */ "./src/gatsby-plugin-theme-ui/buttons.js");
/* harmony import */ var _spacing__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./spacing */ "./src/gatsby-plugin-theme-ui/spacing.js");
/* harmony import */ var _shadows__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./shadows */ "./src/gatsby-plugin-theme-ui/shadows.js");
/* harmony import */ var _forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./forms */ "./src/gatsby-plugin-theme-ui/forms.js");
/* harmony import */ var _labels__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./labels */ "./src/gatsby-plugin-theme-ui/labels.js");
// eslint-disable-next-line import/no-anonymous-default-export
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
sizes: {
headerHeight: "50px"
},
links: {
topbar: {
fontFamily: "body",
fontSize: "2",
textDecoration: "none",
color: "dark"
}
},
text: {
labels: _labels__WEBPACK_IMPORTED_MODULE_6__["default"],
largest: {
fontFamily: "body",
fontSize: "22px",
fontweight: "300",
lineHeight: "1.5",
letterSpacing: "normal"
},
large: {
fontFamily: "body",
fontSize: "18px",
fontWeight: "300",
lineHeight: "1.22",
letterSpacing: "-0.5px"
},
medium: {
fontFamily: "body",
fontSize: "16px",
fontWeight: "300",
lineHeight: "1.22",
letterSpacing: "normal"
},
base: {
fontFamily: "body",
fontsize: "14px",
fontWeight: "300",
lineHeight: "1.22",
letterSpacing: "-0.25px"
},
small: {
fontFamily: "body",
fontSize: "12px",
fontWeight: "300",
lineHeight: "12px",
letterSpacing: "0px"
}
},
colors: {
primary: "#53725D",
secondary: "#79B28A",
danger: "#FF7675",
placeholder: "#a3acb9",
dark: "#0a3149",
darkContrast: "#0a314940",
light: "#ffffff",
faded: "#eef0f5",
fadedContrast: "#eef0f540"
},
borders: {
hairline: "1px solid #E3E8EE"
},
fontSizes: [12, 14, 16, 18, 22],
fonts: {
body: "-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Ubuntu, sans-serif",
heading: "system-ui, sans-serif",
monospace: "Menlo, monospace"
},
breakpoints: _breakpoints__WEBPACK_IMPORTED_MODULE_1__["default"],
spacing: _spacing__WEBPACK_IMPORTED_MODULE_3__["default"],
mediaQueries: {
small: "@media screen and (min-width: " + _breakpoints__WEBPACK_IMPORTED_MODULE_1__["default"][0] + ")",
medium: "@media screen and (min-width: " + _breakpoints__WEBPACK_IMPORTED_MODULE_1__["default"][1] + ")",
large: "@media screen and (min-width: " + _breakpoints__WEBPACK_IMPORTED_MODULE_1__["default"][2] + ")"
},
grid: {
selectedShadow: "\n inset rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n inset rgba(206, 208, 190, 0.56) 0px 0px 0px 2px,\n inset rgba(0, 0, 0, 0) 0px 0px 0px 0px, \n inset rgba(60, 66, 87, 0.16) 0px 0px 0px 1px,\n inset rgba(0, 0, 0, 0) 0px 0px 0px 0px, \n inset rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n inset rgba(0, 0, 0, 0) 0px 0px 0px 0px;\n ",
header: {
padding: 2,
fontSize: 1,
fontFamily: "body"
},
data: {
padding: 2,
fontSize: 1,
fontFamily: "body"
}
},
shadows: _shadows__WEBPACK_IMPORTED_MODULE_4__["default"],
variants: {
loginCard: {
boxShadow: "buttonBoxShadow",
borderRadius: "3px"
},
badge: {
fontSize: "0",
color: "dark",
backgroundColor: "lightest",
boxShadow: "buttonBoxShadow",
borderRadius: "3px",
minWidth: "unset",
px: "1"
}
},
forms: _forms__WEBPACK_IMPORTED_MODULE_5__["default"],
buttons: _buttons__WEBPACK_IMPORTED_MODULE_2__["default"],
radii: {
small: "8px"
}
});
/***/ }),
/***/ "./src/gatsby-plugin-theme-ui/labels.js":
/*!**********************************************!*\
!*** ./src/gatsby-plugin-theme-ui/labels.js ***!
\**********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "labels": () => (/* binding */ labels),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
var labels = {
required: {
color: "danger",
fontSize: 0
},
GET: {
color: "#4159de"
},
POST: {
color: "#09825d"
},
DELETE: {
color: "#b50a0a"
}
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (labels);
/***/ }),
/***/ "./src/gatsby-plugin-theme-ui/shadows.js":
/*!***********************************************!*\
!*** ./src/gatsby-plugin-theme-ui/shadows.js ***!
\***********************************************/
/***/ ((__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 */ });
// eslint-disable-next-line import/no-anonymous-default-export
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
pill: "\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(0, 0, 0, 0.12) 0px 1px 1px 0px,\n rgba(60, 66, 87, 0.16) 0px 0px 0px 1px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(60, 66, 87, 0.08) 0px 0px 5px 0px;\n ",
pillActive: "\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(83, 114, 93, 0.8) 0px 0px 0px 2px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px, \n rgba(60, 66, 87, 0.16) 0px 0px 0px 1px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px, \n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px\n ",
pillActiveFocus: "\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(206, 208, 190, 0.36) 0px 0px 0px 4px,\n rgba(83, 114, 93, 0.8) 0px 0px 0px 2px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px, \n rgba(60, 66, 87, 0.16) 0px 0px 0px 1px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px, \n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px\n ",
invalidBoxShadow: "\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px, \n rgba(0, 0, 0, 0) 0px 0px 0px 0px, \n rgba(255, 66, 87, 0.8) 0px 0px 0px 1px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px;\n ",
inputBoxShadow: "\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px, \n rgba(0, 0, 0, 0) 0px 0px 0px 0px, \n rgba(60, 66, 87, 0.16) 0px 0px 0px 1px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px;\n ",
inputBoxShadowHover: "\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(206, 208, 190, 0.36) 0px 0px 0px 4px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px, \n rgba(60, 66, 87, 0.16) 0px 0px 0px 1px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px, \n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px;\n ",
buttonBoxShadow: "\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(0, 0, 0, 0.12) 0px 1px 1px 0px,\n rgba(60, 66, 87, 0.16) 0px 0px 0px 1px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(60, 66, 87, 0.08) 0px 2px 5px 0px;\n ",
buttonBoxShadowHover: "\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(0, 0, 0, 0.12) 0px 1px 1px 0px,\n rgba(60, 66, 87, 0.16) 0px 0px 0px 1px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(60, 66, 87, 0.08) 0px 3px 9px 0px,\n rgba(60, 66, 87, 0.08) 0px 2px 5px 0px;\n ",
buttonBoxShadowActive: "\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(206, 208, 190, 0.36) 0px 0px 0px 4px,\n rgba(0, 0, 0, 0.12) 0px 1px 1px 0px,\n rgba(60, 66, 87, 0.16) 0px 0px 0px 1px,\n rgba(0, 0, 0, 0) 0px 0px 0px 0px,\n rgba(60, 66, 87, 0.08) 0px 3px 9px 0px;\n rgba(60, 66, 87, 0.08) 0px 2px 5px 0px;\n ",
tagBoxShadow: "\n rgba(0,0,0,0) 0px 0px 0px 0px, \n rgb(190, 191, 208) 0px 0px 0px 2px, \n rgba(0, 0, 0, 0) 0px 0px 0px 0px, \n rgba(60, 62, 87, 0.22) 0px 0px 0px 2px, \n rgba(0,0,0,0) 0px 0px 0px 0px, \n rgba(0,0,0,0) 0px 0px 0px 0px, \n rgba(0,0,0,0) 0px 0px 0px 0px;\n ",
ctaBoxShadow: "\n rgba(0,0,0,0) 0px 0px 0px 0px, \n rgba(0,0,0,0) 0px 0px 0px 0px, \n rgba(0,0,0,0.12) 0px 1px 1px 0px, \n rgba(62, 207, 142, 0) 0px 0px 0px 1px, \n rgba(0,0,0,0) 0px 0px 0px 0px, \n rgba(0,0,0,0) 0px 0px 0px 0px, \n rgba(60,66,87,0.08) 0px 2px 5px 0px;\n ",
ctaBoxShadowHover: "\n rgba(0,0,0,0) 0px 0px 0px 0px, \n rgba(0,0,0,0) 0px 0px 0px 0px, \n rgba(0,0,0,0.12) 0px 1px 1px 0px, \n rgba(62, 207, 142, 0) 0px 0px 0px 1px, \n rgba(0,0,0,0) 0px 0px 0px 0px, \n rgba(62, 207, 142, 0.25) 0px 3px 9px 0px;\n rgba(62, 207, 142, 0.25) 0px 2px 5px 0px;\n ",
sidebarShadow: "\n inset -1px 0 0 0 #eef0f5\n ",
topbarShadow: "\n 0 2px 5px 0 rgb(59 65 94 / 10%), 0 1px 1px 0 rgb(0 0 0 / 7%)\n "
});
/***/ }),
/***/ "./src/gatsby-plugin-theme-ui/spacing.js":
/*!***********************************************!*\
!*** ./src/gatsby-plugin-theme-ui/spacing.js ***!
\***********************************************/
/***/ ((__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 */ });
// eslint-disable-next-line import/no-anonymous-default-export
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ([0, 4, 8, 16, 32, 64]);
/***/ }),
/***/ "./src/hooks/use-in-view.js":
/*!**********************************!*\
!*** ./src/hooks/use-in-view.js ***!
\**********************************/
/***/ ((__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__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
var useInView = function useInView(options) {
var containerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
isInView = _useState[0],
setIsInView = _useState[1];
var callback = function callback(entries) {
var entry = entries[0];
setIsInView(entry.isIntersecting);
};
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
var ref = containerRef.current;
var observer = new IntersectionObserver(callback, options);
if (ref) {
observer.observe(ref);
}
return function () {
if (ref) {
observer.unobserve(ref);
}
};
}, [containerRef, options]);
return [containerRef, isInView];
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useInView);
/***/ }),
/***/ "./src/templates/reference-page.js":
/*!*****************************************!*\
!*** ./src/templates/reference-page.js ***!
\*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ ReferencePage)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_helmet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-helmet */ "./node_modules/react-helmet/es/Helmet.js");
/* harmony import */ var _components_content__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/content */ "./src/components/content/index.js");
/* harmony import */ var _components_layout__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components/layout */ "./src/components/layout.js");
/* harmony import */ var _context_navigation_context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../context/navigation-context */ "./src/context/navigation-context.js");
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @emotion/react */ "./node_modules/@emotion/react/dist/emotion-react.esm.js");
function ReferencePage(_ref) {
var _ref$pageContext = _ref.pageContext,
data = _ref$pageContext.data,
api = _ref$pageContext.api,
title = _ref$pageContext.title,
description = _ref$pageContext.description,
to = _ref$pageContext.to;
var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_navigation_context__WEBPACK_IMPORTED_MODULE_4__["default"]),
setApi = _useContext.setApi,
goTo = _useContext.goTo,
metadata = _useContext.metadata;
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({
title: title,
description: description
}),
siteData = _useState[0],
setSiteData = _useState[1];
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
setApi(api);
if (to) {
goTo(to);
} // eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
if (metadata) {
setSiteData({
title: metadata.title,
description: metadata.description
});
}
}, [metadata]);
console.log(api);
return (0,_emotion_react__WEBPACK_IMPORTED_MODULE_5__.jsx)(_components_layout__WEBPACK_IMPORTED_MODULE_3__["default"], {
data: data,
api: api
}, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_5__.jsx)(react_helmet__WEBPACK_IMPORTED_MODULE_1__.Helmet, null, (0,_emotion_react__WEBPACK_IMPORTED_MODULE_5__.jsx)("title", null, "API | Medusa Commerce API Reference"), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_5__.jsx)("meta", {
name: "description",
content: siteData.description
})), (0,_emotion_react__WEBPACK_IMPORTED_MODULE_5__.jsx)(_components_content__WEBPACK_IMPORTED_MODULE_2__["default"], {
data: data,
api: api
}));
}
/***/ }),
/***/ "./src/utils/check-display.js":
/*!************************************!*\
!*** ./src/utils/check-display.js ***!
\************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "checkDisplay": () => (/* binding */ checkDisplay)
/* harmony export */ });
var checkDisplay = function checkDisplay(element) {
var mc = element.closest("#method-container"); //if no closest method container exists then it is a section and we can scroll
if (!mc) return true;
var style = getComputedStyle(mc);
if (style.display === "none") {
return false;
} else {
return true;
}
};
/***/ }),
/***/ "./src/utils/convert-to-kebab-case.js":
/*!********************************************!*\
!*** ./src/utils/convert-to-kebab-case.js ***!
\********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "convertToKebabCase": () => (/* binding */ convertToKebabCase)
/* harmony export */ });
var convertToKebabCase = function convertToKebabCase(string) {
return string.replace(/\s+/g, "-").replace("'", "").replace(".", "").replace('"', "").toLowerCase();
};
/***/ }),
/***/ "./src/utils/format-parameters.js":
/*!****************************************!*\
!*** ./src/utils/format-parameters.js ***!
\****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "formatMethodParams": () => (/* binding */ formatMethodParams)
/* harmony export */ });
var formatMethodParams = function formatMethodParams(method) {
var parameters = method.parameters,
requestBody = method.requestBody;
var params = [];
var body = [];
if (parameters && parameters.length > 0) {
parameters.map(function (p) {
return params.push({
property: p.name,
description: p.description,
required: p.required,
type: p.schema.type
});
});
}
if (requestBody) {
var required = requestBody.required,
properties = requestBody.properties;
properties.map(function (p) {
return body.push({
property: p.property,
description: p.description,
required: required ? required.some(function (req) {
return req === p.property;
}) : false,
type: p.type,
nestedModel: p.nestedModel
});
});
}
return {
properties: params,
body: body
};
};
/***/ }),
/***/ "./src/utils/format-route.js":
/*!***********************************!*\
!*** ./src/utils/format-route.js ***!
\***********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "formatRoute": () => (/* binding */ formatRoute)
/* harmony export */ });
var formatRoute = function formatRoute(string) {
return string.replace(/{(.*?)}/g, ":$1");
};
/***/ }),
/***/ "./src/utils/scroll-parent.js":
/*!************************************!*\
!*** ./src/utils/scroll-parent.js ***!
\************************************/
/***/ ((__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 */ });
var scrollParent = function scrollParent(parent, child) {
var parentRect = parent.getBoundingClientRect();
var parentViewableArea = {
height: parent.clientHeight,
width: parent.clientWidth
};
var childRect = child.getBoundingClientRect();
var isViewable = childRect.top >= parentRect.top && childRect.top <= parentRect.top + parentViewableArea.height;
if (!isViewable) {
var pos = childRect.top + parent.scrollTop - parentRect.top;
parent.scrollTop = pos > 0 ? pos : 0;
}
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (scrollParent);
/***/ }),
/***/ "./node_modules/@gatsbyjs/reach-router/es/index.js":
/*!*********************************************************!*\
!*** ./node_modules/@gatsbyjs/reach-router/es/index.js ***!
\*********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Link": () => (/* binding */ Link),
/* harmony export */ "Location": () => (/* binding */ Location),
/* harmony export */ "LocationProvider": () => (/* binding */ LocationProvider),
/* harmony export */ "Match": () => (/* binding */ Match),
/* harmony export */ "Redirect": () => (/* binding */ Redirect),
/* harmony export */ "Router": () => (/* binding */ Router),
/* harmony export */ "ServerLocation": () => (/* binding */ ServerLocation),
/* harmony export */ "createHistory": () => (/* reexport safe */ _lib_history__WEBPACK_IMPORTED_MODULE_5__.createHistory),
/* harmony export */ "createMemorySource": () => (/* reexport safe */ _lib_history__WEBPACK_IMPORTED_MODULE_5__.createMemorySource),
/* harmony export */ "isRedirect": () => (/* binding */ isRedirect),
/* harmony export */ "navigate": () => (/* reexport safe */ _lib_history__WEBPACK_IMPORTED_MODULE_5__.navigate),
/* harmony export */ "redirectTo": () => (/* binding */ redirectTo),
/* harmony export */ "globalHistory": () => (/* reexport safe */ _lib_history__WEBPACK_IMPORTED_MODULE_5__.globalHistory),
/* harmony export */ "matchPath": () => (/* reexport safe */ _lib_utils__WEBPACK_IMPORTED_MODULE_4__.match),
/* harmony export */ "useLocation": () => (/* binding */ useLocation),
/* harmony export */ "useNavigate": () => (/* binding */ useNavigate),
/* harmony export */ "useParams": () => (/* binding */ useParams),
/* harmony export */ "useMatch": () => (/* binding */ useMatch),
/* harmony export */ "BaseContext": () => (/* binding */ BaseContext)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/invariant.js");
/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var react_lifecycles_compat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-lifecycles-compat */ "./.cache/react-lifecycles-compat.js");
/* harmony import */ var _lib_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lib/utils */ "./node_modules/@gatsbyjs/reach-router/es/lib/utils.js");
/* harmony import */ var _lib_history__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lib/history */ "./node_modules/@gatsbyjs/reach-router/es/lib/history.js");
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/* eslint-disable jsx-a11y/anchor-has-content */
////////////////////////////////////////////////////////////////////////////////
var createNamedContext = function createNamedContext(name, defaultValue) {
var Ctx = (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(defaultValue);
Ctx.displayName = name;
return Ctx;
};
////////////////////////////////////////////////////////////////////////////////
// Location Context/Provider
var LocationContext = createNamedContext("Location");
// sets up a listener if there isn't one already so apps don't need to be
// wrapped in some top level provider
var Location = function Location(_ref) {
var children = _ref.children;
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
LocationContext.Consumer,
null,
function (context) {
return context ? children(context) : react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
LocationProvider,
null,
children
);
}
);
};
var LocationProvider = function (_React$Component) {
_inherits(LocationProvider, _React$Component);
function LocationProvider() {
var _temp, _this, _ret;
_classCallCheck(this, LocationProvider);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {
context: _this.getContext(),
refs: { unlisten: null }
}, _temp), _possibleConstructorReturn(_this, _ret);
}
LocationProvider.prototype.getContext = function getContext() {
var _props$history = this.props.history,
navigate = _props$history.navigate,
location = _props$history.location;
return { navigate: navigate, location: location };
};
LocationProvider.prototype.componentDidCatch = function componentDidCatch(error, info) {
if (isRedirect(error)) {
var _navigate = this.props.history.navigate;
_navigate(error.uri, { replace: true });
} else {
throw error;
}
};
LocationProvider.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {
if (prevState.context.location !== this.state.context.location) {
this.props.history._onTransitionComplete();
}
};
LocationProvider.prototype.componentDidMount = function componentDidMount() {
var _this2 = this;
var refs = this.state.refs,
history = this.props.history;
history._onTransitionComplete();
refs.unlisten = history.listen(function () {
Promise.resolve().then(function () {
// TODO: replace rAF with react deferred update API when it's ready https://github.com/facebook/react/issues/13306
requestAnimationFrame(function () {
if (!_this2.unmounted) {
_this2.setState(function () {
return { context: _this2.getContext() };
});
}
});
});
});
};
LocationProvider.prototype.componentWillUnmount = function componentWillUnmount() {
var refs = this.state.refs;
this.unmounted = true;
refs.unlisten();
};
LocationProvider.prototype.render = function render() {
var context = this.state.context,
children = this.props.children;
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
LocationContext.Provider,
{ value: context },
typeof children === "function" ? children(context) : children || null
);
};
return LocationProvider;
}((react__WEBPACK_IMPORTED_MODULE_0___default().Component));
////////////////////////////////////////////////////////////////////////////////
LocationProvider.defaultProps = {
history: _lib_history__WEBPACK_IMPORTED_MODULE_5__.globalHistory
};
true ? LocationProvider.propTypes = {
history: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object.isRequired)
} : 0;
var ServerLocation = function ServerLocation(_ref2) {
var url = _ref2.url,
children = _ref2.children;
var searchIndex = url.indexOf("?");
var searchExists = searchIndex > -1;
var pathname = void 0;
var search = "";
var hash = "";
if (searchExists) {
pathname = url.substring(0, searchIndex);
search = url.substring(searchIndex);
} else {
pathname = url;
}
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
LocationContext.Provider,
{
value: {
location: {
pathname: pathname,
search: search,
hash: hash
},
navigate: function navigate() {
throw new Error("You can't call navigate on the server.");
}
}
},
children
);
};
////////////////////////////////////////////////////////////////////////////////
// Sets baseuri and basepath for nested routers and links
var BaseContext = createNamedContext("Base", {
baseuri: "/",
basepath: "/",
navigate: _lib_history__WEBPACK_IMPORTED_MODULE_5__.globalHistory.navigate
});
////////////////////////////////////////////////////////////////////////////////
// The main event, welcome to the show everybody.
var Router = function Router(props) {
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
BaseContext.Consumer,
null,
function (baseContext) {
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
Location,
null,
function (locationContext) {
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(RouterImpl, _extends({}, baseContext, locationContext, props));
}
);
}
);
};
var RouterImpl = function (_React$PureComponent) {
_inherits(RouterImpl, _React$PureComponent);
function RouterImpl() {
_classCallCheck(this, RouterImpl);
return _possibleConstructorReturn(this, _React$PureComponent.apply(this, arguments));
}
RouterImpl.prototype.render = function render() {
var _props = this.props,
location = _props.location,
_navigate2 = _props.navigate,
basepath = _props.basepath,
primary = _props.primary,
children = _props.children,
baseuri = _props.baseuri,
_props$component = _props.component,
component = _props$component === undefined ? "div" : _props$component,
domProps = _objectWithoutProperties(_props, ["location", "navigate", "basepath", "primary", "children", "baseuri", "component"]);
var routes = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(children).reduce(function (array, child) {
var routes = createRoute(basepath)(child);
return array.concat(routes);
}, []);
var pathname = location.pathname;
var match = (0,_lib_utils__WEBPACK_IMPORTED_MODULE_4__.pick)(routes, pathname);
if (match) {
var params = match.params,
uri = match.uri,
route = match.route,
element = match.route.value;
// remove the /* from the end for child routes relative paths
basepath = route.default ? basepath : route.path.replace(/\*$/, "");
var props = _extends({}, params, {
uri: uri,
location: location,
navigate: function navigate(to, options) {
return _navigate2((0,_lib_utils__WEBPACK_IMPORTED_MODULE_4__.resolve)(to, uri), options);
}
});
var clone = react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(element, props, element.props.children ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
Router,
{ location: location, primary: primary },
element.props.children
) : undefined);
// using 'div' for < 16.3 support
var FocusWrapper = primary ? FocusHandler : component;
// don't pass any props to 'div'
var wrapperProps = primary ? _extends({ uri: uri, location: location, component: component }, domProps) : domProps;
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
BaseContext.Provider,
{
value: { baseuri: uri, basepath: basepath, navigate: props.navigate }
},
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
FocusWrapper,
wrapperProps,
clone
)
);
} else {
// Not sure if we want this, would require index routes at every level
// warning(
// false,
// `\n\nNothing matched:\n\t${
// location.pathname
// }\n\nPaths checked: \n\t${routes
// .map(route => route.path)
// .join(
// "\n\t"
// )}\n\nTo get rid of this warning, add a default NotFound component as child of Router:
// \n\tlet NotFound = () => Not Found!
// \n\t\n\t \n\t {/* ... */}\n\t`
// );
return null;
}
};
return RouterImpl;
}((react__WEBPACK_IMPORTED_MODULE_0___default().PureComponent));
RouterImpl.defaultProps = {
primary: true
};
var FocusContext = createNamedContext("Focus");
var FocusHandler = function FocusHandler(_ref3) {
var uri = _ref3.uri,
location = _ref3.location,
component = _ref3.component,
domProps = _objectWithoutProperties(_ref3, ["uri", "location", "component"]);
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
FocusContext.Consumer,
null,
function (requestFocus) {
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(FocusHandlerImpl, _extends({}, domProps, {
component: component,
requestFocus: requestFocus,
uri: uri,
location: location
}));
}
);
};
// don't focus on initial render
var initialRender = true;
var focusHandlerCount = 0;
var FocusHandlerImpl = function (_React$Component2) {
_inherits(FocusHandlerImpl, _React$Component2);
function FocusHandlerImpl() {
var _temp2, _this4, _ret2;
_classCallCheck(this, FocusHandlerImpl);
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return _ret2 = (_temp2 = (_this4 = _possibleConstructorReturn(this, _React$Component2.call.apply(_React$Component2, [this].concat(args))), _this4), _this4.state = {}, _this4.requestFocus = function (node) {
if (!_this4.state.shouldFocus && node) {
node.focus();
}
}, _temp2), _possibleConstructorReturn(_this4, _ret2);
}
FocusHandlerImpl.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {
var initial = prevState.uri == null;
if (initial) {
return _extends({
shouldFocus: true
}, nextProps);
} else {
var myURIChanged = nextProps.uri !== prevState.uri;
var navigatedUpToMe = prevState.location.pathname !== nextProps.location.pathname && nextProps.location.pathname === nextProps.uri;
return _extends({
shouldFocus: myURIChanged || navigatedUpToMe
}, nextProps);
}
};
FocusHandlerImpl.prototype.componentDidMount = function componentDidMount() {
focusHandlerCount++;
this.focus();
};
FocusHandlerImpl.prototype.componentWillUnmount = function componentWillUnmount() {
focusHandlerCount--;
if (focusHandlerCount === 0) {
initialRender = true;
}
};
FocusHandlerImpl.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {
if (prevProps.location !== this.props.location && this.state.shouldFocus) {
this.focus();
}
};
FocusHandlerImpl.prototype.focus = function focus() {
if (false) {}
var requestFocus = this.props.requestFocus;
if (requestFocus) {
requestFocus(this.node);
} else {
if (initialRender) {
initialRender = false;
} else if (this.node) {
// React polyfills [autofocus] and it fires earlier than cDM,
// so we were stealing focus away, this line prevents that.
if (!this.node.contains(document.activeElement)) {
this.node.focus();
}
}
}
};
FocusHandlerImpl.prototype.render = function render() {
var _this5 = this;
var _props2 = this.props,
children = _props2.children,
style = _props2.style,
requestFocus = _props2.requestFocus,
_props2$component = _props2.component,
Comp = _props2$component === undefined ? "div" : _props2$component,
uri = _props2.uri,
location = _props2.location,
domProps = _objectWithoutProperties(_props2, ["children", "style", "requestFocus", "component", "uri", "location"]);
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
Comp,
_extends({
style: _extends({ outline: "none" }, style),
tabIndex: "-1",
ref: function ref(n) {
return _this5.node = n;
}
}, domProps),
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
FocusContext.Provider,
{ value: this.requestFocus },
this.props.children
)
);
};
return FocusHandlerImpl;
}((react__WEBPACK_IMPORTED_MODULE_0___default().Component));
(0,react_lifecycles_compat__WEBPACK_IMPORTED_MODULE_3__.polyfill)(FocusHandlerImpl);
var k = function k() {};
////////////////////////////////////////////////////////////////////////////////
var forwardRef = (react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef);
if (typeof forwardRef === "undefined") {
forwardRef = function forwardRef(C) {
return C;
};
}
var Link = forwardRef(function (_ref4, ref) {
var innerRef = _ref4.innerRef,
props = _objectWithoutProperties(_ref4, ["innerRef"]);
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
BaseContext.Consumer,
null,
function (_ref5) {
var basepath = _ref5.basepath,
baseuri = _ref5.baseuri;
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
Location,
null,
function (_ref6) {
var location = _ref6.location,
navigate = _ref6.navigate;
var to = props.to,
state = props.state,
replace = props.replace,
_props$getProps = props.getProps,
getProps = _props$getProps === undefined ? k : _props$getProps,
anchorProps = _objectWithoutProperties(props, ["to", "state", "replace", "getProps"]);
var href = (0,_lib_utils__WEBPACK_IMPORTED_MODULE_4__.resolve)(to, baseuri);
var encodedHref = encodeURI(href);
var isCurrent = location.pathname === encodedHref;
var isPartiallyCurrent = (0,_lib_utils__WEBPACK_IMPORTED_MODULE_4__.startsWith)(location.pathname, encodedHref);
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", _extends({
ref: ref || innerRef,
"aria-current": isCurrent ? "page" : undefined
}, anchorProps, getProps({ isCurrent: isCurrent, isPartiallyCurrent: isPartiallyCurrent, href: href, location: location }), {
href: href,
onClick: function onClick(event) {
if (anchorProps.onClick) anchorProps.onClick(event);
if (shouldNavigate(event)) {
event.preventDefault();
var shouldReplace = replace;
if (typeof replace !== "boolean" && isCurrent) {
var _location$state = _extends({}, location.state),
key = _location$state.key,
restState = _objectWithoutProperties(_location$state, ["key"]);
shouldReplace = (0,_lib_utils__WEBPACK_IMPORTED_MODULE_4__.shallowCompare)(_extends({}, state), restState);
}
navigate(href, {
state: state,
replace: shouldReplace
});
}
}
}));
}
);
}
);
});
Link.displayName = "Link";
true ? Link.propTypes = {
to: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string.isRequired)
} : 0;
////////////////////////////////////////////////////////////////////////////////
function RedirectRequest(uri) {
this.uri = uri;
}
var isRedirect = function isRedirect(o) {
return o instanceof RedirectRequest;
};
var redirectTo = function redirectTo(to) {
throw new RedirectRequest(to);
};
var RedirectImpl = function (_React$Component3) {
_inherits(RedirectImpl, _React$Component3);
function RedirectImpl() {
_classCallCheck(this, RedirectImpl);
return _possibleConstructorReturn(this, _React$Component3.apply(this, arguments));
}
// Support React < 16 with this hook
RedirectImpl.prototype.componentDidMount = function componentDidMount() {
var _props3 = this.props,
navigate = _props3.navigate,
to = _props3.to,
from = _props3.from,
_props3$replace = _props3.replace,
replace = _props3$replace === undefined ? true : _props3$replace,
state = _props3.state,
noThrow = _props3.noThrow,
baseuri = _props3.baseuri,
props = _objectWithoutProperties(_props3, ["navigate", "to", "from", "replace", "state", "noThrow", "baseuri"]);
Promise.resolve().then(function () {
var resolvedTo = (0,_lib_utils__WEBPACK_IMPORTED_MODULE_4__.resolve)(to, baseuri);
navigate((0,_lib_utils__WEBPACK_IMPORTED_MODULE_4__.insertParams)(resolvedTo, props), { replace: replace, state: state });
});
};
RedirectImpl.prototype.render = function render() {
var _props4 = this.props,
navigate = _props4.navigate,
to = _props4.to,
from = _props4.from,
replace = _props4.replace,
state = _props4.state,
noThrow = _props4.noThrow,
baseuri = _props4.baseuri,
props = _objectWithoutProperties(_props4, ["navigate", "to", "from", "replace", "state", "noThrow", "baseuri"]);
var resolvedTo = (0,_lib_utils__WEBPACK_IMPORTED_MODULE_4__.resolve)(to, baseuri);
if (!noThrow) redirectTo((0,_lib_utils__WEBPACK_IMPORTED_MODULE_4__.insertParams)(resolvedTo, props));
return null;
};
return RedirectImpl;
}((react__WEBPACK_IMPORTED_MODULE_0___default().Component));
var Redirect = function Redirect(props) {
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
BaseContext.Consumer,
null,
function (_ref7) {
var baseuri = _ref7.baseuri;
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
Location,
null,
function (locationContext) {
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(RedirectImpl, _extends({}, locationContext, { baseuri: baseuri }, props));
}
);
}
);
};
true ? Redirect.propTypes = {
from: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
to: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string.isRequired)
} : 0;
////////////////////////////////////////////////////////////////////////////////
var Match = function Match(_ref8) {
var path = _ref8.path,
children = _ref8.children;
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
BaseContext.Consumer,
null,
function (_ref9) {
var baseuri = _ref9.baseuri;
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
Location,
null,
function (_ref10) {
var navigate = _ref10.navigate,
location = _ref10.location;
var resolvedPath = (0,_lib_utils__WEBPACK_IMPORTED_MODULE_4__.resolve)(path, baseuri);
var result = (0,_lib_utils__WEBPACK_IMPORTED_MODULE_4__.match)(resolvedPath, location.pathname);
return children({
navigate: navigate,
location: location,
match: result ? _extends({}, result.params, {
uri: result.uri,
path: path
}) : null
});
}
);
}
);
};
////////////////////////////////////////////////////////////////////////////////
// Hooks
var useLocation = function useLocation() {
var context = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(LocationContext);
if (!context) {
throw new Error("useLocation hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router");
}
return context.location;
};
var useNavigate = function useNavigate() {
var context = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(BaseContext);
if (!context) {
throw new Error("useNavigate hook was used but a BaseContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router");
}
return context.navigate;
};
var useParams = function useParams() {
var context = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(BaseContext);
if (!context) {
throw new Error("useParams hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router");
}
var location = useLocation();
var results = (0,_lib_utils__WEBPACK_IMPORTED_MODULE_4__.match)(context.basepath, location.pathname);
return results ? results.params : null;
};
var useMatch = function useMatch(path) {
if (!path) {
throw new Error("useMatch(path: string) requires an argument of a string to match against");
}
var context = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(BaseContext);
if (!context) {
throw new Error("useMatch hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router");
}
var location = useLocation();
var resolvedPath = (0,_lib_utils__WEBPACK_IMPORTED_MODULE_4__.resolve)(path, context.baseuri);
var result = (0,_lib_utils__WEBPACK_IMPORTED_MODULE_4__.match)(resolvedPath, location.pathname);
return result ? _extends({}, result.params, {
uri: result.uri,
path: path
}) : null;
};
////////////////////////////////////////////////////////////////////////////////
// Junk
var stripSlashes = function stripSlashes(str) {
return str.replace(/(^\/+|\/+$)/g, "");
};
var createRoute = function createRoute(basepath) {
return function (element) {
if (!element) {
return null;
}
if (element.type === (react__WEBPACK_IMPORTED_MODULE_0___default().Fragment) && element.props.children) {
return react__WEBPACK_IMPORTED_MODULE_0___default().Children.map(element.props.children, createRoute(basepath));
}
!(element.props.path || element.props.default || element.type === Redirect) ? true ? invariant__WEBPACK_IMPORTED_MODULE_2___default()(false, ": Children of must have a `path` or `default` prop, or be a ``. None found on element type `" + element.type + "`") : 0 : void 0;
!!(element.type === Redirect && (!element.props.from || !element.props.to)) ? true ? invariant__WEBPACK_IMPORTED_MODULE_2___default()(false, " requires both \"from\" and \"to\" props when inside a .") : 0 : void 0;
!!(element.type === Redirect && !(0,_lib_utils__WEBPACK_IMPORTED_MODULE_4__.validateRedirect)(element.props.from, element.props.to)) ? true ? invariant__WEBPACK_IMPORTED_MODULE_2___default()(false, " has mismatched dynamic segments, ensure both paths have the exact same dynamic segments.") : 0 : void 0;
if (element.props.default) {
return { value: element, default: true };
}
var elementPath = element.type === Redirect ? element.props.from : element.props.path;
var path = elementPath === "/" ? basepath : stripSlashes(basepath) + "/" + stripSlashes(elementPath);
return {
value: element,
default: element.props.default,
path: element.props.children ? stripSlashes(path) + "/*" : path
};
};
};
var shouldNavigate = function shouldNavigate(event) {
return !event.defaultPrevented && event.button === 0 && !(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
};
////////////////////////////////////////////////////////////////////////
/***/ }),
/***/ "./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js":
/*!**********************************************************************************!*\
!*** ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js ***!
\**********************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var reactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
/**
* Copyright 2015, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
var REACT_STATICS = {
childContextTypes: true,
contextType: true,
contextTypes: true,
defaultProps: true,
displayName: true,
getDefaultProps: true,
getDerivedStateFromError: true,
getDerivedStateFromProps: true,
mixins: true,
propTypes: true,
type: true
};
var KNOWN_STATICS = {
name: true,
length: true,
prototype: true,
caller: true,
callee: true,
arguments: true,
arity: true
};
var FORWARD_REF_STATICS = {
'$$typeof': true,
render: true,
defaultProps: true,
displayName: true,
propTypes: true
};
var MEMO_STATICS = {
'$$typeof': true,
compare: true,
defaultProps: true,
displayName: true,
propTypes: true,
type: true
};
var TYPE_STATICS = {};
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
function getStatics(component) {
// React v16.11 and below
if (reactIs.isMemo(component)) {
return MEMO_STATICS;
} // React v16.12 and above
return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
}
var defineProperty = Object.defineProperty;
var getOwnPropertyNames = Object.getOwnPropertyNames;
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var getPrototypeOf = Object.getPrototypeOf;
var objectPrototype = Object.prototype;
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
if (typeof sourceComponent !== 'string') {
// don't hoist over string (html) components
if (objectPrototype) {
var inheritedComponent = getPrototypeOf(sourceComponent);
if (inheritedComponent && inheritedComponent !== objectPrototype) {
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
}
}
var keys = getOwnPropertyNames(sourceComponent);
if (getOwnPropertySymbols) {
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
}
var targetStatics = getStatics(targetComponent);
var sourceStatics = getStatics(sourceComponent);
for (var i = 0; i < keys.length; ++i) {
var key = keys[i];
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
try {
// Avoid failures from read-only properties
defineProperty(targetComponent, key, descriptor);
} catch (e) {}
}
}
}
return targetComponent;
}
module.exports = hoistNonReactStatics;
/***/ }),
/***/ "./node_modules/invariant/invariant.js":
/*!*********************************************!*\
!*** ./node_modules/invariant/invariant.js ***!
\*********************************************/
/***/ ((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 NODE_ENV = "development";
var invariant = function(condition, format, a, b, c, d, e, f) {
if (NODE_ENV !== 'production') {
if (format === undefined) {
throw new Error('invariant requires an error message argument');
}
}
if (!condition) {
var error;
if (format === undefined) {
error = new Error(
'Minified exception occurred; use the non-minified dev environment ' +
'for the full error message and additional helpful warnings.'
);
} else {
var args = [a, b, c, d, e, f];
var argIndex = 0;
error = new Error(
format.replace(/%s/g, function() { return args[argIndex++]; })
);
error.name = 'Invariant Violation';
}
error.framesToPop = 1; // we don't care about invariant's own frame
throw error;
}
};
module.exports = invariant;
/***/ }),
/***/ "./node_modules/is-plain-obj/index.js":
/*!********************************************!*\
!*** ./node_modules/is-plain-obj/index.js ***!
\********************************************/
/***/ ((module) => {
"use strict";
module.exports = value => {
if (Object.prototype.toString.call(value) !== '[object Object]') {
return false;
}
const prototype = Object.getPrototypeOf(value);
return prototype === null || prototype === Object.prototype;
};
/***/ }),
/***/ "./node_modules/lodash/_DataView.js":
/*!******************************************!*\
!*** ./node_modules/lodash/_DataView.js ***!
\******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"),
root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
/* Built-in method references that are verified to be native. */
var DataView = getNative(root, 'DataView');
module.exports = DataView;
/***/ }),
/***/ "./node_modules/lodash/_Hash.js":
/*!**************************************!*\
!*** ./node_modules/lodash/_Hash.js ***!
\**************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var hashClear = __webpack_require__(/*! ./_hashClear */ "./node_modules/lodash/_hashClear.js"),
hashDelete = __webpack_require__(/*! ./_hashDelete */ "./node_modules/lodash/_hashDelete.js"),
hashGet = __webpack_require__(/*! ./_hashGet */ "./node_modules/lodash/_hashGet.js"),
hashHas = __webpack_require__(/*! ./_hashHas */ "./node_modules/lodash/_hashHas.js"),
hashSet = __webpack_require__(/*! ./_hashSet */ "./node_modules/lodash/_hashSet.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_ListCache.js":
/*!*******************************************!*\
!*** ./node_modules/lodash/_ListCache.js ***!
\*******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var listCacheClear = __webpack_require__(/*! ./_listCacheClear */ "./node_modules/lodash/_listCacheClear.js"),
listCacheDelete = __webpack_require__(/*! ./_listCacheDelete */ "./node_modules/lodash/_listCacheDelete.js"),
listCacheGet = __webpack_require__(/*! ./_listCacheGet */ "./node_modules/lodash/_listCacheGet.js"),
listCacheHas = __webpack_require__(/*! ./_listCacheHas */ "./node_modules/lodash/_listCacheHas.js"),
listCacheSet = __webpack_require__(/*! ./_listCacheSet */ "./node_modules/lodash/_listCacheSet.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_Map.js":
/*!*************************************!*\
!*** ./node_modules/lodash/_Map.js ***!
\*************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"),
root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
/* Built-in method references that are verified to be native. */
var Map = getNative(root, 'Map');
module.exports = Map;
/***/ }),
/***/ "./node_modules/lodash/_MapCache.js":
/*!******************************************!*\
!*** ./node_modules/lodash/_MapCache.js ***!
\******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var mapCacheClear = __webpack_require__(/*! ./_mapCacheClear */ "./node_modules/lodash/_mapCacheClear.js"),
mapCacheDelete = __webpack_require__(/*! ./_mapCacheDelete */ "./node_modules/lodash/_mapCacheDelete.js"),
mapCacheGet = __webpack_require__(/*! ./_mapCacheGet */ "./node_modules/lodash/_mapCacheGet.js"),
mapCacheHas = __webpack_require__(/*! ./_mapCacheHas */ "./node_modules/lodash/_mapCacheHas.js"),
mapCacheSet = __webpack_require__(/*! ./_mapCacheSet */ "./node_modules/lodash/_mapCacheSet.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_Promise.js":
/*!*****************************************!*\
!*** ./node_modules/lodash/_Promise.js ***!
\*****************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"),
root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
/* Built-in method references that are verified to be native. */
var Promise = getNative(root, 'Promise');
module.exports = Promise;
/***/ }),
/***/ "./node_modules/lodash/_Set.js":
/*!*************************************!*\
!*** ./node_modules/lodash/_Set.js ***!
\*************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"),
root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
/* Built-in method references that are verified to be native. */
var Set = getNative(root, 'Set');
module.exports = Set;
/***/ }),
/***/ "./node_modules/lodash/_SetCache.js":
/*!******************************************!*\
!*** ./node_modules/lodash/_SetCache.js ***!
\******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var MapCache = __webpack_require__(/*! ./_MapCache */ "./node_modules/lodash/_MapCache.js"),
setCacheAdd = __webpack_require__(/*! ./_setCacheAdd */ "./node_modules/lodash/_setCacheAdd.js"),
setCacheHas = __webpack_require__(/*! ./_setCacheHas */ "./node_modules/lodash/_setCacheHas.js");
/**
*
* 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;
/***/ }),
/***/ "./node_modules/lodash/_Stack.js":
/*!***************************************!*\
!*** ./node_modules/lodash/_Stack.js ***!
\***************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/lodash/_ListCache.js"),
stackClear = __webpack_require__(/*! ./_stackClear */ "./node_modules/lodash/_stackClear.js"),
stackDelete = __webpack_require__(/*! ./_stackDelete */ "./node_modules/lodash/_stackDelete.js"),
stackGet = __webpack_require__(/*! ./_stackGet */ "./node_modules/lodash/_stackGet.js"),
stackHas = __webpack_require__(/*! ./_stackHas */ "./node_modules/lodash/_stackHas.js"),
stackSet = __webpack_require__(/*! ./_stackSet */ "./node_modules/lodash/_stackSet.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_Symbol.js":
/*!****************************************!*\
!*** ./node_modules/lodash/_Symbol.js ***!
\****************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
/** Built-in value references. */
var Symbol = root.Symbol;
module.exports = Symbol;
/***/ }),
/***/ "./node_modules/lodash/_Uint8Array.js":
/*!********************************************!*\
!*** ./node_modules/lodash/_Uint8Array.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
/** Built-in value references. */
var Uint8Array = root.Uint8Array;
module.exports = Uint8Array;
/***/ }),
/***/ "./node_modules/lodash/_WeakMap.js":
/*!*****************************************!*\
!*** ./node_modules/lodash/_WeakMap.js ***!
\*****************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"),
root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
/* Built-in method references that are verified to be native. */
var WeakMap = getNative(root, 'WeakMap');
module.exports = WeakMap;
/***/ }),
/***/ "./node_modules/lodash/_apply.js":
/*!***************************************!*\
!*** ./node_modules/lodash/_apply.js ***!
\***************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_arrayFilter.js":
/*!*********************************************!*\
!*** ./node_modules/lodash/_arrayFilter.js ***!
\*********************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_arrayIncludes.js":
/*!***********************************************!*\
!*** ./node_modules/lodash/_arrayIncludes.js ***!
\***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseIndexOf = __webpack_require__(/*! ./_baseIndexOf */ "./node_modules/lodash/_baseIndexOf.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_arrayIncludesWith.js":
/*!***************************************************!*\
!*** ./node_modules/lodash/_arrayIncludesWith.js ***!
\***************************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_arrayLikeKeys.js":
/*!***********************************************!*\
!*** ./node_modules/lodash/_arrayLikeKeys.js ***!
\***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseTimes = __webpack_require__(/*! ./_baseTimes */ "./node_modules/lodash/_baseTimes.js"),
isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"),
isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"),
isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/lodash/_isIndex.js"),
isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_arrayMap.js":
/*!******************************************!*\
!*** ./node_modules/lodash/_arrayMap.js ***!
\******************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_arrayPush.js":
/*!*******************************************!*\
!*** ./node_modules/lodash/_arrayPush.js ***!
\*******************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_arraySome.js":
/*!*******************************************!*\
!*** ./node_modules/lodash/_arraySome.js ***!
\*******************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_assignMergeValue.js":
/*!**************************************************!*\
!*** ./node_modules/lodash/_assignMergeValue.js ***!
\**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"),
eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_assignValue.js":
/*!*********************************************!*\
!*** ./node_modules/lodash/_assignValue.js ***!
\*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"),
eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_assocIndexOf.js":
/*!**********************************************!*\
!*** ./node_modules/lodash/_assocIndexOf.js ***!
\**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_baseAssignValue.js":
/*!*************************************************!*\
!*** ./node_modules/lodash/_baseAssignValue.js ***!
\*************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var defineProperty = __webpack_require__(/*! ./_defineProperty */ "./node_modules/lodash/_defineProperty.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_baseCreate.js":
/*!********************************************!*\
!*** ./node_modules/lodash/_baseCreate.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_baseFindIndex.js":
/*!***********************************************!*\
!*** ./node_modules/lodash/_baseFindIndex.js ***!
\***********************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_baseFlatten.js":
/*!*********************************************!*\
!*** ./node_modules/lodash/_baseFlatten.js ***!
\*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var arrayPush = __webpack_require__(/*! ./_arrayPush */ "./node_modules/lodash/_arrayPush.js"),
isFlattenable = __webpack_require__(/*! ./_isFlattenable */ "./node_modules/lodash/_isFlattenable.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_baseFor.js":
/*!*****************************************!*\
!*** ./node_modules/lodash/_baseFor.js ***!
\*****************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var createBaseFor = __webpack_require__(/*! ./_createBaseFor */ "./node_modules/lodash/_createBaseFor.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_baseGet.js":
/*!*****************************************!*\
!*** ./node_modules/lodash/_baseGet.js ***!
\*****************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var castPath = __webpack_require__(/*! ./_castPath */ "./node_modules/lodash/_castPath.js"),
toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_baseGetAllKeys.js":
/*!************************************************!*\
!*** ./node_modules/lodash/_baseGetAllKeys.js ***!
\************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var arrayPush = __webpack_require__(/*! ./_arrayPush */ "./node_modules/lodash/_arrayPush.js"),
isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_baseGetTag.js":
/*!********************************************!*\
!*** ./node_modules/lodash/_baseGetTag.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"),
getRawTag = __webpack_require__(/*! ./_getRawTag */ "./node_modules/lodash/_getRawTag.js"),
objectToString = __webpack_require__(/*! ./_objectToString */ "./node_modules/lodash/_objectToString.js");
/** `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;
/***/ }),
/***/ "./node_modules/lodash/_baseHasIn.js":
/*!*******************************************!*\
!*** ./node_modules/lodash/_baseHasIn.js ***!
\*******************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_baseIndexOf.js":
/*!*********************************************!*\
!*** ./node_modules/lodash/_baseIndexOf.js ***!
\*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseFindIndex = __webpack_require__(/*! ./_baseFindIndex */ "./node_modules/lodash/_baseFindIndex.js"),
baseIsNaN = __webpack_require__(/*! ./_baseIsNaN */ "./node_modules/lodash/_baseIsNaN.js"),
strictIndexOf = __webpack_require__(/*! ./_strictIndexOf */ "./node_modules/lodash/_strictIndexOf.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_baseIsArguments.js":
/*!*************************************************!*\
!*** ./node_modules/lodash/_baseIsArguments.js ***!
\*************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
/** `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;
/***/ }),
/***/ "./node_modules/lodash/_baseIsEqual.js":
/*!*********************************************!*\
!*** ./node_modules/lodash/_baseIsEqual.js ***!
\*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseIsEqualDeep = __webpack_require__(/*! ./_baseIsEqualDeep */ "./node_modules/lodash/_baseIsEqualDeep.js"),
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_baseIsEqualDeep.js":
/*!*************************************************!*\
!*** ./node_modules/lodash/_baseIsEqualDeep.js ***!
\*************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"),
equalArrays = __webpack_require__(/*! ./_equalArrays */ "./node_modules/lodash/_equalArrays.js"),
equalByTag = __webpack_require__(/*! ./_equalByTag */ "./node_modules/lodash/_equalByTag.js"),
equalObjects = __webpack_require__(/*! ./_equalObjects */ "./node_modules/lodash/_equalObjects.js"),
getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"),
isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"),
isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_baseIsMatch.js":
/*!*********************************************!*\
!*** ./node_modules/lodash/_baseIsMatch.js ***!
\*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"),
baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ "./node_modules/lodash/_baseIsEqual.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_baseIsNaN.js":
/*!*******************************************!*\
!*** ./node_modules/lodash/_baseIsNaN.js ***!
\*******************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_baseIsNative.js":
/*!**********************************************!*\
!*** ./node_modules/lodash/_baseIsNative.js ***!
\**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"),
isMasked = __webpack_require__(/*! ./_isMasked */ "./node_modules/lodash/_isMasked.js"),
isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
toSource = __webpack_require__(/*! ./_toSource */ "./node_modules/lodash/_toSource.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_baseIsTypedArray.js":
/*!**************************************************!*\
!*** ./node_modules/lodash/_baseIsTypedArray.js ***!
\**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
isLength = __webpack_require__(/*! ./isLength */ "./node_modules/lodash/isLength.js"),
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
/** `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;
/***/ }),
/***/ "./node_modules/lodash/_baseIteratee.js":
/*!**********************************************!*\
!*** ./node_modules/lodash/_baseIteratee.js ***!
\**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseMatches = __webpack_require__(/*! ./_baseMatches */ "./node_modules/lodash/_baseMatches.js"),
baseMatchesProperty = __webpack_require__(/*! ./_baseMatchesProperty */ "./node_modules/lodash/_baseMatchesProperty.js"),
identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"),
isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
property = __webpack_require__(/*! ./property */ "./node_modules/lodash/property.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_baseKeys.js":
/*!******************************************!*\
!*** ./node_modules/lodash/_baseKeys.js ***!
\******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"),
nativeKeys = __webpack_require__(/*! ./_nativeKeys */ "./node_modules/lodash/_nativeKeys.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_baseKeysIn.js":
/*!********************************************!*\
!*** ./node_modules/lodash/_baseKeysIn.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"),
nativeKeysIn = __webpack_require__(/*! ./_nativeKeysIn */ "./node_modules/lodash/_nativeKeysIn.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_baseMatches.js":
/*!*********************************************!*\
!*** ./node_modules/lodash/_baseMatches.js ***!
\*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseIsMatch = __webpack_require__(/*! ./_baseIsMatch */ "./node_modules/lodash/_baseIsMatch.js"),
getMatchData = __webpack_require__(/*! ./_getMatchData */ "./node_modules/lodash/_getMatchData.js"),
matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ "./node_modules/lodash/_matchesStrictComparable.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_baseMatchesProperty.js":
/*!*****************************************************!*\
!*** ./node_modules/lodash/_baseMatchesProperty.js ***!
\*****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ "./node_modules/lodash/_baseIsEqual.js"),
get = __webpack_require__(/*! ./get */ "./node_modules/lodash/get.js"),
hasIn = __webpack_require__(/*! ./hasIn */ "./node_modules/lodash/hasIn.js"),
isKey = __webpack_require__(/*! ./_isKey */ "./node_modules/lodash/_isKey.js"),
isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ "./node_modules/lodash/_isStrictComparable.js"),
matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ "./node_modules/lodash/_matchesStrictComparable.js"),
toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_baseMerge.js":
/*!*******************************************!*\
!*** ./node_modules/lodash/_baseMerge.js ***!
\*******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"),
assignMergeValue = __webpack_require__(/*! ./_assignMergeValue */ "./node_modules/lodash/_assignMergeValue.js"),
baseFor = __webpack_require__(/*! ./_baseFor */ "./node_modules/lodash/_baseFor.js"),
baseMergeDeep = __webpack_require__(/*! ./_baseMergeDeep */ "./node_modules/lodash/_baseMergeDeep.js"),
isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"),
safeGet = __webpack_require__(/*! ./_safeGet */ "./node_modules/lodash/_safeGet.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_baseMergeDeep.js":
/*!***********************************************!*\
!*** ./node_modules/lodash/_baseMergeDeep.js ***!
\***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var assignMergeValue = __webpack_require__(/*! ./_assignMergeValue */ "./node_modules/lodash/_assignMergeValue.js"),
cloneBuffer = __webpack_require__(/*! ./_cloneBuffer */ "./node_modules/lodash/_cloneBuffer.js"),
cloneTypedArray = __webpack_require__(/*! ./_cloneTypedArray */ "./node_modules/lodash/_cloneTypedArray.js"),
copyArray = __webpack_require__(/*! ./_copyArray */ "./node_modules/lodash/_copyArray.js"),
initCloneObject = __webpack_require__(/*! ./_initCloneObject */ "./node_modules/lodash/_initCloneObject.js"),
isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"),
isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ "./node_modules/lodash/isArrayLikeObject.js"),
isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"),
isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"),
isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
isPlainObject = __webpack_require__(/*! ./isPlainObject */ "./node_modules/lodash/isPlainObject.js"),
isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js"),
safeGet = __webpack_require__(/*! ./_safeGet */ "./node_modules/lodash/_safeGet.js"),
toPlainObject = __webpack_require__(/*! ./toPlainObject */ "./node_modules/lodash/toPlainObject.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_baseProperty.js":
/*!**********************************************!*\
!*** ./node_modules/lodash/_baseProperty.js ***!
\**********************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_basePropertyDeep.js":
/*!**************************************************!*\
!*** ./node_modules/lodash/_basePropertyDeep.js ***!
\**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseGet = __webpack_require__(/*! ./_baseGet */ "./node_modules/lodash/_baseGet.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_baseRest.js":
/*!******************************************!*\
!*** ./node_modules/lodash/_baseRest.js ***!
\******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"),
overRest = __webpack_require__(/*! ./_overRest */ "./node_modules/lodash/_overRest.js"),
setToString = __webpack_require__(/*! ./_setToString */ "./node_modules/lodash/_setToString.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_baseSetToString.js":
/*!*************************************************!*\
!*** ./node_modules/lodash/_baseSetToString.js ***!
\*************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var constant = __webpack_require__(/*! ./constant */ "./node_modules/lodash/constant.js"),
defineProperty = __webpack_require__(/*! ./_defineProperty */ "./node_modules/lodash/_defineProperty.js"),
identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_baseTimes.js":
/*!*******************************************!*\
!*** ./node_modules/lodash/_baseTimes.js ***!
\*******************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_baseToString.js":
/*!**********************************************!*\
!*** ./node_modules/lodash/_baseToString.js ***!
\**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"),
arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/lodash/_arrayMap.js"),
isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_baseUnary.js":
/*!*******************************************!*\
!*** ./node_modules/lodash/_baseUnary.js ***!
\*******************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_baseUniq.js":
/*!******************************************!*\
!*** ./node_modules/lodash/_baseUniq.js ***!
\******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var SetCache = __webpack_require__(/*! ./_SetCache */ "./node_modules/lodash/_SetCache.js"),
arrayIncludes = __webpack_require__(/*! ./_arrayIncludes */ "./node_modules/lodash/_arrayIncludes.js"),
arrayIncludesWith = __webpack_require__(/*! ./_arrayIncludesWith */ "./node_modules/lodash/_arrayIncludesWith.js"),
cacheHas = __webpack_require__(/*! ./_cacheHas */ "./node_modules/lodash/_cacheHas.js"),
createSet = __webpack_require__(/*! ./_createSet */ "./node_modules/lodash/_createSet.js"),
setToArray = __webpack_require__(/*! ./_setToArray */ "./node_modules/lodash/_setToArray.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_cacheHas.js":
/*!******************************************!*\
!*** ./node_modules/lodash/_cacheHas.js ***!
\******************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_castPath.js":
/*!******************************************!*\
!*** ./node_modules/lodash/_castPath.js ***!
\******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
isKey = __webpack_require__(/*! ./_isKey */ "./node_modules/lodash/_isKey.js"),
stringToPath = __webpack_require__(/*! ./_stringToPath */ "./node_modules/lodash/_stringToPath.js"),
toString = __webpack_require__(/*! ./toString */ "./node_modules/lodash/toString.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_cloneArrayBuffer.js":
/*!**************************************************!*\
!*** ./node_modules/lodash/_cloneArrayBuffer.js ***!
\**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var Uint8Array = __webpack_require__(/*! ./_Uint8Array */ "./node_modules/lodash/_Uint8Array.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_cloneBuffer.js":
/*!*********************************************!*\
!*** ./node_modules/lodash/_cloneBuffer.js ***!
\*********************************************/
/***/ ((module, exports, __webpack_require__) => {
/* module decorator */ module = __webpack_require__.nmd(module);
var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_cloneTypedArray.js":
/*!*************************************************!*\
!*** ./node_modules/lodash/_cloneTypedArray.js ***!
\*************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ "./node_modules/lodash/_cloneArrayBuffer.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_copyArray.js":
/*!*******************************************!*\
!*** ./node_modules/lodash/_copyArray.js ***!
\*******************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_copyObject.js":
/*!********************************************!*\
!*** ./node_modules/lodash/_copyObject.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"),
baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_coreJsData.js":
/*!********************************************!*\
!*** ./node_modules/lodash/_coreJsData.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
/** Used to detect overreaching core-js shims. */
var coreJsData = root['__core-js_shared__'];
module.exports = coreJsData;
/***/ }),
/***/ "./node_modules/lodash/_createAssigner.js":
/*!************************************************!*\
!*** ./node_modules/lodash/_createAssigner.js ***!
\************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"),
isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_createBaseFor.js":
/*!***********************************************!*\
!*** ./node_modules/lodash/_createBaseFor.js ***!
\***********************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_createSet.js":
/*!*******************************************!*\
!*** ./node_modules/lodash/_createSet.js ***!
\*******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var Set = __webpack_require__(/*! ./_Set */ "./node_modules/lodash/_Set.js"),
noop = __webpack_require__(/*! ./noop */ "./node_modules/lodash/noop.js"),
setToArray = __webpack_require__(/*! ./_setToArray */ "./node_modules/lodash/_setToArray.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_defineProperty.js":
/*!************************************************!*\
!*** ./node_modules/lodash/_defineProperty.js ***!
\************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js");
var defineProperty = (function() {
try {
var func = getNative(Object, 'defineProperty');
func({}, '', {});
return func;
} catch (e) {}
}());
module.exports = defineProperty;
/***/ }),
/***/ "./node_modules/lodash/_equalArrays.js":
/*!*********************************************!*\
!*** ./node_modules/lodash/_equalArrays.js ***!
\*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var SetCache = __webpack_require__(/*! ./_SetCache */ "./node_modules/lodash/_SetCache.js"),
arraySome = __webpack_require__(/*! ./_arraySome */ "./node_modules/lodash/_arraySome.js"),
cacheHas = __webpack_require__(/*! ./_cacheHas */ "./node_modules/lodash/_cacheHas.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_equalByTag.js":
/*!********************************************!*\
!*** ./node_modules/lodash/_equalByTag.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"),
Uint8Array = __webpack_require__(/*! ./_Uint8Array */ "./node_modules/lodash/_Uint8Array.js"),
eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"),
equalArrays = __webpack_require__(/*! ./_equalArrays */ "./node_modules/lodash/_equalArrays.js"),
mapToArray = __webpack_require__(/*! ./_mapToArray */ "./node_modules/lodash/_mapToArray.js"),
setToArray = __webpack_require__(/*! ./_setToArray */ "./node_modules/lodash/_setToArray.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_equalObjects.js":
/*!**********************************************!*\
!*** ./node_modules/lodash/_equalObjects.js ***!
\**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var getAllKeys = __webpack_require__(/*! ./_getAllKeys */ "./node_modules/lodash/_getAllKeys.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_freeGlobal.js":
/*!********************************************!*\
!*** ./node_modules/lodash/_freeGlobal.js ***!
\********************************************/
/***/ ((module) => {
/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
module.exports = freeGlobal;
/***/ }),
/***/ "./node_modules/lodash/_getAllKeys.js":
/*!********************************************!*\
!*** ./node_modules/lodash/_getAllKeys.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseGetAllKeys = __webpack_require__(/*! ./_baseGetAllKeys */ "./node_modules/lodash/_baseGetAllKeys.js"),
getSymbols = __webpack_require__(/*! ./_getSymbols */ "./node_modules/lodash/_getSymbols.js"),
keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_getMapData.js":
/*!********************************************!*\
!*** ./node_modules/lodash/_getMapData.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isKeyable = __webpack_require__(/*! ./_isKeyable */ "./node_modules/lodash/_isKeyable.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_getMatchData.js":
/*!**********************************************!*\
!*** ./node_modules/lodash/_getMatchData.js ***!
\**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ "./node_modules/lodash/_isStrictComparable.js"),
keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_getNative.js":
/*!*******************************************!*\
!*** ./node_modules/lodash/_getNative.js ***!
\*******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseIsNative = __webpack_require__(/*! ./_baseIsNative */ "./node_modules/lodash/_baseIsNative.js"),
getValue = __webpack_require__(/*! ./_getValue */ "./node_modules/lodash/_getValue.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_getPrototype.js":
/*!**********************************************!*\
!*** ./node_modules/lodash/_getPrototype.js ***!
\**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var overArg = __webpack_require__(/*! ./_overArg */ "./node_modules/lodash/_overArg.js");
/** Built-in value references. */
var getPrototype = overArg(Object.getPrototypeOf, Object);
module.exports = getPrototype;
/***/ }),
/***/ "./node_modules/lodash/_getRawTag.js":
/*!*******************************************!*\
!*** ./node_modules/lodash/_getRawTag.js ***!
\*******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_getSymbols.js":
/*!********************************************!*\
!*** ./node_modules/lodash/_getSymbols.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var arrayFilter = __webpack_require__(/*! ./_arrayFilter */ "./node_modules/lodash/_arrayFilter.js"),
stubArray = __webpack_require__(/*! ./stubArray */ "./node_modules/lodash/stubArray.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_getTag.js":
/*!****************************************!*\
!*** ./node_modules/lodash/_getTag.js ***!
\****************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var DataView = __webpack_require__(/*! ./_DataView */ "./node_modules/lodash/_DataView.js"),
Map = __webpack_require__(/*! ./_Map */ "./node_modules/lodash/_Map.js"),
Promise = __webpack_require__(/*! ./_Promise */ "./node_modules/lodash/_Promise.js"),
Set = __webpack_require__(/*! ./_Set */ "./node_modules/lodash/_Set.js"),
WeakMap = __webpack_require__(/*! ./_WeakMap */ "./node_modules/lodash/_WeakMap.js"),
baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
toSource = __webpack_require__(/*! ./_toSource */ "./node_modules/lodash/_toSource.js");
/** `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;
/***/ }),
/***/ "./node_modules/lodash/_getValue.js":
/*!******************************************!*\
!*** ./node_modules/lodash/_getValue.js ***!
\******************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_hasPath.js":
/*!*****************************************!*\
!*** ./node_modules/lodash/_hasPath.js ***!
\*****************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var castPath = __webpack_require__(/*! ./_castPath */ "./node_modules/lodash/_castPath.js"),
isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"),
isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/lodash/_isIndex.js"),
isLength = __webpack_require__(/*! ./isLength */ "./node_modules/lodash/isLength.js"),
toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_hashClear.js":
/*!*******************************************!*\
!*** ./node_modules/lodash/_hashClear.js ***!
\*******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/lodash/_nativeCreate.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_hashDelete.js":
/*!********************************************!*\
!*** ./node_modules/lodash/_hashDelete.js ***!
\********************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_hashGet.js":
/*!*****************************************!*\
!*** ./node_modules/lodash/_hashGet.js ***!
\*****************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/lodash/_nativeCreate.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_hashHas.js":
/*!*****************************************!*\
!*** ./node_modules/lodash/_hashHas.js ***!
\*****************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/lodash/_nativeCreate.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_hashSet.js":
/*!*****************************************!*\
!*** ./node_modules/lodash/_hashSet.js ***!
\*****************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/lodash/_nativeCreate.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_initCloneObject.js":
/*!*************************************************!*\
!*** ./node_modules/lodash/_initCloneObject.js ***!
\*************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseCreate = __webpack_require__(/*! ./_baseCreate */ "./node_modules/lodash/_baseCreate.js"),
getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"),
isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_isFlattenable.js":
/*!***********************************************!*\
!*** ./node_modules/lodash/_isFlattenable.js ***!
\***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"),
isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"),
isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_isIndex.js":
/*!*****************************************!*\
!*** ./node_modules/lodash/_isIndex.js ***!
\*****************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_isIterateeCall.js":
/*!************************************************!*\
!*** ./node_modules/lodash/_isIterateeCall.js ***!
\************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"),
isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"),
isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/lodash/_isIndex.js"),
isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_isKey.js":
/*!***************************************!*\
!*** ./node_modules/lodash/_isKey.js ***!
\***************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_isKeyable.js":
/*!*******************************************!*\
!*** ./node_modules/lodash/_isKeyable.js ***!
\*******************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_isMasked.js":
/*!******************************************!*\
!*** ./node_modules/lodash/_isMasked.js ***!
\******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var coreJsData = __webpack_require__(/*! ./_coreJsData */ "./node_modules/lodash/_coreJsData.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_isPrototype.js":
/*!*********************************************!*\
!*** ./node_modules/lodash/_isPrototype.js ***!
\*********************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_isStrictComparable.js":
/*!****************************************************!*\
!*** ./node_modules/lodash/_isStrictComparable.js ***!
\****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_listCacheClear.js":
/*!************************************************!*\
!*** ./node_modules/lodash/_listCacheClear.js ***!
\************************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_listCacheDelete.js":
/*!*************************************************!*\
!*** ./node_modules/lodash/_listCacheDelete.js ***!
\*************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_listCacheGet.js":
/*!**********************************************!*\
!*** ./node_modules/lodash/_listCacheGet.js ***!
\**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_listCacheHas.js":
/*!**********************************************!*\
!*** ./node_modules/lodash/_listCacheHas.js ***!
\**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_listCacheSet.js":
/*!**********************************************!*\
!*** ./node_modules/lodash/_listCacheSet.js ***!
\**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_mapCacheClear.js":
/*!***********************************************!*\
!*** ./node_modules/lodash/_mapCacheClear.js ***!
\***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var Hash = __webpack_require__(/*! ./_Hash */ "./node_modules/lodash/_Hash.js"),
ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/lodash/_ListCache.js"),
Map = __webpack_require__(/*! ./_Map */ "./node_modules/lodash/_Map.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_mapCacheDelete.js":
/*!************************************************!*\
!*** ./node_modules/lodash/_mapCacheDelete.js ***!
\************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/lodash/_getMapData.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_mapCacheGet.js":
/*!*********************************************!*\
!*** ./node_modules/lodash/_mapCacheGet.js ***!
\*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/lodash/_getMapData.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_mapCacheHas.js":
/*!*********************************************!*\
!*** ./node_modules/lodash/_mapCacheHas.js ***!
\*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/lodash/_getMapData.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_mapCacheSet.js":
/*!*********************************************!*\
!*** ./node_modules/lodash/_mapCacheSet.js ***!
\*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/lodash/_getMapData.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_mapToArray.js":
/*!********************************************!*\
!*** ./node_modules/lodash/_mapToArray.js ***!
\********************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_matchesStrictComparable.js":
/*!*********************************************************!*\
!*** ./node_modules/lodash/_matchesStrictComparable.js ***!
\*********************************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_memoizeCapped.js":
/*!***********************************************!*\
!*** ./node_modules/lodash/_memoizeCapped.js ***!
\***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var memoize = __webpack_require__(/*! ./memoize */ "./node_modules/lodash/memoize.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_nativeCreate.js":
/*!**********************************************!*\
!*** ./node_modules/lodash/_nativeCreate.js ***!
\**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js");
/* Built-in method references that are verified to be native. */
var nativeCreate = getNative(Object, 'create');
module.exports = nativeCreate;
/***/ }),
/***/ "./node_modules/lodash/_nativeKeys.js":
/*!********************************************!*\
!*** ./node_modules/lodash/_nativeKeys.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var overArg = __webpack_require__(/*! ./_overArg */ "./node_modules/lodash/_overArg.js");
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeKeys = overArg(Object.keys, Object);
module.exports = nativeKeys;
/***/ }),
/***/ "./node_modules/lodash/_nativeKeysIn.js":
/*!**********************************************!*\
!*** ./node_modules/lodash/_nativeKeysIn.js ***!
\**********************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_nodeUtil.js":
/*!******************************************!*\
!*** ./node_modules/lodash/_nodeUtil.js ***!
\******************************************/
/***/ ((module, exports, __webpack_require__) => {
/* module decorator */ module = __webpack_require__.nmd(module);
var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_objectToString.js":
/*!************************************************!*\
!*** ./node_modules/lodash/_objectToString.js ***!
\************************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_overArg.js":
/*!*****************************************!*\
!*** ./node_modules/lodash/_overArg.js ***!
\*****************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_overRest.js":
/*!******************************************!*\
!*** ./node_modules/lodash/_overRest.js ***!
\******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var apply = __webpack_require__(/*! ./_apply */ "./node_modules/lodash/_apply.js");
/* 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;
/***/ }),
/***/ "./node_modules/lodash/_root.js":
/*!**************************************!*\
!*** ./node_modules/lodash/_root.js ***!
\**************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js");
/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();
module.exports = root;
/***/ }),
/***/ "./node_modules/lodash/_safeGet.js":
/*!*****************************************!*\
!*** ./node_modules/lodash/_safeGet.js ***!
\*****************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_setCacheAdd.js":
/*!*********************************************!*\
!*** ./node_modules/lodash/_setCacheAdd.js ***!
\*********************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_setCacheHas.js":
/*!*********************************************!*\
!*** ./node_modules/lodash/_setCacheHas.js ***!
\*********************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_setToArray.js":
/*!********************************************!*\
!*** ./node_modules/lodash/_setToArray.js ***!
\********************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_setToString.js":
/*!*********************************************!*\
!*** ./node_modules/lodash/_setToString.js ***!
\*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseSetToString = __webpack_require__(/*! ./_baseSetToString */ "./node_modules/lodash/_baseSetToString.js"),
shortOut = __webpack_require__(/*! ./_shortOut */ "./node_modules/lodash/_shortOut.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_shortOut.js":
/*!******************************************!*\
!*** ./node_modules/lodash/_shortOut.js ***!
\******************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_stackClear.js":
/*!********************************************!*\
!*** ./node_modules/lodash/_stackClear.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/lodash/_ListCache.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/_stackDelete.js":
/*!*********************************************!*\
!*** ./node_modules/lodash/_stackDelete.js ***!
\*********************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_stackGet.js":
/*!******************************************!*\
!*** ./node_modules/lodash/_stackGet.js ***!
\******************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_stackHas.js":
/*!******************************************!*\
!*** ./node_modules/lodash/_stackHas.js ***!
\******************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_stackSet.js":
/*!******************************************!*\
!*** ./node_modules/lodash/_stackSet.js ***!
\******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/lodash/_ListCache.js"),
Map = __webpack_require__(/*! ./_Map */ "./node_modules/lodash/_Map.js"),
MapCache = __webpack_require__(/*! ./_MapCache */ "./node_modules/lodash/_MapCache.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_strictIndexOf.js":
/*!***********************************************!*\
!*** ./node_modules/lodash/_strictIndexOf.js ***!
\***********************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/_stringToPath.js":
/*!**********************************************!*\
!*** ./node_modules/lodash/_stringToPath.js ***!
\**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var memoizeCapped = __webpack_require__(/*! ./_memoizeCapped */ "./node_modules/lodash/_memoizeCapped.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_toKey.js":
/*!***************************************!*\
!*** ./node_modules/lodash/_toKey.js ***!
\***************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/_toSource.js":
/*!******************************************!*\
!*** ./node_modules/lodash/_toSource.js ***!
\******************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/concat.js":
/*!***************************************!*\
!*** ./node_modules/lodash/concat.js ***!
\***************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var arrayPush = __webpack_require__(/*! ./_arrayPush */ "./node_modules/lodash/_arrayPush.js"),
baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "./node_modules/lodash/_baseFlatten.js"),
copyArray = __webpack_require__(/*! ./_copyArray */ "./node_modules/lodash/_copyArray.js"),
isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js");
/**
* Creates a new array concatenating `array` with any additional arrays
* and/or values.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to concatenate.
* @param {...*} [values] The values to concatenate.
* @returns {Array} Returns the new concatenated array.
* @example
*
* var array = [1];
* var other = _.concat(array, 2, [3], [[4]]);
*
* console.log(other);
* // => [1, 2, 3, [4]]
*
* console.log(array);
* // => [1]
*/
function concat() {
var length = arguments.length;
if (!length) {
return [];
}
var args = Array(length - 1),
array = arguments[0],
index = length;
while (index--) {
args[index - 1] = arguments[index];
}
return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
}
module.exports = concat;
/***/ }),
/***/ "./node_modules/lodash/constant.js":
/*!*****************************************!*\
!*** ./node_modules/lodash/constant.js ***!
\*****************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/eq.js":
/*!***********************************!*\
!*** ./node_modules/lodash/eq.js ***!
\***********************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/flatten.js":
/*!****************************************!*\
!*** ./node_modules/lodash/flatten.js ***!
\****************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "./node_modules/lodash/_baseFlatten.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/get.js":
/*!************************************!*\
!*** ./node_modules/lodash/get.js ***!
\************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseGet = __webpack_require__(/*! ./_baseGet */ "./node_modules/lodash/_baseGet.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/hasIn.js":
/*!**************************************!*\
!*** ./node_modules/lodash/hasIn.js ***!
\**************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseHasIn = __webpack_require__(/*! ./_baseHasIn */ "./node_modules/lodash/_baseHasIn.js"),
hasPath = __webpack_require__(/*! ./_hasPath */ "./node_modules/lodash/_hasPath.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/identity.js":
/*!*****************************************!*\
!*** ./node_modules/lodash/identity.js ***!
\*****************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/isArguments.js":
/*!********************************************!*\
!*** ./node_modules/lodash/isArguments.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseIsArguments = __webpack_require__(/*! ./_baseIsArguments */ "./node_modules/lodash/_baseIsArguments.js"),
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/isArray.js":
/*!****************************************!*\
!*** ./node_modules/lodash/isArray.js ***!
\****************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/isArrayLike.js":
/*!********************************************!*\
!*** ./node_modules/lodash/isArrayLike.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"),
isLength = __webpack_require__(/*! ./isLength */ "./node_modules/lodash/isLength.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/isArrayLikeObject.js":
/*!**************************************************!*\
!*** ./node_modules/lodash/isArrayLikeObject.js ***!
\**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"),
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/isBuffer.js":
/*!*****************************************!*\
!*** ./node_modules/lodash/isBuffer.js ***!
\*****************************************/
/***/ ((module, exports, __webpack_require__) => {
/* module decorator */ module = __webpack_require__.nmd(module);
var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"),
stubFalse = __webpack_require__(/*! ./stubFalse */ "./node_modules/lodash/stubFalse.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/isFunction.js":
/*!*******************************************!*\
!*** ./node_modules/lodash/isFunction.js ***!
\*******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js");
/** `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;
/***/ }),
/***/ "./node_modules/lodash/isLength.js":
/*!*****************************************!*\
!*** ./node_modules/lodash/isLength.js ***!
\*****************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/isObject.js":
/*!*****************************************!*\
!*** ./node_modules/lodash/isObject.js ***!
\*****************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/isObjectLike.js":
/*!*********************************************!*\
!*** ./node_modules/lodash/isObjectLike.js ***!
\*********************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/isPlainObject.js":
/*!**********************************************!*\
!*** ./node_modules/lodash/isPlainObject.js ***!
\**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"),
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
/** `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;
/***/ }),
/***/ "./node_modules/lodash/isSymbol.js":
/*!*****************************************!*\
!*** ./node_modules/lodash/isSymbol.js ***!
\*****************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
/** `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;
/***/ }),
/***/ "./node_modules/lodash/isTypedArray.js":
/*!*********************************************!*\
!*** ./node_modules/lodash/isTypedArray.js ***!
\*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseIsTypedArray = __webpack_require__(/*! ./_baseIsTypedArray */ "./node_modules/lodash/_baseIsTypedArray.js"),
baseUnary = __webpack_require__(/*! ./_baseUnary */ "./node_modules/lodash/_baseUnary.js"),
nodeUtil = __webpack_require__(/*! ./_nodeUtil */ "./node_modules/lodash/_nodeUtil.js");
/* 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;
/***/ }),
/***/ "./node_modules/lodash/keys.js":
/*!*************************************!*\
!*** ./node_modules/lodash/keys.js ***!
\*************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ "./node_modules/lodash/_arrayLikeKeys.js"),
baseKeys = __webpack_require__(/*! ./_baseKeys */ "./node_modules/lodash/_baseKeys.js"),
isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/keysIn.js":
/*!***************************************!*\
!*** ./node_modules/lodash/keysIn.js ***!
\***************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ "./node_modules/lodash/_arrayLikeKeys.js"),
baseKeysIn = __webpack_require__(/*! ./_baseKeysIn */ "./node_modules/lodash/_baseKeysIn.js"),
isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/memoize.js":
/*!****************************************!*\
!*** ./node_modules/lodash/memoize.js ***!
\****************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var MapCache = __webpack_require__(/*! ./_MapCache */ "./node_modules/lodash/_MapCache.js");
/** 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;
/***/ }),
/***/ "./node_modules/lodash/merge.js":
/*!**************************************!*\
!*** ./node_modules/lodash/merge.js ***!
\**************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseMerge = __webpack_require__(/*! ./_baseMerge */ "./node_modules/lodash/_baseMerge.js"),
createAssigner = __webpack_require__(/*! ./_createAssigner */ "./node_modules/lodash/_createAssigner.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/noop.js":
/*!*************************************!*\
!*** ./node_modules/lodash/noop.js ***!
\*************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/property.js":
/*!*****************************************!*\
!*** ./node_modules/lodash/property.js ***!
\*****************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseProperty = __webpack_require__(/*! ./_baseProperty */ "./node_modules/lodash/_baseProperty.js"),
basePropertyDeep = __webpack_require__(/*! ./_basePropertyDeep */ "./node_modules/lodash/_basePropertyDeep.js"),
isKey = __webpack_require__(/*! ./_isKey */ "./node_modules/lodash/_isKey.js"),
toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/stubArray.js":
/*!******************************************!*\
!*** ./node_modules/lodash/stubArray.js ***!
\******************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/stubFalse.js":
/*!******************************************!*\
!*** ./node_modules/lodash/stubFalse.js ***!
\******************************************/
/***/ ((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;
/***/ }),
/***/ "./node_modules/lodash/toPlainObject.js":
/*!**********************************************!*\
!*** ./node_modules/lodash/toPlainObject.js ***!
\**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"),
keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/toString.js":
/*!*****************************************!*\
!*** ./node_modules/lodash/toString.js ***!
\*****************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseToString = __webpack_require__(/*! ./_baseToString */ "./node_modules/lodash/_baseToString.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/lodash/uniqBy.js":
/*!***************************************!*\
!*** ./node_modules/lodash/uniqBy.js ***!
\***************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"),
baseUniq = __webpack_require__(/*! ./_baseUniq */ "./node_modules/lodash/_baseUniq.js");
/**
* 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;
/***/ }),
/***/ "./node_modules/mdast-add-list-metadata/index.js":
/*!*******************************************************!*\
!*** ./node_modules/mdast-add-list-metadata/index.js ***!
\*******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var visitWithParents = __webpack_require__(/*! unist-util-visit-parents */ "./node_modules/mdast-add-list-metadata/node_modules/unist-util-visit-parents/index.js");
function addListMetadata() {
return function (ast) {
visitWithParents(ast, 'list', function (listNode, parents) {
var depth = 0, i, n;
for (i = 0, n = parents.length; i < n; i++) {
if (parents[i].type === 'list') depth += 1;
}
for (i = 0, n = listNode.children.length; i < n; i++) {
var child = listNode.children[i];
child.index = i;
child.ordered = listNode.ordered;
}
listNode.depth = depth;
});
return ast;
};
}
module.exports = addListMetadata;
/***/ }),
/***/ "./node_modules/mdast-add-list-metadata/node_modules/unist-util-visit-parents/index.js":
/*!*********************************************************************************************!*\
!*** ./node_modules/mdast-add-list-metadata/node_modules/unist-util-visit-parents/index.js ***!
\*********************************************************************************************/
/***/ ((module) => {
"use strict";
/* Expose. */
module.exports = visitParents
/* Visit. */
function visitParents(tree, type, visitor) {
var stack = []
if (typeof type === 'function') {
visitor = type
type = null
}
one(tree)
/* Visit a single node. */
function one(node) {
var result
if (!type || node.type === type) {
result = visitor(node, stack.concat())
}
if (node.children && result !== false) {
return all(node.children, node)
}
return result
}
/* Visit children in `parent`. */
function all(children, parent) {
var length = children.length
var index = -1
var child
stack.push(parent)
while (++index < length) {
child = children[index]
if (child && one(child) === false) {
return false
}
}
stack.pop()
return true
}
}
/***/ }),
/***/ "./node_modules/mdast-util-from-markdown/dist/index.js":
/*!*************************************************************!*\
!*** ./node_modules/mdast-util-from-markdown/dist/index.js ***!
\*************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
module.exports = fromMarkdown
// These three are compiled away in the `dist/`
var toString = __webpack_require__(/*! mdast-util-to-string */ "./node_modules/mdast-util-to-string/index.js")
var assign = __webpack_require__(/*! micromark/dist/constant/assign */ "./node_modules/micromark/dist/constant/assign.js")
var own = __webpack_require__(/*! micromark/dist/constant/has-own-property */ "./node_modules/micromark/dist/constant/has-own-property.js")
var normalizeIdentifier = __webpack_require__(/*! micromark/dist/util/normalize-identifier */ "./node_modules/micromark/dist/util/normalize-identifier.js")
var safeFromInt = __webpack_require__(/*! micromark/dist/util/safe-from-int */ "./node_modules/micromark/dist/util/safe-from-int.js")
var parser = __webpack_require__(/*! micromark/dist/parse */ "./node_modules/micromark/dist/parse.js")
var preprocessor = __webpack_require__(/*! micromark/dist/preprocess */ "./node_modules/micromark/dist/preprocess.js")
var postprocess = __webpack_require__(/*! micromark/dist/postprocess */ "./node_modules/micromark/dist/postprocess.js")
var decode = __webpack_require__(/*! parse-entities/decode-entity */ "./node_modules/parse-entities/decode-entity.js")
var stringifyPosition = __webpack_require__(/*! unist-util-stringify-position */ "./node_modules/unist-util-stringify-position/index.js")
function fromMarkdown(value, encoding, options) {
if (typeof encoding !== 'string') {
options = encoding
encoding = undefined
}
return compiler(options)(
postprocess(
parser(options).document().write(preprocessor()(value, encoding, true))
)
)
}
// Note this compiler only understand complete buffering, not streaming.
function compiler(options) {
var settings = options || {}
var config = configure(
{
transforms: [],
canContainEols: [
'emphasis',
'fragment',
'heading',
'paragraph',
'strong'
],
enter: {
autolink: opener(link),
autolinkProtocol: onenterdata,
autolinkEmail: onenterdata,
atxHeading: opener(heading),
blockQuote: opener(blockQuote),
characterEscape: onenterdata,
characterReference: onenterdata,
codeFenced: opener(codeFlow),
codeFencedFenceInfo: buffer,
codeFencedFenceMeta: buffer,
codeIndented: opener(codeFlow, buffer),
codeText: opener(codeText, buffer),
codeTextData: onenterdata,
data: onenterdata,
codeFlowValue: onenterdata,
definition: opener(definition),
definitionDestinationString: buffer,
definitionLabelString: buffer,
definitionTitleString: buffer,
emphasis: opener(emphasis),
hardBreakEscape: opener(hardBreak),
hardBreakTrailing: opener(hardBreak),
htmlFlow: opener(html, buffer),
htmlFlowData: onenterdata,
htmlText: opener(html, buffer),
htmlTextData: onenterdata,
image: opener(image),
label: buffer,
link: opener(link),
listItem: opener(listItem),
listItemValue: onenterlistitemvalue,
listOrdered: opener(list, onenterlistordered),
listUnordered: opener(list),
paragraph: opener(paragraph),
reference: onenterreference,
referenceString: buffer,
resourceDestinationString: buffer,
resourceTitleString: buffer,
setextHeading: opener(heading),
strong: opener(strong),
thematicBreak: opener(thematicBreak)
},
exit: {
atxHeading: closer(),
atxHeadingSequence: onexitatxheadingsequence,
autolink: closer(),
autolinkEmail: onexitautolinkemail,
autolinkProtocol: onexitautolinkprotocol,
blockQuote: closer(),
characterEscapeValue: onexitdata,
characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker,
characterReferenceMarkerNumeric: onexitcharacterreferencemarker,
characterReferenceValue: onexitcharacterreferencevalue,
codeFenced: closer(onexitcodefenced),
codeFencedFence: onexitcodefencedfence,
codeFencedFenceInfo: onexitcodefencedfenceinfo,
codeFencedFenceMeta: onexitcodefencedfencemeta,
codeFlowValue: onexitdata,
codeIndented: closer(onexitcodeindented),
codeText: closer(onexitcodetext),
codeTextData: onexitdata,
data: onexitdata,
definition: closer(),
definitionDestinationString: onexitdefinitiondestinationstring,
definitionLabelString: onexitdefinitionlabelstring,
definitionTitleString: onexitdefinitiontitlestring,
emphasis: closer(),
hardBreakEscape: closer(onexithardbreak),
hardBreakTrailing: closer(onexithardbreak),
htmlFlow: closer(onexithtmlflow),
htmlFlowData: onexitdata,
htmlText: closer(onexithtmltext),
htmlTextData: onexitdata,
image: closer(onexitimage),
label: onexitlabel,
labelText: onexitlabeltext,
lineEnding: onexitlineending,
link: closer(onexitlink),
listItem: closer(),
listOrdered: closer(),
listUnordered: closer(),
paragraph: closer(),
referenceString: onexitreferencestring,
resourceDestinationString: onexitresourcedestinationstring,
resourceTitleString: onexitresourcetitlestring,
resource: onexitresource,
setextHeading: closer(onexitsetextheading),
setextHeadingLineSequence: onexitsetextheadinglinesequence,
setextHeadingText: onexitsetextheadingtext,
strong: closer(),
thematicBreak: closer()
}
},
settings.mdastExtensions || []
)
var data = {}
return compile
function compile(events) {
var tree = {type: 'root', children: []}
var stack = [tree]
var tokenStack = []
var listStack = []
var index = -1
var handler
var listStart
var context = {
stack: stack,
tokenStack: tokenStack,
config: config,
enter: enter,
exit: exit,
buffer: buffer,
resume: resume,
setData: setData,
getData: getData
}
while (++index < events.length) {
// We preprocess lists to add `listItem` tokens, and to infer whether
// items the list itself are spread out.
if (
events[index][1].type === 'listOrdered' ||
events[index][1].type === 'listUnordered'
) {
if (events[index][0] === 'enter') {
listStack.push(index)
} else {
listStart = listStack.pop(index)
index = prepareList(events, listStart, index)
}
}
}
index = -1
while (++index < events.length) {
handler = config[events[index][0]]
if (own.call(handler, events[index][1].type)) {
handler[events[index][1].type].call(
assign({sliceSerialize: events[index][2].sliceSerialize}, context),
events[index][1]
)
}
}
if (tokenStack.length) {
throw new Error(
'Cannot close document, a token (`' +
tokenStack[tokenStack.length - 1].type +
'`, ' +
stringifyPosition({
start: tokenStack[tokenStack.length - 1].start,
end: tokenStack[tokenStack.length - 1].end
}) +
') is still open'
)
}
// Figure out `root` position.
tree.position = {
start: point(
events.length ? events[0][1].start : {line: 1, column: 1, offset: 0}
),
end: point(
events.length
? events[events.length - 2][1].end
: {line: 1, column: 1, offset: 0}
)
}
index = -1
while (++index < config.transforms.length) {
tree = config.transforms[index](tree) || tree
}
return tree
}
function prepareList(events, start, length) {
var index = start - 1
var containerBalance = -1
var listSpread = false
var listItem
var tailIndex
var lineIndex
var tailEvent
var event
var firstBlankLineIndex
var atMarker
while (++index <= length) {
event = events[index]
if (
event[1].type === 'listUnordered' ||
event[1].type === 'listOrdered' ||
event[1].type === 'blockQuote'
) {
if (event[0] === 'enter') {
containerBalance++
} else {
containerBalance--
}
atMarker = undefined
} else if (event[1].type === 'lineEndingBlank') {
if (event[0] === 'enter') {
if (
listItem &&
!atMarker &&
!containerBalance &&
!firstBlankLineIndex
) {
firstBlankLineIndex = index
}
atMarker = undefined
}
} else if (
event[1].type === 'linePrefix' ||
event[1].type === 'listItemValue' ||
event[1].type === 'listItemMarker' ||
event[1].type === 'listItemPrefix' ||
event[1].type === 'listItemPrefixWhitespace'
) {
// Empty.
} else {
atMarker = undefined
}
if (
(!containerBalance &&
event[0] === 'enter' &&
event[1].type === 'listItemPrefix') ||
(containerBalance === -1 &&
event[0] === 'exit' &&
(event[1].type === 'listUnordered' ||
event[1].type === 'listOrdered'))
) {
if (listItem) {
tailIndex = index
lineIndex = undefined
while (tailIndex--) {
tailEvent = events[tailIndex]
if (
tailEvent[1].type === 'lineEnding' ||
tailEvent[1].type === 'lineEndingBlank'
) {
if (tailEvent[0] === 'exit') continue
if (lineIndex) {
events[lineIndex][1].type = 'lineEndingBlank'
listSpread = true
}
tailEvent[1].type = 'lineEnding'
lineIndex = tailIndex
} else if (
tailEvent[1].type === 'linePrefix' ||
tailEvent[1].type === 'blockQuotePrefix' ||
tailEvent[1].type === 'blockQuotePrefixWhitespace' ||
tailEvent[1].type === 'blockQuoteMarker' ||
tailEvent[1].type === 'listItemIndent'
) {
// Empty
} else {
break
}
}
if (
firstBlankLineIndex &&
(!lineIndex || firstBlankLineIndex < lineIndex)
) {
listItem._spread = true
}
// Fix position.
listItem.end = point(
lineIndex ? events[lineIndex][1].start : event[1].end
)
events.splice(lineIndex || index, 0, ['exit', listItem, event[2]])
index++
length++
}
// Create a new list item.
if (event[1].type === 'listItemPrefix') {
listItem = {
type: 'listItem',
_spread: false,
start: point(event[1].start)
}
events.splice(index, 0, ['enter', listItem, event[2]])
index++
length++
firstBlankLineIndex = undefined
atMarker = true
}
}
}
events[start][1]._spread = listSpread
return length
}
function setData(key, value) {
data[key] = value
}
function getData(key) {
return data[key]
}
function point(d) {
return {line: d.line, column: d.column, offset: d.offset}
}
function opener(create, and) {
return open
function open(token) {
enter.call(this, create(token), token)
if (and) and.call(this, token)
}
}
function buffer() {
this.stack.push({type: 'fragment', children: []})
}
function enter(node, token) {
this.stack[this.stack.length - 1].children.push(node)
this.stack.push(node)
this.tokenStack.push(token)
node.position = {start: point(token.start)}
return node
}
function closer(and) {
return close
function close(token) {
if (and) and.call(this, token)
exit.call(this, token)
}
}
function exit(token) {
var node = this.stack.pop()
var open = this.tokenStack.pop()
if (!open) {
throw new Error(
'Cannot close `' +
token.type +
'` (' +
stringifyPosition({start: token.start, end: token.end}) +
'): it’s not open'
)
} else if (open.type !== token.type) {
throw new Error(
'Cannot close `' +
token.type +
'` (' +
stringifyPosition({start: token.start, end: token.end}) +
'): a different token (`' +
open.type +
'`, ' +
stringifyPosition({start: open.start, end: open.end}) +
') is open'
)
}
node.position.end = point(token.end)
return node
}
function resume() {
return toString(this.stack.pop())
}
//
// Handlers.
//
function onenterlistordered() {
setData('expectingFirstListItemValue', true)
}
function onenterlistitemvalue(token) {
if (getData('expectingFirstListItemValue')) {
this.stack[this.stack.length - 2].start = parseInt(
this.sliceSerialize(token),
10
)
setData('expectingFirstListItemValue')
}
}
function onexitcodefencedfenceinfo() {
var data = this.resume()
this.stack[this.stack.length - 1].lang = data
}
function onexitcodefencedfencemeta() {
var data = this.resume()
this.stack[this.stack.length - 1].meta = data
}
function onexitcodefencedfence() {
// Exit if this is the closing fence.
if (getData('flowCodeInside')) return
this.buffer()
setData('flowCodeInside', true)
}
function onexitcodefenced() {
var data = this.resume()
this.stack[this.stack.length - 1].value = data.replace(
/^(\r?\n|\r)|(\r?\n|\r)$/g,
''
)
setData('flowCodeInside')
}
function onexitcodeindented() {
var data = this.resume()
this.stack[this.stack.length - 1].value = data
}
function onexitdefinitionlabelstring(token) {
// Discard label, use the source content instead.
var label = this.resume()
this.stack[this.stack.length - 1].label = label
this.stack[this.stack.length - 1].identifier = normalizeIdentifier(
this.sliceSerialize(token)
).toLowerCase()
}
function onexitdefinitiontitlestring() {
var data = this.resume()
this.stack[this.stack.length - 1].title = data
}
function onexitdefinitiondestinationstring() {
var data = this.resume()
this.stack[this.stack.length - 1].url = data
}
function onexitatxheadingsequence(token) {
if (!this.stack[this.stack.length - 1].depth) {
this.stack[this.stack.length - 1].depth = this.sliceSerialize(
token
).length
}
}
function onexitsetextheadingtext() {
setData('setextHeadingSlurpLineEnding', true)
}
function onexitsetextheadinglinesequence(token) {
this.stack[this.stack.length - 1].depth =
this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2
}
function onexitsetextheading() {
setData('setextHeadingSlurpLineEnding')
}
function onenterdata(token) {
var siblings = this.stack[this.stack.length - 1].children
var tail = siblings[siblings.length - 1]
if (!tail || tail.type !== 'text') {
// Add a new text node.
tail = text()
tail.position = {start: point(token.start)}
this.stack[this.stack.length - 1].children.push(tail)
}
this.stack.push(tail)
}
function onexitdata(token) {
var tail = this.stack.pop()
tail.value += this.sliceSerialize(token)
tail.position.end = point(token.end)
}
function onexitlineending(token) {
var context = this.stack[this.stack.length - 1]
// If we’re at a hard break, include the line ending in there.
if (getData('atHardBreak')) {
context.children[context.children.length - 1].position.end = point(
token.end
)
setData('atHardBreak')
return
}
if (
!getData('setextHeadingSlurpLineEnding') &&
config.canContainEols.indexOf(context.type) > -1
) {
onenterdata.call(this, token)
onexitdata.call(this, token)
}
}
function onexithardbreak() {
setData('atHardBreak', true)
}
function onexithtmlflow() {
var data = this.resume()
this.stack[this.stack.length - 1].value = data
}
function onexithtmltext() {
var data = this.resume()
this.stack[this.stack.length - 1].value = data
}
function onexitcodetext() {
var data = this.resume()
this.stack[this.stack.length - 1].value = data
}
function onexitlink() {
var context = this.stack[this.stack.length - 1]
// To do: clean.
if (getData('inReference')) {
context.type += 'Reference'
context.referenceType = getData('referenceType') || 'shortcut'
delete context.url
delete context.title
} else {
delete context.identifier
delete context.label
delete context.referenceType
}
setData('referenceType')
}
function onexitimage() {
var context = this.stack[this.stack.length - 1]
// To do: clean.
if (getData('inReference')) {
context.type += 'Reference'
context.referenceType = getData('referenceType') || 'shortcut'
delete context.url
delete context.title
} else {
delete context.identifier
delete context.label
delete context.referenceType
}
setData('referenceType')
}
function onexitlabeltext(token) {
this.stack[this.stack.length - 2].identifier = normalizeIdentifier(
this.sliceSerialize(token)
).toLowerCase()
}
function onexitlabel() {
var fragment = this.stack[this.stack.length - 1]
var value = this.resume()
this.stack[this.stack.length - 1].label = value
// Assume a reference.
setData('inReference', true)
if (this.stack[this.stack.length - 1].type === 'link') {
this.stack[this.stack.length - 1].children = fragment.children
} else {
this.stack[this.stack.length - 1].alt = value
}
}
function onexitresourcedestinationstring() {
var data = this.resume()
this.stack[this.stack.length - 1].url = data
}
function onexitresourcetitlestring() {
var data = this.resume()
this.stack[this.stack.length - 1].title = data
}
function onexitresource() {
setData('inReference')
}
function onenterreference() {
setData('referenceType', 'collapsed')
}
function onexitreferencestring(token) {
var label = this.resume()
this.stack[this.stack.length - 1].label = label
this.stack[this.stack.length - 1].identifier = normalizeIdentifier(
this.sliceSerialize(token)
).toLowerCase()
setData('referenceType', 'full')
}
function onexitcharacterreferencemarker(token) {
setData('characterReferenceType', token.type)
}
function onexitcharacterreferencevalue(token) {
var data = this.sliceSerialize(token)
var type = getData('characterReferenceType')
var value
var tail
if (type) {
value = safeFromInt(
data,
type === 'characterReferenceMarkerNumeric' ? 10 : 16
)
setData('characterReferenceType')
} else {
value = decode(data)
}
tail = this.stack.pop()
tail.value += value
tail.position.end = point(token.end)
}
function onexitautolinkprotocol(token) {
onexitdata.call(this, token)
this.stack[this.stack.length - 1].url = this.sliceSerialize(token)
}
function onexitautolinkemail(token) {
onexitdata.call(this, token)
this.stack[this.stack.length - 1].url =
'mailto:' + this.sliceSerialize(token)
}
//
// Creaters.
//
function blockQuote() {
return {type: 'blockquote', children: []}
}
function codeFlow() {
return {type: 'code', lang: null, meta: null, value: ''}
}
function codeText() {
return {type: 'inlineCode', value: ''}
}
function definition() {
return {
type: 'definition',
identifier: '',
label: null,
title: null,
url: ''
}
}
function emphasis() {
return {type: 'emphasis', children: []}
}
function heading() {
return {type: 'heading', depth: undefined, children: []}
}
function hardBreak() {
return {type: 'break'}
}
function html() {
return {type: 'html', value: ''}
}
function image() {
return {type: 'image', title: null, url: '', alt: null}
}
function link() {
return {type: 'link', title: null, url: '', children: []}
}
function list(token) {
return {
type: 'list',
ordered: token.type === 'listOrdered',
start: null,
spread: token._spread,
children: []
}
}
function listItem(token) {
return {
type: 'listItem',
spread: token._spread,
checked: null,
children: []
}
}
function paragraph() {
return {type: 'paragraph', children: []}
}
function strong() {
return {type: 'strong', children: []}
}
function text() {
return {type: 'text', value: ''}
}
function thematicBreak() {
return {type: 'thematicBreak'}
}
}
function configure(config, extensions) {
var index = -1
while (++index < extensions.length) {
extension(config, extensions[index])
}
return config
}
function extension(config, extension) {
var key
var left
for (key in extension) {
left = own.call(config, key) ? config[key] : (config[key] = {})
if (key === 'canContainEols' || key === 'transforms') {
config[key] = [].concat(left, extension[key])
} else {
Object.assign(left, extension[key])
}
}
}
/***/ }),
/***/ "./node_modules/mdast-util-from-markdown/index.js":
/*!********************************************************!*\
!*** ./node_modules/mdast-util-from-markdown/index.js ***!
\********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
module.exports = __webpack_require__(/*! ./dist */ "./node_modules/mdast-util-from-markdown/dist/index.js")
/***/ }),
/***/ "./node_modules/mdast-util-to-string/index.js":
/*!****************************************************!*\
!*** ./node_modules/mdast-util-to-string/index.js ***!
\****************************************************/
/***/ ((module) => {
"use strict";
module.exports = toString
// Get the text content of a node.
// Prefer the node’s plain-text fields, otherwise serialize its children,
// and if the given value is an array, serialize the nodes in it.
function toString(node) {
return (
(node &&
(node.value ||
node.alt ||
node.title ||
('children' in node && all(node.children)) ||
('length' in node && all(node)))) ||
''
)
}
function all(values) {
var result = []
var index = -1
while (++index < values.length) {
result[index] = toString(values[index])
}
return result.join('')
}
/***/ }),
/***/ "./node_modules/micromark/dist/character/ascii-alpha.js":
/*!**************************************************************!*\
!*** ./node_modules/micromark/dist/character/ascii-alpha.js ***!
\**************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var regexCheck = __webpack_require__(/*! ../util/regex-check.js */ "./node_modules/micromark/dist/util/regex-check.js")
var asciiAlpha = regexCheck(/[A-Za-z]/)
module.exports = asciiAlpha
/***/ }),
/***/ "./node_modules/micromark/dist/character/ascii-alphanumeric.js":
/*!*********************************************************************!*\
!*** ./node_modules/micromark/dist/character/ascii-alphanumeric.js ***!
\*********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var regexCheck = __webpack_require__(/*! ../util/regex-check.js */ "./node_modules/micromark/dist/util/regex-check.js")
var asciiAlphanumeric = regexCheck(/[\dA-Za-z]/)
module.exports = asciiAlphanumeric
/***/ }),
/***/ "./node_modules/micromark/dist/character/ascii-atext.js":
/*!**************************************************************!*\
!*** ./node_modules/micromark/dist/character/ascii-atext.js ***!
\**************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var regexCheck = __webpack_require__(/*! ../util/regex-check.js */ "./node_modules/micromark/dist/util/regex-check.js")
var asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/)
module.exports = asciiAtext
/***/ }),
/***/ "./node_modules/micromark/dist/character/ascii-control.js":
/*!****************************************************************!*\
!*** ./node_modules/micromark/dist/character/ascii-control.js ***!
\****************************************************************/
/***/ ((module) => {
"use strict";
// Note: EOF is seen as ASCII control here, because `null < 32 == true`.
function asciiControl(code) {
return (
// Special whitespace codes (which have negative values), C0 and Control
// character DEL
code < 32 || code === 127
)
}
module.exports = asciiControl
/***/ }),
/***/ "./node_modules/micromark/dist/character/ascii-digit.js":
/*!**************************************************************!*\
!*** ./node_modules/micromark/dist/character/ascii-digit.js ***!
\**************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var regexCheck = __webpack_require__(/*! ../util/regex-check.js */ "./node_modules/micromark/dist/util/regex-check.js")
var asciiDigit = regexCheck(/\d/)
module.exports = asciiDigit
/***/ }),
/***/ "./node_modules/micromark/dist/character/ascii-hex-digit.js":
/*!******************************************************************!*\
!*** ./node_modules/micromark/dist/character/ascii-hex-digit.js ***!
\******************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var regexCheck = __webpack_require__(/*! ../util/regex-check.js */ "./node_modules/micromark/dist/util/regex-check.js")
var asciiHexDigit = regexCheck(/[\dA-Fa-f]/)
module.exports = asciiHexDigit
/***/ }),
/***/ "./node_modules/micromark/dist/character/ascii-punctuation.js":
/*!********************************************************************!*\
!*** ./node_modules/micromark/dist/character/ascii-punctuation.js ***!
\********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var regexCheck = __webpack_require__(/*! ../util/regex-check.js */ "./node_modules/micromark/dist/util/regex-check.js")
var asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/)
module.exports = asciiPunctuation
/***/ }),
/***/ "./node_modules/micromark/dist/character/markdown-line-ending-or-space.js":
/*!********************************************************************************!*\
!*** ./node_modules/micromark/dist/character/markdown-line-ending-or-space.js ***!
\********************************************************************************/
/***/ ((module) => {
"use strict";
function markdownLineEndingOrSpace(code) {
return code < 0 || code === 32
}
module.exports = markdownLineEndingOrSpace
/***/ }),
/***/ "./node_modules/micromark/dist/character/markdown-line-ending.js":
/*!***********************************************************************!*\
!*** ./node_modules/micromark/dist/character/markdown-line-ending.js ***!
\***********************************************************************/
/***/ ((module) => {
"use strict";
function markdownLineEnding(code) {
return code < -2
}
module.exports = markdownLineEnding
/***/ }),
/***/ "./node_modules/micromark/dist/character/markdown-space.js":
/*!*****************************************************************!*\
!*** ./node_modules/micromark/dist/character/markdown-space.js ***!
\*****************************************************************/
/***/ ((module) => {
"use strict";
function markdownSpace(code) {
return code === -2 || code === -1 || code === 32
}
module.exports = markdownSpace
/***/ }),
/***/ "./node_modules/micromark/dist/character/unicode-punctuation.js":
/*!**********************************************************************!*\
!*** ./node_modules/micromark/dist/character/unicode-punctuation.js ***!
\**********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var unicodePunctuationRegex = __webpack_require__(/*! ../constant/unicode-punctuation-regex.js */ "./node_modules/micromark/dist/constant/unicode-punctuation-regex.js")
var regexCheck = __webpack_require__(/*! ../util/regex-check.js */ "./node_modules/micromark/dist/util/regex-check.js")
// In fact adds to the bundle size.
var unicodePunctuation = regexCheck(unicodePunctuationRegex)
module.exports = unicodePunctuation
/***/ }),
/***/ "./node_modules/micromark/dist/character/unicode-whitespace.js":
/*!*********************************************************************!*\
!*** ./node_modules/micromark/dist/character/unicode-whitespace.js ***!
\*********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var regexCheck = __webpack_require__(/*! ../util/regex-check.js */ "./node_modules/micromark/dist/util/regex-check.js")
var unicodeWhitespace = regexCheck(/\s/)
module.exports = unicodeWhitespace
/***/ }),
/***/ "./node_modules/micromark/dist/constant/assign.js":
/*!********************************************************!*\
!*** ./node_modules/micromark/dist/constant/assign.js ***!
\********************************************************/
/***/ ((module) => {
"use strict";
var assign = Object.assign
module.exports = assign
/***/ }),
/***/ "./node_modules/micromark/dist/constant/from-char-code.js":
/*!****************************************************************!*\
!*** ./node_modules/micromark/dist/constant/from-char-code.js ***!
\****************************************************************/
/***/ ((module) => {
"use strict";
var fromCharCode = String.fromCharCode
module.exports = fromCharCode
/***/ }),
/***/ "./node_modules/micromark/dist/constant/has-own-property.js":
/*!******************************************************************!*\
!*** ./node_modules/micromark/dist/constant/has-own-property.js ***!
\******************************************************************/
/***/ ((module) => {
"use strict";
var own = {}.hasOwnProperty
module.exports = own
/***/ }),
/***/ "./node_modules/micromark/dist/constant/html-block-names.js":
/*!******************************************************************!*\
!*** ./node_modules/micromark/dist/constant/html-block-names.js ***!
\******************************************************************/
/***/ ((module) => {
"use strict";
// This module is copied from .
var basics = [
'address',
'article',
'aside',
'base',
'basefont',
'blockquote',
'body',
'caption',
'center',
'col',
'colgroup',
'dd',
'details',
'dialog',
'dir',
'div',
'dl',
'dt',
'fieldset',
'figcaption',
'figure',
'footer',
'form',
'frame',
'frameset',
'h1',
'h2',
'h3',
'h4',
'h5',
'h6',
'head',
'header',
'hr',
'html',
'iframe',
'legend',
'li',
'link',
'main',
'menu',
'menuitem',
'nav',
'noframes',
'ol',
'optgroup',
'option',
'p',
'param',
'section',
'source',
'summary',
'table',
'tbody',
'td',
'tfoot',
'th',
'thead',
'title',
'tr',
'track',
'ul'
]
module.exports = basics
/***/ }),
/***/ "./node_modules/micromark/dist/constant/html-raw-names.js":
/*!****************************************************************!*\
!*** ./node_modules/micromark/dist/constant/html-raw-names.js ***!
\****************************************************************/
/***/ ((module) => {
"use strict";
// This module is copied from .
var raws = ['pre', 'script', 'style', 'textarea']
module.exports = raws
/***/ }),
/***/ "./node_modules/micromark/dist/constant/splice.js":
/*!********************************************************!*\
!*** ./node_modules/micromark/dist/constant/splice.js ***!
\********************************************************/
/***/ ((module) => {
"use strict";
var splice = [].splice
module.exports = splice
/***/ }),
/***/ "./node_modules/micromark/dist/constant/unicode-punctuation-regex.js":
/*!***************************************************************************!*\
!*** ./node_modules/micromark/dist/constant/unicode-punctuation-regex.js ***!
\***************************************************************************/
/***/ ((module) => {
"use strict";
// This module is generated by `script/`.
//
// CommonMark handles attention (emphasis, strong) markers based on what comes
// before or after them.
// One such difference is if those characters are Unicode punctuation.
// This script is generated from the Unicode data.
var unicodePunctuation = /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/
module.exports = unicodePunctuation
/***/ }),
/***/ "./node_modules/micromark/dist/constructs.js":
/*!***************************************************!*\
!*** ./node_modules/micromark/dist/constructs.js ***!
\***************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({value: true}))
var text$1 = __webpack_require__(/*! ./initialize/text.js */ "./node_modules/micromark/dist/initialize/text.js")
var attention = __webpack_require__(/*! ./tokenize/attention.js */ "./node_modules/micromark/dist/tokenize/attention.js")
var autolink = __webpack_require__(/*! ./tokenize/autolink.js */ "./node_modules/micromark/dist/tokenize/autolink.js")
var blockQuote = __webpack_require__(/*! ./tokenize/block-quote.js */ "./node_modules/micromark/dist/tokenize/block-quote.js")
var characterEscape = __webpack_require__(/*! ./tokenize/character-escape.js */ "./node_modules/micromark/dist/tokenize/character-escape.js")
var characterReference = __webpack_require__(/*! ./tokenize/character-reference.js */ "./node_modules/micromark/dist/tokenize/character-reference.js")
var codeFenced = __webpack_require__(/*! ./tokenize/code-fenced.js */ "./node_modules/micromark/dist/tokenize/code-fenced.js")
var codeIndented = __webpack_require__(/*! ./tokenize/code-indented.js */ "./node_modules/micromark/dist/tokenize/code-indented.js")
var codeText = __webpack_require__(/*! ./tokenize/code-text.js */ "./node_modules/micromark/dist/tokenize/code-text.js")
var definition = __webpack_require__(/*! ./tokenize/definition.js */ "./node_modules/micromark/dist/tokenize/definition.js")
var hardBreakEscape = __webpack_require__(/*! ./tokenize/hard-break-escape.js */ "./node_modules/micromark/dist/tokenize/hard-break-escape.js")
var headingAtx = __webpack_require__(/*! ./tokenize/heading-atx.js */ "./node_modules/micromark/dist/tokenize/heading-atx.js")
var htmlFlow = __webpack_require__(/*! ./tokenize/html-flow.js */ "./node_modules/micromark/dist/tokenize/html-flow.js")
var htmlText = __webpack_require__(/*! ./tokenize/html-text.js */ "./node_modules/micromark/dist/tokenize/html-text.js")
var labelEnd = __webpack_require__(/*! ./tokenize/label-end.js */ "./node_modules/micromark/dist/tokenize/label-end.js")
var labelStartImage = __webpack_require__(/*! ./tokenize/label-start-image.js */ "./node_modules/micromark/dist/tokenize/label-start-image.js")
var labelStartLink = __webpack_require__(/*! ./tokenize/label-start-link.js */ "./node_modules/micromark/dist/tokenize/label-start-link.js")
var lineEnding = __webpack_require__(/*! ./tokenize/line-ending.js */ "./node_modules/micromark/dist/tokenize/line-ending.js")
var list = __webpack_require__(/*! ./tokenize/list.js */ "./node_modules/micromark/dist/tokenize/list.js")
var setextUnderline = __webpack_require__(/*! ./tokenize/setext-underline.js */ "./node_modules/micromark/dist/tokenize/setext-underline.js")
var thematicBreak = __webpack_require__(/*! ./tokenize/thematic-break.js */ "./node_modules/micromark/dist/tokenize/thematic-break.js")
var document = {
42: list,
// Asterisk
43: list,
// Plus sign
45: list,
// Dash
48: list,
// 0
49: list,
// 1
50: list,
// 2
51: list,
// 3
52: list,
// 4
53: list,
// 5
54: list,
// 6
55: list,
// 7
56: list,
// 8
57: list,
// 9
62: blockQuote // Greater than
}
var contentInitial = {
91: definition // Left square bracket
}
var flowInitial = {
'-2': codeIndented,
// Horizontal tab
'-1': codeIndented,
// Virtual space
32: codeIndented // Space
}
var flow = {
35: headingAtx,
// Number sign
42: thematicBreak,
// Asterisk
45: [setextUnderline, thematicBreak],
// Dash
60: htmlFlow,
// Less than
61: setextUnderline,
// Equals to
95: thematicBreak,
// Underscore
96: codeFenced,
// Grave accent
126: codeFenced // Tilde
}
var string = {
38: characterReference,
// Ampersand
92: characterEscape // Backslash
}
var text = {
'-5': lineEnding,
// Carriage return
'-4': lineEnding,
// Line feed
'-3': lineEnding,
// Carriage return + line feed
33: labelStartImage,
// Exclamation mark
38: characterReference,
// Ampersand
42: attention,
// Asterisk
60: [autolink, htmlText],
// Less than
91: labelStartLink,
// Left square bracket
92: [hardBreakEscape, characterEscape],
// Backslash
93: labelEnd,
// Right square bracket
95: attention,
// Underscore
96: codeText // Grave accent
}
var insideSpan = {
null: [attention, text$1.resolver]
}
var disable = {
null: []
}
exports.contentInitial = contentInitial
exports.disable = disable
exports.document = document
exports.flow = flow
exports.flowInitial = flowInitial
exports.insideSpan = insideSpan
exports.string = string
exports.text = text
/***/ }),
/***/ "./node_modules/micromark/dist/initialize/content.js":
/*!***********************************************************!*\
!*** ./node_modules/micromark/dist/initialize/content.js ***!
\***********************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({value: true}))
var markdownLineEnding = __webpack_require__(/*! ../character/markdown-line-ending.js */ "./node_modules/micromark/dist/character/markdown-line-ending.js")
var factorySpace = __webpack_require__(/*! ../tokenize/factory-space.js */ "./node_modules/micromark/dist/tokenize/factory-space.js")
var tokenize = initializeContent
function initializeContent(effects) {
var contentStart = effects.attempt(
this.parser.constructs.contentInitial,
afterContentStartConstruct,
paragraphInitial
)
var previous
return contentStart
function afterContentStartConstruct(code) {
if (code === null) {
effects.consume(code)
return
}
effects.enter('lineEnding')
effects.consume(code)
effects.exit('lineEnding')
return factorySpace(effects, contentStart, 'linePrefix')
}
function paragraphInitial(code) {
effects.enter('paragraph')
return lineStart(code)
}
function lineStart(code) {
var token = effects.enter('chunkText', {
contentType: 'text',
previous: previous
})
if (previous) {
previous.next = token
}
previous = token
return data(code)
}
function data(code) {
if (code === null) {
effects.exit('chunkText')
effects.exit('paragraph')
effects.consume(code)
return
}
if (markdownLineEnding(code)) {
effects.consume(code)
effects.exit('chunkText')
return lineStart
} // Data.
effects.consume(code)
return data
}
}
exports.tokenize = tokenize
/***/ }),
/***/ "./node_modules/micromark/dist/initialize/document.js":
/*!************************************************************!*\
!*** ./node_modules/micromark/dist/initialize/document.js ***!
\************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({value: true}))
var markdownLineEnding = __webpack_require__(/*! ../character/markdown-line-ending.js */ "./node_modules/micromark/dist/character/markdown-line-ending.js")
var factorySpace = __webpack_require__(/*! ../tokenize/factory-space.js */ "./node_modules/micromark/dist/tokenize/factory-space.js")
var partialBlankLine = __webpack_require__(/*! ../tokenize/partial-blank-line.js */ "./node_modules/micromark/dist/tokenize/partial-blank-line.js")
var tokenize = initializeDocument
var containerConstruct = {
tokenize: tokenizeContainer
}
var lazyFlowConstruct = {
tokenize: tokenizeLazyFlow
}
function initializeDocument(effects) {
var self = this
var stack = []
var continued = 0
var inspectConstruct = {
tokenize: tokenizeInspect,
partial: true
}
var inspectResult
var childFlow
var childToken
return start
function start(code) {
if (continued < stack.length) {
self.containerState = stack[continued][1]
return effects.attempt(
stack[continued][0].continuation,
documentContinue,
documentContinued
)(code)
}
return documentContinued(code)
}
function documentContinue(code) {
continued++
return start(code)
}
function documentContinued(code) {
// If we’re in a concrete construct (such as when expecting another line of
// HTML, or we resulted in lazy content), we can immediately start flow.
if (inspectResult && inspectResult.flowContinue) {
return flowStart(code)
}
self.interrupt =
childFlow &&
childFlow.currentConstruct &&
childFlow.currentConstruct.interruptible
self.containerState = {}
return effects.attempt(
containerConstruct,
containerContinue,
flowStart
)(code)
}
function containerContinue(code) {
stack.push([self.currentConstruct, self.containerState])
self.containerState = undefined
return documentContinued(code)
}
function flowStart(code) {
if (code === null) {
exitContainers(0, true)
effects.consume(code)
return
}
childFlow = childFlow || self.parser.flow(self.now())
effects.enter('chunkFlow', {
contentType: 'flow',
previous: childToken,
_tokenizer: childFlow
})
return flowContinue(code)
}
function flowContinue(code) {
if (code === null) {
continueFlow(effects.exit('chunkFlow'))
return flowStart(code)
}
if (markdownLineEnding(code)) {
effects.consume(code)
continueFlow(effects.exit('chunkFlow'))
return effects.check(inspectConstruct, documentAfterPeek)
}
effects.consume(code)
return flowContinue
}
function documentAfterPeek(code) {
exitContainers(
inspectResult.continued,
inspectResult && inspectResult.flowEnd
)
continued = 0
return start(code)
}
function continueFlow(token) {
if (childToken) childToken.next = token
childToken = token
childFlow.lazy = inspectResult && inspectResult.lazy
childFlow.defineSkip(token.start)
childFlow.write(self.sliceStream(token))
}
function exitContainers(size, end) {
var index = stack.length // Close the flow.
if (childFlow && end) {
childFlow.write([null])
childToken = childFlow = undefined
} // Exit open containers.
while (index-- > size) {
self.containerState = stack[index][1]
stack[index][0].exit.call(self, effects)
}
stack.length = size
}
function tokenizeInspect(effects, ok) {
var subcontinued = 0
inspectResult = {}
return inspectStart
function inspectStart(code) {
if (subcontinued < stack.length) {
self.containerState = stack[subcontinued][1]
return effects.attempt(
stack[subcontinued][0].continuation,
inspectContinue,
inspectLess
)(code)
} // If we’re continued but in a concrete flow, we can’t have more
// containers.
if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) {
inspectResult.flowContinue = true
return inspectDone(code)
}
self.interrupt =
childFlow.currentConstruct && childFlow.currentConstruct.interruptible
self.containerState = {}
return effects.attempt(
containerConstruct,
inspectFlowEnd,
inspectDone
)(code)
}
function inspectContinue(code) {
subcontinued++
return self.containerState._closeFlow
? inspectFlowEnd(code)
: inspectStart(code)
}
function inspectLess(code) {
if (childFlow.currentConstruct && childFlow.currentConstruct.lazy) {
// Maybe another container?
self.containerState = {}
return effects.attempt(
containerConstruct,
inspectFlowEnd, // Maybe flow, or a blank line?
effects.attempt(
lazyFlowConstruct,
inspectFlowEnd,
effects.check(partialBlankLine, inspectFlowEnd, inspectLazy)
)
)(code)
} // Otherwise we’re interrupting.
return inspectFlowEnd(code)
}
function inspectLazy(code) {
// Act as if all containers are continued.
subcontinued = stack.length
inspectResult.lazy = true
inspectResult.flowContinue = true
return inspectDone(code)
} // We’re done with flow if we have more containers, or an interruption.
function inspectFlowEnd(code) {
inspectResult.flowEnd = true
return inspectDone(code)
}
function inspectDone(code) {
inspectResult.continued = subcontinued
self.interrupt = self.containerState = undefined
return ok(code)
}
}
}
function tokenizeContainer(effects, ok, nok) {
return factorySpace(
effects,
effects.attempt(this.parser.constructs.document, ok, nok),
'linePrefix',
this.parser.constructs.disable.null.indexOf('codeIndented') > -1
? undefined
: 4
)
}
function tokenizeLazyFlow(effects, ok, nok) {
return factorySpace(
effects,
effects.lazy(this.parser.constructs.flow, ok, nok),
'linePrefix',
this.parser.constructs.disable.null.indexOf('codeIndented') > -1
? undefined
: 4
)
}
exports.tokenize = tokenize
/***/ }),
/***/ "./node_modules/micromark/dist/initialize/flow.js":
/*!********************************************************!*\
!*** ./node_modules/micromark/dist/initialize/flow.js ***!
\********************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({value: true}))
var content = __webpack_require__(/*! ../tokenize/content.js */ "./node_modules/micromark/dist/tokenize/content.js")
var factorySpace = __webpack_require__(/*! ../tokenize/factory-space.js */ "./node_modules/micromark/dist/tokenize/factory-space.js")
var partialBlankLine = __webpack_require__(/*! ../tokenize/partial-blank-line.js */ "./node_modules/micromark/dist/tokenize/partial-blank-line.js")
var tokenize = initializeFlow
function initializeFlow(effects) {
var self = this
var initial = effects.attempt(
// Try to parse a blank line.
partialBlankLine,
atBlankEnding, // Try to parse initial flow (essentially, only code).
effects.attempt(
this.parser.constructs.flowInitial,
afterConstruct,
factorySpace(
effects,
effects.attempt(
this.parser.constructs.flow,
afterConstruct,
effects.attempt(content, afterConstruct)
),
'linePrefix'
)
)
)
return initial
function atBlankEnding(code) {
if (code === null) {
effects.consume(code)
return
}
effects.enter('lineEndingBlank')
effects.consume(code)
effects.exit('lineEndingBlank')
self.currentConstruct = undefined
return initial
}
function afterConstruct(code) {
if (code === null) {
effects.consume(code)
return
}
effects.enter('lineEnding')
effects.consume(code)
effects.exit('lineEnding')
self.currentConstruct = undefined
return initial
}
}
exports.tokenize = tokenize
/***/ }),
/***/ "./node_modules/micromark/dist/initialize/text.js":
/*!********************************************************!*\
!*** ./node_modules/micromark/dist/initialize/text.js ***!
\********************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({value: true}))
var assign = __webpack_require__(/*! ../constant/assign.js */ "./node_modules/micromark/dist/constant/assign.js")
var shallow = __webpack_require__(/*! ../util/shallow.js */ "./node_modules/micromark/dist/util/shallow.js")
var text = initializeFactory('text')
var string = initializeFactory('string')
var resolver = {
resolveAll: createResolver()
}
function initializeFactory(field) {
return {
tokenize: initializeText,
resolveAll: createResolver(
field === 'text' ? resolveAllLineSuffixes : undefined
)
}
function initializeText(effects) {
var self = this
var constructs = this.parser.constructs[field]
var text = effects.attempt(constructs, start, notText)
return start
function start(code) {
return atBreak(code) ? text(code) : notText(code)
}
function notText(code) {
if (code === null) {
effects.consume(code)
return
}
effects.enter('data')
effects.consume(code)
return data
}
function data(code) {
if (atBreak(code)) {
effects.exit('data')
return text(code)
} // Data.
effects.consume(code)
return data
}
function atBreak(code) {
var list = constructs[code]
var index = -1
if (code === null) {
return true
}
if (list) {
while (++index < list.length) {
if (
!list[index].previous ||
list[index].previous.call(self, self.previous)
) {
return true
}
}
}
}
}
}
function createResolver(extraResolver) {
return resolveAllText
function resolveAllText(events, context) {
var index = -1
var enter // A rather boring computation (to merge adjacent `data` events) which
// improves mm performance by 29%.
while (++index <= events.length) {
if (enter === undefined) {
if (events[index] && events[index][1].type === 'data') {
enter = index
index++
}
} else if (!events[index] || events[index][1].type !== 'data') {
// Don’t do anything if there is one data token.
if (index !== enter + 2) {
events[enter][1].end = events[index - 1][1].end
events.splice(enter + 2, index - enter - 2)
index = enter + 2
}
enter = undefined
}
}
return extraResolver ? extraResolver(events, context) : events
}
} // A rather ugly set of instructions which again looks at chunks in the input
// stream.
// The reason to do this here is that it is *much* faster to parse in reverse.
// And that we can’t hook into `null` to split the line suffix before an EOF.
// To do: figure out if we can make this into a clean utility, or even in core.
// As it will be useful for GFMs literal autolink extension (and maybe even
// tables?)
function resolveAllLineSuffixes(events, context) {
var eventIndex = -1
var chunks
var data
var chunk
var index
var bufferIndex
var size
var tabs
var token
while (++eventIndex <= events.length) {
if (
(eventIndex === events.length ||
events[eventIndex][1].type === 'lineEnding') &&
events[eventIndex - 1][1].type === 'data'
) {
data = events[eventIndex - 1][1]
chunks = context.sliceStream(data)
index = chunks.length
bufferIndex = -1
size = 0
tabs = undefined
while (index--) {
chunk = chunks[index]
if (typeof chunk === 'string') {
bufferIndex = chunk.length
while (chunk.charCodeAt(bufferIndex - 1) === 32) {
size++
bufferIndex--
}
if (bufferIndex) break
bufferIndex = -1
} // Number
else if (chunk === -2) {
tabs = true
size++
} else if (chunk === -1);
else {
// Replacement character, exit.
index++
break
}
}
if (size) {
token = {
type:
eventIndex === events.length || tabs || size < 2
? 'lineSuffix'
: 'hardBreakTrailing',
start: {
line: data.end.line,
column: data.end.column - size,
offset: data.end.offset - size,
_index: data.start._index + index,
_bufferIndex: index
? bufferIndex
: data.start._bufferIndex + bufferIndex
},
end: shallow(data.end)
}
data.end = shallow(token.start)
if (data.start.offset === data.end.offset) {
assign(data, token)
} else {
events.splice(
eventIndex,
0,
['enter', token, context],
['exit', token, context]
)
eventIndex += 2
}
}
eventIndex++
}
}
return events
}
exports.resolver = resolver
exports.string = string
exports.text = text
/***/ }),
/***/ "./node_modules/micromark/dist/parse.js":
/*!**********************************************!*\
!*** ./node_modules/micromark/dist/parse.js ***!
\**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var content = __webpack_require__(/*! ./initialize/content.js */ "./node_modules/micromark/dist/initialize/content.js")
var document = __webpack_require__(/*! ./initialize/document.js */ "./node_modules/micromark/dist/initialize/document.js")
var flow = __webpack_require__(/*! ./initialize/flow.js */ "./node_modules/micromark/dist/initialize/flow.js")
var text = __webpack_require__(/*! ./initialize/text.js */ "./node_modules/micromark/dist/initialize/text.js")
var combineExtensions = __webpack_require__(/*! ./util/combine-extensions.js */ "./node_modules/micromark/dist/util/combine-extensions.js")
var createTokenizer = __webpack_require__(/*! ./util/create-tokenizer.js */ "./node_modules/micromark/dist/util/create-tokenizer.js")
var miniflat = __webpack_require__(/*! ./util/miniflat.js */ "./node_modules/micromark/dist/util/miniflat.js")
var constructs = __webpack_require__(/*! ./constructs.js */ "./node_modules/micromark/dist/constructs.js")
function parse(options) {
var settings = options || {}
var parser = {
defined: [],
constructs: combineExtensions(
[constructs].concat(miniflat(settings.extensions))
),
content: create(content),
document: create(document),
flow: create(flow),
string: create(text.string),
text: create(text.text)
}
return parser
function create(initializer) {
return creator
function creator(from) {
return createTokenizer(parser, initializer, from)
}
}
}
module.exports = parse
/***/ }),
/***/ "./node_modules/micromark/dist/postprocess.js":
/*!****************************************************!*\
!*** ./node_modules/micromark/dist/postprocess.js ***!
\****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var subtokenize = __webpack_require__(/*! ./util/subtokenize.js */ "./node_modules/micromark/dist/util/subtokenize.js")
function postprocess(events) {
while (!subtokenize(events)) {
// Empty
}
return events
}
module.exports = postprocess
/***/ }),
/***/ "./node_modules/micromark/dist/preprocess.js":
/*!***************************************************!*\
!*** ./node_modules/micromark/dist/preprocess.js ***!
\***************************************************/
/***/ ((module) => {
"use strict";
var search = /[\0\t\n\r]/g
function preprocess() {
var start = true
var column = 1
var buffer = ''
var atCarriageReturn
return preprocessor
function preprocessor(value, encoding, end) {
var chunks = []
var match
var next
var startPosition
var endPosition
var code
value = buffer + value.toString(encoding)
startPosition = 0
buffer = ''
if (start) {
if (value.charCodeAt(0) === 65279) {
startPosition++
}
start = undefined
}
while (startPosition < value.length) {
search.lastIndex = startPosition
match = search.exec(value)
endPosition = match ? match.index : value.length
code = value.charCodeAt(endPosition)
if (!match) {
buffer = value.slice(startPosition)
break
}
if (code === 10 && startPosition === endPosition && atCarriageReturn) {
chunks.push(-3)
atCarriageReturn = undefined
} else {
if (atCarriageReturn) {
chunks.push(-5)
atCarriageReturn = undefined
}
if (startPosition < endPosition) {
chunks.push(value.slice(startPosition, endPosition))
column += endPosition - startPosition
}
if (code === 0) {
chunks.push(65533)
column++
} else if (code === 9) {
next = Math.ceil(column / 4) * 4
chunks.push(-2)
while (column++ < next) chunks.push(-1)
} else if (code === 10) {
chunks.push(-4)
column = 1
} // Must be carriage return.
else {
atCarriageReturn = true
column = 1
}
}
startPosition = endPosition + 1
}
if (end) {
if (atCarriageReturn) chunks.push(-5)
if (buffer) chunks.push(buffer)
chunks.push(null)
}
return chunks
}
}
module.exports = preprocess
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/attention.js":
/*!***********************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/attention.js ***!
\***********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var chunkedPush = __webpack_require__(/*! ../util/chunked-push.js */ "./node_modules/micromark/dist/util/chunked-push.js")
var chunkedSplice = __webpack_require__(/*! ../util/chunked-splice.js */ "./node_modules/micromark/dist/util/chunked-splice.js")
var classifyCharacter = __webpack_require__(/*! ../util/classify-character.js */ "./node_modules/micromark/dist/util/classify-character.js")
var movePoint = __webpack_require__(/*! ../util/move-point.js */ "./node_modules/micromark/dist/util/move-point.js")
var resolveAll = __webpack_require__(/*! ../util/resolve-all.js */ "./node_modules/micromark/dist/util/resolve-all.js")
var shallow = __webpack_require__(/*! ../util/shallow.js */ "./node_modules/micromark/dist/util/shallow.js")
var attention = {
name: 'attention',
tokenize: tokenizeAttention,
resolveAll: resolveAllAttention
}
function resolveAllAttention(events, context) {
var index = -1
var open
var group
var text
var openingSequence
var closingSequence
var use
var nextEvents
var offset // Walk through all events.
//
// Note: performance of this is fine on an mb of normal markdown, but it’s
// a bottleneck for malicious stuff.
while (++index < events.length) {
// Find a token that can close.
if (
events[index][0] === 'enter' &&
events[index][1].type === 'attentionSequence' &&
events[index][1]._close
) {
open = index // Now walk back to find an opener.
while (open--) {
// Find a token that can open the closer.
if (
events[open][0] === 'exit' &&
events[open][1].type === 'attentionSequence' &&
events[open][1]._open && // If the markers are the same:
context.sliceSerialize(events[open][1]).charCodeAt(0) ===
context.sliceSerialize(events[index][1]).charCodeAt(0)
) {
// If the opening can close or the closing can open,
// and the close size *is not* a multiple of three,
// but the sum of the opening and closing size *is* multiple of three,
// then don’t match.
if (
(events[open][1]._close || events[index][1]._open) &&
(events[index][1].end.offset - events[index][1].start.offset) % 3 &&
!(
(events[open][1].end.offset -
events[open][1].start.offset +
events[index][1].end.offset -
events[index][1].start.offset) %
3
)
) {
continue
} // Number of markers to use from the sequence.
use =
events[open][1].end.offset - events[open][1].start.offset > 1 &&
events[index][1].end.offset - events[index][1].start.offset > 1
? 2
: 1
openingSequence = {
type: use > 1 ? 'strongSequence' : 'emphasisSequence',
start: movePoint(shallow(events[open][1].end), -use),
end: shallow(events[open][1].end)
}
closingSequence = {
type: use > 1 ? 'strongSequence' : 'emphasisSequence',
start: shallow(events[index][1].start),
end: movePoint(shallow(events[index][1].start), use)
}
text = {
type: use > 1 ? 'strongText' : 'emphasisText',
start: shallow(events[open][1].end),
end: shallow(events[index][1].start)
}
group = {
type: use > 1 ? 'strong' : 'emphasis',
start: shallow(openingSequence.start),
end: shallow(closingSequence.end)
}
events[open][1].end = shallow(openingSequence.start)
events[index][1].start = shallow(closingSequence.end)
nextEvents = [] // If there are more markers in the opening, add them before.
if (events[open][1].end.offset - events[open][1].start.offset) {
nextEvents = chunkedPush(nextEvents, [
['enter', events[open][1], context],
['exit', events[open][1], context]
])
} // Opening.
nextEvents = chunkedPush(nextEvents, [
['enter', group, context],
['enter', openingSequence, context],
['exit', openingSequence, context],
['enter', text, context]
]) // Between.
nextEvents = chunkedPush(
nextEvents,
resolveAll(
context.parser.constructs.insideSpan.null,
events.slice(open + 1, index),
context
)
) // Closing.
nextEvents = chunkedPush(nextEvents, [
['exit', text, context],
['enter', closingSequence, context],
['exit', closingSequence, context],
['exit', group, context]
]) // If there are more markers in the closing, add them after.
if (events[index][1].end.offset - events[index][1].start.offset) {
offset = 2
nextEvents = chunkedPush(nextEvents, [
['enter', events[index][1], context],
['exit', events[index][1], context]
])
} else {
offset = 0
}
chunkedSplice(events, open - 1, index - open + 3, nextEvents)
index = open + nextEvents.length - offset - 2
break
}
}
}
} // Remove remaining sequences.
index = -1
while (++index < events.length) {
if (events[index][1].type === 'attentionSequence') {
events[index][1].type = 'data'
}
}
return events
}
function tokenizeAttention(effects, ok) {
var before = classifyCharacter(this.previous)
var marker
return start
function start(code) {
effects.enter('attentionSequence')
marker = code
return sequence(code)
}
function sequence(code) {
var token
var after
var open
var close
if (code === marker) {
effects.consume(code)
return sequence
}
token = effects.exit('attentionSequence')
after = classifyCharacter(code)
open = !after || (after === 2 && before)
close = !before || (before === 2 && after)
token._open = marker === 42 ? open : open && (before || !close)
token._close = marker === 42 ? close : close && (after || !open)
return ok(code)
}
}
module.exports = attention
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/autolink.js":
/*!**********************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/autolink.js ***!
\**********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var asciiAlpha = __webpack_require__(/*! ../character/ascii-alpha.js */ "./node_modules/micromark/dist/character/ascii-alpha.js")
var asciiAlphanumeric = __webpack_require__(/*! ../character/ascii-alphanumeric.js */ "./node_modules/micromark/dist/character/ascii-alphanumeric.js")
var asciiAtext = __webpack_require__(/*! ../character/ascii-atext.js */ "./node_modules/micromark/dist/character/ascii-atext.js")
var asciiControl = __webpack_require__(/*! ../character/ascii-control.js */ "./node_modules/micromark/dist/character/ascii-control.js")
var autolink = {
name: 'autolink',
tokenize: tokenizeAutolink
}
function tokenizeAutolink(effects, ok, nok) {
var size = 1
return start
function start(code) {
effects.enter('autolink')
effects.enter('autolinkMarker')
effects.consume(code)
effects.exit('autolinkMarker')
effects.enter('autolinkProtocol')
return open
}
function open(code) {
if (asciiAlpha(code)) {
effects.consume(code)
return schemeOrEmailAtext
}
return asciiAtext(code) ? emailAtext(code) : nok(code)
}
function schemeOrEmailAtext(code) {
return code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)
? schemeInsideOrEmailAtext(code)
: emailAtext(code)
}
function schemeInsideOrEmailAtext(code) {
if (code === 58) {
effects.consume(code)
return urlInside
}
if (
(code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) &&
size++ < 32
) {
effects.consume(code)
return schemeInsideOrEmailAtext
}
return emailAtext(code)
}
function urlInside(code) {
if (code === 62) {
effects.exit('autolinkProtocol')
return end(code)
}
if (code === 32 || code === 60 || asciiControl(code)) {
return nok(code)
}
effects.consume(code)
return urlInside
}
function emailAtext(code) {
if (code === 64) {
effects.consume(code)
size = 0
return emailAtSignOrDot
}
if (asciiAtext(code)) {
effects.consume(code)
return emailAtext
}
return nok(code)
}
function emailAtSignOrDot(code) {
return asciiAlphanumeric(code) ? emailLabel(code) : nok(code)
}
function emailLabel(code) {
if (code === 46) {
effects.consume(code)
size = 0
return emailAtSignOrDot
}
if (code === 62) {
// Exit, then change the type.
effects.exit('autolinkProtocol').type = 'autolinkEmail'
return end(code)
}
return emailValue(code)
}
function emailValue(code) {
if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {
effects.consume(code)
return code === 45 ? emailValue : emailLabel
}
return nok(code)
}
function end(code) {
effects.enter('autolinkMarker')
effects.consume(code)
effects.exit('autolinkMarker')
effects.exit('autolink')
return ok
}
}
module.exports = autolink
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/block-quote.js":
/*!*************************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/block-quote.js ***!
\*************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var markdownSpace = __webpack_require__(/*! ../character/markdown-space.js */ "./node_modules/micromark/dist/character/markdown-space.js")
var factorySpace = __webpack_require__(/*! ./factory-space.js */ "./node_modules/micromark/dist/tokenize/factory-space.js")
var blockQuote = {
name: 'blockQuote',
tokenize: tokenizeBlockQuoteStart,
continuation: {
tokenize: tokenizeBlockQuoteContinuation
},
exit: exit
}
function tokenizeBlockQuoteStart(effects, ok, nok) {
var self = this
return start
function start(code) {
if (code === 62) {
if (!self.containerState.open) {
effects.enter('blockQuote', {
_container: true
})
self.containerState.open = true
}
effects.enter('blockQuotePrefix')
effects.enter('blockQuoteMarker')
effects.consume(code)
effects.exit('blockQuoteMarker')
return after
}
return nok(code)
}
function after(code) {
if (markdownSpace(code)) {
effects.enter('blockQuotePrefixWhitespace')
effects.consume(code)
effects.exit('blockQuotePrefixWhitespace')
effects.exit('blockQuotePrefix')
return ok
}
effects.exit('blockQuotePrefix')
return ok(code)
}
}
function tokenizeBlockQuoteContinuation(effects, ok, nok) {
return factorySpace(
effects,
effects.attempt(blockQuote, ok, nok),
'linePrefix',
this.parser.constructs.disable.null.indexOf('codeIndented') > -1
? undefined
: 4
)
}
function exit(effects) {
effects.exit('blockQuote')
}
module.exports = blockQuote
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/character-escape.js":
/*!******************************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/character-escape.js ***!
\******************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var asciiPunctuation = __webpack_require__(/*! ../character/ascii-punctuation.js */ "./node_modules/micromark/dist/character/ascii-punctuation.js")
var characterEscape = {
name: 'characterEscape',
tokenize: tokenizeCharacterEscape
}
function tokenizeCharacterEscape(effects, ok, nok) {
return start
function start(code) {
effects.enter('characterEscape')
effects.enter('escapeMarker')
effects.consume(code)
effects.exit('escapeMarker')
return open
}
function open(code) {
if (asciiPunctuation(code)) {
effects.enter('characterEscapeValue')
effects.consume(code)
effects.exit('characterEscapeValue')
effects.exit('characterEscape')
return ok
}
return nok(code)
}
}
module.exports = characterEscape
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/character-reference.js":
/*!*********************************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/character-reference.js ***!
\*********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var decodeEntity = __webpack_require__(/*! parse-entities/decode-entity.js */ "./node_modules/parse-entities/decode-entity.js")
var asciiAlphanumeric = __webpack_require__(/*! ../character/ascii-alphanumeric.js */ "./node_modules/micromark/dist/character/ascii-alphanumeric.js")
var asciiDigit = __webpack_require__(/*! ../character/ascii-digit.js */ "./node_modules/micromark/dist/character/ascii-digit.js")
var asciiHexDigit = __webpack_require__(/*! ../character/ascii-hex-digit.js */ "./node_modules/micromark/dist/character/ascii-hex-digit.js")
function _interopDefaultLegacy(e) {
return e && typeof e === 'object' && 'default' in e ? e : {default: e}
}
var decodeEntity__default = /*#__PURE__*/ _interopDefaultLegacy(decodeEntity)
var characterReference = {
name: 'characterReference',
tokenize: tokenizeCharacterReference
}
function tokenizeCharacterReference(effects, ok, nok) {
var self = this
var size = 0
var max
var test
return start
function start(code) {
effects.enter('characterReference')
effects.enter('characterReferenceMarker')
effects.consume(code)
effects.exit('characterReferenceMarker')
return open
}
function open(code) {
if (code === 35) {
effects.enter('characterReferenceMarkerNumeric')
effects.consume(code)
effects.exit('characterReferenceMarkerNumeric')
return numeric
}
effects.enter('characterReferenceValue')
max = 31
test = asciiAlphanumeric
return value(code)
}
function numeric(code) {
if (code === 88 || code === 120) {
effects.enter('characterReferenceMarkerHexadecimal')
effects.consume(code)
effects.exit('characterReferenceMarkerHexadecimal')
effects.enter('characterReferenceValue')
max = 6
test = asciiHexDigit
return value
}
effects.enter('characterReferenceValue')
max = 7
test = asciiDigit
return value(code)
}
function value(code) {
var token
if (code === 59 && size) {
token = effects.exit('characterReferenceValue')
if (
test === asciiAlphanumeric &&
!decodeEntity__default['default'](self.sliceSerialize(token))
) {
return nok(code)
}
effects.enter('characterReferenceMarker')
effects.consume(code)
effects.exit('characterReferenceMarker')
effects.exit('characterReference')
return ok
}
if (test(code) && size++ < max) {
effects.consume(code)
return value
}
return nok(code)
}
}
module.exports = characterReference
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/code-fenced.js":
/*!*************************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/code-fenced.js ***!
\*************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var markdownLineEnding = __webpack_require__(/*! ../character/markdown-line-ending.js */ "./node_modules/micromark/dist/character/markdown-line-ending.js")
var markdownLineEndingOrSpace = __webpack_require__(/*! ../character/markdown-line-ending-or-space.js */ "./node_modules/micromark/dist/character/markdown-line-ending-or-space.js")
var prefixSize = __webpack_require__(/*! ../util/prefix-size.js */ "./node_modules/micromark/dist/util/prefix-size.js")
var factorySpace = __webpack_require__(/*! ./factory-space.js */ "./node_modules/micromark/dist/tokenize/factory-space.js")
var codeFenced = {
name: 'codeFenced',
tokenize: tokenizeCodeFenced,
concrete: true
}
function tokenizeCodeFenced(effects, ok, nok) {
var self = this
var closingFenceConstruct = {
tokenize: tokenizeClosingFence,
partial: true
}
var initialPrefix = prefixSize(this.events, 'linePrefix')
var sizeOpen = 0
var marker
return start
function start(code) {
effects.enter('codeFenced')
effects.enter('codeFencedFence')
effects.enter('codeFencedFenceSequence')
marker = code
return sequenceOpen(code)
}
function sequenceOpen(code) {
if (code === marker) {
effects.consume(code)
sizeOpen++
return sequenceOpen
}
effects.exit('codeFencedFenceSequence')
return sizeOpen < 3
? nok(code)
: factorySpace(effects, infoOpen, 'whitespace')(code)
}
function infoOpen(code) {
if (code === null || markdownLineEnding(code)) {
return openAfter(code)
}
effects.enter('codeFencedFenceInfo')
effects.enter('chunkString', {
contentType: 'string'
})
return info(code)
}
function info(code) {
if (code === null || markdownLineEndingOrSpace(code)) {
effects.exit('chunkString')
effects.exit('codeFencedFenceInfo')
return factorySpace(effects, infoAfter, 'whitespace')(code)
}
if (code === 96 && code === marker) return nok(code)
effects.consume(code)
return info
}
function infoAfter(code) {
if (code === null || markdownLineEnding(code)) {
return openAfter(code)
}
effects.enter('codeFencedFenceMeta')
effects.enter('chunkString', {
contentType: 'string'
})
return meta(code)
}
function meta(code) {
if (code === null || markdownLineEnding(code)) {
effects.exit('chunkString')
effects.exit('codeFencedFenceMeta')
return openAfter(code)
}
if (code === 96 && code === marker) return nok(code)
effects.consume(code)
return meta
}
function openAfter(code) {
effects.exit('codeFencedFence')
return self.interrupt ? ok(code) : content(code)
}
function content(code) {
if (code === null) {
return after(code)
}
if (markdownLineEnding(code)) {
effects.enter('lineEnding')
effects.consume(code)
effects.exit('lineEnding')
return effects.attempt(
closingFenceConstruct,
after,
initialPrefix
? factorySpace(effects, content, 'linePrefix', initialPrefix + 1)
: content
)
}
effects.enter('codeFlowValue')
return contentContinue(code)
}
function contentContinue(code) {
if (code === null || markdownLineEnding(code)) {
effects.exit('codeFlowValue')
return content(code)
}
effects.consume(code)
return contentContinue
}
function after(code) {
effects.exit('codeFenced')
return ok(code)
}
function tokenizeClosingFence(effects, ok, nok) {
var size = 0
return factorySpace(
effects,
closingSequenceStart,
'linePrefix',
this.parser.constructs.disable.null.indexOf('codeIndented') > -1
? undefined
: 4
)
function closingSequenceStart(code) {
effects.enter('codeFencedFence')
effects.enter('codeFencedFenceSequence')
return closingSequence(code)
}
function closingSequence(code) {
if (code === marker) {
effects.consume(code)
size++
return closingSequence
}
if (size < sizeOpen) return nok(code)
effects.exit('codeFencedFenceSequence')
return factorySpace(effects, closingSequenceEnd, 'whitespace')(code)
}
function closingSequenceEnd(code) {
if (code === null || markdownLineEnding(code)) {
effects.exit('codeFencedFence')
return ok(code)
}
return nok(code)
}
}
}
module.exports = codeFenced
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/code-indented.js":
/*!***************************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/code-indented.js ***!
\***************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var markdownLineEnding = __webpack_require__(/*! ../character/markdown-line-ending.js */ "./node_modules/micromark/dist/character/markdown-line-ending.js")
var chunkedSplice = __webpack_require__(/*! ../util/chunked-splice.js */ "./node_modules/micromark/dist/util/chunked-splice.js")
var prefixSize = __webpack_require__(/*! ../util/prefix-size.js */ "./node_modules/micromark/dist/util/prefix-size.js")
var factorySpace = __webpack_require__(/*! ./factory-space.js */ "./node_modules/micromark/dist/tokenize/factory-space.js")
var codeIndented = {
name: 'codeIndented',
tokenize: tokenizeCodeIndented,
resolve: resolveCodeIndented
}
var indentedContentConstruct = {
tokenize: tokenizeIndentedContent,
partial: true
}
function resolveCodeIndented(events, context) {
var code = {
type: 'codeIndented',
start: events[0][1].start,
end: events[events.length - 1][1].end
}
chunkedSplice(events, 0, 0, [['enter', code, context]])
chunkedSplice(events, events.length, 0, [['exit', code, context]])
return events
}
function tokenizeCodeIndented(effects, ok, nok) {
return effects.attempt(indentedContentConstruct, afterPrefix, nok)
function afterPrefix(code) {
if (code === null) {
return ok(code)
}
if (markdownLineEnding(code)) {
return effects.attempt(indentedContentConstruct, afterPrefix, ok)(code)
}
effects.enter('codeFlowValue')
return content(code)
}
function content(code) {
if (code === null || markdownLineEnding(code)) {
effects.exit('codeFlowValue')
return afterPrefix(code)
}
effects.consume(code)
return content
}
}
function tokenizeIndentedContent(effects, ok, nok) {
var self = this
return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)
function afterPrefix(code) {
if (markdownLineEnding(code)) {
effects.enter('lineEnding')
effects.consume(code)
effects.exit('lineEnding')
return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)
}
return prefixSize(self.events, 'linePrefix') < 4 ? nok(code) : ok(code)
}
}
module.exports = codeIndented
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/code-text.js":
/*!***********************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/code-text.js ***!
\***********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var markdownLineEnding = __webpack_require__(/*! ../character/markdown-line-ending.js */ "./node_modules/micromark/dist/character/markdown-line-ending.js")
var codeText = {
name: 'codeText',
tokenize: tokenizeCodeText,
resolve: resolveCodeText,
previous: previous
}
function resolveCodeText(events) {
var tailExitIndex = events.length - 4
var headEnterIndex = 3
var index
var enter // If we start and end with an EOL or a space.
if (
(events[headEnterIndex][1].type === 'lineEnding' ||
events[headEnterIndex][1].type === 'space') &&
(events[tailExitIndex][1].type === 'lineEnding' ||
events[tailExitIndex][1].type === 'space')
) {
index = headEnterIndex // And we have data.
while (++index < tailExitIndex) {
if (events[index][1].type === 'codeTextData') {
// Then we have padding.
events[tailExitIndex][1].type = events[headEnterIndex][1].type =
'codeTextPadding'
headEnterIndex += 2
tailExitIndex -= 2
break
}
}
} // Merge adjacent spaces and data.
index = headEnterIndex - 1
tailExitIndex++
while (++index <= tailExitIndex) {
if (enter === undefined) {
if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') {
enter = index
}
} else if (
index === tailExitIndex ||
events[index][1].type === 'lineEnding'
) {
events[enter][1].type = 'codeTextData'
if (index !== enter + 2) {
events[enter][1].end = events[index - 1][1].end
events.splice(enter + 2, index - enter - 2)
tailExitIndex -= index - enter - 2
index = enter + 2
}
enter = undefined
}
}
return events
}
function previous(code) {
// If there is a previous code, there will always be a tail.
return (
code !== 96 ||
this.events[this.events.length - 1][1].type === 'characterEscape'
)
}
function tokenizeCodeText(effects, ok, nok) {
var sizeOpen = 0
var size
var token
return start
function start(code) {
effects.enter('codeText')
effects.enter('codeTextSequence')
return openingSequence(code)
}
function openingSequence(code) {
if (code === 96) {
effects.consume(code)
sizeOpen++
return openingSequence
}
effects.exit('codeTextSequence')
return gap(code)
}
function gap(code) {
// EOF.
if (code === null) {
return nok(code)
} // Closing fence?
// Could also be data.
if (code === 96) {
token = effects.enter('codeTextSequence')
size = 0
return closingSequence(code)
} // Tabs don’t work, and virtual spaces don’t make sense.
if (code === 32) {
effects.enter('space')
effects.consume(code)
effects.exit('space')
return gap
}
if (markdownLineEnding(code)) {
effects.enter('lineEnding')
effects.consume(code)
effects.exit('lineEnding')
return gap
} // Data.
effects.enter('codeTextData')
return data(code)
} // In code.
function data(code) {
if (
code === null ||
code === 32 ||
code === 96 ||
markdownLineEnding(code)
) {
effects.exit('codeTextData')
return gap(code)
}
effects.consume(code)
return data
} // Closing fence.
function closingSequence(code) {
// More.
if (code === 96) {
effects.consume(code)
size++
return closingSequence
} // Done!
if (size === sizeOpen) {
effects.exit('codeTextSequence')
effects.exit('codeText')
return ok(code)
} // More or less accents: mark as data.
token.type = 'codeTextData'
return data(code)
}
}
module.exports = codeText
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/content.js":
/*!*********************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/content.js ***!
\*********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var markdownLineEnding = __webpack_require__(/*! ../character/markdown-line-ending.js */ "./node_modules/micromark/dist/character/markdown-line-ending.js")
var prefixSize = __webpack_require__(/*! ../util/prefix-size.js */ "./node_modules/micromark/dist/util/prefix-size.js")
var subtokenize = __webpack_require__(/*! ../util/subtokenize.js */ "./node_modules/micromark/dist/util/subtokenize.js")
var factorySpace = __webpack_require__(/*! ./factory-space.js */ "./node_modules/micromark/dist/tokenize/factory-space.js")
// No name because it must not be turned off.
var content = {
tokenize: tokenizeContent,
resolve: resolveContent,
interruptible: true,
lazy: true
}
var continuationConstruct = {
tokenize: tokenizeContinuation,
partial: true
} // Content is transparent: it’s parsed right now. That way, definitions are also
// parsed right now: before text in paragraphs (specifically, media) are parsed.
function resolveContent(events) {
subtokenize(events)
return events
}
function tokenizeContent(effects, ok) {
var previous
return start
function start(code) {
effects.enter('content')
previous = effects.enter('chunkContent', {
contentType: 'content'
})
return data(code)
}
function data(code) {
if (code === null) {
return contentEnd(code)
}
if (markdownLineEnding(code)) {
return effects.check(
continuationConstruct,
contentContinue,
contentEnd
)(code)
} // Data.
effects.consume(code)
return data
}
function contentEnd(code) {
effects.exit('chunkContent')
effects.exit('content')
return ok(code)
}
function contentContinue(code) {
effects.consume(code)
effects.exit('chunkContent')
previous = previous.next = effects.enter('chunkContent', {
contentType: 'content',
previous: previous
})
return data
}
}
function tokenizeContinuation(effects, ok, nok) {
var self = this
return startLookahead
function startLookahead(code) {
effects.enter('lineEnding')
effects.consume(code)
effects.exit('lineEnding')
return factorySpace(effects, prefixed, 'linePrefix')
}
function prefixed(code) {
if (code === null || markdownLineEnding(code)) {
return nok(code)
}
if (
self.parser.constructs.disable.null.indexOf('codeIndented') > -1 ||
prefixSize(self.events, 'linePrefix') < 4
) {
return effects.interrupt(self.parser.constructs.flow, nok, ok)(code)
}
return ok(code)
}
}
module.exports = content
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/definition.js":
/*!************************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/definition.js ***!
\************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var markdownLineEnding = __webpack_require__(/*! ../character/markdown-line-ending.js */ "./node_modules/micromark/dist/character/markdown-line-ending.js")
var markdownLineEndingOrSpace = __webpack_require__(/*! ../character/markdown-line-ending-or-space.js */ "./node_modules/micromark/dist/character/markdown-line-ending-or-space.js")
var normalizeIdentifier = __webpack_require__(/*! ../util/normalize-identifier.js */ "./node_modules/micromark/dist/util/normalize-identifier.js")
var factoryDestination = __webpack_require__(/*! ./factory-destination.js */ "./node_modules/micromark/dist/tokenize/factory-destination.js")
var factoryLabel = __webpack_require__(/*! ./factory-label.js */ "./node_modules/micromark/dist/tokenize/factory-label.js")
var factorySpace = __webpack_require__(/*! ./factory-space.js */ "./node_modules/micromark/dist/tokenize/factory-space.js")
var factoryWhitespace = __webpack_require__(/*! ./factory-whitespace.js */ "./node_modules/micromark/dist/tokenize/factory-whitespace.js")
var factoryTitle = __webpack_require__(/*! ./factory-title.js */ "./node_modules/micromark/dist/tokenize/factory-title.js")
var definition = {
name: 'definition',
tokenize: tokenizeDefinition
}
var titleConstruct = {
tokenize: tokenizeTitle,
partial: true
}
function tokenizeDefinition(effects, ok, nok) {
var self = this
var identifier
return start
function start(code) {
effects.enter('definition')
return factoryLabel.call(
self,
effects,
labelAfter,
nok,
'definitionLabel',
'definitionLabelMarker',
'definitionLabelString'
)(code)
}
function labelAfter(code) {
identifier = normalizeIdentifier(
self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)
)
if (code === 58) {
effects.enter('definitionMarker')
effects.consume(code)
effects.exit('definitionMarker') // Note: blank lines can’t exist in content.
return factoryWhitespace(
effects,
factoryDestination(
effects,
effects.attempt(
titleConstruct,
factorySpace(effects, after, 'whitespace'),
factorySpace(effects, after, 'whitespace')
),
nok,
'definitionDestination',
'definitionDestinationLiteral',
'definitionDestinationLiteralMarker',
'definitionDestinationRaw',
'definitionDestinationString'
)
)
}
return nok(code)
}
function after(code) {
if (code === null || markdownLineEnding(code)) {
effects.exit('definition')
if (self.parser.defined.indexOf(identifier) < 0) {
self.parser.defined.push(identifier)
}
return ok(code)
}
return nok(code)
}
}
function tokenizeTitle(effects, ok, nok) {
return start
function start(code) {
return markdownLineEndingOrSpace(code)
? factoryWhitespace(effects, before)(code)
: nok(code)
}
function before(code) {
if (code === 34 || code === 39 || code === 40) {
return factoryTitle(
effects,
factorySpace(effects, after, 'whitespace'),
nok,
'definitionTitle',
'definitionTitleMarker',
'definitionTitleString'
)(code)
}
return nok(code)
}
function after(code) {
return code === null || markdownLineEnding(code) ? ok(code) : nok(code)
}
}
module.exports = definition
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/factory-destination.js":
/*!*********************************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/factory-destination.js ***!
\*********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var asciiControl = __webpack_require__(/*! ../character/ascii-control.js */ "./node_modules/micromark/dist/character/ascii-control.js")
var markdownLineEndingOrSpace = __webpack_require__(/*! ../character/markdown-line-ending-or-space.js */ "./node_modules/micromark/dist/character/markdown-line-ending-or-space.js")
var markdownLineEnding = __webpack_require__(/*! ../character/markdown-line-ending.js */ "./node_modules/micromark/dist/character/markdown-line-ending.js")
// eslint-disable-next-line max-params
function destinationFactory(
effects,
ok,
nok,
type,
literalType,
literalMarkerType,
rawType,
stringType,
max
) {
var limit = max || Infinity
var balance = 0
return start
function start(code) {
if (code === 60) {
effects.enter(type)
effects.enter(literalType)
effects.enter(literalMarkerType)
effects.consume(code)
effects.exit(literalMarkerType)
return destinationEnclosedBefore
}
if (asciiControl(code) || code === 41) {
return nok(code)
}
effects.enter(type)
effects.enter(rawType)
effects.enter(stringType)
effects.enter('chunkString', {
contentType: 'string'
})
return destinationRaw(code)
}
function destinationEnclosedBefore(code) {
if (code === 62) {
effects.enter(literalMarkerType)
effects.consume(code)
effects.exit(literalMarkerType)
effects.exit(literalType)
effects.exit(type)
return ok
}
effects.enter(stringType)
effects.enter('chunkString', {
contentType: 'string'
})
return destinationEnclosed(code)
}
function destinationEnclosed(code) {
if (code === 62) {
effects.exit('chunkString')
effects.exit(stringType)
return destinationEnclosedBefore(code)
}
if (code === null || code === 60 || markdownLineEnding(code)) {
return nok(code)
}
effects.consume(code)
return code === 92 ? destinationEnclosedEscape : destinationEnclosed
}
function destinationEnclosedEscape(code) {
if (code === 60 || code === 62 || code === 92) {
effects.consume(code)
return destinationEnclosed
}
return destinationEnclosed(code)
}
function destinationRaw(code) {
if (code === 40) {
if (++balance > limit) return nok(code)
effects.consume(code)
return destinationRaw
}
if (code === 41) {
if (!balance--) {
effects.exit('chunkString')
effects.exit(stringType)
effects.exit(rawType)
effects.exit(type)
return ok(code)
}
effects.consume(code)
return destinationRaw
}
if (code === null || markdownLineEndingOrSpace(code)) {
if (balance) return nok(code)
effects.exit('chunkString')
effects.exit(stringType)
effects.exit(rawType)
effects.exit(type)
return ok(code)
}
if (asciiControl(code)) return nok(code)
effects.consume(code)
return code === 92 ? destinationRawEscape : destinationRaw
}
function destinationRawEscape(code) {
if (code === 40 || code === 41 || code === 92) {
effects.consume(code)
return destinationRaw
}
return destinationRaw(code)
}
}
module.exports = destinationFactory
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/factory-label.js":
/*!***************************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/factory-label.js ***!
\***************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var markdownLineEnding = __webpack_require__(/*! ../character/markdown-line-ending.js */ "./node_modules/micromark/dist/character/markdown-line-ending.js")
var markdownSpace = __webpack_require__(/*! ../character/markdown-space.js */ "./node_modules/micromark/dist/character/markdown-space.js")
// eslint-disable-next-line max-params
function labelFactory(effects, ok, nok, type, markerType, stringType) {
var self = this
var size = 0
var data
return start
function start(code) {
effects.enter(type)
effects.enter(markerType)
effects.consume(code)
effects.exit(markerType)
effects.enter(stringType)
return atBreak
}
function atBreak(code) {
if (
code === null ||
code === 91 ||
(code === 93 && !data) ||
/* c8 ignore next */
(code === 94 &&
/* c8 ignore next */
!size &&
/* c8 ignore next */
'_hiddenFootnoteSupport' in self.parser.constructs) ||
size > 999
) {
return nok(code)
}
if (code === 93) {
effects.exit(stringType)
effects.enter(markerType)
effects.consume(code)
effects.exit(markerType)
effects.exit(type)
return ok
}
if (markdownLineEnding(code)) {
effects.enter('lineEnding')
effects.consume(code)
effects.exit('lineEnding')
return atBreak
}
effects.enter('chunkString', {
contentType: 'string'
})
return label(code)
}
function label(code) {
if (
code === null ||
code === 91 ||
code === 93 ||
markdownLineEnding(code) ||
size++ > 999
) {
effects.exit('chunkString')
return atBreak(code)
}
effects.consume(code)
data = data || !markdownSpace(code)
return code === 92 ? labelEscape : label
}
function labelEscape(code) {
if (code === 91 || code === 92 || code === 93) {
effects.consume(code)
size++
return label
}
return label(code)
}
}
module.exports = labelFactory
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/factory-space.js":
/*!***************************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/factory-space.js ***!
\***************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var markdownSpace = __webpack_require__(/*! ../character/markdown-space.js */ "./node_modules/micromark/dist/character/markdown-space.js")
function spaceFactory(effects, ok, type, max) {
var limit = max ? max - 1 : Infinity
var size = 0
return start
function start(code) {
if (markdownSpace(code)) {
effects.enter(type)
return prefix(code)
}
return ok(code)
}
function prefix(code) {
if (markdownSpace(code) && size++ < limit) {
effects.consume(code)
return prefix
}
effects.exit(type)
return ok(code)
}
}
module.exports = spaceFactory
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/factory-title.js":
/*!***************************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/factory-title.js ***!
\***************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var markdownLineEnding = __webpack_require__(/*! ../character/markdown-line-ending.js */ "./node_modules/micromark/dist/character/markdown-line-ending.js")
var factorySpace = __webpack_require__(/*! ./factory-space.js */ "./node_modules/micromark/dist/tokenize/factory-space.js")
function titleFactory(effects, ok, nok, type, markerType, stringType) {
var marker
return start
function start(code) {
effects.enter(type)
effects.enter(markerType)
effects.consume(code)
effects.exit(markerType)
marker = code === 40 ? 41 : code
return atFirstTitleBreak
}
function atFirstTitleBreak(code) {
if (code === marker) {
effects.enter(markerType)
effects.consume(code)
effects.exit(markerType)
effects.exit(type)
return ok
}
effects.enter(stringType)
return atTitleBreak(code)
}
function atTitleBreak(code) {
if (code === marker) {
effects.exit(stringType)
return atFirstTitleBreak(marker)
}
if (code === null) {
return nok(code)
} // Note: blank lines can’t exist in content.
if (markdownLineEnding(code)) {
effects.enter('lineEnding')
effects.consume(code)
effects.exit('lineEnding')
return factorySpace(effects, atTitleBreak, 'linePrefix')
}
effects.enter('chunkString', {
contentType: 'string'
})
return title(code)
}
function title(code) {
if (code === marker || code === null || markdownLineEnding(code)) {
effects.exit('chunkString')
return atTitleBreak(code)
}
effects.consume(code)
return code === 92 ? titleEscape : title
}
function titleEscape(code) {
if (code === marker || code === 92) {
effects.consume(code)
return title
}
return title(code)
}
}
module.exports = titleFactory
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/factory-whitespace.js":
/*!********************************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/factory-whitespace.js ***!
\********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var markdownLineEnding = __webpack_require__(/*! ../character/markdown-line-ending.js */ "./node_modules/micromark/dist/character/markdown-line-ending.js")
var markdownSpace = __webpack_require__(/*! ../character/markdown-space.js */ "./node_modules/micromark/dist/character/markdown-space.js")
var factorySpace = __webpack_require__(/*! ./factory-space.js */ "./node_modules/micromark/dist/tokenize/factory-space.js")
function whitespaceFactory(effects, ok) {
var seen
return start
function start(code) {
if (markdownLineEnding(code)) {
effects.enter('lineEnding')
effects.consume(code)
effects.exit('lineEnding')
seen = true
return start
}
if (markdownSpace(code)) {
return factorySpace(
effects,
start,
seen ? 'linePrefix' : 'lineSuffix'
)(code)
}
return ok(code)
}
}
module.exports = whitespaceFactory
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/hard-break-escape.js":
/*!*******************************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/hard-break-escape.js ***!
\*******************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var markdownLineEnding = __webpack_require__(/*! ../character/markdown-line-ending.js */ "./node_modules/micromark/dist/character/markdown-line-ending.js")
var hardBreakEscape = {
name: 'hardBreakEscape',
tokenize: tokenizeHardBreakEscape
}
function tokenizeHardBreakEscape(effects, ok, nok) {
return start
function start(code) {
effects.enter('hardBreakEscape')
effects.enter('escapeMarker')
effects.consume(code)
return open
}
function open(code) {
if (markdownLineEnding(code)) {
effects.exit('escapeMarker')
effects.exit('hardBreakEscape')
return ok(code)
}
return nok(code)
}
}
module.exports = hardBreakEscape
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/heading-atx.js":
/*!*************************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/heading-atx.js ***!
\*************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var markdownLineEnding = __webpack_require__(/*! ../character/markdown-line-ending.js */ "./node_modules/micromark/dist/character/markdown-line-ending.js")
var markdownLineEndingOrSpace = __webpack_require__(/*! ../character/markdown-line-ending-or-space.js */ "./node_modules/micromark/dist/character/markdown-line-ending-or-space.js")
var markdownSpace = __webpack_require__(/*! ../character/markdown-space.js */ "./node_modules/micromark/dist/character/markdown-space.js")
var chunkedSplice = __webpack_require__(/*! ../util/chunked-splice.js */ "./node_modules/micromark/dist/util/chunked-splice.js")
var factorySpace = __webpack_require__(/*! ./factory-space.js */ "./node_modules/micromark/dist/tokenize/factory-space.js")
var headingAtx = {
name: 'headingAtx',
tokenize: tokenizeHeadingAtx,
resolve: resolveHeadingAtx
}
function resolveHeadingAtx(events, context) {
var contentEnd = events.length - 2
var contentStart = 3
var content
var text // Prefix whitespace, part of the opening.
if (events[contentStart][1].type === 'whitespace') {
contentStart += 2
} // Suffix whitespace, part of the closing.
if (
contentEnd - 2 > contentStart &&
events[contentEnd][1].type === 'whitespace'
) {
contentEnd -= 2
}
if (
events[contentEnd][1].type === 'atxHeadingSequence' &&
(contentStart === contentEnd - 1 ||
(contentEnd - 4 > contentStart &&
events[contentEnd - 2][1].type === 'whitespace'))
) {
contentEnd -= contentStart + 1 === contentEnd ? 2 : 4
}
if (contentEnd > contentStart) {
content = {
type: 'atxHeadingText',
start: events[contentStart][1].start,
end: events[contentEnd][1].end
}
text = {
type: 'chunkText',
start: events[contentStart][1].start,
end: events[contentEnd][1].end,
contentType: 'text'
}
chunkedSplice(events, contentStart, contentEnd - contentStart + 1, [
['enter', content, context],
['enter', text, context],
['exit', text, context],
['exit', content, context]
])
}
return events
}
function tokenizeHeadingAtx(effects, ok, nok) {
var self = this
var size = 0
return start
function start(code) {
effects.enter('atxHeading')
effects.enter('atxHeadingSequence')
return fenceOpenInside(code)
}
function fenceOpenInside(code) {
if (code === 35 && size++ < 6) {
effects.consume(code)
return fenceOpenInside
}
if (code === null || markdownLineEndingOrSpace(code)) {
effects.exit('atxHeadingSequence')
return self.interrupt ? ok(code) : headingBreak(code)
}
return nok(code)
}
function headingBreak(code) {
if (code === 35) {
effects.enter('atxHeadingSequence')
return sequence(code)
}
if (code === null || markdownLineEnding(code)) {
effects.exit('atxHeading')
return ok(code)
}
if (markdownSpace(code)) {
return factorySpace(effects, headingBreak, 'whitespace')(code)
}
effects.enter('atxHeadingText')
return data(code)
}
function sequence(code) {
if (code === 35) {
effects.consume(code)
return sequence
}
effects.exit('atxHeadingSequence')
return headingBreak(code)
}
function data(code) {
if (code === null || code === 35 || markdownLineEndingOrSpace(code)) {
effects.exit('atxHeadingText')
return headingBreak(code)
}
effects.consume(code)
return data
}
}
module.exports = headingAtx
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/html-flow.js":
/*!***********************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/html-flow.js ***!
\***********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var asciiAlpha = __webpack_require__(/*! ../character/ascii-alpha.js */ "./node_modules/micromark/dist/character/ascii-alpha.js")
var asciiAlphanumeric = __webpack_require__(/*! ../character/ascii-alphanumeric.js */ "./node_modules/micromark/dist/character/ascii-alphanumeric.js")
var markdownLineEnding = __webpack_require__(/*! ../character/markdown-line-ending.js */ "./node_modules/micromark/dist/character/markdown-line-ending.js")
var markdownLineEndingOrSpace = __webpack_require__(/*! ../character/markdown-line-ending-or-space.js */ "./node_modules/micromark/dist/character/markdown-line-ending-or-space.js")
var markdownSpace = __webpack_require__(/*! ../character/markdown-space.js */ "./node_modules/micromark/dist/character/markdown-space.js")
var fromCharCode = __webpack_require__(/*! ../constant/from-char-code.js */ "./node_modules/micromark/dist/constant/from-char-code.js")
var htmlBlockNames = __webpack_require__(/*! ../constant/html-block-names.js */ "./node_modules/micromark/dist/constant/html-block-names.js")
var htmlRawNames = __webpack_require__(/*! ../constant/html-raw-names.js */ "./node_modules/micromark/dist/constant/html-raw-names.js")
var partialBlankLine = __webpack_require__(/*! ./partial-blank-line.js */ "./node_modules/micromark/dist/tokenize/partial-blank-line.js")
var htmlFlow = {
name: 'htmlFlow',
tokenize: tokenizeHtmlFlow,
resolveTo: resolveToHtmlFlow,
concrete: true
}
var nextBlankConstruct = {
tokenize: tokenizeNextBlank,
partial: true
}
function resolveToHtmlFlow(events) {
var index = events.length
while (index--) {
if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') {
break
}
}
if (index > 1 && events[index - 2][1].type === 'linePrefix') {
// Add the prefix start to the HTML token.
events[index][1].start = events[index - 2][1].start // Add the prefix start to the HTML line token.
events[index + 1][1].start = events[index - 2][1].start // Remove the line prefix.
events.splice(index - 2, 2)
}
return events
}
function tokenizeHtmlFlow(effects, ok, nok) {
var self = this
var kind
var startTag
var buffer
var index
var marker
return start
function start(code) {
effects.enter('htmlFlow')
effects.enter('htmlFlowData')
effects.consume(code)
return open
}
function open(code) {
if (code === 33) {
effects.consume(code)
return declarationStart
}
if (code === 47) {
effects.consume(code)
return tagCloseStart
}
if (code === 63) {
effects.consume(code)
kind = 3 // While we’re in an instruction instead of a declaration, we’re on a `?`
// right now, so we do need to search for `>`, similar to declarations.
return self.interrupt ? ok : continuationDeclarationInside
}
if (asciiAlpha(code)) {
effects.consume(code)
buffer = fromCharCode(code)
startTag = true
return tagName
}
return nok(code)
}
function declarationStart(code) {
if (code === 45) {
effects.consume(code)
kind = 2
return commentOpenInside
}
if (code === 91) {
effects.consume(code)
kind = 5
buffer = 'CDATA['
index = 0
return cdataOpenInside
}
if (asciiAlpha(code)) {
effects.consume(code)
kind = 4
return self.interrupt ? ok : continuationDeclarationInside
}
return nok(code)
}
function commentOpenInside(code) {
if (code === 45) {
effects.consume(code)
return self.interrupt ? ok : continuationDeclarationInside
}
return nok(code)
}
function cdataOpenInside(code) {
if (code === buffer.charCodeAt(index++)) {
effects.consume(code)
return index === buffer.length
? self.interrupt
? ok
: continuation
: cdataOpenInside
}
return nok(code)
}
function tagCloseStart(code) {
if (asciiAlpha(code)) {
effects.consume(code)
buffer = fromCharCode(code)
return tagName
}
return nok(code)
}
function tagName(code) {
if (
code === null ||
code === 47 ||
code === 62 ||
markdownLineEndingOrSpace(code)
) {
if (
code !== 47 &&
startTag &&
htmlRawNames.indexOf(buffer.toLowerCase()) > -1
) {
kind = 1
return self.interrupt ? ok(code) : continuation(code)
}
if (htmlBlockNames.indexOf(buffer.toLowerCase()) > -1) {
kind = 6
if (code === 47) {
effects.consume(code)
return basicSelfClosing
}
return self.interrupt ? ok(code) : continuation(code)
}
kind = 7 // Do not support complete HTML when interrupting.
return self.interrupt
? nok(code)
: startTag
? completeAttributeNameBefore(code)
: completeClosingTagAfter(code)
}
if (code === 45 || asciiAlphanumeric(code)) {
effects.consume(code)
buffer += fromCharCode(code)
return tagName
}
return nok(code)
}
function basicSelfClosing(code) {
if (code === 62) {
effects.consume(code)
return self.interrupt ? ok : continuation
}
return nok(code)
}
function completeClosingTagAfter(code) {
if (markdownSpace(code)) {
effects.consume(code)
return completeClosingTagAfter
}
return completeEnd(code)
}
function completeAttributeNameBefore(code) {
if (code === 47) {
effects.consume(code)
return completeEnd
}
if (code === 58 || code === 95 || asciiAlpha(code)) {
effects.consume(code)
return completeAttributeName
}
if (markdownSpace(code)) {
effects.consume(code)
return completeAttributeNameBefore
}
return completeEnd(code)
}
function completeAttributeName(code) {
if (
code === 45 ||
code === 46 ||
code === 58 ||
code === 95 ||
asciiAlphanumeric(code)
) {
effects.consume(code)
return completeAttributeName
}
return completeAttributeNameAfter(code)
}
function completeAttributeNameAfter(code) {
if (code === 61) {
effects.consume(code)
return completeAttributeValueBefore
}
if (markdownSpace(code)) {
effects.consume(code)
return completeAttributeNameAfter
}
return completeAttributeNameBefore(code)
}
function completeAttributeValueBefore(code) {
if (
code === null ||
code === 60 ||
code === 61 ||
code === 62 ||
code === 96
) {
return nok(code)
}
if (code === 34 || code === 39) {
effects.consume(code)
marker = code
return completeAttributeValueQuoted
}
if (markdownSpace(code)) {
effects.consume(code)
return completeAttributeValueBefore
}
marker = undefined
return completeAttributeValueUnquoted(code)
}
function completeAttributeValueQuoted(code) {
if (code === marker) {
effects.consume(code)
return completeAttributeValueQuotedAfter
}
if (code === null || markdownLineEnding(code)) {
return nok(code)
}
effects.consume(code)
return completeAttributeValueQuoted
}
function completeAttributeValueUnquoted(code) {
if (
code === null ||
code === 34 ||
code === 39 ||
code === 60 ||
code === 61 ||
code === 62 ||
code === 96 ||
markdownLineEndingOrSpace(code)
) {
return completeAttributeNameAfter(code)
}
effects.consume(code)
return completeAttributeValueUnquoted
}
function completeAttributeValueQuotedAfter(code) {
if (code === 47 || code === 62 || markdownSpace(code)) {
return completeAttributeNameBefore(code)
}
return nok(code)
}
function completeEnd(code) {
if (code === 62) {
effects.consume(code)
return completeAfter
}
return nok(code)
}
function completeAfter(code) {
if (markdownSpace(code)) {
effects.consume(code)
return completeAfter
}
return code === null || markdownLineEnding(code)
? continuation(code)
: nok(code)
}
function continuation(code) {
if (code === 45 && kind === 2) {
effects.consume(code)
return continuationCommentInside
}
if (code === 60 && kind === 1) {
effects.consume(code)
return continuationRawTagOpen
}
if (code === 62 && kind === 4) {
effects.consume(code)
return continuationClose
}
if (code === 63 && kind === 3) {
effects.consume(code)
return continuationDeclarationInside
}
if (code === 93 && kind === 5) {
effects.consume(code)
return continuationCharacterDataInside
}
if (markdownLineEnding(code) && (kind === 6 || kind === 7)) {
return effects.check(
nextBlankConstruct,
continuationClose,
continuationAtLineEnding
)(code)
}
if (code === null || markdownLineEnding(code)) {
return continuationAtLineEnding(code)
}
effects.consume(code)
return continuation
}
function continuationAtLineEnding(code) {
effects.exit('htmlFlowData')
return htmlContinueStart(code)
}
function htmlContinueStart(code) {
if (code === null) {
return done(code)
}
if (markdownLineEnding(code)) {
effects.enter('lineEnding')
effects.consume(code)
effects.exit('lineEnding')
return htmlContinueStart
}
effects.enter('htmlFlowData')
return continuation(code)
}
function continuationCommentInside(code) {
if (code === 45) {
effects.consume(code)
return continuationDeclarationInside
}
return continuation(code)
}
function continuationRawTagOpen(code) {
if (code === 47) {
effects.consume(code)
buffer = ''
return continuationRawEndTag
}
return continuation(code)
}
function continuationRawEndTag(code) {
if (code === 62 && htmlRawNames.indexOf(buffer.toLowerCase()) > -1) {
effects.consume(code)
return continuationClose
}
if (asciiAlpha(code) && buffer.length < 8) {
effects.consume(code)
buffer += fromCharCode(code)
return continuationRawEndTag
}
return continuation(code)
}
function continuationCharacterDataInside(code) {
if (code === 93) {
effects.consume(code)
return continuationDeclarationInside
}
return continuation(code)
}
function continuationDeclarationInside(code) {
if (code === 62) {
effects.consume(code)
return continuationClose
}
return continuation(code)
}
function continuationClose(code) {
if (code === null || markdownLineEnding(code)) {
effects.exit('htmlFlowData')
return done(code)
}
effects.consume(code)
return continuationClose
}
function done(code) {
effects.exit('htmlFlow')
return ok(code)
}
}
function tokenizeNextBlank(effects, ok, nok) {
return start
function start(code) {
effects.exit('htmlFlowData')
effects.enter('lineEndingBlank')
effects.consume(code)
effects.exit('lineEndingBlank')
return effects.attempt(partialBlankLine, ok, nok)
}
}
module.exports = htmlFlow
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/html-text.js":
/*!***********************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/html-text.js ***!
\***********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var asciiAlpha = __webpack_require__(/*! ../character/ascii-alpha.js */ "./node_modules/micromark/dist/character/ascii-alpha.js")
var asciiAlphanumeric = __webpack_require__(/*! ../character/ascii-alphanumeric.js */ "./node_modules/micromark/dist/character/ascii-alphanumeric.js")
var markdownLineEnding = __webpack_require__(/*! ../character/markdown-line-ending.js */ "./node_modules/micromark/dist/character/markdown-line-ending.js")
var markdownLineEndingOrSpace = __webpack_require__(/*! ../character/markdown-line-ending-or-space.js */ "./node_modules/micromark/dist/character/markdown-line-ending-or-space.js")
var markdownSpace = __webpack_require__(/*! ../character/markdown-space.js */ "./node_modules/micromark/dist/character/markdown-space.js")
var factorySpace = __webpack_require__(/*! ./factory-space.js */ "./node_modules/micromark/dist/tokenize/factory-space.js")
var htmlText = {
name: 'htmlText',
tokenize: tokenizeHtmlText
}
function tokenizeHtmlText(effects, ok, nok) {
var self = this
var marker
var buffer
var index
var returnState
return start
function start(code) {
effects.enter('htmlText')
effects.enter('htmlTextData')
effects.consume(code)
return open
}
function open(code) {
if (code === 33) {
effects.consume(code)
return declarationOpen
}
if (code === 47) {
effects.consume(code)
return tagCloseStart
}
if (code === 63) {
effects.consume(code)
return instruction
}
if (asciiAlpha(code)) {
effects.consume(code)
return tagOpen
}
return nok(code)
}
function declarationOpen(code) {
if (code === 45) {
effects.consume(code)
return commentOpen
}
if (code === 91) {
effects.consume(code)
buffer = 'CDATA['
index = 0
return cdataOpen
}
if (asciiAlpha(code)) {
effects.consume(code)
return declaration
}
return nok(code)
}
function commentOpen(code) {
if (code === 45) {
effects.consume(code)
return commentStart
}
return nok(code)
}
function commentStart(code) {
if (code === null || code === 62) {
return nok(code)
}
if (code === 45) {
effects.consume(code)
return commentStartDash
}
return comment(code)
}
function commentStartDash(code) {
if (code === null || code === 62) {
return nok(code)
}
return comment(code)
}
function comment(code) {
if (code === null) {
return nok(code)
}
if (code === 45) {
effects.consume(code)
return commentClose
}
if (markdownLineEnding(code)) {
returnState = comment
return atLineEnding(code)
}
effects.consume(code)
return comment
}
function commentClose(code) {
if (code === 45) {
effects.consume(code)
return end
}
return comment(code)
}
function cdataOpen(code) {
if (code === buffer.charCodeAt(index++)) {
effects.consume(code)
return index === buffer.length ? cdata : cdataOpen
}
return nok(code)
}
function cdata(code) {
if (code === null) {
return nok(code)
}
if (code === 93) {
effects.consume(code)
return cdataClose
}
if (markdownLineEnding(code)) {
returnState = cdata
return atLineEnding(code)
}
effects.consume(code)
return cdata
}
function cdataClose(code) {
if (code === 93) {
effects.consume(code)
return cdataEnd
}
return cdata(code)
}
function cdataEnd(code) {
if (code === 62) {
return end(code)
}
if (code === 93) {
effects.consume(code)
return cdataEnd
}
return cdata(code)
}
function declaration(code) {
if (code === null || code === 62) {
return end(code)
}
if (markdownLineEnding(code)) {
returnState = declaration
return atLineEnding(code)
}
effects.consume(code)
return declaration
}
function instruction(code) {
if (code === null) {
return nok(code)
}
if (code === 63) {
effects.consume(code)
return instructionClose
}
if (markdownLineEnding(code)) {
returnState = instruction
return atLineEnding(code)
}
effects.consume(code)
return instruction
}
function instructionClose(code) {
return code === 62 ? end(code) : instruction(code)
}
function tagCloseStart(code) {
if (asciiAlpha(code)) {
effects.consume(code)
return tagClose
}
return nok(code)
}
function tagClose(code) {
if (code === 45 || asciiAlphanumeric(code)) {
effects.consume(code)
return tagClose
}
return tagCloseBetween(code)
}
function tagCloseBetween(code) {
if (markdownLineEnding(code)) {
returnState = tagCloseBetween
return atLineEnding(code)
}
if (markdownSpace(code)) {
effects.consume(code)
return tagCloseBetween
}
return end(code)
}
function tagOpen(code) {
if (code === 45 || asciiAlphanumeric(code)) {
effects.consume(code)
return tagOpen
}
if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {
return tagOpenBetween(code)
}
return nok(code)
}
function tagOpenBetween(code) {
if (code === 47) {
effects.consume(code)
return end
}
if (code === 58 || code === 95 || asciiAlpha(code)) {
effects.consume(code)
return tagOpenAttributeName
}
if (markdownLineEnding(code)) {
returnState = tagOpenBetween
return atLineEnding(code)
}
if (markdownSpace(code)) {
effects.consume(code)
return tagOpenBetween
}
return end(code)
}
function tagOpenAttributeName(code) {
if (
code === 45 ||
code === 46 ||
code === 58 ||
code === 95 ||
asciiAlphanumeric(code)
) {
effects.consume(code)
return tagOpenAttributeName
}
return tagOpenAttributeNameAfter(code)
}
function tagOpenAttributeNameAfter(code) {
if (code === 61) {
effects.consume(code)
return tagOpenAttributeValueBefore
}
if (markdownLineEnding(code)) {
returnState = tagOpenAttributeNameAfter
return atLineEnding(code)
}
if (markdownSpace(code)) {
effects.consume(code)
return tagOpenAttributeNameAfter
}
return tagOpenBetween(code)
}
function tagOpenAttributeValueBefore(code) {
if (
code === null ||
code === 60 ||
code === 61 ||
code === 62 ||
code === 96
) {
return nok(code)
}
if (code === 34 || code === 39) {
effects.consume(code)
marker = code
return tagOpenAttributeValueQuoted
}
if (markdownLineEnding(code)) {
returnState = tagOpenAttributeValueBefore
return atLineEnding(code)
}
if (markdownSpace(code)) {
effects.consume(code)
return tagOpenAttributeValueBefore
}
effects.consume(code)
marker = undefined
return tagOpenAttributeValueUnquoted
}
function tagOpenAttributeValueQuoted(code) {
if (code === marker) {
effects.consume(code)
return tagOpenAttributeValueQuotedAfter
}
if (code === null) {
return nok(code)
}
if (markdownLineEnding(code)) {
returnState = tagOpenAttributeValueQuoted
return atLineEnding(code)
}
effects.consume(code)
return tagOpenAttributeValueQuoted
}
function tagOpenAttributeValueQuotedAfter(code) {
if (code === 62 || code === 47 || markdownLineEndingOrSpace(code)) {
return tagOpenBetween(code)
}
return nok(code)
}
function tagOpenAttributeValueUnquoted(code) {
if (
code === null ||
code === 34 ||
code === 39 ||
code === 60 ||
code === 61 ||
code === 96
) {
return nok(code)
}
if (code === 62 || markdownLineEndingOrSpace(code)) {
return tagOpenBetween(code)
}
effects.consume(code)
return tagOpenAttributeValueUnquoted
} // We can’t have blank lines in content, so no need to worry about empty
// tokens.
function atLineEnding(code) {
effects.exit('htmlTextData')
effects.enter('lineEnding')
effects.consume(code)
effects.exit('lineEnding')
return factorySpace(
effects,
afterPrefix,
'linePrefix',
self.parser.constructs.disable.null.indexOf('codeIndented') > -1
? undefined
: 4
)
}
function afterPrefix(code) {
effects.enter('htmlTextData')
return returnState(code)
}
function end(code) {
if (code === 62) {
effects.consume(code)
effects.exit('htmlTextData')
effects.exit('htmlText')
return ok
}
return nok(code)
}
}
module.exports = htmlText
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/label-end.js":
/*!***********************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/label-end.js ***!
\***********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var markdownLineEndingOrSpace = __webpack_require__(/*! ../character/markdown-line-ending-or-space.js */ "./node_modules/micromark/dist/character/markdown-line-ending-or-space.js")
var chunkedPush = __webpack_require__(/*! ../util/chunked-push.js */ "./node_modules/micromark/dist/util/chunked-push.js")
var chunkedSplice = __webpack_require__(/*! ../util/chunked-splice.js */ "./node_modules/micromark/dist/util/chunked-splice.js")
var normalizeIdentifier = __webpack_require__(/*! ../util/normalize-identifier.js */ "./node_modules/micromark/dist/util/normalize-identifier.js")
var resolveAll = __webpack_require__(/*! ../util/resolve-all.js */ "./node_modules/micromark/dist/util/resolve-all.js")
var shallow = __webpack_require__(/*! ../util/shallow.js */ "./node_modules/micromark/dist/util/shallow.js")
var factoryDestination = __webpack_require__(/*! ./factory-destination.js */ "./node_modules/micromark/dist/tokenize/factory-destination.js")
var factoryLabel = __webpack_require__(/*! ./factory-label.js */ "./node_modules/micromark/dist/tokenize/factory-label.js")
var factoryTitle = __webpack_require__(/*! ./factory-title.js */ "./node_modules/micromark/dist/tokenize/factory-title.js")
var factoryWhitespace = __webpack_require__(/*! ./factory-whitespace.js */ "./node_modules/micromark/dist/tokenize/factory-whitespace.js")
var labelEnd = {
name: 'labelEnd',
tokenize: tokenizeLabelEnd,
resolveTo: resolveToLabelEnd,
resolveAll: resolveAllLabelEnd
}
var resourceConstruct = {
tokenize: tokenizeResource
}
var fullReferenceConstruct = {
tokenize: tokenizeFullReference
}
var collapsedReferenceConstruct = {
tokenize: tokenizeCollapsedReference
}
function resolveAllLabelEnd(events) {
var index = -1
var token
while (++index < events.length) {
token = events[index][1]
if (
!token._used &&
(token.type === 'labelImage' ||
token.type === 'labelLink' ||
token.type === 'labelEnd')
) {
// Remove the marker.
events.splice(index + 1, token.type === 'labelImage' ? 4 : 2)
token.type = 'data'
index++
}
}
return events
}
function resolveToLabelEnd(events, context) {
var index = events.length
var offset = 0
var group
var label
var text
var token
var open
var close
var media // Find an opening.
while (index--) {
token = events[index][1]
if (open) {
// If we see another link, or inactive link label, we’ve been here before.
if (
token.type === 'link' ||
(token.type === 'labelLink' && token._inactive)
) {
break
} // Mark other link openings as inactive, as we can’t have links in
// links.
if (events[index][0] === 'enter' && token.type === 'labelLink') {
token._inactive = true
}
} else if (close) {
if (
events[index][0] === 'enter' &&
(token.type === 'labelImage' || token.type === 'labelLink') &&
!token._balanced
) {
open = index
if (token.type !== 'labelLink') {
offset = 2
break
}
}
} else if (token.type === 'labelEnd') {
close = index
}
}
group = {
type: events[open][1].type === 'labelLink' ? 'link' : 'image',
start: shallow(events[open][1].start),
end: shallow(events[events.length - 1][1].end)
}
label = {
type: 'label',
start: shallow(events[open][1].start),
end: shallow(events[close][1].end)
}
text = {
type: 'labelText',
start: shallow(events[open + offset + 2][1].end),
end: shallow(events[close - 2][1].start)
}
media = [
['enter', group, context],
['enter', label, context]
] // Opening marker.
media = chunkedPush(media, events.slice(open + 1, open + offset + 3)) // Text open.
media = chunkedPush(media, [['enter', text, context]]) // Between.
media = chunkedPush(
media,
resolveAll(
context.parser.constructs.insideSpan.null,
events.slice(open + offset + 4, close - 3),
context
)
) // Text close, marker close, label close.
media = chunkedPush(media, [
['exit', text, context],
events[close - 2],
events[close - 1],
['exit', label, context]
]) // Reference, resource, or so.
media = chunkedPush(media, events.slice(close + 1)) // Media close.
media = chunkedPush(media, [['exit', group, context]])
chunkedSplice(events, open, events.length, media)
return events
}
function tokenizeLabelEnd(effects, ok, nok) {
var self = this
var index = self.events.length
var labelStart
var defined // Find an opening.
while (index--) {
if (
(self.events[index][1].type === 'labelImage' ||
self.events[index][1].type === 'labelLink') &&
!self.events[index][1]._balanced
) {
labelStart = self.events[index][1]
break
}
}
return start
function start(code) {
if (!labelStart) {
return nok(code)
} // It’s a balanced bracket, but contains a link.
if (labelStart._inactive) return balanced(code)
defined =
self.parser.defined.indexOf(
normalizeIdentifier(
self.sliceSerialize({
start: labelStart.end,
end: self.now()
})
)
) > -1
effects.enter('labelEnd')
effects.enter('labelMarker')
effects.consume(code)
effects.exit('labelMarker')
effects.exit('labelEnd')
return afterLabelEnd
}
function afterLabelEnd(code) {
// Resource: `[asd](fgh)`.
if (code === 40) {
return effects.attempt(
resourceConstruct,
ok,
defined ? ok : balanced
)(code)
} // Collapsed (`[asd][]`) or full (`[asd][fgh]`) reference?
if (code === 91) {
return effects.attempt(
fullReferenceConstruct,
ok,
defined
? effects.attempt(collapsedReferenceConstruct, ok, balanced)
: balanced
)(code)
} // Shortcut reference: `[asd]`?
return defined ? ok(code) : balanced(code)
}
function balanced(code) {
labelStart._balanced = true
return nok(code)
}
}
function tokenizeResource(effects, ok, nok) {
return start
function start(code) {
effects.enter('resource')
effects.enter('resourceMarker')
effects.consume(code)
effects.exit('resourceMarker')
return factoryWhitespace(effects, open)
}
function open(code) {
if (code === 41) {
return end(code)
}
return factoryDestination(
effects,
destinationAfter,
nok,
'resourceDestination',
'resourceDestinationLiteral',
'resourceDestinationLiteralMarker',
'resourceDestinationRaw',
'resourceDestinationString',
3
)(code)
}
function destinationAfter(code) {
return markdownLineEndingOrSpace(code)
? factoryWhitespace(effects, between)(code)
: end(code)
}
function between(code) {
if (code === 34 || code === 39 || code === 40) {
return factoryTitle(
effects,
factoryWhitespace(effects, end),
nok,
'resourceTitle',
'resourceTitleMarker',
'resourceTitleString'
)(code)
}
return end(code)
}
function end(code) {
if (code === 41) {
effects.enter('resourceMarker')
effects.consume(code)
effects.exit('resourceMarker')
effects.exit('resource')
return ok
}
return nok(code)
}
}
function tokenizeFullReference(effects, ok, nok) {
var self = this
return start
function start(code) {
return factoryLabel.call(
self,
effects,
afterLabel,
nok,
'reference',
'referenceMarker',
'referenceString'
)(code)
}
function afterLabel(code) {
return self.parser.defined.indexOf(
normalizeIdentifier(
self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)
)
) < 0
? nok(code)
: ok(code)
}
}
function tokenizeCollapsedReference(effects, ok, nok) {
return start
function start(code) {
effects.enter('reference')
effects.enter('referenceMarker')
effects.consume(code)
effects.exit('referenceMarker')
return open
}
function open(code) {
if (code === 93) {
effects.enter('referenceMarker')
effects.consume(code)
effects.exit('referenceMarker')
effects.exit('reference')
return ok
}
return nok(code)
}
}
module.exports = labelEnd
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/label-start-image.js":
/*!*******************************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/label-start-image.js ***!
\*******************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var labelEnd = __webpack_require__(/*! ./label-end.js */ "./node_modules/micromark/dist/tokenize/label-end.js")
var labelStartImage = {
name: 'labelStartImage',
tokenize: tokenizeLabelStartImage,
resolveAll: labelEnd.resolveAll
}
function tokenizeLabelStartImage(effects, ok, nok) {
var self = this
return start
function start(code) {
effects.enter('labelImage')
effects.enter('labelImageMarker')
effects.consume(code)
effects.exit('labelImageMarker')
return open
}
function open(code) {
if (code === 91) {
effects.enter('labelMarker')
effects.consume(code)
effects.exit('labelMarker')
effects.exit('labelImage')
return after
}
return nok(code)
}
function after(code) {
/* c8 ignore next */
return code === 94 &&
/* c8 ignore next */
'_hiddenFootnoteSupport' in self.parser.constructs
? /* c8 ignore next */
nok(code)
: ok(code)
}
}
module.exports = labelStartImage
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/label-start-link.js":
/*!******************************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/label-start-link.js ***!
\******************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var labelEnd = __webpack_require__(/*! ./label-end.js */ "./node_modules/micromark/dist/tokenize/label-end.js")
var labelStartLink = {
name: 'labelStartLink',
tokenize: tokenizeLabelStartLink,
resolveAll: labelEnd.resolveAll
}
function tokenizeLabelStartLink(effects, ok, nok) {
var self = this
return start
function start(code) {
effects.enter('labelLink')
effects.enter('labelMarker')
effects.consume(code)
effects.exit('labelMarker')
effects.exit('labelLink')
return after
}
function after(code) {
/* c8 ignore next */
return code === 94 &&
/* c8 ignore next */
'_hiddenFootnoteSupport' in self.parser.constructs
? /* c8 ignore next */
nok(code)
: ok(code)
}
}
module.exports = labelStartLink
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/line-ending.js":
/*!*************************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/line-ending.js ***!
\*************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var factorySpace = __webpack_require__(/*! ./factory-space.js */ "./node_modules/micromark/dist/tokenize/factory-space.js")
var lineEnding = {
name: 'lineEnding',
tokenize: tokenizeLineEnding
}
function tokenizeLineEnding(effects, ok) {
return start
function start(code) {
effects.enter('lineEnding')
effects.consume(code)
effects.exit('lineEnding')
return factorySpace(effects, ok, 'linePrefix')
}
}
module.exports = lineEnding
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/list.js":
/*!******************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/list.js ***!
\******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var asciiDigit = __webpack_require__(/*! ../character/ascii-digit.js */ "./node_modules/micromark/dist/character/ascii-digit.js")
var markdownSpace = __webpack_require__(/*! ../character/markdown-space.js */ "./node_modules/micromark/dist/character/markdown-space.js")
var prefixSize = __webpack_require__(/*! ../util/prefix-size.js */ "./node_modules/micromark/dist/util/prefix-size.js")
var sizeChunks = __webpack_require__(/*! ../util/size-chunks.js */ "./node_modules/micromark/dist/util/size-chunks.js")
var factorySpace = __webpack_require__(/*! ./factory-space.js */ "./node_modules/micromark/dist/tokenize/factory-space.js")
var partialBlankLine = __webpack_require__(/*! ./partial-blank-line.js */ "./node_modules/micromark/dist/tokenize/partial-blank-line.js")
var thematicBreak = __webpack_require__(/*! ./thematic-break.js */ "./node_modules/micromark/dist/tokenize/thematic-break.js")
var list = {
name: 'list',
tokenize: tokenizeListStart,
continuation: {
tokenize: tokenizeListContinuation
},
exit: tokenizeListEnd
}
var listItemPrefixWhitespaceConstruct = {
tokenize: tokenizeListItemPrefixWhitespace,
partial: true
}
var indentConstruct = {
tokenize: tokenizeIndent,
partial: true
}
function tokenizeListStart(effects, ok, nok) {
var self = this
var initialSize = prefixSize(self.events, 'linePrefix')
var size = 0
return start
function start(code) {
var kind =
self.containerState.type ||
(code === 42 || code === 43 || code === 45
? 'listUnordered'
: 'listOrdered')
if (
kind === 'listUnordered'
? !self.containerState.marker || code === self.containerState.marker
: asciiDigit(code)
) {
if (!self.containerState.type) {
self.containerState.type = kind
effects.enter(kind, {
_container: true
})
}
if (kind === 'listUnordered') {
effects.enter('listItemPrefix')
return code === 42 || code === 45
? effects.check(thematicBreak, nok, atMarker)(code)
: atMarker(code)
}
if (!self.interrupt || code === 49) {
effects.enter('listItemPrefix')
effects.enter('listItemValue')
return inside(code)
}
}
return nok(code)
}
function inside(code) {
if (asciiDigit(code) && ++size < 10) {
effects.consume(code)
return inside
}
if (
(!self.interrupt || size < 2) &&
(self.containerState.marker
? code === self.containerState.marker
: code === 41 || code === 46)
) {
effects.exit('listItemValue')
return atMarker(code)
}
return nok(code)
}
function atMarker(code) {
effects.enter('listItemMarker')
effects.consume(code)
effects.exit('listItemMarker')
self.containerState.marker = self.containerState.marker || code
return effects.check(
partialBlankLine, // Can’t be empty when interrupting.
self.interrupt ? nok : onBlank,
effects.attempt(
listItemPrefixWhitespaceConstruct,
endOfPrefix,
otherPrefix
)
)
}
function onBlank(code) {
self.containerState.initialBlankLine = true
initialSize++
return endOfPrefix(code)
}
function otherPrefix(code) {
if (markdownSpace(code)) {
effects.enter('listItemPrefixWhitespace')
effects.consume(code)
effects.exit('listItemPrefixWhitespace')
return endOfPrefix
}
return nok(code)
}
function endOfPrefix(code) {
self.containerState.size =
initialSize + sizeChunks(self.sliceStream(effects.exit('listItemPrefix')))
return ok(code)
}
}
function tokenizeListContinuation(effects, ok, nok) {
var self = this
self.containerState._closeFlow = undefined
return effects.check(partialBlankLine, onBlank, notBlank)
function onBlank(code) {
self.containerState.furtherBlankLines =
self.containerState.furtherBlankLines ||
self.containerState.initialBlankLine // We have a blank line.
// Still, try to consume at most the items size.
return factorySpace(
effects,
ok,
'listItemIndent',
self.containerState.size + 1
)(code)
}
function notBlank(code) {
if (self.containerState.furtherBlankLines || !markdownSpace(code)) {
self.containerState.furtherBlankLines = self.containerState.initialBlankLine = undefined
return notInCurrentItem(code)
}
self.containerState.furtherBlankLines = self.containerState.initialBlankLine = undefined
return effects.attempt(indentConstruct, ok, notInCurrentItem)(code)
}
function notInCurrentItem(code) {
// While we do continue, we signal that the flow should be closed.
self.containerState._closeFlow = true // As we’re closing flow, we’re no longer interrupting.
self.interrupt = undefined
return factorySpace(
effects,
effects.attempt(list, ok, nok),
'linePrefix',
self.parser.constructs.disable.null.indexOf('codeIndented') > -1
? undefined
: 4
)(code)
}
}
function tokenizeIndent(effects, ok, nok) {
var self = this
return factorySpace(
effects,
afterPrefix,
'listItemIndent',
self.containerState.size + 1
)
function afterPrefix(code) {
return prefixSize(self.events, 'listItemIndent') ===
self.containerState.size
? ok(code)
: nok(code)
}
}
function tokenizeListEnd(effects) {
effects.exit(this.containerState.type)
}
function tokenizeListItemPrefixWhitespace(effects, ok, nok) {
var self = this
return factorySpace(
effects,
afterPrefix,
'listItemPrefixWhitespace',
self.parser.constructs.disable.null.indexOf('codeIndented') > -1
? undefined
: 4 + 1
)
function afterPrefix(code) {
return markdownSpace(code) ||
!prefixSize(self.events, 'listItemPrefixWhitespace')
? nok(code)
: ok(code)
}
}
module.exports = list
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/partial-blank-line.js":
/*!********************************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/partial-blank-line.js ***!
\********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var markdownLineEnding = __webpack_require__(/*! ../character/markdown-line-ending.js */ "./node_modules/micromark/dist/character/markdown-line-ending.js")
var factorySpace = __webpack_require__(/*! ./factory-space.js */ "./node_modules/micromark/dist/tokenize/factory-space.js")
var partialBlankLine = {
tokenize: tokenizePartialBlankLine,
partial: true
}
function tokenizePartialBlankLine(effects, ok, nok) {
return factorySpace(effects, afterWhitespace, 'linePrefix')
function afterWhitespace(code) {
return code === null || markdownLineEnding(code) ? ok(code) : nok(code)
}
}
module.exports = partialBlankLine
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/setext-underline.js":
/*!******************************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/setext-underline.js ***!
\******************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var markdownLineEnding = __webpack_require__(/*! ../character/markdown-line-ending.js */ "./node_modules/micromark/dist/character/markdown-line-ending.js")
var shallow = __webpack_require__(/*! ../util/shallow.js */ "./node_modules/micromark/dist/util/shallow.js")
var factorySpace = __webpack_require__(/*! ./factory-space.js */ "./node_modules/micromark/dist/tokenize/factory-space.js")
var setextUnderline = {
name: 'setextUnderline',
tokenize: tokenizeSetextUnderline,
resolveTo: resolveToSetextUnderline
}
function resolveToSetextUnderline(events, context) {
var index = events.length
var content
var text
var definition
var heading // Find the opening of the content.
// It’ll always exist: we don’t tokenize if it isn’t there.
while (index--) {
if (events[index][0] === 'enter') {
if (events[index][1].type === 'content') {
content = index
break
}
if (events[index][1].type === 'paragraph') {
text = index
}
} // Exit
else {
if (events[index][1].type === 'content') {
// Remove the content end (if needed we’ll add it later)
events.splice(index, 1)
}
if (!definition && events[index][1].type === 'definition') {
definition = index
}
}
}
heading = {
type: 'setextHeading',
start: shallow(events[text][1].start),
end: shallow(events[events.length - 1][1].end)
} // Change the paragraph to setext heading text.
events[text][1].type = 'setextHeadingText' // If we have definitions in the content, we’ll keep on having content,
// but we need move it.
if (definition) {
events.splice(text, 0, ['enter', heading, context])
events.splice(definition + 1, 0, ['exit', events[content][1], context])
events[content][1].end = shallow(events[definition][1].end)
} else {
events[content][1] = heading
} // Add the heading exit at the end.
events.push(['exit', heading, context])
return events
}
function tokenizeSetextUnderline(effects, ok, nok) {
var self = this
var index = self.events.length
var marker
var paragraph // Find an opening.
while (index--) {
// Skip enter/exit of line ending, line prefix, and content.
// We can now either have a definition or a paragraph.
if (
self.events[index][1].type !== 'lineEnding' &&
self.events[index][1].type !== 'linePrefix' &&
self.events[index][1].type !== 'content'
) {
paragraph = self.events[index][1].type === 'paragraph'
break
}
}
return start
function start(code) {
if (!self.lazy && (self.interrupt || paragraph)) {
effects.enter('setextHeadingLine')
effects.enter('setextHeadingLineSequence')
marker = code
return closingSequence(code)
}
return nok(code)
}
function closingSequence(code) {
if (code === marker) {
effects.consume(code)
return closingSequence
}
effects.exit('setextHeadingLineSequence')
return factorySpace(effects, closingSequenceEnd, 'lineSuffix')(code)
}
function closingSequenceEnd(code) {
if (code === null || markdownLineEnding(code)) {
effects.exit('setextHeadingLine')
return ok(code)
}
return nok(code)
}
}
module.exports = setextUnderline
/***/ }),
/***/ "./node_modules/micromark/dist/tokenize/thematic-break.js":
/*!****************************************************************!*\
!*** ./node_modules/micromark/dist/tokenize/thematic-break.js ***!
\****************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var markdownLineEnding = __webpack_require__(/*! ../character/markdown-line-ending.js */ "./node_modules/micromark/dist/character/markdown-line-ending.js")
var markdownSpace = __webpack_require__(/*! ../character/markdown-space.js */ "./node_modules/micromark/dist/character/markdown-space.js")
var factorySpace = __webpack_require__(/*! ./factory-space.js */ "./node_modules/micromark/dist/tokenize/factory-space.js")
var thematicBreak = {
name: 'thematicBreak',
tokenize: tokenizeThematicBreak
}
function tokenizeThematicBreak(effects, ok, nok) {
var size = 0
var marker
return start
function start(code) {
effects.enter('thematicBreak')
marker = code
return atBreak(code)
}
function atBreak(code) {
if (code === marker) {
effects.enter('thematicBreakSequence')
return sequence(code)
}
if (markdownSpace(code)) {
return factorySpace(effects, atBreak, 'whitespace')(code)
}
if (size < 3 || (code !== null && !markdownLineEnding(code))) {
return nok(code)
}
effects.exit('thematicBreak')
return ok(code)
}
function sequence(code) {
if (code === marker) {
effects.consume(code)
size++
return sequence
}
effects.exit('thematicBreakSequence')
return atBreak(code)
}
}
module.exports = thematicBreak
/***/ }),
/***/ "./node_modules/micromark/dist/util/chunked-push.js":
/*!**********************************************************!*\
!*** ./node_modules/micromark/dist/util/chunked-push.js ***!
\**********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var chunkedSplice = __webpack_require__(/*! ./chunked-splice.js */ "./node_modules/micromark/dist/util/chunked-splice.js")
function chunkedPush(list, items) {
if (list.length) {
chunkedSplice(list, list.length, 0, items)
return list
}
return items
}
module.exports = chunkedPush
/***/ }),
/***/ "./node_modules/micromark/dist/util/chunked-splice.js":
/*!************************************************************!*\
!*** ./node_modules/micromark/dist/util/chunked-splice.js ***!
\************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var splice = __webpack_require__(/*! ../constant/splice.js */ "./node_modules/micromark/dist/constant/splice.js")
// causes a stack overflow in V8 when trying to insert 100k items for instance.
function chunkedSplice(list, start, remove, items) {
var end = list.length
var chunkStart = 0
var parameters // Make start between zero and `end` (included).
if (start < 0) {
start = -start > end ? 0 : end + start
} else {
start = start > end ? end : start
}
remove = remove > 0 ? remove : 0 // No need to chunk the items if there’s only a couple (10k) items.
if (items.length < 10000) {
parameters = Array.from(items)
parameters.unshift(start, remove)
splice.apply(list, parameters)
} else {
// Delete `remove` items starting from `start`
if (remove) splice.apply(list, [start, remove]) // Insert the items in chunks to not cause stack overflows.
while (chunkStart < items.length) {
parameters = items.slice(chunkStart, chunkStart + 10000)
parameters.unshift(start, 0)
splice.apply(list, parameters)
chunkStart += 10000
start += 10000
}
}
}
module.exports = chunkedSplice
/***/ }),
/***/ "./node_modules/micromark/dist/util/classify-character.js":
/*!****************************************************************!*\
!*** ./node_modules/micromark/dist/util/classify-character.js ***!
\****************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var markdownLineEndingOrSpace = __webpack_require__(/*! ../character/markdown-line-ending-or-space.js */ "./node_modules/micromark/dist/character/markdown-line-ending-or-space.js")
var unicodePunctuation = __webpack_require__(/*! ../character/unicode-punctuation.js */ "./node_modules/micromark/dist/character/unicode-punctuation.js")
var unicodeWhitespace = __webpack_require__(/*! ../character/unicode-whitespace.js */ "./node_modules/micromark/dist/character/unicode-whitespace.js")
// Classify whether a character is unicode whitespace, unicode punctuation, or
// anything else.
// Used for attention (emphasis, strong), whose sequences can open or close
// based on the class of surrounding characters.
function classifyCharacter(code) {
if (
code === null ||
markdownLineEndingOrSpace(code) ||
unicodeWhitespace(code)
) {
return 1
}
if (unicodePunctuation(code)) {
return 2
}
}
module.exports = classifyCharacter
/***/ }),
/***/ "./node_modules/micromark/dist/util/combine-extensions.js":
/*!****************************************************************!*\
!*** ./node_modules/micromark/dist/util/combine-extensions.js ***!
\****************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var hasOwnProperty = __webpack_require__(/*! ../constant/has-own-property.js */ "./node_modules/micromark/dist/constant/has-own-property.js")
var chunkedSplice = __webpack_require__(/*! ./chunked-splice.js */ "./node_modules/micromark/dist/util/chunked-splice.js")
var miniflat = __webpack_require__(/*! ./miniflat.js */ "./node_modules/micromark/dist/util/miniflat.js")
function combineExtensions(extensions) {
var all = {}
var index = -1
while (++index < extensions.length) {
extension(all, extensions[index])
}
return all
}
function extension(all, extension) {
var hook
var left
var right
var code
for (hook in extension) {
left = hasOwnProperty.call(all, hook) ? all[hook] : (all[hook] = {})
right = extension[hook]
for (code in right) {
left[code] = constructs(
miniflat(right[code]),
hasOwnProperty.call(left, code) ? left[code] : []
)
}
}
}
function constructs(list, existing) {
var index = -1
var before = []
while (++index < list.length) {
;(list[index].add === 'after' ? existing : before).push(list[index])
}
chunkedSplice(existing, 0, 0, before)
return existing
}
module.exports = combineExtensions
/***/ }),
/***/ "./node_modules/micromark/dist/util/create-tokenizer.js":
/*!**************************************************************!*\
!*** ./node_modules/micromark/dist/util/create-tokenizer.js ***!
\**************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var assign = __webpack_require__(/*! ../constant/assign.js */ "./node_modules/micromark/dist/constant/assign.js")
var markdownLineEnding = __webpack_require__(/*! ../character/markdown-line-ending.js */ "./node_modules/micromark/dist/character/markdown-line-ending.js")
var chunkedPush = __webpack_require__(/*! ./chunked-push.js */ "./node_modules/micromark/dist/util/chunked-push.js")
var chunkedSplice = __webpack_require__(/*! ./chunked-splice.js */ "./node_modules/micromark/dist/util/chunked-splice.js")
var miniflat = __webpack_require__(/*! ./miniflat.js */ "./node_modules/micromark/dist/util/miniflat.js")
var resolveAll = __webpack_require__(/*! ./resolve-all.js */ "./node_modules/micromark/dist/util/resolve-all.js")
var serializeChunks = __webpack_require__(/*! ./serialize-chunks.js */ "./node_modules/micromark/dist/util/serialize-chunks.js")
var shallow = __webpack_require__(/*! ./shallow.js */ "./node_modules/micromark/dist/util/shallow.js")
var sliceChunks = __webpack_require__(/*! ./slice-chunks.js */ "./node_modules/micromark/dist/util/slice-chunks.js")
// Create a tokenizer.
// Tokenizers deal with one type of data (e.g., containers, flow, text).
// The parser is the object dealing with it all.
// `initialize` works like other constructs, except that only its `tokenize`
// function is used, in which case it doesn’t receive an `ok` or `nok`.
// `from` can be given to set the point before the first character, although
// when further lines are indented, they must be set with `defineSkip`.
function createTokenizer(parser, initialize, from) {
var point = from
? shallow(from)
: {
line: 1,
column: 1,
offset: 0
}
var columnStart = {}
var resolveAllConstructs = []
var chunks = []
var stack = []
var effects = {
consume: consume,
enter: enter,
exit: exit,
attempt: constructFactory(onsuccessfulconstruct),
check: constructFactory(onsuccessfulcheck),
interrupt: constructFactory(onsuccessfulcheck, {
interrupt: true
}),
lazy: constructFactory(onsuccessfulcheck, {
lazy: true
})
} // State and tools for resolving and serializing.
var context = {
previous: null,
events: [],
parser: parser,
sliceStream: sliceStream,
sliceSerialize: sliceSerialize,
now: now,
defineSkip: skip,
write: write
} // The state function.
var state = initialize.tokenize.call(context, effects) // Track which character we expect to be consumed, to catch bugs.
if (initialize.resolveAll) {
resolveAllConstructs.push(initialize)
} // Store where we are in the input stream.
point._index = 0
point._bufferIndex = -1
return context
function write(slice) {
chunks = chunkedPush(chunks, slice)
main() // Exit if we’re not done, resolve might change stuff.
if (chunks[chunks.length - 1] !== null) {
return []
}
addResult(initialize, 0) // Otherwise, resolve, and exit.
context.events = resolveAll(resolveAllConstructs, context.events, context)
return context.events
} //
// Tools.
//
function sliceSerialize(token) {
return serializeChunks(sliceStream(token))
}
function sliceStream(token) {
return sliceChunks(chunks, token)
}
function now() {
return shallow(point)
}
function skip(value) {
columnStart[value.line] = value.column
accountForPotentialSkip()
} //
// State management.
//
// Main loop (note that `_index` and `_bufferIndex` in `point` are modified by
// `consume`).
// Here is where we walk through the chunks, which either include strings of
// several characters, or numerical character codes.
// The reason to do this in a loop instead of a call is so the stack can
// drain.
function main() {
var chunkIndex
var chunk
while (point._index < chunks.length) {
chunk = chunks[point._index] // If we’re in a buffer chunk, loop through it.
if (typeof chunk === 'string') {
chunkIndex = point._index
if (point._bufferIndex < 0) {
point._bufferIndex = 0
}
while (
point._index === chunkIndex &&
point._bufferIndex < chunk.length
) {
go(chunk.charCodeAt(point._bufferIndex))
}
} else {
go(chunk)
}
}
} // Deal with one code.
function go(code) {
state = state(code)
} // Move a character forward.
function consume(code) {
if (markdownLineEnding(code)) {
point.line++
point.column = 1
point.offset += code === -3 ? 2 : 1
accountForPotentialSkip()
} else if (code !== -1) {
point.column++
point.offset++
} // Not in a string chunk.
if (point._bufferIndex < 0) {
point._index++
} else {
point._bufferIndex++ // At end of string chunk.
if (point._bufferIndex === chunks[point._index].length) {
point._bufferIndex = -1
point._index++
}
} // Expose the previous character.
context.previous = code // Mark as consumed.
} // Start a token.
function enter(type, fields) {
var token = fields || {}
token.type = type
token.start = now()
context.events.push(['enter', token, context])
stack.push(token)
return token
} // Stop a token.
function exit(type) {
var token = stack.pop()
token.end = now()
context.events.push(['exit', token, context])
return token
} // Use results.
function onsuccessfulconstruct(construct, info) {
addResult(construct, info.from)
} // Discard results.
function onsuccessfulcheck(construct, info) {
info.restore()
} // Factory to attempt/check/interrupt.
function constructFactory(onreturn, fields) {
return hook // Handle either an object mapping codes to constructs, a list of
// constructs, or a single construct.
function hook(constructs, returnState, bogusState) {
var listOfConstructs
var constructIndex
var currentConstruct
var info
return constructs.tokenize || 'length' in constructs
? handleListOfConstructs(miniflat(constructs))
: handleMapOfConstructs
function handleMapOfConstructs(code) {
if (code in constructs || null in constructs) {
return handleListOfConstructs(
constructs.null
? /* c8 ignore next */
miniflat(constructs[code]).concat(miniflat(constructs.null))
: constructs[code]
)(code)
}
return bogusState(code)
}
function handleListOfConstructs(list) {
listOfConstructs = list
constructIndex = 0
return handleConstruct(list[constructIndex])
}
function handleConstruct(construct) {
return start
function start(code) {
// To do: not nede to store if there is no bogus state, probably?
// Currently doesn’t work because `inspect` in document does a check
// w/o a bogus, which doesn’t make sense. But it does seem to help perf
// by not storing.
info = store()
currentConstruct = construct
if (!construct.partial) {
context.currentConstruct = construct
}
if (
construct.name &&
context.parser.constructs.disable.null.indexOf(construct.name) > -1
) {
return nok()
}
return construct.tokenize.call(
fields ? assign({}, context, fields) : context,
effects,
ok,
nok
)(code)
}
}
function ok(code) {
onreturn(currentConstruct, info)
return returnState
}
function nok(code) {
info.restore()
if (++constructIndex < listOfConstructs.length) {
return handleConstruct(listOfConstructs[constructIndex])
}
return bogusState
}
}
}
function addResult(construct, from) {
if (construct.resolveAll && resolveAllConstructs.indexOf(construct) < 0) {
resolveAllConstructs.push(construct)
}
if (construct.resolve) {
chunkedSplice(
context.events,
from,
context.events.length - from,
construct.resolve(context.events.slice(from), context)
)
}
if (construct.resolveTo) {
context.events = construct.resolveTo(context.events, context)
}
}
function store() {
var startPoint = now()
var startPrevious = context.previous
var startCurrentConstruct = context.currentConstruct
var startEventsIndex = context.events.length
var startStack = Array.from(stack)
return {
restore: restore,
from: startEventsIndex
}
function restore() {
point = startPoint
context.previous = startPrevious
context.currentConstruct = startCurrentConstruct
context.events.length = startEventsIndex
stack = startStack
accountForPotentialSkip()
}
}
function accountForPotentialSkip() {
if (point.line in columnStart && point.column < 2) {
point.column = columnStart[point.line]
point.offset += columnStart[point.line] - 1
}
}
}
module.exports = createTokenizer
/***/ }),
/***/ "./node_modules/micromark/dist/util/miniflat.js":
/*!******************************************************!*\
!*** ./node_modules/micromark/dist/util/miniflat.js ***!
\******************************************************/
/***/ ((module) => {
"use strict";
function miniflat(value) {
return value === null || value === undefined
? []
: 'length' in value
? value
: [value]
}
module.exports = miniflat
/***/ }),
/***/ "./node_modules/micromark/dist/util/move-point.js":
/*!********************************************************!*\
!*** ./node_modules/micromark/dist/util/move-point.js ***!
\********************************************************/
/***/ ((module) => {
"use strict";
// chunks (replacement characters, tabs, or line endings).
function movePoint(point, offset) {
point.column += offset
point.offset += offset
point._bufferIndex += offset
return point
}
module.exports = movePoint
/***/ }),
/***/ "./node_modules/micromark/dist/util/normalize-identifier.js":
/*!******************************************************************!*\
!*** ./node_modules/micromark/dist/util/normalize-identifier.js ***!
\******************************************************************/
/***/ ((module) => {
"use strict";
function normalizeIdentifier(value) {
return (
value // Collapse Markdown whitespace.
.replace(/[\t\n\r ]+/g, ' ') // Trim.
.replace(/^ | $/g, '') // Some characters are considered “uppercase”, but if their lowercase
// counterpart is uppercased will result in a different uppercase
// character.
// Hence, to get that form, we perform both lower- and uppercase.
// Upper case makes sure keys will not interact with default prototypal
// methods: no object method is uppercase.
.toLowerCase()
.toUpperCase()
)
}
module.exports = normalizeIdentifier
/***/ }),
/***/ "./node_modules/micromark/dist/util/prefix-size.js":
/*!*********************************************************!*\
!*** ./node_modules/micromark/dist/util/prefix-size.js ***!
\*********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var sizeChunks = __webpack_require__(/*! ./size-chunks.js */ "./node_modules/micromark/dist/util/size-chunks.js")
function prefixSize(events, type) {
var tail = events[events.length - 1]
if (!tail || tail[1].type !== type) return 0
return sizeChunks(tail[2].sliceStream(tail[1]))
}
module.exports = prefixSize
/***/ }),
/***/ "./node_modules/micromark/dist/util/regex-check.js":
/*!*********************************************************!*\
!*** ./node_modules/micromark/dist/util/regex-check.js ***!
\*********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var fromCharCode = __webpack_require__(/*! ../constant/from-char-code.js */ "./node_modules/micromark/dist/constant/from-char-code.js")
function regexCheck(regex) {
return check
function check(code) {
return regex.test(fromCharCode(code))
}
}
module.exports = regexCheck
/***/ }),
/***/ "./node_modules/micromark/dist/util/resolve-all.js":
/*!*********************************************************!*\
!*** ./node_modules/micromark/dist/util/resolve-all.js ***!
\*********************************************************/
/***/ ((module) => {
"use strict";
function resolveAll(constructs, events, context) {
var called = []
var index = -1
var resolve
while (++index < constructs.length) {
resolve = constructs[index].resolveAll
if (resolve && called.indexOf(resolve) < 0) {
events = resolve(events, context)
called.push(resolve)
}
}
return events
}
module.exports = resolveAll
/***/ }),
/***/ "./node_modules/micromark/dist/util/safe-from-int.js":
/*!***********************************************************!*\
!*** ./node_modules/micromark/dist/util/safe-from-int.js ***!
\***********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var fromCharCode = __webpack_require__(/*! ../constant/from-char-code.js */ "./node_modules/micromark/dist/constant/from-char-code.js")
function safeFromInt(value, base) {
var code = parseInt(value, base)
if (
// C0 except for HT, LF, FF, CR, space
code < 9 ||
code === 11 ||
(code > 13 && code < 32) || // Control character (DEL) of the basic block and C1 controls.
(code > 126 && code < 160) || // Lone high surrogates and low surrogates.
(code > 55295 && code < 57344) || // Noncharacters.
(code > 64975 && code < 65008) ||
(code & 65535) === 65535 ||
(code & 65535) === 65534 || // Out of range
code > 1114111
) {
return '\uFFFD'
}
return fromCharCode(code)
}
module.exports = safeFromInt
/***/ }),
/***/ "./node_modules/micromark/dist/util/serialize-chunks.js":
/*!**************************************************************!*\
!*** ./node_modules/micromark/dist/util/serialize-chunks.js ***!
\**************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var fromCharCode = __webpack_require__(/*! ../constant/from-char-code.js */ "./node_modules/micromark/dist/constant/from-char-code.js")
function serializeChunks(chunks) {
var index = -1
var result = []
var chunk
var value
var atTab
while (++index < chunks.length) {
chunk = chunks[index]
if (typeof chunk === 'string') {
value = chunk
} else if (chunk === -5) {
value = '\r'
} else if (chunk === -4) {
value = '\n'
} else if (chunk === -3) {
value = '\r' + '\n'
} else if (chunk === -2) {
value = '\t'
} else if (chunk === -1) {
if (atTab) continue
value = ' '
} else {
// Currently only replacement character.
value = fromCharCode(chunk)
}
atTab = chunk === -2
result.push(value)
}
return result.join('')
}
module.exports = serializeChunks
/***/ }),
/***/ "./node_modules/micromark/dist/util/shallow.js":
/*!*****************************************************!*\
!*** ./node_modules/micromark/dist/util/shallow.js ***!
\*****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var assign = __webpack_require__(/*! ../constant/assign.js */ "./node_modules/micromark/dist/constant/assign.js")
function shallow(object) {
return assign({}, object)
}
module.exports = shallow
/***/ }),
/***/ "./node_modules/micromark/dist/util/size-chunks.js":
/*!*********************************************************!*\
!*** ./node_modules/micromark/dist/util/size-chunks.js ***!
\*********************************************************/
/***/ ((module) => {
"use strict";
// Counts tabs based on their expanded size, and CR+LF as one character.
function sizeChunks(chunks) {
var index = -1
var size = 0
while (++index < chunks.length) {
size += typeof chunks[index] === 'string' ? chunks[index].length : 1
}
return size
}
module.exports = sizeChunks
/***/ }),
/***/ "./node_modules/micromark/dist/util/slice-chunks.js":
/*!**********************************************************!*\
!*** ./node_modules/micromark/dist/util/slice-chunks.js ***!
\**********************************************************/
/***/ ((module) => {
"use strict";
function sliceChunks(chunks, token) {
var startIndex = token.start._index
var startBufferIndex = token.start._bufferIndex
var endIndex = token.end._index
var endBufferIndex = token.end._bufferIndex
var view
if (startIndex === endIndex) {
view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)]
} else {
view = chunks.slice(startIndex, endIndex)
if (startBufferIndex > -1) {
view[0] = view[0].slice(startBufferIndex)
}
if (endBufferIndex > 0) {
view.push(chunks[endIndex].slice(0, endBufferIndex))
}
}
return view
}
module.exports = sliceChunks
/***/ }),
/***/ "./node_modules/micromark/dist/util/subtokenize.js":
/*!*********************************************************!*\
!*** ./node_modules/micromark/dist/util/subtokenize.js ***!
\*********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var assign = __webpack_require__(/*! ../constant/assign.js */ "./node_modules/micromark/dist/constant/assign.js")
var chunkedSplice = __webpack_require__(/*! ./chunked-splice.js */ "./node_modules/micromark/dist/util/chunked-splice.js")
var shallow = __webpack_require__(/*! ./shallow.js */ "./node_modules/micromark/dist/util/shallow.js")
function subtokenize(events) {
var jumps = {}
var index = -1
var event
var lineIndex
var otherIndex
var otherEvent
var parameters
var subevents
var more
while (++index < events.length) {
while (index in jumps) {
index = jumps[index]
}
event = events[index] // Add a hook for the GFM tasklist extension, which needs to know if text
// is in the first content of a list item.
if (
index &&
event[1].type === 'chunkFlow' &&
events[index - 1][1].type === 'listItemPrefix'
) {
subevents = event[1]._tokenizer.events
otherIndex = 0
if (
otherIndex < subevents.length &&
subevents[otherIndex][1].type === 'lineEndingBlank'
) {
otherIndex += 2
}
if (
otherIndex < subevents.length &&
subevents[otherIndex][1].type === 'content'
) {
while (++otherIndex < subevents.length) {
if (subevents[otherIndex][1].type === 'content') {
break
}
if (subevents[otherIndex][1].type === 'chunkText') {
subevents[otherIndex][1].isInFirstContentOfListItem = true
otherIndex++
}
}
}
} // Enter.
if (event[0] === 'enter') {
if (event[1].contentType) {
assign(jumps, subcontent(events, index))
index = jumps[index]
more = true
}
} // Exit.
else if (event[1]._container || event[1]._movePreviousLineEndings) {
otherIndex = index
lineIndex = undefined
while (otherIndex--) {
otherEvent = events[otherIndex]
if (
otherEvent[1].type === 'lineEnding' ||
otherEvent[1].type === 'lineEndingBlank'
) {
if (otherEvent[0] === 'enter') {
if (lineIndex) {
events[lineIndex][1].type = 'lineEndingBlank'
}
otherEvent[1].type = 'lineEnding'
lineIndex = otherIndex
}
} else {
break
}
}
if (lineIndex) {
// Fix position.
event[1].end = shallow(events[lineIndex][1].start) // Switch container exit w/ line endings.
parameters = events.slice(lineIndex, index)
parameters.unshift(event)
chunkedSplice(events, lineIndex, index - lineIndex + 1, parameters)
}
}
}
return !more
}
function subcontent(events, eventIndex) {
var token = events[eventIndex][1]
var context = events[eventIndex][2]
var startPosition = eventIndex - 1
var startPositions = []
var tokenizer =
token._tokenizer || context.parser[token.contentType](token.start)
var childEvents = tokenizer.events
var jumps = []
var gaps = {}
var stream
var previous
var index
var entered
var end
var adjust // Loop forward through the linked tokens to pass them in order to the
// subtokenizer.
while (token) {
// Find the position of the event for this token.
while (events[++startPosition][1] !== token) {
// Empty.
}
startPositions.push(startPosition)
if (!token._tokenizer) {
stream = context.sliceStream(token)
if (!token.next) {
stream.push(null)
}
if (previous) {
tokenizer.defineSkip(token.start)
}
if (token.isInFirstContentOfListItem) {
tokenizer._gfmTasklistFirstContentOfListItem = true
}
tokenizer.write(stream)
if (token.isInFirstContentOfListItem) {
tokenizer._gfmTasklistFirstContentOfListItem = undefined
}
} // Unravel the next token.
previous = token
token = token.next
} // Now, loop back through all events (and linked tokens), to figure out which
// parts belong where.
token = previous
index = childEvents.length
while (index--) {
// Make sure we’ve at least seen something (final eol is part of the last
// token).
if (childEvents[index][0] === 'enter') {
entered = true
} else if (
// Find a void token that includes a break.
entered &&
childEvents[index][1].type === childEvents[index - 1][1].type &&
childEvents[index][1].start.line !== childEvents[index][1].end.line
) {
add(childEvents.slice(index + 1, end))
// Help GC.
token._tokenizer = token.next = undefined
token = token.previous
end = index + 1
}
}
// Help GC.
tokenizer.events = token._tokenizer = token.next = undefined // Do head:
add(childEvents.slice(0, end))
index = -1
adjust = 0
while (++index < jumps.length) {
gaps[adjust + jumps[index][0]] = adjust + jumps[index][1]
adjust += jumps[index][1] - jumps[index][0] - 1
}
return gaps
function add(slice) {
var start = startPositions.pop()
jumps.unshift([start, start + slice.length - 1])
chunkedSplice(events, start, 2, slice)
}
}
module.exports = subtokenize
/***/ }),
/***/ "./node_modules/mitt/dist/mitt.es.js":
/*!*******************************************!*\
!*** ./node_modules/mitt/dist/mitt.es.js ***!
\*******************************************/
/***/ ((__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 */ });
//
// An event handler can take an optional event argument
// and should not return a value
// An array of all currently registered event handlers for a type
// A map of event types and their corresponding event handlers.
/** Mitt: Tiny (~200b) functional event emitter / pubsub.
* @name mitt
* @returns {Mitt}
*/
function mitt(all ) {
all = all || Object.create(null);
return {
/**
* Register an event handler for the given type.
*
* @param {String} type Type of event to listen for, or `"*"` for all events
* @param {Function} handler Function to call in response to given event
* @memberOf mitt
*/
on: function on(type , handler ) {
(all[type] || (all[type] = [])).push(handler);
},
/**
* Remove an event handler for the given type.
*
* @param {String} type Type of event to unregister `handler` from, or `"*"`
* @param {Function} handler Handler function to remove
* @memberOf mitt
*/
off: function off(type , handler ) {
if (all[type]) {
all[type].splice(all[type].indexOf(handler) >>> 0, 1);
}
},
/**
* Invoke all handlers for the given type.
* If present, `"*"` handlers are invoked after type-matched handlers.
*
* @param {String} type The event type to invoke
* @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler
* @memberOf mitt
*/
emit: function emit(type , evt ) {
(all[type] || []).slice().map(function (handler) { handler(evt); });
(all['*'] || []).slice().map(function (handler) { handler(type, evt); });
}
};
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (mitt);
//# sourceMappingURL=mitt.es.js.map
/***/ }),
/***/ "./src/fonts/index.css":
/*!*****************************!*\
!*** ./src/fonts/index.css ***!
\*****************************/
/***/ (() => {
/***/ }),
/***/ "./src/medusa-plugin-themes/docsearch/theme.css":
/*!******************************************************!*\
!*** ./src/medusa-plugin-themes/docsearch/theme.css ***!
\******************************************************/
/***/ (() => {
/***/ }),
/***/ "./src/medusa-plugin-themes/prism/theme.css":
/*!**************************************************!*\
!*** ./src/medusa-plugin-themes/prism/theme.css ***!
\**************************************************/
/***/ (() => {
/***/ }),
/***/ "./node_modules/parse-entities/decode-entity.js":
/*!******************************************************!*\
!*** ./node_modules/parse-entities/decode-entity.js ***!
\******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var characterEntities = __webpack_require__(/*! character-entities */ "./node_modules/character-entities/index.json")
module.exports = decodeEntity
var own = {}.hasOwnProperty
function decodeEntity(characters) {
return own.call(characterEntities, characters)
? characterEntities[characters]
: false
}
/***/ }),
/***/ "./node_modules/prismjs/components/prism-json.js":
/*!*******************************************************!*\
!*** ./node_modules/prismjs/components/prism-json.js ***!
\*******************************************************/
/***/ (() => {
// https://www.json.org/json-en.html
Prism.languages.json = {
'property': {
pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
lookbehind: true,
greedy: true
},
'string': {
pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
lookbehind: true,
greedy: true
},
'comment': {
pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
greedy: true
},
'number': /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
'punctuation': /[{}[\],]/,
'operator': /:/,
'boolean': /\b(?:true|false)\b/,
'null': {
pattern: /\bnull\b/,
alias: 'keyword'
}
};
Prism.languages.webmanifest = Prism.languages.json;
/***/ }),
/***/ "./node_modules/prismjs/prism.js":
/*!***************************************!*\
!*** ./node_modules/prismjs/prism.js ***!
\***************************************/
/***/ ((module) => {
/* **********************************************
Begin prism-core.js
********************************************** */
///
var _self = (typeof window !== 'undefined')
? window // if in browser
: (
(typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope)
? self // if in worker
: {} // if in node js
);
/**
* Prism: Lightweight, robust, elegant syntax highlighting
*
* @license MIT
* @author Lea Verou
* @namespace
* @public
*/
var Prism = (function (_self) {
// Private helper vars
var lang = /\blang(?:uage)?-([\w-]+)\b/i;
var uniqueId = 0;
// The grammar object for plaintext
var plainTextGrammar = {};
var _ = {
/**
* By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
* current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
* additional languages or plugins yourself.
*
* By setting this value to `true`, Prism will not automatically highlight all code elements on the page.
*
* You obviously have to change this value before the automatic highlighting started. To do this, you can add an
* empty Prism object into the global scope before loading the Prism script like this:
*
* ```js
* window.Prism = window.Prism || {};
* Prism.manual = true;
* // add a new