@kontent-ai/core-sdk 10.0.0-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.
Files changed (202) hide show
  1. package/.npmignore +14 -0
  2. package/LICENSE.md +9 -0
  3. package/README.md +30 -0
  4. package/dist/cjs/helpers/enum.helper.d.ts +8 -0
  5. package/dist/cjs/helpers/enum.helper.js +79 -0
  6. package/dist/cjs/helpers/enum.helper.js.map +1 -0
  7. package/dist/cjs/helpers/header.helper.d.ts +13 -0
  8. package/dist/cjs/helpers/header.helper.js +24 -0
  9. package/dist/cjs/helpers/header.helper.js.map +1 -0
  10. package/dist/cjs/helpers/headers-helper.d.ts +3 -0
  11. package/dist/cjs/helpers/headers-helper.js +37 -0
  12. package/dist/cjs/helpers/headers-helper.js.map +1 -0
  13. package/dist/cjs/helpers/index.d.ts +5 -0
  14. package/dist/cjs/helpers/index.js +22 -0
  15. package/dist/cjs/helpers/index.js.map +1 -0
  16. package/dist/cjs/helpers/retry-helper.d.ts +37 -0
  17. package/dist/cjs/helpers/retry-helper.js +152 -0
  18. package/dist/cjs/helpers/retry-helper.js.map +1 -0
  19. package/dist/cjs/helpers/url.helper.d.ts +10 -0
  20. package/dist/cjs/helpers/url.helper.js +30 -0
  21. package/dist/cjs/helpers/url.helper.js.map +1 -0
  22. package/dist/cjs/http/http.debugger.d.ts +6 -0
  23. package/dist/cjs/http/http.debugger.js +26 -0
  24. package/dist/cjs/http/http.debugger.js.map +1 -0
  25. package/dist/cjs/http/http.functions.d.ts +11 -0
  26. package/dist/cjs/http/http.functions.js +381 -0
  27. package/dist/cjs/http/http.functions.js.map +1 -0
  28. package/dist/cjs/http/http.models.d.ts +73 -0
  29. package/dist/cjs/http/http.models.js +3 -0
  30. package/dist/cjs/http/http.models.js.map +1 -0
  31. package/dist/cjs/http/http.service.d.ts +19 -0
  32. package/dist/cjs/http/http.service.js +110 -0
  33. package/dist/cjs/http/http.service.js.map +1 -0
  34. package/dist/cjs/http/ihttp.service.d.ts +9 -0
  35. package/dist/cjs/http/ihttp.service.js +3 -0
  36. package/dist/cjs/http/ihttp.service.js.map +1 -0
  37. package/dist/cjs/http/index.d.ts +6 -0
  38. package/dist/cjs/http/index.js +23 -0
  39. package/dist/cjs/http/index.js.map +1 -0
  40. package/dist/cjs/http/test-http.service.d.ts +17 -0
  41. package/dist/cjs/http/test-http.service.js +47 -0
  42. package/dist/cjs/http/test-http.service.js.map +1 -0
  43. package/dist/cjs/index.d.ts +3 -0
  44. package/dist/cjs/index.js +21 -0
  45. package/dist/cjs/index.js.map +1 -0
  46. package/dist/cjs/models/index.d.ts +3 -0
  47. package/dist/cjs/models/index.js +20 -0
  48. package/dist/cjs/models/index.js.map +1 -0
  49. package/dist/cjs/models/isdk-info.d.ts +14 -0
  50. package/dist/cjs/models/isdk-info.js +3 -0
  51. package/dist/cjs/models/isdk-info.js.map +1 -0
  52. package/dist/cjs/models/parameters.d.ts +16 -0
  53. package/dist/cjs/models/parameters.js +30 -0
  54. package/dist/cjs/models/parameters.js.map +1 -0
  55. package/dist/cjs/models/url.models.d.ts +3 -0
  56. package/dist/cjs/models/url.models.js +3 -0
  57. package/dist/cjs/models/url.models.js.map +1 -0
  58. package/dist/cjs/sdk-info.generated.d.ts +2 -0
  59. package/dist/cjs/sdk-info.generated.js +9 -0
  60. package/dist/cjs/sdk-info.generated.js.map +1 -0
  61. package/dist/es2015/helpers/enum.helper.d.ts +8 -0
  62. package/dist/es2015/helpers/enum.helper.js +50 -0
  63. package/dist/es2015/helpers/enum.helper.js.map +1 -0
  64. package/dist/es2015/helpers/header.helper.d.ts +13 -0
  65. package/dist/es2015/helpers/header.helper.js +19 -0
  66. package/dist/es2015/helpers/header.helper.js.map +1 -0
  67. package/dist/es2015/helpers/headers-helper.d.ts +3 -0
  68. package/dist/es2015/helpers/headers-helper.js +11 -0
  69. package/dist/es2015/helpers/headers-helper.js.map +1 -0
  70. package/dist/es2015/helpers/index.d.ts +5 -0
  71. package/dist/es2015/helpers/index.js +6 -0
  72. package/dist/es2015/helpers/index.js.map +1 -0
  73. package/dist/es2015/helpers/retry-helper.d.ts +37 -0
  74. package/dist/es2015/helpers/retry-helper.js +145 -0
  75. package/dist/es2015/helpers/retry-helper.js.map +1 -0
  76. package/dist/es2015/helpers/url.helper.d.ts +10 -0
  77. package/dist/es2015/helpers/url.helper.js +23 -0
  78. package/dist/es2015/helpers/url.helper.js.map +1 -0
  79. package/dist/es2015/http/http.debugger.d.ts +6 -0
  80. package/dist/es2015/http/http.debugger.js +19 -0
  81. package/dist/es2015/http/http.debugger.js.map +1 -0
  82. package/dist/es2015/http/http.functions.d.ts +11 -0
  83. package/dist/es2015/http/http.functions.js +244 -0
  84. package/dist/es2015/http/http.functions.js.map +1 -0
  85. package/dist/es2015/http/http.models.d.ts +73 -0
  86. package/dist/es2015/http/http.models.js +2 -0
  87. package/dist/es2015/http/http.models.js.map +1 -0
  88. package/dist/es2015/http/http.service.d.ts +19 -0
  89. package/dist/es2015/http/http.service.js +45 -0
  90. package/dist/es2015/http/http.service.js.map +1 -0
  91. package/dist/es2015/http/ihttp.service.d.ts +9 -0
  92. package/dist/es2015/http/ihttp.service.js +2 -0
  93. package/dist/es2015/http/ihttp.service.js.map +1 -0
  94. package/dist/es2015/http/index.d.ts +6 -0
  95. package/dist/es2015/http/index.js +7 -0
  96. package/dist/es2015/http/index.js.map +1 -0
  97. package/dist/es2015/http/test-http.service.d.ts +17 -0
  98. package/dist/es2015/http/test-http.service.js +41 -0
  99. package/dist/es2015/http/test-http.service.js.map +1 -0
  100. package/dist/es2015/index.d.ts +3 -0
  101. package/dist/es2015/index.js +5 -0
  102. package/dist/es2015/index.js.map +1 -0
  103. package/dist/es2015/models/index.d.ts +3 -0
  104. package/dist/es2015/models/index.js +4 -0
  105. package/dist/es2015/models/index.js.map +1 -0
  106. package/dist/es2015/models/isdk-info.d.ts +14 -0
  107. package/dist/es2015/models/isdk-info.js +2 -0
  108. package/dist/es2015/models/isdk-info.js.map +1 -0
  109. package/dist/es2015/models/parameters.d.ts +16 -0
  110. package/dist/es2015/models/parameters.js +26 -0
  111. package/dist/es2015/models/parameters.js.map +1 -0
  112. package/dist/es2015/models/url.models.d.ts +3 -0
  113. package/dist/es2015/models/url.models.js +2 -0
  114. package/dist/es2015/models/url.models.js.map +1 -0
  115. package/dist/es2015/sdk-info.generated.d.ts +2 -0
  116. package/dist/es2015/sdk-info.generated.js +6 -0
  117. package/dist/es2015/sdk-info.generated.js.map +1 -0
  118. package/dist/es5/helpers/enum.helper.d.ts +8 -0
  119. package/dist/es5/helpers/enum.helper.js +66 -0
  120. package/dist/es5/helpers/enum.helper.js.map +1 -0
  121. package/dist/es5/helpers/header.helper.d.ts +13 -0
  122. package/dist/es5/helpers/header.helper.js +21 -0
  123. package/dist/es5/helpers/header.helper.js.map +1 -0
  124. package/dist/es5/helpers/headers-helper.d.ts +3 -0
  125. package/dist/es5/helpers/headers-helper.js +23 -0
  126. package/dist/es5/helpers/headers-helper.js.map +1 -0
  127. package/dist/es5/helpers/index.d.ts +5 -0
  128. package/dist/es5/helpers/index.js +6 -0
  129. package/dist/es5/helpers/index.js.map +1 -0
  130. package/dist/es5/helpers/retry-helper.d.ts +37 -0
  131. package/dist/es5/helpers/retry-helper.js +149 -0
  132. package/dist/es5/helpers/retry-helper.js.map +1 -0
  133. package/dist/es5/helpers/url.helper.d.ts +10 -0
  134. package/dist/es5/helpers/url.helper.js +27 -0
  135. package/dist/es5/helpers/url.helper.js.map +1 -0
  136. package/dist/es5/http/http.debugger.d.ts +6 -0
  137. package/dist/es5/http/http.debugger.js +23 -0
  138. package/dist/es5/http/http.debugger.js.map +1 -0
  139. package/dist/es5/http/http.functions.d.ts +11 -0
  140. package/dist/es5/http/http.functions.js +337 -0
  141. package/dist/es5/http/http.functions.js.map +1 -0
  142. package/dist/es5/http/http.models.d.ts +73 -0
  143. package/dist/es5/http/http.models.js +2 -0
  144. package/dist/es5/http/http.models.js.map +1 -0
  145. package/dist/es5/http/http.service.d.ts +19 -0
  146. package/dist/es5/http/http.service.js +72 -0
  147. package/dist/es5/http/http.service.js.map +1 -0
  148. package/dist/es5/http/ihttp.service.d.ts +9 -0
  149. package/dist/es5/http/ihttp.service.js +2 -0
  150. package/dist/es5/http/ihttp.service.js.map +1 -0
  151. package/dist/es5/http/index.d.ts +6 -0
  152. package/dist/es5/http/index.js +7 -0
  153. package/dist/es5/http/index.js.map +1 -0
  154. package/dist/es5/http/test-http.service.d.ts +17 -0
  155. package/dist/es5/http/test-http.service.js +44 -0
  156. package/dist/es5/http/test-http.service.js.map +1 -0
  157. package/dist/es5/index.d.ts +3 -0
  158. package/dist/es5/index.js +5 -0
  159. package/dist/es5/index.js.map +1 -0
  160. package/dist/es5/models/index.d.ts +3 -0
  161. package/dist/es5/models/index.js +4 -0
  162. package/dist/es5/models/index.js.map +1 -0
  163. package/dist/es5/models/isdk-info.d.ts +14 -0
  164. package/dist/es5/models/isdk-info.js +2 -0
  165. package/dist/es5/models/isdk-info.js.map +1 -0
  166. package/dist/es5/models/parameters.d.ts +16 -0
  167. package/dist/es5/models/parameters.js +27 -0
  168. package/dist/es5/models/parameters.js.map +1 -0
  169. package/dist/es5/models/url.models.d.ts +3 -0
  170. package/dist/es5/models/url.models.js +2 -0
  171. package/dist/es5/models/url.models.js.map +1 -0
  172. package/dist/es5/sdk-info.generated.d.ts +2 -0
  173. package/dist/es5/sdk-info.generated.js +6 -0
  174. package/dist/es5/sdk-info.generated.js.map +1 -0
  175. package/dist/umd/kontent-core.umd.js +3476 -0
  176. package/dist/umd/kontent-core.umd.js.map +1 -0
  177. package/dist/umd/kontent-core.umd.min.js +2 -0
  178. package/dist/umd/kontent-core.umd.min.js.map +1 -0
  179. package/dist/umd/report.json +1 -0
  180. package/dist/umd/report.min.json +1 -0
  181. package/dist/umd/stats.json +11920 -0
  182. package/dist/umd/stats.min.json +13789 -0
  183. package/lib/helpers/enum.helper.ts +63 -0
  184. package/lib/helpers/header.helper.ts +23 -0
  185. package/lib/helpers/headers-helper.ts +15 -0
  186. package/lib/helpers/index.ts +5 -0
  187. package/lib/helpers/retry-helper.ts +204 -0
  188. package/lib/helpers/url.helper.ts +26 -0
  189. package/lib/http/http.debugger.ts +21 -0
  190. package/lib/http/http.functions.ts +312 -0
  191. package/lib/http/http.models.ts +83 -0
  192. package/lib/http/http.service.ts +91 -0
  193. package/lib/http/ihttp.service.ts +20 -0
  194. package/lib/http/index.ts +6 -0
  195. package/lib/http/test-http.service.ts +70 -0
  196. package/lib/index.ts +4 -0
  197. package/lib/models/index.ts +3 -0
  198. package/lib/models/isdk-info.ts +15 -0
  199. package/lib/models/parameters.ts +25 -0
  200. package/lib/models/url.models.ts +3 -0
  201. package/lib/sdk-info.generated.ts +7 -0
  202. package/package.json +87 -0
