PluginProbe
HubSpot All-In-One Marketing – Forms, Popups, Live Chat / 11.1.13
HubSpot All-In-One Marketing – Forms, Popups, Live Chat v11.1.13
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.1.13, at build/gutenberg.js

13,126 lines 500.3 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": () => (__WEBPACK_DEFAULT_EXPORT__)
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 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoize);
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": () => (__WEBPACK_DEFAULT_EXPORT__)
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 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|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
163
164 var isPropValid = /* #__PURE__ */(0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prop) {
165 return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
166 /* o */
167 && prop.charCodeAt(1) === 110
168 /* n */
169 && prop.charCodeAt(2) < 91;
170 }
171 /* Z+1 */
172 );
173
174 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isPropValid);
175
176
177 /***/ }),
178
179 /***/ "./scripts/constants/defaultFormOptions.ts":
180 /*!*************************************************!*\
181 !*** ./scripts/constants/defaultFormOptions.ts ***!
182 \*************************************************/
183 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
184
185 "use strict";
186 __webpack_require__.r(__webpack_exports__);
187 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
188 /* harmony export */ "DEFAULT_OPTIONS": () => (/* binding */ DEFAULT_OPTIONS),
189 /* harmony export */ "isDefaultForm": () => (/* binding */ isDefaultForm)
190 /* harmony export */ });
191 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
192 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
193
194 var REGISTRATION_FORM = 'REGISTRATION_FORM';
195 var CONTACT_US_FORM = 'CONTACT_US_FORM';
196 var NEWSLETTER_FORM = 'NEWSLETTER_FORM';
197 var SUPPORT_FORM = 'SUPPORT_FORM';
198 var EVENT_FORM = 'EVENT_FORM';
199 var DEFAULT_OPTIONS = {
200 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Templates', 'leadin'),
201 options: [{
202 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Registration Form', 'leadin'),
203 value: REGISTRATION_FORM
204 }, {
205 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Contact us Form', 'leadin'),
206 value: CONTACT_US_FORM
207 }, {
208 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Newsletter sign-up Form', 'leadin'),
209 value: NEWSLETTER_FORM
210 }, {
211 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Support Form', 'leadin'),
212 value: SUPPORT_FORM
213 }, {
214 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Event Registration Form', 'leadin'),
215 value: EVENT_FORM
216 }]
217 };
218 function isDefaultForm(value) {
219 return value === REGISTRATION_FORM || value === CONTACT_US_FORM || value === NEWSLETTER_FORM || value === SUPPORT_FORM || value === EVENT_FORM;
220 }
221
222 /***/ }),
223
224 /***/ "./scripts/constants/leadinConfig.ts":
225 /*!*******************************************!*\
226 !*** ./scripts/constants/leadinConfig.ts ***!
227 \*******************************************/
228 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
229
230 "use strict";
231 __webpack_require__.r(__webpack_exports__);
232 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
233 /* harmony export */ "accountName": () => (/* binding */ accountName),
234 /* harmony export */ "activationTime": () => (/* binding */ activationTime),
235 /* harmony export */ "adminUrl": () => (/* binding */ adminUrl),
236 /* harmony export */ "connectionStatus": () => (/* binding */ connectionStatus),
237 /* harmony export */ "contentEmbed": () => (/* binding */ contentEmbed),
238 /* harmony export */ "deviceId": () => (/* binding */ deviceId),
239 /* harmony export */ "didDisconnect": () => (/* binding */ didDisconnect),
240 /* harmony export */ "encryptionError": () => (/* binding */ encryptionError),
241 /* harmony export */ "env": () => (/* binding */ env),
242 /* harmony export */ "formsScript": () => (/* binding */ formsScript),
243 /* harmony export */ "formsScriptPayload": () => (/* binding */ formsScriptPayload),
244 /* harmony export */ "hublet": () => (/* binding */ hublet),
245 /* harmony export */ "hubspotBaseUrl": () => (/* binding */ hubspotBaseUrl),
246 /* harmony export */ "hubspotNonce": () => (/* binding */ hubspotNonce),
247 /* harmony export */ "iframeUrl": () => (/* binding */ iframeUrl),
248 /* harmony export */ "impactLink": () => (/* binding */ impactLink),
249 /* harmony export */ "lastAuthorizeTime": () => (/* binding */ lastAuthorizeTime),
250 /* harmony export */ "lastDeauthorizeTime": () => (/* binding */ lastDeauthorizeTime),
251 /* harmony export */ "lastDisconnectTime": () => (/* binding */ lastDisconnectTime),
252 /* harmony export */ "leadinPluginVersion": () => (/* binding */ leadinPluginVersion),
253 /* harmony export */ "leadinQueryParams": () => (/* binding */ leadinQueryParams),
254 /* harmony export */ "locale": () => (/* binding */ locale),
255 /* harmony export */ "loginUrl": () => (/* binding */ loginUrl),
256 /* harmony export */ "meetingsScript": () => (/* binding */ meetingsScript),
257 /* harmony export */ "phpVersion": () => (/* binding */ phpVersion),
258 /* harmony export */ "pluginPath": () => (/* binding */ pluginPath),
259 /* harmony export */ "plugins": () => (/* binding */ plugins),
260 /* harmony export */ "portalDomain": () => (/* binding */ portalDomain),
261 /* harmony export */ "portalEmail": () => (/* binding */ portalEmail),
262 /* harmony export */ "portalId": () => (/* binding */ portalId),
263 /* harmony export */ "redirectNonce": () => (/* binding */ redirectNonce),
264 /* harmony export */ "refreshToken": () => (/* binding */ refreshToken),
265 /* harmony export */ "refreshTokenError": () => (/* binding */ refreshTokenError),
266 /* harmony export */ "requiresContentEmbedScope": () => (/* binding */ requiresContentEmbedScope),
267 /* harmony export */ "restNonce": () => (/* binding */ restNonce),
268 /* harmony export */ "restUrl": () => (/* binding */ restUrl),
269 /* harmony export */ "reviewSkippedDate": () => (/* binding */ reviewSkippedDate),
270 /* harmony export */ "theme": () => (/* binding */ theme),
271 /* harmony export */ "trackConsent": () => (/* binding */ trackConsent),
272 /* harmony export */ "wpVersion": () => (/* binding */ wpVersion)
273 /* harmony export */ });
274 var _window$leadinConfig = window.leadinConfig,
275 accountName = _window$leadinConfig.accountName,
276 adminUrl = _window$leadinConfig.adminUrl,
277 activationTime = _window$leadinConfig.activationTime,
278 connectionStatus = _window$leadinConfig.connectionStatus,
279 deviceId = _window$leadinConfig.deviceId,
280 didDisconnect = _window$leadinConfig.didDisconnect,
281 env = _window$leadinConfig.env,
282 formsScript = _window$leadinConfig.formsScript,
283 meetingsScript = _window$leadinConfig.meetingsScript,
284 formsScriptPayload = _window$leadinConfig.formsScriptPayload,
285 hublet = _window$leadinConfig.hublet,
286 hubspotBaseUrl = _window$leadinConfig.hubspotBaseUrl,
287 hubspotNonce = _window$leadinConfig.hubspotNonce,
288 iframeUrl = _window$leadinConfig.iframeUrl,
289 impactLink = _window$leadinConfig.impactLink,
290 lastAuthorizeTime = _window$leadinConfig.lastAuthorizeTime,
291 lastDeauthorizeTime = _window$leadinConfig.lastDeauthorizeTime,
292 lastDisconnectTime = _window$leadinConfig.lastDisconnectTime,
293 leadinPluginVersion = _window$leadinConfig.leadinPluginVersion,
294 leadinQueryParams = _window$leadinConfig.leadinQueryParams,
295 locale = _window$leadinConfig.locale,
296 loginUrl = _window$leadinConfig.loginUrl,
297 phpVersion = _window$leadinConfig.phpVersion,
298 pluginPath = _window$leadinConfig.pluginPath,
299 plugins = _window$leadinConfig.plugins,
300 portalDomain = _window$leadinConfig.portalDomain,
301 portalEmail = _window$leadinConfig.portalEmail,
302 portalId = _window$leadinConfig.portalId,
303 redirectNonce = _window$leadinConfig.redirectNonce,
304 restNonce = _window$leadinConfig.restNonce,
305 restUrl = _window$leadinConfig.restUrl,
306 refreshToken = _window$leadinConfig.refreshToken,
307 reviewSkippedDate = _window$leadinConfig.reviewSkippedDate,
308 theme = _window$leadinConfig.theme,
309 trackConsent = _window$leadinConfig.trackConsent,
310 wpVersion = _window$leadinConfig.wpVersion,
311 contentEmbed = _window$leadinConfig.contentEmbed,
312 requiresContentEmbedScope = _window$leadinConfig.requiresContentEmbedScope,
313 refreshTokenError = _window$leadinConfig.refreshTokenError,
314 encryptionError = _window$leadinConfig.encryptionError;
315
316
317 /***/ }),
318
319 /***/ "./scripts/gutenberg/Common/CalendarIcon.tsx":
320 /*!***************************************************!*\
321 !*** ./scripts/gutenberg/Common/CalendarIcon.tsx ***!
322 \***************************************************/
323 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
324
325 "use strict";
326 __webpack_require__.r(__webpack_exports__);
327 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
328 /* harmony export */ "default": () => (/* binding */ CalendarIcon)
329 /* harmony export */ });
330 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
331
332 function CalendarIcon() {
333 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
334 width: "18",
335 height: "18",
336 viewBox: "0 0 18 18",
337 fill: "none",
338 xmlns: "http://www.w3.org/2000/svg",
339 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
340 clipPath: "url(#clip0_903_1965)",
341 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
342 fillRule: "evenodd",
343 clipRule: "evenodd",
344 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",
345 fill: "#FF7A59"
346 })
347 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("defs", {
348 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("clipPath", {
349 id: "clip0_903_1965",
350 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("rect", {
351 width: "18",
352 height: "18",
353 fill: "white"
354 })
355 })
356 })]
357 });
358 }
359
360 /***/ }),
361
362 /***/ "./scripts/gutenberg/Common/SidebarSprocketIcon.tsx":
363 /*!**********************************************************!*\
364 !*** ./scripts/gutenberg/Common/SidebarSprocketIcon.tsx ***!
365 \**********************************************************/
366 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
367
368 "use strict";
369 __webpack_require__.r(__webpack_exports__);
370 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
371 /* harmony export */ "default": () => (/* binding */ SidebarSprocketIcon)
372 /* harmony export */ });
373 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
374
375 function SidebarSprocketIcon() {
376 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", {
377 width: "20px",
378 height: "20px",
379 version: "1.1",
380 viewBox: "0 0 40 42",
381 xmlns: "http://www.w3.org/2000/svg",
382 xmlnsXlink: "http://www.w3.org/1999/xlink",
383 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
384 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",
385 id: "Fill-1",
386 fillRule: "evenodd"
387 })
388 });
389 }
390
391 /***/ }),
392
393 /***/ "./scripts/gutenberg/Common/SprocketIcon.tsx":
394 /*!***************************************************!*\
395 !*** ./scripts/gutenberg/Common/SprocketIcon.tsx ***!
396 \***************************************************/
397 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
398
399 "use strict";
400 __webpack_require__.r(__webpack_exports__);
401 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
402 /* harmony export */ "default": () => (/* binding */ SprocketIcon)
403 /* harmony export */ });
404 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
405
406 function SprocketIcon() {
407 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
408 width: "40px",
409 height: "42px",
410 viewBox: "0 0 40 42",
411 version: "1.1",
412 xmlns: "http://www.w3.org/2000/svg",
413 xmlnsXlink: "http://www.w3.org/1999/xlink",
414 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("defs", {
415 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("polygon", {
416 id: "path-1",
417 points: "0.000123751494 0 39.7808917 0 39.7808917 41.6871084 0.000123751494 41.6871084"
418 })
419 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
420 id: "Page-1",
421 stroke: "none",
422 strokeWidth: "1",
423 fill: "none",
424 fillRule: "evenodd",
425 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("g", {
426 id: "HubSpot-Sprocket---Full-Color",
427 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("mask", {
428 id: "mask-2",
429 fill: "white",
430 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("use", {
431 xlinkHref: "#path-1"
432 })
433 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
434 id: "path-1"
435 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
436 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",
437 id: "Fill-1",
438 fill: "#F3785B",
439 fillRule: "nonzero",
440 mask: "url(#mask-2)"
441 })]
442 })
443 })]
444 });
445 }
446
447 /***/ }),
448
449 /***/ "./scripts/gutenberg/FormBlock/FormBlockSave.tsx":
450 /*!*******************************************************!*\
451 !*** ./scripts/gutenberg/FormBlock/FormBlockSave.tsx ***!
452 \*******************************************************/
453 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
454
455 "use strict";
456 __webpack_require__.r(__webpack_exports__);
457 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
458 /* harmony export */ "default": () => (/* binding */ FormSaveBlock)
459 /* harmony export */ });
460 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
461 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
462 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
463
464
465 function FormSaveBlock(_ref) {
466 var attributes = _ref.attributes;
467 var portalId = attributes.portalId,
468 formId = attributes.formId;
469
470 if (portalId && formId) {
471 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, {
472 className: "wp-block-leadin-hubspot-form-block",
473 children: "[hubspot portal=\"".concat(portalId, "\" id=\"").concat(formId, "\" type=\"form\"]")
474 });
475 }
476
477 return null;
478 }
479
480 /***/ }),
481
482 /***/ "./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx":
483 /*!**************************************************************!*\
484 !*** ./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx ***!
485 \**************************************************************/
486 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
487
488 "use strict";
489 __webpack_require__.r(__webpack_exports__);
490 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
491 /* harmony export */ "default": () => (/* binding */ FormGutenbergPreview)
492 /* harmony export */ });
493 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
494 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
495 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
496 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
497 /* harmony import */ var _UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UIImage */ "./scripts/gutenberg/UIComponents/UIImage.ts");
498
499
500
501
502 function FormGutenbergPreview() {
503 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
504 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__["default"], {
505 alt: "Create a new Hubspot Form",
506 src: "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath, "/public/assets/images/hubspot-form.png")
507 })
508 });
509 }
510
511 /***/ }),
512
513 /***/ "./scripts/gutenberg/FormBlock/registerFormBlock.tsx":
514 /*!***********************************************************!*\
515 !*** ./scripts/gutenberg/FormBlock/registerFormBlock.tsx ***!
516 \***********************************************************/
517 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
518
519 "use strict";
520 __webpack_require__.r(__webpack_exports__);
521 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
522 /* harmony export */ "default": () => (/* binding */ registerFormBlock)
523 /* harmony export */ });
524 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
525 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
526 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
527 /* harmony import */ var _Common_SprocketIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/SprocketIcon */ "./scripts/gutenberg/Common/SprocketIcon.tsx");
528 /* harmony import */ var _FormBlockSave__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FormBlockSave */ "./scripts/gutenberg/FormBlock/FormBlockSave.tsx");
529 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
530 /* harmony import */ var _FormGutenbergPreview__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FormGutenbergPreview */ "./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx");
531 /* harmony import */ var _shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../shared/Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
532 /* harmony import */ var _shared_Form_FormEdit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../shared/Form/FormEdit */ "./scripts/shared/Form/FormEdit.tsx");
533 /* harmony import */ var _shared_enums_connectionStatus__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../shared/enums/connectionStatus */ "./scripts/shared/enums/connectionStatus.ts");
534 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
535 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);
536 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
537 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
538
539 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
540
541 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
542
543
544
545
546
547
548
549
550
551
552
553
554 function registerFormBlock() {
555 var editComponent = function editComponent(props) {
556 if (props.attributes.preview) {
557 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormGutenbergPreview__WEBPACK_IMPORTED_MODULE_5__["default"], {});
558 } else if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__.connectionStatus === _shared_enums_connectionStatus__WEBPACK_IMPORTED_MODULE_8__["default"].Connected) {
559 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Form_FormEdit__WEBPACK_IMPORTED_MODULE_7__["default"], _objectSpread(_objectSpread({}, props), {}, {
560 origin: "gutenberg",
561 preview: true
562 }));
563 } else {
564 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_6__["default"], {
565 status: 401
566 });
567 }
568 }; // We do not support the full site editor: https://issues.hubspotcentral.com/browse/WP-1033
569
570
571 if (!_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ || (0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_10__.isFullSiteEditor)()) {
572 return null;
573 }
574
575 _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType('leadin/hubspot-form-block', {
576 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('HubSpot Form', 'leadin'),
577 description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Select and embed a HubSpot form', 'leadin'),
578 icon: _Common_SprocketIcon__WEBPACK_IMPORTED_MODULE_2__["default"],
579 category: 'leadin-blocks',
580 attributes: {
581 portalId: {
582 type: 'string',
583 "default": ''
584 },
585 formId: {
586 type: 'string'
587 },
588 formName: {
589 type: 'string'
590 },
591 preview: {
592 type: 'boolean',
593 "default": false
594 }
595 },
596 example: {
597 attributes: {
598 preview: true
599 }
600 },
601 edit: editComponent,
602 save: function save(props) {
603 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormBlockSave__WEBPACK_IMPORTED_MODULE_3__["default"], _objectSpread({}, props));
604 }
605 });
606 }
607
608 /***/ }),
609
610 /***/ "./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx":
611 /*!*********************************************************************!*\
612 !*** ./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx ***!
613 \*********************************************************************/
614 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
615
616 "use strict";
617 __webpack_require__.r(__webpack_exports__);
618 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
619 /* harmony export */ "default": () => (/* binding */ MeetingGutenbergPreview)
620 /* harmony export */ });
621 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
622 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
623 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
624 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
625 /* harmony import */ var _UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UIImage */ "./scripts/gutenberg/UIComponents/UIImage.ts");
626
627
628
629
630 function MeetingGutenbergPreview() {
631 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
632 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__["default"], {
633 alt: "Create a new Hubspot Meeting",
634 width: "100%",
635 src: "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath, "/public/assets/images/hubspot-meetings.png")
636 })
637 });
638 }
639
640 /***/ }),
641
642 /***/ "./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx":
643 /*!**************************************************************!*\
644 !*** ./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx ***!
645 \**************************************************************/
646 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
647
648 "use strict";
649 __webpack_require__.r(__webpack_exports__);
650 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
651 /* harmony export */ "default": () => (/* binding */ MeetingSaveBlock)
652 /* harmony export */ });
653 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
654 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
655 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
656
657
658 function MeetingSaveBlock(_ref) {
659 var attributes = _ref.attributes;
660 var url = attributes.url;
661
662 if (url) {
663 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, {
664 className: "wp-block-leadin-hubspot-meeting-block",
665 children: "[hubspot url=\"".concat(url, "\" type=\"meeting\"]")
666 });
667 }
668
669 return null;
670 }
671
672 /***/ }),
673
674 /***/ "./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx":
675 /*!******************************************************************!*\
676 !*** ./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx ***!
677 \******************************************************************/
678 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
679
680 "use strict";
681 __webpack_require__.r(__webpack_exports__);
682 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
683 /* harmony export */ "default": () => (/* binding */ registerMeetingBlock)
684 /* harmony export */ });
685 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
686 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
687 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
688 /* harmony import */ var _Common_CalendarIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/CalendarIcon */ "./scripts/gutenberg/Common/CalendarIcon.tsx");
689 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
690 /* harmony import */ var _MeetingGutenbergPreview__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MeetingGutenbergPreview */ "./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx");
691 /* harmony import */ var _MeetingSaveBlock__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./MeetingSaveBlock */ "./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx");
692 /* harmony import */ var _shared_Meeting_MeetingEdit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../shared/Meeting/MeetingEdit */ "./scripts/shared/Meeting/MeetingEdit.tsx");
693 /* harmony import */ var _shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../shared/Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
694 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
695 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__);
696 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
697 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
698
699 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
700
701 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
702
703
704
705
706
707
708
709
710
711
712
713 var ConnectionStatus = {
714 Connected: 'Connected',
715 NotConnected: 'NotConnected'
716 };
717 function registerMeetingBlock() {
718 var editComponent = function editComponent(props) {
719 if (props.attributes.preview) {
720 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingGutenbergPreview__WEBPACK_IMPORTED_MODULE_4__["default"], {});
721 } else if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.connectionStatus === ConnectionStatus.Connected) {
722 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Meeting_MeetingEdit__WEBPACK_IMPORTED_MODULE_6__["default"], _objectSpread(_objectSpread({}, props), {}, {
723 preview: true,
724 origin: "gutenberg"
725 }));
726 } else {
727 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__["default"], {
728 status: 401
729 });
730 }
731 }; // We do not support the full site editor: https://issues.hubspotcentral.com/browse/WP-1033
732
733
734 if (!_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ || (0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_9__.isFullSiteEditor)()) {
735 return null;
736 }
737
738 _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType('leadin/hubspot-meeting-block', {
739 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Hubspot Meetings Scheduler', 'leadin'),
740 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'),
741 icon: _Common_CalendarIcon__WEBPACK_IMPORTED_MODULE_2__["default"],
742 category: 'leadin-blocks',
743 attributes: {
744 url: {
745 type: 'string',
746 "default": ''
747 },
748 preview: {
749 type: 'boolean',
750 "default": false
751 }
752 },
753 example: {
754 attributes: {
755 preview: true
756 }
757 },
758 edit: editComponent,
759 save: function save(props) {
760 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingSaveBlock__WEBPACK_IMPORTED_MODULE_5__["default"], _objectSpread({}, props));
761 }
762 });
763 }
764
765 /***/ }),
766
767 /***/ "./scripts/gutenberg/Sidebar/contentType.tsx":
768 /*!***************************************************!*\
769 !*** ./scripts/gutenberg/Sidebar/contentType.tsx ***!
770 \***************************************************/
771 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
772
773 "use strict";
774 __webpack_require__.r(__webpack_exports__);
775 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
776 /* harmony export */ "registerHubspotSidebar": () => (/* binding */ registerHubspotSidebar)
777 /* harmony export */ });
778 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
779 /* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/plugins */ "@wordpress/plugins");
780 /* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__);
781 /* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/edit-post */ "@wordpress/edit-post");
782 /* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__);
783 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
784 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
785 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
786 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);
787 /* harmony import */ var _UIComponents_UISidebarSelectControl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../UIComponents/UISidebarSelectControl */ "./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx");
788 /* harmony import */ var _Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Common/SidebarSprocketIcon */ "./scripts/gutenberg/Common/SidebarSprocketIcon.tsx");
789 /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js");
790 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
791 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__);
792 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
793 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
794 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
795 var _templateObject;
796
797 function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
798
799
800
801
802
803
804
805
806
807
808
809
810
811 function registerHubspotSidebar() {
812 var ContentTypeLabelStyle = styled_components__WEBPACK_IMPORTED_MODULE_11__["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n white-space: normal;\n text-transform: none;\n "])));
813
814 var ContentTypeLabel = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ContentTypeLabelStyle, {
815 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Select the content type HubSpot Analytics uses to track this page', 'leadin')
816 });
817
818 var LeadinPluginSidebar = function LeadinPluginSidebar(_ref) {
819 var postType = _ref.postType;
820 return postType ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__.PluginSidebar, {
821 name: "leadin",
822 title: "HubSpot",
823 icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Icon, {
824 className: "hs-plugin-sidebar-sprocket",
825 icon: (0,_Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_6__["default"])()
826 }),
827 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, {
828 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('HubSpot Analytics', 'leadin'),
829 initialOpen: true,
830 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_8__.BackgroudAppContext.Provider, {
831 value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_9__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_10__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_9__.refreshToken),
832 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISidebarSelectControl__WEBPACK_IMPORTED_MODULE_5__["default"], {
833 metaKey: "content-type",
834 className: "select-content-type",
835 label: ContentTypeLabel,
836 options: [{
837 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Detect Automatically', 'leadin'),
838 value: ''
839 }, {
840 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Blog Post', 'leadin'),
841 value: 'blog-post'
842 }, {
843 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Knowledge Article', 'leadin'),
844 value: 'knowledge-article'
845 }, {
846 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Landing Page', 'leadin'),
847 value: 'landing-page'
848 }, {
849 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Listing Page', 'leadin'),
850 value: 'listing-page'
851 }, {
852 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Standard Page', 'leadin'),
853 value: 'standard-page'
854 }]
855 })
856 })
857 })
858 }) : null;
859 };
860
861 var LeadinPluginSidebarWrapper = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.withSelect)(function (select) {
862 var data = select('core/editor');
863 return {
864 postType: data && data.getCurrentPostType() && data.getEditedPostAttribute('meta')
865 };
866 })(LeadinPluginSidebar);
867
868 if (_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__) {
869 _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__.registerPlugin('leadin', {
870 render: LeadinPluginSidebarWrapper,
871 icon: _Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_6__["default"]
872 });
873 }
874 }
875
876 /***/ }),
877
878 /***/ "./scripts/gutenberg/UIComponents/UIImage.ts":
879 /*!***************************************************!*\
880 !*** ./scripts/gutenberg/UIComponents/UIImage.ts ***!
881 \***************************************************/
882 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
883
884 "use strict";
885 __webpack_require__.r(__webpack_exports__);
886 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
887 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
888 /* harmony export */ });
889 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
890
891
892 var _exp = /*#__PURE__*/function _exp() {
893 return function (props) {
894 return props.height ? props.height : 'auto';
895 };
896 };
897
898 var _exp2 = /*#__PURE__*/function _exp2() {
899 return function (props) {
900 return props.width ? props.width : 'auto';
901 };
902 };
903
904 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('img')({
905 name: "UIImage0",
906 "class": "ump7xqy",
907 propsAsIs: false,
908 vars: {
909 "ump7xqy-0": [_exp()],
910 "ump7xqy-1": [_exp2()]
911 }
912 }));
913
914 __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");
915
916 /***/ }),
917
918 /***/ "./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx":
919 /*!*******************************************************************!*\
920 !*** ./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx ***!
921 \*******************************************************************/
922 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
923
924 "use strict";
925 __webpack_require__.r(__webpack_exports__);
926 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
927 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
928 /* harmony export */ });
929 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
930 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
931 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
932 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
933 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
934 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
935 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
936
937 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
938
939 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
940
941
942
943
944
945
946
947 var UISidebarSelectControl = function UISidebarSelectControl(props) {
948 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__.useBackgroundAppContext)();
949 var monitorSidebarMetaChange = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__.usePostBackgroundMessage)();
950 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, _objectSpread({
951 value: props.metaValue,
952 onChange: function onChange(content) {
953 if (props.setMetaValue) {
954 props.setMetaValue(content);
955 }
956
957 isBackgroundAppReady && monitorSidebarMetaChange({
958 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages.TrackSidebarMetaChange,
959 payload: {
960 metaKey: props.metaKey
961 }
962 });
963 }
964 }, props));
965 };
966
967 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_2__["default"])(UISidebarSelectControl));
968
969 /***/ }),
970
971 /***/ "./scripts/iframe/integratedMessages/core/CoreMessages.ts":
972 /*!****************************************************************!*\
973 !*** ./scripts/iframe/integratedMessages/core/CoreMessages.ts ***!
974 \****************************************************************/
975 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
976
977 "use strict";
978 __webpack_require__.r(__webpack_exports__);
979 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
980 /* harmony export */ "CoreMessages": () => (/* binding */ CoreMessages)
981 /* harmony export */ });
982 var CoreMessages = {
983 HandshakeReceive: 'INTEGRATED_APP_EMBEDDER_HANDSHAKE_RECEIVED',
984 SendRefreshToken: 'INTEGRATED_APP_EMBEDDER_SEND_REFRESH_TOKEN',
985 ReloadParentFrame: 'INTEGRATED_APP_EMBEDDER_RELOAD_PARENT_FRAME',
986 RedirectParentFrame: 'INTEGRATED_APP_EMBEDDER_REDIRECT_PARENT_FRAME',
987 SendLocale: 'INTEGRATED_APP_EMBEDDER_SEND_LOCALE',
988 SendDeviceId: 'INTEGRATED_APP_EMBEDDER_SEND_DEVICE_ID'
989 };
990
991 /***/ }),
992
993 /***/ "./scripts/iframe/integratedMessages/forms/FormsMessages.ts":
994 /*!******************************************************************!*\
995 !*** ./scripts/iframe/integratedMessages/forms/FormsMessages.ts ***!
996 \******************************************************************/
997 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
998
999 "use strict";
1000 __webpack_require__.r(__webpack_exports__);
1001 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1002 /* harmony export */ "FormMessages": () => (/* binding */ FormMessages)
1003 /* harmony export */ });
1004 var FormMessages = {
1005 CreateFormAppNavigation: 'CREATE_FORM_APP_NAVIGATION'
1006 };
1007
1008 /***/ }),
1009
1010 /***/ "./scripts/iframe/integratedMessages/index.ts":
1011 /*!****************************************************!*\
1012 !*** ./scripts/iframe/integratedMessages/index.ts ***!
1013 \****************************************************/
1014 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1015
1016 "use strict";
1017 __webpack_require__.r(__webpack_exports__);
1018 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1019 /* harmony export */ "CoreMessages": () => (/* reexport safe */ _core_CoreMessages__WEBPACK_IMPORTED_MODULE_0__.CoreMessages),
1020 /* harmony export */ "FormMessages": () => (/* reexport safe */ _forms_FormsMessages__WEBPACK_IMPORTED_MODULE_1__.FormMessages),
1021 /* harmony export */ "LiveChatMessages": () => (/* reexport safe */ _livechat_LiveChatMessages__WEBPACK_IMPORTED_MODULE_2__.LiveChatMessages),
1022 /* harmony export */ "PluginMessages": () => (/* reexport safe */ _plugin_PluginMessages__WEBPACK_IMPORTED_MODULE_3__.PluginMessages),
1023 /* harmony export */ "ProxyMessages": () => (/* reexport safe */ _proxy_ProxyMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages)
1024 /* harmony export */ });
1025 /* harmony import */ var _core_CoreMessages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/CoreMessages */ "./scripts/iframe/integratedMessages/core/CoreMessages.ts");
1026 /* harmony import */ var _forms_FormsMessages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./forms/FormsMessages */ "./scripts/iframe/integratedMessages/forms/FormsMessages.ts");
1027 /* harmony import */ var _livechat_LiveChatMessages__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./livechat/LiveChatMessages */ "./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts");
1028 /* harmony import */ var _plugin_PluginMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./plugin/PluginMessages */ "./scripts/iframe/integratedMessages/plugin/PluginMessages.ts");
1029 /* harmony import */ var _proxy_ProxyMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./proxy/ProxyMessages */ "./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts");
1030
1031
1032
1033
1034
1035
1036 /***/ }),
1037
1038 /***/ "./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts":
1039 /*!************************************************************************!*\
1040 !*** ./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts ***!
1041 \************************************************************************/
1042 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1043
1044 "use strict";
1045 __webpack_require__.r(__webpack_exports__);
1046 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1047 /* harmony export */ "LiveChatMessages": () => (/* binding */ LiveChatMessages)
1048 /* harmony export */ });
1049 var LiveChatMessages = {
1050 CreateLiveChatAppNavigation: 'CREATE_LIVE_CHAT_APP_NAVIGATION'
1051 };
1052
1053 /***/ }),
1054
1055 /***/ "./scripts/iframe/integratedMessages/plugin/PluginMessages.ts":
1056 /*!********************************************************************!*\
1057 !*** ./scripts/iframe/integratedMessages/plugin/PluginMessages.ts ***!
1058 \********************************************************************/
1059 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1060
1061 "use strict";
1062 __webpack_require__.r(__webpack_exports__);
1063 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1064 /* harmony export */ "PluginMessages": () => (/* binding */ PluginMessages)
1065 /* harmony export */ });
1066 var PluginMessages = {
1067 PluginSettingsNavigation: 'PLUGIN_SETTINGS_NAVIGATION',
1068 PluginLeadinConfig: 'PLUGIN_LEADIN_CONFIG',
1069 TrackConsent: 'INTEGRATED_APP_EMBEDDER_TRACK_CONSENT',
1070 InternalTrackingFetchRequest: 'INTEGRATED_TRACKING_FETCH_REQUEST',
1071 InternalTrackingFetchResponse: 'INTEGRATED_TRACKING_FETCH_RESPONSE',
1072 InternalTrackingFetchError: 'INTEGRATED_TRACKING_FETCH_ERROR',
1073 InternalTrackingChangeRequest: 'INTEGRATED_TRACKING_CHANGE_REQUEST',
1074 InternalTrackingChangeError: 'INTEGRATED_TRACKING_CHANGE_ERROR',
1075 BusinessUnitFetchRequest: 'BUSINESS_UNIT_FETCH_REQUEST',
1076 BusinessUnitFetchResponse: 'BUSINESS_UNIT_FETCH_FETCH_RESPONSE',
1077 BusinessUnitFetchError: 'BUSINESS_UNIT_FETCH_FETCH_ERROR',
1078 BusinessUnitChangeRequest: 'BUSINESS_UNIT_CHANGE_REQUEST',
1079 BusinessUnitChangeError: 'BUSINESS_UNIT_CHANGE_ERROR',
1080 SkipReviewRequest: 'SKIP_REVIEW_REQUEST',
1081 SkipReviewResponse: 'SKIP_REVIEW_RESPONSE',
1082 SkipReviewError: 'SKIP_REVIEW_ERROR',
1083 RemoveParentQueryParam: 'REMOVE_PARENT_QUERY_PARAM',
1084 ContentEmbedInstallRequest: 'CONTENT_EMBED_INSTALL_REQUEST',
1085 ContentEmbedInstallResponse: 'CONTENT_EMBED_INSTALL_RESPONSE',
1086 ContentEmbedInstallError: 'CONTENT_EMBED_INSTALL_ERROR',
1087 ContentEmbedActivationRequest: 'CONTENT_EMBED_ACTIVATION_REQUEST',
1088 ContentEmbedActivationResponse: 'CONTENT_EMBED_ACTIVATION_RESPONSE',
1089 ContentEmbedActivationError: 'CONTENT_EMBED_ACTIVATION_ERROR'
1090 };
1091
1092 /***/ }),
1093
1094 /***/ "./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts":
1095 /*!******************************************************************!*\
1096 !*** ./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts ***!
1097 \******************************************************************/
1098 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1099
1100 "use strict";
1101 __webpack_require__.r(__webpack_exports__);
1102 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1103 /* harmony export */ "ProxyMessages": () => (/* binding */ ProxyMessages)
1104 /* harmony export */ });
1105 var ProxyMessages = {
1106 FetchForms: 'FETCH_FORMS',
1107 FetchForm: 'FETCH_FORM',
1108 CreateFormFromTemplate: 'CREATE_FORM_FROM_TEMPLATE',
1109 FetchAuth: 'FETCH_AUTH',
1110 FetchMeetingsAndUsers: 'FETCH_MEETINGS_AND_USERS',
1111 FetchContactsCreateSinceActivation: 'FETCH_CONTACTS_CREATED_SINCE_ACTIVATION',
1112 FetchOrCreateMeetingUser: 'FETCH_OR_CREATE_MEETING_USER',
1113 ConnectMeetingsCalendar: 'CONNECT_MEETINGS_CALENDAR',
1114 TrackFormPreviewRender: 'TRACK_FORM_PREVIEW_RENDER',
1115 TrackFormCreatedFromTemplate: 'TRACK_FORM_CREATED_FROM_TEMPLATE',
1116 TrackFormCreationFailed: 'TRACK_FORM_CREATION_FAILED',
1117 TrackMeetingPreviewRender: 'TRACK_MEETING_PREVIEW_RENDER',
1118 TrackSidebarMetaChange: 'TRACK_SIDEBAR_META_CHANGE',
1119 TrackReviewBannerRender: 'TRACK_REVIEW_BANNER_RENDER',
1120 TrackReviewBannerInteraction: 'TRACK_REVIEW_BANNER_INTERACTION',
1121 TrackReviewBannerDismissed: 'TRACK_REVIEW_BANNER_DISMISSED',
1122 TrackPluginDeactivation: 'TRACK_PLUGIN_DEACTIVATION'
1123 };
1124
1125 /***/ }),
1126
1127 /***/ "./scripts/iframe/useBackgroundApp.ts":
1128 /*!********************************************!*\
1129 !*** ./scripts/iframe/useBackgroundApp.ts ***!
1130 \********************************************/
1131 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1132
1133 "use strict";
1134 __webpack_require__.r(__webpack_exports__);
1135 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1136 /* harmony export */ "BackgroudAppContext": () => (/* binding */ BackgroudAppContext),
1137 /* harmony export */ "useBackgroundAppContext": () => (/* binding */ useBackgroundAppContext),
1138 /* harmony export */ "usePostAsyncBackgroundMessage": () => (/* binding */ usePostAsyncBackgroundMessage),
1139 /* harmony export */ "usePostBackgroundMessage": () => (/* binding */ usePostBackgroundMessage)
1140 /* harmony export */ });
1141 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1142 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1143
1144 var BackgroudAppContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
1145 function useBackgroundAppContext() {
1146 return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(BackgroudAppContext);
1147 }
1148 function usePostBackgroundMessage() {
1149 var app = useBackgroundAppContext();
1150 return function (message) {
1151 app.postMessage(message);
1152 };
1153 }
1154 function usePostAsyncBackgroundMessage() {
1155 var app = useBackgroundAppContext();
1156 return function (message) {
1157 return app.postAsyncMessage(message);
1158 };
1159 }
1160
1161 /***/ }),
1162
1163 /***/ "./scripts/lib/Raven.ts":
1164 /*!******************************!*\
1165 !*** ./scripts/lib/Raven.ts ***!
1166 \******************************/
1167 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1168
1169 "use strict";
1170 __webpack_require__.r(__webpack_exports__);
1171 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1172 /* harmony export */ "configureRaven": () => (/* binding */ configureRaven),
1173 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1174 /* harmony export */ });
1175 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! raven-js */ "./node_modules/raven-js/src/singleton.js");
1176 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(raven_js__WEBPACK_IMPORTED_MODULE_0__);
1177 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1178
1179
1180 function configureRaven() {
1181 if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.hubspotBaseUrl.indexOf('app.hubspot.com') === -1) {
1182 return;
1183 }
1184
1185 raven_js__WEBPACK_IMPORTED_MODULE_0___default().config('https://e9b8f382cdd130c0d415cd977d2be56f@exceptions.hubspot.com/1', {
1186 instrument: {
1187 tryCatch: false
1188 },
1189 release: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.leadinPluginVersion
1190 }).install();
1191 raven_js__WEBPACK_IMPORTED_MODULE_0___default().setTagsContext({
1192 v: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.leadinPluginVersion,
1193 php: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.phpVersion,
1194 wordpress: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.wpVersion
1195 });
1196 raven_js__WEBPACK_IMPORTED_MODULE_0___default().setExtraContext({
1197 hub: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.portalId,
1198 plugins: Object.keys(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.plugins).map(function (name) {
1199 return "".concat(name, "#").concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.plugins[name]);
1200 }).join(',')
1201 });
1202 }
1203 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((raven_js__WEBPACK_IMPORTED_MODULE_0___default()));
1204
1205 /***/ }),
1206
1207 /***/ "./scripts/shared/Common/AsyncSelect.tsx":
1208 /*!***********************************************!*\
1209 !*** ./scripts/shared/Common/AsyncSelect.tsx ***!
1210 \***********************************************/
1211 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1212
1213 "use strict";
1214 __webpack_require__.r(__webpack_exports__);
1215 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1216 /* harmony export */ "default": () => (/* binding */ AsyncSelect)
1217 /* harmony export */ });
1218 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1219 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1220 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1221 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
1222 /* harmony import */ var _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/colors */ "./scripts/shared/UIComponents/colors.ts");
1223 /* harmony import */ var _UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpinner */ "./scripts/shared/UIComponents/UISpinner.tsx");
1224 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../enums/loadState */ "./scripts/shared/enums/loadState.ts");
1225 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1226
1227 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."); }
1228
1229 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
1230
1231 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
1232
1233 function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
1234
1235 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1236
1237
1238
1239
1240
1241
1242
1243 var Container = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1244 name: "Container",
1245 "class": "c1wxx7eu",
1246 propsAsIs: false
1247 });
1248
1249 var _exp2 = /*#__PURE__*/function _exp2() {
1250 return function (props) {
1251 return props.focused ? '0' : '1px';
1252 };
1253 };
1254
1255 var _exp3 = /*#__PURE__*/function _exp3() {
1256 return function (props) {
1257 return props.focused ? "0 0 0 2px ".concat(_UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM) : 'none';
1258 };
1259 };
1260
1261 var ControlContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1262 name: "ControlContainer",
1263 "class": "c1rgwbep",
1264 propsAsIs: false,
1265 vars: {
1266 "c1rgwbep-0": [_exp2()],
1267 "c1rgwbep-1": [_exp3()]
1268 }
1269 });
1270 var ValueContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1271 name: "ValueContainer",
1272 "class": "v1mdmbaj",
1273 propsAsIs: false
1274 });
1275 var Placeholder = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1276 name: "Placeholder",
1277 "class": "p1gwkvxy",
1278 propsAsIs: false
1279 });
1280 var SingleValue = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1281 name: "SingleValue",
1282 "class": "s1bwlafs",
1283 propsAsIs: false
1284 });
1285 var IndicatorContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1286 name: "IndicatorContainer",
1287 "class": "i196z9y5",
1288 propsAsIs: false
1289 });
1290 var DropdownIndicator = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1291 name: "DropdownIndicator",
1292 "class": "d1dfo5ow",
1293 propsAsIs: false
1294 });
1295 var InputContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1296 name: "InputContainer",
1297 "class": "if3lze",
1298 propsAsIs: false
1299 });
1300 var Input = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('input')({
1301 name: "Input",
1302 "class": "i9kxf50",
1303 propsAsIs: false
1304 });
1305 var InputShadow = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1306 name: "InputShadow",
1307 "class": "igjr3uc",
1308 propsAsIs: false
1309 });
1310 var MenuContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1311 name: "MenuContainer",
1312 "class": "mhb9if7",
1313 propsAsIs: false
1314 });
1315 var MenuList = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1316 name: "MenuList",
1317 "class": "mxaof7s",
1318 propsAsIs: false
1319 });
1320 var MenuGroup = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1321 name: "MenuGroup",
1322 "class": "mw50s5v",
1323 propsAsIs: false
1324 });
1325 var MenuGroupHeader = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1326 name: "MenuGroupHeader",
1327 "class": "m11rzvjw",
1328 propsAsIs: false
1329 });
1330
1331 var _exp5 = /*#__PURE__*/function _exp5() {
1332 return function (props) {
1333 return props.selected ? _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM : 'transparent';
1334 };
1335 };
1336
1337 var _exp6 = /*#__PURE__*/function _exp6() {
1338 return function (props) {
1339 return props.selected ? '#fff' : 'inherit';
1340 };
1341 };
1342
1343 var _exp7 = /*#__PURE__*/function _exp7() {
1344 return function (props) {
1345 return props.selected ? _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM : _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_LIGHT;
1346 };
1347 };
1348
1349 var MenuItem = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1350 name: "MenuItem",
1351 "class": "m1jcdsjv",
1352 propsAsIs: false,
1353 vars: {
1354 "m1jcdsjv-0": [_exp5()],
1355 "m1jcdsjv-1": [_exp6()],
1356 "m1jcdsjv-2": [_exp7()]
1357 }
1358 });
1359 function AsyncSelect(_ref) {
1360 var placeholder = _ref.placeholder,
1361 value = _ref.value,
1362 loadOptions = _ref.loadOptions,
1363 onChange = _ref.onChange,
1364 defaultOptions = _ref.defaultOptions;
1365 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1366 var inputShadowEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1367
1368 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
1369 _useState2 = _slicedToArray(_useState, 2),
1370 isFocused = _useState2[0],
1371 setFocus = _useState2[1];
1372
1373 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].NotLoaded),
1374 _useState4 = _slicedToArray(_useState3, 2),
1375 loadState = _useState4[0],
1376 setLoadState = _useState4[1];
1377
1378 var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
1379 _useState6 = _slicedToArray(_useState5, 2),
1380 localValue = _useState6[0],
1381 setLocalValue = _useState6[1];
1382
1383 var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultOptions),
1384 _useState8 = _slicedToArray(_useState7, 2),
1385 options = _useState8[0],
1386 setOptions = _useState8[1];
1387
1388 var inputSize = "".concat(inputShadowEl.current ? inputShadowEl.current.clientWidth + 10 : 2, "px");
1389 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1390 if (loadOptions && loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].NotLoaded) {
1391 loadOptions('', function (result) {
1392 setOptions(result);
1393 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Idle);
1394 });
1395 }
1396 }, [loadOptions, loadState]);
1397
1398 var renderItems = function renderItems() {
1399 var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
1400 var parentKey = arguments.length > 1 ? arguments[1] : undefined;
1401 return items.map(function (item, index) {
1402 if (item.options) {
1403 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(MenuGroup, {
1404 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuGroupHeader, {
1405 id: "".concat(index, "-heading"),
1406 children: item.label
1407 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
1408 children: renderItems(item.options, index)
1409 })]
1410 }, "async-select-item-".concat(index));
1411 } else {
1412 var key = "async-select-item-".concat(parentKey !== undefined ? "".concat(parentKey, "-").concat(index) : index);
1413 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuItem, {
1414 id: key,
1415 selected: value && item.value === value.value,
1416 onClick: function onClick() {
1417 onChange(item);
1418 setFocus(false);
1419 },
1420 children: item.label
1421 }, key);
1422 }
1423 });
1424 };
1425
1426 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(Container, {
1427 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ControlContainer, {
1428 id: "leadin-async-selector",
1429 focused: isFocused,
1430 onClick: function onClick() {
1431 if (isFocused) {
1432 if (inputEl.current) {
1433 inputEl.current.blur();
1434 }
1435
1436 setFocus(false);
1437 setLocalValue('');
1438 } else {
1439 if (inputEl.current) {
1440 inputEl.current.focus();
1441 }
1442
1443 setFocus(true);
1444 }
1445 },
1446 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ValueContainer, {
1447 children: [localValue === '' && (!value ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Placeholder, {
1448 children: placeholder
1449 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SingleValue, {
1450 children: value.label
1451 })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(InputContainer, {
1452 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Input, {
1453 ref: inputEl,
1454 onFocus: function onFocus() {
1455 setFocus(true);
1456 },
1457 onChange: function onChange(e) {
1458 setLocalValue(e.target.value);
1459 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Loading);
1460 loadOptions && loadOptions(e.target.value, function (result) {
1461 setOptions(result);
1462 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Idle);
1463 });
1464 },
1465 value: localValue,
1466 width: inputSize,
1467 id: "asycn-select-input"
1468 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(InputShadow, {
1469 ref: inputShadowEl,
1470 children: localValue
1471 })]
1472 })]
1473 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(IndicatorContainer, {
1474 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, {})]
1475 })]
1476 }), isFocused && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuContainer, {
1477 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuList, {
1478 children: renderItems(options)
1479 })
1480 })]
1481 });
1482 }
1483
1484 __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");
1485
1486 /***/ }),
1487
1488 /***/ "./scripts/shared/Common/ErrorHandler.tsx":
1489 /*!************************************************!*\
1490 !*** ./scripts/shared/Common/ErrorHandler.tsx ***!
1491 \************************************************/
1492 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1493
1494 "use strict";
1495 __webpack_require__.r(__webpack_exports__);
1496 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1497 /* harmony export */ "default": () => (/* binding */ ErrorHandler)
1498 /* harmony export */ });
1499 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1500 /* harmony import */ var _UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../UIComponents/UIButton */ "./scripts/shared/UIComponents/UIButton.ts");
1501 /* harmony import */ var _UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIContainer */ "./scripts/shared/UIComponents/UIContainer.ts");
1502 /* harmony import */ var _HubspotWrapper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1503 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1504 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1505 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);
1506
1507
1508
1509
1510
1511
1512
1513
1514 function redirectToPlugin() {
1515 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);
1516 }
1517
1518 function ErrorHandler(_ref) {
1519 var status = _ref.status,
1520 resetErrorState = _ref.resetErrorState,
1521 _ref$errorInfo = _ref.errorInfo,
1522 errorInfo = _ref$errorInfo === void 0 ? {
1523 header: '',
1524 message: '',
1525 action: ''
1526 } : _ref$errorInfo;
1527 var isUnauthorized = status === 401 || status === 403;
1528 var errorHeader = isUnauthorized ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)("Your plugin isn't authorized", 'leadin') : errorInfo.header;
1529 var errorMessage = isUnauthorized ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Reauthorize your plugin to access your free HubSpot tools', 'leadin') : errorInfo.message;
1530 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HubspotWrapper__WEBPACK_IMPORTED_MODULE_3__["default"], {
1531 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__.pluginPath,
1532 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_2__["default"], {
1533 textAlign: "center",
1534 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h4", {
1535 children: errorHeader
1536 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
1537 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
1538 children: errorMessage
1539 })
1540 }), isUnauthorized ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__["default"], {
1541 "data-test-id": "authorize-button",
1542 onClick: redirectToPlugin,
1543 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Go to plugin', 'leadin')
1544 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__["default"], {
1545 "data-test-id": "retry-button",
1546 onClick: resetErrorState,
1547 children: errorInfo.action
1548 })]
1549 })
1550 });
1551 }
1552
1553 /***/ }),
1554
1555 /***/ "./scripts/shared/Common/HubspotWrapper.ts":
1556 /*!*************************************************!*\
1557 !*** ./scripts/shared/Common/HubspotWrapper.ts ***!
1558 \*************************************************/
1559 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1560
1561 "use strict";
1562 __webpack_require__.r(__webpack_exports__);
1563 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1564 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1565 /* harmony export */ });
1566 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
1567
1568
1569 var _exp = /*#__PURE__*/function _exp() {
1570 return function (props) {
1571 return "url(".concat(props.pluginPath, "/public/assets/images/hubspot.svg)");
1572 };
1573 };
1574
1575 var _exp2 = /*#__PURE__*/function _exp2() {
1576 return function (props) {
1577 return props.padding || '90px 20% 25px';
1578 };
1579 };
1580
1581 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
1582 name: "HubspotWrapper0",
1583 "class": "h1q5v5ee",
1584 propsAsIs: false,
1585 vars: {
1586 "h1q5v5ee-0": [_exp()],
1587 "h1q5v5ee-1": [_exp2()]
1588 }
1589 }));
1590
1591 __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");
1592
1593 /***/ }),
1594
1595 /***/ "./scripts/shared/Common/LoadingBlock.tsx":
1596 /*!************************************************!*\
1597 !*** ./scripts/shared/Common/LoadingBlock.tsx ***!
1598 \************************************************/
1599 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1600
1601 "use strict";
1602 __webpack_require__.r(__webpack_exports__);
1603 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1604 /* harmony export */ "default": () => (/* binding */ LoadingBlock)
1605 /* harmony export */ });
1606 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1607 /* harmony import */ var _HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1608 /* harmony import */ var _UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UISpinner */ "./scripts/shared/UIComponents/UISpinner.tsx");
1609 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1610
1611
1612
1613
1614 function LoadingBlock() {
1615 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__["default"], {
1616 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.pluginPath,
1617 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_2__["default"], {
1618 size: 50
1619 })
1620 });
1621 }
1622
1623 /***/ }),
1624
1625 /***/ "./scripts/shared/Form/FormEdit.tsx":
1626 /*!******************************************!*\
1627 !*** ./scripts/shared/Form/FormEdit.tsx ***!
1628 \******************************************/
1629 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1630
1631 "use strict";
1632 __webpack_require__.r(__webpack_exports__);
1633 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1634 /* harmony export */ "default": () => (/* binding */ FormEditContainer)
1635 /* harmony export */ });
1636 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1637 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1638 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1639 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1640 /* harmony import */ var _UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpacer */ "./scripts/shared/UIComponents/UISpacer.ts");
1641 /* harmony import */ var _PreviewForm__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PreviewForm */ "./scripts/shared/Form/PreviewForm.tsx");
1642 /* harmony import */ var _FormSelect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FormSelect */ "./scripts/shared/Form/FormSelect.tsx");
1643 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1644 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
1645 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
1646 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
1647 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1648
1649 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1650
1651 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664 function FormEdit(_ref) {
1665 var attributes = _ref.attributes,
1666 isSelected = _ref.isSelected,
1667 setAttributes = _ref.setAttributes,
1668 _ref$preview = _ref.preview,
1669 preview = _ref$preview === void 0 ? true : _ref$preview,
1670 _ref$origin = _ref.origin,
1671 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin;
1672 var formId = attributes.formId,
1673 formName = attributes.formName;
1674 var formSelected = _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId && formId;
1675 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.useBackgroundAppContext)();
1676 var monitorFormPreviewRender = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.usePostBackgroundMessage)();
1677
1678 var handleChange = function handleChange(selectedForm) {
1679 setAttributes({
1680 portalId: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId,
1681 formId: selectedForm.value,
1682 formName: selectedForm.label
1683 });
1684 };
1685
1686 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1687 monitorFormPreviewRender({
1688 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__.ProxyMessages.TrackFormPreviewRender,
1689 payload: {
1690 origin: origin
1691 }
1692 });
1693 }, [origin]);
1694 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, {
1695 children: [(isSelected || !formSelected) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormSelect__WEBPACK_IMPORTED_MODULE_5__["default"], {
1696 formId: formId,
1697 formName: formName,
1698 handleChange: handleChange,
1699 origin: origin
1700 }), formSelected && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
1701 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"], {
1702 portalId: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId,
1703 formId: formId
1704 })]
1705 })]
1706 });
1707 }
1708
1709 function FormEditContainer(props) {
1710 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.BackgroudAppContext.Provider, {
1711 value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_9__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.refreshToken),
1712 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(FormEdit, _objectSpread({}, props))
1713 });
1714 }
1715
1716 /***/ }),
1717
1718 /***/ "./scripts/shared/Form/FormSelect.tsx":
1719 /*!********************************************!*\
1720 !*** ./scripts/shared/Form/FormSelect.tsx ***!
1721 \********************************************/
1722 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1723
1724 "use strict";
1725 __webpack_require__.r(__webpack_exports__);
1726 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1727 /* harmony export */ "default": () => (/* binding */ FormSelect)
1728 /* harmony export */ });
1729 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1730 /* harmony import */ var _FormSelector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FormSelector */ "./scripts/shared/Form/FormSelector.tsx");
1731 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
1732 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1733 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
1734 /* harmony import */ var _hooks_useForms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useForms */ "./scripts/shared/Form/hooks/useForms.ts");
1735 /* harmony import */ var _hooks_useCreateFormFromTemplate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useCreateFormFromTemplate */ "./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts");
1736 /* harmony import */ var _constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../constants/defaultFormOptions */ "./scripts/constants/defaultFormOptions.ts");
1737 /* harmony import */ var _Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
1738
1739
1740
1741
1742
1743
1744
1745
1746 function FormSelect(_ref) {
1747 var formId = _ref.formId,
1748 formName = _ref.formName,
1749 handleChange = _ref.handleChange,
1750 _ref$origin = _ref.origin,
1751 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin;
1752
1753 var _useForms = (0,_hooks_useForms__WEBPACK_IMPORTED_MODULE_4__["default"])(),
1754 search = _useForms.search,
1755 formApiError = _useForms.formApiError,
1756 reset = _useForms.reset;
1757
1758 var _useCreateFormFromTem = (0,_hooks_useCreateFormFromTemplate__WEBPACK_IMPORTED_MODULE_5__["default"])(origin),
1759 createFormByTemplate = _useCreateFormFromTem.createFormByTemplate,
1760 createReset = _useCreateFormFromTem.reset,
1761 isCreating = _useCreateFormFromTem.isCreating,
1762 hasError = _useCreateFormFromTem.hasError,
1763 createApiError = _useCreateFormFromTem.formApiError;
1764
1765 var value = formId && formName ? {
1766 label: formName,
1767 value: formId
1768 } : null;
1769
1770 var handleLocalChange = function handleLocalChange(option) {
1771 if ((0,_constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_6__.isDefaultForm)(option.value)) {
1772 createFormByTemplate(option.value).then(function (_ref2) {
1773 var guid = _ref2.guid,
1774 name = _ref2.name;
1775 handleChange({
1776 value: guid,
1777 label: name
1778 });
1779 });
1780 } else {
1781 handleChange(option);
1782 }
1783 };
1784
1785 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"], {
1786 status: formApiError ? formApiError.status : createApiError.status,
1787 resetErrorState: function resetErrorState() {
1788 if (hasError) {
1789 createReset();
1790 } else {
1791 reset();
1792 }
1793 },
1794 errorInfo: {
1795 header: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('There was a problem retrieving your forms', 'leadin'),
1796 message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Please refresh your forms or try again in a few minutes', 'leadin'),
1797 action: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Refresh forms', 'leadin')
1798 }
1799 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormSelector__WEBPACK_IMPORTED_MODULE_1__["default"], {
1800 loadOptions: search,
1801 onChange: function onChange(option) {
1802 return handleLocalChange(option);
1803 },
1804 value: value
1805 });
1806 }
1807
1808 /***/ }),
1809
1810 /***/ "./scripts/shared/Form/FormSelector.tsx":
1811 /*!**********************************************!*\
1812 !*** ./scripts/shared/Form/FormSelector.tsx ***!
1813 \**********************************************/
1814 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1815
1816 "use strict";
1817 __webpack_require__.r(__webpack_exports__);
1818 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1819 /* harmony export */ "default": () => (/* binding */ FormSelector)
1820 /* harmony export */ });
1821 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1822 /* harmony import */ var _Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Common/HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1823 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1824 /* harmony import */ var _Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Common/AsyncSelect */ "./scripts/shared/Common/AsyncSelect.tsx");
1825 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1826 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
1827
1828
1829
1830
1831
1832 function FormSelector(_ref) {
1833 var loadOptions = _ref.loadOptions,
1834 onChange = _ref.onChange,
1835 value = _ref.value;
1836 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__["default"], {
1837 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath,
1838 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
1839 "data-test-id": "leadin-form-select",
1840 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
1841 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select an existing form or create a new one from a template', 'leadin')
1842 })
1843 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_3__["default"], {
1844 placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Search for a form', 'leadin'),
1845 value: value,
1846 loadOptions: loadOptions,
1847 onChange: onChange
1848 })]
1849 });
1850 }
1851
1852 /***/ }),
1853
1854 /***/ "./scripts/shared/Form/PreviewForm.tsx":
1855 /*!*********************************************!*\
1856 !*** ./scripts/shared/Form/PreviewForm.tsx ***!
1857 \*********************************************/
1858 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1859
1860 "use strict";
1861 __webpack_require__.r(__webpack_exports__);
1862 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1863 /* harmony export */ "default": () => (/* binding */ PreviewForm)
1864 /* harmony export */ });
1865 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1866 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1867 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1868 /* harmony import */ var _UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIOverlay */ "./scripts/shared/UIComponents/UIOverlay.ts");
1869 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1870 /* harmony import */ var _hooks_useFormsScript__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useFormsScript */ "./scripts/shared/Form/hooks/useFormsScript.ts");
1871
1872
1873
1874
1875
1876 function PreviewForm(_ref) {
1877 var portalId = _ref.portalId,
1878 formId = _ref.formId;
1879 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1880 var ready = (0,_hooks_useFormsScript__WEBPACK_IMPORTED_MODULE_4__["default"])();
1881 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1882 if (!ready) {
1883 return;
1884 }
1885
1886 if (inputEl.current) {
1887 inputEl.current.innerHTML = '';
1888 var embedScript = document.createElement('script');
1889 embedScript.innerHTML = "hbspt.forms.create({ portalId: '".concat(portalId, "', formId: '").concat(formId, "', region: '").concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.hublet, "', ").concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.formsScriptPayload, " });");
1890 inputEl.current.appendChild(embedScript);
1891 }
1892 }, [formId, portalId, ready, inputEl]);
1893 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__["default"], {
1894 ref: inputEl
1895 });
1896 }
1897
1898 /***/ }),
1899
1900 /***/ "./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts":
1901 /*!****************************************************************!*\
1902 !*** ./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts ***!
1903 \****************************************************************/
1904 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1905
1906 "use strict";
1907 __webpack_require__.r(__webpack_exports__);
1908 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1909 /* harmony export */ "default": () => (/* binding */ useCreateFormFromTemplate)
1910 /* harmony export */ });
1911 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1912 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1913 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1914 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
1915 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
1916 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1917
1918 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."); }
1919
1920 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
1921
1922 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
1923
1924 function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
1925
1926 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1927
1928
1929
1930
1931
1932 function useCreateFormFromTemplate() {
1933 var origin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'gutenberg';
1934 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
1935 var track = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostBackgroundMessage)();
1936
1937 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle),
1938 _useState2 = _slicedToArray(_useState, 2),
1939 loadState = _useState2[0],
1940 setLoadState = _useState2[1];
1941
1942 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
1943 _useState4 = _slicedToArray(_useState3, 2),
1944 formApiError = _useState4[0],
1945 setFormApiError = _useState4[1];
1946
1947 var createFormByTemplate = function createFormByTemplate(type) {
1948 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
1949 track({
1950 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.TrackFormCreatedFromTemplate,
1951 payload: {
1952 type: type,
1953 origin: origin
1954 }
1955 });
1956 return proxy({
1957 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.CreateFormFromTemplate,
1958 payload: type
1959 }).then(function (form) {
1960 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
1961 return form;
1962 })["catch"](function (err) {
1963 setFormApiError(err);
1964 track({
1965 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.TrackFormCreationFailed,
1966 payload: {
1967 origin: origin
1968 }
1969 });
1970 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
1971 });
1972 };
1973
1974 return {
1975 isCreating: loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading,
1976 hasError: loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed,
1977 formApiError: formApiError,
1978 createFormByTemplate: createFormByTemplate,
1979 reset: function reset() {
1980 return setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
1981 }
1982 };
1983 }
1984
1985 /***/ }),
1986
1987 /***/ "./scripts/shared/Form/hooks/useForms.ts":
1988 /*!***********************************************!*\
1989 !*** ./scripts/shared/Form/hooks/useForms.ts ***!
1990 \***********************************************/
1991 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1992
1993 "use strict";
1994 __webpack_require__.r(__webpack_exports__);
1995 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1996 /* harmony export */ "default": () => (/* binding */ useForms)
1997 /* harmony export */ });
1998 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1999 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2000 /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/debounce */ "./node_modules/lodash/debounce.js");
2001 /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_1__);
2002 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2003 /* harmony import */ var _constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../constants/defaultFormOptions */ "./scripts/constants/defaultFormOptions.ts");
2004 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2005 function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2006
2007 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."); }
2008
2009 function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
2010
2011 function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
2012
2013 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2014
2015 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."); }
2016
2017 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2018
2019 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2020
2021 function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
2022
2023 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2024
2025
2026
2027
2028
2029
2030 function useForms() {
2031 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__.usePostAsyncBackgroundMessage)();
2032
2033 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2034 _useState2 = _slicedToArray(_useState, 2),
2035 formApiError = _useState2[0],
2036 setFormApiError = _useState2[1];
2037
2038 var search = lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default()(function (search, callback) {
2039 return proxy({
2040 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages.FetchForms,
2041 payload: {
2042 search: search
2043 }
2044 }).then(function (forms) {
2045 callback([].concat(_toConsumableArray(forms.map(function (form) {
2046 return {
2047 label: form.name,
2048 value: form.guid
2049 };
2050 })), [_constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_OPTIONS]));
2051 })["catch"](function (error) {
2052 setFormApiError(error);
2053 });
2054 }, 300, {
2055 trailing: true
2056 });
2057 return {
2058 search: search,
2059 formApiError: formApiError,
2060 reset: function reset() {
2061 return setFormApiError(null);
2062 }
2063 };
2064 }
2065
2066 /***/ }),
2067
2068 /***/ "./scripts/shared/Form/hooks/useFormsScript.ts":
2069 /*!*****************************************************!*\
2070 !*** ./scripts/shared/Form/hooks/useFormsScript.ts ***!
2071 \*****************************************************/
2072 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2073
2074 "use strict";
2075 __webpack_require__.r(__webpack_exports__);
2076 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2077 /* harmony export */ "default": () => (/* binding */ useFormScript)
2078 /* harmony export */ });
2079 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
2080 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
2081 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2082 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2083 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2084 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../lib/Raven */ "./scripts/lib/Raven.ts");
2085 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2086
2087 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."); }
2088
2089 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2090
2091 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2092
2093 function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
2094
2095 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2096
2097
2098
2099
2100
2101 var promise;
2102
2103 function loadFormsScript() {
2104 if (!promise) {
2105 promise = new Promise(function (resolve, reject) {
2106 return jquery__WEBPACK_IMPORTED_MODULE_0___default().getScript(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.formsScript).done(resolve).fail(reject);
2107 });
2108 }
2109
2110 return promise;
2111 }
2112
2113 function useFormScript() {
2114 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
2115 _useState2 = _slicedToArray(_useState, 2),
2116 ready = _useState2[0],
2117 setReady = _useState2[1];
2118
2119 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2120 loadFormsScript().then(function () {
2121 return setReady(true);
2122 })["catch"](function (error) {
2123 return _lib_Raven__WEBPACK_IMPORTED_MODULE_3__["default"].captureException(error);
2124 });
2125 }, []);
2126 return ready;
2127 }
2128
2129 /***/ }),
2130
2131 /***/ "./scripts/shared/Meeting/MeetingController.tsx":
2132 /*!******************************************************!*\
2133 !*** ./scripts/shared/Meeting/MeetingController.tsx ***!
2134 \******************************************************/
2135 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2136
2137 "use strict";
2138 __webpack_require__.r(__webpack_exports__);
2139 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2140 /* harmony export */ "default": () => (/* binding */ MeetingController)
2141 /* harmony export */ });
2142 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2143 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2144 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2145 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
2146 /* harmony import */ var _MeetingSelector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./MeetingSelector */ "./scripts/shared/Meeting/MeetingSelector.tsx");
2147 /* harmony import */ var _MeetingWarning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MeetingWarning */ "./scripts/shared/Meeting/MeetingWarning.tsx");
2148 /* harmony import */ var _hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useMeetings */ "./scripts/shared/Meeting/hooks/useMeetings.ts");
2149 /* harmony import */ var _Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Common/HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
2150 /* harmony import */ var _Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
2151 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2152 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2153 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);
2154 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! raven-js */ "./node_modules/raven-js/src/singleton.js");
2155 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(raven_js__WEBPACK_IMPORTED_MODULE_10__);
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167 function MeetingController(_ref) {
2168 var handleChange = _ref.handleChange,
2169 url = _ref.url;
2170
2171 var _useMeetings = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__["default"])(),
2172 meetings = _useMeetings.mappedMeetings,
2173 loading = _useMeetings.loading,
2174 error = _useMeetings.error,
2175 reload = _useMeetings.reload,
2176 connectCalendar = _useMeetings.connectCalendar;
2177
2178 var selectedMeetingOption = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__.useSelectedMeeting)(url);
2179 var selectedMeetingCalendar = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__.useSelectedMeetingCalendar)(url);
2180 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2181 if (!url && meetings.length > 0) {
2182 handleChange(meetings[0].value);
2183 }
2184 }, [meetings, url, handleChange]);
2185
2186 var handleLocalChange = function handleLocalChange(option) {
2187 handleChange(option.value);
2188 };
2189
2190 var handleConnectCalendar = function handleConnectCalendar() {
2191 return connectCalendar().then(function () {
2192 reload();
2193 })["catch"](function (error) {
2194 raven_js__WEBPACK_IMPORTED_MODULE_10___default().captureMessage('Unable to connect calendar', {
2195 extra: {
2196 error: error
2197 }
2198 });
2199 });
2200 };
2201
2202 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2203 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"], {
2204 status: error && error.status || error,
2205 resetErrorState: function resetErrorState() {
2206 return reload();
2207 },
2208 errorInfo: {
2209 header: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('There was a problem retrieving your meetings', 'leadin'),
2210 message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Please refresh your meetings or try again in a few minutes', 'leadin'),
2211 action: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Refresh meetings', 'leadin')
2212 }
2213 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_6__["default"], {
2214 padding: "90px 32px 24px",
2215 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_8__.pluginPath,
2216 children: [selectedMeetingCalendar && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingWarning__WEBPACK_IMPORTED_MODULE_4__["default"], {
2217 status: selectedMeetingCalendar,
2218 onConnectCalendar: handleConnectCalendar
2219 }), meetings.length > 1 && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingSelector__WEBPACK_IMPORTED_MODULE_3__["default"], {
2220 onChange: handleLocalChange,
2221 options: meetings,
2222 value: selectedMeetingOption
2223 })]
2224 })
2225 });
2226 }
2227
2228 /***/ }),
2229
2230 /***/ "./scripts/shared/Meeting/MeetingEdit.tsx":
2231 /*!************************************************!*\
2232 !*** ./scripts/shared/Meeting/MeetingEdit.tsx ***!
2233 \************************************************/
2234 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2235
2236 "use strict";
2237 __webpack_require__.r(__webpack_exports__);
2238 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2239 /* harmony export */ "default": () => (/* binding */ MeetingsEditContainer)
2240 /* harmony export */ });
2241 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2242 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2243 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2244 /* harmony import */ var _MeetingController__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./MeetingController */ "./scripts/shared/Meeting/MeetingController.tsx");
2245 /* harmony import */ var _PreviewMeeting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PreviewMeeting */ "./scripts/shared/Meeting/PreviewMeeting.tsx");
2246 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2247 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2248 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2249 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
2250 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
2251 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2252
2253 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2254
2255 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267 function MeetingEdit(_ref) {
2268 var url = _ref.attributes.url,
2269 isSelected = _ref.isSelected,
2270 setAttributes = _ref.setAttributes,
2271 _ref$preview = _ref.preview,
2272 preview = _ref$preview === void 0 ? true : _ref$preview,
2273 _ref$origin = _ref.origin,
2274 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin;
2275 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.useBackgroundAppContext)();
2276 var monitorFormPreviewRender = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.usePostBackgroundMessage)();
2277
2278 var handleChange = function handleChange(newUrl) {
2279 setAttributes({
2280 url: newUrl
2281 });
2282 };
2283
2284 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2285 monitorFormPreviewRender({
2286 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_6__.ProxyMessages.TrackMeetingPreviewRender,
2287 payload: {
2288 origin: origin
2289 }
2290 });
2291 }, [origin]);
2292 return !isBackgroundAppReady ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_7__["default"], {}) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2293 children: [(isSelected || !url) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingController__WEBPACK_IMPORTED_MODULE_2__["default"], {
2294 url: url,
2295 handleChange: handleChange
2296 }), preview && url && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PreviewMeeting__WEBPACK_IMPORTED_MODULE_3__["default"], {
2297 url: url
2298 })]
2299 });
2300 }
2301
2302 function MeetingsEditContainer(props) {
2303 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.BackgroudAppContext.Provider, {
2304 value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_8__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__.refreshToken),
2305 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MeetingEdit, _objectSpread({}, props))
2306 });
2307 }
2308
2309 /***/ }),
2310
2311 /***/ "./scripts/shared/Meeting/MeetingSelector.tsx":
2312 /*!****************************************************!*\
2313 !*** ./scripts/shared/Meeting/MeetingSelector.tsx ***!
2314 \****************************************************/
2315 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2316
2317 "use strict";
2318 __webpack_require__.r(__webpack_exports__);
2319 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2320 /* harmony export */ "default": () => (/* binding */ MeetingSelector)
2321 /* harmony export */ });
2322 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2323 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2324 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2325 /* harmony import */ var _Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/AsyncSelect */ "./scripts/shared/Common/AsyncSelect.tsx");
2326 /* harmony import */ var _UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpacer */ "./scripts/shared/UIComponents/UISpacer.ts");
2327 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2328 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
2329
2330
2331
2332
2333
2334 function MeetingSelector(_ref) {
2335 var options = _ref.options,
2336 onChange = _ref.onChange,
2337 value = _ref.value;
2338 var optionsWrapper = [{
2339 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Meeting name', 'leadin'),
2340 options: options
2341 }];
2342 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2343 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", {
2344 "data-test-id": "leadin-meeting-select",
2345 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
2346 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select a meeting scheduling page', 'leadin')
2347 })
2348 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_2__["default"], {
2349 defaultOptions: optionsWrapper,
2350 onChange: onChange,
2351 placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select a meeting', 'leadin'),
2352 value: value
2353 })]
2354 });
2355 }
2356
2357 /***/ }),
2358
2359 /***/ "./scripts/shared/Meeting/MeetingWarning.tsx":
2360 /*!***************************************************!*\
2361 !*** ./scripts/shared/Meeting/MeetingWarning.tsx ***!
2362 \***************************************************/
2363 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2364
2365 "use strict";
2366 __webpack_require__.r(__webpack_exports__);
2367 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2368 /* harmony export */ "default": () => (/* binding */ MeetingWarning)
2369 /* harmony export */ });
2370 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2371 /* harmony import */ var _UIComponents_UIAlert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../UIComponents/UIAlert */ "./scripts/shared/UIComponents/UIAlert.tsx");
2372 /* harmony import */ var _UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIButton */ "./scripts/shared/UIComponents/UIButton.ts");
2373 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants */ "./scripts/shared/Meeting/constants.ts");
2374 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2375 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
2376
2377
2378
2379
2380
2381 function MeetingWarning(_ref) {
2382 var status = _ref.status,
2383 onConnectCalendar = _ref.onConnectCalendar;
2384 var isMeetingOwner = status === _constants__WEBPACK_IMPORTED_MODULE_3__.CURRENT_USER_CALENDAR_MISSING;
2385 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');
2386 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');
2387 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIAlert__WEBPACK_IMPORTED_MODULE_1__["default"], {
2388 titleText: titleText,
2389 titleMessage: titleMessage,
2390 children: isMeetingOwner && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_2__["default"], {
2391 use: "tertiary",
2392 id: "meetings-connect-calendar",
2393 onClick: onConnectCalendar,
2394 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Connect calendar', 'leadin')
2395 })
2396 });
2397 }
2398
2399 /***/ }),
2400
2401 /***/ "./scripts/shared/Meeting/PreviewMeeting.tsx":
2402 /*!***************************************************!*\
2403 !*** ./scripts/shared/Meeting/PreviewMeeting.tsx ***!
2404 \***************************************************/
2405 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2406
2407 "use strict";
2408 __webpack_require__.r(__webpack_exports__);
2409 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2410 /* harmony export */ "default": () => (/* binding */ PreviewForm)
2411 /* harmony export */ });
2412 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2413 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2414 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2415 /* harmony import */ var _UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIOverlay */ "./scripts/shared/UIComponents/UIOverlay.ts");
2416 /* harmony import */ var _hooks_useMeetingsScript__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hooks/useMeetingsScript */ "./scripts/shared/Meeting/hooks/useMeetingsScript.ts");
2417
2418
2419
2420
2421 function PreviewForm(_ref) {
2422 var url = _ref.url;
2423 var ready = (0,_hooks_useMeetingsScript__WEBPACK_IMPORTED_MODULE_3__["default"])();
2424 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
2425 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2426 if (!ready) {
2427 return;
2428 }
2429
2430 if (inputEl.current) {
2431 inputEl.current.innerHTML = '';
2432 var container = document.createElement('div');
2433 container.dataset.src = "".concat(url, "?embed=true");
2434 container.classList.add('meetings-iframe-container');
2435 inputEl.current.appendChild(container);
2436 var embedScript = document.createElement('script');
2437 embedScript.innerHTML = 'hbspt.meetings.create(".meetings-iframe-container");';
2438 inputEl.current.appendChild(embedScript);
2439 }
2440 }, [url, ready, inputEl]);
2441 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2442 children: url && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__["default"], {
2443 ref: inputEl
2444 })
2445 });
2446 }
2447
2448 /***/ }),
2449
2450 /***/ "./scripts/shared/Meeting/constants.ts":
2451 /*!*********************************************!*\
2452 !*** ./scripts/shared/Meeting/constants.ts ***!
2453 \*********************************************/
2454 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2455
2456 "use strict";
2457 __webpack_require__.r(__webpack_exports__);
2458 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2459 /* harmony export */ "CURRENT_USER_CALENDAR_MISSING": () => (/* binding */ CURRENT_USER_CALENDAR_MISSING),
2460 /* harmony export */ "OTHER_USER_CALENDAR_MISSING": () => (/* binding */ OTHER_USER_CALENDAR_MISSING)
2461 /* harmony export */ });
2462 var OTHER_USER_CALENDAR_MISSING = 'OTHER_USER_CALENDAR_MISSING';
2463 var CURRENT_USER_CALENDAR_MISSING = 'CURRENT_USER_CALENDAR_MISSING';
2464
2465 /***/ }),
2466
2467 /***/ "./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts":
2468 /*!*************************************************************!*\
2469 !*** ./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts ***!
2470 \*************************************************************/
2471 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2472
2473 "use strict";
2474 __webpack_require__.r(__webpack_exports__);
2475 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2476 /* harmony export */ "default": () => (/* binding */ useCurrentUserFetch)
2477 /* harmony export */ });
2478 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2479 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2480 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2481 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2482 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2483 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2484
2485 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."); }
2486
2487 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2488
2489 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2490
2491 function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
2492
2493 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2494
2495
2496
2497
2498
2499 var user = null;
2500 function useCurrentUserFetch() {
2501 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
2502
2503 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded),
2504 _useState2 = _slicedToArray(_useState, 2),
2505 loadState = _useState2[0],
2506 setLoadState = _useState2[1];
2507
2508 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2509 _useState4 = _slicedToArray(_useState3, 2),
2510 error = _useState4[0],
2511 setError = _useState4[1];
2512
2513 var createUser = function createUser() {
2514 if (!user) {
2515 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2516 }
2517 };
2518
2519 var reload = function reload() {
2520 user = null;
2521 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2522 setError(null);
2523 };
2524
2525 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2526 if (loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded && !user) {
2527 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
2528 proxy({
2529 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.FetchOrCreateMeetingUser
2530 }).then(function (data) {
2531 user = data;
2532 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
2533 })["catch"](function (err) {
2534 setError(err);
2535 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
2536 });
2537 }
2538 }, [loadState]);
2539 return {
2540 user: user,
2541 loadUserState: loadState,
2542 error: error,
2543 createUser: createUser,
2544 reload: reload
2545 };
2546 }
2547
2548 /***/ }),
2549
2550 /***/ "./scripts/shared/Meeting/hooks/useMeetings.ts":
2551 /*!*****************************************************!*\
2552 !*** ./scripts/shared/Meeting/hooks/useMeetings.ts ***!
2553 \*****************************************************/
2554 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2555
2556 "use strict";
2557 __webpack_require__.r(__webpack_exports__);
2558 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2559 /* harmony export */ "default": () => (/* binding */ useMeetings),
2560 /* harmony export */ "useSelectedMeeting": () => (/* binding */ useSelectedMeeting),
2561 /* harmony export */ "useSelectedMeetingCalendar": () => (/* binding */ useSelectedMeetingCalendar)
2562 /* harmony export */ });
2563 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2564 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2565 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2566 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
2567 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants */ "./scripts/shared/Meeting/constants.ts");
2568 /* harmony import */ var _useMeetingsFetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./useMeetingsFetch */ "./scripts/shared/Meeting/hooks/useMeetingsFetch.ts");
2569 /* harmony import */ var _useCurrentUserFetch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./useCurrentUserFetch */ "./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts");
2570 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2571 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2572 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2573 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2574
2575 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2576
2577 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2578
2579 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2580
2581 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."); }
2582
2583 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2584
2585 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2586
2587 function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
2588
2589 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600 function getDefaultMeetingName(meeting, currentUser, meetingUsers) {
2601 var _meeting$meetingsUser = _slicedToArray(meeting.meetingsUserIds, 1),
2602 meetingOwnerId = _meeting$meetingsUser[0];
2603
2604 var result = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Default', 'leadin');
2605
2606 if (currentUser && meetingOwnerId !== currentUser.id && meetingUsers[meetingOwnerId]) {
2607 var user = meetingUsers[meetingOwnerId];
2608 result += " (".concat(user.userProfile.fullName, ")");
2609 }
2610
2611 return result;
2612 }
2613
2614 function hasCalendarObject(user) {
2615 return user && user.meetingsUserBlob && user.meetingsUserBlob.calendarSettings && user.meetingsUserBlob.calendarSettings.email;
2616 }
2617
2618 function useMeetings() {
2619 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.usePostAsyncBackgroundMessage)();
2620
2621 var _useMeetingsFetch = (0,_useMeetingsFetch__WEBPACK_IMPORTED_MODULE_3__["default"])(),
2622 meetings = _useMeetingsFetch.meetings,
2623 meetingUsers = _useMeetingsFetch.meetingUsers,
2624 meetingsError = _useMeetingsFetch.error,
2625 loadMeetingsState = _useMeetingsFetch.loadMeetingsState,
2626 reloadMeetings = _useMeetingsFetch.reload;
2627
2628 var _useCurrentUserFetch = (0,_useCurrentUserFetch__WEBPACK_IMPORTED_MODULE_4__["default"])(),
2629 currentUser = _useCurrentUserFetch.user,
2630 userError = _useCurrentUserFetch.error,
2631 loadUserState = _useCurrentUserFetch.loadUserState,
2632 reloadUser = _useCurrentUserFetch.reload;
2633
2634 var reload = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
2635 reloadUser();
2636 reloadMeetings();
2637 }, [reloadUser, reloadMeetings]);
2638
2639 var connectCalendar = function connectCalendar() {
2640 return proxy({
2641 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__.ProxyMessages.ConnectMeetingsCalendar
2642 });
2643 };
2644
2645 return {
2646 mappedMeetings: meetings.map(function (meet) {
2647 return {
2648 label: meet.name || getDefaultMeetingName(meet, currentUser, meetingUsers),
2649 value: meet.link
2650 };
2651 }),
2652 meetings: meetings,
2653 meetingUsers: meetingUsers,
2654 currentUser: currentUser,
2655 error: meetingsError || userError,
2656 loading: loadMeetingsState == _enums_loadState__WEBPACK_IMPORTED_MODULE_5__["default"].Loading || loadUserState === _enums_loadState__WEBPACK_IMPORTED_MODULE_5__["default"].Loading,
2657 reload: reload,
2658 connectCalendar: connectCalendar
2659 };
2660 }
2661 function useSelectedMeeting(url) {
2662 var _useMeetings = useMeetings(),
2663 meetings = _useMeetings.mappedMeetings;
2664
2665 var option = meetings.find(function (_ref) {
2666 var value = _ref.value;
2667 return value === url;
2668 });
2669 return option;
2670 }
2671 function useSelectedMeetingCalendar(url) {
2672 var _useMeetings2 = useMeetings(),
2673 meetings = _useMeetings2.meetings,
2674 meetingUsers = _useMeetings2.meetingUsers,
2675 currentUser = _useMeetings2.currentUser;
2676
2677 var meeting = meetings.find(function (meet) {
2678 return meet.link === url;
2679 });
2680 var mappedMeetingUsersId = meetingUsers.reduce(function (p, c) {
2681 return _objectSpread(_objectSpread({}, p), {}, _defineProperty({}, c.id, c));
2682 }, {});
2683
2684 if (!meeting) {
2685 return null;
2686 } else {
2687 var meetingsUserIds = meeting.meetingsUserIds;
2688
2689 if (currentUser && meetingsUserIds.includes(currentUser.id) && !hasCalendarObject(currentUser)) {
2690 return _constants__WEBPACK_IMPORTED_MODULE_2__.CURRENT_USER_CALENDAR_MISSING;
2691 } else if (meetingsUserIds.map(function (id) {
2692 return mappedMeetingUsersId[id];
2693 }).some(function (user) {
2694 return !hasCalendarObject(user);
2695 })) {
2696 return _constants__WEBPACK_IMPORTED_MODULE_2__.OTHER_USER_CALENDAR_MISSING;
2697 } else {
2698 return null;
2699 }
2700 }
2701 }
2702
2703 /***/ }),
2704
2705 /***/ "./scripts/shared/Meeting/hooks/useMeetingsFetch.ts":
2706 /*!**********************************************************!*\
2707 !*** ./scripts/shared/Meeting/hooks/useMeetingsFetch.ts ***!
2708 \**********************************************************/
2709 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2710
2711 "use strict";
2712 __webpack_require__.r(__webpack_exports__);
2713 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2714 /* harmony export */ "default": () => (/* binding */ useMeetingsFetch)
2715 /* harmony export */ });
2716 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2717 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2718 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2719 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2720 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2721 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2722
2723 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."); }
2724
2725 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2726
2727 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2728
2729 function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
2730
2731 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2732
2733
2734
2735
2736
2737 var meetings = [];
2738 var meetingUsers = [];
2739 function useMeetingsFetch() {
2740 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
2741
2742 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded),
2743 _useState2 = _slicedToArray(_useState, 2),
2744 loadState = _useState2[0],
2745 setLoadState = _useState2[1];
2746
2747 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2748 _useState4 = _slicedToArray(_useState3, 2),
2749 error = _useState4[0],
2750 setError = _useState4[1];
2751
2752 var reload = function reload() {
2753 meetings = [];
2754 setError(null);
2755 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2756 };
2757
2758 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2759 if (loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded && meetings.length === 0) {
2760 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
2761 proxy({
2762 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.FetchMeetingsAndUsers
2763 }).then(function (data) {
2764 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loaded);
2765 meetings = data && data.meetingLinks;
2766 meetingUsers = data && data.meetingUsers;
2767 })["catch"](function (e) {
2768 setError(e);
2769 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
2770 });
2771 }
2772 }, [loadState]);
2773 return {
2774 meetings: meetings,
2775 meetingUsers: meetingUsers,
2776 loadMeetingsState: loadState,
2777 error: error,
2778 reload: reload
2779 };
2780 }
2781
2782 /***/ }),
2783
2784 /***/ "./scripts/shared/Meeting/hooks/useMeetingsScript.ts":
2785 /*!***********************************************************!*\
2786 !*** ./scripts/shared/Meeting/hooks/useMeetingsScript.ts ***!
2787 \***********************************************************/
2788 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2789
2790 "use strict";
2791 __webpack_require__.r(__webpack_exports__);
2792 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2793 /* harmony export */ "default": () => (/* binding */ useMeetingsScript)
2794 /* harmony export */ });
2795 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
2796 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
2797 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2798 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2799 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2800 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../lib/Raven */ "./scripts/lib/Raven.ts");
2801 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2802
2803 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."); }
2804
2805 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2806
2807 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2808
2809 function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
2810
2811 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2812
2813
2814
2815
2816
2817 var promise;
2818
2819 function loadMeetingsScript() {
2820 if (!promise) {
2821 promise = new Promise(function (resolve, reject) {
2822 return jquery__WEBPACK_IMPORTED_MODULE_0___default().getScript(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.meetingsScript).done(resolve).fail(reject);
2823 });
2824 }
2825
2826 return promise;
2827 }
2828
2829 function useMeetingsScript() {
2830 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
2831 _useState2 = _slicedToArray(_useState, 2),
2832 ready = _useState2[0],
2833 setReady = _useState2[1];
2834
2835 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2836 loadMeetingsScript().then(function () {
2837 return setReady(true);
2838 })["catch"](function (error) {
2839 return _lib_Raven__WEBPACK_IMPORTED_MODULE_3__["default"].captureException(error);
2840 });
2841 }, []);
2842 return ready;
2843 }
2844
2845 /***/ }),
2846
2847 /***/ "./scripts/shared/UIComponents/UIAlert.tsx":
2848 /*!*************************************************!*\
2849 !*** ./scripts/shared/UIComponents/UIAlert.tsx ***!
2850 \*************************************************/
2851 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2852
2853 "use strict";
2854 __webpack_require__.r(__webpack_exports__);
2855 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2856 /* harmony export */ "default": () => (/* binding */ UIAlert)
2857 /* harmony export */ });
2858 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2859 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2860
2861
2862 var AlertContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('div')({
2863 name: "AlertContainer",
2864 "class": "a1h8m4fo",
2865 propsAsIs: false
2866 });
2867 var Title = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('p')({
2868 name: "Title",
2869 "class": "tyndzxk",
2870 propsAsIs: false
2871 });
2872 var Message = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('p')({
2873 name: "Message",
2874 "class": "m1m9sbk4",
2875 propsAsIs: false
2876 });
2877 var MessageContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('div')({
2878 name: "MessageContainer",
2879 "class": "mg5o421",
2880 propsAsIs: false
2881 });
2882 function UIAlert(_ref) {
2883 var titleText = _ref.titleText,
2884 titleMessage = _ref.titleMessage,
2885 children = _ref.children;
2886 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(AlertContainer, {
2887 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(MessageContainer, {
2888 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Title, {
2889 children: titleText
2890 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Message, {
2891 children: titleMessage
2892 })]
2893 }), children]
2894 });
2895 }
2896
2897 __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");
2898
2899 /***/ }),
2900
2901 /***/ "./scripts/shared/UIComponents/UIButton.ts":
2902 /*!*************************************************!*\
2903 !*** ./scripts/shared/UIComponents/UIButton.ts ***!
2904 \*************************************************/
2905 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2906
2907 "use strict";
2908 __webpack_require__.r(__webpack_exports__);
2909 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2910 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2911 /* harmony export */ });
2912 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2913 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colors */ "./scripts/shared/UIComponents/colors.ts");
2914
2915
2916
2917 var _exp2 = /*#__PURE__*/function _exp2() {
2918 return function (props) {
2919 return props.use === 'tertiary' ? _colors__WEBPACK_IMPORTED_MODULE_0__.HEFFALUMP : _colors__WEBPACK_IMPORTED_MODULE_0__.LORAX;
2920 };
2921 };
2922
2923 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('button')({
2924 name: "UIButton0",
2925 "class": "ug152ch",
2926 propsAsIs: false,
2927 vars: {
2928 "ug152ch-0": [_exp2()]
2929 }
2930 }));
2931
2932 __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");
2933
2934 /***/ }),
2935
2936 /***/ "./scripts/shared/UIComponents/UIContainer.ts":
2937 /*!****************************************************!*\
2938 !*** ./scripts/shared/UIComponents/UIContainer.ts ***!
2939 \****************************************************/
2940 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2941
2942 "use strict";
2943 __webpack_require__.r(__webpack_exports__);
2944 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2945 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2946 /* harmony export */ });
2947 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2948
2949
2950 var _exp = /*#__PURE__*/function _exp() {
2951 return function (props) {
2952 return props.textAlign ? props.textAlign : 'inherit';
2953 };
2954 };
2955
2956 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
2957 name: "UIContainer0",
2958 "class": "ua13n1c",
2959 propsAsIs: false,
2960 vars: {
2961 "ua13n1c-0": [_exp()]
2962 }
2963 }));
2964
2965 __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");
2966
2967 /***/ }),
2968
2969 /***/ "./scripts/shared/UIComponents/UIOverlay.ts":
2970 /*!**************************************************!*\
2971 !*** ./scripts/shared/UIComponents/UIOverlay.ts ***!
2972 \**************************************************/
2973 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2974
2975 "use strict";
2976 __webpack_require__.r(__webpack_exports__);
2977 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2978 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2979 /* harmony export */ });
2980 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2981
2982 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
2983 name: "UIOverlay0",
2984 "class": "u1q7a48k",
2985 propsAsIs: false
2986 }));
2987
2988 __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");
2989
2990 /***/ }),
2991
2992 /***/ "./scripts/shared/UIComponents/UISpacer.ts":
2993 /*!*************************************************!*\
2994 !*** ./scripts/shared/UIComponents/UISpacer.ts ***!
2995 \*************************************************/
2996 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2997
2998 "use strict";
2999 __webpack_require__.r(__webpack_exports__);
3000 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3001 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3002 /* harmony export */ });
3003 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3004
3005 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
3006 name: "UISpacer0",
3007 "class": "u3qxofx",
3008 propsAsIs: false
3009 }));
3010
3011 __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");
3012
3013 /***/ }),
3014
3015 /***/ "./scripts/shared/UIComponents/UISpinner.tsx":
3016 /*!***************************************************!*\
3017 !*** ./scripts/shared/UIComponents/UISpinner.tsx ***!
3018 \***************************************************/
3019 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3020
3021 "use strict";
3022 __webpack_require__.r(__webpack_exports__);
3023 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3024 /* harmony export */ "default": () => (/* binding */ UISpinner)
3025 /* harmony export */ });
3026 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
3027 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3028 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./colors */ "./scripts/shared/UIComponents/colors.ts");
3029
3030
3031
3032 var SpinnerOuter = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('div')({
3033 name: "SpinnerOuter",
3034 "class": "sxa9zrc",
3035 propsAsIs: false
3036 });
3037 var SpinnerInner = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('div')({
3038 name: "SpinnerInner",
3039 "class": "s14430wa",
3040 propsAsIs: false
3041 });
3042
3043 var _exp = /*#__PURE__*/function _exp() {
3044 return function (props) {
3045 return props.color;
3046 };
3047 };
3048
3049 var Circle = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('circle')({
3050 name: "Circle",
3051 "class": "ct87ghk",
3052 propsAsIs: true,
3053 vars: {
3054 "ct87ghk-0": [_exp()]
3055 }
3056 });
3057
3058 var _exp2 = /*#__PURE__*/function _exp2() {
3059 return function (props) {
3060 return props.color;
3061 };
3062 };
3063
3064 var AnimatedCircle = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('circle')({
3065 name: "AnimatedCircle",
3066 "class": "avili0h",
3067 propsAsIs: true,
3068 vars: {
3069 "avili0h-0": [_exp2()]
3070 }
3071 });
3072 function UISpinner(_ref) {
3073 var _ref$size = _ref.size,
3074 size = _ref$size === void 0 ? 20 : _ref$size;
3075 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SpinnerOuter, {
3076 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SpinnerInner, {
3077 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
3078 height: size,
3079 width: size,
3080 viewBox: "0 0 50 50",
3081 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Circle, {
3082 color: _colors__WEBPACK_IMPORTED_MODULE_1__.CALYPSO_MEDIUM,
3083 cx: "25",
3084 cy: "25",
3085 r: "22.5"
3086 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(AnimatedCircle, {
3087 color: _colors__WEBPACK_IMPORTED_MODULE_1__.CALYPSO,
3088 cx: "25",
3089 cy: "25",
3090 r: "22.5"
3091 })]
3092 })
3093 })
3094 });
3095 }
3096
3097 __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");
3098
3099 /***/ }),
3100
3101 /***/ "./scripts/shared/UIComponents/colors.ts":
3102 /*!***********************************************!*\
3103 !*** ./scripts/shared/UIComponents/colors.ts ***!
3104 \***********************************************/
3105 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3106
3107 "use strict";
3108 __webpack_require__.r(__webpack_exports__);
3109 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3110 /* harmony export */ "CALYPSO": () => (/* binding */ CALYPSO),
3111 /* harmony export */ "CALYPSO_LIGHT": () => (/* binding */ CALYPSO_LIGHT),
3112 /* harmony export */ "CALYPSO_MEDIUM": () => (/* binding */ CALYPSO_MEDIUM),
3113 /* harmony export */ "HEFFALUMP": () => (/* binding */ HEFFALUMP),
3114 /* harmony export */ "LORAX": () => (/* binding */ LORAX),
3115 /* harmony export */ "MARIGOLD_LIGHT": () => (/* binding */ MARIGOLD_LIGHT),
3116 /* harmony export */ "MARIGOLD_MEDIUM": () => (/* binding */ MARIGOLD_MEDIUM),
3117 /* harmony export */ "OBSIDIAN": () => (/* binding */ OBSIDIAN),
3118 /* harmony export */ "OLAF": () => (/* binding */ OLAF)
3119 /* harmony export */ });
3120 var CALYPSO = '#00a4bd';
3121 var CALYPSO_MEDIUM = '#7fd1de';
3122 var CALYPSO_LIGHT = '#e5f5f8';
3123 var LORAX = '#ff7a59';
3124 var OLAF = '#ffffff';
3125 var HEFFALUMP = '#425b76';
3126 var MARIGOLD_LIGHT = '#fef8f0';
3127 var MARIGOLD_MEDIUM = '#fae0b5';
3128 var OBSIDIAN = '#33475b';
3129
3130 /***/ }),
3131
3132 /***/ "./scripts/shared/enums/connectionStatus.ts":
3133 /*!**************************************************!*\
3134 !*** ./scripts/shared/enums/connectionStatus.ts ***!
3135 \**************************************************/
3136 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3137
3138 "use strict";
3139 __webpack_require__.r(__webpack_exports__);
3140 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3141 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3142 /* harmony export */ });
3143 var ConnectionStatus = {
3144 Connected: 'Connected',
3145 NotConnected: 'NotConnected'
3146 };
3147 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ConnectionStatus);
3148
3149 /***/ }),
3150
3151 /***/ "./scripts/shared/enums/loadState.ts":
3152 /*!*******************************************!*\
3153 !*** ./scripts/shared/enums/loadState.ts ***!
3154 \*******************************************/
3155 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3156
3157 "use strict";
3158 __webpack_require__.r(__webpack_exports__);
3159 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3160 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3161 /* harmony export */ });
3162 var LoadState = {
3163 NotLoaded: 'NotLoaded',
3164 Loading: 'Loading',
3165 Loaded: 'Loaded',
3166 Idle: 'Idle',
3167 Failed: 'Failed'
3168 };
3169 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LoadState);
3170
3171 /***/ }),
3172
3173 /***/ "./scripts/utils/appUtils.ts":
3174 /*!***********************************!*\
3175 !*** ./scripts/utils/appUtils.ts ***!
3176 \***********************************/
3177 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3178
3179 "use strict";
3180 __webpack_require__.r(__webpack_exports__);
3181 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3182 /* harmony export */ "initApp": () => (/* binding */ initApp),
3183 /* harmony export */ "initAppOnReady": () => (/* binding */ initAppOnReady)
3184 /* harmony export */ });
3185 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
3186 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
3187 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lib/Raven */ "./scripts/lib/Raven.ts");
3188
3189
3190 function initApp(initFn) {
3191 (0,_lib_Raven__WEBPACK_IMPORTED_MODULE_1__.configureRaven)();
3192 _lib_Raven__WEBPACK_IMPORTED_MODULE_1__["default"].context(initFn);
3193 }
3194 function initAppOnReady(initFn) {
3195 function main() {
3196 jquery__WEBPACK_IMPORTED_MODULE_0___default()(initFn);
3197 }
3198
3199 initApp(main);
3200 }
3201
3202 /***/ }),
3203
3204 /***/ "./scripts/utils/backgroundAppUtils.ts":
3205 /*!*********************************************!*\
3206 !*** ./scripts/utils/backgroundAppUtils.ts ***!
3207 \*********************************************/
3208 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3209
3210 "use strict";
3211 __webpack_require__.r(__webpack_exports__);
3212 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3213 /* harmony export */ "getOrCreateBackgroundApp": () => (/* binding */ getOrCreateBackgroundApp),
3214 /* harmony export */ "initBackgroundApp": () => (/* binding */ initBackgroundApp)
3215 /* harmony export */ });
3216 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
3217 /* harmony import */ var _appUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./appUtils */ "./scripts/utils/appUtils.ts");
3218
3219
3220 function initBackgroundApp(initFn) {
3221 function main() {
3222 if (Array.isArray(initFn)) {
3223 initFn.forEach(function (callback) {
3224 return callback();
3225 });
3226 } else {
3227 initFn();
3228 }
3229 }
3230
3231 (0,_appUtils__WEBPACK_IMPORTED_MODULE_1__.initApp)(main);
3232 }
3233 var getOrCreateBackgroundApp = function getOrCreateBackgroundApp(refreshToken) {
3234 if (window.LeadinBackgroundApp) {
3235 return window.LeadinBackgroundApp;
3236 }
3237
3238 var _window = window,
3239 IntegratedAppEmbedder = _window.IntegratedAppEmbedder,
3240 IntegratedAppOptions = _window.IntegratedAppOptions;
3241 var options = new IntegratedAppOptions().setLocale(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.locale).setDeviceId(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.deviceId).setRefreshToken(refreshToken);
3242 var embedder = new IntegratedAppEmbedder('integrated-plugin-proxy', _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.portalId, _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.hubspotBaseUrl, function () {}).setOptions(options);
3243 embedder.attachTo(document.body, false);
3244 embedder.postStartAppMessage(); // lets the app know all all data has been passed to it
3245
3246 window.LeadinBackgroundApp = embedder;
3247 return window.LeadinBackgroundApp;
3248 };
3249
3250 /***/ }),
3251
3252 /***/ "./scripts/utils/withMetaData.ts":
3253 /*!***************************************!*\
3254 !*** ./scripts/utils/withMetaData.ts ***!
3255 \***************************************/
3256 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3257
3258 "use strict";
3259 __webpack_require__.r(__webpack_exports__);
3260 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3261 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
3262 /* harmony export */ "isFullSiteEditor": () => (/* binding */ isFullSiteEditor)
3263 /* harmony export */ });
3264 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
3265 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
3266 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3267
3268 // from answer here: https://github.com/WordPress/gutenberg/issues/44477#issuecomment-1263026599
3269
3270 var isFullSiteEditor = function isFullSiteEditor() {
3271 return _wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select && !!(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select)('core/edit-site');
3272 };
3273 var applyWithSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.withSelect)(function (select, props) {
3274 return {
3275 metaValue: select('core/editor').getEditedPostAttribute('meta')[props.metaKey]
3276 };
3277 });
3278 var applyWithDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.withDispatch)(function (dispatch, props) {
3279 return {
3280 setMetaValue: function setMetaValue(value) {
3281 dispatch('core/editor').editPost({
3282 meta: _defineProperty({}, props.metaKey, value)
3283 });
3284 }
3285 };
3286 });
3287
3288 function apply(el) {
3289 return applyWithSelect(applyWithDispatch(el));
3290 }
3291
3292 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (apply);
3293
3294 /***/ }),
3295
3296 /***/ "./node_modules/is-what/dist/index.esm.js":
3297 /*!************************************************!*\
3298 !*** ./node_modules/is-what/dist/index.esm.js ***!
3299 \************************************************/
3300 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3301
3302 "use strict";
3303 __webpack_require__.r(__webpack_exports__);
3304 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3305 /* harmony export */ "getType": () => (/* binding */ getType),
3306 /* harmony export */ "isAnyObject": () => (/* binding */ isAnyObject),
3307 /* harmony export */ "isArray": () => (/* binding */ isArray),
3308 /* harmony export */ "isBlob": () => (/* binding */ isBlob),
3309 /* harmony export */ "isBoolean": () => (/* binding */ isBoolean),
3310 /* harmony export */ "isDate": () => (/* binding */ isDate),
3311 /* harmony export */ "isEmptyArray": () => (/* binding */ isEmptyArray),
3312 /* harmony export */ "isEmptyObject": () => (/* binding */ isEmptyObject),
3313 /* harmony export */ "isEmptyString": () => (/* binding */ isEmptyString),
3314 /* harmony export */ "isError": () => (/* binding */ isError),
3315 /* harmony export */ "isFile": () => (/* binding */ isFile),
3316 /* harmony export */ "isFullArray": () => (/* binding */ isFullArray),
3317 /* harmony export */ "isFullObject": () => (/* binding */ isFullObject),
3318 /* harmony export */ "isFullString": () => (/* binding */ isFullString),
3319 /* harmony export */ "isFunction": () => (/* binding */ isFunction),
3320 /* harmony export */ "isMap": () => (/* binding */ isMap),
3321 /* harmony export */ "isNaNValue": () => (/* binding */ isNaNValue),
3322 /* harmony export */ "isNull": () => (/* binding */ isNull),
3323 /* harmony export */ "isNullOrUndefined": () => (/* binding */ isNullOrUndefined),
3324 /* harmony export */ "isNumber": () => (/* binding */ isNumber),
3325 /* harmony export */ "isObject": () => (/* binding */ isObject),
3326 /* harmony export */ "isObjectLike": () => (/* binding */ isObjectLike),
3327 /* harmony export */ "isOneOf": () => (/* binding */ isOneOf),
3328 /* harmony export */ "isPlainObject": () => (/* binding */ isPlainObject),
3329 /* harmony export */ "isPrimitive": () => (/* binding */ isPrimitive),
3330 /* harmony export */ "isPromise": () => (/* binding */ isPromise),
3331 /* harmony export */ "isRegExp": () => (/* binding */ isRegExp),
3332 /* harmony export */ "isSet": () => (/* binding */ isSet),
3333 /* harmony export */ "isString": () => (/* binding */ isString),
3334 /* harmony export */ "isSymbol": () => (/* binding */ isSymbol),
3335 /* harmony export */ "isType": () => (/* binding */ isType),
3336 /* harmony export */ "isUndefined": () => (/* binding */ isUndefined),
3337 /* harmony export */ "isWeakMap": () => (/* binding */ isWeakMap),
3338 /* harmony export */ "isWeakSet": () => (/* binding */ isWeakSet)
3339 /* harmony export */ });
3340 /**
3341 * Returns the object type of the given payload
3342 *
3343 * @param {*} payload
3344 * @returns {string}
3345 */
3346 function getType(payload) {
3347 return Object.prototype.toString.call(payload).slice(8, -1);
3348 }
3349 /**
3350 * Returns whether the payload is undefined
3351 *
3352 * @param {*} payload
3353 * @returns {payload is undefined}
3354 */
3355 function isUndefined(payload) {
3356 return getType(payload) === 'Undefined';
3357 }
3358 /**
3359 * Returns whether the payload is null
3360 *
3361 * @param {*} payload
3362 * @returns {payload is null}
3363 */
3364 function isNull(payload) {
3365 return getType(payload) === 'Null';
3366 }
3367 /**
3368 * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
3369 *
3370 * @param {*} payload
3371 * @returns {payload is PlainObject}
3372 */
3373 function isPlainObject(payload) {
3374 if (getType(payload) !== 'Object')
3375 return false;
3376 return payload.constructor === Object && Object.getPrototypeOf(payload) === Object.prototype;
3377 }
3378 /**
3379 * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
3380 *
3381 * @param {*} payload
3382 * @returns {payload is PlainObject}
3383 */
3384 function isObject(payload) {
3385 return isPlainObject(payload);
3386 }
3387 /**
3388 * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
3389 *
3390 * @param {*} payload
3391 * @returns {payload is { [K in any]: never }}
3392 */
3393 function isEmptyObject(payload) {
3394 return isPlainObject(payload) && Object.keys(payload).length === 0;
3395 }
3396 /**
3397 * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
3398 *
3399 * @param {*} payload
3400 * @returns {payload is PlainObject}
3401 */
3402 function isFullObject(payload) {
3403 return isPlainObject(payload) && Object.keys(payload).length > 0;
3404 }
3405 /**
3406 * Returns whether the payload is an any kind of object (including special classes or objects with different prototypes)
3407 *
3408 * @param {*} payload
3409 * @returns {payload is PlainObject}
3410 */
3411 function isAnyObject(payload) {
3412 return getType(payload) === 'Object';
3413 }
3414 /**
3415 * Returns whether the payload is an object like a type passed in < >
3416 *
3417 * Usage: isObjectLike<{id: any}>(payload) // will make sure it's an object and has an `id` prop.
3418 *
3419 * @template T this must be passed in < >
3420 * @param {*} payload
3421 * @returns {payload is T}
3422 */
3423 function isObjectLike(payload) {
3424 return isAnyObject(payload);
3425 }
3426 /**
3427 * Returns whether the payload is a function (regular or async)
3428 *
3429 * @param {*} payload
3430 * @returns {payload is AnyFunction}
3431 */
3432 function isFunction(payload) {
3433 return typeof payload === 'function';
3434 }
3435 /**
3436 * Returns whether the payload is an array
3437 *
3438 * @param {any} payload
3439 * @returns {payload is any[]}
3440 */
3441 function isArray(payload) {
3442 return getType(payload) === 'Array';
3443 }
3444 /**
3445 * Returns whether the payload is a an array with at least 1 item
3446 *
3447 * @param {*} payload
3448 * @returns {payload is any[]}
3449 */
3450 function isFullArray(payload) {
3451 return isArray(payload) && payload.length > 0;
3452 }
3453 /**
3454 * Returns whether the payload is a an empty array
3455 *
3456 * @param {*} payload
3457 * @returns {payload is []}
3458 */
3459 function isEmptyArray(payload) {
3460 return isArray(payload) && payload.length === 0;
3461 }
3462 /**
3463 * Returns whether the payload is a string
3464 *
3465 * @param {*} payload
3466 * @returns {payload is string}
3467 */
3468 function isString(payload) {
3469 return getType(payload) === 'String';
3470 }
3471 /**
3472 * Returns whether the payload is a string, BUT returns false for ''
3473 *
3474 * @param {*} payload
3475 * @returns {payload is string}
3476 */
3477 function isFullString(payload) {
3478 return isString(payload) && payload !== '';
3479 }
3480 /**
3481 * Returns whether the payload is ''
3482 *
3483 * @param {*} payload
3484 * @returns {payload is string}
3485 */
3486 function isEmptyString(payload) {
3487 return payload === '';
3488 }
3489 /**
3490 * Returns whether the payload is a number (but not NaN)
3491 *
3492 * This will return `false` for `NaN`!!
3493 *
3494 * @param {*} payload
3495 * @returns {payload is number}
3496 */
3497 function isNumber(payload) {
3498 return getType(payload) === 'Number' && !isNaN(payload);
3499 }
3500 /**
3501 * Returns whether the payload is a boolean
3502 *
3503 * @param {*} payload
3504 * @returns {payload is boolean}
3505 */
3506 function isBoolean(payload) {
3507 return getType(payload) === 'Boolean';
3508 }
3509 /**
3510 * Returns whether the payload is a regular expression (RegExp)
3511 *
3512 * @param {*} payload
3513 * @returns {payload is RegExp}
3514 */
3515 function isRegExp(payload) {
3516 return getType(payload) === 'RegExp';
3517 }
3518 /**
3519 * Returns whether the payload is a Map
3520 *
3521 * @param {*} payload
3522 * @returns {payload is Map<any, any>}
3523 */
3524 function isMap(payload) {
3525 return getType(payload) === 'Map';
3526 }
3527 /**
3528 * Returns whether the payload is a WeakMap
3529 *
3530 * @param {*} payload
3531 * @returns {payload is WeakMap<any, any>}
3532 */
3533 function isWeakMap(payload) {
3534 return getType(payload) === 'WeakMap';
3535 }
3536 /**
3537 * Returns whether the payload is a Set
3538 *
3539 * @param {*} payload
3540 * @returns {payload is Set<any>}
3541 */
3542 function isSet(payload) {
3543 return getType(payload) === 'Set';
3544 }
3545 /**
3546 * Returns whether the payload is a WeakSet
3547 *
3548 * @param {*} payload
3549 * @returns {payload is WeakSet<any>}
3550 */
3551 function isWeakSet(payload) {
3552 return getType(payload) === 'WeakSet';
3553 }
3554 /**
3555 * Returns whether the payload is a Symbol
3556 *
3557 * @param {*} payload
3558 * @returns {payload is symbol}
3559 */
3560 function isSymbol(payload) {
3561 return getType(payload) === 'Symbol';
3562 }
3563 /**
3564 * Returns whether the payload is a Date, and that the date is valid
3565 *
3566 * @param {*} payload
3567 * @returns {payload is Date}
3568 */
3569 function isDate(payload) {
3570 return getType(payload) === 'Date' && !isNaN(payload);
3571 }
3572 /**
3573 * Returns whether the payload is a Blob
3574 *
3575 * @param {*} payload
3576 * @returns {payload is Blob}
3577 */
3578 function isBlob(payload) {
3579 return getType(payload) === 'Blob';
3580 }
3581 /**
3582 * Returns whether the payload is a File
3583 *
3584 * @param {*} payload
3585 * @returns {payload is File}
3586 */
3587 function isFile(payload) {
3588 return getType(payload) === 'File';
3589 }
3590 /**
3591 * Returns whether the payload is a Promise
3592 *
3593 * @param {*} payload
3594 * @returns {payload is Promise<any>}
3595 */
3596 function isPromise(payload) {
3597 return getType(payload) === 'Promise';
3598 }
3599 /**
3600 * Returns whether the payload is an Error
3601 *
3602 * @param {*} payload
3603 * @returns {payload is Error}
3604 */
3605 function isError(payload) {
3606 return getType(payload) === 'Error';
3607 }
3608 /**
3609 * Returns whether the payload is literally the value `NaN` (it's `NaN` and also a `number`)
3610 *
3611 * @param {*} payload
3612 * @returns {payload is typeof NaN}
3613 */
3614 function isNaNValue(payload) {
3615 return getType(payload) === 'Number' && isNaN(payload);
3616 }
3617 /**
3618 * Returns whether the payload is a primitive type (eg. Boolean | Null | Undefined | Number | String | Symbol)
3619 *
3620 * @param {*} payload
3621 * @returns {(payload is boolean | null | undefined | number | string | symbol)}
3622 */
3623 function isPrimitive(payload) {
3624 return (isBoolean(payload) ||
3625 isNull(payload) ||
3626 isUndefined(payload) ||
3627 isNumber(payload) ||
3628 isString(payload) ||
3629 isSymbol(payload));
3630 }
3631 /**
3632 * Returns true whether the payload is null or undefined
3633 *
3634 * @param {*} payload
3635 * @returns {(payload is null | undefined)}
3636 */
3637 var isNullOrUndefined = isOneOf(isNull, isUndefined);
3638 function isOneOf(a, b, c, d, e) {
3639 return function (value) {
3640 return a(value) || b(value) || (!!c && c(value)) || (!!d && d(value)) || (!!e && e(value));
3641 };
3642 }
3643 /**
3644 * Does a generic check to check that the given payload is of a given type.
3645 * In cases like Number, it will return true for NaN as NaN is a Number (thanks javascript!);
3646 * It will, however, differentiate between object and null
3647 *
3648 * @template T
3649 * @param {*} payload
3650 * @param {T} type
3651 * @throws {TypeError} Will throw type error if type is an invalid type
3652 * @returns {payload is T}
3653 */
3654 function isType(payload, type) {
3655 if (!(type instanceof Function)) {
3656 throw new TypeError('Type must be a function');
3657 }
3658 if (!Object.prototype.hasOwnProperty.call(type, 'prototype')) {
3659 throw new TypeError('Type is not a class');
3660 }
3661 // Classes usually have names (as functions usually have names)
3662 var name = type.name;
3663 return getType(payload) === name || Boolean(payload && payload.constructor === type);
3664 }
3665
3666
3667
3668
3669 /***/ }),
3670
3671 /***/ "./node_modules/lodash/_Symbol.js":
3672 /*!****************************************!*\
3673 !*** ./node_modules/lodash/_Symbol.js ***!
3674 \****************************************/
3675 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3676
3677 var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
3678
3679 /** Built-in value references. */
3680 var Symbol = root.Symbol;
3681
3682 module.exports = Symbol;
3683
3684
3685 /***/ }),
3686
3687 /***/ "./node_modules/lodash/_baseGetTag.js":
3688 /*!********************************************!*\
3689 !*** ./node_modules/lodash/_baseGetTag.js ***!
3690 \********************************************/
3691 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3692
3693 var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"),
3694 getRawTag = __webpack_require__(/*! ./_getRawTag */ "./node_modules/lodash/_getRawTag.js"),
3695 objectToString = __webpack_require__(/*! ./_objectToString */ "./node_modules/lodash/_objectToString.js");
3696
3697 /** `Object#toString` result references. */
3698 var nullTag = '[object Null]',
3699 undefinedTag = '[object Undefined]';
3700
3701 /** Built-in value references. */
3702 var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
3703
3704 /**
3705 * The base implementation of `getTag` without fallbacks for buggy environments.
3706 *
3707 * @private
3708 * @param {*} value The value to query.
3709 * @returns {string} Returns the `toStringTag`.
3710 */
3711 function baseGetTag(value) {
3712 if (value == null) {
3713 return value === undefined ? undefinedTag : nullTag;
3714 }
3715 return (symToStringTag && symToStringTag in Object(value))
3716 ? getRawTag(value)
3717 : objectToString(value);
3718 }
3719
3720 module.exports = baseGetTag;
3721
3722
3723 /***/ }),
3724
3725 /***/ "./node_modules/lodash/_baseTrim.js":
3726 /*!******************************************!*\
3727 !*** ./node_modules/lodash/_baseTrim.js ***!
3728 \******************************************/
3729 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3730
3731 var trimmedEndIndex = __webpack_require__(/*! ./_trimmedEndIndex */ "./node_modules/lodash/_trimmedEndIndex.js");
3732
3733 /** Used to match leading whitespace. */
3734 var reTrimStart = /^\s+/;
3735
3736 /**
3737 * The base implementation of `_.trim`.
3738 *
3739 * @private
3740 * @param {string} string The string to trim.
3741 * @returns {string} Returns the trimmed string.
3742 */
3743 function baseTrim(string) {
3744 return string
3745 ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
3746 : string;
3747 }
3748
3749 module.exports = baseTrim;
3750
3751
3752 /***/ }),
3753
3754 /***/ "./node_modules/lodash/_freeGlobal.js":
3755 /*!********************************************!*\
3756 !*** ./node_modules/lodash/_freeGlobal.js ***!
3757 \********************************************/
3758 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3759
3760 /** Detect free variable `global` from Node.js. */
3761 var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
3762
3763 module.exports = freeGlobal;
3764
3765
3766 /***/ }),
3767
3768 /***/ "./node_modules/lodash/_getRawTag.js":
3769 /*!*******************************************!*\
3770 !*** ./node_modules/lodash/_getRawTag.js ***!
3771 \*******************************************/
3772 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3773
3774 var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js");
3775
3776 /** Used for built-in method references. */
3777 var objectProto = Object.prototype;
3778
3779 /** Used to check objects for own properties. */
3780 var hasOwnProperty = objectProto.hasOwnProperty;
3781
3782 /**
3783 * Used to resolve the
3784 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3785 * of values.
3786 */
3787 var nativeObjectToString = objectProto.toString;
3788
3789 /** Built-in value references. */
3790 var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
3791
3792 /**
3793 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
3794 *
3795 * @private
3796 * @param {*} value The value to query.
3797 * @returns {string} Returns the raw `toStringTag`.
3798 */
3799 function getRawTag(value) {
3800 var isOwn = hasOwnProperty.call(value, symToStringTag),
3801 tag = value[symToStringTag];
3802
3803 try {
3804 value[symToStringTag] = undefined;
3805 var unmasked = true;
3806 } catch (e) {}
3807
3808 var result = nativeObjectToString.call(value);
3809 if (unmasked) {
3810 if (isOwn) {
3811 value[symToStringTag] = tag;
3812 } else {
3813 delete value[symToStringTag];
3814 }
3815 }
3816 return result;
3817 }
3818
3819 module.exports = getRawTag;
3820
3821
3822 /***/ }),
3823
3824 /***/ "./node_modules/lodash/_objectToString.js":
3825 /*!************************************************!*\
3826 !*** ./node_modules/lodash/_objectToString.js ***!
3827 \************************************************/
3828 /***/ ((module) => {
3829
3830 /** Used for built-in method references. */
3831 var objectProto = Object.prototype;
3832
3833 /**
3834 * Used to resolve the
3835 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3836 * of values.
3837 */
3838 var nativeObjectToString = objectProto.toString;
3839
3840 /**
3841 * Converts `value` to a string using `Object.prototype.toString`.
3842 *
3843 * @private
3844 * @param {*} value The value to convert.
3845 * @returns {string} Returns the converted string.
3846 */
3847 function objectToString(value) {
3848 return nativeObjectToString.call(value);
3849 }
3850
3851 module.exports = objectToString;
3852
3853
3854 /***/ }),
3855
3856 /***/ "./node_modules/lodash/_root.js":
3857 /*!**************************************!*\
3858 !*** ./node_modules/lodash/_root.js ***!
3859 \**************************************/
3860 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3861
3862 var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js");
3863
3864 /** Detect free variable `self`. */
3865 var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
3866
3867 /** Used as a reference to the global object. */
3868 var root = freeGlobal || freeSelf || Function('return this')();
3869
3870 module.exports = root;
3871
3872
3873 /***/ }),
3874
3875 /***/ "./node_modules/lodash/_trimmedEndIndex.js":
3876 /*!*************************************************!*\
3877 !*** ./node_modules/lodash/_trimmedEndIndex.js ***!
3878 \*************************************************/
3879 /***/ ((module) => {
3880
3881 /** Used to match a single whitespace character. */
3882 var reWhitespace = /\s/;
3883
3884 /**
3885 * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
3886 * character of `string`.
3887 *
3888 * @private
3889 * @param {string} string The string to inspect.
3890 * @returns {number} Returns the index of the last non-whitespace character.
3891 */
3892 function trimmedEndIndex(string) {
3893 var index = string.length;
3894
3895 while (index-- && reWhitespace.test(string.charAt(index))) {}
3896 return index;
3897 }
3898
3899 module.exports = trimmedEndIndex;
3900
3901
3902 /***/ }),
3903
3904 /***/ "./node_modules/lodash/debounce.js":
3905 /*!*****************************************!*\
3906 !*** ./node_modules/lodash/debounce.js ***!
3907 \*****************************************/
3908 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3909
3910 var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
3911 now = __webpack_require__(/*! ./now */ "./node_modules/lodash/now.js"),
3912 toNumber = __webpack_require__(/*! ./toNumber */ "./node_modules/lodash/toNumber.js");
3913
3914 /** Error message constants. */
3915 var FUNC_ERROR_TEXT = 'Expected a function';
3916
3917 /* Built-in method references for those with the same name as other `lodash` methods. */
3918 var nativeMax = Math.max,
3919 nativeMin = Math.min;
3920
3921 /**
3922 * Creates a debounced function that delays invoking `func` until after `wait`
3923 * milliseconds have elapsed since the last time the debounced function was
3924 * invoked. The debounced function comes with a `cancel` method to cancel
3925 * delayed `func` invocations and a `flush` method to immediately invoke them.
3926 * Provide `options` to indicate whether `func` should be invoked on the
3927 * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
3928 * with the last arguments provided to the debounced function. Subsequent
3929 * calls to the debounced function return the result of the last `func`
3930 * invocation.
3931 *
3932 * **Note:** If `leading` and `trailing` options are `true`, `func` is
3933 * invoked on the trailing edge of the timeout only if the debounced function
3934 * is invoked more than once during the `wait` timeout.
3935 *
3936 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
3937 * until to the next tick, similar to `setTimeout` with a timeout of `0`.
3938 *
3939 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
3940 * for details over the differences between `_.debounce` and `_.throttle`.
3941 *
3942 * @static
3943 * @memberOf _
3944 * @since 0.1.0
3945 * @category Function
3946 * @param {Function} func The function to debounce.
3947 * @param {number} [wait=0] The number of milliseconds to delay.
3948 * @param {Object} [options={}] The options object.
3949 * @param {boolean} [options.leading=false]
3950 * Specify invoking on the leading edge of the timeout.
3951 * @param {number} [options.maxWait]
3952 * The maximum time `func` is allowed to be delayed before it's invoked.
3953 * @param {boolean} [options.trailing=true]
3954 * Specify invoking on the trailing edge of the timeout.
3955 * @returns {Function} Returns the new debounced function.
3956 * @example
3957 *
3958 * // Avoid costly calculations while the window size is in flux.
3959 * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
3960 *
3961 * // Invoke `sendMail` when clicked, debouncing subsequent calls.
3962 * jQuery(element).on('click', _.debounce(sendMail, 300, {
3963 * 'leading': true,
3964 * 'trailing': false
3965 * }));
3966 *
3967 * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
3968 * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
3969 * var source = new EventSource('/stream');
3970 * jQuery(source).on('message', debounced);
3971 *
3972 * // Cancel the trailing debounced invocation.
3973 * jQuery(window).on('popstate', debounced.cancel);
3974 */
3975 function debounce(func, wait, options) {
3976 var lastArgs,
3977 lastThis,
3978 maxWait,
3979 result,
3980 timerId,
3981 lastCallTime,
3982 lastInvokeTime = 0,
3983 leading = false,
3984 maxing = false,
3985 trailing = true;
3986
3987 if (typeof func != 'function') {
3988 throw new TypeError(FUNC_ERROR_TEXT);
3989 }
3990 wait = toNumber(wait) || 0;
3991 if (isObject(options)) {
3992 leading = !!options.leading;
3993 maxing = 'maxWait' in options;
3994 maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
3995 trailing = 'trailing' in options ? !!options.trailing : trailing;
3996 }
3997
3998 function invokeFunc(time) {
3999 var args = lastArgs,
4000 thisArg = lastThis;
4001
4002 lastArgs = lastThis = undefined;
4003 lastInvokeTime = time;
4004 result = func.apply(thisArg, args);
4005 return result;
4006 }
4007
4008 function leadingEdge(time) {
4009 // Reset any `maxWait` timer.
4010 lastInvokeTime = time;
4011 // Start the timer for the trailing edge.
4012 timerId = setTimeout(timerExpired, wait);
4013 // Invoke the leading edge.
4014 return leading ? invokeFunc(time) : result;
4015 }
4016
4017 function remainingWait(time) {
4018 var timeSinceLastCall = time - lastCallTime,
4019 timeSinceLastInvoke = time - lastInvokeTime,
4020 timeWaiting = wait - timeSinceLastCall;
4021
4022 return maxing
4023 ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
4024 : timeWaiting;
4025 }
4026
4027 function shouldInvoke(time) {
4028 var timeSinceLastCall = time - lastCallTime,
4029 timeSinceLastInvoke = time - lastInvokeTime;
4030
4031 // Either this is the first call, activity has stopped and we're at the
4032 // trailing edge, the system time has gone backwards and we're treating
4033 // it as the trailing edge, or we've hit the `maxWait` limit.
4034 return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
4035 (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
4036 }
4037
4038 function timerExpired() {
4039 var time = now();
4040 if (shouldInvoke(time)) {
4041 return trailingEdge(time);
4042 }
4043 // Restart the timer.
4044 timerId = setTimeout(timerExpired, remainingWait(time));
4045 }
4046
4047 function trailingEdge(time) {
4048 timerId = undefined;
4049
4050 // Only invoke if we have `lastArgs` which means `func` has been
4051 // debounced at least once.
4052 if (trailing && lastArgs) {
4053 return invokeFunc(time);
4054 }
4055 lastArgs = lastThis = undefined;
4056 return result;
4057 }
4058
4059 function cancel() {
4060 if (timerId !== undefined) {
4061 clearTimeout(timerId);
4062 }
4063 lastInvokeTime = 0;
4064 lastArgs = lastCallTime = lastThis = timerId = undefined;
4065 }
4066
4067 function flush() {
4068 return timerId === undefined ? result : trailingEdge(now());
4069 }
4070
4071 function debounced() {
4072 var time = now(),
4073 isInvoking = shouldInvoke(time);
4074
4075 lastArgs = arguments;
4076 lastThis = this;
4077 lastCallTime = time;
4078
4079 if (isInvoking) {
4080 if (timerId === undefined) {
4081 return leadingEdge(lastCallTime);
4082 }
4083 if (maxing) {
4084 // Handle invocations in a tight loop.
4085 clearTimeout(timerId);
4086 timerId = setTimeout(timerExpired, wait);
4087 return invokeFunc(lastCallTime);
4088 }
4089 }
4090 if (timerId === undefined) {
4091 timerId = setTimeout(timerExpired, wait);
4092 }
4093 return result;
4094 }
4095 debounced.cancel = cancel;
4096 debounced.flush = flush;
4097 return debounced;
4098 }
4099
4100 module.exports = debounce;
4101
4102
4103 /***/ }),
4104
4105 /***/ "./node_modules/lodash/isObject.js":
4106 /*!*****************************************!*\
4107 !*** ./node_modules/lodash/isObject.js ***!
4108 \*****************************************/
4109 /***/ ((module) => {
4110
4111 /**
4112 * Checks if `value` is the
4113 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
4114 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
4115 *
4116 * @static
4117 * @memberOf _
4118 * @since 0.1.0
4119 * @category Lang
4120 * @param {*} value The value to check.
4121 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
4122 * @example
4123 *
4124 * _.isObject({});
4125 * // => true
4126 *
4127 * _.isObject([1, 2, 3]);
4128 * // => true
4129 *
4130 * _.isObject(_.noop);
4131 * // => true
4132 *
4133 * _.isObject(null);
4134 * // => false
4135 */
4136 function isObject(value) {
4137 var type = typeof value;
4138 return value != null && (type == 'object' || type == 'function');
4139 }
4140
4141 module.exports = isObject;
4142
4143
4144 /***/ }),
4145
4146 /***/ "./node_modules/lodash/isObjectLike.js":
4147 /*!*********************************************!*\
4148 !*** ./node_modules/lodash/isObjectLike.js ***!
4149 \*********************************************/
4150 /***/ ((module) => {
4151
4152 /**
4153 * Checks if `value` is object-like. A value is object-like if it's not `null`
4154 * and has a `typeof` result of "object".
4155 *
4156 * @static
4157 * @memberOf _
4158 * @since 4.0.0
4159 * @category Lang
4160 * @param {*} value The value to check.
4161 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
4162 * @example
4163 *
4164 * _.isObjectLike({});
4165 * // => true
4166 *
4167 * _.isObjectLike([1, 2, 3]);
4168 * // => true
4169 *
4170 * _.isObjectLike(_.noop);
4171 * // => false
4172 *
4173 * _.isObjectLike(null);
4174 * // => false
4175 */
4176 function isObjectLike(value) {
4177 return value != null && typeof value == 'object';
4178 }
4179
4180 module.exports = isObjectLike;
4181
4182
4183 /***/ }),
4184
4185 /***/ "./node_modules/lodash/isSymbol.js":
4186 /*!*****************************************!*\
4187 !*** ./node_modules/lodash/isSymbol.js ***!
4188 \*****************************************/
4189 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4190
4191 var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
4192 isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
4193
4194 /** `Object#toString` result references. */
4195 var symbolTag = '[object Symbol]';
4196
4197 /**
4198 * Checks if `value` is classified as a `Symbol` primitive or object.
4199 *
4200 * @static
4201 * @memberOf _
4202 * @since 4.0.0
4203 * @category Lang
4204 * @param {*} value The value to check.
4205 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
4206 * @example
4207 *
4208 * _.isSymbol(Symbol.iterator);
4209 * // => true
4210 *
4211 * _.isSymbol('abc');
4212 * // => false
4213 */
4214 function isSymbol(value) {
4215 return typeof value == 'symbol' ||
4216 (isObjectLike(value) && baseGetTag(value) == symbolTag);
4217 }
4218
4219 module.exports = isSymbol;
4220
4221
4222 /***/ }),
4223
4224 /***/ "./node_modules/lodash/now.js":
4225 /*!************************************!*\
4226 !*** ./node_modules/lodash/now.js ***!
4227 \************************************/
4228 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4229
4230 var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
4231
4232 /**
4233 * Gets the timestamp of the number of milliseconds that have elapsed since
4234 * the Unix epoch (1 January 1970 00:00:00 UTC).
4235 *
4236 * @static
4237 * @memberOf _
4238 * @since 2.4.0
4239 * @category Date
4240 * @returns {number} Returns the timestamp.
4241 * @example
4242 *
4243 * _.defer(function(stamp) {
4244 * console.log(_.now() - stamp);
4245 * }, _.now());
4246 * // => Logs the number of milliseconds it took for the deferred invocation.
4247 */
4248 var now = function() {
4249 return root.Date.now();
4250 };
4251
4252 module.exports = now;
4253
4254
4255 /***/ }),
4256
4257 /***/ "./node_modules/lodash/toNumber.js":
4258 /*!*****************************************!*\
4259 !*** ./node_modules/lodash/toNumber.js ***!
4260 \*****************************************/
4261 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4262
4263 var baseTrim = __webpack_require__(/*! ./_baseTrim */ "./node_modules/lodash/_baseTrim.js"),
4264 isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
4265 isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js");
4266
4267 /** Used as references for various `Number` constants. */
4268 var NAN = 0 / 0;
4269
4270 /** Used to detect bad signed hexadecimal string values. */
4271 var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
4272
4273 /** Used to detect binary string values. */
4274 var reIsBinary = /^0b[01]+$/i;
4275
4276 /** Used to detect octal string values. */
4277 var reIsOctal = /^0o[0-7]+$/i;
4278
4279 /** Built-in method references without a dependency on `root`. */
4280 var freeParseInt = parseInt;
4281
4282 /**
4283 * Converts `value` to a number.
4284 *
4285 * @static
4286 * @memberOf _
4287 * @since 4.0.0
4288 * @category Lang
4289 * @param {*} value The value to process.
4290 * @returns {number} Returns the number.
4291 * @example
4292 *
4293 * _.toNumber(3.2);
4294 * // => 3.2
4295 *
4296 * _.toNumber(Number.MIN_VALUE);
4297 * // => 5e-324
4298 *
4299 * _.toNumber(Infinity);
4300 * // => Infinity
4301 *
4302 * _.toNumber('3.2');
4303 * // => 3.2
4304 */
4305 function toNumber(value) {
4306 if (typeof value == 'number') {
4307 return value;
4308 }
4309 if (isSymbol(value)) {
4310 return NAN;
4311 }
4312 if (isObject(value)) {
4313 var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
4314 value = isObject(other) ? (other + '') : other;
4315 }
4316 if (typeof value != 'string') {
4317 return value === 0 ? value : +value;
4318 }
4319 value = baseTrim(value);
4320 var isBinary = reIsBinary.test(value);
4321 return (isBinary || reIsOctal.test(value))
4322 ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
4323 : (reIsBadHex.test(value) ? NAN : +value);
4324 }
4325
4326 module.exports = toNumber;
4327
4328
4329 /***/ }),
4330
4331 /***/ "./node_modules/memoize-one/dist/memoize-one.esm.js":
4332 /*!**********************************************************!*\
4333 !*** ./node_modules/memoize-one/dist/memoize-one.esm.js ***!
4334 \**********************************************************/
4335 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4336
4337 "use strict";
4338 __webpack_require__.r(__webpack_exports__);
4339 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4340 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
4341 /* harmony export */ });
4342 var safeIsNaN = Number.isNaN ||
4343 function ponyfill(value) {
4344 return typeof value === 'number' && value !== value;
4345 };
4346 function isEqual(first, second) {
4347 if (first === second) {
4348 return true;
4349 }
4350 if (safeIsNaN(first) && safeIsNaN(second)) {
4351 return true;
4352 }
4353 return false;
4354 }
4355 function areInputsEqual(newInputs, lastInputs) {
4356 if (newInputs.length !== lastInputs.length) {
4357 return false;
4358 }
4359 for (var i = 0; i < newInputs.length; i++) {
4360 if (!isEqual(newInputs[i], lastInputs[i])) {
4361 return false;
4362 }
4363 }
4364 return true;
4365 }
4366
4367 function memoizeOne(resultFn, isEqual) {
4368 if (isEqual === void 0) { isEqual = areInputsEqual; }
4369 var lastThis;
4370 var lastArgs = [];
4371 var lastResult;
4372 var calledOnce = false;
4373 function memoized() {
4374 var newArgs = [];
4375 for (var _i = 0; _i < arguments.length; _i++) {
4376 newArgs[_i] = arguments[_i];
4377 }
4378 if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {
4379 return lastResult;
4380 }
4381 lastResult = resultFn.apply(this, newArgs);
4382 calledOnce = true;
4383 lastThis = this;
4384 lastArgs = newArgs;
4385 return lastResult;
4386 }
4387 return memoized;
4388 }
4389
4390 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoizeOne);
4391
4392
4393 /***/ }),
4394
4395 /***/ "./node_modules/merge-anything/dist/index.esm.js":
4396 /*!*******************************************************!*\
4397 !*** ./node_modules/merge-anything/dist/index.esm.js ***!
4398 \*******************************************************/
4399 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4400
4401 "use strict";
4402 __webpack_require__.r(__webpack_exports__);
4403 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4404 /* harmony export */ "concatArrays": () => (/* binding */ concatArrays),
4405 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
4406 /* harmony export */ "merge": () => (/* binding */ merge)
4407 /* harmony export */ });
4408 /* harmony import */ var is_what__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-what */ "./node_modules/is-what/dist/index.esm.js");
4409
4410
4411 /*! *****************************************************************************
4412 Copyright (c) Microsoft Corporation. All rights reserved.
4413 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4414 this file except in compliance with the License. You may obtain a copy of the
4415 License at http://www.apache.org/licenses/LICENSE-2.0
4416
4417 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
4418 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
4419 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
4420 MERCHANTABLITY OR NON-INFRINGEMENT.
4421
4422 See the Apache Version 2.0 License for specific language governing permissions
4423 and limitations under the License.
4424 ***************************************************************************** */
4425
4426 function __spreadArrays() {
4427 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
4428 for (var r = Array(s), k = 0, i = 0; i < il; i++)
4429 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
4430 r[k] = a[j];
4431 return r;
4432 }
4433
4434 function assignProp(carry, key, newVal, originalObject) {
4435 var propType = originalObject.propertyIsEnumerable(key)
4436 ? 'enumerable'
4437 : 'nonenumerable';
4438 if (propType === 'enumerable')
4439 carry[key] = newVal;
4440 if (propType === 'nonenumerable') {
4441 Object.defineProperty(carry, key, {
4442 value: newVal,
4443 enumerable: false,
4444 writable: true,
4445 configurable: true
4446 });
4447 }
4448 }
4449 function mergeRecursively(origin, newComer, extensions) {
4450 // work directly on newComer if its not an object
4451 if (!(0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(newComer)) {
4452 // extend merge rules
4453 if (extensions && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(extensions)) {
4454 extensions.forEach(function (extend) {
4455 newComer = extend(origin, newComer);
4456 });
4457 }
4458 return newComer;
4459 }
4460 // define newObject to merge all values upon
4461 var newObject = {};
4462 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin)) {
4463 var props_1 = Object.getOwnPropertyNames(origin);
4464 var symbols_1 = Object.getOwnPropertySymbols(origin);
4465 newObject = __spreadArrays(props_1, symbols_1).reduce(function (carry, key) {
4466 // @ts-ignore
4467 var targetVal = origin[key];
4468 if ((!(0,is_what__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) && !Object.getOwnPropertyNames(newComer).includes(key)) ||
4469 ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) && !Object.getOwnPropertySymbols(newComer).includes(key))) {
4470 assignProp(carry, key, targetVal, origin);
4471 }
4472 return carry;
4473 }, {});
4474 }
4475 var props = Object.getOwnPropertyNames(newComer);
4476 var symbols = Object.getOwnPropertySymbols(newComer);
4477 var result = __spreadArrays(props, symbols).reduce(function (carry, key) {
4478 // re-define the origin and newComer as targetVal and newVal
4479 var newVal = newComer[key];
4480 var targetVal = ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin))
4481 // @ts-ignore
4482 ? origin[key]
4483 : undefined;
4484 // extend merge rules
4485 if (extensions && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(extensions)) {
4486 extensions.forEach(function (extend) {
4487 newVal = extend(targetVal, newVal);
4488 });
4489 }
4490 // When newVal is an object do the merge recursively
4491 if (targetVal !== undefined && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(newVal)) {
4492 newVal = mergeRecursively(targetVal, newVal, extensions);
4493 }
4494 assignProp(carry, key, newVal, newComer);
4495 return carry;
4496 }, newObject);
4497 return result;
4498 }
4499 /**
4500 * Merge anything recursively.
4501 * Objects get merged, special objects (classes etc.) are re-assigned "as is".
4502 * Basic types overwrite objects or other basic types.
4503 *
4504 * @param {(IConfig | any)} origin
4505 * @param {...any[]} newComers
4506 * @returns the result
4507 */
4508 function merge(origin) {
4509 var newComers = [];
4510 for (var _i = 1; _i < arguments.length; _i++) {
4511 newComers[_i - 1] = arguments[_i];
4512 }
4513 var extensions = null;
4514 var base = origin;
4515 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin) && origin.extensions && Object.keys(origin).length === 1) {
4516 base = {};
4517 extensions = origin.extensions;
4518 }
4519 return newComers.reduce(function (result, newComer) {
4520 return mergeRecursively(result, newComer, extensions);
4521 }, base);
4522 }
4523
4524 function concatArrays(originVal, newVal) {
4525 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(originVal) && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(newVal)) {
4526 // concat logic
4527 return originVal.concat(newVal);
4528 }
4529 return newVal; // always return newVal as fallback!!
4530 }
4531
4532 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (merge);
4533
4534
4535
4536 /***/ }),
4537
4538 /***/ "./scripts/gutenberg/UIComponents/UIImage.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/gutenberg/UIComponents/UIImage.ts":
4539 /*!****************************************************************************************************************************************************************************************!*\
4540 !*** ./scripts/gutenberg/UIComponents/UIImage.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/gutenberg/UIComponents/UIImage.ts ***!
4541 \****************************************************************************************************************************************************************************************/
4542 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4543
4544 "use strict";
4545 __webpack_require__.r(__webpack_exports__);
4546 // extracted by mini-css-extract-plugin
4547
4548
4549 /***/ }),
4550
4551 /***/ "./scripts/shared/Common/AsyncSelect.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/AsyncSelect.tsx":
4552 /*!*******************************************************************************************************************************************************************************!*\
4553 !*** ./scripts/shared/Common/AsyncSelect.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/AsyncSelect.tsx ***!
4554 \*******************************************************************************************************************************************************************************/
4555 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4556
4557 "use strict";
4558 __webpack_require__.r(__webpack_exports__);
4559 // extracted by mini-css-extract-plugin
4560
4561
4562 /***/ }),
4563
4564 /***/ "./scripts/shared/Common/HubspotWrapper.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/HubspotWrapper.ts":
4565 /*!************************************************************************************************************************************************************************************!*\
4566 !*** ./scripts/shared/Common/HubspotWrapper.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/HubspotWrapper.ts ***!
4567 \************************************************************************************************************************************************************************************/
4568 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4569
4570 "use strict";
4571 __webpack_require__.r(__webpack_exports__);
4572 // extracted by mini-css-extract-plugin
4573
4574
4575 /***/ }),
4576
4577 /***/ "./scripts/shared/UIComponents/UIAlert.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIAlert.tsx":
4578 /*!***********************************************************************************************************************************************************************************!*\
4579 !*** ./scripts/shared/UIComponents/UIAlert.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIAlert.tsx ***!
4580 \***********************************************************************************************************************************************************************************/
4581 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4582
4583 "use strict";
4584 __webpack_require__.r(__webpack_exports__);
4585 // extracted by mini-css-extract-plugin
4586
4587
4588 /***/ }),
4589
4590 /***/ "./scripts/shared/UIComponents/UIButton.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIButton.ts":
4591 /*!************************************************************************************************************************************************************************************!*\
4592 !*** ./scripts/shared/UIComponents/UIButton.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIButton.ts ***!
4593 \************************************************************************************************************************************************************************************/
4594 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4595
4596 "use strict";
4597 __webpack_require__.r(__webpack_exports__);
4598 // extracted by mini-css-extract-plugin
4599
4600
4601 /***/ }),
4602
4603 /***/ "./scripts/shared/UIComponents/UIContainer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIContainer.ts":
4604 /*!******************************************************************************************************************************************************************************************!*\
4605 !*** ./scripts/shared/UIComponents/UIContainer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIContainer.ts ***!
4606 \******************************************************************************************************************************************************************************************/
4607 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4608
4609 "use strict";
4610 __webpack_require__.r(__webpack_exports__);
4611 // extracted by mini-css-extract-plugin
4612
4613
4614 /***/ }),
4615
4616 /***/ "./scripts/shared/UIComponents/UIOverlay.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIOverlay.ts":
4617 /*!**************************************************************************************************************************************************************************************!*\
4618 !*** ./scripts/shared/UIComponents/UIOverlay.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIOverlay.ts ***!
4619 \**************************************************************************************************************************************************************************************/
4620 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4621
4622 "use strict";
4623 __webpack_require__.r(__webpack_exports__);
4624 // extracted by mini-css-extract-plugin
4625
4626
4627 /***/ }),
4628
4629 /***/ "./scripts/shared/UIComponents/UISpacer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpacer.ts":
4630 /*!************************************************************************************************************************************************************************************!*\
4631 !*** ./scripts/shared/UIComponents/UISpacer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpacer.ts ***!
4632 \************************************************************************************************************************************************************************************/
4633 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4634
4635 "use strict";
4636 __webpack_require__.r(__webpack_exports__);
4637 // extracted by mini-css-extract-plugin
4638
4639
4640 /***/ }),
4641
4642 /***/ "./scripts/shared/UIComponents/UISpinner.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpinner.tsx":
4643 /*!***************************************************************************************************************************************************************************************!*\
4644 !*** ./scripts/shared/UIComponents/UISpinner.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpinner.tsx ***!
4645 \***************************************************************************************************************************************************************************************/
4646 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4647
4648 "use strict";
4649 __webpack_require__.r(__webpack_exports__);
4650 // extracted by mini-css-extract-plugin
4651
4652
4653 /***/ }),
4654
4655 /***/ "./node_modules/object-assign/index.js":
4656 /*!*********************************************!*\
4657 !*** ./node_modules/object-assign/index.js ***!
4658 \*********************************************/
4659 /***/ ((module) => {
4660
4661 "use strict";
4662 /*
4663 object-assign
4664 (c) Sindre Sorhus
4665 @license MIT
4666 */
4667
4668
4669 /* eslint-disable no-unused-vars */
4670 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
4671 var hasOwnProperty = Object.prototype.hasOwnProperty;
4672 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
4673
4674 function toObject(val) {
4675 if (val === null || val === undefined) {
4676 throw new TypeError('Object.assign cannot be called with null or undefined');
4677 }
4678
4679 return Object(val);
4680 }
4681
4682 function shouldUseNative() {
4683 try {
4684 if (!Object.assign) {
4685 return false;
4686 }
4687
4688 // Detect buggy property enumeration order in older V8 versions.
4689
4690 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
4691 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
4692 test1[5] = 'de';
4693 if (Object.getOwnPropertyNames(test1)[0] === '5') {
4694 return false;
4695 }
4696
4697 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4698 var test2 = {};
4699 for (var i = 0; i < 10; i++) {
4700 test2['_' + String.fromCharCode(i)] = i;
4701 }
4702 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
4703 return test2[n];
4704 });
4705 if (order2.join('') !== '0123456789') {
4706 return false;
4707 }
4708
4709 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4710 var test3 = {};
4711 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
4712 test3[letter] = letter;
4713 });
4714 if (Object.keys(Object.assign({}, test3)).join('') !==
4715 'abcdefghijklmnopqrst') {
4716 return false;
4717 }
4718
4719 return true;
4720 } catch (err) {
4721 // We don't expect any of the above to throw, but better to be safe.
4722 return false;
4723 }
4724 }
4725
4726 module.exports = shouldUseNative() ? Object.assign : function (target, source) {
4727 var from;
4728 var to = toObject(target);
4729 var symbols;
4730
4731 for (var s = 1; s < arguments.length; s++) {
4732 from = Object(arguments[s]);
4733
4734 for (var key in from) {
4735 if (hasOwnProperty.call(from, key)) {
4736 to[key] = from[key];
4737 }
4738 }
4739
4740 if (getOwnPropertySymbols) {
4741 symbols = getOwnPropertySymbols(from);
4742 for (var i = 0; i < symbols.length; i++) {
4743 if (propIsEnumerable.call(from, symbols[i])) {
4744 to[symbols[i]] = from[symbols[i]];
4745 }
4746 }
4747 }
4748 }
4749
4750 return to;
4751 };
4752
4753
4754 /***/ }),
4755
4756 /***/ "./node_modules/prop-types/checkPropTypes.js":
4757 /*!***************************************************!*\
4758 !*** ./node_modules/prop-types/checkPropTypes.js ***!
4759 \***************************************************/
4760 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4761
4762 "use strict";
4763 /**
4764 * Copyright (c) 2013-present, Facebook, Inc.
4765 *
4766 * This source code is licensed under the MIT license found in the
4767 * LICENSE file in the root directory of this source tree.
4768 */
4769
4770
4771
4772 var printWarning = function() {};
4773
4774 if (true) {
4775 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
4776 var loggedTypeFailures = {};
4777 var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
4778
4779 printWarning = function(text) {
4780 var message = 'Warning: ' + text;
4781 if (typeof console !== 'undefined') {
4782 console.error(message);
4783 }
4784 try {
4785 // --- Welcome to debugging React ---
4786 // This error was thrown as a convenience so that you can use this stack
4787 // to find the callsite that caused this warning to fire.
4788 throw new Error(message);
4789 } catch (x) { /**/ }
4790 };
4791 }
4792
4793 /**
4794 * Assert that the values match with the type specs.
4795 * Error messages are memorized and will only be shown once.
4796 *
4797 * @param {object} typeSpecs Map of name to a ReactPropType
4798 * @param {object} values Runtime values that need to be type-checked
4799 * @param {string} location e.g. "prop", "context", "child context"
4800 * @param {string} componentName Name of the component for error messages.
4801 * @param {?Function} getStack Returns the component stack.
4802 * @private
4803 */
4804 function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
4805 if (true) {
4806 for (var typeSpecName in typeSpecs) {
4807 if (has(typeSpecs, typeSpecName)) {
4808 var error;
4809 // Prop type validation may throw. In case they do, we don't want to
4810 // fail the render phase where it didn't fail before. So we log it.
4811 // After these have been cleaned up, we'll let them throw.
4812 try {
4813 // This is intentionally an invariant that gets caught. It's the same
4814 // behavior as without this statement except with a better message.
4815 if (typeof typeSpecs[typeSpecName] !== 'function') {
4816 var err = Error(
4817 (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
4818 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
4819 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
4820 );
4821 err.name = 'Invariant Violation';
4822 throw err;
4823 }
4824 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
4825 } catch (ex) {
4826 error = ex;
4827 }
4828 if (error && !(error instanceof Error)) {
4829 printWarning(
4830 (componentName || 'React class') + ': type specification of ' +
4831 location + ' `' + typeSpecName + '` is invalid; the type checker ' +
4832 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
4833 'You may have forgotten to pass an argument to the type checker ' +
4834 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
4835 'shape all require an argument).'
4836 );
4837 }
4838 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
4839 // Only monitor this failure once because there tends to be a lot of the
4840 // same error.
4841 loggedTypeFailures[error.message] = true;
4842
4843 var stack = getStack ? getStack() : '';
4844
4845 printWarning(
4846 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
4847 );
4848 }
4849 }
4850 }
4851 }
4852 }
4853
4854 /**
4855 * Resets warning cache when testing.
4856 *
4857 * @private
4858 */
4859 checkPropTypes.resetWarningCache = function() {
4860 if (true) {
4861 loggedTypeFailures = {};
4862 }
4863 }
4864
4865 module.exports = checkPropTypes;
4866
4867
4868 /***/ }),
4869
4870 /***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
4871 /*!************************************************************!*\
4872 !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
4873 \************************************************************/
4874 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4875
4876 "use strict";
4877 /**
4878 * Copyright (c) 2013-present, Facebook, Inc.
4879 *
4880 * This source code is licensed under the MIT license found in the
4881 * LICENSE file in the root directory of this source tree.
4882 */
4883
4884
4885
4886 var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
4887 var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
4888
4889 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
4890 var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
4891 var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
4892
4893 var printWarning = function() {};
4894
4895 if (true) {
4896 printWarning = function(text) {
4897 var message = 'Warning: ' + text;
4898 if (typeof console !== 'undefined') {
4899 console.error(message);
4900 }
4901 try {
4902 // --- Welcome to debugging React ---
4903 // This error was thrown as a convenience so that you can use this stack
4904 // to find the callsite that caused this warning to fire.
4905 throw new Error(message);
4906 } catch (x) {}
4907 };
4908 }
4909
4910 function emptyFunctionThatReturnsNull() {
4911 return null;
4912 }
4913
4914 module.exports = function(isValidElement, throwOnDirectAccess) {
4915 /* global Symbol */
4916 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
4917 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
4918
4919 /**
4920 * Returns the iterator method function contained on the iterable object.
4921 *
4922 * Be sure to invoke the function with the iterable as context:
4923 *
4924 * var iteratorFn = getIteratorFn(myIterable);
4925 * if (iteratorFn) {
4926 * var iterator = iteratorFn.call(myIterable);
4927 * ...
4928 * }
4929 *
4930 * @param {?object} maybeIterable
4931 * @return {?function}
4932 */
4933 function getIteratorFn(maybeIterable) {
4934 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
4935 if (typeof iteratorFn === 'function') {
4936 return iteratorFn;
4937 }
4938 }
4939
4940 /**
4941 * Collection of methods that allow declaration and validation of props that are
4942 * supplied to React components. Example usage:
4943 *
4944 * var Props = require('ReactPropTypes');
4945 * var MyArticle = React.createClass({
4946 * propTypes: {
4947 * // An optional string prop named "description".
4948 * description: Props.string,
4949 *
4950 * // A required enum prop named "category".
4951 * category: Props.oneOf(['News','Photos']).isRequired,
4952 *
4953 * // A prop named "dialog" that requires an instance of Dialog.
4954 * dialog: Props.instanceOf(Dialog).isRequired
4955 * },
4956 * render: function() { ... }
4957 * });
4958 *
4959 * A more formal specification of how these methods are used:
4960 *
4961 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
4962 * decl := ReactPropTypes.{type}(.isRequired)?
4963 *
4964 * Each and every declaration produces a function with the same signature. This
4965 * allows the creation of custom validation functions. For example:
4966 *
4967 * var MyLink = React.createClass({
4968 * propTypes: {
4969 * // An optional string or URI prop named "href".
4970 * href: function(props, propName, componentName) {
4971 * var propValue = props[propName];
4972 * if (propValue != null && typeof propValue !== 'string' &&
4973 * !(propValue instanceof URI)) {
4974 * return new Error(
4975 * 'Expected a string or an URI for ' + propName + ' in ' +
4976 * componentName
4977 * );
4978 * }
4979 * }
4980 * },
4981 * render: function() {...}
4982 * });
4983 *
4984 * @internal
4985 */
4986
4987 var ANONYMOUS = '<<anonymous>>';
4988
4989 // Important!
4990 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
4991 var ReactPropTypes = {
4992 array: createPrimitiveTypeChecker('array'),
4993 bigint: createPrimitiveTypeChecker('bigint'),
4994 bool: createPrimitiveTypeChecker('boolean'),
4995 func: createPrimitiveTypeChecker('function'),
4996 number: createPrimitiveTypeChecker('number'),
4997 object: createPrimitiveTypeChecker('object'),
4998 string: createPrimitiveTypeChecker('string'),
4999 symbol: createPrimitiveTypeChecker('symbol'),
5000
5001 any: createAnyTypeChecker(),
5002 arrayOf: createArrayOfTypeChecker,
5003 element: createElementTypeChecker(),
5004 elementType: createElementTypeTypeChecker(),
5005 instanceOf: createInstanceTypeChecker,
5006 node: createNodeChecker(),
5007 objectOf: createObjectOfTypeChecker,
5008 oneOf: createEnumTypeChecker,
5009 oneOfType: createUnionTypeChecker,
5010 shape: createShapeTypeChecker,
5011 exact: createStrictShapeTypeChecker,
5012 };
5013
5014 /**
5015 * inlined Object.is polyfill to avoid requiring consumers ship their own
5016 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
5017 */
5018 /*eslint-disable no-self-compare*/
5019 function is(x, y) {
5020 // SameValue algorithm
5021 if (x === y) {
5022 // Steps 1-5, 7-10
5023 // Steps 6.b-6.e: +0 != -0
5024 return x !== 0 || 1 / x === 1 / y;
5025 } else {
5026 // Step 6.a: NaN == NaN
5027 return x !== x && y !== y;
5028 }
5029 }
5030 /*eslint-enable no-self-compare*/
5031
5032 /**
5033 * We use an Error-like object for backward compatibility as people may call
5034 * PropTypes directly and inspect their output. However, we don't use real
5035 * Errors anymore. We don't inspect their stack anyway, and creating them
5036 * is prohibitively expensive if they are created too often, such as what
5037 * happens in oneOfType() for any type before the one that matched.
5038 */
5039 function PropTypeError(message, data) {
5040 this.message = message;
5041 this.data = data && typeof data === 'object' ? data: {};
5042 this.stack = '';
5043 }
5044 // Make `instanceof Error` still work for returned errors.
5045 PropTypeError.prototype = Error.prototype;
5046
5047 function createChainableTypeChecker(validate) {
5048 if (true) {
5049 var manualPropTypeCallCache = {};
5050 var manualPropTypeWarningCount = 0;
5051 }
5052 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
5053 componentName = componentName || ANONYMOUS;
5054 propFullName = propFullName || propName;
5055
5056 if (secret !== ReactPropTypesSecret) {
5057 if (throwOnDirectAccess) {
5058 // New behavior only for users of `prop-types` package
5059 var err = new Error(
5060 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
5061 'Use `PropTypes.checkPropTypes()` to call them. ' +
5062 'Read more at http://fb.me/use-check-prop-types'
5063 );
5064 err.name = 'Invariant Violation';
5065 throw err;
5066 } else if ( true && typeof console !== 'undefined') {
5067 // Old behavior for people using React.PropTypes
5068 var cacheKey = componentName + ':' + propName;
5069 if (
5070 !manualPropTypeCallCache[cacheKey] &&
5071 // Avoid spamming the console because they are often not actionable except for lib authors
5072 manualPropTypeWarningCount < 3
5073 ) {
5074 printWarning(
5075 'You are manually calling a React.PropTypes validation ' +
5076 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
5077 'and will throw in the standalone `prop-types` package. ' +
5078 'You may be seeing this warning due to a third-party PropTypes ' +
5079 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
5080 );
5081 manualPropTypeCallCache[cacheKey] = true;
5082 manualPropTypeWarningCount++;
5083 }
5084 }
5085 }
5086 if (props[propName] == null) {
5087 if (isRequired) {
5088 if (props[propName] === null) {
5089 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
5090 }
5091 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
5092 }
5093 return null;
5094 } else {
5095 return validate(props, propName, componentName, location, propFullName);
5096 }
5097 }
5098
5099 var chainedCheckType = checkType.bind(null, false);
5100 chainedCheckType.isRequired = checkType.bind(null, true);
5101
5102 return chainedCheckType;
5103 }
5104
5105 function createPrimitiveTypeChecker(expectedType) {
5106 function validate(props, propName, componentName, location, propFullName, secret) {
5107 var propValue = props[propName];
5108 var propType = getPropType(propValue);
5109 if (propType !== expectedType) {
5110 // `propValue` being instance of, say, date/regexp, pass the 'object'
5111 // check, but we can offer a more precise error message here rather than
5112 // 'of type `object`'.
5113 var preciseType = getPreciseType(propValue);
5114
5115 return new PropTypeError(
5116 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
5117 {expectedType: expectedType}
5118 );
5119 }
5120 return null;
5121 }
5122 return createChainableTypeChecker(validate);
5123 }
5124
5125 function createAnyTypeChecker() {
5126 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
5127 }
5128
5129 function createArrayOfTypeChecker(typeChecker) {
5130 function validate(props, propName, componentName, location, propFullName) {
5131 if (typeof typeChecker !== 'function') {
5132 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
5133 }
5134 var propValue = props[propName];
5135 if (!Array.isArray(propValue)) {
5136 var propType = getPropType(propValue);
5137 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
5138 }
5139 for (var i = 0; i < propValue.length; i++) {
5140 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
5141 if (error instanceof Error) {
5142 return error;
5143 }
5144 }
5145 return null;
5146 }
5147 return createChainableTypeChecker(validate);
5148 }
5149
5150 function createElementTypeChecker() {
5151 function validate(props, propName, componentName, location, propFullName) {
5152 var propValue = props[propName];
5153 if (!isValidElement(propValue)) {
5154 var propType = getPropType(propValue);
5155 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
5156 }
5157 return null;
5158 }
5159 return createChainableTypeChecker(validate);
5160 }
5161
5162 function createElementTypeTypeChecker() {
5163 function validate(props, propName, componentName, location, propFullName) {
5164 var propValue = props[propName];
5165 if (!ReactIs.isValidElementType(propValue)) {
5166 var propType = getPropType(propValue);
5167 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
5168 }
5169 return null;
5170 }
5171 return createChainableTypeChecker(validate);
5172 }
5173
5174 function createInstanceTypeChecker(expectedClass) {
5175 function validate(props, propName, componentName, location, propFullName) {
5176 if (!(props[propName] instanceof expectedClass)) {
5177 var expectedClassName = expectedClass.name || ANONYMOUS;
5178 var actualClassName = getClassName(props[propName]);
5179 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
5180 }
5181 return null;
5182 }
5183 return createChainableTypeChecker(validate);
5184 }
5185
5186 function createEnumTypeChecker(expectedValues) {
5187 if (!Array.isArray(expectedValues)) {
5188 if (true) {
5189 if (arguments.length > 1) {
5190 printWarning(
5191 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
5192 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
5193 );
5194 } else {
5195 printWarning('Invalid argument supplied to oneOf, expected an array.');
5196 }
5197 }
5198 return emptyFunctionThatReturnsNull;
5199 }
5200
5201 function validate(props, propName, componentName, location, propFullName) {
5202 var propValue = props[propName];
5203 for (var i = 0; i < expectedValues.length; i++) {
5204 if (is(propValue, expectedValues[i])) {
5205 return null;
5206 }
5207 }
5208
5209 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
5210 var type = getPreciseType(value);
5211 if (type === 'symbol') {
5212 return String(value);
5213 }
5214 return value;
5215 });
5216 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
5217 }
5218 return createChainableTypeChecker(validate);
5219 }
5220
5221 function createObjectOfTypeChecker(typeChecker) {
5222 function validate(props, propName, componentName, location, propFullName) {
5223 if (typeof typeChecker !== 'function') {
5224 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
5225 }
5226 var propValue = props[propName];
5227 var propType = getPropType(propValue);
5228 if (propType !== 'object') {
5229 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
5230 }
5231 for (var key in propValue) {
5232 if (has(propValue, key)) {
5233 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5234 if (error instanceof Error) {
5235 return error;
5236 }
5237 }
5238 }
5239 return null;
5240 }
5241 return createChainableTypeChecker(validate);
5242 }
5243
5244 function createUnionTypeChecker(arrayOfTypeCheckers) {
5245 if (!Array.isArray(arrayOfTypeCheckers)) {
5246 true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
5247 return emptyFunctionThatReturnsNull;
5248 }
5249
5250 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5251 var checker = arrayOfTypeCheckers[i];
5252 if (typeof checker !== 'function') {
5253 printWarning(
5254 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
5255 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
5256 );
5257 return emptyFunctionThatReturnsNull;
5258 }
5259 }
5260
5261 function validate(props, propName, componentName, location, propFullName) {
5262 var expectedTypes = [];
5263 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5264 var checker = arrayOfTypeCheckers[i];
5265 var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
5266 if (checkerResult == null) {
5267 return null;
5268 }
5269 if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
5270 expectedTypes.push(checkerResult.data.expectedType);
5271 }
5272 }
5273 var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
5274 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
5275 }
5276 return createChainableTypeChecker(validate);
5277 }
5278
5279 function createNodeChecker() {
5280 function validate(props, propName, componentName, location, propFullName) {
5281 if (!isNode(props[propName])) {
5282 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
5283 }
5284 return null;
5285 }
5286 return createChainableTypeChecker(validate);
5287 }
5288
5289 function invalidValidatorError(componentName, location, propFullName, key, type) {
5290 return new PropTypeError(
5291 (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
5292 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
5293 );
5294 }
5295
5296 function createShapeTypeChecker(shapeTypes) {
5297 function validate(props, propName, componentName, location, propFullName) {
5298 var propValue = props[propName];
5299 var propType = getPropType(propValue);
5300 if (propType !== 'object') {
5301 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5302 }
5303 for (var key in shapeTypes) {
5304 var checker = shapeTypes[key];
5305 if (typeof checker !== 'function') {
5306 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
5307 }
5308 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5309 if (error) {
5310 return error;
5311 }
5312 }
5313 return null;
5314 }
5315 return createChainableTypeChecker(validate);
5316 }
5317
5318 function createStrictShapeTypeChecker(shapeTypes) {
5319 function validate(props, propName, componentName, location, propFullName) {
5320 var propValue = props[propName];
5321 var propType = getPropType(propValue);
5322 if (propType !== 'object') {
5323 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5324 }
5325 // We need to check all keys in case some are required but missing from props.
5326 var allKeys = assign({}, props[propName], shapeTypes);
5327 for (var key in allKeys) {
5328 var checker = shapeTypes[key];
5329 if (has(shapeTypes, key) && typeof checker !== 'function') {
5330 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
5331 }
5332 if (!checker) {
5333 return new PropTypeError(
5334 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
5335 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
5336 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
5337 );
5338 }
5339 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5340 if (error) {
5341 return error;
5342 }
5343 }
5344 return null;
5345 }
5346
5347 return createChainableTypeChecker(validate);
5348 }
5349
5350 function isNode(propValue) {
5351 switch (typeof propValue) {
5352 case 'number':
5353 case 'string':
5354 case 'undefined':
5355 return true;
5356 case 'boolean':
5357 return !propValue;
5358 case 'object':
5359 if (Array.isArray(propValue)) {
5360 return propValue.every(isNode);
5361 }
5362 if (propValue === null || isValidElement(propValue)) {
5363 return true;
5364 }
5365
5366 var iteratorFn = getIteratorFn(propValue);
5367 if (iteratorFn) {
5368 var iterator = iteratorFn.call(propValue);
5369 var step;
5370 if (iteratorFn !== propValue.entries) {
5371 while (!(step = iterator.next()).done) {
5372 if (!isNode(step.value)) {
5373 return false;
5374 }
5375 }
5376 } else {
5377 // Iterator will provide entry [k,v] tuples rather than values.
5378 while (!(step = iterator.next()).done) {
5379 var entry = step.value;
5380 if (entry) {
5381 if (!isNode(entry[1])) {
5382 return false;
5383 }
5384 }
5385 }
5386 }
5387 } else {
5388 return false;
5389 }
5390
5391 return true;
5392 default:
5393 return false;
5394 }
5395 }
5396
5397 function isSymbol(propType, propValue) {
5398 // Native Symbol.
5399 if (propType === 'symbol') {
5400 return true;
5401 }
5402
5403 // falsy value can't be a Symbol
5404 if (!propValue) {
5405 return false;
5406 }
5407
5408 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
5409 if (propValue['@@toStringTag'] === 'Symbol') {
5410 return true;
5411 }
5412
5413 // Fallback for non-spec compliant Symbols which are polyfilled.
5414 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
5415 return true;
5416 }
5417
5418 return false;
5419 }
5420
5421 // Equivalent of `typeof` but with special handling for array and regexp.
5422 function getPropType(propValue) {
5423 var propType = typeof propValue;
5424 if (Array.isArray(propValue)) {
5425 return 'array';
5426 }
5427 if (propValue instanceof RegExp) {
5428 // Old webkits (at least until Android 4.0) return 'function' rather than
5429 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
5430 // passes PropTypes.object.
5431 return 'object';
5432 }
5433 if (isSymbol(propType, propValue)) {
5434 return 'symbol';
5435 }
5436 return propType;
5437 }
5438
5439 // This handles more types than `getPropType`. Only used for error messages.
5440 // See `createPrimitiveTypeChecker`.
5441 function getPreciseType(propValue) {
5442 if (typeof propValue === 'undefined' || propValue === null) {
5443 return '' + propValue;
5444 }
5445 var propType = getPropType(propValue);
5446 if (propType === 'object') {
5447 if (propValue instanceof Date) {
5448 return 'date';
5449 } else if (propValue instanceof RegExp) {
5450 return 'regexp';
5451 }
5452 }
5453 return propType;
5454 }
5455
5456 // Returns a string that is postfixed to a warning about an invalid type.
5457 // For example, "undefined" or "of type array"
5458 function getPostfixForTypeWarning(value) {
5459 var type = getPreciseType(value);
5460 switch (type) {
5461 case 'array':
5462 case 'object':
5463 return 'an ' + type;
5464 case 'boolean':
5465 case 'date':
5466 case 'regexp':
5467 return 'a ' + type;
5468 default:
5469 return type;
5470 }
5471 }
5472
5473 // Returns class name of the object, if any.
5474 function getClassName(propValue) {
5475 if (!propValue.constructor || !propValue.constructor.name) {
5476 return ANONYMOUS;
5477 }
5478 return propValue.constructor.name;
5479 }
5480
5481 ReactPropTypes.checkPropTypes = checkPropTypes;
5482 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
5483 ReactPropTypes.PropTypes = ReactPropTypes;
5484
5485 return ReactPropTypes;
5486 };
5487
5488
5489 /***/ }),
5490
5491 /***/ "./node_modules/prop-types/index.js":
5492 /*!******************************************!*\
5493 !*** ./node_modules/prop-types/index.js ***!
5494 \******************************************/
5495 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5496
5497 /**
5498 * Copyright (c) 2013-present, Facebook, Inc.
5499 *
5500 * This source code is licensed under the MIT license found in the
5501 * LICENSE file in the root directory of this source tree.
5502 */
5503
5504 if (true) {
5505 var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
5506
5507 // By explicitly using `prop-types` you are opting into new development behavior.
5508 // http://fb.me/prop-types-in-prod
5509 var throwOnDirectAccess = true;
5510 module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
5511 } else {}
5512
5513
5514 /***/ }),
5515
5516 /***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
5517 /*!*************************************************************!*\
5518 !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
5519 \*************************************************************/
5520 /***/ ((module) => {
5521
5522 "use strict";
5523 /**
5524 * Copyright (c) 2013-present, Facebook, Inc.
5525 *
5526 * This source code is licensed under the MIT license found in the
5527 * LICENSE file in the root directory of this source tree.
5528 */
5529
5530
5531
5532 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
5533
5534 module.exports = ReactPropTypesSecret;
5535
5536
5537 /***/ }),
5538
5539 /***/ "./node_modules/prop-types/lib/has.js":
5540 /*!********************************************!*\
5541 !*** ./node_modules/prop-types/lib/has.js ***!
5542 \********************************************/
5543 /***/ ((module) => {
5544
5545 module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
5546
5547
5548 /***/ }),
5549
5550 /***/ "./node_modules/raven-js/src/configError.js":
5551 /*!**************************************************!*\
5552 !*** ./node_modules/raven-js/src/configError.js ***!
5553 \**************************************************/
5554 /***/ ((module) => {
5555
5556 function RavenConfigError(message) {
5557 this.name = 'RavenConfigError';
5558 this.message = message;
5559 }
5560 RavenConfigError.prototype = new Error();
5561 RavenConfigError.prototype.constructor = RavenConfigError;
5562
5563 module.exports = RavenConfigError;
5564
5565
5566 /***/ }),
5567
5568 /***/ "./node_modules/raven-js/src/console.js":
5569 /*!**********************************************!*\
5570 !*** ./node_modules/raven-js/src/console.js ***!
5571 \**********************************************/
5572 /***/ ((module) => {
5573
5574 var wrapMethod = function(console, level, callback) {
5575 var originalConsoleLevel = console[level];
5576 var originalConsole = console;
5577
5578 if (!(level in console)) {
5579 return;
5580 }
5581
5582 var sentryLevel = level === 'warn' ? 'warning' : level;
5583
5584 console[level] = function() {
5585 var args = [].slice.call(arguments);
5586
5587 var msg = '' + args.join(' ');
5588 var data = {level: sentryLevel, logger: 'console', extra: {arguments: args}};
5589
5590 if (level === 'assert') {
5591 if (args[0] === false) {
5592 // Default browsers message
5593 msg = 'Assertion failed: ' + (args.slice(1).join(' ') || 'console.assert');
5594 data.extra.arguments = args.slice(1);
5595 callback && callback(msg, data);
5596 }
5597 } else {
5598 callback && callback(msg, data);
5599 }
5600
5601 // this fails for some browsers. :(
5602 if (originalConsoleLevel) {
5603 // IE9 doesn't allow calling apply on console functions directly
5604 // See: https://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function#answer-5473193
5605 Function.prototype.apply.call(originalConsoleLevel, originalConsole, args);
5606 }
5607 };
5608 };
5609
5610 module.exports = {
5611 wrapMethod: wrapMethod
5612 };
5613
5614
5615 /***/ }),
5616
5617 /***/ "./node_modules/raven-js/src/raven.js":
5618 /*!********************************************!*\
5619 !*** ./node_modules/raven-js/src/raven.js ***!
5620 \********************************************/
5621 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5622
5623 /*global XDomainRequest:false */
5624
5625 var TraceKit = __webpack_require__(/*! ../vendor/TraceKit/tracekit */ "./node_modules/raven-js/vendor/TraceKit/tracekit.js");
5626 var stringify = __webpack_require__(/*! ../vendor/json-stringify-safe/stringify */ "./node_modules/raven-js/vendor/json-stringify-safe/stringify.js");
5627 var RavenConfigError = __webpack_require__(/*! ./configError */ "./node_modules/raven-js/src/configError.js");
5628
5629 var utils = __webpack_require__(/*! ./utils */ "./node_modules/raven-js/src/utils.js");
5630 var isError = utils.isError;
5631 var isObject = utils.isObject;
5632 var isObject = utils.isObject;
5633 var isErrorEvent = utils.isErrorEvent;
5634 var isUndefined = utils.isUndefined;
5635 var isFunction = utils.isFunction;
5636 var isString = utils.isString;
5637 var isEmptyObject = utils.isEmptyObject;
5638 var each = utils.each;
5639 var objectMerge = utils.objectMerge;
5640 var truncate = utils.truncate;
5641 var objectFrozen = utils.objectFrozen;
5642 var hasKey = utils.hasKey;
5643 var joinRegExp = utils.joinRegExp;
5644 var urlencode = utils.urlencode;
5645 var uuid4 = utils.uuid4;
5646 var htmlTreeAsString = utils.htmlTreeAsString;
5647 var isSameException = utils.isSameException;
5648 var isSameStacktrace = utils.isSameStacktrace;
5649 var parseUrl = utils.parseUrl;
5650 var fill = utils.fill;
5651
5652 var wrapConsoleMethod = (__webpack_require__(/*! ./console */ "./node_modules/raven-js/src/console.js").wrapMethod);
5653
5654 var dsnKeys = 'source protocol user pass host port path'.split(' '),
5655 dsnPattern = /^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;
5656
5657 function now() {
5658 return +new Date();
5659 }
5660
5661 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
5662 var _window =
5663 typeof window !== 'undefined'
5664 ? window
5665 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
5666 var _document = _window.document;
5667 var _navigator = _window.navigator;
5668
5669 function keepOriginalCallback(original, callback) {
5670 return isFunction(callback)
5671 ? function(data) {
5672 return callback(data, original);
5673 }
5674 : callback;
5675 }
5676
5677 // First, check for JSON support
5678 // If there is no JSON, we no-op the core features of Raven
5679 // since JSON is required to encode the payload
5680 function Raven() {
5681 this._hasJSON = !!(typeof JSON === 'object' && JSON.stringify);
5682 // Raven can run in contexts where there's no document (react-native)
5683 this._hasDocument = !isUndefined(_document);
5684 this._hasNavigator = !isUndefined(_navigator);
5685 this._lastCapturedException = null;
5686 this._lastData = null;
5687 this._lastEventId = null;
5688 this._globalServer = null;
5689 this._globalKey = null;
5690 this._globalProject = null;
5691 this._globalContext = {};
5692 this._globalOptions = {
5693 logger: 'javascript',
5694 ignoreErrors: [],
5695 ignoreUrls: [],
5696 whitelistUrls: [],
5697 includePaths: [],
5698 collectWindowErrors: true,
5699 maxMessageLength: 0,
5700
5701 // By default, truncates URL values to 250 chars
5702 maxUrlLength: 250,
5703 stackTraceLimit: 50,
5704 autoBreadcrumbs: true,
5705 instrument: true,
5706 sampleRate: 1
5707 };
5708 this._ignoreOnError = 0;
5709 this._isRavenInstalled = false;
5710 this._originalErrorStackTraceLimit = Error.stackTraceLimit;
5711 // capture references to window.console *and* all its methods first
5712 // before the console plugin has a chance to monkey patch
5713 this._originalConsole = _window.console || {};
5714 this._originalConsoleMethods = {};
5715 this._plugins = [];
5716 this._startTime = now();
5717 this._wrappedBuiltIns = [];
5718 this._breadcrumbs = [];
5719 this._lastCapturedEvent = null;
5720 this._keypressTimeout;
5721 this._location = _window.location;
5722 this._lastHref = this._location && this._location.href;
5723 this._resetBackoff();
5724
5725 // eslint-disable-next-line guard-for-in
5726 for (var method in this._originalConsole) {
5727 this._originalConsoleMethods[method] = this._originalConsole[method];
5728 }
5729 }
5730
5731 /*
5732 * The core Raven singleton
5733 *
5734 * @this {Raven}
5735 */
5736
5737 Raven.prototype = {
5738 // Hardcode version string so that raven source can be loaded directly via
5739 // webpack (using a build step causes webpack #1617). Grunt verifies that
5740 // this value matches package.json during build.
5741 // See: https://github.com/getsentry/raven-js/issues/465
5742 VERSION: '3.19.1',
5743
5744 debug: false,
5745
5746 TraceKit: TraceKit, // alias to TraceKit
5747
5748 /*
5749 * Configure Raven with a DSN and extra options
5750 *
5751 * @param {string} dsn The public Sentry DSN
5752 * @param {object} options Set of global options [optional]
5753 * @return {Raven}
5754 */
5755 config: function(dsn, options) {
5756 var self = this;
5757
5758 if (self._globalServer) {
5759 this._logDebug('error', 'Error: Raven has already been configured');
5760 return self;
5761 }
5762 if (!dsn) return self;
5763
5764 var globalOptions = self._globalOptions;
5765
5766 // merge in options
5767 if (options) {
5768 each(options, function(key, value) {
5769 // tags and extra are special and need to be put into context
5770 if (key === 'tags' || key === 'extra' || key === 'user') {
5771 self._globalContext[key] = value;
5772 } else {
5773 globalOptions[key] = value;
5774 }
5775 });
5776 }
5777
5778 self.setDSN(dsn);
5779
5780 // "Script error." is hard coded into browsers for errors that it can't read.
5781 // this is the result of a script being pulled in from an external domain and CORS.
5782 globalOptions.ignoreErrors.push(/^Script error\.?$/);
5783 globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/);
5784
5785 // join regexp rules into one big rule
5786 globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors);
5787 globalOptions.ignoreUrls = globalOptions.ignoreUrls.length
5788 ? joinRegExp(globalOptions.ignoreUrls)
5789 : false;
5790 globalOptions.whitelistUrls = globalOptions.whitelistUrls.length
5791 ? joinRegExp(globalOptions.whitelistUrls)
5792 : false;
5793 globalOptions.includePaths = joinRegExp(globalOptions.includePaths);
5794 globalOptions.maxBreadcrumbs = Math.max(
5795 0,
5796 Math.min(globalOptions.maxBreadcrumbs || 100, 100)
5797 ); // default and hard limit is 100
5798
5799 var autoBreadcrumbDefaults = {
5800 xhr: true,
5801 console: true,
5802 dom: true,
5803 location: true
5804 };
5805
5806 var autoBreadcrumbs = globalOptions.autoBreadcrumbs;
5807 if ({}.toString.call(autoBreadcrumbs) === '[object Object]') {
5808 autoBreadcrumbs = objectMerge(autoBreadcrumbDefaults, autoBreadcrumbs);
5809 } else if (autoBreadcrumbs !== false) {
5810 autoBreadcrumbs = autoBreadcrumbDefaults;
5811 }
5812 globalOptions.autoBreadcrumbs = autoBreadcrumbs;
5813
5814 var instrumentDefaults = {
5815 tryCatch: true
5816 };
5817
5818 var instrument = globalOptions.instrument;
5819 if ({}.toString.call(instrument) === '[object Object]') {
5820 instrument = objectMerge(instrumentDefaults, instrument);
5821 } else if (instrument !== false) {
5822 instrument = instrumentDefaults;
5823 }
5824 globalOptions.instrument = instrument;
5825
5826 TraceKit.collectWindowErrors = !!globalOptions.collectWindowErrors;
5827
5828 // return for chaining
5829 return self;
5830 },
5831
5832 /*
5833 * Installs a global window.onerror error handler
5834 * to capture and report uncaught exceptions.
5835 * At this point, install() is required to be called due
5836 * to the way TraceKit is set up.
5837 *
5838 * @return {Raven}
5839 */
5840 install: function() {
5841 var self = this;
5842 if (self.isSetup() && !self._isRavenInstalled) {
5843 TraceKit.report.subscribe(function() {
5844 self._handleOnErrorStackInfo.apply(self, arguments);
5845 });
5846 if (self._globalOptions.instrument && self._globalOptions.instrument.tryCatch) {
5847 self._instrumentTryCatch();
5848 }
5849
5850 if (self._globalOptions.autoBreadcrumbs) self._instrumentBreadcrumbs();
5851
5852 // Install all of the plugins
5853 self._drainPlugins();
5854
5855 self._isRavenInstalled = true;
5856 }
5857
5858 Error.stackTraceLimit = self._globalOptions.stackTraceLimit;
5859 return this;
5860 },
5861
5862 /*
5863 * Set the DSN (can be called multiple time unlike config)
5864 *
5865 * @param {string} dsn The public Sentry DSN
5866 */
5867 setDSN: function(dsn) {
5868 var self = this,
5869 uri = self._parseDSN(dsn),
5870 lastSlash = uri.path.lastIndexOf('/'),
5871 path = uri.path.substr(1, lastSlash);
5872
5873 self._dsn = dsn;
5874 self._globalKey = uri.user;
5875 self._globalSecret = uri.pass && uri.pass.substr(1);
5876 self._globalProject = uri.path.substr(lastSlash + 1);
5877
5878 self._globalServer = self._getGlobalServer(uri);
5879
5880 self._globalEndpoint =
5881 self._globalServer + '/' + path + 'api/' + self._globalProject + '/store/';
5882
5883 // Reset backoff state since we may be pointing at a
5884 // new project/server
5885 this._resetBackoff();
5886 },
5887
5888 /*
5889 * Wrap code within a context so Raven can capture errors
5890 * reliably across domains that is executed immediately.
5891 *
5892 * @param {object} options A specific set of options for this context [optional]
5893 * @param {function} func The callback to be immediately executed within the context
5894 * @param {array} args An array of arguments to be called with the callback [optional]
5895 */
5896 context: function(options, func, args) {
5897 if (isFunction(options)) {
5898 args = func || [];
5899 func = options;
5900 options = undefined;
5901 }
5902
5903 return this.wrap(options, func).apply(this, args);
5904 },
5905
5906 /*
5907 * Wrap code within a context and returns back a new function to be executed
5908 *
5909 * @param {object} options A specific set of options for this context [optional]
5910 * @param {function} func The function to be wrapped in a new context
5911 * @param {function} func A function to call before the try/catch wrapper [optional, private]
5912 * @return {function} The newly wrapped functions with a context
5913 */
5914 wrap: function(options, func, _before) {
5915 var self = this;
5916 // 1 argument has been passed, and it's not a function
5917 // so just return it
5918 if (isUndefined(func) && !isFunction(options)) {
5919 return options;
5920 }
5921
5922 // options is optional
5923 if (isFunction(options)) {
5924 func = options;
5925 options = undefined;
5926 }
5927
5928 // At this point, we've passed along 2 arguments, and the second one
5929 // is not a function either, so we'll just return the second argument.
5930 if (!isFunction(func)) {
5931 return func;
5932 }
5933
5934 // We don't wanna wrap it twice!
5935 try {
5936 if (func.__raven__) {
5937 return func;
5938 }
5939
5940 // If this has already been wrapped in the past, return that
5941 if (func.__raven_wrapper__) {
5942 return func.__raven_wrapper__;
5943 }
5944 } catch (e) {
5945 // Just accessing custom props in some Selenium environments
5946 // can cause a "Permission denied" exception (see raven-js#495).
5947 // Bail on wrapping and return the function as-is (defers to window.onerror).
5948 return func;
5949 }
5950
5951 function wrapped() {
5952 var args = [],
5953 i = arguments.length,
5954 deep = !options || (options && options.deep !== false);
5955
5956 if (_before && isFunction(_before)) {
5957 _before.apply(this, arguments);
5958 }
5959
5960 // Recursively wrap all of a function's arguments that are
5961 // functions themselves.
5962 while (i--) args[i] = deep ? self.wrap(options, arguments[i]) : arguments[i];
5963
5964 try {
5965 // Attempt to invoke user-land function
5966 // NOTE: If you are a Sentry user, and you are seeing this stack frame, it
5967 // means Raven caught an error invoking your application code. This is
5968 // expected behavior and NOT indicative of a bug with Raven.js.
5969 return func.apply(this, args);
5970 } catch (e) {
5971 self._ignoreNextOnError();
5972 self.captureException(e, options);
5973 throw e;
5974 }
5975 }
5976
5977 // copy over properties of the old function
5978 for (var property in func) {
5979 if (hasKey(func, property)) {
5980 wrapped[property] = func[property];
5981 }
5982 }
5983 wrapped.prototype = func.prototype;
5984
5985 func.__raven_wrapper__ = wrapped;
5986 // Signal that this function has been wrapped already
5987 // for both debugging and to prevent it to being wrapped twice
5988 wrapped.__raven__ = true;
5989 wrapped.__inner__ = func;
5990
5991 return wrapped;
5992 },
5993
5994 /*
5995 * Uninstalls the global error handler.
5996 *
5997 * @return {Raven}
5998 */
5999 uninstall: function() {
6000 TraceKit.report.uninstall();
6001
6002 this._restoreBuiltIns();
6003
6004 Error.stackTraceLimit = this._originalErrorStackTraceLimit;
6005 this._isRavenInstalled = false;
6006
6007 return this;
6008 },
6009
6010 /*
6011 * Manually capture an exception and send it over to Sentry
6012 *
6013 * @param {error} ex An exception to be logged
6014 * @param {object} options A specific set of options for this error [optional]
6015 * @return {Raven}
6016 */
6017 captureException: function(ex, options) {
6018 // Cases for sending ex as a message, rather than an exception
6019 var isNotError = !isError(ex);
6020 var isNotErrorEvent = !isErrorEvent(ex);
6021 var isErrorEventWithoutError = isErrorEvent(ex) && !ex.error;
6022
6023 if ((isNotError && isNotErrorEvent) || isErrorEventWithoutError) {
6024 return this.captureMessage(
6025 ex,
6026 objectMerge(
6027 {
6028 trimHeadFrames: 1,
6029 stacktrace: true // if we fall back to captureMessage, default to attempting a new trace
6030 },
6031 options
6032 )
6033 );
6034 }
6035
6036 // Get actual Error from ErrorEvent
6037 if (isErrorEvent(ex)) ex = ex.error;
6038
6039 // Store the raw exception object for potential debugging and introspection
6040 this._lastCapturedException = ex;
6041
6042 // TraceKit.report will re-raise any exception passed to it,
6043 // which means you have to wrap it in try/catch. Instead, we
6044 // can wrap it here and only re-raise if TraceKit.report
6045 // raises an exception different from the one we asked to
6046 // report on.
6047 try {
6048 var stack = TraceKit.computeStackTrace(ex);
6049 this._handleStackInfo(stack, options);
6050 } catch (ex1) {
6051 if (ex !== ex1) {
6052 throw ex1;
6053 }
6054 }
6055
6056 return this;
6057 },
6058
6059 /*
6060 * Manually send a message to Sentry
6061 *
6062 * @param {string} msg A plain message to be captured in Sentry
6063 * @param {object} options A specific set of options for this message [optional]
6064 * @return {Raven}
6065 */
6066 captureMessage: function(msg, options) {
6067 // config() automagically converts ignoreErrors from a list to a RegExp so we need to test for an
6068 // early call; we'll error on the side of logging anything called before configuration since it's
6069 // probably something you should see:
6070 if (
6071 !!this._globalOptions.ignoreErrors.test &&
6072 this._globalOptions.ignoreErrors.test(msg)
6073 ) {
6074 return;
6075 }
6076
6077 options = options || {};
6078
6079 var data = objectMerge(
6080 {
6081 message: msg + '' // Make sure it's actually a string
6082 },
6083 options
6084 );
6085
6086 var ex;
6087 // Generate a "synthetic" stack trace from this point.
6088 // NOTE: If you are a Sentry user, and you are seeing this stack frame, it is NOT indicative
6089 // of a bug with Raven.js. Sentry generates synthetic traces either by configuration,
6090 // or if it catches a thrown object without a "stack" property.
6091 try {
6092 throw new Error(msg);
6093 } catch (ex1) {
6094 ex = ex1;
6095 }
6096
6097 // null exception name so `Error` isn't prefixed to msg
6098 ex.name = null;
6099 var stack = TraceKit.computeStackTrace(ex);
6100
6101 // stack[0] is `throw new Error(msg)` call itself, we are interested in the frame that was just before that, stack[1]
6102 var initialCall = stack.stack[1];
6103
6104 var fileurl = (initialCall && initialCall.url) || '';
6105
6106 if (
6107 !!this._globalOptions.ignoreUrls.test &&
6108 this._globalOptions.ignoreUrls.test(fileurl)
6109 ) {
6110 return;
6111 }
6112
6113 if (
6114 !!this._globalOptions.whitelistUrls.test &&
6115 !this._globalOptions.whitelistUrls.test(fileurl)
6116 ) {
6117 return;
6118 }
6119
6120 if (this._globalOptions.stacktrace || (options && options.stacktrace)) {
6121 options = objectMerge(
6122 {
6123 // fingerprint on msg, not stack trace (legacy behavior, could be
6124 // revisited)
6125 fingerprint: msg,
6126 // since we know this is a synthetic trace, the top N-most frames
6127 // MUST be from Raven.js, so mark them as in_app later by setting
6128 // trimHeadFrames
6129 trimHeadFrames: (options.trimHeadFrames || 0) + 1
6130 },
6131 options
6132 );
6133
6134 var frames = this._prepareFrames(stack, options);
6135 data.stacktrace = {
6136 // Sentry expects frames oldest to newest
6137 frames: frames.reverse()
6138 };
6139 }
6140
6141 // Fire away!
6142 this._send(data);
6143
6144 return this;
6145 },
6146
6147 captureBreadcrumb: function(obj) {
6148 var crumb = objectMerge(
6149 {
6150 timestamp: now() / 1000
6151 },
6152 obj
6153 );
6154
6155 if (isFunction(this._globalOptions.breadcrumbCallback)) {
6156 var result = this._globalOptions.breadcrumbCallback(crumb);
6157
6158 if (isObject(result) && !isEmptyObject(result)) {
6159 crumb = result;
6160 } else if (result === false) {
6161 return this;
6162 }
6163 }
6164
6165 this._breadcrumbs.push(crumb);
6166 if (this._breadcrumbs.length > this._globalOptions.maxBreadcrumbs) {
6167 this._breadcrumbs.shift();
6168 }
6169 return this;
6170 },
6171
6172 addPlugin: function(plugin /*arg1, arg2, ... argN*/) {
6173 var pluginArgs = [].slice.call(arguments, 1);
6174
6175 this._plugins.push([plugin, pluginArgs]);
6176 if (this._isRavenInstalled) {
6177 this._drainPlugins();
6178 }
6179
6180 return this;
6181 },
6182
6183 /*
6184 * Set/clear a user to be sent along with the payload.
6185 *
6186 * @param {object} user An object representing user data [optional]
6187 * @return {Raven}
6188 */
6189 setUserContext: function(user) {
6190 // Intentionally do not merge here since that's an unexpected behavior.
6191 this._globalContext.user = user;
6192
6193 return this;
6194 },
6195
6196 /*
6197 * Merge extra attributes to be sent along with the payload.
6198 *
6199 * @param {object} extra An object representing extra data [optional]
6200 * @return {Raven}
6201 */
6202 setExtraContext: function(extra) {
6203 this._mergeContext('extra', extra);
6204
6205 return this;
6206 },
6207
6208 /*
6209 * Merge tags to be sent along with the payload.
6210 *
6211 * @param {object} tags An object representing tags [optional]
6212 * @return {Raven}
6213 */
6214 setTagsContext: function(tags) {
6215 this._mergeContext('tags', tags);
6216
6217 return this;
6218 },
6219
6220 /*
6221 * Clear all of the context.
6222 *
6223 * @return {Raven}
6224 */
6225 clearContext: function() {
6226 this._globalContext = {};
6227
6228 return this;
6229 },
6230
6231 /*
6232 * Get a copy of the current context. This cannot be mutated.
6233 *
6234 * @return {object} copy of context
6235 */
6236 getContext: function() {
6237 // lol javascript
6238 return JSON.parse(stringify(this._globalContext));
6239 },
6240
6241 /*
6242 * Set environment of application
6243 *
6244 * @param {string} environment Typically something like 'production'.
6245 * @return {Raven}
6246 */
6247 setEnvironment: function(environment) {
6248 this._globalOptions.environment = environment;
6249
6250 return this;
6251 },
6252
6253 /*
6254 * Set release version of application
6255 *
6256 * @param {string} release Typically something like a git SHA to identify version
6257 * @return {Raven}
6258 */
6259 setRelease: function(release) {
6260 this._globalOptions.release = release;
6261
6262 return this;
6263 },
6264
6265 /*
6266 * Set the dataCallback option
6267 *
6268 * @param {function} callback The callback to run which allows the
6269 * data blob to be mutated before sending
6270 * @return {Raven}
6271 */
6272 setDataCallback: function(callback) {
6273 var original = this._globalOptions.dataCallback;
6274 this._globalOptions.dataCallback = keepOriginalCallback(original, callback);
6275 return this;
6276 },
6277
6278 /*
6279 * Set the breadcrumbCallback option
6280 *
6281 * @param {function} callback The callback to run which allows filtering
6282 * or mutating breadcrumbs
6283 * @return {Raven}
6284 */
6285 setBreadcrumbCallback: function(callback) {
6286 var original = this._globalOptions.breadcrumbCallback;
6287 this._globalOptions.breadcrumbCallback = keepOriginalCallback(original, callback);
6288 return this;
6289 },
6290
6291 /*
6292 * Set the shouldSendCallback option
6293 *
6294 * @param {function} callback The callback to run which allows
6295 * introspecting the blob before sending
6296 * @return {Raven}
6297 */
6298 setShouldSendCallback: function(callback) {
6299 var original = this._globalOptions.shouldSendCallback;
6300 this._globalOptions.shouldSendCallback = keepOriginalCallback(original, callback);
6301 return this;
6302 },
6303
6304 /**
6305 * Override the default HTTP transport mechanism that transmits data
6306 * to the Sentry server.
6307 *
6308 * @param {function} transport Function invoked instead of the default
6309 * `makeRequest` handler.
6310 *
6311 * @return {Raven}
6312 */
6313 setTransport: function(transport) {
6314 this._globalOptions.transport = transport;
6315
6316 return this;
6317 },
6318
6319 /*
6320 * Get the latest raw exception that was captured by Raven.
6321 *
6322 * @return {error}
6323 */
6324 lastException: function() {
6325 return this._lastCapturedException;
6326 },
6327
6328 /*
6329 * Get the last event id
6330 *
6331 * @return {string}
6332 */
6333 lastEventId: function() {
6334 return this._lastEventId;
6335 },
6336
6337 /*
6338 * Determine if Raven is setup and ready to go.
6339 *
6340 * @return {boolean}
6341 */
6342 isSetup: function() {
6343 if (!this._hasJSON) return false; // needs JSON support
6344 if (!this._globalServer) {
6345 if (!this.ravenNotConfiguredError) {
6346 this.ravenNotConfiguredError = true;
6347 this._logDebug('error', 'Error: Raven has not been configured.');
6348 }
6349 return false;
6350 }
6351 return true;
6352 },
6353
6354 afterLoad: function() {
6355 // TODO: remove window dependence?
6356
6357 // Attempt to initialize Raven on load
6358 var RavenConfig = _window.RavenConfig;
6359 if (RavenConfig) {
6360 this.config(RavenConfig.dsn, RavenConfig.config).install();
6361 }
6362 },
6363
6364 showReportDialog: function(options) {
6365 if (
6366 !_document // doesn't work without a document (React native)
6367 )
6368 return;
6369
6370 options = options || {};
6371
6372 var lastEventId = options.eventId || this.lastEventId();
6373 if (!lastEventId) {
6374 throw new RavenConfigError('Missing eventId');
6375 }
6376
6377 var dsn = options.dsn || this._dsn;
6378 if (!dsn) {
6379 throw new RavenConfigError('Missing DSN');
6380 }
6381
6382 var encode = encodeURIComponent;
6383 var qs = '';
6384 qs += '?eventId=' + encode(lastEventId);
6385 qs += '&dsn=' + encode(dsn);
6386
6387 var user = options.user || this._globalContext.user;
6388 if (user) {
6389 if (user.name) qs += '&name=' + encode(user.name);
6390 if (user.email) qs += '&email=' + encode(user.email);
6391 }
6392
6393 var globalServer = this._getGlobalServer(this._parseDSN(dsn));
6394
6395 var script = _document.createElement('script');
6396 script.async = true;
6397 script.src = globalServer + '/api/embed/error-page/' + qs;
6398 (_document.head || _document.body).appendChild(script);
6399 },
6400
6401 /**** Private functions ****/
6402 _ignoreNextOnError: function() {
6403 var self = this;
6404 this._ignoreOnError += 1;
6405 setTimeout(function() {
6406 // onerror should trigger before setTimeout
6407 self._ignoreOnError -= 1;
6408 });
6409 },
6410
6411 _triggerEvent: function(eventType, options) {
6412 // NOTE: `event` is a native browser thing, so let's avoid conflicting wiht it
6413 var evt, key;
6414
6415 if (!this._hasDocument) return;
6416
6417 options = options || {};
6418
6419 eventType = 'raven' + eventType.substr(0, 1).toUpperCase() + eventType.substr(1);
6420
6421 if (_document.createEvent) {
6422 evt = _document.createEvent('HTMLEvents');
6423 evt.initEvent(eventType, true, true);
6424 } else {
6425 evt = _document.createEventObject();
6426 evt.eventType = eventType;
6427 }
6428
6429 for (key in options)
6430 if (hasKey(options, key)) {
6431 evt[key] = options[key];
6432 }
6433
6434 if (_document.createEvent) {
6435 // IE9 if standards
6436 _document.dispatchEvent(evt);
6437 } else {
6438 // IE8 regardless of Quirks or Standards
6439 // IE9 if quirks
6440 try {
6441 _document.fireEvent('on' + evt.eventType.toLowerCase(), evt);
6442 } catch (e) {
6443 // Do nothing
6444 }
6445 }
6446 },
6447
6448 /**
6449 * Wraps addEventListener to capture UI breadcrumbs
6450 * @param evtName the event name (e.g. "click")
6451 * @returns {Function}
6452 * @private
6453 */
6454 _breadcrumbEventHandler: function(evtName) {
6455 var self = this;
6456 return function(evt) {
6457 // reset keypress timeout; e.g. triggering a 'click' after
6458 // a 'keypress' will reset the keypress debounce so that a new
6459 // set of keypresses can be recorded
6460 self._keypressTimeout = null;
6461
6462 // It's possible this handler might trigger multiple times for the same
6463 // event (e.g. event propagation through node ancestors). Ignore if we've
6464 // already captured the event.
6465 if (self._lastCapturedEvent === evt) return;
6466
6467 self._lastCapturedEvent = evt;
6468
6469 // try/catch both:
6470 // - accessing evt.target (see getsentry/raven-js#838, #768)
6471 // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly
6472 // can throw an exception in some circumstances.
6473 var target;
6474 try {
6475 target = htmlTreeAsString(evt.target);
6476 } catch (e) {
6477 target = '<unknown>';
6478 }
6479
6480 self.captureBreadcrumb({
6481 category: 'ui.' + evtName, // e.g. ui.click, ui.input
6482 message: target
6483 });
6484 };
6485 },
6486
6487 /**
6488 * Wraps addEventListener to capture keypress UI events
6489 * @returns {Function}
6490 * @private
6491 */
6492 _keypressEventHandler: function() {
6493 var self = this,
6494 debounceDuration = 1000; // milliseconds
6495
6496 // TODO: if somehow user switches keypress target before
6497 // debounce timeout is triggered, we will only capture
6498 // a single breadcrumb from the FIRST target (acceptable?)
6499 return function(evt) {
6500 var target;
6501 try {
6502 target = evt.target;
6503 } catch (e) {
6504 // just accessing event properties can throw an exception in some rare circumstances
6505 // see: https://github.com/getsentry/raven-js/issues/838
6506 return;
6507 }
6508 var tagName = target && target.tagName;
6509
6510 // only consider keypress events on actual input elements
6511 // this will disregard keypresses targeting body (e.g. tabbing
6512 // through elements, hotkeys, etc)
6513 if (
6514 !tagName ||
6515 (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable)
6516 )
6517 return;
6518
6519 // record first keypress in a series, but ignore subsequent
6520 // keypresses until debounce clears
6521 var timeout = self._keypressTimeout;
6522 if (!timeout) {
6523 self._breadcrumbEventHandler('input')(evt);
6524 }
6525 clearTimeout(timeout);
6526 self._keypressTimeout = setTimeout(function() {
6527 self._keypressTimeout = null;
6528 }, debounceDuration);
6529 };
6530 },
6531
6532 /**
6533 * Captures a breadcrumb of type "navigation", normalizing input URLs
6534 * @param to the originating URL
6535 * @param from the target URL
6536 * @private
6537 */
6538 _captureUrlChange: function(from, to) {
6539 var parsedLoc = parseUrl(this._location.href);
6540 var parsedTo = parseUrl(to);
6541 var parsedFrom = parseUrl(from);
6542
6543 // because onpopstate only tells you the "new" (to) value of location.href, and
6544 // not the previous (from) value, we need to track the value of the current URL
6545 // state ourselves
6546 this._lastHref = to;
6547
6548 // Use only the path component of the URL if the URL matches the current
6549 // document (almost all the time when using pushState)
6550 if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host)
6551 to = parsedTo.relative;
6552 if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host)
6553 from = parsedFrom.relative;
6554
6555 this.captureBreadcrumb({
6556 category: 'navigation',
6557 data: {
6558 to: to,
6559 from: from
6560 }
6561 });
6562 },
6563
6564 /**
6565 * Wrap timer functions and event targets to catch errors and provide
6566 * better metadata.
6567 */
6568 _instrumentTryCatch: function() {
6569 var self = this;
6570
6571 var wrappedBuiltIns = self._wrappedBuiltIns;
6572
6573 function wrapTimeFn(orig) {
6574 return function(fn, t) {
6575 // preserve arity
6576 // Make a copy of the arguments to prevent deoptimization
6577 // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
6578 var args = new Array(arguments.length);
6579 for (var i = 0; i < args.length; ++i) {
6580 args[i] = arguments[i];
6581 }
6582 var originalCallback = args[0];
6583 if (isFunction(originalCallback)) {
6584 args[0] = self.wrap(originalCallback);
6585 }
6586
6587 // IE < 9 doesn't support .call/.apply on setInterval/setTimeout, but it
6588 // also supports only two arguments and doesn't care what this is, so we
6589 // can just call the original function directly.
6590 if (orig.apply) {
6591 return orig.apply(this, args);
6592 } else {
6593 return orig(args[0], args[1]);
6594 }
6595 };
6596 }
6597
6598 var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
6599
6600 function wrapEventTarget(global) {
6601 var proto = _window[global] && _window[global].prototype;
6602 if (proto && proto.hasOwnProperty && proto.hasOwnProperty('addEventListener')) {
6603 fill(
6604 proto,
6605 'addEventListener',
6606 function(orig) {
6607 return function(evtName, fn, capture, secure) {
6608 // preserve arity
6609 try {
6610 if (fn && fn.handleEvent) {
6611 fn.handleEvent = self.wrap(fn.handleEvent);
6612 }
6613 } catch (err) {
6614 // can sometimes get 'Permission denied to access property "handle Event'
6615 }
6616
6617 // More breadcrumb DOM capture ... done here and not in `_instrumentBreadcrumbs`
6618 // so that we don't have more than one wrapper function
6619 var before, clickHandler, keypressHandler;
6620
6621 if (
6622 autoBreadcrumbs &&
6623 autoBreadcrumbs.dom &&
6624 (global === 'EventTarget' || global === 'Node')
6625 ) {
6626 // NOTE: generating multiple handlers per addEventListener invocation, should
6627 // revisit and verify we can just use one (almost certainly)
6628 clickHandler = self._breadcrumbEventHandler('click');
6629 keypressHandler = self._keypressEventHandler();
6630 before = function(evt) {
6631 // need to intercept every DOM event in `before` argument, in case that
6632 // same wrapped method is re-used for different events (e.g. mousemove THEN click)
6633 // see #724
6634 if (!evt) return;
6635
6636 var eventType;
6637 try {
6638 eventType = evt.type;
6639 } catch (e) {
6640 // just accessing event properties can throw an exception in some rare circumstances
6641 // see: https://github.com/getsentry/raven-js/issues/838
6642 return;
6643 }
6644 if (eventType === 'click') return clickHandler(evt);
6645 else if (eventType === 'keypress') return keypressHandler(evt);
6646 };
6647 }
6648 return orig.call(
6649 this,
6650 evtName,
6651 self.wrap(fn, undefined, before),
6652 capture,
6653 secure
6654 );
6655 };
6656 },
6657 wrappedBuiltIns
6658 );
6659 fill(
6660 proto,
6661 'removeEventListener',
6662 function(orig) {
6663 return function(evt, fn, capture, secure) {
6664 try {
6665 fn = fn && (fn.__raven_wrapper__ ? fn.__raven_wrapper__ : fn);
6666 } catch (e) {
6667 // ignore, accessing __raven_wrapper__ will throw in some Selenium environments
6668 }
6669 return orig.call(this, evt, fn, capture, secure);
6670 };
6671 },
6672 wrappedBuiltIns
6673 );
6674 }
6675 }
6676
6677 fill(_window, 'setTimeout', wrapTimeFn, wrappedBuiltIns);
6678 fill(_window, 'setInterval', wrapTimeFn, wrappedBuiltIns);
6679 if (_window.requestAnimationFrame) {
6680 fill(
6681 _window,
6682 'requestAnimationFrame',
6683 function(orig) {
6684 return function(cb) {
6685 return orig(self.wrap(cb));
6686 };
6687 },
6688 wrappedBuiltIns
6689 );
6690 }
6691
6692 // event targets borrowed from bugsnag-js:
6693 // https://github.com/bugsnag/bugsnag-js/blob/master/src/bugsnag.js#L666
6694 var eventTargets = [
6695 'EventTarget',
6696 'Window',
6697 'Node',
6698 'ApplicationCache',
6699 'AudioTrackList',
6700 'ChannelMergerNode',
6701 'CryptoOperation',
6702 'EventSource',
6703 'FileReader',
6704 'HTMLUnknownElement',
6705 'IDBDatabase',
6706 'IDBRequest',
6707 'IDBTransaction',
6708 'KeyOperation',
6709 'MediaController',
6710 'MessagePort',
6711 'ModalWindow',
6712 'Notification',
6713 'SVGElementInstance',
6714 'Screen',
6715 'TextTrack',
6716 'TextTrackCue',
6717 'TextTrackList',
6718 'WebSocket',
6719 'WebSocketWorker',
6720 'Worker',
6721 'XMLHttpRequest',
6722 'XMLHttpRequestEventTarget',
6723 'XMLHttpRequestUpload'
6724 ];
6725 for (var i = 0; i < eventTargets.length; i++) {
6726 wrapEventTarget(eventTargets[i]);
6727 }
6728 },
6729
6730 /**
6731 * Instrument browser built-ins w/ breadcrumb capturing
6732 * - XMLHttpRequests
6733 * - DOM interactions (click/typing)
6734 * - window.location changes
6735 * - console
6736 *
6737 * Can be disabled or individually configured via the `autoBreadcrumbs` config option
6738 */
6739 _instrumentBreadcrumbs: function() {
6740 var self = this;
6741 var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
6742
6743 var wrappedBuiltIns = self._wrappedBuiltIns;
6744
6745 function wrapProp(prop, xhr) {
6746 if (prop in xhr && isFunction(xhr[prop])) {
6747 fill(xhr, prop, function(orig) {
6748 return self.wrap(orig);
6749 }); // intentionally don't track filled methods on XHR instances
6750 }
6751 }
6752
6753 if (autoBreadcrumbs.xhr && 'XMLHttpRequest' in _window) {
6754 var xhrproto = XMLHttpRequest.prototype;
6755 fill(
6756 xhrproto,
6757 'open',
6758 function(origOpen) {
6759 return function(method, url) {
6760 // preserve arity
6761
6762 // if Sentry key appears in URL, don't capture
6763 if (isString(url) && url.indexOf(self._globalKey) === -1) {
6764 this.__raven_xhr = {
6765 method: method,
6766 url: url,
6767 status_code: null
6768 };
6769 }
6770
6771 return origOpen.apply(this, arguments);
6772 };
6773 },
6774 wrappedBuiltIns
6775 );
6776
6777 fill(
6778 xhrproto,
6779 'send',
6780 function(origSend) {
6781 return function(data) {
6782 // preserve arity
6783 var xhr = this;
6784
6785 function onreadystatechangeHandler() {
6786 if (xhr.__raven_xhr && xhr.readyState === 4) {
6787 try {
6788 // touching statusCode in some platforms throws
6789 // an exception
6790 xhr.__raven_xhr.status_code = xhr.status;
6791 } catch (e) {
6792 /* do nothing */
6793 }
6794
6795 self.captureBreadcrumb({
6796 type: 'http',
6797 category: 'xhr',
6798 data: xhr.__raven_xhr
6799 });
6800 }
6801 }
6802
6803 var props = ['onload', 'onerror', 'onprogress'];
6804 for (var j = 0; j < props.length; j++) {
6805 wrapProp(props[j], xhr);
6806 }
6807
6808 if ('onreadystatechange' in xhr && isFunction(xhr.onreadystatechange)) {
6809 fill(
6810 xhr,
6811 'onreadystatechange',
6812 function(orig) {
6813 return self.wrap(orig, undefined, onreadystatechangeHandler);
6814 } /* intentionally don't track this instrumentation */
6815 );
6816 } else {
6817 // if onreadystatechange wasn't actually set by the page on this xhr, we
6818 // are free to set our own and capture the breadcrumb
6819 xhr.onreadystatechange = onreadystatechangeHandler;
6820 }
6821
6822 return origSend.apply(this, arguments);
6823 };
6824 },
6825 wrappedBuiltIns
6826 );
6827 }
6828
6829 if (autoBreadcrumbs.xhr && 'fetch' in _window) {
6830 fill(
6831 _window,
6832 'fetch',
6833 function(origFetch) {
6834 return function(fn, t) {
6835 // preserve arity
6836 // Make a copy of the arguments to prevent deoptimization
6837 // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
6838 var args = new Array(arguments.length);
6839 for (var i = 0; i < args.length; ++i) {
6840 args[i] = arguments[i];
6841 }
6842
6843 var fetchInput = args[0];
6844 var method = 'GET';
6845 var url;
6846
6847 if (typeof fetchInput === 'string') {
6848 url = fetchInput;
6849 } else if ('Request' in _window && fetchInput instanceof _window.Request) {
6850 url = fetchInput.url;
6851 if (fetchInput.method) {
6852 method = fetchInput.method;
6853 }
6854 } else {
6855 url = '' + fetchInput;
6856 }
6857
6858 if (args[1] && args[1].method) {
6859 method = args[1].method;
6860 }
6861
6862 var fetchData = {
6863 method: method,
6864 url: url,
6865 status_code: null
6866 };
6867
6868 self.captureBreadcrumb({
6869 type: 'http',
6870 category: 'fetch',
6871 data: fetchData
6872 });
6873
6874 return origFetch.apply(this, args).then(function(response) {
6875 fetchData.status_code = response.status;
6876
6877 return response;
6878 });
6879 };
6880 },
6881 wrappedBuiltIns
6882 );
6883 }
6884
6885 // Capture breadcrumbs from any click that is unhandled / bubbled up all the way
6886 // to the document. Do this before we instrument addEventListener.
6887 if (autoBreadcrumbs.dom && this._hasDocument) {
6888 if (_document.addEventListener) {
6889 _document.addEventListener('click', self._breadcrumbEventHandler('click'), false);
6890 _document.addEventListener('keypress', self._keypressEventHandler(), false);
6891 } else {
6892 // IE8 Compatibility
6893 _document.attachEvent('onclick', self._breadcrumbEventHandler('click'));
6894 _document.attachEvent('onkeypress', self._keypressEventHandler());
6895 }
6896 }
6897
6898 // record navigation (URL) changes
6899 // NOTE: in Chrome App environment, touching history.pushState, *even inside
6900 // a try/catch block*, will cause Chrome to output an error to console.error
6901 // borrowed from: https://github.com/angular/angular.js/pull/13945/files
6902 var chrome = _window.chrome;
6903 var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;
6904 var hasPushAndReplaceState =
6905 !isChromePackagedApp &&
6906 _window.history &&
6907 history.pushState &&
6908 history.replaceState;
6909 if (autoBreadcrumbs.location && hasPushAndReplaceState) {
6910 // TODO: remove onpopstate handler on uninstall()
6911 var oldOnPopState = _window.onpopstate;
6912 _window.onpopstate = function() {
6913 var currentHref = self._location.href;
6914 self._captureUrlChange(self._lastHref, currentHref);
6915
6916 if (oldOnPopState) {
6917 return oldOnPopState.apply(this, arguments);
6918 }
6919 };
6920
6921 var historyReplacementFunction = function(origHistFunction) {
6922 // note history.pushState.length is 0; intentionally not declaring
6923 // params to preserve 0 arity
6924 return function(/* state, title, url */) {
6925 var url = arguments.length > 2 ? arguments[2] : undefined;
6926
6927 // url argument is optional
6928 if (url) {
6929 // coerce to string (this is what pushState does)
6930 self._captureUrlChange(self._lastHref, url + '');
6931 }
6932
6933 return origHistFunction.apply(this, arguments);
6934 };
6935 };
6936
6937 fill(history, 'pushState', historyReplacementFunction, wrappedBuiltIns);
6938 fill(history, 'replaceState', historyReplacementFunction, wrappedBuiltIns);
6939 }
6940
6941 if (autoBreadcrumbs.console && 'console' in _window && console.log) {
6942 // console
6943 var consoleMethodCallback = function(msg, data) {
6944 self.captureBreadcrumb({
6945 message: msg,
6946 level: data.level,
6947 category: 'console'
6948 });
6949 };
6950
6951 each(['debug', 'info', 'warn', 'error', 'log'], function(_, level) {
6952 wrapConsoleMethod(console, level, consoleMethodCallback);
6953 });
6954 }
6955 },
6956
6957 _restoreBuiltIns: function() {
6958 // restore any wrapped builtins
6959 var builtin;
6960 while (this._wrappedBuiltIns.length) {
6961 builtin = this._wrappedBuiltIns.shift();
6962
6963 var obj = builtin[0],
6964 name = builtin[1],
6965 orig = builtin[2];
6966
6967 obj[name] = orig;
6968 }
6969 },
6970
6971 _drainPlugins: function() {
6972 var self = this;
6973
6974 // FIX ME TODO
6975 each(this._plugins, function(_, plugin) {
6976 var installer = plugin[0];
6977 var args = plugin[1];
6978 installer.apply(self, [self].concat(args));
6979 });
6980 },
6981
6982 _parseDSN: function(str) {
6983 var m = dsnPattern.exec(str),
6984 dsn = {},
6985 i = 7;
6986
6987 try {
6988 while (i--) dsn[dsnKeys[i]] = m[i] || '';
6989 } catch (e) {
6990 throw new RavenConfigError('Invalid DSN: ' + str);
6991 }
6992
6993 if (dsn.pass && !this._globalOptions.allowSecretKey) {
6994 throw new RavenConfigError(
6995 'Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key'
6996 );
6997 }
6998
6999 return dsn;
7000 },
7001
7002 _getGlobalServer: function(uri) {
7003 // assemble the endpoint from the uri pieces
7004 var globalServer = '//' + uri.host + (uri.port ? ':' + uri.port : '');
7005
7006 if (uri.protocol) {
7007 globalServer = uri.protocol + ':' + globalServer;
7008 }
7009 return globalServer;
7010 },
7011
7012 _handleOnErrorStackInfo: function() {
7013 // if we are intentionally ignoring errors via onerror, bail out
7014 if (!this._ignoreOnError) {
7015 this._handleStackInfo.apply(this, arguments);
7016 }
7017 },
7018
7019 _handleStackInfo: function(stackInfo, options) {
7020 var frames = this._prepareFrames(stackInfo, options);
7021
7022 this._triggerEvent('handle', {
7023 stackInfo: stackInfo,
7024 options: options
7025 });
7026
7027 this._processException(
7028 stackInfo.name,
7029 stackInfo.message,
7030 stackInfo.url,
7031 stackInfo.lineno,
7032 frames,
7033 options
7034 );
7035 },
7036
7037 _prepareFrames: function(stackInfo, options) {
7038 var self = this;
7039 var frames = [];
7040 if (stackInfo.stack && stackInfo.stack.length) {
7041 each(stackInfo.stack, function(i, stack) {
7042 var frame = self._normalizeFrame(stack, stackInfo.url);
7043 if (frame) {
7044 frames.push(frame);
7045 }
7046 });
7047
7048 // e.g. frames captured via captureMessage throw
7049 if (options && options.trimHeadFrames) {
7050 for (var j = 0; j < options.trimHeadFrames && j < frames.length; j++) {
7051 frames[j].in_app = false;
7052 }
7053 }
7054 }
7055 frames = frames.slice(0, this._globalOptions.stackTraceLimit);
7056 return frames;
7057 },
7058
7059 _normalizeFrame: function(frame, stackInfoUrl) {
7060 // normalize the frames data
7061 var normalized = {
7062 filename: frame.url,
7063 lineno: frame.line,
7064 colno: frame.column,
7065 function: frame.func || '?'
7066 };
7067
7068 // Case when we don't have any information about the error
7069 // E.g. throwing a string or raw object, instead of an `Error` in Firefox
7070 // Generating synthetic error doesn't add any value here
7071 //
7072 // We should probably somehow let a user know that they should fix their code
7073 if (!frame.url) {
7074 normalized.filename = stackInfoUrl; // fallback to whole stacks url from onerror handler
7075 }
7076
7077 normalized.in_app = !// determine if an exception came from outside of our app
7078 // first we check the global includePaths list.
7079 (
7080 (!!this._globalOptions.includePaths.test &&
7081 !this._globalOptions.includePaths.test(normalized.filename)) ||
7082 // Now we check for fun, if the function name is Raven or TraceKit
7083 /(Raven|TraceKit)\./.test(normalized['function']) ||
7084 // finally, we do a last ditch effort and check for raven.min.js
7085 /raven\.(min\.)?js$/.test(normalized.filename)
7086 );
7087
7088 return normalized;
7089 },
7090
7091 _processException: function(type, message, fileurl, lineno, frames, options) {
7092 var prefixedMessage = (type ? type + ': ' : '') + (message || '');
7093 if (
7094 !!this._globalOptions.ignoreErrors.test &&
7095 (this._globalOptions.ignoreErrors.test(message) ||
7096 this._globalOptions.ignoreErrors.test(prefixedMessage))
7097 ) {
7098 return;
7099 }
7100
7101 var stacktrace;
7102
7103 if (frames && frames.length) {
7104 fileurl = frames[0].filename || fileurl;
7105 // Sentry expects frames oldest to newest
7106 // and JS sends them as newest to oldest
7107 frames.reverse();
7108 stacktrace = {frames: frames};
7109 } else if (fileurl) {
7110 stacktrace = {
7111 frames: [
7112 {
7113 filename: fileurl,
7114 lineno: lineno,
7115 in_app: true
7116 }
7117 ]
7118 };
7119 }
7120
7121 if (
7122 !!this._globalOptions.ignoreUrls.test &&
7123 this._globalOptions.ignoreUrls.test(fileurl)
7124 ) {
7125 return;
7126 }
7127
7128 if (
7129 !!this._globalOptions.whitelistUrls.test &&
7130 !this._globalOptions.whitelistUrls.test(fileurl)
7131 ) {
7132 return;
7133 }
7134
7135 var data = objectMerge(
7136 {
7137 // sentry.interfaces.Exception
7138 exception: {
7139 values: [
7140 {
7141 type: type,
7142 value: message,
7143 stacktrace: stacktrace
7144 }
7145 ]
7146 },
7147 culprit: fileurl
7148 },
7149 options
7150 );
7151
7152 // Fire away!
7153 this._send(data);
7154 },
7155
7156 _trimPacket: function(data) {
7157 // For now, we only want to truncate the two different messages
7158 // but this could/should be expanded to just trim everything
7159 var max = this._globalOptions.maxMessageLength;
7160 if (data.message) {
7161 data.message = truncate(data.message, max);
7162 }
7163 if (data.exception) {
7164 var exception = data.exception.values[0];
7165 exception.value = truncate(exception.value, max);
7166 }
7167
7168 var request = data.request;
7169 if (request) {
7170 if (request.url) {
7171 request.url = truncate(request.url, this._globalOptions.maxUrlLength);
7172 }
7173 if (request.Referer) {
7174 request.Referer = truncate(request.Referer, this._globalOptions.maxUrlLength);
7175 }
7176 }
7177
7178 if (data.breadcrumbs && data.breadcrumbs.values)
7179 this._trimBreadcrumbs(data.breadcrumbs);
7180
7181 return data;
7182 },
7183
7184 /**
7185 * Truncate breadcrumb values (right now just URLs)
7186 */
7187 _trimBreadcrumbs: function(breadcrumbs) {
7188 // known breadcrumb properties with urls
7189 // TODO: also consider arbitrary prop values that start with (https?)?://
7190 var urlProps = ['to', 'from', 'url'],
7191 urlProp,
7192 crumb,
7193 data;
7194
7195 for (var i = 0; i < breadcrumbs.values.length; ++i) {
7196 crumb = breadcrumbs.values[i];
7197 if (
7198 !crumb.hasOwnProperty('data') ||
7199 !isObject(crumb.data) ||
7200 objectFrozen(crumb.data)
7201 )
7202 continue;
7203
7204 data = objectMerge({}, crumb.data);
7205 for (var j = 0; j < urlProps.length; ++j) {
7206 urlProp = urlProps[j];
7207 if (data.hasOwnProperty(urlProp) && data[urlProp]) {
7208 data[urlProp] = truncate(data[urlProp], this._globalOptions.maxUrlLength);
7209 }
7210 }
7211 breadcrumbs.values[i].data = data;
7212 }
7213 },
7214
7215 _getHttpData: function() {
7216 if (!this._hasNavigator && !this._hasDocument) return;
7217 var httpData = {};
7218
7219 if (this._hasNavigator && _navigator.userAgent) {
7220 httpData.headers = {
7221 'User-Agent': navigator.userAgent
7222 };
7223 }
7224
7225 if (this._hasDocument) {
7226 if (_document.location && _document.location.href) {
7227 httpData.url = _document.location.href;
7228 }
7229 if (_document.referrer) {
7230 if (!httpData.headers) httpData.headers = {};
7231 httpData.headers.Referer = _document.referrer;
7232 }
7233 }
7234
7235 return httpData;
7236 },
7237
7238 _resetBackoff: function() {
7239 this._backoffDuration = 0;
7240 this._backoffStart = null;
7241 },
7242
7243 _shouldBackoff: function() {
7244 return this._backoffDuration && now() - this._backoffStart < this._backoffDuration;
7245 },
7246
7247 /**
7248 * Returns true if the in-process data payload matches the signature
7249 * of the previously-sent data
7250 *
7251 * NOTE: This has to be done at this level because TraceKit can generate
7252 * data from window.onerror WITHOUT an exception object (IE8, IE9,
7253 * other old browsers). This can take the form of an "exception"
7254 * data object with a single frame (derived from the onerror args).
7255 */
7256 _isRepeatData: function(current) {
7257 var last = this._lastData;
7258
7259 if (
7260 !last ||
7261 current.message !== last.message || // defined for captureMessage
7262 current.culprit !== last.culprit // defined for captureException/onerror
7263 )
7264 return false;
7265
7266 // Stacktrace interface (i.e. from captureMessage)
7267 if (current.stacktrace || last.stacktrace) {
7268 return isSameStacktrace(current.stacktrace, last.stacktrace);
7269 } else if (current.exception || last.exception) {
7270 // Exception interface (i.e. from captureException/onerror)
7271 return isSameException(current.exception, last.exception);
7272 }
7273
7274 return true;
7275 },
7276
7277 _setBackoffState: function(request) {
7278 // If we are already in a backoff state, don't change anything
7279 if (this._shouldBackoff()) {
7280 return;
7281 }
7282
7283 var status = request.status;
7284
7285 // 400 - project_id doesn't exist or some other fatal
7286 // 401 - invalid/revoked dsn
7287 // 429 - too many requests
7288 if (!(status === 400 || status === 401 || status === 429)) return;
7289
7290 var retry;
7291 try {
7292 // If Retry-After is not in Access-Control-Expose-Headers, most
7293 // browsers will throw an exception trying to access it
7294 retry = request.getResponseHeader('Retry-After');
7295 retry = parseInt(retry, 10) * 1000; // Retry-After is returned in seconds
7296 } catch (e) {
7297 /* eslint no-empty:0 */
7298 }
7299
7300 this._backoffDuration = retry
7301 ? // If Sentry server returned a Retry-After value, use it
7302 retry
7303 : // Otherwise, double the last backoff duration (starts at 1 sec)
7304 this._backoffDuration * 2 || 1000;
7305
7306 this._backoffStart = now();
7307 },
7308
7309 _send: function(data) {
7310 var globalOptions = this._globalOptions;
7311
7312 var baseData = {
7313 project: this._globalProject,
7314 logger: globalOptions.logger,
7315 platform: 'javascript'
7316 },
7317 httpData = this._getHttpData();
7318
7319 if (httpData) {
7320 baseData.request = httpData;
7321 }
7322
7323 // HACK: delete `trimHeadFrames` to prevent from appearing in outbound payload
7324 if (data.trimHeadFrames) delete data.trimHeadFrames;
7325
7326 data = objectMerge(baseData, data);
7327
7328 // Merge in the tags and extra separately since objectMerge doesn't handle a deep merge
7329 data.tags = objectMerge(objectMerge({}, this._globalContext.tags), data.tags);
7330 data.extra = objectMerge(objectMerge({}, this._globalContext.extra), data.extra);
7331
7332 // Send along our own collected metadata with extra
7333 data.extra['session:duration'] = now() - this._startTime;
7334
7335 if (this._breadcrumbs && this._breadcrumbs.length > 0) {
7336 // intentionally make shallow copy so that additions
7337 // to breadcrumbs aren't accidentally sent in this request
7338 data.breadcrumbs = {
7339 values: [].slice.call(this._breadcrumbs, 0)
7340 };
7341 }
7342
7343 // If there are no tags/extra, strip the key from the payload alltogther.
7344 if (isEmptyObject(data.tags)) delete data.tags;
7345
7346 if (this._globalContext.user) {
7347 // sentry.interfaces.User
7348 data.user = this._globalContext.user;
7349 }
7350
7351 // Include the environment if it's defined in globalOptions
7352 if (globalOptions.environment) data.environment = globalOptions.environment;
7353
7354 // Include the release if it's defined in globalOptions
7355 if (globalOptions.release) data.release = globalOptions.release;
7356
7357 // Include server_name if it's defined in globalOptions
7358 if (globalOptions.serverName) data.server_name = globalOptions.serverName;
7359
7360 if (isFunction(globalOptions.dataCallback)) {
7361 data = globalOptions.dataCallback(data) || data;
7362 }
7363
7364 // Why??????????
7365 if (!data || isEmptyObject(data)) {
7366 return;
7367 }
7368
7369 // Check if the request should be filtered or not
7370 if (
7371 isFunction(globalOptions.shouldSendCallback) &&
7372 !globalOptions.shouldSendCallback(data)
7373 ) {
7374 return;
7375 }
7376
7377 // Backoff state: Sentry server previously responded w/ an error (e.g. 429 - too many requests),
7378 // so drop requests until "cool-off" period has elapsed.
7379 if (this._shouldBackoff()) {
7380 this._logDebug('warn', 'Raven dropped error due to backoff: ', data);
7381 return;
7382 }
7383
7384 if (typeof globalOptions.sampleRate === 'number') {
7385 if (Math.random() < globalOptions.sampleRate) {
7386 this._sendProcessedPayload(data);
7387 }
7388 } else {
7389 this._sendProcessedPayload(data);
7390 }
7391 },
7392
7393 _getUuid: function() {
7394 return uuid4();
7395 },
7396
7397 _sendProcessedPayload: function(data, callback) {
7398 var self = this;
7399 var globalOptions = this._globalOptions;
7400
7401 if (!this.isSetup()) return;
7402
7403 // Try and clean up the packet before sending by truncating long values
7404 data = this._trimPacket(data);
7405
7406 // ideally duplicate error testing should occur *before* dataCallback/shouldSendCallback,
7407 // but this would require copying an un-truncated copy of the data packet, which can be
7408 // arbitrarily deep (extra_data) -- could be worthwhile? will revisit
7409 if (!this._globalOptions.allowDuplicates && this._isRepeatData(data)) {
7410 this._logDebug('warn', 'Raven dropped repeat event: ', data);
7411 return;
7412 }
7413
7414 // Send along an event_id if not explicitly passed.
7415 // This event_id can be used to reference the error within Sentry itself.
7416 // Set lastEventId after we know the error should actually be sent
7417 this._lastEventId = data.event_id || (data.event_id = this._getUuid());
7418
7419 // Store outbound payload after trim
7420 this._lastData = data;
7421
7422 this._logDebug('debug', 'Raven about to send:', data);
7423
7424 var auth = {
7425 sentry_version: '7',
7426 sentry_client: 'raven-js/' + this.VERSION,
7427 sentry_key: this._globalKey
7428 };
7429
7430 if (this._globalSecret) {
7431 auth.sentry_secret = this._globalSecret;
7432 }
7433
7434 var exception = data.exception && data.exception.values[0];
7435 this.captureBreadcrumb({
7436 category: 'sentry',
7437 message: exception
7438 ? (exception.type ? exception.type + ': ' : '') + exception.value
7439 : data.message,
7440 event_id: data.event_id,
7441 level: data.level || 'error' // presume error unless specified
7442 });
7443
7444 var url = this._globalEndpoint;
7445 (globalOptions.transport || this._makeRequest).call(this, {
7446 url: url,
7447 auth: auth,
7448 data: data,
7449 options: globalOptions,
7450 onSuccess: function success() {
7451 self._resetBackoff();
7452
7453 self._triggerEvent('success', {
7454 data: data,
7455 src: url
7456 });
7457 callback && callback();
7458 },
7459 onError: function failure(error) {
7460 self._logDebug('error', 'Raven transport failed to send: ', error);
7461
7462 if (error.request) {
7463 self._setBackoffState(error.request);
7464 }
7465
7466 self._triggerEvent('failure', {
7467 data: data,
7468 src: url
7469 });
7470 error = error || new Error('Raven send failed (no additional details provided)');
7471 callback && callback(error);
7472 }
7473 });
7474 },
7475
7476 _makeRequest: function(opts) {
7477 var request = _window.XMLHttpRequest && new _window.XMLHttpRequest();
7478 if (!request) return;
7479
7480 // if browser doesn't support CORS (e.g. IE7), we are out of luck
7481 var hasCORS = 'withCredentials' in request || typeof XDomainRequest !== 'undefined';
7482
7483 if (!hasCORS) return;
7484
7485 var url = opts.url;
7486
7487 if ('withCredentials' in request) {
7488 request.onreadystatechange = function() {
7489 if (request.readyState !== 4) {
7490 return;
7491 } else if (request.status === 200) {
7492 opts.onSuccess && opts.onSuccess();
7493 } else if (opts.onError) {
7494 var err = new Error('Sentry error code: ' + request.status);
7495 err.request = request;
7496 opts.onError(err);
7497 }
7498 };
7499 } else {
7500 request = new XDomainRequest();
7501 // xdomainrequest cannot go http -> https (or vice versa),
7502 // so always use protocol relative
7503 url = url.replace(/^https?:/, '');
7504
7505 // onreadystatechange not supported by XDomainRequest
7506 if (opts.onSuccess) {
7507 request.onload = opts.onSuccess;
7508 }
7509 if (opts.onError) {
7510 request.onerror = function() {
7511 var err = new Error('Sentry error code: XDomainRequest');
7512 err.request = request;
7513 opts.onError(err);
7514 };
7515 }
7516 }
7517
7518 // NOTE: auth is intentionally sent as part of query string (NOT as custom
7519 // HTTP header) so as to avoid preflight CORS requests
7520 request.open('POST', url + '?' + urlencode(opts.auth));
7521 request.send(stringify(opts.data));
7522 },
7523
7524 _logDebug: function(level) {
7525 if (this._originalConsoleMethods[level] && this.debug) {
7526 // In IE<10 console methods do not have their own 'apply' method
7527 Function.prototype.apply.call(
7528 this._originalConsoleMethods[level],
7529 this._originalConsole,
7530 [].slice.call(arguments, 1)
7531 );
7532 }
7533 },
7534
7535 _mergeContext: function(key, context) {
7536 if (isUndefined(context)) {
7537 delete this._globalContext[key];
7538 } else {
7539 this._globalContext[key] = objectMerge(this._globalContext[key] || {}, context);
7540 }
7541 }
7542 };
7543
7544 // Deprecations
7545 Raven.prototype.setUser = Raven.prototype.setUserContext;
7546 Raven.prototype.setReleaseContext = Raven.prototype.setRelease;
7547
7548 module.exports = Raven;
7549
7550
7551 /***/ }),
7552
7553 /***/ "./node_modules/raven-js/src/singleton.js":
7554 /*!************************************************!*\
7555 !*** ./node_modules/raven-js/src/singleton.js ***!
7556 \************************************************/
7557 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7558
7559 /**
7560 * Enforces a single instance of the Raven client, and the
7561 * main entry point for Raven. If you are a consumer of the
7562 * Raven library, you SHOULD load this file (vs raven.js).
7563 **/
7564
7565 var RavenConstructor = __webpack_require__(/*! ./raven */ "./node_modules/raven-js/src/raven.js");
7566
7567 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
7568 var _window =
7569 typeof window !== 'undefined'
7570 ? window
7571 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
7572 var _Raven = _window.Raven;
7573
7574 var Raven = new RavenConstructor();
7575
7576 /*
7577 * Allow multiple versions of Raven to be installed.
7578 * Strip Raven from the global context and returns the instance.
7579 *
7580 * @return {Raven}
7581 */
7582 Raven.noConflict = function() {
7583 _window.Raven = _Raven;
7584 return Raven;
7585 };
7586
7587 Raven.afterLoad();
7588
7589 module.exports = Raven;
7590
7591
7592 /***/ }),
7593
7594 /***/ "./node_modules/raven-js/src/utils.js":
7595 /*!********************************************!*\
7596 !*** ./node_modules/raven-js/src/utils.js ***!
7597 \********************************************/
7598 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7599
7600 var _window =
7601 typeof window !== 'undefined'
7602 ? window
7603 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
7604
7605 function isObject(what) {
7606 return typeof what === 'object' && what !== null;
7607 }
7608
7609 // Yanked from https://git.io/vS8DV re-used under CC0
7610 // with some tiny modifications
7611 function isError(value) {
7612 switch ({}.toString.call(value)) {
7613 case '[object Error]':
7614 return true;
7615 case '[object Exception]':
7616 return true;
7617 case '[object DOMException]':
7618 return true;
7619 default:
7620 return value instanceof Error;
7621 }
7622 }
7623
7624 function isErrorEvent(value) {
7625 return supportsErrorEvent() && {}.toString.call(value) === '[object ErrorEvent]';
7626 }
7627
7628 function isUndefined(what) {
7629 return what === void 0;
7630 }
7631
7632 function isFunction(what) {
7633 return typeof what === 'function';
7634 }
7635
7636 function isString(what) {
7637 return Object.prototype.toString.call(what) === '[object String]';
7638 }
7639
7640 function isEmptyObject(what) {
7641 for (var _ in what) return false; // eslint-disable-line guard-for-in, no-unused-vars
7642 return true;
7643 }
7644
7645 function supportsErrorEvent() {
7646 try {
7647 new ErrorEvent(''); // eslint-disable-line no-new
7648 return true;
7649 } catch (e) {
7650 return false;
7651 }
7652 }
7653
7654 function wrappedCallback(callback) {
7655 function dataCallback(data, original) {
7656 var normalizedData = callback(data) || data;
7657 if (original) {
7658 return original(normalizedData) || normalizedData;
7659 }
7660 return normalizedData;
7661 }
7662
7663 return dataCallback;
7664 }
7665
7666 function each(obj, callback) {
7667 var i, j;
7668
7669 if (isUndefined(obj.length)) {
7670 for (i in obj) {
7671 if (hasKey(obj, i)) {
7672 callback.call(null, i, obj[i]);
7673 }
7674 }
7675 } else {
7676 j = obj.length;
7677 if (j) {
7678 for (i = 0; i < j; i++) {
7679 callback.call(null, i, obj[i]);
7680 }
7681 }
7682 }
7683 }
7684
7685 function objectMerge(obj1, obj2) {
7686 if (!obj2) {
7687 return obj1;
7688 }
7689 each(obj2, function(key, value) {
7690 obj1[key] = value;
7691 });
7692 return obj1;
7693 }
7694
7695 /**
7696 * This function is only used for react-native.
7697 * react-native freezes object that have already been sent over the
7698 * js bridge. We need this function in order to check if the object is frozen.
7699 * So it's ok that objectFrozen returns false if Object.isFrozen is not
7700 * supported because it's not relevant for other "platforms". See related issue:
7701 * https://github.com/getsentry/react-native-sentry/issues/57
7702 */
7703 function objectFrozen(obj) {
7704 if (!Object.isFrozen) {
7705 return false;
7706 }
7707 return Object.isFrozen(obj);
7708 }
7709
7710 function truncate(str, max) {
7711 return !max || str.length <= max ? str : str.substr(0, max) + '\u2026';
7712 }
7713
7714 /**
7715 * hasKey, a better form of hasOwnProperty
7716 * Example: hasKey(MainHostObject, property) === true/false
7717 *
7718 * @param {Object} host object to check property
7719 * @param {string} key to check
7720 */
7721 function hasKey(object, key) {
7722 return Object.prototype.hasOwnProperty.call(object, key);
7723 }
7724
7725 function joinRegExp(patterns) {
7726 // Combine an array of regular expressions and strings into one large regexp
7727 // Be mad.
7728 var sources = [],
7729 i = 0,
7730 len = patterns.length,
7731 pattern;
7732
7733 for (; i < len; i++) {
7734 pattern = patterns[i];
7735 if (isString(pattern)) {
7736 // If it's a string, we need to escape it
7737 // Taken from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
7738 sources.push(pattern.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, '\\$1'));
7739 } else if (pattern && pattern.source) {
7740 // If it's a regexp already, we want to extract the source
7741 sources.push(pattern.source);
7742 }
7743 // Intentionally skip other cases
7744 }
7745 return new RegExp(sources.join('|'), 'i');
7746 }
7747
7748 function urlencode(o) {
7749 var pairs = [];
7750 each(o, function(key, value) {
7751 pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));
7752 });
7753 return pairs.join('&');
7754 }
7755
7756 // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B
7757 // intentionally using regex and not <a/> href parsing trick because React Native and other
7758 // environments where DOM might not be available
7759 function parseUrl(url) {
7760 var match = url.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);
7761 if (!match) return {};
7762
7763 // coerce to undefined values to empty string so we don't get 'undefined'
7764 var query = match[6] || '';
7765 var fragment = match[8] || '';
7766 return {
7767 protocol: match[2],
7768 host: match[4],
7769 path: match[5],
7770 relative: match[5] + query + fragment // everything minus origin
7771 };
7772 }
7773 function uuid4() {
7774 var crypto = _window.crypto || _window.msCrypto;
7775
7776 if (!isUndefined(crypto) && crypto.getRandomValues) {
7777 // Use window.crypto API if available
7778 // eslint-disable-next-line no-undef
7779 var arr = new Uint16Array(8);
7780 crypto.getRandomValues(arr);
7781
7782 // set 4 in byte 7
7783 arr[3] = (arr[3] & 0xfff) | 0x4000;
7784 // set 2 most significant bits of byte 9 to '10'
7785 arr[4] = (arr[4] & 0x3fff) | 0x8000;
7786
7787 var pad = function(num) {
7788 var v = num.toString(16);
7789 while (v.length < 4) {
7790 v = '0' + v;
7791 }
7792 return v;
7793 };
7794
7795 return (
7796 pad(arr[0]) +
7797 pad(arr[1]) +
7798 pad(arr[2]) +
7799 pad(arr[3]) +
7800 pad(arr[4]) +
7801 pad(arr[5]) +
7802 pad(arr[6]) +
7803 pad(arr[7])
7804 );
7805 } else {
7806 // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523
7807 return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
7808 var r = (Math.random() * 16) | 0,
7809 v = c === 'x' ? r : (r & 0x3) | 0x8;
7810 return v.toString(16);
7811 });
7812 }
7813 }
7814
7815 /**
7816 * Given a child DOM element, returns a query-selector statement describing that
7817 * and its ancestors
7818 * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]
7819 * @param elem
7820 * @returns {string}
7821 */
7822 function htmlTreeAsString(elem) {
7823 /* eslint no-extra-parens:0*/
7824 var MAX_TRAVERSE_HEIGHT = 5,
7825 MAX_OUTPUT_LEN = 80,
7826 out = [],
7827 height = 0,
7828 len = 0,
7829 separator = ' > ',
7830 sepLength = separator.length,
7831 nextStr;
7832
7833 while (elem && height++ < MAX_TRAVERSE_HEIGHT) {
7834 nextStr = htmlElementAsString(elem);
7835 // bail out if
7836 // - nextStr is the 'html' element
7837 // - the length of the string that would be created exceeds MAX_OUTPUT_LEN
7838 // (ignore this limit if we are on the first iteration)
7839 if (
7840 nextStr === 'html' ||
7841 (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)
7842 ) {
7843 break;
7844 }
7845
7846 out.push(nextStr);
7847
7848 len += nextStr.length;
7849 elem = elem.parentNode;
7850 }
7851
7852 return out.reverse().join(separator);
7853 }
7854
7855 /**
7856 * Returns a simple, query-selector representation of a DOM element
7857 * e.g. [HTMLElement] => input#foo.btn[name=baz]
7858 * @param HTMLElement
7859 * @returns {string}
7860 */
7861 function htmlElementAsString(elem) {
7862 var out = [],
7863 className,
7864 classes,
7865 key,
7866 attr,
7867 i;
7868
7869 if (!elem || !elem.tagName) {
7870 return '';
7871 }
7872
7873 out.push(elem.tagName.toLowerCase());
7874 if (elem.id) {
7875 out.push('#' + elem.id);
7876 }
7877
7878 className = elem.className;
7879 if (className && isString(className)) {
7880 classes = className.split(/\s+/);
7881 for (i = 0; i < classes.length; i++) {
7882 out.push('.' + classes[i]);
7883 }
7884 }
7885 var attrWhitelist = ['type', 'name', 'title', 'alt'];
7886 for (i = 0; i < attrWhitelist.length; i++) {
7887 key = attrWhitelist[i];
7888 attr = elem.getAttribute(key);
7889 if (attr) {
7890 out.push('[' + key + '="' + attr + '"]');
7891 }
7892 }
7893 return out.join('');
7894 }
7895
7896 /**
7897 * Returns true if either a OR b is truthy, but not both
7898 */
7899 function isOnlyOneTruthy(a, b) {
7900 return !!(!!a ^ !!b);
7901 }
7902
7903 /**
7904 * Returns true if the two input exception interfaces have the same content
7905 */
7906 function isSameException(ex1, ex2) {
7907 if (isOnlyOneTruthy(ex1, ex2)) return false;
7908
7909 ex1 = ex1.values[0];
7910 ex2 = ex2.values[0];
7911
7912 if (ex1.type !== ex2.type || ex1.value !== ex2.value) return false;
7913
7914 return isSameStacktrace(ex1.stacktrace, ex2.stacktrace);
7915 }
7916
7917 /**
7918 * Returns true if the two input stack trace interfaces have the same content
7919 */
7920 function isSameStacktrace(stack1, stack2) {
7921 if (isOnlyOneTruthy(stack1, stack2)) return false;
7922
7923 var frames1 = stack1.frames;
7924 var frames2 = stack2.frames;
7925
7926 // Exit early if frame count differs
7927 if (frames1.length !== frames2.length) return false;
7928
7929 // Iterate through every frame; bail out if anything differs
7930 var a, b;
7931 for (var i = 0; i < frames1.length; i++) {
7932 a = frames1[i];
7933 b = frames2[i];
7934 if (
7935 a.filename !== b.filename ||
7936 a.lineno !== b.lineno ||
7937 a.colno !== b.colno ||
7938 a['function'] !== b['function']
7939 )
7940 return false;
7941 }
7942 return true;
7943 }
7944
7945 /**
7946 * Polyfill a method
7947 * @param obj object e.g. `document`
7948 * @param name method name present on object e.g. `addEventListener`
7949 * @param replacement replacement function
7950 * @param track {optional} record instrumentation to an array
7951 */
7952 function fill(obj, name, replacement, track) {
7953 var orig = obj[name];
7954 obj[name] = replacement(orig);
7955 if (track) {
7956 track.push([obj, name, orig]);
7957 }
7958 }
7959
7960 module.exports = {
7961 isObject: isObject,
7962 isError: isError,
7963 isErrorEvent: isErrorEvent,
7964 isUndefined: isUndefined,
7965 isFunction: isFunction,
7966 isString: isString,
7967 isEmptyObject: isEmptyObject,
7968 supportsErrorEvent: supportsErrorEvent,
7969 wrappedCallback: wrappedCallback,
7970 each: each,
7971 objectMerge: objectMerge,
7972 truncate: truncate,
7973 objectFrozen: objectFrozen,
7974 hasKey: hasKey,
7975 joinRegExp: joinRegExp,
7976 urlencode: urlencode,
7977 uuid4: uuid4,
7978 htmlTreeAsString: htmlTreeAsString,
7979 htmlElementAsString: htmlElementAsString,
7980 isSameException: isSameException,
7981 isSameStacktrace: isSameStacktrace,
7982 parseUrl: parseUrl,
7983 fill: fill
7984 };
7985
7986
7987 /***/ }),
7988
7989 /***/ "./node_modules/raven-js/vendor/TraceKit/tracekit.js":
7990 /*!***********************************************************!*\
7991 !*** ./node_modules/raven-js/vendor/TraceKit/tracekit.js ***!
7992 \***********************************************************/
7993 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7994
7995 var utils = __webpack_require__(/*! ../../src/utils */ "./node_modules/raven-js/src/utils.js");
7996
7997 /*
7998 TraceKit - Cross brower stack traces
7999
8000 This was originally forked from github.com/occ/TraceKit, but has since been
8001 largely re-written and is now maintained as part of raven-js. Tests for
8002 this are in test/vendor.
8003
8004 MIT license
8005 */
8006
8007 var TraceKit = {
8008 collectWindowErrors: true,
8009 debug: false
8010 };
8011
8012 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
8013 var _window =
8014 typeof window !== 'undefined'
8015 ? window
8016 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
8017
8018 // global reference to slice
8019 var _slice = [].slice;
8020 var UNKNOWN_FUNCTION = '?';
8021
8022 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types
8023 var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;
8024
8025 function getLocationHref() {
8026 if (typeof document === 'undefined' || document.location == null) return '';
8027
8028 return document.location.href;
8029 }
8030
8031 /**
8032 * TraceKit.report: cross-browser processing of unhandled exceptions
8033 *
8034 * Syntax:
8035 * TraceKit.report.subscribe(function(stackInfo) { ... })
8036 * TraceKit.report.unsubscribe(function(stackInfo) { ... })
8037 * TraceKit.report(exception)
8038 * try { ...code... } catch(ex) { TraceKit.report(ex); }
8039 *
8040 * Supports:
8041 * - Firefox: full stack trace with line numbers, plus column number
8042 * on top frame; column number is not guaranteed
8043 * - Opera: full stack trace with line and column numbers
8044 * - Chrome: full stack trace with line and column numbers
8045 * - Safari: line and column number for the top frame only; some frames
8046 * may be missing, and column number is not guaranteed
8047 * - IE: line and column number for the top frame only; some frames
8048 * may be missing, and column number is not guaranteed
8049 *
8050 * In theory, TraceKit should work on all of the following versions:
8051 * - IE5.5+ (only 8.0 tested)
8052 * - Firefox 0.9+ (only 3.5+ tested)
8053 * - Opera 7+ (only 10.50 tested; versions 9 and earlier may require
8054 * Exceptions Have Stacktrace to be enabled in opera:config)
8055 * - Safari 3+ (only 4+ tested)
8056 * - Chrome 1+ (only 5+ tested)
8057 * - Konqueror 3.5+ (untested)
8058 *
8059 * Requires TraceKit.computeStackTrace.
8060 *
8061 * Tries to catch all unhandled exceptions and report them to the
8062 * subscribed handlers. Please note that TraceKit.report will rethrow the
8063 * exception. This is REQUIRED in order to get a useful stack trace in IE.
8064 * If the exception does not reach the top of the browser, you will only
8065 * get a stack trace from the point where TraceKit.report was called.
8066 *
8067 * Handlers receive a stackInfo object as described in the
8068 * TraceKit.computeStackTrace docs.
8069 */
8070 TraceKit.report = (function reportModuleWrapper() {
8071 var handlers = [],
8072 lastArgs = null,
8073 lastException = null,
8074 lastExceptionStack = null;
8075
8076 /**
8077 * Add a crash handler.
8078 * @param {Function} handler
8079 */
8080 function subscribe(handler) {
8081 installGlobalHandler();
8082 handlers.push(handler);
8083 }
8084
8085 /**
8086 * Remove a crash handler.
8087 * @param {Function} handler
8088 */
8089 function unsubscribe(handler) {
8090 for (var i = handlers.length - 1; i >= 0; --i) {
8091 if (handlers[i] === handler) {
8092 handlers.splice(i, 1);
8093 }
8094 }
8095 }
8096
8097 /**
8098 * Remove all crash handlers.
8099 */
8100 function unsubscribeAll() {
8101 uninstallGlobalHandler();
8102 handlers = [];
8103 }
8104
8105 /**
8106 * Dispatch stack information to all handlers.
8107 * @param {Object.<string, *>} stack
8108 */
8109 function notifyHandlers(stack, isWindowError) {
8110 var exception = null;
8111 if (isWindowError && !TraceKit.collectWindowErrors) {
8112 return;
8113 }
8114 for (var i in handlers) {
8115 if (handlers.hasOwnProperty(i)) {
8116 try {
8117 handlers[i].apply(null, [stack].concat(_slice.call(arguments, 2)));
8118 } catch (inner) {
8119 exception = inner;
8120 }
8121 }
8122 }
8123
8124 if (exception) {
8125 throw exception;
8126 }
8127 }
8128
8129 var _oldOnerrorHandler, _onErrorHandlerInstalled;
8130
8131 /**
8132 * Ensures all global unhandled exceptions are recorded.
8133 * Supported by Gecko and IE.
8134 * @param {string} message Error message.
8135 * @param {string} url URL of script that generated the exception.
8136 * @param {(number|string)} lineNo The line number at which the error
8137 * occurred.
8138 * @param {?(number|string)} colNo The column number at which the error
8139 * occurred.
8140 * @param {?Error} ex The actual Error object.
8141 */
8142 function traceKitWindowOnError(message, url, lineNo, colNo, ex) {
8143 var stack = null;
8144
8145 if (lastExceptionStack) {
8146 TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(
8147 lastExceptionStack,
8148 url,
8149 lineNo,
8150 message
8151 );
8152 processLastException();
8153 } else if (ex && utils.isError(ex)) {
8154 // non-string `ex` arg; attempt to extract stack trace
8155
8156 // New chrome and blink send along a real error object
8157 // Let's just report that like a normal error.
8158 // See: https://mikewest.org/2013/08/debugging-runtime-errors-with-window-onerror
8159 stack = TraceKit.computeStackTrace(ex);
8160 notifyHandlers(stack, true);
8161 } else {
8162 var location = {
8163 url: url,
8164 line: lineNo,
8165 column: colNo
8166 };
8167
8168 var name = undefined;
8169 var msg = message; // must be new var or will modify original `arguments`
8170 var groups;
8171 if ({}.toString.call(message) === '[object String]') {
8172 var groups = message.match(ERROR_TYPES_RE);
8173 if (groups) {
8174 name = groups[1];
8175 msg = groups[2];
8176 }
8177 }
8178
8179 location.func = UNKNOWN_FUNCTION;
8180
8181 stack = {
8182 name: name,
8183 message: msg,
8184 url: getLocationHref(),
8185 stack: [location]
8186 };
8187 notifyHandlers(stack, true);
8188 }
8189
8190 if (_oldOnerrorHandler) {
8191 return _oldOnerrorHandler.apply(this, arguments);
8192 }
8193
8194 return false;
8195 }
8196
8197 function installGlobalHandler() {
8198 if (_onErrorHandlerInstalled) {
8199 return;
8200 }
8201 _oldOnerrorHandler = _window.onerror;
8202 _window.onerror = traceKitWindowOnError;
8203 _onErrorHandlerInstalled = true;
8204 }
8205
8206 function uninstallGlobalHandler() {
8207 if (!_onErrorHandlerInstalled) {
8208 return;
8209 }
8210 _window.onerror = _oldOnerrorHandler;
8211 _onErrorHandlerInstalled = false;
8212 _oldOnerrorHandler = undefined;
8213 }
8214
8215 function processLastException() {
8216 var _lastExceptionStack = lastExceptionStack,
8217 _lastArgs = lastArgs;
8218 lastArgs = null;
8219 lastExceptionStack = null;
8220 lastException = null;
8221 notifyHandlers.apply(null, [_lastExceptionStack, false].concat(_lastArgs));
8222 }
8223
8224 /**
8225 * Reports an unhandled Error to TraceKit.
8226 * @param {Error} ex
8227 * @param {?boolean} rethrow If false, do not re-throw the exception.
8228 * Only used for window.onerror to not cause an infinite loop of
8229 * rethrowing.
8230 */
8231 function report(ex, rethrow) {
8232 var args = _slice.call(arguments, 1);
8233 if (lastExceptionStack) {
8234 if (lastException === ex) {
8235 return; // already caught by an inner catch block, ignore
8236 } else {
8237 processLastException();
8238 }
8239 }
8240
8241 var stack = TraceKit.computeStackTrace(ex);
8242 lastExceptionStack = stack;
8243 lastException = ex;
8244 lastArgs = args;
8245
8246 // If the stack trace is incomplete, wait for 2 seconds for
8247 // slow slow IE to see if onerror occurs or not before reporting
8248 // this exception; otherwise, we will end up with an incomplete
8249 // stack trace
8250 setTimeout(function() {
8251 if (lastException === ex) {
8252 processLastException();
8253 }
8254 }, stack.incomplete ? 2000 : 0);
8255
8256 if (rethrow !== false) {
8257 throw ex; // re-throw to propagate to the top level (and cause window.onerror)
8258 }
8259 }
8260
8261 report.subscribe = subscribe;
8262 report.unsubscribe = unsubscribe;
8263 report.uninstall = unsubscribeAll;
8264 return report;
8265 })();
8266
8267 /**
8268 * TraceKit.computeStackTrace: cross-browser stack traces in JavaScript
8269 *
8270 * Syntax:
8271 * s = TraceKit.computeStackTrace(exception) // consider using TraceKit.report instead (see below)
8272 * Returns:
8273 * s.name - exception name
8274 * s.message - exception message
8275 * s.stack[i].url - JavaScript or HTML file URL
8276 * s.stack[i].func - function name, or empty for anonymous functions (if guessing did not work)
8277 * s.stack[i].args - arguments passed to the function, if known
8278 * s.stack[i].line - line number, if known
8279 * s.stack[i].column - column number, if known
8280 *
8281 * Supports:
8282 * - Firefox: full stack trace with line numbers and unreliable column
8283 * number on top frame
8284 * - Opera 10: full stack trace with line and column numbers
8285 * - Opera 9-: full stack trace with line numbers
8286 * - Chrome: full stack trace with line and column numbers
8287 * - Safari: line and column number for the topmost stacktrace element
8288 * only
8289 * - IE: no line numbers whatsoever
8290 *
8291 * Tries to guess names of anonymous functions by looking for assignments
8292 * in the source code. In IE and Safari, we have to guess source file names
8293 * by searching for function bodies inside all page scripts. This will not
8294 * work for scripts that are loaded cross-domain.
8295 * Here be dragons: some function names may be guessed incorrectly, and
8296 * duplicate functions may be mismatched.
8297 *
8298 * TraceKit.computeStackTrace should only be used for tracing purposes.
8299 * Logging of unhandled exceptions should be done with TraceKit.report,
8300 * which builds on top of TraceKit.computeStackTrace and provides better
8301 * IE support by utilizing the window.onerror event to retrieve information
8302 * about the top of the stack.
8303 *
8304 * Note: In IE and Safari, no stack trace is recorded on the Error object,
8305 * so computeStackTrace instead walks its *own* chain of callers.
8306 * This means that:
8307 * * in Safari, some methods may be missing from the stack trace;
8308 * * in IE, the topmost function in the stack trace will always be the
8309 * caller of computeStackTrace.
8310 *
8311 * This is okay for tracing (because you are likely to be calling
8312 * computeStackTrace from the function you want to be the topmost element
8313 * of the stack trace anyway), but not okay for logging unhandled
8314 * exceptions (because your catch block will likely be far away from the
8315 * inner function that actually caused the exception).
8316 *
8317 */
8318 TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
8319 // Contents of Exception in various browsers.
8320 //
8321 // SAFARI:
8322 // ex.message = Can't find variable: qq
8323 // ex.line = 59
8324 // ex.sourceId = 580238192
8325 // ex.sourceURL = http://...
8326 // ex.expressionBeginOffset = 96
8327 // ex.expressionCaretOffset = 98
8328 // ex.expressionEndOffset = 98
8329 // ex.name = ReferenceError
8330 //
8331 // FIREFOX:
8332 // ex.message = qq is not defined
8333 // ex.fileName = http://...
8334 // ex.lineNumber = 59
8335 // ex.columnNumber = 69
8336 // ex.stack = ...stack trace... (see the example below)
8337 // ex.name = ReferenceError
8338 //
8339 // CHROME:
8340 // ex.message = qq is not defined
8341 // ex.name = ReferenceError
8342 // ex.type = not_defined
8343 // ex.arguments = ['aa']
8344 // ex.stack = ...stack trace...
8345 //
8346 // INTERNET EXPLORER:
8347 // ex.message = ...
8348 // ex.name = ReferenceError
8349 //
8350 // OPERA:
8351 // ex.message = ...message... (see the example below)
8352 // ex.name = ReferenceError
8353 // ex.opera#sourceloc = 11 (pretty much useless, duplicates the info in ex.message)
8354 // ex.stacktrace = n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'
8355
8356 /**
8357 * Computes stack trace information from the stack property.
8358 * Chrome and Gecko use this property.
8359 * @param {Error} ex
8360 * @return {?Object.<string, *>} Stack trace information.
8361 */
8362 function computeStackTraceFromStackProp(ex) {
8363 if (typeof ex.stack === 'undefined' || !ex.stack) return;
8364
8365 var chrome = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,
8366 gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,
8367 winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,
8368 // Used to additionally parse URL/line/column from eval frames
8369 geckoEval = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i,
8370 chromeEval = /\((\S*)(?::(\d+))(?::(\d+))\)/,
8371 lines = ex.stack.split('\n'),
8372 stack = [],
8373 submatch,
8374 parts,
8375 element,
8376 reference = /^(.*) is undefined$/.exec(ex.message);
8377
8378 for (var i = 0, j = lines.length; i < j; ++i) {
8379 if ((parts = chrome.exec(lines[i]))) {
8380 var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line
8381 var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line
8382 if (isEval && (submatch = chromeEval.exec(parts[2]))) {
8383 // throw out eval line/column and use top-most line/column number
8384 parts[2] = submatch[1]; // url
8385 parts[3] = submatch[2]; // line
8386 parts[4] = submatch[3]; // column
8387 }
8388 element = {
8389 url: !isNative ? parts[2] : null,
8390 func: parts[1] || UNKNOWN_FUNCTION,
8391 args: isNative ? [parts[2]] : [],
8392 line: parts[3] ? +parts[3] : null,
8393 column: parts[4] ? +parts[4] : null
8394 };
8395 } else if ((parts = winjs.exec(lines[i]))) {
8396 element = {
8397 url: parts[2],
8398 func: parts[1] || UNKNOWN_FUNCTION,
8399 args: [],
8400 line: +parts[3],
8401 column: parts[4] ? +parts[4] : null
8402 };
8403 } else if ((parts = gecko.exec(lines[i]))) {
8404 var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;
8405 if (isEval && (submatch = geckoEval.exec(parts[3]))) {
8406 // throw out eval line/column and use top-most line number
8407 parts[3] = submatch[1];
8408 parts[4] = submatch[2];
8409 parts[5] = null; // no column when eval
8410 } else if (i === 0 && !parts[5] && typeof ex.columnNumber !== 'undefined') {
8411 // FireFox uses this awesome columnNumber property for its top frame
8412 // Also note, Firefox's column number is 0-based and everything else expects 1-based,
8413 // so adding 1
8414 // NOTE: this hack doesn't work if top-most frame is eval
8415 stack[0].column = ex.columnNumber + 1;
8416 }
8417 element = {
8418 url: parts[3],
8419 func: parts[1] || UNKNOWN_FUNCTION,
8420 args: parts[2] ? parts[2].split(',') : [],
8421 line: parts[4] ? +parts[4] : null,
8422 column: parts[5] ? +parts[5] : null
8423 };
8424 } else {
8425 continue;
8426 }
8427
8428 if (!element.func && element.line) {
8429 element.func = UNKNOWN_FUNCTION;
8430 }
8431
8432 stack.push(element);
8433 }
8434
8435 if (!stack.length) {
8436 return null;
8437 }
8438
8439 return {
8440 name: ex.name,
8441 message: ex.message,
8442 url: getLocationHref(),
8443 stack: stack
8444 };
8445 }
8446
8447 /**
8448 * Adds information about the first frame to incomplete stack traces.
8449 * Safari and IE require this to get complete data on the first frame.
8450 * @param {Object.<string, *>} stackInfo Stack trace information from
8451 * one of the compute* methods.
8452 * @param {string} url The URL of the script that caused an error.
8453 * @param {(number|string)} lineNo The line number of the script that
8454 * caused an error.
8455 * @param {string=} message The error generated by the browser, which
8456 * hopefully contains the name of the object that caused the error.
8457 * @return {boolean} Whether or not the stack information was
8458 * augmented.
8459 */
8460 function augmentStackTraceWithInitialElement(stackInfo, url, lineNo, message) {
8461 var initial = {
8462 url: url,
8463 line: lineNo
8464 };
8465
8466 if (initial.url && initial.line) {
8467 stackInfo.incomplete = false;
8468
8469 if (!initial.func) {
8470 initial.func = UNKNOWN_FUNCTION;
8471 }
8472
8473 if (stackInfo.stack.length > 0) {
8474 if (stackInfo.stack[0].url === initial.url) {
8475 if (stackInfo.stack[0].line === initial.line) {
8476 return false; // already in stack trace
8477 } else if (
8478 !stackInfo.stack[0].line &&
8479 stackInfo.stack[0].func === initial.func
8480 ) {
8481 stackInfo.stack[0].line = initial.line;
8482 return false;
8483 }
8484 }
8485 }
8486
8487 stackInfo.stack.unshift(initial);
8488 stackInfo.partial = true;
8489 return true;
8490 } else {
8491 stackInfo.incomplete = true;
8492 }
8493
8494 return false;
8495 }
8496
8497 /**
8498 * Computes stack trace information by walking the arguments.caller
8499 * chain at the time the exception occurred. This will cause earlier
8500 * frames to be missed but is the only way to get any stack trace in
8501 * Safari and IE. The top frame is restored by
8502 * {@link augmentStackTraceWithInitialElement}.
8503 * @param {Error} ex
8504 * @return {?Object.<string, *>} Stack trace information.
8505 */
8506 function computeStackTraceByWalkingCallerChain(ex, depth) {
8507 var functionName = /function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,
8508 stack = [],
8509 funcs = {},
8510 recursion = false,
8511 parts,
8512 item,
8513 source;
8514
8515 for (
8516 var curr = computeStackTraceByWalkingCallerChain.caller;
8517 curr && !recursion;
8518 curr = curr.caller
8519 ) {
8520 if (curr === computeStackTrace || curr === TraceKit.report) {
8521 // console.log('skipping internal function');
8522 continue;
8523 }
8524
8525 item = {
8526 url: null,
8527 func: UNKNOWN_FUNCTION,
8528 line: null,
8529 column: null
8530 };
8531
8532 if (curr.name) {
8533 item.func = curr.name;
8534 } else if ((parts = functionName.exec(curr.toString()))) {
8535 item.func = parts[1];
8536 }
8537
8538 if (typeof item.func === 'undefined') {
8539 try {
8540 item.func = parts.input.substring(0, parts.input.indexOf('{'));
8541 } catch (e) {}
8542 }
8543
8544 if (funcs['' + curr]) {
8545 recursion = true;
8546 } else {
8547 funcs['' + curr] = true;
8548 }
8549
8550 stack.push(item);
8551 }
8552
8553 if (depth) {
8554 // console.log('depth is ' + depth);
8555 // console.log('stack is ' + stack.length);
8556 stack.splice(0, depth);
8557 }
8558
8559 var result = {
8560 name: ex.name,
8561 message: ex.message,
8562 url: getLocationHref(),
8563 stack: stack
8564 };
8565 augmentStackTraceWithInitialElement(
8566 result,
8567 ex.sourceURL || ex.fileName,
8568 ex.line || ex.lineNumber,
8569 ex.message || ex.description
8570 );
8571 return result;
8572 }
8573
8574 /**
8575 * Computes a stack trace for an exception.
8576 * @param {Error} ex
8577 * @param {(string|number)=} depth
8578 */
8579 function computeStackTrace(ex, depth) {
8580 var stack = null;
8581 depth = depth == null ? 0 : +depth;
8582
8583 try {
8584 stack = computeStackTraceFromStackProp(ex);
8585 if (stack) {
8586 return stack;
8587 }
8588 } catch (e) {
8589 if (TraceKit.debug) {
8590 throw e;
8591 }
8592 }
8593
8594 try {
8595 stack = computeStackTraceByWalkingCallerChain(ex, depth + 1);
8596 if (stack) {
8597 return stack;
8598 }
8599 } catch (e) {
8600 if (TraceKit.debug) {
8601 throw e;
8602 }
8603 }
8604 return {
8605 name: ex.name,
8606 message: ex.message,
8607 url: getLocationHref()
8608 };
8609 }
8610
8611 computeStackTrace.augmentStackTraceWithInitialElement = augmentStackTraceWithInitialElement;
8612 computeStackTrace.computeStackTraceFromStackProp = computeStackTraceFromStackProp;
8613
8614 return computeStackTrace;
8615 })();
8616
8617 module.exports = TraceKit;
8618
8619
8620 /***/ }),
8621
8622 /***/ "./node_modules/raven-js/vendor/json-stringify-safe/stringify.js":
8623 /*!***********************************************************************!*\
8624 !*** ./node_modules/raven-js/vendor/json-stringify-safe/stringify.js ***!
8625 \***********************************************************************/
8626 /***/ ((module, exports) => {
8627
8628 /*
8629 json-stringify-safe
8630 Like JSON.stringify, but doesn't throw on circular references.
8631
8632 Originally forked from https://github.com/isaacs/json-stringify-safe
8633 version 5.0.1 on 3/8/2017 and modified to handle Errors serialization
8634 and IE8 compatibility. Tests for this are in test/vendor.
8635
8636 ISC license: https://github.com/isaacs/json-stringify-safe/blob/master/LICENSE
8637 */
8638
8639 exports = module.exports = stringify;
8640 exports.getSerialize = serializer;
8641
8642 function indexOf(haystack, needle) {
8643 for (var i = 0; i < haystack.length; ++i) {
8644 if (haystack[i] === needle) return i;
8645 }
8646 return -1;
8647 }
8648
8649 function stringify(obj, replacer, spaces, cycleReplacer) {
8650 return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces);
8651 }
8652
8653 // https://github.com/ftlabs/js-abbreviate/blob/fa709e5f139e7770a71827b1893f22418097fbda/index.js#L95-L106
8654 function stringifyError(value) {
8655 var err = {
8656 // These properties are implemented as magical getters and don't show up in for in
8657 stack: value.stack,
8658 message: value.message,
8659 name: value.name
8660 };
8661
8662 for (var i in value) {
8663 if (Object.prototype.hasOwnProperty.call(value, i)) {
8664 err[i] = value[i];
8665 }
8666 }
8667
8668 return err;
8669 }
8670
8671 function serializer(replacer, cycleReplacer) {
8672 var stack = [];
8673 var keys = [];
8674
8675 if (cycleReplacer == null) {
8676 cycleReplacer = function(key, value) {
8677 if (stack[0] === value) {
8678 return '[Circular ~]';
8679 }
8680 return '[Circular ~.' + keys.slice(0, indexOf(stack, value)).join('.') + ']';
8681 };
8682 }
8683
8684 return function(key, value) {
8685 if (stack.length > 0) {
8686 var thisPos = indexOf(stack, this);
8687 ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
8688 ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
8689
8690 if (~indexOf(stack, value)) {
8691 value = cycleReplacer.call(this, key, value);
8692 }
8693 } else {
8694 stack.push(value);
8695 }
8696
8697 return replacer == null
8698 ? value instanceof Error ? stringifyError(value) : value
8699 : replacer.call(this, key, value);
8700 };
8701 }
8702
8703
8704 /***/ }),
8705
8706 /***/ "./node_modules/react-is/cjs/react-is.development.js":
8707 /*!***********************************************************!*\
8708 !*** ./node_modules/react-is/cjs/react-is.development.js ***!
8709 \***********************************************************/
8710 /***/ ((__unused_webpack_module, exports) => {
8711
8712 "use strict";
8713 /** @license React v16.13.1
8714 * react-is.development.js
8715 *
8716 * Copyright (c) Facebook, Inc. and its affiliates.
8717 *
8718 * This source code is licensed under the MIT license found in the
8719 * LICENSE file in the root directory of this source tree.
8720 */
8721
8722
8723
8724
8725
8726 if (true) {
8727 (function() {
8728 'use strict';
8729
8730 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
8731 // nor polyfill, then a plain number is used for performance.
8732 var hasSymbol = typeof Symbol === 'function' && Symbol.for;
8733 var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
8734 var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
8735 var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
8736 var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
8737 var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
8738 var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
8739 var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
8740 // (unstable) APIs that have been removed. Can we remove the symbols?
8741
8742 var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
8743 var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
8744 var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
8745 var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
8746 var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
8747 var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
8748 var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
8749 var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
8750 var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
8751 var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
8752 var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
8753
8754 function isValidElementType(type) {
8755 return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
8756 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);
8757 }
8758
8759 function typeOf(object) {
8760 if (typeof object === 'object' && object !== null) {
8761 var $$typeof = object.$$typeof;
8762
8763 switch ($$typeof) {
8764 case REACT_ELEMENT_TYPE:
8765 var type = object.type;
8766
8767 switch (type) {
8768 case REACT_ASYNC_MODE_TYPE:
8769 case REACT_CONCURRENT_MODE_TYPE:
8770 case REACT_FRAGMENT_TYPE:
8771 case REACT_PROFILER_TYPE:
8772 case REACT_STRICT_MODE_TYPE:
8773 case REACT_SUSPENSE_TYPE:
8774 return type;
8775
8776 default:
8777 var $$typeofType = type && type.$$typeof;
8778
8779 switch ($$typeofType) {
8780 case REACT_CONTEXT_TYPE:
8781 case REACT_FORWARD_REF_TYPE:
8782 case REACT_LAZY_TYPE:
8783 case REACT_MEMO_TYPE:
8784 case REACT_PROVIDER_TYPE:
8785 return $$typeofType;
8786
8787 default:
8788 return $$typeof;
8789 }
8790
8791 }
8792
8793 case REACT_PORTAL_TYPE:
8794 return $$typeof;
8795 }
8796 }
8797
8798 return undefined;
8799 } // AsyncMode is deprecated along with isAsyncMode
8800
8801 var AsyncMode = REACT_ASYNC_MODE_TYPE;
8802 var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
8803 var ContextConsumer = REACT_CONTEXT_TYPE;
8804 var ContextProvider = REACT_PROVIDER_TYPE;
8805 var Element = REACT_ELEMENT_TYPE;
8806 var ForwardRef = REACT_FORWARD_REF_TYPE;
8807 var Fragment = REACT_FRAGMENT_TYPE;
8808 var Lazy = REACT_LAZY_TYPE;
8809 var Memo = REACT_MEMO_TYPE;
8810 var Portal = REACT_PORTAL_TYPE;
8811 var Profiler = REACT_PROFILER_TYPE;
8812 var StrictMode = REACT_STRICT_MODE_TYPE;
8813 var Suspense = REACT_SUSPENSE_TYPE;
8814 var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
8815
8816 function isAsyncMode(object) {
8817 {
8818 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
8819 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
8820
8821 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.');
8822 }
8823 }
8824
8825 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
8826 }
8827 function isConcurrentMode(object) {
8828 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
8829 }
8830 function isContextConsumer(object) {
8831 return typeOf(object) === REACT_CONTEXT_TYPE;
8832 }
8833 function isContextProvider(object) {
8834 return typeOf(object) === REACT_PROVIDER_TYPE;
8835 }
8836 function isElement(object) {
8837 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
8838 }
8839 function isForwardRef(object) {
8840 return typeOf(object) === REACT_FORWARD_REF_TYPE;
8841 }
8842 function isFragment(object) {
8843 return typeOf(object) === REACT_FRAGMENT_TYPE;
8844 }
8845 function isLazy(object) {
8846 return typeOf(object) === REACT_LAZY_TYPE;
8847 }
8848 function isMemo(object) {
8849 return typeOf(object) === REACT_MEMO_TYPE;
8850 }
8851 function isPortal(object) {
8852 return typeOf(object) === REACT_PORTAL_TYPE;
8853 }
8854 function isProfiler(object) {
8855 return typeOf(object) === REACT_PROFILER_TYPE;
8856 }
8857 function isStrictMode(object) {
8858 return typeOf(object) === REACT_STRICT_MODE_TYPE;
8859 }
8860 function isSuspense(object) {
8861 return typeOf(object) === REACT_SUSPENSE_TYPE;
8862 }
8863
8864 exports.AsyncMode = AsyncMode;
8865 exports.ConcurrentMode = ConcurrentMode;
8866 exports.ContextConsumer = ContextConsumer;
8867 exports.ContextProvider = ContextProvider;
8868 exports.Element = Element;
8869 exports.ForwardRef = ForwardRef;
8870 exports.Fragment = Fragment;
8871 exports.Lazy = Lazy;
8872 exports.Memo = Memo;
8873 exports.Portal = Portal;
8874 exports.Profiler = Profiler;
8875 exports.StrictMode = StrictMode;
8876 exports.Suspense = Suspense;
8877 exports.isAsyncMode = isAsyncMode;
8878 exports.isConcurrentMode = isConcurrentMode;
8879 exports.isContextConsumer = isContextConsumer;
8880 exports.isContextProvider = isContextProvider;
8881 exports.isElement = isElement;
8882 exports.isForwardRef = isForwardRef;
8883 exports.isFragment = isFragment;
8884 exports.isLazy = isLazy;
8885 exports.isMemo = isMemo;
8886 exports.isPortal = isPortal;
8887 exports.isProfiler = isProfiler;
8888 exports.isStrictMode = isStrictMode;
8889 exports.isSuspense = isSuspense;
8890 exports.isValidElementType = isValidElementType;
8891 exports.typeOf = typeOf;
8892 })();
8893 }
8894
8895
8896 /***/ }),
8897
8898 /***/ "./node_modules/react-is/index.js":
8899 /*!****************************************!*\
8900 !*** ./node_modules/react-is/index.js ***!
8901 \****************************************/
8902 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8903
8904 "use strict";
8905
8906
8907 if (false) {} else {
8908 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js");
8909 }
8910
8911
8912 /***/ }),
8913
8914 /***/ "./node_modules/react/cjs/react-jsx-runtime.development.js":
8915 /*!*****************************************************************!*\
8916 !*** ./node_modules/react/cjs/react-jsx-runtime.development.js ***!
8917 \*****************************************************************/
8918 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8919
8920 "use strict";
8921 /** @license React v17.0.2
8922 * react-jsx-runtime.development.js
8923 *
8924 * Copyright (c) Facebook, Inc. and its affiliates.
8925 *
8926 * This source code is licensed under the MIT license found in the
8927 * LICENSE file in the root directory of this source tree.
8928 */
8929
8930
8931
8932 if (true) {
8933 (function() {
8934 'use strict';
8935
8936 var React = __webpack_require__(/*! react */ "react");
8937 var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
8938
8939 // ATTENTION
8940 // When adding new symbols to this file,
8941 // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
8942 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
8943 // nor polyfill, then a plain number is used for performance.
8944 var REACT_ELEMENT_TYPE = 0xeac7;
8945 var REACT_PORTAL_TYPE = 0xeaca;
8946 exports.Fragment = 0xeacb;
8947 var REACT_STRICT_MODE_TYPE = 0xeacc;
8948 var REACT_PROFILER_TYPE = 0xead2;
8949 var REACT_PROVIDER_TYPE = 0xeacd;
8950 var REACT_CONTEXT_TYPE = 0xeace;
8951 var REACT_FORWARD_REF_TYPE = 0xead0;
8952 var REACT_SUSPENSE_TYPE = 0xead1;
8953 var REACT_SUSPENSE_LIST_TYPE = 0xead8;
8954 var REACT_MEMO_TYPE = 0xead3;
8955 var REACT_LAZY_TYPE = 0xead4;
8956 var REACT_BLOCK_TYPE = 0xead9;
8957 var REACT_SERVER_BLOCK_TYPE = 0xeada;
8958 var REACT_FUNDAMENTAL_TYPE = 0xead5;
8959 var REACT_SCOPE_TYPE = 0xead7;
8960 var REACT_OPAQUE_ID_TYPE = 0xeae0;
8961 var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
8962 var REACT_OFFSCREEN_TYPE = 0xeae2;
8963 var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
8964
8965 if (typeof Symbol === 'function' && Symbol.for) {
8966 var symbolFor = Symbol.for;
8967 REACT_ELEMENT_TYPE = symbolFor('react.element');
8968 REACT_PORTAL_TYPE = symbolFor('react.portal');
8969 exports.Fragment = symbolFor('react.fragment');
8970 REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
8971 REACT_PROFILER_TYPE = symbolFor('react.profiler');
8972 REACT_PROVIDER_TYPE = symbolFor('react.provider');
8973 REACT_CONTEXT_TYPE = symbolFor('react.context');
8974 REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
8975 REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
8976 REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
8977 REACT_MEMO_TYPE = symbolFor('react.memo');
8978 REACT_LAZY_TYPE = symbolFor('react.lazy');
8979 REACT_BLOCK_TYPE = symbolFor('react.block');
8980 REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
8981 REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
8982 REACT_SCOPE_TYPE = symbolFor('react.scope');
8983 REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
8984 REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
8985 REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
8986 REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
8987 }
8988
8989 var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
8990 var FAUX_ITERATOR_SYMBOL = '@@iterator';
8991 function getIteratorFn(maybeIterable) {
8992 if (maybeIterable === null || typeof maybeIterable !== 'object') {
8993 return null;
8994 }
8995
8996 var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
8997
8998 if (typeof maybeIterator === 'function') {
8999 return maybeIterator;
9000 }
9001
9002 return null;
9003 }
9004
9005 var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
9006
9007 function error(format) {
9008 {
9009 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
9010 args[_key2 - 1] = arguments[_key2];
9011 }
9012
9013 printWarning('error', format, args);
9014 }
9015 }
9016
9017 function printWarning(level, format, args) {
9018 // When changing this logic, you might want to also
9019 // update consoleWithStackDev.www.js as well.
9020 {
9021 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
9022 var stack = ReactDebugCurrentFrame.getStackAddendum();
9023
9024 if (stack !== '') {
9025 format += '%s';
9026 args = args.concat([stack]);
9027 }
9028
9029 var argsWithFormat = args.map(function (item) {
9030 return '' + item;
9031 }); // Careful: RN currently depends on this prefix
9032
9033 argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
9034 // breaks IE9: https://github.com/facebook/react/issues/13610
9035 // eslint-disable-next-line react-internal/no-production-logging
9036
9037 Function.prototype.apply.call(console[level], console, argsWithFormat);
9038 }
9039 }
9040
9041 // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
9042
9043 var enableScopeAPI = false; // Experimental Create Event Handle API.
9044
9045 function isValidElementType(type) {
9046 if (typeof type === 'string' || typeof type === 'function') {
9047 return true;
9048 } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
9049
9050
9051 if (type === exports.Fragment || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {
9052 return true;
9053 }
9054
9055 if (typeof type === 'object' && type !== null) {
9056 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 || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
9057 return true;
9058 }
9059 }
9060
9061 return false;
9062 }
9063
9064 function getWrappedName(outerType, innerType, wrapperName) {
9065 var functionName = innerType.displayName || innerType.name || '';
9066 return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
9067 }
9068
9069 function getContextName(type) {
9070 return type.displayName || 'Context';
9071 }
9072
9073 function getComponentName(type) {
9074 if (type == null) {
9075 // Host root, text node or just invalid type.
9076 return null;
9077 }
9078
9079 {
9080 if (typeof type.tag === 'number') {
9081 error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
9082 }
9083 }
9084
9085 if (typeof type === 'function') {
9086 return type.displayName || type.name || null;
9087 }
9088
9089 if (typeof type === 'string') {
9090 return type;
9091 }
9092
9093 switch (type) {
9094 case exports.Fragment:
9095 return 'Fragment';
9096
9097 case REACT_PORTAL_TYPE:
9098 return 'Portal';
9099
9100 case REACT_PROFILER_TYPE:
9101 return 'Profiler';
9102
9103 case REACT_STRICT_MODE_TYPE:
9104 return 'StrictMode';
9105
9106 case REACT_SUSPENSE_TYPE:
9107 return 'Suspense';
9108
9109 case REACT_SUSPENSE_LIST_TYPE:
9110 return 'SuspenseList';
9111 }
9112
9113 if (typeof type === 'object') {
9114 switch (type.$$typeof) {
9115 case REACT_CONTEXT_TYPE:
9116 var context = type;
9117 return getContextName(context) + '.Consumer';
9118
9119 case REACT_PROVIDER_TYPE:
9120 var provider = type;
9121 return getContextName(provider._context) + '.Provider';
9122
9123 case REACT_FORWARD_REF_TYPE:
9124 return getWrappedName(type, type.render, 'ForwardRef');
9125
9126 case REACT_MEMO_TYPE:
9127 return getComponentName(type.type);
9128
9129 case REACT_BLOCK_TYPE:
9130 return getComponentName(type._render);
9131
9132 case REACT_LAZY_TYPE:
9133 {
9134 var lazyComponent = type;
9135 var payload = lazyComponent._payload;
9136 var init = lazyComponent._init;
9137
9138 try {
9139 return getComponentName(init(payload));
9140 } catch (x) {
9141 return null;
9142 }
9143 }
9144 }
9145 }
9146
9147 return null;
9148 }
9149
9150 // Helpers to patch console.logs to avoid logging during side-effect free
9151 // replaying on render function. This currently only patches the object
9152 // lazily which won't cover if the log function was extracted eagerly.
9153 // We could also eagerly patch the method.
9154 var disabledDepth = 0;
9155 var prevLog;
9156 var prevInfo;
9157 var prevWarn;
9158 var prevError;
9159 var prevGroup;
9160 var prevGroupCollapsed;
9161 var prevGroupEnd;
9162
9163 function disabledLog() {}
9164
9165 disabledLog.__reactDisabledLog = true;
9166 function disableLogs() {
9167 {
9168 if (disabledDepth === 0) {
9169 /* eslint-disable react-internal/no-production-logging */
9170 prevLog = console.log;
9171 prevInfo = console.info;
9172 prevWarn = console.warn;
9173 prevError = console.error;
9174 prevGroup = console.group;
9175 prevGroupCollapsed = console.groupCollapsed;
9176 prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
9177
9178 var props = {
9179 configurable: true,
9180 enumerable: true,
9181 value: disabledLog,
9182 writable: true
9183 }; // $FlowFixMe Flow thinks console is immutable.
9184
9185 Object.defineProperties(console, {
9186 info: props,
9187 log: props,
9188 warn: props,
9189 error: props,
9190 group: props,
9191 groupCollapsed: props,
9192 groupEnd: props
9193 });
9194 /* eslint-enable react-internal/no-production-logging */
9195 }
9196
9197 disabledDepth++;
9198 }
9199 }
9200 function reenableLogs() {
9201 {
9202 disabledDepth--;
9203
9204 if (disabledDepth === 0) {
9205 /* eslint-disable react-internal/no-production-logging */
9206 var props = {
9207 configurable: true,
9208 enumerable: true,
9209 writable: true
9210 }; // $FlowFixMe Flow thinks console is immutable.
9211
9212 Object.defineProperties(console, {
9213 log: _assign({}, props, {
9214 value: prevLog
9215 }),
9216 info: _assign({}, props, {
9217 value: prevInfo
9218 }),
9219 warn: _assign({}, props, {
9220 value: prevWarn
9221 }),
9222 error: _assign({}, props, {
9223 value: prevError
9224 }),
9225 group: _assign({}, props, {
9226 value: prevGroup
9227 }),
9228 groupCollapsed: _assign({}, props, {
9229 value: prevGroupCollapsed
9230 }),
9231 groupEnd: _assign({}, props, {
9232 value: prevGroupEnd
9233 })
9234 });
9235 /* eslint-enable react-internal/no-production-logging */
9236 }
9237
9238 if (disabledDepth < 0) {
9239 error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
9240 }
9241 }
9242 }
9243
9244 var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
9245 var prefix;
9246 function describeBuiltInComponentFrame(name, source, ownerFn) {
9247 {
9248 if (prefix === undefined) {
9249 // Extract the VM specific prefix used by each line.
9250 try {
9251 throw Error();
9252 } catch (x) {
9253 var match = x.stack.trim().match(/\n( *(at )?)/);
9254 prefix = match && match[1] || '';
9255 }
9256 } // We use the prefix to ensure our stacks line up with native stack frames.
9257
9258
9259 return '\n' + prefix + name;
9260 }
9261 }
9262 var reentry = false;
9263 var componentFrameCache;
9264
9265 {
9266 var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
9267 componentFrameCache = new PossiblyWeakMap();
9268 }
9269
9270 function describeNativeComponentFrame(fn, construct) {
9271 // If something asked for a stack inside a fake render, it should get ignored.
9272 if (!fn || reentry) {
9273 return '';
9274 }
9275
9276 {
9277 var frame = componentFrameCache.get(fn);
9278
9279 if (frame !== undefined) {
9280 return frame;
9281 }
9282 }
9283
9284 var control;
9285 reentry = true;
9286 var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
9287
9288 Error.prepareStackTrace = undefined;
9289 var previousDispatcher;
9290
9291 {
9292 previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
9293 // for warnings.
9294
9295 ReactCurrentDispatcher.current = null;
9296 disableLogs();
9297 }
9298
9299 try {
9300 // This should throw.
9301 if (construct) {
9302 // Something should be setting the props in the constructor.
9303 var Fake = function () {
9304 throw Error();
9305 }; // $FlowFixMe
9306
9307
9308 Object.defineProperty(Fake.prototype, 'props', {
9309 set: function () {
9310 // We use a throwing setter instead of frozen or non-writable props
9311 // because that won't throw in a non-strict mode function.
9312 throw Error();
9313 }
9314 });
9315
9316 if (typeof Reflect === 'object' && Reflect.construct) {
9317 // We construct a different control for this case to include any extra
9318 // frames added by the construct call.
9319 try {
9320 Reflect.construct(Fake, []);
9321 } catch (x) {
9322 control = x;
9323 }
9324
9325 Reflect.construct(fn, [], Fake);
9326 } else {
9327 try {
9328 Fake.call();
9329 } catch (x) {
9330 control = x;
9331 }
9332
9333 fn.call(Fake.prototype);
9334 }
9335 } else {
9336 try {
9337 throw Error();
9338 } catch (x) {
9339 control = x;
9340 }
9341
9342 fn();
9343 }
9344 } catch (sample) {
9345 // This is inlined manually because closure doesn't do it for us.
9346 if (sample && control && typeof sample.stack === 'string') {
9347 // This extracts the first frame from the sample that isn't also in the control.
9348 // Skipping one frame that we assume is the frame that calls the two.
9349 var sampleLines = sample.stack.split('\n');
9350 var controlLines = control.stack.split('\n');
9351 var s = sampleLines.length - 1;
9352 var c = controlLines.length - 1;
9353
9354 while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
9355 // We expect at least one stack frame to be shared.
9356 // Typically this will be the root most one. However, stack frames may be
9357 // cut off due to maximum stack limits. In this case, one maybe cut off
9358 // earlier than the other. We assume that the sample is longer or the same
9359 // and there for cut off earlier. So we should find the root most frame in
9360 // the sample somewhere in the control.
9361 c--;
9362 }
9363
9364 for (; s >= 1 && c >= 0; s--, c--) {
9365 // Next we find the first one that isn't the same which should be the
9366 // frame that called our sample function and the control.
9367 if (sampleLines[s] !== controlLines[c]) {
9368 // In V8, the first line is describing the message but other VMs don't.
9369 // If we're about to return the first line, and the control is also on the same
9370 // line, that's a pretty good indicator that our sample threw at same line as
9371 // the control. I.e. before we entered the sample frame. So we ignore this result.
9372 // This can happen if you passed a class to function component, or non-function.
9373 if (s !== 1 || c !== 1) {
9374 do {
9375 s--;
9376 c--; // We may still have similar intermediate frames from the construct call.
9377 // The next one that isn't the same should be our match though.
9378
9379 if (c < 0 || sampleLines[s] !== controlLines[c]) {
9380 // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
9381 var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
9382
9383 {
9384 if (typeof fn === 'function') {
9385 componentFrameCache.set(fn, _frame);
9386 }
9387 } // Return the line we found.
9388
9389
9390 return _frame;
9391 }
9392 } while (s >= 1 && c >= 0);
9393 }
9394
9395 break;
9396 }
9397 }
9398 }
9399 } finally {
9400 reentry = false;
9401
9402 {
9403 ReactCurrentDispatcher.current = previousDispatcher;
9404 reenableLogs();
9405 }
9406
9407 Error.prepareStackTrace = previousPrepareStackTrace;
9408 } // Fallback to just using the name if we couldn't make it throw.
9409
9410
9411 var name = fn ? fn.displayName || fn.name : '';
9412 var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
9413
9414 {
9415 if (typeof fn === 'function') {
9416 componentFrameCache.set(fn, syntheticFrame);
9417 }
9418 }
9419
9420 return syntheticFrame;
9421 }
9422 function describeFunctionComponentFrame(fn, source, ownerFn) {
9423 {
9424 return describeNativeComponentFrame(fn, false);
9425 }
9426 }
9427
9428 function shouldConstruct(Component) {
9429 var prototype = Component.prototype;
9430 return !!(prototype && prototype.isReactComponent);
9431 }
9432
9433 function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
9434
9435 if (type == null) {
9436 return '';
9437 }
9438
9439 if (typeof type === 'function') {
9440 {
9441 return describeNativeComponentFrame(type, shouldConstruct(type));
9442 }
9443 }
9444
9445 if (typeof type === 'string') {
9446 return describeBuiltInComponentFrame(type);
9447 }
9448
9449 switch (type) {
9450 case REACT_SUSPENSE_TYPE:
9451 return describeBuiltInComponentFrame('Suspense');
9452
9453 case REACT_SUSPENSE_LIST_TYPE:
9454 return describeBuiltInComponentFrame('SuspenseList');
9455 }
9456
9457 if (typeof type === 'object') {
9458 switch (type.$$typeof) {
9459 case REACT_FORWARD_REF_TYPE:
9460 return describeFunctionComponentFrame(type.render);
9461
9462 case REACT_MEMO_TYPE:
9463 // Memo may contain any component type so we recursively resolve it.
9464 return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
9465
9466 case REACT_BLOCK_TYPE:
9467 return describeFunctionComponentFrame(type._render);
9468
9469 case REACT_LAZY_TYPE:
9470 {
9471 var lazyComponent = type;
9472 var payload = lazyComponent._payload;
9473 var init = lazyComponent._init;
9474
9475 try {
9476 // Lazy may contain any component type so we recursively resolve it.
9477 return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
9478 } catch (x) {}
9479 }
9480 }
9481 }
9482
9483 return '';
9484 }
9485
9486 var loggedTypeFailures = {};
9487 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
9488
9489 function setCurrentlyValidatingElement(element) {
9490 {
9491 if (element) {
9492 var owner = element._owner;
9493 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
9494 ReactDebugCurrentFrame.setExtraStackFrame(stack);
9495 } else {
9496 ReactDebugCurrentFrame.setExtraStackFrame(null);
9497 }
9498 }
9499 }
9500
9501 function checkPropTypes(typeSpecs, values, location, componentName, element) {
9502 {
9503 // $FlowFixMe This is okay but Flow doesn't know it.
9504 var has = Function.call.bind(Object.prototype.hasOwnProperty);
9505
9506 for (var typeSpecName in typeSpecs) {
9507 if (has(typeSpecs, typeSpecName)) {
9508 var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
9509 // fail the render phase where it didn't fail before. So we log it.
9510 // After these have been cleaned up, we'll let them throw.
9511
9512 try {
9513 // This is intentionally an invariant that gets caught. It's the same
9514 // behavior as without this statement except with a better message.
9515 if (typeof typeSpecs[typeSpecName] !== 'function') {
9516 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`.');
9517 err.name = 'Invariant Violation';
9518 throw err;
9519 }
9520
9521 error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
9522 } catch (ex) {
9523 error$1 = ex;
9524 }
9525
9526 if (error$1 && !(error$1 instanceof Error)) {
9527 setCurrentlyValidatingElement(element);
9528
9529 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);
9530
9531 setCurrentlyValidatingElement(null);
9532 }
9533
9534 if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
9535 // Only monitor this failure once because there tends to be a lot of the
9536 // same error.
9537 loggedTypeFailures[error$1.message] = true;
9538 setCurrentlyValidatingElement(element);
9539
9540 error('Failed %s type: %s', location, error$1.message);
9541
9542 setCurrentlyValidatingElement(null);
9543 }
9544 }
9545 }
9546 }
9547 }
9548
9549 var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
9550 var hasOwnProperty = Object.prototype.hasOwnProperty;
9551 var RESERVED_PROPS = {
9552 key: true,
9553 ref: true,
9554 __self: true,
9555 __source: true
9556 };
9557 var specialPropKeyWarningShown;
9558 var specialPropRefWarningShown;
9559 var didWarnAboutStringRefs;
9560
9561 {
9562 didWarnAboutStringRefs = {};
9563 }
9564
9565 function hasValidRef(config) {
9566 {
9567 if (hasOwnProperty.call(config, 'ref')) {
9568 var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
9569
9570 if (getter && getter.isReactWarning) {
9571 return false;
9572 }
9573 }
9574 }
9575
9576 return config.ref !== undefined;
9577 }
9578
9579 function hasValidKey(config) {
9580 {
9581 if (hasOwnProperty.call(config, 'key')) {
9582 var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
9583
9584 if (getter && getter.isReactWarning) {
9585 return false;
9586 }
9587 }
9588 }
9589
9590 return config.key !== undefined;
9591 }
9592
9593 function warnIfStringRefCannotBeAutoConverted(config, self) {
9594 {
9595 if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
9596 var componentName = getComponentName(ReactCurrentOwner.current.type);
9597
9598 if (!didWarnAboutStringRefs[componentName]) {
9599 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', getComponentName(ReactCurrentOwner.current.type), config.ref);
9600
9601 didWarnAboutStringRefs[componentName] = true;
9602 }
9603 }
9604 }
9605 }
9606
9607 function defineKeyPropWarningGetter(props, displayName) {
9608 {
9609 var warnAboutAccessingKey = function () {
9610 if (!specialPropKeyWarningShown) {
9611 specialPropKeyWarningShown = true;
9612
9613 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);
9614 }
9615 };
9616
9617 warnAboutAccessingKey.isReactWarning = true;
9618 Object.defineProperty(props, 'key', {
9619 get: warnAboutAccessingKey,
9620 configurable: true
9621 });
9622 }
9623 }
9624
9625 function defineRefPropWarningGetter(props, displayName) {
9626 {
9627 var warnAboutAccessingRef = function () {
9628 if (!specialPropRefWarningShown) {
9629 specialPropRefWarningShown = true;
9630
9631 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);
9632 }
9633 };
9634
9635 warnAboutAccessingRef.isReactWarning = true;
9636 Object.defineProperty(props, 'ref', {
9637 get: warnAboutAccessingRef,
9638 configurable: true
9639 });
9640 }
9641 }
9642 /**
9643 * Factory method to create a new React element. This no longer adheres to
9644 * the class pattern, so do not use new to call it. Also, instanceof check
9645 * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
9646 * if something is a React Element.
9647 *
9648 * @param {*} type
9649 * @param {*} props
9650 * @param {*} key
9651 * @param {string|object} ref
9652 * @param {*} owner
9653 * @param {*} self A *temporary* helper to detect places where `this` is
9654 * different from the `owner` when React.createElement is called, so that we
9655 * can warn. We want to get rid of owner and replace string `ref`s with arrow
9656 * functions, and as long as `this` and owner are the same, there will be no
9657 * change in behavior.
9658 * @param {*} source An annotation object (added by a transpiler or otherwise)
9659 * indicating filename, line number, and/or other information.
9660 * @internal
9661 */
9662
9663
9664 var ReactElement = function (type, key, ref, self, source, owner, props) {
9665 var element = {
9666 // This tag allows us to uniquely identify this as a React Element
9667 $$typeof: REACT_ELEMENT_TYPE,
9668 // Built-in properties that belong on the element
9669 type: type,
9670 key: key,
9671 ref: ref,
9672 props: props,
9673 // Record the component responsible for creating this element.
9674 _owner: owner
9675 };
9676
9677 {
9678 // The validation flag is currently mutative. We put it on
9679 // an external backing store so that we can freeze the whole object.
9680 // This can be replaced with a WeakMap once they are implemented in
9681 // commonly used development environments.
9682 element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
9683 // the validation flag non-enumerable (where possible, which should
9684 // include every environment we run tests in), so the test framework
9685 // ignores it.
9686
9687 Object.defineProperty(element._store, 'validated', {
9688 configurable: false,
9689 enumerable: false,
9690 writable: true,
9691 value: false
9692 }); // self and source are DEV only properties.
9693
9694 Object.defineProperty(element, '_self', {
9695 configurable: false,
9696 enumerable: false,
9697 writable: false,
9698 value: self
9699 }); // Two elements created in two different places should be considered
9700 // equal for testing purposes and therefore we hide it from enumeration.
9701
9702 Object.defineProperty(element, '_source', {
9703 configurable: false,
9704 enumerable: false,
9705 writable: false,
9706 value: source
9707 });
9708
9709 if (Object.freeze) {
9710 Object.freeze(element.props);
9711 Object.freeze(element);
9712 }
9713 }
9714
9715 return element;
9716 };
9717 /**
9718 * https://github.com/reactjs/rfcs/pull/107
9719 * @param {*} type
9720 * @param {object} props
9721 * @param {string} key
9722 */
9723
9724 function jsxDEV(type, config, maybeKey, source, self) {
9725 {
9726 var propName; // Reserved names are extracted
9727
9728 var props = {};
9729 var key = null;
9730 var ref = null; // Currently, key can be spread in as a prop. This causes a potential
9731 // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
9732 // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
9733 // but as an intermediary step, we will use jsxDEV for everything except
9734 // <div {...props} key="Hi" />, because we aren't currently able to tell if
9735 // key is explicitly declared to be undefined or not.
9736
9737 if (maybeKey !== undefined) {
9738 key = '' + maybeKey;
9739 }
9740
9741 if (hasValidKey(config)) {
9742 key = '' + config.key;
9743 }
9744
9745 if (hasValidRef(config)) {
9746 ref = config.ref;
9747 warnIfStringRefCannotBeAutoConverted(config, self);
9748 } // Remaining properties are added to a new props object
9749
9750
9751 for (propName in config) {
9752 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
9753 props[propName] = config[propName];
9754 }
9755 } // Resolve default props
9756
9757
9758 if (type && type.defaultProps) {
9759 var defaultProps = type.defaultProps;
9760
9761 for (propName in defaultProps) {
9762 if (props[propName] === undefined) {
9763 props[propName] = defaultProps[propName];
9764 }
9765 }
9766 }
9767
9768 if (key || ref) {
9769 var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
9770
9771 if (key) {
9772 defineKeyPropWarningGetter(props, displayName);
9773 }
9774
9775 if (ref) {
9776 defineRefPropWarningGetter(props, displayName);
9777 }
9778 }
9779
9780 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
9781 }
9782 }
9783
9784 var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
9785 var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
9786
9787 function setCurrentlyValidatingElement$1(element) {
9788 {
9789 if (element) {
9790 var owner = element._owner;
9791 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
9792 ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
9793 } else {
9794 ReactDebugCurrentFrame$1.setExtraStackFrame(null);
9795 }
9796 }
9797 }
9798
9799 var propTypesMisspellWarningShown;
9800
9801 {
9802 propTypesMisspellWarningShown = false;
9803 }
9804 /**
9805 * Verifies the object is a ReactElement.
9806 * See https://reactjs.org/docs/react-api.html#isvalidelement
9807 * @param {?object} object
9808 * @return {boolean} True if `object` is a ReactElement.
9809 * @final
9810 */
9811
9812 function isValidElement(object) {
9813 {
9814 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
9815 }
9816 }
9817
9818 function getDeclarationErrorAddendum() {
9819 {
9820 if (ReactCurrentOwner$1.current) {
9821 var name = getComponentName(ReactCurrentOwner$1.current.type);
9822
9823 if (name) {
9824 return '\n\nCheck the render method of `' + name + '`.';
9825 }
9826 }
9827
9828 return '';
9829 }
9830 }
9831
9832 function getSourceInfoErrorAddendum(source) {
9833 {
9834 if (source !== undefined) {
9835 var fileName = source.fileName.replace(/^.*[\\\/]/, '');
9836 var lineNumber = source.lineNumber;
9837 return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
9838 }
9839
9840 return '';
9841 }
9842 }
9843 /**
9844 * Warn if there's no key explicitly set on dynamic arrays of children or
9845 * object keys are not valid. This allows us to keep track of children between
9846 * updates.
9847 */
9848
9849
9850 var ownerHasKeyUseWarning = {};
9851
9852 function getCurrentComponentErrorInfo(parentType) {
9853 {
9854 var info = getDeclarationErrorAddendum();
9855
9856 if (!info) {
9857 var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
9858
9859 if (parentName) {
9860 info = "\n\nCheck the top-level render call using <" + parentName + ">.";
9861 }
9862 }
9863
9864 return info;
9865 }
9866 }
9867 /**
9868 * Warn if the element doesn't have an explicit key assigned to it.
9869 * This element is in an array. The array could grow and shrink or be
9870 * reordered. All children that haven't already been validated are required to
9871 * have a "key" property assigned to it. Error statuses are cached so a warning
9872 * will only be shown once.
9873 *
9874 * @internal
9875 * @param {ReactElement} element Element that requires a key.
9876 * @param {*} parentType element's parent's type.
9877 */
9878
9879
9880 function validateExplicitKey(element, parentType) {
9881 {
9882 if (!element._store || element._store.validated || element.key != null) {
9883 return;
9884 }
9885
9886 element._store.validated = true;
9887 var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
9888
9889 if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
9890 return;
9891 }
9892
9893 ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
9894 // property, it may be the creator of the child that's responsible for
9895 // assigning it a key.
9896
9897 var childOwner = '';
9898
9899 if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
9900 // Give the component that originally created this child.
9901 childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
9902 }
9903
9904 setCurrentlyValidatingElement$1(element);
9905
9906 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);
9907
9908 setCurrentlyValidatingElement$1(null);
9909 }
9910 }
9911 /**
9912 * Ensure that every element either is passed in a static location, in an
9913 * array with an explicit keys property defined, or in an object literal
9914 * with valid key property.
9915 *
9916 * @internal
9917 * @param {ReactNode} node Statically passed child of any type.
9918 * @param {*} parentType node's parent's type.
9919 */
9920
9921
9922 function validateChildKeys(node, parentType) {
9923 {
9924 if (typeof node !== 'object') {
9925 return;
9926 }
9927
9928 if (Array.isArray(node)) {
9929 for (var i = 0; i < node.length; i++) {
9930 var child = node[i];
9931
9932 if (isValidElement(child)) {
9933 validateExplicitKey(child, parentType);
9934 }
9935 }
9936 } else if (isValidElement(node)) {
9937 // This element was passed in a valid location.
9938 if (node._store) {
9939 node._store.validated = true;
9940 }
9941 } else if (node) {
9942 var iteratorFn = getIteratorFn(node);
9943
9944 if (typeof iteratorFn === 'function') {
9945 // Entry iterators used to provide implicit keys,
9946 // but now we print a separate warning for them later.
9947 if (iteratorFn !== node.entries) {
9948 var iterator = iteratorFn.call(node);
9949 var step;
9950
9951 while (!(step = iterator.next()).done) {
9952 if (isValidElement(step.value)) {
9953 validateExplicitKey(step.value, parentType);
9954 }
9955 }
9956 }
9957 }
9958 }
9959 }
9960 }
9961 /**
9962 * Given an element, validate that its props follow the propTypes definition,
9963 * provided by the type.
9964 *
9965 * @param {ReactElement} element
9966 */
9967
9968
9969 function validatePropTypes(element) {
9970 {
9971 var type = element.type;
9972
9973 if (type === null || type === undefined || typeof type === 'string') {
9974 return;
9975 }
9976
9977 var propTypes;
9978
9979 if (typeof type === 'function') {
9980 propTypes = type.propTypes;
9981 } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
9982 // Inner props are checked in the reconciler.
9983 type.$$typeof === REACT_MEMO_TYPE)) {
9984 propTypes = type.propTypes;
9985 } else {
9986 return;
9987 }
9988
9989 if (propTypes) {
9990 // Intentionally inside to avoid triggering lazy initializers:
9991 var name = getComponentName(type);
9992 checkPropTypes(propTypes, element.props, 'prop', name, element);
9993 } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
9994 propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
9995
9996 var _name = getComponentName(type);
9997
9998 error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
9999 }
10000
10001 if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
10002 error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
10003 }
10004 }
10005 }
10006 /**
10007 * Given a fragment, validate that it can only be provided with fragment props
10008 * @param {ReactElement} fragment
10009 */
10010
10011
10012 function validateFragmentProps(fragment) {
10013 {
10014 var keys = Object.keys(fragment.props);
10015
10016 for (var i = 0; i < keys.length; i++) {
10017 var key = keys[i];
10018
10019 if (key !== 'children' && key !== 'key') {
10020 setCurrentlyValidatingElement$1(fragment);
10021
10022 error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
10023
10024 setCurrentlyValidatingElement$1(null);
10025 break;
10026 }
10027 }
10028
10029 if (fragment.ref !== null) {
10030 setCurrentlyValidatingElement$1(fragment);
10031
10032 error('Invalid attribute `ref` supplied to `React.Fragment`.');
10033
10034 setCurrentlyValidatingElement$1(null);
10035 }
10036 }
10037 }
10038
10039 function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
10040 {
10041 var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
10042 // succeed and there will likely be errors in render.
10043
10044 if (!validType) {
10045 var info = '';
10046
10047 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
10048 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.";
10049 }
10050
10051 var sourceInfo = getSourceInfoErrorAddendum(source);
10052
10053 if (sourceInfo) {
10054 info += sourceInfo;
10055 } else {
10056 info += getDeclarationErrorAddendum();
10057 }
10058
10059 var typeString;
10060
10061 if (type === null) {
10062 typeString = 'null';
10063 } else if (Array.isArray(type)) {
10064 typeString = 'array';
10065 } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
10066 typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
10067 info = ' Did you accidentally export a JSX literal instead of a component?';
10068 } else {
10069 typeString = typeof type;
10070 }
10071
10072 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);
10073 }
10074
10075 var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
10076 // TODO: Drop this when these are no longer allowed as the type argument.
10077
10078 if (element == null) {
10079 return element;
10080 } // Skip key warning if the type isn't valid since our key validation logic
10081 // doesn't expect a non-string/function type and can throw confusing errors.
10082 // We don't want exception behavior to differ between dev and prod.
10083 // (Rendering will throw with a helpful message and as soon as the type is
10084 // fixed, the key warnings will appear.)
10085
10086
10087 if (validType) {
10088 var children = props.children;
10089
10090 if (children !== undefined) {
10091 if (isStaticChildren) {
10092 if (Array.isArray(children)) {
10093 for (var i = 0; i < children.length; i++) {
10094 validateChildKeys(children[i], type);
10095 }
10096
10097 if (Object.freeze) {
10098 Object.freeze(children);
10099 }
10100 } else {
10101 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.');
10102 }
10103 } else {
10104 validateChildKeys(children, type);
10105 }
10106 }
10107 }
10108
10109 if (type === exports.Fragment) {
10110 validateFragmentProps(element);
10111 } else {
10112 validatePropTypes(element);
10113 }
10114
10115 return element;
10116 }
10117 } // These two functions exist to still get child warnings in dev
10118 // even with the prod transform. This means that jsxDEV is purely
10119 // opt-in behavior for better messages but that we won't stop
10120 // giving you warnings if you use production apis.
10121
10122 function jsxWithValidationStatic(type, props, key) {
10123 {
10124 return jsxWithValidation(type, props, key, true);
10125 }
10126 }
10127 function jsxWithValidationDynamic(type, props, key) {
10128 {
10129 return jsxWithValidation(type, props, key, false);
10130 }
10131 }
10132
10133 var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
10134 // for now we can ship identical prod functions
10135
10136 var jsxs = jsxWithValidationStatic ;
10137
10138 exports.jsx = jsx;
10139 exports.jsxs = jsxs;
10140 })();
10141 }
10142
10143
10144 /***/ }),
10145
10146 /***/ "./node_modules/react/jsx-runtime.js":
10147 /*!*******************************************!*\
10148 !*** ./node_modules/react/jsx-runtime.js ***!
10149 \*******************************************/
10150 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
10151
10152 "use strict";
10153
10154
10155 if (false) {} else {
10156 module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ "./node_modules/react/cjs/react-jsx-runtime.development.js");
10157 }
10158
10159
10160 /***/ }),
10161
10162 /***/ "./node_modules/styled-components/dist/styled-components.browser.esm.js":
10163 /*!******************************************************************************!*\
10164 !*** ./node_modules/styled-components/dist/styled-components.browser.esm.js ***!
10165 \******************************************************************************/
10166 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10167
10168 "use strict";
10169 __webpack_require__.r(__webpack_exports__);
10170 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10171 /* harmony export */ "ServerStyleSheet": () => (/* binding */ ServerStyleSheet),
10172 /* harmony export */ "StyleSheetConsumer": () => (/* binding */ StyleSheetConsumer),
10173 /* harmony export */ "StyleSheetContext": () => (/* binding */ StyleSheetContext),
10174 /* harmony export */ "StyleSheetManager": () => (/* binding */ StyleSheetManager),
10175 /* harmony export */ "ThemeConsumer": () => (/* binding */ ThemeConsumer),
10176 /* harmony export */ "ThemeContext": () => (/* binding */ ThemeContext),
10177 /* harmony export */ "ThemeProvider": () => (/* binding */ ThemeProvider),
10178 /* 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),
10179 /* harmony export */ "createGlobalStyle": () => (/* binding */ createGlobalStyle),
10180 /* harmony export */ "css": () => (/* binding */ css),
10181 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
10182 /* harmony export */ "isStyledComponent": () => (/* binding */ isStyledComponent),
10183 /* harmony export */ "keyframes": () => (/* binding */ keyframes),
10184 /* harmony export */ "withTheme": () => (/* binding */ withTheme)
10185 /* harmony export */ });
10186 /* harmony import */ var stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! stylis/stylis.min */ "./node_modules/stylis/stylis.min.js");
10187 /* harmony import */ var stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0__);
10188 /* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! stylis-rule-sheet */ "./node_modules/stylis-rule-sheet/index.js");
10189 /* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1__);
10190 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
10191 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
10192 /* harmony import */ var _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/unitless */ "./node_modules/@emotion/unitless/dist/unitless.browser.esm.js");
10193 /* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
10194 /* harmony import */ var memoize_one__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! memoize-one */ "./node_modules/memoize-one/dist/memoize-one.esm.js");
10195 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
10196 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__);
10197 /* 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");
10198 /* harmony import */ var merge_anything__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! merge-anything */ "./node_modules/merge-anything/dist/index.esm.js");
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209 //
10210
10211 var interleave = (function (strings, interpolations) {
10212 var result = [strings[0]];
10213
10214 for (var i = 0, len = interpolations.length; i < len; i += 1) {
10215 result.push(interpolations[i], strings[i + 1]);
10216 }
10217
10218 return result;
10219 });
10220
10221 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
10222 return typeof obj;
10223 } : function (obj) {
10224 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
10225 };
10226
10227 var classCallCheck = function (instance, Constructor) {
10228 if (!(instance instanceof Constructor)) {
10229 throw new TypeError("Cannot call a class as a function");
10230 }
10231 };
10232
10233 var createClass = function () {
10234 function defineProperties(target, props) {
10235 for (var i = 0; i < props.length; i++) {
10236 var descriptor = props[i];
10237 descriptor.enumerable = descriptor.enumerable || false;
10238 descriptor.configurable = true;
10239 if ("value" in descriptor) descriptor.writable = true;
10240 Object.defineProperty(target, descriptor.key, descriptor);
10241 }
10242 }
10243
10244 return function (Constructor, protoProps, staticProps) {
10245 if (protoProps) defineProperties(Constructor.prototype, protoProps);
10246 if (staticProps) defineProperties(Constructor, staticProps);
10247 return Constructor;
10248 };
10249 }();
10250
10251 var _extends = Object.assign || function (target) {
10252 for (var i = 1; i < arguments.length; i++) {
10253 var source = arguments[i];
10254
10255 for (var key in source) {
10256 if (Object.prototype.hasOwnProperty.call(source, key)) {
10257 target[key] = source[key];
10258 }
10259 }
10260 }
10261
10262 return target;
10263 };
10264
10265 var inherits = function (subClass, superClass) {
10266 if (typeof superClass !== "function" && superClass !== null) {
10267 throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
10268 }
10269
10270 subClass.prototype = Object.create(superClass && superClass.prototype, {
10271 constructor: {
10272 value: subClass,
10273 enumerable: false,
10274 writable: true,
10275 configurable: true
10276 }
10277 });
10278 if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
10279 };
10280
10281 var objectWithoutProperties = function (obj, keys) {
10282 var target = {};
10283
10284 for (var i in obj) {
10285 if (keys.indexOf(i) >= 0) continue;
10286 if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
10287 target[i] = obj[i];
10288 }
10289
10290 return target;
10291 };
10292
10293 var possibleConstructorReturn = function (self, call) {
10294 if (!self) {
10295 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
10296 }
10297
10298 return call && (typeof call === "object" || typeof call === "function") ? call : self;
10299 };
10300
10301 //
10302 var isPlainObject = (function (x) {
10303 return (typeof x === 'undefined' ? 'undefined' : _typeof(x)) === 'object' && x.constructor === Object;
10304 });
10305
10306 //
10307 var EMPTY_ARRAY = Object.freeze([]);
10308 var EMPTY_OBJECT = Object.freeze({});
10309
10310 //
10311 function isFunction(test) {
10312 return typeof test === 'function';
10313 }
10314
10315 //
10316
10317 function getComponentName(target) {
10318 return ( true ? typeof target === 'string' && target : 0) || target.displayName || target.name || 'Component';
10319 }
10320
10321 //
10322 function isStatelessFunction(test) {
10323 return typeof test === 'function' && !(test.prototype && test.prototype.isReactComponent);
10324 }
10325
10326 //
10327 function isStyledComponent(target) {
10328 return target && typeof target.styledComponentId === 'string';
10329 }
10330
10331 //
10332
10333 var SC_ATTR = typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || 'data-styled';
10334
10335 var SC_VERSION_ATTR = 'data-styled-version';
10336
10337 var SC_STREAM_ATTR = 'data-styled-streamed';
10338
10339 var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;
10340
10341 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';
10342
10343 // Shared empty execution context when generating static styles
10344 var STATIC_EXECUTION_CONTEXT = {};
10345
10346 //
10347
10348
10349 /**
10350 * Parse errors.md and turn it into a simple hash of code: message
10351 */
10352 var ERRORS = true ? {
10353 "1": "Cannot create styled-component for component: %s.\n\n",
10354 "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",
10355 "3": "Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",
10356 "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",
10357 "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",
10358 "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",
10359 "7": "ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n",
10360 "8": "ThemeProvider: Please make your \"theme\" prop an object.\n\n",
10361 "9": "Missing document `<head>`\n\n",
10362 "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",
10363 "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",
10364 "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",
10365 "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"
10366 } : 0;
10367
10368 /**
10369 * super basic version of sprintf
10370 */
10371 function format() {
10372 var a = arguments.length <= 0 ? undefined : arguments[0];
10373 var b = [];
10374
10375 for (var c = 1, len = arguments.length; c < len; c += 1) {
10376 b.push(arguments.length <= c ? undefined : arguments[c]);
10377 }
10378
10379 b.forEach(function (d) {
10380 a = a.replace(/%[a-z]/, d);
10381 });
10382
10383 return a;
10384 }
10385
10386 /**
10387 * Create an error file out of errors.md for development and a simple web link to the full errors
10388 * in production mode.
10389 */
10390
10391 var StyledComponentsError = function (_Error) {
10392 inherits(StyledComponentsError, _Error);
10393
10394 function StyledComponentsError(code) {
10395 classCallCheck(this, StyledComponentsError);
10396
10397 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
10398 interpolations[_key - 1] = arguments[_key];
10399 }
10400
10401 if (false) { var _this; } else {
10402 var _this = possibleConstructorReturn(this, _Error.call(this, format.apply(undefined, [ERRORS[code]].concat(interpolations)).trim()));
10403 }
10404 return possibleConstructorReturn(_this);
10405 }
10406
10407 return StyledComponentsError;
10408 }(Error);
10409
10410 //
10411 var SC_COMPONENT_ID = /^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm;
10412
10413 var extractComps = (function (maybeCSS) {
10414 var css = '' + (maybeCSS || ''); // Definitely a string, and a clone
10415 var existingComponents = [];
10416 css.replace(SC_COMPONENT_ID, function (match, componentId, matchIndex) {
10417 existingComponents.push({ componentId: componentId, matchIndex: matchIndex });
10418 return match;
10419 });
10420 return existingComponents.map(function (_ref, i) {
10421 var componentId = _ref.componentId,
10422 matchIndex = _ref.matchIndex;
10423
10424 var nextComp = existingComponents[i + 1];
10425 var cssFromDOM = nextComp ? css.slice(matchIndex, nextComp.matchIndex) : css.slice(matchIndex);
10426 return { componentId: componentId, cssFromDOM: cssFromDOM };
10427 });
10428 });
10429
10430 //
10431
10432 var COMMENT_REGEX = /^\s*\/\/.*$/gm;
10433
10434 // NOTE: This stylis instance is only used to split rules from SSR'd style tags
10435 var stylisSplitter = new (stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default())({
10436 global: false,
10437 cascade: true,
10438 keyframe: false,
10439 prefix: false,
10440 compress: false,
10441 semicolon: true
10442 });
10443
10444 var stylis = new (stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default())({
10445 global: false,
10446 cascade: true,
10447 keyframe: false,
10448 prefix: true,
10449 compress: false,
10450 semicolon: false // NOTE: This means "autocomplete missing semicolons"
10451 });
10452
10453 // Wrap `insertRulePlugin to build a list of rules,
10454 // and then make our own plugin to return the rules. This
10455 // makes it easier to hook into the existing SSR architecture
10456
10457 var parsingRules = [];
10458
10459 // eslint-disable-next-line consistent-return
10460 var returnRulesPlugin = function returnRulesPlugin(context) {
10461 if (context === -2) {
10462 var parsedRules = parsingRules;
10463 parsingRules = [];
10464 return parsedRules;
10465 }
10466 };
10467
10468 var parseRulesPlugin = stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1___default()(function (rule) {
10469 parsingRules.push(rule);
10470 });
10471
10472 var _componentId = void 0;
10473 var _selector = void 0;
10474 var _selectorRegexp = void 0;
10475
10476 var selfReferenceReplacer = function selfReferenceReplacer(match, offset, string) {
10477 if (
10478 // the first self-ref is always untouched
10479 offset > 0 &&
10480 // there should be at least two self-refs to do a replacement (.b > .b)
10481 string.slice(0, offset).indexOf(_selector) !== -1 &&
10482 // no consecutive self refs (.b.b); that is a precedence boost and treated differently
10483 string.slice(offset - _selector.length, offset) !== _selector) {
10484 return '.' + _componentId;
10485 }
10486
10487 return match;
10488 };
10489
10490 /**
10491 * When writing a style like
10492 *
10493 * & + & {
10494 * color: red;
10495 * }
10496 *
10497 * The second ampersand should be a reference to the static component class. stylis
10498 * has no knowledge of static class so we have to intelligently replace the base selector.
10499 */
10500 var selfReferenceReplacementPlugin = function selfReferenceReplacementPlugin(context, _, selectors) {
10501 if (context === 2 && selectors.length && selectors[0].lastIndexOf(_selector) > 0) {
10502 // eslint-disable-next-line no-param-reassign
10503 selectors[0] = selectors[0].replace(_selectorRegexp, selfReferenceReplacer);
10504 }
10505 };
10506
10507 stylis.use([selfReferenceReplacementPlugin, parseRulesPlugin, returnRulesPlugin]);
10508 stylisSplitter.use([parseRulesPlugin, returnRulesPlugin]);
10509
10510 var splitByRules = function splitByRules(css) {
10511 return stylisSplitter('', css);
10512 };
10513
10514 function stringifyRules(rules, selector, prefix) {
10515 var componentId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '&';
10516
10517 var flatCSS = rules.join('').replace(COMMENT_REGEX, ''); // replace JS comments
10518
10519 var cssStr = selector && prefix ? prefix + ' ' + selector + ' { ' + flatCSS + ' }' : flatCSS;
10520
10521 // stylis has no concept of state to be passed to plugins
10522 // but since JS is single=threaded, we can rely on that to ensure
10523 // these properties stay in sync with the current stylis run
10524 _componentId = componentId;
10525 _selector = selector;
10526 _selectorRegexp = new RegExp('\\' + _selector + '\\b', 'g');
10527
10528 return stylis(prefix || !selector ? '' : selector, cssStr);
10529 }
10530
10531 //
10532 /* eslint-disable camelcase, no-undef */
10533
10534 var getNonce = (function () {
10535 return true ? __webpack_require__.nc : 0;
10536 });
10537
10538 //
10539 /* These are helpers for the StyleTags to keep track of the injected
10540 * rule names for each (component) ID that they're keeping track of.
10541 * They're crucial for detecting whether a name has already been
10542 * injected.
10543 * (This excludes rehydrated names) */
10544
10545 /* adds a new ID:name pairing to a names dictionary */
10546 var addNameForId = function addNameForId(names, id, name) {
10547 if (name) {
10548 // eslint-disable-next-line no-param-reassign
10549 var namesForId = names[id] || (names[id] = Object.create(null));
10550 namesForId[name] = true;
10551 }
10552 };
10553
10554 /* resets an ID entirely by overwriting it in the dictionary */
10555 var resetIdNames = function resetIdNames(names, id) {
10556 // eslint-disable-next-line no-param-reassign
10557 names[id] = Object.create(null);
10558 };
10559
10560 /* factory for a names dictionary checking the existance of an ID:name pairing */
10561 var hasNameForId = function hasNameForId(names) {
10562 return function (id, name) {
10563 return names[id] !== undefined && names[id][name];
10564 };
10565 };
10566
10567 /* stringifies names for the html/element output */
10568 var stringifyNames = function stringifyNames(names) {
10569 var str = '';
10570 // eslint-disable-next-line guard-for-in
10571 for (var id in names) {
10572 str += Object.keys(names[id]).join(' ') + ' ';
10573 }
10574 return str.trim();
10575 };
10576
10577 /* clones the nested names dictionary */
10578 var cloneNames = function cloneNames(names) {
10579 var clone = Object.create(null);
10580 // eslint-disable-next-line guard-for-in
10581 for (var id in names) {
10582 clone[id] = _extends({}, names[id]);
10583 }
10584 return clone;
10585 };
10586
10587 //
10588
10589 /* These are helpers that deal with the insertRule (aka speedy) API
10590 * They are used in the StyleTags and specifically the speedy tag
10591 */
10592
10593 /* retrieve a sheet for a given style tag */
10594 var sheetForTag = function sheetForTag(tag) {
10595 // $FlowFixMe
10596 if (tag.sheet) return tag.sheet;
10597
10598 /* Firefox quirk requires us to step through all stylesheets to find one owned by the given tag */
10599 var size = tag.ownerDocument.styleSheets.length;
10600 for (var i = 0; i < size; i += 1) {
10601 var sheet = tag.ownerDocument.styleSheets[i];
10602 // $FlowFixMe
10603 if (sheet.ownerNode === tag) return sheet;
10604 }
10605
10606 /* we should always be able to find a tag */
10607 throw new StyledComponentsError(10);
10608 };
10609
10610 /* insert a rule safely and return whether it was actually injected */
10611 var safeInsertRule = function safeInsertRule(sheet, cssRule, index) {
10612 /* abort early if cssRule string is falsy */
10613 if (!cssRule) return false;
10614
10615 var maxIndex = sheet.cssRules.length;
10616
10617 try {
10618 /* use insertRule and cap passed index with maxIndex (no of cssRules) */
10619 sheet.insertRule(cssRule, index <= maxIndex ? index : maxIndex);
10620 } catch (err) {
10621 /* any error indicates an invalid rule */
10622 return false;
10623 }
10624
10625 return true;
10626 };
10627
10628 /* deletes `size` rules starting from `removalIndex` */
10629 var deleteRules = function deleteRules(sheet, removalIndex, size) {
10630 var lowerBound = removalIndex - size;
10631 for (var i = removalIndex; i > lowerBound; i -= 1) {
10632 sheet.deleteRule(i);
10633 }
10634 };
10635
10636 //
10637
10638 /* this marker separates component styles and is important for rehydration */
10639 var makeTextMarker = function makeTextMarker(id) {
10640 return '\n/* sc-component-id: ' + id + ' */\n';
10641 };
10642
10643 /* add up all numbers in array up until and including the index */
10644 var addUpUntilIndex = function addUpUntilIndex(sizes, index) {
10645 var totalUpToIndex = 0;
10646 for (var i = 0; i <= index; i += 1) {
10647 totalUpToIndex += sizes[i];
10648 }
10649
10650 return totalUpToIndex;
10651 };
10652
10653 /* create a new style tag after lastEl */
10654 var makeStyleTag = function makeStyleTag(target, tagEl, insertBefore) {
10655 var targetDocument = document;
10656 if (target) targetDocument = target.ownerDocument;else if (tagEl) targetDocument = tagEl.ownerDocument;
10657
10658 var el = targetDocument.createElement('style');
10659 el.setAttribute(SC_ATTR, '');
10660 el.setAttribute(SC_VERSION_ATTR, "4.4.1");
10661
10662 var nonce = getNonce();
10663 if (nonce) {
10664 el.setAttribute('nonce', nonce);
10665 }
10666
10667 /* Work around insertRule quirk in EdgeHTML */
10668 el.appendChild(targetDocument.createTextNode(''));
10669
10670 if (target && !tagEl) {
10671 /* Append to target when no previous element was passed */
10672 target.appendChild(el);
10673 } else {
10674 if (!tagEl || !target || !tagEl.parentNode) {
10675 throw new StyledComponentsError(6);
10676 }
10677
10678 /* Insert new style tag after the previous one */
10679 tagEl.parentNode.insertBefore(el, insertBefore ? tagEl : tagEl.nextSibling);
10680 }
10681
10682 return el;
10683 };
10684
10685 /* takes a css factory function and outputs an html styled tag factory */
10686 var wrapAsHtmlTag = function wrapAsHtmlTag(css, names) {
10687 return function (additionalAttrs) {
10688 var nonce = getNonce();
10689 var attrs = [nonce && 'nonce="' + nonce + '"', SC_ATTR + '="' + stringifyNames(names) + '"', SC_VERSION_ATTR + '="' + "4.4.1" + '"', additionalAttrs];
10690
10691 var htmlAttr = attrs.filter(Boolean).join(' ');
10692 return '<style ' + htmlAttr + '>' + css() + '</style>';
10693 };
10694 };
10695
10696 /* takes a css factory function and outputs an element factory */
10697 var wrapAsElement = function wrapAsElement(css, names) {
10698 return function () {
10699 var _props;
10700
10701 var props = (_props = {}, _props[SC_ATTR] = stringifyNames(names), _props[SC_VERSION_ATTR] = "4.4.1", _props);
10702
10703 var nonce = getNonce();
10704 if (nonce) {
10705 // $FlowFixMe
10706 props.nonce = nonce;
10707 }
10708
10709 // eslint-disable-next-line react/no-danger
10710 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement('style', _extends({}, props, { dangerouslySetInnerHTML: { __html: css() } }));
10711 };
10712 };
10713
10714 var getIdsFromMarkersFactory = function getIdsFromMarkersFactory(markers) {
10715 return function () {
10716 return Object.keys(markers);
10717 };
10718 };
10719
10720 /* speedy tags utilise insertRule */
10721 var makeSpeedyTag = function makeSpeedyTag(el, getImportRuleTag) {
10722 var names = Object.create(null);
10723 var markers = Object.create(null);
10724 var sizes = [];
10725
10726 var extractImport = getImportRuleTag !== undefined;
10727 /* indicates whether getImportRuleTag was called */
10728 var usedImportRuleTag = false;
10729
10730 var insertMarker = function insertMarker(id) {
10731 var prev = markers[id];
10732 if (prev !== undefined) {
10733 return prev;
10734 }
10735
10736 markers[id] = sizes.length;
10737 sizes.push(0);
10738 resetIdNames(names, id);
10739
10740 return markers[id];
10741 };
10742
10743 var insertRules = function insertRules(id, cssRules, name) {
10744 var marker = insertMarker(id);
10745 var sheet = sheetForTag(el);
10746 var insertIndex = addUpUntilIndex(sizes, marker);
10747
10748 var injectedRules = 0;
10749 var importRules = [];
10750 var cssRulesSize = cssRules.length;
10751
10752 for (var i = 0; i < cssRulesSize; i += 1) {
10753 var cssRule = cssRules[i];
10754 var mayHaveImport = extractImport; /* @import rules are reordered to appear first */
10755 if (mayHaveImport && cssRule.indexOf('@import') !== -1) {
10756 importRules.push(cssRule);
10757 } else if (safeInsertRule(sheet, cssRule, insertIndex + injectedRules)) {
10758 mayHaveImport = false;
10759 injectedRules += 1;
10760 }
10761 }
10762
10763 if (extractImport && importRules.length > 0) {
10764 usedImportRuleTag = true;
10765 // $FlowFixMe
10766 getImportRuleTag().insertRules(id + '-import', importRules);
10767 }
10768
10769 sizes[marker] += injectedRules; /* add up no of injected rules */
10770 addNameForId(names, id, name);
10771 };
10772
10773 var removeRules = function removeRules(id) {
10774 var marker = markers[id];
10775 if (marker === undefined) return;
10776 // $FlowFixMe
10777 if (el.isConnected === false) return;
10778
10779 var size = sizes[marker];
10780 var sheet = sheetForTag(el);
10781 var removalIndex = addUpUntilIndex(sizes, marker) - 1;
10782 deleteRules(sheet, removalIndex, size);
10783 sizes[marker] = 0;
10784 resetIdNames(names, id);
10785
10786 if (extractImport && usedImportRuleTag) {
10787 // $FlowFixMe
10788 getImportRuleTag().removeRules(id + '-import');
10789 }
10790 };
10791
10792 var css = function css() {
10793 var _sheetForTag = sheetForTag(el),
10794 cssRules = _sheetForTag.cssRules;
10795
10796 var str = '';
10797
10798 // eslint-disable-next-line guard-for-in
10799 for (var id in markers) {
10800 str += makeTextMarker(id);
10801 var marker = markers[id];
10802 var end = addUpUntilIndex(sizes, marker);
10803 var size = sizes[marker];
10804 for (var i = end - size; i < end; i += 1) {
10805 var rule = cssRules[i];
10806 if (rule !== undefined) {
10807 str += rule.cssText;
10808 }
10809 }
10810 }
10811
10812 return str;
10813 };
10814
10815 return {
10816 clone: function clone() {
10817 throw new StyledComponentsError(5);
10818 },
10819
10820 css: css,
10821 getIds: getIdsFromMarkersFactory(markers),
10822 hasNameForId: hasNameForId(names),
10823 insertMarker: insertMarker,
10824 insertRules: insertRules,
10825 removeRules: removeRules,
10826 sealed: false,
10827 styleTag: el,
10828 toElement: wrapAsElement(css, names),
10829 toHTML: wrapAsHtmlTag(css, names)
10830 };
10831 };
10832
10833 var makeTextNode = function makeTextNode(targetDocument, id) {
10834 return targetDocument.createTextNode(makeTextMarker(id));
10835 };
10836
10837 var makeBrowserTag = function makeBrowserTag(el, getImportRuleTag) {
10838 var names = Object.create(null);
10839 var markers = Object.create(null);
10840
10841 var extractImport = getImportRuleTag !== undefined;
10842
10843 /* indicates whether getImportRuleTag was called */
10844 var usedImportRuleTag = false;
10845
10846 var insertMarker = function insertMarker(id) {
10847 var prev = markers[id];
10848 if (prev !== undefined) {
10849 return prev;
10850 }
10851
10852 markers[id] = makeTextNode(el.ownerDocument, id);
10853 el.appendChild(markers[id]);
10854 names[id] = Object.create(null);
10855
10856 return markers[id];
10857 };
10858
10859 var insertRules = function insertRules(id, cssRules, name) {
10860 var marker = insertMarker(id);
10861 var importRules = [];
10862 var cssRulesSize = cssRules.length;
10863
10864 for (var i = 0; i < cssRulesSize; i += 1) {
10865 var rule = cssRules[i];
10866 var mayHaveImport = extractImport;
10867 if (mayHaveImport && rule.indexOf('@import') !== -1) {
10868 importRules.push(rule);
10869 } else {
10870 mayHaveImport = false;
10871 var separator = i === cssRulesSize - 1 ? '' : ' ';
10872 marker.appendData('' + rule + separator);
10873 }
10874 }
10875
10876 addNameForId(names, id, name);
10877
10878 if (extractImport && importRules.length > 0) {
10879 usedImportRuleTag = true;
10880 // $FlowFixMe
10881 getImportRuleTag().insertRules(id + '-import', importRules);
10882 }
10883 };
10884
10885 var removeRules = function removeRules(id) {
10886 var marker = markers[id];
10887 if (marker === undefined) return;
10888
10889 /* create new empty text node and replace the current one */
10890 var newMarker = makeTextNode(el.ownerDocument, id);
10891 el.replaceChild(newMarker, marker);
10892 markers[id] = newMarker;
10893 resetIdNames(names, id);
10894
10895 if (extractImport && usedImportRuleTag) {
10896 // $FlowFixMe
10897 getImportRuleTag().removeRules(id + '-import');
10898 }
10899 };
10900
10901 var css = function css() {
10902 var str = '';
10903
10904 // eslint-disable-next-line guard-for-in
10905 for (var id in markers) {
10906 str += markers[id].data;
10907 }
10908
10909 return str;
10910 };
10911
10912 return {
10913 clone: function clone() {
10914 throw new StyledComponentsError(5);
10915 },
10916
10917 css: css,
10918 getIds: getIdsFromMarkersFactory(markers),
10919 hasNameForId: hasNameForId(names),
10920 insertMarker: insertMarker,
10921 insertRules: insertRules,
10922 removeRules: removeRules,
10923 sealed: false,
10924 styleTag: el,
10925 toElement: wrapAsElement(css, names),
10926 toHTML: wrapAsHtmlTag(css, names)
10927 };
10928 };
10929
10930 var makeServerTag = function makeServerTag(namesArg, markersArg) {
10931 var names = namesArg === undefined ? Object.create(null) : namesArg;
10932 var markers = markersArg === undefined ? Object.create(null) : markersArg;
10933
10934 var insertMarker = function insertMarker(id) {
10935 var prev = markers[id];
10936 if (prev !== undefined) {
10937 return prev;
10938 }
10939
10940 return markers[id] = [''];
10941 };
10942
10943 var insertRules = function insertRules(id, cssRules, name) {
10944 var marker = insertMarker(id);
10945 marker[0] += cssRules.join(' ');
10946 addNameForId(names, id, name);
10947 };
10948
10949 var removeRules = function removeRules(id) {
10950 var marker = markers[id];
10951 if (marker === undefined) return;
10952 marker[0] = '';
10953 resetIdNames(names, id);
10954 };
10955
10956 var css = function css() {
10957 var str = '';
10958 // eslint-disable-next-line guard-for-in
10959 for (var id in markers) {
10960 var cssForId = markers[id][0];
10961 if (cssForId) {
10962 str += makeTextMarker(id) + cssForId;
10963 }
10964 }
10965 return str;
10966 };
10967
10968 var clone = function clone() {
10969 var namesClone = cloneNames(names);
10970 var markersClone = Object.create(null);
10971
10972 // eslint-disable-next-line guard-for-in
10973 for (var id in markers) {
10974 markersClone[id] = [markers[id][0]];
10975 }
10976
10977 return makeServerTag(namesClone, markersClone);
10978 };
10979
10980 var tag = {
10981 clone: clone,
10982 css: css,
10983 getIds: getIdsFromMarkersFactory(markers),
10984 hasNameForId: hasNameForId(names),
10985 insertMarker: insertMarker,
10986 insertRules: insertRules,
10987 removeRules: removeRules,
10988 sealed: false,
10989 styleTag: null,
10990 toElement: wrapAsElement(css, names),
10991 toHTML: wrapAsHtmlTag(css, names)
10992 };
10993
10994 return tag;
10995 };
10996
10997 var makeTag = function makeTag(target, tagEl, forceServer, insertBefore, getImportRuleTag) {
10998 if (IS_BROWSER && !forceServer) {
10999 var el = makeStyleTag(target, tagEl, insertBefore);
11000
11001 if (DISABLE_SPEEDY) {
11002 return makeBrowserTag(el, getImportRuleTag);
11003 } else {
11004 return makeSpeedyTag(el, getImportRuleTag);
11005 }
11006 }
11007
11008 return makeServerTag();
11009 };
11010
11011 var rehydrate = function rehydrate(tag, els, extracted) {
11012 /* add all extracted components to the new tag */
11013 for (var i = 0, len = extracted.length; i < len; i += 1) {
11014 var _extracted$i = extracted[i],
11015 componentId = _extracted$i.componentId,
11016 cssFromDOM = _extracted$i.cssFromDOM;
11017
11018 var cssRules = splitByRules(cssFromDOM);
11019 tag.insertRules(componentId, cssRules);
11020 }
11021
11022 /* remove old HTMLStyleElements, since they have been rehydrated */
11023 for (var _i = 0, _len = els.length; _i < _len; _i += 1) {
11024 var el = els[_i];
11025 if (el.parentNode) {
11026 el.parentNode.removeChild(el);
11027 }
11028 }
11029 };
11030
11031 //
11032
11033 var SPLIT_REGEX = /\s+/;
11034
11035 /* determine the maximum number of components before tags are sharded */
11036 var MAX_SIZE = void 0;
11037 if (IS_BROWSER) {
11038 /* in speedy mode we can keep a lot more rules in a sheet before a slowdown can be expected */
11039 MAX_SIZE = DISABLE_SPEEDY ? 40 : 1000;
11040 } else {
11041 /* for servers we do not need to shard at all */
11042 MAX_SIZE = -1;
11043 }
11044
11045 var sheetRunningId = 0;
11046 var master = void 0;
11047
11048 var StyleSheet = function () {
11049
11050 /* a map from ids to tags */
11051
11052 /* deferred rules for a given id */
11053
11054 /* this is used for not reinjecting rules via hasNameForId() */
11055
11056 /* when rules for an id are removed using remove() we have to ignore rehydratedNames for it */
11057
11058 /* a list of tags belonging to this StyleSheet */
11059
11060 /* a tag for import rules */
11061
11062 /* current capacity until a new tag must be created */
11063
11064 /* children (aka clones) of this StyleSheet inheriting all and future injections */
11065
11066 function StyleSheet() {
11067 var _this = this;
11068
11069 var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : IS_BROWSER ? document.head : null;
11070 var forceServer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
11071 classCallCheck(this, StyleSheet);
11072
11073 this.getImportRuleTag = function () {
11074 var importRuleTag = _this.importRuleTag;
11075
11076 if (importRuleTag !== undefined) {
11077 return importRuleTag;
11078 }
11079
11080 var firstTag = _this.tags[0];
11081 var insertBefore = true;
11082
11083 return _this.importRuleTag = makeTag(_this.target, firstTag ? firstTag.styleTag : null, _this.forceServer, insertBefore);
11084 };
11085
11086 sheetRunningId += 1;
11087 this.id = sheetRunningId;
11088 this.forceServer = forceServer;
11089 this.target = forceServer ? null : target;
11090 this.tagMap = {};
11091 this.deferred = {};
11092 this.rehydratedNames = {};
11093 this.ignoreRehydratedNames = {};
11094 this.tags = [];
11095 this.capacity = 1;
11096 this.clones = [];
11097 }
11098
11099 /* rehydrate all SSR'd style tags */
11100
11101
11102 StyleSheet.prototype.rehydrate = function rehydrate$$1() {
11103 if (!IS_BROWSER || this.forceServer) return this;
11104
11105 var els = [];
11106 var extracted = [];
11107 var isStreamed = false;
11108
11109 /* retrieve all of our SSR style elements from the DOM */
11110 var nodes = document.querySelectorAll('style[' + SC_ATTR + '][' + SC_VERSION_ATTR + '="' + "4.4.1" + '"]');
11111
11112 var nodesSize = nodes.length;
11113
11114 /* abort rehydration if no previous style tags were found */
11115 if (!nodesSize) return this;
11116
11117 for (var i = 0; i < nodesSize; i += 1) {
11118 var el = nodes[i];
11119
11120 /* check if style tag is a streamed tag */
11121 if (!isStreamed) isStreamed = !!el.getAttribute(SC_STREAM_ATTR);
11122
11123 /* retrieve all component names */
11124 var elNames = (el.getAttribute(SC_ATTR) || '').trim().split(SPLIT_REGEX);
11125 var elNamesSize = elNames.length;
11126 for (var j = 0, name; j < elNamesSize; j += 1) {
11127 name = elNames[j];
11128 /* add rehydrated name to sheet to avoid re-adding styles */
11129 this.rehydratedNames[name] = true;
11130 }
11131
11132 /* extract all components and their CSS */
11133 extracted.push.apply(extracted, extractComps(el.textContent));
11134
11135 /* store original HTMLStyleElement */
11136 els.push(el);
11137 }
11138
11139 /* abort rehydration if nothing was extracted */
11140 var extractedSize = extracted.length;
11141 if (!extractedSize) return this;
11142
11143 /* create a tag to be used for rehydration */
11144 var tag = this.makeTag(null);
11145
11146 rehydrate(tag, els, extracted);
11147
11148 /* reset capacity and adjust MAX_SIZE by the initial size of the rehydration */
11149 this.capacity = Math.max(1, MAX_SIZE - extractedSize);
11150 this.tags.push(tag);
11151
11152 /* retrieve all component ids */
11153 for (var _j = 0; _j < extractedSize; _j += 1) {
11154 this.tagMap[extracted[_j].componentId] = tag;
11155 }
11156
11157 return this;
11158 };
11159
11160 /* retrieve a "master" instance of StyleSheet which is typically used when no other is available
11161 * The master StyleSheet is targeted by createGlobalStyle, keyframes, and components outside of any
11162 * StyleSheetManager's context */
11163
11164
11165 /* reset the internal "master" instance */
11166 StyleSheet.reset = function reset() {
11167 var forceServer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
11168
11169 master = new StyleSheet(undefined, forceServer).rehydrate();
11170 };
11171
11172 /* adds "children" to the StyleSheet that inherit all of the parents' rules
11173 * while their own rules do not affect the parent */
11174
11175
11176 StyleSheet.prototype.clone = function clone() {
11177 var sheet = new StyleSheet(this.target, this.forceServer);
11178
11179 /* add to clone array */
11180 this.clones.push(sheet);
11181
11182 /* clone all tags */
11183 sheet.tags = this.tags.map(function (tag) {
11184 var ids = tag.getIds();
11185 var newTag = tag.clone();
11186
11187 /* reconstruct tagMap */
11188 for (var i = 0; i < ids.length; i += 1) {
11189 sheet.tagMap[ids[i]] = newTag;
11190 }
11191
11192 return newTag;
11193 });
11194
11195 /* clone other maps */
11196 sheet.rehydratedNames = _extends({}, this.rehydratedNames);
11197 sheet.deferred = _extends({}, this.deferred);
11198
11199 return sheet;
11200 };
11201
11202 /* force StyleSheet to create a new tag on the next injection */
11203
11204
11205 StyleSheet.prototype.sealAllTags = function sealAllTags() {
11206 this.capacity = 1;
11207
11208 this.tags.forEach(function (tag) {
11209 // eslint-disable-next-line no-param-reassign
11210 tag.sealed = true;
11211 });
11212 };
11213
11214 StyleSheet.prototype.makeTag = function makeTag$$1(tag) {
11215 var lastEl = tag ? tag.styleTag : null;
11216 var insertBefore = false;
11217
11218 return makeTag(this.target, lastEl, this.forceServer, insertBefore, this.getImportRuleTag);
11219 };
11220
11221 /* get a tag for a given componentId, assign the componentId to one, or shard */
11222 StyleSheet.prototype.getTagForId = function getTagForId(id) {
11223 /* simply return a tag, when the componentId was already assigned one */
11224 var prev = this.tagMap[id];
11225 if (prev !== undefined && !prev.sealed) {
11226 return prev;
11227 }
11228
11229 var tag = this.tags[this.tags.length - 1];
11230
11231 /* shard (create a new tag) if the tag is exhausted (See MAX_SIZE) */
11232 this.capacity -= 1;
11233
11234 if (this.capacity === 0) {
11235 this.capacity = MAX_SIZE;
11236 tag = this.makeTag(tag);
11237 this.tags.push(tag);
11238 }
11239
11240 return this.tagMap[id] = tag;
11241 };
11242
11243 /* mainly for createGlobalStyle to check for its id */
11244
11245
11246 StyleSheet.prototype.hasId = function hasId(id) {
11247 return this.tagMap[id] !== undefined;
11248 };
11249
11250 /* caching layer checking id+name to already have a corresponding tag and injected rules */
11251
11252
11253 StyleSheet.prototype.hasNameForId = function hasNameForId(id, name) {
11254 /* exception for rehydrated names which are checked separately */
11255 if (this.ignoreRehydratedNames[id] === undefined && this.rehydratedNames[name]) {
11256 return true;
11257 }
11258
11259 var tag = this.tagMap[id];
11260 return tag !== undefined && tag.hasNameForId(id, name);
11261 };
11262
11263 /* registers a componentId and registers it on its tag */
11264
11265
11266 StyleSheet.prototype.deferredInject = function deferredInject(id, cssRules) {
11267 /* don't inject when the id is already registered */
11268 if (this.tagMap[id] !== undefined) return;
11269
11270 var clones = this.clones;
11271
11272 for (var i = 0; i < clones.length; i += 1) {
11273 clones[i].deferredInject(id, cssRules);
11274 }
11275
11276 this.getTagForId(id).insertMarker(id);
11277 this.deferred[id] = cssRules;
11278 };
11279
11280 /* injects rules for a given id with a name that will need to be cached */
11281
11282
11283 StyleSheet.prototype.inject = function inject(id, cssRules, name) {
11284 var clones = this.clones;
11285
11286
11287 for (var i = 0; i < clones.length; i += 1) {
11288 clones[i].inject(id, cssRules, name);
11289 }
11290
11291 var tag = this.getTagForId(id);
11292
11293 /* add deferred rules for component */
11294 if (this.deferred[id] !== undefined) {
11295 // Combine passed cssRules with previously deferred CSS rules
11296 // NOTE: We cannot mutate the deferred array itself as all clones
11297 // do the same (see clones[i].inject)
11298 var rules = this.deferred[id].concat(cssRules);
11299 tag.insertRules(id, rules, name);
11300
11301 this.deferred[id] = undefined;
11302 } else {
11303 tag.insertRules(id, cssRules, name);
11304 }
11305 };
11306
11307 /* removes all rules for a given id, which doesn't remove its marker but resets it */
11308
11309
11310 StyleSheet.prototype.remove = function remove(id) {
11311 var tag = this.tagMap[id];
11312 if (tag === undefined) return;
11313
11314 var clones = this.clones;
11315
11316 for (var i = 0; i < clones.length; i += 1) {
11317 clones[i].remove(id);
11318 }
11319
11320 /* remove all rules from the tag */
11321 tag.removeRules(id);
11322
11323 /* ignore possible rehydrated names */
11324 this.ignoreRehydratedNames[id] = true;
11325
11326 /* delete possible deferred rules */
11327 this.deferred[id] = undefined;
11328 };
11329
11330 StyleSheet.prototype.toHTML = function toHTML() {
11331 return this.tags.map(function (tag) {
11332 return tag.toHTML();
11333 }).join('');
11334 };
11335
11336 StyleSheet.prototype.toReactElements = function toReactElements() {
11337 var id = this.id;
11338
11339
11340 return this.tags.map(function (tag, i) {
11341 var key = 'sc-' + id + '-' + i;
11342 return (0,react__WEBPACK_IMPORTED_MODULE_2__.cloneElement)(tag.toElement(), { key: key });
11343 });
11344 };
11345
11346 createClass(StyleSheet, null, [{
11347 key: 'master',
11348 get: function get$$1() {
11349 return master || (master = new StyleSheet().rehydrate());
11350 }
11351
11352 /* NOTE: This is just for backwards-compatibility with jest-styled-components */
11353
11354 }, {
11355 key: 'instance',
11356 get: function get$$1() {
11357 return StyleSheet.master;
11358 }
11359 }]);
11360 return StyleSheet;
11361 }();
11362
11363 //
11364
11365 var Keyframes = function () {
11366 function Keyframes(name, rules) {
11367 var _this = this;
11368
11369 classCallCheck(this, Keyframes);
11370
11371 this.inject = function (styleSheet) {
11372 if (!styleSheet.hasNameForId(_this.id, _this.name)) {
11373 styleSheet.inject(_this.id, _this.rules, _this.name);
11374 }
11375 };
11376
11377 this.toString = function () {
11378 throw new StyledComponentsError(12, String(_this.name));
11379 };
11380
11381 this.name = name;
11382 this.rules = rules;
11383
11384 this.id = 'sc-keyframes-' + name;
11385 }
11386
11387 Keyframes.prototype.getName = function getName() {
11388 return this.name;
11389 };
11390
11391 return Keyframes;
11392 }();
11393
11394 //
11395
11396 /**
11397 * inlined version of
11398 * https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/hyphenateStyleName.js
11399 */
11400
11401 var uppercasePattern = /([A-Z])/g;
11402 var msPattern = /^ms-/;
11403
11404 /**
11405 * Hyphenates a camelcased CSS property name, for example:
11406 *
11407 * > hyphenateStyleName('backgroundColor')
11408 * < "background-color"
11409 * > hyphenateStyleName('MozTransition')
11410 * < "-moz-transition"
11411 * > hyphenateStyleName('msTransition')
11412 * < "-ms-transition"
11413 *
11414 * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
11415 * is converted to `-ms-`.
11416 *
11417 * @param {string} string
11418 * @return {string}
11419 */
11420 function hyphenateStyleName(string) {
11421 return string.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
11422 }
11423
11424 //
11425
11426 // Taken from https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/shared/dangerousStyleValue.js
11427 function addUnitIfNeeded(name, value) {
11428 // https://github.com/amilajack/eslint-plugin-flowtype-errors/issues/133
11429 // $FlowFixMe
11430 if (value == null || typeof value === 'boolean' || value === '') {
11431 return '';
11432 }
11433
11434 if (typeof value === 'number' && value !== 0 && !(name in _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__["default"])) {
11435 return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
11436 }
11437
11438 return String(value).trim();
11439 }
11440
11441 //
11442
11443 /**
11444 * It's falsish not falsy because 0 is allowed.
11445 */
11446 var isFalsish = function isFalsish(chunk) {
11447 return chunk === undefined || chunk === null || chunk === false || chunk === '';
11448 };
11449
11450 var objToCssArray = function objToCssArray(obj, prevKey) {
11451 var rules = [];
11452 var keys = Object.keys(obj);
11453
11454 keys.forEach(function (key) {
11455 if (!isFalsish(obj[key])) {
11456 if (isPlainObject(obj[key])) {
11457 rules.push.apply(rules, objToCssArray(obj[key], key));
11458
11459 return rules;
11460 } else if (isFunction(obj[key])) {
11461 rules.push(hyphenateStyleName(key) + ':', obj[key], ';');
11462
11463 return rules;
11464 }
11465 rules.push(hyphenateStyleName(key) + ': ' + addUnitIfNeeded(key, obj[key]) + ';');
11466 }
11467 return rules;
11468 });
11469
11470 return prevKey ? [prevKey + ' {'].concat(rules, ['}']) : rules;
11471 };
11472
11473 function flatten(chunk, executionContext, styleSheet) {
11474 if (Array.isArray(chunk)) {
11475 var ruleSet = [];
11476
11477 for (var i = 0, len = chunk.length, result; i < len; i += 1) {
11478 result = flatten(chunk[i], executionContext, styleSheet);
11479
11480 if (result === null) continue;else if (Array.isArray(result)) ruleSet.push.apply(ruleSet, result);else ruleSet.push(result);
11481 }
11482
11483 return ruleSet;
11484 }
11485
11486 if (isFalsish(chunk)) {
11487 return null;
11488 }
11489
11490 /* Handle other components */
11491 if (isStyledComponent(chunk)) {
11492 return '.' + chunk.styledComponentId;
11493 }
11494
11495 /* Either execute or defer the function */
11496 if (isFunction(chunk)) {
11497 if (isStatelessFunction(chunk) && executionContext) {
11498 var _result = chunk(executionContext);
11499
11500 if ( true && (0,react_is__WEBPACK_IMPORTED_MODULE_4__.isElement)(_result)) {
11501 // eslint-disable-next-line no-console
11502 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.');
11503 }
11504
11505 return flatten(_result, executionContext, styleSheet);
11506 } else return chunk;
11507 }
11508
11509 if (chunk instanceof Keyframes) {
11510 if (styleSheet) {
11511 chunk.inject(styleSheet);
11512 return chunk.getName();
11513 } else return chunk;
11514 }
11515
11516 /* Handle objects */
11517 return isPlainObject(chunk) ? objToCssArray(chunk) : chunk.toString();
11518 }
11519
11520 //
11521
11522 function css(styles) {
11523 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
11524 interpolations[_key - 1] = arguments[_key];
11525 }
11526
11527 if (isFunction(styles) || isPlainObject(styles)) {
11528 // $FlowFixMe
11529 return flatten(interleave(EMPTY_ARRAY, [styles].concat(interpolations)));
11530 }
11531
11532 // $FlowFixMe
11533 return flatten(interleave(styles, interpolations));
11534 }
11535
11536 //
11537
11538 function constructWithOptions(componentConstructor, tag) {
11539 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT;
11540
11541 if (!(0,react_is__WEBPACK_IMPORTED_MODULE_4__.isValidElementType)(tag)) {
11542 throw new StyledComponentsError(1, String(tag));
11543 }
11544
11545 /* This is callable directly as a template function */
11546 // $FlowFixMe: Not typed to avoid destructuring arguments
11547 var templateFunction = function templateFunction() {
11548 return componentConstructor(tag, options, css.apply(undefined, arguments));
11549 };
11550
11551 /* If config methods are called, wrap up a new template function and merge options */
11552 templateFunction.withConfig = function (config) {
11553 return constructWithOptions(componentConstructor, tag, _extends({}, options, config));
11554 };
11555
11556 /* Modify/inject new props at runtime */
11557 templateFunction.attrs = function (attrs) {
11558 return constructWithOptions(componentConstructor, tag, _extends({}, options, {
11559 attrs: Array.prototype.concat(options.attrs, attrs).filter(Boolean)
11560 }));
11561 };
11562
11563 return templateFunction;
11564 }
11565
11566 //
11567 // Source: https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js
11568 function murmurhash(c) {
11569 for (var e = c.length | 0, a = e | 0, d = 0, b; e >= 4;) {
11570 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;
11571 }
11572 switch (e) {
11573 case 3:
11574 a ^= (c.charCodeAt(d + 2) & 255) << 16;
11575 case 2:
11576 a ^= (c.charCodeAt(d + 1) & 255) << 8;
11577 case 1:
11578 a ^= c.charCodeAt(d) & 255, a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
11579 }
11580 a ^= a >>> 13;
11581 a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
11582 return (a ^ a >>> 15) >>> 0;
11583 }
11584
11585 //
11586 /* eslint-disable no-bitwise */
11587
11588 /* This is the "capacity" of our alphabet i.e. 2x26 for all letters plus their capitalised
11589 * counterparts */
11590 var charsLength = 52;
11591
11592 /* start at 75 for 'a' until 'z' (25) and then start at 65 for capitalised letters */
11593 var getAlphabeticChar = function getAlphabeticChar(code) {
11594 return String.fromCharCode(code + (code > 25 ? 39 : 97));
11595 };
11596
11597 /* input a number, usually a hash and convert it to base-52 */
11598 function generateAlphabeticName(code) {
11599 var name = '';
11600 var x = void 0;
11601
11602 /* get a char and divide by alphabet-length */
11603 for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {
11604 name = getAlphabeticChar(x % charsLength) + name;
11605 }
11606
11607 return getAlphabeticChar(x % charsLength) + name;
11608 }
11609
11610 //
11611
11612 function hasFunctionObjectKey(obj) {
11613 // eslint-disable-next-line guard-for-in, no-restricted-syntax
11614 for (var key in obj) {
11615 if (isFunction(obj[key])) {
11616 return true;
11617 }
11618 }
11619
11620 return false;
11621 }
11622
11623 function isStaticRules(rules, attrs) {
11624 for (var i = 0; i < rules.length; i += 1) {
11625 var rule = rules[i];
11626
11627 // recursive case
11628 if (Array.isArray(rule) && !isStaticRules(rule, attrs)) {
11629 return false;
11630 } else if (isFunction(rule) && !isStyledComponent(rule)) {
11631 // functions are allowed to be static if they're just being
11632 // used to get the classname of a nested styled component
11633 return false;
11634 }
11635 }
11636
11637 if (attrs.some(function (x) {
11638 return isFunction(x) || hasFunctionObjectKey(x);
11639 })) return false;
11640
11641 return true;
11642 }
11643
11644 //
11645
11646 /* combines hashStr (murmurhash) and nameGenerator for convenience */
11647 var hasher = function hasher(str) {
11648 return generateAlphabeticName(murmurhash(str));
11649 };
11650
11651 /*
11652 ComponentStyle is all the CSS-specific stuff, not
11653 the React-specific stuff.
11654 */
11655
11656 var ComponentStyle = function () {
11657 function ComponentStyle(rules, attrs, componentId) {
11658 classCallCheck(this, ComponentStyle);
11659
11660 this.rules = rules;
11661 this.isStatic = false && 0;
11662 this.componentId = componentId;
11663
11664 if (!StyleSheet.master.hasId(componentId)) {
11665 StyleSheet.master.deferredInject(componentId, []);
11666 }
11667 }
11668
11669 /*
11670 * Flattens a rule set into valid CSS
11671 * Hashes it, wraps the whole chunk in a .hash1234 {}
11672 * Returns the hash to be injected on render()
11673 * */
11674
11675
11676 ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) {
11677 var isStatic = this.isStatic,
11678 componentId = this.componentId,
11679 lastClassName = this.lastClassName;
11680
11681 if (IS_BROWSER && isStatic && typeof lastClassName === 'string' && styleSheet.hasNameForId(componentId, lastClassName)) {
11682 return lastClassName;
11683 }
11684
11685 var flatCSS = flatten(this.rules, executionContext, styleSheet);
11686 var name = hasher(this.componentId + flatCSS.join(''));
11687 if (!styleSheet.hasNameForId(componentId, name)) {
11688 styleSheet.inject(this.componentId, stringifyRules(flatCSS, '.' + name, undefined, componentId), name);
11689 }
11690
11691 this.lastClassName = name;
11692 return name;
11693 };
11694
11695 ComponentStyle.generateName = function generateName(str) {
11696 return hasher(str);
11697 };
11698
11699 return ComponentStyle;
11700 }();
11701
11702 //
11703
11704 var LIMIT = 200;
11705
11706 var createWarnTooManyClasses = (function (displayName) {
11707 var generatedClasses = {};
11708 var warningSeen = false;
11709
11710 return function (className) {
11711 if (!warningSeen) {
11712 generatedClasses[className] = true;
11713 if (Object.keys(generatedClasses).length >= LIMIT) {
11714 // Unable to find latestRule in test environment.
11715 /* eslint-disable no-console, prefer-template */
11716 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 />');
11717 warningSeen = true;
11718 generatedClasses = {};
11719 }
11720 }
11721 };
11722 });
11723
11724 //
11725
11726 var determineTheme = (function (props, fallbackTheme) {
11727 var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT;
11728
11729 // Props should take precedence over ThemeProvider, which should take precedence over
11730 // defaultProps, but React automatically puts defaultProps on props.
11731
11732 /* eslint-disable react/prop-types, flowtype-errors/show-errors */
11733 var isDefaultTheme = defaultProps ? props.theme === defaultProps.theme : false;
11734 var theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme || defaultProps.theme;
11735 /* eslint-enable */
11736
11737 return theme;
11738 });
11739
11740 //
11741 var escapeRegex = /[[\].#*$><+~=|^:(),"'`-]+/g;
11742 var dashesAtEnds = /(^-|-$)/g;
11743
11744 /**
11745 * TODO: Explore using CSS.escape when it becomes more available
11746 * in evergreen browsers.
11747 */
11748 function escape(str) {
11749 return str
11750 // Replace all possible CSS selectors
11751 .replace(escapeRegex, '-')
11752
11753 // Remove extraneous hyphens at the start and end
11754 .replace(dashesAtEnds, '');
11755 }
11756
11757 //
11758
11759 function isTag(target) {
11760 return typeof target === 'string' && ( true ? target.charAt(0) === target.charAt(0).toLowerCase() : 0);
11761 }
11762
11763 //
11764
11765 function generateDisplayName(target) {
11766 // $FlowFixMe
11767 return isTag(target) ? 'styled.' + target : 'Styled(' + getComponentName(target) + ')';
11768 }
11769
11770 var _TYPE_STATICS;
11771
11772 var REACT_STATICS = {
11773 childContextTypes: true,
11774 contextTypes: true,
11775 defaultProps: true,
11776 displayName: true,
11777 getDerivedStateFromProps: true,
11778 propTypes: true,
11779 type: true
11780 };
11781
11782 var KNOWN_STATICS = {
11783 name: true,
11784 length: true,
11785 prototype: true,
11786 caller: true,
11787 callee: true,
11788 arguments: true,
11789 arity: true
11790 };
11791
11792 var TYPE_STATICS = (_TYPE_STATICS = {}, _TYPE_STATICS[react_is__WEBPACK_IMPORTED_MODULE_4__.ForwardRef] = {
11793 $$typeof: true,
11794 render: true
11795 }, _TYPE_STATICS);
11796
11797 var defineProperty$1 = Object.defineProperty,
11798 getOwnPropertyNames = Object.getOwnPropertyNames,
11799 _Object$getOwnPropert = Object.getOwnPropertySymbols,
11800 getOwnPropertySymbols = _Object$getOwnPropert === undefined ? function () {
11801 return [];
11802 } : _Object$getOwnPropert,
11803 getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor,
11804 getPrototypeOf = Object.getPrototypeOf,
11805 objectPrototype = Object.prototype;
11806 var arrayPrototype = Array.prototype;
11807
11808
11809 function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
11810 if (typeof sourceComponent !== 'string') {
11811 // don't hoist over string (html) components
11812
11813 var inheritedComponent = getPrototypeOf(sourceComponent);
11814
11815 if (inheritedComponent && inheritedComponent !== objectPrototype) {
11816 hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
11817 }
11818
11819 var keys = arrayPrototype.concat(getOwnPropertyNames(sourceComponent),
11820 // $FlowFixMe
11821 getOwnPropertySymbols(sourceComponent));
11822
11823 var targetStatics = TYPE_STATICS[targetComponent.$$typeof] || REACT_STATICS;
11824
11825 var sourceStatics = TYPE_STATICS[sourceComponent.$$typeof] || REACT_STATICS;
11826
11827 var i = keys.length;
11828 var descriptor = void 0;
11829 var key = void 0;
11830
11831 // eslint-disable-next-line no-plusplus
11832 while (i--) {
11833 key = keys[i];
11834
11835 if (
11836 // $FlowFixMe
11837 !KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) &&
11838 // $FlowFixMe
11839 !(targetStatics && targetStatics[key])) {
11840 descriptor = getOwnPropertyDescriptor(sourceComponent, key);
11841
11842 if (descriptor) {
11843 try {
11844 // Avoid failures from read-only properties
11845 defineProperty$1(targetComponent, key, descriptor);
11846 } catch (e) {
11847 /* fail silently */
11848 }
11849 }
11850 }
11851 }
11852
11853 return targetComponent;
11854 }
11855
11856 return targetComponent;
11857 }
11858
11859 //
11860 function isDerivedReactComponent(fn) {
11861 return !!(fn && fn.prototype && fn.prototype.isReactComponent);
11862 }
11863
11864 //
11865 // Helper to call a given function, only once
11866 var once = (function (cb) {
11867 var called = false;
11868
11869 return function () {
11870 if (!called) {
11871 called = true;
11872 cb.apply(undefined, arguments);
11873 }
11874 };
11875 });
11876
11877 //
11878
11879 var ThemeContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.createContext)();
11880
11881 var ThemeConsumer = ThemeContext.Consumer;
11882
11883 /**
11884 * Provide a theme to an entire react component tree via context
11885 */
11886
11887 var ThemeProvider = function (_Component) {
11888 inherits(ThemeProvider, _Component);
11889
11890 function ThemeProvider(props) {
11891 classCallCheck(this, ThemeProvider);
11892
11893 var _this = possibleConstructorReturn(this, _Component.call(this, props));
11894
11895 _this.getContext = (0,memoize_one__WEBPACK_IMPORTED_MODULE_7__["default"])(_this.getContext.bind(_this));
11896 _this.renderInner = _this.renderInner.bind(_this);
11897 return _this;
11898 }
11899
11900 ThemeProvider.prototype.render = function render() {
11901 if (!this.props.children) return null;
11902
11903 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
11904 ThemeContext.Consumer,
11905 null,
11906 this.renderInner
11907 );
11908 };
11909
11910 ThemeProvider.prototype.renderInner = function renderInner(outerTheme) {
11911 var context = this.getContext(this.props.theme, outerTheme);
11912
11913 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
11914 ThemeContext.Provider,
11915 { value: context },
11916 this.props.children
11917 );
11918 };
11919
11920 /**
11921 * Get the theme from the props, supporting both (outerTheme) => {}
11922 * as well as object notation
11923 */
11924
11925
11926 ThemeProvider.prototype.getTheme = function getTheme(theme, outerTheme) {
11927 if (isFunction(theme)) {
11928 var mergedTheme = theme(outerTheme);
11929
11930 if ( true && (mergedTheme === null || Array.isArray(mergedTheme) || (typeof mergedTheme === 'undefined' ? 'undefined' : _typeof(mergedTheme)) !== 'object')) {
11931 throw new StyledComponentsError(7);
11932 }
11933
11934 return mergedTheme;
11935 }
11936
11937 if (theme === null || Array.isArray(theme) || (typeof theme === 'undefined' ? 'undefined' : _typeof(theme)) !== 'object') {
11938 throw new StyledComponentsError(8);
11939 }
11940
11941 return _extends({}, outerTheme, theme);
11942 };
11943
11944 ThemeProvider.prototype.getContext = function getContext(theme, outerTheme) {
11945 return this.getTheme(theme, outerTheme);
11946 };
11947
11948 return ThemeProvider;
11949 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
11950
11951 //
11952
11953 var CLOSING_TAG_R = /^\s*<\/[a-z]/i;
11954
11955 var ServerStyleSheet = function () {
11956 function ServerStyleSheet() {
11957 classCallCheck(this, ServerStyleSheet);
11958
11959 /* The master sheet might be reset, so keep a reference here */
11960 this.masterSheet = StyleSheet.master;
11961 this.instance = this.masterSheet.clone();
11962 this.sealed = false;
11963 }
11964
11965 /**
11966 * Mark the ServerStyleSheet as being fully emitted and manually GC it from the
11967 * StyleSheet singleton.
11968 */
11969
11970
11971 ServerStyleSheet.prototype.seal = function seal() {
11972 if (!this.sealed) {
11973 /* Remove sealed StyleSheets from the master sheet */
11974 var index = this.masterSheet.clones.indexOf(this.instance);
11975 this.masterSheet.clones.splice(index, 1);
11976 this.sealed = true;
11977 }
11978 };
11979
11980 ServerStyleSheet.prototype.collectStyles = function collectStyles(children) {
11981 if (this.sealed) {
11982 throw new StyledComponentsError(2);
11983 }
11984
11985 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
11986 StyleSheetManager,
11987 { sheet: this.instance },
11988 children
11989 );
11990 };
11991
11992 ServerStyleSheet.prototype.getStyleTags = function getStyleTags() {
11993 this.seal();
11994 return this.instance.toHTML();
11995 };
11996
11997 ServerStyleSheet.prototype.getStyleElement = function getStyleElement() {
11998 this.seal();
11999 return this.instance.toReactElements();
12000 };
12001
12002 ServerStyleSheet.prototype.interleaveWithNodeStream = function interleaveWithNodeStream(readableStream) {
12003 var _this = this;
12004
12005 {
12006 throw new StyledComponentsError(3);
12007 }
12008
12009 /* the tag index keeps track of which tags have already been emitted */
12010 var instance = this.instance;
12011
12012 var instanceTagIndex = 0;
12013
12014 var streamAttr = SC_STREAM_ATTR + '="true"';
12015
12016 var transformer = new stream.Transform({
12017 transform: function appendStyleChunks(chunk, /* encoding */_, callback) {
12018 var tags = instance.tags;
12019
12020 var html = '';
12021
12022 /* retrieve html for each new style tag */
12023 for (; instanceTagIndex < tags.length; instanceTagIndex += 1) {
12024 var tag = tags[instanceTagIndex];
12025 html += tag.toHTML(streamAttr);
12026 }
12027
12028 /* force our StyleSheets to emit entirely new tags */
12029 instance.sealAllTags();
12030
12031 var renderedHtml = chunk.toString();
12032
12033 /* prepend style html to chunk, unless the start of the chunk is a closing tag in which case append right after that */
12034 if (CLOSING_TAG_R.test(renderedHtml)) {
12035 var endOfClosingTag = renderedHtml.indexOf('>');
12036
12037 this.push(renderedHtml.slice(0, endOfClosingTag + 1) + html + renderedHtml.slice(endOfClosingTag + 1));
12038 } else this.push(html + renderedHtml);
12039
12040 callback();
12041 }
12042 });
12043
12044 readableStream.on('end', function () {
12045 return _this.seal();
12046 });
12047
12048 readableStream.on('error', function (err) {
12049 _this.seal();
12050
12051 // forward the error to the transform stream
12052 transformer.emit('error', err);
12053 });
12054
12055 return readableStream.pipe(transformer);
12056 };
12057
12058 return ServerStyleSheet;
12059 }();
12060
12061 //
12062
12063 var StyleSheetContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.createContext)();
12064 var StyleSheetConsumer = StyleSheetContext.Consumer;
12065
12066 var StyleSheetManager = function (_Component) {
12067 inherits(StyleSheetManager, _Component);
12068
12069 function StyleSheetManager(props) {
12070 classCallCheck(this, StyleSheetManager);
12071
12072 var _this = possibleConstructorReturn(this, _Component.call(this, props));
12073
12074 _this.getContext = (0,memoize_one__WEBPACK_IMPORTED_MODULE_7__["default"])(_this.getContext);
12075 return _this;
12076 }
12077
12078 StyleSheetManager.prototype.getContext = function getContext(sheet, target) {
12079 if (sheet) {
12080 return sheet;
12081 } else if (target) {
12082 return new StyleSheet(target);
12083 } else {
12084 throw new StyledComponentsError(4);
12085 }
12086 };
12087
12088 StyleSheetManager.prototype.render = function render() {
12089 var _props = this.props,
12090 children = _props.children,
12091 sheet = _props.sheet,
12092 target = _props.target;
12093
12094
12095 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12096 StyleSheetContext.Provider,
12097 { value: this.getContext(sheet, target) },
12098 true ? react__WEBPACK_IMPORTED_MODULE_2___default().Children.only(children) : 0
12099 );
12100 };
12101
12102 return StyleSheetManager;
12103 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
12104 true ? StyleSheetManager.propTypes = {
12105 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)]),
12106
12107 target: prop_types__WEBPACK_IMPORTED_MODULE_8___default().shape({
12108 appendChild: (prop_types__WEBPACK_IMPORTED_MODULE_8___default().func.isRequired)
12109 })
12110 } : 0;
12111
12112 //
12113
12114 var identifiers = {};
12115
12116 /* We depend on components having unique IDs */
12117 function generateId(_ComponentStyle, _displayName, parentComponentId) {
12118 var displayName = typeof _displayName !== 'string' ? 'sc' : escape(_displayName);
12119
12120 /**
12121 * This ensures uniqueness if two components happen to share
12122 * the same displayName.
12123 */
12124 var nr = (identifiers[displayName] || 0) + 1;
12125 identifiers[displayName] = nr;
12126
12127 var componentId = displayName + '-' + _ComponentStyle.generateName(displayName + nr);
12128
12129 return parentComponentId ? parentComponentId + '-' + componentId : componentId;
12130 }
12131
12132 // $FlowFixMe
12133
12134 var StyledComponent = function (_Component) {
12135 inherits(StyledComponent, _Component);
12136
12137 function StyledComponent() {
12138 classCallCheck(this, StyledComponent);
12139
12140 var _this = possibleConstructorReturn(this, _Component.call(this));
12141
12142 _this.attrs = {};
12143
12144 _this.renderOuter = _this.renderOuter.bind(_this);
12145 _this.renderInner = _this.renderInner.bind(_this);
12146
12147 if (true) {
12148 _this.warnInnerRef = once(function (displayName) {
12149 return (
12150 // eslint-disable-next-line no-console
12151 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 + '".')
12152 );
12153 });
12154
12155 _this.warnAttrsFnObjectKeyDeprecated = once(function (key, displayName) {
12156 return (
12157 // eslint-disable-next-line no-console
12158 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)
12159 );
12160 });
12161
12162 _this.warnNonStyledComponentAttrsObjectKey = once(function (key, displayName) {
12163 return (
12164 // eslint-disable-next-line no-console
12165 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 }'))
12166 );
12167 });
12168 }
12169 return _this;
12170 }
12171
12172 StyledComponent.prototype.render = function render() {
12173 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12174 StyleSheetConsumer,
12175 null,
12176 this.renderOuter
12177 );
12178 };
12179
12180 StyledComponent.prototype.renderOuter = function renderOuter() {
12181 var styleSheet = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : StyleSheet.master;
12182
12183 this.styleSheet = styleSheet;
12184
12185 // No need to subscribe a static component to theme changes, it won't change anything
12186 if (this.props.forwardedComponent.componentStyle.isStatic) return this.renderInner();
12187
12188 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12189 ThemeConsumer,
12190 null,
12191 this.renderInner
12192 );
12193 };
12194
12195 StyledComponent.prototype.renderInner = function renderInner(theme) {
12196 var _props$forwardedCompo = this.props.forwardedComponent,
12197 componentStyle = _props$forwardedCompo.componentStyle,
12198 defaultProps = _props$forwardedCompo.defaultProps,
12199 displayName = _props$forwardedCompo.displayName,
12200 foldedComponentIds = _props$forwardedCompo.foldedComponentIds,
12201 styledComponentId = _props$forwardedCompo.styledComponentId,
12202 target = _props$forwardedCompo.target;
12203
12204
12205 var generatedClassName = void 0;
12206 if (componentStyle.isStatic) {
12207 generatedClassName = this.generateAndInjectStyles(EMPTY_OBJECT, this.props);
12208 } else {
12209 generatedClassName = this.generateAndInjectStyles(determineTheme(this.props, theme, defaultProps) || EMPTY_OBJECT, this.props);
12210 }
12211
12212 var elementToBeCreated = this.props.as || this.attrs.as || target;
12213 var isTargetTag = isTag(elementToBeCreated);
12214
12215 var propsForElement = {};
12216 var computedProps = _extends({}, this.props, this.attrs);
12217
12218 var key = void 0;
12219 // eslint-disable-next-line guard-for-in
12220 for (key in computedProps) {
12221 if ( true && key === 'innerRef' && isTargetTag) {
12222 this.warnInnerRef(displayName);
12223 }
12224
12225 if (key === 'forwardedComponent' || key === 'as') {
12226 continue;
12227 } 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)) {
12228 // Don't pass through non HTML tags through to HTML elements
12229 propsForElement[key] = computedProps[key];
12230 }
12231 }
12232
12233 if (this.props.style && this.attrs.style) {
12234 propsForElement.style = _extends({}, this.attrs.style, this.props.style);
12235 }
12236
12237 propsForElement.className = Array.prototype.concat(foldedComponentIds, styledComponentId, generatedClassName !== styledComponentId ? generatedClassName : null, this.props.className, this.attrs.className).filter(Boolean).join(' ');
12238
12239 return (0,react__WEBPACK_IMPORTED_MODULE_2__.createElement)(elementToBeCreated, propsForElement);
12240 };
12241
12242 StyledComponent.prototype.buildExecutionContext = function buildExecutionContext(theme, props, attrs) {
12243 var _this2 = this;
12244
12245 var context = _extends({}, props, { theme: theme });
12246
12247 if (!attrs.length) return context;
12248
12249 this.attrs = {};
12250
12251 attrs.forEach(function (attrDef) {
12252 var resolvedAttrDef = attrDef;
12253 var attrDefWasFn = false;
12254 var attr = void 0;
12255 var key = void 0;
12256
12257 if (isFunction(resolvedAttrDef)) {
12258 // $FlowFixMe
12259 resolvedAttrDef = resolvedAttrDef(context);
12260 attrDefWasFn = true;
12261 }
12262
12263 /* eslint-disable guard-for-in */
12264 // $FlowFixMe
12265 for (key in resolvedAttrDef) {
12266 attr = resolvedAttrDef[key];
12267
12268 if (!attrDefWasFn) {
12269 if (isFunction(attr) && !isDerivedReactComponent(attr) && !isStyledComponent(attr)) {
12270 if (true) {
12271 _this2.warnAttrsFnObjectKeyDeprecated(key, props.forwardedComponent.displayName);
12272 }
12273
12274 attr = attr(context);
12275
12276 if ( true && react__WEBPACK_IMPORTED_MODULE_2___default().isValidElement(attr)) {
12277 _this2.warnNonStyledComponentAttrsObjectKey(key, props.forwardedComponent.displayName);
12278 }
12279 }
12280 }
12281
12282 _this2.attrs[key] = attr;
12283 context[key] = attr;
12284 }
12285 /* eslint-enable */
12286 });
12287
12288 return context;
12289 };
12290
12291 StyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) {
12292 var _props$forwardedCompo2 = props.forwardedComponent,
12293 attrs = _props$forwardedCompo2.attrs,
12294 componentStyle = _props$forwardedCompo2.componentStyle,
12295 warnTooManyClasses = _props$forwardedCompo2.warnTooManyClasses;
12296
12297 // statically styled-components don't need to build an execution context object,
12298 // and shouldn't be increasing the number of class names
12299
12300 if (componentStyle.isStatic && !attrs.length) {
12301 return componentStyle.generateAndInjectStyles(EMPTY_OBJECT, this.styleSheet);
12302 }
12303
12304 var className = componentStyle.generateAndInjectStyles(this.buildExecutionContext(theme, props, attrs), this.styleSheet);
12305
12306 if ( true && warnTooManyClasses) warnTooManyClasses(className);
12307
12308 return className;
12309 };
12310
12311 return StyledComponent;
12312 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
12313
12314 function createStyledComponent(target, options, rules) {
12315 var isTargetStyledComp = isStyledComponent(target);
12316 var isClass = !isTag(target);
12317
12318 var _options$displayName = options.displayName,
12319 displayName = _options$displayName === undefined ? generateDisplayName(target) : _options$displayName,
12320 _options$componentId = options.componentId,
12321 componentId = _options$componentId === undefined ? generateId(ComponentStyle, options.displayName, options.parentComponentId) : _options$componentId,
12322 _options$ParentCompon = options.ParentComponent,
12323 ParentComponent = _options$ParentCompon === undefined ? StyledComponent : _options$ParentCompon,
12324 _options$attrs = options.attrs,
12325 attrs = _options$attrs === undefined ? EMPTY_ARRAY : _options$attrs;
12326
12327
12328 var styledComponentId = options.displayName && options.componentId ? escape(options.displayName) + '-' + options.componentId : options.componentId || componentId;
12329
12330 // fold the underlying StyledComponent attrs up (implicit extend)
12331 var finalAttrs =
12332 // $FlowFixMe
12333 isTargetStyledComp && target.attrs ? Array.prototype.concat(target.attrs, attrs).filter(Boolean) : attrs;
12334
12335 var componentStyle = new ComponentStyle(isTargetStyledComp ? // fold the underlying StyledComponent rules up (implicit extend)
12336 // $FlowFixMe
12337 target.componentStyle.rules.concat(rules) : rules, finalAttrs, styledComponentId);
12338
12339 /**
12340 * forwardRef creates a new interim component, which we'll take advantage of
12341 * instead of extending ParentComponent to create _another_ interim class
12342 */
12343 var WrappedStyledComponent = void 0;
12344 var forwardRef = function forwardRef(props, ref) {
12345 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ParentComponent, _extends({}, props, { forwardedComponent: WrappedStyledComponent, forwardedRef: ref }));
12346 };
12347 forwardRef.displayName = displayName;
12348 WrappedStyledComponent = react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(forwardRef);
12349 WrappedStyledComponent.displayName = displayName;
12350
12351 // $FlowFixMe
12352 WrappedStyledComponent.attrs = finalAttrs;
12353 // $FlowFixMe
12354 WrappedStyledComponent.componentStyle = componentStyle;
12355
12356 // $FlowFixMe
12357 WrappedStyledComponent.foldedComponentIds = isTargetStyledComp ? // $FlowFixMe
12358 Array.prototype.concat(target.foldedComponentIds, target.styledComponentId) : EMPTY_ARRAY;
12359
12360 // $FlowFixMe
12361 WrappedStyledComponent.styledComponentId = styledComponentId;
12362
12363 // fold the underlying StyledComponent target up since we folded the styles
12364 // $FlowFixMe
12365 WrappedStyledComponent.target = isTargetStyledComp ? target.target : target;
12366
12367 // $FlowFixMe
12368 WrappedStyledComponent.withComponent = function withComponent(tag) {
12369 var previousComponentId = options.componentId,
12370 optionsToCopy = objectWithoutProperties(options, ['componentId']);
12371
12372
12373 var newComponentId = previousComponentId && previousComponentId + '-' + (isTag(tag) ? tag : escape(getComponentName(tag)));
12374
12375 var newOptions = _extends({}, optionsToCopy, {
12376 attrs: finalAttrs,
12377 componentId: newComponentId,
12378 ParentComponent: ParentComponent
12379 });
12380
12381 return createStyledComponent(tag, newOptions, rules);
12382 };
12383
12384 // $FlowFixMe
12385 Object.defineProperty(WrappedStyledComponent, 'defaultProps', {
12386 get: function get$$1() {
12387 return this._foldedDefaultProps;
12388 },
12389 set: function set$$1(obj) {
12390 // $FlowFixMe
12391 this._foldedDefaultProps = isTargetStyledComp ? (0,merge_anything__WEBPACK_IMPORTED_MODULE_6__["default"])(target.defaultProps, obj) : obj;
12392 }
12393 });
12394
12395 if (true) {
12396 // $FlowFixMe
12397 WrappedStyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName);
12398 }
12399
12400 // $FlowFixMe
12401 WrappedStyledComponent.toString = function () {
12402 return '.' + WrappedStyledComponent.styledComponentId;
12403 };
12404
12405 if (isClass) {
12406 hoistNonReactStatics(WrappedStyledComponent, target, {
12407 // all SC-specific things should not be hoisted
12408 attrs: true,
12409 componentStyle: true,
12410 displayName: true,
12411 foldedComponentIds: true,
12412 styledComponentId: true,
12413 target: true,
12414 withComponent: true
12415 });
12416 }
12417
12418 return WrappedStyledComponent;
12419 }
12420
12421 //
12422 // Thanks to ReactDOMFactories for this handy list!
12423
12424 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',
12425
12426 // SVG
12427 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'marker', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
12428
12429 //
12430
12431 var styled = function styled(tag) {
12432 return constructWithOptions(createStyledComponent, tag);
12433 };
12434
12435 // Shorthands for all valid HTML Elements
12436 domElements.forEach(function (domElement) {
12437 styled[domElement] = styled(domElement);
12438 });
12439
12440 //
12441
12442 var GlobalStyle = function () {
12443 function GlobalStyle(rules, componentId) {
12444 classCallCheck(this, GlobalStyle);
12445
12446 this.rules = rules;
12447 this.componentId = componentId;
12448 this.isStatic = isStaticRules(rules, EMPTY_ARRAY);
12449
12450 if (!StyleSheet.master.hasId(componentId)) {
12451 StyleSheet.master.deferredInject(componentId, []);
12452 }
12453 }
12454
12455 GlobalStyle.prototype.createStyles = function createStyles(executionContext, styleSheet) {
12456 var flatCSS = flatten(this.rules, executionContext, styleSheet);
12457 var css = stringifyRules(flatCSS, '');
12458
12459 styleSheet.inject(this.componentId, css);
12460 };
12461
12462 GlobalStyle.prototype.removeStyles = function removeStyles(styleSheet) {
12463 var componentId = this.componentId;
12464
12465 if (styleSheet.hasId(componentId)) {
12466 styleSheet.remove(componentId);
12467 }
12468 };
12469
12470 // TODO: overwrite in-place instead of remove+create?
12471
12472
12473 GlobalStyle.prototype.renderStyles = function renderStyles(executionContext, styleSheet) {
12474 this.removeStyles(styleSheet);
12475 this.createStyles(executionContext, styleSheet);
12476 };
12477
12478 return GlobalStyle;
12479 }();
12480
12481 //
12482
12483 // place our cache into shared context so it'll persist between HMRs
12484 if (IS_BROWSER) {
12485 window.scCGSHMRCache = {};
12486 }
12487
12488 function createGlobalStyle(strings) {
12489 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12490 interpolations[_key - 1] = arguments[_key];
12491 }
12492
12493 var rules = css.apply(undefined, [strings].concat(interpolations));
12494 var id = 'sc-global-' + murmurhash(JSON.stringify(rules));
12495 var style = new GlobalStyle(rules, id);
12496
12497 var GlobalStyleComponent = function (_React$Component) {
12498 inherits(GlobalStyleComponent, _React$Component);
12499
12500 function GlobalStyleComponent(props) {
12501 classCallCheck(this, GlobalStyleComponent);
12502
12503 var _this = possibleConstructorReturn(this, _React$Component.call(this, props));
12504
12505 var _this$constructor = _this.constructor,
12506 globalStyle = _this$constructor.globalStyle,
12507 styledComponentId = _this$constructor.styledComponentId;
12508
12509
12510 if (IS_BROWSER) {
12511 window.scCGSHMRCache[styledComponentId] = (window.scCGSHMRCache[styledComponentId] || 0) + 1;
12512 }
12513
12514 /**
12515 * This fixes HMR compatibility. Don't ask me why, but this combination of
12516 * caching the closure variables via statics and then persisting the statics in
12517 * state works across HMR where no other combination did. ¯\_(ツ)_/¯
12518 */
12519 _this.state = {
12520 globalStyle: globalStyle,
12521 styledComponentId: styledComponentId
12522 };
12523 return _this;
12524 }
12525
12526 GlobalStyleComponent.prototype.componentWillUnmount = function componentWillUnmount() {
12527 if (window.scCGSHMRCache[this.state.styledComponentId]) {
12528 window.scCGSHMRCache[this.state.styledComponentId] -= 1;
12529 }
12530 /**
12531 * Depending on the order "render" is called this can cause the styles to be lost
12532 * until the next render pass of the remaining instance, which may
12533 * not be immediate.
12534 */
12535 if (window.scCGSHMRCache[this.state.styledComponentId] === 0) {
12536 this.state.globalStyle.removeStyles(this.styleSheet);
12537 }
12538 };
12539
12540 GlobalStyleComponent.prototype.render = function render() {
12541 var _this2 = this;
12542
12543 if ( true && react__WEBPACK_IMPORTED_MODULE_2___default().Children.count(this.props.children)) {
12544 // eslint-disable-next-line no-console
12545 console.warn('The global style component ' + this.state.styledComponentId + ' was given child JSX. createGlobalStyle does not render children.');
12546 }
12547
12548 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12549 StyleSheetConsumer,
12550 null,
12551 function (styleSheet) {
12552 _this2.styleSheet = styleSheet || StyleSheet.master;
12553
12554 var globalStyle = _this2.state.globalStyle;
12555
12556
12557 if (globalStyle.isStatic) {
12558 globalStyle.renderStyles(STATIC_EXECUTION_CONTEXT, _this2.styleSheet);
12559
12560 return null;
12561 } else {
12562 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12563 ThemeConsumer,
12564 null,
12565 function (theme) {
12566 // $FlowFixMe
12567 var defaultProps = _this2.constructor.defaultProps;
12568
12569
12570 var context = _extends({}, _this2.props);
12571
12572 if (typeof theme !== 'undefined') {
12573 context.theme = determineTheme(_this2.props, theme, defaultProps);
12574 }
12575
12576 globalStyle.renderStyles(context, _this2.styleSheet);
12577
12578 return null;
12579 }
12580 );
12581 }
12582 }
12583 );
12584 };
12585
12586 return GlobalStyleComponent;
12587 }((react__WEBPACK_IMPORTED_MODULE_2___default().Component));
12588
12589 GlobalStyleComponent.globalStyle = style;
12590 GlobalStyleComponent.styledComponentId = id;
12591
12592
12593 return GlobalStyleComponent;
12594 }
12595
12596 //
12597
12598 var replaceWhitespace = function replaceWhitespace(str) {
12599 return str.replace(/\s|\\n/g, '');
12600 };
12601
12602 function keyframes(strings) {
12603 /* Warning if you've used keyframes on React Native */
12604 if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
12605 // eslint-disable-next-line no-console
12606 console.warn('`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.');
12607 }
12608
12609 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12610 interpolations[_key - 1] = arguments[_key];
12611 }
12612
12613 var rules = css.apply(undefined, [strings].concat(interpolations));
12614
12615 var name = generateAlphabeticName(murmurhash(replaceWhitespace(JSON.stringify(rules))));
12616
12617 return new Keyframes(name, stringifyRules(rules, name, '@keyframes'));
12618 }
12619
12620 //
12621
12622 var withTheme = (function (Component$$1) {
12623 var WithTheme = react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(function (props, ref) {
12624 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12625 ThemeConsumer,
12626 null,
12627 function (theme) {
12628 // $FlowFixMe
12629 var defaultProps = Component$$1.defaultProps;
12630
12631 var themeProp = determineTheme(props, theme, defaultProps);
12632
12633 if ( true && themeProp === undefined) {
12634 // eslint-disable-next-line no-console
12635 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) + '"');
12636 }
12637
12638 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(Component$$1, _extends({}, props, { theme: themeProp, ref: ref }));
12639 }
12640 );
12641 });
12642
12643 hoistNonReactStatics(WithTheme, Component$$1);
12644
12645 WithTheme.displayName = 'WithTheme(' + getComponentName(Component$$1) + ')';
12646
12647 return WithTheme;
12648 });
12649
12650 //
12651
12652 /* eslint-disable */
12653 var __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS = {
12654 StyleSheet: StyleSheet
12655 };
12656
12657 //
12658
12659 /* Warning if you've imported this file on React Native */
12660 if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
12661 // eslint-disable-next-line no-console
12662 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');
12663 }
12664
12665 /* Warning if there are several instances of styled-components */
12666 if ( true && typeof window !== 'undefined' && typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Node.js') === -1 && navigator.userAgent.indexOf('jsdom') === -1) {
12667 window['__styled-components-init__'] = window['__styled-components-init__'] || 0;
12668
12669 if (window['__styled-components-init__'] === 1) {
12670 // eslint-disable-next-line no-console
12671 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.');
12672 }
12673
12674 window['__styled-components-init__'] += 1;
12675 }
12676
12677 //
12678
12679 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (styled);
12680
12681 //# sourceMappingURL=styled-components.browser.esm.js.map
12682
12683
12684 /***/ }),
12685
12686 /***/ "./node_modules/stylis-rule-sheet/index.js":
12687 /*!*************************************************!*\
12688 !*** ./node_modules/stylis-rule-sheet/index.js ***!
12689 \*************************************************/
12690 /***/ ((module) => {
12691
12692 (function (factory) {
12693 true ? (module['exports'] = factory()) :
12694 0
12695 }(function () {
12696
12697 'use strict'
12698
12699 return function (insertRule) {
12700 var delimiter = '/*|*/'
12701 var needle = delimiter+'}'
12702
12703 function toSheet (block) {
12704 if (block)
12705 try {
12706 insertRule(block + '}')
12707 } catch (e) {}
12708 }
12709
12710 return function ruleSheet (context, content, selectors, parents, line, column, length, ns, depth, at) {
12711 switch (context) {
12712 // property
12713 case 1:
12714 // @import
12715 if (depth === 0 && content.charCodeAt(0) === 64)
12716 return insertRule(content+';'), ''
12717 break
12718 // selector
12719 case 2:
12720 if (ns === 0)
12721 return content + delimiter
12722 break
12723 // at-rule
12724 case 3:
12725 switch (ns) {
12726 // @font-face, @page
12727 case 102:
12728 case 112:
12729 return insertRule(selectors[0]+content), ''
12730 default:
12731 return content + (at === 0 ? delimiter : '')
12732 }
12733 case -2:
12734 content.split(needle).forEach(toSheet)
12735 }
12736 }
12737 }
12738 }))
12739
12740
12741 /***/ }),
12742
12743 /***/ "./node_modules/stylis/stylis.min.js":
12744 /*!*******************************************!*\
12745 !*** ./node_modules/stylis/stylis.min.js ***!
12746 \*******************************************/
12747 /***/ ((module) => {
12748
12749 !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});
12750 //# sourceMappingURL=stylis.min.js.map
12751
12752 /***/ }),
12753
12754 /***/ "react":
12755 /*!************************!*\
12756 !*** external "React" ***!
12757 \************************/
12758 /***/ ((module) => {
12759
12760 "use strict";
12761 module.exports = window["React"];
12762
12763 /***/ }),
12764
12765 /***/ "jquery":
12766 /*!*************************!*\
12767 !*** external "jQuery" ***!
12768 \*************************/
12769 /***/ ((module) => {
12770
12771 "use strict";
12772 module.exports = window["jQuery"];
12773
12774 /***/ }),
12775
12776 /***/ "@wordpress/blocks":
12777 /*!********************************!*\
12778 !*** external ["wp","blocks"] ***!
12779 \********************************/
12780 /***/ ((module) => {
12781
12782 "use strict";
12783 module.exports = window["wp"]["blocks"];
12784
12785 /***/ }),
12786
12787 /***/ "@wordpress/components":
12788 /*!************************************!*\
12789 !*** external ["wp","components"] ***!
12790 \************************************/
12791 /***/ ((module) => {
12792
12793 "use strict";
12794 module.exports = window["wp"]["components"];
12795
12796 /***/ }),
12797
12798 /***/ "@wordpress/data":
12799 /*!******************************!*\
12800 !*** external ["wp","data"] ***!
12801 \******************************/
12802 /***/ ((module) => {
12803
12804 "use strict";
12805 module.exports = window["wp"]["data"];
12806
12807 /***/ }),
12808
12809 /***/ "@wordpress/edit-post":
12810 /*!**********************************!*\
12811 !*** external ["wp","editPost"] ***!
12812 \**********************************/
12813 /***/ ((module) => {
12814
12815 "use strict";
12816 module.exports = window["wp"]["editPost"];
12817
12818 /***/ }),
12819
12820 /***/ "@wordpress/element":
12821 /*!*********************************!*\
12822 !*** external ["wp","element"] ***!
12823 \*********************************/
12824 /***/ ((module) => {
12825
12826 "use strict";
12827 module.exports = window["wp"]["element"];
12828
12829 /***/ }),
12830
12831 /***/ "@wordpress/i18n":
12832 /*!******************************!*\
12833 !*** external ["wp","i18n"] ***!
12834 \******************************/
12835 /***/ ((module) => {
12836
12837 "use strict";
12838 module.exports = window["wp"]["i18n"];
12839
12840 /***/ }),
12841
12842 /***/ "@wordpress/plugins":
12843 /*!*********************************!*\
12844 !*** external ["wp","plugins"] ***!
12845 \*********************************/
12846 /***/ ((module) => {
12847
12848 "use strict";
12849 module.exports = window["wp"]["plugins"];
12850
12851 /***/ }),
12852
12853 /***/ "./node_modules/@linaria/react/dist/index.mjs":
12854 /*!****************************************************!*\
12855 !*** ./node_modules/@linaria/react/dist/index.mjs ***!
12856 \****************************************************/
12857 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12858
12859 "use strict";
12860 __webpack_require__.r(__webpack_exports__);
12861 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12862 /* harmony export */ "styled": () => (/* binding */ styled_default)
12863 /* harmony export */ });
12864 /* 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");
12865 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
12866 /* harmony import */ var _linaria_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @linaria/core */ "./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs");
12867 // src/styled.ts
12868
12869
12870
12871 var isCapital = (ch) => ch.toUpperCase() === ch;
12872 var filterKey = (keys) => (key) => keys.indexOf(key) === -1;
12873 var omit = (obj, keys) => {
12874 const res = {};
12875 Object.keys(obj).filter(filterKey(keys)).forEach((key) => {
12876 res[key] = obj[key];
12877 });
12878 return res;
12879 };
12880 function filterProps(asIs, props, omitKeys) {
12881 const filteredProps = omit(props, omitKeys);
12882 if (!asIs) {
12883 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"];
12884 Object.keys(filteredProps).forEach((key) => {
12885 if (!interopValidAttr.default(key)) {
12886 delete filteredProps[key];
12887 }
12888 });
12889 }
12890 return filteredProps;
12891 }
12892 var warnIfInvalid = (value, componentName) => {
12893 if (true) {
12894 if (typeof value === "string" || typeof value === "number" && isFinite(value)) {
12895 return;
12896 }
12897 const stringified = typeof value === "object" ? JSON.stringify(value) : String(value);
12898 console.warn(
12899 `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.`
12900 );
12901 }
12902 };
12903 function styled(tag) {
12904 return (options) => {
12905 if (true) {
12906 if (Array.isArray(options)) {
12907 throw new Error(
12908 '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'
12909 );
12910 }
12911 }
12912 const render = (props, ref) => {
12913 const { as: component = tag, class: className } = props;
12914 const shouldKeepProps = options.propsAsIs === void 0 ? !(typeof component === "string" && component.indexOf("-") === -1 && !isCapital(component[0])) : options.propsAsIs;
12915 const filteredProps = filterProps(shouldKeepProps, props, [
12916 "as",
12917 "class"
12918 ]);
12919 filteredProps.ref = ref;
12920 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);
12921 const { vars } = options;
12922 if (vars) {
12923 const style = {};
12924 for (const name in vars) {
12925 const variable = vars[name];
12926 const result = variable[0];
12927 const unit = variable[1] || "";
12928 const value = typeof result === "function" ? result(props) : result;
12929 warnIfInvalid(value, options.name);
12930 style[`--${name}`] = `${value}${unit}`;
12931 }
12932 const ownStyle = filteredProps.style || {};
12933 const keys = Object.keys(ownStyle);
12934 if (keys.length > 0) {
12935 keys.forEach((key) => {
12936 style[key] = ownStyle[key];
12937 });
12938 }
12939 filteredProps.style = style;
12940 }
12941 if (tag.__linaria && tag !== component) {
12942 filteredProps.as = component;
12943 return react__WEBPACK_IMPORTED_MODULE_1__.createElement(tag, filteredProps);
12944 }
12945 return react__WEBPACK_IMPORTED_MODULE_1__.createElement(component, filteredProps);
12946 };
12947 const Result = react__WEBPACK_IMPORTED_MODULE_1__.forwardRef ? react__WEBPACK_IMPORTED_MODULE_1__.forwardRef(render) : (props) => {
12948 const rest = omit(props, ["innerRef"]);
12949 return render(rest, props.innerRef);
12950 };
12951 Result.displayName = options.name;
12952 Result.__linaria = {
12953 className: options.class,
12954 extends: tag
12955 };
12956 return Result;
12957 };
12958 }
12959 var styled_default = true ? new Proxy(styled, {
12960 get(o, prop) {
12961 return o(prop);
12962 }
12963 }) : 0;
12964
12965 //# sourceMappingURL=index.mjs.map
12966
12967 /***/ }),
12968
12969 /***/ "./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs":
12970 /*!*******************************************************************************!*\
12971 !*** ./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs ***!
12972 \*******************************************************************************/
12973 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12974
12975 "use strict";
12976 __webpack_require__.r(__webpack_exports__);
12977 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12978 /* harmony export */ "css": () => (/* binding */ css_default),
12979 /* harmony export */ "cx": () => (/* binding */ cx_default)
12980 /* harmony export */ });
12981 // src/css.ts
12982 var css = () => {
12983 throw new Error(
12984 'Using the "css" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly.'
12985 );
12986 };
12987 var css_default = css;
12988
12989 // src/cx.ts
12990 var cx = function cx2() {
12991 const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
12992 const atomicClasses = {};
12993 const nonAtomicClasses = [];
12994 presentClassNames.forEach((arg) => {
12995 const individualClassNames = arg ? arg.split(" ") : [];
12996 individualClassNames.forEach((className) => {
12997 if (className.startsWith("atm_")) {
12998 const [, keyHash] = className.split("_");
12999 atomicClasses[keyHash] = className;
13000 } else {
13001 nonAtomicClasses.push(className);
13002 }
13003 });
13004 });
13005 const result = [];
13006 for (const keyHash in atomicClasses) {
13007 if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
13008 result.push(atomicClasses[keyHash]);
13009 }
13010 }
13011 result.push(...nonAtomicClasses);
13012 return result.join(" ");
13013 };
13014 var cx_default = cx;
13015
13016 //# sourceMappingURL=index.mjs.map
13017
13018 /***/ })
13019
13020 /******/ });
13021 /************************************************************************/
13022 /******/ // The module cache
13023 /******/ var __webpack_module_cache__ = {};
13024 /******/
13025 /******/ // The require function
13026 /******/ function __webpack_require__(moduleId) {
13027 /******/ // Check if module is in cache
13028 /******/ var cachedModule = __webpack_module_cache__[moduleId];
13029 /******/ if (cachedModule !== undefined) {
13030 /******/ return cachedModule.exports;
13031 /******/ }
13032 /******/ // Create a new module (and put it into the cache)
13033 /******/ var module = __webpack_module_cache__[moduleId] = {
13034 /******/ // no module.id needed
13035 /******/ // no module.loaded needed
13036 /******/ exports: {}
13037 /******/ };
13038 /******/
13039 /******/ // Execute the module function
13040 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
13041 /******/
13042 /******/ // Return the exports of the module
13043 /******/ return module.exports;
13044 /******/ }
13045 /******/
13046 /************************************************************************/
13047 /******/ /* webpack/runtime/compat get default export */
13048 /******/ (() => {
13049 /******/ // getDefaultExport function for compatibility with non-harmony modules
13050 /******/ __webpack_require__.n = (module) => {
13051 /******/ var getter = module && module.__esModule ?
13052 /******/ () => (module['default']) :
13053 /******/ () => (module);
13054 /******/ __webpack_require__.d(getter, { a: getter });
13055 /******/ return getter;
13056 /******/ };
13057 /******/ })();
13058 /******/
13059 /******/ /* webpack/runtime/define property getters */
13060 /******/ (() => {
13061 /******/ // define getter functions for harmony exports
13062 /******/ __webpack_require__.d = (exports, definition) => {
13063 /******/ for(var key in definition) {
13064 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
13065 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
13066 /******/ }
13067 /******/ }
13068 /******/ };
13069 /******/ })();
13070 /******/
13071 /******/ /* webpack/runtime/global */
13072 /******/ (() => {
13073 /******/ __webpack_require__.g = (function() {
13074 /******/ if (typeof globalThis === 'object') return globalThis;
13075 /******/ try {
13076 /******/ return this || new Function('return this')();
13077 /******/ } catch (e) {
13078 /******/ if (typeof window === 'object') return window;
13079 /******/ }
13080 /******/ })();
13081 /******/ })();
13082 /******/
13083 /******/ /* webpack/runtime/hasOwnProperty shorthand */
13084 /******/ (() => {
13085 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
13086 /******/ })();
13087 /******/
13088 /******/ /* webpack/runtime/make namespace object */
13089 /******/ (() => {
13090 /******/ // define __esModule on exports
13091 /******/ __webpack_require__.r = (exports) => {
13092 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
13093 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
13094 /******/ }
13095 /******/ Object.defineProperty(exports, '__esModule', { value: true });
13096 /******/ };
13097 /******/ })();
13098 /******/
13099 /******/ /* webpack/runtime/nonce */
13100 /******/ (() => {
13101 /******/ __webpack_require__.nc = undefined;
13102 /******/ })();
13103 /******/
13104 /************************************************************************/
13105 var __webpack_exports__ = {};
13106 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
13107 (() => {
13108 "use strict";
13109 /*!**************************************!*\
13110 !*** ./scripts/entries/gutenberg.ts ***!
13111 \**************************************/
13112 __webpack_require__.r(__webpack_exports__);
13113 /* harmony import */ var _gutenberg_FormBlock_registerFormBlock__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../gutenberg/FormBlock/registerFormBlock */ "./scripts/gutenberg/FormBlock/registerFormBlock.tsx");
13114 /* harmony import */ var _gutenberg_Sidebar_contentType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../gutenberg/Sidebar/contentType */ "./scripts/gutenberg/Sidebar/contentType.tsx");
13115 /* harmony import */ var _gutenberg_MeetingsBlock_registerMeetingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../gutenberg/MeetingsBlock/registerMeetingBlock */ "./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx");
13116 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
13117
13118
13119
13120
13121 (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]);
13122 })();
13123
13124 /******/ })()
13125 ;
13126 //# sourceMappingURL=gutenberg.js.map