PluginProbe
HubSpot All-In-One Marketing – Forms, Popups, Live Chat / 11.3.70
HubSpot All-In-One Marketing – Forms, Popups, Live Chat v11.3.70
11.3.75 11.3.73 11.3.71 11.3.70 11.3.69 11.3.64 11.3.65 11.3.62 11.3.61 11.3.56 11.3.58 11.0.31 11.0.52 11.0.54 11.0.56 11.0.58 11.0.7 11.1.10 11.1.11 11.1.13 11.1.14 11.1.15 11.1.2 11.1.20 11.1.21 All 73 releases
leadin / build / gutenberg.js

gutenberg.js in HubSpot All-In-One Marketing – Forms, Popups, Live Chat 11.3.70, at build/gutenberg.js

13,634 lines 542.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /******/ (() => { // webpackBootstrap
2 /******/ var __webpack_modules__ = ({
3
4 /***/ "./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js":
5 /*!*******************************************************************************!*\
6 !*** ./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js ***!
7 \*******************************************************************************/
8 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9
10 "use strict";
11 __webpack_require__.r(__webpack_exports__);
12 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
14 /* harmony export */ });
15 /* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ "./node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize/dist/memoize.browser.esm.js");
16
17
18 var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
19
20 var index = (0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prop) {
21 return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
22 /* o */
23 && prop.charCodeAt(1) === 110
24 /* n */
25 && prop.charCodeAt(2) < 91;
26 }
27 /* Z+1 */
28 );
29
30 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (index);
31
32
33 /***/ }),
34
35 /***/ "./node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize/dist/memoize.browser.esm.js":
36 /*!*******************************************************************************************************!*\
37 !*** ./node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize/dist/memoize.browser.esm.js ***!
38 \*******************************************************************************************************/
39 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
40
41 "use strict";
42 __webpack_require__.r(__webpack_exports__);
43 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
44 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
45 /* harmony export */ });
46 function memoize(fn) {
47 var cache = {};
48 return function (arg) {
49 if (cache[arg] === undefined) cache[arg] = fn(arg);
50 return cache[arg];
51 };
52 }
53
54 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoize);
55
56
57 /***/ }),
58
59 /***/ "./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js":
60 /*!*******************************************************************!*\
61 !*** ./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js ***!
62 \*******************************************************************/
63 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
64
65 "use strict";
66 __webpack_require__.r(__webpack_exports__);
67 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
68 /* harmony export */ "default": () => (/* binding */ memoize)
69 /* harmony export */ });
70 function memoize(fn) {
71 var cache = Object.create(null);
72 return function (arg) {
73 if (cache[arg] === undefined) cache[arg] = fn(arg);
74 return cache[arg];
75 };
76 }
77
78
79
80
81 /***/ }),
82
83 /***/ "./node_modules/@emotion/unitless/dist/unitless.browser.esm.js":
84 /*!*********************************************************************!*\
85 !*** ./node_modules/@emotion/unitless/dist/unitless.browser.esm.js ***!
86 \*********************************************************************/
87 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
88
89 "use strict";
90 __webpack_require__.r(__webpack_exports__);
91 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
92 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
93 /* harmony export */ });
94 var unitlessKeys = {
95 animationIterationCount: 1,
96 borderImageOutset: 1,
97 borderImageSlice: 1,
98 borderImageWidth: 1,
99 boxFlex: 1,
100 boxFlexGroup: 1,
101 boxOrdinalGroup: 1,
102 columnCount: 1,
103 columns: 1,
104 flex: 1,
105 flexGrow: 1,
106 flexPositive: 1,
107 flexShrink: 1,
108 flexNegative: 1,
109 flexOrder: 1,
110 gridRow: 1,
111 gridRowEnd: 1,
112 gridRowSpan: 1,
113 gridRowStart: 1,
114 gridColumn: 1,
115 gridColumnEnd: 1,
116 gridColumnSpan: 1,
117 gridColumnStart: 1,
118 msGridRow: 1,
119 msGridRowSpan: 1,
120 msGridColumn: 1,
121 msGridColumnSpan: 1,
122 fontWeight: 1,
123 lineHeight: 1,
124 opacity: 1,
125 order: 1,
126 orphans: 1,
127 tabSize: 1,
128 widows: 1,
129 zIndex: 1,
130 zoom: 1,
131 WebkitLineClamp: 1,
132 // SVG-related properties
133 fillOpacity: 1,
134 floodOpacity: 1,
135 stopOpacity: 1,
136 strokeDasharray: 1,
137 strokeDashoffset: 1,
138 strokeMiterlimit: 1,
139 strokeOpacity: 1,
140 strokeWidth: 1
141 };
142
143 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (unitlessKeys);
144
145
146 /***/ }),
147
148 /***/ "./node_modules/@linaria/react/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js":
149 /*!***********************************************************************************************************!*\
150 !*** ./node_modules/@linaria/react/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js ***!
151 \***********************************************************************************************************/
152 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
153
154 "use strict";
155 __webpack_require__.r(__webpack_exports__);
156 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
157 /* harmony export */ "default": () => (/* binding */ isPropValid)
158 /* harmony export */ });
159 /* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ "./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js");
160
161
162 // eslint-disable-next-line no-undef
163 var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
164
165 var isPropValid = /* #__PURE__ */(0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prop) {
166 return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
167 /* o */
168 && prop.charCodeAt(1) === 110
169 /* n */
170 && prop.charCodeAt(2) < 91;
171 }
172 /* Z+1 */
173 );
174
175
176
177
178 /***/ }),
179
180 /***/ "./scripts/api/wordpressApiClient.ts":
181 /*!*******************************************!*\
182 !*** ./scripts/api/wordpressApiClient.ts ***!
183 \*******************************************/
184 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
185
186 "use strict";
187 __webpack_require__.r(__webpack_exports__);
188 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
189 /* harmony export */ "disableInternalTracking": () => (/* binding */ disableInternalTracking),
190 /* harmony export */ "fetchAccessToken": () => (/* binding */ fetchAccessToken),
191 /* harmony export */ "fetchDisableInternalTracking": () => (/* binding */ fetchDisableInternalTracking),
192 /* harmony export */ "fetchProxyMappingsEnabled": () => (/* binding */ fetchProxyMappingsEnabled),
193 /* harmony export */ "getBusinessUnitId": () => (/* binding */ getBusinessUnitId),
194 /* harmony export */ "healthcheckRestApi": () => (/* binding */ healthcheckRestApi),
195 /* harmony export */ "refreshProxyMappingsCache": () => (/* binding */ refreshProxyMappingsCache),
196 /* harmony export */ "setBusinessUnitId": () => (/* binding */ setBusinessUnitId),
197 /* harmony export */ "skipReview": () => (/* binding */ skipReview),
198 /* harmony export */ "toggleProxyMappingsEnabled": () => (/* binding */ toggleProxyMappingsEnabled),
199 /* harmony export */ "trackConsent": () => (/* binding */ trackConsent),
200 /* harmony export */ "updateHublet": () => (/* binding */ updateHublet)
201 /* harmony export */ });
202 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
203 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
204 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lib/Raven */ "./scripts/lib/Raven.ts");
205 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
206 /* harmony import */ var _utils_queryParams__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/queryParams */ "./scripts/utils/queryParams.ts");
207
208
209
210
211 function makeRequest(method, path) {
212 var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
213 var queryParams = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
214 // eslint-disable-next-line compat/compat
215 var restApiUrl = new URL("".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.restUrl, "leadin/v1").concat(path));
216 (0,_utils_queryParams__WEBPACK_IMPORTED_MODULE_3__.addQueryObjectToUrl)(restApiUrl, queryParams);
217 return new Promise(function (resolve, reject) {
218 var payload = {
219 url: restApiUrl.toString(),
220 method: method,
221 contentType: 'application/json',
222 beforeSend: function beforeSend(xhr) {
223 return xhr.setRequestHeader('X-WP-Nonce', _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.restNonce);
224 },
225 success: resolve,
226 error: function error(response) {
227 _lib_Raven__WEBPACK_IMPORTED_MODULE_1__["default"].captureMessage("HTTP Request to ".concat(restApiUrl, " failed with error ").concat(response.status, ": ").concat(response.responseText), {
228 fingerprint: ['{{ default }}', path, response.status, response.responseText]
229 });
230 reject(response);
231 }
232 };
233 if (method !== 'get') {
234 payload.data = JSON.stringify(data);
235 }
236 jquery__WEBPACK_IMPORTED_MODULE_0___default().ajax(payload);
237 });
238 }
239 function healthcheckRestApi() {
240 return makeRequest('get', '/healthcheck');
241 }
242 function disableInternalTracking(value) {
243 return makeRequest('put', '/internal-tracking', value ? '1' : '0');
244 }
245 function fetchDisableInternalTracking() {
246 return makeRequest('get', '/internal-tracking').then(function (message) {
247 return {
248 message: message
249 };
250 });
251 }
252 function updateHublet(hublet) {
253 return makeRequest('put', '/hublet', {
254 hublet: hublet
255 });
256 }
257 function skipReview() {
258 return makeRequest('post', '/skip-review');
259 }
260 function trackConsent(canTrack) {
261 return makeRequest('post', '/track-consent', {
262 canTrack: canTrack
263 }).then(function (message) {
264 return {
265 message: message
266 };
267 });
268 }
269 function setBusinessUnitId(businessUnitId) {
270 return makeRequest('put', '/business-unit', {
271 businessUnitId: businessUnitId
272 });
273 }
274 function getBusinessUnitId() {
275 return makeRequest('get', '/business-unit');
276 }
277 function refreshProxyMappingsCache() {
278 return makeRequest('post', '/wp-mappings-cache-reset');
279 }
280 function fetchProxyMappingsEnabled() {
281 return makeRequest('get', '/wp-mappings-proxy-enabled');
282 }
283 function toggleProxyMappingsEnabled(value) {
284 return makeRequest('put', '/wp-mappings-proxy-enabled', value);
285 }
286 var ACCESS_TOKEN_CACHE_KEY = 'leadin_access_token';
287 var ACCESS_TOKEN_MIN_TTL_SECONDS = 300;
288 var accessTokenRequest = null;
289 function fetchAccessToken() {
290 try {
291 var cached = sessionStorage.getItem(ACCESS_TOKEN_CACHE_KEY);
292 if (cached) {
293 var _JSON$parse = JSON.parse(cached),
294 accessToken = _JSON$parse.accessToken,
295 expiresAt = _JSON$parse.expiresAt;
296 if (accessToken && expiresAt > Math.floor(Date.now() / 1000) + ACCESS_TOKEN_MIN_TTL_SECONDS) {
297 return Promise.resolve({
298 accessToken: accessToken,
299 expiresIn: expiresAt - Math.floor(Date.now() / 1000)
300 });
301 }
302 }
303 } catch (_) {}
304 if (!accessTokenRequest) {
305 accessTokenRequest = makeRequest('get', '/access-token').then(function (response) {
306 try {
307 sessionStorage.setItem(ACCESS_TOKEN_CACHE_KEY, JSON.stringify({
308 accessToken: response.accessToken,
309 expiresAt: Math.floor(Date.now() / 1000) + response.expiresIn
310 }));
311 } catch (_) {}
312 return response;
313 })["finally"](function () {
314 accessTokenRequest = null;
315 });
316 }
317 return accessTokenRequest;
318 }
319
320 /***/ }),
321
322 /***/ "./scripts/constants/defaultFormOptions.ts":
323 /*!*************************************************!*\
324 !*** ./scripts/constants/defaultFormOptions.ts ***!
325 \*************************************************/
326 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
327
328 "use strict";
329 __webpack_require__.r(__webpack_exports__);
330 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
331 /* harmony export */ "DEFAULT_OPTIONS": () => (/* binding */ DEFAULT_OPTIONS),
332 /* harmony export */ "isDefaultForm": () => (/* binding */ isDefaultForm)
333 /* harmony export */ });
334 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
335 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
336
337 var BLANK_FORM = 'BLANK';
338 var NEWSLETTER_FORM = 'NEWSLETTER';
339 var CONTACT_US_FORM = 'CONTACT_US';
340 var EVENT_REGISTRATION_FORM = 'EVENT_REGISTRATION';
341 var TALK_TO_AN_EXPERT_FORM = 'TALK_TO_AN_EXPERT';
342 var BOOK_A_MEETING_FORM = 'BOOK_A_MEETING';
343 var GATED_CONTENT_FORM = 'GATED_CONTENT';
344 var DEFAULT_OPTIONS = {
345 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Templates', 'leadin'),
346 options: [{
347 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Blank Form', 'leadin'),
348 value: BLANK_FORM
349 }, {
350 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Newsletter Form', 'leadin'),
351 value: NEWSLETTER_FORM
352 }, {
353 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Contact Us Form', 'leadin'),
354 value: CONTACT_US_FORM
355 }, {
356 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Event Registration Form', 'leadin'),
357 value: EVENT_REGISTRATION_FORM
358 }, {
359 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Talk to an Expert Form', 'leadin'),
360 value: TALK_TO_AN_EXPERT_FORM
361 }, {
362 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Book a Meeting Form', 'leadin'),
363 value: BOOK_A_MEETING_FORM
364 }, {
365 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Gated Content Form', 'leadin'),
366 value: GATED_CONTENT_FORM
367 }]
368 };
369 function isDefaultForm(value) {
370 return value === BLANK_FORM || value === NEWSLETTER_FORM || value === CONTACT_US_FORM || value === EVENT_REGISTRATION_FORM || value === TALK_TO_AN_EXPERT_FORM || value === BOOK_A_MEETING_FORM || value === GATED_CONTENT_FORM;
371 }
372
373 /***/ }),
374
375 /***/ "./scripts/constants/leadinConfig.ts":
376 /*!*******************************************!*\
377 !*** ./scripts/constants/leadinConfig.ts ***!
378 \*******************************************/
379 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
380
381 "use strict";
382 __webpack_require__.r(__webpack_exports__);
383 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
384 /* harmony export */ "accountName": () => (/* binding */ accountName),
385 /* harmony export */ "activationTime": () => (/* binding */ activationTime),
386 /* harmony export */ "adminUrl": () => (/* binding */ adminUrl),
387 /* harmony export */ "connectionStatus": () => (/* binding */ connectionStatus),
388 /* harmony export */ "contentEmbed": () => (/* binding */ contentEmbed),
389 /* harmony export */ "decryptError": () => (/* binding */ decryptError),
390 /* harmony export */ "deviceId": () => (/* binding */ deviceId),
391 /* harmony export */ "didDisconnect": () => (/* binding */ didDisconnect),
392 /* harmony export */ "env": () => (/* binding */ env),
393 /* harmony export */ "formsScript": () => (/* binding */ formsScript),
394 /* harmony export */ "formsScriptPayload": () => (/* binding */ formsScriptPayload),
395 /* harmony export */ "hublet": () => (/* binding */ hublet),
396 /* harmony export */ "hubspotBaseUrl": () => (/* binding */ hubspotBaseUrl),
397 /* harmony export */ "hubspotNonce": () => (/* binding */ hubspotNonce),
398 /* harmony export */ "iframeUrl": () => (/* binding */ iframeUrl),
399 /* harmony export */ "impactLink": () => (/* binding */ impactLink),
400 /* harmony export */ "lastAuthorizeTime": () => (/* binding */ lastAuthorizeTime),
401 /* harmony export */ "lastDeauthorizeTime": () => (/* binding */ lastDeauthorizeTime),
402 /* harmony export */ "lastDisconnectTime": () => (/* binding */ lastDisconnectTime),
403 /* harmony export */ "leadinPluginVersion": () => (/* binding */ leadinPluginVersion),
404 /* harmony export */ "leadinQueryParams": () => (/* binding */ leadinQueryParams),
405 /* harmony export */ "locale": () => (/* binding */ locale),
406 /* harmony export */ "loginUrl": () => (/* binding */ loginUrl),
407 /* harmony export */ "meetingsScript": () => (/* binding */ meetingsScript),
408 /* harmony export */ "phpVersion": () => (/* binding */ phpVersion),
409 /* harmony export */ "pluginPath": () => (/* binding */ pluginPath),
410 /* harmony export */ "plugins": () => (/* binding */ plugins),
411 /* harmony export */ "portalDomain": () => (/* binding */ portalDomain),
412 /* harmony export */ "portalEmail": () => (/* binding */ portalEmail),
413 /* harmony export */ "portalId": () => (/* binding */ portalId),
414 /* harmony export */ "redirectNonce": () => (/* binding */ redirectNonce),
415 /* harmony export */ "refreshToken": () => (/* binding */ refreshToken),
416 /* harmony export */ "requiresContentEmbedScope": () => (/* binding */ requiresContentEmbedScope),
417 /* harmony export */ "restNonce": () => (/* binding */ restNonce),
418 /* harmony export */ "restUrl": () => (/* binding */ restUrl),
419 /* harmony export */ "reviewSkippedDate": () => (/* binding */ reviewSkippedDate),
420 /* harmony export */ "theme": () => (/* binding */ theme),
421 /* harmony export */ "trackConsent": () => (/* binding */ trackConsent),
422 /* harmony export */ "wpVersion": () => (/* binding */ wpVersion)
423 /* harmony export */ });
424 var _window$leadinConfig = window.leadinConfig,
425 accountName = _window$leadinConfig.accountName,
426 adminUrl = _window$leadinConfig.adminUrl,
427 activationTime = _window$leadinConfig.activationTime,
428 connectionStatus = _window$leadinConfig.connectionStatus,
429 deviceId = _window$leadinConfig.deviceId,
430 didDisconnect = _window$leadinConfig.didDisconnect,
431 env = _window$leadinConfig.env,
432 formsScript = _window$leadinConfig.formsScript,
433 meetingsScript = _window$leadinConfig.meetingsScript,
434 formsScriptPayload = _window$leadinConfig.formsScriptPayload,
435 hublet = _window$leadinConfig.hublet,
436 hubspotBaseUrl = _window$leadinConfig.hubspotBaseUrl,
437 hubspotNonce = _window$leadinConfig.hubspotNonce,
438 iframeUrl = _window$leadinConfig.iframeUrl,
439 impactLink = _window$leadinConfig.impactLink,
440 lastAuthorizeTime = _window$leadinConfig.lastAuthorizeTime,
441 lastDeauthorizeTime = _window$leadinConfig.lastDeauthorizeTime,
442 lastDisconnectTime = _window$leadinConfig.lastDisconnectTime,
443 leadinPluginVersion = _window$leadinConfig.leadinPluginVersion,
444 leadinQueryParams = _window$leadinConfig.leadinQueryParams,
445 locale = _window$leadinConfig.locale,
446 loginUrl = _window$leadinConfig.loginUrl,
447 phpVersion = _window$leadinConfig.phpVersion,
448 pluginPath = _window$leadinConfig.pluginPath,
449 plugins = _window$leadinConfig.plugins,
450 portalDomain = _window$leadinConfig.portalDomain,
451 portalEmail = _window$leadinConfig.portalEmail,
452 portalId = _window$leadinConfig.portalId,
453 redirectNonce = _window$leadinConfig.redirectNonce,
454 restNonce = _window$leadinConfig.restNonce,
455 restUrl = _window$leadinConfig.restUrl,
456 refreshToken = _window$leadinConfig.refreshToken,
457 reviewSkippedDate = _window$leadinConfig.reviewSkippedDate,
458 theme = _window$leadinConfig.theme,
459 trackConsent = _window$leadinConfig.trackConsent,
460 wpVersion = _window$leadinConfig.wpVersion,
461 contentEmbed = _window$leadinConfig.contentEmbed,
462 requiresContentEmbedScope = _window$leadinConfig.requiresContentEmbedScope,
463 decryptError = _window$leadinConfig.decryptError;
464
465
466 /***/ }),
467
468 /***/ "./scripts/gutenberg/Common/CalendarIcon.tsx":
469 /*!***************************************************!*\
470 !*** ./scripts/gutenberg/Common/CalendarIcon.tsx ***!
471 \***************************************************/
472 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
473
474 "use strict";
475 __webpack_require__.r(__webpack_exports__);
476 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
477 /* harmony export */ "default": () => (/* binding */ CalendarIcon)
478 /* harmony export */ });
479 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
480
481 function CalendarIcon() {
482 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
483 width: "18",
484 height: "18",
485 viewBox: "0 0 18 18",
486 fill: "none",
487 xmlns: "http://www.w3.org/2000/svg",
488 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
489 clipPath: "url(#clip0_903_1965)",
490 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
491 fillRule: "evenodd",
492 clipRule: "evenodd",
493 d: "M13.519 2.48009H15.069H15.0697C16.2619 2.48719 17.2262 3.45597 17.2262 4.65016V12.7434C17.223 12.9953 17.1203 13.2226 16.9549 13.3886L12.6148 17.7287C12.4488 17.8941 12.2214 17.9968 11.9689 18H3.29508C2.09637 18 1.125 17.0286 1.125 15.8299V4.65016C1.125 3.45404 2.09314 2.48396 3.28862 2.48009H4.83867V0.930032C4.83867 0.416577 5.25525 0 5.7687 0C6.28216 0 6.69874 0.416577 6.69874 0.930032V2.48009H11.6589V0.930032C11.6589 0.416577 12.0755 0 12.5889 0C13.1024 0 13.519 0.416577 13.519 0.930032V2.48009ZM2.98506 15.8312C2.99863 15.9882 3.12909 16.1115 3.28862 16.1141H11.5814L11.6589 16.0366V13.634C11.6589 12.9494 12.2143 12.394 12.899 12.394H15.2951L15.3726 12.3165V7.4338H2.98506V15.8312ZM4.83868 8.68029H6.07873H6.07937C6.42684 8.68029 6.71037 8.95478 6.72458 9.30032V14.2863C6.72458 14.6428 6.43524 14.9322 6.07873 14.9322H4.83868C4.48217 14.9322 4.19283 14.6428 4.19283 14.2863V9.32615C4.19283 8.96964 4.48217 8.68029 4.83868 8.68029ZM8.53298 8.68029H9.82469H9.82534C10.1728 8.68029 10.4563 8.95478 10.4705 9.30032V14.2863C10.4705 14.6428 10.1812 14.9322 9.82469 14.9322H8.53298C8.17647 14.9322 7.88712 14.6428 7.88712 14.2863V9.32615C7.88712 8.96964 8.17647 8.68029 8.53298 8.68029ZM13.519 8.68029H12.2789C11.9366 8.68029 11.6589 8.95801 11.6589 9.30032V10.5404C11.6589 10.8827 11.9366 11.1604 12.2789 11.1604H13.519C13.8613 11.1604 14.139 10.8827 14.139 10.5404V9.30032C14.139 8.95801 13.8613 8.68029 13.519 8.68029Z",
494 fill: "#FF7A59"
495 })
496 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("defs", {
497 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("clipPath", {
498 id: "clip0_903_1965",
499 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("rect", {
500 width: "18",
501 height: "18",
502 fill: "white"
503 })
504 })
505 })]
506 });
507 }
508
509 /***/ }),
510
511 /***/ "./scripts/gutenberg/Common/SidebarSprocketIcon.tsx":
512 /*!**********************************************************!*\
513 !*** ./scripts/gutenberg/Common/SidebarSprocketIcon.tsx ***!
514 \**********************************************************/
515 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
516
517 "use strict";
518 __webpack_require__.r(__webpack_exports__);
519 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
520 /* harmony export */ "default": () => (/* binding */ SidebarSprocketIcon)
521 /* harmony export */ });
522 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
523
524 function SidebarSprocketIcon() {
525 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", {
526 width: "20px",
527 height: "20px",
528 version: "1.1",
529 viewBox: "0 0 40 42",
530 xmlns: "http://www.w3.org/2000/svg",
531 xmlnsXlink: "http://www.w3.org/1999/xlink",
532 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
533 d: "M28.8989809,30.0402293 C25.817707,30.0402293 23.319363,27.5423949 23.319363,24.461121 C23.319363,21.3798471 25.817707,18.881758 28.8989809,18.881758 C31.98,18.881758 34.4780892,21.3798471 34.4780892,24.461121 C34.4780892,27.5423949 31.98,30.0402293 28.8989809,30.0402293 M30.5692994,13.7199745 L30.5692994,8.75717196 C31.864586,8.14519744 32.7723567,6.8346242 32.7723567,5.31360508 L32.7723567,5.1989554 C32.7723567,3.10010191 31.0546497,1.38264968 28.956051,1.38264968 L28.8414013,1.38264968 C26.7425478,1.38264968 25.0248408,3.10010191 25.0248408,5.1989554 L25.0248408,5.31360508 C25.0248408,6.8346242 25.9328662,8.14519744 27.2281529,8.75717196 L27.2281529,13.7202293 C25.2994904,14.0180637 23.5371974,14.8137325 22.0829299,15.9844331 L8.45643312,5.38417836 C8.54611464,5.0392102 8.6090446,4.6835414 8.60955416,4.310293 C8.61261148,1.93271338 6.68777072,0.00303184713 4.31019108,-2.5477707e-05 C1.93286624,-0.00308280255 0.0029299363,1.92175796 0.000127388535,4.29933756 C-0.0029299363,6.67666244 1.92191083,8.60634396 4.29949044,8.60940128 C5.07426752,8.6104204 5.7912102,8.390293 6.42,8.03284076 L19.8243312,18.4603567 C18.6842038,20.181121 18.0166879,22.2422675 18.0166879,24.461121 C18.0166879,26.7841784 18.7504458,28.9327134 19.9907006,30.7001019 L15.9142675,34.776535 C15.5919745,34.6799745 15.2574522,34.6122038 14.9033121,34.6122038 C12.9499363,34.6122038 11.3659873,36.1961529 11.3659873,38.1497834 C11.3659873,40.103414 12.9499363,41.6871084 14.9033121,41.6871084 C16.8571974,41.6871084 18.4408917,40.103414 18.4408917,38.1497834 C18.4408917,37.7958981 18.3733758,37.461121 18.2765605,37.1390828 L22.3089172,33.1067261 C24.1392357,34.5041784 26.4184713,35.3431592 28.8989809,35.3431592 C34.9089172,35.3431592 39.7810191,30.4710573 39.7810191,24.461121 C39.7810191,19.0203567 35.7840764,14.5255796 30.5692994,13.7199745",
534 id: "Fill-1",
535 fillRule: "evenodd"
536 })
537 });
538 }
539
540 /***/ }),
541
542 /***/ "./scripts/gutenberg/Common/SprocketIcon.tsx":
543 /*!***************************************************!*\
544 !*** ./scripts/gutenberg/Common/SprocketIcon.tsx ***!
545 \***************************************************/
546 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
547
548 "use strict";
549 __webpack_require__.r(__webpack_exports__);
550 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
551 /* harmony export */ "default": () => (/* binding */ SprocketIcon)
552 /* harmony export */ });
553 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
554
555 function SprocketIcon() {
556 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
557 width: "40px",
558 height: "42px",
559 viewBox: "0 0 40 42",
560 version: "1.1",
561 xmlns: "http://www.w3.org/2000/svg",
562 xmlnsXlink: "http://www.w3.org/1999/xlink",
563 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("defs", {
564 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("polygon", {
565 id: "path-1",
566 points: "0.000123751494 0 39.7808917 0 39.7808917 41.6871084 0.000123751494 41.6871084"
567 })
568 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
569 id: "Page-1",
570 stroke: "none",
571 strokeWidth: "1",
572 fill: "none",
573 fillRule: "evenodd",
574 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("g", {
575 id: "HubSpot-Sprocket---Full-Color",
576 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("mask", {
577 id: "mask-2",
578 fill: "white",
579 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("use", {
580 xlinkHref: "#path-1"
581 })
582 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
583 id: "path-1"
584 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
585 d: "M28.8989809,30.0402293 C25.817707,30.0402293 23.319363,27.5423949 23.319363,24.461121 C23.319363,21.3798471 25.817707,18.881758 28.8989809,18.881758 C31.98,18.881758 34.4780892,21.3798471 34.4780892,24.461121 C34.4780892,27.5423949 31.98,30.0402293 28.8989809,30.0402293 M30.5692994,13.7199745 L30.5692994,8.75717196 C31.864586,8.14519744 32.7723567,6.8346242 32.7723567,5.31360508 L32.7723567,5.1989554 C32.7723567,3.10010191 31.0546497,1.38264968 28.956051,1.38264968 L28.8414013,1.38264968 C26.7425478,1.38264968 25.0248408,3.10010191 25.0248408,5.1989554 L25.0248408,5.31360508 C25.0248408,6.8346242 25.9328662,8.14519744 27.2281529,8.75717196 L27.2281529,13.7202293 C25.2994904,14.0180637 23.5371974,14.8137325 22.0829299,15.9844331 L8.45643312,5.38417836 C8.54611464,5.0392102 8.6090446,4.6835414 8.60955416,4.310293 C8.61261148,1.93271338 6.68777072,0.00303184713 4.31019108,-2.5477707e-05 C1.93286624,-0.00308280255 0.0029299363,1.92175796 0.000127388535,4.29933756 C-0.0029299363,6.67666244 1.92191083,8.60634396 4.29949044,8.60940128 C5.07426752,8.6104204 5.7912102,8.390293 6.42,8.03284076 L19.8243312,18.4603567 C18.6842038,20.181121 18.0166879,22.2422675 18.0166879,24.461121 C18.0166879,26.7841784 18.7504458,28.9327134 19.9907006,30.7001019 L15.9142675,34.776535 C15.5919745,34.6799745 15.2574522,34.6122038 14.9033121,34.6122038 C12.9499363,34.6122038 11.3659873,36.1961529 11.3659873,38.1497834 C11.3659873,40.103414 12.9499363,41.6871084 14.9033121,41.6871084 C16.8571974,41.6871084 18.4408917,40.103414 18.4408917,38.1497834 C18.4408917,37.7958981 18.3733758,37.461121 18.2765605,37.1390828 L22.3089172,33.1067261 C24.1392357,34.5041784 26.4184713,35.3431592 28.8989809,35.3431592 C34.9089172,35.3431592 39.7810191,30.4710573 39.7810191,24.461121 C39.7810191,19.0203567 35.7840764,14.5255796 30.5692994,13.7199745",
586 id: "Fill-1",
587 fill: "#F3785B",
588 fillRule: "nonzero",
589 mask: "url(#mask-2)"
590 })]
591 })
592 })]
593 });
594 }
595
596 /***/ }),
597
598 /***/ "./scripts/gutenberg/Common/StylesheetErrorBondary.tsx":
599 /*!*************************************************************!*\
600 !*** ./scripts/gutenberg/Common/StylesheetErrorBondary.tsx ***!
601 \*************************************************************/
602 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
603
604 "use strict";
605 __webpack_require__.r(__webpack_exports__);
606 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
607 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
608 /* harmony export */ });
609 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
610 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
611 /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose");
612 /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__);
613
614
615
616 function StylesheetErrorBondary(_ref) {
617 var children = _ref.children;
618 var ref = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__.useRefEffect)(function (element) {
619 var ownerDocument = element.ownerDocument;
620 if (ownerDocument && !ownerDocument.getElementById('leadin-gutenberg-css')) {
621 var link = ownerDocument.createElement('link');
622 link.id = 'leadin-gutenberg-css';
623 link.rel = 'stylesheet';
624 link.href = "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.pluginPath, "/build/gutenberg.css?ver=").concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.leadinPluginVersion);
625 ownerDocument.head.appendChild(link);
626 }
627 }, []);
628 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
629 ref: ref,
630 children: children
631 });
632 }
633 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StylesheetErrorBondary);
634
635 /***/ }),
636
637 /***/ "./scripts/gutenberg/Common/useCustomCssBlockProps.ts":
638 /*!************************************************************!*\
639 !*** ./scripts/gutenberg/Common/useCustomCssBlockProps.ts ***!
640 \************************************************************/
641 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
642
643 "use strict";
644 __webpack_require__.r(__webpack_exports__);
645 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
646 /* harmony export */ "default": () => (/* binding */ useCustomCssBlockProps)
647 /* harmony export */ });
648 /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
649 /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
650
651 function useCustomCssBlockProps(defaultCssClasses) {
652 var blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save();
653 if (!blockProps.className || !blockProps.className.includes(defaultCssClasses)) {
654 blockProps.className = "".concat(blockProps.className, " ").concat(defaultCssClasses);
655 }
656 return blockProps;
657 }
658
659 /***/ }),
660
661 /***/ "./scripts/gutenberg/FormBlock/FormBlockSave.tsx":
662 /*!*******************************************************!*\
663 !*** ./scripts/gutenberg/FormBlock/FormBlockSave.tsx ***!
664 \*******************************************************/
665 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
666
667 "use strict";
668 __webpack_require__.r(__webpack_exports__);
669 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
670 /* harmony export */ "default": () => (/* binding */ FormSaveBlock)
671 /* harmony export */ });
672 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
673 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
674 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
675 /* harmony import */ var _Common_useCustomCssBlockProps__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/useCustomCssBlockProps */ "./scripts/gutenberg/Common/useCustomCssBlockProps.ts");
676 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
677 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
678 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
679 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
680 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
681 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
682
683
684
685 var DefaultCssClasses = 'wp-block-leadin-hubspot-form-block';
686 function FormSaveBlock(_ref) {
687 var attributes = _ref.attributes;
688 var portalId = attributes.portalId,
689 formId = attributes.formId,
690 embedVersion = attributes.embedVersion;
691 var blockProps = (0,_Common_useCustomCssBlockProps__WEBPACK_IMPORTED_MODULE_2__["default"])(DefaultCssClasses);
692 if (portalId && formId) {
693 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, _objectSpread(_objectSpread({}, blockProps), {}, {
694 children: "[hubspot portal=\"".concat(portalId, "\" id=\"").concat(formId, "\" version=\"").concat(embedVersion, "\" type=\"form\"]")
695 }));
696 }
697 return null;
698 }
699
700 /***/ }),
701
702 /***/ "./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx":
703 /*!**************************************************************!*\
704 !*** ./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx ***!
705 \**************************************************************/
706 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
707
708 "use strict";
709 __webpack_require__.r(__webpack_exports__);
710 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
711 /* harmony export */ "default": () => (/* binding */ FormGutenbergPreview)
712 /* harmony export */ });
713 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
714 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
715 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
716 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
717 /* harmony import */ var _UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UIImage */ "./scripts/gutenberg/UIComponents/UIImage.ts");
718
719
720
721
722 function FormGutenbergPreview() {
723 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
724 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__["default"], {
725 alt: "Create a new Hubspot Form",
726 src: "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath, "/public/assets/images/hubspot-form.png")
727 })
728 });
729 }
730
731 /***/ }),
732
733 /***/ "./scripts/gutenberg/FormBlock/registerFormBlock.tsx":
734 /*!***********************************************************!*\
735 !*** ./scripts/gutenberg/FormBlock/registerFormBlock.tsx ***!
736 \***********************************************************/
737 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
738
739 "use strict";
740 __webpack_require__.r(__webpack_exports__);
741 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
742 /* harmony export */ "default": () => (/* binding */ registerFormBlock)
743 /* harmony export */ });
744 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
745 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
746 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
747 /* harmony import */ var _Common_SprocketIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/SprocketIcon */ "./scripts/gutenberg/Common/SprocketIcon.tsx");
748 /* harmony import */ var _Common_StylesheetErrorBondary__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Common/StylesheetErrorBondary */ "./scripts/gutenberg/Common/StylesheetErrorBondary.tsx");
749 /* harmony import */ var _FormBlockSave__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./FormBlockSave */ "./scripts/gutenberg/FormBlock/FormBlockSave.tsx");
750 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
751 /* harmony import */ var _FormGutenbergPreview__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./FormGutenbergPreview */ "./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx");
752 /* harmony import */ var _shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../shared/Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
753 /* harmony import */ var _shared_Form_FormEdit__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../shared/Form/FormEdit */ "./scripts/shared/Form/FormEdit.tsx");
754 /* harmony import */ var _shared_enums_connectionStatus__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../shared/enums/connectionStatus */ "./scripts/shared/enums/connectionStatus.ts");
755 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
756 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);
757 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
758 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
759 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
760 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
761 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
762 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
763 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
764
765
766
767
768
769
770
771
772
773
774
775
776 function registerFormBlock() {
777 var editComponent = function editComponent(props) {
778 var isPreview = props.attributes.preview;
779 var isConnected = _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__.connectionStatus === _shared_enums_connectionStatus__WEBPACK_IMPORTED_MODULE_9__["default"].Connected;
780 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_StylesheetErrorBondary__WEBPACK_IMPORTED_MODULE_3__["default"], {
781 children: isPreview ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormGutenbergPreview__WEBPACK_IMPORTED_MODULE_6__["default"], {}) : isConnected ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Form_FormEdit__WEBPACK_IMPORTED_MODULE_8__["default"], _objectSpread(_objectSpread({}, props), {}, {
782 origin: "gutenberg",
783 preview: true,
784 fullSiteEditor: (0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_11__.isFullSiteEditor)()
785 })) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__["default"], {
786 status: 401
787 })
788 });
789 };
790 // We do not support the full site editor: https://issues.hubspotcentral.com/browse/WP-1033
791 if (!_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__) {
792 return null;
793 }
794 _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType('leadin/hubspot-form-block', {
795 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__.__)('HubSpot Form', 'leadin'),
796 description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__.__)('Select and embed a HubSpot form', 'leadin'),
797 icon: _Common_SprocketIcon__WEBPACK_IMPORTED_MODULE_2__["default"],
798 category: 'leadin-blocks',
799 attributes: {
800 portalId: {
801 type: 'string',
802 "default": ''
803 },
804 formId: {
805 type: 'string'
806 },
807 formName: {
808 type: 'string'
809 },
810 embedVersion: {
811 type: 'string'
812 },
813 preview: {
814 type: 'boolean',
815 "default": false
816 }
817 },
818 example: {
819 attributes: {
820 preview: true
821 }
822 },
823 edit: editComponent,
824 save: function save(props) {
825 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormBlockSave__WEBPACK_IMPORTED_MODULE_4__["default"], _objectSpread({}, props));
826 }
827 });
828 }
829
830 /***/ }),
831
832 /***/ "./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx":
833 /*!*********************************************************************!*\
834 !*** ./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx ***!
835 \*********************************************************************/
836 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
837
838 "use strict";
839 __webpack_require__.r(__webpack_exports__);
840 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
841 /* harmony export */ "default": () => (/* binding */ MeetingGutenbergPreview)
842 /* harmony export */ });
843 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
844 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
845 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
846 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
847 /* harmony import */ var _UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UIImage */ "./scripts/gutenberg/UIComponents/UIImage.ts");
848
849
850
851
852 function MeetingGutenbergPreview() {
853 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
854 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__["default"], {
855 alt: "Create a new Hubspot Meeting",
856 width: "100%",
857 src: "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath, "/public/assets/images/hubspot-meetings.png")
858 })
859 });
860 }
861
862 /***/ }),
863
864 /***/ "./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx":
865 /*!**************************************************************!*\
866 !*** ./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx ***!
867 \**************************************************************/
868 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
869
870 "use strict";
871 __webpack_require__.r(__webpack_exports__);
872 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
873 /* harmony export */ "default": () => (/* binding */ MeetingSaveBlock)
874 /* harmony export */ });
875 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
876 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
877 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
878 /* harmony import */ var _Common_useCustomCssBlockProps__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/useCustomCssBlockProps */ "./scripts/gutenberg/Common/useCustomCssBlockProps.ts");
879 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
880 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
881 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
882 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
883 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
884 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
885
886
887
888 var DefaultCssClasses = 'wp-block-leadin-hubspot-meeting-block';
889 function MeetingSaveBlock(_ref) {
890 var attributes = _ref.attributes;
891 var url = attributes.url;
892 var blockProps = (0,_Common_useCustomCssBlockProps__WEBPACK_IMPORTED_MODULE_2__["default"])(DefaultCssClasses);
893 if (url) {
894 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, _objectSpread(_objectSpread({}, blockProps), {}, {
895 children: "[hubspot url=\"".concat(url, "\" type=\"meeting\"]")
896 }));
897 }
898 return null;
899 }
900
901 /***/ }),
902
903 /***/ "./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx":
904 /*!******************************************************************!*\
905 !*** ./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx ***!
906 \******************************************************************/
907 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
908
909 "use strict";
910 __webpack_require__.r(__webpack_exports__);
911 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
912 /* harmony export */ "default": () => (/* binding */ registerMeetingBlock)
913 /* harmony export */ });
914 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
915 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
916 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
917 /* harmony import */ var _Common_CalendarIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/CalendarIcon */ "./scripts/gutenberg/Common/CalendarIcon.tsx");
918 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
919 /* harmony import */ var _MeetingGutenbergPreview__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MeetingGutenbergPreview */ "./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx");
920 /* harmony import */ var _MeetingSaveBlock__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./MeetingSaveBlock */ "./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx");
921 /* harmony import */ var _shared_Meeting_MeetingEdit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../shared/Meeting/MeetingEdit */ "./scripts/shared/Meeting/MeetingEdit.tsx");
922 /* harmony import */ var _shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../shared/Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
923 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
924 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__);
925 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
926 /* harmony import */ var _Common_StylesheetErrorBondary__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Common/StylesheetErrorBondary */ "./scripts/gutenberg/Common/StylesheetErrorBondary.tsx");
927 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
928 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
929 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
930 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
931 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
932 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
933
934
935
936
937
938
939
940
941
942
943
944 var ConnectionStatus = {
945 Connected: 'Connected',
946 NotConnected: 'NotConnected'
947 };
948 function registerMeetingBlock() {
949 var editComponent = function editComponent(props) {
950 var isPreview = props.attributes.preview;
951 var isConnected = _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.connectionStatus === ConnectionStatus.Connected;
952 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_StylesheetErrorBondary__WEBPACK_IMPORTED_MODULE_10__["default"], {
953 children: isPreview ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingGutenbergPreview__WEBPACK_IMPORTED_MODULE_4__["default"], {}) : isConnected ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Meeting_MeetingEdit__WEBPACK_IMPORTED_MODULE_6__["default"], _objectSpread(_objectSpread({}, props), {}, {
954 preview: true,
955 origin: "gutenberg",
956 fullSiteEditor: (0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_9__.isFullSiteEditor)()
957 })) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__["default"], {
958 status: 401
959 })
960 });
961 };
962 // We do not support the full site editor: https://issues.hubspotcentral.com/browse/WP-1033
963 if (!_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__) {
964 return null;
965 }
966 _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType('leadin/hubspot-meeting-block', {
967 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Hubspot Meetings Scheduler', 'leadin'),
968 description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Schedule meetings faster and forget the back-and-forth emails Your calendar stays full, and you stay productive', 'leadin'),
969 icon: _Common_CalendarIcon__WEBPACK_IMPORTED_MODULE_2__["default"],
970 category: 'leadin-blocks',
971 attributes: {
972 url: {
973 type: 'string',
974 "default": ''
975 },
976 preview: {
977 type: 'boolean',
978 "default": false
979 }
980 },
981 example: {
982 attributes: {
983 preview: true
984 }
985 },
986 edit: editComponent,
987 save: function save(props) {
988 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingSaveBlock__WEBPACK_IMPORTED_MODULE_5__["default"], _objectSpread({}, props));
989 }
990 });
991 }
992
993 /***/ }),
994
995 /***/ "./scripts/gutenberg/Sidebar/contentType.tsx":
996 /*!***************************************************!*\
997 !*** ./scripts/gutenberg/Sidebar/contentType.tsx ***!
998 \***************************************************/
999 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1000
1001 "use strict";
1002 __webpack_require__.r(__webpack_exports__);
1003 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1004 /* harmony export */ "registerHubspotSidebar": () => (/* binding */ registerHubspotSidebar)
1005 /* harmony export */ });
1006 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1007 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1008 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1009 /* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/plugins */ "@wordpress/plugins");
1010 /* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_2__);
1011 /* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/edit-post */ "@wordpress/edit-post");
1012 /* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_3__);
1013 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
1014 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
1015 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
1016 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);
1017 /* harmony import */ var _UIComponents_UISidebarSelectControl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../UIComponents/UISidebarSelectControl */ "./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx");
1018 /* harmony import */ var _Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/SidebarSprocketIcon */ "./scripts/gutenberg/Common/SidebarSprocketIcon.tsx");
1019 /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js");
1020 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1021 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__);
1022 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1023 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
1024 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
1025 /* harmony import */ var _utils_isRefreshTokenAvailable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/isRefreshTokenAvailable */ "./scripts/utils/isRefreshTokenAvailable.ts");
1026 /* harmony import */ var _api_wordpressApiClient__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../api/wordpressApiClient */ "./scripts/api/wordpressApiClient.ts");
1027 var _templateObject;
1028 function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
1029 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1030 function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
1031 function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1032 function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
1033 function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
1034 function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050 function registerHubspotSidebar() {
1051 var ContentTypeLabelStyle = styled_components__WEBPACK_IMPORTED_MODULE_14__["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n white-space: normal;\n text-transform: none;\n "])));
1052 var ContentTypeLabel = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ContentTypeLabelStyle, {
1053 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Select the content type HubSpot Analytics uses to track this page', 'leadin')
1054 });
1055 var LeadinPluginSidebar = function LeadinPluginSidebar(_ref) {
1056 var postType = _ref.postType;
1057 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null),
1058 _useState2 = _slicedToArray(_useState, 2),
1059 embedder = _useState2[0],
1060 setEmbedder = _useState2[1];
1061 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1062 if ((0,_utils_isRefreshTokenAvailable__WEBPACK_IMPORTED_MODULE_12__.isRefreshTokenAvailable)()) {
1063 (0,_api_wordpressApiClient__WEBPACK_IMPORTED_MODULE_13__.fetchAccessToken)().then(function (_ref2) {
1064 var accessToken = _ref2.accessToken,
1065 expiresIn = _ref2.expiresIn;
1066 setEmbedder((0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_10__.getOrCreateBackgroundApp)(accessToken, expiresIn));
1067 })["catch"](function () {});
1068 }
1069 }, []);
1070 return postType && !(0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_11__.isFullSiteEditor)() ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_3__.PluginSidebar, {
1071 name: "leadin",
1072 title: "HubSpot",
1073 icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Icon, {
1074 className: "hs-plugin-sidebar-sprocket",
1075 icon: (0,_Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_7__["default"])()
1076 }),
1077 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
1078 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('HubSpot Analytics', 'leadin'),
1079 initialOpen: true,
1080 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_9__.BackgroudAppContext.Provider, {
1081 value: embedder,
1082 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISidebarSelectControl__WEBPACK_IMPORTED_MODULE_6__["default"], {
1083 metaKey: "content-type",
1084 className: "select-content-type",
1085 label: ContentTypeLabel,
1086 options: [{
1087 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Detect Automatically', 'leadin'),
1088 value: ''
1089 }, {
1090 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Blog Post', 'leadin'),
1091 value: 'blog-post'
1092 }, {
1093 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Knowledge Article', 'leadin'),
1094 value: 'knowledge-article'
1095 }, {
1096 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Landing Page', 'leadin'),
1097 value: 'landing-page'
1098 }, {
1099 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Listing Page', 'leadin'),
1100 value: 'listing-page'
1101 }, {
1102 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Standard Page', 'leadin'),
1103 value: 'standard-page'
1104 }]
1105 })
1106 })
1107 })
1108 }) : null;
1109 };
1110 var LeadinPluginSidebarWrapper = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.withSelect)(function (select) {
1111 var data = select('core/editor');
1112 return {
1113 postType: data && data.getCurrentPostType() && data.getEditedPostAttribute('meta')
1114 };
1115 })(LeadinPluginSidebar);
1116 if (_wordpress_plugins__WEBPACK_IMPORTED_MODULE_2__) {
1117 _wordpress_plugins__WEBPACK_IMPORTED_MODULE_2__.registerPlugin('leadin', {
1118 render: LeadinPluginSidebarWrapper,
1119 icon: _Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_7__["default"]
1120 });
1121 }
1122 }
1123
1124 /***/ }),
1125
1126 /***/ "./scripts/gutenberg/UIComponents/UIImage.ts":
1127 /*!***************************************************!*\
1128 !*** ./scripts/gutenberg/UIComponents/UIImage.ts ***!
1129 \***************************************************/
1130 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1131
1132 "use strict";
1133 __webpack_require__.r(__webpack_exports__);
1134 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1135 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1136 /* harmony export */ });
1137 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
1138
1139 var _exp = /*#__PURE__*/function _exp() {
1140 return function (props) {
1141 return props.height ? props.height : 'auto';
1142 };
1143 };
1144 var _exp2 = /*#__PURE__*/function _exp2() {
1145 return function (props) {
1146 return props.width ? props.width : 'auto';
1147 };
1148 };
1149 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('img')({
1150 name: "UIImage0",
1151 "class": "ump7xqy",
1152 propsAsIs: false,
1153 vars: {
1154 "ump7xqy-0": [_exp()],
1155 "ump7xqy-1": [_exp2()]
1156 }
1157 }));
1158 __webpack_require__(/*! ./UIImage.linaria.css!=!../../../node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./UIImage.ts */ "./scripts/gutenberg/UIComponents/UIImage.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/gutenberg/UIComponents/UIImage.ts");
1159
1160 /***/ }),
1161
1162 /***/ "./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx":
1163 /*!*******************************************************************!*\
1164 !*** ./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx ***!
1165 \*******************************************************************/
1166 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1167
1168 "use strict";
1169 __webpack_require__.r(__webpack_exports__);
1170 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1171 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1172 /* harmony export */ });
1173 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1174 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
1175 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
1176 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
1177 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1178 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
1179 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
1180 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1181 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1182 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1183 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
1184 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
1185
1186
1187
1188
1189
1190 var UISidebarSelectControl = function UISidebarSelectControl(props) {
1191 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__.useBackgroundAppContext)();
1192 var monitorSidebarMetaChange = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__.usePostBackgroundMessage)();
1193 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, _objectSpread({
1194 value: props.metaValue,
1195 onChange: function onChange(content) {
1196 if (props.setMetaValue) {
1197 props.setMetaValue(content);
1198 }
1199 isBackgroundAppReady && monitorSidebarMetaChange({
1200 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages.TrackSidebarMetaChange,
1201 payload: {
1202 metaKey: props.metaKey
1203 }
1204 });
1205 }
1206 }, props));
1207 };
1208 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_2__["default"])(UISidebarSelectControl));
1209
1210 /***/ }),
1211
1212 /***/ "./scripts/iframe/integratedMessages/core/CoreMessages.ts":
1213 /*!****************************************************************!*\
1214 !*** ./scripts/iframe/integratedMessages/core/CoreMessages.ts ***!
1215 \****************************************************************/
1216 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1217
1218 "use strict";
1219 __webpack_require__.r(__webpack_exports__);
1220 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1221 /* harmony export */ "CoreMessages": () => (/* binding */ CoreMessages)
1222 /* harmony export */ });
1223 var CoreMessages = {
1224 HandshakeReceive: 'INTEGRATED_APP_EMBEDDER_HANDSHAKE_RECEIVED',
1225 SendRefreshToken: 'INTEGRATED_APP_EMBEDDER_SEND_REFRESH_TOKEN',
1226 ReloadParentFrame: 'INTEGRATED_APP_EMBEDDER_RELOAD_PARENT_FRAME',
1227 RedirectParentFrame: 'INTEGRATED_APP_EMBEDDER_REDIRECT_PARENT_FRAME',
1228 SendLocale: 'INTEGRATED_APP_EMBEDDER_SEND_LOCALE',
1229 SendDeviceId: 'INTEGRATED_APP_EMBEDDER_SEND_DEVICE_ID',
1230 SendIntegratedAppConfig: 'INTEGRATED_APP_EMBEDDER_CONFIG'
1231 };
1232
1233 /***/ }),
1234
1235 /***/ "./scripts/iframe/integratedMessages/forms/FormsMessages.ts":
1236 /*!******************************************************************!*\
1237 !*** ./scripts/iframe/integratedMessages/forms/FormsMessages.ts ***!
1238 \******************************************************************/
1239 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1240
1241 "use strict";
1242 __webpack_require__.r(__webpack_exports__);
1243 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1244 /* harmony export */ "FormMessages": () => (/* binding */ FormMessages)
1245 /* harmony export */ });
1246 var FormMessages = {
1247 CreateFormAppNavigation: 'CREATE_FORM_APP_NAVIGATION'
1248 };
1249
1250 /***/ }),
1251
1252 /***/ "./scripts/iframe/integratedMessages/index.ts":
1253 /*!****************************************************!*\
1254 !*** ./scripts/iframe/integratedMessages/index.ts ***!
1255 \****************************************************/
1256 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1257
1258 "use strict";
1259 __webpack_require__.r(__webpack_exports__);
1260 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1261 /* harmony export */ "CoreMessages": () => (/* reexport safe */ _core_CoreMessages__WEBPACK_IMPORTED_MODULE_0__.CoreMessages),
1262 /* harmony export */ "FormMessages": () => (/* reexport safe */ _forms_FormsMessages__WEBPACK_IMPORTED_MODULE_1__.FormMessages),
1263 /* harmony export */ "LiveChatMessages": () => (/* reexport safe */ _livechat_LiveChatMessages__WEBPACK_IMPORTED_MODULE_2__.LiveChatMessages),
1264 /* harmony export */ "PluginMessages": () => (/* reexport safe */ _plugin_PluginMessages__WEBPACK_IMPORTED_MODULE_3__.PluginMessages),
1265 /* harmony export */ "ProxyMessages": () => (/* reexport safe */ _proxy_ProxyMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages)
1266 /* harmony export */ });
1267 /* harmony import */ var _core_CoreMessages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/CoreMessages */ "./scripts/iframe/integratedMessages/core/CoreMessages.ts");
1268 /* harmony import */ var _forms_FormsMessages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./forms/FormsMessages */ "./scripts/iframe/integratedMessages/forms/FormsMessages.ts");
1269 /* harmony import */ var _livechat_LiveChatMessages__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./livechat/LiveChatMessages */ "./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts");
1270 /* harmony import */ var _plugin_PluginMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./plugin/PluginMessages */ "./scripts/iframe/integratedMessages/plugin/PluginMessages.ts");
1271 /* harmony import */ var _proxy_ProxyMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./proxy/ProxyMessages */ "./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts");
1272
1273
1274
1275
1276
1277
1278 /***/ }),
1279
1280 /***/ "./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts":
1281 /*!************************************************************************!*\
1282 !*** ./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts ***!
1283 \************************************************************************/
1284 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1285
1286 "use strict";
1287 __webpack_require__.r(__webpack_exports__);
1288 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1289 /* harmony export */ "LiveChatMessages": () => (/* binding */ LiveChatMessages)
1290 /* harmony export */ });
1291 var LiveChatMessages = {
1292 CreateLiveChatAppNavigation: 'CREATE_LIVE_CHAT_APP_NAVIGATION'
1293 };
1294
1295 /***/ }),
1296
1297 /***/ "./scripts/iframe/integratedMessages/plugin/PluginMessages.ts":
1298 /*!********************************************************************!*\
1299 !*** ./scripts/iframe/integratedMessages/plugin/PluginMessages.ts ***!
1300 \********************************************************************/
1301 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1302
1303 "use strict";
1304 __webpack_require__.r(__webpack_exports__);
1305 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1306 /* harmony export */ "PluginMessages": () => (/* binding */ PluginMessages)
1307 /* harmony export */ });
1308 var PluginMessages = {
1309 PluginSettingsNavigation: 'PLUGIN_SETTINGS_NAVIGATION',
1310 PluginLeadinConfig: 'PLUGIN_LEADIN_CONFIG',
1311 TrackConsent: 'INTEGRATED_APP_EMBEDDER_TRACK_CONSENT',
1312 InternalTrackingFetchRequest: 'INTEGRATED_TRACKING_FETCH_REQUEST',
1313 InternalTrackingFetchResponse: 'INTEGRATED_TRACKING_FETCH_RESPONSE',
1314 InternalTrackingFetchError: 'INTEGRATED_TRACKING_FETCH_ERROR',
1315 InternalTrackingChangeRequest: 'INTEGRATED_TRACKING_CHANGE_REQUEST',
1316 InternalTrackingChangeError: 'INTEGRATED_TRACKING_CHANGE_ERROR',
1317 BusinessUnitFetchRequest: 'BUSINESS_UNIT_FETCH_REQUEST',
1318 BusinessUnitFetchResponse: 'BUSINESS_UNIT_FETCH_FETCH_RESPONSE',
1319 BusinessUnitFetchError: 'BUSINESS_UNIT_FETCH_FETCH_ERROR',
1320 BusinessUnitChangeRequest: 'BUSINESS_UNIT_CHANGE_REQUEST',
1321 BusinessUnitChangeError: 'BUSINESS_UNIT_CHANGE_ERROR',
1322 SkipReviewRequest: 'SKIP_REVIEW_REQUEST',
1323 SkipReviewResponse: 'SKIP_REVIEW_RESPONSE',
1324 SkipReviewError: 'SKIP_REVIEW_ERROR',
1325 RemoveParentQueryParam: 'REMOVE_PARENT_QUERY_PARAM',
1326 ContentEmbedInstallRequest: 'CONTENT_EMBED_INSTALL_REQUEST',
1327 ContentEmbedInstallResponse: 'CONTENT_EMBED_INSTALL_RESPONSE',
1328 ContentEmbedInstallError: 'CONTENT_EMBED_INSTALL_ERROR',
1329 ContentEmbedActivationRequest: 'CONTENT_EMBED_ACTIVATION_REQUEST',
1330 ContentEmbedActivationResponse: 'CONTENT_EMBED_ACTIVATION_RESPONSE',
1331 ContentEmbedActivationError: 'CONTENT_EMBED_ACTIVATION_ERROR',
1332 ProxyMappingsEnabledRequest: 'PROXY_MAPPINGS_ENABLED_REQUEST',
1333 ProxyMappingsEnabledResponse: 'PROXY_MAPPINGS_ENABLED_RESPONSE',
1334 ProxyMappingsEnabledError: 'PROXY_MAPPINGS_ENABLED_ERROR',
1335 ProxyMappingsEnabledChangeRequest: 'PROXY_MAPPINGS_ENABLED_CHANGE_REQUEST',
1336 ProxyMappingsEnabledChangeError: 'PROXY_MAPPINGS_ENABLED_CHANGE_ERROR',
1337 RefreshProxyMappingsRequest: 'REFRESH_PROXY_MAPPINGS_REQUEST',
1338 RefreshProxyMappingsResponse: 'REFRESH_PROXY_MAPPINGS_RESPONSE',
1339 RefreshProxyMappingsError: 'REFRESH_PROXY_MAPPINGS_ERROR'
1340 };
1341
1342 /***/ }),
1343
1344 /***/ "./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts":
1345 /*!******************************************************************!*\
1346 !*** ./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts ***!
1347 \******************************************************************/
1348 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1349
1350 "use strict";
1351 __webpack_require__.r(__webpack_exports__);
1352 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1353 /* harmony export */ "ProxyMessages": () => (/* binding */ ProxyMessages)
1354 /* harmony export */ });
1355 var ProxyMessages = {
1356 FetchForms: 'FETCH_FORMS',
1357 FetchForm: 'FETCH_FORM',
1358 CreateFormFromTemplate: 'CREATE_FORM_FROM_TEMPLATE',
1359 GetTemplateAvailability: 'GET_TEMPLATE_AVAILABILITY',
1360 FetchAuth: 'FETCH_AUTH',
1361 FetchMeetingsAndUsers: 'FETCH_MEETINGS_AND_USERS',
1362 FetchContactsCreateSinceActivation: 'FETCH_CONTACTS_CREATED_SINCE_ACTIVATION',
1363 FetchOrCreateMeetingUser: 'FETCH_OR_CREATE_MEETING_USER',
1364 ConnectMeetingsCalendar: 'CONNECT_MEETINGS_CALENDAR',
1365 TrackFormPreviewRender: 'TRACK_FORM_PREVIEW_RENDER',
1366 TrackFormCreatedFromTemplate: 'TRACK_FORM_CREATED_FROM_TEMPLATE',
1367 TrackFormCreationFailed: 'TRACK_FORM_CREATION_FAILED',
1368 TrackMeetingPreviewRender: 'TRACK_MEETING_PREVIEW_RENDER',
1369 TrackSidebarMetaChange: 'TRACK_SIDEBAR_META_CHANGE',
1370 TrackReviewBannerRender: 'TRACK_REVIEW_BANNER_RENDER',
1371 TrackReviewBannerInteraction: 'TRACK_REVIEW_BANNER_INTERACTION',
1372 TrackReviewBannerDismissed: 'TRACK_REVIEW_BANNER_DISMISSED',
1373 TrackPluginDeactivation: 'TRACK_PLUGIN_DEACTIVATION'
1374 };
1375
1376 /***/ }),
1377
1378 /***/ "./scripts/iframe/useBackgroundApp.ts":
1379 /*!********************************************!*\
1380 !*** ./scripts/iframe/useBackgroundApp.ts ***!
1381 \********************************************/
1382 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1383
1384 "use strict";
1385 __webpack_require__.r(__webpack_exports__);
1386 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1387 /* harmony export */ "BackgroudAppContext": () => (/* binding */ BackgroudAppContext),
1388 /* harmony export */ "useBackgroundAppContext": () => (/* binding */ useBackgroundAppContext),
1389 /* harmony export */ "usePostAsyncBackgroundMessage": () => (/* binding */ usePostAsyncBackgroundMessage),
1390 /* harmony export */ "usePostBackgroundMessage": () => (/* binding */ usePostBackgroundMessage)
1391 /* harmony export */ });
1392 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1393 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1394
1395 var BackgroudAppContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
1396 function useBackgroundAppContext() {
1397 return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(BackgroudAppContext);
1398 }
1399 function usePostBackgroundMessage() {
1400 var app = useBackgroundAppContext();
1401 return function (message) {
1402 app.postMessage(message);
1403 };
1404 }
1405 function usePostAsyncBackgroundMessage() {
1406 var app = useBackgroundAppContext();
1407 return function (message) {
1408 return app.postAsyncMessage(message);
1409 };
1410 }
1411
1412 /***/ }),
1413
1414 /***/ "./scripts/lib/Raven.ts":
1415 /*!******************************!*\
1416 !*** ./scripts/lib/Raven.ts ***!
1417 \******************************/
1418 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1419
1420 "use strict";
1421 __webpack_require__.r(__webpack_exports__);
1422 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1423 /* harmony export */ "configureRaven": () => (/* binding */ configureRaven),
1424 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1425 /* harmony export */ });
1426 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! raven-js */ "./node_modules/raven-js/src/singleton.js");
1427 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(raven_js__WEBPACK_IMPORTED_MODULE_0__);
1428 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1429
1430
1431 function configureRaven() {
1432 if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.hubspotBaseUrl.indexOf('local') !== -1) {
1433 return;
1434 }
1435 var domain = _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.hubspotBaseUrl.replace(/https?:\/\/app/, '');
1436 raven_js__WEBPACK_IMPORTED_MODULE_0___default().config("https://a9f08e536ef66abb0bf90becc905b09e@exceptions".concat(domain, "/v2/1"), {
1437 instrument: {
1438 tryCatch: false
1439 },
1440 shouldSendCallback: function shouldSendCallback(data) {
1441 return !!data && !!data.culprit && /plugins\/leadin\//.test(data.culprit);
1442 },
1443 release: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.leadinPluginVersion
1444 }).install();
1445 raven_js__WEBPACK_IMPORTED_MODULE_0___default().setTagsContext({
1446 v: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.leadinPluginVersion,
1447 php: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.phpVersion,
1448 wordpress: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.wpVersion
1449 });
1450 raven_js__WEBPACK_IMPORTED_MODULE_0___default().setExtraContext({
1451 hub: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.portalId,
1452 plugins: Object.keys(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.plugins).map(function (name) {
1453 return "".concat(name, "#").concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.plugins[name]);
1454 }).join(',')
1455 });
1456 }
1457 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((raven_js__WEBPACK_IMPORTED_MODULE_0___default()));
1458
1459 /***/ }),
1460
1461 /***/ "./scripts/shared/Common/AsyncSelect.tsx":
1462 /*!***********************************************!*\
1463 !*** ./scripts/shared/Common/AsyncSelect.tsx ***!
1464 \***********************************************/
1465 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1466
1467 "use strict";
1468 __webpack_require__.r(__webpack_exports__);
1469 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1470 /* harmony export */ "default": () => (/* binding */ AsyncSelect)
1471 /* harmony export */ });
1472 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1473 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1474 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1475 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
1476 /* harmony import */ var _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/colors */ "./scripts/shared/UIComponents/colors.ts");
1477 /* harmony import */ var _UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpinner */ "./scripts/shared/UIComponents/UISpinner.tsx");
1478 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../enums/loadState */ "./scripts/shared/enums/loadState.ts");
1479 function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
1480 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1481 function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
1482 function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1483 function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
1484 function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
1485
1486
1487
1488
1489
1490
1491 var Container = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1492 name: "Container",
1493 "class": "c1wxx7eu",
1494 propsAsIs: false
1495 });
1496 var _exp2 = /*#__PURE__*/function _exp2() {
1497 return function (props) {
1498 return props.focused ? '0' : '1px';
1499 };
1500 };
1501 var _exp3 = /*#__PURE__*/function _exp3() {
1502 return function (props) {
1503 return props.focused ? "0 0 0 2px ".concat(_UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM) : 'none';
1504 };
1505 };
1506 var ControlContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1507 name: "ControlContainer",
1508 "class": "c1rgwbep",
1509 propsAsIs: false,
1510 vars: {
1511 "c1rgwbep-0": [_exp2()],
1512 "c1rgwbep-1": [_exp3()]
1513 }
1514 });
1515 var ValueContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1516 name: "ValueContainer",
1517 "class": "v1mdmbaj",
1518 propsAsIs: false
1519 });
1520 var Placeholder = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1521 name: "Placeholder",
1522 "class": "p1gwkvxy",
1523 propsAsIs: false
1524 });
1525 var SingleValue = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1526 name: "SingleValue",
1527 "class": "s1bwlafs",
1528 propsAsIs: false
1529 });
1530 var IndicatorContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1531 name: "IndicatorContainer",
1532 "class": "i196z9y5",
1533 propsAsIs: false
1534 });
1535 var DropdownIndicator = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1536 name: "DropdownIndicator",
1537 "class": "d1dfo5ow",
1538 propsAsIs: false
1539 });
1540 var InputContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1541 name: "InputContainer",
1542 "class": "if3lze",
1543 propsAsIs: false
1544 });
1545 var Input = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('input')({
1546 name: "Input",
1547 "class": "i9kxf50",
1548 propsAsIs: false
1549 });
1550 var InputShadow = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1551 name: "InputShadow",
1552 "class": "igjr3uc",
1553 propsAsIs: false
1554 });
1555 var MenuContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1556 name: "MenuContainer",
1557 "class": "mhb9if7",
1558 propsAsIs: false
1559 });
1560 var MenuList = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1561 name: "MenuList",
1562 "class": "mxaof7s",
1563 propsAsIs: false
1564 });
1565 var MenuGroup = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1566 name: "MenuGroup",
1567 "class": "mw50s5v",
1568 propsAsIs: false
1569 });
1570 var MenuGroupHeader = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1571 name: "MenuGroupHeader",
1572 "class": "m11rzvjw",
1573 propsAsIs: false
1574 });
1575 var _exp5 = /*#__PURE__*/function _exp5() {
1576 return function (props) {
1577 return props.selected ? _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM : 'transparent';
1578 };
1579 };
1580 var _exp6 = /*#__PURE__*/function _exp6() {
1581 return function (props) {
1582 return props.selected ? '#fff' : 'inherit';
1583 };
1584 };
1585 var _exp7 = /*#__PURE__*/function _exp7() {
1586 return function (props) {
1587 return props.selected ? _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM : _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_LIGHT;
1588 };
1589 };
1590 var MenuItem = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1591 name: "MenuItem",
1592 "class": "m1jcdsjv",
1593 propsAsIs: false,
1594 vars: {
1595 "m1jcdsjv-0": [_exp5()],
1596 "m1jcdsjv-1": [_exp6()],
1597 "m1jcdsjv-2": [_exp7()]
1598 }
1599 });
1600 function AsyncSelect(_ref) {
1601 var placeholder = _ref.placeholder,
1602 value = _ref.value,
1603 loadOptions = _ref.loadOptions,
1604 onChange = _ref.onChange,
1605 defaultOptions = _ref.defaultOptions;
1606 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1607 var inputShadowEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1608 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
1609 _useState2 = _slicedToArray(_useState, 2),
1610 isFocused = _useState2[0],
1611 setFocus = _useState2[1];
1612 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].NotLoaded),
1613 _useState4 = _slicedToArray(_useState3, 2),
1614 loadState = _useState4[0],
1615 setLoadState = _useState4[1];
1616 var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
1617 _useState6 = _slicedToArray(_useState5, 2),
1618 localValue = _useState6[0],
1619 setLocalValue = _useState6[1];
1620 var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultOptions),
1621 _useState8 = _slicedToArray(_useState7, 2),
1622 options = _useState8[0],
1623 setOptions = _useState8[1];
1624 var inputSize = "".concat(inputShadowEl.current ? inputShadowEl.current.clientWidth + 10 : 2, "px");
1625 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1626 if (loadOptions && loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].NotLoaded) {
1627 loadOptions('', function (result) {
1628 setOptions(result);
1629 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Idle);
1630 });
1631 }
1632 }, [loadOptions, loadState]);
1633 var _renderItems = function renderItems() {
1634 var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
1635 var parentKey = arguments.length > 1 ? arguments[1] : undefined;
1636 return items.map(function (item, index) {
1637 if (item.options) {
1638 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(MenuGroup, {
1639 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuGroupHeader, {
1640 id: "".concat(index, "-heading"),
1641 children: item.label
1642 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
1643 children: _renderItems(item.options, index)
1644 })]
1645 }, "async-select-item-".concat(index));
1646 } else {
1647 var key = "async-select-item-".concat(parentKey !== undefined ? "".concat(parentKey, "-").concat(index) : index);
1648 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuItem, {
1649 id: key,
1650 selected: value && item.value === value.value,
1651 onClick: function onClick() {
1652 onChange(item);
1653 setFocus(false);
1654 },
1655 children: item.label
1656 }, key);
1657 }
1658 });
1659 };
1660 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(Container, {
1661 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ControlContainer, {
1662 id: "leadin-async-selector",
1663 focused: isFocused,
1664 onClick: function onClick() {
1665 if (isFocused) {
1666 if (inputEl.current) {
1667 inputEl.current.blur();
1668 }
1669 setFocus(false);
1670 setLocalValue('');
1671 } else {
1672 if (inputEl.current) {
1673 inputEl.current.focus();
1674 }
1675 setFocus(true);
1676 }
1677 },
1678 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ValueContainer, {
1679 children: [localValue === '' && (!value ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Placeholder, {
1680 children: placeholder
1681 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SingleValue, {
1682 children: value.label
1683 })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(InputContainer, {
1684 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Input, {
1685 ref: inputEl,
1686 onFocus: function onFocus() {
1687 setFocus(true);
1688 },
1689 onChange: function onChange(e) {
1690 setLocalValue(e.target.value);
1691 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Loading);
1692 loadOptions && loadOptions(e.target.value, function (result) {
1693 setOptions(result);
1694 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Idle);
1695 });
1696 },
1697 value: localValue,
1698 width: inputSize,
1699 id: "asycn-select-input"
1700 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(InputShadow, {
1701 ref: inputShadowEl,
1702 children: localValue
1703 })]
1704 })]
1705 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(IndicatorContainer, {
1706 children: [loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Loading && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_3__["default"], {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(DropdownIndicator, {})]
1707 })]
1708 }), isFocused && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuContainer, {
1709 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuList, {
1710 children: _renderItems(options)
1711 })
1712 })]
1713 });
1714 }
1715 __webpack_require__(/*! ./AsyncSelect.linaria.css!=!../../../node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./AsyncSelect.tsx */ "./scripts/shared/Common/AsyncSelect.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/AsyncSelect.tsx");
1716
1717 /***/ }),
1718
1719 /***/ "./scripts/shared/Common/EmbedderContainer.tsx":
1720 /*!*****************************************************!*\
1721 !*** ./scripts/shared/Common/EmbedderContainer.tsx ***!
1722 \*****************************************************/
1723 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1724
1725 "use strict";
1726 __webpack_require__.r(__webpack_exports__);
1727 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1728 /* harmony export */ "default": () => (/* binding */ EmbedderContainer)
1729 /* harmony export */ });
1730 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1731 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1732 /* harmony import */ var _utils_useGetEmbedder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/useGetEmbedder */ "./scripts/utils/useGetEmbedder.ts");
1733 /* harmony import */ var _LoadingBlock__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
1734
1735
1736
1737
1738 function EmbedderContainer(_ref) {
1739 var children = _ref.children;
1740 var _useGetEmbedder = (0,_utils_useGetEmbedder__WEBPACK_IMPORTED_MODULE_2__.useGetEmbedder)(),
1741 embedder = _useGetEmbedder.embedder,
1742 errorElement = _useGetEmbedder.errorElement,
1743 isLoading = _useGetEmbedder.isLoading;
1744 if (errorElement) {
1745 return errorElement;
1746 }
1747 if (isLoading) {
1748 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_LoadingBlock__WEBPACK_IMPORTED_MODULE_3__["default"], {});
1749 }
1750 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.BackgroudAppContext.Provider, {
1751 value: embedder,
1752 children: children
1753 });
1754 }
1755
1756 /***/ }),
1757
1758 /***/ "./scripts/shared/Common/ErrorHandler.tsx":
1759 /*!************************************************!*\
1760 !*** ./scripts/shared/Common/ErrorHandler.tsx ***!
1761 \************************************************/
1762 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1763
1764 "use strict";
1765 __webpack_require__.r(__webpack_exports__);
1766 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1767 /* harmony export */ "default": () => (/* binding */ ErrorHandler)
1768 /* harmony export */ });
1769 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1770 /* harmony import */ var _UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../UIComponents/UIButton */ "./scripts/shared/UIComponents/UIButton.ts");
1771 /* harmony import */ var _UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIContainer */ "./scripts/shared/UIComponents/UIContainer.ts");
1772 /* harmony import */ var _HubspotWrapper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1773 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1774 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1775 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);
1776
1777
1778
1779
1780
1781
1782
1783 function redirectToPlugin() {
1784 window.location.href = "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__.adminUrl, "admin.php?page=leadin&leadin_expired=").concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__.redirectNonce);
1785 }
1786 function ErrorHandler(_ref) {
1787 var status = _ref.status,
1788 resetErrorState = _ref.resetErrorState,
1789 _ref$errorInfo = _ref.errorInfo,
1790 errorInfo = _ref$errorInfo === void 0 ? {
1791 header: '',
1792 message: '',
1793 action: ''
1794 } : _ref$errorInfo;
1795 var isUnauthorized = status === 401 || status === 403;
1796 var errorHeader = isUnauthorized ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)("Your plugin isn't authorized", 'leadin') : errorInfo.header;
1797 var errorMessage = isUnauthorized ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Reauthorize your plugin to access your free HubSpot tools', 'leadin') : errorInfo.message;
1798 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HubspotWrapper__WEBPACK_IMPORTED_MODULE_3__["default"], {
1799 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__.pluginPath,
1800 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_2__["default"], {
1801 textAlign: "center",
1802 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h4", {
1803 children: errorHeader
1804 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
1805 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
1806 children: errorMessage
1807 })
1808 }), isUnauthorized ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__["default"], {
1809 "data-test-id": "authorize-button",
1810 onClick: redirectToPlugin,
1811 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Go to plugin', 'leadin')
1812 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__["default"], {
1813 "data-test-id": "retry-button",
1814 onClick: resetErrorState,
1815 children: errorInfo.action
1816 })]
1817 })
1818 });
1819 }
1820
1821 /***/ }),
1822
1823 /***/ "./scripts/shared/Common/HubspotWrapper.ts":
1824 /*!*************************************************!*\
1825 !*** ./scripts/shared/Common/HubspotWrapper.ts ***!
1826 \*************************************************/
1827 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1828
1829 "use strict";
1830 __webpack_require__.r(__webpack_exports__);
1831 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1832 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1833 /* harmony export */ });
1834 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
1835
1836 var _exp = /*#__PURE__*/function _exp() {
1837 return function (props) {
1838 return "url(".concat(props.pluginPath, "/public/assets/images/hubspot.svg)");
1839 };
1840 };
1841 var _exp2 = /*#__PURE__*/function _exp2() {
1842 return function (props) {
1843 return props.padding || '90px 20% 25px';
1844 };
1845 };
1846 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
1847 name: "HubspotWrapper0",
1848 "class": "h1q5v5ee",
1849 propsAsIs: false,
1850 vars: {
1851 "h1q5v5ee-0": [_exp()],
1852 "h1q5v5ee-1": [_exp2()]
1853 }
1854 }));
1855 __webpack_require__(/*! ./HubspotWrapper.linaria.css!=!../../../node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./HubspotWrapper.ts */ "./scripts/shared/Common/HubspotWrapper.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/HubspotWrapper.ts");
1856
1857 /***/ }),
1858
1859 /***/ "./scripts/shared/Common/LoadingBlock.tsx":
1860 /*!************************************************!*\
1861 !*** ./scripts/shared/Common/LoadingBlock.tsx ***!
1862 \************************************************/
1863 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1864
1865 "use strict";
1866 __webpack_require__.r(__webpack_exports__);
1867 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1868 /* harmony export */ "default": () => (/* binding */ LoadingBlock)
1869 /* harmony export */ });
1870 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1871 /* harmony import */ var _HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1872 /* harmony import */ var _UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UISpinner */ "./scripts/shared/UIComponents/UISpinner.tsx");
1873 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1874
1875
1876
1877
1878 function LoadingBlock() {
1879 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__["default"], {
1880 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.pluginPath,
1881 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_2__["default"], {
1882 size: 50
1883 })
1884 });
1885 }
1886
1887 /***/ }),
1888
1889 /***/ "./scripts/shared/Common/PreviewDisabled.tsx":
1890 /*!***************************************************!*\
1891 !*** ./scripts/shared/Common/PreviewDisabled.tsx ***!
1892 \***************************************************/
1893 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1894
1895 "use strict";
1896 __webpack_require__.r(__webpack_exports__);
1897 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1898 /* harmony export */ "default": () => (/* binding */ PreviewDisabled)
1899 /* harmony export */ });
1900 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1901 /* harmony import */ var _UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../UIComponents/UIContainer */ "./scripts/shared/UIComponents/UIContainer.ts");
1902 /* harmony import */ var _HubspotWrapper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1903 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1904 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1905 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
1906
1907
1908
1909
1910
1911 function PreviewDisabled() {
1912 var errorHeader = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Preview Unavailable', 'leadin');
1913 var errorMessage = "".concat((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('This block cannot be previewed within the Full Site Editor', 'leadin'), " ").concat((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Switch to the Block Editor to view the content', 'leadin'));
1914 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HubspotWrapper__WEBPACK_IMPORTED_MODULE_2__["default"], {
1915 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.pluginPath,
1916 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_1__["default"], {
1917 textAlign: "center",
1918 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h4", {
1919 children: errorHeader
1920 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
1921 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
1922 children: errorMessage
1923 })
1924 })]
1925 })
1926 });
1927 }
1928
1929 /***/ }),
1930
1931 /***/ "./scripts/shared/Form/FormEdit.tsx":
1932 /*!******************************************!*\
1933 !*** ./scripts/shared/Form/FormEdit.tsx ***!
1934 \******************************************/
1935 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1936
1937 "use strict";
1938 __webpack_require__.r(__webpack_exports__);
1939 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1940 /* harmony export */ "default": () => (/* binding */ FormEditContainer)
1941 /* harmony export */ });
1942 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1943 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1944 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1945 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1946 /* harmony import */ var _UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpacer */ "./scripts/shared/UIComponents/UISpacer.ts");
1947 /* harmony import */ var _PreviewForm__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PreviewForm */ "./scripts/shared/Form/PreviewForm.tsx");
1948 /* harmony import */ var _FormSelect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FormSelect */ "./scripts/shared/Form/FormSelect.tsx");
1949 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1950 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
1951 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
1952 /* harmony import */ var _Common_EmbedderContainer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Common/EmbedderContainer */ "./scripts/shared/Common/EmbedderContainer.tsx");
1953 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
1954 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1955 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1956 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1957 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
1958 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969 function FormEdit(_ref) {
1970 var attributes = _ref.attributes,
1971 isSelected = _ref.isSelected,
1972 setAttributes = _ref.setAttributes,
1973 _ref$preview = _ref.preview,
1974 preview = _ref$preview === void 0 ? true : _ref$preview,
1975 _ref$origin = _ref.origin,
1976 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin,
1977 fullSiteEditor = _ref.fullSiteEditor;
1978 var formId = attributes.formId,
1979 formName = attributes.formName,
1980 embedVersion = attributes.embedVersion;
1981 var formSelected = _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId && formId;
1982 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.useBackgroundAppContext)();
1983 var monitorFormPreviewRender = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.usePostBackgroundMessage)();
1984 var handleChange = function handleChange(selectedForm) {
1985 setAttributes({
1986 portalId: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId,
1987 formId: selectedForm.value,
1988 formName: selectedForm.label,
1989 embedVersion: selectedForm.embedVersion
1990 });
1991 };
1992 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1993 monitorFormPreviewRender({
1994 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__.ProxyMessages.TrackFormPreviewRender,
1995 payload: {
1996 origin: origin
1997 }
1998 });
1999 }, [origin]);
2000 return !isBackgroundAppReady ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_8__["default"], {}) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2001 children: [(isSelected || !formSelected) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormSelect__WEBPACK_IMPORTED_MODULE_5__["default"], {
2002 formId: formId,
2003 formName: formName,
2004 handleChange: handleChange,
2005 origin: origin,
2006 embedVersion: embedVersion
2007 }), formSelected && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2008 children: [isSelected && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__["default"], {}), preview && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PreviewForm__WEBPACK_IMPORTED_MODULE_4__["default"], {
2009 portalId: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId,
2010 formId: formId,
2011 fullSiteEditor: fullSiteEditor,
2012 embedVersion: embedVersion
2013 })]
2014 })]
2015 });
2016 }
2017 function FormEditContainer(props) {
2018 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_EmbedderContainer__WEBPACK_IMPORTED_MODULE_9__["default"], {
2019 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(FormEdit, _objectSpread({}, props))
2020 });
2021 }
2022
2023 /***/ }),
2024
2025 /***/ "./scripts/shared/Form/FormSelect.tsx":
2026 /*!********************************************!*\
2027 !*** ./scripts/shared/Form/FormSelect.tsx ***!
2028 \********************************************/
2029 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2030
2031 "use strict";
2032 __webpack_require__.r(__webpack_exports__);
2033 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2034 /* harmony export */ "default": () => (/* binding */ FormSelect)
2035 /* harmony export */ });
2036 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2037 /* harmony import */ var _FormSelector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FormSelector */ "./scripts/shared/Form/FormSelector.tsx");
2038 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
2039 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2040 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
2041 /* harmony import */ var _hooks_useForms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useForms */ "./scripts/shared/Form/hooks/useForms.ts");
2042 /* harmony import */ var _hooks_useCreateFormFromTemplate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useCreateFormFromTemplate */ "./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts");
2043 /* harmony import */ var _constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../constants/defaultFormOptions */ "./scripts/constants/defaultFormOptions.ts");
2044 /* harmony import */ var _Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
2045
2046
2047
2048
2049
2050
2051
2052
2053 function FormSelect(_ref) {
2054 var formId = _ref.formId,
2055 formName = _ref.formName,
2056 handleChange = _ref.handleChange,
2057 _ref$origin = _ref.origin,
2058 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin,
2059 embedVersion = _ref.embedVersion;
2060 var _useForms = (0,_hooks_useForms__WEBPACK_IMPORTED_MODULE_4__["default"])(),
2061 search = _useForms.search,
2062 formApiError = _useForms.formApiError,
2063 reset = _useForms.reset;
2064 var _useCreateFormFromTem = (0,_hooks_useCreateFormFromTemplate__WEBPACK_IMPORTED_MODULE_5__["default"])(origin),
2065 createFormByTemplate = _useCreateFormFromTem.createFormByTemplate,
2066 createReset = _useCreateFormFromTem.reset,
2067 isCreating = _useCreateFormFromTem.isCreating,
2068 hasError = _useCreateFormFromTem.hasError,
2069 createApiError = _useCreateFormFromTem.formApiError;
2070 var value = formId && formName ? {
2071 label: formName,
2072 value: formId,
2073 embedVersion: embedVersion
2074 } : null;
2075 var handleLocalChange = function handleLocalChange(option) {
2076 if ((0,_constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_6__.isDefaultForm)(option.value)) {
2077 createFormByTemplate(option.value).then(function (_ref2) {
2078 var guid = _ref2.guid,
2079 name = _ref2.name;
2080 handleChange({
2081 value: guid,
2082 label: name,
2083 embedVersion: 'v4'
2084 });
2085 });
2086 } else {
2087 handleChange(option);
2088 }
2089 };
2090 return isCreating ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__["default"], {}) : formApiError || createApiError ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__["default"], {
2091 status: formApiError ? formApiError.status : createApiError.status,
2092 resetErrorState: function resetErrorState() {
2093 if (hasError) {
2094 createReset();
2095 } else {
2096 reset();
2097 }
2098 },
2099 errorInfo: {
2100 header: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('There was a problem retrieving your forms', 'leadin'),
2101 message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Please refresh your forms or try again in a few minutes', 'leadin'),
2102 action: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Refresh forms', 'leadin')
2103 }
2104 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormSelector__WEBPACK_IMPORTED_MODULE_1__["default"], {
2105 loadOptions: search,
2106 onChange: function onChange(option) {
2107 return handleLocalChange(option);
2108 },
2109 value: value
2110 });
2111 }
2112
2113 /***/ }),
2114
2115 /***/ "./scripts/shared/Form/FormSelector.tsx":
2116 /*!**********************************************!*\
2117 !*** ./scripts/shared/Form/FormSelector.tsx ***!
2118 \**********************************************/
2119 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2120
2121 "use strict";
2122 __webpack_require__.r(__webpack_exports__);
2123 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2124 /* harmony export */ "default": () => (/* binding */ FormSelector)
2125 /* harmony export */ });
2126 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2127 /* harmony import */ var _Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Common/HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
2128 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2129 /* harmony import */ var _Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Common/AsyncSelect */ "./scripts/shared/Common/AsyncSelect.tsx");
2130 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2131 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
2132
2133
2134
2135
2136
2137 function FormSelector(_ref) {
2138 var loadOptions = _ref.loadOptions,
2139 onChange = _ref.onChange,
2140 value = _ref.value;
2141 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__["default"], {
2142 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath,
2143 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
2144 "data-test-id": "leadin-form-select",
2145 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
2146 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select an existing form or create a new one from a template', 'leadin')
2147 })
2148 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_3__["default"], {
2149 placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Search for a form', 'leadin'),
2150 value: value,
2151 loadOptions: loadOptions,
2152 onChange: onChange
2153 })]
2154 });
2155 }
2156
2157 /***/ }),
2158
2159 /***/ "./scripts/shared/Form/PreviewForm.tsx":
2160 /*!*********************************************!*\
2161 !*** ./scripts/shared/Form/PreviewForm.tsx ***!
2162 \*********************************************/
2163 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2164
2165 "use strict";
2166 __webpack_require__.r(__webpack_exports__);
2167 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2168 /* harmony export */ "default": () => (/* binding */ PreviewForm)
2169 /* harmony export */ });
2170 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2171 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2172 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2173 /* harmony import */ var _UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIOverlay */ "./scripts/shared/UIComponents/UIOverlay.ts");
2174 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2175 /* harmony import */ var _Common_PreviewDisabled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Common/PreviewDisabled */ "./scripts/shared/Common/PreviewDisabled.tsx");
2176 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2177 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2178 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2179 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2180 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
2181 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2182
2183
2184
2185
2186
2187 function PreviewForm(_ref) {
2188 var portalId = _ref.portalId,
2189 formId = _ref.formId,
2190 fullSiteEditor = _ref.fullSiteEditor,
2191 embedVersion = _ref.embedVersion;
2192 var isFormV4 = embedVersion === 'v4';
2193 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
2194 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2195 if (inputEl.current) {
2196 //@ts-expect-error Hubspot global
2197 var hbspt = window.parent.hbspt || window.hbspt;
2198 inputEl.current.innerHTML = '';
2199 var isQa = _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.formsScriptPayload.includes('qa');
2200 if (isFormV4) {
2201 var container = document.createElement('div');
2202 container.classList.add('hs-form-frame');
2203 container.dataset.region = _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.hublet;
2204 container.dataset.formId = formId;
2205 container.dataset.portalId = portalId.toString();
2206 container.dataset.env = isQa ? 'qa' : '';
2207 inputEl.current.appendChild(container);
2208 } else {
2209 var additionalParams = isQa ? {
2210 env: 'qa'
2211 } : {};
2212 hbspt.forms.create(_objectSpread({
2213 portalId: portalId,
2214 formId: formId,
2215 region: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.hublet,
2216 target: "#".concat(inputEl.current.id)
2217 }, additionalParams));
2218 }
2219 }
2220 }, [formId, portalId, inputEl, isFormV4]);
2221 if (fullSiteEditor) {
2222 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_PreviewDisabled__WEBPACK_IMPORTED_MODULE_4__["default"], {});
2223 }
2224 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__["default"], {
2225 ref: inputEl,
2226 id: "hbspt-previewform-".concat(formId)
2227 });
2228 }
2229
2230 /***/ }),
2231
2232 /***/ "./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts":
2233 /*!****************************************************************!*\
2234 !*** ./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts ***!
2235 \****************************************************************/
2236 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2237
2238 "use strict";
2239 __webpack_require__.r(__webpack_exports__);
2240 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2241 /* harmony export */ "default": () => (/* binding */ useCreateFormFromTemplate)
2242 /* harmony export */ });
2243 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2244 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2245 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2246 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2247 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2248 function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
2249 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2250 function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
2251 function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2252 function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
2253 function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
2254
2255
2256
2257
2258 function useCreateFormFromTemplate() {
2259 var origin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'gutenberg';
2260 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
2261 var track = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostBackgroundMessage)();
2262 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle),
2263 _useState2 = _slicedToArray(_useState, 2),
2264 loadState = _useState2[0],
2265 setLoadState = _useState2[1];
2266 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2267 _useState4 = _slicedToArray(_useState3, 2),
2268 formApiError = _useState4[0],
2269 setFormApiError = _useState4[1];
2270 var createFormByTemplate = function createFormByTemplate(type) {
2271 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
2272 track({
2273 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.TrackFormCreatedFromTemplate,
2274 payload: {
2275 type: type,
2276 origin: origin
2277 }
2278 });
2279 return proxy({
2280 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.CreateFormFromTemplate,
2281 payload: {
2282 type: type,
2283 embedVersion: 'v4'
2284 }
2285 }).then(function (form) {
2286 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
2287 return form;
2288 })["catch"](function (err) {
2289 setFormApiError(err);
2290 track({
2291 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.TrackFormCreationFailed,
2292 payload: {
2293 origin: origin
2294 }
2295 });
2296 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
2297 });
2298 };
2299 return {
2300 isCreating: loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading,
2301 hasError: loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed,
2302 formApiError: formApiError,
2303 createFormByTemplate: createFormByTemplate,
2304 reset: function reset() {
2305 return setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
2306 }
2307 };
2308 }
2309
2310 /***/ }),
2311
2312 /***/ "./scripts/shared/Form/hooks/useForms.ts":
2313 /*!***********************************************!*\
2314 !*** ./scripts/shared/Form/hooks/useForms.ts ***!
2315 \***********************************************/
2316 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2317
2318 "use strict";
2319 __webpack_require__.r(__webpack_exports__);
2320 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2321 /* harmony export */ "default": () => (/* binding */ useForms)
2322 /* harmony export */ });
2323 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2324 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2325 /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/debounce */ "./node_modules/lodash/debounce.js");
2326 /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_1__);
2327 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2328 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2329 /* harmony import */ var _useGetTemplateAvailability__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./useGetTemplateAvailability */ "./scripts/shared/Form/hooks/useGetTemplateAvailability.ts");
2330 function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
2331 function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2332 function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
2333 function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
2334 function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
2335 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2336 function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
2337 function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2338 function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
2339 function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
2340
2341
2342
2343
2344
2345 function useForms() {
2346 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__.usePostAsyncBackgroundMessage)();
2347 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2348 _useState2 = _slicedToArray(_useState, 2),
2349 formApiError = _useState2[0],
2350 setFormApiError = _useState2[1];
2351 var _useGetTemplateAvaila = (0,_useGetTemplateAvailability__WEBPACK_IMPORTED_MODULE_4__["default"])(),
2352 availabilityPromise = _useGetTemplateAvaila.availabilityPromise;
2353 var search = lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default()(function (search, callback) {
2354 return Promise.all([availabilityPromise, proxy({
2355 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.FetchForms,
2356 payload: {
2357 search: search
2358 }
2359 })]).then(function (_ref) {
2360 var _ref2 = _slicedToArray(_ref, 2),
2361 templateAvailabilityResponse = _ref2[0],
2362 forms = _ref2[1];
2363 var TEMPLATE_OPTIONS = (0,_useGetTemplateAvailability__WEBPACK_IMPORTED_MODULE_4__.getTemplateOptions)(templateAvailabilityResponse.templateAvailability);
2364 callback([].concat(_toConsumableArray(forms.map(function (form) {
2365 return {
2366 label: form.name,
2367 value: form.guid,
2368 embedVersion: form.embedVersion
2369 };
2370 })), [TEMPLATE_OPTIONS]));
2371 })["catch"](function (error) {
2372 setFormApiError(error);
2373 });
2374 }, 300, {
2375 trailing: true
2376 });
2377 return {
2378 search: search,
2379 formApiError: formApiError,
2380 reset: function reset() {
2381 return setFormApiError(null);
2382 }
2383 };
2384 }
2385
2386 /***/ }),
2387
2388 /***/ "./scripts/shared/Form/hooks/useGetTemplateAvailability.ts":
2389 /*!*****************************************************************!*\
2390 !*** ./scripts/shared/Form/hooks/useGetTemplateAvailability.ts ***!
2391 \*****************************************************************/
2392 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2393
2394 "use strict";
2395 __webpack_require__.r(__webpack_exports__);
2396 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2397 /* harmony export */ "default": () => (/* binding */ useGetTemplateAvailability),
2398 /* harmony export */ "getTemplateOptions": () => (/* binding */ getTemplateOptions),
2399 /* harmony export */ "isDefaultForm": () => (/* binding */ isDefaultForm)
2400 /* harmony export */ });
2401 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2402 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2403 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2404 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
2405 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2406 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2407 /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../types */ "./scripts/shared/types.ts");
2408 function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
2409 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2410 function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
2411 function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2412 function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
2413 function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
2414
2415
2416
2417
2418
2419 function useGetTemplateAvailability() {
2420 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__.usePostAsyncBackgroundMessage)();
2421 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2422 _useState2 = _slicedToArray(_useState, 2),
2423 templateAvailability = _useState2[0],
2424 setTemplateAvailability = _useState2[1];
2425 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(function () {
2426 return new Promise(function (resolve) {
2427 proxy({
2428 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.GetTemplateAvailability,
2429 payload: {}
2430 }).then(function (data) {
2431 setTemplateAvailability(data.templateAvailability);
2432 resolve(data);
2433 });
2434 });
2435 }),
2436 _useState4 = _slicedToArray(_useState3, 1),
2437 availabilityPromise = _useState4[0];
2438 return {
2439 templateAvailability: templateAvailability,
2440 availabilityPromise: availabilityPromise
2441 };
2442 }
2443 var getTemplateOptions = function getTemplateOptions(templateAvailability) {
2444 if (!templateAvailability) {
2445 return {};
2446 }
2447 return {
2448 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Templates', 'leadin'),
2449 options: Object.keys(templateAvailability).filter(function (templateId) {
2450 var hubspotFormTemplateAvailability = templateAvailability[templateId];
2451 return (hubspotFormTemplateAvailability.canCreateWithMissingScopes || !hubspotFormTemplateAvailability.missingScopes.length) && !Object.values(_types__WEBPACK_IMPORTED_MODULE_4__.ExcludedTemplateAvailabilityKeys).includes(templateId);
2452 }).map(function (templateId) {
2453 return {
2454 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)(_types__WEBPACK_IMPORTED_MODULE_4__.TemplateLabels[templateId], 'leadin'),
2455 value: _types__WEBPACK_IMPORTED_MODULE_4__.TemplateValues[templateId]
2456 };
2457 })
2458 };
2459 };
2460 function isDefaultForm(value) {
2461 return Object.values(_types__WEBPACK_IMPORTED_MODULE_4__.TemplateValues).includes(value);
2462 }
2463
2464 /***/ }),
2465
2466 /***/ "./scripts/shared/Meeting/MeetingController.tsx":
2467 /*!******************************************************!*\
2468 !*** ./scripts/shared/Meeting/MeetingController.tsx ***!
2469 \******************************************************/
2470 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2471
2472 "use strict";
2473 __webpack_require__.r(__webpack_exports__);
2474 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2475 /* harmony export */ "default": () => (/* binding */ MeetingController)
2476 /* harmony export */ });
2477 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2478 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2479 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2480 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
2481 /* harmony import */ var _MeetingSelector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./MeetingSelector */ "./scripts/shared/Meeting/MeetingSelector.tsx");
2482 /* harmony import */ var _MeetingWarning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MeetingWarning */ "./scripts/shared/Meeting/MeetingWarning.tsx");
2483 /* harmony import */ var _hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useMeetings */ "./scripts/shared/Meeting/hooks/useMeetings.ts");
2484 /* harmony import */ var _Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Common/HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
2485 /* harmony import */ var _Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
2486 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2487 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2488 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);
2489 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! raven-js */ "./node_modules/raven-js/src/singleton.js");
2490 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(raven_js__WEBPACK_IMPORTED_MODULE_10__);
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502 function MeetingController(_ref) {
2503 var handleChange = _ref.handleChange,
2504 url = _ref.url;
2505 var _useMeetings = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__["default"])(),
2506 meetings = _useMeetings.mappedMeetings,
2507 loading = _useMeetings.loading,
2508 error = _useMeetings.error,
2509 reload = _useMeetings.reload,
2510 connectCalendar = _useMeetings.connectCalendar;
2511 var selectedMeetingOption = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__.useSelectedMeeting)(url);
2512 var selectedMeetingCalendar = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__.useSelectedMeetingCalendar)(url);
2513 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2514 if (!url && meetings.length > 0) {
2515 handleChange(meetings[0].value);
2516 }
2517 }, [meetings, url, handleChange]);
2518 var handleLocalChange = function handleLocalChange(option) {
2519 handleChange(option.value);
2520 };
2521 var handleConnectCalendar = function handleConnectCalendar() {
2522 return connectCalendar().then(function () {
2523 reload();
2524 })["catch"](function (error) {
2525 raven_js__WEBPACK_IMPORTED_MODULE_10___default().captureMessage('Unable to connect calendar', {
2526 extra: {
2527 error: error
2528 }
2529 });
2530 });
2531 };
2532 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2533 children: loading ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__["default"], {}) : error ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__["default"], {
2534 status: error && error.status || error,
2535 resetErrorState: function resetErrorState() {
2536 return reload();
2537 },
2538 errorInfo: {
2539 header: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('There was a problem retrieving your meetings', 'leadin'),
2540 message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Please refresh your meetings or try again in a few minutes', 'leadin'),
2541 action: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Refresh meetings', 'leadin')
2542 }
2543 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_6__["default"], {
2544 padding: "90px 32px 24px",
2545 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_8__.pluginPath,
2546 children: [selectedMeetingCalendar && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingWarning__WEBPACK_IMPORTED_MODULE_4__["default"], {
2547 status: selectedMeetingCalendar,
2548 onConnectCalendar: handleConnectCalendar
2549 }), meetings.length > 1 && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingSelector__WEBPACK_IMPORTED_MODULE_3__["default"], {
2550 onChange: handleLocalChange,
2551 options: meetings,
2552 value: selectedMeetingOption
2553 })]
2554 })
2555 });
2556 }
2557
2558 /***/ }),
2559
2560 /***/ "./scripts/shared/Meeting/MeetingEdit.tsx":
2561 /*!************************************************!*\
2562 !*** ./scripts/shared/Meeting/MeetingEdit.tsx ***!
2563 \************************************************/
2564 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2565
2566 "use strict";
2567 __webpack_require__.r(__webpack_exports__);
2568 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2569 /* harmony export */ "default": () => (/* binding */ MeetingsEditContainer)
2570 /* harmony export */ });
2571 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2572 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2573 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2574 /* harmony import */ var _MeetingController__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./MeetingController */ "./scripts/shared/Meeting/MeetingController.tsx");
2575 /* harmony import */ var _PreviewMeeting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PreviewMeeting */ "./scripts/shared/Meeting/PreviewMeeting.tsx");
2576 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2577 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2578 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
2579 /* harmony import */ var _Common_EmbedderContainer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/EmbedderContainer */ "./scripts/shared/Common/EmbedderContainer.tsx");
2580 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2581 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2582 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2583 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2584 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
2585 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2586
2587
2588
2589
2590
2591
2592
2593
2594 function MeetingEdit(_ref) {
2595 var url = _ref.attributes.url,
2596 isSelected = _ref.isSelected,
2597 setAttributes = _ref.setAttributes,
2598 _ref$preview = _ref.preview,
2599 preview = _ref$preview === void 0 ? true : _ref$preview,
2600 _ref$origin = _ref.origin,
2601 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin,
2602 fullSiteEditor = _ref.fullSiteEditor;
2603 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.useBackgroundAppContext)();
2604 var monitorFormPreviewRender = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.usePostBackgroundMessage)();
2605 var handleChange = function handleChange(newUrl) {
2606 setAttributes({
2607 url: newUrl
2608 });
2609 };
2610 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2611 monitorFormPreviewRender({
2612 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_5__.ProxyMessages.TrackMeetingPreviewRender,
2613 payload: {
2614 origin: origin
2615 }
2616 });
2617 }, [origin]);
2618 return !isBackgroundAppReady ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_6__["default"], {}) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2619 children: [(isSelected || !url) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingController__WEBPACK_IMPORTED_MODULE_2__["default"], {
2620 url: url,
2621 handleChange: handleChange
2622 }), preview && url && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PreviewMeeting__WEBPACK_IMPORTED_MODULE_3__["default"], {
2623 url: url,
2624 fullSiteEditor: fullSiteEditor
2625 })]
2626 });
2627 }
2628 function MeetingsEditContainer(props) {
2629 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_EmbedderContainer__WEBPACK_IMPORTED_MODULE_7__["default"], {
2630 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MeetingEdit, _objectSpread({}, props))
2631 });
2632 }
2633
2634 /***/ }),
2635
2636 /***/ "./scripts/shared/Meeting/MeetingSelector.tsx":
2637 /*!****************************************************!*\
2638 !*** ./scripts/shared/Meeting/MeetingSelector.tsx ***!
2639 \****************************************************/
2640 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2641
2642 "use strict";
2643 __webpack_require__.r(__webpack_exports__);
2644 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2645 /* harmony export */ "default": () => (/* binding */ MeetingSelector)
2646 /* harmony export */ });
2647 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2648 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2649 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2650 /* harmony import */ var _Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/AsyncSelect */ "./scripts/shared/Common/AsyncSelect.tsx");
2651 /* harmony import */ var _UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpacer */ "./scripts/shared/UIComponents/UISpacer.ts");
2652 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2653 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
2654
2655
2656
2657
2658
2659 function MeetingSelector(_ref) {
2660 var options = _ref.options,
2661 onChange = _ref.onChange,
2662 value = _ref.value;
2663 var optionsWrapper = [{
2664 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Meeting name', 'leadin'),
2665 options: options
2666 }];
2667 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2668 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__["default"], {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
2669 "data-test-id": "leadin-meeting-select",
2670 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
2671 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select a meeting scheduling page', 'leadin')
2672 })
2673 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_2__["default"], {
2674 defaultOptions: optionsWrapper,
2675 onChange: onChange,
2676 placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select a meeting', 'leadin'),
2677 value: value
2678 })]
2679 });
2680 }
2681
2682 /***/ }),
2683
2684 /***/ "./scripts/shared/Meeting/MeetingWarning.tsx":
2685 /*!***************************************************!*\
2686 !*** ./scripts/shared/Meeting/MeetingWarning.tsx ***!
2687 \***************************************************/
2688 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2689
2690 "use strict";
2691 __webpack_require__.r(__webpack_exports__);
2692 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2693 /* harmony export */ "default": () => (/* binding */ MeetingWarning)
2694 /* harmony export */ });
2695 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2696 /* harmony import */ var _UIComponents_UIAlert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../UIComponents/UIAlert */ "./scripts/shared/UIComponents/UIAlert.tsx");
2697 /* harmony import */ var _UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIButton */ "./scripts/shared/UIComponents/UIButton.ts");
2698 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants */ "./scripts/shared/Meeting/constants.ts");
2699 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2700 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
2701
2702
2703
2704
2705
2706 function MeetingWarning(_ref) {
2707 var status = _ref.status,
2708 onConnectCalendar = _ref.onConnectCalendar;
2709 var isMeetingOwner = status === _constants__WEBPACK_IMPORTED_MODULE_3__.CURRENT_USER_CALENDAR_MISSING;
2710 var titleText = isMeetingOwner ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Your calendar is not connected', 'leadin') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Calendar is not connected', 'leadin');
2711 var titleMessage = isMeetingOwner ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Please connect your calendar to activate your scheduling pages', 'leadin') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Make sure that everybody in this meeting has connected their calendar from the Meetings page in HubSpot', 'leadin');
2712 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIAlert__WEBPACK_IMPORTED_MODULE_1__["default"], {
2713 titleText: titleText,
2714 titleMessage: titleMessage,
2715 children: isMeetingOwner && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_2__["default"], {
2716 use: "tertiary",
2717 id: "meetings-connect-calendar",
2718 onClick: onConnectCalendar,
2719 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Connect calendar', 'leadin')
2720 })
2721 });
2722 }
2723
2724 /***/ }),
2725
2726 /***/ "./scripts/shared/Meeting/PreviewMeeting.tsx":
2727 /*!***************************************************!*\
2728 !*** ./scripts/shared/Meeting/PreviewMeeting.tsx ***!
2729 \***************************************************/
2730 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2731
2732 "use strict";
2733 __webpack_require__.r(__webpack_exports__);
2734 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2735 /* harmony export */ "default": () => (/* binding */ PreviewForm)
2736 /* harmony export */ });
2737 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2738 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2739 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2740 /* harmony import */ var _UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIOverlay */ "./scripts/shared/UIComponents/UIOverlay.ts");
2741 /* harmony import */ var _Common_PreviewDisabled__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Common/PreviewDisabled */ "./scripts/shared/Common/PreviewDisabled.tsx");
2742
2743
2744
2745
2746 function PreviewForm(_ref) {
2747 var url = _ref.url,
2748 fullSiteEditor = _ref.fullSiteEditor;
2749 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
2750 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2751 if (inputEl.current) {
2752 //@ts-expect-error Hubspot global
2753 var hbspt = window.parent.hbspt || window.hbspt;
2754 hbspt.meetings.create('.meetings-iframe-container');
2755 }
2756 }, [url, inputEl]);
2757 if (fullSiteEditor) {
2758 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_PreviewDisabled__WEBPACK_IMPORTED_MODULE_3__["default"], {});
2759 }
2760 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2761 children: url && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__["default"], {
2762 ref: inputEl,
2763 className: "meetings-iframe-container",
2764 "data-src": "".concat(url, "?embed=true")
2765 })
2766 });
2767 }
2768
2769 /***/ }),
2770
2771 /***/ "./scripts/shared/Meeting/constants.ts":
2772 /*!*********************************************!*\
2773 !*** ./scripts/shared/Meeting/constants.ts ***!
2774 \*********************************************/
2775 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2776
2777 "use strict";
2778 __webpack_require__.r(__webpack_exports__);
2779 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2780 /* harmony export */ "CURRENT_USER_CALENDAR_MISSING": () => (/* binding */ CURRENT_USER_CALENDAR_MISSING),
2781 /* harmony export */ "OTHER_USER_CALENDAR_MISSING": () => (/* binding */ OTHER_USER_CALENDAR_MISSING)
2782 /* harmony export */ });
2783 var OTHER_USER_CALENDAR_MISSING = 'OTHER_USER_CALENDAR_MISSING';
2784 var CURRENT_USER_CALENDAR_MISSING = 'CURRENT_USER_CALENDAR_MISSING';
2785
2786 /***/ }),
2787
2788 /***/ "./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts":
2789 /*!*************************************************************!*\
2790 !*** ./scripts/shared/Meeting/hooks/useCurrentUserFetch.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 */ "default": () => (/* binding */ useCurrentUserFetch)
2798 /* harmony export */ });
2799 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2800 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2801 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2802 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2803 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2804 function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
2805 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2806 function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
2807 function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2808 function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
2809 function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
2810
2811
2812
2813
2814 var user = null;
2815 function useCurrentUserFetch() {
2816 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
2817 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded),
2818 _useState2 = _slicedToArray(_useState, 2),
2819 loadState = _useState2[0],
2820 setLoadState = _useState2[1];
2821 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2822 _useState4 = _slicedToArray(_useState3, 2),
2823 error = _useState4[0],
2824 setError = _useState4[1];
2825 var createUser = function createUser() {
2826 if (!user) {
2827 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2828 }
2829 };
2830 var reload = function reload() {
2831 user = null;
2832 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2833 setError(null);
2834 };
2835 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2836 if (loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded && !user) {
2837 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
2838 proxy({
2839 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.FetchOrCreateMeetingUser
2840 }).then(function (data) {
2841 user = data;
2842 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
2843 })["catch"](function (err) {
2844 setError(err);
2845 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
2846 });
2847 }
2848 }, [loadState]);
2849 return {
2850 user: user,
2851 loadUserState: loadState,
2852 error: error,
2853 createUser: createUser,
2854 reload: reload
2855 };
2856 }
2857
2858 /***/ }),
2859
2860 /***/ "./scripts/shared/Meeting/hooks/useMeetings.ts":
2861 /*!*****************************************************!*\
2862 !*** ./scripts/shared/Meeting/hooks/useMeetings.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 */ "default": () => (/* binding */ useMeetings),
2870 /* harmony export */ "useSelectedMeeting": () => (/* binding */ useSelectedMeeting),
2871 /* harmony export */ "useSelectedMeetingCalendar": () => (/* binding */ useSelectedMeetingCalendar)
2872 /* harmony export */ });
2873 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2874 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2875 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2876 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
2877 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants */ "./scripts/shared/Meeting/constants.ts");
2878 /* harmony import */ var _useMeetingsFetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./useMeetingsFetch */ "./scripts/shared/Meeting/hooks/useMeetingsFetch.ts");
2879 /* harmony import */ var _useCurrentUserFetch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./useCurrentUserFetch */ "./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts");
2880 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2881 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2882 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2883 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2884 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2885 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2886 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2887 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
2888 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2889 function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
2890 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2891 function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
2892 function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2893 function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
2894 function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
2895
2896
2897
2898
2899
2900
2901
2902
2903 function getDefaultMeetingName(meeting, currentUser, meetingUsers) {
2904 var _meeting$meetingsUser = _slicedToArray(meeting.meetingsUserIds, 1),
2905 meetingOwnerId = _meeting$meetingsUser[0];
2906 var result = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Default', 'leadin');
2907 if (currentUser && meetingOwnerId !== currentUser.id && meetingUsers[meetingOwnerId]) {
2908 var user = meetingUsers[meetingOwnerId];
2909 result += " (".concat(user.userProfile.fullName, ")");
2910 }
2911 return result;
2912 }
2913 function hasCalendarObject(user) {
2914 return user && user.meetingsUserBlob && user.meetingsUserBlob.calendarSettings && user.meetingsUserBlob.calendarSettings.email;
2915 }
2916 function useMeetings() {
2917 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.usePostAsyncBackgroundMessage)();
2918 var _useMeetingsFetch = (0,_useMeetingsFetch__WEBPACK_IMPORTED_MODULE_3__["default"])(),
2919 meetings = _useMeetingsFetch.meetings,
2920 meetingUsers = _useMeetingsFetch.meetingUsers,
2921 meetingsError = _useMeetingsFetch.error,
2922 loadMeetingsState = _useMeetingsFetch.loadMeetingsState,
2923 reloadMeetings = _useMeetingsFetch.reload;
2924 var _useCurrentUserFetch = (0,_useCurrentUserFetch__WEBPACK_IMPORTED_MODULE_4__["default"])(),
2925 currentUser = _useCurrentUserFetch.user,
2926 userError = _useCurrentUserFetch.error,
2927 loadUserState = _useCurrentUserFetch.loadUserState,
2928 reloadUser = _useCurrentUserFetch.reload;
2929 var reload = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
2930 reloadUser();
2931 reloadMeetings();
2932 }, [reloadUser, reloadMeetings]);
2933 var connectCalendar = function connectCalendar() {
2934 return proxy({
2935 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__.ProxyMessages.ConnectMeetingsCalendar
2936 });
2937 };
2938 return {
2939 mappedMeetings: meetings.map(function (meet) {
2940 return {
2941 label: meet.name || getDefaultMeetingName(meet, currentUser, meetingUsers),
2942 value: meet.link
2943 };
2944 }),
2945 meetings: meetings,
2946 meetingUsers: meetingUsers,
2947 currentUser: currentUser,
2948 error: meetingsError || userError,
2949 loading: loadMeetingsState == _enums_loadState__WEBPACK_IMPORTED_MODULE_5__["default"].Loading || loadUserState === _enums_loadState__WEBPACK_IMPORTED_MODULE_5__["default"].Loading,
2950 reload: reload,
2951 connectCalendar: connectCalendar
2952 };
2953 }
2954 function useSelectedMeeting(url) {
2955 var _useMeetings = useMeetings(),
2956 meetings = _useMeetings.mappedMeetings;
2957 var option = meetings.find(function (_ref) {
2958 var value = _ref.value;
2959 return value === url;
2960 });
2961 return option;
2962 }
2963 function useSelectedMeetingCalendar(url) {
2964 var _useMeetings2 = useMeetings(),
2965 meetings = _useMeetings2.meetings,
2966 meetingUsers = _useMeetings2.meetingUsers,
2967 currentUser = _useMeetings2.currentUser;
2968 var meeting = meetings.find(function (meet) {
2969 return meet.link === url;
2970 });
2971 var mappedMeetingUsersId = meetingUsers.reduce(function (p, c) {
2972 return _objectSpread(_objectSpread({}, p), {}, _defineProperty({}, c.id, c));
2973 }, {});
2974 if (!meeting) {
2975 return null;
2976 } else {
2977 var meetingsUserIds = meeting.meetingsUserIds;
2978 if (currentUser && meetingsUserIds.includes(currentUser.id) && !hasCalendarObject(currentUser)) {
2979 return _constants__WEBPACK_IMPORTED_MODULE_2__.CURRENT_USER_CALENDAR_MISSING;
2980 } else if (meetingsUserIds.map(function (id) {
2981 return mappedMeetingUsersId[id];
2982 }).some(function (user) {
2983 return !hasCalendarObject(user);
2984 })) {
2985 return _constants__WEBPACK_IMPORTED_MODULE_2__.OTHER_USER_CALENDAR_MISSING;
2986 } else {
2987 return null;
2988 }
2989 }
2990 }
2991
2992 /***/ }),
2993
2994 /***/ "./scripts/shared/Meeting/hooks/useMeetingsFetch.ts":
2995 /*!**********************************************************!*\
2996 !*** ./scripts/shared/Meeting/hooks/useMeetingsFetch.ts ***!
2997 \**********************************************************/
2998 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2999
3000 "use strict";
3001 __webpack_require__.r(__webpack_exports__);
3002 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3003 /* harmony export */ "default": () => (/* binding */ useMeetingsFetch)
3004 /* harmony export */ });
3005 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
3006 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
3007 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
3008 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
3009 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
3010 function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
3011 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3012 function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
3013 function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3014 function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
3015 function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
3016
3017
3018
3019
3020 var meetings = [];
3021 var meetingUsers = [];
3022 function useMeetingsFetch() {
3023 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
3024 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded),
3025 _useState2 = _slicedToArray(_useState, 2),
3026 loadState = _useState2[0],
3027 setLoadState = _useState2[1];
3028 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
3029 _useState4 = _slicedToArray(_useState3, 2),
3030 error = _useState4[0],
3031 setError = _useState4[1];
3032 var reload = function reload() {
3033 meetings = [];
3034 setError(null);
3035 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
3036 };
3037 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
3038 if (loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded && meetings.length === 0) {
3039 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
3040 proxy({
3041 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.FetchMeetingsAndUsers
3042 }).then(function (data) {
3043 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loaded);
3044 meetings = data && data.meetingLinks;
3045 meetingUsers = data && data.meetingUsers;
3046 })["catch"](function (e) {
3047 setError(e);
3048 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
3049 });
3050 }
3051 }, [loadState]);
3052 return {
3053 meetings: meetings,
3054 meetingUsers: meetingUsers,
3055 loadMeetingsState: loadState,
3056 error: error,
3057 reload: reload
3058 };
3059 }
3060
3061 /***/ }),
3062
3063 /***/ "./scripts/shared/UIComponents/UIAlert.tsx":
3064 /*!*************************************************!*\
3065 !*** ./scripts/shared/UIComponents/UIAlert.tsx ***!
3066 \*************************************************/
3067 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3068
3069 "use strict";
3070 __webpack_require__.r(__webpack_exports__);
3071 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3072 /* harmony export */ "default": () => (/* binding */ UIAlert)
3073 /* harmony export */ });
3074 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
3075 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3076
3077
3078 var AlertContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('div')({
3079 name: "AlertContainer",
3080 "class": "a1h8m4fo",
3081 propsAsIs: false
3082 });
3083 var Title = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('p')({
3084 name: "Title",
3085 "class": "tyndzxk",
3086 propsAsIs: false
3087 });
3088 var Message = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('p')({
3089 name: "Message",
3090 "class": "m1m9sbk4",
3091 propsAsIs: false
3092 });
3093 var MessageContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('div')({
3094 name: "MessageContainer",
3095 "class": "mg5o421",
3096 propsAsIs: false
3097 });
3098 function UIAlert(_ref) {
3099 var titleText = _ref.titleText,
3100 titleMessage = _ref.titleMessage,
3101 children = _ref.children;
3102 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(AlertContainer, {
3103 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(MessageContainer, {
3104 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Title, {
3105 children: titleText
3106 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Message, {
3107 children: titleMessage
3108 })]
3109 }), children]
3110 });
3111 }
3112 __webpack_require__(/*! ./UIAlert.linaria.css!=!../../../node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./UIAlert.tsx */ "./scripts/shared/UIComponents/UIAlert.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIAlert.tsx");
3113
3114 /***/ }),
3115
3116 /***/ "./scripts/shared/UIComponents/UIButton.ts":
3117 /*!*************************************************!*\
3118 !*** ./scripts/shared/UIComponents/UIButton.ts ***!
3119 \*************************************************/
3120 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3121
3122 "use strict";
3123 __webpack_require__.r(__webpack_exports__);
3124 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3125 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3126 /* harmony export */ });
3127 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3128 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colors */ "./scripts/shared/UIComponents/colors.ts");
3129
3130
3131 var _exp2 = /*#__PURE__*/function _exp2() {
3132 return function (props) {
3133 return props.use === 'tertiary' ? _colors__WEBPACK_IMPORTED_MODULE_0__.HEFFALUMP : _colors__WEBPACK_IMPORTED_MODULE_0__.LORAX;
3134 };
3135 };
3136 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('button')({
3137 name: "UIButton0",
3138 "class": "ug152ch",
3139 propsAsIs: false,
3140 vars: {
3141 "ug152ch-0": [_exp2()]
3142 }
3143 }));
3144 __webpack_require__(/*! ./UIButton.linaria.css!=!../../../node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./UIButton.ts */ "./scripts/shared/UIComponents/UIButton.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIButton.ts");
3145
3146 /***/ }),
3147
3148 /***/ "./scripts/shared/UIComponents/UIContainer.ts":
3149 /*!****************************************************!*\
3150 !*** ./scripts/shared/UIComponents/UIContainer.ts ***!
3151 \****************************************************/
3152 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3153
3154 "use strict";
3155 __webpack_require__.r(__webpack_exports__);
3156 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3157 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3158 /* harmony export */ });
3159 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3160
3161 var _exp = /*#__PURE__*/function _exp() {
3162 return function (props) {
3163 return props.textAlign ? props.textAlign : 'inherit';
3164 };
3165 };
3166 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
3167 name: "UIContainer0",
3168 "class": "ua13n1c",
3169 propsAsIs: false,
3170 vars: {
3171 "ua13n1c-0": [_exp()]
3172 }
3173 }));
3174 __webpack_require__(/*! ./UIContainer.linaria.css!=!../../../node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./UIContainer.ts */ "./scripts/shared/UIComponents/UIContainer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIContainer.ts");
3175
3176 /***/ }),
3177
3178 /***/ "./scripts/shared/UIComponents/UIOverlay.ts":
3179 /*!**************************************************!*\
3180 !*** ./scripts/shared/UIComponents/UIOverlay.ts ***!
3181 \**************************************************/
3182 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3183
3184 "use strict";
3185 __webpack_require__.r(__webpack_exports__);
3186 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3187 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3188 /* harmony export */ });
3189 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3190
3191 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
3192 name: "UIOverlay0",
3193 "class": "u1q7a48k",
3194 propsAsIs: false
3195 }));
3196 __webpack_require__(/*! ./UIOverlay.linaria.css!=!../../../node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./UIOverlay.ts */ "./scripts/shared/UIComponents/UIOverlay.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIOverlay.ts");
3197
3198 /***/ }),
3199
3200 /***/ "./scripts/shared/UIComponents/UISpacer.ts":
3201 /*!*************************************************!*\
3202 !*** ./scripts/shared/UIComponents/UISpacer.ts ***!
3203 \*************************************************/
3204 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3205
3206 "use strict";
3207 __webpack_require__.r(__webpack_exports__);
3208 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3209 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3210 /* harmony export */ });
3211 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3212
3213 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
3214 name: "UISpacer0",
3215 "class": "u3qxofx",
3216 propsAsIs: false
3217 }));
3218 __webpack_require__(/*! ./UISpacer.linaria.css!=!../../../node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./UISpacer.ts */ "./scripts/shared/UIComponents/UISpacer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpacer.ts");
3219
3220 /***/ }),
3221
3222 /***/ "./scripts/shared/UIComponents/UISpinner.tsx":
3223 /*!***************************************************!*\
3224 !*** ./scripts/shared/UIComponents/UISpinner.tsx ***!
3225 \***************************************************/
3226 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3227
3228 "use strict";
3229 __webpack_require__.r(__webpack_exports__);
3230 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3231 /* harmony export */ "default": () => (/* binding */ UISpinner)
3232 /* harmony export */ });
3233 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
3234 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3235 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./colors */ "./scripts/shared/UIComponents/colors.ts");
3236
3237
3238
3239 var SpinnerOuter = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('div')({
3240 name: "SpinnerOuter",
3241 "class": "sxa9zrc",
3242 propsAsIs: false
3243 });
3244 var SpinnerInner = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('div')({
3245 name: "SpinnerInner",
3246 "class": "s14430wa",
3247 propsAsIs: false
3248 });
3249 var _exp = /*#__PURE__*/function _exp() {
3250 return function (props) {
3251 return props.color;
3252 };
3253 };
3254 var Circle = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('circle')({
3255 name: "Circle",
3256 "class": "ct87ghk",
3257 propsAsIs: true,
3258 vars: {
3259 "ct87ghk-0": [_exp()]
3260 }
3261 });
3262 var _exp2 = /*#__PURE__*/function _exp2() {
3263 return function (props) {
3264 return props.color;
3265 };
3266 };
3267 var AnimatedCircle = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('circle')({
3268 name: "AnimatedCircle",
3269 "class": "avili0h",
3270 propsAsIs: true,
3271 vars: {
3272 "avili0h-0": [_exp2()]
3273 }
3274 });
3275 function UISpinner(_ref) {
3276 var _ref$size = _ref.size,
3277 size = _ref$size === void 0 ? 20 : _ref$size;
3278 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SpinnerOuter, {
3279 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SpinnerInner, {
3280 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
3281 height: size,
3282 width: size,
3283 viewBox: "0 0 50 50",
3284 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Circle, {
3285 color: _colors__WEBPACK_IMPORTED_MODULE_1__.CALYPSO_MEDIUM,
3286 cx: "25",
3287 cy: "25",
3288 r: "22.5"
3289 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(AnimatedCircle, {
3290 color: _colors__WEBPACK_IMPORTED_MODULE_1__.CALYPSO,
3291 cx: "25",
3292 cy: "25",
3293 r: "22.5"
3294 })]
3295 })
3296 })
3297 });
3298 }
3299 __webpack_require__(/*! ./UISpinner.linaria.css!=!../../../node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./UISpinner.tsx */ "./scripts/shared/UIComponents/UISpinner.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpinner.tsx");
3300
3301 /***/ }),
3302
3303 /***/ "./scripts/shared/UIComponents/colors.ts":
3304 /*!***********************************************!*\
3305 !*** ./scripts/shared/UIComponents/colors.ts ***!
3306 \***********************************************/
3307 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3308
3309 "use strict";
3310 __webpack_require__.r(__webpack_exports__);
3311 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3312 /* harmony export */ "CALYPSO": () => (/* binding */ CALYPSO),
3313 /* harmony export */ "CALYPSO_LIGHT": () => (/* binding */ CALYPSO_LIGHT),
3314 /* harmony export */ "CALYPSO_MEDIUM": () => (/* binding */ CALYPSO_MEDIUM),
3315 /* harmony export */ "HEFFALUMP": () => (/* binding */ HEFFALUMP),
3316 /* harmony export */ "LORAX": () => (/* binding */ LORAX),
3317 /* harmony export */ "MARIGOLD_LIGHT": () => (/* binding */ MARIGOLD_LIGHT),
3318 /* harmony export */ "MARIGOLD_MEDIUM": () => (/* binding */ MARIGOLD_MEDIUM),
3319 /* harmony export */ "OBSIDIAN": () => (/* binding */ OBSIDIAN),
3320 /* harmony export */ "OLAF": () => (/* binding */ OLAF)
3321 /* harmony export */ });
3322 var CALYPSO = '#00a4bd';
3323 var CALYPSO_MEDIUM = '#7fd1de';
3324 var CALYPSO_LIGHT = '#e5f5f8';
3325 var LORAX = '#ff7a59';
3326 var OLAF = '#ffffff';
3327 var HEFFALUMP = '#425b76';
3328 var MARIGOLD_LIGHT = '#fef8f0';
3329 var MARIGOLD_MEDIUM = '#fae0b5';
3330 var OBSIDIAN = '#33475b';
3331
3332 /***/ }),
3333
3334 /***/ "./scripts/shared/enums/connectionStatus.ts":
3335 /*!**************************************************!*\
3336 !*** ./scripts/shared/enums/connectionStatus.ts ***!
3337 \**************************************************/
3338 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3339
3340 "use strict";
3341 __webpack_require__.r(__webpack_exports__);
3342 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3343 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3344 /* harmony export */ });
3345 var ConnectionStatus = {
3346 Connected: 'Connected',
3347 NotConnected: 'NotConnected'
3348 };
3349 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ConnectionStatus);
3350
3351 /***/ }),
3352
3353 /***/ "./scripts/shared/enums/loadState.ts":
3354 /*!*******************************************!*\
3355 !*** ./scripts/shared/enums/loadState.ts ***!
3356 \*******************************************/
3357 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3358
3359 "use strict";
3360 __webpack_require__.r(__webpack_exports__);
3361 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3362 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3363 /* harmony export */ });
3364 var LoadState = {
3365 NotLoaded: 'NotLoaded',
3366 Loading: 'Loading',
3367 Loaded: 'Loaded',
3368 Idle: 'Idle',
3369 Failed: 'Failed'
3370 };
3371 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LoadState);
3372
3373 /***/ }),
3374
3375 /***/ "./scripts/shared/types.ts":
3376 /*!*********************************!*\
3377 !*** ./scripts/shared/types.ts ***!
3378 \*********************************/
3379 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3380
3381 "use strict";
3382 __webpack_require__.r(__webpack_exports__);
3383 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3384 /* harmony export */ "ExcludedTemplateAvailabilityKeys": () => (/* binding */ ExcludedTemplateAvailabilityKeys),
3385 /* harmony export */ "HubSpotFormTemplateAvailabilityKeys": () => (/* binding */ HubSpotFormTemplateAvailabilityKeys),
3386 /* harmony export */ "TemplateLabels": () => (/* binding */ TemplateLabels),
3387 /* harmony export */ "TemplateValues": () => (/* binding */ TemplateValues)
3388 /* harmony export */ });
3389 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3390 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
3391 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
3392 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
3393 var HubSpotFormTemplateAvailabilityKeys;
3394 (function (HubSpotFormTemplateAvailabilityKeys) {
3395 HubSpotFormTemplateAvailabilityKeys["AI_GENERATED"] = "ai-generated";
3396 HubSpotFormTemplateAvailabilityKeys["BLANK"] = "blank";
3397 HubSpotFormTemplateAvailabilityKeys["NEWSLETTER"] = "newsletter";
3398 HubSpotFormTemplateAvailabilityKeys["CONTACT_US"] = "contact-us";
3399 HubSpotFormTemplateAvailabilityKeys["EVENT_REGISTRATION"] = "event-registration";
3400 HubSpotFormTemplateAvailabilityKeys["TALK_TO_AN_EXPERT"] = "talk-to-an-expert";
3401 HubSpotFormTemplateAvailabilityKeys["BOOK_A_MEETING"] = "book-a-meeting";
3402 HubSpotFormTemplateAvailabilityKeys["GATED_CONTENT"] = "gated-content";
3403 HubSpotFormTemplateAvailabilityKeys["SUPPORT"] = "support";
3404 })(HubSpotFormTemplateAvailabilityKeys || (HubSpotFormTemplateAvailabilityKeys = {}));
3405 var ExcludedTemplateAvailabilityKeys;
3406 (function (ExcludedTemplateAvailabilityKeys) {
3407 ExcludedTemplateAvailabilityKeys["SUPPORT"] = "support";
3408 ExcludedTemplateAvailabilityKeys["AI_GENERATED"] = "ai-generated";
3409 })(ExcludedTemplateAvailabilityKeys || (ExcludedTemplateAvailabilityKeys = {}));
3410 var TemplateLabels = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, HubSpotFormTemplateAvailabilityKeys.BLANK, 'Blank Form'), HubSpotFormTemplateAvailabilityKeys.NEWSLETTER, 'Newsletter Form'), HubSpotFormTemplateAvailabilityKeys.CONTACT_US, 'Contact Us Form'), HubSpotFormTemplateAvailabilityKeys.EVENT_REGISTRATION, 'Event Registration Form'), HubSpotFormTemplateAvailabilityKeys.TALK_TO_AN_EXPERT, 'Talk to an Expert Form'), HubSpotFormTemplateAvailabilityKeys.BOOK_A_MEETING, 'Book a Meeting Form'), HubSpotFormTemplateAvailabilityKeys.GATED_CONTENT, 'Gated Content Form');
3411 var TemplateValues = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, HubSpotFormTemplateAvailabilityKeys.BLANK, 'BLANK'), HubSpotFormTemplateAvailabilityKeys.NEWSLETTER, 'NEWSLETTER'), HubSpotFormTemplateAvailabilityKeys.CONTACT_US, 'CONTACT_US'), HubSpotFormTemplateAvailabilityKeys.EVENT_REGISTRATION, 'EVENT_REGISTRATION'), HubSpotFormTemplateAvailabilityKeys.TALK_TO_AN_EXPERT, 'TALK_TO_AN_EXPERT'), HubSpotFormTemplateAvailabilityKeys.BOOK_A_MEETING, 'BOOK_A_MEETING'), HubSpotFormTemplateAvailabilityKeys.GATED_CONTENT, 'GATED_CONTENT');
3412
3413 /***/ }),
3414
3415 /***/ "./scripts/utils/appUtils.ts":
3416 /*!***********************************!*\
3417 !*** ./scripts/utils/appUtils.ts ***!
3418 \***********************************/
3419 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3420
3421 "use strict";
3422 __webpack_require__.r(__webpack_exports__);
3423 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3424 /* harmony export */ "initApp": () => (/* binding */ initApp),
3425 /* harmony export */ "initAppOnReady": () => (/* binding */ initAppOnReady)
3426 /* harmony export */ });
3427 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
3428 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
3429 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lib/Raven */ "./scripts/lib/Raven.ts");
3430
3431
3432 function initApp(initFn) {
3433 (0,_lib_Raven__WEBPACK_IMPORTED_MODULE_1__.configureRaven)();
3434 _lib_Raven__WEBPACK_IMPORTED_MODULE_1__["default"].context(initFn);
3435 }
3436 function initAppOnReady(initFn) {
3437 function main() {
3438 jquery__WEBPACK_IMPORTED_MODULE_0___default()(initFn);
3439 }
3440 initApp(main);
3441 }
3442
3443 /***/ }),
3444
3445 /***/ "./scripts/utils/backgroundAppUtils.ts":
3446 /*!*********************************************!*\
3447 !*** ./scripts/utils/backgroundAppUtils.ts ***!
3448 \*********************************************/
3449 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3450
3451 "use strict";
3452 __webpack_require__.r(__webpack_exports__);
3453 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3454 /* harmony export */ "getOrCreateBackgroundApp": () => (/* binding */ getOrCreateBackgroundApp),
3455 /* harmony export */ "initBackgroundApp": () => (/* binding */ initBackgroundApp)
3456 /* harmony export */ });
3457 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
3458 /* harmony import */ var _appUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./appUtils */ "./scripts/utils/appUtils.ts");
3459 /* harmony import */ var _api_wordpressApiClient__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../api/wordpressApiClient */ "./scripts/api/wordpressApiClient.ts");
3460
3461
3462
3463 function initBackgroundApp(initFn) {
3464 function main() {
3465 if (Array.isArray(initFn)) {
3466 initFn.forEach(function (callback) {
3467 return callback();
3468 });
3469 } else {
3470 initFn();
3471 }
3472 }
3473 (0,_appUtils__WEBPACK_IMPORTED_MODULE_1__.initApp)(main);
3474 }
3475 var getLeadinConfig = function getLeadinConfig() {
3476 return {
3477 leadinPluginVersion: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.leadinPluginVersion
3478 };
3479 };
3480 var getOrCreateBackgroundApp = function getOrCreateBackgroundApp() {
3481 var accessToken = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
3482 var expiresIn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
3483 if (window.LeadinBackgroundApp) {
3484 return window.LeadinBackgroundApp;
3485 }
3486 var _window = window,
3487 IntegratedAppEmbedder = _window.IntegratedAppEmbedder,
3488 IntegratedAppOptions = _window.IntegratedAppOptions;
3489 var options = new IntegratedAppOptions().setLocale(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.locale).setDeviceId(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.deviceId).setLeadinConfig(getLeadinConfig()).setAccessToken(accessToken, expiresIn);
3490 var embedder = new IntegratedAppEmbedder('integrated-plugin-proxy', _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.portalId, _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.hubspotBaseUrl, function () {}).setOptions(options);
3491 embedder.attachTo(document.body, false);
3492 embedder.setTokenRenewalCallback(_api_wordpressApiClient__WEBPACK_IMPORTED_MODULE_2__.fetchAccessToken);
3493 embedder.postStartAppMessage(); // lets the app know all data has been passed to it
3494 window.LeadinBackgroundApp = embedder;
3495 return window.LeadinBackgroundApp;
3496 };
3497
3498 /***/ }),
3499
3500 /***/ "./scripts/utils/isRefreshTokenAvailable.ts":
3501 /*!**************************************************!*\
3502 !*** ./scripts/utils/isRefreshTokenAvailable.ts ***!
3503 \**************************************************/
3504 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3505
3506 "use strict";
3507 __webpack_require__.r(__webpack_exports__);
3508 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3509 /* harmony export */ "isRefreshTokenAvailable": () => (/* binding */ isRefreshTokenAvailable)
3510 /* harmony export */ });
3511 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
3512
3513 function isRefreshTokenAvailable() {
3514 return _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.connectionStatus === 'Connected';
3515 }
3516
3517 /***/ }),
3518
3519 /***/ "./scripts/utils/queryParams.ts":
3520 /*!**************************************!*\
3521 !*** ./scripts/utils/queryParams.ts ***!
3522 \**************************************/
3523 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3524
3525 "use strict";
3526 __webpack_require__.r(__webpack_exports__);
3527 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3528 /* harmony export */ "addQueryObjectToUrl": () => (/* binding */ addQueryObjectToUrl),
3529 /* harmony export */ "removeQueryParamFromLocation": () => (/* binding */ removeQueryParamFromLocation)
3530 /* harmony export */ });
3531 function addQueryObjectToUrl(urlObject, queryParams) {
3532 Object.keys(queryParams).forEach(function (key) {
3533 urlObject.searchParams.append(key, queryParams[key]);
3534 });
3535 }
3536 function removeQueryParamFromLocation(key) {
3537 var location = new URL(window.location.href);
3538 location.searchParams["delete"](key);
3539 window.history.replaceState(null, '', location.href);
3540 }
3541
3542 /***/ }),
3543
3544 /***/ "./scripts/utils/useGetEmbedder.ts":
3545 /*!*****************************************!*\
3546 !*** ./scripts/utils/useGetEmbedder.ts ***!
3547 \*****************************************/
3548 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3549
3550 "use strict";
3551 __webpack_require__.r(__webpack_exports__);
3552 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3553 /* harmony export */ "useGetEmbedder": () => (/* binding */ useGetEmbedder)
3554 /* harmony export */ });
3555 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
3556 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
3557 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
3558 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
3559 /* harmony import */ var _api_wordpressApiClient__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../api/wordpressApiClient */ "./scripts/api/wordpressApiClient.ts");
3560 /* harmony import */ var _backgroundAppUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
3561 /* harmony import */ var _isRefreshTokenAvailable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./isRefreshTokenAvailable */ "./scripts/utils/isRefreshTokenAvailable.ts");
3562 /* harmony import */ var _shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../shared/Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
3563 function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
3564 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3565 function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
3566 function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3567 function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
3568 function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
3569
3570
3571
3572
3573
3574
3575
3576 function useGetEmbedder() {
3577 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
3578 _useState2 = _slicedToArray(_useState, 2),
3579 embedder = _useState2[0],
3580 setEmbedder = _useState2[1];
3581 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
3582 _useState4 = _slicedToArray(_useState3, 2),
3583 errorStatus = _useState4[0],
3584 setErrorStatus = _useState4[1];
3585 var loadEmbedder = function loadEmbedder() {
3586 (0,_api_wordpressApiClient__WEBPACK_IMPORTED_MODULE_2__.fetchAccessToken)().then(function (_ref) {
3587 var accessToken = _ref.accessToken,
3588 expiresIn = _ref.expiresIn;
3589 setEmbedder((0,_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_3__.getOrCreateBackgroundApp)(accessToken, expiresIn));
3590 })["catch"](function (err) {
3591 return setErrorStatus(err && err.status || 500);
3592 });
3593 };
3594 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
3595 if ((0,_isRefreshTokenAvailable__WEBPACK_IMPORTED_MODULE_4__.isRefreshTokenAvailable)()) {
3596 loadEmbedder();
3597 }
3598 }, []);
3599 var errorElement = errorStatus !== null ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_5__["default"], {
3600 status: errorStatus,
3601 resetErrorState: function resetErrorState() {
3602 setErrorStatus(null);
3603 loadEmbedder();
3604 },
3605 errorInfo: {
3606 header: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Unable to load HubSpot', 'leadin'),
3607 message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('There was a problem connecting to HubSpot. Please try again.', 'leadin'),
3608 action: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Retry', 'leadin')
3609 }
3610 }) : null;
3611 return {
3612 embedder: embedder,
3613 errorElement: errorElement,
3614 isLoading: (0,_isRefreshTokenAvailable__WEBPACK_IMPORTED_MODULE_4__.isRefreshTokenAvailable)() && embedder === null && errorStatus === null
3615 };
3616 }
3617
3618 /***/ }),
3619
3620 /***/ "./scripts/utils/withMetaData.ts":
3621 /*!***************************************!*\
3622 !*** ./scripts/utils/withMetaData.ts ***!
3623 \***************************************/
3624 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3625
3626 "use strict";
3627 __webpack_require__.r(__webpack_exports__);
3628 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3629 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
3630 /* harmony export */ "isFullSiteEditor": () => (/* binding */ isFullSiteEditor)
3631 /* harmony export */ });
3632 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
3633 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
3634 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3635 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
3636 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
3637 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
3638
3639 // from answer here: https://github.com/WordPress/gutenberg/issues/44477#issuecomment-1263026599
3640 var isFullSiteEditor = function isFullSiteEditor() {
3641 return _wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select && !!(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select)('core/edit-site');
3642 };
3643 var applyWithSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.withSelect)(function (select, props) {
3644 return {
3645 metaValue: select('core/editor').getEditedPostAttribute('meta')[props.metaKey]
3646 };
3647 });
3648 var applyWithDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.withDispatch)(function (dispatch, props) {
3649 return {
3650 setMetaValue: function setMetaValue(value) {
3651 dispatch('core/editor').editPost({
3652 meta: _defineProperty({}, props.metaKey, value)
3653 });
3654 }
3655 };
3656 });
3657 function apply(el) {
3658 return applyWithSelect(applyWithDispatch(el));
3659 }
3660 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (apply);
3661
3662 /***/ }),
3663
3664 /***/ "./node_modules/is-what/dist/index.esm.js":
3665 /*!************************************************!*\
3666 !*** ./node_modules/is-what/dist/index.esm.js ***!
3667 \************************************************/
3668 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3669
3670 "use strict";
3671 __webpack_require__.r(__webpack_exports__);
3672 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3673 /* harmony export */ "getType": () => (/* binding */ getType),
3674 /* harmony export */ "isAnyObject": () => (/* binding */ isAnyObject),
3675 /* harmony export */ "isArray": () => (/* binding */ isArray),
3676 /* harmony export */ "isBlob": () => (/* binding */ isBlob),
3677 /* harmony export */ "isBoolean": () => (/* binding */ isBoolean),
3678 /* harmony export */ "isDate": () => (/* binding */ isDate),
3679 /* harmony export */ "isEmptyArray": () => (/* binding */ isEmptyArray),
3680 /* harmony export */ "isEmptyObject": () => (/* binding */ isEmptyObject),
3681 /* harmony export */ "isEmptyString": () => (/* binding */ isEmptyString),
3682 /* harmony export */ "isError": () => (/* binding */ isError),
3683 /* harmony export */ "isFile": () => (/* binding */ isFile),
3684 /* harmony export */ "isFullArray": () => (/* binding */ isFullArray),
3685 /* harmony export */ "isFullObject": () => (/* binding */ isFullObject),
3686 /* harmony export */ "isFullString": () => (/* binding */ isFullString),
3687 /* harmony export */ "isFunction": () => (/* binding */ isFunction),
3688 /* harmony export */ "isMap": () => (/* binding */ isMap),
3689 /* harmony export */ "isNaNValue": () => (/* binding */ isNaNValue),
3690 /* harmony export */ "isNull": () => (/* binding */ isNull),
3691 /* harmony export */ "isNullOrUndefined": () => (/* binding */ isNullOrUndefined),
3692 /* harmony export */ "isNumber": () => (/* binding */ isNumber),
3693 /* harmony export */ "isObject": () => (/* binding */ isObject),
3694 /* harmony export */ "isObjectLike": () => (/* binding */ isObjectLike),
3695 /* harmony export */ "isOneOf": () => (/* binding */ isOneOf),
3696 /* harmony export */ "isPlainObject": () => (/* binding */ isPlainObject),
3697 /* harmony export */ "isPrimitive": () => (/* binding */ isPrimitive),
3698 /* harmony export */ "isPromise": () => (/* binding */ isPromise),
3699 /* harmony export */ "isRegExp": () => (/* binding */ isRegExp),
3700 /* harmony export */ "isSet": () => (/* binding */ isSet),
3701 /* harmony export */ "isString": () => (/* binding */ isString),
3702 /* harmony export */ "isSymbol": () => (/* binding */ isSymbol),
3703 /* harmony export */ "isType": () => (/* binding */ isType),
3704 /* harmony export */ "isUndefined": () => (/* binding */ isUndefined),
3705 /* harmony export */ "isWeakMap": () => (/* binding */ isWeakMap),
3706 /* harmony export */ "isWeakSet": () => (/* binding */ isWeakSet)
3707 /* harmony export */ });
3708 /**
3709 * Returns the object type of the given payload
3710 *
3711 * @param {*} payload
3712 * @returns {string}
3713 */
3714 function getType(payload) {
3715 return Object.prototype.toString.call(payload).slice(8, -1);
3716 }
3717 /**
3718 * Returns whether the payload is undefined
3719 *
3720 * @param {*} payload
3721 * @returns {payload is undefined}
3722 */
3723 function isUndefined(payload) {
3724 return getType(payload) === 'Undefined';
3725 }
3726 /**
3727 * Returns whether the payload is null
3728 *
3729 * @param {*} payload
3730 * @returns {payload is null}
3731 */
3732 function isNull(payload) {
3733 return getType(payload) === 'Null';
3734 }
3735 /**
3736 * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
3737 *
3738 * @param {*} payload
3739 * @returns {payload is PlainObject}
3740 */
3741 function isPlainObject(payload) {
3742 if (getType(payload) !== 'Object')
3743 return false;
3744 return payload.constructor === Object && Object.getPrototypeOf(payload) === Object.prototype;
3745 }
3746 /**
3747 * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
3748 *
3749 * @param {*} payload
3750 * @returns {payload is PlainObject}
3751 */
3752 function isObject(payload) {
3753 return isPlainObject(payload);
3754 }
3755 /**
3756 * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
3757 *
3758 * @param {*} payload
3759 * @returns {payload is { [K in any]: never }}
3760 */
3761 function isEmptyObject(payload) {
3762 return isPlainObject(payload) && Object.keys(payload).length === 0;
3763 }
3764 /**
3765 * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
3766 *
3767 * @param {*} payload
3768 * @returns {payload is PlainObject}
3769 */
3770 function isFullObject(payload) {
3771 return isPlainObject(payload) && Object.keys(payload).length > 0;
3772 }
3773 /**
3774 * Returns whether the payload is an any kind of object (including special classes or objects with different prototypes)
3775 *
3776 * @param {*} payload
3777 * @returns {payload is PlainObject}
3778 */
3779 function isAnyObject(payload) {
3780 return getType(payload) === 'Object';
3781 }
3782 /**
3783 * Returns whether the payload is an object like a type passed in < >
3784 *
3785 * Usage: isObjectLike<{id: any}>(payload) // will make sure it's an object and has an `id` prop.
3786 *
3787 * @template T this must be passed in < >
3788 * @param {*} payload
3789 * @returns {payload is T}
3790 */
3791 function isObjectLike(payload) {
3792 return isAnyObject(payload);
3793 }
3794 /**
3795 * Returns whether the payload is a function (regular or async)
3796 *
3797 * @param {*} payload
3798 * @returns {payload is AnyFunction}
3799 */
3800 function isFunction(payload) {
3801 return typeof payload === 'function';
3802 }
3803 /**
3804 * Returns whether the payload is an array
3805 *
3806 * @param {any} payload
3807 * @returns {payload is any[]}
3808 */
3809 function isArray(payload) {
3810 return getType(payload) === 'Array';
3811 }
3812 /**
3813 * Returns whether the payload is a an array with at least 1 item
3814 *
3815 * @param {*} payload
3816 * @returns {payload is any[]}
3817 */
3818 function isFullArray(payload) {
3819 return isArray(payload) && payload.length > 0;
3820 }
3821 /**
3822 * Returns whether the payload is a an empty array
3823 *
3824 * @param {*} payload
3825 * @returns {payload is []}
3826 */
3827 function isEmptyArray(payload) {
3828 return isArray(payload) && payload.length === 0;
3829 }
3830 /**
3831 * Returns whether the payload is a string
3832 *
3833 * @param {*} payload
3834 * @returns {payload is string}
3835 */
3836 function isString(payload) {
3837 return getType(payload) === 'String';
3838 }
3839 /**
3840 * Returns whether the payload is a string, BUT returns false for ''
3841 *
3842 * @param {*} payload
3843 * @returns {payload is string}
3844 */
3845 function isFullString(payload) {
3846 return isString(payload) && payload !== '';
3847 }
3848 /**
3849 * Returns whether the payload is ''
3850 *
3851 * @param {*} payload
3852 * @returns {payload is string}
3853 */
3854 function isEmptyString(payload) {
3855 return payload === '';
3856 }
3857 /**
3858 * Returns whether the payload is a number (but not NaN)
3859 *
3860 * This will return `false` for `NaN`!!
3861 *
3862 * @param {*} payload
3863 * @returns {payload is number}
3864 */
3865 function isNumber(payload) {
3866 return getType(payload) === 'Number' && !isNaN(payload);
3867 }
3868 /**
3869 * Returns whether the payload is a boolean
3870 *
3871 * @param {*} payload
3872 * @returns {payload is boolean}
3873 */
3874 function isBoolean(payload) {
3875 return getType(payload) === 'Boolean';
3876 }
3877 /**
3878 * Returns whether the payload is a regular expression (RegExp)
3879 *
3880 * @param {*} payload
3881 * @returns {payload is RegExp}
3882 */
3883 function isRegExp(payload) {
3884 return getType(payload) === 'RegExp';
3885 }
3886 /**
3887 * Returns whether the payload is a Map
3888 *
3889 * @param {*} payload
3890 * @returns {payload is Map<any, any>}
3891 */
3892 function isMap(payload) {
3893 return getType(payload) === 'Map';
3894 }
3895 /**
3896 * Returns whether the payload is a WeakMap
3897 *
3898 * @param {*} payload
3899 * @returns {payload is WeakMap<any, any>}
3900 */
3901 function isWeakMap(payload) {
3902 return getType(payload) === 'WeakMap';
3903 }
3904 /**
3905 * Returns whether the payload is a Set
3906 *
3907 * @param {*} payload
3908 * @returns {payload is Set<any>}
3909 */
3910 function isSet(payload) {
3911 return getType(payload) === 'Set';
3912 }
3913 /**
3914 * Returns whether the payload is a WeakSet
3915 *
3916 * @param {*} payload
3917 * @returns {payload is WeakSet<any>}
3918 */
3919 function isWeakSet(payload) {
3920 return getType(payload) === 'WeakSet';
3921 }
3922 /**
3923 * Returns whether the payload is a Symbol
3924 *
3925 * @param {*} payload
3926 * @returns {payload is symbol}
3927 */
3928 function isSymbol(payload) {
3929 return getType(payload) === 'Symbol';
3930 }
3931 /**
3932 * Returns whether the payload is a Date, and that the date is valid
3933 *
3934 * @param {*} payload
3935 * @returns {payload is Date}
3936 */
3937 function isDate(payload) {
3938 return getType(payload) === 'Date' && !isNaN(payload);
3939 }
3940 /**
3941 * Returns whether the payload is a Blob
3942 *
3943 * @param {*} payload
3944 * @returns {payload is Blob}
3945 */
3946 function isBlob(payload) {
3947 return getType(payload) === 'Blob';
3948 }
3949 /**
3950 * Returns whether the payload is a File
3951 *
3952 * @param {*} payload
3953 * @returns {payload is File}
3954 */
3955 function isFile(payload) {
3956 return getType(payload) === 'File';
3957 }
3958 /**
3959 * Returns whether the payload is a Promise
3960 *
3961 * @param {*} payload
3962 * @returns {payload is Promise<any>}
3963 */
3964 function isPromise(payload) {
3965 return getType(payload) === 'Promise';
3966 }
3967 /**
3968 * Returns whether the payload is an Error
3969 *
3970 * @param {*} payload
3971 * @returns {payload is Error}
3972 */
3973 function isError(payload) {
3974 return getType(payload) === 'Error';
3975 }
3976 /**
3977 * Returns whether the payload is literally the value `NaN` (it's `NaN` and also a `number`)
3978 *
3979 * @param {*} payload
3980 * @returns {payload is typeof NaN}
3981 */
3982 function isNaNValue(payload) {
3983 return getType(payload) === 'Number' && isNaN(payload);
3984 }
3985 /**
3986 * Returns whether the payload is a primitive type (eg. Boolean | Null | Undefined | Number | String | Symbol)
3987 *
3988 * @param {*} payload
3989 * @returns {(payload is boolean | null | undefined | number | string | symbol)}
3990 */
3991 function isPrimitive(payload) {
3992 return (isBoolean(payload) ||
3993 isNull(payload) ||
3994 isUndefined(payload) ||
3995 isNumber(payload) ||
3996 isString(payload) ||
3997 isSymbol(payload));
3998 }
3999 /**
4000 * Returns true whether the payload is null or undefined
4001 *
4002 * @param {*} payload
4003 * @returns {(payload is null | undefined)}
4004 */
4005 var isNullOrUndefined = isOneOf(isNull, isUndefined);
4006 function isOneOf(a, b, c, d, e) {
4007 return function (value) {
4008 return a(value) || b(value) || (!!c && c(value)) || (!!d && d(value)) || (!!e && e(value));
4009 };
4010 }
4011 /**
4012 * Does a generic check to check that the given payload is of a given type.
4013 * In cases like Number, it will return true for NaN as NaN is a Number (thanks javascript!);
4014 * It will, however, differentiate between object and null
4015 *
4016 * @template T
4017 * @param {*} payload
4018 * @param {T} type
4019 * @throws {TypeError} Will throw type error if type is an invalid type
4020 * @returns {payload is T}
4021 */
4022 function isType(payload, type) {
4023 if (!(type instanceof Function)) {
4024 throw new TypeError('Type must be a function');
4025 }
4026 if (!Object.prototype.hasOwnProperty.call(type, 'prototype')) {
4027 throw new TypeError('Type is not a class');
4028 }
4029 // Classes usually have names (as functions usually have names)
4030 var name = type.name;
4031 return getType(payload) === name || Boolean(payload && payload.constructor === type);
4032 }
4033
4034
4035
4036
4037 /***/ }),
4038
4039 /***/ "./node_modules/lodash/_Symbol.js":
4040 /*!****************************************!*\
4041 !*** ./node_modules/lodash/_Symbol.js ***!
4042 \****************************************/
4043 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4044
4045 var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
4046
4047 /** Built-in value references. */
4048 var Symbol = root.Symbol;
4049
4050 module.exports = Symbol;
4051
4052
4053 /***/ }),
4054
4055 /***/ "./node_modules/lodash/_baseGetTag.js":
4056 /*!********************************************!*\
4057 !*** ./node_modules/lodash/_baseGetTag.js ***!
4058 \********************************************/
4059 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4060
4061 var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"),
4062 getRawTag = __webpack_require__(/*! ./_getRawTag */ "./node_modules/lodash/_getRawTag.js"),
4063 objectToString = __webpack_require__(/*! ./_objectToString */ "./node_modules/lodash/_objectToString.js");
4064
4065 /** `Object#toString` result references. */
4066 var nullTag = '[object Null]',
4067 undefinedTag = '[object Undefined]';
4068
4069 /** Built-in value references. */
4070 var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
4071
4072 /**
4073 * The base implementation of `getTag` without fallbacks for buggy environments.
4074 *
4075 * @private
4076 * @param {*} value The value to query.
4077 * @returns {string} Returns the `toStringTag`.
4078 */
4079 function baseGetTag(value) {
4080 if (value == null) {
4081 return value === undefined ? undefinedTag : nullTag;
4082 }
4083 return (symToStringTag && symToStringTag in Object(value))
4084 ? getRawTag(value)
4085 : objectToString(value);
4086 }
4087
4088 module.exports = baseGetTag;
4089
4090
4091 /***/ }),
4092
4093 /***/ "./node_modules/lodash/_baseTrim.js":
4094 /*!******************************************!*\
4095 !*** ./node_modules/lodash/_baseTrim.js ***!
4096 \******************************************/
4097 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4098
4099 var trimmedEndIndex = __webpack_require__(/*! ./_trimmedEndIndex */ "./node_modules/lodash/_trimmedEndIndex.js");
4100
4101 /** Used to match leading whitespace. */
4102 var reTrimStart = /^\s+/;
4103
4104 /**
4105 * The base implementation of `_.trim`.
4106 *
4107 * @private
4108 * @param {string} string The string to trim.
4109 * @returns {string} Returns the trimmed string.
4110 */
4111 function baseTrim(string) {
4112 return string
4113 ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
4114 : string;
4115 }
4116
4117 module.exports = baseTrim;
4118
4119
4120 /***/ }),
4121
4122 /***/ "./node_modules/lodash/_freeGlobal.js":
4123 /*!********************************************!*\
4124 !*** ./node_modules/lodash/_freeGlobal.js ***!
4125 \********************************************/
4126 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4127
4128 /** Detect free variable `global` from Node.js. */
4129 var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
4130
4131 module.exports = freeGlobal;
4132
4133
4134 /***/ }),
4135
4136 /***/ "./node_modules/lodash/_getRawTag.js":
4137 /*!*******************************************!*\
4138 !*** ./node_modules/lodash/_getRawTag.js ***!
4139 \*******************************************/
4140 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4141
4142 var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js");
4143
4144 /** Used for built-in method references. */
4145 var objectProto = Object.prototype;
4146
4147 /** Used to check objects for own properties. */
4148 var hasOwnProperty = objectProto.hasOwnProperty;
4149
4150 /**
4151 * Used to resolve the
4152 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
4153 * of values.
4154 */
4155 var nativeObjectToString = objectProto.toString;
4156
4157 /** Built-in value references. */
4158 var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
4159
4160 /**
4161 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
4162 *
4163 * @private
4164 * @param {*} value The value to query.
4165 * @returns {string} Returns the raw `toStringTag`.
4166 */
4167 function getRawTag(value) {
4168 var isOwn = hasOwnProperty.call(value, symToStringTag),
4169 tag = value[symToStringTag];
4170
4171 try {
4172 value[symToStringTag] = undefined;
4173 var unmasked = true;
4174 } catch (e) {}
4175
4176 var result = nativeObjectToString.call(value);
4177 if (unmasked) {
4178 if (isOwn) {
4179 value[symToStringTag] = tag;
4180 } else {
4181 delete value[symToStringTag];
4182 }
4183 }
4184 return result;
4185 }
4186
4187 module.exports = getRawTag;
4188
4189
4190 /***/ }),
4191
4192 /***/ "./node_modules/lodash/_objectToString.js":
4193 /*!************************************************!*\
4194 !*** ./node_modules/lodash/_objectToString.js ***!
4195 \************************************************/
4196 /***/ ((module) => {
4197
4198 /** Used for built-in method references. */
4199 var objectProto = Object.prototype;
4200
4201 /**
4202 * Used to resolve the
4203 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
4204 * of values.
4205 */
4206 var nativeObjectToString = objectProto.toString;
4207
4208 /**
4209 * Converts `value` to a string using `Object.prototype.toString`.
4210 *
4211 * @private
4212 * @param {*} value The value to convert.
4213 * @returns {string} Returns the converted string.
4214 */
4215 function objectToString(value) {
4216 return nativeObjectToString.call(value);
4217 }
4218
4219 module.exports = objectToString;
4220
4221
4222 /***/ }),
4223
4224 /***/ "./node_modules/lodash/_root.js":
4225 /*!**************************************!*\
4226 !*** ./node_modules/lodash/_root.js ***!
4227 \**************************************/
4228 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4229
4230 var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js");
4231
4232 /** Detect free variable `self`. */
4233 var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
4234
4235 /** Used as a reference to the global object. */
4236 var root = freeGlobal || freeSelf || Function('return this')();
4237
4238 module.exports = root;
4239
4240
4241 /***/ }),
4242
4243 /***/ "./node_modules/lodash/_trimmedEndIndex.js":
4244 /*!*************************************************!*\
4245 !*** ./node_modules/lodash/_trimmedEndIndex.js ***!
4246 \*************************************************/
4247 /***/ ((module) => {
4248
4249 /** Used to match a single whitespace character. */
4250 var reWhitespace = /\s/;
4251
4252 /**
4253 * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
4254 * character of `string`.
4255 *
4256 * @private
4257 * @param {string} string The string to inspect.
4258 * @returns {number} Returns the index of the last non-whitespace character.
4259 */
4260 function trimmedEndIndex(string) {
4261 var index = string.length;
4262
4263 while (index-- && reWhitespace.test(string.charAt(index))) {}
4264 return index;
4265 }
4266
4267 module.exports = trimmedEndIndex;
4268
4269
4270 /***/ }),
4271
4272 /***/ "./node_modules/lodash/debounce.js":
4273 /*!*****************************************!*\
4274 !*** ./node_modules/lodash/debounce.js ***!
4275 \*****************************************/
4276 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4277
4278 var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
4279 now = __webpack_require__(/*! ./now */ "./node_modules/lodash/now.js"),
4280 toNumber = __webpack_require__(/*! ./toNumber */ "./node_modules/lodash/toNumber.js");
4281
4282 /** Error message constants. */
4283 var FUNC_ERROR_TEXT = 'Expected a function';
4284
4285 /* Built-in method references for those with the same name as other `lodash` methods. */
4286 var nativeMax = Math.max,
4287 nativeMin = Math.min;
4288
4289 /**
4290 * Creates a debounced function that delays invoking `func` until after `wait`
4291 * milliseconds have elapsed since the last time the debounced function was
4292 * invoked. The debounced function comes with a `cancel` method to cancel
4293 * delayed `func` invocations and a `flush` method to immediately invoke them.
4294 * Provide `options` to indicate whether `func` should be invoked on the
4295 * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
4296 * with the last arguments provided to the debounced function. Subsequent
4297 * calls to the debounced function return the result of the last `func`
4298 * invocation.
4299 *
4300 * **Note:** If `leading` and `trailing` options are `true`, `func` is
4301 * invoked on the trailing edge of the timeout only if the debounced function
4302 * is invoked more than once during the `wait` timeout.
4303 *
4304 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
4305 * until to the next tick, similar to `setTimeout` with a timeout of `0`.
4306 *
4307 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
4308 * for details over the differences between `_.debounce` and `_.throttle`.
4309 *
4310 * @static
4311 * @memberOf _
4312 * @since 0.1.0
4313 * @category Function
4314 * @param {Function} func The function to debounce.
4315 * @param {number} [wait=0] The number of milliseconds to delay.
4316 * @param {Object} [options={}] The options object.
4317 * @param {boolean} [options.leading=false]
4318 * Specify invoking on the leading edge of the timeout.
4319 * @param {number} [options.maxWait]
4320 * The maximum time `func` is allowed to be delayed before it's invoked.
4321 * @param {boolean} [options.trailing=true]
4322 * Specify invoking on the trailing edge of the timeout.
4323 * @returns {Function} Returns the new debounced function.
4324 * @example
4325 *
4326 * // Avoid costly calculations while the window size is in flux.
4327 * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
4328 *
4329 * // Invoke `sendMail` when clicked, debouncing subsequent calls.
4330 * jQuery(element).on('click', _.debounce(sendMail, 300, {
4331 * 'leading': true,
4332 * 'trailing': false
4333 * }));
4334 *
4335 * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
4336 * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
4337 * var source = new EventSource('/stream');
4338 * jQuery(source).on('message', debounced);
4339 *
4340 * // Cancel the trailing debounced invocation.
4341 * jQuery(window).on('popstate', debounced.cancel);
4342 */
4343 function debounce(func, wait, options) {
4344 var lastArgs,
4345 lastThis,
4346 maxWait,
4347 result,
4348 timerId,
4349 lastCallTime,
4350 lastInvokeTime = 0,
4351 leading = false,
4352 maxing = false,
4353 trailing = true;
4354
4355 if (typeof func != 'function') {
4356 throw new TypeError(FUNC_ERROR_TEXT);
4357 }
4358 wait = toNumber(wait) || 0;
4359 if (isObject(options)) {
4360 leading = !!options.leading;
4361 maxing = 'maxWait' in options;
4362 maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
4363 trailing = 'trailing' in options ? !!options.trailing : trailing;
4364 }
4365
4366 function invokeFunc(time) {
4367 var args = lastArgs,
4368 thisArg = lastThis;
4369
4370 lastArgs = lastThis = undefined;
4371 lastInvokeTime = time;
4372 result = func.apply(thisArg, args);
4373 return result;
4374 }
4375
4376 function leadingEdge(time) {
4377 // Reset any `maxWait` timer.
4378 lastInvokeTime = time;
4379 // Start the timer for the trailing edge.
4380 timerId = setTimeout(timerExpired, wait);
4381 // Invoke the leading edge.
4382 return leading ? invokeFunc(time) : result;
4383 }
4384
4385 function remainingWait(time) {
4386 var timeSinceLastCall = time - lastCallTime,
4387 timeSinceLastInvoke = time - lastInvokeTime,
4388 timeWaiting = wait - timeSinceLastCall;
4389
4390 return maxing
4391 ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
4392 : timeWaiting;
4393 }
4394
4395 function shouldInvoke(time) {
4396 var timeSinceLastCall = time - lastCallTime,
4397 timeSinceLastInvoke = time - lastInvokeTime;
4398
4399 // Either this is the first call, activity has stopped and we're at the
4400 // trailing edge, the system time has gone backwards and we're treating
4401 // it as the trailing edge, or we've hit the `maxWait` limit.
4402 return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
4403 (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
4404 }
4405
4406 function timerExpired() {
4407 var time = now();
4408 if (shouldInvoke(time)) {
4409 return trailingEdge(time);
4410 }
4411 // Restart the timer.
4412 timerId = setTimeout(timerExpired, remainingWait(time));
4413 }
4414
4415 function trailingEdge(time) {
4416 timerId = undefined;
4417
4418 // Only invoke if we have `lastArgs` which means `func` has been
4419 // debounced at least once.
4420 if (trailing && lastArgs) {
4421 return invokeFunc(time);
4422 }
4423 lastArgs = lastThis = undefined;
4424 return result;
4425 }
4426
4427 function cancel() {
4428 if (timerId !== undefined) {
4429 clearTimeout(timerId);
4430 }
4431 lastInvokeTime = 0;
4432 lastArgs = lastCallTime = lastThis = timerId = undefined;
4433 }
4434
4435 function flush() {
4436 return timerId === undefined ? result : trailingEdge(now());
4437 }
4438
4439 function debounced() {
4440 var time = now(),
4441 isInvoking = shouldInvoke(time);
4442
4443 lastArgs = arguments;
4444 lastThis = this;
4445 lastCallTime = time;
4446
4447 if (isInvoking) {
4448 if (timerId === undefined) {
4449 return leadingEdge(lastCallTime);
4450 }
4451 if (maxing) {
4452 // Handle invocations in a tight loop.
4453 clearTimeout(timerId);
4454 timerId = setTimeout(timerExpired, wait);
4455 return invokeFunc(lastCallTime);
4456 }
4457 }
4458 if (timerId === undefined) {
4459 timerId = setTimeout(timerExpired, wait);
4460 }
4461 return result;
4462 }
4463 debounced.cancel = cancel;
4464 debounced.flush = flush;
4465 return debounced;
4466 }
4467
4468 module.exports = debounce;
4469
4470
4471 /***/ }),
4472
4473 /***/ "./node_modules/lodash/isObject.js":
4474 /*!*****************************************!*\
4475 !*** ./node_modules/lodash/isObject.js ***!
4476 \*****************************************/
4477 /***/ ((module) => {
4478
4479 /**
4480 * Checks if `value` is the
4481 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
4482 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
4483 *
4484 * @static
4485 * @memberOf _
4486 * @since 0.1.0
4487 * @category Lang
4488 * @param {*} value The value to check.
4489 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
4490 * @example
4491 *
4492 * _.isObject({});
4493 * // => true
4494 *
4495 * _.isObject([1, 2, 3]);
4496 * // => true
4497 *
4498 * _.isObject(_.noop);
4499 * // => true
4500 *
4501 * _.isObject(null);
4502 * // => false
4503 */
4504 function isObject(value) {
4505 var type = typeof value;
4506 return value != null && (type == 'object' || type == 'function');
4507 }
4508
4509 module.exports = isObject;
4510
4511
4512 /***/ }),
4513
4514 /***/ "./node_modules/lodash/isObjectLike.js":
4515 /*!*********************************************!*\
4516 !*** ./node_modules/lodash/isObjectLike.js ***!
4517 \*********************************************/
4518 /***/ ((module) => {
4519
4520 /**
4521 * Checks if `value` is object-like. A value is object-like if it's not `null`
4522 * and has a `typeof` result of "object".
4523 *
4524 * @static
4525 * @memberOf _
4526 * @since 4.0.0
4527 * @category Lang
4528 * @param {*} value The value to check.
4529 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
4530 * @example
4531 *
4532 * _.isObjectLike({});
4533 * // => true
4534 *
4535 * _.isObjectLike([1, 2, 3]);
4536 * // => true
4537 *
4538 * _.isObjectLike(_.noop);
4539 * // => false
4540 *
4541 * _.isObjectLike(null);
4542 * // => false
4543 */
4544 function isObjectLike(value) {
4545 return value != null && typeof value == 'object';
4546 }
4547
4548 module.exports = isObjectLike;
4549
4550
4551 /***/ }),
4552
4553 /***/ "./node_modules/lodash/isSymbol.js":
4554 /*!*****************************************!*\
4555 !*** ./node_modules/lodash/isSymbol.js ***!
4556 \*****************************************/
4557 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4558
4559 var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
4560 isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
4561
4562 /** `Object#toString` result references. */
4563 var symbolTag = '[object Symbol]';
4564
4565 /**
4566 * Checks if `value` is classified as a `Symbol` primitive or object.
4567 *
4568 * @static
4569 * @memberOf _
4570 * @since 4.0.0
4571 * @category Lang
4572 * @param {*} value The value to check.
4573 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
4574 * @example
4575 *
4576 * _.isSymbol(Symbol.iterator);
4577 * // => true
4578 *
4579 * _.isSymbol('abc');
4580 * // => false
4581 */
4582 function isSymbol(value) {
4583 return typeof value == 'symbol' ||
4584 (isObjectLike(value) && baseGetTag(value) == symbolTag);
4585 }
4586
4587 module.exports = isSymbol;
4588
4589
4590 /***/ }),
4591
4592 /***/ "./node_modules/lodash/now.js":
4593 /*!************************************!*\
4594 !*** ./node_modules/lodash/now.js ***!
4595 \************************************/
4596 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4597
4598 var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
4599
4600 /**
4601 * Gets the timestamp of the number of milliseconds that have elapsed since
4602 * the Unix epoch (1 January 1970 00:00:00 UTC).
4603 *
4604 * @static
4605 * @memberOf _
4606 * @since 2.4.0
4607 * @category Date
4608 * @returns {number} Returns the timestamp.
4609 * @example
4610 *
4611 * _.defer(function(stamp) {
4612 * console.log(_.now() - stamp);
4613 * }, _.now());
4614 * // => Logs the number of milliseconds it took for the deferred invocation.
4615 */
4616 var now = function() {
4617 return root.Date.now();
4618 };
4619
4620 module.exports = now;
4621
4622
4623 /***/ }),
4624
4625 /***/ "./node_modules/lodash/toNumber.js":
4626 /*!*****************************************!*\
4627 !*** ./node_modules/lodash/toNumber.js ***!
4628 \*****************************************/
4629 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4630
4631 var baseTrim = __webpack_require__(/*! ./_baseTrim */ "./node_modules/lodash/_baseTrim.js"),
4632 isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
4633 isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js");
4634
4635 /** Used as references for various `Number` constants. */
4636 var NAN = 0 / 0;
4637
4638 /** Used to detect bad signed hexadecimal string values. */
4639 var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
4640
4641 /** Used to detect binary string values. */
4642 var reIsBinary = /^0b[01]+$/i;
4643
4644 /** Used to detect octal string values. */
4645 var reIsOctal = /^0o[0-7]+$/i;
4646
4647 /** Built-in method references without a dependency on `root`. */
4648 var freeParseInt = parseInt;
4649
4650 /**
4651 * Converts `value` to a number.
4652 *
4653 * @static
4654 * @memberOf _
4655 * @since 4.0.0
4656 * @category Lang
4657 * @param {*} value The value to process.
4658 * @returns {number} Returns the number.
4659 * @example
4660 *
4661 * _.toNumber(3.2);
4662 * // => 3.2
4663 *
4664 * _.toNumber(Number.MIN_VALUE);
4665 * // => 5e-324
4666 *
4667 * _.toNumber(Infinity);
4668 * // => Infinity
4669 *
4670 * _.toNumber('3.2');
4671 * // => 3.2
4672 */
4673 function toNumber(value) {
4674 if (typeof value == 'number') {
4675 return value;
4676 }
4677 if (isSymbol(value)) {
4678 return NAN;
4679 }
4680 if (isObject(value)) {
4681 var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
4682 value = isObject(other) ? (other + '') : other;
4683 }
4684 if (typeof value != 'string') {
4685 return value === 0 ? value : +value;
4686 }
4687 value = baseTrim(value);
4688 var isBinary = reIsBinary.test(value);
4689 return (isBinary || reIsOctal.test(value))
4690 ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
4691 : (reIsBadHex.test(value) ? NAN : +value);
4692 }
4693
4694 module.exports = toNumber;
4695
4696
4697 /***/ }),
4698
4699 /***/ "./node_modules/memoize-one/dist/memoize-one.esm.js":
4700 /*!**********************************************************!*\
4701 !*** ./node_modules/memoize-one/dist/memoize-one.esm.js ***!
4702 \**********************************************************/
4703 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4704
4705 "use strict";
4706 __webpack_require__.r(__webpack_exports__);
4707 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4708 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
4709 /* harmony export */ });
4710 var safeIsNaN = Number.isNaN ||
4711 function ponyfill(value) {
4712 return typeof value === 'number' && value !== value;
4713 };
4714 function isEqual(first, second) {
4715 if (first === second) {
4716 return true;
4717 }
4718 if (safeIsNaN(first) && safeIsNaN(second)) {
4719 return true;
4720 }
4721 return false;
4722 }
4723 function areInputsEqual(newInputs, lastInputs) {
4724 if (newInputs.length !== lastInputs.length) {
4725 return false;
4726 }
4727 for (var i = 0; i < newInputs.length; i++) {
4728 if (!isEqual(newInputs[i], lastInputs[i])) {
4729 return false;
4730 }
4731 }
4732 return true;
4733 }
4734
4735 function memoizeOne(resultFn, isEqual) {
4736 if (isEqual === void 0) { isEqual = areInputsEqual; }
4737 var lastThis;
4738 var lastArgs = [];
4739 var lastResult;
4740 var calledOnce = false;
4741 function memoized() {
4742 var newArgs = [];
4743 for (var _i = 0; _i < arguments.length; _i++) {
4744 newArgs[_i] = arguments[_i];
4745 }
4746 if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {
4747 return lastResult;
4748 }
4749 lastResult = resultFn.apply(this, newArgs);
4750 calledOnce = true;
4751 lastThis = this;
4752 lastArgs = newArgs;
4753 return lastResult;
4754 }
4755 return memoized;
4756 }
4757
4758 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoizeOne);
4759
4760
4761 /***/ }),
4762
4763 /***/ "./node_modules/merge-anything/dist/index.esm.js":
4764 /*!*******************************************************!*\
4765 !*** ./node_modules/merge-anything/dist/index.esm.js ***!
4766 \*******************************************************/
4767 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4768
4769 "use strict";
4770 __webpack_require__.r(__webpack_exports__);
4771 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4772 /* harmony export */ "concatArrays": () => (/* binding */ concatArrays),
4773 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
4774 /* harmony export */ "merge": () => (/* binding */ merge)
4775 /* harmony export */ });
4776 /* harmony import */ var is_what__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-what */ "./node_modules/is-what/dist/index.esm.js");
4777
4778
4779 /*! *****************************************************************************
4780 Copyright (c) Microsoft Corporation. All rights reserved.
4781 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4782 this file except in compliance with the License. You may obtain a copy of the
4783 License at http://www.apache.org/licenses/LICENSE-2.0
4784
4785 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
4786 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
4787 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
4788 MERCHANTABLITY OR NON-INFRINGEMENT.
4789
4790 See the Apache Version 2.0 License for specific language governing permissions
4791 and limitations under the License.
4792 ***************************************************************************** */
4793
4794 function __spreadArrays() {
4795 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
4796 for (var r = Array(s), k = 0, i = 0; i < il; i++)
4797 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
4798 r[k] = a[j];
4799 return r;
4800 }
4801
4802 function assignProp(carry, key, newVal, originalObject) {
4803 var propType = originalObject.propertyIsEnumerable(key)
4804 ? 'enumerable'
4805 : 'nonenumerable';
4806 if (propType === 'enumerable')
4807 carry[key] = newVal;
4808 if (propType === 'nonenumerable') {
4809 Object.defineProperty(carry, key, {
4810 value: newVal,
4811 enumerable: false,
4812 writable: true,
4813 configurable: true
4814 });
4815 }
4816 }
4817 function mergeRecursively(origin, newComer, extensions) {
4818 // work directly on newComer if its not an object
4819 if (!(0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(newComer)) {
4820 // extend merge rules
4821 if (extensions && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(extensions)) {
4822 extensions.forEach(function (extend) {
4823 newComer = extend(origin, newComer);
4824 });
4825 }
4826 return newComer;
4827 }
4828 // define newObject to merge all values upon
4829 var newObject = {};
4830 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin)) {
4831 var props_1 = Object.getOwnPropertyNames(origin);
4832 var symbols_1 = Object.getOwnPropertySymbols(origin);
4833 newObject = __spreadArrays(props_1, symbols_1).reduce(function (carry, key) {
4834 // @ts-ignore
4835 var targetVal = origin[key];
4836 if ((!(0,is_what__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) && !Object.getOwnPropertyNames(newComer).includes(key)) ||
4837 ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) && !Object.getOwnPropertySymbols(newComer).includes(key))) {
4838 assignProp(carry, key, targetVal, origin);
4839 }
4840 return carry;
4841 }, {});
4842 }
4843 var props = Object.getOwnPropertyNames(newComer);
4844 var symbols = Object.getOwnPropertySymbols(newComer);
4845 var result = __spreadArrays(props, symbols).reduce(function (carry, key) {
4846 // re-define the origin and newComer as targetVal and newVal
4847 var newVal = newComer[key];
4848 var targetVal = ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin))
4849 // @ts-ignore
4850 ? origin[key]
4851 : undefined;
4852 // extend merge rules
4853 if (extensions && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(extensions)) {
4854 extensions.forEach(function (extend) {
4855 newVal = extend(targetVal, newVal);
4856 });
4857 }
4858 // When newVal is an object do the merge recursively
4859 if (targetVal !== undefined && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(newVal)) {
4860 newVal = mergeRecursively(targetVal, newVal, extensions);
4861 }
4862 assignProp(carry, key, newVal, newComer);
4863 return carry;
4864 }, newObject);
4865 return result;
4866 }
4867 /**
4868 * Merge anything recursively.
4869 * Objects get merged, special objects (classes etc.) are re-assigned "as is".
4870 * Basic types overwrite objects or other basic types.
4871 *
4872 * @param {(IConfig | any)} origin
4873 * @param {...any[]} newComers
4874 * @returns the result
4875 */
4876 function merge(origin) {
4877 var newComers = [];
4878 for (var _i = 1; _i < arguments.length; _i++) {
4879 newComers[_i - 1] = arguments[_i];
4880 }
4881 var extensions = null;
4882 var base = origin;
4883 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin) && origin.extensions && Object.keys(origin).length === 1) {
4884 base = {};
4885 extensions = origin.extensions;
4886 }
4887 return newComers.reduce(function (result, newComer) {
4888 return mergeRecursively(result, newComer, extensions);
4889 }, base);
4890 }
4891
4892 function concatArrays(originVal, newVal) {
4893 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(originVal) && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(newVal)) {
4894 // concat logic
4895 return originVal.concat(newVal);
4896 }
4897 return newVal; // always return newVal as fallback!!
4898 }
4899
4900 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (merge);
4901
4902
4903
4904 /***/ }),
4905
4906 /***/ "./scripts/gutenberg/UIComponents/UIImage.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/gutenberg/UIComponents/UIImage.ts":
4907 /*!****************************************************************************************************************************************************************************************!*\
4908 !*** ./scripts/gutenberg/UIComponents/UIImage.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/gutenberg/UIComponents/UIImage.ts ***!
4909 \****************************************************************************************************************************************************************************************/
4910 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4911
4912 "use strict";
4913 __webpack_require__.r(__webpack_exports__);
4914 // extracted by mini-css-extract-plugin
4915
4916
4917 /***/ }),
4918
4919 /***/ "./scripts/shared/Common/AsyncSelect.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/AsyncSelect.tsx":
4920 /*!*******************************************************************************************************************************************************************************!*\
4921 !*** ./scripts/shared/Common/AsyncSelect.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/AsyncSelect.tsx ***!
4922 \*******************************************************************************************************************************************************************************/
4923 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4924
4925 "use strict";
4926 __webpack_require__.r(__webpack_exports__);
4927 // extracted by mini-css-extract-plugin
4928
4929
4930 /***/ }),
4931
4932 /***/ "./scripts/shared/Common/HubspotWrapper.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/HubspotWrapper.ts":
4933 /*!************************************************************************************************************************************************************************************!*\
4934 !*** ./scripts/shared/Common/HubspotWrapper.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/HubspotWrapper.ts ***!
4935 \************************************************************************************************************************************************************************************/
4936 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4937
4938 "use strict";
4939 __webpack_require__.r(__webpack_exports__);
4940 // extracted by mini-css-extract-plugin
4941
4942
4943 /***/ }),
4944
4945 /***/ "./scripts/shared/UIComponents/UIAlert.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIAlert.tsx":
4946 /*!***********************************************************************************************************************************************************************************!*\
4947 !*** ./scripts/shared/UIComponents/UIAlert.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIAlert.tsx ***!
4948 \***********************************************************************************************************************************************************************************/
4949 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4950
4951 "use strict";
4952 __webpack_require__.r(__webpack_exports__);
4953 // extracted by mini-css-extract-plugin
4954
4955
4956 /***/ }),
4957
4958 /***/ "./scripts/shared/UIComponents/UIButton.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIButton.ts":
4959 /*!************************************************************************************************************************************************************************************!*\
4960 !*** ./scripts/shared/UIComponents/UIButton.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIButton.ts ***!
4961 \************************************************************************************************************************************************************************************/
4962 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4963
4964 "use strict";
4965 __webpack_require__.r(__webpack_exports__);
4966 // extracted by mini-css-extract-plugin
4967
4968
4969 /***/ }),
4970
4971 /***/ "./scripts/shared/UIComponents/UIContainer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIContainer.ts":
4972 /*!******************************************************************************************************************************************************************************************!*\
4973 !*** ./scripts/shared/UIComponents/UIContainer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIContainer.ts ***!
4974 \******************************************************************************************************************************************************************************************/
4975 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4976
4977 "use strict";
4978 __webpack_require__.r(__webpack_exports__);
4979 // extracted by mini-css-extract-plugin
4980
4981
4982 /***/ }),
4983
4984 /***/ "./scripts/shared/UIComponents/UIOverlay.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIOverlay.ts":
4985 /*!**************************************************************************************************************************************************************************************!*\
4986 !*** ./scripts/shared/UIComponents/UIOverlay.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIOverlay.ts ***!
4987 \**************************************************************************************************************************************************************************************/
4988 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4989
4990 "use strict";
4991 __webpack_require__.r(__webpack_exports__);
4992 // extracted by mini-css-extract-plugin
4993
4994
4995 /***/ }),
4996
4997 /***/ "./scripts/shared/UIComponents/UISpacer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpacer.ts":
4998 /*!************************************************************************************************************************************************************************************!*\
4999 !*** ./scripts/shared/UIComponents/UISpacer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpacer.ts ***!
5000 \************************************************************************************************************************************************************************************/
5001 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
5002
5003 "use strict";
5004 __webpack_require__.r(__webpack_exports__);
5005 // extracted by mini-css-extract-plugin
5006
5007
5008 /***/ }),
5009
5010 /***/ "./scripts/shared/UIComponents/UISpinner.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpinner.tsx":
5011 /*!***************************************************************************************************************************************************************************************!*\
5012 !*** ./scripts/shared/UIComponents/UISpinner.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpinner.tsx ***!
5013 \***************************************************************************************************************************************************************************************/
5014 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
5015
5016 "use strict";
5017 __webpack_require__.r(__webpack_exports__);
5018 // extracted by mini-css-extract-plugin
5019
5020
5021 /***/ }),
5022
5023 /***/ "./node_modules/object-assign/index.js":
5024 /*!*********************************************!*\
5025 !*** ./node_modules/object-assign/index.js ***!
5026 \*********************************************/
5027 /***/ ((module) => {
5028
5029 "use strict";
5030 /*
5031 object-assign
5032 (c) Sindre Sorhus
5033 @license MIT
5034 */
5035
5036
5037 /* eslint-disable no-unused-vars */
5038 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
5039 var hasOwnProperty = Object.prototype.hasOwnProperty;
5040 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
5041
5042 function toObject(val) {
5043 if (val === null || val === undefined) {
5044 throw new TypeError('Object.assign cannot be called with null or undefined');
5045 }
5046
5047 return Object(val);
5048 }
5049
5050 function shouldUseNative() {
5051 try {
5052 if (!Object.assign) {
5053 return false;
5054 }
5055
5056 // Detect buggy property enumeration order in older V8 versions.
5057
5058 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
5059 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
5060 test1[5] = 'de';
5061 if (Object.getOwnPropertyNames(test1)[0] === '5') {
5062 return false;
5063 }
5064
5065 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
5066 var test2 = {};
5067 for (var i = 0; i < 10; i++) {
5068 test2['_' + String.fromCharCode(i)] = i;
5069 }
5070 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
5071 return test2[n];
5072 });
5073 if (order2.join('') !== '0123456789') {
5074 return false;
5075 }
5076
5077 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
5078 var test3 = {};
5079 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
5080 test3[letter] = letter;
5081 });
5082 if (Object.keys(Object.assign({}, test3)).join('') !==
5083 'abcdefghijklmnopqrst') {
5084 return false;
5085 }
5086
5087 return true;
5088 } catch (err) {
5089 // We don't expect any of the above to throw, but better to be safe.
5090 return false;
5091 }
5092 }
5093
5094 module.exports = shouldUseNative() ? Object.assign : function (target, source) {
5095 var from;
5096 var to = toObject(target);
5097 var symbols;
5098
5099 for (var s = 1; s < arguments.length; s++) {
5100 from = Object(arguments[s]);
5101
5102 for (var key in from) {
5103 if (hasOwnProperty.call(from, key)) {
5104 to[key] = from[key];
5105 }
5106 }
5107
5108 if (getOwnPropertySymbols) {
5109 symbols = getOwnPropertySymbols(from);
5110 for (var i = 0; i < symbols.length; i++) {
5111 if (propIsEnumerable.call(from, symbols[i])) {
5112 to[symbols[i]] = from[symbols[i]];
5113 }
5114 }
5115 }
5116 }
5117
5118 return to;
5119 };
5120
5121
5122 /***/ }),
5123
5124 /***/ "./node_modules/prop-types/checkPropTypes.js":
5125 /*!***************************************************!*\
5126 !*** ./node_modules/prop-types/checkPropTypes.js ***!
5127 \***************************************************/
5128 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5129
5130 "use strict";
5131 /**
5132 * Copyright (c) 2013-present, Facebook, Inc.
5133 *
5134 * This source code is licensed under the MIT license found in the
5135 * LICENSE file in the root directory of this source tree.
5136 */
5137
5138
5139
5140 var printWarning = function() {};
5141
5142 if (true) {
5143 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
5144 var loggedTypeFailures = {};
5145 var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
5146
5147 printWarning = function(text) {
5148 var message = 'Warning: ' + text;
5149 if (typeof console !== 'undefined') {
5150 console.error(message);
5151 }
5152 try {
5153 // --- Welcome to debugging React ---
5154 // This error was thrown as a convenience so that you can use this stack
5155 // to find the callsite that caused this warning to fire.
5156 throw new Error(message);
5157 } catch (x) { /**/ }
5158 };
5159 }
5160
5161 /**
5162 * Assert that the values match with the type specs.
5163 * Error messages are memorized and will only be shown once.
5164 *
5165 * @param {object} typeSpecs Map of name to a ReactPropType
5166 * @param {object} values Runtime values that need to be type-checked
5167 * @param {string} location e.g. "prop", "context", "child context"
5168 * @param {string} componentName Name of the component for error messages.
5169 * @param {?Function} getStack Returns the component stack.
5170 * @private
5171 */
5172 function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
5173 if (true) {
5174 for (var typeSpecName in typeSpecs) {
5175 if (has(typeSpecs, typeSpecName)) {
5176 var error;
5177 // Prop type validation may throw. In case they do, we don't want to
5178 // fail the render phase where it didn't fail before. So we log it.
5179 // After these have been cleaned up, we'll let them throw.
5180 try {
5181 // This is intentionally an invariant that gets caught. It's the same
5182 // behavior as without this statement except with a better message.
5183 if (typeof typeSpecs[typeSpecName] !== 'function') {
5184 var err = Error(
5185 (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
5186 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
5187 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
5188 );
5189 err.name = 'Invariant Violation';
5190 throw err;
5191 }
5192 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
5193 } catch (ex) {
5194 error = ex;
5195 }
5196 if (error && !(error instanceof Error)) {
5197 printWarning(
5198 (componentName || 'React class') + ': type specification of ' +
5199 location + ' `' + typeSpecName + '` is invalid; the type checker ' +
5200 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
5201 'You may have forgotten to pass an argument to the type checker ' +
5202 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
5203 'shape all require an argument).'
5204 );
5205 }
5206 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
5207 // Only monitor this failure once because there tends to be a lot of the
5208 // same error.
5209 loggedTypeFailures[error.message] = true;
5210
5211 var stack = getStack ? getStack() : '';
5212
5213 printWarning(
5214 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
5215 );
5216 }
5217 }
5218 }
5219 }
5220 }
5221
5222 /**
5223 * Resets warning cache when testing.
5224 *
5225 * @private
5226 */
5227 checkPropTypes.resetWarningCache = function() {
5228 if (true) {
5229 loggedTypeFailures = {};
5230 }
5231 }
5232
5233 module.exports = checkPropTypes;
5234
5235
5236 /***/ }),
5237
5238 /***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
5239 /*!************************************************************!*\
5240 !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
5241 \************************************************************/
5242 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5243
5244 "use strict";
5245 /**
5246 * Copyright (c) 2013-present, Facebook, Inc.
5247 *
5248 * This source code is licensed under the MIT license found in the
5249 * LICENSE file in the root directory of this source tree.
5250 */
5251
5252
5253
5254 var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
5255 var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
5256
5257 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
5258 var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
5259 var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
5260
5261 var printWarning = function() {};
5262
5263 if (true) {
5264 printWarning = function(text) {
5265 var message = 'Warning: ' + text;
5266 if (typeof console !== 'undefined') {
5267 console.error(message);
5268 }
5269 try {
5270 // --- Welcome to debugging React ---
5271 // This error was thrown as a convenience so that you can use this stack
5272 // to find the callsite that caused this warning to fire.
5273 throw new Error(message);
5274 } catch (x) {}
5275 };
5276 }
5277
5278 function emptyFunctionThatReturnsNull() {
5279 return null;
5280 }
5281
5282 module.exports = function(isValidElement, throwOnDirectAccess) {
5283 /* global Symbol */
5284 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
5285 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
5286
5287 /**
5288 * Returns the iterator method function contained on the iterable object.
5289 *
5290 * Be sure to invoke the function with the iterable as context:
5291 *
5292 * var iteratorFn = getIteratorFn(myIterable);
5293 * if (iteratorFn) {
5294 * var iterator = iteratorFn.call(myIterable);
5295 * ...
5296 * }
5297 *
5298 * @param {?object} maybeIterable
5299 * @return {?function}
5300 */
5301 function getIteratorFn(maybeIterable) {
5302 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
5303 if (typeof iteratorFn === 'function') {
5304 return iteratorFn;
5305 }
5306 }
5307
5308 /**
5309 * Collection of methods that allow declaration and validation of props that are
5310 * supplied to React components. Example usage:
5311 *
5312 * var Props = require('ReactPropTypes');
5313 * var MyArticle = React.createClass({
5314 * propTypes: {
5315 * // An optional string prop named "description".
5316 * description: Props.string,
5317 *
5318 * // A required enum prop named "category".
5319 * category: Props.oneOf(['News','Photos']).isRequired,
5320 *
5321 * // A prop named "dialog" that requires an instance of Dialog.
5322 * dialog: Props.instanceOf(Dialog).isRequired
5323 * },
5324 * render: function() { ... }
5325 * });
5326 *
5327 * A more formal specification of how these methods are used:
5328 *
5329 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
5330 * decl := ReactPropTypes.{type}(.isRequired)?
5331 *
5332 * Each and every declaration produces a function with the same signature. This
5333 * allows the creation of custom validation functions. For example:
5334 *
5335 * var MyLink = React.createClass({
5336 * propTypes: {
5337 * // An optional string or URI prop named "href".
5338 * href: function(props, propName, componentName) {
5339 * var propValue = props[propName];
5340 * if (propValue != null && typeof propValue !== 'string' &&
5341 * !(propValue instanceof URI)) {
5342 * return new Error(
5343 * 'Expected a string or an URI for ' + propName + ' in ' +
5344 * componentName
5345 * );
5346 * }
5347 * }
5348 * },
5349 * render: function() {...}
5350 * });
5351 *
5352 * @internal
5353 */
5354
5355 var ANONYMOUS = '<<anonymous>>';
5356
5357 // Important!
5358 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
5359 var ReactPropTypes = {
5360 array: createPrimitiveTypeChecker('array'),
5361 bigint: createPrimitiveTypeChecker('bigint'),
5362 bool: createPrimitiveTypeChecker('boolean'),
5363 func: createPrimitiveTypeChecker('function'),
5364 number: createPrimitiveTypeChecker('number'),
5365 object: createPrimitiveTypeChecker('object'),
5366 string: createPrimitiveTypeChecker('string'),
5367 symbol: createPrimitiveTypeChecker('symbol'),
5368
5369 any: createAnyTypeChecker(),
5370 arrayOf: createArrayOfTypeChecker,
5371 element: createElementTypeChecker(),
5372 elementType: createElementTypeTypeChecker(),
5373 instanceOf: createInstanceTypeChecker,
5374 node: createNodeChecker(),
5375 objectOf: createObjectOfTypeChecker,
5376 oneOf: createEnumTypeChecker,
5377 oneOfType: createUnionTypeChecker,
5378 shape: createShapeTypeChecker,
5379 exact: createStrictShapeTypeChecker,
5380 };
5381
5382 /**
5383 * inlined Object.is polyfill to avoid requiring consumers ship their own
5384 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
5385 */
5386 /*eslint-disable no-self-compare*/
5387 function is(x, y) {
5388 // SameValue algorithm
5389 if (x === y) {
5390 // Steps 1-5, 7-10
5391 // Steps 6.b-6.e: +0 != -0
5392 return x !== 0 || 1 / x === 1 / y;
5393 } else {
5394 // Step 6.a: NaN == NaN
5395 return x !== x && y !== y;
5396 }
5397 }
5398 /*eslint-enable no-self-compare*/
5399
5400 /**
5401 * We use an Error-like object for backward compatibility as people may call
5402 * PropTypes directly and inspect their output. However, we don't use real
5403 * Errors anymore. We don't inspect their stack anyway, and creating them
5404 * is prohibitively expensive if they are created too often, such as what
5405 * happens in oneOfType() for any type before the one that matched.
5406 */
5407 function PropTypeError(message, data) {
5408 this.message = message;
5409 this.data = data && typeof data === 'object' ? data: {};
5410 this.stack = '';
5411 }
5412 // Make `instanceof Error` still work for returned errors.
5413 PropTypeError.prototype = Error.prototype;
5414
5415 function createChainableTypeChecker(validate) {
5416 if (true) {
5417 var manualPropTypeCallCache = {};
5418 var manualPropTypeWarningCount = 0;
5419 }
5420 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
5421 componentName = componentName || ANONYMOUS;
5422 propFullName = propFullName || propName;
5423
5424 if (secret !== ReactPropTypesSecret) {
5425 if (throwOnDirectAccess) {
5426 // New behavior only for users of `prop-types` package
5427 var err = new Error(
5428 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
5429 'Use `PropTypes.checkPropTypes()` to call them. ' +
5430 'Read more at http://fb.me/use-check-prop-types'
5431 );
5432 err.name = 'Invariant Violation';
5433 throw err;
5434 } else if ( true && typeof console !== 'undefined') {
5435 // Old behavior for people using React.PropTypes
5436 var cacheKey = componentName + ':' + propName;
5437 if (
5438 !manualPropTypeCallCache[cacheKey] &&
5439 // Avoid spamming the console because they are often not actionable except for lib authors
5440 manualPropTypeWarningCount < 3
5441 ) {
5442 printWarning(
5443 'You are manually calling a React.PropTypes validation ' +
5444 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
5445 'and will throw in the standalone `prop-types` package. ' +
5446 'You may be seeing this warning due to a third-party PropTypes ' +
5447 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
5448 );
5449 manualPropTypeCallCache[cacheKey] = true;
5450 manualPropTypeWarningCount++;
5451 }
5452 }
5453 }
5454 if (props[propName] == null) {
5455 if (isRequired) {
5456 if (props[propName] === null) {
5457 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
5458 }
5459 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
5460 }
5461 return null;
5462 } else {
5463 return validate(props, propName, componentName, location, propFullName);
5464 }
5465 }
5466
5467 var chainedCheckType = checkType.bind(null, false);
5468 chainedCheckType.isRequired = checkType.bind(null, true);
5469
5470 return chainedCheckType;
5471 }
5472
5473 function createPrimitiveTypeChecker(expectedType) {
5474 function validate(props, propName, componentName, location, propFullName, secret) {
5475 var propValue = props[propName];
5476 var propType = getPropType(propValue);
5477 if (propType !== expectedType) {
5478 // `propValue` being instance of, say, date/regexp, pass the 'object'
5479 // check, but we can offer a more precise error message here rather than
5480 // 'of type `object`'.
5481 var preciseType = getPreciseType(propValue);
5482
5483 return new PropTypeError(
5484 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
5485 {expectedType: expectedType}
5486 );
5487 }
5488 return null;
5489 }
5490 return createChainableTypeChecker(validate);
5491 }
5492
5493 function createAnyTypeChecker() {
5494 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
5495 }
5496
5497 function createArrayOfTypeChecker(typeChecker) {
5498 function validate(props, propName, componentName, location, propFullName) {
5499 if (typeof typeChecker !== 'function') {
5500 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
5501 }
5502 var propValue = props[propName];
5503 if (!Array.isArray(propValue)) {
5504 var propType = getPropType(propValue);
5505 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
5506 }
5507 for (var i = 0; i < propValue.length; i++) {
5508 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
5509 if (error instanceof Error) {
5510 return error;
5511 }
5512 }
5513 return null;
5514 }
5515 return createChainableTypeChecker(validate);
5516 }
5517
5518 function createElementTypeChecker() {
5519 function validate(props, propName, componentName, location, propFullName) {
5520 var propValue = props[propName];
5521 if (!isValidElement(propValue)) {
5522 var propType = getPropType(propValue);
5523 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
5524 }
5525 return null;
5526 }
5527 return createChainableTypeChecker(validate);
5528 }
5529
5530 function createElementTypeTypeChecker() {
5531 function validate(props, propName, componentName, location, propFullName) {
5532 var propValue = props[propName];
5533 if (!ReactIs.isValidElementType(propValue)) {
5534 var propType = getPropType(propValue);
5535 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
5536 }
5537 return null;
5538 }
5539 return createChainableTypeChecker(validate);
5540 }
5541
5542 function createInstanceTypeChecker(expectedClass) {
5543 function validate(props, propName, componentName, location, propFullName) {
5544 if (!(props[propName] instanceof expectedClass)) {
5545 var expectedClassName = expectedClass.name || ANONYMOUS;
5546 var actualClassName = getClassName(props[propName]);
5547 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
5548 }
5549 return null;
5550 }
5551 return createChainableTypeChecker(validate);
5552 }
5553
5554 function createEnumTypeChecker(expectedValues) {
5555 if (!Array.isArray(expectedValues)) {
5556 if (true) {
5557 if (arguments.length > 1) {
5558 printWarning(
5559 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
5560 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
5561 );
5562 } else {
5563 printWarning('Invalid argument supplied to oneOf, expected an array.');
5564 }
5565 }
5566 return emptyFunctionThatReturnsNull;
5567 }
5568
5569 function validate(props, propName, componentName, location, propFullName) {
5570 var propValue = props[propName];
5571 for (var i = 0; i < expectedValues.length; i++) {
5572 if (is(propValue, expectedValues[i])) {
5573 return null;
5574 }
5575 }
5576
5577 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
5578 var type = getPreciseType(value);
5579 if (type === 'symbol') {
5580 return String(value);
5581 }
5582 return value;
5583 });
5584 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
5585 }
5586 return createChainableTypeChecker(validate);
5587 }
5588
5589 function createObjectOfTypeChecker(typeChecker) {
5590 function validate(props, propName, componentName, location, propFullName) {
5591 if (typeof typeChecker !== 'function') {
5592 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
5593 }
5594 var propValue = props[propName];
5595 var propType = getPropType(propValue);
5596 if (propType !== 'object') {
5597 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
5598 }
5599 for (var key in propValue) {
5600 if (has(propValue, key)) {
5601 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5602 if (error instanceof Error) {
5603 return error;
5604 }
5605 }
5606 }
5607 return null;
5608 }
5609 return createChainableTypeChecker(validate);
5610 }
5611
5612 function createUnionTypeChecker(arrayOfTypeCheckers) {
5613 if (!Array.isArray(arrayOfTypeCheckers)) {
5614 true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
5615 return emptyFunctionThatReturnsNull;
5616 }
5617
5618 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5619 var checker = arrayOfTypeCheckers[i];
5620 if (typeof checker !== 'function') {
5621 printWarning(
5622 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
5623 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
5624 );
5625 return emptyFunctionThatReturnsNull;
5626 }
5627 }
5628
5629 function validate(props, propName, componentName, location, propFullName) {
5630 var expectedTypes = [];
5631 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5632 var checker = arrayOfTypeCheckers[i];
5633 var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
5634 if (checkerResult == null) {
5635 return null;
5636 }
5637 if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
5638 expectedTypes.push(checkerResult.data.expectedType);
5639 }
5640 }
5641 var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
5642 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
5643 }
5644 return createChainableTypeChecker(validate);
5645 }
5646
5647 function createNodeChecker() {
5648 function validate(props, propName, componentName, location, propFullName) {
5649 if (!isNode(props[propName])) {
5650 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
5651 }
5652 return null;
5653 }
5654 return createChainableTypeChecker(validate);
5655 }
5656
5657 function invalidValidatorError(componentName, location, propFullName, key, type) {
5658 return new PropTypeError(
5659 (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
5660 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
5661 );
5662 }
5663
5664 function createShapeTypeChecker(shapeTypes) {
5665 function validate(props, propName, componentName, location, propFullName) {
5666 var propValue = props[propName];
5667 var propType = getPropType(propValue);
5668 if (propType !== 'object') {
5669 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5670 }
5671 for (var key in shapeTypes) {
5672 var checker = shapeTypes[key];
5673 if (typeof checker !== 'function') {
5674 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
5675 }
5676 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5677 if (error) {
5678 return error;
5679 }
5680 }
5681 return null;
5682 }
5683 return createChainableTypeChecker(validate);
5684 }
5685
5686 function createStrictShapeTypeChecker(shapeTypes) {
5687 function validate(props, propName, componentName, location, propFullName) {
5688 var propValue = props[propName];
5689 var propType = getPropType(propValue);
5690 if (propType !== 'object') {
5691 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5692 }
5693 // We need to check all keys in case some are required but missing from props.
5694 var allKeys = assign({}, props[propName], shapeTypes);
5695 for (var key in allKeys) {
5696 var checker = shapeTypes[key];
5697 if (has(shapeTypes, key) && typeof checker !== 'function') {
5698 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
5699 }
5700 if (!checker) {
5701 return new PropTypeError(
5702 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
5703 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
5704 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
5705 );
5706 }
5707 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5708 if (error) {
5709 return error;
5710 }
5711 }
5712 return null;
5713 }
5714
5715 return createChainableTypeChecker(validate);
5716 }
5717
5718 function isNode(propValue) {
5719 switch (typeof propValue) {
5720 case 'number':
5721 case 'string':
5722 case 'undefined':
5723 return true;
5724 case 'boolean':
5725 return !propValue;
5726 case 'object':
5727 if (Array.isArray(propValue)) {
5728 return propValue.every(isNode);
5729 }
5730 if (propValue === null || isValidElement(propValue)) {
5731 return true;
5732 }
5733
5734 var iteratorFn = getIteratorFn(propValue);
5735 if (iteratorFn) {
5736 var iterator = iteratorFn.call(propValue);
5737 var step;
5738 if (iteratorFn !== propValue.entries) {
5739 while (!(step = iterator.next()).done) {
5740 if (!isNode(step.value)) {
5741 return false;
5742 }
5743 }
5744 } else {
5745 // Iterator will provide entry [k,v] tuples rather than values.
5746 while (!(step = iterator.next()).done) {
5747 var entry = step.value;
5748 if (entry) {
5749 if (!isNode(entry[1])) {
5750 return false;
5751 }
5752 }
5753 }
5754 }
5755 } else {
5756 return false;
5757 }
5758
5759 return true;
5760 default:
5761 return false;
5762 }
5763 }
5764
5765 function isSymbol(propType, propValue) {
5766 // Native Symbol.
5767 if (propType === 'symbol') {
5768 return true;
5769 }
5770
5771 // falsy value can't be a Symbol
5772 if (!propValue) {
5773 return false;
5774 }
5775
5776 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
5777 if (propValue['@@toStringTag'] === 'Symbol') {
5778 return true;
5779 }
5780
5781 // Fallback for non-spec compliant Symbols which are polyfilled.
5782 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
5783 return true;
5784 }
5785
5786 return false;
5787 }
5788
5789 // Equivalent of `typeof` but with special handling for array and regexp.
5790 function getPropType(propValue) {
5791 var propType = typeof propValue;
5792 if (Array.isArray(propValue)) {
5793 return 'array';
5794 }
5795 if (propValue instanceof RegExp) {
5796 // Old webkits (at least until Android 4.0) return 'function' rather than
5797 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
5798 // passes PropTypes.object.
5799 return 'object';
5800 }
5801 if (isSymbol(propType, propValue)) {
5802 return 'symbol';
5803 }
5804 return propType;
5805 }
5806
5807 // This handles more types than `getPropType`. Only used for error messages.
5808 // See `createPrimitiveTypeChecker`.
5809 function getPreciseType(propValue) {
5810 if (typeof propValue === 'undefined' || propValue === null) {
5811 return '' + propValue;
5812 }
5813 var propType = getPropType(propValue);
5814 if (propType === 'object') {
5815 if (propValue instanceof Date) {
5816 return 'date';
5817 } else if (propValue instanceof RegExp) {
5818 return 'regexp';
5819 }
5820 }
5821 return propType;
5822 }
5823
5824 // Returns a string that is postfixed to a warning about an invalid type.
5825 // For example, "undefined" or "of type array"
5826 function getPostfixForTypeWarning(value) {
5827 var type = getPreciseType(value);
5828 switch (type) {
5829 case 'array':
5830 case 'object':
5831 return 'an ' + type;
5832 case 'boolean':
5833 case 'date':
5834 case 'regexp':
5835 return 'a ' + type;
5836 default:
5837 return type;
5838 }
5839 }
5840
5841 // Returns class name of the object, if any.
5842 function getClassName(propValue) {
5843 if (!propValue.constructor || !propValue.constructor.name) {
5844 return ANONYMOUS;
5845 }
5846 return propValue.constructor.name;
5847 }
5848
5849 ReactPropTypes.checkPropTypes = checkPropTypes;
5850 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
5851 ReactPropTypes.PropTypes = ReactPropTypes;
5852
5853 return ReactPropTypes;
5854 };
5855
5856
5857 /***/ }),
5858
5859 /***/ "./node_modules/prop-types/index.js":
5860 /*!******************************************!*\
5861 !*** ./node_modules/prop-types/index.js ***!
5862 \******************************************/
5863 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5864
5865 /**
5866 * Copyright (c) 2013-present, Facebook, Inc.
5867 *
5868 * This source code is licensed under the MIT license found in the
5869 * LICENSE file in the root directory of this source tree.
5870 */
5871
5872 if (true) {
5873 var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
5874
5875 // By explicitly using `prop-types` you are opting into new development behavior.
5876 // http://fb.me/prop-types-in-prod
5877 var throwOnDirectAccess = true;
5878 module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
5879 } else {}
5880
5881
5882 /***/ }),
5883
5884 /***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
5885 /*!*************************************************************!*\
5886 !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
5887 \*************************************************************/
5888 /***/ ((module) => {
5889
5890 "use strict";
5891 /**
5892 * Copyright (c) 2013-present, Facebook, Inc.
5893 *
5894 * This source code is licensed under the MIT license found in the
5895 * LICENSE file in the root directory of this source tree.
5896 */
5897
5898
5899
5900 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
5901
5902 module.exports = ReactPropTypesSecret;
5903
5904
5905 /***/ }),
5906
5907 /***/ "./node_modules/prop-types/lib/has.js":
5908 /*!********************************************!*\
5909 !*** ./node_modules/prop-types/lib/has.js ***!
5910 \********************************************/
5911 /***/ ((module) => {
5912
5913 module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
5914
5915
5916 /***/ }),
5917
5918 /***/ "./node_modules/raven-js/src/configError.js":
5919 /*!**************************************************!*\
5920 !*** ./node_modules/raven-js/src/configError.js ***!
5921 \**************************************************/
5922 /***/ ((module) => {
5923
5924 function RavenConfigError(message) {
5925 this.name = 'RavenConfigError';
5926 this.message = message;
5927 }
5928 RavenConfigError.prototype = new Error();
5929 RavenConfigError.prototype.constructor = RavenConfigError;
5930
5931 module.exports = RavenConfigError;
5932
5933
5934 /***/ }),
5935
5936 /***/ "./node_modules/raven-js/src/console.js":
5937 /*!**********************************************!*\
5938 !*** ./node_modules/raven-js/src/console.js ***!
5939 \**********************************************/
5940 /***/ ((module) => {
5941
5942 var wrapMethod = function(console, level, callback) {
5943 var originalConsoleLevel = console[level];
5944 var originalConsole = console;
5945
5946 if (!(level in console)) {
5947 return;
5948 }
5949
5950 var sentryLevel = level === 'warn' ? 'warning' : level;
5951
5952 console[level] = function() {
5953 var args = [].slice.call(arguments);
5954
5955 var msg = '' + args.join(' ');
5956 var data = {level: sentryLevel, logger: 'console', extra: {arguments: args}};
5957
5958 if (level === 'assert') {
5959 if (args[0] === false) {
5960 // Default browsers message
5961 msg = 'Assertion failed: ' + (args.slice(1).join(' ') || 'console.assert');
5962 data.extra.arguments = args.slice(1);
5963 callback && callback(msg, data);
5964 }
5965 } else {
5966 callback && callback(msg, data);
5967 }
5968
5969 // this fails for some browsers. :(
5970 if (originalConsoleLevel) {
5971 // IE9 doesn't allow calling apply on console functions directly
5972 // See: https://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function#answer-5473193
5973 Function.prototype.apply.call(originalConsoleLevel, originalConsole, args);
5974 }
5975 };
5976 };
5977
5978 module.exports = {
5979 wrapMethod: wrapMethod
5980 };
5981
5982
5983 /***/ }),
5984
5985 /***/ "./node_modules/raven-js/src/raven.js":
5986 /*!********************************************!*\
5987 !*** ./node_modules/raven-js/src/raven.js ***!
5988 \********************************************/
5989 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5990
5991 /*global XDomainRequest:false */
5992
5993 var TraceKit = __webpack_require__(/*! ../vendor/TraceKit/tracekit */ "./node_modules/raven-js/vendor/TraceKit/tracekit.js");
5994 var stringify = __webpack_require__(/*! ../vendor/json-stringify-safe/stringify */ "./node_modules/raven-js/vendor/json-stringify-safe/stringify.js");
5995 var RavenConfigError = __webpack_require__(/*! ./configError */ "./node_modules/raven-js/src/configError.js");
5996
5997 var utils = __webpack_require__(/*! ./utils */ "./node_modules/raven-js/src/utils.js");
5998 var isError = utils.isError;
5999 var isObject = utils.isObject;
6000 var isObject = utils.isObject;
6001 var isErrorEvent = utils.isErrorEvent;
6002 var isUndefined = utils.isUndefined;
6003 var isFunction = utils.isFunction;
6004 var isString = utils.isString;
6005 var isEmptyObject = utils.isEmptyObject;
6006 var each = utils.each;
6007 var objectMerge = utils.objectMerge;
6008 var truncate = utils.truncate;
6009 var objectFrozen = utils.objectFrozen;
6010 var hasKey = utils.hasKey;
6011 var joinRegExp = utils.joinRegExp;
6012 var urlencode = utils.urlencode;
6013 var uuid4 = utils.uuid4;
6014 var htmlTreeAsString = utils.htmlTreeAsString;
6015 var isSameException = utils.isSameException;
6016 var isSameStacktrace = utils.isSameStacktrace;
6017 var parseUrl = utils.parseUrl;
6018 var fill = utils.fill;
6019
6020 var wrapConsoleMethod = (__webpack_require__(/*! ./console */ "./node_modules/raven-js/src/console.js").wrapMethod);
6021
6022 var dsnKeys = 'source protocol user pass host port path'.split(' '),
6023 dsnPattern = /^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;
6024
6025 function now() {
6026 return +new Date();
6027 }
6028
6029 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
6030 var _window =
6031 typeof window !== 'undefined'
6032 ? window
6033 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
6034 var _document = _window.document;
6035 var _navigator = _window.navigator;
6036
6037 function keepOriginalCallback(original, callback) {
6038 return isFunction(callback)
6039 ? function(data) {
6040 return callback(data, original);
6041 }
6042 : callback;
6043 }
6044
6045 // First, check for JSON support
6046 // If there is no JSON, we no-op the core features of Raven
6047 // since JSON is required to encode the payload
6048 function Raven() {
6049 this._hasJSON = !!(typeof JSON === 'object' && JSON.stringify);
6050 // Raven can run in contexts where there's no document (react-native)
6051 this._hasDocument = !isUndefined(_document);
6052 this._hasNavigator = !isUndefined(_navigator);
6053 this._lastCapturedException = null;
6054 this._lastData = null;
6055 this._lastEventId = null;
6056 this._globalServer = null;
6057 this._globalKey = null;
6058 this._globalProject = null;
6059 this._globalContext = {};
6060 this._globalOptions = {
6061 logger: 'javascript',
6062 ignoreErrors: [],
6063 ignoreUrls: [],
6064 whitelistUrls: [],
6065 includePaths: [],
6066 collectWindowErrors: true,
6067 maxMessageLength: 0,
6068
6069 // By default, truncates URL values to 250 chars
6070 maxUrlLength: 250,
6071 stackTraceLimit: 50,
6072 autoBreadcrumbs: true,
6073 instrument: true,
6074 sampleRate: 1
6075 };
6076 this._ignoreOnError = 0;
6077 this._isRavenInstalled = false;
6078 this._originalErrorStackTraceLimit = Error.stackTraceLimit;
6079 // capture references to window.console *and* all its methods first
6080 // before the console plugin has a chance to monkey patch
6081 this._originalConsole = _window.console || {};
6082 this._originalConsoleMethods = {};
6083 this._plugins = [];
6084 this._startTime = now();
6085 this._wrappedBuiltIns = [];
6086 this._breadcrumbs = [];
6087 this._lastCapturedEvent = null;
6088 this._keypressTimeout;
6089 this._location = _window.location;
6090 this._lastHref = this._location && this._location.href;
6091 this._resetBackoff();
6092
6093 // eslint-disable-next-line guard-for-in
6094 for (var method in this._originalConsole) {
6095 this._originalConsoleMethods[method] = this._originalConsole[method];
6096 }
6097 }
6098
6099 /*
6100 * The core Raven singleton
6101 *
6102 * @this {Raven}
6103 */
6104
6105 Raven.prototype = {
6106 // Hardcode version string so that raven source can be loaded directly via
6107 // webpack (using a build step causes webpack #1617). Grunt verifies that
6108 // this value matches package.json during build.
6109 // See: https://github.com/getsentry/raven-js/issues/465
6110 VERSION: '3.19.1',
6111
6112 debug: false,
6113
6114 TraceKit: TraceKit, // alias to TraceKit
6115
6116 /*
6117 * Configure Raven with a DSN and extra options
6118 *
6119 * @param {string} dsn The public Sentry DSN
6120 * @param {object} options Set of global options [optional]
6121 * @return {Raven}
6122 */
6123 config: function(dsn, options) {
6124 var self = this;
6125
6126 if (self._globalServer) {
6127 this._logDebug('error', 'Error: Raven has already been configured');
6128 return self;
6129 }
6130 if (!dsn) return self;
6131
6132 var globalOptions = self._globalOptions;
6133
6134 // merge in options
6135 if (options) {
6136 each(options, function(key, value) {
6137 // tags and extra are special and need to be put into context
6138 if (key === 'tags' || key === 'extra' || key === 'user') {
6139 self._globalContext[key] = value;
6140 } else {
6141 globalOptions[key] = value;
6142 }
6143 });
6144 }
6145
6146 self.setDSN(dsn);
6147
6148 // "Script error." is hard coded into browsers for errors that it can't read.
6149 // this is the result of a script being pulled in from an external domain and CORS.
6150 globalOptions.ignoreErrors.push(/^Script error\.?$/);
6151 globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/);
6152
6153 // join regexp rules into one big rule
6154 globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors);
6155 globalOptions.ignoreUrls = globalOptions.ignoreUrls.length
6156 ? joinRegExp(globalOptions.ignoreUrls)
6157 : false;
6158 globalOptions.whitelistUrls = globalOptions.whitelistUrls.length
6159 ? joinRegExp(globalOptions.whitelistUrls)
6160 : false;
6161 globalOptions.includePaths = joinRegExp(globalOptions.includePaths);
6162 globalOptions.maxBreadcrumbs = Math.max(
6163 0,
6164 Math.min(globalOptions.maxBreadcrumbs || 100, 100)
6165 ); // default and hard limit is 100
6166
6167 var autoBreadcrumbDefaults = {
6168 xhr: true,
6169 console: true,
6170 dom: true,
6171 location: true
6172 };
6173
6174 var autoBreadcrumbs = globalOptions.autoBreadcrumbs;
6175 if ({}.toString.call(autoBreadcrumbs) === '[object Object]') {
6176 autoBreadcrumbs = objectMerge(autoBreadcrumbDefaults, autoBreadcrumbs);
6177 } else if (autoBreadcrumbs !== false) {
6178 autoBreadcrumbs = autoBreadcrumbDefaults;
6179 }
6180 globalOptions.autoBreadcrumbs = autoBreadcrumbs;
6181
6182 var instrumentDefaults = {
6183 tryCatch: true
6184 };
6185
6186 var instrument = globalOptions.instrument;
6187 if ({}.toString.call(instrument) === '[object Object]') {
6188 instrument = objectMerge(instrumentDefaults, instrument);
6189 } else if (instrument !== false) {
6190 instrument = instrumentDefaults;
6191 }
6192 globalOptions.instrument = instrument;
6193
6194 TraceKit.collectWindowErrors = !!globalOptions.collectWindowErrors;
6195
6196 // return for chaining
6197 return self;
6198 },
6199
6200 /*
6201 * Installs a global window.onerror error handler
6202 * to capture and report uncaught exceptions.
6203 * At this point, install() is required to be called due
6204 * to the way TraceKit is set up.
6205 *
6206 * @return {Raven}
6207 */
6208 install: function() {
6209 var self = this;
6210 if (self.isSetup() && !self._isRavenInstalled) {
6211 TraceKit.report.subscribe(function() {
6212 self._handleOnErrorStackInfo.apply(self, arguments);
6213 });
6214 if (self._globalOptions.instrument && self._globalOptions.instrument.tryCatch) {
6215 self._instrumentTryCatch();
6216 }
6217
6218 if (self._globalOptions.autoBreadcrumbs) self._instrumentBreadcrumbs();
6219
6220 // Install all of the plugins
6221 self._drainPlugins();
6222
6223 self._isRavenInstalled = true;
6224 }
6225
6226 Error.stackTraceLimit = self._globalOptions.stackTraceLimit;
6227 return this;
6228 },
6229
6230 /*
6231 * Set the DSN (can be called multiple time unlike config)
6232 *
6233 * @param {string} dsn The public Sentry DSN
6234 */
6235 setDSN: function(dsn) {
6236 var self = this,
6237 uri = self._parseDSN(dsn),
6238 lastSlash = uri.path.lastIndexOf('/'),
6239 path = uri.path.substr(1, lastSlash);
6240
6241 self._dsn = dsn;
6242 self._globalKey = uri.user;
6243 self._globalSecret = uri.pass && uri.pass.substr(1);
6244 self._globalProject = uri.path.substr(lastSlash + 1);
6245
6246 self._globalServer = self._getGlobalServer(uri);
6247
6248 self._globalEndpoint =
6249 self._globalServer + '/' + path + 'api/' + self._globalProject + '/store/';
6250
6251 // Reset backoff state since we may be pointing at a
6252 // new project/server
6253 this._resetBackoff();
6254 },
6255
6256 /*
6257 * Wrap code within a context so Raven can capture errors
6258 * reliably across domains that is executed immediately.
6259 *
6260 * @param {object} options A specific set of options for this context [optional]
6261 * @param {function} func The callback to be immediately executed within the context
6262 * @param {array} args An array of arguments to be called with the callback [optional]
6263 */
6264 context: function(options, func, args) {
6265 if (isFunction(options)) {
6266 args = func || [];
6267 func = options;
6268 options = undefined;
6269 }
6270
6271 return this.wrap(options, func).apply(this, args);
6272 },
6273
6274 /*
6275 * Wrap code within a context and returns back a new function to be executed
6276 *
6277 * @param {object} options A specific set of options for this context [optional]
6278 * @param {function} func The function to be wrapped in a new context
6279 * @param {function} func A function to call before the try/catch wrapper [optional, private]
6280 * @return {function} The newly wrapped functions with a context
6281 */
6282 wrap: function(options, func, _before) {
6283 var self = this;
6284 // 1 argument has been passed, and it's not a function
6285 // so just return it
6286 if (isUndefined(func) && !isFunction(options)) {
6287 return options;
6288 }
6289
6290 // options is optional
6291 if (isFunction(options)) {
6292 func = options;
6293 options = undefined;
6294 }
6295
6296 // At this point, we've passed along 2 arguments, and the second one
6297 // is not a function either, so we'll just return the second argument.
6298 if (!isFunction(func)) {
6299 return func;
6300 }
6301
6302 // We don't wanna wrap it twice!
6303 try {
6304 if (func.__raven__) {
6305 return func;
6306 }
6307
6308 // If this has already been wrapped in the past, return that
6309 if (func.__raven_wrapper__) {
6310 return func.__raven_wrapper__;
6311 }
6312 } catch (e) {
6313 // Just accessing custom props in some Selenium environments
6314 // can cause a "Permission denied" exception (see raven-js#495).
6315 // Bail on wrapping and return the function as-is (defers to window.onerror).
6316 return func;
6317 }
6318
6319 function wrapped() {
6320 var args = [],
6321 i = arguments.length,
6322 deep = !options || (options && options.deep !== false);
6323
6324 if (_before && isFunction(_before)) {
6325 _before.apply(this, arguments);
6326 }
6327
6328 // Recursively wrap all of a function's arguments that are
6329 // functions themselves.
6330 while (i--) args[i] = deep ? self.wrap(options, arguments[i]) : arguments[i];
6331
6332 try {
6333 // Attempt to invoke user-land function
6334 // NOTE: If you are a Sentry user, and you are seeing this stack frame, it
6335 // means Raven caught an error invoking your application code. This is
6336 // expected behavior and NOT indicative of a bug with Raven.js.
6337 return func.apply(this, args);
6338 } catch (e) {
6339 self._ignoreNextOnError();
6340 self.captureException(e, options);
6341 throw e;
6342 }
6343 }
6344
6345 // copy over properties of the old function
6346 for (var property in func) {
6347 if (hasKey(func, property)) {
6348 wrapped[property] = func[property];
6349 }
6350 }
6351 wrapped.prototype = func.prototype;
6352
6353 func.__raven_wrapper__ = wrapped;
6354 // Signal that this function has been wrapped already
6355 // for both debugging and to prevent it to being wrapped twice
6356 wrapped.__raven__ = true;
6357 wrapped.__inner__ = func;
6358
6359 return wrapped;
6360 },
6361
6362 /*
6363 * Uninstalls the global error handler.
6364 *
6365 * @return {Raven}
6366 */
6367 uninstall: function() {
6368 TraceKit.report.uninstall();
6369
6370 this._restoreBuiltIns();
6371
6372 Error.stackTraceLimit = this._originalErrorStackTraceLimit;
6373 this._isRavenInstalled = false;
6374
6375 return this;
6376 },
6377
6378 /*
6379 * Manually capture an exception and send it over to Sentry
6380 *
6381 * @param {error} ex An exception to be logged
6382 * @param {object} options A specific set of options for this error [optional]
6383 * @return {Raven}
6384 */
6385 captureException: function(ex, options) {
6386 // Cases for sending ex as a message, rather than an exception
6387 var isNotError = !isError(ex);
6388 var isNotErrorEvent = !isErrorEvent(ex);
6389 var isErrorEventWithoutError = isErrorEvent(ex) && !ex.error;
6390
6391 if ((isNotError && isNotErrorEvent) || isErrorEventWithoutError) {
6392 return this.captureMessage(
6393 ex,
6394 objectMerge(
6395 {
6396 trimHeadFrames: 1,
6397 stacktrace: true // if we fall back to captureMessage, default to attempting a new trace
6398 },
6399 options
6400 )
6401 );
6402 }
6403
6404 // Get actual Error from ErrorEvent
6405 if (isErrorEvent(ex)) ex = ex.error;
6406
6407 // Store the raw exception object for potential debugging and introspection
6408 this._lastCapturedException = ex;
6409
6410 // TraceKit.report will re-raise any exception passed to it,
6411 // which means you have to wrap it in try/catch. Instead, we
6412 // can wrap it here and only re-raise if TraceKit.report
6413 // raises an exception different from the one we asked to
6414 // report on.
6415 try {
6416 var stack = TraceKit.computeStackTrace(ex);
6417 this._handleStackInfo(stack, options);
6418 } catch (ex1) {
6419 if (ex !== ex1) {
6420 throw ex1;
6421 }
6422 }
6423
6424 return this;
6425 },
6426
6427 /*
6428 * Manually send a message to Sentry
6429 *
6430 * @param {string} msg A plain message to be captured in Sentry
6431 * @param {object} options A specific set of options for this message [optional]
6432 * @return {Raven}
6433 */
6434 captureMessage: function(msg, options) {
6435 // config() automagically converts ignoreErrors from a list to a RegExp so we need to test for an
6436 // early call; we'll error on the side of logging anything called before configuration since it's
6437 // probably something you should see:
6438 if (
6439 !!this._globalOptions.ignoreErrors.test &&
6440 this._globalOptions.ignoreErrors.test(msg)
6441 ) {
6442 return;
6443 }
6444
6445 options = options || {};
6446
6447 var data = objectMerge(
6448 {
6449 message: msg + '' // Make sure it's actually a string
6450 },
6451 options
6452 );
6453
6454 var ex;
6455 // Generate a "synthetic" stack trace from this point.
6456 // NOTE: If you are a Sentry user, and you are seeing this stack frame, it is NOT indicative
6457 // of a bug with Raven.js. Sentry generates synthetic traces either by configuration,
6458 // or if it catches a thrown object without a "stack" property.
6459 try {
6460 throw new Error(msg);
6461 } catch (ex1) {
6462 ex = ex1;
6463 }
6464
6465 // null exception name so `Error` isn't prefixed to msg
6466 ex.name = null;
6467 var stack = TraceKit.computeStackTrace(ex);
6468
6469 // stack[0] is `throw new Error(msg)` call itself, we are interested in the frame that was just before that, stack[1]
6470 var initialCall = stack.stack[1];
6471
6472 var fileurl = (initialCall && initialCall.url) || '';
6473
6474 if (
6475 !!this._globalOptions.ignoreUrls.test &&
6476 this._globalOptions.ignoreUrls.test(fileurl)
6477 ) {
6478 return;
6479 }
6480
6481 if (
6482 !!this._globalOptions.whitelistUrls.test &&
6483 !this._globalOptions.whitelistUrls.test(fileurl)
6484 ) {
6485 return;
6486 }
6487
6488 if (this._globalOptions.stacktrace || (options && options.stacktrace)) {
6489 options = objectMerge(
6490 {
6491 // fingerprint on msg, not stack trace (legacy behavior, could be
6492 // revisited)
6493 fingerprint: msg,
6494 // since we know this is a synthetic trace, the top N-most frames
6495 // MUST be from Raven.js, so mark them as in_app later by setting
6496 // trimHeadFrames
6497 trimHeadFrames: (options.trimHeadFrames || 0) + 1
6498 },
6499 options
6500 );
6501
6502 var frames = this._prepareFrames(stack, options);
6503 data.stacktrace = {
6504 // Sentry expects frames oldest to newest
6505 frames: frames.reverse()
6506 };
6507 }
6508
6509 // Fire away!
6510 this._send(data);
6511
6512 return this;
6513 },
6514
6515 captureBreadcrumb: function(obj) {
6516 var crumb = objectMerge(
6517 {
6518 timestamp: now() / 1000
6519 },
6520 obj
6521 );
6522
6523 if (isFunction(this._globalOptions.breadcrumbCallback)) {
6524 var result = this._globalOptions.breadcrumbCallback(crumb);
6525
6526 if (isObject(result) && !isEmptyObject(result)) {
6527 crumb = result;
6528 } else if (result === false) {
6529 return this;
6530 }
6531 }
6532
6533 this._breadcrumbs.push(crumb);
6534 if (this._breadcrumbs.length > this._globalOptions.maxBreadcrumbs) {
6535 this._breadcrumbs.shift();
6536 }
6537 return this;
6538 },
6539
6540 addPlugin: function(plugin /*arg1, arg2, ... argN*/) {
6541 var pluginArgs = [].slice.call(arguments, 1);
6542
6543 this._plugins.push([plugin, pluginArgs]);
6544 if (this._isRavenInstalled) {
6545 this._drainPlugins();
6546 }
6547
6548 return this;
6549 },
6550
6551 /*
6552 * Set/clear a user to be sent along with the payload.
6553 *
6554 * @param {object} user An object representing user data [optional]
6555 * @return {Raven}
6556 */
6557 setUserContext: function(user) {
6558 // Intentionally do not merge here since that's an unexpected behavior.
6559 this._globalContext.user = user;
6560
6561 return this;
6562 },
6563
6564 /*
6565 * Merge extra attributes to be sent along with the payload.
6566 *
6567 * @param {object} extra An object representing extra data [optional]
6568 * @return {Raven}
6569 */
6570 setExtraContext: function(extra) {
6571 this._mergeContext('extra', extra);
6572
6573 return this;
6574 },
6575
6576 /*
6577 * Merge tags to be sent along with the payload.
6578 *
6579 * @param {object} tags An object representing tags [optional]
6580 * @return {Raven}
6581 */
6582 setTagsContext: function(tags) {
6583 this._mergeContext('tags', tags);
6584
6585 return this;
6586 },
6587
6588 /*
6589 * Clear all of the context.
6590 *
6591 * @return {Raven}
6592 */
6593 clearContext: function() {
6594 this._globalContext = {};
6595
6596 return this;
6597 },
6598
6599 /*
6600 * Get a copy of the current context. This cannot be mutated.
6601 *
6602 * @return {object} copy of context
6603 */
6604 getContext: function() {
6605 // lol javascript
6606 return JSON.parse(stringify(this._globalContext));
6607 },
6608
6609 /*
6610 * Set environment of application
6611 *
6612 * @param {string} environment Typically something like 'production'.
6613 * @return {Raven}
6614 */
6615 setEnvironment: function(environment) {
6616 this._globalOptions.environment = environment;
6617
6618 return this;
6619 },
6620
6621 /*
6622 * Set release version of application
6623 *
6624 * @param {string} release Typically something like a git SHA to identify version
6625 * @return {Raven}
6626 */
6627 setRelease: function(release) {
6628 this._globalOptions.release = release;
6629
6630 return this;
6631 },
6632
6633 /*
6634 * Set the dataCallback option
6635 *
6636 * @param {function} callback The callback to run which allows the
6637 * data blob to be mutated before sending
6638 * @return {Raven}
6639 */
6640 setDataCallback: function(callback) {
6641 var original = this._globalOptions.dataCallback;
6642 this._globalOptions.dataCallback = keepOriginalCallback(original, callback);
6643 return this;
6644 },
6645
6646 /*
6647 * Set the breadcrumbCallback option
6648 *
6649 * @param {function} callback The callback to run which allows filtering
6650 * or mutating breadcrumbs
6651 * @return {Raven}
6652 */
6653 setBreadcrumbCallback: function(callback) {
6654 var original = this._globalOptions.breadcrumbCallback;
6655 this._globalOptions.breadcrumbCallback = keepOriginalCallback(original, callback);
6656 return this;
6657 },
6658
6659 /*
6660 * Set the shouldSendCallback option
6661 *
6662 * @param {function} callback The callback to run which allows
6663 * introspecting the blob before sending
6664 * @return {Raven}
6665 */
6666 setShouldSendCallback: function(callback) {
6667 var original = this._globalOptions.shouldSendCallback;
6668 this._globalOptions.shouldSendCallback = keepOriginalCallback(original, callback);
6669 return this;
6670 },
6671
6672 /**
6673 * Override the default HTTP transport mechanism that transmits data
6674 * to the Sentry server.
6675 *
6676 * @param {function} transport Function invoked instead of the default
6677 * `makeRequest` handler.
6678 *
6679 * @return {Raven}
6680 */
6681 setTransport: function(transport) {
6682 this._globalOptions.transport = transport;
6683
6684 return this;
6685 },
6686
6687 /*
6688 * Get the latest raw exception that was captured by Raven.
6689 *
6690 * @return {error}
6691 */
6692 lastException: function() {
6693 return this._lastCapturedException;
6694 },
6695
6696 /*
6697 * Get the last event id
6698 *
6699 * @return {string}
6700 */
6701 lastEventId: function() {
6702 return this._lastEventId;
6703 },
6704
6705 /*
6706 * Determine if Raven is setup and ready to go.
6707 *
6708 * @return {boolean}
6709 */
6710 isSetup: function() {
6711 if (!this._hasJSON) return false; // needs JSON support
6712 if (!this._globalServer) {
6713 if (!this.ravenNotConfiguredError) {
6714 this.ravenNotConfiguredError = true;
6715 this._logDebug('error', 'Error: Raven has not been configured.');
6716 }
6717 return false;
6718 }
6719 return true;
6720 },
6721
6722 afterLoad: function() {
6723 // TODO: remove window dependence?
6724
6725 // Attempt to initialize Raven on load
6726 var RavenConfig = _window.RavenConfig;
6727 if (RavenConfig) {
6728 this.config(RavenConfig.dsn, RavenConfig.config).install();
6729 }
6730 },
6731
6732 showReportDialog: function(options) {
6733 if (
6734 !_document // doesn't work without a document (React native)
6735 )
6736 return;
6737
6738 options = options || {};
6739
6740 var lastEventId = options.eventId || this.lastEventId();
6741 if (!lastEventId) {
6742 throw new RavenConfigError('Missing eventId');
6743 }
6744
6745 var dsn = options.dsn || this._dsn;
6746 if (!dsn) {
6747 throw new RavenConfigError('Missing DSN');
6748 }
6749
6750 var encode = encodeURIComponent;
6751 var qs = '';
6752 qs += '?eventId=' + encode(lastEventId);
6753 qs += '&dsn=' + encode(dsn);
6754
6755 var user = options.user || this._globalContext.user;
6756 if (user) {
6757 if (user.name) qs += '&name=' + encode(user.name);
6758 if (user.email) qs += '&email=' + encode(user.email);
6759 }
6760
6761 var globalServer = this._getGlobalServer(this._parseDSN(dsn));
6762
6763 var script = _document.createElement('script');
6764 script.async = true;
6765 script.src = globalServer + '/api/embed/error-page/' + qs;
6766 (_document.head || _document.body).appendChild(script);
6767 },
6768
6769 /**** Private functions ****/
6770 _ignoreNextOnError: function() {
6771 var self = this;
6772 this._ignoreOnError += 1;
6773 setTimeout(function() {
6774 // onerror should trigger before setTimeout
6775 self._ignoreOnError -= 1;
6776 });
6777 },
6778
6779 _triggerEvent: function(eventType, options) {
6780 // NOTE: `event` is a native browser thing, so let's avoid conflicting wiht it
6781 var evt, key;
6782
6783 if (!this._hasDocument) return;
6784
6785 options = options || {};
6786
6787 eventType = 'raven' + eventType.substr(0, 1).toUpperCase() + eventType.substr(1);
6788
6789 if (_document.createEvent) {
6790 evt = _document.createEvent('HTMLEvents');
6791 evt.initEvent(eventType, true, true);
6792 } else {
6793 evt = _document.createEventObject();
6794 evt.eventType = eventType;
6795 }
6796
6797 for (key in options)
6798 if (hasKey(options, key)) {
6799 evt[key] = options[key];
6800 }
6801
6802 if (_document.createEvent) {
6803 // IE9 if standards
6804 _document.dispatchEvent(evt);
6805 } else {
6806 // IE8 regardless of Quirks or Standards
6807 // IE9 if quirks
6808 try {
6809 _document.fireEvent('on' + evt.eventType.toLowerCase(), evt);
6810 } catch (e) {
6811 // Do nothing
6812 }
6813 }
6814 },
6815
6816 /**
6817 * Wraps addEventListener to capture UI breadcrumbs
6818 * @param evtName the event name (e.g. "click")
6819 * @returns {Function}
6820 * @private
6821 */
6822 _breadcrumbEventHandler: function(evtName) {
6823 var self = this;
6824 return function(evt) {
6825 // reset keypress timeout; e.g. triggering a 'click' after
6826 // a 'keypress' will reset the keypress debounce so that a new
6827 // set of keypresses can be recorded
6828 self._keypressTimeout = null;
6829
6830 // It's possible this handler might trigger multiple times for the same
6831 // event (e.g. event propagation through node ancestors). Ignore if we've
6832 // already captured the event.
6833 if (self._lastCapturedEvent === evt) return;
6834
6835 self._lastCapturedEvent = evt;
6836
6837 // try/catch both:
6838 // - accessing evt.target (see getsentry/raven-js#838, #768)
6839 // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly
6840 // can throw an exception in some circumstances.
6841 var target;
6842 try {
6843 target = htmlTreeAsString(evt.target);
6844 } catch (e) {
6845 target = '<unknown>';
6846 }
6847
6848 self.captureBreadcrumb({
6849 category: 'ui.' + evtName, // e.g. ui.click, ui.input
6850 message: target
6851 });
6852 };
6853 },
6854
6855 /**
6856 * Wraps addEventListener to capture keypress UI events
6857 * @returns {Function}
6858 * @private
6859 */
6860 _keypressEventHandler: function() {
6861 var self = this,
6862 debounceDuration = 1000; // milliseconds
6863
6864 // TODO: if somehow user switches keypress target before
6865 // debounce timeout is triggered, we will only capture
6866 // a single breadcrumb from the FIRST target (acceptable?)
6867 return function(evt) {
6868 var target;
6869 try {
6870 target = evt.target;
6871 } catch (e) {
6872 // just accessing event properties can throw an exception in some rare circumstances
6873 // see: https://github.com/getsentry/raven-js/issues/838
6874 return;
6875 }
6876 var tagName = target && target.tagName;
6877
6878 // only consider keypress events on actual input elements
6879 // this will disregard keypresses targeting body (e.g. tabbing
6880 // through elements, hotkeys, etc)
6881 if (
6882 !tagName ||
6883 (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable)
6884 )
6885 return;
6886
6887 // record first keypress in a series, but ignore subsequent
6888 // keypresses until debounce clears
6889 var timeout = self._keypressTimeout;
6890 if (!timeout) {
6891 self._breadcrumbEventHandler('input')(evt);
6892 }
6893 clearTimeout(timeout);
6894 self._keypressTimeout = setTimeout(function() {
6895 self._keypressTimeout = null;
6896 }, debounceDuration);
6897 };
6898 },
6899
6900 /**
6901 * Captures a breadcrumb of type "navigation", normalizing input URLs
6902 * @param to the originating URL
6903 * @param from the target URL
6904 * @private
6905 */
6906 _captureUrlChange: function(from, to) {
6907 var parsedLoc = parseUrl(this._location.href);
6908 var parsedTo = parseUrl(to);
6909 var parsedFrom = parseUrl(from);
6910
6911 // because onpopstate only tells you the "new" (to) value of location.href, and
6912 // not the previous (from) value, we need to track the value of the current URL
6913 // state ourselves
6914 this._lastHref = to;
6915
6916 // Use only the path component of the URL if the URL matches the current
6917 // document (almost all the time when using pushState)
6918 if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host)
6919 to = parsedTo.relative;
6920 if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host)
6921 from = parsedFrom.relative;
6922
6923 this.captureBreadcrumb({
6924 category: 'navigation',
6925 data: {
6926 to: to,
6927 from: from
6928 }
6929 });
6930 },
6931
6932 /**
6933 * Wrap timer functions and event targets to catch errors and provide
6934 * better metadata.
6935 */
6936 _instrumentTryCatch: function() {
6937 var self = this;
6938
6939 var wrappedBuiltIns = self._wrappedBuiltIns;
6940
6941 function wrapTimeFn(orig) {
6942 return function(fn, t) {
6943 // preserve arity
6944 // Make a copy of the arguments to prevent deoptimization
6945 // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
6946 var args = new Array(arguments.length);
6947 for (var i = 0; i < args.length; ++i) {
6948 args[i] = arguments[i];
6949 }
6950 var originalCallback = args[0];
6951 if (isFunction(originalCallback)) {
6952 args[0] = self.wrap(originalCallback);
6953 }
6954
6955 // IE < 9 doesn't support .call/.apply on setInterval/setTimeout, but it
6956 // also supports only two arguments and doesn't care what this is, so we
6957 // can just call the original function directly.
6958 if (orig.apply) {
6959 return orig.apply(this, args);
6960 } else {
6961 return orig(args[0], args[1]);
6962 }
6963 };
6964 }
6965
6966 var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
6967
6968 function wrapEventTarget(global) {
6969 var proto = _window[global] && _window[global].prototype;
6970 if (proto && proto.hasOwnProperty && proto.hasOwnProperty('addEventListener')) {
6971 fill(
6972 proto,
6973 'addEventListener',
6974 function(orig) {
6975 return function(evtName, fn, capture, secure) {
6976 // preserve arity
6977 try {
6978 if (fn && fn.handleEvent) {
6979 fn.handleEvent = self.wrap(fn.handleEvent);
6980 }
6981 } catch (err) {
6982 // can sometimes get 'Permission denied to access property "handle Event'
6983 }
6984
6985 // More breadcrumb DOM capture ... done here and not in `_instrumentBreadcrumbs`
6986 // so that we don't have more than one wrapper function
6987 var before, clickHandler, keypressHandler;
6988
6989 if (
6990 autoBreadcrumbs &&
6991 autoBreadcrumbs.dom &&
6992 (global === 'EventTarget' || global === 'Node')
6993 ) {
6994 // NOTE: generating multiple handlers per addEventListener invocation, should
6995 // revisit and verify we can just use one (almost certainly)
6996 clickHandler = self._breadcrumbEventHandler('click');
6997 keypressHandler = self._keypressEventHandler();
6998 before = function(evt) {
6999 // need to intercept every DOM event in `before` argument, in case that
7000 // same wrapped method is re-used for different events (e.g. mousemove THEN click)
7001 // see #724
7002 if (!evt) return;
7003
7004 var eventType;
7005 try {
7006 eventType = evt.type;
7007 } catch (e) {
7008 // just accessing event properties can throw an exception in some rare circumstances
7009 // see: https://github.com/getsentry/raven-js/issues/838
7010 return;
7011 }
7012 if (eventType === 'click') return clickHandler(evt);
7013 else if (eventType === 'keypress') return keypressHandler(evt);
7014 };
7015 }
7016 return orig.call(
7017 this,
7018 evtName,
7019 self.wrap(fn, undefined, before),
7020 capture,
7021 secure
7022 );
7023 };
7024 },
7025 wrappedBuiltIns
7026 );
7027 fill(
7028 proto,
7029 'removeEventListener',
7030 function(orig) {
7031 return function(evt, fn, capture, secure) {
7032 try {
7033 fn = fn && (fn.__raven_wrapper__ ? fn.__raven_wrapper__ : fn);
7034 } catch (e) {
7035 // ignore, accessing __raven_wrapper__ will throw in some Selenium environments
7036 }
7037 return orig.call(this, evt, fn, capture, secure);
7038 };
7039 },
7040 wrappedBuiltIns
7041 );
7042 }
7043 }
7044
7045 fill(_window, 'setTimeout', wrapTimeFn, wrappedBuiltIns);
7046 fill(_window, 'setInterval', wrapTimeFn, wrappedBuiltIns);
7047 if (_window.requestAnimationFrame) {
7048 fill(
7049 _window,
7050 'requestAnimationFrame',
7051 function(orig) {
7052 return function(cb) {
7053 return orig(self.wrap(cb));
7054 };
7055 },
7056 wrappedBuiltIns
7057 );
7058 }
7059
7060 // event targets borrowed from bugsnag-js:
7061 // https://github.com/bugsnag/bugsnag-js/blob/master/src/bugsnag.js#L666
7062 var eventTargets = [
7063 'EventTarget',
7064 'Window',
7065 'Node',
7066 'ApplicationCache',
7067 'AudioTrackList',
7068 'ChannelMergerNode',
7069 'CryptoOperation',
7070 'EventSource',
7071 'FileReader',
7072 'HTMLUnknownElement',
7073 'IDBDatabase',
7074 'IDBRequest',
7075 'IDBTransaction',
7076 'KeyOperation',
7077 'MediaController',
7078 'MessagePort',
7079 'ModalWindow',
7080 'Notification',
7081 'SVGElementInstance',
7082 'Screen',
7083 'TextTrack',
7084 'TextTrackCue',
7085 'TextTrackList',
7086 'WebSocket',
7087 'WebSocketWorker',
7088 'Worker',
7089 'XMLHttpRequest',
7090 'XMLHttpRequestEventTarget',
7091 'XMLHttpRequestUpload'
7092 ];
7093 for (var i = 0; i < eventTargets.length; i++) {
7094 wrapEventTarget(eventTargets[i]);
7095 }
7096 },
7097
7098 /**
7099 * Instrument browser built-ins w/ breadcrumb capturing
7100 * - XMLHttpRequests
7101 * - DOM interactions (click/typing)
7102 * - window.location changes
7103 * - console
7104 *
7105 * Can be disabled or individually configured via the `autoBreadcrumbs` config option
7106 */
7107 _instrumentBreadcrumbs: function() {
7108 var self = this;
7109 var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
7110
7111 var wrappedBuiltIns = self._wrappedBuiltIns;
7112
7113 function wrapProp(prop, xhr) {
7114 if (prop in xhr && isFunction(xhr[prop])) {
7115 fill(xhr, prop, function(orig) {
7116 return self.wrap(orig);
7117 }); // intentionally don't track filled methods on XHR instances
7118 }
7119 }
7120
7121 if (autoBreadcrumbs.xhr && 'XMLHttpRequest' in _window) {
7122 var xhrproto = XMLHttpRequest.prototype;
7123 fill(
7124 xhrproto,
7125 'open',
7126 function(origOpen) {
7127 return function(method, url) {
7128 // preserve arity
7129
7130 // if Sentry key appears in URL, don't capture
7131 if (isString(url) && url.indexOf(self._globalKey) === -1) {
7132 this.__raven_xhr = {
7133 method: method,
7134 url: url,
7135 status_code: null
7136 };
7137 }
7138
7139 return origOpen.apply(this, arguments);
7140 };
7141 },
7142 wrappedBuiltIns
7143 );
7144
7145 fill(
7146 xhrproto,
7147 'send',
7148 function(origSend) {
7149 return function(data) {
7150 // preserve arity
7151 var xhr = this;
7152
7153 function onreadystatechangeHandler() {
7154 if (xhr.__raven_xhr && xhr.readyState === 4) {
7155 try {
7156 // touching statusCode in some platforms throws
7157 // an exception
7158 xhr.__raven_xhr.status_code = xhr.status;
7159 } catch (e) {
7160 /* do nothing */
7161 }
7162
7163 self.captureBreadcrumb({
7164 type: 'http',
7165 category: 'xhr',
7166 data: xhr.__raven_xhr
7167 });
7168 }
7169 }
7170
7171 var props = ['onload', 'onerror', 'onprogress'];
7172 for (var j = 0; j < props.length; j++) {
7173 wrapProp(props[j], xhr);
7174 }
7175
7176 if ('onreadystatechange' in xhr && isFunction(xhr.onreadystatechange)) {
7177 fill(
7178 xhr,
7179 'onreadystatechange',
7180 function(orig) {
7181 return self.wrap(orig, undefined, onreadystatechangeHandler);
7182 } /* intentionally don't track this instrumentation */
7183 );
7184 } else {
7185 // if onreadystatechange wasn't actually set by the page on this xhr, we
7186 // are free to set our own and capture the breadcrumb
7187 xhr.onreadystatechange = onreadystatechangeHandler;
7188 }
7189
7190 return origSend.apply(this, arguments);
7191 };
7192 },
7193 wrappedBuiltIns
7194 );
7195 }
7196
7197 if (autoBreadcrumbs.xhr && 'fetch' in _window) {
7198 fill(
7199 _window,
7200 'fetch',
7201 function(origFetch) {
7202 return function(fn, t) {
7203 // preserve arity
7204 // Make a copy of the arguments to prevent deoptimization
7205 // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
7206 var args = new Array(arguments.length);
7207 for (var i = 0; i < args.length; ++i) {
7208 args[i] = arguments[i];
7209 }
7210
7211 var fetchInput = args[0];
7212 var method = 'GET';
7213 var url;
7214
7215 if (typeof fetchInput === 'string') {
7216 url = fetchInput;
7217 } else if ('Request' in _window && fetchInput instanceof _window.Request) {
7218 url = fetchInput.url;
7219 if (fetchInput.method) {
7220 method = fetchInput.method;
7221 }
7222 } else {
7223 url = '' + fetchInput;
7224 }
7225
7226 if (args[1] && args[1].method) {
7227 method = args[1].method;
7228 }
7229
7230 var fetchData = {
7231 method: method,
7232 url: url,
7233 status_code: null
7234 };
7235
7236 self.captureBreadcrumb({
7237 type: 'http',
7238 category: 'fetch',
7239 data: fetchData
7240 });
7241
7242 return origFetch.apply(this, args).then(function(response) {
7243 fetchData.status_code = response.status;
7244
7245 return response;
7246 });
7247 };
7248 },
7249 wrappedBuiltIns
7250 );
7251 }
7252
7253 // Capture breadcrumbs from any click that is unhandled / bubbled up all the way
7254 // to the document. Do this before we instrument addEventListener.
7255 if (autoBreadcrumbs.dom && this._hasDocument) {
7256 if (_document.addEventListener) {
7257 _document.addEventListener('click', self._breadcrumbEventHandler('click'), false);
7258 _document.addEventListener('keypress', self._keypressEventHandler(), false);
7259 } else {
7260 // IE8 Compatibility
7261 _document.attachEvent('onclick', self._breadcrumbEventHandler('click'));
7262 _document.attachEvent('onkeypress', self._keypressEventHandler());
7263 }
7264 }
7265
7266 // record navigation (URL) changes
7267 // NOTE: in Chrome App environment, touching history.pushState, *even inside
7268 // a try/catch block*, will cause Chrome to output an error to console.error
7269 // borrowed from: https://github.com/angular/angular.js/pull/13945/files
7270 var chrome = _window.chrome;
7271 var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;
7272 var hasPushAndReplaceState =
7273 !isChromePackagedApp &&
7274 _window.history &&
7275 history.pushState &&
7276 history.replaceState;
7277 if (autoBreadcrumbs.location && hasPushAndReplaceState) {
7278 // TODO: remove onpopstate handler on uninstall()
7279 var oldOnPopState = _window.onpopstate;
7280 _window.onpopstate = function() {
7281 var currentHref = self._location.href;
7282 self._captureUrlChange(self._lastHref, currentHref);
7283
7284 if (oldOnPopState) {
7285 return oldOnPopState.apply(this, arguments);
7286 }
7287 };
7288
7289 var historyReplacementFunction = function(origHistFunction) {
7290 // note history.pushState.length is 0; intentionally not declaring
7291 // params to preserve 0 arity
7292 return function(/* state, title, url */) {
7293 var url = arguments.length > 2 ? arguments[2] : undefined;
7294
7295 // url argument is optional
7296 if (url) {
7297 // coerce to string (this is what pushState does)
7298 self._captureUrlChange(self._lastHref, url + '');
7299 }
7300
7301 return origHistFunction.apply(this, arguments);
7302 };
7303 };
7304
7305 fill(history, 'pushState', historyReplacementFunction, wrappedBuiltIns);
7306 fill(history, 'replaceState', historyReplacementFunction, wrappedBuiltIns);
7307 }
7308
7309 if (autoBreadcrumbs.console && 'console' in _window && console.log) {
7310 // console
7311 var consoleMethodCallback = function(msg, data) {
7312 self.captureBreadcrumb({
7313 message: msg,
7314 level: data.level,
7315 category: 'console'
7316 });
7317 };
7318
7319 each(['debug', 'info', 'warn', 'error', 'log'], function(_, level) {
7320 wrapConsoleMethod(console, level, consoleMethodCallback);
7321 });
7322 }
7323 },
7324
7325 _restoreBuiltIns: function() {
7326 // restore any wrapped builtins
7327 var builtin;
7328 while (this._wrappedBuiltIns.length) {
7329 builtin = this._wrappedBuiltIns.shift();
7330
7331 var obj = builtin[0],
7332 name = builtin[1],
7333 orig = builtin[2];
7334
7335 obj[name] = orig;
7336 }
7337 },
7338
7339 _drainPlugins: function() {
7340 var self = this;
7341
7342 // FIX ME TODO
7343 each(this._plugins, function(_, plugin) {
7344 var installer = plugin[0];
7345 var args = plugin[1];
7346 installer.apply(self, [self].concat(args));
7347 });
7348 },
7349
7350 _parseDSN: function(str) {
7351 var m = dsnPattern.exec(str),
7352 dsn = {},
7353 i = 7;
7354
7355 try {
7356 while (i--) dsn[dsnKeys[i]] = m[i] || '';
7357 } catch (e) {
7358 throw new RavenConfigError('Invalid DSN: ' + str);
7359 }
7360
7361 if (dsn.pass && !this._globalOptions.allowSecretKey) {
7362 throw new RavenConfigError(
7363 'Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key'
7364 );
7365 }
7366
7367 return dsn;
7368 },
7369
7370 _getGlobalServer: function(uri) {
7371 // assemble the endpoint from the uri pieces
7372 var globalServer = '//' + uri.host + (uri.port ? ':' + uri.port : '');
7373
7374 if (uri.protocol) {
7375 globalServer = uri.protocol + ':' + globalServer;
7376 }
7377 return globalServer;
7378 },
7379
7380 _handleOnErrorStackInfo: function() {
7381 // if we are intentionally ignoring errors via onerror, bail out
7382 if (!this._ignoreOnError) {
7383 this._handleStackInfo.apply(this, arguments);
7384 }
7385 },
7386
7387 _handleStackInfo: function(stackInfo, options) {
7388 var frames = this._prepareFrames(stackInfo, options);
7389
7390 this._triggerEvent('handle', {
7391 stackInfo: stackInfo,
7392 options: options
7393 });
7394
7395 this._processException(
7396 stackInfo.name,
7397 stackInfo.message,
7398 stackInfo.url,
7399 stackInfo.lineno,
7400 frames,
7401 options
7402 );
7403 },
7404
7405 _prepareFrames: function(stackInfo, options) {
7406 var self = this;
7407 var frames = [];
7408 if (stackInfo.stack && stackInfo.stack.length) {
7409 each(stackInfo.stack, function(i, stack) {
7410 var frame = self._normalizeFrame(stack, stackInfo.url);
7411 if (frame) {
7412 frames.push(frame);
7413 }
7414 });
7415
7416 // e.g. frames captured via captureMessage throw
7417 if (options && options.trimHeadFrames) {
7418 for (var j = 0; j < options.trimHeadFrames && j < frames.length; j++) {
7419 frames[j].in_app = false;
7420 }
7421 }
7422 }
7423 frames = frames.slice(0, this._globalOptions.stackTraceLimit);
7424 return frames;
7425 },
7426
7427 _normalizeFrame: function(frame, stackInfoUrl) {
7428 // normalize the frames data
7429 var normalized = {
7430 filename: frame.url,
7431 lineno: frame.line,
7432 colno: frame.column,
7433 function: frame.func || '?'
7434 };
7435
7436 // Case when we don't have any information about the error
7437 // E.g. throwing a string or raw object, instead of an `Error` in Firefox
7438 // Generating synthetic error doesn't add any value here
7439 //
7440 // We should probably somehow let a user know that they should fix their code
7441 if (!frame.url) {
7442 normalized.filename = stackInfoUrl; // fallback to whole stacks url from onerror handler
7443 }
7444
7445 normalized.in_app = !// determine if an exception came from outside of our app
7446 // first we check the global includePaths list.
7447 (
7448 (!!this._globalOptions.includePaths.test &&
7449 !this._globalOptions.includePaths.test(normalized.filename)) ||
7450 // Now we check for fun, if the function name is Raven or TraceKit
7451 /(Raven|TraceKit)\./.test(normalized['function']) ||
7452 // finally, we do a last ditch effort and check for raven.min.js
7453 /raven\.(min\.)?js$/.test(normalized.filename)
7454 );
7455
7456 return normalized;
7457 },
7458
7459 _processException: function(type, message, fileurl, lineno, frames, options) {
7460 var prefixedMessage = (type ? type + ': ' : '') + (message || '');
7461 if (
7462 !!this._globalOptions.ignoreErrors.test &&
7463 (this._globalOptions.ignoreErrors.test(message) ||
7464 this._globalOptions.ignoreErrors.test(prefixedMessage))
7465 ) {
7466 return;
7467 }
7468
7469 var stacktrace;
7470
7471 if (frames && frames.length) {
7472 fileurl = frames[0].filename || fileurl;
7473 // Sentry expects frames oldest to newest
7474 // and JS sends them as newest to oldest
7475 frames.reverse();
7476 stacktrace = {frames: frames};
7477 } else if (fileurl) {
7478 stacktrace = {
7479 frames: [
7480 {
7481 filename: fileurl,
7482 lineno: lineno,
7483 in_app: true
7484 }
7485 ]
7486 };
7487 }
7488
7489 if (
7490 !!this._globalOptions.ignoreUrls.test &&
7491 this._globalOptions.ignoreUrls.test(fileurl)
7492 ) {
7493 return;
7494 }
7495
7496 if (
7497 !!this._globalOptions.whitelistUrls.test &&
7498 !this._globalOptions.whitelistUrls.test(fileurl)
7499 ) {
7500 return;
7501 }
7502
7503 var data = objectMerge(
7504 {
7505 // sentry.interfaces.Exception
7506 exception: {
7507 values: [
7508 {
7509 type: type,
7510 value: message,
7511 stacktrace: stacktrace
7512 }
7513 ]
7514 },
7515 culprit: fileurl
7516 },
7517 options
7518 );
7519
7520 // Fire away!
7521 this._send(data);
7522 },
7523
7524 _trimPacket: function(data) {
7525 // For now, we only want to truncate the two different messages
7526 // but this could/should be expanded to just trim everything
7527 var max = this._globalOptions.maxMessageLength;
7528 if (data.message) {
7529 data.message = truncate(data.message, max);
7530 }
7531 if (data.exception) {
7532 var exception = data.exception.values[0];
7533 exception.value = truncate(exception.value, max);
7534 }
7535
7536 var request = data.request;
7537 if (request) {
7538 if (request.url) {
7539 request.url = truncate(request.url, this._globalOptions.maxUrlLength);
7540 }
7541 if (request.Referer) {
7542 request.Referer = truncate(request.Referer, this._globalOptions.maxUrlLength);
7543 }
7544 }
7545
7546 if (data.breadcrumbs && data.breadcrumbs.values)
7547 this._trimBreadcrumbs(data.breadcrumbs);
7548
7549 return data;
7550 },
7551
7552 /**
7553 * Truncate breadcrumb values (right now just URLs)
7554 */
7555 _trimBreadcrumbs: function(breadcrumbs) {
7556 // known breadcrumb properties with urls
7557 // TODO: also consider arbitrary prop values that start with (https?)?://
7558 var urlProps = ['to', 'from', 'url'],
7559 urlProp,
7560 crumb,
7561 data;
7562
7563 for (var i = 0; i < breadcrumbs.values.length; ++i) {
7564 crumb = breadcrumbs.values[i];
7565 if (
7566 !crumb.hasOwnProperty('data') ||
7567 !isObject(crumb.data) ||
7568 objectFrozen(crumb.data)
7569 )
7570 continue;
7571
7572 data = objectMerge({}, crumb.data);
7573 for (var j = 0; j < urlProps.length; ++j) {
7574 urlProp = urlProps[j];
7575 if (data.hasOwnProperty(urlProp) && data[urlProp]) {
7576 data[urlProp] = truncate(data[urlProp], this._globalOptions.maxUrlLength);
7577 }
7578 }
7579 breadcrumbs.values[i].data = data;
7580 }
7581 },
7582
7583 _getHttpData: function() {
7584 if (!this._hasNavigator && !this._hasDocument) return;
7585 var httpData = {};
7586
7587 if (this._hasNavigator && _navigator.userAgent) {
7588 httpData.headers = {
7589 'User-Agent': navigator.userAgent
7590 };
7591 }
7592
7593 if (this._hasDocument) {
7594 if (_document.location && _document.location.href) {
7595 httpData.url = _document.location.href;
7596 }
7597 if (_document.referrer) {
7598 if (!httpData.headers) httpData.headers = {};
7599 httpData.headers.Referer = _document.referrer;
7600 }
7601 }
7602
7603 return httpData;
7604 },
7605
7606 _resetBackoff: function() {
7607 this._backoffDuration = 0;
7608 this._backoffStart = null;
7609 },
7610
7611 _shouldBackoff: function() {
7612 return this._backoffDuration && now() - this._backoffStart < this._backoffDuration;
7613 },
7614
7615 /**
7616 * Returns true if the in-process data payload matches the signature
7617 * of the previously-sent data
7618 *
7619 * NOTE: This has to be done at this level because TraceKit can generate
7620 * data from window.onerror WITHOUT an exception object (IE8, IE9,
7621 * other old browsers). This can take the form of an "exception"
7622 * data object with a single frame (derived from the onerror args).
7623 */
7624 _isRepeatData: function(current) {
7625 var last = this._lastData;
7626
7627 if (
7628 !last ||
7629 current.message !== last.message || // defined for captureMessage
7630 current.culprit !== last.culprit // defined for captureException/onerror
7631 )
7632 return false;
7633
7634 // Stacktrace interface (i.e. from captureMessage)
7635 if (current.stacktrace || last.stacktrace) {
7636 return isSameStacktrace(current.stacktrace, last.stacktrace);
7637 } else if (current.exception || last.exception) {
7638 // Exception interface (i.e. from captureException/onerror)
7639 return isSameException(current.exception, last.exception);
7640 }
7641
7642 return true;
7643 },
7644
7645 _setBackoffState: function(request) {
7646 // If we are already in a backoff state, don't change anything
7647 if (this._shouldBackoff()) {
7648 return;
7649 }
7650
7651 var status = request.status;
7652
7653 // 400 - project_id doesn't exist or some other fatal
7654 // 401 - invalid/revoked dsn
7655 // 429 - too many requests
7656 if (!(status === 400 || status === 401 || status === 429)) return;
7657
7658 var retry;
7659 try {
7660 // If Retry-After is not in Access-Control-Expose-Headers, most
7661 // browsers will throw an exception trying to access it
7662 retry = request.getResponseHeader('Retry-After');
7663 retry = parseInt(retry, 10) * 1000; // Retry-After is returned in seconds
7664 } catch (e) {
7665 /* eslint no-empty:0 */
7666 }
7667
7668 this._backoffDuration = retry
7669 ? // If Sentry server returned a Retry-After value, use it
7670 retry
7671 : // Otherwise, double the last backoff duration (starts at 1 sec)
7672 this._backoffDuration * 2 || 1000;
7673
7674 this._backoffStart = now();
7675 },
7676
7677 _send: function(data) {
7678 var globalOptions = this._globalOptions;
7679
7680 var baseData = {
7681 project: this._globalProject,
7682 logger: globalOptions.logger,
7683 platform: 'javascript'
7684 },
7685 httpData = this._getHttpData();
7686
7687 if (httpData) {
7688 baseData.request = httpData;
7689 }
7690
7691 // HACK: delete `trimHeadFrames` to prevent from appearing in outbound payload
7692 if (data.trimHeadFrames) delete data.trimHeadFrames;
7693
7694 data = objectMerge(baseData, data);
7695
7696 // Merge in the tags and extra separately since objectMerge doesn't handle a deep merge
7697 data.tags = objectMerge(objectMerge({}, this._globalContext.tags), data.tags);
7698 data.extra = objectMerge(objectMerge({}, this._globalContext.extra), data.extra);
7699
7700 // Send along our own collected metadata with extra
7701 data.extra['session:duration'] = now() - this._startTime;
7702
7703 if (this._breadcrumbs && this._breadcrumbs.length > 0) {
7704 // intentionally make shallow copy so that additions
7705 // to breadcrumbs aren't accidentally sent in this request
7706 data.breadcrumbs = {
7707 values: [].slice.call(this._breadcrumbs, 0)
7708 };
7709 }
7710
7711 // If there are no tags/extra, strip the key from the payload alltogther.
7712 if (isEmptyObject(data.tags)) delete data.tags;
7713
7714 if (this._globalContext.user) {
7715 // sentry.interfaces.User
7716 data.user = this._globalContext.user;
7717 }
7718
7719 // Include the environment if it's defined in globalOptions
7720 if (globalOptions.environment) data.environment = globalOptions.environment;
7721
7722 // Include the release if it's defined in globalOptions
7723 if (globalOptions.release) data.release = globalOptions.release;
7724
7725 // Include server_name if it's defined in globalOptions
7726 if (globalOptions.serverName) data.server_name = globalOptions.serverName;
7727
7728 if (isFunction(globalOptions.dataCallback)) {
7729 data = globalOptions.dataCallback(data) || data;
7730 }
7731
7732 // Why??????????
7733 if (!data || isEmptyObject(data)) {
7734 return;
7735 }
7736
7737 // Check if the request should be filtered or not
7738 if (
7739 isFunction(globalOptions.shouldSendCallback) &&
7740 !globalOptions.shouldSendCallback(data)
7741 ) {
7742 return;
7743 }
7744
7745 // Backoff state: Sentry server previously responded w/ an error (e.g. 429 - too many requests),
7746 // so drop requests until "cool-off" period has elapsed.
7747 if (this._shouldBackoff()) {
7748 this._logDebug('warn', 'Raven dropped error due to backoff: ', data);
7749 return;
7750 }
7751
7752 if (typeof globalOptions.sampleRate === 'number') {
7753 if (Math.random() < globalOptions.sampleRate) {
7754 this._sendProcessedPayload(data);
7755 }
7756 } else {
7757 this._sendProcessedPayload(data);
7758 }
7759 },
7760
7761 _getUuid: function() {
7762 return uuid4();
7763 },
7764
7765 _sendProcessedPayload: function(data, callback) {
7766 var self = this;
7767 var globalOptions = this._globalOptions;
7768
7769 if (!this.isSetup()) return;
7770
7771 // Try and clean up the packet before sending by truncating long values
7772 data = this._trimPacket(data);
7773
7774 // ideally duplicate error testing should occur *before* dataCallback/shouldSendCallback,
7775 // but this would require copying an un-truncated copy of the data packet, which can be
7776 // arbitrarily deep (extra_data) -- could be worthwhile? will revisit
7777 if (!this._globalOptions.allowDuplicates && this._isRepeatData(data)) {
7778 this._logDebug('warn', 'Raven dropped repeat event: ', data);
7779 return;
7780 }
7781
7782 // Send along an event_id if not explicitly passed.
7783 // This event_id can be used to reference the error within Sentry itself.
7784 // Set lastEventId after we know the error should actually be sent
7785 this._lastEventId = data.event_id || (data.event_id = this._getUuid());
7786
7787 // Store outbound payload after trim
7788 this._lastData = data;
7789
7790 this._logDebug('debug', 'Raven about to send:', data);
7791
7792 var auth = {
7793 sentry_version: '7',
7794 sentry_client: 'raven-js/' + this.VERSION,
7795 sentry_key: this._globalKey
7796 };
7797
7798 if (this._globalSecret) {
7799 auth.sentry_secret = this._globalSecret;
7800 }
7801
7802 var exception = data.exception && data.exception.values[0];
7803 this.captureBreadcrumb({
7804 category: 'sentry',
7805 message: exception
7806 ? (exception.type ? exception.type + ': ' : '') + exception.value
7807 : data.message,
7808 event_id: data.event_id,
7809 level: data.level || 'error' // presume error unless specified
7810 });
7811
7812 var url = this._globalEndpoint;
7813 (globalOptions.transport || this._makeRequest).call(this, {
7814 url: url,
7815 auth: auth,
7816 data: data,
7817 options: globalOptions,
7818 onSuccess: function success() {
7819 self._resetBackoff();
7820
7821 self._triggerEvent('success', {
7822 data: data,
7823 src: url
7824 });
7825 callback && callback();
7826 },
7827 onError: function failure(error) {
7828 self._logDebug('error', 'Raven transport failed to send: ', error);
7829
7830 if (error.request) {
7831 self._setBackoffState(error.request);
7832 }
7833
7834 self._triggerEvent('failure', {
7835 data: data,
7836 src: url
7837 });
7838 error = error || new Error('Raven send failed (no additional details provided)');
7839 callback && callback(error);
7840 }
7841 });
7842 },
7843
7844 _makeRequest: function(opts) {
7845 var request = _window.XMLHttpRequest && new _window.XMLHttpRequest();
7846 if (!request) return;
7847
7848 // if browser doesn't support CORS (e.g. IE7), we are out of luck
7849 var hasCORS = 'withCredentials' in request || typeof XDomainRequest !== 'undefined';
7850
7851 if (!hasCORS) return;
7852
7853 var url = opts.url;
7854
7855 if ('withCredentials' in request) {
7856 request.onreadystatechange = function() {
7857 if (request.readyState !== 4) {
7858 return;
7859 } else if (request.status === 200) {
7860 opts.onSuccess && opts.onSuccess();
7861 } else if (opts.onError) {
7862 var err = new Error('Sentry error code: ' + request.status);
7863 err.request = request;
7864 opts.onError(err);
7865 }
7866 };
7867 } else {
7868 request = new XDomainRequest();
7869 // xdomainrequest cannot go http -> https (or vice versa),
7870 // so always use protocol relative
7871 url = url.replace(/^https?:/, '');
7872
7873 // onreadystatechange not supported by XDomainRequest
7874 if (opts.onSuccess) {
7875 request.onload = opts.onSuccess;
7876 }
7877 if (opts.onError) {
7878 request.onerror = function() {
7879 var err = new Error('Sentry error code: XDomainRequest');
7880 err.request = request;
7881 opts.onError(err);
7882 };
7883 }
7884 }
7885
7886 // NOTE: auth is intentionally sent as part of query string (NOT as custom
7887 // HTTP header) so as to avoid preflight CORS requests
7888 request.open('POST', url + '?' + urlencode(opts.auth));
7889 request.send(stringify(opts.data));
7890 },
7891
7892 _logDebug: function(level) {
7893 if (this._originalConsoleMethods[level] && this.debug) {
7894 // In IE<10 console methods do not have their own 'apply' method
7895 Function.prototype.apply.call(
7896 this._originalConsoleMethods[level],
7897 this._originalConsole,
7898 [].slice.call(arguments, 1)
7899 );
7900 }
7901 },
7902
7903 _mergeContext: function(key, context) {
7904 if (isUndefined(context)) {
7905 delete this._globalContext[key];
7906 } else {
7907 this._globalContext[key] = objectMerge(this._globalContext[key] || {}, context);
7908 }
7909 }
7910 };
7911
7912 // Deprecations
7913 Raven.prototype.setUser = Raven.prototype.setUserContext;
7914 Raven.prototype.setReleaseContext = Raven.prototype.setRelease;
7915
7916 module.exports = Raven;
7917
7918
7919 /***/ }),
7920
7921 /***/ "./node_modules/raven-js/src/singleton.js":
7922 /*!************************************************!*\
7923 !*** ./node_modules/raven-js/src/singleton.js ***!
7924 \************************************************/
7925 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7926
7927 /**
7928 * Enforces a single instance of the Raven client, and the
7929 * main entry point for Raven. If you are a consumer of the
7930 * Raven library, you SHOULD load this file (vs raven.js).
7931 **/
7932
7933 var RavenConstructor = __webpack_require__(/*! ./raven */ "./node_modules/raven-js/src/raven.js");
7934
7935 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
7936 var _window =
7937 typeof window !== 'undefined'
7938 ? window
7939 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
7940 var _Raven = _window.Raven;
7941
7942 var Raven = new RavenConstructor();
7943
7944 /*
7945 * Allow multiple versions of Raven to be installed.
7946 * Strip Raven from the global context and returns the instance.
7947 *
7948 * @return {Raven}
7949 */
7950 Raven.noConflict = function() {
7951 _window.Raven = _Raven;
7952 return Raven;
7953 };
7954
7955 Raven.afterLoad();
7956
7957 module.exports = Raven;
7958
7959
7960 /***/ }),
7961
7962 /***/ "./node_modules/raven-js/src/utils.js":
7963 /*!********************************************!*\
7964 !*** ./node_modules/raven-js/src/utils.js ***!
7965 \********************************************/
7966 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7967
7968 var _window =
7969 typeof window !== 'undefined'
7970 ? window
7971 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
7972
7973 function isObject(what) {
7974 return typeof what === 'object' && what !== null;
7975 }
7976
7977 // Yanked from https://git.io/vS8DV re-used under CC0
7978 // with some tiny modifications
7979 function isError(value) {
7980 switch ({}.toString.call(value)) {
7981 case '[object Error]':
7982 return true;
7983 case '[object Exception]':
7984 return true;
7985 case '[object DOMException]':
7986 return true;
7987 default:
7988 return value instanceof Error;
7989 }
7990 }
7991
7992 function isErrorEvent(value) {
7993 return supportsErrorEvent() && {}.toString.call(value) === '[object ErrorEvent]';
7994 }
7995
7996 function isUndefined(what) {
7997 return what === void 0;
7998 }
7999
8000 function isFunction(what) {
8001 return typeof what === 'function';
8002 }
8003
8004 function isString(what) {
8005 return Object.prototype.toString.call(what) === '[object String]';
8006 }
8007
8008 function isEmptyObject(what) {
8009 for (var _ in what) return false; // eslint-disable-line guard-for-in, no-unused-vars
8010 return true;
8011 }
8012
8013 function supportsErrorEvent() {
8014 try {
8015 new ErrorEvent(''); // eslint-disable-line no-new
8016 return true;
8017 } catch (e) {
8018 return false;
8019 }
8020 }
8021
8022 function wrappedCallback(callback) {
8023 function dataCallback(data, original) {
8024 var normalizedData = callback(data) || data;
8025 if (original) {
8026 return original(normalizedData) || normalizedData;
8027 }
8028 return normalizedData;
8029 }
8030
8031 return dataCallback;
8032 }
8033
8034 function each(obj, callback) {
8035 var i, j;
8036
8037 if (isUndefined(obj.length)) {
8038 for (i in obj) {
8039 if (hasKey(obj, i)) {
8040 callback.call(null, i, obj[i]);
8041 }
8042 }
8043 } else {
8044 j = obj.length;
8045 if (j) {
8046 for (i = 0; i < j; i++) {
8047 callback.call(null, i, obj[i]);
8048 }
8049 }
8050 }
8051 }
8052
8053 function objectMerge(obj1, obj2) {
8054 if (!obj2) {
8055 return obj1;
8056 }
8057 each(obj2, function(key, value) {
8058 obj1[key] = value;
8059 });
8060 return obj1;
8061 }
8062
8063 /**
8064 * This function is only used for react-native.
8065 * react-native freezes object that have already been sent over the
8066 * js bridge. We need this function in order to check if the object is frozen.
8067 * So it's ok that objectFrozen returns false if Object.isFrozen is not
8068 * supported because it's not relevant for other "platforms". See related issue:
8069 * https://github.com/getsentry/react-native-sentry/issues/57
8070 */
8071 function objectFrozen(obj) {
8072 if (!Object.isFrozen) {
8073 return false;
8074 }
8075 return Object.isFrozen(obj);
8076 }
8077
8078 function truncate(str, max) {
8079 return !max || str.length <= max ? str : str.substr(0, max) + '\u2026';
8080 }
8081
8082 /**
8083 * hasKey, a better form of hasOwnProperty
8084 * Example: hasKey(MainHostObject, property) === true/false
8085 *
8086 * @param {Object} host object to check property
8087 * @param {string} key to check
8088 */
8089 function hasKey(object, key) {
8090 return Object.prototype.hasOwnProperty.call(object, key);
8091 }
8092
8093 function joinRegExp(patterns) {
8094 // Combine an array of regular expressions and strings into one large regexp
8095 // Be mad.
8096 var sources = [],
8097 i = 0,
8098 len = patterns.length,
8099 pattern;
8100
8101 for (; i < len; i++) {
8102 pattern = patterns[i];
8103 if (isString(pattern)) {
8104 // If it's a string, we need to escape it
8105 // Taken from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
8106 sources.push(pattern.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, '\\$1'));
8107 } else if (pattern && pattern.source) {
8108 // If it's a regexp already, we want to extract the source
8109 sources.push(pattern.source);
8110 }
8111 // Intentionally skip other cases
8112 }
8113 return new RegExp(sources.join('|'), 'i');
8114 }
8115
8116 function urlencode(o) {
8117 var pairs = [];
8118 each(o, function(key, value) {
8119 pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));
8120 });
8121 return pairs.join('&');
8122 }
8123
8124 // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B
8125 // intentionally using regex and not <a/> href parsing trick because React Native and other
8126 // environments where DOM might not be available
8127 function parseUrl(url) {
8128 var match = url.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);
8129 if (!match) return {};
8130
8131 // coerce to undefined values to empty string so we don't get 'undefined'
8132 var query = match[6] || '';
8133 var fragment = match[8] || '';
8134 return {
8135 protocol: match[2],
8136 host: match[4],
8137 path: match[5],
8138 relative: match[5] + query + fragment // everything minus origin
8139 };
8140 }
8141 function uuid4() {
8142 var crypto = _window.crypto || _window.msCrypto;
8143
8144 if (!isUndefined(crypto) && crypto.getRandomValues) {
8145 // Use window.crypto API if available
8146 // eslint-disable-next-line no-undef
8147 var arr = new Uint16Array(8);
8148 crypto.getRandomValues(arr);
8149
8150 // set 4 in byte 7
8151 arr[3] = (arr[3] & 0xfff) | 0x4000;
8152 // set 2 most significant bits of byte 9 to '10'
8153 arr[4] = (arr[4] & 0x3fff) | 0x8000;
8154
8155 var pad = function(num) {
8156 var v = num.toString(16);
8157 while (v.length < 4) {
8158 v = '0' + v;
8159 }
8160 return v;
8161 };
8162
8163 return (
8164 pad(arr[0]) +
8165 pad(arr[1]) +
8166 pad(arr[2]) +
8167 pad(arr[3]) +
8168 pad(arr[4]) +
8169 pad(arr[5]) +
8170 pad(arr[6]) +
8171 pad(arr[7])
8172 );
8173 } else {
8174 // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523
8175 return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
8176 var r = (Math.random() * 16) | 0,
8177 v = c === 'x' ? r : (r & 0x3) | 0x8;
8178 return v.toString(16);
8179 });
8180 }
8181 }
8182
8183 /**
8184 * Given a child DOM element, returns a query-selector statement describing that
8185 * and its ancestors
8186 * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]
8187 * @param elem
8188 * @returns {string}
8189 */
8190 function htmlTreeAsString(elem) {
8191 /* eslint no-extra-parens:0*/
8192 var MAX_TRAVERSE_HEIGHT = 5,
8193 MAX_OUTPUT_LEN = 80,
8194 out = [],
8195 height = 0,
8196 len = 0,
8197 separator = ' > ',
8198 sepLength = separator.length,
8199 nextStr;
8200
8201 while (elem && height++ < MAX_TRAVERSE_HEIGHT) {
8202 nextStr = htmlElementAsString(elem);
8203 // bail out if
8204 // - nextStr is the 'html' element
8205 // - the length of the string that would be created exceeds MAX_OUTPUT_LEN
8206 // (ignore this limit if we are on the first iteration)
8207 if (
8208 nextStr === 'html' ||
8209 (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)
8210 ) {
8211 break;
8212 }
8213
8214 out.push(nextStr);
8215
8216 len += nextStr.length;
8217 elem = elem.parentNode;
8218 }
8219
8220 return out.reverse().join(separator);
8221 }
8222
8223 /**
8224 * Returns a simple, query-selector representation of a DOM element
8225 * e.g. [HTMLElement] => input#foo.btn[name=baz]
8226 * @param HTMLElement
8227 * @returns {string}
8228 */
8229 function htmlElementAsString(elem) {
8230 var out = [],
8231 className,
8232 classes,
8233 key,
8234 attr,
8235 i;
8236
8237 if (!elem || !elem.tagName) {
8238 return '';
8239 }
8240
8241 out.push(elem.tagName.toLowerCase());
8242 if (elem.id) {
8243 out.push('#' + elem.id);
8244 }
8245
8246 className = elem.className;
8247 if (className && isString(className)) {
8248 classes = className.split(/\s+/);
8249 for (i = 0; i < classes.length; i++) {
8250 out.push('.' + classes[i]);
8251 }
8252 }
8253 var attrWhitelist = ['type', 'name', 'title', 'alt'];
8254 for (i = 0; i < attrWhitelist.length; i++) {
8255 key = attrWhitelist[i];
8256 attr = elem.getAttribute(key);
8257 if (attr) {
8258 out.push('[' + key + '="' + attr + '"]');
8259 }
8260 }
8261 return out.join('');
8262 }
8263
8264 /**
8265 * Returns true if either a OR b is truthy, but not both
8266 */
8267 function isOnlyOneTruthy(a, b) {
8268 return !!(!!a ^ !!b);
8269 }
8270
8271 /**
8272 * Returns true if the two input exception interfaces have the same content
8273 */
8274 function isSameException(ex1, ex2) {
8275 if (isOnlyOneTruthy(ex1, ex2)) return false;
8276
8277 ex1 = ex1.values[0];
8278 ex2 = ex2.values[0];
8279
8280 if (ex1.type !== ex2.type || ex1.value !== ex2.value) return false;
8281
8282 return isSameStacktrace(ex1.stacktrace, ex2.stacktrace);
8283 }
8284
8285 /**
8286 * Returns true if the two input stack trace interfaces have the same content
8287 */
8288 function isSameStacktrace(stack1, stack2) {
8289 if (isOnlyOneTruthy(stack1, stack2)) return false;
8290
8291 var frames1 = stack1.frames;
8292 var frames2 = stack2.frames;
8293
8294 // Exit early if frame count differs
8295 if (frames1.length !== frames2.length) return false;
8296
8297 // Iterate through every frame; bail out if anything differs
8298 var a, b;
8299 for (var i = 0; i < frames1.length; i++) {
8300 a = frames1[i];
8301 b = frames2[i];
8302 if (
8303 a.filename !== b.filename ||
8304 a.lineno !== b.lineno ||
8305 a.colno !== b.colno ||
8306 a['function'] !== b['function']
8307 )
8308 return false;
8309 }
8310 return true;
8311 }
8312
8313 /**
8314 * Polyfill a method
8315 * @param obj object e.g. `document`
8316 * @param name method name present on object e.g. `addEventListener`
8317 * @param replacement replacement function
8318 * @param track {optional} record instrumentation to an array
8319 */
8320 function fill(obj, name, replacement, track) {
8321 var orig = obj[name];
8322 obj[name] = replacement(orig);
8323 if (track) {
8324 track.push([obj, name, orig]);
8325 }
8326 }
8327
8328 module.exports = {
8329 isObject: isObject,
8330 isError: isError,
8331 isErrorEvent: isErrorEvent,
8332 isUndefined: isUndefined,
8333 isFunction: isFunction,
8334 isString: isString,
8335 isEmptyObject: isEmptyObject,
8336 supportsErrorEvent: supportsErrorEvent,
8337 wrappedCallback: wrappedCallback,
8338 each: each,
8339 objectMerge: objectMerge,
8340 truncate: truncate,
8341 objectFrozen: objectFrozen,
8342 hasKey: hasKey,
8343 joinRegExp: joinRegExp,
8344 urlencode: urlencode,
8345 uuid4: uuid4,
8346 htmlTreeAsString: htmlTreeAsString,
8347 htmlElementAsString: htmlElementAsString,
8348 isSameException: isSameException,
8349 isSameStacktrace: isSameStacktrace,
8350 parseUrl: parseUrl,
8351 fill: fill
8352 };
8353
8354
8355 /***/ }),
8356
8357 /***/ "./node_modules/raven-js/vendor/TraceKit/tracekit.js":
8358 /*!***********************************************************!*\
8359 !*** ./node_modules/raven-js/vendor/TraceKit/tracekit.js ***!
8360 \***********************************************************/
8361 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8362
8363 var utils = __webpack_require__(/*! ../../src/utils */ "./node_modules/raven-js/src/utils.js");
8364
8365 /*
8366 TraceKit - Cross brower stack traces
8367
8368 This was originally forked from github.com/occ/TraceKit, but has since been
8369 largely re-written and is now maintained as part of raven-js. Tests for
8370 this are in test/vendor.
8371
8372 MIT license
8373 */
8374
8375 var TraceKit = {
8376 collectWindowErrors: true,
8377 debug: false
8378 };
8379
8380 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
8381 var _window =
8382 typeof window !== 'undefined'
8383 ? window
8384 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
8385
8386 // global reference to slice
8387 var _slice = [].slice;
8388 var UNKNOWN_FUNCTION = '?';
8389
8390 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types
8391 var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;
8392
8393 function getLocationHref() {
8394 if (typeof document === 'undefined' || document.location == null) return '';
8395
8396 return document.location.href;
8397 }
8398
8399 /**
8400 * TraceKit.report: cross-browser processing of unhandled exceptions
8401 *
8402 * Syntax:
8403 * TraceKit.report.subscribe(function(stackInfo) { ... })
8404 * TraceKit.report.unsubscribe(function(stackInfo) { ... })
8405 * TraceKit.report(exception)
8406 * try { ...code... } catch(ex) { TraceKit.report(ex); }
8407 *
8408 * Supports:
8409 * - Firefox: full stack trace with line numbers, plus column number
8410 * on top frame; column number is not guaranteed
8411 * - Opera: full stack trace with line and column numbers
8412 * - Chrome: full stack trace with line and column numbers
8413 * - Safari: line and column number for the top frame only; some frames
8414 * may be missing, and column number is not guaranteed
8415 * - IE: line and column number for the top frame only; some frames
8416 * may be missing, and column number is not guaranteed
8417 *
8418 * In theory, TraceKit should work on all of the following versions:
8419 * - IE5.5+ (only 8.0 tested)
8420 * - Firefox 0.9+ (only 3.5+ tested)
8421 * - Opera 7+ (only 10.50 tested; versions 9 and earlier may require
8422 * Exceptions Have Stacktrace to be enabled in opera:config)
8423 * - Safari 3+ (only 4+ tested)
8424 * - Chrome 1+ (only 5+ tested)
8425 * - Konqueror 3.5+ (untested)
8426 *
8427 * Requires TraceKit.computeStackTrace.
8428 *
8429 * Tries to catch all unhandled exceptions and report them to the
8430 * subscribed handlers. Please note that TraceKit.report will rethrow the
8431 * exception. This is REQUIRED in order to get a useful stack trace in IE.
8432 * If the exception does not reach the top of the browser, you will only
8433 * get a stack trace from the point where TraceKit.report was called.
8434 *
8435 * Handlers receive a stackInfo object as described in the
8436 * TraceKit.computeStackTrace docs.
8437 */
8438 TraceKit.report = (function reportModuleWrapper() {
8439 var handlers = [],
8440 lastArgs = null,
8441 lastException = null,
8442 lastExceptionStack = null;
8443
8444 /**
8445 * Add a crash handler.
8446 * @param {Function} handler
8447 */
8448 function subscribe(handler) {
8449 installGlobalHandler();
8450 handlers.push(handler);
8451 }
8452
8453 /**
8454 * Remove a crash handler.
8455 * @param {Function} handler
8456 */
8457 function unsubscribe(handler) {
8458 for (var i = handlers.length - 1; i >= 0; --i) {
8459 if (handlers[i] === handler) {
8460 handlers.splice(i, 1);
8461 }
8462 }
8463 }
8464
8465 /**
8466 * Remove all crash handlers.
8467 */
8468 function unsubscribeAll() {
8469 uninstallGlobalHandler();
8470 handlers = [];
8471 }
8472
8473 /**
8474 * Dispatch stack information to all handlers.
8475 * @param {Object.<string, *>} stack
8476 */
8477 function notifyHandlers(stack, isWindowError) {
8478 var exception = null;
8479 if (isWindowError && !TraceKit.collectWindowErrors) {
8480 return;
8481 }
8482 for (var i in handlers) {
8483 if (handlers.hasOwnProperty(i)) {
8484 try {
8485 handlers[i].apply(null, [stack].concat(_slice.call(arguments, 2)));
8486 } catch (inner) {
8487 exception = inner;
8488 }
8489 }
8490 }
8491
8492 if (exception) {
8493 throw exception;
8494 }
8495 }
8496
8497 var _oldOnerrorHandler, _onErrorHandlerInstalled;
8498
8499 /**
8500 * Ensures all global unhandled exceptions are recorded.
8501 * Supported by Gecko and IE.
8502 * @param {string} message Error message.
8503 * @param {string} url URL of script that generated the exception.
8504 * @param {(number|string)} lineNo The line number at which the error
8505 * occurred.
8506 * @param {?(number|string)} colNo The column number at which the error
8507 * occurred.
8508 * @param {?Error} ex The actual Error object.
8509 */
8510 function traceKitWindowOnError(message, url, lineNo, colNo, ex) {
8511 var stack = null;
8512
8513 if (lastExceptionStack) {
8514 TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(
8515 lastExceptionStack,
8516 url,
8517 lineNo,
8518 message
8519 );
8520 processLastException();
8521 } else if (ex && utils.isError(ex)) {
8522 // non-string `ex` arg; attempt to extract stack trace
8523
8524 // New chrome and blink send along a real error object
8525 // Let's just report that like a normal error.
8526 // See: https://mikewest.org/2013/08/debugging-runtime-errors-with-window-onerror
8527 stack = TraceKit.computeStackTrace(ex);
8528 notifyHandlers(stack, true);
8529 } else {
8530 var location = {
8531 url: url,
8532 line: lineNo,
8533 column: colNo
8534 };
8535
8536 var name = undefined;
8537 var msg = message; // must be new var or will modify original `arguments`
8538 var groups;
8539 if ({}.toString.call(message) === '[object String]') {
8540 var groups = message.match(ERROR_TYPES_RE);
8541 if (groups) {
8542 name = groups[1];
8543 msg = groups[2];
8544 }
8545 }
8546
8547 location.func = UNKNOWN_FUNCTION;
8548
8549 stack = {
8550 name: name,
8551 message: msg,
8552 url: getLocationHref(),
8553 stack: [location]
8554 };
8555 notifyHandlers(stack, true);
8556 }
8557
8558 if (_oldOnerrorHandler) {
8559 return _oldOnerrorHandler.apply(this, arguments);
8560 }
8561
8562 return false;
8563 }
8564
8565 function installGlobalHandler() {
8566 if (_onErrorHandlerInstalled) {
8567 return;
8568 }
8569 _oldOnerrorHandler = _window.onerror;
8570 _window.onerror = traceKitWindowOnError;
8571 _onErrorHandlerInstalled = true;
8572 }
8573
8574 function uninstallGlobalHandler() {
8575 if (!_onErrorHandlerInstalled) {
8576 return;
8577 }
8578 _window.onerror = _oldOnerrorHandler;
8579 _onErrorHandlerInstalled = false;
8580 _oldOnerrorHandler = undefined;
8581 }
8582
8583 function processLastException() {
8584 var _lastExceptionStack = lastExceptionStack,
8585 _lastArgs = lastArgs;
8586 lastArgs = null;
8587 lastExceptionStack = null;
8588 lastException = null;
8589 notifyHandlers.apply(null, [_lastExceptionStack, false].concat(_lastArgs));
8590 }
8591
8592 /**
8593 * Reports an unhandled Error to TraceKit.
8594 * @param {Error} ex
8595 * @param {?boolean} rethrow If false, do not re-throw the exception.
8596 * Only used for window.onerror to not cause an infinite loop of
8597 * rethrowing.
8598 */
8599 function report(ex, rethrow) {
8600 var args = _slice.call(arguments, 1);
8601 if (lastExceptionStack) {
8602 if (lastException === ex) {
8603 return; // already caught by an inner catch block, ignore
8604 } else {
8605 processLastException();
8606 }
8607 }
8608
8609 var stack = TraceKit.computeStackTrace(ex);
8610 lastExceptionStack = stack;
8611 lastException = ex;
8612 lastArgs = args;
8613
8614 // If the stack trace is incomplete, wait for 2 seconds for
8615 // slow slow IE to see if onerror occurs or not before reporting
8616 // this exception; otherwise, we will end up with an incomplete
8617 // stack trace
8618 setTimeout(function() {
8619 if (lastException === ex) {
8620 processLastException();
8621 }
8622 }, stack.incomplete ? 2000 : 0);
8623
8624 if (rethrow !== false) {
8625 throw ex; // re-throw to propagate to the top level (and cause window.onerror)
8626 }
8627 }
8628
8629 report.subscribe = subscribe;
8630 report.unsubscribe = unsubscribe;
8631 report.uninstall = unsubscribeAll;
8632 return report;
8633 })();
8634
8635 /**
8636 * TraceKit.computeStackTrace: cross-browser stack traces in JavaScript
8637 *
8638 * Syntax:
8639 * s = TraceKit.computeStackTrace(exception) // consider using TraceKit.report instead (see below)
8640 * Returns:
8641 * s.name - exception name
8642 * s.message - exception message
8643 * s.stack[i].url - JavaScript or HTML file URL
8644 * s.stack[i].func - function name, or empty for anonymous functions (if guessing did not work)
8645 * s.stack[i].args - arguments passed to the function, if known
8646 * s.stack[i].line - line number, if known
8647 * s.stack[i].column - column number, if known
8648 *
8649 * Supports:
8650 * - Firefox: full stack trace with line numbers and unreliable column
8651 * number on top frame
8652 * - Opera 10: full stack trace with line and column numbers
8653 * - Opera 9-: full stack trace with line numbers
8654 * - Chrome: full stack trace with line and column numbers
8655 * - Safari: line and column number for the topmost stacktrace element
8656 * only
8657 * - IE: no line numbers whatsoever
8658 *
8659 * Tries to guess names of anonymous functions by looking for assignments
8660 * in the source code. In IE and Safari, we have to guess source file names
8661 * by searching for function bodies inside all page scripts. This will not
8662 * work for scripts that are loaded cross-domain.
8663 * Here be dragons: some function names may be guessed incorrectly, and
8664 * duplicate functions may be mismatched.
8665 *
8666 * TraceKit.computeStackTrace should only be used for tracing purposes.
8667 * Logging of unhandled exceptions should be done with TraceKit.report,
8668 * which builds on top of TraceKit.computeStackTrace and provides better
8669 * IE support by utilizing the window.onerror event to retrieve information
8670 * about the top of the stack.
8671 *
8672 * Note: In IE and Safari, no stack trace is recorded on the Error object,
8673 * so computeStackTrace instead walks its *own* chain of callers.
8674 * This means that:
8675 * * in Safari, some methods may be missing from the stack trace;
8676 * * in IE, the topmost function in the stack trace will always be the
8677 * caller of computeStackTrace.
8678 *
8679 * This is okay for tracing (because you are likely to be calling
8680 * computeStackTrace from the function you want to be the topmost element
8681 * of the stack trace anyway), but not okay for logging unhandled
8682 * exceptions (because your catch block will likely be far away from the
8683 * inner function that actually caused the exception).
8684 *
8685 */
8686 TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
8687 // Contents of Exception in various browsers.
8688 //
8689 // SAFARI:
8690 // ex.message = Can't find variable: qq
8691 // ex.line = 59
8692 // ex.sourceId = 580238192
8693 // ex.sourceURL = http://...
8694 // ex.expressionBeginOffset = 96
8695 // ex.expressionCaretOffset = 98
8696 // ex.expressionEndOffset = 98
8697 // ex.name = ReferenceError
8698 //
8699 // FIREFOX:
8700 // ex.message = qq is not defined
8701 // ex.fileName = http://...
8702 // ex.lineNumber = 59
8703 // ex.columnNumber = 69
8704 // ex.stack = ...stack trace... (see the example below)
8705 // ex.name = ReferenceError
8706 //
8707 // CHROME:
8708 // ex.message = qq is not defined
8709 // ex.name = ReferenceError
8710 // ex.type = not_defined
8711 // ex.arguments = ['aa']
8712 // ex.stack = ...stack trace...
8713 //
8714 // INTERNET EXPLORER:
8715 // ex.message = ...
8716 // ex.name = ReferenceError
8717 //
8718 // OPERA:
8719 // ex.message = ...message... (see the example below)
8720 // ex.name = ReferenceError
8721 // ex.opera#sourceloc = 11 (pretty much useless, duplicates the info in ex.message)
8722 // ex.stacktrace = n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'
8723
8724 /**
8725 * Computes stack trace information from the stack property.
8726 * Chrome and Gecko use this property.
8727 * @param {Error} ex
8728 * @return {?Object.<string, *>} Stack trace information.
8729 */
8730 function computeStackTraceFromStackProp(ex) {
8731 if (typeof ex.stack === 'undefined' || !ex.stack) return;
8732
8733 var chrome = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,
8734 gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,
8735 winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,
8736 // Used to additionally parse URL/line/column from eval frames
8737 geckoEval = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i,
8738 chromeEval = /\((\S*)(?::(\d+))(?::(\d+))\)/,
8739 lines = ex.stack.split('\n'),
8740 stack = [],
8741 submatch,
8742 parts,
8743 element,
8744 reference = /^(.*) is undefined$/.exec(ex.message);
8745
8746 for (var i = 0, j = lines.length; i < j; ++i) {
8747 if ((parts = chrome.exec(lines[i]))) {
8748 var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line
8749 var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line
8750 if (isEval && (submatch = chromeEval.exec(parts[2]))) {
8751 // throw out eval line/column and use top-most line/column number
8752 parts[2] = submatch[1]; // url
8753 parts[3] = submatch[2]; // line
8754 parts[4] = submatch[3]; // column
8755 }
8756 element = {
8757 url: !isNative ? parts[2] : null,
8758 func: parts[1] || UNKNOWN_FUNCTION,
8759 args: isNative ? [parts[2]] : [],
8760 line: parts[3] ? +parts[3] : null,
8761 column: parts[4] ? +parts[4] : null
8762 };
8763 } else if ((parts = winjs.exec(lines[i]))) {
8764 element = {
8765 url: parts[2],
8766 func: parts[1] || UNKNOWN_FUNCTION,
8767 args: [],
8768 line: +parts[3],
8769 column: parts[4] ? +parts[4] : null
8770 };
8771 } else if ((parts = gecko.exec(lines[i]))) {
8772 var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;
8773 if (isEval && (submatch = geckoEval.exec(parts[3]))) {
8774 // throw out eval line/column and use top-most line number
8775 parts[3] = submatch[1];
8776 parts[4] = submatch[2];
8777 parts[5] = null; // no column when eval
8778 } else if (i === 0 && !parts[5] && typeof ex.columnNumber !== 'undefined') {
8779 // FireFox uses this awesome columnNumber property for its top frame
8780 // Also note, Firefox's column number is 0-based and everything else expects 1-based,
8781 // so adding 1
8782 // NOTE: this hack doesn't work if top-most frame is eval
8783 stack[0].column = ex.columnNumber + 1;
8784 }
8785 element = {
8786 url: parts[3],
8787 func: parts[1] || UNKNOWN_FUNCTION,
8788 args: parts[2] ? parts[2].split(',') : [],
8789 line: parts[4] ? +parts[4] : null,
8790 column: parts[5] ? +parts[5] : null
8791 };
8792 } else {
8793 continue;
8794 }
8795
8796 if (!element.func && element.line) {
8797 element.func = UNKNOWN_FUNCTION;
8798 }
8799
8800 stack.push(element);
8801 }
8802
8803 if (!stack.length) {
8804 return null;
8805 }
8806
8807 return {
8808 name: ex.name,
8809 message: ex.message,
8810 url: getLocationHref(),
8811 stack: stack
8812 };
8813 }
8814
8815 /**
8816 * Adds information about the first frame to incomplete stack traces.
8817 * Safari and IE require this to get complete data on the first frame.
8818 * @param {Object.<string, *>} stackInfo Stack trace information from
8819 * one of the compute* methods.
8820 * @param {string} url The URL of the script that caused an error.
8821 * @param {(number|string)} lineNo The line number of the script that
8822 * caused an error.
8823 * @param {string=} message The error generated by the browser, which
8824 * hopefully contains the name of the object that caused the error.
8825 * @return {boolean} Whether or not the stack information was
8826 * augmented.
8827 */
8828 function augmentStackTraceWithInitialElement(stackInfo, url, lineNo, message) {
8829 var initial = {
8830 url: url,
8831 line: lineNo
8832 };
8833
8834 if (initial.url && initial.line) {
8835 stackInfo.incomplete = false;
8836
8837 if (!initial.func) {
8838 initial.func = UNKNOWN_FUNCTION;
8839 }
8840
8841 if (stackInfo.stack.length > 0) {
8842 if (stackInfo.stack[0].url === initial.url) {
8843 if (stackInfo.stack[0].line === initial.line) {
8844 return false; // already in stack trace
8845 } else if (
8846 !stackInfo.stack[0].line &&
8847 stackInfo.stack[0].func === initial.func
8848 ) {
8849 stackInfo.stack[0].line = initial.line;
8850 return false;
8851 }
8852 }
8853 }
8854
8855 stackInfo.stack.unshift(initial);
8856 stackInfo.partial = true;
8857 return true;
8858 } else {
8859 stackInfo.incomplete = true;
8860 }
8861
8862 return false;
8863 }
8864
8865 /**
8866 * Computes stack trace information by walking the arguments.caller
8867 * chain at the time the exception occurred. This will cause earlier
8868 * frames to be missed but is the only way to get any stack trace in
8869 * Safari and IE. The top frame is restored by
8870 * {@link augmentStackTraceWithInitialElement}.
8871 * @param {Error} ex
8872 * @return {?Object.<string, *>} Stack trace information.
8873 */
8874 function computeStackTraceByWalkingCallerChain(ex, depth) {
8875 var functionName = /function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,
8876 stack = [],
8877 funcs = {},
8878 recursion = false,
8879 parts,
8880 item,
8881 source;
8882
8883 for (
8884 var curr = computeStackTraceByWalkingCallerChain.caller;
8885 curr && !recursion;
8886 curr = curr.caller
8887 ) {
8888 if (curr === computeStackTrace || curr === TraceKit.report) {
8889 // console.log('skipping internal function');
8890 continue;
8891 }
8892
8893 item = {
8894 url: null,
8895 func: UNKNOWN_FUNCTION,
8896 line: null,
8897 column: null
8898 };
8899
8900 if (curr.name) {
8901 item.func = curr.name;
8902 } else if ((parts = functionName.exec(curr.toString()))) {
8903 item.func = parts[1];
8904 }
8905
8906 if (typeof item.func === 'undefined') {
8907 try {
8908 item.func = parts.input.substring(0, parts.input.indexOf('{'));
8909 } catch (e) {}
8910 }
8911
8912 if (funcs['' + curr]) {
8913 recursion = true;
8914 } else {
8915 funcs['' + curr] = true;
8916 }
8917
8918 stack.push(item);
8919 }
8920
8921 if (depth) {
8922 // console.log('depth is ' + depth);
8923 // console.log('stack is ' + stack.length);
8924 stack.splice(0, depth);
8925 }
8926
8927 var result = {
8928 name: ex.name,
8929 message: ex.message,
8930 url: getLocationHref(),
8931 stack: stack
8932 };
8933 augmentStackTraceWithInitialElement(
8934 result,
8935 ex.sourceURL || ex.fileName,
8936 ex.line || ex.lineNumber,
8937 ex.message || ex.description
8938 );
8939 return result;
8940 }
8941
8942 /**
8943 * Computes a stack trace for an exception.
8944 * @param {Error} ex
8945 * @param {(string|number)=} depth
8946 */
8947 function computeStackTrace(ex, depth) {
8948 var stack = null;
8949 depth = depth == null ? 0 : +depth;
8950
8951 try {
8952 stack = computeStackTraceFromStackProp(ex);
8953 if (stack) {
8954 return stack;
8955 }
8956 } catch (e) {
8957 if (TraceKit.debug) {
8958 throw e;
8959 }
8960 }
8961
8962 try {
8963 stack = computeStackTraceByWalkingCallerChain(ex, depth + 1);
8964 if (stack) {
8965 return stack;
8966 }
8967 } catch (e) {
8968 if (TraceKit.debug) {
8969 throw e;
8970 }
8971 }
8972 return {
8973 name: ex.name,
8974 message: ex.message,
8975 url: getLocationHref()
8976 };
8977 }
8978
8979 computeStackTrace.augmentStackTraceWithInitialElement = augmentStackTraceWithInitialElement;
8980 computeStackTrace.computeStackTraceFromStackProp = computeStackTraceFromStackProp;
8981
8982 return computeStackTrace;
8983 })();
8984
8985 module.exports = TraceKit;
8986
8987
8988 /***/ }),
8989
8990 /***/ "./node_modules/raven-js/vendor/json-stringify-safe/stringify.js":
8991 /*!***********************************************************************!*\
8992 !*** ./node_modules/raven-js/vendor/json-stringify-safe/stringify.js ***!
8993 \***********************************************************************/
8994 /***/ ((module, exports) => {
8995
8996 /*
8997 json-stringify-safe
8998 Like JSON.stringify, but doesn't throw on circular references.
8999
9000 Originally forked from https://github.com/isaacs/json-stringify-safe
9001 version 5.0.1 on 3/8/2017 and modified to handle Errors serialization
9002 and IE8 compatibility. Tests for this are in test/vendor.
9003
9004 ISC license: https://github.com/isaacs/json-stringify-safe/blob/master/LICENSE
9005 */
9006
9007 exports = module.exports = stringify;
9008 exports.getSerialize = serializer;
9009
9010 function indexOf(haystack, needle) {
9011 for (var i = 0; i < haystack.length; ++i) {
9012 if (haystack[i] === needle) return i;
9013 }
9014 return -1;
9015 }
9016
9017 function stringify(obj, replacer, spaces, cycleReplacer) {
9018 return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces);
9019 }
9020
9021 // https://github.com/ftlabs/js-abbreviate/blob/fa709e5f139e7770a71827b1893f22418097fbda/index.js#L95-L106
9022 function stringifyError(value) {
9023 var err = {
9024 // These properties are implemented as magical getters and don't show up in for in
9025 stack: value.stack,
9026 message: value.message,
9027 name: value.name
9028 };
9029
9030 for (var i in value) {
9031 if (Object.prototype.hasOwnProperty.call(value, i)) {
9032 err[i] = value[i];
9033 }
9034 }
9035
9036 return err;
9037 }
9038
9039 function serializer(replacer, cycleReplacer) {
9040 var stack = [];
9041 var keys = [];
9042
9043 if (cycleReplacer == null) {
9044 cycleReplacer = function(key, value) {
9045 if (stack[0] === value) {
9046 return '[Circular ~]';
9047 }
9048 return '[Circular ~.' + keys.slice(0, indexOf(stack, value)).join('.') + ']';
9049 };
9050 }
9051
9052 return function(key, value) {
9053 if (stack.length > 0) {
9054 var thisPos = indexOf(stack, this);
9055 ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
9056 ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
9057
9058 if (~indexOf(stack, value)) {
9059 value = cycleReplacer.call(this, key, value);
9060 }
9061 } else {
9062 stack.push(value);
9063 }
9064
9065 return replacer == null
9066 ? value instanceof Error ? stringifyError(value) : value
9067 : replacer.call(this, key, value);
9068 };
9069 }
9070
9071
9072 /***/ }),
9073
9074 /***/ "./node_modules/react-is/cjs/react-is.development.js":
9075 /*!***********************************************************!*\
9076 !*** ./node_modules/react-is/cjs/react-is.development.js ***!
9077 \***********************************************************/
9078 /***/ ((__unused_webpack_module, exports) => {
9079
9080 "use strict";
9081 /** @license React v16.13.1
9082 * react-is.development.js
9083 *
9084 * Copyright (c) Facebook, Inc. and its affiliates.
9085 *
9086 * This source code is licensed under the MIT license found in the
9087 * LICENSE file in the root directory of this source tree.
9088 */
9089
9090
9091
9092
9093
9094 if (true) {
9095 (function() {
9096 'use strict';
9097
9098 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
9099 // nor polyfill, then a plain number is used for performance.
9100 var hasSymbol = typeof Symbol === 'function' && Symbol.for;
9101 var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
9102 var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
9103 var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
9104 var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
9105 var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
9106 var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
9107 var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
9108 // (unstable) APIs that have been removed. Can we remove the symbols?
9109
9110 var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
9111 var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
9112 var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
9113 var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
9114 var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
9115 var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
9116 var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
9117 var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
9118 var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
9119 var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
9120 var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
9121
9122 function isValidElementType(type) {
9123 return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
9124 type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
9125 }
9126
9127 function typeOf(object) {
9128 if (typeof object === 'object' && object !== null) {
9129 var $$typeof = object.$$typeof;
9130
9131 switch ($$typeof) {
9132 case REACT_ELEMENT_TYPE:
9133 var type = object.type;
9134
9135 switch (type) {
9136 case REACT_ASYNC_MODE_TYPE:
9137 case REACT_CONCURRENT_MODE_TYPE:
9138 case REACT_FRAGMENT_TYPE:
9139 case REACT_PROFILER_TYPE:
9140 case REACT_STRICT_MODE_TYPE:
9141 case REACT_SUSPENSE_TYPE:
9142 return type;
9143
9144 default:
9145 var $$typeofType = type && type.$$typeof;
9146
9147 switch ($$typeofType) {
9148 case REACT_CONTEXT_TYPE:
9149 case REACT_FORWARD_REF_TYPE:
9150 case REACT_LAZY_TYPE:
9151 case REACT_MEMO_TYPE:
9152 case REACT_PROVIDER_TYPE:
9153 return $$typeofType;
9154
9155 default:
9156 return $$typeof;
9157 }
9158
9159 }
9160
9161 case REACT_PORTAL_TYPE:
9162 return $$typeof;
9163 }
9164 }
9165
9166 return undefined;
9167 } // AsyncMode is deprecated along with isAsyncMode
9168
9169 var AsyncMode = REACT_ASYNC_MODE_TYPE;
9170 var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
9171 var ContextConsumer = REACT_CONTEXT_TYPE;
9172 var ContextProvider = REACT_PROVIDER_TYPE;
9173 var Element = REACT_ELEMENT_TYPE;
9174 var ForwardRef = REACT_FORWARD_REF_TYPE;
9175 var Fragment = REACT_FRAGMENT_TYPE;
9176 var Lazy = REACT_LAZY_TYPE;
9177 var Memo = REACT_MEMO_TYPE;
9178 var Portal = REACT_PORTAL_TYPE;
9179 var Profiler = REACT_PROFILER_TYPE;
9180 var StrictMode = REACT_STRICT_MODE_TYPE;
9181 var Suspense = REACT_SUSPENSE_TYPE;
9182 var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
9183
9184 function isAsyncMode(object) {
9185 {
9186 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
9187 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
9188
9189 console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
9190 }
9191 }
9192
9193 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
9194 }
9195 function isConcurrentMode(object) {
9196 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
9197 }
9198 function isContextConsumer(object) {
9199 return typeOf(object) === REACT_CONTEXT_TYPE;
9200 }
9201 function isContextProvider(object) {
9202 return typeOf(object) === REACT_PROVIDER_TYPE;
9203 }
9204 function isElement(object) {
9205 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
9206 }
9207 function isForwardRef(object) {
9208 return typeOf(object) === REACT_FORWARD_REF_TYPE;
9209 }
9210 function isFragment(object) {
9211 return typeOf(object) === REACT_FRAGMENT_TYPE;
9212 }
9213 function isLazy(object) {
9214 return typeOf(object) === REACT_LAZY_TYPE;
9215 }
9216 function isMemo(object) {
9217 return typeOf(object) === REACT_MEMO_TYPE;
9218 }
9219 function isPortal(object) {
9220 return typeOf(object) === REACT_PORTAL_TYPE;
9221 }
9222 function isProfiler(object) {
9223 return typeOf(object) === REACT_PROFILER_TYPE;
9224 }
9225 function isStrictMode(object) {
9226 return typeOf(object) === REACT_STRICT_MODE_TYPE;
9227 }
9228 function isSuspense(object) {
9229 return typeOf(object) === REACT_SUSPENSE_TYPE;
9230 }
9231
9232 exports.AsyncMode = AsyncMode;
9233 exports.ConcurrentMode = ConcurrentMode;
9234 exports.ContextConsumer = ContextConsumer;
9235 exports.ContextProvider = ContextProvider;
9236 exports.Element = Element;
9237 exports.ForwardRef = ForwardRef;
9238 exports.Fragment = Fragment;
9239 exports.Lazy = Lazy;
9240 exports.Memo = Memo;
9241 exports.Portal = Portal;
9242 exports.Profiler = Profiler;
9243 exports.StrictMode = StrictMode;
9244 exports.Suspense = Suspense;
9245 exports.isAsyncMode = isAsyncMode;
9246 exports.isConcurrentMode = isConcurrentMode;
9247 exports.isContextConsumer = isContextConsumer;
9248 exports.isContextProvider = isContextProvider;
9249 exports.isElement = isElement;
9250 exports.isForwardRef = isForwardRef;
9251 exports.isFragment = isFragment;
9252 exports.isLazy = isLazy;
9253 exports.isMemo = isMemo;
9254 exports.isPortal = isPortal;
9255 exports.isProfiler = isProfiler;
9256 exports.isStrictMode = isStrictMode;
9257 exports.isSuspense = isSuspense;
9258 exports.isValidElementType = isValidElementType;
9259 exports.typeOf = typeOf;
9260 })();
9261 }
9262
9263
9264 /***/ }),
9265
9266 /***/ "./node_modules/react-is/index.js":
9267 /*!****************************************!*\
9268 !*** ./node_modules/react-is/index.js ***!
9269 \****************************************/
9270 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
9271
9272 "use strict";
9273
9274
9275 if (false) {} else {
9276 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js");
9277 }
9278
9279
9280 /***/ }),
9281
9282 /***/ "./node_modules/react/cjs/react-jsx-runtime.development.js":
9283 /*!*****************************************************************!*\
9284 !*** ./node_modules/react/cjs/react-jsx-runtime.development.js ***!
9285 \*****************************************************************/
9286 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9287
9288 "use strict";
9289 /**
9290 * @license React
9291 * react-jsx-runtime.development.js
9292 *
9293 * Copyright (c) Facebook, Inc. and its affiliates.
9294 *
9295 * This source code is licensed under the MIT license found in the
9296 * LICENSE file in the root directory of this source tree.
9297 */
9298
9299
9300
9301 if (true) {
9302 (function() {
9303 'use strict';
9304
9305 var React = __webpack_require__(/*! react */ "react");
9306
9307 // ATTENTION
9308 // When adding new symbols to this file,
9309 // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
9310 // The Symbol used to tag the ReactElement-like types.
9311 var REACT_ELEMENT_TYPE = Symbol.for('react.element');
9312 var REACT_PORTAL_TYPE = Symbol.for('react.portal');
9313 var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
9314 var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
9315 var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
9316 var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
9317 var REACT_CONTEXT_TYPE = Symbol.for('react.context');
9318 var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
9319 var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
9320 var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
9321 var REACT_MEMO_TYPE = Symbol.for('react.memo');
9322 var REACT_LAZY_TYPE = Symbol.for('react.lazy');
9323 var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
9324 var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
9325 var FAUX_ITERATOR_SYMBOL = '@@iterator';
9326 function getIteratorFn(maybeIterable) {
9327 if (maybeIterable === null || typeof maybeIterable !== 'object') {
9328 return null;
9329 }
9330
9331 var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
9332
9333 if (typeof maybeIterator === 'function') {
9334 return maybeIterator;
9335 }
9336
9337 return null;
9338 }
9339
9340 var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
9341
9342 function error(format) {
9343 {
9344 {
9345 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
9346 args[_key2 - 1] = arguments[_key2];
9347 }
9348
9349 printWarning('error', format, args);
9350 }
9351 }
9352 }
9353
9354 function printWarning(level, format, args) {
9355 // When changing this logic, you might want to also
9356 // update consoleWithStackDev.www.js as well.
9357 {
9358 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
9359 var stack = ReactDebugCurrentFrame.getStackAddendum();
9360
9361 if (stack !== '') {
9362 format += '%s';
9363 args = args.concat([stack]);
9364 } // eslint-disable-next-line react-internal/safe-string-coercion
9365
9366
9367 var argsWithFormat = args.map(function (item) {
9368 return String(item);
9369 }); // Careful: RN currently depends on this prefix
9370
9371 argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
9372 // breaks IE9: https://github.com/facebook/react/issues/13610
9373 // eslint-disable-next-line react-internal/no-production-logging
9374
9375 Function.prototype.apply.call(console[level], console, argsWithFormat);
9376 }
9377 }
9378
9379 // -----------------------------------------------------------------------------
9380
9381 var enableScopeAPI = false; // Experimental Create Event Handle API.
9382 var enableCacheElement = false;
9383 var enableTransitionTracing = false; // No known bugs, but needs performance testing
9384
9385 var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
9386 // stuff. Intended to enable React core members to more easily debug scheduling
9387 // issues in DEV builds.
9388
9389 var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
9390
9391 var REACT_MODULE_REFERENCE;
9392
9393 {
9394 REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
9395 }
9396
9397 function isValidElementType(type) {
9398 if (typeof type === 'string' || typeof type === 'function') {
9399 return true;
9400 } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
9401
9402
9403 if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
9404 return true;
9405 }
9406
9407 if (typeof type === 'object' && type !== null) {
9408 if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
9409 // types supported by any Flight configuration anywhere since
9410 // we don't know which Flight build this will end up being used
9411 // with.
9412 type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
9413 return true;
9414 }
9415 }
9416
9417 return false;
9418 }
9419
9420 function getWrappedName(outerType, innerType, wrapperName) {
9421 var displayName = outerType.displayName;
9422
9423 if (displayName) {
9424 return displayName;
9425 }
9426
9427 var functionName = innerType.displayName || innerType.name || '';
9428 return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
9429 } // Keep in sync with react-reconciler/getComponentNameFromFiber
9430
9431
9432 function getContextName(type) {
9433 return type.displayName || 'Context';
9434 } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
9435
9436
9437 function getComponentNameFromType(type) {
9438 if (type == null) {
9439 // Host root, text node or just invalid type.
9440 return null;
9441 }
9442
9443 {
9444 if (typeof type.tag === 'number') {
9445 error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
9446 }
9447 }
9448
9449 if (typeof type === 'function') {
9450 return type.displayName || type.name || null;
9451 }
9452
9453 if (typeof type === 'string') {
9454 return type;
9455 }
9456
9457 switch (type) {
9458 case REACT_FRAGMENT_TYPE:
9459 return 'Fragment';
9460
9461 case REACT_PORTAL_TYPE:
9462 return 'Portal';
9463
9464 case REACT_PROFILER_TYPE:
9465 return 'Profiler';
9466
9467 case REACT_STRICT_MODE_TYPE:
9468 return 'StrictMode';
9469
9470 case REACT_SUSPENSE_TYPE:
9471 return 'Suspense';
9472
9473 case REACT_SUSPENSE_LIST_TYPE:
9474 return 'SuspenseList';
9475
9476 }
9477
9478 if (typeof type === 'object') {
9479 switch (type.$$typeof) {
9480 case REACT_CONTEXT_TYPE:
9481 var context = type;
9482 return getContextName(context) + '.Consumer';
9483
9484 case REACT_PROVIDER_TYPE:
9485 var provider = type;
9486 return getContextName(provider._context) + '.Provider';
9487
9488 case REACT_FORWARD_REF_TYPE:
9489 return getWrappedName(type, type.render, 'ForwardRef');
9490
9491 case REACT_MEMO_TYPE:
9492 var outerName = type.displayName || null;
9493
9494 if (outerName !== null) {
9495 return outerName;
9496 }
9497
9498 return getComponentNameFromType(type.type) || 'Memo';
9499
9500 case REACT_LAZY_TYPE:
9501 {
9502 var lazyComponent = type;
9503 var payload = lazyComponent._payload;
9504 var init = lazyComponent._init;
9505
9506 try {
9507 return getComponentNameFromType(init(payload));
9508 } catch (x) {
9509 return null;
9510 }
9511 }
9512
9513 // eslint-disable-next-line no-fallthrough
9514 }
9515 }
9516
9517 return null;
9518 }
9519
9520 var assign = Object.assign;
9521
9522 // Helpers to patch console.logs to avoid logging during side-effect free
9523 // replaying on render function. This currently only patches the object
9524 // lazily which won't cover if the log function was extracted eagerly.
9525 // We could also eagerly patch the method.
9526 var disabledDepth = 0;
9527 var prevLog;
9528 var prevInfo;
9529 var prevWarn;
9530 var prevError;
9531 var prevGroup;
9532 var prevGroupCollapsed;
9533 var prevGroupEnd;
9534
9535 function disabledLog() {}
9536
9537 disabledLog.__reactDisabledLog = true;
9538 function disableLogs() {
9539 {
9540 if (disabledDepth === 0) {
9541 /* eslint-disable react-internal/no-production-logging */
9542 prevLog = console.log;
9543 prevInfo = console.info;
9544 prevWarn = console.warn;
9545 prevError = console.error;
9546 prevGroup = console.group;
9547 prevGroupCollapsed = console.groupCollapsed;
9548 prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
9549
9550 var props = {
9551 configurable: true,
9552 enumerable: true,
9553 value: disabledLog,
9554 writable: true
9555 }; // $FlowFixMe Flow thinks console is immutable.
9556
9557 Object.defineProperties(console, {
9558 info: props,
9559 log: props,
9560 warn: props,
9561 error: props,
9562 group: props,
9563 groupCollapsed: props,
9564 groupEnd: props
9565 });
9566 /* eslint-enable react-internal/no-production-logging */
9567 }
9568
9569 disabledDepth++;
9570 }
9571 }
9572 function reenableLogs() {
9573 {
9574 disabledDepth--;
9575
9576 if (disabledDepth === 0) {
9577 /* eslint-disable react-internal/no-production-logging */
9578 var props = {
9579 configurable: true,
9580 enumerable: true,
9581 writable: true
9582 }; // $FlowFixMe Flow thinks console is immutable.
9583
9584 Object.defineProperties(console, {
9585 log: assign({}, props, {
9586 value: prevLog
9587 }),
9588 info: assign({}, props, {
9589 value: prevInfo
9590 }),
9591 warn: assign({}, props, {
9592 value: prevWarn
9593 }),
9594 error: assign({}, props, {
9595 value: prevError
9596 }),
9597 group: assign({}, props, {
9598 value: prevGroup
9599 }),
9600 groupCollapsed: assign({}, props, {
9601 value: prevGroupCollapsed
9602 }),
9603 groupEnd: assign({}, props, {
9604 value: prevGroupEnd
9605 })
9606 });
9607 /* eslint-enable react-internal/no-production-logging */
9608 }
9609
9610 if (disabledDepth < 0) {
9611 error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
9612 }
9613 }
9614 }
9615
9616 var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
9617 var prefix;
9618 function describeBuiltInComponentFrame(name, source, ownerFn) {
9619 {
9620 if (prefix === undefined) {
9621 // Extract the VM specific prefix used by each line.
9622 try {
9623 throw Error();
9624 } catch (x) {
9625 var match = x.stack.trim().match(/\n( *(at )?)/);
9626 prefix = match && match[1] || '';
9627 }
9628 } // We use the prefix to ensure our stacks line up with native stack frames.
9629
9630
9631 return '\n' + prefix + name;
9632 }
9633 }
9634 var reentry = false;
9635 var componentFrameCache;
9636
9637 {
9638 var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
9639 componentFrameCache = new PossiblyWeakMap();
9640 }
9641
9642 function describeNativeComponentFrame(fn, construct) {
9643 // If something asked for a stack inside a fake render, it should get ignored.
9644 if ( !fn || reentry) {
9645 return '';
9646 }
9647
9648 {
9649 var frame = componentFrameCache.get(fn);
9650
9651 if (frame !== undefined) {
9652 return frame;
9653 }
9654 }
9655
9656 var control;
9657 reentry = true;
9658 var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
9659
9660 Error.prepareStackTrace = undefined;
9661 var previousDispatcher;
9662
9663 {
9664 previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
9665 // for warnings.
9666
9667 ReactCurrentDispatcher.current = null;
9668 disableLogs();
9669 }
9670
9671 try {
9672 // This should throw.
9673 if (construct) {
9674 // Something should be setting the props in the constructor.
9675 var Fake = function () {
9676 throw Error();
9677 }; // $FlowFixMe
9678
9679
9680 Object.defineProperty(Fake.prototype, 'props', {
9681 set: function () {
9682 // We use a throwing setter instead of frozen or non-writable props
9683 // because that won't throw in a non-strict mode function.
9684 throw Error();
9685 }
9686 });
9687
9688 if (typeof Reflect === 'object' && Reflect.construct) {
9689 // We construct a different control for this case to include any extra
9690 // frames added by the construct call.
9691 try {
9692 Reflect.construct(Fake, []);
9693 } catch (x) {
9694 control = x;
9695 }
9696
9697 Reflect.construct(fn, [], Fake);
9698 } else {
9699 try {
9700 Fake.call();
9701 } catch (x) {
9702 control = x;
9703 }
9704
9705 fn.call(Fake.prototype);
9706 }
9707 } else {
9708 try {
9709 throw Error();
9710 } catch (x) {
9711 control = x;
9712 }
9713
9714 fn();
9715 }
9716 } catch (sample) {
9717 // This is inlined manually because closure doesn't do it for us.
9718 if (sample && control && typeof sample.stack === 'string') {
9719 // This extracts the first frame from the sample that isn't also in the control.
9720 // Skipping one frame that we assume is the frame that calls the two.
9721 var sampleLines = sample.stack.split('\n');
9722 var controlLines = control.stack.split('\n');
9723 var s = sampleLines.length - 1;
9724 var c = controlLines.length - 1;
9725
9726 while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
9727 // We expect at least one stack frame to be shared.
9728 // Typically this will be the root most one. However, stack frames may be
9729 // cut off due to maximum stack limits. In this case, one maybe cut off
9730 // earlier than the other. We assume that the sample is longer or the same
9731 // and there for cut off earlier. So we should find the root most frame in
9732 // the sample somewhere in the control.
9733 c--;
9734 }
9735
9736 for (; s >= 1 && c >= 0; s--, c--) {
9737 // Next we find the first one that isn't the same which should be the
9738 // frame that called our sample function and the control.
9739 if (sampleLines[s] !== controlLines[c]) {
9740 // In V8, the first line is describing the message but other VMs don't.
9741 // If we're about to return the first line, and the control is also on the same
9742 // line, that's a pretty good indicator that our sample threw at same line as
9743 // the control. I.e. before we entered the sample frame. So we ignore this result.
9744 // This can happen if you passed a class to function component, or non-function.
9745 if (s !== 1 || c !== 1) {
9746 do {
9747 s--;
9748 c--; // We may still have similar intermediate frames from the construct call.
9749 // The next one that isn't the same should be our match though.
9750
9751 if (c < 0 || sampleLines[s] !== controlLines[c]) {
9752 // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
9753 var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
9754 // but we have a user-provided "displayName"
9755 // splice it in to make the stack more readable.
9756
9757
9758 if (fn.displayName && _frame.includes('<anonymous>')) {
9759 _frame = _frame.replace('<anonymous>', fn.displayName);
9760 }
9761
9762 {
9763 if (typeof fn === 'function') {
9764 componentFrameCache.set(fn, _frame);
9765 }
9766 } // Return the line we found.
9767
9768
9769 return _frame;
9770 }
9771 } while (s >= 1 && c >= 0);
9772 }
9773
9774 break;
9775 }
9776 }
9777 }
9778 } finally {
9779 reentry = false;
9780
9781 {
9782 ReactCurrentDispatcher.current = previousDispatcher;
9783 reenableLogs();
9784 }
9785
9786 Error.prepareStackTrace = previousPrepareStackTrace;
9787 } // Fallback to just using the name if we couldn't make it throw.
9788
9789
9790 var name = fn ? fn.displayName || fn.name : '';
9791 var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
9792
9793 {
9794 if (typeof fn === 'function') {
9795 componentFrameCache.set(fn, syntheticFrame);
9796 }
9797 }
9798
9799 return syntheticFrame;
9800 }
9801 function describeFunctionComponentFrame(fn, source, ownerFn) {
9802 {
9803 return describeNativeComponentFrame(fn, false);
9804 }
9805 }
9806
9807 function shouldConstruct(Component) {
9808 var prototype = Component.prototype;
9809 return !!(prototype && prototype.isReactComponent);
9810 }
9811
9812 function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
9813
9814 if (type == null) {
9815 return '';
9816 }
9817
9818 if (typeof type === 'function') {
9819 {
9820 return describeNativeComponentFrame(type, shouldConstruct(type));
9821 }
9822 }
9823
9824 if (typeof type === 'string') {
9825 return describeBuiltInComponentFrame(type);
9826 }
9827
9828 switch (type) {
9829 case REACT_SUSPENSE_TYPE:
9830 return describeBuiltInComponentFrame('Suspense');
9831
9832 case REACT_SUSPENSE_LIST_TYPE:
9833 return describeBuiltInComponentFrame('SuspenseList');
9834 }
9835
9836 if (typeof type === 'object') {
9837 switch (type.$$typeof) {
9838 case REACT_FORWARD_REF_TYPE:
9839 return describeFunctionComponentFrame(type.render);
9840
9841 case REACT_MEMO_TYPE:
9842 // Memo may contain any component type so we recursively resolve it.
9843 return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
9844
9845 case REACT_LAZY_TYPE:
9846 {
9847 var lazyComponent = type;
9848 var payload = lazyComponent._payload;
9849 var init = lazyComponent._init;
9850
9851 try {
9852 // Lazy may contain any component type so we recursively resolve it.
9853 return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
9854 } catch (x) {}
9855 }
9856 }
9857 }
9858
9859 return '';
9860 }
9861
9862 var hasOwnProperty = Object.prototype.hasOwnProperty;
9863
9864 var loggedTypeFailures = {};
9865 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
9866
9867 function setCurrentlyValidatingElement(element) {
9868 {
9869 if (element) {
9870 var owner = element._owner;
9871 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
9872 ReactDebugCurrentFrame.setExtraStackFrame(stack);
9873 } else {
9874 ReactDebugCurrentFrame.setExtraStackFrame(null);
9875 }
9876 }
9877 }
9878
9879 function checkPropTypes(typeSpecs, values, location, componentName, element) {
9880 {
9881 // $FlowFixMe This is okay but Flow doesn't know it.
9882 var has = Function.call.bind(hasOwnProperty);
9883
9884 for (var typeSpecName in typeSpecs) {
9885 if (has(typeSpecs, typeSpecName)) {
9886 var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
9887 // fail the render phase where it didn't fail before. So we log it.
9888 // After these have been cleaned up, we'll let them throw.
9889
9890 try {
9891 // This is intentionally an invariant that gets caught. It's the same
9892 // behavior as without this statement except with a better message.
9893 if (typeof typeSpecs[typeSpecName] !== 'function') {
9894 // eslint-disable-next-line react-internal/prod-error-codes
9895 var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
9896 err.name = 'Invariant Violation';
9897 throw err;
9898 }
9899
9900 error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
9901 } catch (ex) {
9902 error$1 = ex;
9903 }
9904
9905 if (error$1 && !(error$1 instanceof Error)) {
9906 setCurrentlyValidatingElement(element);
9907
9908 error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
9909
9910 setCurrentlyValidatingElement(null);
9911 }
9912
9913 if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
9914 // Only monitor this failure once because there tends to be a lot of the
9915 // same error.
9916 loggedTypeFailures[error$1.message] = true;
9917 setCurrentlyValidatingElement(element);
9918
9919 error('Failed %s type: %s', location, error$1.message);
9920
9921 setCurrentlyValidatingElement(null);
9922 }
9923 }
9924 }
9925 }
9926 }
9927
9928 var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
9929
9930 function isArray(a) {
9931 return isArrayImpl(a);
9932 }
9933
9934 /*
9935 * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
9936 * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
9937 *
9938 * The functions in this module will throw an easier-to-understand,
9939 * easier-to-debug exception with a clear errors message message explaining the
9940 * problem. (Instead of a confusing exception thrown inside the implementation
9941 * of the `value` object).
9942 */
9943 // $FlowFixMe only called in DEV, so void return is not possible.
9944 function typeName(value) {
9945 {
9946 // toStringTag is needed for namespaced types like Temporal.Instant
9947 var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
9948 var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
9949 return type;
9950 }
9951 } // $FlowFixMe only called in DEV, so void return is not possible.
9952
9953
9954 function willCoercionThrow(value) {
9955 {
9956 try {
9957 testStringCoercion(value);
9958 return false;
9959 } catch (e) {
9960 return true;
9961 }
9962 }
9963 }
9964
9965 function testStringCoercion(value) {
9966 // If you ended up here by following an exception call stack, here's what's
9967 // happened: you supplied an object or symbol value to React (as a prop, key,
9968 // DOM attribute, CSS property, string ref, etc.) and when React tried to
9969 // coerce it to a string using `'' + value`, an exception was thrown.
9970 //
9971 // The most common types that will cause this exception are `Symbol` instances
9972 // and Temporal objects like `Temporal.Instant`. But any object that has a
9973 // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
9974 // exception. (Library authors do this to prevent users from using built-in
9975 // numeric operators like `+` or comparison operators like `>=` because custom
9976 // methods are needed to perform accurate arithmetic or comparison.)
9977 //
9978 // To fix the problem, coerce this object or symbol value to a string before
9979 // passing it to React. The most reliable way is usually `String(value)`.
9980 //
9981 // To find which value is throwing, check the browser or debugger console.
9982 // Before this exception was thrown, there should be `console.error` output
9983 // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
9984 // problem and how that type was used: key, atrribute, input value prop, etc.
9985 // In most cases, this console output also shows the component and its
9986 // ancestor components where the exception happened.
9987 //
9988 // eslint-disable-next-line react-internal/safe-string-coercion
9989 return '' + value;
9990 }
9991 function checkKeyStringCoercion(value) {
9992 {
9993 if (willCoercionThrow(value)) {
9994 error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
9995
9996 return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
9997 }
9998 }
9999 }
10000
10001 var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
10002 var RESERVED_PROPS = {
10003 key: true,
10004 ref: true,
10005 __self: true,
10006 __source: true
10007 };
10008 var specialPropKeyWarningShown;
10009 var specialPropRefWarningShown;
10010 var didWarnAboutStringRefs;
10011
10012 {
10013 didWarnAboutStringRefs = {};
10014 }
10015
10016 function hasValidRef(config) {
10017 {
10018 if (hasOwnProperty.call(config, 'ref')) {
10019 var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
10020
10021 if (getter && getter.isReactWarning) {
10022 return false;
10023 }
10024 }
10025 }
10026
10027 return config.ref !== undefined;
10028 }
10029
10030 function hasValidKey(config) {
10031 {
10032 if (hasOwnProperty.call(config, 'key')) {
10033 var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
10034
10035 if (getter && getter.isReactWarning) {
10036 return false;
10037 }
10038 }
10039 }
10040
10041 return config.key !== undefined;
10042 }
10043
10044 function warnIfStringRefCannotBeAutoConverted(config, self) {
10045 {
10046 if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
10047 var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
10048
10049 if (!didWarnAboutStringRefs[componentName]) {
10050 error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
10051
10052 didWarnAboutStringRefs[componentName] = true;
10053 }
10054 }
10055 }
10056 }
10057
10058 function defineKeyPropWarningGetter(props, displayName) {
10059 {
10060 var warnAboutAccessingKey = function () {
10061 if (!specialPropKeyWarningShown) {
10062 specialPropKeyWarningShown = true;
10063
10064 error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
10065 }
10066 };
10067
10068 warnAboutAccessingKey.isReactWarning = true;
10069 Object.defineProperty(props, 'key', {
10070 get: warnAboutAccessingKey,
10071 configurable: true
10072 });
10073 }
10074 }
10075
10076 function defineRefPropWarningGetter(props, displayName) {
10077 {
10078 var warnAboutAccessingRef = function () {
10079 if (!specialPropRefWarningShown) {
10080 specialPropRefWarningShown = true;
10081
10082 error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
10083 }
10084 };
10085
10086 warnAboutAccessingRef.isReactWarning = true;
10087 Object.defineProperty(props, 'ref', {
10088 get: warnAboutAccessingRef,
10089 configurable: true
10090 });
10091 }
10092 }
10093 /**
10094 * Factory method to create a new React element. This no longer adheres to
10095 * the class pattern, so do not use new to call it. Also, instanceof check
10096 * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
10097 * if something is a React Element.
10098 *
10099 * @param {*} type
10100 * @param {*} props
10101 * @param {*} key
10102 * @param {string|object} ref
10103 * @param {*} owner
10104 * @param {*} self A *temporary* helper to detect places where `this` is
10105 * different from the `owner` when React.createElement is called, so that we
10106 * can warn. We want to get rid of owner and replace string `ref`s with arrow
10107 * functions, and as long as `this` and owner are the same, there will be no
10108 * change in behavior.
10109 * @param {*} source An annotation object (added by a transpiler or otherwise)
10110 * indicating filename, line number, and/or other information.
10111 * @internal
10112 */
10113
10114
10115 var ReactElement = function (type, key, ref, self, source, owner, props) {
10116 var element = {
10117 // This tag allows us to uniquely identify this as a React Element
10118 $$typeof: REACT_ELEMENT_TYPE,
10119 // Built-in properties that belong on the element
10120 type: type,
10121 key: key,
10122 ref: ref,
10123 props: props,
10124 // Record the component responsible for creating this element.
10125 _owner: owner
10126 };
10127
10128 {
10129 // The validation flag is currently mutative. We put it on
10130 // an external backing store so that we can freeze the whole object.
10131 // This can be replaced with a WeakMap once they are implemented in
10132 // commonly used development environments.
10133 element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
10134 // the validation flag non-enumerable (where possible, which should
10135 // include every environment we run tests in), so the test framework
10136 // ignores it.
10137
10138 Object.defineProperty(element._store, 'validated', {
10139 configurable: false,
10140 enumerable: false,
10141 writable: true,
10142 value: false
10143 }); // self and source are DEV only properties.
10144
10145 Object.defineProperty(element, '_self', {
10146 configurable: false,
10147 enumerable: false,
10148 writable: false,
10149 value: self
10150 }); // Two elements created in two different places should be considered
10151 // equal for testing purposes and therefore we hide it from enumeration.
10152
10153 Object.defineProperty(element, '_source', {
10154 configurable: false,
10155 enumerable: false,
10156 writable: false,
10157 value: source
10158 });
10159
10160 if (Object.freeze) {
10161 Object.freeze(element.props);
10162 Object.freeze(element);
10163 }
10164 }
10165
10166 return element;
10167 };
10168 /**
10169 * https://github.com/reactjs/rfcs/pull/107
10170 * @param {*} type
10171 * @param {object} props
10172 * @param {string} key
10173 */
10174
10175 function jsxDEV(type, config, maybeKey, source, self) {
10176 {
10177 var propName; // Reserved names are extracted
10178
10179 var props = {};
10180 var key = null;
10181 var ref = null; // Currently, key can be spread in as a prop. This causes a potential
10182 // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
10183 // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
10184 // but as an intermediary step, we will use jsxDEV for everything except
10185 // <div {...props} key="Hi" />, because we aren't currently able to tell if
10186 // key is explicitly declared to be undefined or not.
10187
10188 if (maybeKey !== undefined) {
10189 {
10190 checkKeyStringCoercion(maybeKey);
10191 }
10192
10193 key = '' + maybeKey;
10194 }
10195
10196 if (hasValidKey(config)) {
10197 {
10198 checkKeyStringCoercion(config.key);
10199 }
10200
10201 key = '' + config.key;
10202 }
10203
10204 if (hasValidRef(config)) {
10205 ref = config.ref;
10206 warnIfStringRefCannotBeAutoConverted(config, self);
10207 } // Remaining properties are added to a new props object
10208
10209
10210 for (propName in config) {
10211 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
10212 props[propName] = config[propName];
10213 }
10214 } // Resolve default props
10215
10216
10217 if (type && type.defaultProps) {
10218 var defaultProps = type.defaultProps;
10219
10220 for (propName in defaultProps) {
10221 if (props[propName] === undefined) {
10222 props[propName] = defaultProps[propName];
10223 }
10224 }
10225 }
10226
10227 if (key || ref) {
10228 var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
10229
10230 if (key) {
10231 defineKeyPropWarningGetter(props, displayName);
10232 }
10233
10234 if (ref) {
10235 defineRefPropWarningGetter(props, displayName);
10236 }
10237 }
10238
10239 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
10240 }
10241 }
10242
10243 var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
10244 var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
10245
10246 function setCurrentlyValidatingElement$1(element) {
10247 {
10248 if (element) {
10249 var owner = element._owner;
10250 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
10251 ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
10252 } else {
10253 ReactDebugCurrentFrame$1.setExtraStackFrame(null);
10254 }
10255 }
10256 }
10257
10258 var propTypesMisspellWarningShown;
10259
10260 {
10261 propTypesMisspellWarningShown = false;
10262 }
10263 /**
10264 * Verifies the object is a ReactElement.
10265 * See https://reactjs.org/docs/react-api.html#isvalidelement
10266 * @param {?object} object
10267 * @return {boolean} True if `object` is a ReactElement.
10268 * @final
10269 */
10270
10271
10272 function isValidElement(object) {
10273 {
10274 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
10275 }
10276 }
10277
10278 function getDeclarationErrorAddendum() {
10279 {
10280 if (ReactCurrentOwner$1.current) {
10281 var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
10282
10283 if (name) {
10284 return '\n\nCheck the render method of `' + name + '`.';
10285 }
10286 }
10287
10288 return '';
10289 }
10290 }
10291
10292 function getSourceInfoErrorAddendum(source) {
10293 {
10294 if (source !== undefined) {
10295 var fileName = source.fileName.replace(/^.*[\\\/]/, '');
10296 var lineNumber = source.lineNumber;
10297 return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
10298 }
10299
10300 return '';
10301 }
10302 }
10303 /**
10304 * Warn if there's no key explicitly set on dynamic arrays of children or
10305 * object keys are not valid. This allows us to keep track of children between
10306 * updates.
10307 */
10308
10309
10310 var ownerHasKeyUseWarning = {};
10311
10312 function getCurrentComponentErrorInfo(parentType) {
10313 {
10314 var info = getDeclarationErrorAddendum();
10315
10316 if (!info) {
10317 var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
10318
10319 if (parentName) {
10320 info = "\n\nCheck the top-level render call using <" + parentName + ">.";
10321 }
10322 }
10323
10324 return info;
10325 }
10326 }
10327 /**
10328 * Warn if the element doesn't have an explicit key assigned to it.
10329 * This element is in an array. The array could grow and shrink or be
10330 * reordered. All children that haven't already been validated are required to
10331 * have a "key" property assigned to it. Error statuses are cached so a warning
10332 * will only be shown once.
10333 *
10334 * @internal
10335 * @param {ReactElement} element Element that requires a key.
10336 * @param {*} parentType element's parent's type.
10337 */
10338
10339
10340 function validateExplicitKey(element, parentType) {
10341 {
10342 if (!element._store || element._store.validated || element.key != null) {
10343 return;
10344 }
10345
10346 element._store.validated = true;
10347 var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
10348
10349 if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
10350 return;
10351 }
10352
10353 ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
10354 // property, it may be the creator of the child that's responsible for
10355 // assigning it a key.
10356
10357 var childOwner = '';
10358
10359 if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
10360 // Give the component that originally created this child.
10361 childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
10362 }
10363
10364 setCurrentlyValidatingElement$1(element);
10365
10366 error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
10367
10368 setCurrentlyValidatingElement$1(null);
10369 }
10370 }
10371 /**
10372 * Ensure that every element either is passed in a static location, in an
10373 * array with an explicit keys property defined, or in an object literal
10374 * with valid key property.
10375 *
10376 * @internal
10377 * @param {ReactNode} node Statically passed child of any type.
10378 * @param {*} parentType node's parent's type.
10379 */
10380
10381
10382 function validateChildKeys(node, parentType) {
10383 {
10384 if (typeof node !== 'object') {
10385 return;
10386 }
10387
10388 if (isArray(node)) {
10389 for (var i = 0; i < node.length; i++) {
10390 var child = node[i];
10391
10392 if (isValidElement(child)) {
10393 validateExplicitKey(child, parentType);
10394 }
10395 }
10396 } else if (isValidElement(node)) {
10397 // This element was passed in a valid location.
10398 if (node._store) {
10399 node._store.validated = true;
10400 }
10401 } else if (node) {
10402 var iteratorFn = getIteratorFn(node);
10403
10404 if (typeof iteratorFn === 'function') {
10405 // Entry iterators used to provide implicit keys,
10406 // but now we print a separate warning for them later.
10407 if (iteratorFn !== node.entries) {
10408 var iterator = iteratorFn.call(node);
10409 var step;
10410
10411 while (!(step = iterator.next()).done) {
10412 if (isValidElement(step.value)) {
10413 validateExplicitKey(step.value, parentType);
10414 }
10415 }
10416 }
10417 }
10418 }
10419 }
10420 }
10421 /**
10422 * Given an element, validate that its props follow the propTypes definition,
10423 * provided by the type.
10424 *
10425 * @param {ReactElement} element
10426 */
10427
10428
10429 function validatePropTypes(element) {
10430 {
10431 var type = element.type;
10432
10433 if (type === null || type === undefined || typeof type === 'string') {
10434 return;
10435 }
10436
10437 var propTypes;
10438
10439 if (typeof type === 'function') {
10440 propTypes = type.propTypes;
10441 } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
10442 // Inner props are checked in the reconciler.
10443 type.$$typeof === REACT_MEMO_TYPE)) {
10444 propTypes = type.propTypes;
10445 } else {
10446 return;
10447 }
10448
10449 if (propTypes) {
10450 // Intentionally inside to avoid triggering lazy initializers:
10451 var name = getComponentNameFromType(type);
10452 checkPropTypes(propTypes, element.props, 'prop', name, element);
10453 } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
10454 propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
10455
10456 var _name = getComponentNameFromType(type);
10457
10458 error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
10459 }
10460
10461 if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
10462 error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
10463 }
10464 }
10465 }
10466 /**
10467 * Given a fragment, validate that it can only be provided with fragment props
10468 * @param {ReactElement} fragment
10469 */
10470
10471
10472 function validateFragmentProps(fragment) {
10473 {
10474 var keys = Object.keys(fragment.props);
10475
10476 for (var i = 0; i < keys.length; i++) {
10477 var key = keys[i];
10478
10479 if (key !== 'children' && key !== 'key') {
10480 setCurrentlyValidatingElement$1(fragment);
10481
10482 error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
10483
10484 setCurrentlyValidatingElement$1(null);
10485 break;
10486 }
10487 }
10488
10489 if (fragment.ref !== null) {
10490 setCurrentlyValidatingElement$1(fragment);
10491
10492 error('Invalid attribute `ref` supplied to `React.Fragment`.');
10493
10494 setCurrentlyValidatingElement$1(null);
10495 }
10496 }
10497 }
10498
10499 var didWarnAboutKeySpread = {};
10500 function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
10501 {
10502 var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
10503 // succeed and there will likely be errors in render.
10504
10505 if (!validType) {
10506 var info = '';
10507
10508 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
10509 info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
10510 }
10511
10512 var sourceInfo = getSourceInfoErrorAddendum(source);
10513
10514 if (sourceInfo) {
10515 info += sourceInfo;
10516 } else {
10517 info += getDeclarationErrorAddendum();
10518 }
10519
10520 var typeString;
10521
10522 if (type === null) {
10523 typeString = 'null';
10524 } else if (isArray(type)) {
10525 typeString = 'array';
10526 } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
10527 typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
10528 info = ' Did you accidentally export a JSX literal instead of a component?';
10529 } else {
10530 typeString = typeof type;
10531 }
10532
10533 error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
10534 }
10535
10536 var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
10537 // TODO: Drop this when these are no longer allowed as the type argument.
10538
10539 if (element == null) {
10540 return element;
10541 } // Skip key warning if the type isn't valid since our key validation logic
10542 // doesn't expect a non-string/function type and can throw confusing errors.
10543 // We don't want exception behavior to differ between dev and prod.
10544 // (Rendering will throw with a helpful message and as soon as the type is
10545 // fixed, the key warnings will appear.)
10546
10547
10548 if (validType) {
10549 var children = props.children;
10550
10551 if (children !== undefined) {
10552 if (isStaticChildren) {
10553 if (isArray(children)) {
10554 for (var i = 0; i < children.length; i++) {
10555 validateChildKeys(children[i], type);
10556 }
10557
10558 if (Object.freeze) {
10559 Object.freeze(children);
10560 }
10561 } else {
10562 error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
10563 }
10564 } else {
10565 validateChildKeys(children, type);
10566 }
10567 }
10568 }
10569
10570 {
10571 if (hasOwnProperty.call(props, 'key')) {
10572 var componentName = getComponentNameFromType(type);
10573 var keys = Object.keys(props).filter(function (k) {
10574 return k !== 'key';
10575 });
10576 var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
10577
10578 if (!didWarnAboutKeySpread[componentName + beforeExample]) {
10579 var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
10580
10581 error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
10582
10583 didWarnAboutKeySpread[componentName + beforeExample] = true;
10584 }
10585 }
10586 }
10587
10588 if (type === REACT_FRAGMENT_TYPE) {
10589 validateFragmentProps(element);
10590 } else {
10591 validatePropTypes(element);
10592 }
10593
10594 return element;
10595 }
10596 } // These two functions exist to still get child warnings in dev
10597 // even with the prod transform. This means that jsxDEV is purely
10598 // opt-in behavior for better messages but that we won't stop
10599 // giving you warnings if you use production apis.
10600
10601 function jsxWithValidationStatic(type, props, key) {
10602 {
10603 return jsxWithValidation(type, props, key, true);
10604 }
10605 }
10606 function jsxWithValidationDynamic(type, props, key) {
10607 {
10608 return jsxWithValidation(type, props, key, false);
10609 }
10610 }
10611
10612 var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
10613 // for now we can ship identical prod functions
10614
10615 var jsxs = jsxWithValidationStatic ;
10616
10617 exports.Fragment = REACT_FRAGMENT_TYPE;
10618 exports.jsx = jsx;
10619 exports.jsxs = jsxs;
10620 })();
10621 }
10622
10623
10624 /***/ }),
10625
10626 /***/ "./node_modules/react/jsx-runtime.js":
10627 /*!*******************************************!*\
10628 !*** ./node_modules/react/jsx-runtime.js ***!
10629 \*******************************************/
10630 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
10631
10632 "use strict";
10633
10634
10635 if (false) {} else {
10636 module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ "./node_modules/react/cjs/react-jsx-runtime.development.js");
10637 }
10638
10639
10640 /***/ }),
10641
10642 /***/ "./node_modules/styled-components/dist/styled-components.browser.esm.js":
10643 /*!******************************************************************************!*\
10644 !*** ./node_modules/styled-components/dist/styled-components.browser.esm.js ***!
10645 \******************************************************************************/
10646 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10647
10648 "use strict";
10649 __webpack_require__.r(__webpack_exports__);
10650 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10651 /* harmony export */ "ServerStyleSheet": () => (/* binding */ ServerStyleSheet),
10652 /* harmony export */ "StyleSheetConsumer": () => (/* binding */ StyleSheetConsumer),
10653 /* harmony export */ "StyleSheetContext": () => (/* binding */ StyleSheetContext),
10654 /* harmony export */ "StyleSheetManager": () => (/* binding */ StyleSheetManager),
10655 /* harmony export */ "ThemeConsumer": () => (/* binding */ ThemeConsumer),
10656 /* harmony export */ "ThemeContext": () => (/* binding */ ThemeContext),
10657 /* harmony export */ "ThemeProvider": () => (/* binding */ ThemeProvider),
10658 /* harmony export */ "__DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS": () => (/* binding */ __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS),
10659 /* harmony export */ "createGlobalStyle": () => (/* binding */ createGlobalStyle),
10660 /* harmony export */ "css": () => (/* binding */ css),
10661 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
10662 /* harmony export */ "isStyledComponent": () => (/* binding */ isStyledComponent),
10663 /* harmony export */ "keyframes": () => (/* binding */ keyframes),
10664 /* harmony export */ "withTheme": () => (/* binding */ withTheme)
10665 /* harmony export */ });
10666 /* harmony import */ var stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! stylis/stylis.min */ "./node_modules/stylis/stylis.min.js");
10667 /* harmony import */ var stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0__);
10668 /* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! stylis-rule-sheet */ "./node_modules/stylis-rule-sheet/index.js");
10669 /* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1__);
10670 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
10671 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
10672 /* harmony import */ var _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/unitless */ "./node_modules/@emotion/unitless/dist/unitless.browser.esm.js");
10673 /* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
10674 /* harmony import */ var memoize_one__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! memoize-one */ "./node_modules/memoize-one/dist/memoize-one.esm.js");
10675 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
10676 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__);
10677 /* harmony import */ var _emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @emotion/is-prop-valid */ "./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js");
10678 /* harmony import */ var merge_anything__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! merge-anything */ "./node_modules/merge-anything/dist/index.esm.js");
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689 //
10690
10691 var interleave = (function (strings, interpolations) {
10692 var result = [strings[0]];
10693
10694 for (var i = 0, len = interpolations.length; i < len; i += 1) {
10695 result.push(interpolations[i], strings[i + 1]);
10696 }
10697
10698 return result;
10699 });
10700
10701 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
10702 return typeof obj;
10703 } : function (obj) {
10704 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
10705 };
10706
10707 var classCallCheck = function (instance, Constructor) {
10708 if (!(instance instanceof Constructor)) {
10709 throw new TypeError("Cannot call a class as a function");
10710 }
10711 };
10712
10713 var createClass = function () {
10714 function defineProperties(target, props) {
10715 for (var i = 0; i < props.length; i++) {
10716 var descriptor = props[i];
10717 descriptor.enumerable = descriptor.enumerable || false;
10718 descriptor.configurable = true;
10719 if ("value" in descriptor) descriptor.writable = true;
10720 Object.defineProperty(target, descriptor.key, descriptor);
10721 }
10722 }
10723
10724 return function (Constructor, protoProps, staticProps) {
10725 if (protoProps) defineProperties(Constructor.prototype, protoProps);
10726 if (staticProps) defineProperties(Constructor, staticProps);
10727 return Constructor;
10728 };
10729 }();
10730
10731 var _extends = Object.assign || function (target) {
10732 for (var i = 1; i < arguments.length; i++) {
10733 var source = arguments[i];
10734
10735 for (var key in source) {
10736 if (Object.prototype.hasOwnProperty.call(source, key)) {
10737 target[key] = source[key];
10738 }
10739 }
10740 }
10741
10742 return target;
10743 };
10744
10745 var inherits = function (subClass, superClass) {
10746 if (typeof superClass !== "function" && superClass !== null) {
10747 throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
10748 }
10749
10750 subClass.prototype = Object.create(superClass && superClass.prototype, {
10751 constructor: {
10752 value: subClass,
10753 enumerable: false,
10754 writable: true,
10755 configurable: true
10756 }
10757 });
10758 if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
10759 };
10760
10761 var objectWithoutProperties = function (obj, keys) {
10762 var target = {};
10763
10764 for (var i in obj) {
10765 if (keys.indexOf(i) >= 0) continue;
10766 if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
10767 target[i] = obj[i];
10768 }
10769
10770 return target;
10771 };
10772
10773 var possibleConstructorReturn = function (self, call) {
10774 if (!self) {
10775 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
10776 }
10777
10778 return call && (typeof call === "object" || typeof call === "function") ? call : self;
10779 };
10780
10781 //
10782 var isPlainObject = (function (x) {
10783 return (typeof x === 'undefined' ? 'undefined' : _typeof(x)) === 'object' && x.constructor === Object;
10784 });
10785
10786 //
10787 var EMPTY_ARRAY = Object.freeze([]);
10788 var EMPTY_OBJECT = Object.freeze({});
10789
10790 //
10791 function isFunction(test) {
10792 return typeof test === 'function';
10793 }
10794
10795 //
10796
10797 function getComponentName(target) {
10798 return ( true ? typeof target === 'string' && target : 0) || target.displayName || target.name || 'Component';
10799 }
10800
10801 //
10802 function isStatelessFunction(test) {
10803 return typeof test === 'function' && !(test.prototype && test.prototype.isReactComponent);
10804 }
10805
10806 //
10807 function isStyledComponent(target) {
10808 return target && typeof target.styledComponentId === 'string';
10809 }
10810
10811 //
10812
10813 var SC_ATTR = typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || 'data-styled';
10814
10815 var SC_VERSION_ATTR = 'data-styled-version';
10816
10817 var SC_STREAM_ATTR = 'data-styled-streamed';
10818
10819 var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;
10820
10821 var DISABLE_SPEEDY = typeof SC_DISABLE_SPEEDY === 'boolean' && SC_DISABLE_SPEEDY || typeof process !== 'undefined' && (process.env.REACT_APP_SC_DISABLE_SPEEDY || process.env.SC_DISABLE_SPEEDY) || "development" !== 'production';
10822
10823 // Shared empty execution context when generating static styles
10824 var STATIC_EXECUTION_CONTEXT = {};
10825
10826 //
10827
10828
10829 /**
10830 * Parse errors.md and turn it into a simple hash of code: message
10831 */
10832 var ERRORS = true ? {
10833 "1": "Cannot create styled-component for component: %s.\n\n",
10834 "2": "Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",
10835 "3": "Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",
10836 "4": "The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",
10837 "5": "The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",
10838 "6": "Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",
10839 "7": "ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n",
10840 "8": "ThemeProvider: Please make your \"theme\" prop an object.\n\n",
10841 "9": "Missing document `<head>`\n\n",
10842 "10": "Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",
10843 "11": "_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",
10844 "12": "It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",
10845 "13": "%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n"
10846 } : 0;
10847
10848 /**
10849 * super basic version of sprintf
10850 */
10851 function format() {
10852 var a = arguments.length <= 0 ? undefined : arguments[0];
10853 var b = [];
10854
10855 for (var c = 1, len = arguments.length; c < len; c += 1) {
10856 b.push(arguments.length <= c ? undefined : arguments[c]);
10857 }
10858
10859 b.forEach(function (d) {
10860 a = a.replace(/%[a-z]/, d);
10861 });
10862
10863 return a;
10864 }
10865
10866 /**
10867 * Create an error file out of errors.md for development and a simple web link to the full errors
10868 * in production mode.
10869 */
10870
10871 var StyledComponentsError = function (_Error) {
10872 inherits(StyledComponentsError, _Error);
10873
10874 function StyledComponentsError(code) {
10875 classCallCheck(this, StyledComponentsError);
10876
10877 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
10878 interpolations[_key - 1] = arguments[_key];
10879 }
10880
10881 if (false) { var _this; } else {
10882 var _this = possibleConstructorReturn(this, _Error.call(this, format.apply(undefined, [ERRORS[code]].concat(interpolations)).trim()));
10883 }
10884 return possibleConstructorReturn(_this);
10885 }
10886
10887 return StyledComponentsError;
10888 }(Error);
10889
10890 //
10891 var SC_COMPONENT_ID = /^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm;
10892
10893 var extractComps = (function (maybeCSS) {
10894 var css = '' + (maybeCSS || ''); // Definitely a string, and a clone
10895 var existingComponents = [];
10896 css.replace(SC_COMPONENT_ID, function (match, componentId, matchIndex) {
10897 existingComponents.push({ componentId: componentId, matchIndex: matchIndex });
10898 return match;
10899 });
10900 return existingComponents.map(function (_ref, i) {
10901 var componentId = _ref.componentId,
10902 matchIndex = _ref.matchIndex;
10903
10904 var nextComp = existingComponents[i + 1];
10905 var cssFromDOM = nextComp ? css.slice(matchIndex, nextComp.matchIndex) : css.slice(matchIndex);
10906 return { componentId: componentId, cssFromDOM: cssFromDOM };
10907 });
10908 });
10909
10910 //
10911
10912 var COMMENT_REGEX = /^\s*\/\/.*$/gm;
10913
10914 // NOTE: This stylis instance is only used to split rules from SSR'd style tags
10915 var stylisSplitter = new (stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default())({
10916 global: false,
10917 cascade: true,
10918 keyframe: false,
10919 prefix: false,
10920 compress: false,
10921 semicolon: true
10922 });
10923
10924 var stylis = new (stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default())({
10925 global: false,
10926 cascade: true,
10927 keyframe: false,
10928 prefix: true,
10929 compress: false,
10930 semicolon: false // NOTE: This means "autocomplete missing semicolons"
10931 });
10932
10933 // Wrap `insertRulePlugin to build a list of rules,
10934 // and then make our own plugin to return the rules. This
10935 // makes it easier to hook into the existing SSR architecture
10936
10937 var parsingRules = [];
10938
10939 // eslint-disable-next-line consistent-return
10940 var returnRulesPlugin = function returnRulesPlugin(context) {
10941 if (context === -2) {
10942 var parsedRules = parsingRules;
10943 parsingRules = [];
10944 return parsedRules;
10945 }
10946 };
10947
10948 var parseRulesPlugin = stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1___default()(function (rule) {
10949 parsingRules.push(rule);
10950 });
10951
10952 var _componentId = void 0;
10953 var _selector = void 0;
10954 var _selectorRegexp = void 0;
10955
10956 var selfReferenceReplacer = function selfReferenceReplacer(match, offset, string) {
10957 if (
10958 // the first self-ref is always untouched
10959 offset > 0 &&
10960 // there should be at least two self-refs to do a replacement (.b > .b)
10961 string.slice(0, offset).indexOf(_selector) !== -1 &&
10962 // no consecutive self refs (.b.b); that is a precedence boost and treated differently
10963 string.slice(offset - _selector.length, offset) !== _selector) {
10964 return '.' + _componentId;
10965 }
10966
10967 return match;
10968 };
10969
10970 /**
10971 * When writing a style like
10972 *
10973 * & + & {
10974 * color: red;
10975 * }
10976 *
10977 * The second ampersand should be a reference to the static component class. stylis
10978 * has no knowledge of static class so we have to intelligently replace the base selector.
10979 */
10980 var selfReferenceReplacementPlugin = function selfReferenceReplacementPlugin(context, _, selectors) {
10981 if (context === 2 && selectors.length && selectors[0].lastIndexOf(_selector) > 0) {
10982 // eslint-disable-next-line no-param-reassign
10983 selectors[0] = selectors[0].replace(_selectorRegexp, selfReferenceReplacer);
10984 }
10985 };
10986
10987 stylis.use([selfReferenceReplacementPlugin, parseRulesPlugin, returnRulesPlugin]);
10988 stylisSplitter.use([parseRulesPlugin, returnRulesPlugin]);
10989
10990 var splitByRules = function splitByRules(css) {
10991 return stylisSplitter('', css);
10992 };
10993
10994 function stringifyRules(rules, selector, prefix) {
10995 var componentId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '&';
10996
10997 var flatCSS = rules.join('').replace(COMMENT_REGEX, ''); // replace JS comments
10998
10999 var cssStr = selector && prefix ? prefix + ' ' + selector + ' { ' + flatCSS + ' }' : flatCSS;
11000
11001 // stylis has no concept of state to be passed to plugins
11002 // but since JS is single=threaded, we can rely on that to ensure
11003 // these properties stay in sync with the current stylis run
11004 _componentId = componentId;
11005 _selector = selector;
11006 _selectorRegexp = new RegExp('\\' + _selector + '\\b', 'g');
11007
11008 return stylis(prefix || !selector ? '' : selector, cssStr);
11009 }
11010
11011 //
11012 /* eslint-disable camelcase, no-undef */
11013
11014 var getNonce = (function () {
11015 return true ? __webpack_require__.nc : 0;
11016 });
11017
11018 //
11019 /* These are helpers for the StyleTags to keep track of the injected
11020 * rule names for each (component) ID that they're keeping track of.
11021 * They're crucial for detecting whether a name has already been
11022 * injected.
11023 * (This excludes rehydrated names) */
11024
11025 /* adds a new ID:name pairing to a names dictionary */
11026 var addNameForId = function addNameForId(names, id, name) {
11027 if (name) {
11028 // eslint-disable-next-line no-param-reassign
11029 var namesForId = names[id] || (names[id] = Object.create(null));
11030 namesForId[name] = true;
11031 }
11032 };
11033
11034 /* resets an ID entirely by overwriting it in the dictionary */
11035 var resetIdNames = function resetIdNames(names, id) {
11036 // eslint-disable-next-line no-param-reassign
11037 names[id] = Object.create(null);
11038 };
11039
11040 /* factory for a names dictionary checking the existance of an ID:name pairing */
11041 var hasNameForId = function hasNameForId(names) {
11042 return function (id, name) {
11043 return names[id] !== undefined && names[id][name];
11044 };
11045 };
11046
11047 /* stringifies names for the html/element output */
11048 var stringifyNames = function stringifyNames(names) {
11049 var str = '';
11050 // eslint-disable-next-line guard-for-in
11051 for (var id in names) {
11052 str += Object.keys(names[id]).join(' ') + ' ';
11053 }
11054 return str.trim();
11055 };
11056
11057 /* clones the nested names dictionary */
11058 var cloneNames = function cloneNames(names) {
11059 var clone = Object.create(null);
11060 // eslint-disable-next-line guard-for-in
11061 for (var id in names) {
11062 clone[id] = _extends({}, names[id]);
11063 }
11064 return clone;
11065 };
11066
11067 //
11068
11069 /* These are helpers that deal with the insertRule (aka speedy) API
11070 * They are used in the StyleTags and specifically the speedy tag
11071 */
11072
11073 /* retrieve a sheet for a given style tag */
11074 var sheetForTag = function sheetForTag(tag) {
11075 // $FlowFixMe
11076 if (tag.sheet) return tag.sheet;
11077
11078 /* Firefox quirk requires us to step through all stylesheets to find one owned by the given tag */
11079 var size = tag.ownerDocument.styleSheets.length;
11080 for (var i = 0; i < size; i += 1) {
11081 var sheet = tag.ownerDocument.styleSheets[i];
11082 // $FlowFixMe
11083 if (sheet.ownerNode === tag) return sheet;
11084 }
11085
11086 /* we should always be able to find a tag */
11087 throw new StyledComponentsError(10);
11088 };
11089
11090 /* insert a rule safely and return whether it was actually injected */
11091 var safeInsertRule = function safeInsertRule(sheet, cssRule, index) {
11092 /* abort early if cssRule string is falsy */
11093 if (!cssRule) return false;
11094
11095 var maxIndex = sheet.cssRules.length;
11096
11097 try {
11098 /* use insertRule and cap passed index with maxIndex (no of cssRules) */
11099 sheet.insertRule(cssRule, index <= maxIndex ? index : maxIndex);
11100 } catch (err) {
11101 /* any error indicates an invalid rule */
11102 return false;
11103 }
11104
11105 return true;
11106 };
11107
11108 /* deletes `size` rules starting from `removalIndex` */
11109 var deleteRules = function deleteRules(sheet, removalIndex, size) {
11110 var lowerBound = removalIndex - size;
11111 for (var i = removalIndex; i > lowerBound; i -= 1) {
11112 sheet.deleteRule(i);
11113 }
11114 };
11115
11116 //
11117
11118 /* this marker separates component styles and is important for rehydration */
11119 var makeTextMarker = function makeTextMarker(id) {
11120 return '\n/* sc-component-id: ' + id + ' */\n';
11121 };
11122
11123 /* add up all numbers in array up until and including the index */
11124 var addUpUntilIndex = function addUpUntilIndex(sizes, index) {
11125 var totalUpToIndex = 0;
11126 for (var i = 0; i <= index; i += 1) {
11127 totalUpToIndex += sizes[i];
11128 }
11129
11130 return totalUpToIndex;
11131 };
11132
11133 /* create a new style tag after lastEl */
11134 var makeStyleTag = function makeStyleTag(target, tagEl, insertBefore) {
11135 var targetDocument = document;
11136 if (target) targetDocument = target.ownerDocument;else if (tagEl) targetDocument = tagEl.ownerDocument;
11137
11138 var el = targetDocument.createElement('style');
11139 el.setAttribute(SC_ATTR, '');
11140 el.setAttribute(SC_VERSION_ATTR, "4.4.1");
11141
11142 var nonce = getNonce();
11143 if (nonce) {
11144 el.setAttribute('nonce', nonce);
11145 }
11146
11147 /* Work around insertRule quirk in EdgeHTML */
11148 el.appendChild(targetDocument.createTextNode(''));
11149
11150 if (target && !tagEl) {
11151 /* Append to target when no previous element was passed */
11152 target.appendChild(el);
11153 } else {
11154 if (!tagEl || !target || !tagEl.parentNode) {
11155 throw new StyledComponentsError(6);
11156 }
11157
11158 /* Insert new style tag after the previous one */
11159 tagEl.parentNode.insertBefore(el, insertBefore ? tagEl : tagEl.nextSibling);
11160 }
11161
11162 return el;
11163 };
11164
11165 /* takes a css factory function and outputs an html styled tag factory */
11166 var wrapAsHtmlTag = function wrapAsHtmlTag(css, names) {
11167 return function (additionalAttrs) {
11168 var nonce = getNonce();
11169 var attrs = [nonce && 'nonce="' + nonce + '"', SC_ATTR + '="' + stringifyNames(names) + '"', SC_VERSION_ATTR + '="' + "4.4.1" + '"', additionalAttrs];
11170
11171 var htmlAttr = attrs.filter(Boolean).join(' ');
11172 return '<style ' + htmlAttr + '>' + css() + '</style>';
11173 };
11174 };
11175
11176 /* takes a css factory function and outputs an element factory */
11177 var wrapAsElement = function wrapAsElement(css, names) {
11178 return function () {
11179 var _props;
11180
11181 var props = (_props = {}, _props[SC_ATTR] = stringifyNames(names), _props[SC_VERSION_ATTR] = "4.4.1", _props);
11182
11183 var nonce = getNonce();
11184 if (nonce) {
11185 // $FlowFixMe
11186 props.nonce = nonce;
11187 }
11188
11189 // eslint-disable-next-line react/no-danger
11190 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement('style', _extends({}, props, { dangerouslySetInnerHTML: { __html: css() } }));
11191 };
11192 };
11193
11194 var getIdsFromMarkersFactory = function getIdsFromMarkersFactory(markers) {
11195 return function () {
11196 return Object.keys(markers);
11197 };
11198 };
11199
11200 /* speedy tags utilise insertRule */
11201 var makeSpeedyTag = function makeSpeedyTag(el, getImportRuleTag) {
11202 var names = Object.create(null);
11203 var markers = Object.create(null);
11204 var sizes = [];
11205
11206 var extractImport = getImportRuleTag !== undefined;
11207 /* indicates whether getImportRuleTag was called */
11208 var usedImportRuleTag = false;
11209
11210 var insertMarker = function insertMarker(id) {
11211 var prev = markers[id];
11212 if (prev !== undefined) {
11213 return prev;
11214 }
11215
11216 markers[id] = sizes.length;
11217 sizes.push(0);
11218 resetIdNames(names, id);
11219
11220 return markers[id];
11221 };
11222
11223 var insertRules = function insertRules(id, cssRules, name) {
11224 var marker = insertMarker(id);
11225 var sheet = sheetForTag(el);
11226 var insertIndex = addUpUntilIndex(sizes, marker);
11227
11228 var injectedRules = 0;
11229 var importRules = [];
11230 var cssRulesSize = cssRules.length;
11231
11232 for (var i = 0; i < cssRulesSize; i += 1) {
11233 var cssRule = cssRules[i];
11234 var mayHaveImport = extractImport; /* @import rules are reordered to appear first */
11235 if (mayHaveImport && cssRule.indexOf('@import') !== -1) {
11236 importRules.push(cssRule);
11237 } else if (safeInsertRule(sheet, cssRule, insertIndex + injectedRules)) {
11238 mayHaveImport = false;
11239 injectedRules += 1;
11240 }
11241 }
11242
11243 if (extractImport && importRules.length > 0) {
11244 usedImportRuleTag = true;
11245 // $FlowFixMe
11246 getImportRuleTag().insertRules(id + '-import', importRules);
11247 }
11248
11249 sizes[marker] += injectedRules; /* add up no of injected rules */
11250 addNameForId(names, id, name);
11251 };
11252
11253 var removeRules = function removeRules(id) {
11254 var marker = markers[id];
11255 if (marker === undefined) return;
11256 // $FlowFixMe
11257 if (el.isConnected === false) return;
11258
11259 var size = sizes[marker];
11260 var sheet = sheetForTag(el);
11261 var removalIndex = addUpUntilIndex(sizes, marker) - 1;
11262 deleteRules(sheet, removalIndex, size);
11263 sizes[marker] = 0;
11264 resetIdNames(names, id);
11265
11266 if (extractImport && usedImportRuleTag) {
11267 // $FlowFixMe
11268 getImportRuleTag().removeRules(id + '-import');
11269 }
11270 };
11271
11272 var css = function css() {
11273 var _sheetForTag = sheetForTag(el),
11274 cssRules = _sheetForTag.cssRules;
11275
11276 var str = '';
11277
11278 // eslint-disable-next-line guard-for-in
11279 for (var id in markers) {
11280 str += makeTextMarker(id);
11281 var marker = markers[id];
11282 var end = addUpUntilIndex(sizes, marker);
11283 var size = sizes[marker];
11284 for (var i = end - size; i < end; i += 1) {
11285 var rule = cssRules[i];
11286 if (rule !== undefined) {
11287 str += rule.cssText;
11288 }
11289 }
11290 }
11291
11292 return str;
11293 };
11294
11295 return {
11296 clone: function clone() {
11297 throw new StyledComponentsError(5);
11298 },
11299
11300 css: css,
11301 getIds: getIdsFromMarkersFactory(markers),
11302 hasNameForId: hasNameForId(names),
11303 insertMarker: insertMarker,
11304 insertRules: insertRules,
11305 removeRules: removeRules,
11306 sealed: false,
11307 styleTag: el,
11308 toElement: wrapAsElement(css, names),
11309 toHTML: wrapAsHtmlTag(css, names)
11310 };
11311 };
11312
11313 var makeTextNode = function makeTextNode(targetDocument, id) {
11314 return targetDocument.createTextNode(makeTextMarker(id));
11315 };
11316
11317 var makeBrowserTag = function makeBrowserTag(el, getImportRuleTag) {
11318 var names = Object.create(null);
11319 var markers = Object.create(null);
11320
11321 var extractImport = getImportRuleTag !== undefined;
11322
11323 /* indicates whether getImportRuleTag was called */
11324 var usedImportRuleTag = false;
11325
11326 var insertMarker = function insertMarker(id) {
11327 var prev = markers[id];
11328 if (prev !== undefined) {
11329 return prev;
11330 }
11331
11332 markers[id] = makeTextNode(el.ownerDocument, id);
11333 el.appendChild(markers[id]);
11334 names[id] = Object.create(null);
11335
11336 return markers[id];
11337 };
11338
11339 var insertRules = function insertRules(id, cssRules, name) {
11340 var marker = insertMarker(id);
11341 var importRules = [];
11342 var cssRulesSize = cssRules.length;
11343
11344 for (var i = 0; i < cssRulesSize; i += 1) {
11345 var rule = cssRules[i];
11346 var mayHaveImport = extractImport;
11347 if (mayHaveImport && rule.indexOf('@import') !== -1) {
11348 importRules.push(rule);
11349 } else {
11350 mayHaveImport = false;
11351 var separator = i === cssRulesSize - 1 ? '' : ' ';
11352 marker.appendData('' + rule + separator);
11353 }
11354 }
11355
11356 addNameForId(names, id, name);
11357
11358 if (extractImport && importRules.length > 0) {
11359 usedImportRuleTag = true;
11360 // $FlowFixMe
11361 getImportRuleTag().insertRules(id + '-import', importRules);
11362 }
11363 };
11364
11365 var removeRules = function removeRules(id) {
11366 var marker = markers[id];
11367 if (marker === undefined) return;
11368
11369 /* create new empty text node and replace the current one */
11370 var newMarker = makeTextNode(el.ownerDocument, id);
11371 el.replaceChild(newMarker, marker);
11372 markers[id] = newMarker;
11373 resetIdNames(names, id);
11374
11375 if (extractImport && usedImportRuleTag) {
11376 // $FlowFixMe
11377 getImportRuleTag().removeRules(id + '-import');
11378 }
11379 };
11380
11381 var css = function css() {
11382 var str = '';
11383
11384 // eslint-disable-next-line guard-for-in
11385 for (var id in markers) {
11386 str += markers[id].data;
11387 }
11388
11389 return str;
11390 };
11391
11392 return {
11393 clone: function clone() {
11394 throw new StyledComponentsError(5);
11395 },
11396
11397 css: css,
11398 getIds: getIdsFromMarkersFactory(markers),
11399 hasNameForId: hasNameForId(names),
11400 insertMarker: insertMarker,
11401 insertRules: insertRules,
11402 removeRules: removeRules,
11403 sealed: false,
11404 styleTag: el,
11405 toElement: wrapAsElement(css, names),
11406 toHTML: wrapAsHtmlTag(css, names)
11407 };
11408 };
11409
11410 var makeServerTag = function makeServerTag(namesArg, markersArg) {
11411 var names = namesArg === undefined ? Object.create(null) : namesArg;
11412 var markers = markersArg === undefined ? Object.create(null) : markersArg;
11413
11414 var insertMarker = function insertMarker(id) {
11415 var prev = markers[id];
11416 if (prev !== undefined) {
11417 return prev;
11418 }
11419
11420 return markers[id] = [''];
11421 };
11422
11423 var insertRules = function insertRules(id, cssRules, name) {
11424 var marker = insertMarker(id);
11425 marker[0] += cssRules.join(' ');
11426 addNameForId(names, id, name);
11427 };
11428
11429 var removeRules = function removeRules(id) {
11430 var marker = markers[id];
11431 if (marker === undefined) return;
11432 marker[0] = '';
11433 resetIdNames(names, id);
11434 };
11435
11436 var css = function css() {
11437 var str = '';
11438 // eslint-disable-next-line guard-for-in
11439 for (var id in markers) {
11440 var cssForId = markers[id][0];
11441 if (cssForId) {
11442 str += makeTextMarker(id) + cssForId;
11443 }
11444 }
11445 return str;
11446 };
11447
11448 var clone = function clone() {
11449 var namesClone = cloneNames(names);
11450 var markersClone = Object.create(null);
11451
11452 // eslint-disable-next-line guard-for-in
11453 for (var id in markers) {
11454 markersClone[id] = [markers[id][0]];
11455 }
11456
11457 return makeServerTag(namesClone, markersClone);
11458 };
11459
11460 var tag = {
11461 clone: clone,
11462 css: css,
11463 getIds: getIdsFromMarkersFactory(markers),
11464 hasNameForId: hasNameForId(names),
11465 insertMarker: insertMarker,
11466 insertRules: insertRules,
11467 removeRules: removeRules,
11468 sealed: false,
11469 styleTag: null,
11470 toElement: wrapAsElement(css, names),
11471 toHTML: wrapAsHtmlTag(css, names)
11472 };
11473
11474 return tag;
11475 };
11476
11477 var makeTag = function makeTag(target, tagEl, forceServer, insertBefore, getImportRuleTag) {
11478 if (IS_BROWSER && !forceServer) {
11479 var el = makeStyleTag(target, tagEl, insertBefore);
11480
11481 if (DISABLE_SPEEDY) {
11482 return makeBrowserTag(el, getImportRuleTag);
11483 } else {
11484 return makeSpeedyTag(el, getImportRuleTag);
11485 }
11486 }
11487
11488 return makeServerTag();
11489 };
11490
11491 var rehydrate = function rehydrate(tag, els, extracted) {
11492 /* add all extracted components to the new tag */
11493 for (var i = 0, len = extracted.length; i < len; i += 1) {
11494 var _extracted$i = extracted[i],
11495 componentId = _extracted$i.componentId,
11496 cssFromDOM = _extracted$i.cssFromDOM;
11497
11498 var cssRules = splitByRules(cssFromDOM);
11499 tag.insertRules(componentId, cssRules);
11500 }
11501
11502 /* remove old HTMLStyleElements, since they have been rehydrated */
11503 for (var _i = 0, _len = els.length; _i < _len; _i += 1) {
11504 var el = els[_i];
11505 if (el.parentNode) {
11506 el.parentNode.removeChild(el);
11507 }
11508 }
11509 };
11510
11511 //
11512
11513 var SPLIT_REGEX = /\s+/;
11514
11515 /* determine the maximum number of components before tags are sharded */
11516 var MAX_SIZE = void 0;
11517 if (IS_BROWSER) {
11518 /* in speedy mode we can keep a lot more rules in a sheet before a slowdown can be expected */
11519 MAX_SIZE = DISABLE_SPEEDY ? 40 : 1000;
11520 } else {
11521 /* for servers we do not need to shard at all */
11522 MAX_SIZE = -1;
11523 }
11524
11525 var sheetRunningId = 0;
11526 var master = void 0;
11527
11528 var StyleSheet = function () {
11529
11530 /* a map from ids to tags */
11531
11532 /* deferred rules for a given id */
11533
11534 /* this is used for not reinjecting rules via hasNameForId() */
11535
11536 /* when rules for an id are removed using remove() we have to ignore rehydratedNames for it */
11537
11538 /* a list of tags belonging to this StyleSheet */
11539
11540 /* a tag for import rules */
11541
11542 /* current capacity until a new tag must be created */
11543
11544 /* children (aka clones) of this StyleSheet inheriting all and future injections */
11545
11546 function StyleSheet() {
11547 var _this = this;
11548
11549 var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : IS_BROWSER ? document.head : null;
11550 var forceServer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
11551 classCallCheck(this, StyleSheet);
11552
11553 this.getImportRuleTag = function () {
11554 var importRuleTag = _this.importRuleTag;
11555
11556 if (importRuleTag !== undefined) {
11557 return importRuleTag;
11558 }
11559
11560 var firstTag = _this.tags[0];
11561 var insertBefore = true;
11562
11563 return _this.importRuleTag = makeTag(_this.target, firstTag ? firstTag.styleTag : null, _this.forceServer, insertBefore);
11564 };
11565
11566 sheetRunningId += 1;
11567 this.id = sheetRunningId;
11568 this.forceServer = forceServer;
11569 this.target = forceServer ? null : target;
11570 this.tagMap = {};
11571 this.deferred = {};
11572 this.rehydratedNames = {};
11573 this.ignoreRehydratedNames = {};
11574 this.tags = [];
11575 this.capacity = 1;
11576 this.clones = [];
11577 }
11578
11579 /* rehydrate all SSR'd style tags */
11580
11581
11582 StyleSheet.prototype.rehydrate = function rehydrate$$1() {
11583 if (!IS_BROWSER || this.forceServer) return this;
11584
11585 var els = [];
11586 var extracted = [];
11587 var isStreamed = false;
11588
11589 /* retrieve all of our SSR style elements from the DOM */
11590 var nodes = document.querySelectorAll('style[' + SC_ATTR + '][' + SC_VERSION_ATTR + '="' + "4.4.1" + '"]');
11591
11592 var nodesSize = nodes.length;
11593
11594 /* abort rehydration if no previous style tags were found */
11595 if (!nodesSize) return this;
11596
11597 for (var i = 0; i < nodesSize; i += 1) {
11598 var el = nodes[i];
11599
11600 /* check if style tag is a streamed tag */
11601 if (!isStreamed) isStreamed = !!el.getAttribute(SC_STREAM_ATTR);
11602
11603 /* retrieve all component names */
11604 var elNames = (el.getAttribute(SC_ATTR) || '').trim().split(SPLIT_REGEX);
11605 var elNamesSize = elNames.length;
11606 for (var j = 0, name; j < elNamesSize; j += 1) {
11607 name = elNames[j];
11608 /* add rehydrated name to sheet to avoid re-adding styles */
11609 this.rehydratedNames[name] = true;
11610 }
11611
11612 /* extract all components and their CSS */
11613 extracted.push.apply(extracted, extractComps(el.textContent));
11614
11615 /* store original HTMLStyleElement */
11616 els.push(el);
11617 }
11618
11619 /* abort rehydration if nothing was extracted */
11620 var extractedSize = extracted.length;
11621 if (!extractedSize) return this;
11622
11623 /* create a tag to be used for rehydration */
11624 var tag = this.makeTag(null);
11625
11626 rehydrate(tag, els, extracted);
11627
11628 /* reset capacity and adjust MAX_SIZE by the initial size of the rehydration */
11629 this.capacity = Math.max(1, MAX_SIZE - extractedSize);
11630 this.tags.push(tag);
11631
11632 /* retrieve all component ids */
11633 for (var _j = 0; _j < extractedSize; _j += 1) {
11634 this.tagMap[extracted[_j].componentId] = tag;
11635 }
11636
11637 return this;
11638 };
11639
11640 /* retrieve a "master" instance of StyleSheet which is typically used when no other is available
11641 * The master StyleSheet is targeted by createGlobalStyle, keyframes, and components outside of any
11642 * StyleSheetManager's context */
11643
11644
11645 /* reset the internal "master" instance */
11646 StyleSheet.reset = function reset() {
11647 var forceServer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
11648
11649 master = new StyleSheet(undefined, forceServer).rehydrate();
11650 };
11651
11652 /* adds "children" to the StyleSheet that inherit all of the parents' rules
11653 * while their own rules do not affect the parent */
11654
11655
11656 StyleSheet.prototype.clone = function clone() {
11657 var sheet = new StyleSheet(this.target, this.forceServer);
11658
11659 /* add to clone array */
11660 this.clones.push(sheet);
11661
11662 /* clone all tags */
11663 sheet.tags = this.tags.map(function (tag) {
11664 var ids = tag.getIds();
11665 var newTag = tag.clone();
11666
11667 /* reconstruct tagMap */
11668 for (var i = 0; i < ids.length; i += 1) {
11669 sheet.tagMap[ids[i]] = newTag;
11670 }
11671
11672 return newTag;
11673 });
11674
11675 /* clone other maps */
11676 sheet.rehydratedNames = _extends({}, this.rehydratedNames);
11677 sheet.deferred = _extends({}, this.deferred);
11678
11679 return sheet;
11680 };
11681
11682 /* force StyleSheet to create a new tag on the next injection */
11683
11684
11685 StyleSheet.prototype.sealAllTags = function sealAllTags() {
11686 this.capacity = 1;
11687
11688 this.tags.forEach(function (tag) {
11689 // eslint-disable-next-line no-param-reassign
11690 tag.sealed = true;
11691 });
11692 };
11693
11694 StyleSheet.prototype.makeTag = function makeTag$$1(tag) {
11695 var lastEl = tag ? tag.styleTag : null;
11696 var insertBefore = false;
11697
11698 return makeTag(this.target, lastEl, this.forceServer, insertBefore, this.getImportRuleTag);
11699 };
11700
11701 /* get a tag for a given componentId, assign the componentId to one, or shard */
11702 StyleSheet.prototype.getTagForId = function getTagForId(id) {
11703 /* simply return a tag, when the componentId was already assigned one */
11704 var prev = this.tagMap[id];
11705 if (prev !== undefined && !prev.sealed) {
11706 return prev;
11707 }
11708
11709 var tag = this.tags[this.tags.length - 1];
11710
11711 /* shard (create a new tag) if the tag is exhausted (See MAX_SIZE) */
11712 this.capacity -= 1;
11713
11714 if (this.capacity === 0) {
11715 this.capacity = MAX_SIZE;
11716 tag = this.makeTag(tag);
11717 this.tags.push(tag);
11718 }
11719
11720 return this.tagMap[id] = tag;
11721 };
11722
11723 /* mainly for createGlobalStyle to check for its id */
11724
11725
11726 StyleSheet.prototype.hasId = function hasId(id) {
11727 return this.tagMap[id] !== undefined;
11728 };
11729
11730 /* caching layer checking id+name to already have a corresponding tag and injected rules */
11731
11732
11733 StyleSheet.prototype.hasNameForId = function hasNameForId(id, name) {
11734 /* exception for rehydrated names which are checked separately */
11735 if (this.ignoreRehydratedNames[id] === undefined && this.rehydratedNames[name]) {
11736 return true;
11737 }
11738
11739 var tag = this.tagMap[id];
11740 return tag !== undefined && tag.hasNameForId(id, name);
11741 };
11742
11743 /* registers a componentId and registers it on its tag */
11744
11745
11746 StyleSheet.prototype.deferredInject = function deferredInject(id, cssRules) {
11747 /* don't inject when the id is already registered */
11748 if (this.tagMap[id] !== undefined) return;
11749
11750 var clones = this.clones;
11751
11752 for (var i = 0; i < clones.length; i += 1) {
11753 clones[i].deferredInject(id, cssRules);
11754 }
11755
11756 this.getTagForId(id).insertMarker(id);
11757 this.deferred[id] = cssRules;
11758 };
11759
11760 /* injects rules for a given id with a name that will need to be cached */
11761
11762
11763 StyleSheet.prototype.inject = function inject(id, cssRules, name) {
11764 var clones = this.clones;
11765
11766
11767 for (var i = 0; i < clones.length; i += 1) {
11768 clones[i].inject(id, cssRules, name);
11769 }
11770
11771 var tag = this.getTagForId(id);
11772
11773 /* add deferred rules for component */
11774 if (this.deferred[id] !== undefined) {
11775 // Combine passed cssRules with previously deferred CSS rules
11776 // NOTE: We cannot mutate the deferred array itself as all clones
11777 // do the same (see clones[i].inject)
11778 var rules = this.deferred[id].concat(cssRules);
11779 tag.insertRules(id, rules, name);
11780
11781 this.deferred[id] = undefined;
11782 } else {
11783 tag.insertRules(id, cssRules, name);
11784 }
11785 };
11786
11787 /* removes all rules for a given id, which doesn't remove its marker but resets it */
11788
11789
11790 StyleSheet.prototype.remove = function remove(id) {
11791 var tag = this.tagMap[id];
11792 if (tag === undefined) return;
11793
11794 var clones = this.clones;
11795
11796 for (var i = 0; i < clones.length; i += 1) {
11797 clones[i].remove(id);
11798 }
11799
11800 /* remove all rules from the tag */
11801 tag.removeRules(id);
11802
11803 /* ignore possible rehydrated names */
11804 this.ignoreRehydratedNames[id] = true;
11805
11806 /* delete possible deferred rules */
11807 this.deferred[id] = undefined;
11808 };
11809
11810 StyleSheet.prototype.toHTML = function toHTML() {
11811 return this.tags.map(function (tag) {
11812 return tag.toHTML();
11813 }).join('');
11814 };
11815
11816 StyleSheet.prototype.toReactElements = function toReactElements() {
11817 var id = this.id;
11818
11819
11820 return this.tags.map(function (tag, i) {
11821 var key = 'sc-' + id + '-' + i;
11822 return (0,react__WEBPACK_IMPORTED_MODULE_2__.cloneElement)(tag.toElement(), { key: key });
11823 });
11824 };
11825
11826 createClass(StyleSheet, null, [{
11827 key: 'master',
11828 get: function get$$1() {
11829 return master || (master = new StyleSheet().rehydrate());
11830 }
11831
11832 /* NOTE: This is just for backwards-compatibility with jest-styled-components */
11833
11834 }, {
11835 key: 'instance',
11836 get: function get$$1() {
11837 return StyleSheet.master;
11838 }
11839 }]);
11840 return StyleSheet;
11841 }();
11842
11843 //
11844
11845 var Keyframes = function () {
11846 function Keyframes(name, rules) {
11847 var _this = this;
11848
11849 classCallCheck(this, Keyframes);
11850
11851 this.inject = function (styleSheet) {
11852 if (!styleSheet.hasNameForId(_this.id, _this.name)) {
11853 styleSheet.inject(_this.id, _this.rules, _this.name);
11854 }
11855 };
11856
11857 this.toString = function () {
11858 throw new StyledComponentsError(12, String(_this.name));
11859 };
11860
11861 this.name = name;
11862 this.rules = rules;
11863
11864 this.id = 'sc-keyframes-' + name;
11865 }
11866
11867 Keyframes.prototype.getName = function getName() {
11868 return this.name;
11869 };
11870
11871 return Keyframes;
11872 }();
11873
11874 //
11875
11876 /**
11877 * inlined version of
11878 * https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/hyphenateStyleName.js
11879 */
11880
11881 var uppercasePattern = /([A-Z])/g;
11882 var msPattern = /^ms-/;
11883
11884 /**
11885 * Hyphenates a camelcased CSS property name, for example:
11886 *
11887 * > hyphenateStyleName('backgroundColor')
11888 * < "background-color"
11889 * > hyphenateStyleName('MozTransition')
11890 * < "-moz-transition"
11891 * > hyphenateStyleName('msTransition')
11892 * < "-ms-transition"
11893 *
11894 * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
11895 * is converted to `-ms-`.
11896 *
11897 * @param {string} string
11898 * @return {string}
11899 */
11900 function hyphenateStyleName(string) {
11901 return string.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
11902 }
11903
11904 //
11905
11906 // Taken from https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/shared/dangerousStyleValue.js
11907 function addUnitIfNeeded(name, value) {
11908 // https://github.com/amilajack/eslint-plugin-flowtype-errors/issues/133
11909 // $FlowFixMe
11910 if (value == null || typeof value === 'boolean' || value === '') {
11911 return '';
11912 }
11913
11914 if (typeof value === 'number' && value !== 0 && !(name in _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__["default"])) {
11915 return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
11916 }
11917
11918 return String(value).trim();
11919 }
11920
11921 //
11922
11923 /**
11924 * It's falsish not falsy because 0 is allowed.
11925 */
11926 var isFalsish = function isFalsish(chunk) {
11927 return chunk === undefined || chunk === null || chunk === false || chunk === '';
11928 };
11929
11930 var objToCssArray = function objToCssArray(obj, prevKey) {
11931 var rules = [];
11932 var keys = Object.keys(obj);
11933
11934 keys.forEach(function (key) {
11935 if (!isFalsish(obj[key])) {
11936 if (isPlainObject(obj[key])) {
11937 rules.push.apply(rules, objToCssArray(obj[key], key));
11938
11939 return rules;
11940 } else if (isFunction(obj[key])) {
11941 rules.push(hyphenateStyleName(key) + ':', obj[key], ';');
11942
11943 return rules;
11944 }
11945 rules.push(hyphenateStyleName(key) + ': ' + addUnitIfNeeded(key, obj[key]) + ';');
11946 }
11947 return rules;
11948 });
11949
11950 return prevKey ? [prevKey + ' {'].concat(rules, ['}']) : rules;
11951 };
11952
11953 function flatten(chunk, executionContext, styleSheet) {
11954 if (Array.isArray(chunk)) {
11955 var ruleSet = [];
11956
11957 for (var i = 0, len = chunk.length, result; i < len; i += 1) {
11958 result = flatten(chunk[i], executionContext, styleSheet);
11959
11960 if (result === null) continue;else if (Array.isArray(result)) ruleSet.push.apply(ruleSet, result);else ruleSet.push(result);
11961 }
11962
11963 return ruleSet;
11964 }
11965
11966 if (isFalsish(chunk)) {
11967 return null;
11968 }
11969
11970 /* Handle other components */
11971 if (isStyledComponent(chunk)) {
11972 return '.' + chunk.styledComponentId;
11973 }
11974
11975 /* Either execute or defer the function */
11976 if (isFunction(chunk)) {
11977 if (isStatelessFunction(chunk) && executionContext) {
11978 var _result = chunk(executionContext);
11979
11980 if ( true && (0,react_is__WEBPACK_IMPORTED_MODULE_4__.isElement)(_result)) {
11981 // eslint-disable-next-line no-console
11982 console.warn(getComponentName(chunk) + ' is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.');
11983 }
11984
11985 return flatten(_result, executionContext, styleSheet);
11986 } else return chunk;
11987 }
11988
11989 if (chunk instanceof Keyframes) {
11990 if (styleSheet) {
11991 chunk.inject(styleSheet);
11992 return chunk.getName();
11993 } else return chunk;
11994 }
11995
11996 /* Handle objects */
11997 return isPlainObject(chunk) ? objToCssArray(chunk) : chunk.toString();
11998 }
11999
12000 //
12001
12002 function css(styles) {
12003 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12004 interpolations[_key - 1] = arguments[_key];
12005 }
12006
12007 if (isFunction(styles) || isPlainObject(styles)) {
12008 // $FlowFixMe
12009 return flatten(interleave(EMPTY_ARRAY, [styles].concat(interpolations)));
12010 }
12011
12012 // $FlowFixMe
12013 return flatten(interleave(styles, interpolations));
12014 }
12015
12016 //
12017
12018 function constructWithOptions(componentConstructor, tag) {
12019 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT;
12020
12021 if (!(0,react_is__WEBPACK_IMPORTED_MODULE_4__.isValidElementType)(tag)) {
12022 throw new StyledComponentsError(1, String(tag));
12023 }
12024
12025 /* This is callable directly as a template function */
12026 // $FlowFixMe: Not typed to avoid destructuring arguments
12027 var templateFunction = function templateFunction() {
12028 return componentConstructor(tag, options, css.apply(undefined, arguments));
12029 };
12030
12031 /* If config methods are called, wrap up a new template function and merge options */
12032 templateFunction.withConfig = function (config) {
12033 return constructWithOptions(componentConstructor, tag, _extends({}, options, config));
12034 };
12035
12036 /* Modify/inject new props at runtime */
12037 templateFunction.attrs = function (attrs) {
12038 return constructWithOptions(componentConstructor, tag, _extends({}, options, {
12039 attrs: Array.prototype.concat(options.attrs, attrs).filter(Boolean)
12040 }));
12041 };
12042
12043 return templateFunction;
12044 }
12045
12046 //
12047 // Source: https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js
12048 function murmurhash(c) {
12049 for (var e = c.length | 0, a = e | 0, d = 0, b; e >= 4;) {
12050 b = c.charCodeAt(d) & 255 | (c.charCodeAt(++d) & 255) << 8 | (c.charCodeAt(++d) & 255) << 16 | (c.charCodeAt(++d) & 255) << 24, b = 1540483477 * (b & 65535) + ((1540483477 * (b >>> 16) & 65535) << 16), b ^= b >>> 24, b = 1540483477 * (b & 65535) + ((1540483477 * (b >>> 16) & 65535) << 16), a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16) ^ b, e -= 4, ++d;
12051 }
12052 switch (e) {
12053 case 3:
12054 a ^= (c.charCodeAt(d + 2) & 255) << 16;
12055 case 2:
12056 a ^= (c.charCodeAt(d + 1) & 255) << 8;
12057 case 1:
12058 a ^= c.charCodeAt(d) & 255, a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
12059 }
12060 a ^= a >>> 13;
12061 a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
12062 return (a ^ a >>> 15) >>> 0;
12063 }
12064
12065 //
12066 /* eslint-disable no-bitwise */
12067
12068 /* This is the "capacity" of our alphabet i.e. 2x26 for all letters plus their capitalised
12069 * counterparts */
12070 var charsLength = 52;
12071
12072 /* start at 75 for 'a' until 'z' (25) and then start at 65 for capitalised letters */
12073 var getAlphabeticChar = function getAlphabeticChar(code) {
12074 return String.fromCharCode(code + (code > 25 ? 39 : 97));
12075 };
12076
12077 /* input a number, usually a hash and convert it to base-52 */
12078 function generateAlphabeticName(code) {
12079 var name = '';
12080 var x = void 0;
12081
12082 /* get a char and divide by alphabet-length */
12083 for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {
12084 name = getAlphabeticChar(x % charsLength) + name;
12085 }
12086
12087 return getAlphabeticChar(x % charsLength) + name;
12088 }
12089
12090 //
12091
12092 function hasFunctionObjectKey(obj) {
12093 // eslint-disable-next-line guard-for-in, no-restricted-syntax
12094 for (var key in obj) {
12095 if (isFunction(obj[key])) {
12096 return true;
12097 }
12098 }
12099
12100 return false;
12101 }
12102
12103 function isStaticRules(rules, attrs) {
12104 for (var i = 0; i < rules.length; i += 1) {
12105 var rule = rules[i];
12106
12107 // recursive case
12108 if (Array.isArray(rule) && !isStaticRules(rule, attrs)) {
12109 return false;
12110 } else if (isFunction(rule) && !isStyledComponent(rule)) {
12111 // functions are allowed to be static if they're just being
12112 // used to get the classname of a nested styled component
12113 return false;
12114 }
12115 }
12116
12117 if (attrs.some(function (x) {
12118 return isFunction(x) || hasFunctionObjectKey(x);
12119 })) return false;
12120
12121 return true;
12122 }
12123
12124 //
12125
12126 /* combines hashStr (murmurhash) and nameGenerator for convenience */
12127 var hasher = function hasher(str) {
12128 return generateAlphabeticName(murmurhash(str));
12129 };
12130
12131 /*
12132 ComponentStyle is all the CSS-specific stuff, not
12133 the React-specific stuff.
12134 */
12135
12136 var ComponentStyle = function () {
12137 function ComponentStyle(rules, attrs, componentId) {
12138 classCallCheck(this, ComponentStyle);
12139
12140 this.rules = rules;
12141 this.isStatic = false && 0;
12142 this.componentId = componentId;
12143
12144 if (!StyleSheet.master.hasId(componentId)) {
12145 StyleSheet.master.deferredInject(componentId, []);
12146 }
12147 }
12148
12149 /*
12150 * Flattens a rule set into valid CSS
12151 * Hashes it, wraps the whole chunk in a .hash1234 {}
12152 * Returns the hash to be injected on render()
12153 * */
12154
12155
12156 ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) {
12157 var isStatic = this.isStatic,
12158 componentId = this.componentId,
12159 lastClassName = this.lastClassName;
12160
12161 if (IS_BROWSER && isStatic && typeof lastClassName === 'string' && styleSheet.hasNameForId(componentId, lastClassName)) {
12162 return lastClassName;
12163 }
12164
12165 var flatCSS = flatten(this.rules, executionContext, styleSheet);
12166 var name = hasher(this.componentId + flatCSS.join(''));
12167 if (!styleSheet.hasNameForId(componentId, name)) {
12168 styleSheet.inject(this.componentId, stringifyRules(flatCSS, '.' + name, undefined, componentId), name);
12169 }
12170
12171 this.lastClassName = name;
12172 return name;
12173 };
12174
12175 ComponentStyle.generateName = function generateName(str) {
12176 return hasher(str);
12177 };
12178
12179 return ComponentStyle;
12180 }();
12181
12182 //
12183
12184 var LIMIT = 200;
12185
12186 var createWarnTooManyClasses = (function (displayName) {
12187 var generatedClasses = {};
12188 var warningSeen = false;
12189
12190 return function (className) {
12191 if (!warningSeen) {
12192 generatedClasses[className] = true;
12193 if (Object.keys(generatedClasses).length >= LIMIT) {
12194 // Unable to find latestRule in test environment.
12195 /* eslint-disable no-console, prefer-template */
12196 console.warn('Over ' + LIMIT + ' classes were generated for component ' + displayName + '. \n' + 'Consider using the attrs method, together with a style object for frequently changed styles.\n' + 'Example:\n' + ' const Component = styled.div.attrs(props => ({\n' + ' style: {\n' + ' background: props.background,\n' + ' },\n' + ' }))`width: 100%;`\n\n' + ' <Component />');
12197 warningSeen = true;
12198 generatedClasses = {};
12199 }
12200 }
12201 };
12202 });
12203
12204 //
12205
12206 var determineTheme = (function (props, fallbackTheme) {
12207 var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT;
12208
12209 // Props should take precedence over ThemeProvider, which should take precedence over
12210 // defaultProps, but React automatically puts defaultProps on props.
12211
12212 /* eslint-disable react/prop-types, flowtype-errors/show-errors */
12213 var isDefaultTheme = defaultProps ? props.theme === defaultProps.theme : false;
12214 var theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme || defaultProps.theme;
12215 /* eslint-enable */
12216
12217 return theme;
12218 });
12219
12220 //
12221 var escapeRegex = /[[\].#*$><+~=|^:(),"'`-]+/g;
12222 var dashesAtEnds = /(^-|-$)/g;
12223
12224 /**
12225 * TODO: Explore using CSS.escape when it becomes more available
12226 * in evergreen browsers.
12227 */
12228 function escape(str) {
12229 return str
12230 // Replace all possible CSS selectors
12231 .replace(escapeRegex, '-')
12232
12233 // Remove extraneous hyphens at the start and end
12234 .replace(dashesAtEnds, '');
12235 }
12236
12237 //
12238
12239 function isTag(target) {
12240 return typeof target === 'string' && ( true ? target.charAt(0) === target.charAt(0).toLowerCase() : 0);
12241 }
12242
12243 //
12244
12245 function generateDisplayName(target) {
12246 // $FlowFixMe
12247 return isTag(target) ? 'styled.' + target : 'Styled(' + getComponentName(target) + ')';
12248 }
12249
12250 var _TYPE_STATICS;
12251
12252 var REACT_STATICS = {
12253 childContextTypes: true,
12254 contextTypes: true,
12255 defaultProps: true,
12256 displayName: true,
12257 getDerivedStateFromProps: true,
12258 propTypes: true,
12259 type: true
12260 };
12261
12262 var KNOWN_STATICS = {
12263 name: true,
12264 length: true,
12265 prototype: true,
12266 caller: true,
12267 callee: true,
12268 arguments: true,
12269 arity: true
12270 };
12271
12272 var TYPE_STATICS = (_TYPE_STATICS = {}, _TYPE_STATICS[react_is__WEBPACK_IMPORTED_MODULE_4__.ForwardRef] = {
12273 $$typeof: true,
12274 render: true
12275 }, _TYPE_STATICS);
12276
12277 var defineProperty$1 = Object.defineProperty,
12278 getOwnPropertyNames = Object.getOwnPropertyNames,
12279 _Object$getOwnPropert = Object.getOwnPropertySymbols,
12280 getOwnPropertySymbols = _Object$getOwnPropert === undefined ? function () {
12281 return [];
12282 } : _Object$getOwnPropert,
12283 getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor,
12284 getPrototypeOf = Object.getPrototypeOf,
12285 objectPrototype = Object.prototype;
12286 var arrayPrototype = Array.prototype;
12287
12288
12289 function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
12290 if (typeof sourceComponent !== 'string') {
12291 // don't hoist over string (html) components
12292
12293 var inheritedComponent = getPrototypeOf(sourceComponent);
12294
12295 if (inheritedComponent && inheritedComponent !== objectPrototype) {
12296 hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
12297 }
12298
12299 var keys = arrayPrototype.concat(getOwnPropertyNames(sourceComponent),
12300 // $FlowFixMe
12301 getOwnPropertySymbols(sourceComponent));
12302
12303 var targetStatics = TYPE_STATICS[targetComponent.$$typeof] || REACT_STATICS;
12304
12305 var sourceStatics = TYPE_STATICS[sourceComponent.$$typeof] || REACT_STATICS;
12306
12307 var i = keys.length;
12308 var descriptor = void 0;
12309 var key = void 0;
12310
12311 // eslint-disable-next-line no-plusplus
12312 while (i--) {
12313 key = keys[i];
12314
12315 if (
12316 // $FlowFixMe
12317 !KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) &&
12318 // $FlowFixMe
12319 !(targetStatics && targetStatics[key])) {
12320 descriptor = getOwnPropertyDescriptor(sourceComponent, key);
12321
12322 if (descriptor) {
12323 try {
12324 // Avoid failures from read-only properties
12325 defineProperty$1(targetComponent, key, descriptor);
12326 } catch (e) {
12327 /* fail silently */
12328 }
12329 }
12330 }
12331 }
12332
12333 return targetComponent;
12334 }
12335
12336 return targetComponent;
12337 }
12338
12339 //
12340 function isDerivedReactComponent(fn) {
12341 return !!(fn && fn.prototype && fn.prototype.isReactComponent);
12342 }
12343
12344 //
12345 // Helper to call a given function, only once
12346 var once = (function (cb) {
12347 var called = false;
12348
12349 return function () {
12350 if (!called) {
12351 called = true;
12352 cb.apply(undefined, arguments);
12353 }
12354 };
12355 });
12356
12357 //
12358
12359 var ThemeContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.createContext)();
12360
12361 var ThemeConsumer = ThemeContext.Consumer;
12362
12363 /**
12364 * Provide a theme to an entire react component tree via context
12365 */
12366
12367 var ThemeProvider = function (_Component) {
12368 inherits(ThemeProvider, _Component);
12369
12370 function ThemeProvider(props) {
12371 classCallCheck(this, ThemeProvider);
12372
12373 var _this = possibleConstructorReturn(this, _Component.call(this, props));
12374
12375 _this.getContext = (0,memoize_one__WEBPACK_IMPORTED_MODULE_7__["default"])(_this.getContext.bind(_this));
12376 _this.renderInner = _this.renderInner.bind(_this);
12377 return _this;
12378 }
12379
12380 ThemeProvider.prototype.render = function render() {
12381 if (!this.props.children) return null;
12382
12383 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12384 ThemeContext.Consumer,
12385 null,
12386 this.renderInner
12387 );
12388 };
12389
12390 ThemeProvider.prototype.renderInner = function renderInner(outerTheme) {
12391 var context = this.getContext(this.props.theme, outerTheme);
12392
12393 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12394 ThemeContext.Provider,
12395 { value: context },
12396 this.props.children
12397 );
12398 };
12399
12400 /**
12401 * Get the theme from the props, supporting both (outerTheme) => {}
12402 * as well as object notation
12403 */
12404
12405
12406 ThemeProvider.prototype.getTheme = function getTheme(theme, outerTheme) {
12407 if (isFunction(theme)) {
12408 var mergedTheme = theme(outerTheme);
12409
12410 if ( true && (mergedTheme === null || Array.isArray(mergedTheme) || (typeof mergedTheme === 'undefined' ? 'undefined' : _typeof(mergedTheme)) !== 'object')) {
12411 throw new StyledComponentsError(7);
12412 }
12413
12414 return mergedTheme;
12415 }
12416
12417 if (theme === null || Array.isArray(theme) || (typeof theme === 'undefined' ? 'undefined' : _typeof(theme)) !== 'object') {
12418 throw new StyledComponentsError(8);
12419 }
12420
12421 return _extends({}, outerTheme, theme);
12422 };
12423
12424 ThemeProvider.prototype.getContext = function getContext(theme, outerTheme) {
12425 return this.getTheme(theme, outerTheme);
12426 };
12427
12428 return ThemeProvider;
12429 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
12430
12431 //
12432
12433 var CLOSING_TAG_R = /^\s*<\/[a-z]/i;
12434
12435 var ServerStyleSheet = function () {
12436 function ServerStyleSheet() {
12437 classCallCheck(this, ServerStyleSheet);
12438
12439 /* The master sheet might be reset, so keep a reference here */
12440 this.masterSheet = StyleSheet.master;
12441 this.instance = this.masterSheet.clone();
12442 this.sealed = false;
12443 }
12444
12445 /**
12446 * Mark the ServerStyleSheet as being fully emitted and manually GC it from the
12447 * StyleSheet singleton.
12448 */
12449
12450
12451 ServerStyleSheet.prototype.seal = function seal() {
12452 if (!this.sealed) {
12453 /* Remove sealed StyleSheets from the master sheet */
12454 var index = this.masterSheet.clones.indexOf(this.instance);
12455 this.masterSheet.clones.splice(index, 1);
12456 this.sealed = true;
12457 }
12458 };
12459
12460 ServerStyleSheet.prototype.collectStyles = function collectStyles(children) {
12461 if (this.sealed) {
12462 throw new StyledComponentsError(2);
12463 }
12464
12465 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12466 StyleSheetManager,
12467 { sheet: this.instance },
12468 children
12469 );
12470 };
12471
12472 ServerStyleSheet.prototype.getStyleTags = function getStyleTags() {
12473 this.seal();
12474 return this.instance.toHTML();
12475 };
12476
12477 ServerStyleSheet.prototype.getStyleElement = function getStyleElement() {
12478 this.seal();
12479 return this.instance.toReactElements();
12480 };
12481
12482 ServerStyleSheet.prototype.interleaveWithNodeStream = function interleaveWithNodeStream(readableStream) {
12483 var _this = this;
12484
12485 {
12486 throw new StyledComponentsError(3);
12487 }
12488
12489 /* the tag index keeps track of which tags have already been emitted */
12490 var instance = this.instance;
12491
12492 var instanceTagIndex = 0;
12493
12494 var streamAttr = SC_STREAM_ATTR + '="true"';
12495
12496 var transformer = new stream.Transform({
12497 transform: function appendStyleChunks(chunk, /* encoding */_, callback) {
12498 var tags = instance.tags;
12499
12500 var html = '';
12501
12502 /* retrieve html for each new style tag */
12503 for (; instanceTagIndex < tags.length; instanceTagIndex += 1) {
12504 var tag = tags[instanceTagIndex];
12505 html += tag.toHTML(streamAttr);
12506 }
12507
12508 /* force our StyleSheets to emit entirely new tags */
12509 instance.sealAllTags();
12510
12511 var renderedHtml = chunk.toString();
12512
12513 /* prepend style html to chunk, unless the start of the chunk is a closing tag in which case append right after that */
12514 if (CLOSING_TAG_R.test(renderedHtml)) {
12515 var endOfClosingTag = renderedHtml.indexOf('>');
12516
12517 this.push(renderedHtml.slice(0, endOfClosingTag + 1) + html + renderedHtml.slice(endOfClosingTag + 1));
12518 } else this.push(html + renderedHtml);
12519
12520 callback();
12521 }
12522 });
12523
12524 readableStream.on('end', function () {
12525 return _this.seal();
12526 });
12527
12528 readableStream.on('error', function (err) {
12529 _this.seal();
12530
12531 // forward the error to the transform stream
12532 transformer.emit('error', err);
12533 });
12534
12535 return readableStream.pipe(transformer);
12536 };
12537
12538 return ServerStyleSheet;
12539 }();
12540
12541 //
12542
12543 var StyleSheetContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.createContext)();
12544 var StyleSheetConsumer = StyleSheetContext.Consumer;
12545
12546 var StyleSheetManager = function (_Component) {
12547 inherits(StyleSheetManager, _Component);
12548
12549 function StyleSheetManager(props) {
12550 classCallCheck(this, StyleSheetManager);
12551
12552 var _this = possibleConstructorReturn(this, _Component.call(this, props));
12553
12554 _this.getContext = (0,memoize_one__WEBPACK_IMPORTED_MODULE_7__["default"])(_this.getContext);
12555 return _this;
12556 }
12557
12558 StyleSheetManager.prototype.getContext = function getContext(sheet, target) {
12559 if (sheet) {
12560 return sheet;
12561 } else if (target) {
12562 return new StyleSheet(target);
12563 } else {
12564 throw new StyledComponentsError(4);
12565 }
12566 };
12567
12568 StyleSheetManager.prototype.render = function render() {
12569 var _props = this.props,
12570 children = _props.children,
12571 sheet = _props.sheet,
12572 target = _props.target;
12573
12574
12575 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12576 StyleSheetContext.Provider,
12577 { value: this.getContext(sheet, target) },
12578 true ? react__WEBPACK_IMPORTED_MODULE_2___default().Children.only(children) : 0
12579 );
12580 };
12581
12582 return StyleSheetManager;
12583 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
12584 true ? StyleSheetManager.propTypes = {
12585 sheet: prop_types__WEBPACK_IMPORTED_MODULE_8___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_8___default().instanceOf(StyleSheet), prop_types__WEBPACK_IMPORTED_MODULE_8___default().instanceOf(ServerStyleSheet)]),
12586
12587 target: prop_types__WEBPACK_IMPORTED_MODULE_8___default().shape({
12588 appendChild: (prop_types__WEBPACK_IMPORTED_MODULE_8___default().func.isRequired)
12589 })
12590 } : 0;
12591
12592 //
12593
12594 var identifiers = {};
12595
12596 /* We depend on components having unique IDs */
12597 function generateId(_ComponentStyle, _displayName, parentComponentId) {
12598 var displayName = typeof _displayName !== 'string' ? 'sc' : escape(_displayName);
12599
12600 /**
12601 * This ensures uniqueness if two components happen to share
12602 * the same displayName.
12603 */
12604 var nr = (identifiers[displayName] || 0) + 1;
12605 identifiers[displayName] = nr;
12606
12607 var componentId = displayName + '-' + _ComponentStyle.generateName(displayName + nr);
12608
12609 return parentComponentId ? parentComponentId + '-' + componentId : componentId;
12610 }
12611
12612 // $FlowFixMe
12613
12614 var StyledComponent = function (_Component) {
12615 inherits(StyledComponent, _Component);
12616
12617 function StyledComponent() {
12618 classCallCheck(this, StyledComponent);
12619
12620 var _this = possibleConstructorReturn(this, _Component.call(this));
12621
12622 _this.attrs = {};
12623
12624 _this.renderOuter = _this.renderOuter.bind(_this);
12625 _this.renderInner = _this.renderInner.bind(_this);
12626
12627 if (true) {
12628 _this.warnInnerRef = once(function (displayName) {
12629 return (
12630 // eslint-disable-next-line no-console
12631 console.warn('The "innerRef" API has been removed in styled-components v4 in favor of React 16 ref forwarding, use "ref" instead like a typical component. "innerRef" was detected on component "' + displayName + '".')
12632 );
12633 });
12634
12635 _this.warnAttrsFnObjectKeyDeprecated = once(function (key, displayName) {
12636 return (
12637 // eslint-disable-next-line no-console
12638 console.warn('Functions as object-form attrs({}) keys are now deprecated and will be removed in a future version of styled-components. Switch to the new attrs(props => ({})) syntax instead for easier and more powerful composition. The attrs key in question is "' + key + '" on component "' + displayName + '".', '\n ' + new Error().stack)
12639 );
12640 });
12641
12642 _this.warnNonStyledComponentAttrsObjectKey = once(function (key, displayName) {
12643 return (
12644 // eslint-disable-next-line no-console
12645 console.warn('It looks like you\'ve used a non styled-component as the value for the "' + key + '" prop in an object-form attrs constructor of "' + displayName + '".\n' + 'You should use the new function-form attrs constructor which avoids this issue: attrs(props => ({ yourStuff }))\n' + "To continue using the deprecated object syntax, you'll need to wrap your component prop in a function to make it available inside the styled component (you'll still get the deprecation warning though.)\n" + ('For example, { ' + key + ': () => InnerComponent } instead of { ' + key + ': InnerComponent }'))
12646 );
12647 });
12648 }
12649 return _this;
12650 }
12651
12652 StyledComponent.prototype.render = function render() {
12653 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12654 StyleSheetConsumer,
12655 null,
12656 this.renderOuter
12657 );
12658 };
12659
12660 StyledComponent.prototype.renderOuter = function renderOuter() {
12661 var styleSheet = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : StyleSheet.master;
12662
12663 this.styleSheet = styleSheet;
12664
12665 // No need to subscribe a static component to theme changes, it won't change anything
12666 if (this.props.forwardedComponent.componentStyle.isStatic) return this.renderInner();
12667
12668 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12669 ThemeConsumer,
12670 null,
12671 this.renderInner
12672 );
12673 };
12674
12675 StyledComponent.prototype.renderInner = function renderInner(theme) {
12676 var _props$forwardedCompo = this.props.forwardedComponent,
12677 componentStyle = _props$forwardedCompo.componentStyle,
12678 defaultProps = _props$forwardedCompo.defaultProps,
12679 displayName = _props$forwardedCompo.displayName,
12680 foldedComponentIds = _props$forwardedCompo.foldedComponentIds,
12681 styledComponentId = _props$forwardedCompo.styledComponentId,
12682 target = _props$forwardedCompo.target;
12683
12684
12685 var generatedClassName = void 0;
12686 if (componentStyle.isStatic) {
12687 generatedClassName = this.generateAndInjectStyles(EMPTY_OBJECT, this.props);
12688 } else {
12689 generatedClassName = this.generateAndInjectStyles(determineTheme(this.props, theme, defaultProps) || EMPTY_OBJECT, this.props);
12690 }
12691
12692 var elementToBeCreated = this.props.as || this.attrs.as || target;
12693 var isTargetTag = isTag(elementToBeCreated);
12694
12695 var propsForElement = {};
12696 var computedProps = _extends({}, this.props, this.attrs);
12697
12698 var key = void 0;
12699 // eslint-disable-next-line guard-for-in
12700 for (key in computedProps) {
12701 if ( true && key === 'innerRef' && isTargetTag) {
12702 this.warnInnerRef(displayName);
12703 }
12704
12705 if (key === 'forwardedComponent' || key === 'as') {
12706 continue;
12707 } else if (key === 'forwardedRef') propsForElement.ref = computedProps[key];else if (key === 'forwardedAs') propsForElement.as = computedProps[key];else if (!isTargetTag || (0,_emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_5__["default"])(key)) {
12708 // Don't pass through non HTML tags through to HTML elements
12709 propsForElement[key] = computedProps[key];
12710 }
12711 }
12712
12713 if (this.props.style && this.attrs.style) {
12714 propsForElement.style = _extends({}, this.attrs.style, this.props.style);
12715 }
12716
12717 propsForElement.className = Array.prototype.concat(foldedComponentIds, styledComponentId, generatedClassName !== styledComponentId ? generatedClassName : null, this.props.className, this.attrs.className).filter(Boolean).join(' ');
12718
12719 return (0,react__WEBPACK_IMPORTED_MODULE_2__.createElement)(elementToBeCreated, propsForElement);
12720 };
12721
12722 StyledComponent.prototype.buildExecutionContext = function buildExecutionContext(theme, props, attrs) {
12723 var _this2 = this;
12724
12725 var context = _extends({}, props, { theme: theme });
12726
12727 if (!attrs.length) return context;
12728
12729 this.attrs = {};
12730
12731 attrs.forEach(function (attrDef) {
12732 var resolvedAttrDef = attrDef;
12733 var attrDefWasFn = false;
12734 var attr = void 0;
12735 var key = void 0;
12736
12737 if (isFunction(resolvedAttrDef)) {
12738 // $FlowFixMe
12739 resolvedAttrDef = resolvedAttrDef(context);
12740 attrDefWasFn = true;
12741 }
12742
12743 /* eslint-disable guard-for-in */
12744 // $FlowFixMe
12745 for (key in resolvedAttrDef) {
12746 attr = resolvedAttrDef[key];
12747
12748 if (!attrDefWasFn) {
12749 if (isFunction(attr) && !isDerivedReactComponent(attr) && !isStyledComponent(attr)) {
12750 if (true) {
12751 _this2.warnAttrsFnObjectKeyDeprecated(key, props.forwardedComponent.displayName);
12752 }
12753
12754 attr = attr(context);
12755
12756 if ( true && react__WEBPACK_IMPORTED_MODULE_2___default().isValidElement(attr)) {
12757 _this2.warnNonStyledComponentAttrsObjectKey(key, props.forwardedComponent.displayName);
12758 }
12759 }
12760 }
12761
12762 _this2.attrs[key] = attr;
12763 context[key] = attr;
12764 }
12765 /* eslint-enable */
12766 });
12767
12768 return context;
12769 };
12770
12771 StyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) {
12772 var _props$forwardedCompo2 = props.forwardedComponent,
12773 attrs = _props$forwardedCompo2.attrs,
12774 componentStyle = _props$forwardedCompo2.componentStyle,
12775 warnTooManyClasses = _props$forwardedCompo2.warnTooManyClasses;
12776
12777 // statically styled-components don't need to build an execution context object,
12778 // and shouldn't be increasing the number of class names
12779
12780 if (componentStyle.isStatic && !attrs.length) {
12781 return componentStyle.generateAndInjectStyles(EMPTY_OBJECT, this.styleSheet);
12782 }
12783
12784 var className = componentStyle.generateAndInjectStyles(this.buildExecutionContext(theme, props, attrs), this.styleSheet);
12785
12786 if ( true && warnTooManyClasses) warnTooManyClasses(className);
12787
12788 return className;
12789 };
12790
12791 return StyledComponent;
12792 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
12793
12794 function createStyledComponent(target, options, rules) {
12795 var isTargetStyledComp = isStyledComponent(target);
12796 var isClass = !isTag(target);
12797
12798 var _options$displayName = options.displayName,
12799 displayName = _options$displayName === undefined ? generateDisplayName(target) : _options$displayName,
12800 _options$componentId = options.componentId,
12801 componentId = _options$componentId === undefined ? generateId(ComponentStyle, options.displayName, options.parentComponentId) : _options$componentId,
12802 _options$ParentCompon = options.ParentComponent,
12803 ParentComponent = _options$ParentCompon === undefined ? StyledComponent : _options$ParentCompon,
12804 _options$attrs = options.attrs,
12805 attrs = _options$attrs === undefined ? EMPTY_ARRAY : _options$attrs;
12806
12807
12808 var styledComponentId = options.displayName && options.componentId ? escape(options.displayName) + '-' + options.componentId : options.componentId || componentId;
12809
12810 // fold the underlying StyledComponent attrs up (implicit extend)
12811 var finalAttrs =
12812 // $FlowFixMe
12813 isTargetStyledComp && target.attrs ? Array.prototype.concat(target.attrs, attrs).filter(Boolean) : attrs;
12814
12815 var componentStyle = new ComponentStyle(isTargetStyledComp ? // fold the underlying StyledComponent rules up (implicit extend)
12816 // $FlowFixMe
12817 target.componentStyle.rules.concat(rules) : rules, finalAttrs, styledComponentId);
12818
12819 /**
12820 * forwardRef creates a new interim component, which we'll take advantage of
12821 * instead of extending ParentComponent to create _another_ interim class
12822 */
12823 var WrappedStyledComponent = void 0;
12824 var forwardRef = function forwardRef(props, ref) {
12825 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ParentComponent, _extends({}, props, { forwardedComponent: WrappedStyledComponent, forwardedRef: ref }));
12826 };
12827 forwardRef.displayName = displayName;
12828 WrappedStyledComponent = react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(forwardRef);
12829 WrappedStyledComponent.displayName = displayName;
12830
12831 // $FlowFixMe
12832 WrappedStyledComponent.attrs = finalAttrs;
12833 // $FlowFixMe
12834 WrappedStyledComponent.componentStyle = componentStyle;
12835
12836 // $FlowFixMe
12837 WrappedStyledComponent.foldedComponentIds = isTargetStyledComp ? // $FlowFixMe
12838 Array.prototype.concat(target.foldedComponentIds, target.styledComponentId) : EMPTY_ARRAY;
12839
12840 // $FlowFixMe
12841 WrappedStyledComponent.styledComponentId = styledComponentId;
12842
12843 // fold the underlying StyledComponent target up since we folded the styles
12844 // $FlowFixMe
12845 WrappedStyledComponent.target = isTargetStyledComp ? target.target : target;
12846
12847 // $FlowFixMe
12848 WrappedStyledComponent.withComponent = function withComponent(tag) {
12849 var previousComponentId = options.componentId,
12850 optionsToCopy = objectWithoutProperties(options, ['componentId']);
12851
12852
12853 var newComponentId = previousComponentId && previousComponentId + '-' + (isTag(tag) ? tag : escape(getComponentName(tag)));
12854
12855 var newOptions = _extends({}, optionsToCopy, {
12856 attrs: finalAttrs,
12857 componentId: newComponentId,
12858 ParentComponent: ParentComponent
12859 });
12860
12861 return createStyledComponent(tag, newOptions, rules);
12862 };
12863
12864 // $FlowFixMe
12865 Object.defineProperty(WrappedStyledComponent, 'defaultProps', {
12866 get: function get$$1() {
12867 return this._foldedDefaultProps;
12868 },
12869 set: function set$$1(obj) {
12870 // $FlowFixMe
12871 this._foldedDefaultProps = isTargetStyledComp ? (0,merge_anything__WEBPACK_IMPORTED_MODULE_6__["default"])(target.defaultProps, obj) : obj;
12872 }
12873 });
12874
12875 if (true) {
12876 // $FlowFixMe
12877 WrappedStyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName);
12878 }
12879
12880 // $FlowFixMe
12881 WrappedStyledComponent.toString = function () {
12882 return '.' + WrappedStyledComponent.styledComponentId;
12883 };
12884
12885 if (isClass) {
12886 hoistNonReactStatics(WrappedStyledComponent, target, {
12887 // all SC-specific things should not be hoisted
12888 attrs: true,
12889 componentStyle: true,
12890 displayName: true,
12891 foldedComponentIds: true,
12892 styledComponentId: true,
12893 target: true,
12894 withComponent: true
12895 });
12896 }
12897
12898 return WrappedStyledComponent;
12899 }
12900
12901 //
12902 // Thanks to ReactDOMFactories for this handy list!
12903
12904 var domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr',
12905
12906 // SVG
12907 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'marker', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
12908
12909 //
12910
12911 var styled = function styled(tag) {
12912 return constructWithOptions(createStyledComponent, tag);
12913 };
12914
12915 // Shorthands for all valid HTML Elements
12916 domElements.forEach(function (domElement) {
12917 styled[domElement] = styled(domElement);
12918 });
12919
12920 //
12921
12922 var GlobalStyle = function () {
12923 function GlobalStyle(rules, componentId) {
12924 classCallCheck(this, GlobalStyle);
12925
12926 this.rules = rules;
12927 this.componentId = componentId;
12928 this.isStatic = isStaticRules(rules, EMPTY_ARRAY);
12929
12930 if (!StyleSheet.master.hasId(componentId)) {
12931 StyleSheet.master.deferredInject(componentId, []);
12932 }
12933 }
12934
12935 GlobalStyle.prototype.createStyles = function createStyles(executionContext, styleSheet) {
12936 var flatCSS = flatten(this.rules, executionContext, styleSheet);
12937 var css = stringifyRules(flatCSS, '');
12938
12939 styleSheet.inject(this.componentId, css);
12940 };
12941
12942 GlobalStyle.prototype.removeStyles = function removeStyles(styleSheet) {
12943 var componentId = this.componentId;
12944
12945 if (styleSheet.hasId(componentId)) {
12946 styleSheet.remove(componentId);
12947 }
12948 };
12949
12950 // TODO: overwrite in-place instead of remove+create?
12951
12952
12953 GlobalStyle.prototype.renderStyles = function renderStyles(executionContext, styleSheet) {
12954 this.removeStyles(styleSheet);
12955 this.createStyles(executionContext, styleSheet);
12956 };
12957
12958 return GlobalStyle;
12959 }();
12960
12961 //
12962
12963 // place our cache into shared context so it'll persist between HMRs
12964 if (IS_BROWSER) {
12965 window.scCGSHMRCache = {};
12966 }
12967
12968 function createGlobalStyle(strings) {
12969 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12970 interpolations[_key - 1] = arguments[_key];
12971 }
12972
12973 var rules = css.apply(undefined, [strings].concat(interpolations));
12974 var id = 'sc-global-' + murmurhash(JSON.stringify(rules));
12975 var style = new GlobalStyle(rules, id);
12976
12977 var GlobalStyleComponent = function (_React$Component) {
12978 inherits(GlobalStyleComponent, _React$Component);
12979
12980 function GlobalStyleComponent(props) {
12981 classCallCheck(this, GlobalStyleComponent);
12982
12983 var _this = possibleConstructorReturn(this, _React$Component.call(this, props));
12984
12985 var _this$constructor = _this.constructor,
12986 globalStyle = _this$constructor.globalStyle,
12987 styledComponentId = _this$constructor.styledComponentId;
12988
12989
12990 if (IS_BROWSER) {
12991 window.scCGSHMRCache[styledComponentId] = (window.scCGSHMRCache[styledComponentId] || 0) + 1;
12992 }
12993
12994 /**
12995 * This fixes HMR compatibility. Don't ask me why, but this combination of
12996 * caching the closure variables via statics and then persisting the statics in
12997 * state works across HMR where no other combination did. ¯\_(ツ)_/¯
12998 */
12999 _this.state = {
13000 globalStyle: globalStyle,
13001 styledComponentId: styledComponentId
13002 };
13003 return _this;
13004 }
13005
13006 GlobalStyleComponent.prototype.componentWillUnmount = function componentWillUnmount() {
13007 if (window.scCGSHMRCache[this.state.styledComponentId]) {
13008 window.scCGSHMRCache[this.state.styledComponentId] -= 1;
13009 }
13010 /**
13011 * Depending on the order "render" is called this can cause the styles to be lost
13012 * until the next render pass of the remaining instance, which may
13013 * not be immediate.
13014 */
13015 if (window.scCGSHMRCache[this.state.styledComponentId] === 0) {
13016 this.state.globalStyle.removeStyles(this.styleSheet);
13017 }
13018 };
13019
13020 GlobalStyleComponent.prototype.render = function render() {
13021 var _this2 = this;
13022
13023 if ( true && react__WEBPACK_IMPORTED_MODULE_2___default().Children.count(this.props.children)) {
13024 // eslint-disable-next-line no-console
13025 console.warn('The global style component ' + this.state.styledComponentId + ' was given child JSX. createGlobalStyle does not render children.');
13026 }
13027
13028 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
13029 StyleSheetConsumer,
13030 null,
13031 function (styleSheet) {
13032 _this2.styleSheet = styleSheet || StyleSheet.master;
13033
13034 var globalStyle = _this2.state.globalStyle;
13035
13036
13037 if (globalStyle.isStatic) {
13038 globalStyle.renderStyles(STATIC_EXECUTION_CONTEXT, _this2.styleSheet);
13039
13040 return null;
13041 } else {
13042 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
13043 ThemeConsumer,
13044 null,
13045 function (theme) {
13046 // $FlowFixMe
13047 var defaultProps = _this2.constructor.defaultProps;
13048
13049
13050 var context = _extends({}, _this2.props);
13051
13052 if (typeof theme !== 'undefined') {
13053 context.theme = determineTheme(_this2.props, theme, defaultProps);
13054 }
13055
13056 globalStyle.renderStyles(context, _this2.styleSheet);
13057
13058 return null;
13059 }
13060 );
13061 }
13062 }
13063 );
13064 };
13065
13066 return GlobalStyleComponent;
13067 }((react__WEBPACK_IMPORTED_MODULE_2___default().Component));
13068
13069 GlobalStyleComponent.globalStyle = style;
13070 GlobalStyleComponent.styledComponentId = id;
13071
13072
13073 return GlobalStyleComponent;
13074 }
13075
13076 //
13077
13078 var replaceWhitespace = function replaceWhitespace(str) {
13079 return str.replace(/\s|\\n/g, '');
13080 };
13081
13082 function keyframes(strings) {
13083 /* Warning if you've used keyframes on React Native */
13084 if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
13085 // eslint-disable-next-line no-console
13086 console.warn('`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.');
13087 }
13088
13089 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
13090 interpolations[_key - 1] = arguments[_key];
13091 }
13092
13093 var rules = css.apply(undefined, [strings].concat(interpolations));
13094
13095 var name = generateAlphabeticName(murmurhash(replaceWhitespace(JSON.stringify(rules))));
13096
13097 return new Keyframes(name, stringifyRules(rules, name, '@keyframes'));
13098 }
13099
13100 //
13101
13102 var withTheme = (function (Component$$1) {
13103 var WithTheme = react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(function (props, ref) {
13104 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
13105 ThemeConsumer,
13106 null,
13107 function (theme) {
13108 // $FlowFixMe
13109 var defaultProps = Component$$1.defaultProps;
13110
13111 var themeProp = determineTheme(props, theme, defaultProps);
13112
13113 if ( true && themeProp === undefined) {
13114 // eslint-disable-next-line no-console
13115 console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "' + getComponentName(Component$$1) + '"');
13116 }
13117
13118 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(Component$$1, _extends({}, props, { theme: themeProp, ref: ref }));
13119 }
13120 );
13121 });
13122
13123 hoistNonReactStatics(WithTheme, Component$$1);
13124
13125 WithTheme.displayName = 'WithTheme(' + getComponentName(Component$$1) + ')';
13126
13127 return WithTheme;
13128 });
13129
13130 //
13131
13132 /* eslint-disable */
13133 var __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS = {
13134 StyleSheet: StyleSheet
13135 };
13136
13137 //
13138
13139 /* Warning if you've imported this file on React Native */
13140 if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
13141 // eslint-disable-next-line no-console
13142 console.warn("It looks like you've imported 'styled-components' on React Native.\n" + "Perhaps you're looking to import 'styled-components/native'?\n" + 'Read more about this at https://www.styled-components.com/docs/basics#react-native');
13143 }
13144
13145 /* Warning if there are several instances of styled-components */
13146 if ( true && typeof window !== 'undefined' && typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Node.js') === -1 && navigator.userAgent.indexOf('jsdom') === -1) {
13147 window['__styled-components-init__'] = window['__styled-components-init__'] || 0;
13148
13149 if (window['__styled-components-init__'] === 1) {
13150 // eslint-disable-next-line no-console
13151 console.warn("It looks like there are several instances of 'styled-components' initialized in this application. " + 'This may cause dynamic styles not rendering properly, errors happening during rehydration process ' + 'and makes your application bigger without a good reason.\n\n' + 'See https://s-c.sh/2BAXzed for more info.');
13152 }
13153
13154 window['__styled-components-init__'] += 1;
13155 }
13156
13157 //
13158
13159 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (styled);
13160
13161 //# sourceMappingURL=styled-components.browser.esm.js.map
13162
13163
13164 /***/ }),
13165
13166 /***/ "./node_modules/stylis-rule-sheet/index.js":
13167 /*!*************************************************!*\
13168 !*** ./node_modules/stylis-rule-sheet/index.js ***!
13169 \*************************************************/
13170 /***/ ((module) => {
13171
13172 (function (factory) {
13173 true ? (module['exports'] = factory()) :
13174 0
13175 }(function () {
13176
13177 'use strict'
13178
13179 return function (insertRule) {
13180 var delimiter = '/*|*/'
13181 var needle = delimiter+'}'
13182
13183 function toSheet (block) {
13184 if (block)
13185 try {
13186 insertRule(block + '}')
13187 } catch (e) {}
13188 }
13189
13190 return function ruleSheet (context, content, selectors, parents, line, column, length, ns, depth, at) {
13191 switch (context) {
13192 // property
13193 case 1:
13194 // @import
13195 if (depth === 0 && content.charCodeAt(0) === 64)
13196 return insertRule(content+';'), ''
13197 break
13198 // selector
13199 case 2:
13200 if (ns === 0)
13201 return content + delimiter
13202 break
13203 // at-rule
13204 case 3:
13205 switch (ns) {
13206 // @font-face, @page
13207 case 102:
13208 case 112:
13209 return insertRule(selectors[0]+content), ''
13210 default:
13211 return content + (at === 0 ? delimiter : '')
13212 }
13213 case -2:
13214 content.split(needle).forEach(toSheet)
13215 }
13216 }
13217 }
13218 }))
13219
13220
13221 /***/ }),
13222
13223 /***/ "./node_modules/stylis/stylis.min.js":
13224 /*!*******************************************!*\
13225 !*** ./node_modules/stylis/stylis.min.js ***!
13226 \*******************************************/
13227 /***/ ((module) => {
13228
13229 !function(e){ true?module.exports=e(null):0}(function e(a){"use strict";var r=/^\0+/g,c=/[\0\r\f]/g,s=/: */g,t=/zoo|gra/,i=/([,: ])(transform)/g,f=/,+\s*(?![^(]*[)])/g,n=/ +\s*(?![^(]*[)])/g,l=/ *[\0] */g,o=/,\r+?/g,h=/([\t\r\n ])*\f?&/g,u=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,d=/\W+/g,b=/@(k\w+)\s*(\S*)\s*/,p=/::(place)/g,k=/:(read-only)/g,g=/\s+(?=[{\];=:>])/g,A=/([[}=:>])\s+/g,C=/(\{[^{]+?);(?=\})/g,w=/\s{2,}/g,v=/([^\(])(:+) */g,m=/[svh]\w+-[tblr]{2}/,x=/\(\s*(.*)\s*\)/g,$=/([\s\S]*?);/g,y=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,j=/stretch|:\s*\w+\-(?:conte|avail)/,z=/([^-])(image-set\()/,N="-webkit-",S="-moz-",F="-ms-",W=59,q=125,B=123,D=40,E=41,G=91,H=93,I=10,J=13,K=9,L=64,M=32,P=38,Q=45,R=95,T=42,U=44,V=58,X=39,Y=34,Z=47,_=62,ee=43,ae=126,re=0,ce=12,se=11,te=107,ie=109,fe=115,ne=112,le=111,oe=105,he=99,ue=100,de=112,be=1,pe=1,ke=0,ge=1,Ae=1,Ce=1,we=0,ve=0,me=0,xe=[],$e=[],ye=0,Oe=null,je=-2,ze=-1,Ne=0,Se=1,Fe=2,We=3,qe=0,Be=1,De="",Ee="",Ge="";function He(e,a,s,t,i){for(var f,n,o=0,h=0,u=0,d=0,g=0,A=0,C=0,w=0,m=0,$=0,y=0,O=0,j=0,z=0,R=0,we=0,$e=0,Oe=0,je=0,ze=s.length,Je=ze-1,Re="",Te="",Ue="",Ve="",Xe="",Ye="";R<ze;){if(C=s.charCodeAt(R),R===Je)if(h+d+u+o!==0){if(0!==h)C=h===Z?I:Z;d=u=o=0,ze++,Je++}if(h+d+u+o===0){if(R===Je){if(we>0)Te=Te.replace(c,"");if(Te.trim().length>0){switch(C){case M:case K:case W:case J:case I:break;default:Te+=s.charAt(R)}C=W}}if(1===$e)switch(C){case B:case q:case W:case Y:case X:case D:case E:case U:$e=0;case K:case J:case I:case M:break;default:for($e=0,je=R,g=C,R--,C=W;je<ze;)switch(s.charCodeAt(je++)){case I:case J:case W:++R,C=g,je=ze;break;case V:if(we>0)++R,C=g;case B:je=ze}}switch(C){case B:for(g=(Te=Te.trim()).charCodeAt(0),y=1,je=++R;R<ze;){switch(C=s.charCodeAt(R)){case B:y++;break;case q:y--;break;case Z:switch(A=s.charCodeAt(R+1)){case T:case Z:R=Qe(A,R,Je,s)}break;case G:C++;case D:C++;case Y:case X:for(;R++<Je&&s.charCodeAt(R)!==C;);}if(0===y)break;R++}if(Ue=s.substring(je,R),g===re)g=(Te=Te.replace(r,"").trim()).charCodeAt(0);switch(g){case L:if(we>0)Te=Te.replace(c,"");switch(A=Te.charCodeAt(1)){case ue:case ie:case fe:case Q:f=a;break;default:f=xe}if(je=(Ue=He(a,f,Ue,A,i+1)).length,me>0&&0===je)je=Te.length;if(ye>0)if(f=Ie(xe,Te,Oe),n=Pe(We,Ue,f,a,pe,be,je,A,i,t),Te=f.join(""),void 0!==n)if(0===(je=(Ue=n.trim()).length))A=0,Ue="";if(je>0)switch(A){case fe:Te=Te.replace(x,Me);case ue:case ie:case Q:Ue=Te+"{"+Ue+"}";break;case te:if(Ue=(Te=Te.replace(b,"$1 $2"+(Be>0?De:"")))+"{"+Ue+"}",1===Ae||2===Ae&&Le("@"+Ue,3))Ue="@"+N+Ue+"@"+Ue;else Ue="@"+Ue;break;default:if(Ue=Te+Ue,t===de)Ve+=Ue,Ue=""}else Ue="";break;default:Ue=He(a,Ie(a,Te,Oe),Ue,t,i+1)}Xe+=Ue,O=0,$e=0,z=0,we=0,Oe=0,j=0,Te="",Ue="",C=s.charCodeAt(++R);break;case q:case W:if((je=(Te=(we>0?Te.replace(c,""):Te).trim()).length)>1){if(0===z)if((g=Te.charCodeAt(0))===Q||g>96&&g<123)je=(Te=Te.replace(" ",":")).length;if(ye>0)if(void 0!==(n=Pe(Se,Te,a,e,pe,be,Ve.length,t,i,t)))if(0===(je=(Te=n.trim()).length))Te="\0\0";switch(g=Te.charCodeAt(0),A=Te.charCodeAt(1),g){case re:break;case L:if(A===oe||A===he){Ye+=Te+s.charAt(R);break}default:if(Te.charCodeAt(je-1)===V)break;Ve+=Ke(Te,g,A,Te.charCodeAt(2))}}O=0,$e=0,z=0,we=0,Oe=0,Te="",C=s.charCodeAt(++R)}}switch(C){case J:case I:if(h+d+u+o+ve===0)switch($){case E:case X:case Y:case L:case ae:case _:case T:case ee:case Z:case Q:case V:case U:case W:case B:case q:break;default:if(z>0)$e=1}if(h===Z)h=0;else if(ge+O===0&&t!==te&&Te.length>0)we=1,Te+="\0";if(ye*qe>0)Pe(Ne,Te,a,e,pe,be,Ve.length,t,i,t);be=1,pe++;break;case W:case q:if(h+d+u+o===0){be++;break}default:switch(be++,Re=s.charAt(R),C){case K:case M:if(d+o+h===0)switch(w){case U:case V:case K:case M:Re="";break;default:if(C!==M)Re=" "}break;case re:Re="\\0";break;case ce:Re="\\f";break;case se:Re="\\v";break;case P:if(d+h+o===0&&ge>0)Oe=1,we=1,Re="\f"+Re;break;case 108:if(d+h+o+ke===0&&z>0)switch(R-z){case 2:if(w===ne&&s.charCodeAt(R-3)===V)ke=w;case 8:if(m===le)ke=m}break;case V:if(d+h+o===0)z=R;break;case U:if(h+u+d+o===0)we=1,Re+="\r";break;case Y:case X:if(0===h)d=d===C?0:0===d?C:d;break;case G:if(d+h+u===0)o++;break;case H:if(d+h+u===0)o--;break;case E:if(d+h+o===0)u--;break;case D:if(d+h+o===0){if(0===O)switch(2*w+3*m){case 533:break;default:y=0,O=1}u++}break;case L:if(h+u+d+o+z+j===0)j=1;break;case T:case Z:if(d+o+u>0)break;switch(h){case 0:switch(2*C+3*s.charCodeAt(R+1)){case 235:h=Z;break;case 220:je=R,h=T}break;case T:if(C===Z&&w===T&&je+2!==R){if(33===s.charCodeAt(je+2))Ve+=s.substring(je,R+1);Re="",h=0}}}if(0===h){if(ge+d+o+j===0&&t!==te&&C!==W)switch(C){case U:case ae:case _:case ee:case E:case D:if(0===O){switch(w){case K:case M:case I:case J:Re+="\0";break;default:Re="\0"+Re+(C===U?"":"\0")}we=1}else switch(C){case D:if(z+7===R&&108===w)z=0;O=++y;break;case E:if(0==(O=--y))we=1,Re+="\0"}break;case K:case M:switch(w){case re:case B:case q:case W:case U:case ce:case K:case M:case I:case J:break;default:if(0===O)we=1,Re+="\0"}}if(Te+=Re,C!==M&&C!==K)$=C}}m=w,w=C,R++}if(je=Ve.length,me>0)if(0===je&&0===Xe.length&&0===a[0].length==false)if(t!==ie||1===a.length&&(ge>0?Ee:Ge)===a[0])je=a.join(",").length+2;if(je>0){if(f=0===ge&&t!==te?function(e){for(var a,r,s=0,t=e.length,i=Array(t);s<t;++s){for(var f=e[s].split(l),n="",o=0,h=0,u=0,d=0,b=f.length;o<b;++o){if(0===(h=(r=f[o]).length)&&b>1)continue;if(u=n.charCodeAt(n.length-1),d=r.charCodeAt(0),a="",0!==o)switch(u){case T:case ae:case _:case ee:case M:case D:break;default:a=" "}switch(d){case P:r=a+Ee;case ae:case _:case ee:case M:case E:case D:break;case G:r=a+r+Ee;break;case V:switch(2*r.charCodeAt(1)+3*r.charCodeAt(2)){case 530:if(Ce>0){r=a+r.substring(8,h-1);break}default:if(o<1||f[o-1].length<1)r=a+Ee+r}break;case U:a="";default:if(h>1&&r.indexOf(":")>0)r=a+r.replace(v,"$1"+Ee+"$2");else r=a+r+Ee}n+=r}i[s]=n.replace(c,"").trim()}return i}(a):a,ye>0)if(void 0!==(n=Pe(Fe,Ve,f,e,pe,be,je,t,i,t))&&0===(Ve=n).length)return Ye+Ve+Xe;if(Ve=f.join(",")+"{"+Ve+"}",Ae*ke!=0){if(2===Ae&&!Le(Ve,2))ke=0;switch(ke){case le:Ve=Ve.replace(k,":"+S+"$1")+Ve;break;case ne:Ve=Ve.replace(p,"::"+N+"input-$1")+Ve.replace(p,"::"+S+"$1")+Ve.replace(p,":"+F+"input-$1")+Ve}ke=0}}return Ye+Ve+Xe}function Ie(e,a,r){var c=a.trim().split(o),s=c,t=c.length,i=e.length;switch(i){case 0:case 1:for(var f=0,n=0===i?"":e[0]+" ";f<t;++f)s[f]=Je(n,s[f],r,i).trim();break;default:f=0;var l=0;for(s=[];f<t;++f)for(var h=0;h<i;++h)s[l++]=Je(e[h]+" ",c[f],r,i).trim()}return s}function Je(e,a,r,c){var s=a,t=s.charCodeAt(0);if(t<33)t=(s=s.trim()).charCodeAt(0);switch(t){case P:switch(ge+c){case 0:case 1:if(0===e.trim().length)break;default:return s.replace(h,"$1"+e.trim())}break;case V:switch(s.charCodeAt(1)){case 103:if(Ce>0&&ge>0)return s.replace(u,"$1").replace(h,"$1"+Ge);break;default:return e.trim()+s.replace(h,"$1"+e.trim())}default:if(r*ge>0&&s.indexOf("\f")>0)return s.replace(h,(e.charCodeAt(0)===V?"":"$1")+e.trim())}return e+s}function Ke(e,a,r,c){var l,o=0,h=e+";",u=2*a+3*r+4*c;if(944===u)return function(e){var a=e.length,r=e.indexOf(":",9)+1,c=e.substring(0,r).trim(),s=e.substring(r,a-1).trim();switch(e.charCodeAt(9)*Be){case 0:break;case Q:if(110!==e.charCodeAt(10))break;default:for(var t=s.split((s="",f)),i=0,r=0,a=t.length;i<a;r=0,++i){for(var l=t[i],o=l.split(n);l=o[r];){var h=l.charCodeAt(0);if(1===Be&&(h>L&&h<90||h>96&&h<123||h===R||h===Q&&l.charCodeAt(1)!==Q))switch(isNaN(parseFloat(l))+(-1!==l.indexOf("("))){case 1:switch(l){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:l+=De}}o[r++]=l}s+=(0===i?"":",")+o.join(" ")}}if(s=c+s+";",1===Ae||2===Ae&&Le(s,1))return N+s+s;return s}(h);else if(0===Ae||2===Ae&&!Le(h,1))return h;switch(u){case 1015:return 97===h.charCodeAt(10)?N+h+h:h;case 951:return 116===h.charCodeAt(3)?N+h+h:h;case 963:return 110===h.charCodeAt(5)?N+h+h:h;case 1009:if(100!==h.charCodeAt(4))break;case 969:case 942:return N+h+h;case 978:return N+h+S+h+h;case 1019:case 983:return N+h+S+h+F+h+h;case 883:if(h.charCodeAt(8)===Q)return N+h+h;if(h.indexOf("image-set(",11)>0)return h.replace(z,"$1"+N+"$2")+h;return h;case 932:if(h.charCodeAt(4)===Q)switch(h.charCodeAt(5)){case 103:return N+"box-"+h.replace("-grow","")+N+h+F+h.replace("grow","positive")+h;case 115:return N+h+F+h.replace("shrink","negative")+h;case 98:return N+h+F+h.replace("basis","preferred-size")+h}return N+h+F+h+h;case 964:return N+h+F+"flex-"+h+h;case 1023:if(99!==h.charCodeAt(8))break;return l=h.substring(h.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),N+"box-pack"+l+N+h+F+"flex-pack"+l+h;case 1005:return t.test(h)?h.replace(s,":"+N)+h.replace(s,":"+S)+h:h;case 1e3:switch(o=(l=h.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(o)){case 226:l=h.replace(m,"tb");break;case 232:l=h.replace(m,"tb-rl");break;case 220:l=h.replace(m,"lr");break;default:return h}return N+h+F+l+h;case 1017:if(-1===h.indexOf("sticky",9))return h;case 975:switch(o=(h=e).length-10,u=(l=(33===h.charCodeAt(o)?h.substring(0,o):h).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(l.charCodeAt(8)<111)break;case 115:h=h.replace(l,N+l)+";"+h;break;case 207:case 102:h=h.replace(l,N+(u>102?"inline-":"")+"box")+";"+h.replace(l,N+l)+";"+h.replace(l,F+l+"box")+";"+h}return h+";";case 938:if(h.charCodeAt(5)===Q)switch(h.charCodeAt(6)){case 105:return l=h.replace("-items",""),N+h+N+"box-"+l+F+"flex-"+l+h;case 115:return N+h+F+"flex-item-"+h.replace(y,"")+h;default:return N+h+F+"flex-line-pack"+h.replace("align-content","").replace(y,"")+h}break;case 973:case 989:if(h.charCodeAt(3)!==Q||122===h.charCodeAt(4))break;case 931:case 953:if(true===j.test(e))if(115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0))return Ke(e.replace("stretch","fill-available"),a,r,c).replace(":fill-available",":stretch");else return h.replace(l,N+l)+h.replace(l,S+l.replace("fill-",""))+h;break;case 962:if(h=N+h+(102===h.charCodeAt(5)?F+h:"")+h,r+c===211&&105===h.charCodeAt(13)&&h.indexOf("transform",10)>0)return h.substring(0,h.indexOf(";",27)+1).replace(i,"$1"+N+"$2")+h}return h}function Le(e,a){var r=e.indexOf(1===a?":":"{"),c=e.substring(0,3!==a?r:10),s=e.substring(r+1,e.length-1);return Oe(2!==a?c:c.replace(O,"$1"),s,a)}function Me(e,a){var r=Ke(a,a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2));return r!==a+";"?r.replace($," or ($1)").substring(4):"("+a+")"}function Pe(e,a,r,c,s,t,i,f,n,l){for(var o,h=0,u=a;h<ye;++h)switch(o=$e[h].call(Te,e,u,r,c,s,t,i,f,n,l)){case void 0:case false:case true:case null:break;default:u=o}if(u!==a)return u}function Qe(e,a,r,c){for(var s=a+1;s<r;++s)switch(c.charCodeAt(s)){case Z:if(e===T)if(c.charCodeAt(s-1)===T&&a+2!==s)return s+1;break;case I:if(e===Z)return s+1}return s}function Re(e){for(var a in e){var r=e[a];switch(a){case"keyframe":Be=0|r;break;case"global":Ce=0|r;break;case"cascade":ge=0|r;break;case"compress":we=0|r;break;case"semicolon":ve=0|r;break;case"preserve":me=0|r;break;case"prefix":if(Oe=null,!r)Ae=0;else if("function"!=typeof r)Ae=1;else Ae=2,Oe=r}}return Re}function Te(a,r){if(void 0!==this&&this.constructor===Te)return e(a);var s=a,t=s.charCodeAt(0);if(t<33)t=(s=s.trim()).charCodeAt(0);if(Be>0)De=s.replace(d,t===G?"":"-");if(t=1,1===ge)Ge=s;else Ee=s;var i,f=[Ge];if(ye>0)if(void 0!==(i=Pe(ze,r,f,f,pe,be,0,0,0,0))&&"string"==typeof i)r=i;var n=He(xe,f,r,0,0);if(ye>0)if(void 0!==(i=Pe(je,n,f,f,pe,be,n.length,0,0,0))&&"string"!=typeof(n=i))t=0;return De="",Ge="",Ee="",ke=0,pe=1,be=1,we*t==0?n:n.replace(c,"").replace(g,"").replace(A,"$1").replace(C,"$1").replace(w," ")}if(Te.use=function e(a){switch(a){case void 0:case null:ye=$e.length=0;break;default:if("function"==typeof a)$e[ye++]=a;else if("object"==typeof a)for(var r=0,c=a.length;r<c;++r)e(a[r]);else qe=0|!!a}return e},Te.set=Re,void 0!==a)Re(a);return Te});
13230 //# sourceMappingURL=stylis.min.js.map
13231
13232 /***/ }),
13233
13234 /***/ "react":
13235 /*!************************!*\
13236 !*** external "React" ***!
13237 \************************/
13238 /***/ ((module) => {
13239
13240 "use strict";
13241 module.exports = window["React"];
13242
13243 /***/ }),
13244
13245 /***/ "jquery":
13246 /*!*************************!*\
13247 !*** external "jQuery" ***!
13248 \*************************/
13249 /***/ ((module) => {
13250
13251 "use strict";
13252 module.exports = window["jQuery"];
13253
13254 /***/ }),
13255
13256 /***/ "@wordpress/block-editor":
13257 /*!*************************************!*\
13258 !*** external ["wp","blockEditor"] ***!
13259 \*************************************/
13260 /***/ ((module) => {
13261
13262 "use strict";
13263 module.exports = window["wp"]["blockEditor"];
13264
13265 /***/ }),
13266
13267 /***/ "@wordpress/blocks":
13268 /*!********************************!*\
13269 !*** external ["wp","blocks"] ***!
13270 \********************************/
13271 /***/ ((module) => {
13272
13273 "use strict";
13274 module.exports = window["wp"]["blocks"];
13275
13276 /***/ }),
13277
13278 /***/ "@wordpress/components":
13279 /*!************************************!*\
13280 !*** external ["wp","components"] ***!
13281 \************************************/
13282 /***/ ((module) => {
13283
13284 "use strict";
13285 module.exports = window["wp"]["components"];
13286
13287 /***/ }),
13288
13289 /***/ "@wordpress/compose":
13290 /*!*********************************!*\
13291 !*** external ["wp","compose"] ***!
13292 \*********************************/
13293 /***/ ((module) => {
13294
13295 "use strict";
13296 module.exports = window["wp"]["compose"];
13297
13298 /***/ }),
13299
13300 /***/ "@wordpress/data":
13301 /*!******************************!*\
13302 !*** external ["wp","data"] ***!
13303 \******************************/
13304 /***/ ((module) => {
13305
13306 "use strict";
13307 module.exports = window["wp"]["data"];
13308
13309 /***/ }),
13310
13311 /***/ "@wordpress/edit-post":
13312 /*!**********************************!*\
13313 !*** external ["wp","editPost"] ***!
13314 \**********************************/
13315 /***/ ((module) => {
13316
13317 "use strict";
13318 module.exports = window["wp"]["editPost"];
13319
13320 /***/ }),
13321
13322 /***/ "@wordpress/element":
13323 /*!*********************************!*\
13324 !*** external ["wp","element"] ***!
13325 \*********************************/
13326 /***/ ((module) => {
13327
13328 "use strict";
13329 module.exports = window["wp"]["element"];
13330
13331 /***/ }),
13332
13333 /***/ "@wordpress/i18n":
13334 /*!******************************!*\
13335 !*** external ["wp","i18n"] ***!
13336 \******************************/
13337 /***/ ((module) => {
13338
13339 "use strict";
13340 module.exports = window["wp"]["i18n"];
13341
13342 /***/ }),
13343
13344 /***/ "@wordpress/plugins":
13345 /*!*********************************!*\
13346 !*** external ["wp","plugins"] ***!
13347 \*********************************/
13348 /***/ ((module) => {
13349
13350 "use strict";
13351 module.exports = window["wp"]["plugins"];
13352
13353 /***/ }),
13354
13355 /***/ "./node_modules/@linaria/react/dist/index.mjs":
13356 /*!****************************************************!*\
13357 !*** ./node_modules/@linaria/react/dist/index.mjs ***!
13358 \****************************************************/
13359 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
13360
13361 "use strict";
13362 __webpack_require__.r(__webpack_exports__);
13363 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13364 /* harmony export */ "styled": () => (/* binding */ styled_default)
13365 /* harmony export */ });
13366 /* harmony import */ var _emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/is-prop-valid */ "./node_modules/@linaria/react/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js");
13367 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
13368 /* harmony import */ var _linaria_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @linaria/core */ "./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs");
13369 // src/styled.ts
13370
13371
13372
13373 var isCapital = (ch) => ch.toUpperCase() === ch;
13374 var filterKey = (keys) => (key) => keys.indexOf(key) === -1;
13375 var omit = (obj, keys) => {
13376 const res = {};
13377 Object.keys(obj).filter(filterKey(keys)).forEach((key) => {
13378 res[key] = obj[key];
13379 });
13380 return res;
13381 };
13382 function filterProps(asIs, props, omitKeys) {
13383 const filteredProps = omit(props, omitKeys);
13384 if (!asIs) {
13385 const interopValidAttr = typeof _emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_0__["default"] === "function" ? { default: _emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_0__["default"] } : _emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_0__["default"];
13386 Object.keys(filteredProps).forEach((key) => {
13387 if (!interopValidAttr.default(key)) {
13388 delete filteredProps[key];
13389 }
13390 });
13391 }
13392 return filteredProps;
13393 }
13394 var warnIfInvalid = (value, componentName) => {
13395 if (true) {
13396 if (typeof value === "string" || typeof value === "number" && isFinite(value)) {
13397 return;
13398 }
13399 const stringified = typeof value === "object" ? JSON.stringify(value) : String(value);
13400 console.warn(
13401 `An interpolation evaluated to '${stringified}' in the component '${componentName}', which is probably a mistake. You should explicitly cast or transform the value to a string.`
13402 );
13403 }
13404 };
13405 var idx = 0;
13406 function styled(tag) {
13407 var _a;
13408 let mockedClass = "";
13409 if (false) {}
13410 return (options) => {
13411 if (true) {
13412 if (Array.isArray(options)) {
13413 throw new Error(
13414 'Using the "styled" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly. See https://github.com/callstack/linaria#setup'
13415 );
13416 }
13417 }
13418 const render = (props, ref) => {
13419 const { as: component = tag, class: className = mockedClass } = props;
13420 const shouldKeepProps = options.propsAsIs === void 0 ? !(typeof component === "string" && component.indexOf("-") === -1 && !isCapital(component[0])) : options.propsAsIs;
13421 const filteredProps = filterProps(shouldKeepProps, props, [
13422 "as",
13423 "class"
13424 ]);
13425 filteredProps.ref = ref;
13426 filteredProps.className = options.atomic ? (0,_linaria_core__WEBPACK_IMPORTED_MODULE_2__.cx)(options.class, filteredProps.className || className) : (0,_linaria_core__WEBPACK_IMPORTED_MODULE_2__.cx)(filteredProps.className || className, options.class);
13427 const { vars } = options;
13428 if (vars) {
13429 const style = {};
13430 for (const name in vars) {
13431 const variable = vars[name];
13432 const result = variable[0];
13433 const unit = variable[1] || "";
13434 const value = typeof result === "function" ? result(props) : result;
13435 warnIfInvalid(value, options.name);
13436 style[`--${name}`] = `${value}${unit}`;
13437 }
13438 const ownStyle = filteredProps.style || {};
13439 const keys = Object.keys(ownStyle);
13440 if (keys.length > 0) {
13441 keys.forEach((key) => {
13442 style[key] = ownStyle[key];
13443 });
13444 }
13445 filteredProps.style = style;
13446 }
13447 if (tag.__linaria && tag !== component) {
13448 filteredProps.as = component;
13449 return react__WEBPACK_IMPORTED_MODULE_1__.createElement(tag, filteredProps);
13450 }
13451 return react__WEBPACK_IMPORTED_MODULE_1__.createElement(component, filteredProps);
13452 };
13453 const Result = react__WEBPACK_IMPORTED_MODULE_1__.forwardRef ? react__WEBPACK_IMPORTED_MODULE_1__.forwardRef(render) : (props) => {
13454 const rest = omit(props, ["innerRef"]);
13455 return render(rest, props.innerRef);
13456 };
13457 Result.displayName = options.name;
13458 Result.__linaria = {
13459 className: options.class || mockedClass,
13460 extends: tag
13461 };
13462 return Result;
13463 };
13464 }
13465 var styled_default = true ? new Proxy(styled, {
13466 get(o, prop) {
13467 return o(prop);
13468 }
13469 }) : 0;
13470
13471 //# sourceMappingURL=index.mjs.map
13472
13473 /***/ }),
13474
13475 /***/ "./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs":
13476 /*!*******************************************************************************!*\
13477 !*** ./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs ***!
13478 \*******************************************************************************/
13479 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
13480
13481 "use strict";
13482 __webpack_require__.r(__webpack_exports__);
13483 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13484 /* harmony export */ "css": () => (/* binding */ css_default),
13485 /* harmony export */ "cx": () => (/* binding */ cx_default)
13486 /* harmony export */ });
13487 // src/css.ts
13488 var idx = 0;
13489 var css = () => {
13490 if (false) {}
13491 throw new Error(
13492 'Using the "css" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly.'
13493 );
13494 };
13495 var css_default = css;
13496
13497 // src/cx.ts
13498 var cx = function cx2() {
13499 const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
13500 const atomicClasses = {};
13501 const nonAtomicClasses = [];
13502 presentClassNames.forEach((arg) => {
13503 const individualClassNames = arg ? arg.split(" ") : [];
13504 individualClassNames.forEach((className) => {
13505 if (className.startsWith("atm_")) {
13506 const [, keyHash] = className.split("_");
13507 atomicClasses[keyHash] = className;
13508 } else {
13509 nonAtomicClasses.push(className);
13510 }
13511 });
13512 });
13513 const result = [];
13514 for (const keyHash in atomicClasses) {
13515 if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
13516 result.push(atomicClasses[keyHash]);
13517 }
13518 }
13519 result.push(...nonAtomicClasses);
13520 return result.join(" ");
13521 };
13522 var cx_default = cx;
13523
13524 //# sourceMappingURL=index.mjs.map
13525
13526 /***/ })
13527
13528 /******/ });
13529 /************************************************************************/
13530 /******/ // The module cache
13531 /******/ var __webpack_module_cache__ = {};
13532 /******/
13533 /******/ // The require function
13534 /******/ function __webpack_require__(moduleId) {
13535 /******/ // Check if module is in cache
13536 /******/ var cachedModule = __webpack_module_cache__[moduleId];
13537 /******/ if (cachedModule !== undefined) {
13538 /******/ return cachedModule.exports;
13539 /******/ }
13540 /******/ // Create a new module (and put it into the cache)
13541 /******/ var module = __webpack_module_cache__[moduleId] = {
13542 /******/ // no module.id needed
13543 /******/ // no module.loaded needed
13544 /******/ exports: {}
13545 /******/ };
13546 /******/
13547 /******/ // Execute the module function
13548 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
13549 /******/
13550 /******/ // Return the exports of the module
13551 /******/ return module.exports;
13552 /******/ }
13553 /******/
13554 /************************************************************************/
13555 /******/ /* webpack/runtime/compat get default export */
13556 /******/ (() => {
13557 /******/ // getDefaultExport function for compatibility with non-harmony modules
13558 /******/ __webpack_require__.n = (module) => {
13559 /******/ var getter = module && module.__esModule ?
13560 /******/ () => (module['default']) :
13561 /******/ () => (module);
13562 /******/ __webpack_require__.d(getter, { a: getter });
13563 /******/ return getter;
13564 /******/ };
13565 /******/ })();
13566 /******/
13567 /******/ /* webpack/runtime/define property getters */
13568 /******/ (() => {
13569 /******/ // define getter functions for harmony exports
13570 /******/ __webpack_require__.d = (exports, definition) => {
13571 /******/ for(var key in definition) {
13572 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
13573 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
13574 /******/ }
13575 /******/ }
13576 /******/ };
13577 /******/ })();
13578 /******/
13579 /******/ /* webpack/runtime/global */
13580 /******/ (() => {
13581 /******/ __webpack_require__.g = (function() {
13582 /******/ if (typeof globalThis === 'object') return globalThis;
13583 /******/ try {
13584 /******/ return this || new Function('return this')();
13585 /******/ } catch (e) {
13586 /******/ if (typeof window === 'object') return window;
13587 /******/ }
13588 /******/ })();
13589 /******/ })();
13590 /******/
13591 /******/ /* webpack/runtime/hasOwnProperty shorthand */
13592 /******/ (() => {
13593 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
13594 /******/ })();
13595 /******/
13596 /******/ /* webpack/runtime/make namespace object */
13597 /******/ (() => {
13598 /******/ // define __esModule on exports
13599 /******/ __webpack_require__.r = (exports) => {
13600 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
13601 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
13602 /******/ }
13603 /******/ Object.defineProperty(exports, '__esModule', { value: true });
13604 /******/ };
13605 /******/ })();
13606 /******/
13607 /******/ /* webpack/runtime/nonce */
13608 /******/ (() => {
13609 /******/ __webpack_require__.nc = undefined;
13610 /******/ })();
13611 /******/
13612 /************************************************************************/
13613 var __webpack_exports__ = {};
13614 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
13615 (() => {
13616 "use strict";
13617 /*!**************************************!*\
13618 !*** ./scripts/entries/gutenberg.ts ***!
13619 \**************************************/
13620 __webpack_require__.r(__webpack_exports__);
13621 /* harmony import */ var _gutenberg_FormBlock_registerFormBlock__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../gutenberg/FormBlock/registerFormBlock */ "./scripts/gutenberg/FormBlock/registerFormBlock.tsx");
13622 /* harmony import */ var _gutenberg_Sidebar_contentType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../gutenberg/Sidebar/contentType */ "./scripts/gutenberg/Sidebar/contentType.tsx");
13623 /* harmony import */ var _gutenberg_MeetingsBlock_registerMeetingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../gutenberg/MeetingsBlock/registerMeetingBlock */ "./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx");
13624 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
13625
13626
13627
13628
13629 (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_3__.initBackgroundApp)([_gutenberg_FormBlock_registerFormBlock__WEBPACK_IMPORTED_MODULE_0__["default"], _gutenberg_MeetingsBlock_registerMeetingBlock__WEBPACK_IMPORTED_MODULE_2__["default"], _gutenberg_Sidebar_contentType__WEBPACK_IMPORTED_MODULE_1__.registerHubspotSidebar]);
13630 })();
13631
13632 /******/ })()
13633 ;
13634 //# sourceMappingURL=gutenberg.js.map