@@ -0,0 +1,3476 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory();
4
+ else if(typeof define === 'function' && define.amd)
5
+ define("kontentCore", [], factory);
6
+ else if(typeof exports === 'object')
7
+ exports["kontentCore"] = factory();
8
+ else
9
+ root["kontentCore"] = factory();
10
+ })(self, () => {
11
+ return /******/ (() => { // webpackBootstrap
12
+ /******/ var __webpack_modules__ = ({
13
+
14
+ /***/ "./node_modules/axios/index.js":
15
+ /*!*************************************!*\
16
+ !*** ./node_modules/axios/index.js ***!
17
+ \*************************************/
18
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
19
+
20
+ module.exports = __webpack_require__(/*! ./lib/axios */ "./node_modules/axios/lib/axios.js");
21
+
22
+ /***/ }),
23
+
24
+ /***/ "./node_modules/axios/lib/adapters/xhr.js":
25
+ /*!************************************************!*\
26
+ !*** ./node_modules/axios/lib/adapters/xhr.js ***!
27
+ \************************************************/
28
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
29
+
30
+ "use strict";
31
+
32
+
33
+ var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
34
+ var settle = __webpack_require__(/*! ./../core/settle */ "./node_modules/axios/lib/core/settle.js");
35
+ var cookies = __webpack_require__(/*! ./../helpers/cookies */ "./node_modules/axios/lib/helpers/cookies.js");
36
+ var buildURL = __webpack_require__(/*! ./../helpers/buildURL */ "./node_modules/axios/lib/helpers/buildURL.js");
37
+ var buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ "./node_modules/axios/lib/core/buildFullPath.js");
38
+ var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "./node_modules/axios/lib/helpers/parseHeaders.js");
39
+ var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "./node_modules/axios/lib/helpers/isURLSameOrigin.js");
40
+ var transitionalDefaults = __webpack_require__(/*! ../defaults/transitional */ "./node_modules/axios/lib/defaults/transitional.js");
41
+ var AxiosError = __webpack_require__(/*! ../core/AxiosError */ "./node_modules/axios/lib/core/AxiosError.js");
42
+ var CanceledError = __webpack_require__(/*! ../cancel/CanceledError */ "./node_modules/axios/lib/cancel/CanceledError.js");
43
+ var parseProtocol = __webpack_require__(/*! ../helpers/parseProtocol */ "./node_modules/axios/lib/helpers/parseProtocol.js");
44
+
45
+ module.exports = function xhrAdapter(config) {
46
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
47
+ var requestData = config.data;
48
+ var requestHeaders = config.headers;
49
+ var responseType = config.responseType;
50
+ var onCanceled;
51
+ function done() {
52
+ if (config.cancelToken) {
53
+ config.cancelToken.unsubscribe(onCanceled);
54
+ }
55
+
56
+ if (config.signal) {
57
+ config.signal.removeEventListener('abort', onCanceled);
58
+ }
59
+ }
60
+
61
+ if (utils.isFormData(requestData) && utils.isStandardBrowserEnv()) {
62
+ delete requestHeaders['Content-Type']; // Let the browser set it
63
+ }
64
+
65
+ var request = new XMLHttpRequest();
66
+
67
+ // HTTP basic authentication
68
+ if (config.auth) {
69
+ var username = config.auth.username || '';
70
+ var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
71
+ requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
72
+ }
73
+
74
+ var fullPath = buildFullPath(config.baseURL, config.url);
75
+
76
+ request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
77
+
78
+ // Set the request timeout in MS
79
+ request.timeout = config.timeout;
80
+
81
+ function onloadend() {
82
+ if (!request) {
83
+ return;
84
+ }
85
+ // Prepare the response
86
+ var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
87
+ var responseData = !responseType || responseType === 'text' || responseType === 'json' ?
88
+ request.responseText : request.response;
89
+ var response = {
90
+ data: responseData,
91
+ status: request.status,
92
+ statusText: request.statusText,
93
+ headers: responseHeaders,
94
+ config: config,
95
+ request: request
96
+ };
97
+
98
+ settle(function _resolve(value) {
99
+ resolve(value);
100
+ done();
101
+ }, function _reject(err) {
102
+ reject(err);
103
+ done();
104
+ }, response);
105
+
106
+ // Clean up request
107
+ request = null;
108
+ }
109
+
110
+ if ('onloadend' in request) {
111
+ // Use onloadend if available
112
+ request.onloadend = onloadend;
113
+ } else {
114
+ // Listen for ready state to emulate onloadend
115
+ request.onreadystatechange = function handleLoad() {
116
+ if (!request || request.readyState !== 4) {
117
+ return;
118
+ }
119
+
120
+ // The request errored out and we didn't get a response, this will be
121
+ // handled by onerror instead
122
+ // With one exception: request that using file: protocol, most browsers
123
+ // will return status as 0 even though it's a successful request
124
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
125
+ return;
126
+ }
127
+ // readystate handler is calling before onerror or ontimeout handlers,
128
+ // so we should call onloadend on the next 'tick'
129
+ setTimeout(onloadend);
130
+ };
131
+ }
132
+
133
+ // Handle browser request cancellation (as opposed to a manual cancellation)
134
+ request.onabort = function handleAbort() {
135
+ if (!request) {
136
+ return;
137
+ }
138
+
139
+ reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
140
+
141
+ // Clean up request
142
+ request = null;
143
+ };
144
+
145
+ // Handle low level network errors
146
+ request.onerror = function handleError() {
147
+ // Real errors are hidden from us by the browser
148
+ // onerror should only fire if it's a network error
149
+ reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request, request));
150
+
151
+ // Clean up request
152
+ request = null;
153
+ };
154
+
155
+ // Handle timeout
156
+ request.ontimeout = function handleTimeout() {
157
+ var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
158
+ var transitional = config.transitional || transitionalDefaults;
159
+ if (config.timeoutErrorMessage) {
160
+ timeoutErrorMessage = config.timeoutErrorMessage;
161
+ }
162
+ reject(new AxiosError(
163
+ timeoutErrorMessage,
164
+ transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
165
+ config,
166
+ request));
167
+
168
+ // Clean up request
169
+ request = null;
170
+ };
171
+
172
+ // Add xsrf header
173
+ // This is only done if running in a standard browser environment.
174
+ // Specifically not if we're in a web worker, or react-native.
175
+ if (utils.isStandardBrowserEnv()) {
176
+ // Add xsrf header
177
+ var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
178
+ cookies.read(config.xsrfCookieName) :
179
+ undefined;
180
+
181
+ if (xsrfValue) {
182
+ requestHeaders[config.xsrfHeaderName] = xsrfValue;
183
+ }
184
+ }
185
+
186
+ // Add headers to the request
187
+ if ('setRequestHeader' in request) {
188
+ utils.forEach(requestHeaders, function setRequestHeader(val, key) {
189
+ if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
190
+ // Remove Content-Type if data is undefined
191
+ delete requestHeaders[key];
192
+ } else {
193
+ // Otherwise add header to the request
194
+ request.setRequestHeader(key, val);
195
+ }
196
+ });
197
+ }
198
+
199
+ // Add withCredentials to request if needed
200
+ if (!utils.isUndefined(config.withCredentials)) {
201
+ request.withCredentials = !!config.withCredentials;
202
+ }
203
+
204
+ // Add responseType to request if needed
205
+ if (responseType && responseType !== 'json') {
206
+ request.responseType = config.responseType;
207
+ }
208
+
209
+ // Handle progress if needed
210
+ if (typeof config.onDownloadProgress === 'function') {
211
+ request.addEventListener('progress', config.onDownloadProgress);
212
+ }
213
+
214
+ // Not all browsers support upload events
215
+ if (typeof config.onUploadProgress === 'function' && request.upload) {
216
+ request.upload.addEventListener('progress', config.onUploadProgress);
217
+ }
218
+
219
+ if (config.cancelToken || config.signal) {
220
+ // Handle cancellation
221
+ // eslint-disable-next-line func-names
222
+ onCanceled = function(cancel) {
223
+ if (!request) {
224
+ return;
225
+ }
226
+ reject(!cancel || (cancel && cancel.type) ? new CanceledError() : cancel);
227
+ request.abort();
228
+ request = null;
229
+ };
230
+
231
+ config.cancelToken && config.cancelToken.subscribe(onCanceled);
232
+ if (config.signal) {
233
+ config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
234
+ }
235
+ }
236
+
237
+ if (!requestData) {
238
+ requestData = null;
239
+ }
240
+
241
+ var protocol = parseProtocol(fullPath);
242
+
243
+ if (protocol && [ 'http', 'https', 'file' ].indexOf(protocol) === -1) {
244
+ reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
245
+ return;
246
+ }
247
+
248
+
249
+ // Send the request
250
+ request.send(requestData);
251
+ });
252
+ };
253
+
254
+
255
+ /***/ }),
256
+
257
+ /***/ "./node_modules/axios/lib/axios.js":
258
+ /*!*****************************************!*\
259
+ !*** ./node_modules/axios/lib/axios.js ***!
260
+ \*****************************************/
261
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
262
+
263
+ "use strict";
264
+
265
+
266
+ var utils = __webpack_require__(/*! ./utils */ "./node_modules/axios/lib/utils.js");
267
+ var bind = __webpack_require__(/*! ./helpers/bind */ "./node_modules/axios/lib/helpers/bind.js");
268
+ var Axios = __webpack_require__(/*! ./core/Axios */ "./node_modules/axios/lib/core/Axios.js");
269
+ var mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ "./node_modules/axios/lib/core/mergeConfig.js");
270
+ var defaults = __webpack_require__(/*! ./defaults */ "./node_modules/axios/lib/defaults/index.js");
271
+
272
+ /**
273
+ * Create an instance of Axios
274
+ *
275
+ * @param {Object} defaultConfig The default config for the instance
276
+ * @return {Axios} A new instance of Axios
277
+ */
278
+ function createInstance(defaultConfig) {
279
+ var context = new Axios(defaultConfig);
280
+ var instance = bind(Axios.prototype.request, context);
281
+
282
+ // Copy axios.prototype to instance
283
+ utils.extend(instance, Axios.prototype, context);
284
+
285
+ // Copy context to instance
286
+ utils.extend(instance, context);
287
+
288
+ // Factory for creating new instances
289
+ instance.create = function create(instanceConfig) {
290
+ return createInstance(mergeConfig(defaultConfig, instanceConfig));
291
+ };
292
+
293
+ return instance;
294
+ }
295
+
296
+ // Create the default instance to be exported
297
+ var axios = createInstance(defaults);
298
+
299
+ // Expose Axios class to allow class inheritance
300
+ axios.Axios = Axios;
301
+
302
+ // Expose Cancel & CancelToken
303
+ axios.CanceledError = __webpack_require__(/*! ./cancel/CanceledError */ "./node_modules/axios/lib/cancel/CanceledError.js");
304
+ axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "./node_modules/axios/lib/cancel/CancelToken.js");
305
+ axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "./node_modules/axios/lib/cancel/isCancel.js");
306
+ axios.VERSION = (__webpack_require__(/*! ./env/data */ "./node_modules/axios/lib/env/data.js").version);
307
+ axios.toFormData = __webpack_require__(/*! ./helpers/toFormData */ "./node_modules/axios/lib/helpers/toFormData.js");
308
+
309
+ // Expose AxiosError class
310
+ axios.AxiosError = __webpack_require__(/*! ../lib/core/AxiosError */ "./node_modules/axios/lib/core/AxiosError.js");
311
+
312
+ // alias for CanceledError for backward compatibility
313
+ axios.Cancel = axios.CanceledError;
314
+
315
+ // Expose all/spread
316
+ axios.all = function all(promises) {
317
+ return Promise.all(promises);
318
+ };
319
+ axios.spread = __webpack_require__(/*! ./helpers/spread */ "./node_modules/axios/lib/helpers/spread.js");
320
+
321
+ // Expose isAxiosError
322
+ axios.isAxiosError = __webpack_require__(/*! ./helpers/isAxiosError */ "./node_modules/axios/lib/helpers/isAxiosError.js");
323
+
324
+ module.exports = axios;
325
+
326
+ // Allow use of default import syntax in TypeScript
327
+ module.exports["default"] = axios;
328
+
329
+
330
+ /***/ }),
331
+
332
+ /***/ "./node_modules/axios/lib/cancel/CancelToken.js":
333
+ /*!******************************************************!*\
334
+ !*** ./node_modules/axios/lib/cancel/CancelToken.js ***!
335
+ \******************************************************/
336
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
337
+
338
+ "use strict";
339
+
340
+
341
+ var CanceledError = __webpack_require__(/*! ./CanceledError */ "./node_modules/axios/lib/cancel/CanceledError.js");
342
+
343
+ /**
344
+ * A `CancelToken` is an object that can be used to request cancellation of an operation.
345
+ *
346
+ * @class
347
+ * @param {Function} executor The executor function.
348
+ */
349
+ function CancelToken(executor) {
350
+ if (typeof executor !== 'function') {
351
+ throw new TypeError('executor must be a function.');
352
+ }
353
+
354
+ var resolvePromise;
355
+
356
+ this.promise = new Promise(function promiseExecutor(resolve) {
357
+ resolvePromise = resolve;
358
+ });
359
+
360
+ var token = this;
361
+
362
+ // eslint-disable-next-line func-names
363
+ this.promise.then(function(cancel) {
364
+ if (!token._listeners) return;
365
+
366
+ var i;
367
+ var l = token._listeners.length;
368
+
369
+ for (i = 0; i < l; i++) {
370
+ token._listeners[i](cancel);
371
+ }
372
+ token._listeners = null;
373
+ });
374
+
375
+ // eslint-disable-next-line func-names
376
+ this.promise.then = function(onfulfilled) {
377
+ var _resolve;
378
+ // eslint-disable-next-line func-names
379
+ var promise = new Promise(function(resolve) {
380
+ token.subscribe(resolve);
381
+ _resolve = resolve;
382
+ }).then(onfulfilled);
383
+
384
+ promise.cancel = function reject() {
385
+ token.unsubscribe(_resolve);
386
+ };
387
+
388
+ return promise;
389
+ };
390
+
391
+ executor(function cancel(message) {
392
+ if (token.reason) {
393
+ // Cancellation has already been requested
394
+ return;
395
+ }
396
+
397
+ token.reason = new CanceledError(message);
398
+ resolvePromise(token.reason);
399
+ });
400
+ }
401
+
402
+ /**
403
+ * Throws a `CanceledError` if cancellation has been requested.
404
+ */
405
+ CancelToken.prototype.throwIfRequested = function throwIfRequested() {
406
+ if (this.reason) {
407
+ throw this.reason;
408
+ }
409
+ };
410
+
411
+ /**
412
+ * Subscribe to the cancel signal
413
+ */
414
+
415
+ CancelToken.prototype.subscribe = function subscribe(listener) {
416
+ if (this.reason) {
417
+ listener(this.reason);
418
+ return;
419
+ }
420
+
421
+ if (this._listeners) {
422
+ this._listeners.push(listener);
423
+ } else {
424
+ this._listeners = [listener];
425
+ }
426
+ };
427
+
428
+ /**
429
+ * Unsubscribe from the cancel signal
430
+ */
431
+
432
+ CancelToken.prototype.unsubscribe = function unsubscribe(listener) {
433
+ if (!this._listeners) {
434
+ return;
435
+ }
436
+ var index = this._listeners.indexOf(listener);
437
+ if (index !== -1) {
438
+ this._listeners.splice(index, 1);
439
+ }
440
+ };
441
+
442
+ /**
443
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
444
+ * cancels the `CancelToken`.
445
+ */
446
+ CancelToken.source = function source() {
447
+ var cancel;
448
+ var token = new CancelToken(function executor(c) {
449
+ cancel = c;
450
+ });
451
+ return {
452
+ token: token,
453
+ cancel: cancel
454
+ };
455
+ };
456
+
457
+ module.exports = CancelToken;
458
+
459
+
460
+ /***/ }),
461
+
462
+ /***/ "./node_modules/axios/lib/cancel/CanceledError.js":
463
+ /*!********************************************************!*\
464
+ !*** ./node_modules/axios/lib/cancel/CanceledError.js ***!
465
+ \********************************************************/
466
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
467
+
468
+ "use strict";
469
+
470
+
471
+ var AxiosError = __webpack_require__(/*! ../core/AxiosError */ "./node_modules/axios/lib/core/AxiosError.js");
472
+ var utils = __webpack_require__(/*! ../utils */ "./node_modules/axios/lib/utils.js");
473
+
474
+ /**
475
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
476
+ *
477
+ * @class
478
+ * @param {string=} message The message.
479
+ */
480
+ function CanceledError(message) {
481
+ // eslint-disable-next-line no-eq-null,eqeqeq
482
+ AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED);
483
+ this.name = 'CanceledError';
484
+ }
485
+
486
+ utils.inherits(CanceledError, AxiosError, {
487
+ __CANCEL__: true
488
+ });
489
+
490
+ module.exports = CanceledError;
491
+
492
+
493
+ /***/ }),
494
+
495
+ /***/ "./node_modules/axios/lib/cancel/isCancel.js":
496
+ /*!***************************************************!*\
497
+ !*** ./node_modules/axios/lib/cancel/isCancel.js ***!
498
+ \***************************************************/
499
+ /***/ ((module) => {
500
+
501
+ "use strict";
502
+
503
+
504
+ module.exports = function isCancel(value) {
505
+ return !!(value && value.__CANCEL__);
506
+ };
507
+
508
+
509
+ /***/ }),
510
+
511
+ /***/ "./node_modules/axios/lib/core/Axios.js":
512
+ /*!**********************************************!*\
513
+ !*** ./node_modules/axios/lib/core/Axios.js ***!
514
+ \**********************************************/
515
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
516
+
517
+ "use strict";
518
+
519
+
520
+ var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
521
+ var buildURL = __webpack_require__(/*! ../helpers/buildURL */ "./node_modules/axios/lib/helpers/buildURL.js");
522
+ var InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ "./node_modules/axios/lib/core/InterceptorManager.js");
523
+ var dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ "./node_modules/axios/lib/core/dispatchRequest.js");
524
+ var mergeConfig = __webpack_require__(/*! ./mergeConfig */ "./node_modules/axios/lib/core/mergeConfig.js");
525
+ var buildFullPath = __webpack_require__(/*! ./buildFullPath */ "./node_modules/axios/lib/core/buildFullPath.js");
526
+ var validator = __webpack_require__(/*! ../helpers/validator */ "./node_modules/axios/lib/helpers/validator.js");
527
+
528
+ var validators = validator.validators;
529
+ /**
530
+ * Create a new instance of Axios
531
+ *
532
+ * @param {Object} instanceConfig The default config for the instance
533
+ */
534
+ function Axios(instanceConfig) {
535
+ this.defaults = instanceConfig;
536
+ this.interceptors = {
537
+ request: new InterceptorManager(),
538
+ response: new InterceptorManager()
539
+ };
540
+ }
541
+
542
+ /**
543
+ * Dispatch a request
544
+ *
545
+ * @param {Object} config The config specific for this request (merged with this.defaults)
546
+ */
547
+ Axios.prototype.request = function request(configOrUrl, config) {
548
+ /*eslint no-param-reassign:0*/
549
+ // Allow for axios('example/url'[, config]) a la fetch API
550
+ if (typeof configOrUrl === 'string') {
551
+ config = config || {};
552
+ config.url = configOrUrl;
553
+ } else {
554
+ config = configOrUrl || {};
555
+ }
556
+
557
+ config = mergeConfig(this.defaults, config);
558
+
559
+ // Set config.method
560
+ if (config.method) {
561
+ config.method = config.method.toLowerCase();
562
+ } else if (this.defaults.method) {
563
+ config.method = this.defaults.method.toLowerCase();
564
+ } else {
565
+ config.method = 'get';
566
+ }
567
+
568
+ var transitional = config.transitional;
569
+
570
+ if (transitional !== undefined) {
571
+ validator.assertOptions(transitional, {
572
+ silentJSONParsing: validators.transitional(validators.boolean),
573
+ forcedJSONParsing: validators.transitional(validators.boolean),
574
+ clarifyTimeoutError: validators.transitional(validators.boolean)
575
+ }, false);
576
+ }
577
+
578
+ // filter out skipped interceptors
579
+ var requestInterceptorChain = [];
580
+ var synchronousRequestInterceptors = true;
581
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
582
+ if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
583
+ return;
584
+ }
585
+
586
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
587
+
588
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
589
+ });
590
+
591
+ var responseInterceptorChain = [];
592
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
593
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
594
+ });
595
+
596
+ var promise;
597
+
598
+ if (!synchronousRequestInterceptors) {
599
+ var chain = [dispatchRequest, undefined];
600
+
601
+ Array.prototype.unshift.apply(chain, requestInterceptorChain);
602
+ chain = chain.concat(responseInterceptorChain);
603
+
604
+ promise = Promise.resolve(config);
605
+ while (chain.length) {
606
+ promise = promise.then(chain.shift(), chain.shift());
607
+ }
608
+
609
+ return promise;
610
+ }
611
+
612
+
613
+ var newConfig = config;
614
+ while (requestInterceptorChain.length) {
615
+ var onFulfilled = requestInterceptorChain.shift();
616
+ var onRejected = requestInterceptorChain.shift();
617
+ try {
618
+ newConfig = onFulfilled(newConfig);
619
+ } catch (error) {
620
+ onRejected(error);
621
+ break;
622
+ }
623
+ }
624
+
625
+ try {
626
+ promise = dispatchRequest(newConfig);
627
+ } catch (error) {
628
+ return Promise.reject(error);
629
+ }
630
+
631
+ while (responseInterceptorChain.length) {
632
+ promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
633
+ }
634
+
635
+ return promise;
636
+ };
637
+
638
+ Axios.prototype.getUri = function getUri(config) {
639
+ config = mergeConfig(this.defaults, config);
640
+ var fullPath = buildFullPath(config.baseURL, config.url);
641
+ return buildURL(fullPath, config.params, config.paramsSerializer);
642
+ };
643
+
644
+ // Provide aliases for supported request methods
645
+ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
646
+ /*eslint func-names:0*/
647
+ Axios.prototype[method] = function(url, config) {
648
+ return this.request(mergeConfig(config || {}, {
649
+ method: method,
650
+ url: url,
651
+ data: (config || {}).data
652
+ }));
653
+ };
654
+ });
655
+
656
+ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
657
+ /*eslint func-names:0*/
658
+
659
+ function generateHTTPMethod(isForm) {
660
+ return function httpMethod(url, data, config) {
661
+ return this.request(mergeConfig(config || {}, {
662
+ method: method,
663
+ headers: isForm ? {
664
+ 'Content-Type': 'multipart/form-data'
665
+ } : {},
666
+ url: url,
667
+ data: data
668
+ }));
669
+ };
670
+ }
671
+
672
+ Axios.prototype[method] = generateHTTPMethod();
673
+
674
+ Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
675
+ });
676
+
677
+ module.exports = Axios;
678
+
679
+
680
+ /***/ }),
681
+
682
+ /***/ "./node_modules/axios/lib/core/AxiosError.js":
683
+ /*!***************************************************!*\
684
+ !*** ./node_modules/axios/lib/core/AxiosError.js ***!
685
+ \***************************************************/
686
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
687
+
688
+ "use strict";
689
+
690
+
691
+ var utils = __webpack_require__(/*! ../utils */ "./node_modules/axios/lib/utils.js");
692
+
693
+ /**
694
+ * Create an Error with the specified message, config, error code, request and response.
695
+ *
696
+ * @param {string} message The error message.
697
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
698
+ * @param {Object} [config] The config.
699
+ * @param {Object} [request] The request.
700
+ * @param {Object} [response] The response.
701
+ * @returns {Error} The created error.
702
+ */
703
+ function AxiosError(message, code, config, request, response) {
704
+ Error.call(this);
705
+ this.message = message;
706
+ this.name = 'AxiosError';
707
+ code && (this.code = code);
708
+ config && (this.config = config);
709
+ request && (this.request = request);
710
+ response && (this.response = response);
711
+ }
712
+
713
+ utils.inherits(AxiosError, Error, {
714
+ toJSON: function toJSON() {
715
+ return {
716
+ // Standard
717
+ message: this.message,
718
+ name: this.name,
719
+ // Microsoft
720
+ description: this.description,
721
+ number: this.number,
722
+ // Mozilla
723
+ fileName: this.fileName,
724
+ lineNumber: this.lineNumber,
725
+ columnNumber: this.columnNumber,
726
+ stack: this.stack,
727
+ // Axios
728
+ config: this.config,
729
+ code: this.code,
730
+ status: this.response && this.response.status ? this.response.status : null
731
+ };
732
+ }
733
+ });
734
+
735
+ var prototype = AxiosError.prototype;
736
+ var descriptors = {};
737
+
738
+ [
739
+ 'ERR_BAD_OPTION_VALUE',
740
+ 'ERR_BAD_OPTION',
741
+ 'ECONNABORTED',
742
+ 'ETIMEDOUT',
743
+ 'ERR_NETWORK',
744
+ 'ERR_FR_TOO_MANY_REDIRECTS',
745
+ 'ERR_DEPRECATED',
746
+ 'ERR_BAD_RESPONSE',
747
+ 'ERR_BAD_REQUEST',
748
+ 'ERR_CANCELED'
749
+ // eslint-disable-next-line func-names
750
+ ].forEach(function(code) {
751
+ descriptors[code] = {value: code};
752
+ });
753
+
754
+ Object.defineProperties(AxiosError, descriptors);
755
+ Object.defineProperty(prototype, 'isAxiosError', {value: true});
756
+
757
+ // eslint-disable-next-line func-names
758
+ AxiosError.from = function(error, code, config, request, response, customProps) {
759
+ var axiosError = Object.create(prototype);
760
+
761
+ utils.toFlatObject(error, axiosError, function filter(obj) {
762
+ return obj !== Error.prototype;
763
+ });
764
+
765
+ AxiosError.call(axiosError, error.message, code, config, request, response);
766
+
767
+ axiosError.name = error.name;
768
+
769
+ customProps && Object.assign(axiosError, customProps);
770
+
771
+ return axiosError;
772
+ };
773
+
774
+ module.exports = AxiosError;
775
+
776
+
777
+ /***/ }),
778
+
779
+ /***/ "./node_modules/axios/lib/core/InterceptorManager.js":
780
+ /*!***********************************************************!*\
781
+ !*** ./node_modules/axios/lib/core/InterceptorManager.js ***!
782
+ \***********************************************************/
783
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
784
+
785
+ "use strict";
786
+
787
+
788
+ var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
789
+
790
+ function InterceptorManager() {
791
+ this.handlers = [];
792
+ }
793
+
794
+ /**
795
+ * Add a new interceptor to the stack
796
+ *
797
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
798
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
799
+ *
800
+ * @return {Number} An ID used to remove interceptor later
801
+ */
802
+ InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
803
+ this.handlers.push({
804
+ fulfilled: fulfilled,
805
+ rejected: rejected,
806
+ synchronous: options ? options.synchronous : false,
807
+ runWhen: options ? options.runWhen : null
808
+ });
809
+ return this.handlers.length - 1;
810
+ };
811
+
812
+ /**
813
+ * Remove an interceptor from the stack
814
+ *
815
+ * @param {Number} id The ID that was returned by `use`
816
+ */
817
+ InterceptorManager.prototype.eject = function eject(id) {
818
+ if (this.handlers[id]) {
819
+ this.handlers[id] = null;
820
+ }
821
+ };
822
+
823
+ /**
824
+ * Iterate over all the registered interceptors
825
+ *
826
+ * This method is particularly useful for skipping over any
827
+ * interceptors that may have become `null` calling `eject`.
828
+ *
829
+ * @param {Function} fn The function to call for each interceptor
830
+ */
831
+ InterceptorManager.prototype.forEach = function forEach(fn) {
832
+ utils.forEach(this.handlers, function forEachHandler(h) {
833
+ if (h !== null) {
834
+ fn(h);
835
+ }
836
+ });
837
+ };
838
+
839
+ module.exports = InterceptorManager;
840
+
841
+
842
+ /***/ }),
843
+
844
+ /***/ "./node_modules/axios/lib/core/buildFullPath.js":
845
+ /*!******************************************************!*\
846
+ !*** ./node_modules/axios/lib/core/buildFullPath.js ***!
847
+ \******************************************************/
848
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
849
+
850
+ "use strict";
851
+
852
+
853
+ var isAbsoluteURL = __webpack_require__(/*! ../helpers/isAbsoluteURL */ "./node_modules/axios/lib/helpers/isAbsoluteURL.js");
854
+ var combineURLs = __webpack_require__(/*! ../helpers/combineURLs */ "./node_modules/axios/lib/helpers/combineURLs.js");
855
+
856
+ /**
857
+ * Creates a new URL by combining the baseURL with the requestedURL,
858
+ * only when the requestedURL is not already an absolute URL.
859
+ * If the requestURL is absolute, this function returns the requestedURL untouched.
860
+ *
861
+ * @param {string} baseURL The base URL
862
+ * @param {string} requestedURL Absolute or relative URL to combine
863
+ * @returns {string} The combined full path
864
+ */
865
+ module.exports = function buildFullPath(baseURL, requestedURL) {
866
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
867
+ return combineURLs(baseURL, requestedURL);
868
+ }
869
+ return requestedURL;
870
+ };
871
+
872
+
873
+ /***/ }),
874
+
875
+ /***/ "./node_modules/axios/lib/core/dispatchRequest.js":
876
+ /*!********************************************************!*\
877
+ !*** ./node_modules/axios/lib/core/dispatchRequest.js ***!
878
+ \********************************************************/
879
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
880
+
881
+ "use strict";
882
+
883
+
884
+ var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
885
+ var transformData = __webpack_require__(/*! ./transformData */ "./node_modules/axios/lib/core/transformData.js");
886
+ var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "./node_modules/axios/lib/cancel/isCancel.js");
887
+ var defaults = __webpack_require__(/*! ../defaults */ "./node_modules/axios/lib/defaults/index.js");
888
+ var CanceledError = __webpack_require__(/*! ../cancel/CanceledError */ "./node_modules/axios/lib/cancel/CanceledError.js");
889
+
890
+ /**
891
+ * Throws a `CanceledError` if cancellation has been requested.
892
+ */
893
+ function throwIfCancellationRequested(config) {
894
+ if (config.cancelToken) {
895
+ config.cancelToken.throwIfRequested();
896
+ }
897
+
898
+ if (config.signal && config.signal.aborted) {
899
+ throw new CanceledError();
900
+ }
901
+ }
902
+
903
+ /**
904
+ * Dispatch a request to the server using the configured adapter.
905
+ *
906
+ * @param {object} config The config that is to be used for the request
907
+ * @returns {Promise} The Promise to be fulfilled
908
+ */
909
+ module.exports = function dispatchRequest(config) {
910
+ throwIfCancellationRequested(config);
911
+
912
+ // Ensure headers exist
913
+ config.headers = config.headers || {};
914
+
915
+ // Transform request data
916
+ config.data = transformData.call(
917
+ config,
918
+ config.data,
919
+ config.headers,
920
+ config.transformRequest
921
+ );
922
+
923
+ // Flatten headers
924
+ config.headers = utils.merge(
925
+ config.headers.common || {},
926
+ config.headers[config.method] || {},
927
+ config.headers
928
+ );
929
+
930
+ utils.forEach(
931
+ ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
932
+ function cleanHeaderConfig(method) {
933
+ delete config.headers[method];
934
+ }
935
+ );
936
+
937
+ var adapter = config.adapter || defaults.adapter;
938
+
939
+ return adapter(config).then(function onAdapterResolution(response) {
940
+ throwIfCancellationRequested(config);
941
+
942
+ // Transform response data
943
+ response.data = transformData.call(
944
+ config,
945
+ response.data,
946
+ response.headers,
947
+ config.transformResponse
948
+ );
949
+
950
+ return response;
951
+ }, function onAdapterRejection(reason) {
952
+ if (!isCancel(reason)) {
953
+ throwIfCancellationRequested(config);
954
+
955
+ // Transform response data
956
+ if (reason && reason.response) {
957
+ reason.response.data = transformData.call(
958
+ config,
959
+ reason.response.data,
960
+ reason.response.headers,
961
+ config.transformResponse
962
+ );
963
+ }
964
+ }
965
+
966
+ return Promise.reject(reason);
967
+ });
968
+ };
969
+
970
+
971
+ /***/ }),
972
+
973
+ /***/ "./node_modules/axios/lib/core/mergeConfig.js":
974
+ /*!****************************************************!*\
975
+ !*** ./node_modules/axios/lib/core/mergeConfig.js ***!
976
+ \****************************************************/
977
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
978
+
979
+ "use strict";
980
+
981
+
982
+ var utils = __webpack_require__(/*! ../utils */ "./node_modules/axios/lib/utils.js");
983
+
984
+ /**
985
+ * Config-specific merge-function which creates a new config-object
986
+ * by merging two configuration objects together.
987
+ *
988
+ * @param {Object} config1
989
+ * @param {Object} config2
990
+ * @returns {Object} New object resulting from merging config2 to config1
991
+ */
992
+ module.exports = function mergeConfig(config1, config2) {
993
+ // eslint-disable-next-line no-param-reassign
994
+ config2 = config2 || {};
995
+ var config = {};
996
+
997
+ function getMergedValue(target, source) {
998
+ if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
999
+ return utils.merge(target, source);
1000
+ } else if (utils.isPlainObject(source)) {
1001
+ return utils.merge({}, source);
1002
+ } else if (utils.isArray(source)) {
1003
+ return source.slice();
1004
+ }
1005
+ return source;
1006
+ }
1007
+
1008
+ // eslint-disable-next-line consistent-return
1009
+ function mergeDeepProperties(prop) {
1010
+ if (!utils.isUndefined(config2[prop])) {
1011
+ return getMergedValue(config1[prop], config2[prop]);
1012
+ } else if (!utils.isUndefined(config1[prop])) {
1013
+ return getMergedValue(undefined, config1[prop]);
1014
+ }
1015
+ }
1016
+
1017
+ // eslint-disable-next-line consistent-return
1018
+ function valueFromConfig2(prop) {
1019
+ if (!utils.isUndefined(config2[prop])) {
1020
+ return getMergedValue(undefined, config2[prop]);
1021
+ }
1022
+ }
1023
+
1024
+ // eslint-disable-next-line consistent-return
1025
+ function defaultToConfig2(prop) {
1026
+ if (!utils.isUndefined(config2[prop])) {
1027
+ return getMergedValue(undefined, config2[prop]);
1028
+ } else if (!utils.isUndefined(config1[prop])) {
1029
+ return getMergedValue(undefined, config1[prop]);
1030
+ }
1031
+ }
1032
+
1033
+ // eslint-disable-next-line consistent-return
1034
+ function mergeDirectKeys(prop) {
1035
+ if (prop in config2) {
1036
+ return getMergedValue(config1[prop], config2[prop]);
1037
+ } else if (prop in config1) {
1038
+ return getMergedValue(undefined, config1[prop]);
1039
+ }
1040
+ }
1041
+
1042
+ var mergeMap = {
1043
+ 'url': valueFromConfig2,
1044
+ 'method': valueFromConfig2,
1045
+ 'data': valueFromConfig2,
1046
+ 'baseURL': defaultToConfig2,
1047
+ 'transformRequest': defaultToConfig2,
1048
+ 'transformResponse': defaultToConfig2,
1049
+ 'paramsSerializer': defaultToConfig2,
1050
+ 'timeout': defaultToConfig2,
1051
+ 'timeoutMessage': defaultToConfig2,
1052
+ 'withCredentials': defaultToConfig2,
1053
+ 'adapter': defaultToConfig2,
1054
+ 'responseType': defaultToConfig2,
1055
+ 'xsrfCookieName': defaultToConfig2,
1056
+ 'xsrfHeaderName': defaultToConfig2,
1057
+ 'onUploadProgress': defaultToConfig2,
1058
+ 'onDownloadProgress': defaultToConfig2,
1059
+ 'decompress': defaultToConfig2,
1060
+ 'maxContentLength': defaultToConfig2,
1061
+ 'maxBodyLength': defaultToConfig2,
1062
+ 'beforeRedirect': defaultToConfig2,
1063
+ 'transport': defaultToConfig2,
1064
+ 'httpAgent': defaultToConfig2,
1065
+ 'httpsAgent': defaultToConfig2,
1066
+ 'cancelToken': defaultToConfig2,
1067
+ 'socketPath': defaultToConfig2,
1068
+ 'responseEncoding': defaultToConfig2,
1069
+ 'validateStatus': mergeDirectKeys
1070
+ };
1071
+
1072
+ utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
1073
+ var merge = mergeMap[prop] || mergeDeepProperties;
1074
+ var configValue = merge(prop);
1075
+ (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
1076
+ });
1077
+
1078
+ return config;
1079
+ };
1080
+
1081
+
1082
+ /***/ }),
1083
+
1084
+ /***/ "./node_modules/axios/lib/core/settle.js":
1085
+ /*!***********************************************!*\
1086
+ !*** ./node_modules/axios/lib/core/settle.js ***!
1087
+ \***********************************************/
1088
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1089
+
1090
+ "use strict";
1091
+
1092
+
1093
+ var AxiosError = __webpack_require__(/*! ./AxiosError */ "./node_modules/axios/lib/core/AxiosError.js");
1094
+
1095
+ /**
1096
+ * Resolve or reject a Promise based on response status.
1097
+ *
1098
+ * @param {Function} resolve A function that resolves the promise.
1099
+ * @param {Function} reject A function that rejects the promise.
1100
+ * @param {object} response The response.
1101
+ */
1102
+ module.exports = function settle(resolve, reject, response) {
1103
+ var validateStatus = response.config.validateStatus;
1104
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
1105
+ resolve(response);
1106
+ } else {
1107
+ reject(new AxiosError(
1108
+ 'Request failed with status code ' + response.status,
1109
+ [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
1110
+ response.config,
1111
+ response.request,
1112
+ response
1113
+ ));
1114
+ }
1115
+ };
1116
+
1117
+
1118
+ /***/ }),
1119
+
1120
+ /***/ "./node_modules/axios/lib/core/transformData.js":
1121
+ /*!******************************************************!*\
1122
+ !*** ./node_modules/axios/lib/core/transformData.js ***!
1123
+ \******************************************************/
1124
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1125
+
1126
+ "use strict";
1127
+
1128
+
1129
+ var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
1130
+ var defaults = __webpack_require__(/*! ../defaults */ "./node_modules/axios/lib/defaults/index.js");
1131
+
1132
+ /**
1133
+ * Transform the data for a request or a response
1134
+ *
1135
+ * @param {Object|String} data The data to be transformed
1136
+ * @param {Array} headers The headers for the request or response
1137
+ * @param {Array|Function} fns A single function or Array of functions
1138
+ * @returns {*} The resulting transformed data
1139
+ */
1140
+ module.exports = function transformData(data, headers, fns) {
1141
+ var context = this || defaults;
1142
+ /*eslint no-param-reassign:0*/
1143
+ utils.forEach(fns, function transform(fn) {
1144
+ data = fn.call(context, data, headers);
1145
+ });
1146
+
1147
+ return data;
1148
+ };
1149
+
1150
+
1151
+ /***/ }),
1152
+
1153
+ /***/ "./node_modules/axios/lib/defaults/index.js":
1154
+ /*!**************************************************!*\
1155
+ !*** ./node_modules/axios/lib/defaults/index.js ***!
1156
+ \**************************************************/
1157
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1158
+
1159
+ "use strict";
1160
+
1161
+
1162
+ var utils = __webpack_require__(/*! ../utils */ "./node_modules/axios/lib/utils.js");
1163
+ var normalizeHeaderName = __webpack_require__(/*! ../helpers/normalizeHeaderName */ "./node_modules/axios/lib/helpers/normalizeHeaderName.js");
1164
+ var AxiosError = __webpack_require__(/*! ../core/AxiosError */ "./node_modules/axios/lib/core/AxiosError.js");
1165
+ var transitionalDefaults = __webpack_require__(/*! ./transitional */ "./node_modules/axios/lib/defaults/transitional.js");
1166
+ var toFormData = __webpack_require__(/*! ../helpers/toFormData */ "./node_modules/axios/lib/helpers/toFormData.js");
1167
+
1168
+ var DEFAULT_CONTENT_TYPE = {
1169
+ 'Content-Type': 'application/x-www-form-urlencoded'
1170
+ };
1171
+
1172
+ function setContentTypeIfUnset(headers, value) {
1173
+ if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
1174
+ headers['Content-Type'] = value;
1175
+ }
1176
+ }
1177
+
1178
+ function getDefaultAdapter() {
1179
+ var adapter;
1180
+ if (typeof XMLHttpRequest !== 'undefined') {
1181
+ // For browsers use XHR adapter
1182
+ adapter = __webpack_require__(/*! ../adapters/xhr */ "./node_modules/axios/lib/adapters/xhr.js");
1183
+ } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
1184
+ // For node use HTTP adapter
1185
+ adapter = __webpack_require__(/*! ../adapters/http */ "./node_modules/axios/lib/adapters/xhr.js");
1186
+ }
1187
+ return adapter;
1188
+ }
1189
+
1190
+ function stringifySafely(rawValue, parser, encoder) {
1191
+ if (utils.isString(rawValue)) {
1192
+ try {
1193
+ (parser || JSON.parse)(rawValue);
1194
+ return utils.trim(rawValue);
1195
+ } catch (e) {
1196
+ if (e.name !== 'SyntaxError') {
1197
+ throw e;
1198
+ }
1199
+ }
1200
+ }
1201
+
1202
+ return (encoder || JSON.stringify)(rawValue);
1203
+ }
1204
+
1205
+ var defaults = {
1206
+
1207
+ transitional: transitionalDefaults,
1208
+
1209
+ adapter: getDefaultAdapter(),
1210
+
1211
+ transformRequest: [function transformRequest(data, headers) {
1212
+ normalizeHeaderName(headers, 'Accept');
1213
+ normalizeHeaderName(headers, 'Content-Type');
1214
+
1215
+ if (utils.isFormData(data) ||
1216
+ utils.isArrayBuffer(data) ||
1217
+ utils.isBuffer(data) ||
1218
+ utils.isStream(data) ||
1219
+ utils.isFile(data) ||
1220
+ utils.isBlob(data)
1221
+ ) {
1222
+ return data;
1223
+ }
1224
+ if (utils.isArrayBufferView(data)) {
1225
+ return data.buffer;
1226
+ }
1227
+ if (utils.isURLSearchParams(data)) {
1228
+ setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
1229
+ return data.toString();
1230
+ }
1231
+
1232
+ var isObjectPayload = utils.isObject(data);
1233
+ var contentType = headers && headers['Content-Type'];
1234
+
1235
+ var isFileList;
1236
+
1237
+ if ((isFileList = utils.isFileList(data)) || (isObjectPayload && contentType === 'multipart/form-data')) {
1238
+ var _FormData = this.env && this.env.FormData;
1239
+ return toFormData(isFileList ? {'files[]': data} : data, _FormData && new _FormData());
1240
+ } else if (isObjectPayload || contentType === 'application/json') {
1241
+ setContentTypeIfUnset(headers, 'application/json');
1242
+ return stringifySafely(data);
1243
+ }
1244
+
1245
+ return data;
1246
+ }],
1247
+
1248
+ transformResponse: [function transformResponse(data) {
1249
+ var transitional = this.transitional || defaults.transitional;
1250
+ var silentJSONParsing = transitional && transitional.silentJSONParsing;
1251
+ var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
1252
+ var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
1253
+
1254
+ if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {
1255
+ try {
1256
+ return JSON.parse(data);
1257
+ } catch (e) {
1258
+ if (strictJSONParsing) {
1259
+ if (e.name === 'SyntaxError') {
1260
+ throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
1261
+ }
1262
+ throw e;
1263
+ }
1264
+ }
1265
+ }
1266
+
1267
+ return data;
1268
+ }],
1269
+
1270
+ /**
1271
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
1272
+ * timeout is not created.
1273
+ */
1274
+ timeout: 0,
1275
+
1276
+ xsrfCookieName: 'XSRF-TOKEN',
1277
+ xsrfHeaderName: 'X-XSRF-TOKEN',
1278
+
1279
+ maxContentLength: -1,
1280
+ maxBodyLength: -1,
1281
+
1282
+ env: {
1283
+ FormData: __webpack_require__(/*! ./env/FormData */ "./node_modules/axios/lib/helpers/null.js")
1284
+ },
1285
+
1286
+ validateStatus: function validateStatus(status) {
1287
+ return status >= 200 && status < 300;
1288
+ },
1289
+
1290
+ headers: {
1291
+ common: {
1292
+ 'Accept': 'application/json, text/plain, */*'
1293
+ }
1294
+ }
1295
+ };
1296
+
1297
+ utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
1298
+ defaults.headers[method] = {};
1299
+ });
1300
+
1301
+ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
1302
+ defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
1303
+ });
1304
+
1305
+ module.exports = defaults;
1306
+
1307
+
1308
+ /***/ }),
1309
+
1310
+ /***/ "./node_modules/axios/lib/defaults/transitional.js":
1311
+ /*!*********************************************************!*\
1312
+ !*** ./node_modules/axios/lib/defaults/transitional.js ***!
1313
+ \*********************************************************/
1314
+ /***/ ((module) => {
1315
+
1316
+ "use strict";
1317
+
1318
+
1319
+ module.exports = {
1320
+ silentJSONParsing: true,
1321
+ forcedJSONParsing: true,
1322
+ clarifyTimeoutError: false
1323
+ };
1324
+
1325
+
1326
+ /***/ }),
1327
+
1328
+ /***/ "./node_modules/axios/lib/env/data.js":
1329
+ /*!********************************************!*\
1330
+ !*** ./node_modules/axios/lib/env/data.js ***!
1331
+ \********************************************/
1332
+ /***/ ((module) => {
1333
+
1334
+ module.exports = {
1335
+ "version": "0.27.2"
1336
+ };
1337
+
1338
+ /***/ }),
1339
+
1340
+ /***/ "./node_modules/axios/lib/helpers/bind.js":
1341
+ /*!************************************************!*\
1342
+ !*** ./node_modules/axios/lib/helpers/bind.js ***!
1343
+ \************************************************/
1344
+ /***/ ((module) => {
1345
+
1346
+ "use strict";
1347
+
1348
+
1349
+ module.exports = function bind(fn, thisArg) {
1350
+ return function wrap() {
1351
+ var args = new Array(arguments.length);
1352
+ for (var i = 0; i < args.length; i++) {
1353
+ args[i] = arguments[i];
1354
+ }
1355
+ return fn.apply(thisArg, args);
1356
+ };
1357
+ };
1358
+
1359
+
1360
+ /***/ }),
1361
+
1362
+ /***/ "./node_modules/axios/lib/helpers/buildURL.js":
1363
+ /*!****************************************************!*\
1364
+ !*** ./node_modules/axios/lib/helpers/buildURL.js ***!
1365
+ \****************************************************/
1366
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1367
+
1368
+ "use strict";
1369
+
1370
+
1371
+ var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
1372
+
1373
+ function encode(val) {
1374
+ return encodeURIComponent(val).
1375
+ replace(/%3A/gi, ':').
1376
+ replace(/%24/g, '$').
1377
+ replace(/%2C/gi, ',').
1378
+ replace(/%20/g, '+').
1379
+ replace(/%5B/gi, '[').
1380
+ replace(/%5D/gi, ']');
1381
+ }
1382
+
1383
+ /**
1384
+ * Build a URL by appending params to the end
1385
+ *
1386
+ * @param {string} url The base of the url (e.g., http://www.google.com)
1387
+ * @param {object} [params] The params to be appended
1388
+ * @returns {string} The formatted url
1389
+ */
1390
+ module.exports = function buildURL(url, params, paramsSerializer) {
1391
+ /*eslint no-param-reassign:0*/
1392
+ if (!params) {
1393
+ return url;
1394
+ }
1395
+
1396
+ var serializedParams;
1397
+ if (paramsSerializer) {
1398
+ serializedParams = paramsSerializer(params);
1399
+ } else if (utils.isURLSearchParams(params)) {
1400
+ serializedParams = params.toString();
1401
+ } else {
1402
+ var parts = [];
1403
+
1404
+ utils.forEach(params, function serialize(val, key) {
1405
+ if (val === null || typeof val === 'undefined') {
1406
+ return;
1407
+ }
1408
+
1409
+ if (utils.isArray(val)) {
1410
+ key = key + '[]';
1411
+ } else {
1412
+ val = [val];
1413
+ }
1414
+
1415
+ utils.forEach(val, function parseValue(v) {
1416
+ if (utils.isDate(v)) {
1417
+ v = v.toISOString();
1418
+ } else if (utils.isObject(v)) {
1419
+ v = JSON.stringify(v);
1420
+ }
1421
+ parts.push(encode(key) + '=' + encode(v));
1422
+ });
1423
+ });
1424
+
1425
+ serializedParams = parts.join('&');
1426
+ }
1427
+
1428
+ if (serializedParams) {
1429
+ var hashmarkIndex = url.indexOf('#');
1430
+ if (hashmarkIndex !== -1) {
1431
+ url = url.slice(0, hashmarkIndex);
1432
+ }
1433
+
1434
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
1435
+ }
1436
+
1437
+ return url;
1438
+ };
1439
+
1440
+
1441
+ /***/ }),
1442
+
1443
+ /***/ "./node_modules/axios/lib/helpers/combineURLs.js":
1444
+ /*!*******************************************************!*\
1445
+ !*** ./node_modules/axios/lib/helpers/combineURLs.js ***!
1446
+ \*******************************************************/
1447
+ /***/ ((module) => {
1448
+
1449
+ "use strict";
1450
+
1451
+
1452
+ /**
1453
+ * Creates a new URL by combining the specified URLs
1454
+ *
1455
+ * @param {string} baseURL The base URL
1456
+ * @param {string} relativeURL The relative URL
1457
+ * @returns {string} The combined URL
1458
+ */
1459
+ module.exports = function combineURLs(baseURL, relativeURL) {
1460
+ return relativeURL
1461
+ ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
1462
+ : baseURL;
1463
+ };
1464
+
1465
+
1466
+ /***/ }),
1467
+
1468
+ /***/ "./node_modules/axios/lib/helpers/cookies.js":
1469
+ /*!***************************************************!*\
1470
+ !*** ./node_modules/axios/lib/helpers/cookies.js ***!
1471
+ \***************************************************/
1472
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1473
+
1474
+ "use strict";
1475
+
1476
+
1477
+ var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
1478
+
1479
+ module.exports = (
1480
+ utils.isStandardBrowserEnv() ?
1481
+
1482
+ // Standard browser envs support document.cookie
1483
+ (function standardBrowserEnv() {
1484
+ return {
1485
+ write: function write(name, value, expires, path, domain, secure) {
1486
+ var cookie = [];
1487
+ cookie.push(name + '=' + encodeURIComponent(value));
1488
+
1489
+ if (utils.isNumber(expires)) {
1490
+ cookie.push('expires=' + new Date(expires).toGMTString());
1491
+ }
1492
+
1493
+ if (utils.isString(path)) {
1494
+ cookie.push('path=' + path);
1495
+ }
1496
+
1497
+ if (utils.isString(domain)) {
1498
+ cookie.push('domain=' + domain);
1499
+ }
1500
+
1501
+ if (secure === true) {
1502
+ cookie.push('secure');
1503
+ }
1504
+
1505
+ document.cookie = cookie.join('; ');
1506
+ },
1507
+
1508
+ read: function read(name) {
1509
+ var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
1510
+ return (match ? decodeURIComponent(match[3]) : null);
1511
+ },
1512
+
1513
+ remove: function remove(name) {
1514
+ this.write(name, '', Date.now() - 86400000);
1515
+ }
1516
+ };
1517
+ })() :
1518
+
1519
+ // Non standard browser env (web workers, react-native) lack needed support.
1520
+ (function nonStandardBrowserEnv() {
1521
+ return {
1522
+ write: function write() {},
1523
+ read: function read() { return null; },
1524
+ remove: function remove() {}
1525
+ };
1526
+ })()
1527
+ );
1528
+
1529
+
1530
+ /***/ }),
1531
+
1532
+ /***/ "./node_modules/axios/lib/helpers/isAbsoluteURL.js":
1533
+ /*!*********************************************************!*\
1534
+ !*** ./node_modules/axios/lib/helpers/isAbsoluteURL.js ***!
1535
+ \*********************************************************/
1536
+ /***/ ((module) => {
1537
+
1538
+ "use strict";
1539
+
1540
+
1541
+ /**
1542
+ * Determines whether the specified URL is absolute
1543
+ *
1544
+ * @param {string} url The URL to test
1545
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
1546
+ */
1547
+ module.exports = function isAbsoluteURL(url) {
1548
+ // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
1549
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
1550
+ // by any combination of letters, digits, plus, period, or hyphen.
1551
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
1552
+ };
1553
+
1554
+
1555
+ /***/ }),
1556
+
1557
+ /***/ "./node_modules/axios/lib/helpers/isAxiosError.js":
1558
+ /*!********************************************************!*\
1559
+ !*** ./node_modules/axios/lib/helpers/isAxiosError.js ***!
1560
+ \********************************************************/
1561
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1562
+
1563
+ "use strict";
1564
+
1565
+
1566
+ var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
1567
+
1568
+ /**
1569
+ * Determines whether the payload is an error thrown by Axios
1570
+ *
1571
+ * @param {*} payload The value to test
1572
+ * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
1573
+ */
1574
+ module.exports = function isAxiosError(payload) {
1575
+ return utils.isObject(payload) && (payload.isAxiosError === true);
1576
+ };
1577
+
1578
+
1579
+ /***/ }),
1580
+
1581
+ /***/ "./node_modules/axios/lib/helpers/isURLSameOrigin.js":
1582
+ /*!***********************************************************!*\
1583
+ !*** ./node_modules/axios/lib/helpers/isURLSameOrigin.js ***!
1584
+ \***********************************************************/
1585
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1586
+
1587
+ "use strict";
1588
+
1589
+
1590
+ var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
1591
+
1592
+ module.exports = (
1593
+ utils.isStandardBrowserEnv() ?
1594
+
1595
+ // Standard browser envs have full support of the APIs needed to test
1596
+ // whether the request URL is of the same origin as current location.
1597
+ (function standardBrowserEnv() {
1598
+ var msie = /(msie|trident)/i.test(navigator.userAgent);
1599
+ var urlParsingNode = document.createElement('a');
1600
+ var originURL;
1601
+
1602
+ /**
1603
+ * Parse a URL to discover it's components
1604
+ *
1605
+ * @param {String} url The URL to be parsed
1606
+ * @returns {Object}
1607
+ */
1608
+ function resolveURL(url) {
1609
+ var href = url;
1610
+
1611
+ if (msie) {
1612
+ // IE needs attribute set twice to normalize properties
1613
+ urlParsingNode.setAttribute('href', href);
1614
+ href = urlParsingNode.href;
1615
+ }
1616
+
1617
+ urlParsingNode.setAttribute('href', href);
1618
+
1619
+ // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
1620
+ return {
1621
+ href: urlParsingNode.href,
1622
+ protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
1623
+ host: urlParsingNode.host,
1624
+ search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
1625
+ hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
1626
+ hostname: urlParsingNode.hostname,
1627
+ port: urlParsingNode.port,
1628
+ pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
1629
+ urlParsingNode.pathname :
1630
+ '/' + urlParsingNode.pathname
1631
+ };
1632
+ }
1633
+
1634
+ originURL = resolveURL(window.location.href);
1635
+
1636
+ /**
1637
+ * Determine if a URL shares the same origin as the current location
1638
+ *
1639
+ * @param {String} requestURL The URL to test
1640
+ * @returns {boolean} True if URL shares the same origin, otherwise false
1641
+ */
1642
+ return function isURLSameOrigin(requestURL) {
1643
+ var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
1644
+ return (parsed.protocol === originURL.protocol &&
1645
+ parsed.host === originURL.host);
1646
+ };
1647
+ })() :
1648
+
1649
+ // Non standard browser envs (web workers, react-native) lack needed support.
1650
+ (function nonStandardBrowserEnv() {
1651
+ return function isURLSameOrigin() {
1652
+ return true;
1653
+ };
1654
+ })()
1655
+ );
1656
+
1657
+
1658
+ /***/ }),
1659
+
1660
+ /***/ "./node_modules/axios/lib/helpers/normalizeHeaderName.js":
1661
+ /*!***************************************************************!*\
1662
+ !*** ./node_modules/axios/lib/helpers/normalizeHeaderName.js ***!
1663
+ \***************************************************************/
1664
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1665
+
1666
+ "use strict";
1667
+
1668
+
1669
+ var utils = __webpack_require__(/*! ../utils */ "./node_modules/axios/lib/utils.js");
1670
+
1671
+ module.exports = function normalizeHeaderName(headers, normalizedName) {
1672
+ utils.forEach(headers, function processHeader(value, name) {
1673
+ if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
1674
+ headers[normalizedName] = value;
1675
+ delete headers[name];
1676
+ }
1677
+ });
1678
+ };
1679
+
1680
+
1681
+ /***/ }),
1682
+
1683
+ /***/ "./node_modules/axios/lib/helpers/null.js":
1684
+ /*!************************************************!*\
1685
+ !*** ./node_modules/axios/lib/helpers/null.js ***!
1686
+ \************************************************/
1687
+ /***/ ((module) => {
1688
+
1689
+ // eslint-disable-next-line strict
1690
+ module.exports = null;
1691
+
1692
+
1693
+ /***/ }),
1694
+
1695
+ /***/ "./node_modules/axios/lib/helpers/parseHeaders.js":
1696
+ /*!********************************************************!*\
1697
+ !*** ./node_modules/axios/lib/helpers/parseHeaders.js ***!
1698
+ \********************************************************/
1699
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1700
+
1701
+ "use strict";
1702
+
1703
+
1704
+ var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
1705
+
1706
+ // Headers whose duplicates are ignored by node
1707
+ // c.f. https://nodejs.org/api/http.html#http_message_headers
1708
+ var ignoreDuplicateOf = [
1709
+ 'age', 'authorization', 'content-length', 'content-type', 'etag',
1710
+ 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
1711
+ 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
1712
+ 'referer', 'retry-after', 'user-agent'
1713
+ ];
1714
+
1715
+ /**
1716
+ * Parse headers into an object
1717
+ *
1718
+ * ```
1719
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
1720
+ * Content-Type: application/json
1721
+ * Connection: keep-alive
1722
+ * Transfer-Encoding: chunked
1723
+ * ```
1724
+ *
1725
+ * @param {String} headers Headers needing to be parsed
1726
+ * @returns {Object} Headers parsed into an object
1727
+ */
1728
+ module.exports = function parseHeaders(headers) {
1729
+ var parsed = {};
1730
+ var key;
1731
+ var val;
1732
+ var i;
1733
+
1734
+ if (!headers) { return parsed; }
1735
+
1736
+ utils.forEach(headers.split('\n'), function parser(line) {
1737
+ i = line.indexOf(':');
1738
+ key = utils.trim(line.substr(0, i)).toLowerCase();
1739
+ val = utils.trim(line.substr(i + 1));
1740
+
1741
+ if (key) {
1742
+ if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
1743
+ return;
1744
+ }
1745
+ if (key === 'set-cookie') {
1746
+ parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
1747
+ } else {
1748
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
1749
+ }
1750
+ }
1751
+ });
1752
+
1753
+ return parsed;
1754
+ };
1755
+
1756
+
1757
+ /***/ }),
1758
+
1759
+ /***/ "./node_modules/axios/lib/helpers/parseProtocol.js":
1760
+ /*!*********************************************************!*\
1761
+ !*** ./node_modules/axios/lib/helpers/parseProtocol.js ***!
1762
+ \*********************************************************/
1763
+ /***/ ((module) => {
1764
+
1765
+ "use strict";
1766
+
1767
+
1768
+ module.exports = function parseProtocol(url) {
1769
+ var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
1770
+ return match && match[1] || '';
1771
+ };
1772
+
1773
+
1774
+ /***/ }),
1775
+
1776
+ /***/ "./node_modules/axios/lib/helpers/spread.js":
1777
+ /*!**************************************************!*\
1778
+ !*** ./node_modules/axios/lib/helpers/spread.js ***!
1779
+ \**************************************************/
1780
+ /***/ ((module) => {
1781
+
1782
+ "use strict";
1783
+
1784
+
1785
+ /**
1786
+ * Syntactic sugar for invoking a function and expanding an array for arguments.
1787
+ *
1788
+ * Common use case would be to use `Function.prototype.apply`.
1789
+ *
1790
+ * ```js
1791
+ * function f(x, y, z) {}
1792
+ * var args = [1, 2, 3];
1793
+ * f.apply(null, args);
1794
+ * ```
1795
+ *
1796
+ * With `spread` this example can be re-written.
1797
+ *
1798
+ * ```js
1799
+ * spread(function(x, y, z) {})([1, 2, 3]);
1800
+ * ```
1801
+ *
1802
+ * @param {Function} callback
1803
+ * @returns {Function}
1804
+ */
1805
+ module.exports = function spread(callback) {
1806
+ return function wrap(arr) {
1807
+ return callback.apply(null, arr);
1808
+ };
1809
+ };
1810
+
1811
+
1812
+ /***/ }),
1813
+
1814
+ /***/ "./node_modules/axios/lib/helpers/toFormData.js":
1815
+ /*!******************************************************!*\
1816
+ !*** ./node_modules/axios/lib/helpers/toFormData.js ***!
1817
+ \******************************************************/
1818
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1819
+
1820
+ "use strict";
1821
+
1822
+
1823
+ var utils = __webpack_require__(/*! ../utils */ "./node_modules/axios/lib/utils.js");
1824
+
1825
+ /**
1826
+ * Convert a data object to FormData
1827
+ * @param {Object} obj
1828
+ * @param {?Object} [formData]
1829
+ * @returns {Object}
1830
+ **/
1831
+
1832
+ function toFormData(obj, formData) {
1833
+ // eslint-disable-next-line no-param-reassign
1834
+ formData = formData || new FormData();
1835
+
1836
+ var stack = [];
1837
+
1838
+ function convertValue(value) {
1839
+ if (value === null) return '';
1840
+
1841
+ if (utils.isDate(value)) {
1842
+ return value.toISOString();
1843
+ }
1844
+
1845
+ if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
1846
+ return typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
1847
+ }
1848
+
1849
+ return value;
1850
+ }
1851
+
1852
+ function build(data, parentKey) {
1853
+ if (utils.isPlainObject(data) || utils.isArray(data)) {
1854
+ if (stack.indexOf(data) !== -1) {
1855
+ throw Error('Circular reference detected in ' + parentKey);
1856
+ }
1857
+
1858
+ stack.push(data);
1859
+
1860
+ utils.forEach(data, function each(value, key) {
1861
+ if (utils.isUndefined(value)) return;
1862
+ var fullKey = parentKey ? parentKey + '.' + key : key;
1863
+ var arr;
1864
+
1865
+ if (value && !parentKey && typeof value === 'object') {
1866
+ if (utils.endsWith(key, '{}')) {
1867
+ // eslint-disable-next-line no-param-reassign
1868
+ value = JSON.stringify(value);
1869
+ } else if (utils.endsWith(key, '[]') && (arr = utils.toArray(value))) {
1870
+ // eslint-disable-next-line func-names
1871
+ arr.forEach(function(el) {
1872
+ !utils.isUndefined(el) && formData.append(fullKey, convertValue(el));
1873
+ });
1874
+ return;
1875
+ }
1876
+ }
1877
+
1878
+ build(value, fullKey);
1879
+ });
1880
+
1881
+ stack.pop();
1882
+ } else {
1883
+ formData.append(parentKey, convertValue(data));
1884
+ }
1885
+ }
1886
+
1887
+ build(obj);
1888
+
1889
+ return formData;
1890
+ }
1891
+
1892
+ module.exports = toFormData;
1893
+
1894
+
1895
+ /***/ }),
1896
+
1897
+ /***/ "./node_modules/axios/lib/helpers/validator.js":
1898
+ /*!*****************************************************!*\
1899
+ !*** ./node_modules/axios/lib/helpers/validator.js ***!
1900
+ \*****************************************************/
1901
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1902
+
1903
+ "use strict";
1904
+
1905
+
1906
+ var VERSION = (__webpack_require__(/*! ../env/data */ "./node_modules/axios/lib/env/data.js").version);
1907
+ var AxiosError = __webpack_require__(/*! ../core/AxiosError */ "./node_modules/axios/lib/core/AxiosError.js");
1908
+
1909
+ var validators = {};
1910
+
1911
+ // eslint-disable-next-line func-names
1912
+ ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {
1913
+ validators[type] = function validator(thing) {
1914
+ return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
1915
+ };
1916
+ });
1917
+
1918
+ var deprecatedWarnings = {};
1919
+
1920
+ /**
1921
+ * Transitional option validator
1922
+ * @param {function|boolean?} validator - set to false if the transitional option has been removed
1923
+ * @param {string?} version - deprecated version / removed since version
1924
+ * @param {string?} message - some message with additional info
1925
+ * @returns {function}
1926
+ */
1927
+ validators.transitional = function transitional(validator, version, message) {
1928
+ function formatMessage(opt, desc) {
1929
+ return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
1930
+ }
1931
+
1932
+ // eslint-disable-next-line func-names
1933
+ return function(value, opt, opts) {
1934
+ if (validator === false) {
1935
+ throw new AxiosError(
1936
+ formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
1937
+ AxiosError.ERR_DEPRECATED
1938
+ );
1939
+ }
1940
+
1941
+ if (version && !deprecatedWarnings[opt]) {
1942
+ deprecatedWarnings[opt] = true;
1943
+ // eslint-disable-next-line no-console
1944
+ console.warn(
1945
+ formatMessage(
1946
+ opt,
1947
+ ' has been deprecated since v' + version + ' and will be removed in the near future'
1948
+ )
1949
+ );
1950
+ }
1951
+
1952
+ return validator ? validator(value, opt, opts) : true;
1953
+ };
1954
+ };
1955
+
1956
+ /**
1957
+ * Assert object's properties type
1958
+ * @param {object} options
1959
+ * @param {object} schema
1960
+ * @param {boolean?} allowUnknown
1961
+ */
1962
+
1963
+ function assertOptions(options, schema, allowUnknown) {
1964
+ if (typeof options !== 'object') {
1965
+ throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
1966
+ }
1967
+ var keys = Object.keys(options);
1968
+ var i = keys.length;
1969
+ while (i-- > 0) {
1970
+ var opt = keys[i];
1971
+ var validator = schema[opt];
1972
+ if (validator) {
1973
+ var value = options[opt];
1974
+ var result = value === undefined || validator(value, opt, options);
1975
+ if (result !== true) {
1976
+ throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
1977
+ }
1978
+ continue;
1979
+ }
1980
+ if (allowUnknown !== true) {
1981
+ throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
1982
+ }
1983
+ }
1984
+ }
1985
+
1986
+ module.exports = {
1987
+ assertOptions: assertOptions,
1988
+ validators: validators
1989
+ };
1990
+
1991
+
1992
+ /***/ }),
1993
+
1994
+ /***/ "./node_modules/axios/lib/utils.js":
1995
+ /*!*****************************************!*\
1996
+ !*** ./node_modules/axios/lib/utils.js ***!
1997
+ \*****************************************/
1998
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1999
+
2000
+ "use strict";
2001
+
2002
+
2003
+ var bind = __webpack_require__(/*! ./helpers/bind */ "./node_modules/axios/lib/helpers/bind.js");
2004
+
2005
+ // utils is a library of generic helper functions non-specific to axios
2006
+
2007
+ var toString = Object.prototype.toString;
2008
+
2009
+ // eslint-disable-next-line func-names
2010
+ var kindOf = (function(cache) {
2011
+ // eslint-disable-next-line func-names
2012
+ return function(thing) {
2013
+ var str = toString.call(thing);
2014
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
2015
+ };
2016
+ })(Object.create(null));
2017
+
2018
+ function kindOfTest(type) {
2019
+ type = type.toLowerCase();
2020
+ return function isKindOf(thing) {
2021
+ return kindOf(thing) === type;
2022
+ };
2023
+ }
2024
+
2025
+ /**
2026
+ * Determine if a value is an Array
2027
+ *
2028
+ * @param {Object} val The value to test
2029
+ * @returns {boolean} True if value is an Array, otherwise false
2030
+ */
2031
+ function isArray(val) {
2032
+ return Array.isArray(val);
2033
+ }
2034
+
2035
+ /**
2036
+ * Determine if a value is undefined
2037
+ *
2038
+ * @param {Object} val The value to test
2039
+ * @returns {boolean} True if the value is undefined, otherwise false
2040
+ */
2041
+ function isUndefined(val) {
2042
+ return typeof val === 'undefined';
2043
+ }
2044
+
2045
+ /**
2046
+ * Determine if a value is a Buffer
2047
+ *
2048
+ * @param {Object} val The value to test
2049
+ * @returns {boolean} True if value is a Buffer, otherwise false
2050
+ */
2051
+ function isBuffer(val) {
2052
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
2053
+ && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
2054
+ }
2055
+
2056
+ /**
2057
+ * Determine if a value is an ArrayBuffer
2058
+ *
2059
+ * @function
2060
+ * @param {Object} val The value to test
2061
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
2062
+ */
2063
+ var isArrayBuffer = kindOfTest('ArrayBuffer');
2064
+
2065
+
2066
+ /**
2067
+ * Determine if a value is a view on an ArrayBuffer
2068
+ *
2069
+ * @param {Object} val The value to test
2070
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
2071
+ */
2072
+ function isArrayBufferView(val) {
2073
+ var result;
2074
+ if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
2075
+ result = ArrayBuffer.isView(val);
2076
+ } else {
2077
+ result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
2078
+ }
2079
+ return result;
2080
+ }
2081
+
2082
+ /**
2083
+ * Determine if a value is a String
2084
+ *
2085
+ * @param {Object} val The value to test
2086
+ * @returns {boolean} True if value is a String, otherwise false
2087
+ */
2088
+ function isString(val) {
2089
+ return typeof val === 'string';
2090
+ }
2091
+
2092
+ /**
2093
+ * Determine if a value is a Number
2094
+ *
2095
+ * @param {Object} val The value to test
2096
+ * @returns {boolean} True if value is a Number, otherwise false
2097
+ */
2098
+ function isNumber(val) {
2099
+ return typeof val === 'number';
2100
+ }
2101
+
2102
+ /**
2103
+ * Determine if a value is an Object
2104
+ *
2105
+ * @param {Object} val The value to test
2106
+ * @returns {boolean} True if value is an Object, otherwise false
2107
+ */
2108
+ function isObject(val) {
2109
+ return val !== null && typeof val === 'object';
2110
+ }
2111
+
2112
+ /**
2113
+ * Determine if a value is a plain Object
2114
+ *
2115
+ * @param {Object} val The value to test
2116
+ * @return {boolean} True if value is a plain Object, otherwise false
2117
+ */
2118
+ function isPlainObject(val) {
2119
+ if (kindOf(val) !== 'object') {
2120
+ return false;
2121
+ }
2122
+
2123
+ var prototype = Object.getPrototypeOf(val);
2124
+ return prototype === null || prototype === Object.prototype;
2125
+ }
2126
+
2127
+ /**
2128
+ * Determine if a value is a Date
2129
+ *
2130
+ * @function
2131
+ * @param {Object} val The value to test
2132
+ * @returns {boolean} True if value is a Date, otherwise false
2133
+ */
2134
+ var isDate = kindOfTest('Date');
2135
+
2136
+ /**
2137
+ * Determine if a value is a File
2138
+ *
2139
+ * @function
2140
+ * @param {Object} val The value to test
2141
+ * @returns {boolean} True if value is a File, otherwise false
2142
+ */
2143
+ var isFile = kindOfTest('File');
2144
+
2145
+ /**
2146
+ * Determine if a value is a Blob
2147
+ *
2148
+ * @function
2149
+ * @param {Object} val The value to test
2150
+ * @returns {boolean} True if value is a Blob, otherwise false
2151
+ */
2152
+ var isBlob = kindOfTest('Blob');
2153
+
2154
+ /**
2155
+ * Determine if a value is a FileList
2156
+ *
2157
+ * @function
2158
+ * @param {Object} val The value to test
2159
+ * @returns {boolean} True if value is a File, otherwise false
2160
+ */
2161
+ var isFileList = kindOfTest('FileList');
2162
+
2163
+ /**
2164
+ * Determine if a value is a Function
2165
+ *
2166
+ * @param {Object} val The value to test
2167
+ * @returns {boolean} True if value is a Function, otherwise false
2168
+ */
2169
+ function isFunction(val) {
2170
+ return toString.call(val) === '[object Function]';
2171
+ }
2172
+
2173
+ /**
2174
+ * Determine if a value is a Stream
2175
+ *
2176
+ * @param {Object} val The value to test
2177
+ * @returns {boolean} True if value is a Stream, otherwise false
2178
+ */
2179
+ function isStream(val) {
2180
+ return isObject(val) && isFunction(val.pipe);
2181
+ }
2182
+
2183
+ /**
2184
+ * Determine if a value is a FormData
2185
+ *
2186
+ * @param {Object} thing The value to test
2187
+ * @returns {boolean} True if value is an FormData, otherwise false
2188
+ */
2189
+ function isFormData(thing) {
2190
+ var pattern = '[object FormData]';
2191
+ return thing && (
2192
+ (typeof FormData === 'function' && thing instanceof FormData) ||
2193
+ toString.call(thing) === pattern ||
2194
+ (isFunction(thing.toString) && thing.toString() === pattern)
2195
+ );
2196
+ }
2197
+
2198
+ /**
2199
+ * Determine if a value is a URLSearchParams object
2200
+ * @function
2201
+ * @param {Object} val The value to test
2202
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
2203
+ */
2204
+ var isURLSearchParams = kindOfTest('URLSearchParams');
2205
+
2206
+ /**
2207
+ * Trim excess whitespace off the beginning and end of a string
2208
+ *
2209
+ * @param {String} str The String to trim
2210
+ * @returns {String} The String freed of excess whitespace
2211
+ */
2212
+ function trim(str) {
2213
+ return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
2214
+ }
2215
+
2216
+ /**
2217
+ * Determine if we're running in a standard browser environment
2218
+ *
2219
+ * This allows axios to run in a web worker, and react-native.
2220
+ * Both environments support XMLHttpRequest, but not fully standard globals.
2221
+ *
2222
+ * web workers:
2223
+ * typeof window -> undefined
2224
+ * typeof document -> undefined
2225
+ *
2226
+ * react-native:
2227
+ * navigator.product -> 'ReactNative'
2228
+ * nativescript
2229
+ * navigator.product -> 'NativeScript' or 'NS'
2230
+ */
2231
+ function isStandardBrowserEnv() {
2232
+ if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
2233
+ navigator.product === 'NativeScript' ||
2234
+ navigator.product === 'NS')) {
2235
+ return false;
2236
+ }
2237
+ return (
2238
+ typeof window !== 'undefined' &&
2239
+ typeof document !== 'undefined'
2240
+ );
2241
+ }
2242
+
2243
+ /**
2244
+ * Iterate over an Array or an Object invoking a function for each item.
2245
+ *
2246
+ * If `obj` is an Array callback will be called passing
2247
+ * the value, index, and complete array for each item.
2248
+ *
2249
+ * If 'obj' is an Object callback will be called passing
2250
+ * the value, key, and complete object for each property.
2251
+ *
2252
+ * @param {Object|Array} obj The object to iterate
2253
+ * @param {Function} fn The callback to invoke for each item
2254
+ */
2255
+ function forEach(obj, fn) {
2256
+ // Don't bother if no value provided
2257
+ if (obj === null || typeof obj === 'undefined') {
2258
+ return;
2259
+ }
2260
+
2261
+ // Force an array if not already something iterable
2262
+ if (typeof obj !== 'object') {
2263
+ /*eslint no-param-reassign:0*/
2264
+ obj = [obj];
2265
+ }
2266
+
2267
+ if (isArray(obj)) {
2268
+ // Iterate over array values
2269
+ for (var i = 0, l = obj.length; i < l; i++) {
2270
+ fn.call(null, obj[i], i, obj);
2271
+ }
2272
+ } else {
2273
+ // Iterate over object keys
2274
+ for (var key in obj) {
2275
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
2276
+ fn.call(null, obj[key], key, obj);
2277
+ }
2278
+ }
2279
+ }
2280
+ }
2281
+
2282
+ /**
2283
+ * Accepts varargs expecting each argument to be an object, then
2284
+ * immutably merges the properties of each object and returns result.
2285
+ *
2286
+ * When multiple objects contain the same key the later object in
2287
+ * the arguments list will take precedence.
2288
+ *
2289
+ * Example:
2290
+ *
2291
+ * ```js
2292
+ * var result = merge({foo: 123}, {foo: 456});
2293
+ * console.log(result.foo); // outputs 456
2294
+ * ```
2295
+ *
2296
+ * @param {Object} obj1 Object to merge
2297
+ * @returns {Object} Result of all merge properties
2298
+ */
2299
+ function merge(/* obj1, obj2, obj3, ... */) {
2300
+ var result = {};
2301
+ function assignValue(val, key) {
2302
+ if (isPlainObject(result[key]) && isPlainObject(val)) {
2303
+ result[key] = merge(result[key], val);
2304
+ } else if (isPlainObject(val)) {
2305
+ result[key] = merge({}, val);
2306
+ } else if (isArray(val)) {
2307
+ result[key] = val.slice();
2308
+ } else {
2309
+ result[key] = val;
2310
+ }
2311
+ }
2312
+
2313
+ for (var i = 0, l = arguments.length; i < l; i++) {
2314
+ forEach(arguments[i], assignValue);
2315
+ }
2316
+ return result;
2317
+ }
2318
+
2319
+ /**
2320
+ * Extends object a by mutably adding to it the properties of object b.
2321
+ *
2322
+ * @param {Object} a The object to be extended
2323
+ * @param {Object} b The object to copy properties from
2324
+ * @param {Object} thisArg The object to bind function to
2325
+ * @return {Object} The resulting value of object a
2326
+ */
2327
+ function extend(a, b, thisArg) {
2328
+ forEach(b, function assignValue(val, key) {
2329
+ if (thisArg && typeof val === 'function') {
2330
+ a[key] = bind(val, thisArg);
2331
+ } else {
2332
+ a[key] = val;
2333
+ }
2334
+ });
2335
+ return a;
2336
+ }
2337
+
2338
+ /**
2339
+ * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
2340
+ *
2341
+ * @param {string} content with BOM
2342
+ * @return {string} content value without BOM
2343
+ */
2344
+ function stripBOM(content) {
2345
+ if (content.charCodeAt(0) === 0xFEFF) {
2346
+ content = content.slice(1);
2347
+ }
2348
+ return content;
2349
+ }
2350
+
2351
+ /**
2352
+ * Inherit the prototype methods from one constructor into another
2353
+ * @param {function} constructor
2354
+ * @param {function} superConstructor
2355
+ * @param {object} [props]
2356
+ * @param {object} [descriptors]
2357
+ */
2358
+
2359
+ function inherits(constructor, superConstructor, props, descriptors) {
2360
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors);
2361
+ constructor.prototype.constructor = constructor;
2362
+ props && Object.assign(constructor.prototype, props);
2363
+ }
2364
+
2365
+ /**
2366
+ * Resolve object with deep prototype chain to a flat object
2367
+ * @param {Object} sourceObj source object
2368
+ * @param {Object} [destObj]
2369
+ * @param {Function} [filter]
2370
+ * @returns {Object}
2371
+ */
2372
+
2373
+ function toFlatObject(sourceObj, destObj, filter) {
2374
+ var props;
2375
+ var i;
2376
+ var prop;
2377
+ var merged = {};
2378
+
2379
+ destObj = destObj || {};
2380
+
2381
+ do {
2382
+ props = Object.getOwnPropertyNames(sourceObj);
2383
+ i = props.length;
2384
+ while (i-- > 0) {
2385
+ prop = props[i];
2386
+ if (!merged[prop]) {
2387
+ destObj[prop] = sourceObj[prop];
2388
+ merged[prop] = true;
2389
+ }
2390
+ }
2391
+ sourceObj = Object.getPrototypeOf(sourceObj);
2392
+ } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
2393
+
2394
+ return destObj;
2395
+ }
2396
+
2397
+ /*
2398
+ * determines whether a string ends with the characters of a specified string
2399
+ * @param {String} str
2400
+ * @param {String} searchString
2401
+ * @param {Number} [position= 0]
2402
+ * @returns {boolean}
2403
+ */
2404
+ function endsWith(str, searchString, position) {
2405
+ str = String(str);
2406
+ if (position === undefined || position > str.length) {
2407
+ position = str.length;
2408
+ }
2409
+ position -= searchString.length;
2410
+ var lastIndex = str.indexOf(searchString, position);
2411
+ return lastIndex !== -1 && lastIndex === position;
2412
+ }
2413
+
2414
+
2415
+ /**
2416
+ * Returns new array from array like object
2417
+ * @param {*} [thing]
2418
+ * @returns {Array}
2419
+ */
2420
+ function toArray(thing) {
2421
+ if (!thing) return null;
2422
+ var i = thing.length;
2423
+ if (isUndefined(i)) return null;
2424
+ var arr = new Array(i);
2425
+ while (i-- > 0) {
2426
+ arr[i] = thing[i];
2427
+ }
2428
+ return arr;
2429
+ }
2430
+
2431
+ // eslint-disable-next-line func-names
2432
+ var isTypedArray = (function(TypedArray) {
2433
+ // eslint-disable-next-line func-names
2434
+ return function(thing) {
2435
+ return TypedArray && thing instanceof TypedArray;
2436
+ };
2437
+ })(typeof Uint8Array !== 'undefined' && Object.getPrototypeOf(Uint8Array));
2438
+
2439
+ module.exports = {
2440
+ isArray: isArray,
2441
+ isArrayBuffer: isArrayBuffer,
2442
+ isBuffer: isBuffer,
2443
+ isFormData: isFormData,
2444
+ isArrayBufferView: isArrayBufferView,
2445
+ isString: isString,
2446
+ isNumber: isNumber,
2447
+ isObject: isObject,
2448
+ isPlainObject: isPlainObject,
2449
+ isUndefined: isUndefined,
2450
+ isDate: isDate,
2451
+ isFile: isFile,
2452
+ isBlob: isBlob,
2453
+ isFunction: isFunction,
2454
+ isStream: isStream,
2455
+ isURLSearchParams: isURLSearchParams,
2456
+ isStandardBrowserEnv: isStandardBrowserEnv,
2457
+ forEach: forEach,
2458
+ merge: merge,
2459
+ extend: extend,
2460
+ trim: trim,
2461
+ stripBOM: stripBOM,
2462
+ inherits: inherits,
2463
+ toFlatObject: toFlatObject,
2464
+ kindOf: kindOf,
2465
+ kindOfTest: kindOfTest,
2466
+ endsWith: endsWith,
2467
+ toArray: toArray,
2468
+ isTypedArray: isTypedArray,
2469
+ isFileList: isFileList
2470
+ };
2471
+
2472
+
2473
+ /***/ }),
2474
+
2475
+ /***/ "./lib/helpers/enum.helper.ts":
2476
+ /*!************************************!*\
2477
+ !*** ./lib/helpers/enum.helper.ts ***!
2478
+ \************************************/
2479
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2480
+
2481
+ "use strict";
2482
+ __webpack_require__.r(__webpack_exports__);
2483
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2484
+ /* harmony export */ "EnumHelper": () => (/* binding */ EnumHelper),
2485
+ /* harmony export */ "enumHelper": () => (/* binding */ enumHelper)
2486
+ /* harmony export */ });
2487
+ class EnumHelper {
2488
+ getAllNames(T) {
2489
+ const enumNames = [];
2490
+ for (const key in T) {
2491
+ if (T.hasOwnProperty(key)) {
2492
+ enumNames.push(key);
2493
+ }
2494
+ }
2495
+ return enumNames;
2496
+ }
2497
+ getAllValues(T) {
2498
+ const allEnumValues = Object.keys(T).map(key => T[key]);
2499
+ return allEnumValues;
2500
+ }
2501
+ getEnumFromValue(T, value) {
2502
+ try {
2503
+ if (!value) {
2504
+ return undefined;
2505
+ }
2506
+ // we can map back from index number directly
2507
+ if (this.isNumeric(value)) {
2508
+ return T[value];
2509
+ }
2510
+ // for strings, we need to compare each value separately
2511
+ const allEnumValues = this.getAllValues(T);
2512
+ const result = allEnumValues.find(m => m.toLowerCase() === value.toString().toLowerCase());
2513
+ if (!result) {
2514
+ return undefined;
2515
+ }
2516
+ return result;
2517
+ }
2518
+ catch (err) {
2519
+ return undefined;
2520
+ }
2521
+ }
2522
+ getEnumFromName(T, name) {
2523
+ const allNames = this.getAllNames(T);
2524
+ for (const enumName of allNames) {
2525
+ if (enumName.toLowerCase() === name.toLowerCase()) {
2526
+ return T[enumName];
2527
+ }
2528
+ }
2529
+ return undefined;
2530
+ }
2531
+ isNumeric(value) {
2532
+ return !isNaN(parseFloat(value)) && isFinite(value);
2533
+ }
2534
+ }
2535
+ const enumHelper = new EnumHelper();
2536
+
2537
+
2538
+ /***/ }),
2539
+
2540
+ /***/ "./lib/helpers/header.helper.ts":
2541
+ /*!**************************************!*\
2542
+ !*** ./lib/helpers/header.helper.ts ***!
2543
+ \**************************************/
2544
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2545
+
2546
+ "use strict";
2547
+ __webpack_require__.r(__webpack_exports__);
2548
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2549
+ /* harmony export */ "HeaderHelper": () => (/* binding */ HeaderHelper),
2550
+ /* harmony export */ "headerHelper": () => (/* binding */ headerHelper)
2551
+ /* harmony export */ });
2552
+ class HeaderHelper {
2553
+ /**
2554
+ * Header name for SDK usage
2555
+ */
2556
+ sdkVersionHeader = 'X-KC-SDKID';
2557
+ /**
2558
+ * Header identifying SDK type & version for internal purposes of Kontent.ai
2559
+ */
2560
+ getSdkIdHeader(info) {
2561
+ return {
2562
+ header: this.sdkVersionHeader,
2563
+ value: `${info.host};${info.name};${info.version}`
2564
+ };
2565
+ }
2566
+ }
2567
+ const headerHelper = new HeaderHelper();
2568
+
2569
+
2570
+ /***/ }),
2571
+
2572
+ /***/ "./lib/helpers/headers-helper.ts":
2573
+ /*!***************************************!*\
2574
+ !*** ./lib/helpers/headers-helper.ts ***!
2575
+ \***************************************/
2576
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2577
+
2578
+ "use strict";
2579
+ __webpack_require__.r(__webpack_exports__);
2580
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2581
+ /* harmony export */ "extractHeadersFromAxiosResponse": () => (/* binding */ extractHeadersFromAxiosResponse)
2582
+ /* harmony export */ });
2583
+ function extractHeadersFromAxiosResponse(response) {
2584
+ const headers = [];
2585
+ for (const headerKey of Object.keys(response.headers)) {
2586
+ headers.push({
2587
+ header: headerKey,
2588
+ value: response.headers[headerKey]
2589
+ });
2590
+ }
2591
+ return headers;
2592
+ }
2593
+
2594
+
2595
+ /***/ }),
2596
+
2597
+ /***/ "./lib/helpers/index.ts":
2598
+ /*!******************************!*\
2599
+ !*** ./lib/helpers/index.ts ***!
2600
+ \******************************/
2601
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2602
+
2603
+ "use strict";
2604
+ __webpack_require__.r(__webpack_exports__);
2605
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2606
+ /* harmony export */ "EnumHelper": () => (/* reexport safe */ _enum_helper__WEBPACK_IMPORTED_MODULE_2__.EnumHelper),
2607
+ /* harmony export */ "HeaderHelper": () => (/* reexport safe */ _header_helper__WEBPACK_IMPORTED_MODULE_1__.HeaderHelper),
2608
+ /* harmony export */ "RetryHelper": () => (/* reexport safe */ _retry_helper__WEBPACK_IMPORTED_MODULE_3__.RetryHelper),
2609
+ /* harmony export */ "UrlHelper": () => (/* reexport safe */ _url_helper__WEBPACK_IMPORTED_MODULE_0__.UrlHelper),
2610
+ /* harmony export */ "enumHelper": () => (/* reexport safe */ _enum_helper__WEBPACK_IMPORTED_MODULE_2__.enumHelper),
2611
+ /* harmony export */ "extractHeadersFromAxiosResponse": () => (/* reexport safe */ _headers_helper__WEBPACK_IMPORTED_MODULE_4__.extractHeadersFromAxiosResponse),
2612
+ /* harmony export */ "headerHelper": () => (/* reexport safe */ _header_helper__WEBPACK_IMPORTED_MODULE_1__.headerHelper),
2613
+ /* harmony export */ "retryHelper": () => (/* reexport safe */ _retry_helper__WEBPACK_IMPORTED_MODULE_3__.retryHelper),
2614
+ /* harmony export */ "urlHelper": () => (/* reexport safe */ _url_helper__WEBPACK_IMPORTED_MODULE_0__.urlHelper)
2615
+ /* harmony export */ });
2616
+ /* harmony import */ var _url_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./url.helper */ "./lib/helpers/url.helper.ts");
2617
+ /* harmony import */ var _header_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./header.helper */ "./lib/helpers/header.helper.ts");
2618
+ /* harmony import */ var _enum_helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./enum.helper */ "./lib/helpers/enum.helper.ts");
2619
+ /* harmony import */ var _retry_helper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./retry-helper */ "./lib/helpers/retry-helper.ts");
2620
+ /* harmony import */ var _headers_helper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./headers-helper */ "./lib/helpers/headers-helper.ts");
2621
+
2622
+
2623
+
2624
+
2625
+
2626
+
2627
+
2628
+ /***/ }),
2629
+
2630
+ /***/ "./lib/helpers/retry-helper.ts":
2631
+ /*!*************************************!*\
2632
+ !*** ./lib/helpers/retry-helper.ts ***!
2633
+ \*************************************/
2634
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2635
+
2636
+ "use strict";
2637
+ __webpack_require__.r(__webpack_exports__);
2638
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2639
+ /* harmony export */ "RetryHelper": () => (/* binding */ RetryHelper),
2640
+ /* harmony export */ "retryHelper": () => (/* binding */ retryHelper)
2641
+ /* harmony export */ });
2642
+ /* harmony import */ var _headers_helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./headers-helper */ "./lib/helpers/headers-helper.ts");
2643
+
2644
+ class RetryHelper {
2645
+ requestCancelledMessagePrefix = 'Request cancelled';
2646
+ retryAfterHeaderName = 'Retry-After';
2647
+ defaultRetryStatusCodes = [408, 429, 500, 502, 503, 504];
2648
+ defaultRetryStrategy = {
2649
+ addJitter: true,
2650
+ deltaBackoffMs: 1000,
2651
+ maxAttempts: 5,
2652
+ canRetryError: (error) => this.canRetryErrorDefault(error)
2653
+ };
2654
+ getRetryErrorResult(data) {
2655
+ if (data.error && data.error.message) {
2656
+ if (data.error.message.startsWith(this.requestCancelledMessagePrefix)) {
2657
+ // request was cancelled by user, do not retry it
2658
+ return {
2659
+ canRetry: false,
2660
+ retryInMs: 0,
2661
+ maxRetries: 0
2662
+ };
2663
+ }
2664
+ }
2665
+ const canRetryError = data.retryStrategy.canRetryError
2666
+ ? data.retryStrategy.canRetryError(data.error)
2667
+ : this.defaultRetryStrategy.canRetryError(data.error);
2668
+ if (!canRetryError) {
2669
+ // request cannot be retried
2670
+ return {
2671
+ canRetry: false,
2672
+ retryInMs: 0,
2673
+ maxRetries: 0
2674
+ };
2675
+ }
2676
+ const maxRetries = (data.retryStrategy.maxAttempts ?? this.defaultRetryStrategy.maxAttempts);
2677
+ const maxRetriesReached = data.retryAttempt >= maxRetries;
2678
+ if (maxRetriesReached) {
2679
+ // request cannot be retried anymore due to maximum attempts
2680
+ return {
2681
+ canRetry: false,
2682
+ retryInMs: 0,
2683
+ maxRetries: maxRetries
2684
+ };
2685
+ }
2686
+ // get wait time
2687
+ const retryResult = this.tryGetRetryAfterInMsFromError(data.error);
2688
+ if (retryResult) {
2689
+ // retry after header was provided
2690
+ return {
2691
+ canRetry: true,
2692
+ retryInMs: retryResult,
2693
+ maxRetries: maxRetries
2694
+ };
2695
+ }
2696
+ // wait time was not provided in header
2697
+ const waitTimeMs = this.getNextWaitTimeMs(data.retryStrategy.addJitter ?? this.defaultRetryStrategy.addJitter, data.retryStrategy.deltaBackoffMs ?? this.defaultRetryStrategy.deltaBackoffMs, data.retryAttempt);
2698
+ return {
2699
+ canRetry: true,
2700
+ retryInMs: waitTimeMs,
2701
+ maxRetries: maxRetries
2702
+ };
2703
+ }
2704
+ getRetryStrategyFromStrategyOptions(retryOptions) {
2705
+ if (!retryOptions) {
2706
+ return this.defaultRetryStrategy;
2707
+ }
2708
+ return retryOptions;
2709
+ }
2710
+ canRetryInTime(startTime, maxCumulativeWaitTimeMs) {
2711
+ const start = startTime.getTime();
2712
+ const now = new Date().getTime();
2713
+ const differenceInMs = now - start;
2714
+ return {
2715
+ canRetry: differenceInMs < maxCumulativeWaitTimeMs,
2716
+ differenceInMs: differenceInMs
2717
+ };
2718
+ }
2719
+ getNextWaitTimeMs(addJitter, deltaBackoffMs, retryAttempts) {
2720
+ if (!addJitter) {
2721
+ return deltaBackoffMs * Math.pow(2, retryAttempts);
2722
+ }
2723
+ const from = 0.8 * deltaBackoffMs;
2724
+ const to = 1.2 * deltaBackoffMs * Math.pow(2, retryAttempts);
2725
+ return this.randomNumberFromInterval(from, to);
2726
+ }
2727
+ canRetryErrorDefault(error) {
2728
+ const axiosError = this.tryGetAxiosError(error);
2729
+ if (!axiosError) {
2730
+ // by default non-axios errors are not retried
2731
+ return false;
2732
+ }
2733
+ const statusCode = this.getStatusCodeFromError(error);
2734
+ const canRetryStatusCode = this.canRetryStatusCode(statusCode, this.defaultRetryStatusCodes);
2735
+ if (canRetryStatusCode) {
2736
+ return true;
2737
+ }
2738
+ return false;
2739
+ }
2740
+ tryGetRetryAfterInMsFromError(error) {
2741
+ const axiosError = this.tryGetAxiosError(error);
2742
+ if (!axiosError || !axiosError.response) {
2743
+ return undefined;
2744
+ }
2745
+ const headers = (0,_headers_helper__WEBPACK_IMPORTED_MODULE_0__.extractHeadersFromAxiosResponse)(axiosError.response);
2746
+ const retryValueHeader = headers.find((m) => m.header.toLowerCase() === this.retryAfterHeaderName.toLowerCase());
2747
+ if (!retryValueHeader) {
2748
+ return undefined;
2749
+ }
2750
+ const retryInSeconds = +retryValueHeader.value;
2751
+ return retryInSeconds * 1000;
2752
+ }
2753
+ canRetryStatusCode(statusCode, useRetryForResponseCodes) {
2754
+ return useRetryForResponseCodes.includes(statusCode);
2755
+ }
2756
+ getStatusCodeFromError(error) {
2757
+ const axiosError = this.tryGetAxiosError(error);
2758
+ if (!axiosError || !axiosError.response) {
2759
+ return 0;
2760
+ }
2761
+ return axiosError.response.status;
2762
+ }
2763
+ tryGetAxiosError(error) {
2764
+ if (!error) {
2765
+ return undefined;
2766
+ }
2767
+ if (error.isAxiosError) {
2768
+ return error;
2769
+ }
2770
+ const originalError = error.originalError;
2771
+ if (originalError && originalError.isAxiosError) {
2772
+ return originalError;
2773
+ }
2774
+ return undefined;
2775
+ }
2776
+ /**
2777
+ * min and max included
2778
+ */
2779
+ randomNumberFromInterval(min, max) {
2780
+ return Math.floor(Math.random() * (max - min + 1) + min);
2781
+ }
2782
+ }
2783
+ const retryHelper = new RetryHelper();
2784
+
2785
+
2786
+ /***/ }),
2787
+
2788
+ /***/ "./lib/helpers/url.helper.ts":
2789
+ /*!***********************************!*\
2790
+ !*** ./lib/helpers/url.helper.ts ***!
2791
+ \***********************************/
2792
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2793
+
2794
+ "use strict";
2795
+ __webpack_require__.r(__webpack_exports__);
2796
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2797
+ /* harmony export */ "UrlHelper": () => (/* binding */ UrlHelper),
2798
+ /* harmony export */ "urlHelper": () => (/* binding */ urlHelper)
2799
+ /* harmony export */ });
2800
+ class UrlHelper {
2801
+ /**
2802
+ * Adds query parameters to given url
2803
+ * @param url Url to which options will be added
2804
+ * @param options Query parameters to add
2805
+ */
2806
+ addOptionsToUrl(url, options) {
2807
+ if (options) {
2808
+ options.forEach(filter => {
2809
+ if (url.indexOf('?') > -1) {
2810
+ url += '&';
2811
+ }
2812
+ else {
2813
+ url += '?';
2814
+ }
2815
+ url += filter.getParam();
2816
+ });
2817
+ }
2818
+ return url;
2819
+ }
2820
+ }
2821
+ const urlHelper = new UrlHelper();
2822
+
2823
+
2824
+ /***/ }),
2825
+
2826
+ /***/ "./lib/http/http.debugger.ts":
2827
+ /*!***********************************!*\
2828
+ !*** ./lib/http/http.debugger.ts ***!
2829
+ \***********************************/
2830
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2831
+
2832
+ "use strict";
2833
+ __webpack_require__.r(__webpack_exports__);
2834
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2835
+ /* harmony export */ "HttpDebugger": () => (/* binding */ HttpDebugger),
2836
+ /* harmony export */ "httpDebugger": () => (/* binding */ httpDebugger)
2837
+ /* harmony export */ });
2838
+ class HttpDebugger {
2839
+ /*
2840
+ Called when http request is started
2841
+ */
2842
+ debugStartHttpRequest() {
2843
+ }
2844
+ /*
2845
+ Called when http request is resolved
2846
+ */
2847
+ debugSuccessHttpRequest() {
2848
+ }
2849
+ /*
2850
+ Called when http request is being retried
2851
+ */
2852
+ debugRetryHttpRequest() {
2853
+ }
2854
+ }
2855
+ const httpDebugger = new HttpDebugger();
2856
+
2857
+
2858
+ /***/ }),
2859
+
2860
+ /***/ "./lib/http/http.functions.ts":
2861
+ /*!************************************!*\
2862
+ !*** ./lib/http/http.functions.ts ***!
2863
+ \************************************/
2864
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2865
+
2866
+ "use strict";
2867
+ __webpack_require__.r(__webpack_exports__);
2868
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2869
+ /* harmony export */ "createCancelToken": () => (/* binding */ createCancelToken),
2870
+ /* harmony export */ "deleteWithRetryAsync": () => (/* binding */ deleteWithRetryAsync),
2871
+ /* harmony export */ "getWithRetryAsync": () => (/* binding */ getWithRetryAsync),
2872
+ /* harmony export */ "patchWithRetryAsync": () => (/* binding */ patchWithRetryAsync),
2873
+ /* harmony export */ "postWithRetryAsync": () => (/* binding */ postWithRetryAsync),
2874
+ /* harmony export */ "putWithRetryAsync": () => (/* binding */ putWithRetryAsync)
2875
+ /* harmony export */ });
2876
+ /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! axios */ "./node_modules/axios/index.js");
2877
+ /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__);
2878
+ /* harmony import */ var _helpers_headers_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/headers-helper */ "./lib/helpers/headers-helper.ts");
2879
+ /* harmony import */ var _http_debugger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./http.debugger */ "./lib/http/http.debugger.ts");
2880
+ /* harmony import */ var _helpers_retry_helper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/retry-helper */ "./lib/helpers/retry-helper.ts");
2881
+
2882
+
2883
+
2884
+
2885
+ async function getWithRetryAsync(instance, call, functionsConfig, options) {
2886
+ const retryStrategyOptions = options?.retryStrategy ?? _helpers_retry_helper__WEBPACK_IMPORTED_MODULE_3__.retryHelper.defaultRetryStrategy;
2887
+ return await runWithRetryAsync({
2888
+ retryAttempt: 0,
2889
+ url: call.url,
2890
+ retryStrategy: retryStrategyOptions,
2891
+ functionsConfig: functionsConfig,
2892
+ call: async (retryAttempt) => {
2893
+ _http_debugger__WEBPACK_IMPORTED_MODULE_2__.httpDebugger.debugStartHttpRequest();
2894
+ const axiosResponse = await instance.get(call.url, {
2895
+ headers: getHeadersJson(options?.headers ?? [], false),
2896
+ responseType: options?.responseType,
2897
+ cancelToken: options?.cancelToken?.token
2898
+ });
2899
+ const response = {
2900
+ data: axiosResponse.data,
2901
+ rawResponse: axiosResponse,
2902
+ headers: (0,_helpers_headers_helper__WEBPACK_IMPORTED_MODULE_1__.extractHeadersFromAxiosResponse)(axiosResponse),
2903
+ status: axiosResponse.status,
2904
+ retryStrategy: {
2905
+ options: retryStrategyOptions,
2906
+ retryAttempts: retryAttempt
2907
+ }
2908
+ };
2909
+ _http_debugger__WEBPACK_IMPORTED_MODULE_2__.httpDebugger.debugSuccessHttpRequest();
2910
+ return response;
2911
+ }
2912
+ });
2913
+ }
2914
+ async function postWithRetryAsync(instance, call, functionsConfig, options) {
2915
+ const retryStrategyOptions = options?.retryStrategy ?? _helpers_retry_helper__WEBPACK_IMPORTED_MODULE_3__.retryHelper.defaultRetryStrategy;
2916
+ return await runWithRetryAsync({
2917
+ retryAttempt: 0,
2918
+ url: call.url,
2919
+ retryStrategy: retryStrategyOptions,
2920
+ functionsConfig: functionsConfig,
2921
+ call: async (retryAttempt) => {
2922
+ _http_debugger__WEBPACK_IMPORTED_MODULE_2__.httpDebugger.debugStartHttpRequest();
2923
+ const axiosResponse = await instance.post(call.url, call.body, {
2924
+ headers: getHeadersJson(options?.headers ?? [], false),
2925
+ responseType: options?.responseType,
2926
+ // required for uploading large files
2927
+ // https://github.com/axios/axios/issues/1362
2928
+ maxContentLength: 'Infinity',
2929
+ maxBodyLength: 'Infinity',
2930
+ cancelToken: options?.cancelToken?.token
2931
+ });
2932
+ const response = {
2933
+ data: axiosResponse.data,
2934
+ rawResponse: axiosResponse,
2935
+ headers: (0,_helpers_headers_helper__WEBPACK_IMPORTED_MODULE_1__.extractHeadersFromAxiosResponse)(axiosResponse),
2936
+ status: axiosResponse.status,
2937
+ retryStrategy: {
2938
+ options: retryStrategyOptions,
2939
+ retryAttempts: retryAttempt
2940
+ }
2941
+ };
2942
+ _http_debugger__WEBPACK_IMPORTED_MODULE_2__.httpDebugger.debugSuccessHttpRequest();
2943
+ return response;
2944
+ }
2945
+ });
2946
+ }
2947
+ async function putWithRetryAsync(instance, call, functionsConfig, options) {
2948
+ const retryStrategyOptions = options?.retryStrategy ?? _helpers_retry_helper__WEBPACK_IMPORTED_MODULE_3__.retryHelper.defaultRetryStrategy;
2949
+ return await runWithRetryAsync({
2950
+ retryAttempt: 0,
2951
+ url: call.url,
2952
+ retryStrategy: retryStrategyOptions,
2953
+ functionsConfig: functionsConfig,
2954
+ call: async (retryAttempt) => {
2955
+ _http_debugger__WEBPACK_IMPORTED_MODULE_2__.httpDebugger.debugStartHttpRequest();
2956
+ const axiosResponse = await instance.put(call.url, call.body, {
2957
+ headers: getHeadersJson(options?.headers ?? [], false),
2958
+ responseType: options?.responseType,
2959
+ // required for uploading large files
2960
+ // https://github.com/axios/axios/issues/1362
2961
+ maxContentLength: 'Infinity',
2962
+ maxBodyLength: 'Infinity',
2963
+ cancelToken: options?.cancelToken?.token
2964
+ });
2965
+ const response = {
2966
+ data: axiosResponse.data,
2967
+ rawResponse: axiosResponse,
2968
+ headers: (0,_helpers_headers_helper__WEBPACK_IMPORTED_MODULE_1__.extractHeadersFromAxiosResponse)(axiosResponse),
2969
+ status: axiosResponse.status,
2970
+ retryStrategy: {
2971
+ options: retryStrategyOptions,
2972
+ retryAttempts: retryAttempt
2973
+ }
2974
+ };
2975
+ _http_debugger__WEBPACK_IMPORTED_MODULE_2__.httpDebugger.debugSuccessHttpRequest();
2976
+ return response;
2977
+ }
2978
+ });
2979
+ }
2980
+ async function patchWithRetryAsync(instance, call, functionsConfig, options) {
2981
+ const retryStrategyOptions = options?.retryStrategy ?? _helpers_retry_helper__WEBPACK_IMPORTED_MODULE_3__.retryHelper.defaultRetryStrategy;
2982
+ return await runWithRetryAsync({
2983
+ retryAttempt: 0,
2984
+ url: call.url,
2985
+ retryStrategy: retryStrategyOptions,
2986
+ functionsConfig: functionsConfig,
2987
+ call: async (retryAttempt) => {
2988
+ _http_debugger__WEBPACK_IMPORTED_MODULE_2__.httpDebugger.debugStartHttpRequest();
2989
+ const axiosResponse = await instance.patch(call.url, call.body, {
2990
+ headers: getHeadersJson(options?.headers ?? [], false),
2991
+ responseType: options?.responseType,
2992
+ // required for uploading large files
2993
+ // https://github.com/axios/axios/issues/1362
2994
+ maxContentLength: 'Infinity',
2995
+ maxBodyLength: 'Infinity',
2996
+ cancelToken: options?.cancelToken?.token
2997
+ });
2998
+ const response = {
2999
+ data: axiosResponse.data,
3000
+ rawResponse: axiosResponse,
3001
+ headers: (0,_helpers_headers_helper__WEBPACK_IMPORTED_MODULE_1__.extractHeadersFromAxiosResponse)(axiosResponse),
3002
+ status: axiosResponse.status,
3003
+ retryStrategy: {
3004
+ options: retryStrategyOptions,
3005
+ retryAttempts: retryAttempt
3006
+ }
3007
+ };
3008
+ _http_debugger__WEBPACK_IMPORTED_MODULE_2__.httpDebugger.debugSuccessHttpRequest();
3009
+ return response;
3010
+ }
3011
+ });
3012
+ }
3013
+ async function deleteWithRetryAsync(instance, call, functionsConfig, options) {
3014
+ const retryStrategyOptions = options?.retryStrategy ?? _helpers_retry_helper__WEBPACK_IMPORTED_MODULE_3__.retryHelper.defaultRetryStrategy;
3015
+ return await runWithRetryAsync({
3016
+ retryAttempt: 0,
3017
+ url: call.url,
3018
+ retryStrategy: retryStrategyOptions,
3019
+ functionsConfig: functionsConfig,
3020
+ call: async (retryAttempt) => {
3021
+ _http_debugger__WEBPACK_IMPORTED_MODULE_2__.httpDebugger.debugStartHttpRequest();
3022
+ const axiosResponse = await instance.delete(call.url, {
3023
+ headers: getHeadersJson(options?.headers ?? [], false),
3024
+ responseType: options?.responseType,
3025
+ // required for uploading large files
3026
+ // https://github.com/axios/axios/issues/1362
3027
+ maxContentLength: 'Infinity',
3028
+ maxBodyLength: 'Infinity',
3029
+ cancelToken: options?.cancelToken?.token
3030
+ });
3031
+ const response = {
3032
+ data: axiosResponse.data,
3033
+ rawResponse: axiosResponse,
3034
+ headers: (0,_helpers_headers_helper__WEBPACK_IMPORTED_MODULE_1__.extractHeadersFromAxiosResponse)(axiosResponse),
3035
+ status: axiosResponse.status,
3036
+ retryStrategy: {
3037
+ options: retryStrategyOptions,
3038
+ retryAttempts: retryAttempt
3039
+ }
3040
+ };
3041
+ _http_debugger__WEBPACK_IMPORTED_MODULE_2__.httpDebugger.debugSuccessHttpRequest();
3042
+ return response;
3043
+ }
3044
+ });
3045
+ }
3046
+ function createCancelToken() {
3047
+ let canceler;
3048
+ const token = new (axios__WEBPACK_IMPORTED_MODULE_0___default().CancelToken)((c) => {
3049
+ // An executor function receives a cancel function as a parameter
3050
+ canceler = c;
3051
+ });
3052
+ return {
3053
+ cancel: (cancelMessage) => canceler(`${_helpers_retry_helper__WEBPACK_IMPORTED_MODULE_3__.retryHelper.requestCancelledMessagePrefix}: ${cancelMessage ?? 'User cancel'}`),
3054
+ token: token
3055
+ };
3056
+ }
3057
+ async function runWithRetryAsync(data) {
3058
+ try {
3059
+ return await data.call(data.retryAttempt);
3060
+ }
3061
+ catch (error) {
3062
+ const retryResult = _helpers_retry_helper__WEBPACK_IMPORTED_MODULE_3__.retryHelper.getRetryErrorResult({
3063
+ error: error,
3064
+ retryAttempt: data.retryAttempt,
3065
+ retryStrategy: data.retryStrategy
3066
+ });
3067
+ if (retryResult.canRetry) {
3068
+ _http_debugger__WEBPACK_IMPORTED_MODULE_2__.httpDebugger.debugRetryHttpRequest();
3069
+ // wait time before retrying
3070
+ await new Promise((resolve) => setTimeout(resolve, retryResult.retryInMs));
3071
+ // retry request
3072
+ console.warn(`Retry attempt '${data.retryAttempt + 1}' from a maximum of '${retryResult.maxRetries}' retries. Request url: '${data.url}'`);
3073
+ return await runWithRetryAsync({
3074
+ call: data.call,
3075
+ retryStrategy: data.retryStrategy,
3076
+ retryAttempt: data.retryAttempt + 1,
3077
+ url: data.url,
3078
+ functionsConfig: data.functionsConfig
3079
+ });
3080
+ }
3081
+ if (data.functionsConfig.logErrorsToConsole) {
3082
+ console.error(`Executing '${data.url}' failed. Request was retried '${data.retryAttempt}' times. `, error);
3083
+ }
3084
+ throw error;
3085
+ }
3086
+ }
3087
+ function getHeadersJson(headers, addContentTypeHeader) {
3088
+ const headerJson = {};
3089
+ headers.forEach((header) => {
3090
+ headerJson[header.header] = header.value;
3091
+ });
3092
+ if (addContentTypeHeader) {
3093
+ // add default content type header if not present
3094
+ const contentTypeHeader = headers.find((m) => m.header.toLowerCase() === 'Content-Type'.toLowerCase());
3095
+ if (!contentTypeHeader) {
3096
+ headerJson['Content-Type'] = 'application/json';
3097
+ }
3098
+ }
3099
+ return headerJson;
3100
+ }
3101
+
3102
+
3103
+ /***/ }),
3104
+
3105
+ /***/ "./lib/http/http.models.ts":
3106
+ /*!*********************************!*\
3107
+ !*** ./lib/http/http.models.ts ***!
3108
+ \*********************************/
3109
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3110
+
3111
+ "use strict";
3112
+ __webpack_require__.r(__webpack_exports__);
3113
+
3114
+
3115
+
3116
+ /***/ }),
3117
+
3118
+ /***/ "./lib/http/http.service.ts":
3119
+ /*!**********************************!*\
3120
+ !*** ./lib/http/http.service.ts ***!
3121
+ \**********************************/
3122
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3123
+
3124
+ "use strict";
3125
+ __webpack_require__.r(__webpack_exports__);
3126
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3127
+ /* harmony export */ "HttpService": () => (/* binding */ HttpService)
3128
+ /* harmony export */ });
3129
+ /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! axios */ "./node_modules/axios/index.js");
3130
+ /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__);
3131
+ /* harmony import */ var _http_functions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./http.functions */ "./lib/http/http.functions.ts");
3132
+
3133
+
3134
+ class HttpService {
3135
+ opts;
3136
+ axiosInstance;
3137
+ functionsConfig;
3138
+ constructor(opts) {
3139
+ this.opts = opts;
3140
+ this.axiosInstance = axios__WEBPACK_IMPORTED_MODULE_0___default().create(opts?.axiosRequestConfig);
3141
+ this.functionsConfig = this.getFunctionsConfig();
3142
+ }
3143
+ async getAsync(call, options) {
3144
+ return await _http_functions__WEBPACK_IMPORTED_MODULE_1__.getWithRetryAsync(this.axiosInstance, call, this.functionsConfig, options);
3145
+ }
3146
+ async postAsync(call, options) {
3147
+ return await _http_functions__WEBPACK_IMPORTED_MODULE_1__.postWithRetryAsync(this.axiosInstance, call, this.functionsConfig, options);
3148
+ }
3149
+ async putAsync(call, options) {
3150
+ return await _http_functions__WEBPACK_IMPORTED_MODULE_1__.putWithRetryAsync(this.axiosInstance, call, this.functionsConfig, options);
3151
+ }
3152
+ async patchAsync(call, options) {
3153
+ return await _http_functions__WEBPACK_IMPORTED_MODULE_1__.patchWithRetryAsync(this.axiosInstance, call, this.functionsConfig, options);
3154
+ }
3155
+ async deleteAsync(call, options) {
3156
+ return await _http_functions__WEBPACK_IMPORTED_MODULE_1__.deleteWithRetryAsync(this.axiosInstance, call, this.functionsConfig, options);
3157
+ }
3158
+ createCancelToken() {
3159
+ return _http_functions__WEBPACK_IMPORTED_MODULE_1__.createCancelToken();
3160
+ }
3161
+ getFunctionsConfig() {
3162
+ return {
3163
+ logErrorsToConsole: this.opts?.logErrorsToConsole ?? true
3164
+ };
3165
+ }
3166
+ }
3167
+
3168
+
3169
+ /***/ }),
3170
+
3171
+ /***/ "./lib/http/ihttp.service.ts":
3172
+ /*!***********************************!*\
3173
+ !*** ./lib/http/ihttp.service.ts ***!
3174
+ \***********************************/
3175
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3176
+
3177
+ "use strict";
3178
+ __webpack_require__.r(__webpack_exports__);
3179
+
3180
+
3181
+
3182
+ /***/ }),
3183
+
3184
+ /***/ "./lib/http/index.ts":
3185
+ /*!***************************!*\
3186
+ !*** ./lib/http/index.ts ***!
3187
+ \***************************/
3188
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3189
+
3190
+ "use strict";
3191
+ __webpack_require__.r(__webpack_exports__);
3192
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3193
+ /* harmony export */ "HttpDebugger": () => (/* reexport safe */ _http_debugger__WEBPACK_IMPORTED_MODULE_4__.HttpDebugger),
3194
+ /* harmony export */ "HttpService": () => (/* reexport safe */ _http_service__WEBPACK_IMPORTED_MODULE_1__.HttpService),
3195
+ /* harmony export */ "TestHttpService": () => (/* reexport safe */ _test_http_service__WEBPACK_IMPORTED_MODULE_5__.TestHttpService),
3196
+ /* harmony export */ "createCancelToken": () => (/* reexport safe */ _http_functions__WEBPACK_IMPORTED_MODULE_3__.createCancelToken),
3197
+ /* harmony export */ "deleteWithRetryAsync": () => (/* reexport safe */ _http_functions__WEBPACK_IMPORTED_MODULE_3__.deleteWithRetryAsync),
3198
+ /* harmony export */ "getWithRetryAsync": () => (/* reexport safe */ _http_functions__WEBPACK_IMPORTED_MODULE_3__.getWithRetryAsync),
3199
+ /* harmony export */ "httpDebugger": () => (/* reexport safe */ _http_debugger__WEBPACK_IMPORTED_MODULE_4__.httpDebugger),
3200
+ /* harmony export */ "patchWithRetryAsync": () => (/* reexport safe */ _http_functions__WEBPACK_IMPORTED_MODULE_3__.patchWithRetryAsync),
3201
+ /* harmony export */ "postWithRetryAsync": () => (/* reexport safe */ _http_functions__WEBPACK_IMPORTED_MODULE_3__.postWithRetryAsync),
3202
+ /* harmony export */ "putWithRetryAsync": () => (/* reexport safe */ _http_functions__WEBPACK_IMPORTED_MODULE_3__.putWithRetryAsync)
3203
+ /* harmony export */ });
3204
+ /* harmony import */ var _ihttp_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ihttp.service */ "./lib/http/ihttp.service.ts");
3205
+ /* harmony import */ var _http_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./http.service */ "./lib/http/http.service.ts");
3206
+ /* harmony import */ var _http_models__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./http.models */ "./lib/http/http.models.ts");
3207
+ /* harmony import */ var _http_functions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./http.functions */ "./lib/http/http.functions.ts");
3208
+ /* harmony import */ var _http_debugger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./http.debugger */ "./lib/http/http.debugger.ts");
3209
+ /* harmony import */ var _test_http_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./test-http.service */ "./lib/http/test-http.service.ts");
3210
+
3211
+
3212
+
3213
+
3214
+
3215
+
3216
+
3217
+
3218
+ /***/ }),
3219
+
3220
+ /***/ "./lib/http/test-http.service.ts":
3221
+ /*!***************************************!*\
3222
+ !*** ./lib/http/test-http.service.ts ***!
3223
+ \***************************************/
3224
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3225
+
3226
+ "use strict";
3227
+ __webpack_require__.r(__webpack_exports__);
3228
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3229
+ /* harmony export */ "TestHttpService": () => (/* binding */ TestHttpService)
3230
+ /* harmony export */ });
3231
+ class TestHttpService {
3232
+ response = undefined;
3233
+ error = undefined;
3234
+ constructor(config) {
3235
+ Object.assign(this, config);
3236
+ }
3237
+ getAsync(call, options) {
3238
+ return this.resolveTestCall();
3239
+ }
3240
+ postAsync(call, options) {
3241
+ return this.resolveTestCall();
3242
+ }
3243
+ putAsync(call, options) {
3244
+ return this.resolveTestCall();
3245
+ }
3246
+ patchAsync(call, options) {
3247
+ return this.resolveTestCall();
3248
+ }
3249
+ deleteAsync(call, options) {
3250
+ return this.resolveTestCall();
3251
+ }
3252
+ createCancelToken() {
3253
+ return {
3254
+ cancel: () => { },
3255
+ token: undefined
3256
+ };
3257
+ }
3258
+ resolveTestCall() {
3259
+ const promise = new Promise((resolve, reject) => {
3260
+ if (this.response) {
3261
+ resolve(this.response);
3262
+ }
3263
+ if (this.error) {
3264
+ reject(this.error);
3265
+ }
3266
+ throw Error(`Missing test data`);
3267
+ });
3268
+ return promise;
3269
+ }
3270
+ }
3271
+
3272
+
3273
+ /***/ }),
3274
+
3275
+ /***/ "./lib/models/index.ts":
3276
+ /*!*****************************!*\
3277
+ !*** ./lib/models/index.ts ***!
3278
+ \*****************************/
3279
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3280
+
3281
+ "use strict";
3282
+ __webpack_require__.r(__webpack_exports__);
3283
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3284
+ /* harmony export */ "Parameters": () => (/* reexport safe */ _parameters__WEBPACK_IMPORTED_MODULE_2__.Parameters)
3285
+ /* harmony export */ });
3286
+ /* harmony import */ var _url_models__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./url.models */ "./lib/models/url.models.ts");
3287
+ /* harmony import */ var _isdk_info__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./isdk-info */ "./lib/models/isdk-info.ts");
3288
+ /* harmony import */ var _parameters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parameters */ "./lib/models/parameters.ts");
3289
+
3290
+
3291
+
3292
+
3293
+
3294
+ /***/ }),
3295
+
3296
+ /***/ "./lib/models/isdk-info.ts":
3297
+ /*!*********************************!*\
3298
+ !*** ./lib/models/isdk-info.ts ***!
3299
+ \*********************************/
3300
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3301
+
3302
+ "use strict";
3303
+ __webpack_require__.r(__webpack_exports__);
3304
+
3305
+
3306
+
3307
+ /***/ }),
3308
+
3309
+ /***/ "./lib/models/parameters.ts":
3310
+ /*!**********************************!*\
3311
+ !*** ./lib/models/parameters.ts ***!
3312
+ \**********************************/
3313
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3314
+
3315
+ "use strict";
3316
+ __webpack_require__.r(__webpack_exports__);
3317
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3318
+ /* harmony export */ "Parameters": () => (/* binding */ Parameters)
3319
+ /* harmony export */ });
3320
+ var Parameters;
3321
+ (function (Parameters) {
3322
+ class CustomParameter {
3323
+ name;
3324
+ value;
3325
+ /**
3326
+ * Custom parameter
3327
+ * @constructor
3328
+ * @param {string} name - Name of the parameter
3329
+ * @param {string} value - Value of the parameter
3330
+ */
3331
+ constructor(name, value) {
3332
+ this.name = name;
3333
+ this.value = value;
3334
+ if (!name) {
3335
+ throw Error(`Name of the custom parameter is not specified`);
3336
+ }
3337
+ }
3338
+ getParam() {
3339
+ return this.name;
3340
+ }
3341
+ getParamValue() {
3342
+ return this.value;
3343
+ }
3344
+ }
3345
+ Parameters.CustomParameter = CustomParameter;
3346
+ })(Parameters || (Parameters = {}));
3347
+
3348
+
3349
+ /***/ }),
3350
+
3351
+ /***/ "./lib/models/url.models.ts":
3352
+ /*!**********************************!*\
3353
+ !*** ./lib/models/url.models.ts ***!
3354
+ \**********************************/
3355
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3356
+
3357
+ "use strict";
3358
+ __webpack_require__.r(__webpack_exports__);
3359
+
3360
+
3361
+
3362
+ /***/ })
3363
+
3364
+ /******/ });
3365
+ /************************************************************************/
3366
+ /******/ // The module cache
3367
+ /******/ var __webpack_module_cache__ = {};
3368
+ /******/
3369
+ /******/ // The require function
3370
+ /******/ function __webpack_require__(moduleId) {
3371
+ /******/ // Check if module is in cache
3372
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
3373
+ /******/ if (cachedModule !== undefined) {
3374
+ /******/ return cachedModule.exports;
3375
+ /******/ }
3376
+ /******/ // Create a new module (and put it into the cache)
3377
+ /******/ var module = __webpack_module_cache__[moduleId] = {
3378
+ /******/ // no module.id needed
3379
+ /******/ // no module.loaded needed
3380
+ /******/ exports: {}
3381
+ /******/ };
3382
+ /******/
3383
+ /******/ // Execute the module function
3384
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
3385
+ /******/
3386
+ /******/ // Return the exports of the module
3387
+ /******/ return module.exports;
3388
+ /******/ }
3389
+ /******/
3390
+ /************************************************************************/
3391
+ /******/ /* webpack/runtime/compat get default export */
3392
+ /******/ (() => {
3393
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
3394
+ /******/ __webpack_require__.n = (module) => {
3395
+ /******/ var getter = module && module.__esModule ?
3396
+ /******/ () => (module['default']) :
3397
+ /******/ () => (module);
3398
+ /******/ __webpack_require__.d(getter, { a: getter });
3399
+ /******/ return getter;
3400
+ /******/ };
3401
+ /******/ })();
3402
+ /******/
3403
+ /******/ /* webpack/runtime/define property getters */
3404
+ /******/ (() => {
3405
+ /******/ // define getter functions for harmony exports
3406
+ /******/ __webpack_require__.d = (exports, definition) => {
3407
+ /******/ for(var key in definition) {
3408
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
3409
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
3410
+ /******/ }
3411
+ /******/ }
3412
+ /******/ };
3413
+ /******/ })();
3414
+ /******/
3415
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
3416
+ /******/ (() => {
3417
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
3418
+ /******/ })();
3419
+ /******/
3420
+ /******/ /* webpack/runtime/make namespace object */
3421
+ /******/ (() => {
3422
+ /******/ // define __esModule on exports
3423
+ /******/ __webpack_require__.r = (exports) => {
3424
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
3425
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3426
+ /******/ }
3427
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
3428
+ /******/ };
3429
+ /******/ })();
3430
+ /******/
3431
+ /************************************************************************/
3432
+ var __webpack_exports__ = {};
3433
+ // This entry need to be wrapped in an IIFE because it need to be in strict mode.
3434
+ (() => {
3435
+ "use strict";
3436
+ /*!**********************!*\
3437
+ !*** ./lib/index.ts ***!
3438
+ \**********************/
3439
+ __webpack_require__.r(__webpack_exports__);
3440
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3441
+ /* harmony export */ "EnumHelper": () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_0__.EnumHelper),
3442
+ /* harmony export */ "HeaderHelper": () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_0__.HeaderHelper),
3443
+ /* harmony export */ "HttpDebugger": () => (/* reexport safe */ _http__WEBPACK_IMPORTED_MODULE_2__.HttpDebugger),
3444
+ /* harmony export */ "HttpService": () => (/* reexport safe */ _http__WEBPACK_IMPORTED_MODULE_2__.HttpService),
3445
+ /* harmony export */ "Parameters": () => (/* reexport safe */ _models__WEBPACK_IMPORTED_MODULE_1__.Parameters),
3446
+ /* harmony export */ "RetryHelper": () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_0__.RetryHelper),
3447
+ /* harmony export */ "TestHttpService": () => (/* reexport safe */ _http__WEBPACK_IMPORTED_MODULE_2__.TestHttpService),
3448
+ /* harmony export */ "UrlHelper": () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_0__.UrlHelper),
3449
+ /* harmony export */ "createCancelToken": () => (/* reexport safe */ _http__WEBPACK_IMPORTED_MODULE_2__.createCancelToken),
3450
+ /* harmony export */ "deleteWithRetryAsync": () => (/* reexport safe */ _http__WEBPACK_IMPORTED_MODULE_2__.deleteWithRetryAsync),
3451
+ /* harmony export */ "enumHelper": () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_0__.enumHelper),
3452
+ /* harmony export */ "extractHeadersFromAxiosResponse": () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_0__.extractHeadersFromAxiosResponse),
3453
+ /* harmony export */ "getWithRetryAsync": () => (/* reexport safe */ _http__WEBPACK_IMPORTED_MODULE_2__.getWithRetryAsync),
3454
+ /* harmony export */ "headerHelper": () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_0__.headerHelper),
3455
+ /* harmony export */ "httpDebugger": () => (/* reexport safe */ _http__WEBPACK_IMPORTED_MODULE_2__.httpDebugger),
3456
+ /* harmony export */ "patchWithRetryAsync": () => (/* reexport safe */ _http__WEBPACK_IMPORTED_MODULE_2__.patchWithRetryAsync),
3457
+ /* harmony export */ "postWithRetryAsync": () => (/* reexport safe */ _http__WEBPACK_IMPORTED_MODULE_2__.postWithRetryAsync),
3458
+ /* harmony export */ "putWithRetryAsync": () => (/* reexport safe */ _http__WEBPACK_IMPORTED_MODULE_2__.putWithRetryAsync),
3459
+ /* harmony export */ "retryHelper": () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_0__.retryHelper),
3460
+ /* harmony export */ "urlHelper": () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_0__.urlHelper)
3461
+ /* harmony export */ });
3462
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./lib/helpers/index.ts");
3463
+ /* harmony import */ var _models__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./models */ "./lib/models/index.ts");
3464
+ /* harmony import */ var _http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./http */ "./lib/http/index.ts");
3465
+ /* Public API */
3466
+
3467
+
3468
+
3469
+
3470
+ })();
3471
+
3472
+ /******/ return __webpack_exports__;
3473
+ /******/ })()
3474
+ ;
3475
+ });
3476
+ //# sourceMappingURL=kontent-core.umd.js.map