contentful 10.3.7 → 10.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -19,844 +19,967 @@
|
|
|
19
19
|
return /******/ (function() { // webpackBootstrap
|
|
20
20
|
/******/ var __webpack_modules__ = ({
|
|
21
21
|
|
|
22
|
-
/***/ "../node_modules/
|
|
23
|
-
|
|
24
|
-
!*** ../node_modules/
|
|
25
|
-
|
|
26
|
-
/***/ (function(
|
|
22
|
+
/***/ "../node_modules/contentful-resolve-response/dist/esm/index.js":
|
|
23
|
+
/*!*********************************************************************!*\
|
|
24
|
+
!*** ../node_modules/contentful-resolve-response/dist/esm/index.js ***!
|
|
25
|
+
\*********************************************************************/
|
|
26
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
"use strict";
|
|
29
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-copy */ \"../node_modules/fast-copy/dist/fast-copy.js\");\n/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fast_copy__WEBPACK_IMPORTED_MODULE_0__);\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n\n\nvar UNRESOLVED_LINK = {}; // unique object to avoid polyfill bloat using Symbol()\n\n/**\n * isLink Function\n * Checks if the object has sys.type \"Link\"\n * @param object\n */\nvar isLink = function isLink(object) {\n return object && object.sys && object.sys.type === 'Link';\n};\n\n/**\n * isResourceLink Function\n * Checks if the object has sys.type \"ResourceLink\"\n * @param object\n */\nvar isResourceLink = function isResourceLink(object) {\n return object && object.sys && object.sys.type === 'ResourceLink';\n};\n\n/**\n * Creates a key with spaceId and a key without for entityMap\n *\n * @param {*} sys\n * @param {String} sys.type\n * @param {String} sys.id\n * @param {*} sys.space\n * @param {*} sys.space.sys\n * @param {String} sys.space.id\n * @return {string[]}\n */\nvar makeEntityMapKeys = function makeEntityMapKeys(sys) {\n return sys.space ? [sys.type + '!' + sys.id, sys.space.sys.id + '!' + sys.type + '!' + sys.id] : [sys.type + '!' + sys.id];\n};\n\n/**\n * Looks up in entityMap\n *\n * @param entityMap\n * @param {*} linkData\n * @param {String} linkData.type\n * @param {String} linkData.linkType\n * @param {String} linkData.id\n * @param {String} linkData.urn\n * @return {String}\n */\nvar lookupInEntityMap = function lookupInEntityMap(entityMap, linkData) {\n var entryId = linkData.entryId,\n linkType = linkData.linkType,\n spaceId = linkData.spaceId;\n\n if (spaceId) {\n return entityMap.get(spaceId + '!' + linkType + '!' + entryId);\n }\n return entityMap.get(linkType + '!' + entryId);\n};\n\n/**\n * getResolvedLink Function\n *\n * @param entityMap\n * @param link\n * @return {undefined}\n */\nvar getResolvedLink = function getResolvedLink(entityMap, link) {\n var _link$sys = link.sys,\n type = _link$sys.type,\n linkType = _link$sys.linkType;\n\n if (type === 'ResourceLink') {\n var urn = link.sys.urn;\n\n var regExp = /.*:spaces\\/([A-Za-z0-9]*)\\/entries\\/([A-Za-z0-9]*)/;\n if (!regExp.test(urn)) {\n return UNRESOLVED_LINK;\n }\n\n var _urn$match = urn.match(regExp),\n _urn$match2 = _slicedToArray(_urn$match, 3),\n _ = _urn$match2[0],\n spaceId = _urn$match2[1],\n _entryId = _urn$match2[2];\n\n var extractedLinkType = linkType.split(':')[1];\n return lookupInEntityMap(entityMap, { linkType: extractedLinkType, entryId: _entryId, spaceId: spaceId }) || UNRESOLVED_LINK;\n }\n var entryId = link.sys.id;\n\n return lookupInEntityMap(entityMap, { linkType: linkType, entryId: entryId }) || UNRESOLVED_LINK;\n};\n\n/**\n * cleanUpLinks Function\n * - Removes unresolvable links from Arrays and Objects\n *\n * @param {Object[]|Object} input\n */\nvar cleanUpLinks = function cleanUpLinks(input) {\n if (Array.isArray(input)) {\n return input.filter(function (val) {\n return val !== UNRESOLVED_LINK;\n });\n }\n for (var key in input) {\n if (input[key] === UNRESOLVED_LINK) {\n delete input[key];\n }\n }\n return input;\n};\n\n/**\n * walkMutate Function\n * @param input\n * @param predicate\n * @param mutator\n * @param removeUnresolved\n * @return {*}\n */\nvar walkMutate = function walkMutate(input, predicate, mutator, removeUnresolved) {\n if (predicate(input)) {\n return mutator(input);\n }\n\n if (input && (typeof input === 'undefined' ? 'undefined' : _typeof(input)) === 'object') {\n for (var key in input) {\n // eslint-disable-next-line no-prototype-builtins\n if (input.hasOwnProperty(key)) {\n input[key] = walkMutate(input[key], predicate, mutator, removeUnresolved);\n }\n }\n if (removeUnresolved) {\n input = cleanUpLinks(input);\n }\n }\n return input;\n};\n\nvar normalizeLink = function normalizeLink(entityMap, link, removeUnresolved) {\n var resolvedLink = getResolvedLink(entityMap, link);\n if (resolvedLink === UNRESOLVED_LINK) {\n return removeUnresolved ? resolvedLink : link;\n }\n return resolvedLink;\n};\n\nvar makeEntryObject = function makeEntryObject(item, itemEntryPoints) {\n if (!Array.isArray(itemEntryPoints)) {\n return item;\n }\n\n var entryPoints = Object.keys(item).filter(function (ownKey) {\n return itemEntryPoints.indexOf(ownKey) !== -1;\n });\n\n return entryPoints.reduce(function (entryObj, entryPoint) {\n entryObj[entryPoint] = item[entryPoint];\n return entryObj;\n }, {});\n};\n\n/**\n * resolveResponse Function\n * Resolves contentful response to normalized form.\n * @param {Object} response Contentful response\n * @param {{removeUnresolved: Boolean, itemEntryPoints: Array<String>}|{}} options\n * @param {Boolean} options.removeUnresolved - Remove unresolved links default:false\n * @param {Array<String>} options.itemEntryPoints - Resolve links only in those item properties\n * @return {Object}\n */\nvar resolveResponse = function resolveResponse(response, options) {\n options = options || {};\n if (!response.items) {\n return [];\n }\n var responseClone = fast_copy__WEBPACK_IMPORTED_MODULE_0___default()(response);\n var allIncludes = Object.keys(responseClone.includes || {}).reduce(function (all, type) {\n return [].concat(_toConsumableArray(all), _toConsumableArray(response.includes[type]));\n }, []);\n\n var allEntries = [].concat(_toConsumableArray(responseClone.items), _toConsumableArray(allIncludes)).filter(function (entity) {\n return Boolean(entity.sys);\n });\n\n var entityMap = new Map(allEntries.reduce(function (acc, entity) {\n var entries = makeEntityMapKeys(entity.sys).map(function (key) {\n return [key, entity];\n });\n acc.push.apply(acc, _toConsumableArray(entries));\n return acc;\n }, []));\n\n allEntries.forEach(function (item) {\n var entryObject = makeEntryObject(item, options.itemEntryPoints);\n\n Object.assign(item, walkMutate(entryObject, function (x) {\n return isLink(x) || isResourceLink(x);\n }, function (link) {\n return normalizeLink(entityMap, link, options.removeUnresolved);\n }, options.removeUnresolved));\n });\n\n return responseClone.items;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (resolveResponse);\n\n//# sourceURL=webpack://contentful/../node_modules/contentful-resolve-response/dist/esm/index.js?");
|
|
29
30
|
|
|
30
31
|
/***/ }),
|
|
31
32
|
|
|
32
|
-
/***/ "../node_modules/
|
|
33
|
-
|
|
34
|
-
!*** ../node_modules/
|
|
35
|
-
|
|
36
|
-
/***/ (function(
|
|
33
|
+
/***/ "../node_modules/contentful-sdk-core/dist/index.es-modules.js":
|
|
34
|
+
/*!********************************************************************!*\
|
|
35
|
+
!*** ../node_modules/contentful-sdk-core/dist/index.es-modules.js ***!
|
|
36
|
+
\********************************************************************/
|
|
37
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
37
38
|
|
|
38
39
|
"use strict";
|
|
39
|
-
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../node_modules/axios/lib/utils.js\");\nvar settle = __webpack_require__(/*! ./../core/settle */ \"../node_modules/axios/lib/core/settle.js\");\nvar cookies = __webpack_require__(/*! ./../helpers/cookies */ \"../node_modules/axios/lib/helpers/cookies.js\");\nvar buildURL = __webpack_require__(/*! ./../helpers/buildURL */ \"../node_modules/axios/lib/helpers/buildURL.js\");\nvar buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ \"../node_modules/axios/lib/core/buildFullPath.js\");\nvar parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ \"../node_modules/axios/lib/helpers/parseHeaders.js\");\nvar isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ \"../node_modules/axios/lib/helpers/isURLSameOrigin.js\");\nvar createError = __webpack_require__(/*! ../core/createError */ \"../node_modules/axios/lib/core/createError.js\");\nvar transitionalDefaults = __webpack_require__(/*! ../defaults/transitional */ \"../node_modules/axios/lib/defaults/transitional.js\");\nvar Cancel = __webpack_require__(/*! ../cancel/Cancel */ \"../node_modules/axios/lib/cancel/Cancel.js\");\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n var onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n var transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = function(cancel) {\n if (!request) {\n return;\n }\n reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/adapters/xhr.js?");
|
|
40
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createHttpClient: function() { return /* binding */ createHttpClient; },\n/* harmony export */ createRequestConfig: function() { return /* binding */ createRequestConfig; },\n/* harmony export */ enforceObjPath: function() { return /* binding */ enforceObjPath; },\n/* harmony export */ errorHandler: function() { return /* binding */ errorHandler; },\n/* harmony export */ freezeSys: function() { return /* binding */ freezeSys; },\n/* harmony export */ getUserAgentHeader: function() { return /* binding */ getUserAgentHeader; },\n/* harmony export */ toPlainObject: function() { return /* binding */ toPlainObject; }\n/* harmony export */ });\n/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-copy */ \"../node_modules/fast-copy/dist/fast-copy.js\");\n/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fast_copy__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash_isstring__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash.isstring */ \"../node_modules/lodash.isstring/index.js\");\n/* harmony import */ var lodash_isstring__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isstring__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var p_throttle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! p-throttle */ \"../node_modules/p-throttle/index.js\");\n/* harmony import */ var p_throttle__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(p_throttle__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash_isplainobject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash.isplainobject */ \"../node_modules/lodash.isplainobject/index.js\");\n/* harmony import */ var lodash_isplainobject__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_isplainobject__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"];\n if (null != _i) {\n var _s,\n _e,\n _x,\n _r,\n _arr = [],\n _n = !0,\n _d = !1;\n try {\n if (_x = (_i = _i.call(arr)).next, 0 === i) {\n if (Object(_i) !== _i) return;\n _n = !1;\n } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);\n } catch (err) {\n _d = !0, _e = err;\n } finally {\n try {\n if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\nfunction _wrapRegExp() {\n _wrapRegExp = function (re, groups) {\n return new BabelRegExp(re, void 0, groups);\n };\n var _super = RegExp.prototype,\n _groups = new WeakMap();\n function BabelRegExp(re, flags, groups) {\n var _this = new RegExp(re, flags);\n return _groups.set(_this, groups || _groups.get(re)), _setPrototypeOf(_this, BabelRegExp.prototype);\n }\n function buildGroups(result, re) {\n var g = _groups.get(re);\n return Object.keys(g).reduce(function (groups, name) {\n var i = g[name];\n if (\"number\" == typeof i) groups[name] = result[i];else {\n for (var k = 0; void 0 === result[i[k]] && k + 1 < i.length;) k++;\n groups[name] = result[i[k]];\n }\n return groups;\n }, Object.create(null));\n }\n return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) {\n var result = _super.exec.call(this, str);\n if (result) {\n result.groups = buildGroups(result, this);\n var indices = result.indices;\n indices && (indices.groups = buildGroups(indices, this));\n }\n return result;\n }, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {\n if (\"string\" == typeof substitution) {\n var groups = _groups.get(this);\n return _super[Symbol.replace].call(this, str, substitution.replace(/\\$<([^>]+)>/g, function (_, name) {\n var group = groups[name];\n return \"$\" + (Array.isArray(group) ? group.join(\"$\") : group);\n }));\n }\n if (\"function\" == typeof substitution) {\n var _this = this;\n return _super[Symbol.replace].call(this, str, function () {\n var args = arguments;\n return \"object\" != typeof args[args.length - 1] && (args = [].slice.call(args)).push(buildGroups(args, _this)), substitution.apply(this, args);\n });\n }\n return _super[Symbol.replace].call(this, str, substitution);\n }, _wrapRegExp.apply(this, arguments);\n}\nfunction _defineProperty(obj, key, value) {\n key = _toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n if (!it) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n var F = function () {};\n return {\n s: F,\n n: function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function (e) {\n throw e;\n },\n f: F\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function () {\n it = it.call(o);\n },\n n: function () {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function (e) {\n didErr = true;\n err = e;\n },\n f: function () {\n try {\n if (!normalCompletion && it.return != null) it.return();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}\nfunction _toPrimitive(input, hint) {\n if (typeof input !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (typeof res !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, \"string\");\n return typeof key === \"symbol\" ? key : String(key);\n}\n\nfunction asyncToken(instance, getToken) {\n instance.interceptors.request.use(function (config) {\n return getToken().then(function (accessToken) {\n config.headers.set('Authorization', \"Bearer \".concat(accessToken));\n return config;\n });\n });\n}\n\nfunction isNode() {\n /**\n * Polyfills of 'process' might set process.browser === true\n *\n * See:\n * https://github.com/webpack/node-libs-browser/blob/master/mock/process.js#L8\n * https://github.com/defunctzombie/node-process/blob/master/browser.js#L156\n **/\n return typeof process !== 'undefined' && !process.browser;\n}\nfunction isReactNative() {\n return typeof window !== 'undefined' && 'navigator' in window && 'product' in window.navigator && window.navigator.product === 'ReactNative';\n}\nfunction getNodeVersion() {\n return process.versions && process.versions.node ? \"v\".concat(process.versions.node) : process.version;\n}\nfunction getWindow() {\n return window;\n}\nfunction noop() {\n return undefined;\n}\n\nvar delay = function delay(ms) {\n return new Promise(function (resolve) {\n setTimeout(resolve, ms);\n });\n};\nvar defaultWait = function defaultWait(attempts) {\n return Math.pow(Math.SQRT2, attempts);\n};\nfunction rateLimit(instance) {\n var maxRetry = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5;\n var _instance$defaults = instance.defaults,\n _instance$defaults$re = _instance$defaults.responseLogger,\n responseLogger = _instance$defaults$re === void 0 ? noop : _instance$defaults$re,\n _instance$defaults$re2 = _instance$defaults.requestLogger,\n requestLogger = _instance$defaults$re2 === void 0 ? noop : _instance$defaults$re2;\n instance.interceptors.request.use(function (config) {\n requestLogger(config);\n return config;\n }, function (error) {\n requestLogger(error);\n return Promise.reject(error);\n });\n instance.interceptors.response.use(function (response) {\n // we don't need to do anything here\n responseLogger(response);\n return response;\n }, function (error) {\n var response = error.response;\n var config = error.config;\n responseLogger(error);\n // Do not retry if it is disabled or no request config exists (not an axios error)\n if (!config || !instance.defaults.retryOnError) {\n return Promise.reject(error);\n }\n\n // Retried already for max attempts\n var doneAttempts = config.attempts || 1;\n if (doneAttempts > maxRetry) {\n error.attempts = config.attempts;\n return Promise.reject(error);\n }\n var retryErrorType = null;\n var wait = defaultWait(doneAttempts);\n\n // Errors without response did not receive anything from the server\n if (!response) {\n retryErrorType = 'Connection';\n } else if (response.status >= 500 && response.status < 600) {\n // 5** errors are server related\n retryErrorType = \"Server \".concat(response.status);\n } else if (response.status === 429) {\n // 429 errors are exceeded rate limit exceptions\n retryErrorType = 'Rate limit';\n // all headers are lowercased by axios https://github.com/mzabriskie/axios/issues/413\n if (response.headers && error.response.headers['x-contentful-ratelimit-reset']) {\n wait = response.headers['x-contentful-ratelimit-reset'];\n }\n }\n if (retryErrorType) {\n // convert to ms and add jitter\n wait = Math.floor(wait * 1000 + Math.random() * 200 + 500);\n instance.defaults.logHandler('warning', \"\".concat(retryErrorType, \" error occurred. Waiting for \").concat(wait, \" ms before retrying...\"));\n\n // increase attempts counter\n config.attempts = doneAttempts + 1;\n\n /* Somehow between the interceptor and retrying the request the httpAgent/httpsAgent gets transformed from an Agent-like object\n to a regular object, causing failures on retries after rate limits. Removing these properties here fixes the error, but retry\n requests still use the original http/httpsAgent property */\n delete config.httpAgent;\n delete config.httpsAgent;\n return delay(wait).then(function () {\n return instance(config);\n });\n }\n return Promise.reject(error);\n });\n}\n\nvar PERCENTAGE_REGEX = /*#__PURE__*/_wrapRegExp(/(\\d+)(%)/, {\n value: 1\n});\nfunction calculateLimit(type) {\n var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 7;\n var limit = max;\n if (PERCENTAGE_REGEX.test(type)) {\n var _type$match;\n var groups = (_type$match = type.match(PERCENTAGE_REGEX)) === null || _type$match === void 0 ? void 0 : _type$match.groups;\n if (groups && groups.value) {\n var percentage = parseInt(groups.value) / 100;\n limit = Math.round(max * percentage);\n }\n }\n return Math.min(30, Math.max(1, limit));\n}\nfunction createThrottle(limit, logger) {\n logger('info', \"Throttle request to \".concat(limit, \"/s\"));\n return p_throttle__WEBPACK_IMPORTED_MODULE_2___default()({\n limit: limit,\n interval: 1000,\n strict: false\n });\n}\nvar rateLimitThrottle = (function (axiosInstance) {\n var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'auto';\n var _axiosInstance$defaul = axiosInstance.defaults.logHandler,\n logHandler = _axiosInstance$defaul === void 0 ? noop : _axiosInstance$defaul;\n var limit = lodash_isstring__WEBPACK_IMPORTED_MODULE_1___default()(type) ? calculateLimit(type) : calculateLimit('auto', type);\n var throttle = createThrottle(limit, logHandler);\n var isCalculated = false;\n var requestInterceptorId = axiosInstance.interceptors.request.use(function (config) {\n return throttle(function () {\n return config;\n })();\n }, function (error) {\n return Promise.reject(error);\n });\n var responseInterceptorId = axiosInstance.interceptors.response.use(function (response) {\n if (!isCalculated && lodash_isstring__WEBPACK_IMPORTED_MODULE_1___default()(type) && (type === 'auto' || PERCENTAGE_REGEX.test(type)) && response.headers && response.headers['x-contentful-ratelimit-second-limit']) {\n var rawLimit = parseInt(response.headers['x-contentful-ratelimit-second-limit']);\n var nextLimit = calculateLimit(type, rawLimit);\n if (nextLimit !== limit) {\n if (requestInterceptorId) {\n axiosInstance.interceptors.request.eject(requestInterceptorId);\n }\n limit = nextLimit;\n throttle = createThrottle(nextLimit, logHandler);\n requestInterceptorId = axiosInstance.interceptors.request.use(function (config) {\n return throttle(function () {\n return config;\n })();\n }, function (error) {\n return Promise.reject(error);\n });\n }\n isCalculated = true;\n }\n return response;\n }, function (error) {\n return Promise.reject(error);\n });\n return function () {\n axiosInstance.interceptors.request.eject(requestInterceptorId);\n axiosInstance.interceptors.response.eject(responseInterceptorId);\n };\n});\n\n// Matches 'sub.host:port' or 'host:port' and extracts hostname and port\n// Also enforces toplevel domain specified, no spaces and no protocol\nvar HOST_REGEX = /^(?!\\w+:\\/\\/)([^\\s:]+\\.?[^\\s:]+)(?::(\\d+))?(?!:)$/;\n\n/**\n * Create pre-configured axios instance\n * @private\n * @param {AxiosStatic} axios - Axios library\n * @param {CreateHttpClientParams} options - Initialization parameters for the HTTP client\n * @return {AxiosInstance} Initialized axios instance\n */\nfunction createHttpClient(axios, options) {\n var defaultConfig = {\n insecure: false,\n retryOnError: true,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n logHandler: function logHandler(level, data) {\n if (level === 'error' && data) {\n var title = [data.name, data.message].filter(function (a) {\n return a;\n }).join(' - ');\n console.error(\"[error] \".concat(title));\n console.error(data);\n return;\n }\n console.log(\"[\".concat(level, \"] \").concat(data));\n },\n // Passed to axios\n headers: {},\n httpAgent: false,\n httpsAgent: false,\n timeout: 30000,\n throttle: 0,\n basePath: '',\n adapter: undefined,\n maxContentLength: 1073741824,\n // 1GB\n maxBodyLength: 1073741824 // 1GB\n };\n\n var config = _objectSpread2(_objectSpread2({}, defaultConfig), options);\n if (!config.accessToken) {\n var missingAccessTokenError = new TypeError('Expected parameter accessToken');\n config.logHandler('error', missingAccessTokenError);\n throw missingAccessTokenError;\n }\n\n // Construct axios baseURL option\n var protocol = config.insecure ? 'http' : 'https';\n var space = config.space ? \"\".concat(config.space, \"/\") : '';\n var hostname = config.defaultHostname;\n var port = config.insecure ? 80 : 443;\n if (config.host && HOST_REGEX.test(config.host)) {\n var parsed = config.host.split(':');\n if (parsed.length === 2) {\n var _parsed = _slicedToArray(parsed, 2);\n hostname = _parsed[0];\n port = _parsed[1];\n } else {\n hostname = parsed[0];\n }\n }\n\n // Ensure that basePath does start but not end with a slash\n if (config.basePath) {\n config.basePath = \"/\".concat(config.basePath.split('/').filter(Boolean).join('/'));\n }\n var baseURL = options.baseURL || \"\".concat(protocol, \"://\").concat(hostname, \":\").concat(port).concat(config.basePath, \"/spaces/\").concat(space);\n if (!config.headers.Authorization && typeof config.accessToken !== 'function') {\n config.headers.Authorization = 'Bearer ' + config.accessToken;\n }\n var axiosOptions = {\n // Axios\n baseURL: baseURL,\n headers: config.headers,\n httpAgent: config.httpAgent,\n httpsAgent: config.httpsAgent,\n proxy: config.proxy,\n timeout: config.timeout,\n adapter: config.adapter,\n maxContentLength: config.maxContentLength,\n maxBodyLength: config.maxBodyLength,\n // Contentful\n logHandler: config.logHandler,\n responseLogger: config.responseLogger,\n requestLogger: config.requestLogger,\n retryOnError: config.retryOnError\n };\n var instance = axios.create(axiosOptions);\n instance.httpClientParams = options;\n\n /**\n * Creates a new axios instance with the same default base parameters as the\n * current one, and with any overrides passed to the newParams object\n * This is useful as the SDKs use dependency injection to get the axios library\n * and the version of the library comes from different places depending\n * on whether it's a browser build or a node.js build.\n * @private\n * @param {CreateHttpClientParams} newParams - Initialization parameters for the HTTP client\n * @return {AxiosInstance} Initialized axios instance\n */\n instance.cloneWithNewParams = function (newParams) {\n return createHttpClient(axios, _objectSpread2(_objectSpread2({}, fast_copy__WEBPACK_IMPORTED_MODULE_0___default()(options)), newParams));\n };\n\n /**\n * Apply interceptors.\n * Please note that the order of interceptors is important\n */\n\n if (config.onBeforeRequest) {\n instance.interceptors.request.use(config.onBeforeRequest);\n }\n if (typeof config.accessToken === 'function') {\n asyncToken(instance, config.accessToken);\n }\n if (config.throttle) {\n rateLimitThrottle(instance, config.throttle);\n }\n rateLimit(instance, config.retryLimit);\n if (config.onError) {\n instance.interceptors.response.use(function (response) {\n return response;\n }, config.onError);\n }\n return instance;\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Creates request parameters configuration by parsing an existing query object\n * @private\n * @param {Object} query\n * @return {Object} Config object with `params` property, ready to be used in axios\n */\nfunction createRequestConfig(_ref) {\n var query = _ref.query;\n var config = {};\n delete query.resolveLinks;\n config.params = fast_copy__WEBPACK_IMPORTED_MODULE_0___default()(query);\n return config;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction enforceObjPath(obj, path) {\n if (!(path in obj)) {\n var err = new Error();\n err.name = 'PropertyMissing';\n err.message = \"Required property \".concat(path, \" missing from:\\n\\n\").concat(JSON.stringify(obj), \"\\n\\n\");\n throw err;\n }\n return true;\n}\n\n// copied from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze\n\nfunction deepFreeze(object) {\n var propNames = Object.getOwnPropertyNames(object);\n var _iterator = _createForOfIteratorHelper(propNames),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var name = _step.value;\n var value = object[name];\n if (value && _typeof(value) === 'object') {\n deepFreeze(value);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n return Object.freeze(object);\n}\nfunction freezeSys(obj) {\n deepFreeze(obj.sys || {});\n return obj;\n}\n\nfunction getBrowserOS() {\n var win = getWindow();\n if (!win) {\n return null;\n }\n var userAgent = win.navigator.userAgent;\n // TODO: platform is deprecated.\n var platform = win.navigator.platform;\n var macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'];\n var windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'];\n var iosPlatforms = ['iPhone', 'iPad', 'iPod'];\n if (macosPlatforms.indexOf(platform) !== -1) {\n return 'macOS';\n } else if (iosPlatforms.indexOf(platform) !== -1) {\n return 'iOS';\n } else if (windowsPlatforms.indexOf(platform) !== -1) {\n return 'Windows';\n } else if (/Android/.test(userAgent)) {\n return 'Android';\n } else if (/Linux/.test(platform)) {\n return 'Linux';\n }\n return null;\n}\nfunction getNodeOS() {\n var platform = process.platform || 'linux';\n var version = process.version || '0.0.0';\n var platformMap = {\n android: 'Android',\n aix: 'Linux',\n darwin: 'macOS',\n freebsd: 'Linux',\n linux: 'Linux',\n openbsd: 'Linux',\n sunos: 'Linux',\n win32: 'Windows'\n };\n if (platform in platformMap) {\n return \"\".concat(platformMap[platform] || 'Linux', \"/\").concat(version);\n }\n return null;\n}\nfunction getUserAgentHeader(sdk, application, integration, feature) {\n var headerParts = [];\n if (application) {\n headerParts.push(\"app \".concat(application));\n }\n if (integration) {\n headerParts.push(\"integration \".concat(integration));\n }\n if (feature) {\n headerParts.push('feature ' + feature);\n }\n headerParts.push(\"sdk \".concat(sdk));\n var platform = null;\n try {\n if (isReactNative()) {\n platform = getBrowserOS();\n headerParts.push('platform ReactNative');\n } else if (isNode()) {\n platform = getNodeOS();\n headerParts.push(\"platform node.js/\".concat(getNodeVersion()));\n } else {\n platform = getBrowserOS();\n headerParts.push('platform browser');\n }\n } catch (e) {\n platform = null;\n }\n if (platform) {\n headerParts.push(\"os \".concat(platform));\n }\n return \"\".concat(headerParts.filter(function (item) {\n return item !== '';\n }).join('; '), \";\");\n}\n\n/**\n * Mixes in a method to return just a plain object with no additional methods\n * @private\n * @param data - Any plain JSON response returned from the API\n * @return Enhanced object with toPlainObject method\n */\nfunction toPlainObject(data) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n return Object.defineProperty(data, 'toPlainObject', {\n enumerable: false,\n configurable: false,\n writable: false,\n value: function value() {\n return fast_copy__WEBPACK_IMPORTED_MODULE_0___default()(this);\n }\n });\n}\n\n/**\n * Handles errors received from the server. Parses the error into a more useful\n * format, places it in an exception and throws it.\n * See https://www.contentful.com/developers/docs/references/errors/\n * for more details on the data received on the errorResponse.data property\n * and the expected error codes.\n * @private\n */\nfunction errorHandler(errorResponse) {\n var config = errorResponse.config,\n response = errorResponse.response;\n var errorName;\n\n // Obscure the Management token\n if (config && config.headers && config.headers['Authorization']) {\n var token = \"...\".concat(config.headers['Authorization'].toString().substr(-5));\n config.headers['Authorization'] = \"Bearer \".concat(token);\n }\n if (!lodash_isplainobject__WEBPACK_IMPORTED_MODULE_3___default()(response) || !lodash_isplainobject__WEBPACK_IMPORTED_MODULE_3___default()(config)) {\n throw errorResponse;\n }\n var data = response === null || response === void 0 ? void 0 : response.data;\n var errorData = {\n status: response === null || response === void 0 ? void 0 : response.status,\n statusText: response === null || response === void 0 ? void 0 : response.statusText,\n message: '',\n details: {}\n };\n if (config && lodash_isplainobject__WEBPACK_IMPORTED_MODULE_3___default()(config)) {\n errorData.request = {\n url: config.url,\n headers: config.headers,\n method: config.method,\n payloadData: config.data\n };\n }\n if (data && _typeof(data) === 'object') {\n var _data$sys;\n if ('requestId' in data) {\n errorData.requestId = data.requestId || 'UNKNOWN';\n }\n if ('message' in data) {\n errorData.message = data.message || '';\n }\n if ('details' in data) {\n errorData.details = data.details || {};\n }\n errorName = (_data$sys = data.sys) === null || _data$sys === void 0 ? void 0 : _data$sys.id;\n }\n var error = new Error();\n error.name = errorName && errorName !== 'Unknown' ? errorName : \"\".concat(response === null || response === void 0 ? void 0 : response.status, \" \").concat(response === null || response === void 0 ? void 0 : response.statusText);\n try {\n error.message = JSON.stringify(errorData, null, ' ');\n } catch (_unused) {\n var _errorData$message;\n error.message = (_errorData$message = errorData === null || errorData === void 0 ? void 0 : errorData.message) !== null && _errorData$message !== void 0 ? _errorData$message : '';\n }\n throw error;\n}\n\n\n\n\n//# sourceURL=webpack://contentful/../node_modules/contentful-sdk-core/dist/index.es-modules.js?");
|
|
40
41
|
|
|
41
42
|
/***/ }),
|
|
42
43
|
|
|
43
|
-
/***/ "../node_modules/
|
|
44
|
-
|
|
45
|
-
!*** ../node_modules/
|
|
46
|
-
|
|
44
|
+
/***/ "../node_modules/fast-copy/dist/fast-copy.js":
|
|
45
|
+
/*!***************************************************!*\
|
|
46
|
+
!*** ../node_modules/fast-copy/dist/fast-copy.js ***!
|
|
47
|
+
\***************************************************/
|
|
47
48
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
48
49
|
|
|
49
|
-
"use strict";
|
|
50
|
-
|
|
50
|
+
eval("(function (global, factory) {\n true ? module.exports = factory() :\n 0;\n})(this, (function () { 'use strict';\n\n var toStringFunction = Function.prototype.toString;\n var create = Object.create, defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols, getPrototypeOf$1 = Object.getPrototypeOf;\n var _a = Object.prototype, hasOwnProperty = _a.hasOwnProperty, propertyIsEnumerable = _a.propertyIsEnumerable;\n var SYMBOL_PROPERTIES = typeof getOwnPropertySymbols === 'function';\n var WEAK_MAP = typeof WeakMap === 'function';\n /**\n * @function createCache\n *\n * @description\n * get a new cache object to prevent circular references\n *\n * @returns the new cache object\n */\n var createCache = (function () {\n if (WEAK_MAP) {\n return function () { return new WeakMap(); };\n }\n var Cache = /** @class */ (function () {\n function Cache() {\n this._keys = [];\n this._values = [];\n }\n Cache.prototype.has = function (key) {\n return !!~this._keys.indexOf(key);\n };\n Cache.prototype.get = function (key) {\n return this._values[this._keys.indexOf(key)];\n };\n Cache.prototype.set = function (key, value) {\n this._keys.push(key);\n this._values.push(value);\n };\n return Cache;\n }());\n return function () { return new Cache(); };\n })();\n /**\n * @function getCleanClone\n *\n * @description\n * get an empty version of the object with the same prototype it has\n *\n * @param object the object to build a clean clone from\n * @param realm the realm the object resides in\n * @returns the empty cloned object\n */\n var getCleanClone = function (object, realm) {\n var prototype = object.__proto__ || getPrototypeOf$1(object);\n if (!prototype) {\n return create(null);\n }\n var Constructor = prototype.constructor;\n if (Constructor === realm.Object) {\n return prototype === realm.Object.prototype ? {} : create(prototype);\n }\n if (~toStringFunction.call(Constructor).indexOf('[native code]')) {\n try {\n return new Constructor();\n }\n catch (_a) { }\n }\n return create(prototype);\n };\n /**\n * @function getObjectCloneLoose\n *\n * @description\n * get a copy of the object based on loose rules, meaning all enumerable keys\n * and symbols are copied, but property descriptors are not considered\n *\n * @param object the object to clone\n * @param realm the realm the object resides in\n * @param handleCopy the function that handles copying the object\n * @returns the copied object\n */\n var getObjectCloneLoose = function (object, realm, handleCopy, cache) {\n var clone = getCleanClone(object, realm);\n // set in the cache immediately to be able to reuse the object recursively\n cache.set(object, clone);\n for (var key in object) {\n if (hasOwnProperty.call(object, key)) {\n clone[key] = handleCopy(object[key], cache);\n }\n }\n if (SYMBOL_PROPERTIES) {\n var symbols = getOwnPropertySymbols(object);\n for (var index = 0, length_1 = symbols.length, symbol = void 0; index < length_1; ++index) {\n symbol = symbols[index];\n if (propertyIsEnumerable.call(object, symbol)) {\n clone[symbol] = handleCopy(object[symbol], cache);\n }\n }\n }\n return clone;\n };\n /**\n * @function getObjectCloneStrict\n *\n * @description\n * get a copy of the object based on strict rules, meaning all keys and symbols\n * are copied based on the original property descriptors\n *\n * @param object the object to clone\n * @param realm the realm the object resides in\n * @param handleCopy the function that handles copying the object\n * @returns the copied object\n */\n var getObjectCloneStrict = function (object, realm, handleCopy, cache) {\n var clone = getCleanClone(object, realm);\n // set in the cache immediately to be able to reuse the object recursively\n cache.set(object, clone);\n var properties = SYMBOL_PROPERTIES\n ? getOwnPropertyNames(object).concat(getOwnPropertySymbols(object))\n : getOwnPropertyNames(object);\n for (var index = 0, length_2 = properties.length, property = void 0, descriptor = void 0; index < length_2; ++index) {\n property = properties[index];\n if (property !== 'callee' && property !== 'caller') {\n descriptor = getOwnPropertyDescriptor(object, property);\n if (descriptor) {\n // Only clone the value if actually a value, not a getter / setter.\n if (!descriptor.get && !descriptor.set) {\n descriptor.value = handleCopy(object[property], cache);\n }\n try {\n defineProperty(clone, property, descriptor);\n }\n catch (error) {\n // Tee above can fail on node in edge cases, so fall back to the loose assignment.\n clone[property] = descriptor.value;\n }\n }\n else {\n // In extra edge cases where the property descriptor cannot be retrived, fall back to\n // the loose assignment.\n clone[property] = handleCopy(object[property], cache);\n }\n }\n }\n return clone;\n };\n /**\n * @function getRegExpFlags\n *\n * @description\n * get the flags to apply to the copied regexp\n *\n * @param regExp the regexp to get the flags of\n * @returns the flags for the regexp\n */\n var getRegExpFlags = function (regExp) {\n var flags = '';\n if (regExp.global) {\n flags += 'g';\n }\n if (regExp.ignoreCase) {\n flags += 'i';\n }\n if (regExp.multiline) {\n flags += 'm';\n }\n if (regExp.unicode) {\n flags += 'u';\n }\n if (regExp.sticky) {\n flags += 'y';\n }\n return flags;\n };\n\n // utils\n var isArray = Array.isArray;\n var getPrototypeOf = Object.getPrototypeOf;\n var GLOBAL_THIS = (function () {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof __webpack_require__.g !== 'undefined') {\n return __webpack_require__.g;\n }\n if (console && console.error) {\n console.error('Unable to locate global object, returning \"this\".');\n }\n return this;\n })();\n /**\n * @function copy\n *\n * @description\n * copy an value deeply as much as possible\n *\n * If `strict` is applied, then all properties (including non-enumerable ones)\n * are copied with their original property descriptors on both objects and arrays.\n *\n * The value is compared to the global constructors in the `realm` provided,\n * and the native constructor is always used to ensure that extensions of native\n * objects (allows in ES2015+) are maintained.\n *\n * @param value the value to copy\n * @param [options] the options for copying with\n * @param [options.isStrict] should the copy be strict\n * @param [options.realm] the realm (this) value the value is copied from\n * @returns the copied value\n */\n function copy(value, options) {\n // manually coalesced instead of default parameters for performance\n var isStrict = !!(options && options.isStrict);\n var realm = (options && options.realm) || GLOBAL_THIS;\n var getObjectClone = isStrict ? getObjectCloneStrict : getObjectCloneLoose;\n /**\n * @function handleCopy\n *\n * @description\n * copy the value recursively based on its type\n *\n * @param value the value to copy\n * @returns the copied value\n */\n var handleCopy = function (value, cache) {\n if (!value || typeof value !== 'object') {\n return value;\n }\n if (cache.has(value)) {\n return cache.get(value);\n }\n var prototype = value.__proto__ || getPrototypeOf(value);\n var Constructor = prototype && prototype.constructor;\n // plain objects\n if (!Constructor || Constructor === realm.Object) {\n return getObjectClone(value, realm, handleCopy, cache);\n }\n var clone;\n // arrays\n if (isArray(value)) {\n // if strict, include non-standard properties\n if (isStrict) {\n return getObjectCloneStrict(value, realm, handleCopy, cache);\n }\n clone = new Constructor();\n cache.set(value, clone);\n for (var index = 0, length_1 = value.length; index < length_1; ++index) {\n clone[index] = handleCopy(value[index], cache);\n }\n return clone;\n }\n // dates\n if (value instanceof realm.Date) {\n return new Constructor(value.getTime());\n }\n // regexps\n if (value instanceof realm.RegExp) {\n clone = new Constructor(value.source, value.flags || getRegExpFlags(value));\n clone.lastIndex = value.lastIndex;\n return clone;\n }\n // maps\n if (realm.Map && value instanceof realm.Map) {\n clone = new Constructor();\n cache.set(value, clone);\n value.forEach(function (value, key) {\n clone.set(key, handleCopy(value, cache));\n });\n return clone;\n }\n // sets\n if (realm.Set && value instanceof realm.Set) {\n clone = new Constructor();\n cache.set(value, clone);\n value.forEach(function (value) {\n clone.add(handleCopy(value, cache));\n });\n return clone;\n }\n // blobs\n if (realm.Blob && value instanceof realm.Blob) {\n return value.slice(0, value.size, value.type);\n }\n // buffers (node-only)\n if (realm.Buffer && realm.Buffer.isBuffer(value)) {\n clone = realm.Buffer.allocUnsafe\n ? realm.Buffer.allocUnsafe(value.length)\n : new Constructor(value.length);\n cache.set(value, clone);\n value.copy(clone);\n return clone;\n }\n // arraybuffers / dataviews\n if (realm.ArrayBuffer) {\n // dataviews\n if (realm.ArrayBuffer.isView(value)) {\n clone = new Constructor(value.buffer.slice(0));\n cache.set(value, clone);\n return clone;\n }\n // arraybuffers\n if (value instanceof realm.ArrayBuffer) {\n clone = value.slice(0);\n cache.set(value, clone);\n return clone;\n }\n }\n // if the value cannot / should not be cloned, don't\n if (\n // promise-like\n typeof value.then === 'function' ||\n // errors\n value instanceof Error ||\n // weakmaps\n (realm.WeakMap && value instanceof realm.WeakMap) ||\n // weaksets\n (realm.WeakSet && value instanceof realm.WeakSet)) {\n return value;\n }\n // assume anything left is a custom constructor\n return getObjectClone(value, realm, handleCopy, cache);\n };\n return handleCopy(value, createCache());\n }\n // Adding reference to allow usage in CommonJS libraries compiled using TSC, which\n // expects there to be a default property on the exported value. See\n // [#37](https://github.com/planttheidea/fast-copy/issues/37) for details.\n copy.default = copy;\n /**\n * @function strictCopy\n *\n * @description\n * copy the value with `strict` option pre-applied\n *\n * @param value the value to copy\n * @param [options] the options for copying with\n * @param [options.realm] the realm (this) value the value is copied from\n * @returns the copied value\n */\n copy.strict = function strictCopy(value, options) {\n return copy(value, {\n isStrict: true,\n realm: options ? options.realm : void 0,\n });\n };\n\n return copy;\n\n}));\n//# sourceMappingURL=fast-copy.js.map\n\n\n//# sourceURL=webpack://contentful/../node_modules/fast-copy/dist/fast-copy.js?");
|
|
51
|
+
|
|
52
|
+
/***/ }),
|
|
53
|
+
|
|
54
|
+
/***/ "../node_modules/json-stringify-safe/stringify.js":
|
|
55
|
+
/*!********************************************************!*\
|
|
56
|
+
!*** ../node_modules/json-stringify-safe/stringify.js ***!
|
|
57
|
+
\********************************************************/
|
|
58
|
+
/***/ (function(module, exports) {
|
|
59
|
+
|
|
60
|
+
eval("exports = module.exports = stringify\nexports.getSerialize = serializer\n\nfunction stringify(obj, replacer, spaces, cycleReplacer) {\n return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces)\n}\n\nfunction serializer(replacer, cycleReplacer) {\n var stack = [], keys = []\n\n if (cycleReplacer == null) cycleReplacer = function(key, value) {\n if (stack[0] === value) return \"[Circular ~]\"\n return \"[Circular ~.\" + keys.slice(0, stack.indexOf(value)).join(\".\") + \"]\"\n }\n\n return function(key, value) {\n if (stack.length > 0) {\n var thisPos = stack.indexOf(this)\n ~thisPos ? stack.splice(thisPos + 1) : stack.push(this)\n ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key)\n if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value)\n }\n else stack.push(value)\n\n return replacer == null ? value : replacer.call(this, key, value)\n }\n}\n\n\n//# sourceURL=webpack://contentful/../node_modules/json-stringify-safe/stringify.js?");
|
|
61
|
+
|
|
62
|
+
/***/ }),
|
|
63
|
+
|
|
64
|
+
/***/ "../node_modules/lodash.isplainobject/index.js":
|
|
65
|
+
/*!*****************************************************!*\
|
|
66
|
+
!*** ../node_modules/lodash.isplainobject/index.js ***!
|
|
67
|
+
\*****************************************************/
|
|
68
|
+
/***/ (function(module) {
|
|
69
|
+
|
|
70
|
+
eval("/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) ||\n objectToString.call(value) != objectTag || isHostObject(value)) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return (typeof Ctor == 'function' &&\n Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);\n}\n\nmodule.exports = isPlainObject;\n\n\n//# sourceURL=webpack://contentful/../node_modules/lodash.isplainobject/index.js?");
|
|
71
|
+
|
|
72
|
+
/***/ }),
|
|
73
|
+
|
|
74
|
+
/***/ "../node_modules/lodash.isstring/index.js":
|
|
75
|
+
/*!************************************************!*\
|
|
76
|
+
!*** ../node_modules/lodash.isstring/index.js ***!
|
|
77
|
+
\************************************************/
|
|
78
|
+
/***/ (function(module) {
|
|
79
|
+
|
|
80
|
+
eval("/**\n * lodash 4.0.1 (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <https://lodash.com/license>\n */\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @type Function\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);\n}\n\nmodule.exports = isString;\n\n\n//# sourceURL=webpack://contentful/../node_modules/lodash.isstring/index.js?");
|
|
51
81
|
|
|
52
82
|
/***/ }),
|
|
53
83
|
|
|
54
|
-
/***/ "../node_modules/
|
|
55
|
-
|
|
56
|
-
!*** ../node_modules/
|
|
57
|
-
|
|
84
|
+
/***/ "../node_modules/p-throttle/index.js":
|
|
85
|
+
/*!*******************************************!*\
|
|
86
|
+
!*** ../node_modules/p-throttle/index.js ***!
|
|
87
|
+
\*******************************************/
|
|
58
88
|
/***/ (function(module) {
|
|
59
89
|
|
|
60
90
|
"use strict";
|
|
61
|
-
eval("\n\n
|
|
91
|
+
eval("\n\nclass AbortError extends Error {\n\tconstructor() {\n\t\tsuper('Throttled function aborted');\n\t\tthis.name = 'AbortError';\n\t}\n}\n\nconst pThrottle = ({limit, interval, strict}) => {\n\tif (!Number.isFinite(limit)) {\n\t\tthrow new TypeError('Expected `limit` to be a finite number');\n\t}\n\n\tif (!Number.isFinite(interval)) {\n\t\tthrow new TypeError('Expected `interval` to be a finite number');\n\t}\n\n\tconst queue = new Map();\n\n\tlet currentTick = 0;\n\tlet activeCount = 0;\n\n\tfunction windowedDelay() {\n\t\tconst now = Date.now();\n\n\t\tif ((now - currentTick) > interval) {\n\t\t\tactiveCount = 1;\n\t\t\tcurrentTick = now;\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (activeCount < limit) {\n\t\t\tactiveCount++;\n\t\t} else {\n\t\t\tcurrentTick += interval;\n\t\t\tactiveCount = 1;\n\t\t}\n\n\t\treturn currentTick - now;\n\t}\n\n\tconst strictTicks = [];\n\n\tfunction strictDelay() {\n\t\tconst now = Date.now();\n\n\t\tif (strictTicks.length < limit) {\n\t\t\tstrictTicks.push(now);\n\t\t\treturn 0;\n\t\t}\n\n\t\tconst earliestTime = strictTicks.shift() + interval;\n\n\t\tif (now >= earliestTime) {\n\t\t\tstrictTicks.push(now);\n\t\t\treturn 0;\n\t\t}\n\n\t\tstrictTicks.push(earliestTime);\n\t\treturn earliestTime - now;\n\t}\n\n\tconst getDelay = strict ? strictDelay : windowedDelay;\n\n\treturn function_ => {\n\t\tconst throttled = function (...args) {\n\t\t\tif (!throttled.isEnabled) {\n\t\t\t\treturn (async () => function_.apply(this, args))();\n\t\t\t}\n\n\t\t\tlet timeout;\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tconst execute = () => {\n\t\t\t\t\tresolve(function_.apply(this, args));\n\t\t\t\t\tqueue.delete(timeout);\n\t\t\t\t};\n\n\t\t\t\ttimeout = setTimeout(execute, getDelay());\n\n\t\t\t\tqueue.set(timeout, reject);\n\t\t\t});\n\t\t};\n\n\t\tthrottled.abort = () => {\n\t\t\tfor (const timeout of queue.keys()) {\n\t\t\t\tclearTimeout(timeout);\n\t\t\t\tqueue.get(timeout)(new AbortError());\n\t\t\t}\n\n\t\t\tqueue.clear();\n\t\t\tstrictTicks.splice(0, strictTicks.length);\n\t\t};\n\n\t\tthrottled.isEnabled = true;\n\n\t\treturn throttled;\n\t};\n};\n\nmodule.exports = pThrottle;\nmodule.exports.AbortError = AbortError;\n\n\n//# sourceURL=webpack://contentful/../node_modules/p-throttle/index.js?");
|
|
62
92
|
|
|
63
93
|
/***/ }),
|
|
64
94
|
|
|
65
|
-
/***/ "
|
|
66
|
-
|
|
67
|
-
!***
|
|
68
|
-
|
|
69
|
-
/***/ (function(
|
|
95
|
+
/***/ "./contentful.ts":
|
|
96
|
+
/*!***********************!*\
|
|
97
|
+
!*** ./contentful.ts ***!
|
|
98
|
+
\***********************/
|
|
99
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
70
100
|
|
|
71
101
|
"use strict";
|
|
72
|
-
eval("\n\
|
|
102
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createClient: function() { return /* binding */ createClient; }\n/* harmony export */ });\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! axios */ \"../node_modules/axios/lib/axios.js\");\n/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! contentful-sdk-core */ \"../node_modules/contentful-sdk-core/dist/index.es-modules.js\");\n/* harmony import */ var _create_global_options__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./create-global-options */ \"./create-global-options.ts\");\n/* harmony import */ var _make_client__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./make-client */ \"./make-client.ts\");\n/* harmony import */ var _utils_validate_params__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/validate-params */ \"./utils/validate-params.ts\");\n/**\n * Contentful Delivery API SDK. Allows you to create instances of a client\n * with access to the Contentful Content Delivery API.\n */\n\n\n\n\n\n/**\n * Create a client instance\n * @param params - Client initialization parameters\n * @category Client\n * @example\n * ```typescript\n * const contentful = require('contentful')\n * const client = contentful.createClient({\n * accessToken: 'myAccessToken',\n * space: 'mySpaceId'\n * })\n * ```\n */\nfunction createClient(params) {\n if (!params.accessToken) {\n throw new TypeError('Expected parameter accessToken');\n }\n if (!params.space) {\n throw new TypeError('Expected parameter space');\n }\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_3__.validateResolveLinksParam)(params);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_3__.validateRemoveUnresolvedParam)(params);\n const defaultConfig = {\n resolveLinks: true,\n removeUnresolved: false,\n defaultHostname: 'cdn.contentful.com',\n environment: 'master',\n };\n const config = {\n ...defaultConfig,\n ...params,\n };\n const userAgentHeader = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(`contentful.js/${\"10.4.0\"}`, config.application, config.integration);\n config.headers = {\n ...config.headers,\n 'Content-Type': 'application/vnd.contentful.delivery.v1+json',\n 'X-Contentful-User-Agent': userAgentHeader,\n };\n const http = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createHttpClient)(axios__WEBPACK_IMPORTED_MODULE_4__[\"default\"], config);\n if (!http.defaults.baseURL) {\n throw new Error('Please define a baseURL');\n }\n const getGlobalOptions = (0,_create_global_options__WEBPACK_IMPORTED_MODULE_1__.createGlobalOptions)({\n space: config.space,\n environment: config.environment,\n spaceBaseUrl: http.defaults.baseURL,\n environmentBaseUrl: `${http.defaults.baseURL}environments/${config.environment}`,\n });\n // Append environment to baseURL\n http.defaults.baseURL = getGlobalOptions({}).environmentBaseUrl;\n return (0,_make_client__WEBPACK_IMPORTED_MODULE_2__.makeClient)({\n http,\n getGlobalOptions,\n });\n}\n\n\n//# sourceURL=webpack://contentful/./contentful.ts?");
|
|
73
103
|
|
|
74
104
|
/***/ }),
|
|
75
105
|
|
|
76
|
-
/***/ "
|
|
77
|
-
|
|
78
|
-
!***
|
|
79
|
-
|
|
80
|
-
/***/ (function(
|
|
106
|
+
/***/ "./create-contentful-api.ts":
|
|
107
|
+
/*!**********************************!*\
|
|
108
|
+
!*** ./create-contentful-api.ts ***!
|
|
109
|
+
\**********************************/
|
|
110
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
81
111
|
|
|
82
112
|
"use strict";
|
|
83
|
-
eval("\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/cancel/isCancel.js?");
|
|
113
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ createContentfulApi; }\n/* harmony export */ });\n/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! contentful-sdk-core */ \"../node_modules/contentful-sdk-core/dist/index.es-modules.js\");\n/* harmony import */ var _paged_sync__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./paged-sync */ \"./paged-sync.ts\");\n/* harmony import */ var _utils_normalize_search_parameters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/normalize-search-parameters */ \"./utils/normalize-search-parameters.ts\");\n/* harmony import */ var _utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/normalize-select */ \"./utils/normalize-select.ts\");\n/* harmony import */ var _utils_resolve_circular__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/resolve-circular */ \"./utils/resolve-circular.ts\");\n/* harmony import */ var _utils_validate_timestamp__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/validate-timestamp */ \"./utils/validate-timestamp.ts\");\n/* harmony import */ var _utils_validate_params__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/validate-params */ \"./utils/validate-params.ts\");\n/* harmony import */ var _utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/validate-search-parameters */ \"./utils/validate-search-parameters.ts\");\n/**\n * Contentful Delivery API Client. Contains methods which allow access to the\n * different kinds of entities present in Contentful (Entries, Assets, etc).\n */\n\n\n\n\n\n\n\n\nconst ASSET_KEY_MAX_LIFETIME = 48 * 60 * 60;\nclass NotFoundError extends Error {\n sys;\n details;\n constructor(id, environment, space) {\n super('The resource could not be found.');\n this.sys = {\n type: 'Error',\n id: 'NotFound',\n };\n this.details = {\n type: 'Entry',\n id,\n environment,\n space,\n };\n }\n}\nfunction createContentfulApi({ http, getGlobalOptions }, options) {\n const notFoundError = (id = 'unknown') => {\n return new NotFoundError(id, getGlobalOptions().environment, getGlobalOptions().space);\n };\n const getBaseUrl = (context) => {\n let baseUrl = context === 'space' ? getGlobalOptions().spaceBaseUrl : getGlobalOptions().environmentBaseUrl;\n if (!baseUrl) {\n throw new Error('Please define baseUrl for ' + context);\n }\n if (!baseUrl.endsWith('/')) {\n baseUrl += '/';\n }\n return baseUrl;\n };\n async function get({ context, path, config }) {\n const baseUrl = getBaseUrl(context);\n try {\n const response = await http.get(baseUrl + path, config);\n return response.data;\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function post({ context, path, data, config }) {\n const baseUrl = getBaseUrl(context);\n try {\n const response = await http.post(baseUrl + path, data, config);\n return response.data;\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function getSpace() {\n return get({ context: 'space', path: '' });\n }\n async function getContentType(id) {\n return get({\n context: 'environment',\n path: `content_types/${id}`,\n });\n }\n async function getContentTypes(query = {}) {\n return get({\n context: 'environment',\n path: 'content_types',\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query }),\n });\n }\n async function getEntry(id, query = {}) {\n return makeGetEntry(id, query, options);\n }\n async function getEntries(query = {}) {\n return makeGetEntries(query, options);\n }\n async function makeGetEntry(id, query, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n const { withAllLocales } = options;\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateLocaleParam)(query, withAllLocales);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateResolveLinksParam)(query);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateRemoveUnresolvedParam)(query);\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n return internalGetEntry(id, withAllLocales ? { ...query, locale: '*' } : query, options);\n }\n async function internalGetEntry(id, query, options) {\n if (!id) {\n throw notFoundError(id);\n }\n try {\n const response = await internalGetEntries({ 'sys.id': id, ...query }, options);\n if (response.items.length > 0) {\n return response.items[0];\n }\n else {\n throw notFoundError(id);\n }\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function makeGetEntries(query, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n const { withAllLocales } = options;\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateLocaleParam)(query, withAllLocales);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateResolveLinksParam)(query);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateRemoveUnresolvedParam)(query);\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n return internalGetEntries(withAllLocales\n ? {\n ...query,\n locale: '*',\n }\n : query, options);\n }\n async function internalGetEntries(query, options) {\n const { withoutLinkResolution, withoutUnresolvableLinks } = options;\n try {\n const entries = await get({\n context: 'environment',\n path: 'entries',\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query: (0,_utils_normalize_search_parameters__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(query)) }),\n });\n return (0,_utils_resolve_circular__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(entries, {\n resolveLinks: !withoutLinkResolution ?? true,\n removeUnresolved: withoutUnresolvableLinks ?? false,\n });\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function getAsset(id, query = {}) {\n return makeGetAsset(id, query, options);\n }\n async function getAssets(query = {}) {\n return makeGetAssets(query, options);\n }\n async function makeGetAssets(query, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n const { withAllLocales } = options;\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateLocaleParam)(query, withAllLocales);\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n const localeSpecificQuery = withAllLocales ? { ...query, locale: '*' } : query;\n return internalGetAssets(localeSpecificQuery);\n }\n async function internalGetAsset(id, query) {\n try {\n return get({\n context: 'environment',\n path: `assets/${id}`,\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query: (0,_utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(query) }),\n });\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function makeGetAsset(id, query, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n const { withAllLocales } = options;\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateLocaleParam)(query, withAllLocales);\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n const localeSpecificQuery = withAllLocales ? { ...query, locale: '*' } : query;\n return internalGetAsset(id, localeSpecificQuery);\n }\n async function internalGetAssets(query) {\n try {\n return get({\n context: 'environment',\n path: 'assets',\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query: (0,_utils_normalize_search_parameters__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(query)) }),\n });\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function getTag(id) {\n return get({\n context: 'environment',\n path: `tags/${id}`,\n });\n }\n async function getTags(query = {}) {\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n return get({\n context: 'environment',\n path: 'tags',\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query: (0,_utils_normalize_search_parameters__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(query)) }),\n });\n }\n async function createAssetKey(expiresAt) {\n try {\n const now = Math.floor(Date.now() / 1000);\n const currentMaxLifetime = now + ASSET_KEY_MAX_LIFETIME;\n (0,_utils_validate_timestamp__WEBPACK_IMPORTED_MODULE_5__[\"default\"])('expiresAt', expiresAt, { maximum: currentMaxLifetime, now });\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n return post({\n context: 'environment',\n path: 'asset_keys',\n data: { expiresAt },\n });\n }\n async function getLocales(query = {}) {\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n return get({\n context: 'environment',\n path: 'locales',\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query: (0,_utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(query) }),\n });\n }\n async function sync(query, syncOptions = { paginate: true }) {\n return makePagedSync(query, syncOptions, options);\n }\n async function makePagedSync(query, syncOptions, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateResolveLinksParam)(query);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateRemoveUnresolvedParam)(query);\n const combinedOptions = {\n ...syncOptions,\n ...options,\n };\n switchToEnvironment(http);\n return (0,_paged_sync__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(http, query, combinedOptions);\n }\n function parseEntries(data) {\n return makeParseEntries(data, options);\n }\n function makeParseEntries(data, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n return internalParseEntries(data, options);\n }\n function internalParseEntries(data, options) {\n const { withoutLinkResolution, withoutUnresolvableLinks } = options;\n return (0,_utils_resolve_circular__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(data, {\n resolveLinks: !withoutLinkResolution ?? true,\n removeUnresolved: withoutUnresolvableLinks ?? false,\n });\n }\n /*\n * Switches BaseURL to use /environments path\n * */\n function switchToEnvironment(http) {\n http.defaults.baseURL = getGlobalOptions().environmentBaseUrl;\n }\n return {\n version: \"10.4.0\",\n getSpace,\n getContentType,\n getContentTypes,\n getAsset,\n getAssets,\n getTag,\n getTags,\n getLocales,\n parseEntries,\n sync,\n getEntry,\n getEntries,\n createAssetKey,\n };\n}\n\n\n//# sourceURL=webpack://contentful/./create-contentful-api.ts?");
|
|
84
114
|
|
|
85
115
|
/***/ }),
|
|
86
116
|
|
|
87
|
-
/***/ "
|
|
88
|
-
|
|
89
|
-
!***
|
|
90
|
-
|
|
91
|
-
/***/ (function(
|
|
117
|
+
/***/ "./create-global-options.ts":
|
|
118
|
+
/*!**********************************!*\
|
|
119
|
+
!*** ./create-global-options.ts ***!
|
|
120
|
+
\**********************************/
|
|
121
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
92
122
|
|
|
93
123
|
"use strict";
|
|
94
|
-
eval("
|
|
124
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createGlobalOptions: function() { return /* binding */ createGlobalOptions; }\n/* harmony export */ });\n/**\n * @param globalSettings - Global library settings\n * @returns getGlobalSettings - Method returning client settings\n * @category Client\n */\nfunction createGlobalOptions(globalSettings) {\n /**\n * Method merging pre-configured global options and provided local parameters\n * @param query - regular query object used for collection endpoints\n * @param query.environment - optional name of the environment\n * @param query.space - optional space ID\n * @param query.spaceBaseUrl - optional base URL for the space\n * @param query.environmentBaseUrl - optional base URL for the environment\n * @returns global options\n */\n return function getGlobalOptions(query) {\n return Object.assign({}, globalSettings, query);\n };\n}\n\n\n//# sourceURL=webpack://contentful/./create-global-options.ts?");
|
|
95
125
|
|
|
96
126
|
/***/ }),
|
|
97
127
|
|
|
98
|
-
/***/ "
|
|
99
|
-
|
|
100
|
-
!***
|
|
101
|
-
|
|
102
|
-
/***/ (function(
|
|
128
|
+
/***/ "./index.ts":
|
|
129
|
+
/*!******************!*\
|
|
130
|
+
!*** ./index.ts ***!
|
|
131
|
+
\******************/
|
|
132
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
103
133
|
|
|
104
134
|
"use strict";
|
|
105
|
-
eval("
|
|
135
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createClient: function() { return /* reexport safe */ _contentful__WEBPACK_IMPORTED_MODULE_0__.createClient; },\n/* harmony export */ createGlobalOptions: function() { return /* reexport safe */ _create_global_options__WEBPACK_IMPORTED_MODULE_1__.createGlobalOptions; }\n/* harmony export */ });\n/* harmony import */ var _contentful__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./contentful */ \"./contentful.ts\");\n/* harmony import */ var _create_global_options__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./create-global-options */ \"./create-global-options.ts\");\n/* harmony import */ var _mixins_stringify_safe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mixins/stringify-safe */ \"./mixins/stringify-safe.ts\");\n/* harmony import */ var _utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/normalize-select */ \"./utils/normalize-select.ts\");\n/* harmony import */ var _utils_resolve_circular__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/resolve-circular */ \"./utils/resolve-circular.ts\");\n/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./types */ \"./types/index.ts\");\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://contentful/./index.ts?");
|
|
106
136
|
|
|
107
137
|
/***/ }),
|
|
108
138
|
|
|
109
|
-
/***/ "
|
|
110
|
-
|
|
111
|
-
!***
|
|
112
|
-
|
|
113
|
-
/***/ (function(
|
|
139
|
+
/***/ "./make-client.ts":
|
|
140
|
+
/*!************************!*\
|
|
141
|
+
!*** ./make-client.ts ***!
|
|
142
|
+
\************************/
|
|
143
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
114
144
|
|
|
115
145
|
"use strict";
|
|
116
|
-
eval("
|
|
146
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ makeClient: function() { return /* binding */ makeClient; }\n/* harmony export */ });\n/* harmony import */ var _create_contentful_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./create-contentful-api */ \"./create-contentful-api.ts\");\n\nfunction create({ http, getGlobalOptions }, options, makeInnerClient) {\n const client = (0,_create_contentful_api__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n http,\n getGlobalOptions,\n }, options);\n const response = client;\n Object.defineProperty(response, 'withAllLocales', {\n get: () => makeInnerClient({ ...options, withAllLocales: true }),\n });\n Object.defineProperty(response, 'withoutLinkResolution', {\n get: () => makeInnerClient({ ...options, withoutLinkResolution: true }),\n });\n Object.defineProperty(response, 'withoutUnresolvableLinks', {\n get: () => makeInnerClient({ ...options, withoutUnresolvableLinks: true }),\n });\n return Object.create(response);\n}\nconst makeClient = ({ http, getGlobalOptions, }) => {\n function makeInnerClient(options) {\n return create({ http, getGlobalOptions }, options, makeInnerClient);\n }\n const client = (0,_create_contentful_api__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({ http, getGlobalOptions }, {\n withoutLinkResolution: false,\n withAllLocales: false,\n withoutUnresolvableLinks: false,\n });\n return {\n ...client,\n get withAllLocales() {\n return makeInnerClient({\n withAllLocales: true,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n });\n },\n get withoutLinkResolution() {\n return makeInnerClient({\n withAllLocales: false,\n withoutLinkResolution: true,\n withoutUnresolvableLinks: false,\n });\n },\n get withoutUnresolvableLinks() {\n return makeInnerClient({\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: true,\n });\n },\n };\n};\n\n\n//# sourceURL=webpack://contentful/./make-client.ts?");
|
|
117
147
|
|
|
118
148
|
/***/ }),
|
|
119
149
|
|
|
120
|
-
/***/ "
|
|
121
|
-
|
|
122
|
-
!***
|
|
123
|
-
|
|
124
|
-
/***/ (function(
|
|
150
|
+
/***/ "./mixins/stringify-safe.ts":
|
|
151
|
+
/*!**********************************!*\
|
|
152
|
+
!*** ./mixins/stringify-safe.ts ***!
|
|
153
|
+
\**********************************/
|
|
154
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
125
155
|
|
|
126
156
|
"use strict";
|
|
127
|
-
eval("
|
|
157
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ mixinStringifySafe; }\n/* harmony export */ });\n/* harmony import */ var json_stringify_safe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! json-stringify-safe */ \"../node_modules/json-stringify-safe/stringify.js\");\n/* harmony import */ var json_stringify_safe__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(json_stringify_safe__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction mixinStringifySafe(data) {\n return Object.defineProperty(data, 'stringifySafe', {\n enumerable: false,\n configurable: false,\n writable: false,\n value: function (serializer = null, indent = '') {\n return json_stringify_safe__WEBPACK_IMPORTED_MODULE_0___default()(this, serializer, indent, (key, value) => {\n return {\n sys: {\n type: 'Link',\n linkType: 'Entry',\n id: value.sys.id,\n circular: true,\n },\n };\n });\n },\n });\n}\n\n\n//# sourceURL=webpack://contentful/./mixins/stringify-safe.ts?");
|
|
128
158
|
|
|
129
159
|
/***/ }),
|
|
130
160
|
|
|
131
|
-
/***/ "
|
|
132
|
-
|
|
133
|
-
!***
|
|
134
|
-
|
|
135
|
-
/***/ (function(
|
|
161
|
+
/***/ "./paged-sync.ts":
|
|
162
|
+
/*!***********************!*\
|
|
163
|
+
!*** ./paged-sync.ts ***!
|
|
164
|
+
\***********************/
|
|
165
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
136
166
|
|
|
137
167
|
"use strict";
|
|
138
|
-
eval("
|
|
168
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ pagedSync; }\n/* harmony export */ });\n/* harmony import */ var contentful_resolve_response__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! contentful-resolve-response */ \"../node_modules/contentful-resolve-response/dist/esm/index.js\");\n/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ \"../node_modules/contentful-sdk-core/dist/index.es-modules.js\");\n/* harmony import */ var _mixins_stringify_safe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mixins/stringify-safe */ \"./mixins/stringify-safe.ts\");\n\n\n\n/**\n * Retrieves all the available pages for a sync operation\n */\nasync function pagedSync(http, query, options) {\n if (!query || (!query.initial && !query.nextSyncToken && !query.nextPageToken)) {\n throw new Error('Please provide one of `initial`, `nextSyncToken` or `nextPageToken` parameters for syncing');\n }\n if (query['content_type'] && !query.type) {\n query.type = 'Entry';\n }\n else if (query['content_type'] && query.type && query.type !== 'Entry') {\n throw new Error('When using the `content_type` filter your `type` parameter cannot be different from `Entry`.');\n }\n const defaultOptions = {\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n paginate: true,\n };\n const { withoutLinkResolution, withoutUnresolvableLinks, paginate } = {\n ...defaultOptions,\n ...options,\n };\n const response = await getSyncPage(http, [], query, { paginate });\n // clones response.items used in includes because we don't want these to be mutated\n if (!withoutLinkResolution) {\n response.items = (0,contentful_resolve_response__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(response, {\n removeUnresolved: withoutUnresolvableLinks,\n itemEntryPoints: ['fields'],\n });\n }\n // maps response items again after getters are attached\n const mappedResponseItems = mapResponseItems(response.items);\n if (response.nextSyncToken) {\n mappedResponseItems.nextSyncToken = response.nextSyncToken;\n }\n if (response.nextPageToken) {\n mappedResponseItems.nextPageToken = response.nextPageToken;\n }\n return (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__.freezeSys)((0,_mixins_stringify_safe__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__.toPlainObject)(mappedResponseItems)));\n}\n/**\n * @private\n * @param items\n * @returns Entities mapped to an object for each entity type\n */\nfunction mapResponseItems(items) {\n const reducer = (type) => {\n return (accumulated, item) => {\n if (item.sys.type === type) {\n accumulated.push((0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__.toPlainObject)(item));\n }\n return accumulated;\n };\n };\n return {\n entries: items.reduce(reducer('Entry'), []),\n assets: items.reduce(reducer('Asset'), []),\n deletedEntries: items.reduce(reducer('DeletedEntry'), []),\n deletedAssets: items.reduce(reducer('DeletedAsset'), []),\n };\n}\nfunction createRequestQuery(originalQuery) {\n if (originalQuery.nextPageToken) {\n return { sync_token: originalQuery.nextPageToken };\n }\n if (originalQuery.nextSyncToken) {\n return { sync_token: originalQuery.nextSyncToken };\n }\n if (originalQuery.sync_token) {\n return { sync_token: originalQuery.sync_token };\n }\n return originalQuery;\n}\n/**\n * If the response contains a nextPageUrl, extracts the sync token to get the\n * next page and calls itself again with that token.\n * Otherwise, if the response contains a nextSyncUrl, extracts the sync token\n * and returns it.\n * On each call of this function, any retrieved items are collected in the\n * supplied items array, which gets returned in the end.\n */\nasync function getSyncPage(http, items, query, { paginate }) {\n const requestQuery = createRequestQuery(query);\n const response = await http.get('sync', (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__.createRequestConfig)({ query: requestQuery }));\n const data = response.data || {};\n items = items.concat(data.items || []);\n if (data.nextPageUrl) {\n if (paginate) {\n delete requestQuery.initial;\n requestQuery.sync_token = getToken(data.nextPageUrl);\n return getSyncPage(http, items, requestQuery, { paginate });\n }\n return {\n items,\n nextPageToken: getToken(data.nextPageUrl),\n };\n }\n else if (data.nextSyncUrl) {\n return {\n items,\n nextSyncToken: getToken(data.nextSyncUrl),\n };\n }\n else {\n return { items: [] };\n }\n}\n/**\n * Extracts token out of an url\n * @private\n */\nfunction getToken(url) {\n const urlParts = url.split('?');\n return urlParts.length > 0 ? urlParts[1].replace('sync_token=', '') : '';\n}\n\n\n//# sourceURL=webpack://contentful/./paged-sync.ts?");
|
|
139
169
|
|
|
140
170
|
/***/ }),
|
|
141
171
|
|
|
142
|
-
/***/ "
|
|
143
|
-
|
|
144
|
-
!***
|
|
145
|
-
|
|
146
|
-
/***/ (function(
|
|
172
|
+
/***/ "./types/asset-key.ts":
|
|
173
|
+
/*!****************************!*\
|
|
174
|
+
!*** ./types/asset-key.ts ***!
|
|
175
|
+
\****************************/
|
|
176
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
147
177
|
|
|
148
178
|
"use strict";
|
|
149
|
-
eval("
|
|
179
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/asset-key.ts?");
|
|
150
180
|
|
|
151
181
|
/***/ }),
|
|
152
182
|
|
|
153
|
-
/***/ "
|
|
154
|
-
|
|
155
|
-
!***
|
|
156
|
-
|
|
157
|
-
/***/ (function(
|
|
183
|
+
/***/ "./types/asset.ts":
|
|
184
|
+
/*!************************!*\
|
|
185
|
+
!*** ./types/asset.ts ***!
|
|
186
|
+
\************************/
|
|
187
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
158
188
|
|
|
159
189
|
"use strict";
|
|
160
|
-
eval("
|
|
190
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/asset.ts?");
|
|
161
191
|
|
|
162
192
|
/***/ }),
|
|
163
193
|
|
|
164
|
-
/***/ "
|
|
165
|
-
|
|
166
|
-
!***
|
|
167
|
-
|
|
168
|
-
/***/ (function(
|
|
194
|
+
/***/ "./types/collection.ts":
|
|
195
|
+
/*!*****************************!*\
|
|
196
|
+
!*** ./types/collection.ts ***!
|
|
197
|
+
\*****************************/
|
|
198
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
169
199
|
|
|
170
200
|
"use strict";
|
|
171
|
-
eval("
|
|
201
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/collection.ts?");
|
|
172
202
|
|
|
173
203
|
/***/ }),
|
|
174
204
|
|
|
175
|
-
/***/ "
|
|
176
|
-
|
|
177
|
-
!***
|
|
178
|
-
|
|
179
|
-
/***/ (function(
|
|
205
|
+
/***/ "./types/content-type.ts":
|
|
206
|
+
/*!*******************************!*\
|
|
207
|
+
!*** ./types/content-type.ts ***!
|
|
208
|
+
\*******************************/
|
|
209
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
180
210
|
|
|
181
211
|
"use strict";
|
|
182
|
-
eval("
|
|
212
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/content-type.ts?");
|
|
183
213
|
|
|
184
214
|
/***/ }),
|
|
185
215
|
|
|
186
|
-
/***/ "
|
|
187
|
-
|
|
188
|
-
!***
|
|
189
|
-
|
|
190
|
-
/***/ (function(
|
|
216
|
+
/***/ "./types/entry.ts":
|
|
217
|
+
/*!************************!*\
|
|
218
|
+
!*** ./types/entry.ts ***!
|
|
219
|
+
\************************/
|
|
220
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
191
221
|
|
|
192
222
|
"use strict";
|
|
193
|
-
eval("
|
|
223
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/entry.ts?");
|
|
194
224
|
|
|
195
225
|
/***/ }),
|
|
196
226
|
|
|
197
|
-
/***/ "
|
|
198
|
-
|
|
199
|
-
!***
|
|
200
|
-
|
|
201
|
-
/***/ (function(
|
|
227
|
+
/***/ "./types/index.ts":
|
|
228
|
+
/*!************************!*\
|
|
229
|
+
!*** ./types/index.ts ***!
|
|
230
|
+
\************************/
|
|
231
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
202
232
|
|
|
203
233
|
"use strict";
|
|
204
|
-
eval("\n\
|
|
234
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _asset__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./asset */ \"./types/asset.ts\");\n/* harmony import */ var _asset_key__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./asset-key */ \"./types/asset-key.ts\");\n/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./collection */ \"./types/collection.ts\");\n/* harmony import */ var _content_type__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./content-type */ \"./types/content-type.ts\");\n/* harmony import */ var _entry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./entry */ \"./types/entry.ts\");\n/* harmony import */ var _link__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./link */ \"./types/link.ts\");\n/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./locale */ \"./types/locale.ts\");\n/* harmony import */ var _metadata__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./metadata */ \"./types/metadata.ts\");\n/* harmony import */ var _query__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./query */ \"./types/query/index.ts\");\n/* harmony import */ var _resource_link__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./resource-link */ \"./types/resource-link.ts\");\n/* harmony import */ var _space__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./space */ \"./types/space.ts\");\n/* harmony import */ var _sync__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./sync */ \"./types/sync.ts\");\n/* harmony import */ var _sys__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./sys */ \"./types/sys.ts\");\n/* harmony import */ var _tag__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./tag */ \"./types/tag.ts\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://contentful/./types/index.ts?");
|
|
205
235
|
|
|
206
236
|
/***/ }),
|
|
207
237
|
|
|
208
|
-
/***/ "
|
|
209
|
-
|
|
210
|
-
!***
|
|
211
|
-
|
|
212
|
-
/***/ (function(
|
|
238
|
+
/***/ "./types/link.ts":
|
|
239
|
+
/*!***********************!*\
|
|
240
|
+
!*** ./types/link.ts ***!
|
|
241
|
+
\***********************/
|
|
242
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
213
243
|
|
|
214
|
-
|
|
244
|
+
"use strict";
|
|
245
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/link.ts?");
|
|
215
246
|
|
|
216
247
|
/***/ }),
|
|
217
248
|
|
|
218
|
-
/***/ "
|
|
219
|
-
|
|
220
|
-
!***
|
|
221
|
-
|
|
222
|
-
/***/ (function(
|
|
249
|
+
/***/ "./types/locale.ts":
|
|
250
|
+
/*!*************************!*\
|
|
251
|
+
!*** ./types/locale.ts ***!
|
|
252
|
+
\*************************/
|
|
253
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
223
254
|
|
|
224
255
|
"use strict";
|
|
225
|
-
eval("
|
|
256
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/locale.ts?");
|
|
226
257
|
|
|
227
258
|
/***/ }),
|
|
228
259
|
|
|
229
|
-
/***/ "
|
|
230
|
-
|
|
231
|
-
!***
|
|
232
|
-
|
|
233
|
-
/***/ (function(
|
|
260
|
+
/***/ "./types/metadata.ts":
|
|
261
|
+
/*!***************************!*\
|
|
262
|
+
!*** ./types/metadata.ts ***!
|
|
263
|
+
\***************************/
|
|
264
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
234
265
|
|
|
235
266
|
"use strict";
|
|
236
|
-
eval("
|
|
267
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/metadata.ts?");
|
|
237
268
|
|
|
238
269
|
/***/ }),
|
|
239
270
|
|
|
240
|
-
/***/ "
|
|
241
|
-
|
|
242
|
-
!***
|
|
243
|
-
|
|
244
|
-
/***/ (function(
|
|
271
|
+
/***/ "./types/query/equality.ts":
|
|
272
|
+
/*!*********************************!*\
|
|
273
|
+
!*** ./types/query/equality.ts ***!
|
|
274
|
+
\*********************************/
|
|
275
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
245
276
|
|
|
246
277
|
"use strict";
|
|
247
|
-
eval("
|
|
278
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/query/equality.ts?");
|
|
248
279
|
|
|
249
280
|
/***/ }),
|
|
250
281
|
|
|
251
|
-
/***/ "
|
|
252
|
-
|
|
253
|
-
!***
|
|
254
|
-
|
|
255
|
-
/***/ (function(
|
|
282
|
+
/***/ "./types/query/existence.ts":
|
|
283
|
+
/*!**********************************!*\
|
|
284
|
+
!*** ./types/query/existence.ts ***!
|
|
285
|
+
\**********************************/
|
|
286
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
256
287
|
|
|
257
288
|
"use strict";
|
|
258
|
-
eval("
|
|
289
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/query/existence.ts?");
|
|
259
290
|
|
|
260
291
|
/***/ }),
|
|
261
292
|
|
|
262
|
-
/***/ "
|
|
263
|
-
|
|
264
|
-
!***
|
|
265
|
-
|
|
266
|
-
/***/ (function(
|
|
293
|
+
/***/ "./types/query/index.ts":
|
|
294
|
+
/*!******************************!*\
|
|
295
|
+
!*** ./types/query/index.ts ***!
|
|
296
|
+
\******************************/
|
|
297
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
298
|
+
|
|
299
|
+
"use strict";
|
|
300
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _equality__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./equality */ \"./types/query/equality.ts\");\n/* harmony import */ var _existence__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./existence */ \"./types/query/existence.ts\");\n/* harmony import */ var _location__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./location */ \"./types/query/location.ts\");\n/* harmony import */ var _order__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./order */ \"./types/query/order.ts\");\n/* harmony import */ var _query__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./query */ \"./types/query/query.ts\");\n/* harmony import */ var _range__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./range */ \"./types/query/range.ts\");\n/* harmony import */ var _reference__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./reference */ \"./types/query/reference.ts\");\n/* harmony import */ var _search__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./search */ \"./types/query/search.ts\");\n/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./select */ \"./types/query/select.ts\");\n/* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./set */ \"./types/query/set.ts\");\n/* harmony import */ var _subset__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./subset */ \"./types/query/subset.ts\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://contentful/./types/query/index.ts?");
|
|
301
|
+
|
|
302
|
+
/***/ }),
|
|
303
|
+
|
|
304
|
+
/***/ "./types/query/location.ts":
|
|
305
|
+
/*!*********************************!*\
|
|
306
|
+
!*** ./types/query/location.ts ***!
|
|
307
|
+
\*********************************/
|
|
308
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
309
|
+
|
|
310
|
+
"use strict";
|
|
311
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/query/location.ts?");
|
|
312
|
+
|
|
313
|
+
/***/ }),
|
|
314
|
+
|
|
315
|
+
/***/ "./types/query/order.ts":
|
|
316
|
+
/*!******************************!*\
|
|
317
|
+
!*** ./types/query/order.ts ***!
|
|
318
|
+
\******************************/
|
|
319
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
320
|
+
|
|
321
|
+
"use strict";
|
|
322
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/query/order.ts?");
|
|
323
|
+
|
|
324
|
+
/***/ }),
|
|
325
|
+
|
|
326
|
+
/***/ "./types/query/query.ts":
|
|
327
|
+
/*!******************************!*\
|
|
328
|
+
!*** ./types/query/query.ts ***!
|
|
329
|
+
\******************************/
|
|
330
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
331
|
+
|
|
332
|
+
"use strict";
|
|
333
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/query/query.ts?");
|
|
334
|
+
|
|
335
|
+
/***/ }),
|
|
336
|
+
|
|
337
|
+
/***/ "./types/query/range.ts":
|
|
338
|
+
/*!******************************!*\
|
|
339
|
+
!*** ./types/query/range.ts ***!
|
|
340
|
+
\******************************/
|
|
341
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
342
|
+
|
|
343
|
+
"use strict";
|
|
344
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/query/range.ts?");
|
|
345
|
+
|
|
346
|
+
/***/ }),
|
|
347
|
+
|
|
348
|
+
/***/ "./types/query/reference.ts":
|
|
349
|
+
/*!**********************************!*\
|
|
350
|
+
!*** ./types/query/reference.ts ***!
|
|
351
|
+
\**********************************/
|
|
352
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
353
|
+
|
|
354
|
+
"use strict";
|
|
355
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/query/reference.ts?");
|
|
356
|
+
|
|
357
|
+
/***/ }),
|
|
358
|
+
|
|
359
|
+
/***/ "./types/query/search.ts":
|
|
360
|
+
/*!*******************************!*\
|
|
361
|
+
!*** ./types/query/search.ts ***!
|
|
362
|
+
\*******************************/
|
|
363
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
364
|
+
|
|
365
|
+
"use strict";
|
|
366
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/query/search.ts?");
|
|
367
|
+
|
|
368
|
+
/***/ }),
|
|
369
|
+
|
|
370
|
+
/***/ "./types/query/select.ts":
|
|
371
|
+
/*!*******************************!*\
|
|
372
|
+
!*** ./types/query/select.ts ***!
|
|
373
|
+
\*******************************/
|
|
374
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
375
|
+
|
|
376
|
+
"use strict";
|
|
377
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/query/select.ts?");
|
|
378
|
+
|
|
379
|
+
/***/ }),
|
|
380
|
+
|
|
381
|
+
/***/ "./types/query/set.ts":
|
|
382
|
+
/*!****************************!*\
|
|
383
|
+
!*** ./types/query/set.ts ***!
|
|
384
|
+
\****************************/
|
|
385
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
267
386
|
|
|
268
387
|
"use strict";
|
|
269
|
-
eval("
|
|
388
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/query/set.ts?");
|
|
270
389
|
|
|
271
390
|
/***/ }),
|
|
272
391
|
|
|
273
|
-
/***/ "
|
|
274
|
-
|
|
275
|
-
!***
|
|
276
|
-
|
|
277
|
-
/***/ (function(
|
|
392
|
+
/***/ "./types/query/subset.ts":
|
|
393
|
+
/*!*******************************!*\
|
|
394
|
+
!*** ./types/query/subset.ts ***!
|
|
395
|
+
\*******************************/
|
|
396
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
278
397
|
|
|
279
398
|
"use strict";
|
|
280
|
-
eval("
|
|
399
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/query/subset.ts?");
|
|
281
400
|
|
|
282
401
|
/***/ }),
|
|
283
402
|
|
|
284
|
-
/***/ "
|
|
285
|
-
|
|
286
|
-
!***
|
|
287
|
-
|
|
288
|
-
/***/ (function(
|
|
403
|
+
/***/ "./types/resource-link.ts":
|
|
404
|
+
/*!********************************!*\
|
|
405
|
+
!*** ./types/resource-link.ts ***!
|
|
406
|
+
\********************************/
|
|
407
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
289
408
|
|
|
290
409
|
"use strict";
|
|
291
|
-
eval("
|
|
410
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/resource-link.ts?");
|
|
292
411
|
|
|
293
412
|
/***/ }),
|
|
294
413
|
|
|
295
|
-
/***/ "
|
|
296
|
-
|
|
297
|
-
!***
|
|
298
|
-
|
|
299
|
-
/***/ (function(
|
|
414
|
+
/***/ "./types/space.ts":
|
|
415
|
+
/*!************************!*\
|
|
416
|
+
!*** ./types/space.ts ***!
|
|
417
|
+
\************************/
|
|
418
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
300
419
|
|
|
301
420
|
"use strict";
|
|
302
|
-
eval("
|
|
421
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/space.ts?");
|
|
303
422
|
|
|
304
423
|
/***/ }),
|
|
305
424
|
|
|
306
|
-
/***/ "
|
|
307
|
-
|
|
308
|
-
!***
|
|
309
|
-
|
|
310
|
-
/***/ (function(
|
|
425
|
+
/***/ "./types/sync.ts":
|
|
426
|
+
/*!***********************!*\
|
|
427
|
+
!*** ./types/sync.ts ***!
|
|
428
|
+
\***********************/
|
|
429
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
311
430
|
|
|
312
431
|
"use strict";
|
|
313
|
-
eval("
|
|
432
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/sync.ts?");
|
|
314
433
|
|
|
315
434
|
/***/ }),
|
|
316
435
|
|
|
317
|
-
/***/ "
|
|
318
|
-
|
|
319
|
-
!***
|
|
320
|
-
|
|
321
|
-
/***/ (function(
|
|
436
|
+
/***/ "./types/sys.ts":
|
|
437
|
+
/*!**********************!*\
|
|
438
|
+
!*** ./types/sys.ts ***!
|
|
439
|
+
\**********************/
|
|
440
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
322
441
|
|
|
323
442
|
"use strict";
|
|
324
|
-
eval("
|
|
443
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/sys.ts?");
|
|
325
444
|
|
|
326
445
|
/***/ }),
|
|
327
446
|
|
|
328
|
-
/***/ "
|
|
329
|
-
|
|
330
|
-
!***
|
|
331
|
-
|
|
332
|
-
/***/ (function(
|
|
447
|
+
/***/ "./types/tag.ts":
|
|
448
|
+
/*!**********************!*\
|
|
449
|
+
!*** ./types/tag.ts ***!
|
|
450
|
+
\**********************/
|
|
451
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
333
452
|
|
|
334
453
|
"use strict";
|
|
335
|
-
eval("
|
|
454
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful/./types/tag.ts?");
|
|
336
455
|
|
|
337
456
|
/***/ }),
|
|
338
457
|
|
|
339
|
-
/***/ "
|
|
340
|
-
|
|
341
|
-
!***
|
|
342
|
-
|
|
343
|
-
/***/ (function(
|
|
458
|
+
/***/ "./utils/normalize-search-parameters.ts":
|
|
459
|
+
/*!**********************************************!*\
|
|
460
|
+
!*** ./utils/normalize-search-parameters.ts ***!
|
|
461
|
+
\**********************************************/
|
|
462
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
344
463
|
|
|
345
464
|
"use strict";
|
|
346
|
-
eval("
|
|
465
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ normalizeSearchParameters; }\n/* harmony export */ });\nfunction normalizeSearchParameters(query) {\n const convertedQuery = {};\n let hasConverted = false;\n for (const key in query) {\n // We allow multiple values to be passed as arrays\n // which have to be converted to comma-separated strings before being sent to the API\n if (Array.isArray(query[key])) {\n convertedQuery[key] = query[key].join(',');\n hasConverted = true;\n }\n }\n if (hasConverted) {\n return { ...query, ...convertedQuery };\n }\n return query;\n}\n\n\n//# sourceURL=webpack://contentful/./utils/normalize-search-parameters.ts?");
|
|
347
466
|
|
|
348
467
|
/***/ }),
|
|
349
468
|
|
|
350
|
-
/***/ "
|
|
351
|
-
|
|
352
|
-
!***
|
|
353
|
-
|
|
469
|
+
/***/ "./utils/normalize-select.ts":
|
|
470
|
+
/*!***********************************!*\
|
|
471
|
+
!*** ./utils/normalize-select.ts ***!
|
|
472
|
+
\***********************************/
|
|
354
473
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
355
474
|
|
|
356
475
|
"use strict";
|
|
357
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony
|
|
476
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ normalizeSelect; }\n/* harmony export */ });\n/*\n * sdk relies heavily on sys metadata\n * so we cannot omit the sys property on sdk level entirely\n * and we have to ensure that at least `id` and `type` are present\n * */\nfunction normalizeSelect(query) {\n if (!query.select) {\n return query;\n }\n // The selection of fields for the query is limited\n // Get the different parts that are listed for selection\n const allSelects = Array.isArray(query.select)\n ? query.select\n : query.select.split(',').map((q) => q.trim());\n // Move the parts into a set for easy access and deduplication\n const selectedSet = new Set(allSelects);\n // If we already select all of `sys` we can just return\n // since we're anyway fetching everything that is needed\n if (selectedSet.has('sys')) {\n return query;\n }\n // We don't select `sys` so we need to ensure the minimum set\n selectedSet.add('sys.id');\n selectedSet.add('sys.type');\n // Reassign the normalized sys properties\n return {\n ...query,\n select: [...selectedSet].join(','),\n };\n}\n\n\n//# sourceURL=webpack://contentful/./utils/normalize-select.ts?");
|
|
358
477
|
|
|
359
478
|
/***/ }),
|
|
360
479
|
|
|
361
|
-
/***/ "
|
|
362
|
-
|
|
363
|
-
!***
|
|
364
|
-
|
|
480
|
+
/***/ "./utils/resolve-circular.ts":
|
|
481
|
+
/*!***********************************!*\
|
|
482
|
+
!*** ./utils/resolve-circular.ts ***!
|
|
483
|
+
\***********************************/
|
|
365
484
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
366
485
|
|
|
367
486
|
"use strict";
|
|
368
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createHttpClient: function() { return /* binding */ createHttpClient; },\n/* harmony export */ createRequestConfig: function() { return /* binding */ createRequestConfig; },\n/* harmony export */ enforceObjPath: function() { return /* binding */ enforceObjPath; },\n/* harmony export */ errorHandler: function() { return /* binding */ errorHandler; },\n/* harmony export */ freezeSys: function() { return /* binding */ freezeSys; },\n/* harmony export */ getUserAgentHeader: function() { return /* binding */ getUserAgentHeader; },\n/* harmony export */ toPlainObject: function() { return /* binding */ toPlainObject; }\n/* harmony export */ });\n/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-copy */ \"../node_modules/fast-copy/dist/fast-copy.js\");\n/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fast_copy__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash_isstring__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash.isstring */ \"../node_modules/lodash.isstring/index.js\");\n/* harmony import */ var lodash_isstring__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isstring__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var p_throttle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! p-throttle */ \"../node_modules/p-throttle/index.js\");\n/* harmony import */ var p_throttle__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(p_throttle__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash_isplainobject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash.isplainobject */ \"../node_modules/lodash.isplainobject/index.js\");\n/* harmony import */ var lodash_isplainobject__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_isplainobject__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"];\n if (null != _i) {\n var _s,\n _e,\n _x,\n _r,\n _arr = [],\n _n = !0,\n _d = !1;\n try {\n if (_x = (_i = _i.call(arr)).next, 0 === i) {\n if (Object(_i) !== _i) return;\n _n = !1;\n } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);\n } catch (err) {\n _d = !0, _e = err;\n } finally {\n try {\n if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\nfunction _wrapRegExp() {\n _wrapRegExp = function (re, groups) {\n return new BabelRegExp(re, void 0, groups);\n };\n var _super = RegExp.prototype,\n _groups = new WeakMap();\n function BabelRegExp(re, flags, groups) {\n var _this = new RegExp(re, flags);\n return _groups.set(_this, groups || _groups.get(re)), _setPrototypeOf(_this, BabelRegExp.prototype);\n }\n function buildGroups(result, re) {\n var g = _groups.get(re);\n return Object.keys(g).reduce(function (groups, name) {\n var i = g[name];\n if (\"number\" == typeof i) groups[name] = result[i];else {\n for (var k = 0; void 0 === result[i[k]] && k + 1 < i.length;) k++;\n groups[name] = result[i[k]];\n }\n return groups;\n }, Object.create(null));\n }\n return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) {\n var result = _super.exec.call(this, str);\n if (result) {\n result.groups = buildGroups(result, this);\n var indices = result.indices;\n indices && (indices.groups = buildGroups(indices, this));\n }\n return result;\n }, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {\n if (\"string\" == typeof substitution) {\n var groups = _groups.get(this);\n return _super[Symbol.replace].call(this, str, substitution.replace(/\\$<([^>]+)>/g, function (_, name) {\n var group = groups[name];\n return \"$\" + (Array.isArray(group) ? group.join(\"$\") : group);\n }));\n }\n if (\"function\" == typeof substitution) {\n var _this = this;\n return _super[Symbol.replace].call(this, str, function () {\n var args = arguments;\n return \"object\" != typeof args[args.length - 1] && (args = [].slice.call(args)).push(buildGroups(args, _this)), substitution.apply(this, args);\n });\n }\n return _super[Symbol.replace].call(this, str, substitution);\n }, _wrapRegExp.apply(this, arguments);\n}\nfunction _defineProperty(obj, key, value) {\n key = _toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n if (!it) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n var F = function () {};\n return {\n s: F,\n n: function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function (e) {\n throw e;\n },\n f: F\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function () {\n it = it.call(o);\n },\n n: function () {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function (e) {\n didErr = true;\n err = e;\n },\n f: function () {\n try {\n if (!normalCompletion && it.return != null) it.return();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}\nfunction _toPrimitive(input, hint) {\n if (typeof input !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (typeof res !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, \"string\");\n return typeof key === \"symbol\" ? key : String(key);\n}\n\nfunction asyncToken(instance, getToken) {\n instance.interceptors.request.use(function (config) {\n return getToken().then(function (accessToken) {\n config.headers.set('Authorization', \"Bearer \".concat(accessToken));\n return config;\n });\n });\n}\n\nfunction isNode() {\n /**\n * Polyfills of 'process' might set process.browser === true\n *\n * See:\n * https://github.com/webpack/node-libs-browser/blob/master/mock/process.js#L8\n * https://github.com/defunctzombie/node-process/blob/master/browser.js#L156\n **/\n return typeof process !== 'undefined' && !process.browser;\n}\nfunction isReactNative() {\n return typeof window !== 'undefined' && 'navigator' in window && 'product' in window.navigator && window.navigator.product === 'ReactNative';\n}\nfunction getNodeVersion() {\n return process.versions && process.versions.node ? \"v\".concat(process.versions.node) : process.version;\n}\nfunction getWindow() {\n return window;\n}\nfunction noop() {\n return undefined;\n}\n\nvar delay = function delay(ms) {\n return new Promise(function (resolve) {\n setTimeout(resolve, ms);\n });\n};\nvar defaultWait = function defaultWait(attempts) {\n return Math.pow(Math.SQRT2, attempts);\n};\nfunction rateLimit(instance) {\n var maxRetry = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5;\n var _instance$defaults = instance.defaults,\n _instance$defaults$re = _instance$defaults.responseLogger,\n responseLogger = _instance$defaults$re === void 0 ? noop : _instance$defaults$re,\n _instance$defaults$re2 = _instance$defaults.requestLogger,\n requestLogger = _instance$defaults$re2 === void 0 ? noop : _instance$defaults$re2;\n instance.interceptors.request.use(function (config) {\n requestLogger(config);\n return config;\n }, function (error) {\n requestLogger(error);\n return Promise.reject(error);\n });\n instance.interceptors.response.use(function (response) {\n // we don't need to do anything here\n responseLogger(response);\n return response;\n }, function (error) {\n var response = error.response;\n var config = error.config;\n responseLogger(error);\n // Do not retry if it is disabled or no request config exists (not an axios error)\n if (!config || !instance.defaults.retryOnError) {\n return Promise.reject(error);\n }\n\n // Retried already for max attempts\n var doneAttempts = config.attempts || 1;\n if (doneAttempts > maxRetry) {\n error.attempts = config.attempts;\n return Promise.reject(error);\n }\n var retryErrorType = null;\n var wait = defaultWait(doneAttempts);\n\n // Errors without response did not receive anything from the server\n if (!response) {\n retryErrorType = 'Connection';\n } else if (response.status >= 500 && response.status < 600) {\n // 5** errors are server related\n retryErrorType = \"Server \".concat(response.status);\n } else if (response.status === 429) {\n // 429 errors are exceeded rate limit exceptions\n retryErrorType = 'Rate limit';\n // all headers are lowercased by axios https://github.com/mzabriskie/axios/issues/413\n if (response.headers && error.response.headers['x-contentful-ratelimit-reset']) {\n wait = response.headers['x-contentful-ratelimit-reset'];\n }\n }\n if (retryErrorType) {\n // convert to ms and add jitter\n wait = Math.floor(wait * 1000 + Math.random() * 200 + 500);\n instance.defaults.logHandler('warning', \"\".concat(retryErrorType, \" error occurred. Waiting for \").concat(wait, \" ms before retrying...\"));\n\n // increase attempts counter\n config.attempts = doneAttempts + 1;\n\n /* Somehow between the interceptor and retrying the request the httpAgent/httpsAgent gets transformed from an Agent-like object\n to a regular object, causing failures on retries after rate limits. Removing these properties here fixes the error, but retry\n requests still use the original http/httpsAgent property */\n delete config.httpAgent;\n delete config.httpsAgent;\n return delay(wait).then(function () {\n return instance(config);\n });\n }\n return Promise.reject(error);\n });\n}\n\nvar PERCENTAGE_REGEX = /*#__PURE__*/_wrapRegExp(/(\\d+)(%)/, {\n value: 1\n});\nfunction calculateLimit(type) {\n var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 7;\n var limit = max;\n if (PERCENTAGE_REGEX.test(type)) {\n var _type$match;\n var groups = (_type$match = type.match(PERCENTAGE_REGEX)) === null || _type$match === void 0 ? void 0 : _type$match.groups;\n if (groups && groups.value) {\n var percentage = parseInt(groups.value) / 100;\n limit = Math.round(max * percentage);\n }\n }\n return Math.min(30, Math.max(1, limit));\n}\nfunction createThrottle(limit, logger) {\n logger('info', \"Throttle request to \".concat(limit, \"/s\"));\n return p_throttle__WEBPACK_IMPORTED_MODULE_2___default()({\n limit: limit,\n interval: 1000,\n strict: false\n });\n}\nvar rateLimitThrottle = (function (axiosInstance) {\n var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'auto';\n var _axiosInstance$defaul = axiosInstance.defaults.logHandler,\n logHandler = _axiosInstance$defaul === void 0 ? noop : _axiosInstance$defaul;\n var limit = lodash_isstring__WEBPACK_IMPORTED_MODULE_1___default()(type) ? calculateLimit(type) : calculateLimit('auto', type);\n var throttle = createThrottle(limit, logHandler);\n var isCalculated = false;\n var requestInterceptorId = axiosInstance.interceptors.request.use(function (config) {\n return throttle(function () {\n return config;\n })();\n }, function (error) {\n return Promise.reject(error);\n });\n var responseInterceptorId = axiosInstance.interceptors.response.use(function (response) {\n if (!isCalculated && lodash_isstring__WEBPACK_IMPORTED_MODULE_1___default()(type) && (type === 'auto' || PERCENTAGE_REGEX.test(type)) && response.headers && response.headers['x-contentful-ratelimit-second-limit']) {\n var rawLimit = parseInt(response.headers['x-contentful-ratelimit-second-limit']);\n var nextLimit = calculateLimit(type, rawLimit);\n if (nextLimit !== limit) {\n if (requestInterceptorId) {\n axiosInstance.interceptors.request.eject(requestInterceptorId);\n }\n limit = nextLimit;\n throttle = createThrottle(nextLimit, logHandler);\n requestInterceptorId = axiosInstance.interceptors.request.use(function (config) {\n return throttle(function () {\n return config;\n })();\n }, function (error) {\n return Promise.reject(error);\n });\n }\n isCalculated = true;\n }\n return response;\n }, function (error) {\n return Promise.reject(error);\n });\n return function () {\n axiosInstance.interceptors.request.eject(requestInterceptorId);\n axiosInstance.interceptors.response.eject(responseInterceptorId);\n };\n});\n\n// Matches 'sub.host:port' or 'host:port' and extracts hostname and port\n// Also enforces toplevel domain specified, no spaces and no protocol\nvar HOST_REGEX = /^(?!\\w+:\\/\\/)([^\\s:]+\\.?[^\\s:]+)(?::(\\d+))?(?!:)$/;\n\n/**\n * Create pre-configured axios instance\n * @private\n * @param {AxiosStatic} axios - Axios library\n * @param {CreateHttpClientParams} options - Initialization parameters for the HTTP client\n * @return {AxiosInstance} Initialized axios instance\n */\nfunction createHttpClient(axios, options) {\n var defaultConfig = {\n insecure: false,\n retryOnError: true,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n logHandler: function logHandler(level, data) {\n if (level === 'error' && data) {\n var title = [data.name, data.message].filter(function (a) {\n return a;\n }).join(' - ');\n console.error(\"[error] \".concat(title));\n console.error(data);\n return;\n }\n console.log(\"[\".concat(level, \"] \").concat(data));\n },\n // Passed to axios\n headers: {},\n httpAgent: false,\n httpsAgent: false,\n timeout: 30000,\n throttle: 0,\n basePath: '',\n adapter: undefined,\n maxContentLength: 1073741824,\n // 1GB\n maxBodyLength: 1073741824 // 1GB\n };\n\n var config = _objectSpread2(_objectSpread2({}, defaultConfig), options);\n if (!config.accessToken) {\n var missingAccessTokenError = new TypeError('Expected parameter accessToken');\n config.logHandler('error', missingAccessTokenError);\n throw missingAccessTokenError;\n }\n\n // Construct axios baseURL option\n var protocol = config.insecure ? 'http' : 'https';\n var space = config.space ? \"\".concat(config.space, \"/\") : '';\n var hostname = config.defaultHostname;\n var port = config.insecure ? 80 : 443;\n if (config.host && HOST_REGEX.test(config.host)) {\n var parsed = config.host.split(':');\n if (parsed.length === 2) {\n var _parsed = _slicedToArray(parsed, 2);\n hostname = _parsed[0];\n port = _parsed[1];\n } else {\n hostname = parsed[0];\n }\n }\n\n // Ensure that basePath does start but not end with a slash\n if (config.basePath) {\n config.basePath = \"/\".concat(config.basePath.split('/').filter(Boolean).join('/'));\n }\n var baseURL = options.baseURL || \"\".concat(protocol, \"://\").concat(hostname, \":\").concat(port).concat(config.basePath, \"/spaces/\").concat(space);\n if (!config.headers.Authorization && typeof config.accessToken !== 'function') {\n config.headers.Authorization = 'Bearer ' + config.accessToken;\n }\n var axiosOptions = {\n // Axios\n baseURL: baseURL,\n headers: config.headers,\n httpAgent: config.httpAgent,\n httpsAgent: config.httpsAgent,\n proxy: config.proxy,\n timeout: config.timeout,\n adapter: config.adapter,\n maxContentLength: config.maxContentLength,\n maxBodyLength: config.maxBodyLength,\n // Contentful\n logHandler: config.logHandler,\n responseLogger: config.responseLogger,\n requestLogger: config.requestLogger,\n retryOnError: config.retryOnError\n };\n var instance = axios.create(axiosOptions);\n instance.httpClientParams = options;\n\n /**\n * Creates a new axios instance with the same default base parameters as the\n * current one, and with any overrides passed to the newParams object\n * This is useful as the SDKs use dependency injection to get the axios library\n * and the version of the library comes from different places depending\n * on whether it's a browser build or a node.js build.\n * @private\n * @param {CreateHttpClientParams} newParams - Initialization parameters for the HTTP client\n * @return {AxiosInstance} Initialized axios instance\n */\n instance.cloneWithNewParams = function (newParams) {\n return createHttpClient(axios, _objectSpread2(_objectSpread2({}, fast_copy__WEBPACK_IMPORTED_MODULE_0___default()(options)), newParams));\n };\n\n /**\n * Apply interceptors.\n * Please note that the order of interceptors is important\n */\n\n if (config.onBeforeRequest) {\n instance.interceptors.request.use(config.onBeforeRequest);\n }\n if (typeof config.accessToken === 'function') {\n asyncToken(instance, config.accessToken);\n }\n if (config.throttle) {\n rateLimitThrottle(instance, config.throttle);\n }\n rateLimit(instance, config.retryLimit);\n if (config.onError) {\n instance.interceptors.response.use(function (response) {\n return response;\n }, config.onError);\n }\n return instance;\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Creates request parameters configuration by parsing an existing query object\n * @private\n * @param {Object} query\n * @return {Object} Config object with `params` property, ready to be used in axios\n */\nfunction createRequestConfig(_ref) {\n var query = _ref.query;\n var config = {};\n delete query.resolveLinks;\n config.params = fast_copy__WEBPACK_IMPORTED_MODULE_0___default()(query);\n return config;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction enforceObjPath(obj, path) {\n if (!(path in obj)) {\n var err = new Error();\n err.name = 'PropertyMissing';\n err.message = \"Required property \".concat(path, \" missing from:\\n\\n\").concat(JSON.stringify(obj), \"\\n\\n\");\n throw err;\n }\n return true;\n}\n\n// copied from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze\n\nfunction deepFreeze(object) {\n var propNames = Object.getOwnPropertyNames(object);\n var _iterator = _createForOfIteratorHelper(propNames),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var name = _step.value;\n var value = object[name];\n if (value && _typeof(value) === 'object') {\n deepFreeze(value);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n return Object.freeze(object);\n}\nfunction freezeSys(obj) {\n deepFreeze(obj.sys || {});\n return obj;\n}\n\nfunction getBrowserOS() {\n var win = getWindow();\n if (!win) {\n return null;\n }\n var userAgent = win.navigator.userAgent;\n // TODO: platform is deprecated.\n var platform = win.navigator.platform;\n var macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'];\n var windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'];\n var iosPlatforms = ['iPhone', 'iPad', 'iPod'];\n if (macosPlatforms.indexOf(platform) !== -1) {\n return 'macOS';\n } else if (iosPlatforms.indexOf(platform) !== -1) {\n return 'iOS';\n } else if (windowsPlatforms.indexOf(platform) !== -1) {\n return 'Windows';\n } else if (/Android/.test(userAgent)) {\n return 'Android';\n } else if (/Linux/.test(platform)) {\n return 'Linux';\n }\n return null;\n}\nfunction getNodeOS() {\n var platform = process.platform || 'linux';\n var version = process.version || '0.0.0';\n var platformMap = {\n android: 'Android',\n aix: 'Linux',\n darwin: 'macOS',\n freebsd: 'Linux',\n linux: 'Linux',\n openbsd: 'Linux',\n sunos: 'Linux',\n win32: 'Windows'\n };\n if (platform in platformMap) {\n return \"\".concat(platformMap[platform] || 'Linux', \"/\").concat(version);\n }\n return null;\n}\nfunction getUserAgentHeader(sdk, application, integration, feature) {\n var headerParts = [];\n if (application) {\n headerParts.push(\"app \".concat(application));\n }\n if (integration) {\n headerParts.push(\"integration \".concat(integration));\n }\n if (feature) {\n headerParts.push('feature ' + feature);\n }\n headerParts.push(\"sdk \".concat(sdk));\n var platform = null;\n try {\n if (isReactNative()) {\n platform = getBrowserOS();\n headerParts.push('platform ReactNative');\n } else if (isNode()) {\n platform = getNodeOS();\n headerParts.push(\"platform node.js/\".concat(getNodeVersion()));\n } else {\n platform = getBrowserOS();\n headerParts.push('platform browser');\n }\n } catch (e) {\n platform = null;\n }\n if (platform) {\n headerParts.push(\"os \".concat(platform));\n }\n return \"\".concat(headerParts.filter(function (item) {\n return item !== '';\n }).join('; '), \";\");\n}\n\n/**\n * Mixes in a method to return just a plain object with no additional methods\n * @private\n * @param data - Any plain JSON response returned from the API\n * @return Enhanced object with toPlainObject method\n */\nfunction toPlainObject(data) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n return Object.defineProperty(data, 'toPlainObject', {\n enumerable: false,\n configurable: false,\n writable: false,\n value: function value() {\n return fast_copy__WEBPACK_IMPORTED_MODULE_0___default()(this);\n }\n });\n}\n\n/**\n * Handles errors received from the server. Parses the error into a more useful\n * format, places it in an exception and throws it.\n * See https://www.contentful.com/developers/docs/references/errors/\n * for more details on the data received on the errorResponse.data property\n * and the expected error codes.\n * @private\n */\nfunction errorHandler(errorResponse) {\n var config = errorResponse.config,\n response = errorResponse.response;\n var errorName;\n\n // Obscure the Management token\n if (config && config.headers && config.headers['Authorization']) {\n var token = \"...\".concat(config.headers['Authorization'].toString().substr(-5));\n config.headers['Authorization'] = \"Bearer \".concat(token);\n }\n if (!lodash_isplainobject__WEBPACK_IMPORTED_MODULE_3___default()(response) || !lodash_isplainobject__WEBPACK_IMPORTED_MODULE_3___default()(config)) {\n throw errorResponse;\n }\n var data = response === null || response === void 0 ? void 0 : response.data;\n var errorData = {\n status: response === null || response === void 0 ? void 0 : response.status,\n statusText: response === null || response === void 0 ? void 0 : response.statusText,\n message: '',\n details: {}\n };\n if (config && lodash_isplainobject__WEBPACK_IMPORTED_MODULE_3___default()(config)) {\n errorData.request = {\n url: config.url,\n headers: config.headers,\n method: config.method,\n payloadData: config.data\n };\n }\n if (data && _typeof(data) === 'object') {\n var _data$sys;\n if ('requestId' in data) {\n errorData.requestId = data.requestId || 'UNKNOWN';\n }\n if ('message' in data) {\n errorData.message = data.message || '';\n }\n if ('details' in data) {\n errorData.details = data.details || {};\n }\n errorName = (_data$sys = data.sys) === null || _data$sys === void 0 ? void 0 : _data$sys.id;\n }\n var error = new Error();\n error.name = errorName && errorName !== 'Unknown' ? errorName : \"\".concat(response === null || response === void 0 ? void 0 : response.status, \" \").concat(response === null || response === void 0 ? void 0 : response.statusText);\n try {\n error.message = JSON.stringify(errorData, null, ' ');\n } catch (_unused) {\n var _errorData$message;\n error.message = (_errorData$message = errorData === null || errorData === void 0 ? void 0 : errorData.message) !== null && _errorData$message !== void 0 ? _errorData$message : '';\n }\n throw error;\n}\n\n\n\n\n//# sourceURL=webpack://contentful/../node_modules/contentful-sdk-core/dist/index.es-modules.js?");
|
|
487
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ resolveCircular; }\n/* harmony export */ });\n/* harmony import */ var _mixins_stringify_safe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../mixins/stringify-safe */ \"./mixins/stringify-safe.ts\");\n/* harmony import */ var contentful_resolve_response__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-resolve-response */ \"../node_modules/contentful-resolve-response/dist/esm/index.js\");\n\n\nfunction resolveCircular(data, { resolveLinks, removeUnresolved }) {\n const wrappedData = (0,_mixins_stringify_safe__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(data);\n if (resolveLinks) {\n wrappedData.items = (0,contentful_resolve_response__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(wrappedData, {\n removeUnresolved,\n itemEntryPoints: ['fields'],\n });\n }\n return wrappedData;\n}\n\n\n//# sourceURL=webpack://contentful/./utils/resolve-circular.ts?");
|
|
369
488
|
|
|
370
489
|
/***/ }),
|
|
371
490
|
|
|
372
|
-
/***/ "
|
|
373
|
-
|
|
374
|
-
!***
|
|
375
|
-
|
|
376
|
-
/***/ (function(
|
|
491
|
+
/***/ "./utils/validate-params.ts":
|
|
492
|
+
/*!**********************************!*\
|
|
493
|
+
!*** ./utils/validate-params.ts ***!
|
|
494
|
+
\**********************************/
|
|
495
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
377
496
|
|
|
378
|
-
eval("(function (global, factory) {\n true ? module.exports = factory() :\n 0;\n})(this, (function () { 'use strict';\n\n var toStringFunction = Function.prototype.toString;\n var create = Object.create, defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols, getPrototypeOf$1 = Object.getPrototypeOf;\n var _a = Object.prototype, hasOwnProperty = _a.hasOwnProperty, propertyIsEnumerable = _a.propertyIsEnumerable;\n var SYMBOL_PROPERTIES = typeof getOwnPropertySymbols === 'function';\n var WEAK_MAP = typeof WeakMap === 'function';\n /**\n * @function createCache\n *\n * @description\n * get a new cache object to prevent circular references\n *\n * @returns the new cache object\n */\n var createCache = (function () {\n if (WEAK_MAP) {\n return function () { return new WeakMap(); };\n }\n var Cache = /** @class */ (function () {\n function Cache() {\n this._keys = [];\n this._values = [];\n }\n Cache.prototype.has = function (key) {\n return !!~this._keys.indexOf(key);\n };\n Cache.prototype.get = function (key) {\n return this._values[this._keys.indexOf(key)];\n };\n Cache.prototype.set = function (key, value) {\n this._keys.push(key);\n this._values.push(value);\n };\n return Cache;\n }());\n return function () { return new Cache(); };\n })();\n /**\n * @function getCleanClone\n *\n * @description\n * get an empty version of the object with the same prototype it has\n *\n * @param object the object to build a clean clone from\n * @param realm the realm the object resides in\n * @returns the empty cloned object\n */\n var getCleanClone = function (object, realm) {\n var prototype = object.__proto__ || getPrototypeOf$1(object);\n if (!prototype) {\n return create(null);\n }\n var Constructor = prototype.constructor;\n if (Constructor === realm.Object) {\n return prototype === realm.Object.prototype ? {} : create(prototype);\n }\n if (~toStringFunction.call(Constructor).indexOf('[native code]')) {\n try {\n return new Constructor();\n }\n catch (_a) { }\n }\n return create(prototype);\n };\n /**\n * @function getObjectCloneLoose\n *\n * @description\n * get a copy of the object based on loose rules, meaning all enumerable keys\n * and symbols are copied, but property descriptors are not considered\n *\n * @param object the object to clone\n * @param realm the realm the object resides in\n * @param handleCopy the function that handles copying the object\n * @returns the copied object\n */\n var getObjectCloneLoose = function (object, realm, handleCopy, cache) {\n var clone = getCleanClone(object, realm);\n // set in the cache immediately to be able to reuse the object recursively\n cache.set(object, clone);\n for (var key in object) {\n if (hasOwnProperty.call(object, key)) {\n clone[key] = handleCopy(object[key], cache);\n }\n }\n if (SYMBOL_PROPERTIES) {\n var symbols = getOwnPropertySymbols(object);\n for (var index = 0, length_1 = symbols.length, symbol = void 0; index < length_1; ++index) {\n symbol = symbols[index];\n if (propertyIsEnumerable.call(object, symbol)) {\n clone[symbol] = handleCopy(object[symbol], cache);\n }\n }\n }\n return clone;\n };\n /**\n * @function getObjectCloneStrict\n *\n * @description\n * get a copy of the object based on strict rules, meaning all keys and symbols\n * are copied based on the original property descriptors\n *\n * @param object the object to clone\n * @param realm the realm the object resides in\n * @param handleCopy the function that handles copying the object\n * @returns the copied object\n */\n var getObjectCloneStrict = function (object, realm, handleCopy, cache) {\n var clone = getCleanClone(object, realm);\n // set in the cache immediately to be able to reuse the object recursively\n cache.set(object, clone);\n var properties = SYMBOL_PROPERTIES\n ? getOwnPropertyNames(object).concat(getOwnPropertySymbols(object))\n : getOwnPropertyNames(object);\n for (var index = 0, length_2 = properties.length, property = void 0, descriptor = void 0; index < length_2; ++index) {\n property = properties[index];\n if (property !== 'callee' && property !== 'caller') {\n descriptor = getOwnPropertyDescriptor(object, property);\n if (descriptor) {\n // Only clone the value if actually a value, not a getter / setter.\n if (!descriptor.get && !descriptor.set) {\n descriptor.value = handleCopy(object[property], cache);\n }\n try {\n defineProperty(clone, property, descriptor);\n }\n catch (error) {\n // Tee above can fail on node in edge cases, so fall back to the loose assignment.\n clone[property] = descriptor.value;\n }\n }\n else {\n // In extra edge cases where the property descriptor cannot be retrived, fall back to\n // the loose assignment.\n clone[property] = handleCopy(object[property], cache);\n }\n }\n }\n return clone;\n };\n /**\n * @function getRegExpFlags\n *\n * @description\n * get the flags to apply to the copied regexp\n *\n * @param regExp the regexp to get the flags of\n * @returns the flags for the regexp\n */\n var getRegExpFlags = function (regExp) {\n var flags = '';\n if (regExp.global) {\n flags += 'g';\n }\n if (regExp.ignoreCase) {\n flags += 'i';\n }\n if (regExp.multiline) {\n flags += 'm';\n }\n if (regExp.unicode) {\n flags += 'u';\n }\n if (regExp.sticky) {\n flags += 'y';\n }\n return flags;\n };\n\n // utils\n var isArray = Array.isArray;\n var getPrototypeOf = Object.getPrototypeOf;\n var GLOBAL_THIS = (function () {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof __webpack_require__.g !== 'undefined') {\n return __webpack_require__.g;\n }\n if (console && console.error) {\n console.error('Unable to locate global object, returning \"this\".');\n }\n return this;\n })();\n /**\n * @function copy\n *\n * @description\n * copy an value deeply as much as possible\n *\n * If `strict` is applied, then all properties (including non-enumerable ones)\n * are copied with their original property descriptors on both objects and arrays.\n *\n * The value is compared to the global constructors in the `realm` provided,\n * and the native constructor is always used to ensure that extensions of native\n * objects (allows in ES2015+) are maintained.\n *\n * @param value the value to copy\n * @param [options] the options for copying with\n * @param [options.isStrict] should the copy be strict\n * @param [options.realm] the realm (this) value the value is copied from\n * @returns the copied value\n */\n function copy(value, options) {\n // manually coalesced instead of default parameters for performance\n var isStrict = !!(options && options.isStrict);\n var realm = (options && options.realm) || GLOBAL_THIS;\n var getObjectClone = isStrict ? getObjectCloneStrict : getObjectCloneLoose;\n /**\n * @function handleCopy\n *\n * @description\n * copy the value recursively based on its type\n *\n * @param value the value to copy\n * @returns the copied value\n */\n var handleCopy = function (value, cache) {\n if (!value || typeof value !== 'object') {\n return value;\n }\n if (cache.has(value)) {\n return cache.get(value);\n }\n var prototype = value.__proto__ || getPrototypeOf(value);\n var Constructor = prototype && prototype.constructor;\n // plain objects\n if (!Constructor || Constructor === realm.Object) {\n return getObjectClone(value, realm, handleCopy, cache);\n }\n var clone;\n // arrays\n if (isArray(value)) {\n // if strict, include non-standard properties\n if (isStrict) {\n return getObjectCloneStrict(value, realm, handleCopy, cache);\n }\n clone = new Constructor();\n cache.set(value, clone);\n for (var index = 0, length_1 = value.length; index < length_1; ++index) {\n clone[index] = handleCopy(value[index], cache);\n }\n return clone;\n }\n // dates\n if (value instanceof realm.Date) {\n return new Constructor(value.getTime());\n }\n // regexps\n if (value instanceof realm.RegExp) {\n clone = new Constructor(value.source, value.flags || getRegExpFlags(value));\n clone.lastIndex = value.lastIndex;\n return clone;\n }\n // maps\n if (realm.Map && value instanceof realm.Map) {\n clone = new Constructor();\n cache.set(value, clone);\n value.forEach(function (value, key) {\n clone.set(key, handleCopy(value, cache));\n });\n return clone;\n }\n // sets\n if (realm.Set && value instanceof realm.Set) {\n clone = new Constructor();\n cache.set(value, clone);\n value.forEach(function (value) {\n clone.add(handleCopy(value, cache));\n });\n return clone;\n }\n // blobs\n if (realm.Blob && value instanceof realm.Blob) {\n return value.slice(0, value.size, value.type);\n }\n // buffers (node-only)\n if (realm.Buffer && realm.Buffer.isBuffer(value)) {\n clone = realm.Buffer.allocUnsafe\n ? realm.Buffer.allocUnsafe(value.length)\n : new Constructor(value.length);\n cache.set(value, clone);\n value.copy(clone);\n return clone;\n }\n // arraybuffers / dataviews\n if (realm.ArrayBuffer) {\n // dataviews\n if (realm.ArrayBuffer.isView(value)) {\n clone = new Constructor(value.buffer.slice(0));\n cache.set(value, clone);\n return clone;\n }\n // arraybuffers\n if (value instanceof realm.ArrayBuffer) {\n clone = value.slice(0);\n cache.set(value, clone);\n return clone;\n }\n }\n // if the value cannot / should not be cloned, don't\n if (\n // promise-like\n typeof value.then === 'function' ||\n // errors\n value instanceof Error ||\n // weakmaps\n (realm.WeakMap && value instanceof realm.WeakMap) ||\n // weaksets\n (realm.WeakSet && value instanceof realm.WeakSet)) {\n return value;\n }\n // assume anything left is a custom constructor\n return getObjectClone(value, realm, handleCopy, cache);\n };\n return handleCopy(value, createCache());\n }\n // Adding reference to allow usage in CommonJS libraries compiled using TSC, which\n // expects there to be a default property on the exported value. See\n // [#37](https://github.com/planttheidea/fast-copy/issues/37) for details.\n copy.default = copy;\n /**\n * @function strictCopy\n *\n * @description\n * copy the value with `strict` option pre-applied\n *\n * @param value the value to copy\n * @param [options] the options for copying with\n * @param [options.realm] the realm (this) value the value is copied from\n * @returns the copied value\n */\n copy.strict = function strictCopy(value, options) {\n return copy(value, {\n isStrict: true,\n realm: options ? options.realm : void 0,\n });\n };\n\n return copy;\n\n}));\n//# sourceMappingURL=fast-copy.js.map\n\n\n//# sourceURL=webpack://contentful/../node_modules/fast-copy/dist/fast-copy.js?");
|
|
497
|
+
"use strict";
|
|
498
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ validateLocaleParam: function() { return /* binding */ validateLocaleParam; },\n/* harmony export */ validateRemoveUnresolvedParam: function() { return /* binding */ validateRemoveUnresolvedParam; },\n/* harmony export */ validateResolveLinksParam: function() { return /* binding */ validateResolveLinksParam; }\n/* harmony export */ });\n/* harmony import */ var _validation_error__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./validation-error */ \"./utils/validation-error.ts\");\n\nfunction checkLocaleParamIsAll(query) {\n if (query.locale === '*') {\n throw new _validation_error__WEBPACK_IMPORTED_MODULE_0__.ValidationError('locale', `The use of locale='*' is no longer supported.To fetch an entry in all existing locales, \n use client.withAllLocales instead of the locale='*' parameter.`);\n }\n}\nfunction checkLocaleParamExists(query) {\n if (query.locale) {\n throw new _validation_error__WEBPACK_IMPORTED_MODULE_0__.ValidationError('locale', 'The `locale` parameter is not allowed');\n }\n}\nfunction validateLocaleParam(query, isWithAllLocalesClient) {\n if (isWithAllLocalesClient) {\n checkLocaleParamExists(query);\n }\n else {\n checkLocaleParamIsAll(query);\n }\n return;\n}\nfunction validateResolveLinksParam(query) {\n if ('resolveLinks' in query) {\n throw new _validation_error__WEBPACK_IMPORTED_MODULE_0__.ValidationError('resolveLinks', `The use of the 'resolveLinks' parameter is no longer supported. By default, links are resolved. \n If you do not want to resolve links, use client.withoutLinkResolution.`);\n }\n return;\n}\nfunction validateRemoveUnresolvedParam(query) {\n if ('removeUnresolved' in query) {\n throw new _validation_error__WEBPACK_IMPORTED_MODULE_0__.ValidationError('removeUnresolved', `The use of the 'removeUnresolved' parameter is no longer supported. By default, unresolved links are kept as link objects.\n If you do not want to include unresolved links, use client.withoutUnresolvableLinks.`);\n }\n return;\n}\n\n\n//# sourceURL=webpack://contentful/./utils/validate-params.ts?");
|
|
379
499
|
|
|
380
500
|
/***/ }),
|
|
381
501
|
|
|
382
|
-
/***/ "
|
|
383
|
-
|
|
384
|
-
!***
|
|
385
|
-
|
|
386
|
-
/***/ (function(
|
|
502
|
+
/***/ "./utils/validate-search-parameters.ts":
|
|
503
|
+
/*!*********************************************!*\
|
|
504
|
+
!*** ./utils/validate-search-parameters.ts ***!
|
|
505
|
+
\*********************************************/
|
|
506
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
387
507
|
|
|
388
|
-
|
|
508
|
+
"use strict";
|
|
509
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ validateSearchParameters; }\n/* harmony export */ });\nfunction validateSearchParameters(query) {\n for (const key in query) {\n const value = query[key];\n // We don’t allow any objects as values for query parameters\n if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\n throw new Error(`Objects are not supported as value for the \"${key}\" query parameter.`);\n }\n }\n}\n\n\n//# sourceURL=webpack://contentful/./utils/validate-search-parameters.ts?");
|
|
389
510
|
|
|
390
511
|
/***/ }),
|
|
391
512
|
|
|
392
|
-
/***/ "
|
|
393
|
-
|
|
394
|
-
!***
|
|
395
|
-
|
|
396
|
-
/***/ (function(
|
|
513
|
+
/***/ "./utils/validate-timestamp.ts":
|
|
514
|
+
/*!*************************************!*\
|
|
515
|
+
!*** ./utils/validate-timestamp.ts ***!
|
|
516
|
+
\*************************************/
|
|
517
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
397
518
|
|
|
398
|
-
|
|
519
|
+
"use strict";
|
|
520
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ validateTimestamp; }\n/* harmony export */ });\n/* harmony import */ var _validation_error__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./validation-error */ \"./utils/validation-error.ts\");\n\nfunction validateTimestamp(name, timestamp, options) {\n options = options || {};\n if (typeof timestamp !== 'number') {\n throw new _validation_error__WEBPACK_IMPORTED_MODULE_0__.ValidationError(name, `only numeric values are allowed for timestamps, provided type was \"${typeof timestamp}\"`);\n }\n if (options.maximum && timestamp > options.maximum) {\n throw new _validation_error__WEBPACK_IMPORTED_MODULE_0__.ValidationError(name, `value (${timestamp}) cannot be further in the future than expected maximum (${options.maximum})`);\n }\n if (options.now && timestamp < options.now) {\n throw new _validation_error__WEBPACK_IMPORTED_MODULE_0__.ValidationError(name, `value (${timestamp}) cannot be in the past, current time was ${options.now}`);\n }\n}\n\n\n//# sourceURL=webpack://contentful/./utils/validate-timestamp.ts?");
|
|
399
521
|
|
|
400
522
|
/***/ }),
|
|
401
523
|
|
|
402
|
-
/***/ "
|
|
403
|
-
|
|
404
|
-
!***
|
|
405
|
-
|
|
406
|
-
/***/ (function(
|
|
524
|
+
/***/ "./utils/validation-error.ts":
|
|
525
|
+
/*!***********************************!*\
|
|
526
|
+
!*** ./utils/validation-error.ts ***!
|
|
527
|
+
\***********************************/
|
|
528
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
407
529
|
|
|
408
|
-
|
|
530
|
+
"use strict";
|
|
531
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ValidationError: function() { return /* binding */ ValidationError; }\n/* harmony export */ });\nclass ValidationError extends Error {\n constructor(name, message) {\n super(`Invalid \"${name}\" provided, ` + message);\n this.name = 'ValidationError';\n }\n}\n\n\n//# sourceURL=webpack://contentful/./utils/validation-error.ts?");
|
|
409
532
|
|
|
410
533
|
/***/ }),
|
|
411
534
|
|
|
412
|
-
/***/ "../node_modules/
|
|
413
|
-
|
|
414
|
-
!*** ../node_modules/
|
|
415
|
-
|
|
416
|
-
/***/ (function(
|
|
535
|
+
/***/ "../node_modules/axios/lib/adapters/adapters.js":
|
|
536
|
+
/*!******************************************************!*\
|
|
537
|
+
!*** ../node_modules/axios/lib/adapters/adapters.js ***!
|
|
538
|
+
\******************************************************/
|
|
539
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
417
540
|
|
|
418
541
|
"use strict";
|
|
419
|
-
eval("
|
|
542
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _http_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./http.js */ \"../node_modules/axios/lib/helpers/null.js\");\n/* harmony import */ var _xhr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./xhr.js */ \"../node_modules/axios/lib/adapters/xhr.js\");\n/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/AxiosError.js */ \"../node_modules/axios/lib/core/AxiosError.js\");\n\n\n\n\n\nconst knownAdapters = {\n http: _http_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n xhr: _xhr_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n}\n\n_utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].forEach(knownAdapters, (fn, value) => {\n if(fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n getAdapter: (adapters) => {\n adapters = _utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n if((adapter = _utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].isString(nameOrAdapter) ? knownAdapters[nameOrAdapter.toLowerCase()] : nameOrAdapter)) {\n break;\n }\n }\n\n if (!adapter) {\n if (adapter === false) {\n throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"](\n `Adapter ${nameOrAdapter} is not supported by the environment`,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n throw new Error(\n _utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].hasOwnProp(knownAdapters, nameOrAdapter) ?\n `Adapter '${nameOrAdapter}' is not available in the build` :\n `Unknown adapter '${nameOrAdapter}'`\n );\n }\n\n if (!_utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].isFunction(adapter)) {\n throw new TypeError('adapter is not a function');\n }\n\n return adapter;\n },\n adapters: knownAdapters\n});\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/adapters/adapters.js?");
|
|
420
543
|
|
|
421
544
|
/***/ }),
|
|
422
545
|
|
|
423
|
-
/***/ "
|
|
424
|
-
|
|
425
|
-
!***
|
|
426
|
-
|
|
427
|
-
/***/ (function(
|
|
546
|
+
/***/ "../node_modules/axios/lib/adapters/xhr.js":
|
|
547
|
+
/*!*************************************************!*\
|
|
548
|
+
!*** ../node_modules/axios/lib/adapters/xhr.js ***!
|
|
549
|
+
\*************************************************/
|
|
550
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
428
551
|
|
|
429
552
|
"use strict";
|
|
430
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createClient: function() { return /* binding */ createClient; }\n/* harmony export */ });\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! axios */ \"../node_modules/axios/index.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ \"../node_modules/contentful-sdk-core/dist/index.es-modules.js\");\n/* harmony import */ var _create_global_options__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./create-global-options */ \"./create-global-options.ts\");\n/* harmony import */ var _make_client__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./make-client */ \"./make-client.ts\");\n/* harmony import */ var _utils_validate_params__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/validate-params */ \"./utils/validate-params.ts\");\n/**\n * Contentful Delivery API SDK. Allows you to create instances of a client\n * with access to the Contentful Content Delivery API.\n */\n\n\n\n\n\n/**\n * Create a client instance\n * @param params - Client initialization parameters\n * @category Client\n * @example\n * ```typescript\n * const contentful = require('contentful')\n * const client = contentful.createClient({\n * accessToken: 'myAccessToken',\n * space: 'mySpaceId'\n * })\n * ```\n */\nfunction createClient(params) {\n if (!params.accessToken) {\n throw new TypeError('Expected parameter accessToken');\n }\n if (!params.space) {\n throw new TypeError('Expected parameter space');\n }\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_4__.validateResolveLinksParam)(params);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_4__.validateRemoveUnresolvedParam)(params);\n const defaultConfig = {\n resolveLinks: true,\n removeUnresolved: false,\n defaultHostname: 'cdn.contentful.com',\n environment: 'master',\n };\n const config = {\n ...defaultConfig,\n ...params,\n };\n const userAgentHeader = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__.getUserAgentHeader)(`contentful.js/${\"10.3.7\"}`, config.application, config.integration);\n config.headers = {\n ...config.headers,\n 'Content-Type': 'application/vnd.contentful.delivery.v1+json',\n 'X-Contentful-User-Agent': userAgentHeader,\n };\n const http = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__.createHttpClient)((axios__WEBPACK_IMPORTED_MODULE_0___default()), config);\n if (!http.defaults.baseURL) {\n throw new Error('Please define a baseURL');\n }\n const getGlobalOptions = (0,_create_global_options__WEBPACK_IMPORTED_MODULE_2__.createGlobalOptions)({\n space: config.space,\n environment: config.environment,\n spaceBaseUrl: http.defaults.baseURL,\n environmentBaseUrl: `${http.defaults.baseURL}environments/${config.environment}`,\n });\n // Append environment to baseURL\n http.defaults.baseURL = getGlobalOptions({}).environmentBaseUrl;\n return (0,_make_client__WEBPACK_IMPORTED_MODULE_3__.makeClient)({\n http,\n getGlobalOptions,\n });\n}\n\n\n//# sourceURL=webpack://contentful/./contentful.ts?");
|
|
553
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../core/settle.js */ \"../node_modules/axios/lib/core/settle.js\");\n/* harmony import */ var _helpers_cookies_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./../helpers/cookies.js */ \"../node_modules/axios/lib/helpers/cookies.js\");\n/* harmony import */ var _helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../helpers/buildURL.js */ \"../node_modules/axios/lib/helpers/buildURL.js\");\n/* harmony import */ var _core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/buildFullPath.js */ \"../node_modules/axios/lib/core/buildFullPath.js\");\n/* harmony import */ var _helpers_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./../helpers/isURLSameOrigin.js */ \"../node_modules/axios/lib/helpers/isURLSameOrigin.js\");\n/* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../defaults/transitional.js */ \"../node_modules/axios/lib/defaults/transitional.js\");\n/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/AxiosError.js */ \"../node_modules/axios/lib/core/AxiosError.js\");\n/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../cancel/CanceledError.js */ \"../node_modules/axios/lib/cancel/CanceledError.js\");\n/* harmony import */ var _helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../helpers/parseProtocol.js */ \"../node_modules/axios/lib/helpers/parseProtocol.js\");\n/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../platform/index.js */ \"../node_modules/axios/lib/platform/browser/index.js\");\n/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ \"../node_modules/axios/lib/core/AxiosHeaders.js\");\n/* harmony import */ var _helpers_speedometer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/speedometer.js */ \"../node_modules/axios/lib/helpers/speedometer.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = (0,_helpers_speedometer_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].from(config.headers).normalize();\n const responseType = config.responseType;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n if (_utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].isFormData(requestData)) {\n if (_platform_index_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].isStandardBrowserEnv || _platform_index_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].isStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else {\n requestHeaders.setContentType('multipart/form-data;', false); // mobile/desktop app frameworks\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = (0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), (0,_helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]('Request aborted', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"];\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ETIMEDOUT : _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (_platform_index_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].isStandardBrowserEnv) {\n // Add xsrf header\n const xsrfValue = (config.withCredentials || (0,_helpers_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(fullPath))\n && config.xsrfCookieName && _helpers_cookies_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"].read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n _utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!_utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"](null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(fullPath);\n\n if (protocol && _platform_index_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].protocols.indexOf(protocol) === -1) {\n reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]('Unsupported protocol ' + protocol + ':', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n});\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/adapters/xhr.js?");
|
|
431
554
|
|
|
432
555
|
/***/ }),
|
|
433
556
|
|
|
434
|
-
/***/ "
|
|
435
|
-
|
|
436
|
-
!***
|
|
437
|
-
|
|
438
|
-
/***/ (function(
|
|
557
|
+
/***/ "../node_modules/axios/lib/axios.js":
|
|
558
|
+
/*!******************************************!*\
|
|
559
|
+
!*** ../node_modules/axios/lib/axios.js ***!
|
|
560
|
+
\******************************************/
|
|
561
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
439
562
|
|
|
440
563
|
"use strict";
|
|
441
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ createContentfulApi; }\n/* harmony export */ });\n/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! contentful-sdk-core */ \"../node_modules/contentful-sdk-core/dist/index.es-modules.js\");\n/* harmony import */ var _paged_sync__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./paged-sync */ \"./paged-sync.ts\");\n/* harmony import */ var _utils_normalize_search_parameters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/normalize-search-parameters */ \"./utils/normalize-search-parameters.ts\");\n/* harmony import */ var _utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/normalize-select */ \"./utils/normalize-select.ts\");\n/* harmony import */ var _utils_resolve_circular__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/resolve-circular */ \"./utils/resolve-circular.ts\");\n/* harmony import */ var _utils_validate_timestamp__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/validate-timestamp */ \"./utils/validate-timestamp.ts\");\n/* harmony import */ var _utils_validate_params__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/validate-params */ \"./utils/validate-params.ts\");\n/* harmony import */ var _utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/validate-search-parameters */ \"./utils/validate-search-parameters.ts\");\n/**\n * Contentful Delivery API Client. Contains methods which allow access to the\n * different kinds of entities present in Contentful (Entries, Assets, etc).\n */\n\n\n\n\n\n\n\n\nconst ASSET_KEY_MAX_LIFETIME = 48 * 60 * 60;\nclass NotFoundError extends Error {\n sys;\n details;\n constructor(id, environment, space) {\n super('The resource could not be found.');\n this.sys = {\n type: 'Error',\n id: 'NotFound',\n };\n this.details = {\n type: 'Entry',\n id,\n environment,\n space,\n };\n }\n}\nfunction createContentfulApi({ http, getGlobalOptions }, options) {\n const notFoundError = (id = 'unknown') => {\n return new NotFoundError(id, getGlobalOptions().environment, getGlobalOptions().space);\n };\n const getBaseUrl = (context) => {\n let baseUrl = context === 'space' ? getGlobalOptions().spaceBaseUrl : getGlobalOptions().environmentBaseUrl;\n if (!baseUrl) {\n throw new Error('Please define baseUrl for ' + context);\n }\n if (!baseUrl.endsWith('/')) {\n baseUrl += '/';\n }\n return baseUrl;\n };\n async function get({ context, path, config }) {\n const baseUrl = getBaseUrl(context);\n try {\n const response = await http.get(baseUrl + path, config);\n return response.data;\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function post({ context, path, data, config }) {\n const baseUrl = getBaseUrl(context);\n try {\n const response = await http.post(baseUrl + path, data, config);\n return response.data;\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function getSpace() {\n return get({ context: 'space', path: '' });\n }\n async function getContentType(id) {\n return get({\n context: 'environment',\n path: `content_types/${id}`,\n });\n }\n async function getContentTypes(query = {}) {\n return get({\n context: 'environment',\n path: 'content_types',\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query }),\n });\n }\n async function getEntry(id, query = {}) {\n return makeGetEntry(id, query, options);\n }\n async function getEntries(query = {}) {\n return makeGetEntries(query, options);\n }\n async function makeGetEntry(id, query, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n const { withAllLocales } = options;\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateLocaleParam)(query, withAllLocales);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateResolveLinksParam)(query);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateRemoveUnresolvedParam)(query);\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n return internalGetEntry(id, withAllLocales ? { ...query, locale: '*' } : query, options);\n }\n async function internalGetEntry(id, query, options) {\n if (!id) {\n throw notFoundError(id);\n }\n try {\n const response = await internalGetEntries({ 'sys.id': id, ...query }, options);\n if (response.items.length > 0) {\n return response.items[0];\n }\n else {\n throw notFoundError(id);\n }\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function makeGetEntries(query, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n const { withAllLocales } = options;\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateLocaleParam)(query, withAllLocales);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateResolveLinksParam)(query);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateRemoveUnresolvedParam)(query);\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n return internalGetEntries(withAllLocales\n ? {\n ...query,\n locale: '*',\n }\n : query, options);\n }\n async function internalGetEntries(query, options) {\n const { withoutLinkResolution, withoutUnresolvableLinks } = options;\n try {\n const entries = await get({\n context: 'environment',\n path: 'entries',\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query: (0,_utils_normalize_search_parameters__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(query)) }),\n });\n return (0,_utils_resolve_circular__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(entries, {\n resolveLinks: !withoutLinkResolution ?? true,\n removeUnresolved: withoutUnresolvableLinks ?? false,\n });\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function getAsset(id, query = {}) {\n return makeGetAsset(id, query, options);\n }\n async function getAssets(query = {}) {\n return makeGetAssets(query, options);\n }\n async function makeGetAssets(query, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n const { withAllLocales } = options;\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateLocaleParam)(query, withAllLocales);\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n const localeSpecificQuery = withAllLocales ? { ...query, locale: '*' } : query;\n return internalGetAssets(localeSpecificQuery);\n }\n async function internalGetAsset(id, query) {\n try {\n return get({\n context: 'environment',\n path: `assets/${id}`,\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query: (0,_utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(query) }),\n });\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function makeGetAsset(id, query, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n const { withAllLocales } = options;\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateLocaleParam)(query, withAllLocales);\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n const localeSpecificQuery = withAllLocales ? { ...query, locale: '*' } : query;\n return internalGetAsset(id, localeSpecificQuery);\n }\n async function internalGetAssets(query) {\n try {\n return get({\n context: 'environment',\n path: 'assets',\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query: (0,_utils_normalize_search_parameters__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(query)) }),\n });\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function getTag(id) {\n return get({\n context: 'environment',\n path: `tags/${id}`,\n });\n }\n async function getTags(query = {}) {\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n return get({\n context: 'environment',\n path: 'tags',\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query: (0,_utils_normalize_search_parameters__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(query)) }),\n });\n }\n async function createAssetKey(expiresAt) {\n try {\n const now = Math.floor(Date.now() / 1000);\n const currentMaxLifetime = now + ASSET_KEY_MAX_LIFETIME;\n (0,_utils_validate_timestamp__WEBPACK_IMPORTED_MODULE_5__[\"default\"])('expiresAt', expiresAt, { maximum: currentMaxLifetime, now });\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n return post({\n context: 'environment',\n path: 'asset_keys',\n data: { expiresAt },\n });\n }\n async function getLocales(query = {}) {\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n return get({\n context: 'environment',\n path: 'locales',\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query: (0,_utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(query) }),\n });\n }\n async function sync(query, syncOptions = { paginate: true }) {\n return makePagedSync(query, syncOptions, options);\n }\n async function makePagedSync(query, syncOptions, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateResolveLinksParam)(query);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateRemoveUnresolvedParam)(query);\n const combinedOptions = {\n ...syncOptions,\n ...options,\n };\n switchToEnvironment(http);\n return (0,_paged_sync__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(http, query, combinedOptions);\n }\n function parseEntries(data) {\n return makeParseEntries(data, options);\n }\n function makeParseEntries(data, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n return internalParseEntries(data, options);\n }\n function internalParseEntries(data, options) {\n const { withoutLinkResolution, withoutUnresolvableLinks } = options;\n return (0,_utils_resolve_circular__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(data, {\n resolveLinks: !withoutLinkResolution ?? true,\n removeUnresolved: withoutUnresolvableLinks ?? false,\n });\n }\n /*\n * Switches BaseURL to use /environments path\n * */\n function switchToEnvironment(http) {\n http.defaults.baseURL = getGlobalOptions().environmentBaseUrl;\n }\n return {\n version: \"10.3.7\",\n getSpace,\n getContentType,\n getContentTypes,\n getAsset,\n getAssets,\n getTag,\n getTags,\n getLocales,\n parseEntries,\n sync,\n getEntry,\n getEntries,\n createAssetKey,\n };\n}\n\n\n//# sourceURL=webpack://contentful/./create-contentful-api.ts?");
|
|
564
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers/bind.js */ \"../node_modules/axios/lib/helpers/bind.js\");\n/* harmony import */ var _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/Axios.js */ \"../node_modules/axios/lib/core/Axios.js\");\n/* harmony import */ var _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./core/mergeConfig.js */ \"../node_modules/axios/lib/core/mergeConfig.js\");\n/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./defaults/index.js */ \"../node_modules/axios/lib/defaults/index.js\");\n/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./helpers/formDataToJSON.js */ \"../node_modules/axios/lib/helpers/formDataToJSON.js\");\n/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cancel/CanceledError.js */ \"../node_modules/axios/lib/cancel/CanceledError.js\");\n/* harmony import */ var _cancel_CancelToken_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cancel/CancelToken.js */ \"../node_modules/axios/lib/cancel/CancelToken.js\");\n/* harmony import */ var _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cancel/isCancel.js */ \"../node_modules/axios/lib/cancel/isCancel.js\");\n/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./env/data.js */ \"../node_modules/axios/lib/env/data.js\");\n/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./helpers/toFormData.js */ \"../node_modules/axios/lib/helpers/toFormData.js\");\n/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./core/AxiosError.js */ \"../node_modules/axios/lib/core/AxiosError.js\");\n/* harmony import */ var _helpers_spread_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers/spread.js */ \"../node_modules/axios/lib/helpers/spread.js\");\n/* harmony import */ var _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./helpers/isAxiosError.js */ \"../node_modules/axios/lib/helpers/isAxiosError.js\");\n/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./core/AxiosHeaders.js */ \"../node_modules/axios/lib/core/AxiosHeaders.js\");\n/* harmony import */ var _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./helpers/HttpStatusCode.js */ \"../node_modules/axios/lib/helpers/HttpStatusCode.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](defaultConfig);\n const instance = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_core_Axios_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].prototype.request, context);\n\n // Copy axios.prototype to instance\n _utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].extend(instance, _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n _utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance((0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(_defaults_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\n\n// Expose Cancel & CancelToken\naxios.CanceledError = _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"];\naxios.CancelToken = _cancel_CancelToken_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"];\naxios.isCancel = _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\naxios.VERSION = _env_data_js__WEBPACK_IMPORTED_MODULE_8__.VERSION;\naxios.toFormData = _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"];\n\n// Expose AxiosError class\naxios.AxiosError = _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"];\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = _helpers_spread_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"];\n\n// Expose isAxiosError\naxios.isAxiosError = _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"];\n\n// Expose mergeConfig\naxios.mergeConfig = _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n\naxios.AxiosHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"];\n\naxios.formToJSON = thing => (0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"])(_utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.HttpStatusCode = _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"];\n\naxios.default = axios;\n\n// this module should only have a default export\n/* harmony default export */ __webpack_exports__[\"default\"] = (axios);\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/axios.js?");
|
|
442
565
|
|
|
443
566
|
/***/ }),
|
|
444
567
|
|
|
445
|
-
/***/ "
|
|
446
|
-
|
|
447
|
-
!***
|
|
448
|
-
|
|
449
|
-
/***/ (function(
|
|
568
|
+
/***/ "../node_modules/axios/lib/cancel/CancelToken.js":
|
|
569
|
+
/*!*******************************************************!*\
|
|
570
|
+
!*** ../node_modules/axios/lib/cancel/CancelToken.js ***!
|
|
571
|
+
\*******************************************************/
|
|
572
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
450
573
|
|
|
451
574
|
"use strict";
|
|
452
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony
|
|
575
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CanceledError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CanceledError.js */ \"../node_modules/axios/lib/cancel/CanceledError.js\");\n\n\n\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new _CanceledError_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (CancelToken);\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/cancel/CancelToken.js?");
|
|
453
576
|
|
|
454
577
|
/***/ }),
|
|
455
578
|
|
|
456
|
-
/***/ "
|
|
457
|
-
|
|
458
|
-
!***
|
|
459
|
-
|
|
460
|
-
/***/ (function(
|
|
579
|
+
/***/ "../node_modules/axios/lib/cancel/CanceledError.js":
|
|
580
|
+
/*!*********************************************************!*\
|
|
581
|
+
!*** ../node_modules/axios/lib/cancel/CanceledError.js ***!
|
|
582
|
+
\*********************************************************/
|
|
583
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
461
584
|
|
|
462
585
|
"use strict";
|
|
463
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony
|
|
586
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/AxiosError.js */ \"../node_modules/axios/lib/core/AxiosError.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ \"../node_modules/axios/lib/utils.js\");\n\n\n\n\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].call(this, message == null ? 'canceled' : message, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\n_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].inherits(CanceledError, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"], {\n __CANCEL__: true\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (CanceledError);\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/cancel/CanceledError.js?");
|
|
464
587
|
|
|
465
588
|
/***/ }),
|
|
466
589
|
|
|
467
|
-
/***/ "
|
|
468
|
-
|
|
469
|
-
!***
|
|
470
|
-
|
|
471
|
-
/***/ (function(
|
|
590
|
+
/***/ "../node_modules/axios/lib/cancel/isCancel.js":
|
|
591
|
+
/*!****************************************************!*\
|
|
592
|
+
!*** ../node_modules/axios/lib/cancel/isCancel.js ***!
|
|
593
|
+
\****************************************************/
|
|
594
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
472
595
|
|
|
473
596
|
"use strict";
|
|
474
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */
|
|
597
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ isCancel; }\n/* harmony export */ });\n\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/cancel/isCancel.js?");
|
|
475
598
|
|
|
476
599
|
/***/ }),
|
|
477
600
|
|
|
478
|
-
/***/ "
|
|
479
|
-
|
|
480
|
-
!***
|
|
481
|
-
|
|
482
|
-
/***/ (function(
|
|
601
|
+
/***/ "../node_modules/axios/lib/core/Axios.js":
|
|
602
|
+
/*!***********************************************!*\
|
|
603
|
+
!*** ../node_modules/axios/lib/core/Axios.js ***!
|
|
604
|
+
\***********************************************/
|
|
605
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
483
606
|
|
|
484
607
|
"use strict";
|
|
485
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony
|
|
608
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../helpers/buildURL.js */ \"../node_modules/axios/lib/helpers/buildURL.js\");\n/* harmony import */ var _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InterceptorManager.js */ \"../node_modules/axios/lib/core/InterceptorManager.js\");\n/* harmony import */ var _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dispatchRequest.js */ \"../node_modules/axios/lib/core/dispatchRequest.js\");\n/* harmony import */ var _mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mergeConfig.js */ \"../node_modules/axios/lib/core/mergeConfig.js\");\n/* harmony import */ var _buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./buildFullPath.js */ \"../node_modules/axios/lib/core/buildFullPath.js\");\n/* harmony import */ var _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/validator.js */ \"../node_modules/axios/lib/helpers/validator.js\");\n/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AxiosHeaders.js */ \"../node_modules/axios/lib/core/AxiosHeaders.js\");\n\n\n\n\n\n\n\n\n\n\n\nconst validators = _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"](),\n response: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (_utils_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n let contextHeaders;\n\n // Flatten headers\n contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].merge(\n headers.common,\n headers[config.method]\n );\n\n contextHeaders && _utils_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [_dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"].bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"].call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this.defaults, config);\n const fullPath = (0,_buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(config.baseURL, config.url);\n return (0,_helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\n_utils_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request((0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\n_utils_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request((0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Axios);\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/core/Axios.js?");
|
|
486
609
|
|
|
487
610
|
/***/ }),
|
|
488
611
|
|
|
489
|
-
/***/ "
|
|
490
|
-
|
|
491
|
-
!***
|
|
492
|
-
|
|
493
|
-
/***/ (function(
|
|
612
|
+
/***/ "../node_modules/axios/lib/core/AxiosError.js":
|
|
613
|
+
/*!****************************************************!*\
|
|
614
|
+
!*** ../node_modules/axios/lib/core/AxiosError.js ***!
|
|
615
|
+
\****************************************************/
|
|
616
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
494
617
|
|
|
495
618
|
"use strict";
|
|
496
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony
|
|
619
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ \"../node_modules/axios/lib/utils.js\");\n\n\n\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\n_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AxiosError);\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/core/AxiosError.js?");
|
|
497
620
|
|
|
498
621
|
/***/ }),
|
|
499
622
|
|
|
500
|
-
/***/ "
|
|
501
|
-
|
|
502
|
-
!***
|
|
503
|
-
|
|
504
|
-
/***/ (function(
|
|
623
|
+
/***/ "../node_modules/axios/lib/core/AxiosHeaders.js":
|
|
624
|
+
/*!******************************************************!*\
|
|
625
|
+
!*** ../node_modules/axios/lib/core/AxiosHeaders.js ***!
|
|
626
|
+
\******************************************************/
|
|
627
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
505
628
|
|
|
506
629
|
"use strict";
|
|
507
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
630
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/parseHeaders.js */ \"../node_modules/axios/lib/helpers/parseHeaders.js\");\n\n\n\n\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isString(value)) return;\n\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders((0,_helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].forEach(this, (value, header) => {\n const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].freezeMethods(AxiosHeaders.prototype);\n_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].freezeMethods(AxiosHeaders);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AxiosHeaders);\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/core/AxiosHeaders.js?");
|
|
508
631
|
|
|
509
632
|
/***/ }),
|
|
510
633
|
|
|
511
|
-
/***/ "
|
|
512
|
-
|
|
513
|
-
!***
|
|
514
|
-
|
|
515
|
-
/***/ (function(
|
|
634
|
+
/***/ "../node_modules/axios/lib/core/InterceptorManager.js":
|
|
635
|
+
/*!************************************************************!*\
|
|
636
|
+
!*** ../node_modules/axios/lib/core/InterceptorManager.js ***!
|
|
637
|
+
\************************************************************/
|
|
638
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
516
639
|
|
|
517
640
|
"use strict";
|
|
518
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
641
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ \"../node_modules/axios/lib/utils.js\");\n\n\n\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (InterceptorManager);\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/core/InterceptorManager.js?");
|
|
519
642
|
|
|
520
643
|
/***/ }),
|
|
521
644
|
|
|
522
|
-
/***/ "
|
|
523
|
-
|
|
524
|
-
!***
|
|
525
|
-
|
|
526
|
-
/***/ (function(
|
|
645
|
+
/***/ "../node_modules/axios/lib/core/buildFullPath.js":
|
|
646
|
+
/*!*******************************************************!*\
|
|
647
|
+
!*** ../node_modules/axios/lib/core/buildFullPath.js ***!
|
|
648
|
+
\*******************************************************/
|
|
649
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
527
650
|
|
|
528
651
|
"use strict";
|
|
529
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
652
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ buildFullPath; }\n/* harmony export */ });\n/* harmony import */ var _helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/isAbsoluteURL.js */ \"../node_modules/axios/lib/helpers/isAbsoluteURL.js\");\n/* harmony import */ var _helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/combineURLs.js */ \"../node_modules/axios/lib/helpers/combineURLs.js\");\n\n\n\n\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(requestedURL)) {\n return (0,_helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/core/buildFullPath.js?");
|
|
530
653
|
|
|
531
654
|
/***/ }),
|
|
532
655
|
|
|
533
|
-
/***/ "
|
|
534
|
-
|
|
535
|
-
!***
|
|
536
|
-
|
|
537
|
-
/***/ (function(
|
|
538
|
-
|
|
656
|
+
/***/ "../node_modules/axios/lib/core/dispatchRequest.js":
|
|
657
|
+
/*!*********************************************************!*\
|
|
658
|
+
!*** ../node_modules/axios/lib/core/dispatchRequest.js ***!
|
|
659
|
+
\*********************************************************/
|
|
660
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
661
|
+
|
|
539
662
|
"use strict";
|
|
540
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
663
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ dispatchRequest; }\n/* harmony export */ });\n/* harmony import */ var _transformData_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transformData.js */ \"../node_modules/axios/lib/core/transformData.js\");\n/* harmony import */ var _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../cancel/isCancel.js */ \"../node_modules/axios/lib/cancel/isCancel.js\");\n/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../defaults/index.js */ \"../node_modules/axios/lib/defaults/index.js\");\n/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cancel/CanceledError.js */ \"../node_modules/axios/lib/cancel/CanceledError.js\");\n/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ \"../node_modules/axios/lib/core/AxiosHeaders.js\");\n/* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../adapters/adapters.js */ \"../node_modules/axios/lib/adapters/adapters.js\");\n\n\n\n\n\n\n\n\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].from(config.headers);\n\n // Transform request data\n config.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getAdapter(config.adapter || _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!(0,_cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/core/dispatchRequest.js?");
|
|
541
664
|
|
|
542
665
|
/***/ }),
|
|
543
666
|
|
|
544
|
-
/***/ "
|
|
545
|
-
|
|
546
|
-
!***
|
|
547
|
-
|
|
548
|
-
/***/ (function(
|
|
667
|
+
/***/ "../node_modules/axios/lib/core/mergeConfig.js":
|
|
668
|
+
/*!*****************************************************!*\
|
|
669
|
+
!*** ../node_modules/axios/lib/core/mergeConfig.js ***!
|
|
670
|
+
\*****************************************************/
|
|
671
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
549
672
|
|
|
550
673
|
"use strict";
|
|
551
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
674
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ mergeConfig; }\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxiosHeaders.js */ \"../node_modules/axios/lib/core/AxiosHeaders.js\");\n\n\n\n\n\nconst headersToObject = (thing) => thing instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isPlainObject(source)) {\n return _utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].merge.call({caseless}, target, source);\n } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isPlainObject(source)) {\n return _utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].merge({}, source);\n } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n _utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/core/mergeConfig.js?");
|
|
552
675
|
|
|
553
676
|
/***/ }),
|
|
554
677
|
|
|
555
|
-
/***/ "
|
|
556
|
-
|
|
557
|
-
!***
|
|
558
|
-
|
|
559
|
-
/***/ (function(
|
|
678
|
+
/***/ "../node_modules/axios/lib/core/settle.js":
|
|
679
|
+
/*!************************************************!*\
|
|
680
|
+
!*** ../node_modules/axios/lib/core/settle.js ***!
|
|
681
|
+
\************************************************/
|
|
682
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
560
683
|
|
|
561
684
|
"use strict";
|
|
562
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony
|
|
685
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ settle; }\n/* harmony export */ });\n/* harmony import */ var _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxiosError.js */ \"../node_modules/axios/lib/core/AxiosError.js\");\n\n\n\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"](\n 'Request failed with status code ' + response.status,\n [_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].ERR_BAD_REQUEST, _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/core/settle.js?");
|
|
563
686
|
|
|
564
687
|
/***/ }),
|
|
565
688
|
|
|
566
|
-
/***/ "
|
|
567
|
-
|
|
568
|
-
!***
|
|
569
|
-
|
|
570
|
-
/***/ (function(
|
|
689
|
+
/***/ "../node_modules/axios/lib/core/transformData.js":
|
|
690
|
+
/*!*******************************************************!*\
|
|
691
|
+
!*** ../node_modules/axios/lib/core/transformData.js ***!
|
|
692
|
+
\*******************************************************/
|
|
693
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
571
694
|
|
|
572
695
|
"use strict";
|
|
573
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
696
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ transformData; }\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../defaults/index.js */ \"../node_modules/axios/lib/defaults/index.js\");\n/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ \"../node_modules/axios/lib/core/AxiosHeaders.js\");\n\n\n\n\n\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || _defaults_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\n const context = response || config;\n const headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].from(context.headers);\n let data = context.data;\n\n _utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/core/transformData.js?");
|
|
574
697
|
|
|
575
698
|
/***/ }),
|
|
576
699
|
|
|
577
|
-
/***/ "
|
|
578
|
-
|
|
579
|
-
!***
|
|
580
|
-
|
|
581
|
-
/***/ (function(
|
|
700
|
+
/***/ "../node_modules/axios/lib/defaults/index.js":
|
|
701
|
+
/*!***************************************************!*\
|
|
702
|
+
!*** ../node_modules/axios/lib/defaults/index.js ***!
|
|
703
|
+
\***************************************************/
|
|
704
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
582
705
|
|
|
583
706
|
"use strict";
|
|
584
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
707
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/AxiosError.js */ \"../node_modules/axios/lib/core/AxiosError.js\");\n/* harmony import */ var _transitional_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transitional.js */ \"../node_modules/axios/lib/defaults/transitional.js\");\n/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/toFormData.js */ \"../node_modules/axios/lib/helpers/toFormData.js\");\n/* harmony import */ var _helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/toURLEncodedForm.js */ \"../node_modules/axios/lib/helpers/toURLEncodedForm.js\");\n/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../platform/index.js */ \"../node_modules/axios/lib/platform/browser/index.js\");\n/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../helpers/formDataToJSON.js */ \"../node_modules/axios/lib/helpers/formDataToJSON.js\");\n\n\n\n\n\n\n\n\n\n\nconst DEFAULT_CONTENT_TYPE = {\n 'Content-Type': undefined\n};\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: _transitional_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isObject(data);\n\n if (isObjectPayload && _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isFormData(data);\n\n if (isFormData) {\n if (!hasJSONContentType) {\n return data;\n }\n return hasJSONContentType ? JSON.stringify((0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(data)) : data;\n }\n\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isArrayBuffer(data) ||\n _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isBuffer(data) ||\n _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isStream(data) ||\n _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isFile(data) ||\n _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isBlob(data)\n ) {\n return data;\n }\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isArrayBufferView(data)) {\n return data.buffer;\n }\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(data, this.formSerializer).toString();\n }\n\n if ((isFileList = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return (0,_helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"].ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: _platform_index_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].classes.FormData,\n Blob: _platform_index_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n }\n};\n\n_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\n_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].merge(DEFAULT_CONTENT_TYPE);\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (defaults);\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/defaults/index.js?");
|
|
585
708
|
|
|
586
709
|
/***/ }),
|
|
587
710
|
|
|
588
|
-
/***/ "
|
|
589
|
-
|
|
590
|
-
!***
|
|
591
|
-
|
|
592
|
-
/***/ (function(
|
|
711
|
+
/***/ "../node_modules/axios/lib/defaults/transitional.js":
|
|
712
|
+
/*!**********************************************************!*\
|
|
713
|
+
!*** ../node_modules/axios/lib/defaults/transitional.js ***!
|
|
714
|
+
\**********************************************************/
|
|
715
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
593
716
|
|
|
594
717
|
"use strict";
|
|
595
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
718
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n});\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/defaults/transitional.js?");
|
|
596
719
|
|
|
597
720
|
/***/ }),
|
|
598
721
|
|
|
599
|
-
/***/ "
|
|
600
|
-
|
|
601
|
-
!***
|
|
602
|
-
|
|
603
|
-
/***/ (function(
|
|
722
|
+
/***/ "../node_modules/axios/lib/env/data.js":
|
|
723
|
+
/*!*********************************************!*\
|
|
724
|
+
!*** ../node_modules/axios/lib/env/data.js ***!
|
|
725
|
+
\*********************************************/
|
|
726
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
604
727
|
|
|
605
728
|
"use strict";
|
|
606
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
729
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ VERSION: function() { return /* binding */ VERSION; }\n/* harmony export */ });\nconst VERSION = \"1.4.0\";\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/env/data.js?");
|
|
607
730
|
|
|
608
731
|
/***/ }),
|
|
609
732
|
|
|
610
|
-
/***/ "
|
|
611
|
-
|
|
612
|
-
!***
|
|
613
|
-
|
|
614
|
-
/***/ (function(
|
|
733
|
+
/***/ "../node_modules/axios/lib/helpers/AxiosURLSearchParams.js":
|
|
734
|
+
/*!*****************************************************************!*\
|
|
735
|
+
!*** ../node_modules/axios/lib/helpers/AxiosURLSearchParams.js ***!
|
|
736
|
+
\*****************************************************************/
|
|
737
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
615
738
|
|
|
616
739
|
"use strict";
|
|
617
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
740
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ \"../node_modules/axios/lib/helpers/toFormData.js\");\n\n\n\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AxiosURLSearchParams);\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/AxiosURLSearchParams.js?");
|
|
618
741
|
|
|
619
742
|
/***/ }),
|
|
620
743
|
|
|
621
|
-
/***/ "
|
|
622
|
-
|
|
623
|
-
!***
|
|
624
|
-
|
|
625
|
-
/***/ (function(
|
|
744
|
+
/***/ "../node_modules/axios/lib/helpers/HttpStatusCode.js":
|
|
745
|
+
/*!***********************************************************!*\
|
|
746
|
+
!*** ../node_modules/axios/lib/helpers/HttpStatusCode.js ***!
|
|
747
|
+
\***********************************************************/
|
|
748
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
626
749
|
|
|
627
750
|
"use strict";
|
|
628
|
-
eval("__webpack_require__.r(__webpack_exports__);\
|
|
751
|
+
eval("__webpack_require__.r(__webpack_exports__);\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (HttpStatusCode);\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/HttpStatusCode.js?");
|
|
629
752
|
|
|
630
753
|
/***/ }),
|
|
631
754
|
|
|
632
|
-
/***/ "
|
|
633
|
-
|
|
634
|
-
!***
|
|
635
|
-
|
|
636
|
-
/***/ (function(
|
|
755
|
+
/***/ "../node_modules/axios/lib/helpers/bind.js":
|
|
756
|
+
/*!*************************************************!*\
|
|
757
|
+
!*** ../node_modules/axios/lib/helpers/bind.js ***!
|
|
758
|
+
\*************************************************/
|
|
759
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
637
760
|
|
|
638
761
|
"use strict";
|
|
639
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
762
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ bind; }\n/* harmony export */ });\n\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/bind.js?");
|
|
640
763
|
|
|
641
764
|
/***/ }),
|
|
642
765
|
|
|
643
|
-
/***/ "
|
|
644
|
-
|
|
645
|
-
!***
|
|
646
|
-
|
|
647
|
-
/***/ (function(
|
|
766
|
+
/***/ "../node_modules/axios/lib/helpers/buildURL.js":
|
|
767
|
+
/*!*****************************************************!*\
|
|
768
|
+
!*** ../node_modules/axios/lib/helpers/buildURL.js ***!
|
|
769
|
+
\*****************************************************/
|
|
770
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
648
771
|
|
|
649
772
|
"use strict";
|
|
650
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
773
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ buildURL; }\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/AxiosURLSearchParams.js */ \"../node_modules/axios/lib/helpers/AxiosURLSearchParams.js\");\n\n\n\n\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isURLSearchParams(params) ?\n params.toString() :\n new _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"](params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/buildURL.js?");
|
|
651
774
|
|
|
652
775
|
/***/ }),
|
|
653
776
|
|
|
654
|
-
/***/ "
|
|
655
|
-
|
|
656
|
-
!***
|
|
657
|
-
|
|
658
|
-
/***/ (function(
|
|
777
|
+
/***/ "../node_modules/axios/lib/helpers/combineURLs.js":
|
|
778
|
+
/*!********************************************************!*\
|
|
779
|
+
!*** ../node_modules/axios/lib/helpers/combineURLs.js ***!
|
|
780
|
+
\********************************************************/
|
|
781
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
659
782
|
|
|
660
783
|
"use strict";
|
|
661
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
784
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ combineURLs; }\n/* harmony export */ });\n\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/combineURLs.js?");
|
|
662
785
|
|
|
663
786
|
/***/ }),
|
|
664
787
|
|
|
665
|
-
/***/ "
|
|
666
|
-
|
|
667
|
-
!***
|
|
668
|
-
|
|
669
|
-
/***/ (function(
|
|
788
|
+
/***/ "../node_modules/axios/lib/helpers/cookies.js":
|
|
789
|
+
/*!****************************************************!*\
|
|
790
|
+
!*** ../node_modules/axios/lib/helpers/cookies.js ***!
|
|
791
|
+
\****************************************************/
|
|
792
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
670
793
|
|
|
671
794
|
"use strict";
|
|
672
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
795
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ \"../node_modules/axios/lib/platform/browser/index.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isStandardBrowserEnv ?\n\n// Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n const cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n// Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })());\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/cookies.js?");
|
|
673
796
|
|
|
674
797
|
/***/ }),
|
|
675
798
|
|
|
676
|
-
/***/ "
|
|
677
|
-
|
|
678
|
-
!***
|
|
679
|
-
|
|
680
|
-
/***/ (function(
|
|
799
|
+
/***/ "../node_modules/axios/lib/helpers/formDataToJSON.js":
|
|
800
|
+
/*!***********************************************************!*\
|
|
801
|
+
!*** ../node_modules/axios/lib/helpers/formDataToJSON.js ***!
|
|
802
|
+
\***********************************************************/
|
|
803
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
681
804
|
|
|
682
805
|
"use strict";
|
|
683
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
806
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ \"../node_modules/axios/lib/utils.js\");\n\n\n\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isArray(target) ? target.length : name;\n\n if (isLast) {\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isFormData(formData) && _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isFunction(formData.entries)) {\n const obj = {};\n\n _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (formDataToJSON);\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/formDataToJSON.js?");
|
|
684
807
|
|
|
685
808
|
/***/ }),
|
|
686
809
|
|
|
687
|
-
/***/ "
|
|
688
|
-
|
|
689
|
-
!***
|
|
690
|
-
|
|
691
|
-
/***/ (function(
|
|
810
|
+
/***/ "../node_modules/axios/lib/helpers/isAbsoluteURL.js":
|
|
811
|
+
/*!**********************************************************!*\
|
|
812
|
+
!*** ../node_modules/axios/lib/helpers/isAbsoluteURL.js ***!
|
|
813
|
+
\**********************************************************/
|
|
814
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
692
815
|
|
|
693
816
|
"use strict";
|
|
694
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
817
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ isAbsoluteURL; }\n/* harmony export */ });\n\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/isAbsoluteURL.js?");
|
|
695
818
|
|
|
696
819
|
/***/ }),
|
|
697
820
|
|
|
698
|
-
/***/ "
|
|
699
|
-
|
|
700
|
-
!***
|
|
701
|
-
|
|
702
|
-
/***/ (function(
|
|
821
|
+
/***/ "../node_modules/axios/lib/helpers/isAxiosError.js":
|
|
822
|
+
/*!*********************************************************!*\
|
|
823
|
+
!*** ../node_modules/axios/lib/helpers/isAxiosError.js ***!
|
|
824
|
+
\*********************************************************/
|
|
825
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
703
826
|
|
|
704
827
|
"use strict";
|
|
705
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
828
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ isAxiosError; }\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ \"../node_modules/axios/lib/utils.js\");\n\n\n\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isObject(payload) && (payload.isAxiosError === true);\n}\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/isAxiosError.js?");
|
|
706
829
|
|
|
707
830
|
/***/ }),
|
|
708
831
|
|
|
709
|
-
/***/ "
|
|
710
|
-
|
|
711
|
-
!***
|
|
712
|
-
|
|
713
|
-
/***/ (function(
|
|
832
|
+
/***/ "../node_modules/axios/lib/helpers/isURLSameOrigin.js":
|
|
833
|
+
/*!************************************************************!*\
|
|
834
|
+
!*** ../node_modules/axios/lib/helpers/isURLSameOrigin.js ***!
|
|
835
|
+
\************************************************************/
|
|
836
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
714
837
|
|
|
715
838
|
"use strict";
|
|
716
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
839
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ \"../node_modules/axios/lib/platform/browser/index.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })());\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/isURLSameOrigin.js?");
|
|
717
840
|
|
|
718
841
|
/***/ }),
|
|
719
842
|
|
|
720
|
-
/***/ "
|
|
721
|
-
|
|
722
|
-
!***
|
|
723
|
-
|
|
724
|
-
/***/ (function(
|
|
843
|
+
/***/ "../node_modules/axios/lib/helpers/null.js":
|
|
844
|
+
/*!*************************************************!*\
|
|
845
|
+
!*** ../node_modules/axios/lib/helpers/null.js ***!
|
|
846
|
+
\*************************************************/
|
|
847
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
725
848
|
|
|
726
849
|
"use strict";
|
|
727
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
850
|
+
eval("__webpack_require__.r(__webpack_exports__);\n// eslint-disable-next-line strict\n/* harmony default export */ __webpack_exports__[\"default\"] = (null);\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/null.js?");
|
|
728
851
|
|
|
729
852
|
/***/ }),
|
|
730
853
|
|
|
731
|
-
/***/ "
|
|
732
|
-
|
|
733
|
-
!***
|
|
734
|
-
|
|
735
|
-
/***/ (function(
|
|
854
|
+
/***/ "../node_modules/axios/lib/helpers/parseHeaders.js":
|
|
855
|
+
/*!*********************************************************!*\
|
|
856
|
+
!*** ../node_modules/axios/lib/helpers/parseHeaders.js ***!
|
|
857
|
+
\*********************************************************/
|
|
858
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
736
859
|
|
|
737
860
|
"use strict";
|
|
738
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
861
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ \"../node_modules/axios/lib/utils.js\");\n\n\n\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\n/* harmony default export */ __webpack_exports__[\"default\"] = (rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n});\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/parseHeaders.js?");
|
|
739
862
|
|
|
740
863
|
/***/ }),
|
|
741
864
|
|
|
742
|
-
/***/ "
|
|
743
|
-
|
|
744
|
-
!***
|
|
745
|
-
|
|
746
|
-
/***/ (function(
|
|
865
|
+
/***/ "../node_modules/axios/lib/helpers/parseProtocol.js":
|
|
866
|
+
/*!**********************************************************!*\
|
|
867
|
+
!*** ../node_modules/axios/lib/helpers/parseProtocol.js ***!
|
|
868
|
+
\**********************************************************/
|
|
869
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
747
870
|
|
|
748
871
|
"use strict";
|
|
749
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
872
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ parseProtocol; }\n/* harmony export */ });\n\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/parseProtocol.js?");
|
|
750
873
|
|
|
751
874
|
/***/ }),
|
|
752
875
|
|
|
753
|
-
/***/ "
|
|
754
|
-
|
|
755
|
-
!***
|
|
756
|
-
|
|
757
|
-
/***/ (function(
|
|
876
|
+
/***/ "../node_modules/axios/lib/helpers/speedometer.js":
|
|
877
|
+
/*!********************************************************!*\
|
|
878
|
+
!*** ../node_modules/axios/lib/helpers/speedometer.js ***!
|
|
879
|
+
\********************************************************/
|
|
880
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
758
881
|
|
|
759
882
|
"use strict";
|
|
760
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
883
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (speedometer);\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/speedometer.js?");
|
|
761
884
|
|
|
762
885
|
/***/ }),
|
|
763
886
|
|
|
764
|
-
/***/ "
|
|
765
|
-
|
|
766
|
-
!***
|
|
767
|
-
|
|
768
|
-
/***/ (function(
|
|
887
|
+
/***/ "../node_modules/axios/lib/helpers/spread.js":
|
|
888
|
+
/*!***************************************************!*\
|
|
889
|
+
!*** ../node_modules/axios/lib/helpers/spread.js ***!
|
|
890
|
+
\***************************************************/
|
|
891
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
769
892
|
|
|
770
893
|
"use strict";
|
|
771
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
894
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ spread; }\n/* harmony export */ });\n\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/spread.js?");
|
|
772
895
|
|
|
773
896
|
/***/ }),
|
|
774
897
|
|
|
775
|
-
/***/ "
|
|
776
|
-
|
|
777
|
-
!***
|
|
778
|
-
|
|
779
|
-
/***/ (function(
|
|
898
|
+
/***/ "../node_modules/axios/lib/helpers/toFormData.js":
|
|
899
|
+
/*!*******************************************************!*\
|
|
900
|
+
!*** ../node_modules/axios/lib/helpers/toFormData.js ***!
|
|
901
|
+
\*******************************************************/
|
|
902
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
780
903
|
|
|
781
904
|
"use strict";
|
|
782
|
-
eval("__webpack_require__.r(__webpack_exports__);\n\n\n\n//# sourceURL=webpack://contentful
|
|
905
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/AxiosError.js */ \"../node_modules/axios/lib/core/AxiosError.js\");\n/* harmony import */ var _platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/node/classes/FormData.js */ \"../node_modules/axios/lib/helpers/null.js\");\n\n\n\n\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\n\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isPlainObject(thing) || _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].toFlatObject(_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"], {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (_platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isSpecCompliantForm(formData);\n\n if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isBlob(value)) {\n throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]('Blob is not supported. Use a Buffer instead.');\n }\n\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isArrayBuffer(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array<String|Number>} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isArray(value) && isFlatArray(value)) ||\n ((_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isFileList(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].endsWith(key, '[]')) && (arr = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].forEach(value, function each(el, key) {\n const result = !(_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isUndefined(el) || el === null) && visitor.call(\n formData, el, _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (toFormData);\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/toFormData.js?");
|
|
783
906
|
|
|
784
907
|
/***/ }),
|
|
785
908
|
|
|
786
|
-
/***/ "
|
|
787
|
-
|
|
788
|
-
!***
|
|
789
|
-
|
|
790
|
-
/***/ (function(
|
|
909
|
+
/***/ "../node_modules/axios/lib/helpers/toURLEncodedForm.js":
|
|
910
|
+
/*!*************************************************************!*\
|
|
911
|
+
!*** ../node_modules/axios/lib/helpers/toURLEncodedForm.js ***!
|
|
912
|
+
\*************************************************************/
|
|
913
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
791
914
|
|
|
792
915
|
"use strict";
|
|
793
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */
|
|
916
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ toURLEncodedForm; }\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ \"../node_modules/axios/lib/helpers/toFormData.js\");\n/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/index.js */ \"../node_modules/axios/lib/platform/browser/index.js\");\n\n\n\n\n\n\nfunction toURLEncodedForm(data, options) {\n return (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(data, new _platform_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isNode && _utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/toURLEncodedForm.js?");
|
|
794
917
|
|
|
795
918
|
/***/ }),
|
|
796
919
|
|
|
797
|
-
/***/ "
|
|
798
|
-
|
|
799
|
-
!***
|
|
800
|
-
|
|
801
|
-
/***/ (function(
|
|
920
|
+
/***/ "../node_modules/axios/lib/helpers/validator.js":
|
|
921
|
+
/*!******************************************************!*\
|
|
922
|
+
!*** ../node_modules/axios/lib/helpers/validator.js ***!
|
|
923
|
+
\******************************************************/
|
|
924
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
802
925
|
|
|
803
926
|
"use strict";
|
|
804
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony
|
|
927
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../env/data.js */ \"../node_modules/axios/lib/env/data.js\");\n/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosError.js */ \"../node_modules/axios/lib/core/AxiosError.js\");\n\n\n\n\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + _env_data_js__WEBPACK_IMPORTED_MODULE_0__.VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"](\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('options must be an object', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('option ' + opt + ' must be ' + result, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('Unknown option ' + opt, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].ERR_BAD_OPTION);\n }\n }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n assertOptions,\n validators\n});\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/validator.js?");
|
|
805
928
|
|
|
806
929
|
/***/ }),
|
|
807
930
|
|
|
808
|
-
/***/ "
|
|
809
|
-
|
|
810
|
-
!***
|
|
811
|
-
|
|
812
|
-
/***/ (function(
|
|
931
|
+
/***/ "../node_modules/axios/lib/platform/browser/classes/Blob.js":
|
|
932
|
+
/*!******************************************************************!*\
|
|
933
|
+
!*** ../node_modules/axios/lib/platform/browser/classes/Blob.js ***!
|
|
934
|
+
\******************************************************************/
|
|
935
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
813
936
|
|
|
814
937
|
"use strict";
|
|
815
|
-
eval("__webpack_require__.r(__webpack_exports__);\n
|
|
938
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (typeof Blob !== 'undefined' ? Blob : null);\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/platform/browser/classes/Blob.js?");
|
|
816
939
|
|
|
817
940
|
/***/ }),
|
|
818
941
|
|
|
819
|
-
/***/ "
|
|
820
|
-
|
|
821
|
-
!***
|
|
822
|
-
|
|
823
|
-
/***/ (function(
|
|
942
|
+
/***/ "../node_modules/axios/lib/platform/browser/classes/FormData.js":
|
|
943
|
+
/*!**********************************************************************!*\
|
|
944
|
+
!*** ../node_modules/axios/lib/platform/browser/classes/FormData.js ***!
|
|
945
|
+
\**********************************************************************/
|
|
946
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
824
947
|
|
|
825
948
|
"use strict";
|
|
826
|
-
eval("__webpack_require__.r(__webpack_exports__);\n
|
|
949
|
+
eval("__webpack_require__.r(__webpack_exports__);\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (typeof FormData !== 'undefined' ? FormData : null);\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/platform/browser/classes/FormData.js?");
|
|
827
950
|
|
|
828
951
|
/***/ }),
|
|
829
952
|
|
|
830
|
-
/***/ "
|
|
831
|
-
|
|
832
|
-
!***
|
|
833
|
-
|
|
834
|
-
/***/ (function(
|
|
953
|
+
/***/ "../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js":
|
|
954
|
+
/*!*****************************************************************************!*\
|
|
955
|
+
!*** ../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js ***!
|
|
956
|
+
\*****************************************************************************/
|
|
957
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
835
958
|
|
|
836
959
|
"use strict";
|
|
837
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony
|
|
960
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../helpers/AxiosURLSearchParams.js */ \"../node_modules/axios/lib/helpers/AxiosURLSearchParams.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (typeof URLSearchParams !== 'undefined' ? URLSearchParams : _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js?");
|
|
838
961
|
|
|
839
962
|
/***/ }),
|
|
840
963
|
|
|
841
|
-
/***/ "
|
|
842
|
-
|
|
843
|
-
!***
|
|
844
|
-
|
|
845
|
-
/***/ (function(
|
|
964
|
+
/***/ "../node_modules/axios/lib/platform/browser/index.js":
|
|
965
|
+
/*!***********************************************************!*\
|
|
966
|
+
!*** ../node_modules/axios/lib/platform/browser/index.js ***!
|
|
967
|
+
\***********************************************************/
|
|
968
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
846
969
|
|
|
847
970
|
"use strict";
|
|
848
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony
|
|
971
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./classes/URLSearchParams.js */ \"../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js\");\n/* harmony import */ var _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./classes/FormData.js */ \"../node_modules/axios/lib/platform/browser/classes/FormData.js\");\n/* harmony import */ var _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./classes/Blob.js */ \"../node_modules/axios/lib/platform/browser/classes/Blob.js\");\n\n\n\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst isStandardBrowserEnv = (() => {\n let product;\n if (typeof navigator !== 'undefined' && (\n (product = navigator.product) === 'ReactNative' ||\n product === 'NativeScript' ||\n product === 'NS')\n ) {\n return false;\n }\n\n return typeof window !== 'undefined' && typeof document !== 'undefined';\n})();\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\n const isStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n isBrowser: true,\n classes: {\n URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n Blob: _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n },\n isStandardBrowserEnv,\n isStandardBrowserWebWorkerEnv,\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n});\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/platform/browser/index.js?");
|
|
849
972
|
|
|
850
973
|
/***/ }),
|
|
851
974
|
|
|
852
|
-
/***/ "
|
|
853
|
-
|
|
854
|
-
!***
|
|
855
|
-
|
|
856
|
-
/***/ (function(
|
|
975
|
+
/***/ "../node_modules/axios/lib/utils.js":
|
|
976
|
+
/*!******************************************!*\
|
|
977
|
+
!*** ../node_modules/axios/lib/utils.js ***!
|
|
978
|
+
\******************************************/
|
|
979
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
857
980
|
|
|
858
981
|
"use strict";
|
|
859
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ValidationError: function() { return /* binding */ ValidationError; }\n/* harmony export */ });\nclass ValidationError extends Error {\n constructor(name, message) {\n super(`Invalid \"${name}\" provided, ` + message);\n this.name = 'ValidationError';\n }\n}\n\n\n//# sourceURL=webpack://contentful/./utils/validation-error.ts?");
|
|
982
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers/bind.js */ \"../node_modules/axios/lib/helpers/bind.js\");\n\n\n\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n if (reducer(descriptor, name, obj) !== false) {\n reducedDescriptors[name] = descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n});\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/utils.js?");
|
|
860
983
|
|
|
861
984
|
/***/ })
|
|
862
985
|
|