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

13,125 lines 500.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /******/ (() => { // webpackBootstrap
2 /******/ var __webpack_modules__ = ({
3
4 /***/ "./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js":
5 /*!*******************************************************************************!*\
6 !*** ./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js ***!
7 \*******************************************************************************/
8 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9
10 "use strict";
11 __webpack_require__.r(__webpack_exports__);
12 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
14 /* harmony export */ });
15 /* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ "./node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize/dist/memoize.browser.esm.js");
16
17
18 var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
19
20 var index = (0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prop) {
21 return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
22 /* o */
23 && prop.charCodeAt(1) === 110
24 /* n */
25 && prop.charCodeAt(2) < 91;
26 }
27 /* Z+1 */
28 );
29
30 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (index);
31
32
33 /***/ }),
34
35 /***/ "./node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize/dist/memoize.browser.esm.js":
36 /*!*******************************************************************************************************!*\
37 !*** ./node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize/dist/memoize.browser.esm.js ***!
38 \*******************************************************************************************************/
39 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
40
41 "use strict";
42 __webpack_require__.r(__webpack_exports__);
43 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
44 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
45 /* harmony export */ });
46 function memoize(fn) {
47 var cache = {};
48 return function (arg) {
49 if (cache[arg] === undefined) cache[arg] = fn(arg);
50 return cache[arg];
51 };
52 }
53
54 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoize);
55
56
57 /***/ }),
58
59 /***/ "./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js":
60 /*!*******************************************************************!*\
61 !*** ./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js ***!
62 \*******************************************************************/
63 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
64
65 "use strict";
66 __webpack_require__.r(__webpack_exports__);
67 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
68 /* harmony export */ "default": () => (__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 */ "env": () => (/* binding */ env),
241 /* harmony export */ "formsScript": () => (/* binding */ formsScript),
242 /* harmony export */ "formsScriptPayload": () => (/* binding */ formsScriptPayload),
243 /* harmony export */ "hublet": () => (/* binding */ hublet),
244 /* harmony export */ "hubspotBaseUrl": () => (/* binding */ hubspotBaseUrl),
245 /* harmony export */ "hubspotNonce": () => (/* binding */ hubspotNonce),
246 /* harmony export */ "iframeUrl": () => (/* binding */ iframeUrl),
247 /* harmony export */ "impactLink": () => (/* binding */ impactLink),
248 /* harmony export */ "lastAuthorizeTime": () => (/* binding */ lastAuthorizeTime),
249 /* harmony export */ "lastDeauthorizeTime": () => (/* binding */ lastDeauthorizeTime),
250 /* harmony export */ "lastDisconnectTime": () => (/* binding */ lastDisconnectTime),
251 /* harmony export */ "leadinPluginVersion": () => (/* binding */ leadinPluginVersion),
252 /* harmony export */ "leadinQueryParams": () => (/* binding */ leadinQueryParams),
253 /* harmony export */ "locale": () => (/* binding */ locale),
254 /* harmony export */ "loginUrl": () => (/* binding */ loginUrl),
255 /* harmony export */ "meetingsScript": () => (/* binding */ meetingsScript),
256 /* harmony export */ "phpVersion": () => (/* binding */ phpVersion),
257 /* harmony export */ "pluginPath": () => (/* binding */ pluginPath),
258 /* harmony export */ "plugins": () => (/* binding */ plugins),
259 /* harmony export */ "portalDomain": () => (/* binding */ portalDomain),
260 /* harmony export */ "portalEmail": () => (/* binding */ portalEmail),
261 /* harmony export */ "portalId": () => (/* binding */ portalId),
262 /* harmony export */ "redirectNonce": () => (/* binding */ redirectNonce),
263 /* harmony export */ "refreshToken": () => (/* binding */ refreshToken),
264 /* harmony export */ "refreshTokenError": () => (/* binding */ refreshTokenError),
265 /* harmony export */ "requiresContentEmbedScope": () => (/* binding */ requiresContentEmbedScope),
266 /* harmony export */ "restNonce": () => (/* binding */ restNonce),
267 /* harmony export */ "restUrl": () => (/* binding */ restUrl),
268 /* harmony export */ "reviewSkippedDate": () => (/* binding */ reviewSkippedDate),
269 /* harmony export */ "theme": () => (/* binding */ theme),
270 /* harmony export */ "trackConsent": () => (/* binding */ trackConsent),
271 /* harmony export */ "wpVersion": () => (/* binding */ wpVersion)
272 /* harmony export */ });
273 var _window$leadinConfig = window.leadinConfig,
274 accountName = _window$leadinConfig.accountName,
275 adminUrl = _window$leadinConfig.adminUrl,
276 activationTime = _window$leadinConfig.activationTime,
277 connectionStatus = _window$leadinConfig.connectionStatus,
278 deviceId = _window$leadinConfig.deviceId,
279 didDisconnect = _window$leadinConfig.didDisconnect,
280 env = _window$leadinConfig.env,
281 formsScript = _window$leadinConfig.formsScript,
282 meetingsScript = _window$leadinConfig.meetingsScript,
283 formsScriptPayload = _window$leadinConfig.formsScriptPayload,
284 hublet = _window$leadinConfig.hublet,
285 hubspotBaseUrl = _window$leadinConfig.hubspotBaseUrl,
286 hubspotNonce = _window$leadinConfig.hubspotNonce,
287 iframeUrl = _window$leadinConfig.iframeUrl,
288 impactLink = _window$leadinConfig.impactLink,
289 lastAuthorizeTime = _window$leadinConfig.lastAuthorizeTime,
290 lastDeauthorizeTime = _window$leadinConfig.lastDeauthorizeTime,
291 lastDisconnectTime = _window$leadinConfig.lastDisconnectTime,
292 leadinPluginVersion = _window$leadinConfig.leadinPluginVersion,
293 leadinQueryParams = _window$leadinConfig.leadinQueryParams,
294 locale = _window$leadinConfig.locale,
295 loginUrl = _window$leadinConfig.loginUrl,
296 phpVersion = _window$leadinConfig.phpVersion,
297 pluginPath = _window$leadinConfig.pluginPath,
298 plugins = _window$leadinConfig.plugins,
299 portalDomain = _window$leadinConfig.portalDomain,
300 portalEmail = _window$leadinConfig.portalEmail,
301 portalId = _window$leadinConfig.portalId,
302 redirectNonce = _window$leadinConfig.redirectNonce,
303 restNonce = _window$leadinConfig.restNonce,
304 restUrl = _window$leadinConfig.restUrl,
305 refreshToken = _window$leadinConfig.refreshToken,
306 reviewSkippedDate = _window$leadinConfig.reviewSkippedDate,
307 theme = _window$leadinConfig.theme,
308 trackConsent = _window$leadinConfig.trackConsent,
309 wpVersion = _window$leadinConfig.wpVersion,
310 contentEmbed = _window$leadinConfig.contentEmbed,
311 requiresContentEmbedScope = _window$leadinConfig.requiresContentEmbedScope,
312 refreshTokenError = _window$leadinConfig.refreshTokenError;
313
314
315 /***/ }),
316
317 /***/ "./scripts/gutenberg/Common/CalendarIcon.tsx":
318 /*!***************************************************!*\
319 !*** ./scripts/gutenberg/Common/CalendarIcon.tsx ***!
320 \***************************************************/
321 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
322
323 "use strict";
324 __webpack_require__.r(__webpack_exports__);
325 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
326 /* harmony export */ "default": () => (/* binding */ CalendarIcon)
327 /* harmony export */ });
328 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
329
330 function CalendarIcon() {
331 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
332 width: "18",
333 height: "18",
334 viewBox: "0 0 18 18",
335 fill: "none",
336 xmlns: "http://www.w3.org/2000/svg",
337 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
338 clipPath: "url(#clip0_903_1965)",
339 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
340 fillRule: "evenodd",
341 clipRule: "evenodd",
342 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",
343 fill: "#FF7A59"
344 })
345 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("defs", {
346 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("clipPath", {
347 id: "clip0_903_1965",
348 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("rect", {
349 width: "18",
350 height: "18",
351 fill: "white"
352 })
353 })
354 })]
355 });
356 }
357
358 /***/ }),
359
360 /***/ "./scripts/gutenberg/Common/SidebarSprocketIcon.tsx":
361 /*!**********************************************************!*\
362 !*** ./scripts/gutenberg/Common/SidebarSprocketIcon.tsx ***!
363 \**********************************************************/
364 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
365
366 "use strict";
367 __webpack_require__.r(__webpack_exports__);
368 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
369 /* harmony export */ "default": () => (/* binding */ SidebarSprocketIcon)
370 /* harmony export */ });
371 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
372
373 function SidebarSprocketIcon() {
374 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", {
375 width: "20px",
376 height: "20px",
377 version: "1.1",
378 viewBox: "0 0 40 42",
379 xmlns: "http://www.w3.org/2000/svg",
380 xmlnsXlink: "http://www.w3.org/1999/xlink",
381 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
382 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",
383 id: "Fill-1",
384 fillRule: "evenodd"
385 })
386 });
387 }
388
389 /***/ }),
390
391 /***/ "./scripts/gutenberg/Common/SprocketIcon.tsx":
392 /*!***************************************************!*\
393 !*** ./scripts/gutenberg/Common/SprocketIcon.tsx ***!
394 \***************************************************/
395 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
396
397 "use strict";
398 __webpack_require__.r(__webpack_exports__);
399 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
400 /* harmony export */ "default": () => (/* binding */ SprocketIcon)
401 /* harmony export */ });
402 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
403
404 function SprocketIcon() {
405 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
406 width: "40px",
407 height: "42px",
408 viewBox: "0 0 40 42",
409 version: "1.1",
410 xmlns: "http://www.w3.org/2000/svg",
411 xmlnsXlink: "http://www.w3.org/1999/xlink",
412 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("defs", {
413 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("polygon", {
414 id: "path-1",
415 points: "0.000123751494 0 39.7808917 0 39.7808917 41.6871084 0.000123751494 41.6871084"
416 })
417 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
418 id: "Page-1",
419 stroke: "none",
420 strokeWidth: "1",
421 fill: "none",
422 fillRule: "evenodd",
423 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("g", {
424 id: "HubSpot-Sprocket---Full-Color",
425 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("mask", {
426 id: "mask-2",
427 fill: "white",
428 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("use", {
429 xlinkHref: "#path-1"
430 })
431 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
432 id: "path-1"
433 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
434 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",
435 id: "Fill-1",
436 fill: "#F3785B",
437 fillRule: "nonzero",
438 mask: "url(#mask-2)"
439 })]
440 })
441 })]
442 });
443 }
444
445 /***/ }),
446
447 /***/ "./scripts/gutenberg/FormBlock/FormBlockSave.tsx":
448 /*!*******************************************************!*\
449 !*** ./scripts/gutenberg/FormBlock/FormBlockSave.tsx ***!
450 \*******************************************************/
451 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
452
453 "use strict";
454 __webpack_require__.r(__webpack_exports__);
455 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
456 /* harmony export */ "default": () => (/* binding */ FormSaveBlock)
457 /* harmony export */ });
458 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
459 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
460 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
461
462
463 function FormSaveBlock(_ref) {
464 var attributes = _ref.attributes;
465 var portalId = attributes.portalId,
466 formId = attributes.formId;
467
468 if (portalId && formId) {
469 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, {
470 className: "wp-block-leadin-hubspot-form-block",
471 children: "[hubspot portal=\"".concat(portalId, "\" id=\"").concat(formId, "\" type=\"form\"]")
472 });
473 }
474
475 return null;
476 }
477
478 /***/ }),
479
480 /***/ "./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx":
481 /*!**************************************************************!*\
482 !*** ./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx ***!
483 \**************************************************************/
484 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
485
486 "use strict";
487 __webpack_require__.r(__webpack_exports__);
488 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
489 /* harmony export */ "default": () => (/* binding */ FormGutenbergPreview)
490 /* harmony export */ });
491 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
492 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
493 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
494 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
495 /* harmony import */ var _UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UIImage */ "./scripts/gutenberg/UIComponents/UIImage.ts");
496
497
498
499
500 function FormGutenbergPreview() {
501 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
502 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__["default"], {
503 alt: "Create a new Hubspot Form",
504 src: "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath, "/public/assets/images/hubspot-form.png")
505 })
506 });
507 }
508
509 /***/ }),
510
511 /***/ "./scripts/gutenberg/FormBlock/registerFormBlock.tsx":
512 /*!***********************************************************!*\
513 !*** ./scripts/gutenberg/FormBlock/registerFormBlock.tsx ***!
514 \***********************************************************/
515 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
516
517 "use strict";
518 __webpack_require__.r(__webpack_exports__);
519 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
520 /* harmony export */ "default": () => (/* binding */ registerFormBlock)
521 /* harmony export */ });
522 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
523 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
524 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
525 /* harmony import */ var _Common_SprocketIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/SprocketIcon */ "./scripts/gutenberg/Common/SprocketIcon.tsx");
526 /* harmony import */ var _FormBlockSave__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FormBlockSave */ "./scripts/gutenberg/FormBlock/FormBlockSave.tsx");
527 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
528 /* harmony import */ var _FormGutenbergPreview__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FormGutenbergPreview */ "./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx");
529 /* harmony import */ var _shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../shared/Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
530 /* harmony import */ var _shared_Form_FormEdit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../shared/Form/FormEdit */ "./scripts/shared/Form/FormEdit.tsx");
531 /* harmony import */ var _shared_enums_connectionStatus__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../shared/enums/connectionStatus */ "./scripts/shared/enums/connectionStatus.ts");
532 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
533 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);
534 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
535 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; }
536
537 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; }
538
539 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; }
540
541
542
543
544
545
546
547
548
549
550
551
552 function registerFormBlock() {
553 var editComponent = function editComponent(props) {
554 if (props.attributes.preview) {
555 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormGutenbergPreview__WEBPACK_IMPORTED_MODULE_5__["default"], {});
556 } else if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__.connectionStatus === _shared_enums_connectionStatus__WEBPACK_IMPORTED_MODULE_8__["default"].Connected) {
557 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Form_FormEdit__WEBPACK_IMPORTED_MODULE_7__["default"], _objectSpread(_objectSpread({}, props), {}, {
558 origin: "gutenberg",
559 preview: true
560 }));
561 } else {
562 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_6__["default"], {
563 status: 401
564 });
565 }
566 }; // We do not support the full site editor: https://issues.hubspotcentral.com/browse/WP-1033
567
568
569 if (!_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ || (0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_10__.isFullSiteEditor)()) {
570 return null;
571 }
572
573 _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType('leadin/hubspot-form-block', {
574 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('HubSpot Form', 'leadin'),
575 description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Select and embed a HubSpot form', 'leadin'),
576 icon: _Common_SprocketIcon__WEBPACK_IMPORTED_MODULE_2__["default"],
577 category: 'leadin-blocks',
578 attributes: {
579 portalId: {
580 type: 'string',
581 "default": ''
582 },
583 formId: {
584 type: 'string'
585 },
586 formName: {
587 type: 'string'
588 },
589 preview: {
590 type: 'boolean',
591 "default": false
592 }
593 },
594 example: {
595 attributes: {
596 preview: true
597 }
598 },
599 edit: editComponent,
600 save: function save(props) {
601 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormBlockSave__WEBPACK_IMPORTED_MODULE_3__["default"], _objectSpread({}, props));
602 }
603 });
604 }
605
606 /***/ }),
607
608 /***/ "./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx":
609 /*!*********************************************************************!*\
610 !*** ./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx ***!
611 \*********************************************************************/
612 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
613
614 "use strict";
615 __webpack_require__.r(__webpack_exports__);
616 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
617 /* harmony export */ "default": () => (/* binding */ MeetingGutenbergPreview)
618 /* harmony export */ });
619 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
620 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
621 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
622 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
623 /* harmony import */ var _UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UIImage */ "./scripts/gutenberg/UIComponents/UIImage.ts");
624
625
626
627
628 function MeetingGutenbergPreview() {
629 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
630 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__["default"], {
631 alt: "Create a new Hubspot Meeting",
632 width: "100%",
633 src: "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath, "/public/assets/images/hubspot-meetings.png")
634 })
635 });
636 }
637
638 /***/ }),
639
640 /***/ "./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx":
641 /*!**************************************************************!*\
642 !*** ./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx ***!
643 \**************************************************************/
644 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
645
646 "use strict";
647 __webpack_require__.r(__webpack_exports__);
648 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
649 /* harmony export */ "default": () => (/* binding */ MeetingSaveBlock)
650 /* harmony export */ });
651 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
652 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
653 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
654
655
656 function MeetingSaveBlock(_ref) {
657 var attributes = _ref.attributes;
658 var url = attributes.url;
659
660 if (url) {
661 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, {
662 className: "wp-block-leadin-hubspot-meeting-block",
663 children: "[hubspot url=\"".concat(url, "\" type=\"meeting\"]")
664 });
665 }
666
667 return null;
668 }
669
670 /***/ }),
671
672 /***/ "./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx":
673 /*!******************************************************************!*\
674 !*** ./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx ***!
675 \******************************************************************/
676 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
677
678 "use strict";
679 __webpack_require__.r(__webpack_exports__);
680 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
681 /* harmony export */ "default": () => (/* binding */ registerMeetingBlock)
682 /* harmony export */ });
683 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
684 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
685 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
686 /* harmony import */ var _Common_CalendarIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/CalendarIcon */ "./scripts/gutenberg/Common/CalendarIcon.tsx");
687 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
688 /* harmony import */ var _MeetingGutenbergPreview__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MeetingGutenbergPreview */ "./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx");
689 /* harmony import */ var _MeetingSaveBlock__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./MeetingSaveBlock */ "./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx");
690 /* harmony import */ var _shared_Meeting_MeetingEdit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../shared/Meeting/MeetingEdit */ "./scripts/shared/Meeting/MeetingEdit.tsx");
691 /* harmony import */ var _shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../shared/Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
692 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
693 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__);
694 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
695 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; }
696
697 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; }
698
699 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; }
700
701
702
703
704
705
706
707
708
709
710
711 var ConnectionStatus = {
712 Connected: 'Connected',
713 NotConnected: 'NotConnected'
714 };
715 function registerMeetingBlock() {
716 var editComponent = function editComponent(props) {
717 if (props.attributes.preview) {
718 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingGutenbergPreview__WEBPACK_IMPORTED_MODULE_4__["default"], {});
719 } else if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.connectionStatus === ConnectionStatus.Connected) {
720 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Meeting_MeetingEdit__WEBPACK_IMPORTED_MODULE_6__["default"], _objectSpread(_objectSpread({}, props), {}, {
721 preview: true,
722 origin: "gutenberg"
723 }));
724 } else {
725 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__["default"], {
726 status: 401
727 });
728 }
729 }; // We do not support the full site editor: https://issues.hubspotcentral.com/browse/WP-1033
730
731
732 if (!_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ || (0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_9__.isFullSiteEditor)()) {
733 return null;
734 }
735
736 _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType('leadin/hubspot-meeting-block', {
737 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Hubspot Meetings Scheduler', 'leadin'),
738 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'),
739 icon: _Common_CalendarIcon__WEBPACK_IMPORTED_MODULE_2__["default"],
740 category: 'leadin-blocks',
741 attributes: {
742 url: {
743 type: 'string',
744 "default": ''
745 },
746 preview: {
747 type: 'boolean',
748 "default": false
749 }
750 },
751 example: {
752 attributes: {
753 preview: true
754 }
755 },
756 edit: editComponent,
757 save: function save(props) {
758 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingSaveBlock__WEBPACK_IMPORTED_MODULE_5__["default"], _objectSpread({}, props));
759 }
760 });
761 }
762
763 /***/ }),
764
765 /***/ "./scripts/gutenberg/Sidebar/contentType.tsx":
766 /*!***************************************************!*\
767 !*** ./scripts/gutenberg/Sidebar/contentType.tsx ***!
768 \***************************************************/
769 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
770
771 "use strict";
772 __webpack_require__.r(__webpack_exports__);
773 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
774 /* harmony export */ "registerHubspotSidebar": () => (/* binding */ registerHubspotSidebar)
775 /* harmony export */ });
776 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
777 /* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/plugins */ "@wordpress/plugins");
778 /* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__);
779 /* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/edit-post */ "@wordpress/edit-post");
780 /* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__);
781 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
782 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
783 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
784 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);
785 /* harmony import */ var _UIComponents_UISidebarSelectControl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../UIComponents/UISidebarSelectControl */ "./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx");
786 /* harmony import */ var _Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Common/SidebarSprocketIcon */ "./scripts/gutenberg/Common/SidebarSprocketIcon.tsx");
787 /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js");
788 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
789 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__);
790 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
791 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
792 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
793 var _templateObject;
794
795 function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
796
797
798
799
800
801
802
803
804
805
806
807
808
809 function registerHubspotSidebar() {
810 var ContentTypeLabelStyle = styled_components__WEBPACK_IMPORTED_MODULE_11__["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n white-space: normal;\n text-transform: none;\n "])));
811
812 var ContentTypeLabel = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ContentTypeLabelStyle, {
813 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Select the content type HubSpot Analytics uses to track this page', 'leadin')
814 });
815
816 var LeadinPluginSidebar = function LeadinPluginSidebar(_ref) {
817 var postType = _ref.postType;
818 return postType ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__.PluginSidebar, {
819 name: "leadin",
820 title: "HubSpot",
821 icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Icon, {
822 className: "hs-plugin-sidebar-sprocket",
823 icon: (0,_Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_6__["default"])()
824 }),
825 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, {
826 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('HubSpot Analytics', 'leadin'),
827 initialOpen: true,
828 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_8__.BackgroudAppContext.Provider, {
829 value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_9__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_10__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_9__.refreshToken),
830 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISidebarSelectControl__WEBPACK_IMPORTED_MODULE_5__["default"], {
831 metaKey: "content-type",
832 className: "select-content-type",
833 label: ContentTypeLabel,
834 options: [{
835 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Detect Automatically', 'leadin'),
836 value: ''
837 }, {
838 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Blog Post', 'leadin'),
839 value: 'blog-post'
840 }, {
841 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Knowledge Article', 'leadin'),
842 value: 'knowledge-article'
843 }, {
844 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Landing Page', 'leadin'),
845 value: 'landing-page'
846 }, {
847 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Listing Page', 'leadin'),
848 value: 'listing-page'
849 }, {
850 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Standard Page', 'leadin'),
851 value: 'standard-page'
852 }]
853 })
854 })
855 })
856 }) : null;
857 };
858
859 var LeadinPluginSidebarWrapper = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.withSelect)(function (select) {
860 var data = select('core/editor');
861 return {
862 postType: data && data.getCurrentPostType() && data.getEditedPostAttribute('meta')
863 };
864 })(LeadinPluginSidebar);
865
866 if (_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__) {
867 _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__.registerPlugin('leadin', {
868 render: LeadinPluginSidebarWrapper,
869 icon: _Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_6__["default"]
870 });
871 }
872 }
873
874 /***/ }),
875
876 /***/ "./scripts/gutenberg/UIComponents/UIImage.ts":
877 /*!***************************************************!*\
878 !*** ./scripts/gutenberg/UIComponents/UIImage.ts ***!
879 \***************************************************/
880 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
881
882 "use strict";
883 __webpack_require__.r(__webpack_exports__);
884 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
885 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
886 /* harmony export */ });
887 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
888
889
890 var _exp = /*#__PURE__*/function _exp() {
891 return function (props) {
892 return props.height ? props.height : 'auto';
893 };
894 };
895
896 var _exp2 = /*#__PURE__*/function _exp2() {
897 return function (props) {
898 return props.width ? props.width : 'auto';
899 };
900 };
901
902 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('img')({
903 name: "UIImage0",
904 "class": "ump7xqy",
905 propsAsIs: false,
906 vars: {
907 "ump7xqy-0": [_exp()],
908 "ump7xqy-1": [_exp2()]
909 }
910 }));
911
912 __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");
913
914 /***/ }),
915
916 /***/ "./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx":
917 /*!*******************************************************************!*\
918 !*** ./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx ***!
919 \*******************************************************************/
920 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
921
922 "use strict";
923 __webpack_require__.r(__webpack_exports__);
924 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
925 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
926 /* harmony export */ });
927 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
928 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
929 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
930 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
931 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
932 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
933 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; }
934
935 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; }
936
937 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; }
938
939
940
941
942
943
944
945 var UISidebarSelectControl = function UISidebarSelectControl(props) {
946 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__.useBackgroundAppContext)();
947 var monitorSidebarMetaChange = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__.usePostBackgroundMessage)();
948 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, _objectSpread({
949 value: props.metaValue,
950 onChange: function onChange(content) {
951 if (props.setMetaValue) {
952 props.setMetaValue(content);
953 }
954
955 isBackgroundAppReady && monitorSidebarMetaChange({
956 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages.TrackSidebarMetaChange,
957 payload: {
958 metaKey: props.metaKey
959 }
960 });
961 }
962 }, props));
963 };
964
965 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_2__["default"])(UISidebarSelectControl));
966
967 /***/ }),
968
969 /***/ "./scripts/iframe/integratedMessages/core/CoreMessages.ts":
970 /*!****************************************************************!*\
971 !*** ./scripts/iframe/integratedMessages/core/CoreMessages.ts ***!
972 \****************************************************************/
973 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
974
975 "use strict";
976 __webpack_require__.r(__webpack_exports__);
977 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
978 /* harmony export */ "CoreMessages": () => (/* binding */ CoreMessages)
979 /* harmony export */ });
980 var CoreMessages = {
981 HandshakeReceive: 'INTEGRATED_APP_EMBEDDER_HANDSHAKE_RECEIVED',
982 SendRefreshToken: 'INTEGRATED_APP_EMBEDDER_SEND_REFRESH_TOKEN',
983 ReloadParentFrame: 'INTEGRATED_APP_EMBEDDER_RELOAD_PARENT_FRAME',
984 RedirectParentFrame: 'INTEGRATED_APP_EMBEDDER_REDIRECT_PARENT_FRAME',
985 SendLocale: 'INTEGRATED_APP_EMBEDDER_SEND_LOCALE',
986 SendDeviceId: 'INTEGRATED_APP_EMBEDDER_SEND_DEVICE_ID',
987 SendIntegratedAppConfig: 'INTEGRATED_APP_EMBEDDER_CONFIG'
988 };
989
990 /***/ }),
991
992 /***/ "./scripts/iframe/integratedMessages/forms/FormsMessages.ts":
993 /*!******************************************************************!*\
994 !*** ./scripts/iframe/integratedMessages/forms/FormsMessages.ts ***!
995 \******************************************************************/
996 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
997
998 "use strict";
999 __webpack_require__.r(__webpack_exports__);
1000 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1001 /* harmony export */ "FormMessages": () => (/* binding */ FormMessages)
1002 /* harmony export */ });
1003 var FormMessages = {
1004 CreateFormAppNavigation: 'CREATE_FORM_APP_NAVIGATION'
1005 };
1006
1007 /***/ }),
1008
1009 /***/ "./scripts/iframe/integratedMessages/index.ts":
1010 /*!****************************************************!*\
1011 !*** ./scripts/iframe/integratedMessages/index.ts ***!
1012 \****************************************************/
1013 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1014
1015 "use strict";
1016 __webpack_require__.r(__webpack_exports__);
1017 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1018 /* harmony export */ "CoreMessages": () => (/* reexport safe */ _core_CoreMessages__WEBPACK_IMPORTED_MODULE_0__.CoreMessages),
1019 /* harmony export */ "FormMessages": () => (/* reexport safe */ _forms_FormsMessages__WEBPACK_IMPORTED_MODULE_1__.FormMessages),
1020 /* harmony export */ "LiveChatMessages": () => (/* reexport safe */ _livechat_LiveChatMessages__WEBPACK_IMPORTED_MODULE_2__.LiveChatMessages),
1021 /* harmony export */ "PluginMessages": () => (/* reexport safe */ _plugin_PluginMessages__WEBPACK_IMPORTED_MODULE_3__.PluginMessages),
1022 /* harmony export */ "ProxyMessages": () => (/* reexport safe */ _proxy_ProxyMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages)
1023 /* harmony export */ });
1024 /* harmony import */ var _core_CoreMessages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/CoreMessages */ "./scripts/iframe/integratedMessages/core/CoreMessages.ts");
1025 /* harmony import */ var _forms_FormsMessages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./forms/FormsMessages */ "./scripts/iframe/integratedMessages/forms/FormsMessages.ts");
1026 /* harmony import */ var _livechat_LiveChatMessages__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./livechat/LiveChatMessages */ "./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts");
1027 /* harmony import */ var _plugin_PluginMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./plugin/PluginMessages */ "./scripts/iframe/integratedMessages/plugin/PluginMessages.ts");
1028 /* harmony import */ var _proxy_ProxyMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./proxy/ProxyMessages */ "./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts");
1029
1030
1031
1032
1033
1034
1035 /***/ }),
1036
1037 /***/ "./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts":
1038 /*!************************************************************************!*\
1039 !*** ./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts ***!
1040 \************************************************************************/
1041 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1042
1043 "use strict";
1044 __webpack_require__.r(__webpack_exports__);
1045 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1046 /* harmony export */ "LiveChatMessages": () => (/* binding */ LiveChatMessages)
1047 /* harmony export */ });
1048 var LiveChatMessages = {
1049 CreateLiveChatAppNavigation: 'CREATE_LIVE_CHAT_APP_NAVIGATION'
1050 };
1051
1052 /***/ }),
1053
1054 /***/ "./scripts/iframe/integratedMessages/plugin/PluginMessages.ts":
1055 /*!********************************************************************!*\
1056 !*** ./scripts/iframe/integratedMessages/plugin/PluginMessages.ts ***!
1057 \********************************************************************/
1058 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1059
1060 "use strict";
1061 __webpack_require__.r(__webpack_exports__);
1062 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1063 /* harmony export */ "PluginMessages": () => (/* binding */ PluginMessages)
1064 /* harmony export */ });
1065 var PluginMessages = {
1066 PluginSettingsNavigation: 'PLUGIN_SETTINGS_NAVIGATION',
1067 PluginLeadinConfig: 'PLUGIN_LEADIN_CONFIG',
1068 TrackConsent: 'INTEGRATED_APP_EMBEDDER_TRACK_CONSENT',
1069 InternalTrackingFetchRequest: 'INTEGRATED_TRACKING_FETCH_REQUEST',
1070 InternalTrackingFetchResponse: 'INTEGRATED_TRACKING_FETCH_RESPONSE',
1071 InternalTrackingFetchError: 'INTEGRATED_TRACKING_FETCH_ERROR',
1072 InternalTrackingChangeRequest: 'INTEGRATED_TRACKING_CHANGE_REQUEST',
1073 InternalTrackingChangeError: 'INTEGRATED_TRACKING_CHANGE_ERROR',
1074 BusinessUnitFetchRequest: 'BUSINESS_UNIT_FETCH_REQUEST',
1075 BusinessUnitFetchResponse: 'BUSINESS_UNIT_FETCH_FETCH_RESPONSE',
1076 BusinessUnitFetchError: 'BUSINESS_UNIT_FETCH_FETCH_ERROR',
1077 BusinessUnitChangeRequest: 'BUSINESS_UNIT_CHANGE_REQUEST',
1078 BusinessUnitChangeError: 'BUSINESS_UNIT_CHANGE_ERROR',
1079 SkipReviewRequest: 'SKIP_REVIEW_REQUEST',
1080 SkipReviewResponse: 'SKIP_REVIEW_RESPONSE',
1081 SkipReviewError: 'SKIP_REVIEW_ERROR',
1082 RemoveParentQueryParam: 'REMOVE_PARENT_QUERY_PARAM',
1083 ContentEmbedInstallRequest: 'CONTENT_EMBED_INSTALL_REQUEST',
1084 ContentEmbedInstallResponse: 'CONTENT_EMBED_INSTALL_RESPONSE',
1085 ContentEmbedInstallError: 'CONTENT_EMBED_INSTALL_ERROR',
1086 ContentEmbedActivationRequest: 'CONTENT_EMBED_ACTIVATION_REQUEST',
1087 ContentEmbedActivationResponse: 'CONTENT_EMBED_ACTIVATION_RESPONSE',
1088 ContentEmbedActivationError: 'CONTENT_EMBED_ACTIVATION_ERROR'
1089 };
1090
1091 /***/ }),
1092
1093 /***/ "./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts":
1094 /*!******************************************************************!*\
1095 !*** ./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts ***!
1096 \******************************************************************/
1097 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1098
1099 "use strict";
1100 __webpack_require__.r(__webpack_exports__);
1101 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1102 /* harmony export */ "ProxyMessages": () => (/* binding */ ProxyMessages)
1103 /* harmony export */ });
1104 var ProxyMessages = {
1105 FetchForms: 'FETCH_FORMS',
1106 FetchForm: 'FETCH_FORM',
1107 CreateFormFromTemplate: 'CREATE_FORM_FROM_TEMPLATE',
1108 FetchAuth: 'FETCH_AUTH',
1109 FetchMeetingsAndUsers: 'FETCH_MEETINGS_AND_USERS',
1110 FetchContactsCreateSinceActivation: 'FETCH_CONTACTS_CREATED_SINCE_ACTIVATION',
1111 FetchOrCreateMeetingUser: 'FETCH_OR_CREATE_MEETING_USER',
1112 ConnectMeetingsCalendar: 'CONNECT_MEETINGS_CALENDAR',
1113 TrackFormPreviewRender: 'TRACK_FORM_PREVIEW_RENDER',
1114 TrackFormCreatedFromTemplate: 'TRACK_FORM_CREATED_FROM_TEMPLATE',
1115 TrackFormCreationFailed: 'TRACK_FORM_CREATION_FAILED',
1116 TrackMeetingPreviewRender: 'TRACK_MEETING_PREVIEW_RENDER',
1117 TrackSidebarMetaChange: 'TRACK_SIDEBAR_META_CHANGE',
1118 TrackReviewBannerRender: 'TRACK_REVIEW_BANNER_RENDER',
1119 TrackReviewBannerInteraction: 'TRACK_REVIEW_BANNER_INTERACTION',
1120 TrackReviewBannerDismissed: 'TRACK_REVIEW_BANNER_DISMISSED',
1121 TrackPluginDeactivation: 'TRACK_PLUGIN_DEACTIVATION'
1122 };
1123
1124 /***/ }),
1125
1126 /***/ "./scripts/iframe/useBackgroundApp.ts":
1127 /*!********************************************!*\
1128 !*** ./scripts/iframe/useBackgroundApp.ts ***!
1129 \********************************************/
1130 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1131
1132 "use strict";
1133 __webpack_require__.r(__webpack_exports__);
1134 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1135 /* harmony export */ "BackgroudAppContext": () => (/* binding */ BackgroudAppContext),
1136 /* harmony export */ "useBackgroundAppContext": () => (/* binding */ useBackgroundAppContext),
1137 /* harmony export */ "usePostAsyncBackgroundMessage": () => (/* binding */ usePostAsyncBackgroundMessage),
1138 /* harmony export */ "usePostBackgroundMessage": () => (/* binding */ usePostBackgroundMessage)
1139 /* harmony export */ });
1140 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1141 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1142
1143 var BackgroudAppContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
1144 function useBackgroundAppContext() {
1145 return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(BackgroudAppContext);
1146 }
1147 function usePostBackgroundMessage() {
1148 var app = useBackgroundAppContext();
1149 return function (message) {
1150 app.postMessage(message);
1151 };
1152 }
1153 function usePostAsyncBackgroundMessage() {
1154 var app = useBackgroundAppContext();
1155 return function (message) {
1156 return app.postAsyncMessage(message);
1157 };
1158 }
1159
1160 /***/ }),
1161
1162 /***/ "./scripts/lib/Raven.ts":
1163 /*!******************************!*\
1164 !*** ./scripts/lib/Raven.ts ***!
1165 \******************************/
1166 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1167
1168 "use strict";
1169 __webpack_require__.r(__webpack_exports__);
1170 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1171 /* harmony export */ "configureRaven": () => (/* binding */ configureRaven),
1172 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1173 /* harmony export */ });
1174 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! raven-js */ "./node_modules/raven-js/src/singleton.js");
1175 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(raven_js__WEBPACK_IMPORTED_MODULE_0__);
1176 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1177
1178
1179 function configureRaven() {
1180 if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.hubspotBaseUrl.indexOf('app.hubspot.com') === -1) {
1181 return;
1182 }
1183
1184 raven_js__WEBPACK_IMPORTED_MODULE_0___default().config('https://e9b8f382cdd130c0d415cd977d2be56f@exceptions.hubspot.com/1', {
1185 instrument: {
1186 tryCatch: false
1187 },
1188 release: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.leadinPluginVersion
1189 }).install();
1190 raven_js__WEBPACK_IMPORTED_MODULE_0___default().setTagsContext({
1191 v: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.leadinPluginVersion,
1192 php: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.phpVersion,
1193 wordpress: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.wpVersion
1194 });
1195 raven_js__WEBPACK_IMPORTED_MODULE_0___default().setExtraContext({
1196 hub: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.portalId,
1197 plugins: Object.keys(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.plugins).map(function (name) {
1198 return "".concat(name, "#").concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.plugins[name]);
1199 }).join(',')
1200 });
1201 }
1202 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((raven_js__WEBPACK_IMPORTED_MODULE_0___default()));
1203
1204 /***/ }),
1205
1206 /***/ "./scripts/shared/Common/AsyncSelect.tsx":
1207 /*!***********************************************!*\
1208 !*** ./scripts/shared/Common/AsyncSelect.tsx ***!
1209 \***********************************************/
1210 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1211
1212 "use strict";
1213 __webpack_require__.r(__webpack_exports__);
1214 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1215 /* harmony export */ "default": () => (/* binding */ AsyncSelect)
1216 /* harmony export */ });
1217 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1218 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1219 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1220 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
1221 /* harmony import */ var _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/colors */ "./scripts/shared/UIComponents/colors.ts");
1222 /* harmony import */ var _UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpinner */ "./scripts/shared/UIComponents/UISpinner.tsx");
1223 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../enums/loadState */ "./scripts/shared/enums/loadState.ts");
1224 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1225
1226 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."); }
1227
1228 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); }
1229
1230 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; }
1231
1232 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; }
1233
1234 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1235
1236
1237
1238
1239
1240
1241
1242 var Container = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1243 name: "Container",
1244 "class": "c1wxx7eu",
1245 propsAsIs: false
1246 });
1247
1248 var _exp2 = /*#__PURE__*/function _exp2() {
1249 return function (props) {
1250 return props.focused ? '0' : '1px';
1251 };
1252 };
1253
1254 var _exp3 = /*#__PURE__*/function _exp3() {
1255 return function (props) {
1256 return props.focused ? "0 0 0 2px ".concat(_UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM) : 'none';
1257 };
1258 };
1259
1260 var ControlContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1261 name: "ControlContainer",
1262 "class": "c1rgwbep",
1263 propsAsIs: false,
1264 vars: {
1265 "c1rgwbep-0": [_exp2()],
1266 "c1rgwbep-1": [_exp3()]
1267 }
1268 });
1269 var ValueContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1270 name: "ValueContainer",
1271 "class": "v1mdmbaj",
1272 propsAsIs: false
1273 });
1274 var Placeholder = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1275 name: "Placeholder",
1276 "class": "p1gwkvxy",
1277 propsAsIs: false
1278 });
1279 var SingleValue = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1280 name: "SingleValue",
1281 "class": "s1bwlafs",
1282 propsAsIs: false
1283 });
1284 var IndicatorContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1285 name: "IndicatorContainer",
1286 "class": "i196z9y5",
1287 propsAsIs: false
1288 });
1289 var DropdownIndicator = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1290 name: "DropdownIndicator",
1291 "class": "d1dfo5ow",
1292 propsAsIs: false
1293 });
1294 var InputContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1295 name: "InputContainer",
1296 "class": "if3lze",
1297 propsAsIs: false
1298 });
1299 var Input = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('input')({
1300 name: "Input",
1301 "class": "i9kxf50",
1302 propsAsIs: false
1303 });
1304 var InputShadow = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1305 name: "InputShadow",
1306 "class": "igjr3uc",
1307 propsAsIs: false
1308 });
1309 var MenuContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1310 name: "MenuContainer",
1311 "class": "mhb9if7",
1312 propsAsIs: false
1313 });
1314 var MenuList = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1315 name: "MenuList",
1316 "class": "mxaof7s",
1317 propsAsIs: false
1318 });
1319 var MenuGroup = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1320 name: "MenuGroup",
1321 "class": "mw50s5v",
1322 propsAsIs: false
1323 });
1324 var MenuGroupHeader = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1325 name: "MenuGroupHeader",
1326 "class": "m11rzvjw",
1327 propsAsIs: false
1328 });
1329
1330 var _exp5 = /*#__PURE__*/function _exp5() {
1331 return function (props) {
1332 return props.selected ? _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM : 'transparent';
1333 };
1334 };
1335
1336 var _exp6 = /*#__PURE__*/function _exp6() {
1337 return function (props) {
1338 return props.selected ? '#fff' : 'inherit';
1339 };
1340 };
1341
1342 var _exp7 = /*#__PURE__*/function _exp7() {
1343 return function (props) {
1344 return props.selected ? _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM : _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_LIGHT;
1345 };
1346 };
1347
1348 var MenuItem = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1349 name: "MenuItem",
1350 "class": "m1jcdsjv",
1351 propsAsIs: false,
1352 vars: {
1353 "m1jcdsjv-0": [_exp5()],
1354 "m1jcdsjv-1": [_exp6()],
1355 "m1jcdsjv-2": [_exp7()]
1356 }
1357 });
1358 function AsyncSelect(_ref) {
1359 var placeholder = _ref.placeholder,
1360 value = _ref.value,
1361 loadOptions = _ref.loadOptions,
1362 onChange = _ref.onChange,
1363 defaultOptions = _ref.defaultOptions;
1364 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1365 var inputShadowEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1366
1367 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
1368 _useState2 = _slicedToArray(_useState, 2),
1369 isFocused = _useState2[0],
1370 setFocus = _useState2[1];
1371
1372 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].NotLoaded),
1373 _useState4 = _slicedToArray(_useState3, 2),
1374 loadState = _useState4[0],
1375 setLoadState = _useState4[1];
1376
1377 var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
1378 _useState6 = _slicedToArray(_useState5, 2),
1379 localValue = _useState6[0],
1380 setLocalValue = _useState6[1];
1381
1382 var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultOptions),
1383 _useState8 = _slicedToArray(_useState7, 2),
1384 options = _useState8[0],
1385 setOptions = _useState8[1];
1386
1387 var inputSize = "".concat(inputShadowEl.current ? inputShadowEl.current.clientWidth + 10 : 2, "px");
1388 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1389 if (loadOptions && loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].NotLoaded) {
1390 loadOptions('', function (result) {
1391 setOptions(result);
1392 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Idle);
1393 });
1394 }
1395 }, [loadOptions, loadState]);
1396
1397 var renderItems = function renderItems() {
1398 var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
1399 var parentKey = arguments.length > 1 ? arguments[1] : undefined;
1400 return items.map(function (item, index) {
1401 if (item.options) {
1402 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(MenuGroup, {
1403 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuGroupHeader, {
1404 id: "".concat(index, "-heading"),
1405 children: item.label
1406 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
1407 children: renderItems(item.options, index)
1408 })]
1409 }, "async-select-item-".concat(index));
1410 } else {
1411 var key = "async-select-item-".concat(parentKey !== undefined ? "".concat(parentKey, "-").concat(index) : index);
1412 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuItem, {
1413 id: key,
1414 selected: value && item.value === value.value,
1415 onClick: function onClick() {
1416 onChange(item);
1417 setFocus(false);
1418 },
1419 children: item.label
1420 }, key);
1421 }
1422 });
1423 };
1424
1425 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(Container, {
1426 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ControlContainer, {
1427 id: "leadin-async-selector",
1428 focused: isFocused,
1429 onClick: function onClick() {
1430 if (isFocused) {
1431 if (inputEl.current) {
1432 inputEl.current.blur();
1433 }
1434
1435 setFocus(false);
1436 setLocalValue('');
1437 } else {
1438 if (inputEl.current) {
1439 inputEl.current.focus();
1440 }
1441
1442 setFocus(true);
1443 }
1444 },
1445 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ValueContainer, {
1446 children: [localValue === '' && (!value ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Placeholder, {
1447 children: placeholder
1448 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SingleValue, {
1449 children: value.label
1450 })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(InputContainer, {
1451 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Input, {
1452 ref: inputEl,
1453 onFocus: function onFocus() {
1454 setFocus(true);
1455 },
1456 onChange: function onChange(e) {
1457 setLocalValue(e.target.value);
1458 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Loading);
1459 loadOptions && loadOptions(e.target.value, function (result) {
1460 setOptions(result);
1461 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Idle);
1462 });
1463 },
1464 value: localValue,
1465 width: inputSize,
1466 id: "asycn-select-input"
1467 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(InputShadow, {
1468 ref: inputShadowEl,
1469 children: localValue
1470 })]
1471 })]
1472 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(IndicatorContainer, {
1473 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, {})]
1474 })]
1475 }), isFocused && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuContainer, {
1476 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuList, {
1477 children: renderItems(options)
1478 })
1479 })]
1480 });
1481 }
1482
1483 __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");
1484
1485 /***/ }),
1486
1487 /***/ "./scripts/shared/Common/ErrorHandler.tsx":
1488 /*!************************************************!*\
1489 !*** ./scripts/shared/Common/ErrorHandler.tsx ***!
1490 \************************************************/
1491 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1492
1493 "use strict";
1494 __webpack_require__.r(__webpack_exports__);
1495 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1496 /* harmony export */ "default": () => (/* binding */ ErrorHandler)
1497 /* harmony export */ });
1498 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1499 /* harmony import */ var _UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../UIComponents/UIButton */ "./scripts/shared/UIComponents/UIButton.ts");
1500 /* harmony import */ var _UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIContainer */ "./scripts/shared/UIComponents/UIContainer.ts");
1501 /* harmony import */ var _HubspotWrapper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1502 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1503 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1504 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);
1505
1506
1507
1508
1509
1510
1511
1512
1513 function redirectToPlugin() {
1514 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);
1515 }
1516
1517 function ErrorHandler(_ref) {
1518 var status = _ref.status,
1519 resetErrorState = _ref.resetErrorState,
1520 _ref$errorInfo = _ref.errorInfo,
1521 errorInfo = _ref$errorInfo === void 0 ? {
1522 header: '',
1523 message: '',
1524 action: ''
1525 } : _ref$errorInfo;
1526 var isUnauthorized = status === 401 || status === 403;
1527 var errorHeader = isUnauthorized ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)("Your plugin isn't authorized", 'leadin') : errorInfo.header;
1528 var errorMessage = isUnauthorized ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Reauthorize your plugin to access your free HubSpot tools', 'leadin') : errorInfo.message;
1529 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HubspotWrapper__WEBPACK_IMPORTED_MODULE_3__["default"], {
1530 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__.pluginPath,
1531 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_2__["default"], {
1532 textAlign: "center",
1533 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h4", {
1534 children: errorHeader
1535 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
1536 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
1537 children: errorMessage
1538 })
1539 }), isUnauthorized ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__["default"], {
1540 "data-test-id": "authorize-button",
1541 onClick: redirectToPlugin,
1542 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Go to plugin', 'leadin')
1543 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__["default"], {
1544 "data-test-id": "retry-button",
1545 onClick: resetErrorState,
1546 children: errorInfo.action
1547 })]
1548 })
1549 });
1550 }
1551
1552 /***/ }),
1553
1554 /***/ "./scripts/shared/Common/HubspotWrapper.ts":
1555 /*!*************************************************!*\
1556 !*** ./scripts/shared/Common/HubspotWrapper.ts ***!
1557 \*************************************************/
1558 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1559
1560 "use strict";
1561 __webpack_require__.r(__webpack_exports__);
1562 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1563 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1564 /* harmony export */ });
1565 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
1566
1567
1568 var _exp = /*#__PURE__*/function _exp() {
1569 return function (props) {
1570 return "url(".concat(props.pluginPath, "/public/assets/images/hubspot.svg)");
1571 };
1572 };
1573
1574 var _exp2 = /*#__PURE__*/function _exp2() {
1575 return function (props) {
1576 return props.padding || '90px 20% 25px';
1577 };
1578 };
1579
1580 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
1581 name: "HubspotWrapper0",
1582 "class": "h1q5v5ee",
1583 propsAsIs: false,
1584 vars: {
1585 "h1q5v5ee-0": [_exp()],
1586 "h1q5v5ee-1": [_exp2()]
1587 }
1588 }));
1589
1590 __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");
1591
1592 /***/ }),
1593
1594 /***/ "./scripts/shared/Common/LoadingBlock.tsx":
1595 /*!************************************************!*\
1596 !*** ./scripts/shared/Common/LoadingBlock.tsx ***!
1597 \************************************************/
1598 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1599
1600 "use strict";
1601 __webpack_require__.r(__webpack_exports__);
1602 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1603 /* harmony export */ "default": () => (/* binding */ LoadingBlock)
1604 /* harmony export */ });
1605 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1606 /* harmony import */ var _HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1607 /* harmony import */ var _UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UISpinner */ "./scripts/shared/UIComponents/UISpinner.tsx");
1608 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1609
1610
1611
1612
1613 function LoadingBlock() {
1614 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__["default"], {
1615 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.pluginPath,
1616 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_2__["default"], {
1617 size: 50
1618 })
1619 });
1620 }
1621
1622 /***/ }),
1623
1624 /***/ "./scripts/shared/Form/FormEdit.tsx":
1625 /*!******************************************!*\
1626 !*** ./scripts/shared/Form/FormEdit.tsx ***!
1627 \******************************************/
1628 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1629
1630 "use strict";
1631 __webpack_require__.r(__webpack_exports__);
1632 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1633 /* harmony export */ "default": () => (/* binding */ FormEditContainer)
1634 /* harmony export */ });
1635 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1636 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1637 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1638 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1639 /* harmony import */ var _UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpacer */ "./scripts/shared/UIComponents/UISpacer.ts");
1640 /* harmony import */ var _PreviewForm__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PreviewForm */ "./scripts/shared/Form/PreviewForm.tsx");
1641 /* harmony import */ var _FormSelect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FormSelect */ "./scripts/shared/Form/FormSelect.tsx");
1642 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1643 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
1644 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
1645 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
1646 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; }
1647
1648 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; }
1649
1650 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; }
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663 function FormEdit(_ref) {
1664 var attributes = _ref.attributes,
1665 isSelected = _ref.isSelected,
1666 setAttributes = _ref.setAttributes,
1667 _ref$preview = _ref.preview,
1668 preview = _ref$preview === void 0 ? true : _ref$preview,
1669 _ref$origin = _ref.origin,
1670 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin;
1671 var formId = attributes.formId,
1672 formName = attributes.formName;
1673 var formSelected = _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId && formId;
1674 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.useBackgroundAppContext)();
1675 var monitorFormPreviewRender = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.usePostBackgroundMessage)();
1676
1677 var handleChange = function handleChange(selectedForm) {
1678 setAttributes({
1679 portalId: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId,
1680 formId: selectedForm.value,
1681 formName: selectedForm.label
1682 });
1683 };
1684
1685 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1686 monitorFormPreviewRender({
1687 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__.ProxyMessages.TrackFormPreviewRender,
1688 payload: {
1689 origin: origin
1690 }
1691 });
1692 }, [origin]);
1693 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, {
1694 children: [(isSelected || !formSelected) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormSelect__WEBPACK_IMPORTED_MODULE_5__["default"], {
1695 formId: formId,
1696 formName: formName,
1697 handleChange: handleChange,
1698 origin: origin
1699 }), formSelected && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
1700 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"], {
1701 portalId: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId,
1702 formId: formId
1703 })]
1704 })]
1705 });
1706 }
1707
1708 function FormEditContainer(props) {
1709 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.BackgroudAppContext.Provider, {
1710 value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_9__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.refreshToken),
1711 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(FormEdit, _objectSpread({}, props))
1712 });
1713 }
1714
1715 /***/ }),
1716
1717 /***/ "./scripts/shared/Form/FormSelect.tsx":
1718 /*!********************************************!*\
1719 !*** ./scripts/shared/Form/FormSelect.tsx ***!
1720 \********************************************/
1721 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1722
1723 "use strict";
1724 __webpack_require__.r(__webpack_exports__);
1725 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1726 /* harmony export */ "default": () => (/* binding */ FormSelect)
1727 /* harmony export */ });
1728 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1729 /* harmony import */ var _FormSelector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FormSelector */ "./scripts/shared/Form/FormSelector.tsx");
1730 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
1731 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1732 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
1733 /* harmony import */ var _hooks_useForms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useForms */ "./scripts/shared/Form/hooks/useForms.ts");
1734 /* harmony import */ var _hooks_useCreateFormFromTemplate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useCreateFormFromTemplate */ "./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts");
1735 /* harmony import */ var _constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../constants/defaultFormOptions */ "./scripts/constants/defaultFormOptions.ts");
1736 /* harmony import */ var _Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
1737
1738
1739
1740
1741
1742
1743
1744
1745 function FormSelect(_ref) {
1746 var formId = _ref.formId,
1747 formName = _ref.formName,
1748 handleChange = _ref.handleChange,
1749 _ref$origin = _ref.origin,
1750 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin;
1751
1752 var _useForms = (0,_hooks_useForms__WEBPACK_IMPORTED_MODULE_4__["default"])(),
1753 search = _useForms.search,
1754 formApiError = _useForms.formApiError,
1755 reset = _useForms.reset;
1756
1757 var _useCreateFormFromTem = (0,_hooks_useCreateFormFromTemplate__WEBPACK_IMPORTED_MODULE_5__["default"])(origin),
1758 createFormByTemplate = _useCreateFormFromTem.createFormByTemplate,
1759 createReset = _useCreateFormFromTem.reset,
1760 isCreating = _useCreateFormFromTem.isCreating,
1761 hasError = _useCreateFormFromTem.hasError,
1762 createApiError = _useCreateFormFromTem.formApiError;
1763
1764 var value = formId && formName ? {
1765 label: formName,
1766 value: formId
1767 } : null;
1768
1769 var handleLocalChange = function handleLocalChange(option) {
1770 if ((0,_constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_6__.isDefaultForm)(option.value)) {
1771 createFormByTemplate(option.value).then(function (_ref2) {
1772 var guid = _ref2.guid,
1773 name = _ref2.name;
1774 handleChange({
1775 value: guid,
1776 label: name
1777 });
1778 });
1779 } else {
1780 handleChange(option);
1781 }
1782 };
1783
1784 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"], {
1785 status: formApiError ? formApiError.status : createApiError.status,
1786 resetErrorState: function resetErrorState() {
1787 if (hasError) {
1788 createReset();
1789 } else {
1790 reset();
1791 }
1792 },
1793 errorInfo: {
1794 header: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('There was a problem retrieving your forms', 'leadin'),
1795 message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Please refresh your forms or try again in a few minutes', 'leadin'),
1796 action: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Refresh forms', 'leadin')
1797 }
1798 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormSelector__WEBPACK_IMPORTED_MODULE_1__["default"], {
1799 loadOptions: search,
1800 onChange: function onChange(option) {
1801 return handleLocalChange(option);
1802 },
1803 value: value
1804 });
1805 }
1806
1807 /***/ }),
1808
1809 /***/ "./scripts/shared/Form/FormSelector.tsx":
1810 /*!**********************************************!*\
1811 !*** ./scripts/shared/Form/FormSelector.tsx ***!
1812 \**********************************************/
1813 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1814
1815 "use strict";
1816 __webpack_require__.r(__webpack_exports__);
1817 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1818 /* harmony export */ "default": () => (/* binding */ FormSelector)
1819 /* harmony export */ });
1820 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1821 /* harmony import */ var _Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Common/HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1822 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1823 /* harmony import */ var _Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Common/AsyncSelect */ "./scripts/shared/Common/AsyncSelect.tsx");
1824 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1825 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
1826
1827
1828
1829
1830
1831 function FormSelector(_ref) {
1832 var loadOptions = _ref.loadOptions,
1833 onChange = _ref.onChange,
1834 value = _ref.value;
1835 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__["default"], {
1836 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath,
1837 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
1838 "data-test-id": "leadin-form-select",
1839 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
1840 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select an existing form or create a new one from a template', 'leadin')
1841 })
1842 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_3__["default"], {
1843 placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Search for a form', 'leadin'),
1844 value: value,
1845 loadOptions: loadOptions,
1846 onChange: onChange
1847 })]
1848 });
1849 }
1850
1851 /***/ }),
1852
1853 /***/ "./scripts/shared/Form/PreviewForm.tsx":
1854 /*!*********************************************!*\
1855 !*** ./scripts/shared/Form/PreviewForm.tsx ***!
1856 \*********************************************/
1857 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1858
1859 "use strict";
1860 __webpack_require__.r(__webpack_exports__);
1861 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1862 /* harmony export */ "default": () => (/* binding */ PreviewForm)
1863 /* harmony export */ });
1864 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1865 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1866 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1867 /* harmony import */ var _UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIOverlay */ "./scripts/shared/UIComponents/UIOverlay.ts");
1868 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1869 /* harmony import */ var _hooks_useFormsScript__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useFormsScript */ "./scripts/shared/Form/hooks/useFormsScript.ts");
1870
1871
1872
1873
1874
1875 function PreviewForm(_ref) {
1876 var portalId = _ref.portalId,
1877 formId = _ref.formId;
1878 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1879 var ready = (0,_hooks_useFormsScript__WEBPACK_IMPORTED_MODULE_4__["default"])();
1880 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1881 if (!ready) {
1882 return;
1883 }
1884
1885 if (inputEl.current) {
1886 inputEl.current.innerHTML = '';
1887 var embedScript = document.createElement('script');
1888 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, " });");
1889 inputEl.current.appendChild(embedScript);
1890 }
1891 }, [formId, portalId, ready, inputEl]);
1892 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__["default"], {
1893 ref: inputEl
1894 });
1895 }
1896
1897 /***/ }),
1898
1899 /***/ "./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts":
1900 /*!****************************************************************!*\
1901 !*** ./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts ***!
1902 \****************************************************************/
1903 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1904
1905 "use strict";
1906 __webpack_require__.r(__webpack_exports__);
1907 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1908 /* harmony export */ "default": () => (/* binding */ useCreateFormFromTemplate)
1909 /* harmony export */ });
1910 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1911 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1912 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1913 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
1914 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
1915 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1916
1917 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."); }
1918
1919 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); }
1920
1921 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; }
1922
1923 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; }
1924
1925 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1926
1927
1928
1929
1930
1931 function useCreateFormFromTemplate() {
1932 var origin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'gutenberg';
1933 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
1934 var track = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostBackgroundMessage)();
1935
1936 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle),
1937 _useState2 = _slicedToArray(_useState, 2),
1938 loadState = _useState2[0],
1939 setLoadState = _useState2[1];
1940
1941 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
1942 _useState4 = _slicedToArray(_useState3, 2),
1943 formApiError = _useState4[0],
1944 setFormApiError = _useState4[1];
1945
1946 var createFormByTemplate = function createFormByTemplate(type) {
1947 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
1948 track({
1949 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.TrackFormCreatedFromTemplate,
1950 payload: {
1951 type: type,
1952 origin: origin
1953 }
1954 });
1955 return proxy({
1956 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.CreateFormFromTemplate,
1957 payload: type
1958 }).then(function (form) {
1959 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
1960 return form;
1961 })["catch"](function (err) {
1962 setFormApiError(err);
1963 track({
1964 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.TrackFormCreationFailed,
1965 payload: {
1966 origin: origin
1967 }
1968 });
1969 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
1970 });
1971 };
1972
1973 return {
1974 isCreating: loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading,
1975 hasError: loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed,
1976 formApiError: formApiError,
1977 createFormByTemplate: createFormByTemplate,
1978 reset: function reset() {
1979 return setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
1980 }
1981 };
1982 }
1983
1984 /***/ }),
1985
1986 /***/ "./scripts/shared/Form/hooks/useForms.ts":
1987 /*!***********************************************!*\
1988 !*** ./scripts/shared/Form/hooks/useForms.ts ***!
1989 \***********************************************/
1990 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1991
1992 "use strict";
1993 __webpack_require__.r(__webpack_exports__);
1994 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1995 /* harmony export */ "default": () => (/* binding */ useForms)
1996 /* harmony export */ });
1997 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1998 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1999 /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/debounce */ "./node_modules/lodash/debounce.js");
2000 /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_1__);
2001 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2002 /* harmony import */ var _constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../constants/defaultFormOptions */ "./scripts/constants/defaultFormOptions.ts");
2003 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2004 function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2005
2006 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."); }
2007
2008 function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
2009
2010 function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
2011
2012 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2013
2014 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."); }
2015
2016 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); }
2017
2018 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; }
2019
2020 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; }
2021
2022 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2023
2024
2025
2026
2027
2028
2029 function useForms() {
2030 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__.usePostAsyncBackgroundMessage)();
2031
2032 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2033 _useState2 = _slicedToArray(_useState, 2),
2034 formApiError = _useState2[0],
2035 setFormApiError = _useState2[1];
2036
2037 var search = lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default()(function (search, callback) {
2038 return proxy({
2039 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages.FetchForms,
2040 payload: {
2041 search: search
2042 }
2043 }).then(function (forms) {
2044 callback([].concat(_toConsumableArray(forms.map(function (form) {
2045 return {
2046 label: form.name,
2047 value: form.guid
2048 };
2049 })), [_constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_OPTIONS]));
2050 })["catch"](function (error) {
2051 setFormApiError(error);
2052 });
2053 }, 300, {
2054 trailing: true
2055 });
2056 return {
2057 search: search,
2058 formApiError: formApiError,
2059 reset: function reset() {
2060 return setFormApiError(null);
2061 }
2062 };
2063 }
2064
2065 /***/ }),
2066
2067 /***/ "./scripts/shared/Form/hooks/useFormsScript.ts":
2068 /*!*****************************************************!*\
2069 !*** ./scripts/shared/Form/hooks/useFormsScript.ts ***!
2070 \*****************************************************/
2071 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2072
2073 "use strict";
2074 __webpack_require__.r(__webpack_exports__);
2075 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2076 /* harmony export */ "default": () => (/* binding */ useFormScript)
2077 /* harmony export */ });
2078 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
2079 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
2080 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2081 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2082 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2083 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../lib/Raven */ "./scripts/lib/Raven.ts");
2084 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2085
2086 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."); }
2087
2088 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); }
2089
2090 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; }
2091
2092 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; }
2093
2094 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2095
2096
2097
2098
2099
2100 var promise;
2101
2102 function loadFormsScript() {
2103 if (!promise) {
2104 promise = new Promise(function (resolve, reject) {
2105 return jquery__WEBPACK_IMPORTED_MODULE_0___default().getScript(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.formsScript).done(resolve).fail(reject);
2106 });
2107 }
2108
2109 return promise;
2110 }
2111
2112 function useFormScript() {
2113 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
2114 _useState2 = _slicedToArray(_useState, 2),
2115 ready = _useState2[0],
2116 setReady = _useState2[1];
2117
2118 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2119 loadFormsScript().then(function () {
2120 return setReady(true);
2121 })["catch"](function (error) {
2122 return _lib_Raven__WEBPACK_IMPORTED_MODULE_3__["default"].captureException(error);
2123 });
2124 }, []);
2125 return ready;
2126 }
2127
2128 /***/ }),
2129
2130 /***/ "./scripts/shared/Meeting/MeetingController.tsx":
2131 /*!******************************************************!*\
2132 !*** ./scripts/shared/Meeting/MeetingController.tsx ***!
2133 \******************************************************/
2134 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2135
2136 "use strict";
2137 __webpack_require__.r(__webpack_exports__);
2138 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2139 /* harmony export */ "default": () => (/* binding */ MeetingController)
2140 /* harmony export */ });
2141 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2142 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2143 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2144 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
2145 /* harmony import */ var _MeetingSelector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./MeetingSelector */ "./scripts/shared/Meeting/MeetingSelector.tsx");
2146 /* harmony import */ var _MeetingWarning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MeetingWarning */ "./scripts/shared/Meeting/MeetingWarning.tsx");
2147 /* harmony import */ var _hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useMeetings */ "./scripts/shared/Meeting/hooks/useMeetings.ts");
2148 /* harmony import */ var _Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Common/HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
2149 /* harmony import */ var _Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
2150 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2151 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2152 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);
2153 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! raven-js */ "./node_modules/raven-js/src/singleton.js");
2154 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(raven_js__WEBPACK_IMPORTED_MODULE_10__);
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166 function MeetingController(_ref) {
2167 var handleChange = _ref.handleChange,
2168 url = _ref.url;
2169
2170 var _useMeetings = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__["default"])(),
2171 meetings = _useMeetings.mappedMeetings,
2172 loading = _useMeetings.loading,
2173 error = _useMeetings.error,
2174 reload = _useMeetings.reload,
2175 connectCalendar = _useMeetings.connectCalendar;
2176
2177 var selectedMeetingOption = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__.useSelectedMeeting)(url);
2178 var selectedMeetingCalendar = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__.useSelectedMeetingCalendar)(url);
2179 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2180 if (!url && meetings.length > 0) {
2181 handleChange(meetings[0].value);
2182 }
2183 }, [meetings, url, handleChange]);
2184
2185 var handleLocalChange = function handleLocalChange(option) {
2186 handleChange(option.value);
2187 };
2188
2189 var handleConnectCalendar = function handleConnectCalendar() {
2190 return connectCalendar().then(function () {
2191 reload();
2192 })["catch"](function (error) {
2193 raven_js__WEBPACK_IMPORTED_MODULE_10___default().captureMessage('Unable to connect calendar', {
2194 extra: {
2195 error: error
2196 }
2197 });
2198 });
2199 };
2200
2201 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2202 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"], {
2203 status: error && error.status || error,
2204 resetErrorState: function resetErrorState() {
2205 return reload();
2206 },
2207 errorInfo: {
2208 header: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('There was a problem retrieving your meetings', 'leadin'),
2209 message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Please refresh your meetings or try again in a few minutes', 'leadin'),
2210 action: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Refresh meetings', 'leadin')
2211 }
2212 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_6__["default"], {
2213 padding: "90px 32px 24px",
2214 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_8__.pluginPath,
2215 children: [selectedMeetingCalendar && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingWarning__WEBPACK_IMPORTED_MODULE_4__["default"], {
2216 status: selectedMeetingCalendar,
2217 onConnectCalendar: handleConnectCalendar
2218 }), meetings.length > 1 && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingSelector__WEBPACK_IMPORTED_MODULE_3__["default"], {
2219 onChange: handleLocalChange,
2220 options: meetings,
2221 value: selectedMeetingOption
2222 })]
2223 })
2224 });
2225 }
2226
2227 /***/ }),
2228
2229 /***/ "./scripts/shared/Meeting/MeetingEdit.tsx":
2230 /*!************************************************!*\
2231 !*** ./scripts/shared/Meeting/MeetingEdit.tsx ***!
2232 \************************************************/
2233 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2234
2235 "use strict";
2236 __webpack_require__.r(__webpack_exports__);
2237 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2238 /* harmony export */ "default": () => (/* binding */ MeetingsEditContainer)
2239 /* harmony export */ });
2240 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2241 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2242 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2243 /* harmony import */ var _MeetingController__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./MeetingController */ "./scripts/shared/Meeting/MeetingController.tsx");
2244 /* harmony import */ var _PreviewMeeting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PreviewMeeting */ "./scripts/shared/Meeting/PreviewMeeting.tsx");
2245 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2246 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2247 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2248 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
2249 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
2250 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; }
2251
2252 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; }
2253
2254 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; }
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266 function MeetingEdit(_ref) {
2267 var url = _ref.attributes.url,
2268 isSelected = _ref.isSelected,
2269 setAttributes = _ref.setAttributes,
2270 _ref$preview = _ref.preview,
2271 preview = _ref$preview === void 0 ? true : _ref$preview,
2272 _ref$origin = _ref.origin,
2273 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin;
2274 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.useBackgroundAppContext)();
2275 var monitorFormPreviewRender = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.usePostBackgroundMessage)();
2276
2277 var handleChange = function handleChange(newUrl) {
2278 setAttributes({
2279 url: newUrl
2280 });
2281 };
2282
2283 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2284 monitorFormPreviewRender({
2285 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_6__.ProxyMessages.TrackMeetingPreviewRender,
2286 payload: {
2287 origin: origin
2288 }
2289 });
2290 }, [origin]);
2291 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, {
2292 children: [(isSelected || !url) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingController__WEBPACK_IMPORTED_MODULE_2__["default"], {
2293 url: url,
2294 handleChange: handleChange
2295 }), preview && url && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PreviewMeeting__WEBPACK_IMPORTED_MODULE_3__["default"], {
2296 url: url
2297 })]
2298 });
2299 }
2300
2301 function MeetingsEditContainer(props) {
2302 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.BackgroudAppContext.Provider, {
2303 value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_8__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__.refreshToken),
2304 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MeetingEdit, _objectSpread({}, props))
2305 });
2306 }
2307
2308 /***/ }),
2309
2310 /***/ "./scripts/shared/Meeting/MeetingSelector.tsx":
2311 /*!****************************************************!*\
2312 !*** ./scripts/shared/Meeting/MeetingSelector.tsx ***!
2313 \****************************************************/
2314 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2315
2316 "use strict";
2317 __webpack_require__.r(__webpack_exports__);
2318 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2319 /* harmony export */ "default": () => (/* binding */ MeetingSelector)
2320 /* harmony export */ });
2321 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2322 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2323 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2324 /* harmony import */ var _Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/AsyncSelect */ "./scripts/shared/Common/AsyncSelect.tsx");
2325 /* harmony import */ var _UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpacer */ "./scripts/shared/UIComponents/UISpacer.ts");
2326 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2327 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
2328
2329
2330
2331
2332
2333 function MeetingSelector(_ref) {
2334 var options = _ref.options,
2335 onChange = _ref.onChange,
2336 value = _ref.value;
2337 var optionsWrapper = [{
2338 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Meeting name', 'leadin'),
2339 options: options
2340 }];
2341 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2342 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", {
2343 "data-test-id": "leadin-meeting-select",
2344 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
2345 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select a meeting scheduling page', 'leadin')
2346 })
2347 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_2__["default"], {
2348 defaultOptions: optionsWrapper,
2349 onChange: onChange,
2350 placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select a meeting', 'leadin'),
2351 value: value
2352 })]
2353 });
2354 }
2355
2356 /***/ }),
2357
2358 /***/ "./scripts/shared/Meeting/MeetingWarning.tsx":
2359 /*!***************************************************!*\
2360 !*** ./scripts/shared/Meeting/MeetingWarning.tsx ***!
2361 \***************************************************/
2362 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2363
2364 "use strict";
2365 __webpack_require__.r(__webpack_exports__);
2366 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2367 /* harmony export */ "default": () => (/* binding */ MeetingWarning)
2368 /* harmony export */ });
2369 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2370 /* harmony import */ var _UIComponents_UIAlert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../UIComponents/UIAlert */ "./scripts/shared/UIComponents/UIAlert.tsx");
2371 /* harmony import */ var _UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIButton */ "./scripts/shared/UIComponents/UIButton.ts");
2372 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants */ "./scripts/shared/Meeting/constants.ts");
2373 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2374 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
2375
2376
2377
2378
2379
2380 function MeetingWarning(_ref) {
2381 var status = _ref.status,
2382 onConnectCalendar = _ref.onConnectCalendar;
2383 var isMeetingOwner = status === _constants__WEBPACK_IMPORTED_MODULE_3__.CURRENT_USER_CALENDAR_MISSING;
2384 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');
2385 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');
2386 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIAlert__WEBPACK_IMPORTED_MODULE_1__["default"], {
2387 titleText: titleText,
2388 titleMessage: titleMessage,
2389 children: isMeetingOwner && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_2__["default"], {
2390 use: "tertiary",
2391 id: "meetings-connect-calendar",
2392 onClick: onConnectCalendar,
2393 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Connect calendar', 'leadin')
2394 })
2395 });
2396 }
2397
2398 /***/ }),
2399
2400 /***/ "./scripts/shared/Meeting/PreviewMeeting.tsx":
2401 /*!***************************************************!*\
2402 !*** ./scripts/shared/Meeting/PreviewMeeting.tsx ***!
2403 \***************************************************/
2404 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2405
2406 "use strict";
2407 __webpack_require__.r(__webpack_exports__);
2408 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2409 /* harmony export */ "default": () => (/* binding */ PreviewForm)
2410 /* harmony export */ });
2411 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2412 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2413 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2414 /* harmony import */ var _UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIOverlay */ "./scripts/shared/UIComponents/UIOverlay.ts");
2415 /* harmony import */ var _hooks_useMeetingsScript__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hooks/useMeetingsScript */ "./scripts/shared/Meeting/hooks/useMeetingsScript.ts");
2416
2417
2418
2419
2420 function PreviewForm(_ref) {
2421 var url = _ref.url;
2422 var ready = (0,_hooks_useMeetingsScript__WEBPACK_IMPORTED_MODULE_3__["default"])();
2423 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
2424 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2425 if (!ready) {
2426 return;
2427 }
2428
2429 if (inputEl.current) {
2430 inputEl.current.innerHTML = '';
2431 var container = document.createElement('div');
2432 container.dataset.src = "".concat(url, "?embed=true");
2433 container.classList.add('meetings-iframe-container');
2434 inputEl.current.appendChild(container);
2435 var embedScript = document.createElement('script');
2436 embedScript.innerHTML = 'hbspt.meetings.create(".meetings-iframe-container");';
2437 inputEl.current.appendChild(embedScript);
2438 }
2439 }, [url, ready, inputEl]);
2440 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2441 children: url && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__["default"], {
2442 ref: inputEl
2443 })
2444 });
2445 }
2446
2447 /***/ }),
2448
2449 /***/ "./scripts/shared/Meeting/constants.ts":
2450 /*!*********************************************!*\
2451 !*** ./scripts/shared/Meeting/constants.ts ***!
2452 \*********************************************/
2453 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2454
2455 "use strict";
2456 __webpack_require__.r(__webpack_exports__);
2457 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2458 /* harmony export */ "CURRENT_USER_CALENDAR_MISSING": () => (/* binding */ CURRENT_USER_CALENDAR_MISSING),
2459 /* harmony export */ "OTHER_USER_CALENDAR_MISSING": () => (/* binding */ OTHER_USER_CALENDAR_MISSING)
2460 /* harmony export */ });
2461 var OTHER_USER_CALENDAR_MISSING = 'OTHER_USER_CALENDAR_MISSING';
2462 var CURRENT_USER_CALENDAR_MISSING = 'CURRENT_USER_CALENDAR_MISSING';
2463
2464 /***/ }),
2465
2466 /***/ "./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts":
2467 /*!*************************************************************!*\
2468 !*** ./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts ***!
2469 \*************************************************************/
2470 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2471
2472 "use strict";
2473 __webpack_require__.r(__webpack_exports__);
2474 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2475 /* harmony export */ "default": () => (/* binding */ useCurrentUserFetch)
2476 /* harmony export */ });
2477 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2478 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2479 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2480 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2481 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2482 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2483
2484 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."); }
2485
2486 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); }
2487
2488 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; }
2489
2490 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; }
2491
2492 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2493
2494
2495
2496
2497
2498 var user = null;
2499 function useCurrentUserFetch() {
2500 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
2501
2502 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded),
2503 _useState2 = _slicedToArray(_useState, 2),
2504 loadState = _useState2[0],
2505 setLoadState = _useState2[1];
2506
2507 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2508 _useState4 = _slicedToArray(_useState3, 2),
2509 error = _useState4[0],
2510 setError = _useState4[1];
2511
2512 var createUser = function createUser() {
2513 if (!user) {
2514 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2515 }
2516 };
2517
2518 var reload = function reload() {
2519 user = null;
2520 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2521 setError(null);
2522 };
2523
2524 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2525 if (loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded && !user) {
2526 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
2527 proxy({
2528 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.FetchOrCreateMeetingUser
2529 }).then(function (data) {
2530 user = data;
2531 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
2532 })["catch"](function (err) {
2533 setError(err);
2534 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
2535 });
2536 }
2537 }, [loadState]);
2538 return {
2539 user: user,
2540 loadUserState: loadState,
2541 error: error,
2542 createUser: createUser,
2543 reload: reload
2544 };
2545 }
2546
2547 /***/ }),
2548
2549 /***/ "./scripts/shared/Meeting/hooks/useMeetings.ts":
2550 /*!*****************************************************!*\
2551 !*** ./scripts/shared/Meeting/hooks/useMeetings.ts ***!
2552 \*****************************************************/
2553 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2554
2555 "use strict";
2556 __webpack_require__.r(__webpack_exports__);
2557 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2558 /* harmony export */ "default": () => (/* binding */ useMeetings),
2559 /* harmony export */ "useSelectedMeeting": () => (/* binding */ useSelectedMeeting),
2560 /* harmony export */ "useSelectedMeetingCalendar": () => (/* binding */ useSelectedMeetingCalendar)
2561 /* harmony export */ });
2562 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2563 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2564 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2565 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
2566 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants */ "./scripts/shared/Meeting/constants.ts");
2567 /* harmony import */ var _useMeetingsFetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./useMeetingsFetch */ "./scripts/shared/Meeting/hooks/useMeetingsFetch.ts");
2568 /* harmony import */ var _useCurrentUserFetch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./useCurrentUserFetch */ "./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts");
2569 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2570 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2571 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2572 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; }
2573
2574 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; }
2575
2576 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; }
2577
2578 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2579
2580 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."); }
2581
2582 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); }
2583
2584 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; }
2585
2586 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; }
2587
2588 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599 function getDefaultMeetingName(meeting, currentUser, meetingUsers) {
2600 var _meeting$meetingsUser = _slicedToArray(meeting.meetingsUserIds, 1),
2601 meetingOwnerId = _meeting$meetingsUser[0];
2602
2603 var result = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Default', 'leadin');
2604
2605 if (currentUser && meetingOwnerId !== currentUser.id && meetingUsers[meetingOwnerId]) {
2606 var user = meetingUsers[meetingOwnerId];
2607 result += " (".concat(user.userProfile.fullName, ")");
2608 }
2609
2610 return result;
2611 }
2612
2613 function hasCalendarObject(user) {
2614 return user && user.meetingsUserBlob && user.meetingsUserBlob.calendarSettings && user.meetingsUserBlob.calendarSettings.email;
2615 }
2616
2617 function useMeetings() {
2618 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.usePostAsyncBackgroundMessage)();
2619
2620 var _useMeetingsFetch = (0,_useMeetingsFetch__WEBPACK_IMPORTED_MODULE_3__["default"])(),
2621 meetings = _useMeetingsFetch.meetings,
2622 meetingUsers = _useMeetingsFetch.meetingUsers,
2623 meetingsError = _useMeetingsFetch.error,
2624 loadMeetingsState = _useMeetingsFetch.loadMeetingsState,
2625 reloadMeetings = _useMeetingsFetch.reload;
2626
2627 var _useCurrentUserFetch = (0,_useCurrentUserFetch__WEBPACK_IMPORTED_MODULE_4__["default"])(),
2628 currentUser = _useCurrentUserFetch.user,
2629 userError = _useCurrentUserFetch.error,
2630 loadUserState = _useCurrentUserFetch.loadUserState,
2631 reloadUser = _useCurrentUserFetch.reload;
2632
2633 var reload = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
2634 reloadUser();
2635 reloadMeetings();
2636 }, [reloadUser, reloadMeetings]);
2637
2638 var connectCalendar = function connectCalendar() {
2639 return proxy({
2640 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__.ProxyMessages.ConnectMeetingsCalendar
2641 });
2642 };
2643
2644 return {
2645 mappedMeetings: meetings.map(function (meet) {
2646 return {
2647 label: meet.name || getDefaultMeetingName(meet, currentUser, meetingUsers),
2648 value: meet.link
2649 };
2650 }),
2651 meetings: meetings,
2652 meetingUsers: meetingUsers,
2653 currentUser: currentUser,
2654 error: meetingsError || userError,
2655 loading: loadMeetingsState == _enums_loadState__WEBPACK_IMPORTED_MODULE_5__["default"].Loading || loadUserState === _enums_loadState__WEBPACK_IMPORTED_MODULE_5__["default"].Loading,
2656 reload: reload,
2657 connectCalendar: connectCalendar
2658 };
2659 }
2660 function useSelectedMeeting(url) {
2661 var _useMeetings = useMeetings(),
2662 meetings = _useMeetings.mappedMeetings;
2663
2664 var option = meetings.find(function (_ref) {
2665 var value = _ref.value;
2666 return value === url;
2667 });
2668 return option;
2669 }
2670 function useSelectedMeetingCalendar(url) {
2671 var _useMeetings2 = useMeetings(),
2672 meetings = _useMeetings2.meetings,
2673 meetingUsers = _useMeetings2.meetingUsers,
2674 currentUser = _useMeetings2.currentUser;
2675
2676 var meeting = meetings.find(function (meet) {
2677 return meet.link === url;
2678 });
2679 var mappedMeetingUsersId = meetingUsers.reduce(function (p, c) {
2680 return _objectSpread(_objectSpread({}, p), {}, _defineProperty({}, c.id, c));
2681 }, {});
2682
2683 if (!meeting) {
2684 return null;
2685 } else {
2686 var meetingsUserIds = meeting.meetingsUserIds;
2687
2688 if (currentUser && meetingsUserIds.includes(currentUser.id) && !hasCalendarObject(currentUser)) {
2689 return _constants__WEBPACK_IMPORTED_MODULE_2__.CURRENT_USER_CALENDAR_MISSING;
2690 } else if (meetingsUserIds.map(function (id) {
2691 return mappedMeetingUsersId[id];
2692 }).some(function (user) {
2693 return !hasCalendarObject(user);
2694 })) {
2695 return _constants__WEBPACK_IMPORTED_MODULE_2__.OTHER_USER_CALENDAR_MISSING;
2696 } else {
2697 return null;
2698 }
2699 }
2700 }
2701
2702 /***/ }),
2703
2704 /***/ "./scripts/shared/Meeting/hooks/useMeetingsFetch.ts":
2705 /*!**********************************************************!*\
2706 !*** ./scripts/shared/Meeting/hooks/useMeetingsFetch.ts ***!
2707 \**********************************************************/
2708 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2709
2710 "use strict";
2711 __webpack_require__.r(__webpack_exports__);
2712 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2713 /* harmony export */ "default": () => (/* binding */ useMeetingsFetch)
2714 /* harmony export */ });
2715 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2716 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2717 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2718 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2719 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2720 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2721
2722 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."); }
2723
2724 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); }
2725
2726 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; }
2727
2728 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; }
2729
2730 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2731
2732
2733
2734
2735
2736 var meetings = [];
2737 var meetingUsers = [];
2738 function useMeetingsFetch() {
2739 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
2740
2741 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded),
2742 _useState2 = _slicedToArray(_useState, 2),
2743 loadState = _useState2[0],
2744 setLoadState = _useState2[1];
2745
2746 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2747 _useState4 = _slicedToArray(_useState3, 2),
2748 error = _useState4[0],
2749 setError = _useState4[1];
2750
2751 var reload = function reload() {
2752 meetings = [];
2753 setError(null);
2754 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2755 };
2756
2757 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2758 if (loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded && meetings.length === 0) {
2759 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
2760 proxy({
2761 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.FetchMeetingsAndUsers
2762 }).then(function (data) {
2763 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loaded);
2764 meetings = data && data.meetingLinks;
2765 meetingUsers = data && data.meetingUsers;
2766 })["catch"](function (e) {
2767 setError(e);
2768 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
2769 });
2770 }
2771 }, [loadState]);
2772 return {
2773 meetings: meetings,
2774 meetingUsers: meetingUsers,
2775 loadMeetingsState: loadState,
2776 error: error,
2777 reload: reload
2778 };
2779 }
2780
2781 /***/ }),
2782
2783 /***/ "./scripts/shared/Meeting/hooks/useMeetingsScript.ts":
2784 /*!***********************************************************!*\
2785 !*** ./scripts/shared/Meeting/hooks/useMeetingsScript.ts ***!
2786 \***********************************************************/
2787 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2788
2789 "use strict";
2790 __webpack_require__.r(__webpack_exports__);
2791 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2792 /* harmony export */ "default": () => (/* binding */ useMeetingsScript)
2793 /* harmony export */ });
2794 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
2795 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
2796 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2797 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2798 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2799 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../lib/Raven */ "./scripts/lib/Raven.ts");
2800 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2801
2802 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."); }
2803
2804 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); }
2805
2806 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; }
2807
2808 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; }
2809
2810 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2811
2812
2813
2814
2815
2816 var promise;
2817
2818 function loadMeetingsScript() {
2819 if (!promise) {
2820 promise = new Promise(function (resolve, reject) {
2821 return jquery__WEBPACK_IMPORTED_MODULE_0___default().getScript(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.meetingsScript).done(resolve).fail(reject);
2822 });
2823 }
2824
2825 return promise;
2826 }
2827
2828 function useMeetingsScript() {
2829 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
2830 _useState2 = _slicedToArray(_useState, 2),
2831 ready = _useState2[0],
2832 setReady = _useState2[1];
2833
2834 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2835 loadMeetingsScript().then(function () {
2836 return setReady(true);
2837 })["catch"](function (error) {
2838 return _lib_Raven__WEBPACK_IMPORTED_MODULE_3__["default"].captureException(error);
2839 });
2840 }, []);
2841 return ready;
2842 }
2843
2844 /***/ }),
2845
2846 /***/ "./scripts/shared/UIComponents/UIAlert.tsx":
2847 /*!*************************************************!*\
2848 !*** ./scripts/shared/UIComponents/UIAlert.tsx ***!
2849 \*************************************************/
2850 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2851
2852 "use strict";
2853 __webpack_require__.r(__webpack_exports__);
2854 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2855 /* harmony export */ "default": () => (/* binding */ UIAlert)
2856 /* harmony export */ });
2857 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2858 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2859
2860
2861 var AlertContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('div')({
2862 name: "AlertContainer",
2863 "class": "a1h8m4fo",
2864 propsAsIs: false
2865 });
2866 var Title = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('p')({
2867 name: "Title",
2868 "class": "tyndzxk",
2869 propsAsIs: false
2870 });
2871 var Message = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('p')({
2872 name: "Message",
2873 "class": "m1m9sbk4",
2874 propsAsIs: false
2875 });
2876 var MessageContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('div')({
2877 name: "MessageContainer",
2878 "class": "mg5o421",
2879 propsAsIs: false
2880 });
2881 function UIAlert(_ref) {
2882 var titleText = _ref.titleText,
2883 titleMessage = _ref.titleMessage,
2884 children = _ref.children;
2885 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(AlertContainer, {
2886 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(MessageContainer, {
2887 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Title, {
2888 children: titleText
2889 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Message, {
2890 children: titleMessage
2891 })]
2892 }), children]
2893 });
2894 }
2895
2896 __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");
2897
2898 /***/ }),
2899
2900 /***/ "./scripts/shared/UIComponents/UIButton.ts":
2901 /*!*************************************************!*\
2902 !*** ./scripts/shared/UIComponents/UIButton.ts ***!
2903 \*************************************************/
2904 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2905
2906 "use strict";
2907 __webpack_require__.r(__webpack_exports__);
2908 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2909 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2910 /* harmony export */ });
2911 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2912 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colors */ "./scripts/shared/UIComponents/colors.ts");
2913
2914
2915
2916 var _exp2 = /*#__PURE__*/function _exp2() {
2917 return function (props) {
2918 return props.use === 'tertiary' ? _colors__WEBPACK_IMPORTED_MODULE_0__.HEFFALUMP : _colors__WEBPACK_IMPORTED_MODULE_0__.LORAX;
2919 };
2920 };
2921
2922 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('button')({
2923 name: "UIButton0",
2924 "class": "ug152ch",
2925 propsAsIs: false,
2926 vars: {
2927 "ug152ch-0": [_exp2()]
2928 }
2929 }));
2930
2931 __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");
2932
2933 /***/ }),
2934
2935 /***/ "./scripts/shared/UIComponents/UIContainer.ts":
2936 /*!****************************************************!*\
2937 !*** ./scripts/shared/UIComponents/UIContainer.ts ***!
2938 \****************************************************/
2939 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2940
2941 "use strict";
2942 __webpack_require__.r(__webpack_exports__);
2943 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2944 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2945 /* harmony export */ });
2946 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2947
2948
2949 var _exp = /*#__PURE__*/function _exp() {
2950 return function (props) {
2951 return props.textAlign ? props.textAlign : 'inherit';
2952 };
2953 };
2954
2955 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
2956 name: "UIContainer0",
2957 "class": "ua13n1c",
2958 propsAsIs: false,
2959 vars: {
2960 "ua13n1c-0": [_exp()]
2961 }
2962 }));
2963
2964 __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");
2965
2966 /***/ }),
2967
2968 /***/ "./scripts/shared/UIComponents/UIOverlay.ts":
2969 /*!**************************************************!*\
2970 !*** ./scripts/shared/UIComponents/UIOverlay.ts ***!
2971 \**************************************************/
2972 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2973
2974 "use strict";
2975 __webpack_require__.r(__webpack_exports__);
2976 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2977 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2978 /* harmony export */ });
2979 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2980
2981 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
2982 name: "UIOverlay0",
2983 "class": "u1q7a48k",
2984 propsAsIs: false
2985 }));
2986
2987 __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");
2988
2989 /***/ }),
2990
2991 /***/ "./scripts/shared/UIComponents/UISpacer.ts":
2992 /*!*************************************************!*\
2993 !*** ./scripts/shared/UIComponents/UISpacer.ts ***!
2994 \*************************************************/
2995 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2996
2997 "use strict";
2998 __webpack_require__.r(__webpack_exports__);
2999 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3000 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3001 /* harmony export */ });
3002 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3003
3004 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
3005 name: "UISpacer0",
3006 "class": "u3qxofx",
3007 propsAsIs: false
3008 }));
3009
3010 __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");
3011
3012 /***/ }),
3013
3014 /***/ "./scripts/shared/UIComponents/UISpinner.tsx":
3015 /*!***************************************************!*\
3016 !*** ./scripts/shared/UIComponents/UISpinner.tsx ***!
3017 \***************************************************/
3018 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3019
3020 "use strict";
3021 __webpack_require__.r(__webpack_exports__);
3022 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3023 /* harmony export */ "default": () => (/* binding */ UISpinner)
3024 /* harmony export */ });
3025 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
3026 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3027 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./colors */ "./scripts/shared/UIComponents/colors.ts");
3028
3029
3030
3031 var SpinnerOuter = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('div')({
3032 name: "SpinnerOuter",
3033 "class": "sxa9zrc",
3034 propsAsIs: false
3035 });
3036 var SpinnerInner = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('div')({
3037 name: "SpinnerInner",
3038 "class": "s14430wa",
3039 propsAsIs: false
3040 });
3041
3042 var _exp = /*#__PURE__*/function _exp() {
3043 return function (props) {
3044 return props.color;
3045 };
3046 };
3047
3048 var Circle = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('circle')({
3049 name: "Circle",
3050 "class": "ct87ghk",
3051 propsAsIs: true,
3052 vars: {
3053 "ct87ghk-0": [_exp()]
3054 }
3055 });
3056
3057 var _exp2 = /*#__PURE__*/function _exp2() {
3058 return function (props) {
3059 return props.color;
3060 };
3061 };
3062
3063 var AnimatedCircle = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('circle')({
3064 name: "AnimatedCircle",
3065 "class": "avili0h",
3066 propsAsIs: true,
3067 vars: {
3068 "avili0h-0": [_exp2()]
3069 }
3070 });
3071 function UISpinner(_ref) {
3072 var _ref$size = _ref.size,
3073 size = _ref$size === void 0 ? 20 : _ref$size;
3074 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SpinnerOuter, {
3075 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SpinnerInner, {
3076 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
3077 height: size,
3078 width: size,
3079 viewBox: "0 0 50 50",
3080 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Circle, {
3081 color: _colors__WEBPACK_IMPORTED_MODULE_1__.CALYPSO_MEDIUM,
3082 cx: "25",
3083 cy: "25",
3084 r: "22.5"
3085 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(AnimatedCircle, {
3086 color: _colors__WEBPACK_IMPORTED_MODULE_1__.CALYPSO,
3087 cx: "25",
3088 cy: "25",
3089 r: "22.5"
3090 })]
3091 })
3092 })
3093 });
3094 }
3095
3096 __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");
3097
3098 /***/ }),
3099
3100 /***/ "./scripts/shared/UIComponents/colors.ts":
3101 /*!***********************************************!*\
3102 !*** ./scripts/shared/UIComponents/colors.ts ***!
3103 \***********************************************/
3104 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3105
3106 "use strict";
3107 __webpack_require__.r(__webpack_exports__);
3108 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3109 /* harmony export */ "CALYPSO": () => (/* binding */ CALYPSO),
3110 /* harmony export */ "CALYPSO_LIGHT": () => (/* binding */ CALYPSO_LIGHT),
3111 /* harmony export */ "CALYPSO_MEDIUM": () => (/* binding */ CALYPSO_MEDIUM),
3112 /* harmony export */ "HEFFALUMP": () => (/* binding */ HEFFALUMP),
3113 /* harmony export */ "LORAX": () => (/* binding */ LORAX),
3114 /* harmony export */ "MARIGOLD_LIGHT": () => (/* binding */ MARIGOLD_LIGHT),
3115 /* harmony export */ "MARIGOLD_MEDIUM": () => (/* binding */ MARIGOLD_MEDIUM),
3116 /* harmony export */ "OBSIDIAN": () => (/* binding */ OBSIDIAN),
3117 /* harmony export */ "OLAF": () => (/* binding */ OLAF)
3118 /* harmony export */ });
3119 var CALYPSO = '#00a4bd';
3120 var CALYPSO_MEDIUM = '#7fd1de';
3121 var CALYPSO_LIGHT = '#e5f5f8';
3122 var LORAX = '#ff7a59';
3123 var OLAF = '#ffffff';
3124 var HEFFALUMP = '#425b76';
3125 var MARIGOLD_LIGHT = '#fef8f0';
3126 var MARIGOLD_MEDIUM = '#fae0b5';
3127 var OBSIDIAN = '#33475b';
3128
3129 /***/ }),
3130
3131 /***/ "./scripts/shared/enums/connectionStatus.ts":
3132 /*!**************************************************!*\
3133 !*** ./scripts/shared/enums/connectionStatus.ts ***!
3134 \**************************************************/
3135 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3136
3137 "use strict";
3138 __webpack_require__.r(__webpack_exports__);
3139 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3140 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3141 /* harmony export */ });
3142 var ConnectionStatus = {
3143 Connected: 'Connected',
3144 NotConnected: 'NotConnected'
3145 };
3146 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ConnectionStatus);
3147
3148 /***/ }),
3149
3150 /***/ "./scripts/shared/enums/loadState.ts":
3151 /*!*******************************************!*\
3152 !*** ./scripts/shared/enums/loadState.ts ***!
3153 \*******************************************/
3154 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3155
3156 "use strict";
3157 __webpack_require__.r(__webpack_exports__);
3158 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3159 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3160 /* harmony export */ });
3161 var LoadState = {
3162 NotLoaded: 'NotLoaded',
3163 Loading: 'Loading',
3164 Loaded: 'Loaded',
3165 Idle: 'Idle',
3166 Failed: 'Failed'
3167 };
3168 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LoadState);
3169
3170 /***/ }),
3171
3172 /***/ "./scripts/utils/appUtils.ts":
3173 /*!***********************************!*\
3174 !*** ./scripts/utils/appUtils.ts ***!
3175 \***********************************/
3176 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3177
3178 "use strict";
3179 __webpack_require__.r(__webpack_exports__);
3180 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3181 /* harmony export */ "initApp": () => (/* binding */ initApp),
3182 /* harmony export */ "initAppOnReady": () => (/* binding */ initAppOnReady)
3183 /* harmony export */ });
3184 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
3185 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
3186 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lib/Raven */ "./scripts/lib/Raven.ts");
3187
3188
3189 function initApp(initFn) {
3190 (0,_lib_Raven__WEBPACK_IMPORTED_MODULE_1__.configureRaven)();
3191 _lib_Raven__WEBPACK_IMPORTED_MODULE_1__["default"].context(initFn);
3192 }
3193 function initAppOnReady(initFn) {
3194 function main() {
3195 jquery__WEBPACK_IMPORTED_MODULE_0___default()(initFn);
3196 }
3197
3198 initApp(main);
3199 }
3200
3201 /***/ }),
3202
3203 /***/ "./scripts/utils/backgroundAppUtils.ts":
3204 /*!*********************************************!*\
3205 !*** ./scripts/utils/backgroundAppUtils.ts ***!
3206 \*********************************************/
3207 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3208
3209 "use strict";
3210 __webpack_require__.r(__webpack_exports__);
3211 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3212 /* harmony export */ "getOrCreateBackgroundApp": () => (/* binding */ getOrCreateBackgroundApp),
3213 /* harmony export */ "initBackgroundApp": () => (/* binding */ initBackgroundApp)
3214 /* harmony export */ });
3215 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
3216 /* harmony import */ var _appUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./appUtils */ "./scripts/utils/appUtils.ts");
3217
3218
3219 function initBackgroundApp(initFn) {
3220 function main() {
3221 if (Array.isArray(initFn)) {
3222 initFn.forEach(function (callback) {
3223 return callback();
3224 });
3225 } else {
3226 initFn();
3227 }
3228 }
3229
3230 (0,_appUtils__WEBPACK_IMPORTED_MODULE_1__.initApp)(main);
3231 }
3232 var getOrCreateBackgroundApp = function getOrCreateBackgroundApp(refreshToken) {
3233 if (window.LeadinBackgroundApp) {
3234 return window.LeadinBackgroundApp;
3235 }
3236
3237 var _window = window,
3238 IntegratedAppEmbedder = _window.IntegratedAppEmbedder,
3239 IntegratedAppOptions = _window.IntegratedAppOptions;
3240 var options = new IntegratedAppOptions().setLocale(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.locale).setDeviceId(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.deviceId).setRefreshToken(refreshToken);
3241 var embedder = new IntegratedAppEmbedder('integrated-plugin-proxy', _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.portalId, _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.hubspotBaseUrl, function () {}).setOptions(options);
3242 embedder.attachTo(document.body, false);
3243 embedder.postStartAppMessage(); // lets the app know all all data has been passed to it
3244
3245 window.LeadinBackgroundApp = embedder;
3246 return window.LeadinBackgroundApp;
3247 };
3248
3249 /***/ }),
3250
3251 /***/ "./scripts/utils/withMetaData.ts":
3252 /*!***************************************!*\
3253 !*** ./scripts/utils/withMetaData.ts ***!
3254 \***************************************/
3255 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3256
3257 "use strict";
3258 __webpack_require__.r(__webpack_exports__);
3259 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3260 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
3261 /* harmony export */ "isFullSiteEditor": () => (/* binding */ isFullSiteEditor)
3262 /* harmony export */ });
3263 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
3264 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
3265 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; }
3266
3267 // from answer here: https://github.com/WordPress/gutenberg/issues/44477#issuecomment-1263026599
3268
3269 var isFullSiteEditor = function isFullSiteEditor() {
3270 return _wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select && !!(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select)('core/edit-site');
3271 };
3272 var applyWithSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.withSelect)(function (select, props) {
3273 return {
3274 metaValue: select('core/editor').getEditedPostAttribute('meta')[props.metaKey]
3275 };
3276 });
3277 var applyWithDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.withDispatch)(function (dispatch, props) {
3278 return {
3279 setMetaValue: function setMetaValue(value) {
3280 dispatch('core/editor').editPost({
3281 meta: _defineProperty({}, props.metaKey, value)
3282 });
3283 }
3284 };
3285 });
3286
3287 function apply(el) {
3288 return applyWithSelect(applyWithDispatch(el));
3289 }
3290
3291 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (apply);
3292
3293 /***/ }),
3294
3295 /***/ "./node_modules/is-what/dist/index.esm.js":
3296 /*!************************************************!*\
3297 !*** ./node_modules/is-what/dist/index.esm.js ***!
3298 \************************************************/
3299 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3300
3301 "use strict";
3302 __webpack_require__.r(__webpack_exports__);
3303 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3304 /* harmony export */ "getType": () => (/* binding */ getType),
3305 /* harmony export */ "isAnyObject": () => (/* binding */ isAnyObject),
3306 /* harmony export */ "isArray": () => (/* binding */ isArray),
3307 /* harmony export */ "isBlob": () => (/* binding */ isBlob),
3308 /* harmony export */ "isBoolean": () => (/* binding */ isBoolean),
3309 /* harmony export */ "isDate": () => (/* binding */ isDate),
3310 /* harmony export */ "isEmptyArray": () => (/* binding */ isEmptyArray),
3311 /* harmony export */ "isEmptyObject": () => (/* binding */ isEmptyObject),
3312 /* harmony export */ "isEmptyString": () => (/* binding */ isEmptyString),
3313 /* harmony export */ "isError": () => (/* binding */ isError),
3314 /* harmony export */ "isFile": () => (/* binding */ isFile),
3315 /* harmony export */ "isFullArray": () => (/* binding */ isFullArray),
3316 /* harmony export */ "isFullObject": () => (/* binding */ isFullObject),
3317 /* harmony export */ "isFullString": () => (/* binding */ isFullString),
3318 /* harmony export */ "isFunction": () => (/* binding */ isFunction),
3319 /* harmony export */ "isMap": () => (/* binding */ isMap),
3320 /* harmony export */ "isNaNValue": () => (/* binding */ isNaNValue),
3321 /* harmony export */ "isNull": () => (/* binding */ isNull),
3322 /* harmony export */ "isNullOrUndefined": () => (/* binding */ isNullOrUndefined),
3323 /* harmony export */ "isNumber": () => (/* binding */ isNumber),
3324 /* harmony export */ "isObject": () => (/* binding */ isObject),
3325 /* harmony export */ "isObjectLike": () => (/* binding */ isObjectLike),
3326 /* harmony export */ "isOneOf": () => (/* binding */ isOneOf),
3327 /* harmony export */ "isPlainObject": () => (/* binding */ isPlainObject),
3328 /* harmony export */ "isPrimitive": () => (/* binding */ isPrimitive),
3329 /* harmony export */ "isPromise": () => (/* binding */ isPromise),
3330 /* harmony export */ "isRegExp": () => (/* binding */ isRegExp),
3331 /* harmony export */ "isSet": () => (/* binding */ isSet),
3332 /* harmony export */ "isString": () => (/* binding */ isString),
3333 /* harmony export */ "isSymbol": () => (/* binding */ isSymbol),
3334 /* harmony export */ "isType": () => (/* binding */ isType),
3335 /* harmony export */ "isUndefined": () => (/* binding */ isUndefined),
3336 /* harmony export */ "isWeakMap": () => (/* binding */ isWeakMap),
3337 /* harmony export */ "isWeakSet": () => (/* binding */ isWeakSet)
3338 /* harmony export */ });
3339 /**
3340 * Returns the object type of the given payload
3341 *
3342 * @param {*} payload
3343 * @returns {string}
3344 */
3345 function getType(payload) {
3346 return Object.prototype.toString.call(payload).slice(8, -1);
3347 }
3348 /**
3349 * Returns whether the payload is undefined
3350 *
3351 * @param {*} payload
3352 * @returns {payload is undefined}
3353 */
3354 function isUndefined(payload) {
3355 return getType(payload) === 'Undefined';
3356 }
3357 /**
3358 * Returns whether the payload is null
3359 *
3360 * @param {*} payload
3361 * @returns {payload is null}
3362 */
3363 function isNull(payload) {
3364 return getType(payload) === 'Null';
3365 }
3366 /**
3367 * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
3368 *
3369 * @param {*} payload
3370 * @returns {payload is PlainObject}
3371 */
3372 function isPlainObject(payload) {
3373 if (getType(payload) !== 'Object')
3374 return false;
3375 return payload.constructor === Object && Object.getPrototypeOf(payload) === Object.prototype;
3376 }
3377 /**
3378 * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
3379 *
3380 * @param {*} payload
3381 * @returns {payload is PlainObject}
3382 */
3383 function isObject(payload) {
3384 return isPlainObject(payload);
3385 }
3386 /**
3387 * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
3388 *
3389 * @param {*} payload
3390 * @returns {payload is { [K in any]: never }}
3391 */
3392 function isEmptyObject(payload) {
3393 return isPlainObject(payload) && Object.keys(payload).length === 0;
3394 }
3395 /**
3396 * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
3397 *
3398 * @param {*} payload
3399 * @returns {payload is PlainObject}
3400 */
3401 function isFullObject(payload) {
3402 return isPlainObject(payload) && Object.keys(payload).length > 0;
3403 }
3404 /**
3405 * Returns whether the payload is an any kind of object (including special classes or objects with different prototypes)
3406 *
3407 * @param {*} payload
3408 * @returns {payload is PlainObject}
3409 */
3410 function isAnyObject(payload) {
3411 return getType(payload) === 'Object';
3412 }
3413 /**
3414 * Returns whether the payload is an object like a type passed in < >
3415 *
3416 * Usage: isObjectLike<{id: any}>(payload) // will make sure it's an object and has an `id` prop.
3417 *
3418 * @template T this must be passed in < >
3419 * @param {*} payload
3420 * @returns {payload is T}
3421 */
3422 function isObjectLike(payload) {
3423 return isAnyObject(payload);
3424 }
3425 /**
3426 * Returns whether the payload is a function (regular or async)
3427 *
3428 * @param {*} payload
3429 * @returns {payload is AnyFunction}
3430 */
3431 function isFunction(payload) {
3432 return typeof payload === 'function';
3433 }
3434 /**
3435 * Returns whether the payload is an array
3436 *
3437 * @param {any} payload
3438 * @returns {payload is any[]}
3439 */
3440 function isArray(payload) {
3441 return getType(payload) === 'Array';
3442 }
3443 /**
3444 * Returns whether the payload is a an array with at least 1 item
3445 *
3446 * @param {*} payload
3447 * @returns {payload is any[]}
3448 */
3449 function isFullArray(payload) {
3450 return isArray(payload) && payload.length > 0;
3451 }
3452 /**
3453 * Returns whether the payload is a an empty array
3454 *
3455 * @param {*} payload
3456 * @returns {payload is []}
3457 */
3458 function isEmptyArray(payload) {
3459 return isArray(payload) && payload.length === 0;
3460 }
3461 /**
3462 * Returns whether the payload is a string
3463 *
3464 * @param {*} payload
3465 * @returns {payload is string}
3466 */
3467 function isString(payload) {
3468 return getType(payload) === 'String';
3469 }
3470 /**
3471 * Returns whether the payload is a string, BUT returns false for ''
3472 *
3473 * @param {*} payload
3474 * @returns {payload is string}
3475 */
3476 function isFullString(payload) {
3477 return isString(payload) && payload !== '';
3478 }
3479 /**
3480 * Returns whether the payload is ''
3481 *
3482 * @param {*} payload
3483 * @returns {payload is string}
3484 */
3485 function isEmptyString(payload) {
3486 return payload === '';
3487 }
3488 /**
3489 * Returns whether the payload is a number (but not NaN)
3490 *
3491 * This will return `false` for `NaN`!!
3492 *
3493 * @param {*} payload
3494 * @returns {payload is number}
3495 */
3496 function isNumber(payload) {
3497 return getType(payload) === 'Number' && !isNaN(payload);
3498 }
3499 /**
3500 * Returns whether the payload is a boolean
3501 *
3502 * @param {*} payload
3503 * @returns {payload is boolean}
3504 */
3505 function isBoolean(payload) {
3506 return getType(payload) === 'Boolean';
3507 }
3508 /**
3509 * Returns whether the payload is a regular expression (RegExp)
3510 *
3511 * @param {*} payload
3512 * @returns {payload is RegExp}
3513 */
3514 function isRegExp(payload) {
3515 return getType(payload) === 'RegExp';
3516 }
3517 /**
3518 * Returns whether the payload is a Map
3519 *
3520 * @param {*} payload
3521 * @returns {payload is Map<any, any>}
3522 */
3523 function isMap(payload) {
3524 return getType(payload) === 'Map';
3525 }
3526 /**
3527 * Returns whether the payload is a WeakMap
3528 *
3529 * @param {*} payload
3530 * @returns {payload is WeakMap<any, any>}
3531 */
3532 function isWeakMap(payload) {
3533 return getType(payload) === 'WeakMap';
3534 }
3535 /**
3536 * Returns whether the payload is a Set
3537 *
3538 * @param {*} payload
3539 * @returns {payload is Set<any>}
3540 */
3541 function isSet(payload) {
3542 return getType(payload) === 'Set';
3543 }
3544 /**
3545 * Returns whether the payload is a WeakSet
3546 *
3547 * @param {*} payload
3548 * @returns {payload is WeakSet<any>}
3549 */
3550 function isWeakSet(payload) {
3551 return getType(payload) === 'WeakSet';
3552 }
3553 /**
3554 * Returns whether the payload is a Symbol
3555 *
3556 * @param {*} payload
3557 * @returns {payload is symbol}
3558 */
3559 function isSymbol(payload) {
3560 return getType(payload) === 'Symbol';
3561 }
3562 /**
3563 * Returns whether the payload is a Date, and that the date is valid
3564 *
3565 * @param {*} payload
3566 * @returns {payload is Date}
3567 */
3568 function isDate(payload) {
3569 return getType(payload) === 'Date' && !isNaN(payload);
3570 }
3571 /**
3572 * Returns whether the payload is a Blob
3573 *
3574 * @param {*} payload
3575 * @returns {payload is Blob}
3576 */
3577 function isBlob(payload) {
3578 return getType(payload) === 'Blob';
3579 }
3580 /**
3581 * Returns whether the payload is a File
3582 *
3583 * @param {*} payload
3584 * @returns {payload is File}
3585 */
3586 function isFile(payload) {
3587 return getType(payload) === 'File';
3588 }
3589 /**
3590 * Returns whether the payload is a Promise
3591 *
3592 * @param {*} payload
3593 * @returns {payload is Promise<any>}
3594 */
3595 function isPromise(payload) {
3596 return getType(payload) === 'Promise';
3597 }
3598 /**
3599 * Returns whether the payload is an Error
3600 *
3601 * @param {*} payload
3602 * @returns {payload is Error}
3603 */
3604 function isError(payload) {
3605 return getType(payload) === 'Error';
3606 }
3607 /**
3608 * Returns whether the payload is literally the value `NaN` (it's `NaN` and also a `number`)
3609 *
3610 * @param {*} payload
3611 * @returns {payload is typeof NaN}
3612 */
3613 function isNaNValue(payload) {
3614 return getType(payload) === 'Number' && isNaN(payload);
3615 }
3616 /**
3617 * Returns whether the payload is a primitive type (eg. Boolean | Null | Undefined | Number | String | Symbol)
3618 *
3619 * @param {*} payload
3620 * @returns {(payload is boolean | null | undefined | number | string | symbol)}
3621 */
3622 function isPrimitive(payload) {
3623 return (isBoolean(payload) ||
3624 isNull(payload) ||
3625 isUndefined(payload) ||
3626 isNumber(payload) ||
3627 isString(payload) ||
3628 isSymbol(payload));
3629 }
3630 /**
3631 * Returns true whether the payload is null or undefined
3632 *
3633 * @param {*} payload
3634 * @returns {(payload is null | undefined)}
3635 */
3636 var isNullOrUndefined = isOneOf(isNull, isUndefined);
3637 function isOneOf(a, b, c, d, e) {
3638 return function (value) {
3639 return a(value) || b(value) || (!!c && c(value)) || (!!d && d(value)) || (!!e && e(value));
3640 };
3641 }
3642 /**
3643 * Does a generic check to check that the given payload is of a given type.
3644 * In cases like Number, it will return true for NaN as NaN is a Number (thanks javascript!);
3645 * It will, however, differentiate between object and null
3646 *
3647 * @template T
3648 * @param {*} payload
3649 * @param {T} type
3650 * @throws {TypeError} Will throw type error if type is an invalid type
3651 * @returns {payload is T}
3652 */
3653 function isType(payload, type) {
3654 if (!(type instanceof Function)) {
3655 throw new TypeError('Type must be a function');
3656 }
3657 if (!Object.prototype.hasOwnProperty.call(type, 'prototype')) {
3658 throw new TypeError('Type is not a class');
3659 }
3660 // Classes usually have names (as functions usually have names)
3661 var name = type.name;
3662 return getType(payload) === name || Boolean(payload && payload.constructor === type);
3663 }
3664
3665
3666
3667
3668 /***/ }),
3669
3670 /***/ "./node_modules/lodash/_Symbol.js":
3671 /*!****************************************!*\
3672 !*** ./node_modules/lodash/_Symbol.js ***!
3673 \****************************************/
3674 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3675
3676 var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
3677
3678 /** Built-in value references. */
3679 var Symbol = root.Symbol;
3680
3681 module.exports = Symbol;
3682
3683
3684 /***/ }),
3685
3686 /***/ "./node_modules/lodash/_baseGetTag.js":
3687 /*!********************************************!*\
3688 !*** ./node_modules/lodash/_baseGetTag.js ***!
3689 \********************************************/
3690 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3691
3692 var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"),
3693 getRawTag = __webpack_require__(/*! ./_getRawTag */ "./node_modules/lodash/_getRawTag.js"),
3694 objectToString = __webpack_require__(/*! ./_objectToString */ "./node_modules/lodash/_objectToString.js");
3695
3696 /** `Object#toString` result references. */
3697 var nullTag = '[object Null]',
3698 undefinedTag = '[object Undefined]';
3699
3700 /** Built-in value references. */
3701 var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
3702
3703 /**
3704 * The base implementation of `getTag` without fallbacks for buggy environments.
3705 *
3706 * @private
3707 * @param {*} value The value to query.
3708 * @returns {string} Returns the `toStringTag`.
3709 */
3710 function baseGetTag(value) {
3711 if (value == null) {
3712 return value === undefined ? undefinedTag : nullTag;
3713 }
3714 return (symToStringTag && symToStringTag in Object(value))
3715 ? getRawTag(value)
3716 : objectToString(value);
3717 }
3718
3719 module.exports = baseGetTag;
3720
3721
3722 /***/ }),
3723
3724 /***/ "./node_modules/lodash/_baseTrim.js":
3725 /*!******************************************!*\
3726 !*** ./node_modules/lodash/_baseTrim.js ***!
3727 \******************************************/
3728 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3729
3730 var trimmedEndIndex = __webpack_require__(/*! ./_trimmedEndIndex */ "./node_modules/lodash/_trimmedEndIndex.js");
3731
3732 /** Used to match leading whitespace. */
3733 var reTrimStart = /^\s+/;
3734
3735 /**
3736 * The base implementation of `_.trim`.
3737 *
3738 * @private
3739 * @param {string} string The string to trim.
3740 * @returns {string} Returns the trimmed string.
3741 */
3742 function baseTrim(string) {
3743 return string
3744 ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
3745 : string;
3746 }
3747
3748 module.exports = baseTrim;
3749
3750
3751 /***/ }),
3752
3753 /***/ "./node_modules/lodash/_freeGlobal.js":
3754 /*!********************************************!*\
3755 !*** ./node_modules/lodash/_freeGlobal.js ***!
3756 \********************************************/
3757 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3758
3759 /** Detect free variable `global` from Node.js. */
3760 var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
3761
3762 module.exports = freeGlobal;
3763
3764
3765 /***/ }),
3766
3767 /***/ "./node_modules/lodash/_getRawTag.js":
3768 /*!*******************************************!*\
3769 !*** ./node_modules/lodash/_getRawTag.js ***!
3770 \*******************************************/
3771 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3772
3773 var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js");
3774
3775 /** Used for built-in method references. */
3776 var objectProto = Object.prototype;
3777
3778 /** Used to check objects for own properties. */
3779 var hasOwnProperty = objectProto.hasOwnProperty;
3780
3781 /**
3782 * Used to resolve the
3783 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3784 * of values.
3785 */
3786 var nativeObjectToString = objectProto.toString;
3787
3788 /** Built-in value references. */
3789 var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
3790
3791 /**
3792 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
3793 *
3794 * @private
3795 * @param {*} value The value to query.
3796 * @returns {string} Returns the raw `toStringTag`.
3797 */
3798 function getRawTag(value) {
3799 var isOwn = hasOwnProperty.call(value, symToStringTag),
3800 tag = value[symToStringTag];
3801
3802 try {
3803 value[symToStringTag] = undefined;
3804 var unmasked = true;
3805 } catch (e) {}
3806
3807 var result = nativeObjectToString.call(value);
3808 if (unmasked) {
3809 if (isOwn) {
3810 value[symToStringTag] = tag;
3811 } else {
3812 delete value[symToStringTag];
3813 }
3814 }
3815 return result;
3816 }
3817
3818 module.exports = getRawTag;
3819
3820
3821 /***/ }),
3822
3823 /***/ "./node_modules/lodash/_objectToString.js":
3824 /*!************************************************!*\
3825 !*** ./node_modules/lodash/_objectToString.js ***!
3826 \************************************************/
3827 /***/ ((module) => {
3828
3829 /** Used for built-in method references. */
3830 var objectProto = Object.prototype;
3831
3832 /**
3833 * Used to resolve the
3834 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3835 * of values.
3836 */
3837 var nativeObjectToString = objectProto.toString;
3838
3839 /**
3840 * Converts `value` to a string using `Object.prototype.toString`.
3841 *
3842 * @private
3843 * @param {*} value The value to convert.
3844 * @returns {string} Returns the converted string.
3845 */
3846 function objectToString(value) {
3847 return nativeObjectToString.call(value);
3848 }
3849
3850 module.exports = objectToString;
3851
3852
3853 /***/ }),
3854
3855 /***/ "./node_modules/lodash/_root.js":
3856 /*!**************************************!*\
3857 !*** ./node_modules/lodash/_root.js ***!
3858 \**************************************/
3859 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3860
3861 var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js");
3862
3863 /** Detect free variable `self`. */
3864 var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
3865
3866 /** Used as a reference to the global object. */
3867 var root = freeGlobal || freeSelf || Function('return this')();
3868
3869 module.exports = root;
3870
3871
3872 /***/ }),
3873
3874 /***/ "./node_modules/lodash/_trimmedEndIndex.js":
3875 /*!*************************************************!*\
3876 !*** ./node_modules/lodash/_trimmedEndIndex.js ***!
3877 \*************************************************/
3878 /***/ ((module) => {
3879
3880 /** Used to match a single whitespace character. */
3881 var reWhitespace = /\s/;
3882
3883 /**
3884 * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
3885 * character of `string`.
3886 *
3887 * @private
3888 * @param {string} string The string to inspect.
3889 * @returns {number} Returns the index of the last non-whitespace character.
3890 */
3891 function trimmedEndIndex(string) {
3892 var index = string.length;
3893
3894 while (index-- && reWhitespace.test(string.charAt(index))) {}
3895 return index;
3896 }
3897
3898 module.exports = trimmedEndIndex;
3899
3900
3901 /***/ }),
3902
3903 /***/ "./node_modules/lodash/debounce.js":
3904 /*!*****************************************!*\
3905 !*** ./node_modules/lodash/debounce.js ***!
3906 \*****************************************/
3907 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3908
3909 var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
3910 now = __webpack_require__(/*! ./now */ "./node_modules/lodash/now.js"),
3911 toNumber = __webpack_require__(/*! ./toNumber */ "./node_modules/lodash/toNumber.js");
3912
3913 /** Error message constants. */
3914 var FUNC_ERROR_TEXT = 'Expected a function';
3915
3916 /* Built-in method references for those with the same name as other `lodash` methods. */
3917 var nativeMax = Math.max,
3918 nativeMin = Math.min;
3919
3920 /**
3921 * Creates a debounced function that delays invoking `func` until after `wait`
3922 * milliseconds have elapsed since the last time the debounced function was
3923 * invoked. The debounced function comes with a `cancel` method to cancel
3924 * delayed `func` invocations and a `flush` method to immediately invoke them.
3925 * Provide `options` to indicate whether `func` should be invoked on the
3926 * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
3927 * with the last arguments provided to the debounced function. Subsequent
3928 * calls to the debounced function return the result of the last `func`
3929 * invocation.
3930 *
3931 * **Note:** If `leading` and `trailing` options are `true`, `func` is
3932 * invoked on the trailing edge of the timeout only if the debounced function
3933 * is invoked more than once during the `wait` timeout.
3934 *
3935 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
3936 * until to the next tick, similar to `setTimeout` with a timeout of `0`.
3937 *
3938 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
3939 * for details over the differences between `_.debounce` and `_.throttle`.
3940 *
3941 * @static
3942 * @memberOf _
3943 * @since 0.1.0
3944 * @category Function
3945 * @param {Function} func The function to debounce.
3946 * @param {number} [wait=0] The number of milliseconds to delay.
3947 * @param {Object} [options={}] The options object.
3948 * @param {boolean} [options.leading=false]
3949 * Specify invoking on the leading edge of the timeout.
3950 * @param {number} [options.maxWait]
3951 * The maximum time `func` is allowed to be delayed before it's invoked.
3952 * @param {boolean} [options.trailing=true]
3953 * Specify invoking on the trailing edge of the timeout.
3954 * @returns {Function} Returns the new debounced function.
3955 * @example
3956 *
3957 * // Avoid costly calculations while the window size is in flux.
3958 * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
3959 *
3960 * // Invoke `sendMail` when clicked, debouncing subsequent calls.
3961 * jQuery(element).on('click', _.debounce(sendMail, 300, {
3962 * 'leading': true,
3963 * 'trailing': false
3964 * }));
3965 *
3966 * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
3967 * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
3968 * var source = new EventSource('/stream');
3969 * jQuery(source).on('message', debounced);
3970 *
3971 * // Cancel the trailing debounced invocation.
3972 * jQuery(window).on('popstate', debounced.cancel);
3973 */
3974 function debounce(func, wait, options) {
3975 var lastArgs,
3976 lastThis,
3977 maxWait,
3978 result,
3979 timerId,
3980 lastCallTime,
3981 lastInvokeTime = 0,
3982 leading = false,
3983 maxing = false,
3984 trailing = true;
3985
3986 if (typeof func != 'function') {
3987 throw new TypeError(FUNC_ERROR_TEXT);
3988 }
3989 wait = toNumber(wait) || 0;
3990 if (isObject(options)) {
3991 leading = !!options.leading;
3992 maxing = 'maxWait' in options;
3993 maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
3994 trailing = 'trailing' in options ? !!options.trailing : trailing;
3995 }
3996
3997 function invokeFunc(time) {
3998 var args = lastArgs,
3999 thisArg = lastThis;
4000
4001 lastArgs = lastThis = undefined;
4002 lastInvokeTime = time;
4003 result = func.apply(thisArg, args);
4004 return result;
4005 }
4006
4007 function leadingEdge(time) {
4008 // Reset any `maxWait` timer.
4009 lastInvokeTime = time;
4010 // Start the timer for the trailing edge.
4011 timerId = setTimeout(timerExpired, wait);
4012 // Invoke the leading edge.
4013 return leading ? invokeFunc(time) : result;
4014 }
4015
4016 function remainingWait(time) {
4017 var timeSinceLastCall = time - lastCallTime,
4018 timeSinceLastInvoke = time - lastInvokeTime,
4019 timeWaiting = wait - timeSinceLastCall;
4020
4021 return maxing
4022 ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
4023 : timeWaiting;
4024 }
4025
4026 function shouldInvoke(time) {
4027 var timeSinceLastCall = time - lastCallTime,
4028 timeSinceLastInvoke = time - lastInvokeTime;
4029
4030 // Either this is the first call, activity has stopped and we're at the
4031 // trailing edge, the system time has gone backwards and we're treating
4032 // it as the trailing edge, or we've hit the `maxWait` limit.
4033 return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
4034 (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
4035 }
4036
4037 function timerExpired() {
4038 var time = now();
4039 if (shouldInvoke(time)) {
4040 return trailingEdge(time);
4041 }
4042 // Restart the timer.
4043 timerId = setTimeout(timerExpired, remainingWait(time));
4044 }
4045
4046 function trailingEdge(time) {
4047 timerId = undefined;
4048
4049 // Only invoke if we have `lastArgs` which means `func` has been
4050 // debounced at least once.
4051 if (trailing && lastArgs) {
4052 return invokeFunc(time);
4053 }
4054 lastArgs = lastThis = undefined;
4055 return result;
4056 }
4057
4058 function cancel() {
4059 if (timerId !== undefined) {
4060 clearTimeout(timerId);
4061 }
4062 lastInvokeTime = 0;
4063 lastArgs = lastCallTime = lastThis = timerId = undefined;
4064 }
4065
4066 function flush() {
4067 return timerId === undefined ? result : trailingEdge(now());
4068 }
4069
4070 function debounced() {
4071 var time = now(),
4072 isInvoking = shouldInvoke(time);
4073
4074 lastArgs = arguments;
4075 lastThis = this;
4076 lastCallTime = time;
4077
4078 if (isInvoking) {
4079 if (timerId === undefined) {
4080 return leadingEdge(lastCallTime);
4081 }
4082 if (maxing) {
4083 // Handle invocations in a tight loop.
4084 clearTimeout(timerId);
4085 timerId = setTimeout(timerExpired, wait);
4086 return invokeFunc(lastCallTime);
4087 }
4088 }
4089 if (timerId === undefined) {
4090 timerId = setTimeout(timerExpired, wait);
4091 }
4092 return result;
4093 }
4094 debounced.cancel = cancel;
4095 debounced.flush = flush;
4096 return debounced;
4097 }
4098
4099 module.exports = debounce;
4100
4101
4102 /***/ }),
4103
4104 /***/ "./node_modules/lodash/isObject.js":
4105 /*!*****************************************!*\
4106 !*** ./node_modules/lodash/isObject.js ***!
4107 \*****************************************/
4108 /***/ ((module) => {
4109
4110 /**
4111 * Checks if `value` is the
4112 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
4113 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
4114 *
4115 * @static
4116 * @memberOf _
4117 * @since 0.1.0
4118 * @category Lang
4119 * @param {*} value The value to check.
4120 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
4121 * @example
4122 *
4123 * _.isObject({});
4124 * // => true
4125 *
4126 * _.isObject([1, 2, 3]);
4127 * // => true
4128 *
4129 * _.isObject(_.noop);
4130 * // => true
4131 *
4132 * _.isObject(null);
4133 * // => false
4134 */
4135 function isObject(value) {
4136 var type = typeof value;
4137 return value != null && (type == 'object' || type == 'function');
4138 }
4139
4140 module.exports = isObject;
4141
4142
4143 /***/ }),
4144
4145 /***/ "./node_modules/lodash/isObjectLike.js":
4146 /*!*********************************************!*\
4147 !*** ./node_modules/lodash/isObjectLike.js ***!
4148 \*********************************************/
4149 /***/ ((module) => {
4150
4151 /**
4152 * Checks if `value` is object-like. A value is object-like if it's not `null`
4153 * and has a `typeof` result of "object".
4154 *
4155 * @static
4156 * @memberOf _
4157 * @since 4.0.0
4158 * @category Lang
4159 * @param {*} value The value to check.
4160 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
4161 * @example
4162 *
4163 * _.isObjectLike({});
4164 * // => true
4165 *
4166 * _.isObjectLike([1, 2, 3]);
4167 * // => true
4168 *
4169 * _.isObjectLike(_.noop);
4170 * // => false
4171 *
4172 * _.isObjectLike(null);
4173 * // => false
4174 */
4175 function isObjectLike(value) {
4176 return value != null && typeof value == 'object';
4177 }
4178
4179 module.exports = isObjectLike;
4180
4181
4182 /***/ }),
4183
4184 /***/ "./node_modules/lodash/isSymbol.js":
4185 /*!*****************************************!*\
4186 !*** ./node_modules/lodash/isSymbol.js ***!
4187 \*****************************************/
4188 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4189
4190 var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
4191 isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
4192
4193 /** `Object#toString` result references. */
4194 var symbolTag = '[object Symbol]';
4195
4196 /**
4197 * Checks if `value` is classified as a `Symbol` primitive or object.
4198 *
4199 * @static
4200 * @memberOf _
4201 * @since 4.0.0
4202 * @category Lang
4203 * @param {*} value The value to check.
4204 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
4205 * @example
4206 *
4207 * _.isSymbol(Symbol.iterator);
4208 * // => true
4209 *
4210 * _.isSymbol('abc');
4211 * // => false
4212 */
4213 function isSymbol(value) {
4214 return typeof value == 'symbol' ||
4215 (isObjectLike(value) && baseGetTag(value) == symbolTag);
4216 }
4217
4218 module.exports = isSymbol;
4219
4220
4221 /***/ }),
4222
4223 /***/ "./node_modules/lodash/now.js":
4224 /*!************************************!*\
4225 !*** ./node_modules/lodash/now.js ***!
4226 \************************************/
4227 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4228
4229 var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
4230
4231 /**
4232 * Gets the timestamp of the number of milliseconds that have elapsed since
4233 * the Unix epoch (1 January 1970 00:00:00 UTC).
4234 *
4235 * @static
4236 * @memberOf _
4237 * @since 2.4.0
4238 * @category Date
4239 * @returns {number} Returns the timestamp.
4240 * @example
4241 *
4242 * _.defer(function(stamp) {
4243 * console.log(_.now() - stamp);
4244 * }, _.now());
4245 * // => Logs the number of milliseconds it took for the deferred invocation.
4246 */
4247 var now = function() {
4248 return root.Date.now();
4249 };
4250
4251 module.exports = now;
4252
4253
4254 /***/ }),
4255
4256 /***/ "./node_modules/lodash/toNumber.js":
4257 /*!*****************************************!*\
4258 !*** ./node_modules/lodash/toNumber.js ***!
4259 \*****************************************/
4260 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4261
4262 var baseTrim = __webpack_require__(/*! ./_baseTrim */ "./node_modules/lodash/_baseTrim.js"),
4263 isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
4264 isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js");
4265
4266 /** Used as references for various `Number` constants. */
4267 var NAN = 0 / 0;
4268
4269 /** Used to detect bad signed hexadecimal string values. */
4270 var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
4271
4272 /** Used to detect binary string values. */
4273 var reIsBinary = /^0b[01]+$/i;
4274
4275 /** Used to detect octal string values. */
4276 var reIsOctal = /^0o[0-7]+$/i;
4277
4278 /** Built-in method references without a dependency on `root`. */
4279 var freeParseInt = parseInt;
4280
4281 /**
4282 * Converts `value` to a number.
4283 *
4284 * @static
4285 * @memberOf _
4286 * @since 4.0.0
4287 * @category Lang
4288 * @param {*} value The value to process.
4289 * @returns {number} Returns the number.
4290 * @example
4291 *
4292 * _.toNumber(3.2);
4293 * // => 3.2
4294 *
4295 * _.toNumber(Number.MIN_VALUE);
4296 * // => 5e-324
4297 *
4298 * _.toNumber(Infinity);
4299 * // => Infinity
4300 *
4301 * _.toNumber('3.2');
4302 * // => 3.2
4303 */
4304 function toNumber(value) {
4305 if (typeof value == 'number') {
4306 return value;
4307 }
4308 if (isSymbol(value)) {
4309 return NAN;
4310 }
4311 if (isObject(value)) {
4312 var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
4313 value = isObject(other) ? (other + '') : other;
4314 }
4315 if (typeof value != 'string') {
4316 return value === 0 ? value : +value;
4317 }
4318 value = baseTrim(value);
4319 var isBinary = reIsBinary.test(value);
4320 return (isBinary || reIsOctal.test(value))
4321 ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
4322 : (reIsBadHex.test(value) ? NAN : +value);
4323 }
4324
4325 module.exports = toNumber;
4326
4327
4328 /***/ }),
4329
4330 /***/ "./node_modules/memoize-one/dist/memoize-one.esm.js":
4331 /*!**********************************************************!*\
4332 !*** ./node_modules/memoize-one/dist/memoize-one.esm.js ***!
4333 \**********************************************************/
4334 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4335
4336 "use strict";
4337 __webpack_require__.r(__webpack_exports__);
4338 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4339 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
4340 /* harmony export */ });
4341 var safeIsNaN = Number.isNaN ||
4342 function ponyfill(value) {
4343 return typeof value === 'number' && value !== value;
4344 };
4345 function isEqual(first, second) {
4346 if (first === second) {
4347 return true;
4348 }
4349 if (safeIsNaN(first) && safeIsNaN(second)) {
4350 return true;
4351 }
4352 return false;
4353 }
4354 function areInputsEqual(newInputs, lastInputs) {
4355 if (newInputs.length !== lastInputs.length) {
4356 return false;
4357 }
4358 for (var i = 0; i < newInputs.length; i++) {
4359 if (!isEqual(newInputs[i], lastInputs[i])) {
4360 return false;
4361 }
4362 }
4363 return true;
4364 }
4365
4366 function memoizeOne(resultFn, isEqual) {
4367 if (isEqual === void 0) { isEqual = areInputsEqual; }
4368 var lastThis;
4369 var lastArgs = [];
4370 var lastResult;
4371 var calledOnce = false;
4372 function memoized() {
4373 var newArgs = [];
4374 for (var _i = 0; _i < arguments.length; _i++) {
4375 newArgs[_i] = arguments[_i];
4376 }
4377 if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {
4378 return lastResult;
4379 }
4380 lastResult = resultFn.apply(this, newArgs);
4381 calledOnce = true;
4382 lastThis = this;
4383 lastArgs = newArgs;
4384 return lastResult;
4385 }
4386 return memoized;
4387 }
4388
4389 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoizeOne);
4390
4391
4392 /***/ }),
4393
4394 /***/ "./node_modules/merge-anything/dist/index.esm.js":
4395 /*!*******************************************************!*\
4396 !*** ./node_modules/merge-anything/dist/index.esm.js ***!
4397 \*******************************************************/
4398 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4399
4400 "use strict";
4401 __webpack_require__.r(__webpack_exports__);
4402 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4403 /* harmony export */ "concatArrays": () => (/* binding */ concatArrays),
4404 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
4405 /* harmony export */ "merge": () => (/* binding */ merge)
4406 /* harmony export */ });
4407 /* harmony import */ var is_what__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-what */ "./node_modules/is-what/dist/index.esm.js");
4408
4409
4410 /*! *****************************************************************************
4411 Copyright (c) Microsoft Corporation. All rights reserved.
4412 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4413 this file except in compliance with the License. You may obtain a copy of the
4414 License at http://www.apache.org/licenses/LICENSE-2.0
4415
4416 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
4417 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
4418 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
4419 MERCHANTABLITY OR NON-INFRINGEMENT.
4420
4421 See the Apache Version 2.0 License for specific language governing permissions
4422 and limitations under the License.
4423 ***************************************************************************** */
4424
4425 function __spreadArrays() {
4426 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
4427 for (var r = Array(s), k = 0, i = 0; i < il; i++)
4428 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
4429 r[k] = a[j];
4430 return r;
4431 }
4432
4433 function assignProp(carry, key, newVal, originalObject) {
4434 var propType = originalObject.propertyIsEnumerable(key)
4435 ? 'enumerable'
4436 : 'nonenumerable';
4437 if (propType === 'enumerable')
4438 carry[key] = newVal;
4439 if (propType === 'nonenumerable') {
4440 Object.defineProperty(carry, key, {
4441 value: newVal,
4442 enumerable: false,
4443 writable: true,
4444 configurable: true
4445 });
4446 }
4447 }
4448 function mergeRecursively(origin, newComer, extensions) {
4449 // work directly on newComer if its not an object
4450 if (!(0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(newComer)) {
4451 // extend merge rules
4452 if (extensions && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(extensions)) {
4453 extensions.forEach(function (extend) {
4454 newComer = extend(origin, newComer);
4455 });
4456 }
4457 return newComer;
4458 }
4459 // define newObject to merge all values upon
4460 var newObject = {};
4461 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin)) {
4462 var props_1 = Object.getOwnPropertyNames(origin);
4463 var symbols_1 = Object.getOwnPropertySymbols(origin);
4464 newObject = __spreadArrays(props_1, symbols_1).reduce(function (carry, key) {
4465 // @ts-ignore
4466 var targetVal = origin[key];
4467 if ((!(0,is_what__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) && !Object.getOwnPropertyNames(newComer).includes(key)) ||
4468 ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) && !Object.getOwnPropertySymbols(newComer).includes(key))) {
4469 assignProp(carry, key, targetVal, origin);
4470 }
4471 return carry;
4472 }, {});
4473 }
4474 var props = Object.getOwnPropertyNames(newComer);
4475 var symbols = Object.getOwnPropertySymbols(newComer);
4476 var result = __spreadArrays(props, symbols).reduce(function (carry, key) {
4477 // re-define the origin and newComer as targetVal and newVal
4478 var newVal = newComer[key];
4479 var targetVal = ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin))
4480 // @ts-ignore
4481 ? origin[key]
4482 : undefined;
4483 // extend merge rules
4484 if (extensions && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(extensions)) {
4485 extensions.forEach(function (extend) {
4486 newVal = extend(targetVal, newVal);
4487 });
4488 }
4489 // When newVal is an object do the merge recursively
4490 if (targetVal !== undefined && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(newVal)) {
4491 newVal = mergeRecursively(targetVal, newVal, extensions);
4492 }
4493 assignProp(carry, key, newVal, newComer);
4494 return carry;
4495 }, newObject);
4496 return result;
4497 }
4498 /**
4499 * Merge anything recursively.
4500 * Objects get merged, special objects (classes etc.) are re-assigned "as is".
4501 * Basic types overwrite objects or other basic types.
4502 *
4503 * @param {(IConfig | any)} origin
4504 * @param {...any[]} newComers
4505 * @returns the result
4506 */
4507 function merge(origin) {
4508 var newComers = [];
4509 for (var _i = 1; _i < arguments.length; _i++) {
4510 newComers[_i - 1] = arguments[_i];
4511 }
4512 var extensions = null;
4513 var base = origin;
4514 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin) && origin.extensions && Object.keys(origin).length === 1) {
4515 base = {};
4516 extensions = origin.extensions;
4517 }
4518 return newComers.reduce(function (result, newComer) {
4519 return mergeRecursively(result, newComer, extensions);
4520 }, base);
4521 }
4522
4523 function concatArrays(originVal, newVal) {
4524 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(originVal) && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(newVal)) {
4525 // concat logic
4526 return originVal.concat(newVal);
4527 }
4528 return newVal; // always return newVal as fallback!!
4529 }
4530
4531 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (merge);
4532
4533
4534
4535 /***/ }),
4536
4537 /***/ "./scripts/gutenberg/UIComponents/UIImage.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/gutenberg/UIComponents/UIImage.ts":
4538 /*!****************************************************************************************************************************************************************************************!*\
4539 !*** ./scripts/gutenberg/UIComponents/UIImage.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/gutenberg/UIComponents/UIImage.ts ***!
4540 \****************************************************************************************************************************************************************************************/
4541 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4542
4543 "use strict";
4544 __webpack_require__.r(__webpack_exports__);
4545 // extracted by mini-css-extract-plugin
4546
4547
4548 /***/ }),
4549
4550 /***/ "./scripts/shared/Common/AsyncSelect.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/AsyncSelect.tsx":
4551 /*!*******************************************************************************************************************************************************************************!*\
4552 !*** ./scripts/shared/Common/AsyncSelect.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/AsyncSelect.tsx ***!
4553 \*******************************************************************************************************************************************************************************/
4554 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4555
4556 "use strict";
4557 __webpack_require__.r(__webpack_exports__);
4558 // extracted by mini-css-extract-plugin
4559
4560
4561 /***/ }),
4562
4563 /***/ "./scripts/shared/Common/HubspotWrapper.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/HubspotWrapper.ts":
4564 /*!************************************************************************************************************************************************************************************!*\
4565 !*** ./scripts/shared/Common/HubspotWrapper.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/HubspotWrapper.ts ***!
4566 \************************************************************************************************************************************************************************************/
4567 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4568
4569 "use strict";
4570 __webpack_require__.r(__webpack_exports__);
4571 // extracted by mini-css-extract-plugin
4572
4573
4574 /***/ }),
4575
4576 /***/ "./scripts/shared/UIComponents/UIAlert.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIAlert.tsx":
4577 /*!***********************************************************************************************************************************************************************************!*\
4578 !*** ./scripts/shared/UIComponents/UIAlert.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIAlert.tsx ***!
4579 \***********************************************************************************************************************************************************************************/
4580 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4581
4582 "use strict";
4583 __webpack_require__.r(__webpack_exports__);
4584 // extracted by mini-css-extract-plugin
4585
4586
4587 /***/ }),
4588
4589 /***/ "./scripts/shared/UIComponents/UIButton.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIButton.ts":
4590 /*!************************************************************************************************************************************************************************************!*\
4591 !*** ./scripts/shared/UIComponents/UIButton.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIButton.ts ***!
4592 \************************************************************************************************************************************************************************************/
4593 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4594
4595 "use strict";
4596 __webpack_require__.r(__webpack_exports__);
4597 // extracted by mini-css-extract-plugin
4598
4599
4600 /***/ }),
4601
4602 /***/ "./scripts/shared/UIComponents/UIContainer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIContainer.ts":
4603 /*!******************************************************************************************************************************************************************************************!*\
4604 !*** ./scripts/shared/UIComponents/UIContainer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIContainer.ts ***!
4605 \******************************************************************************************************************************************************************************************/
4606 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4607
4608 "use strict";
4609 __webpack_require__.r(__webpack_exports__);
4610 // extracted by mini-css-extract-plugin
4611
4612
4613 /***/ }),
4614
4615 /***/ "./scripts/shared/UIComponents/UIOverlay.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIOverlay.ts":
4616 /*!**************************************************************************************************************************************************************************************!*\
4617 !*** ./scripts/shared/UIComponents/UIOverlay.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIOverlay.ts ***!
4618 \**************************************************************************************************************************************************************************************/
4619 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4620
4621 "use strict";
4622 __webpack_require__.r(__webpack_exports__);
4623 // extracted by mini-css-extract-plugin
4624
4625
4626 /***/ }),
4627
4628 /***/ "./scripts/shared/UIComponents/UISpacer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpacer.ts":
4629 /*!************************************************************************************************************************************************************************************!*\
4630 !*** ./scripts/shared/UIComponents/UISpacer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpacer.ts ***!
4631 \************************************************************************************************************************************************************************************/
4632 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4633
4634 "use strict";
4635 __webpack_require__.r(__webpack_exports__);
4636 // extracted by mini-css-extract-plugin
4637
4638
4639 /***/ }),
4640
4641 /***/ "./scripts/shared/UIComponents/UISpinner.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpinner.tsx":
4642 /*!***************************************************************************************************************************************************************************************!*\
4643 !*** ./scripts/shared/UIComponents/UISpinner.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpinner.tsx ***!
4644 \***************************************************************************************************************************************************************************************/
4645 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4646
4647 "use strict";
4648 __webpack_require__.r(__webpack_exports__);
4649 // extracted by mini-css-extract-plugin
4650
4651
4652 /***/ }),
4653
4654 /***/ "./node_modules/object-assign/index.js":
4655 /*!*********************************************!*\
4656 !*** ./node_modules/object-assign/index.js ***!
4657 \*********************************************/
4658 /***/ ((module) => {
4659
4660 "use strict";
4661 /*
4662 object-assign
4663 (c) Sindre Sorhus
4664 @license MIT
4665 */
4666
4667
4668 /* eslint-disable no-unused-vars */
4669 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
4670 var hasOwnProperty = Object.prototype.hasOwnProperty;
4671 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
4672
4673 function toObject(val) {
4674 if (val === null || val === undefined) {
4675 throw new TypeError('Object.assign cannot be called with null or undefined');
4676 }
4677
4678 return Object(val);
4679 }
4680
4681 function shouldUseNative() {
4682 try {
4683 if (!Object.assign) {
4684 return false;
4685 }
4686
4687 // Detect buggy property enumeration order in older V8 versions.
4688
4689 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
4690 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
4691 test1[5] = 'de';
4692 if (Object.getOwnPropertyNames(test1)[0] === '5') {
4693 return false;
4694 }
4695
4696 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4697 var test2 = {};
4698 for (var i = 0; i < 10; i++) {
4699 test2['_' + String.fromCharCode(i)] = i;
4700 }
4701 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
4702 return test2[n];
4703 });
4704 if (order2.join('') !== '0123456789') {
4705 return false;
4706 }
4707
4708 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4709 var test3 = {};
4710 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
4711 test3[letter] = letter;
4712 });
4713 if (Object.keys(Object.assign({}, test3)).join('') !==
4714 'abcdefghijklmnopqrst') {
4715 return false;
4716 }
4717
4718 return true;
4719 } catch (err) {
4720 // We don't expect any of the above to throw, but better to be safe.
4721 return false;
4722 }
4723 }
4724
4725 module.exports = shouldUseNative() ? Object.assign : function (target, source) {
4726 var from;
4727 var to = toObject(target);
4728 var symbols;
4729
4730 for (var s = 1; s < arguments.length; s++) {
4731 from = Object(arguments[s]);
4732
4733 for (var key in from) {
4734 if (hasOwnProperty.call(from, key)) {
4735 to[key] = from[key];
4736 }
4737 }
4738
4739 if (getOwnPropertySymbols) {
4740 symbols = getOwnPropertySymbols(from);
4741 for (var i = 0; i < symbols.length; i++) {
4742 if (propIsEnumerable.call(from, symbols[i])) {
4743 to[symbols[i]] = from[symbols[i]];
4744 }
4745 }
4746 }
4747 }
4748
4749 return to;
4750 };
4751
4752
4753 /***/ }),
4754
4755 /***/ "./node_modules/prop-types/checkPropTypes.js":
4756 /*!***************************************************!*\
4757 !*** ./node_modules/prop-types/checkPropTypes.js ***!
4758 \***************************************************/
4759 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4760
4761 "use strict";
4762 /**
4763 * Copyright (c) 2013-present, Facebook, Inc.
4764 *
4765 * This source code is licensed under the MIT license found in the
4766 * LICENSE file in the root directory of this source tree.
4767 */
4768
4769
4770
4771 var printWarning = function() {};
4772
4773 if (true) {
4774 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
4775 var loggedTypeFailures = {};
4776 var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
4777
4778 printWarning = function(text) {
4779 var message = 'Warning: ' + text;
4780 if (typeof console !== 'undefined') {
4781 console.error(message);
4782 }
4783 try {
4784 // --- Welcome to debugging React ---
4785 // This error was thrown as a convenience so that you can use this stack
4786 // to find the callsite that caused this warning to fire.
4787 throw new Error(message);
4788 } catch (x) { /**/ }
4789 };
4790 }
4791
4792 /**
4793 * Assert that the values match with the type specs.
4794 * Error messages are memorized and will only be shown once.
4795 *
4796 * @param {object} typeSpecs Map of name to a ReactPropType
4797 * @param {object} values Runtime values that need to be type-checked
4798 * @param {string} location e.g. "prop", "context", "child context"
4799 * @param {string} componentName Name of the component for error messages.
4800 * @param {?Function} getStack Returns the component stack.
4801 * @private
4802 */
4803 function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
4804 if (true) {
4805 for (var typeSpecName in typeSpecs) {
4806 if (has(typeSpecs, typeSpecName)) {
4807 var error;
4808 // Prop type validation may throw. In case they do, we don't want to
4809 // fail the render phase where it didn't fail before. So we log it.
4810 // After these have been cleaned up, we'll let them throw.
4811 try {
4812 // This is intentionally an invariant that gets caught. It's the same
4813 // behavior as without this statement except with a better message.
4814 if (typeof typeSpecs[typeSpecName] !== 'function') {
4815 var err = Error(
4816 (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
4817 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
4818 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
4819 );
4820 err.name = 'Invariant Violation';
4821 throw err;
4822 }
4823 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
4824 } catch (ex) {
4825 error = ex;
4826 }
4827 if (error && !(error instanceof Error)) {
4828 printWarning(
4829 (componentName || 'React class') + ': type specification of ' +
4830 location + ' `' + typeSpecName + '` is invalid; the type checker ' +
4831 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
4832 'You may have forgotten to pass an argument to the type checker ' +
4833 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
4834 'shape all require an argument).'
4835 );
4836 }
4837 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
4838 // Only monitor this failure once because there tends to be a lot of the
4839 // same error.
4840 loggedTypeFailures[error.message] = true;
4841
4842 var stack = getStack ? getStack() : '';
4843
4844 printWarning(
4845 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
4846 );
4847 }
4848 }
4849 }
4850 }
4851 }
4852
4853 /**
4854 * Resets warning cache when testing.
4855 *
4856 * @private
4857 */
4858 checkPropTypes.resetWarningCache = function() {
4859 if (true) {
4860 loggedTypeFailures = {};
4861 }
4862 }
4863
4864 module.exports = checkPropTypes;
4865
4866
4867 /***/ }),
4868
4869 /***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
4870 /*!************************************************************!*\
4871 !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
4872 \************************************************************/
4873 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4874
4875 "use strict";
4876 /**
4877 * Copyright (c) 2013-present, Facebook, Inc.
4878 *
4879 * This source code is licensed under the MIT license found in the
4880 * LICENSE file in the root directory of this source tree.
4881 */
4882
4883
4884
4885 var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
4886 var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
4887
4888 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
4889 var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
4890 var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
4891
4892 var printWarning = function() {};
4893
4894 if (true) {
4895 printWarning = function(text) {
4896 var message = 'Warning: ' + text;
4897 if (typeof console !== 'undefined') {
4898 console.error(message);
4899 }
4900 try {
4901 // --- Welcome to debugging React ---
4902 // This error was thrown as a convenience so that you can use this stack
4903 // to find the callsite that caused this warning to fire.
4904 throw new Error(message);
4905 } catch (x) {}
4906 };
4907 }
4908
4909 function emptyFunctionThatReturnsNull() {
4910 return null;
4911 }
4912
4913 module.exports = function(isValidElement, throwOnDirectAccess) {
4914 /* global Symbol */
4915 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
4916 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
4917
4918 /**
4919 * Returns the iterator method function contained on the iterable object.
4920 *
4921 * Be sure to invoke the function with the iterable as context:
4922 *
4923 * var iteratorFn = getIteratorFn(myIterable);
4924 * if (iteratorFn) {
4925 * var iterator = iteratorFn.call(myIterable);
4926 * ...
4927 * }
4928 *
4929 * @param {?object} maybeIterable
4930 * @return {?function}
4931 */
4932 function getIteratorFn(maybeIterable) {
4933 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
4934 if (typeof iteratorFn === 'function') {
4935 return iteratorFn;
4936 }
4937 }
4938
4939 /**
4940 * Collection of methods that allow declaration and validation of props that are
4941 * supplied to React components. Example usage:
4942 *
4943 * var Props = require('ReactPropTypes');
4944 * var MyArticle = React.createClass({
4945 * propTypes: {
4946 * // An optional string prop named "description".
4947 * description: Props.string,
4948 *
4949 * // A required enum prop named "category".
4950 * category: Props.oneOf(['News','Photos']).isRequired,
4951 *
4952 * // A prop named "dialog" that requires an instance of Dialog.
4953 * dialog: Props.instanceOf(Dialog).isRequired
4954 * },
4955 * render: function() { ... }
4956 * });
4957 *
4958 * A more formal specification of how these methods are used:
4959 *
4960 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
4961 * decl := ReactPropTypes.{type}(.isRequired)?
4962 *
4963 * Each and every declaration produces a function with the same signature. This
4964 * allows the creation of custom validation functions. For example:
4965 *
4966 * var MyLink = React.createClass({
4967 * propTypes: {
4968 * // An optional string or URI prop named "href".
4969 * href: function(props, propName, componentName) {
4970 * var propValue = props[propName];
4971 * if (propValue != null && typeof propValue !== 'string' &&
4972 * !(propValue instanceof URI)) {
4973 * return new Error(
4974 * 'Expected a string or an URI for ' + propName + ' in ' +
4975 * componentName
4976 * );
4977 * }
4978 * }
4979 * },
4980 * render: function() {...}
4981 * });
4982 *
4983 * @internal
4984 */
4985
4986 var ANONYMOUS = '<<anonymous>>';
4987
4988 // Important!
4989 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
4990 var ReactPropTypes = {
4991 array: createPrimitiveTypeChecker('array'),
4992 bigint: createPrimitiveTypeChecker('bigint'),
4993 bool: createPrimitiveTypeChecker('boolean'),
4994 func: createPrimitiveTypeChecker('function'),
4995 number: createPrimitiveTypeChecker('number'),
4996 object: createPrimitiveTypeChecker('object'),
4997 string: createPrimitiveTypeChecker('string'),
4998 symbol: createPrimitiveTypeChecker('symbol'),
4999
5000 any: createAnyTypeChecker(),
5001 arrayOf: createArrayOfTypeChecker,
5002 element: createElementTypeChecker(),
5003 elementType: createElementTypeTypeChecker(),
5004 instanceOf: createInstanceTypeChecker,
5005 node: createNodeChecker(),
5006 objectOf: createObjectOfTypeChecker,
5007 oneOf: createEnumTypeChecker,
5008 oneOfType: createUnionTypeChecker,
5009 shape: createShapeTypeChecker,
5010 exact: createStrictShapeTypeChecker,
5011 };
5012
5013 /**
5014 * inlined Object.is polyfill to avoid requiring consumers ship their own
5015 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
5016 */
5017 /*eslint-disable no-self-compare*/
5018 function is(x, y) {
5019 // SameValue algorithm
5020 if (x === y) {
5021 // Steps 1-5, 7-10
5022 // Steps 6.b-6.e: +0 != -0
5023 return x !== 0 || 1 / x === 1 / y;
5024 } else {
5025 // Step 6.a: NaN == NaN
5026 return x !== x && y !== y;
5027 }
5028 }
5029 /*eslint-enable no-self-compare*/
5030
5031 /**
5032 * We use an Error-like object for backward compatibility as people may call
5033 * PropTypes directly and inspect their output. However, we don't use real
5034 * Errors anymore. We don't inspect their stack anyway, and creating them
5035 * is prohibitively expensive if they are created too often, such as what
5036 * happens in oneOfType() for any type before the one that matched.
5037 */
5038 function PropTypeError(message, data) {
5039 this.message = message;
5040 this.data = data && typeof data === 'object' ? data: {};
5041 this.stack = '';
5042 }
5043 // Make `instanceof Error` still work for returned errors.
5044 PropTypeError.prototype = Error.prototype;
5045
5046 function createChainableTypeChecker(validate) {
5047 if (true) {
5048 var manualPropTypeCallCache = {};
5049 var manualPropTypeWarningCount = 0;
5050 }
5051 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
5052 componentName = componentName || ANONYMOUS;
5053 propFullName = propFullName || propName;
5054
5055 if (secret !== ReactPropTypesSecret) {
5056 if (throwOnDirectAccess) {
5057 // New behavior only for users of `prop-types` package
5058 var err = new Error(
5059 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
5060 'Use `PropTypes.checkPropTypes()` to call them. ' +
5061 'Read more at http://fb.me/use-check-prop-types'
5062 );
5063 err.name = 'Invariant Violation';
5064 throw err;
5065 } else if ( true && typeof console !== 'undefined') {
5066 // Old behavior for people using React.PropTypes
5067 var cacheKey = componentName + ':' + propName;
5068 if (
5069 !manualPropTypeCallCache[cacheKey] &&
5070 // Avoid spamming the console because they are often not actionable except for lib authors
5071 manualPropTypeWarningCount < 3
5072 ) {
5073 printWarning(
5074 'You are manually calling a React.PropTypes validation ' +
5075 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
5076 'and will throw in the standalone `prop-types` package. ' +
5077 'You may be seeing this warning due to a third-party PropTypes ' +
5078 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
5079 );
5080 manualPropTypeCallCache[cacheKey] = true;
5081 manualPropTypeWarningCount++;
5082 }
5083 }
5084 }
5085 if (props[propName] == null) {
5086 if (isRequired) {
5087 if (props[propName] === null) {
5088 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
5089 }
5090 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
5091 }
5092 return null;
5093 } else {
5094 return validate(props, propName, componentName, location, propFullName);
5095 }
5096 }
5097
5098 var chainedCheckType = checkType.bind(null, false);
5099 chainedCheckType.isRequired = checkType.bind(null, true);
5100
5101 return chainedCheckType;
5102 }
5103
5104 function createPrimitiveTypeChecker(expectedType) {
5105 function validate(props, propName, componentName, location, propFullName, secret) {
5106 var propValue = props[propName];
5107 var propType = getPropType(propValue);
5108 if (propType !== expectedType) {
5109 // `propValue` being instance of, say, date/regexp, pass the 'object'
5110 // check, but we can offer a more precise error message here rather than
5111 // 'of type `object`'.
5112 var preciseType = getPreciseType(propValue);
5113
5114 return new PropTypeError(
5115 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
5116 {expectedType: expectedType}
5117 );
5118 }
5119 return null;
5120 }
5121 return createChainableTypeChecker(validate);
5122 }
5123
5124 function createAnyTypeChecker() {
5125 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
5126 }
5127
5128 function createArrayOfTypeChecker(typeChecker) {
5129 function validate(props, propName, componentName, location, propFullName) {
5130 if (typeof typeChecker !== 'function') {
5131 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
5132 }
5133 var propValue = props[propName];
5134 if (!Array.isArray(propValue)) {
5135 var propType = getPropType(propValue);
5136 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
5137 }
5138 for (var i = 0; i < propValue.length; i++) {
5139 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
5140 if (error instanceof Error) {
5141 return error;
5142 }
5143 }
5144 return null;
5145 }
5146 return createChainableTypeChecker(validate);
5147 }
5148
5149 function createElementTypeChecker() {
5150 function validate(props, propName, componentName, location, propFullName) {
5151 var propValue = props[propName];
5152 if (!isValidElement(propValue)) {
5153 var propType = getPropType(propValue);
5154 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
5155 }
5156 return null;
5157 }
5158 return createChainableTypeChecker(validate);
5159 }
5160
5161 function createElementTypeTypeChecker() {
5162 function validate(props, propName, componentName, location, propFullName) {
5163 var propValue = props[propName];
5164 if (!ReactIs.isValidElementType(propValue)) {
5165 var propType = getPropType(propValue);
5166 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
5167 }
5168 return null;
5169 }
5170 return createChainableTypeChecker(validate);
5171 }
5172
5173 function createInstanceTypeChecker(expectedClass) {
5174 function validate(props, propName, componentName, location, propFullName) {
5175 if (!(props[propName] instanceof expectedClass)) {
5176 var expectedClassName = expectedClass.name || ANONYMOUS;
5177 var actualClassName = getClassName(props[propName]);
5178 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
5179 }
5180 return null;
5181 }
5182 return createChainableTypeChecker(validate);
5183 }
5184
5185 function createEnumTypeChecker(expectedValues) {
5186 if (!Array.isArray(expectedValues)) {
5187 if (true) {
5188 if (arguments.length > 1) {
5189 printWarning(
5190 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
5191 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
5192 );
5193 } else {
5194 printWarning('Invalid argument supplied to oneOf, expected an array.');
5195 }
5196 }
5197 return emptyFunctionThatReturnsNull;
5198 }
5199
5200 function validate(props, propName, componentName, location, propFullName) {
5201 var propValue = props[propName];
5202 for (var i = 0; i < expectedValues.length; i++) {
5203 if (is(propValue, expectedValues[i])) {
5204 return null;
5205 }
5206 }
5207
5208 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
5209 var type = getPreciseType(value);
5210 if (type === 'symbol') {
5211 return String(value);
5212 }
5213 return value;
5214 });
5215 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
5216 }
5217 return createChainableTypeChecker(validate);
5218 }
5219
5220 function createObjectOfTypeChecker(typeChecker) {
5221 function validate(props, propName, componentName, location, propFullName) {
5222 if (typeof typeChecker !== 'function') {
5223 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
5224 }
5225 var propValue = props[propName];
5226 var propType = getPropType(propValue);
5227 if (propType !== 'object') {
5228 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
5229 }
5230 for (var key in propValue) {
5231 if (has(propValue, key)) {
5232 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5233 if (error instanceof Error) {
5234 return error;
5235 }
5236 }
5237 }
5238 return null;
5239 }
5240 return createChainableTypeChecker(validate);
5241 }
5242
5243 function createUnionTypeChecker(arrayOfTypeCheckers) {
5244 if (!Array.isArray(arrayOfTypeCheckers)) {
5245 true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
5246 return emptyFunctionThatReturnsNull;
5247 }
5248
5249 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5250 var checker = arrayOfTypeCheckers[i];
5251 if (typeof checker !== 'function') {
5252 printWarning(
5253 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
5254 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
5255 );
5256 return emptyFunctionThatReturnsNull;
5257 }
5258 }
5259
5260 function validate(props, propName, componentName, location, propFullName) {
5261 var expectedTypes = [];
5262 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5263 var checker = arrayOfTypeCheckers[i];
5264 var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
5265 if (checkerResult == null) {
5266 return null;
5267 }
5268 if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
5269 expectedTypes.push(checkerResult.data.expectedType);
5270 }
5271 }
5272 var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
5273 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
5274 }
5275 return createChainableTypeChecker(validate);
5276 }
5277
5278 function createNodeChecker() {
5279 function validate(props, propName, componentName, location, propFullName) {
5280 if (!isNode(props[propName])) {
5281 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
5282 }
5283 return null;
5284 }
5285 return createChainableTypeChecker(validate);
5286 }
5287
5288 function invalidValidatorError(componentName, location, propFullName, key, type) {
5289 return new PropTypeError(
5290 (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
5291 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
5292 );
5293 }
5294
5295 function createShapeTypeChecker(shapeTypes) {
5296 function validate(props, propName, componentName, location, propFullName) {
5297 var propValue = props[propName];
5298 var propType = getPropType(propValue);
5299 if (propType !== 'object') {
5300 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5301 }
5302 for (var key in shapeTypes) {
5303 var checker = shapeTypes[key];
5304 if (typeof checker !== 'function') {
5305 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
5306 }
5307 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5308 if (error) {
5309 return error;
5310 }
5311 }
5312 return null;
5313 }
5314 return createChainableTypeChecker(validate);
5315 }
5316
5317 function createStrictShapeTypeChecker(shapeTypes) {
5318 function validate(props, propName, componentName, location, propFullName) {
5319 var propValue = props[propName];
5320 var propType = getPropType(propValue);
5321 if (propType !== 'object') {
5322 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5323 }
5324 // We need to check all keys in case some are required but missing from props.
5325 var allKeys = assign({}, props[propName], shapeTypes);
5326 for (var key in allKeys) {
5327 var checker = shapeTypes[key];
5328 if (has(shapeTypes, key) && typeof checker !== 'function') {
5329 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
5330 }
5331 if (!checker) {
5332 return new PropTypeError(
5333 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
5334 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
5335 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
5336 );
5337 }
5338 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5339 if (error) {
5340 return error;
5341 }
5342 }
5343 return null;
5344 }
5345
5346 return createChainableTypeChecker(validate);
5347 }
5348
5349 function isNode(propValue) {
5350 switch (typeof propValue) {
5351 case 'number':
5352 case 'string':
5353 case 'undefined':
5354 return true;
5355 case 'boolean':
5356 return !propValue;
5357 case 'object':
5358 if (Array.isArray(propValue)) {
5359 return propValue.every(isNode);
5360 }
5361 if (propValue === null || isValidElement(propValue)) {
5362 return true;
5363 }
5364
5365 var iteratorFn = getIteratorFn(propValue);
5366 if (iteratorFn) {
5367 var iterator = iteratorFn.call(propValue);
5368 var step;
5369 if (iteratorFn !== propValue.entries) {
5370 while (!(step = iterator.next()).done) {
5371 if (!isNode(step.value)) {
5372 return false;
5373 }
5374 }
5375 } else {
5376 // Iterator will provide entry [k,v] tuples rather than values.
5377 while (!(step = iterator.next()).done) {
5378 var entry = step.value;
5379 if (entry) {
5380 if (!isNode(entry[1])) {
5381 return false;
5382 }
5383 }
5384 }
5385 }
5386 } else {
5387 return false;
5388 }
5389
5390 return true;
5391 default:
5392 return false;
5393 }
5394 }
5395
5396 function isSymbol(propType, propValue) {
5397 // Native Symbol.
5398 if (propType === 'symbol') {
5399 return true;
5400 }
5401
5402 // falsy value can't be a Symbol
5403 if (!propValue) {
5404 return false;
5405 }
5406
5407 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
5408 if (propValue['@@toStringTag'] === 'Symbol') {
5409 return true;
5410 }
5411
5412 // Fallback for non-spec compliant Symbols which are polyfilled.
5413 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
5414 return true;
5415 }
5416
5417 return false;
5418 }
5419
5420 // Equivalent of `typeof` but with special handling for array and regexp.
5421 function getPropType(propValue) {
5422 var propType = typeof propValue;
5423 if (Array.isArray(propValue)) {
5424 return 'array';
5425 }
5426 if (propValue instanceof RegExp) {
5427 // Old webkits (at least until Android 4.0) return 'function' rather than
5428 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
5429 // passes PropTypes.object.
5430 return 'object';
5431 }
5432 if (isSymbol(propType, propValue)) {
5433 return 'symbol';
5434 }
5435 return propType;
5436 }
5437
5438 // This handles more types than `getPropType`. Only used for error messages.
5439 // See `createPrimitiveTypeChecker`.
5440 function getPreciseType(propValue) {
5441 if (typeof propValue === 'undefined' || propValue === null) {
5442 return '' + propValue;
5443 }
5444 var propType = getPropType(propValue);
5445 if (propType === 'object') {
5446 if (propValue instanceof Date) {
5447 return 'date';
5448 } else if (propValue instanceof RegExp) {
5449 return 'regexp';
5450 }
5451 }
5452 return propType;
5453 }
5454
5455 // Returns a string that is postfixed to a warning about an invalid type.
5456 // For example, "undefined" or "of type array"
5457 function getPostfixForTypeWarning(value) {
5458 var type = getPreciseType(value);
5459 switch (type) {
5460 case 'array':
5461 case 'object':
5462 return 'an ' + type;
5463 case 'boolean':
5464 case 'date':
5465 case 'regexp':
5466 return 'a ' + type;
5467 default:
5468 return type;
5469 }
5470 }
5471
5472 // Returns class name of the object, if any.
5473 function getClassName(propValue) {
5474 if (!propValue.constructor || !propValue.constructor.name) {
5475 return ANONYMOUS;
5476 }
5477 return propValue.constructor.name;
5478 }
5479
5480 ReactPropTypes.checkPropTypes = checkPropTypes;
5481 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
5482 ReactPropTypes.PropTypes = ReactPropTypes;
5483
5484 return ReactPropTypes;
5485 };
5486
5487
5488 /***/ }),
5489
5490 /***/ "./node_modules/prop-types/index.js":
5491 /*!******************************************!*\
5492 !*** ./node_modules/prop-types/index.js ***!
5493 \******************************************/
5494 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5495
5496 /**
5497 * Copyright (c) 2013-present, Facebook, Inc.
5498 *
5499 * This source code is licensed under the MIT license found in the
5500 * LICENSE file in the root directory of this source tree.
5501 */
5502
5503 if (true) {
5504 var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
5505
5506 // By explicitly using `prop-types` you are opting into new development behavior.
5507 // http://fb.me/prop-types-in-prod
5508 var throwOnDirectAccess = true;
5509 module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
5510 } else {}
5511
5512
5513 /***/ }),
5514
5515 /***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
5516 /*!*************************************************************!*\
5517 !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
5518 \*************************************************************/
5519 /***/ ((module) => {
5520
5521 "use strict";
5522 /**
5523 * Copyright (c) 2013-present, Facebook, Inc.
5524 *
5525 * This source code is licensed under the MIT license found in the
5526 * LICENSE file in the root directory of this source tree.
5527 */
5528
5529
5530
5531 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
5532
5533 module.exports = ReactPropTypesSecret;
5534
5535
5536 /***/ }),
5537
5538 /***/ "./node_modules/prop-types/lib/has.js":
5539 /*!********************************************!*\
5540 !*** ./node_modules/prop-types/lib/has.js ***!
5541 \********************************************/
5542 /***/ ((module) => {
5543
5544 module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
5545
5546
5547 /***/ }),
5548
5549 /***/ "./node_modules/raven-js/src/configError.js":
5550 /*!**************************************************!*\
5551 !*** ./node_modules/raven-js/src/configError.js ***!
5552 \**************************************************/
5553 /***/ ((module) => {
5554
5555 function RavenConfigError(message) {
5556 this.name = 'RavenConfigError';
5557 this.message = message;
5558 }
5559 RavenConfigError.prototype = new Error();
5560 RavenConfigError.prototype.constructor = RavenConfigError;
5561
5562 module.exports = RavenConfigError;
5563
5564
5565 /***/ }),
5566
5567 /***/ "./node_modules/raven-js/src/console.js":
5568 /*!**********************************************!*\
5569 !*** ./node_modules/raven-js/src/console.js ***!
5570 \**********************************************/
5571 /***/ ((module) => {
5572
5573 var wrapMethod = function(console, level, callback) {
5574 var originalConsoleLevel = console[level];
5575 var originalConsole = console;
5576
5577 if (!(level in console)) {
5578 return;
5579 }
5580
5581 var sentryLevel = level === 'warn' ? 'warning' : level;
5582
5583 console[level] = function() {
5584 var args = [].slice.call(arguments);
5585
5586 var msg = '' + args.join(' ');
5587 var data = {level: sentryLevel, logger: 'console', extra: {arguments: args}};
5588
5589 if (level === 'assert') {
5590 if (args[0] === false) {
5591 // Default browsers message
5592 msg = 'Assertion failed: ' + (args.slice(1).join(' ') || 'console.assert');
5593 data.extra.arguments = args.slice(1);
5594 callback && callback(msg, data);
5595 }
5596 } else {
5597 callback && callback(msg, data);
5598 }
5599
5600 // this fails for some browsers. :(
5601 if (originalConsoleLevel) {
5602 // IE9 doesn't allow calling apply on console functions directly
5603 // See: https://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function#answer-5473193
5604 Function.prototype.apply.call(originalConsoleLevel, originalConsole, args);
5605 }
5606 };
5607 };
5608
5609 module.exports = {
5610 wrapMethod: wrapMethod
5611 };
5612
5613
5614 /***/ }),
5615
5616 /***/ "./node_modules/raven-js/src/raven.js":
5617 /*!********************************************!*\
5618 !*** ./node_modules/raven-js/src/raven.js ***!
5619 \********************************************/
5620 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5621
5622 /*global XDomainRequest:false */
5623
5624 var TraceKit = __webpack_require__(/*! ../vendor/TraceKit/tracekit */ "./node_modules/raven-js/vendor/TraceKit/tracekit.js");
5625 var stringify = __webpack_require__(/*! ../vendor/json-stringify-safe/stringify */ "./node_modules/raven-js/vendor/json-stringify-safe/stringify.js");
5626 var RavenConfigError = __webpack_require__(/*! ./configError */ "./node_modules/raven-js/src/configError.js");
5627
5628 var utils = __webpack_require__(/*! ./utils */ "./node_modules/raven-js/src/utils.js");
5629 var isError = utils.isError;
5630 var isObject = utils.isObject;
5631 var isObject = utils.isObject;
5632 var isErrorEvent = utils.isErrorEvent;
5633 var isUndefined = utils.isUndefined;
5634 var isFunction = utils.isFunction;
5635 var isString = utils.isString;
5636 var isEmptyObject = utils.isEmptyObject;
5637 var each = utils.each;
5638 var objectMerge = utils.objectMerge;
5639 var truncate = utils.truncate;
5640 var objectFrozen = utils.objectFrozen;
5641 var hasKey = utils.hasKey;
5642 var joinRegExp = utils.joinRegExp;
5643 var urlencode = utils.urlencode;
5644 var uuid4 = utils.uuid4;
5645 var htmlTreeAsString = utils.htmlTreeAsString;
5646 var isSameException = utils.isSameException;
5647 var isSameStacktrace = utils.isSameStacktrace;
5648 var parseUrl = utils.parseUrl;
5649 var fill = utils.fill;
5650
5651 var wrapConsoleMethod = (__webpack_require__(/*! ./console */ "./node_modules/raven-js/src/console.js").wrapMethod);
5652
5653 var dsnKeys = 'source protocol user pass host port path'.split(' '),
5654 dsnPattern = /^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;
5655
5656 function now() {
5657 return +new Date();
5658 }
5659
5660 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
5661 var _window =
5662 typeof window !== 'undefined'
5663 ? window
5664 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
5665 var _document = _window.document;
5666 var _navigator = _window.navigator;
5667
5668 function keepOriginalCallback(original, callback) {
5669 return isFunction(callback)
5670 ? function(data) {
5671 return callback(data, original);
5672 }
5673 : callback;
5674 }
5675
5676 // First, check for JSON support
5677 // If there is no JSON, we no-op the core features of Raven
5678 // since JSON is required to encode the payload
5679 function Raven() {
5680 this._hasJSON = !!(typeof JSON === 'object' && JSON.stringify);
5681 // Raven can run in contexts where there's no document (react-native)
5682 this._hasDocument = !isUndefined(_document);
5683 this._hasNavigator = !isUndefined(_navigator);
5684 this._lastCapturedException = null;
5685 this._lastData = null;
5686 this._lastEventId = null;
5687 this._globalServer = null;
5688 this._globalKey = null;
5689 this._globalProject = null;
5690 this._globalContext = {};
5691 this._globalOptions = {
5692 logger: 'javascript',
5693 ignoreErrors: [],
5694 ignoreUrls: [],
5695 whitelistUrls: [],
5696 includePaths: [],
5697 collectWindowErrors: true,
5698 maxMessageLength: 0,
5699
5700 // By default, truncates URL values to 250 chars
5701 maxUrlLength: 250,
5702 stackTraceLimit: 50,
5703 autoBreadcrumbs: true,
5704 instrument: true,
5705 sampleRate: 1
5706 };
5707 this._ignoreOnError = 0;
5708 this._isRavenInstalled = false;
5709 this._originalErrorStackTraceLimit = Error.stackTraceLimit;
5710 // capture references to window.console *and* all its methods first
5711 // before the console plugin has a chance to monkey patch
5712 this._originalConsole = _window.console || {};
5713 this._originalConsoleMethods = {};
5714 this._plugins = [];
5715 this._startTime = now();
5716 this._wrappedBuiltIns = [];
5717 this._breadcrumbs = [];
5718 this._lastCapturedEvent = null;
5719 this._keypressTimeout;
5720 this._location = _window.location;
5721 this._lastHref = this._location && this._location.href;
5722 this._resetBackoff();
5723
5724 // eslint-disable-next-line guard-for-in
5725 for (var method in this._originalConsole) {
5726 this._originalConsoleMethods[method] = this._originalConsole[method];
5727 }
5728 }
5729
5730 /*
5731 * The core Raven singleton
5732 *
5733 * @this {Raven}
5734 */
5735
5736 Raven.prototype = {
5737 // Hardcode version string so that raven source can be loaded directly via
5738 // webpack (using a build step causes webpack #1617). Grunt verifies that
5739 // this value matches package.json during build.
5740 // See: https://github.com/getsentry/raven-js/issues/465
5741 VERSION: '3.19.1',
5742
5743 debug: false,
5744
5745 TraceKit: TraceKit, // alias to TraceKit
5746
5747 /*
5748 * Configure Raven with a DSN and extra options
5749 *
5750 * @param {string} dsn The public Sentry DSN
5751 * @param {object} options Set of global options [optional]
5752 * @return {Raven}
5753 */
5754 config: function(dsn, options) {
5755 var self = this;
5756
5757 if (self._globalServer) {
5758 this._logDebug('error', 'Error: Raven has already been configured');
5759 return self;
5760 }
5761 if (!dsn) return self;
5762
5763 var globalOptions = self._globalOptions;
5764
5765 // merge in options
5766 if (options) {
5767 each(options, function(key, value) {
5768 // tags and extra are special and need to be put into context
5769 if (key === 'tags' || key === 'extra' || key === 'user') {
5770 self._globalContext[key] = value;
5771 } else {
5772 globalOptions[key] = value;
5773 }
5774 });
5775 }
5776
5777 self.setDSN(dsn);
5778
5779 // "Script error." is hard coded into browsers for errors that it can't read.
5780 // this is the result of a script being pulled in from an external domain and CORS.
5781 globalOptions.ignoreErrors.push(/^Script error\.?$/);
5782 globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/);
5783
5784 // join regexp rules into one big rule
5785 globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors);
5786 globalOptions.ignoreUrls = globalOptions.ignoreUrls.length
5787 ? joinRegExp(globalOptions.ignoreUrls)
5788 : false;
5789 globalOptions.whitelistUrls = globalOptions.whitelistUrls.length
5790 ? joinRegExp(globalOptions.whitelistUrls)
5791 : false;
5792 globalOptions.includePaths = joinRegExp(globalOptions.includePaths);
5793 globalOptions.maxBreadcrumbs = Math.max(
5794 0,
5795 Math.min(globalOptions.maxBreadcrumbs || 100, 100)
5796 ); // default and hard limit is 100
5797
5798 var autoBreadcrumbDefaults = {
5799 xhr: true,
5800 console: true,
5801 dom: true,
5802 location: true
5803 };
5804
5805 var autoBreadcrumbs = globalOptions.autoBreadcrumbs;
5806 if ({}.toString.call(autoBreadcrumbs) === '[object Object]') {
5807 autoBreadcrumbs = objectMerge(autoBreadcrumbDefaults, autoBreadcrumbs);
5808 } else if (autoBreadcrumbs !== false) {
5809 autoBreadcrumbs = autoBreadcrumbDefaults;
5810 }
5811 globalOptions.autoBreadcrumbs = autoBreadcrumbs;
5812
5813 var instrumentDefaults = {
5814 tryCatch: true
5815 };
5816
5817 var instrument = globalOptions.instrument;
5818 if ({}.toString.call(instrument) === '[object Object]') {
5819 instrument = objectMerge(instrumentDefaults, instrument);
5820 } else if (instrument !== false) {
5821 instrument = instrumentDefaults;
5822 }
5823 globalOptions.instrument = instrument;
5824
5825 TraceKit.collectWindowErrors = !!globalOptions.collectWindowErrors;
5826
5827 // return for chaining
5828 return self;
5829 },
5830
5831 /*
5832 * Installs a global window.onerror error handler
5833 * to capture and report uncaught exceptions.
5834 * At this point, install() is required to be called due
5835 * to the way TraceKit is set up.
5836 *
5837 * @return {Raven}
5838 */
5839 install: function() {
5840 var self = this;
5841 if (self.isSetup() && !self._isRavenInstalled) {
5842 TraceKit.report.subscribe(function() {
5843 self._handleOnErrorStackInfo.apply(self, arguments);
5844 });
5845 if (self._globalOptions.instrument && self._globalOptions.instrument.tryCatch) {
5846 self._instrumentTryCatch();
5847 }
5848
5849 if (self._globalOptions.autoBreadcrumbs) self._instrumentBreadcrumbs();
5850
5851 // Install all of the plugins
5852 self._drainPlugins();
5853
5854 self._isRavenInstalled = true;
5855 }
5856
5857 Error.stackTraceLimit = self._globalOptions.stackTraceLimit;
5858 return this;
5859 },
5860
5861 /*
5862 * Set the DSN (can be called multiple time unlike config)
5863 *
5864 * @param {string} dsn The public Sentry DSN
5865 */
5866 setDSN: function(dsn) {
5867 var self = this,
5868 uri = self._parseDSN(dsn),
5869 lastSlash = uri.path.lastIndexOf('/'),
5870 path = uri.path.substr(1, lastSlash);
5871
5872 self._dsn = dsn;
5873 self._globalKey = uri.user;
5874 self._globalSecret = uri.pass && uri.pass.substr(1);
5875 self._globalProject = uri.path.substr(lastSlash + 1);
5876
5877 self._globalServer = self._getGlobalServer(uri);
5878
5879 self._globalEndpoint =
5880 self._globalServer + '/' + path + 'api/' + self._globalProject + '/store/';
5881
5882 // Reset backoff state since we may be pointing at a
5883 // new project/server
5884 this._resetBackoff();
5885 },
5886
5887 /*
5888 * Wrap code within a context so Raven can capture errors
5889 * reliably across domains that is executed immediately.
5890 *
5891 * @param {object} options A specific set of options for this context [optional]
5892 * @param {function} func The callback to be immediately executed within the context
5893 * @param {array} args An array of arguments to be called with the callback [optional]
5894 */
5895 context: function(options, func, args) {
5896 if (isFunction(options)) {
5897 args = func || [];
5898 func = options;
5899 options = undefined;
5900 }
5901
5902 return this.wrap(options, func).apply(this, args);
5903 },
5904
5905 /*
5906 * Wrap code within a context and returns back a new function to be executed
5907 *
5908 * @param {object} options A specific set of options for this context [optional]
5909 * @param {function} func The function to be wrapped in a new context
5910 * @param {function} func A function to call before the try/catch wrapper [optional, private]
5911 * @return {function} The newly wrapped functions with a context
5912 */
5913 wrap: function(options, func, _before) {
5914 var self = this;
5915 // 1 argument has been passed, and it's not a function
5916 // so just return it
5917 if (isUndefined(func) && !isFunction(options)) {
5918 return options;
5919 }
5920
5921 // options is optional
5922 if (isFunction(options)) {
5923 func = options;
5924 options = undefined;
5925 }
5926
5927 // At this point, we've passed along 2 arguments, and the second one
5928 // is not a function either, so we'll just return the second argument.
5929 if (!isFunction(func)) {
5930 return func;
5931 }
5932
5933 // We don't wanna wrap it twice!
5934 try {
5935 if (func.__raven__) {
5936 return func;
5937 }
5938
5939 // If this has already been wrapped in the past, return that
5940 if (func.__raven_wrapper__) {
5941 return func.__raven_wrapper__;
5942 }
5943 } catch (e) {
5944 // Just accessing custom props in some Selenium environments
5945 // can cause a "Permission denied" exception (see raven-js#495).
5946 // Bail on wrapping and return the function as-is (defers to window.onerror).
5947 return func;
5948 }
5949
5950 function wrapped() {
5951 var args = [],
5952 i = arguments.length,
5953 deep = !options || (options && options.deep !== false);
5954
5955 if (_before && isFunction(_before)) {
5956 _before.apply(this, arguments);
5957 }
5958
5959 // Recursively wrap all of a function's arguments that are
5960 // functions themselves.
5961 while (i--) args[i] = deep ? self.wrap(options, arguments[i]) : arguments[i];
5962
5963 try {
5964 // Attempt to invoke user-land function
5965 // NOTE: If you are a Sentry user, and you are seeing this stack frame, it
5966 // means Raven caught an error invoking your application code. This is
5967 // expected behavior and NOT indicative of a bug with Raven.js.
5968 return func.apply(this, args);
5969 } catch (e) {
5970 self._ignoreNextOnError();
5971 self.captureException(e, options);
5972 throw e;
5973 }
5974 }
5975
5976 // copy over properties of the old function
5977 for (var property in func) {
5978 if (hasKey(func, property)) {
5979 wrapped[property] = func[property];
5980 }
5981 }
5982 wrapped.prototype = func.prototype;
5983
5984 func.__raven_wrapper__ = wrapped;
5985 // Signal that this function has been wrapped already
5986 // for both debugging and to prevent it to being wrapped twice
5987 wrapped.__raven__ = true;
5988 wrapped.__inner__ = func;
5989
5990 return wrapped;
5991 },
5992
5993 /*
5994 * Uninstalls the global error handler.
5995 *
5996 * @return {Raven}
5997 */
5998 uninstall: function() {
5999 TraceKit.report.uninstall();
6000
6001 this._restoreBuiltIns();
6002
6003 Error.stackTraceLimit = this._originalErrorStackTraceLimit;
6004 this._isRavenInstalled = false;
6005
6006 return this;
6007 },
6008
6009 /*
6010 * Manually capture an exception and send it over to Sentry
6011 *
6012 * @param {error} ex An exception to be logged
6013 * @param {object} options A specific set of options for this error [optional]
6014 * @return {Raven}
6015 */
6016 captureException: function(ex, options) {
6017 // Cases for sending ex as a message, rather than an exception
6018 var isNotError = !isError(ex);
6019 var isNotErrorEvent = !isErrorEvent(ex);
6020 var isErrorEventWithoutError = isErrorEvent(ex) && !ex.error;
6021
6022 if ((isNotError && isNotErrorEvent) || isErrorEventWithoutError) {
6023 return this.captureMessage(
6024 ex,
6025 objectMerge(
6026 {
6027 trimHeadFrames: 1,
6028 stacktrace: true // if we fall back to captureMessage, default to attempting a new trace
6029 },
6030 options
6031 )
6032 );
6033 }
6034
6035 // Get actual Error from ErrorEvent
6036 if (isErrorEvent(ex)) ex = ex.error;
6037
6038 // Store the raw exception object for potential debugging and introspection
6039 this._lastCapturedException = ex;
6040
6041 // TraceKit.report will re-raise any exception passed to it,
6042 // which means you have to wrap it in try/catch. Instead, we
6043 // can wrap it here and only re-raise if TraceKit.report
6044 // raises an exception different from the one we asked to
6045 // report on.
6046 try {
6047 var stack = TraceKit.computeStackTrace(ex);
6048 this._handleStackInfo(stack, options);
6049 } catch (ex1) {
6050 if (ex !== ex1) {
6051 throw ex1;
6052 }
6053 }
6054
6055 return this;
6056 },
6057
6058 /*
6059 * Manually send a message to Sentry
6060 *
6061 * @param {string} msg A plain message to be captured in Sentry
6062 * @param {object} options A specific set of options for this message [optional]
6063 * @return {Raven}
6064 */
6065 captureMessage: function(msg, options) {
6066 // config() automagically converts ignoreErrors from a list to a RegExp so we need to test for an
6067 // early call; we'll error on the side of logging anything called before configuration since it's
6068 // probably something you should see:
6069 if (
6070 !!this._globalOptions.ignoreErrors.test &&
6071 this._globalOptions.ignoreErrors.test(msg)
6072 ) {
6073 return;
6074 }
6075
6076 options = options || {};
6077
6078 var data = objectMerge(
6079 {
6080 message: msg + '' // Make sure it's actually a string
6081 },
6082 options
6083 );
6084
6085 var ex;
6086 // Generate a "synthetic" stack trace from this point.
6087 // NOTE: If you are a Sentry user, and you are seeing this stack frame, it is NOT indicative
6088 // of a bug with Raven.js. Sentry generates synthetic traces either by configuration,
6089 // or if it catches a thrown object without a "stack" property.
6090 try {
6091 throw new Error(msg);
6092 } catch (ex1) {
6093 ex = ex1;
6094 }
6095
6096 // null exception name so `Error` isn't prefixed to msg
6097 ex.name = null;
6098 var stack = TraceKit.computeStackTrace(ex);
6099
6100 // stack[0] is `throw new Error(msg)` call itself, we are interested in the frame that was just before that, stack[1]
6101 var initialCall = stack.stack[1];
6102
6103 var fileurl = (initialCall && initialCall.url) || '';
6104
6105 if (
6106 !!this._globalOptions.ignoreUrls.test &&
6107 this._globalOptions.ignoreUrls.test(fileurl)
6108 ) {
6109 return;
6110 }
6111
6112 if (
6113 !!this._globalOptions.whitelistUrls.test &&
6114 !this._globalOptions.whitelistUrls.test(fileurl)
6115 ) {
6116 return;
6117 }
6118
6119 if (this._globalOptions.stacktrace || (options && options.stacktrace)) {
6120 options = objectMerge(
6121 {
6122 // fingerprint on msg, not stack trace (legacy behavior, could be
6123 // revisited)
6124 fingerprint: msg,
6125 // since we know this is a synthetic trace, the top N-most frames
6126 // MUST be from Raven.js, so mark them as in_app later by setting
6127 // trimHeadFrames
6128 trimHeadFrames: (options.trimHeadFrames || 0) + 1
6129 },
6130 options
6131 );
6132
6133 var frames = this._prepareFrames(stack, options);
6134 data.stacktrace = {
6135 // Sentry expects frames oldest to newest
6136 frames: frames.reverse()
6137 };
6138 }
6139
6140 // Fire away!
6141 this._send(data);
6142
6143 return this;
6144 },
6145
6146 captureBreadcrumb: function(obj) {
6147 var crumb = objectMerge(
6148 {
6149 timestamp: now() / 1000
6150 },
6151 obj
6152 );
6153
6154 if (isFunction(this._globalOptions.breadcrumbCallback)) {
6155 var result = this._globalOptions.breadcrumbCallback(crumb);
6156
6157 if (isObject(result) && !isEmptyObject(result)) {
6158 crumb = result;
6159 } else if (result === false) {
6160 return this;
6161 }
6162 }
6163
6164 this._breadcrumbs.push(crumb);
6165 if (this._breadcrumbs.length > this._globalOptions.maxBreadcrumbs) {
6166 this._breadcrumbs.shift();
6167 }
6168 return this;
6169 },
6170
6171 addPlugin: function(plugin /*arg1, arg2, ... argN*/) {
6172 var pluginArgs = [].slice.call(arguments, 1);
6173
6174 this._plugins.push([plugin, pluginArgs]);
6175 if (this._isRavenInstalled) {
6176 this._drainPlugins();
6177 }
6178
6179 return this;
6180 },
6181
6182 /*
6183 * Set/clear a user to be sent along with the payload.
6184 *
6185 * @param {object} user An object representing user data [optional]
6186 * @return {Raven}
6187 */
6188 setUserContext: function(user) {
6189 // Intentionally do not merge here since that's an unexpected behavior.
6190 this._globalContext.user = user;
6191
6192 return this;
6193 },
6194
6195 /*
6196 * Merge extra attributes to be sent along with the payload.
6197 *
6198 * @param {object} extra An object representing extra data [optional]
6199 * @return {Raven}
6200 */
6201 setExtraContext: function(extra) {
6202 this._mergeContext('extra', extra);
6203
6204 return this;
6205 },
6206
6207 /*
6208 * Merge tags to be sent along with the payload.
6209 *
6210 * @param {object} tags An object representing tags [optional]
6211 * @return {Raven}
6212 */
6213 setTagsContext: function(tags) {
6214 this._mergeContext('tags', tags);
6215
6216 return this;
6217 },
6218
6219 /*
6220 * Clear all of the context.
6221 *
6222 * @return {Raven}
6223 */
6224 clearContext: function() {
6225 this._globalContext = {};
6226
6227 return this;
6228 },
6229
6230 /*
6231 * Get a copy of the current context. This cannot be mutated.
6232 *
6233 * @return {object} copy of context
6234 */
6235 getContext: function() {
6236 // lol javascript
6237 return JSON.parse(stringify(this._globalContext));
6238 },
6239
6240 /*
6241 * Set environment of application
6242 *
6243 * @param {string} environment Typically something like 'production'.
6244 * @return {Raven}
6245 */
6246 setEnvironment: function(environment) {
6247 this._globalOptions.environment = environment;
6248
6249 return this;
6250 },
6251
6252 /*
6253 * Set release version of application
6254 *
6255 * @param {string} release Typically something like a git SHA to identify version
6256 * @return {Raven}
6257 */
6258 setRelease: function(release) {
6259 this._globalOptions.release = release;
6260
6261 return this;
6262 },
6263
6264 /*
6265 * Set the dataCallback option
6266 *
6267 * @param {function} callback The callback to run which allows the
6268 * data blob to be mutated before sending
6269 * @return {Raven}
6270 */
6271 setDataCallback: function(callback) {
6272 var original = this._globalOptions.dataCallback;
6273 this._globalOptions.dataCallback = keepOriginalCallback(original, callback);
6274 return this;
6275 },
6276
6277 /*
6278 * Set the breadcrumbCallback option
6279 *
6280 * @param {function} callback The callback to run which allows filtering
6281 * or mutating breadcrumbs
6282 * @return {Raven}
6283 */
6284 setBreadcrumbCallback: function(callback) {
6285 var original = this._globalOptions.breadcrumbCallback;
6286 this._globalOptions.breadcrumbCallback = keepOriginalCallback(original, callback);
6287 return this;
6288 },
6289
6290 /*
6291 * Set the shouldSendCallback option
6292 *
6293 * @param {function} callback The callback to run which allows
6294 * introspecting the blob before sending
6295 * @return {Raven}
6296 */
6297 setShouldSendCallback: function(callback) {
6298 var original = this._globalOptions.shouldSendCallback;
6299 this._globalOptions.shouldSendCallback = keepOriginalCallback(original, callback);
6300 return this;
6301 },
6302
6303 /**
6304 * Override the default HTTP transport mechanism that transmits data
6305 * to the Sentry server.
6306 *
6307 * @param {function} transport Function invoked instead of the default
6308 * `makeRequest` handler.
6309 *
6310 * @return {Raven}
6311 */
6312 setTransport: function(transport) {
6313 this._globalOptions.transport = transport;
6314
6315 return this;
6316 },
6317
6318 /*
6319 * Get the latest raw exception that was captured by Raven.
6320 *
6321 * @return {error}
6322 */
6323 lastException: function() {
6324 return this._lastCapturedException;
6325 },
6326
6327 /*
6328 * Get the last event id
6329 *
6330 * @return {string}
6331 */
6332 lastEventId: function() {
6333 return this._lastEventId;
6334 },
6335
6336 /*
6337 * Determine if Raven is setup and ready to go.
6338 *
6339 * @return {boolean}
6340 */
6341 isSetup: function() {
6342 if (!this._hasJSON) return false; // needs JSON support
6343 if (!this._globalServer) {
6344 if (!this.ravenNotConfiguredError) {
6345 this.ravenNotConfiguredError = true;
6346 this._logDebug('error', 'Error: Raven has not been configured.');
6347 }
6348 return false;
6349 }
6350 return true;
6351 },
6352
6353 afterLoad: function() {
6354 // TODO: remove window dependence?
6355
6356 // Attempt to initialize Raven on load
6357 var RavenConfig = _window.RavenConfig;
6358 if (RavenConfig) {
6359 this.config(RavenConfig.dsn, RavenConfig.config).install();
6360 }
6361 },
6362
6363 showReportDialog: function(options) {
6364 if (
6365 !_document // doesn't work without a document (React native)
6366 )
6367 return;
6368
6369 options = options || {};
6370
6371 var lastEventId = options.eventId || this.lastEventId();
6372 if (!lastEventId) {
6373 throw new RavenConfigError('Missing eventId');
6374 }
6375
6376 var dsn = options.dsn || this._dsn;
6377 if (!dsn) {
6378 throw new RavenConfigError('Missing DSN');
6379 }
6380
6381 var encode = encodeURIComponent;
6382 var qs = '';
6383 qs += '?eventId=' + encode(lastEventId);
6384 qs += '&dsn=' + encode(dsn);
6385
6386 var user = options.user || this._globalContext.user;
6387 if (user) {
6388 if (user.name) qs += '&name=' + encode(user.name);
6389 if (user.email) qs += '&email=' + encode(user.email);
6390 }
6391
6392 var globalServer = this._getGlobalServer(this._parseDSN(dsn));
6393
6394 var script = _document.createElement('script');
6395 script.async = true;
6396 script.src = globalServer + '/api/embed/error-page/' + qs;
6397 (_document.head || _document.body).appendChild(script);
6398 },
6399
6400 /**** Private functions ****/
6401 _ignoreNextOnError: function() {
6402 var self = this;
6403 this._ignoreOnError += 1;
6404 setTimeout(function() {
6405 // onerror should trigger before setTimeout
6406 self._ignoreOnError -= 1;
6407 });
6408 },
6409
6410 _triggerEvent: function(eventType, options) {
6411 // NOTE: `event` is a native browser thing, so let's avoid conflicting wiht it
6412 var evt, key;
6413
6414 if (!this._hasDocument) return;
6415
6416 options = options || {};
6417
6418 eventType = 'raven' + eventType.substr(0, 1).toUpperCase() + eventType.substr(1);
6419
6420 if (_document.createEvent) {
6421 evt = _document.createEvent('HTMLEvents');
6422 evt.initEvent(eventType, true, true);
6423 } else {
6424 evt = _document.createEventObject();
6425 evt.eventType = eventType;
6426 }
6427
6428 for (key in options)
6429 if (hasKey(options, key)) {
6430 evt[key] = options[key];
6431 }
6432
6433 if (_document.createEvent) {
6434 // IE9 if standards
6435 _document.dispatchEvent(evt);
6436 } else {
6437 // IE8 regardless of Quirks or Standards
6438 // IE9 if quirks
6439 try {
6440 _document.fireEvent('on' + evt.eventType.toLowerCase(), evt);
6441 } catch (e) {
6442 // Do nothing
6443 }
6444 }
6445 },
6446
6447 /**
6448 * Wraps addEventListener to capture UI breadcrumbs
6449 * @param evtName the event name (e.g. "click")
6450 * @returns {Function}
6451 * @private
6452 */
6453 _breadcrumbEventHandler: function(evtName) {
6454 var self = this;
6455 return function(evt) {
6456 // reset keypress timeout; e.g. triggering a 'click' after
6457 // a 'keypress' will reset the keypress debounce so that a new
6458 // set of keypresses can be recorded
6459 self._keypressTimeout = null;
6460
6461 // It's possible this handler might trigger multiple times for the same
6462 // event (e.g. event propagation through node ancestors). Ignore if we've
6463 // already captured the event.
6464 if (self._lastCapturedEvent === evt) return;
6465
6466 self._lastCapturedEvent = evt;
6467
6468 // try/catch both:
6469 // - accessing evt.target (see getsentry/raven-js#838, #768)
6470 // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly
6471 // can throw an exception in some circumstances.
6472 var target;
6473 try {
6474 target = htmlTreeAsString(evt.target);
6475 } catch (e) {
6476 target = '<unknown>';
6477 }
6478
6479 self.captureBreadcrumb({
6480 category: 'ui.' + evtName, // e.g. ui.click, ui.input
6481 message: target
6482 });
6483 };
6484 },
6485
6486 /**
6487 * Wraps addEventListener to capture keypress UI events
6488 * @returns {Function}
6489 * @private
6490 */
6491 _keypressEventHandler: function() {
6492 var self = this,
6493 debounceDuration = 1000; // milliseconds
6494
6495 // TODO: if somehow user switches keypress target before
6496 // debounce timeout is triggered, we will only capture
6497 // a single breadcrumb from the FIRST target (acceptable?)
6498 return function(evt) {
6499 var target;
6500 try {
6501 target = evt.target;
6502 } catch (e) {
6503 // just accessing event properties can throw an exception in some rare circumstances
6504 // see: https://github.com/getsentry/raven-js/issues/838
6505 return;
6506 }
6507 var tagName = target && target.tagName;
6508
6509 // only consider keypress events on actual input elements
6510 // this will disregard keypresses targeting body (e.g. tabbing
6511 // through elements, hotkeys, etc)
6512 if (
6513 !tagName ||
6514 (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable)
6515 )
6516 return;
6517
6518 // record first keypress in a series, but ignore subsequent
6519 // keypresses until debounce clears
6520 var timeout = self._keypressTimeout;
6521 if (!timeout) {
6522 self._breadcrumbEventHandler('input')(evt);
6523 }
6524 clearTimeout(timeout);
6525 self._keypressTimeout = setTimeout(function() {
6526 self._keypressTimeout = null;
6527 }, debounceDuration);
6528 };
6529 },
6530
6531 /**
6532 * Captures a breadcrumb of type "navigation", normalizing input URLs
6533 * @param to the originating URL
6534 * @param from the target URL
6535 * @private
6536 */
6537 _captureUrlChange: function(from, to) {
6538 var parsedLoc = parseUrl(this._location.href);
6539 var parsedTo = parseUrl(to);
6540 var parsedFrom = parseUrl(from);
6541
6542 // because onpopstate only tells you the "new" (to) value of location.href, and
6543 // not the previous (from) value, we need to track the value of the current URL
6544 // state ourselves
6545 this._lastHref = to;
6546
6547 // Use only the path component of the URL if the URL matches the current
6548 // document (almost all the time when using pushState)
6549 if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host)
6550 to = parsedTo.relative;
6551 if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host)
6552 from = parsedFrom.relative;
6553
6554 this.captureBreadcrumb({
6555 category: 'navigation',
6556 data: {
6557 to: to,
6558 from: from
6559 }
6560 });
6561 },
6562
6563 /**
6564 * Wrap timer functions and event targets to catch errors and provide
6565 * better metadata.
6566 */
6567 _instrumentTryCatch: function() {
6568 var self = this;
6569
6570 var wrappedBuiltIns = self._wrappedBuiltIns;
6571
6572 function wrapTimeFn(orig) {
6573 return function(fn, t) {
6574 // preserve arity
6575 // Make a copy of the arguments to prevent deoptimization
6576 // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
6577 var args = new Array(arguments.length);
6578 for (var i = 0; i < args.length; ++i) {
6579 args[i] = arguments[i];
6580 }
6581 var originalCallback = args[0];
6582 if (isFunction(originalCallback)) {
6583 args[0] = self.wrap(originalCallback);
6584 }
6585
6586 // IE < 9 doesn't support .call/.apply on setInterval/setTimeout, but it
6587 // also supports only two arguments and doesn't care what this is, so we
6588 // can just call the original function directly.
6589 if (orig.apply) {
6590 return orig.apply(this, args);
6591 } else {
6592 return orig(args[0], args[1]);
6593 }
6594 };
6595 }
6596
6597 var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
6598
6599 function wrapEventTarget(global) {
6600 var proto = _window[global] && _window[global].prototype;
6601 if (proto && proto.hasOwnProperty && proto.hasOwnProperty('addEventListener')) {
6602 fill(
6603 proto,
6604 'addEventListener',
6605 function(orig) {
6606 return function(evtName, fn, capture, secure) {
6607 // preserve arity
6608 try {
6609 if (fn && fn.handleEvent) {
6610 fn.handleEvent = self.wrap(fn.handleEvent);
6611 }
6612 } catch (err) {
6613 // can sometimes get 'Permission denied to access property "handle Event'
6614 }
6615
6616 // More breadcrumb DOM capture ... done here and not in `_instrumentBreadcrumbs`
6617 // so that we don't have more than one wrapper function
6618 var before, clickHandler, keypressHandler;
6619
6620 if (
6621 autoBreadcrumbs &&
6622 autoBreadcrumbs.dom &&
6623 (global === 'EventTarget' || global === 'Node')
6624 ) {
6625 // NOTE: generating multiple handlers per addEventListener invocation, should
6626 // revisit and verify we can just use one (almost certainly)
6627 clickHandler = self._breadcrumbEventHandler('click');
6628 keypressHandler = self._keypressEventHandler();
6629 before = function(evt) {
6630 // need to intercept every DOM event in `before` argument, in case that
6631 // same wrapped method is re-used for different events (e.g. mousemove THEN click)
6632 // see #724
6633 if (!evt) return;
6634
6635 var eventType;
6636 try {
6637 eventType = evt.type;
6638 } catch (e) {
6639 // just accessing event properties can throw an exception in some rare circumstances
6640 // see: https://github.com/getsentry/raven-js/issues/838
6641 return;
6642 }
6643 if (eventType === 'click') return clickHandler(evt);
6644 else if (eventType === 'keypress') return keypressHandler(evt);
6645 };
6646 }
6647 return orig.call(
6648 this,
6649 evtName,
6650 self.wrap(fn, undefined, before),
6651 capture,
6652 secure
6653 );
6654 };
6655 },
6656 wrappedBuiltIns
6657 );
6658 fill(
6659 proto,
6660 'removeEventListener',
6661 function(orig) {
6662 return function(evt, fn, capture, secure) {
6663 try {
6664 fn = fn && (fn.__raven_wrapper__ ? fn.__raven_wrapper__ : fn);
6665 } catch (e) {
6666 // ignore, accessing __raven_wrapper__ will throw in some Selenium environments
6667 }
6668 return orig.call(this, evt, fn, capture, secure);
6669 };
6670 },
6671 wrappedBuiltIns
6672 );
6673 }
6674 }
6675
6676 fill(_window, 'setTimeout', wrapTimeFn, wrappedBuiltIns);
6677 fill(_window, 'setInterval', wrapTimeFn, wrappedBuiltIns);
6678 if (_window.requestAnimationFrame) {
6679 fill(
6680 _window,
6681 'requestAnimationFrame',
6682 function(orig) {
6683 return function(cb) {
6684 return orig(self.wrap(cb));
6685 };
6686 },
6687 wrappedBuiltIns
6688 );
6689 }
6690
6691 // event targets borrowed from bugsnag-js:
6692 // https://github.com/bugsnag/bugsnag-js/blob/master/src/bugsnag.js#L666
6693 var eventTargets = [
6694 'EventTarget',
6695 'Window',
6696 'Node',
6697 'ApplicationCache',
6698 'AudioTrackList',
6699 'ChannelMergerNode',
6700 'CryptoOperation',
6701 'EventSource',
6702 'FileReader',
6703 'HTMLUnknownElement',
6704 'IDBDatabase',
6705 'IDBRequest',
6706 'IDBTransaction',
6707 'KeyOperation',
6708 'MediaController',
6709 'MessagePort',
6710 'ModalWindow',
6711 'Notification',
6712 'SVGElementInstance',
6713 'Screen',
6714 'TextTrack',
6715 'TextTrackCue',
6716 'TextTrackList',
6717 'WebSocket',
6718 'WebSocketWorker',
6719 'Worker',
6720 'XMLHttpRequest',
6721 'XMLHttpRequestEventTarget',
6722 'XMLHttpRequestUpload'
6723 ];
6724 for (var i = 0; i < eventTargets.length; i++) {
6725 wrapEventTarget(eventTargets[i]);
6726 }
6727 },
6728
6729 /**
6730 * Instrument browser built-ins w/ breadcrumb capturing
6731 * - XMLHttpRequests
6732 * - DOM interactions (click/typing)
6733 * - window.location changes
6734 * - console
6735 *
6736 * Can be disabled or individually configured via the `autoBreadcrumbs` config option
6737 */
6738 _instrumentBreadcrumbs: function() {
6739 var self = this;
6740 var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
6741
6742 var wrappedBuiltIns = self._wrappedBuiltIns;
6743
6744 function wrapProp(prop, xhr) {
6745 if (prop in xhr && isFunction(xhr[prop])) {
6746 fill(xhr, prop, function(orig) {
6747 return self.wrap(orig);
6748 }); // intentionally don't track filled methods on XHR instances
6749 }
6750 }
6751
6752 if (autoBreadcrumbs.xhr && 'XMLHttpRequest' in _window) {
6753 var xhrproto = XMLHttpRequest.prototype;
6754 fill(
6755 xhrproto,
6756 'open',
6757 function(origOpen) {
6758 return function(method, url) {
6759 // preserve arity
6760
6761 // if Sentry key appears in URL, don't capture
6762 if (isString(url) && url.indexOf(self._globalKey) === -1) {
6763 this.__raven_xhr = {
6764 method: method,
6765 url: url,
6766 status_code: null
6767 };
6768 }
6769
6770 return origOpen.apply(this, arguments);
6771 };
6772 },
6773 wrappedBuiltIns
6774 );
6775
6776 fill(
6777 xhrproto,
6778 'send',
6779 function(origSend) {
6780 return function(data) {
6781 // preserve arity
6782 var xhr = this;
6783
6784 function onreadystatechangeHandler() {
6785 if (xhr.__raven_xhr && xhr.readyState === 4) {
6786 try {
6787 // touching statusCode in some platforms throws
6788 // an exception
6789 xhr.__raven_xhr.status_code = xhr.status;
6790 } catch (e) {
6791 /* do nothing */
6792 }
6793
6794 self.captureBreadcrumb({
6795 type: 'http',
6796 category: 'xhr',
6797 data: xhr.__raven_xhr
6798 });
6799 }
6800 }
6801
6802 var props = ['onload', 'onerror', 'onprogress'];
6803 for (var j = 0; j < props.length; j++) {
6804 wrapProp(props[j], xhr);
6805 }
6806
6807 if ('onreadystatechange' in xhr && isFunction(xhr.onreadystatechange)) {
6808 fill(
6809 xhr,
6810 'onreadystatechange',
6811 function(orig) {
6812 return self.wrap(orig, undefined, onreadystatechangeHandler);
6813 } /* intentionally don't track this instrumentation */
6814 );
6815 } else {
6816 // if onreadystatechange wasn't actually set by the page on this xhr, we
6817 // are free to set our own and capture the breadcrumb
6818 xhr.onreadystatechange = onreadystatechangeHandler;
6819 }
6820
6821 return origSend.apply(this, arguments);
6822 };
6823 },
6824 wrappedBuiltIns
6825 );
6826 }
6827
6828 if (autoBreadcrumbs.xhr && 'fetch' in _window) {
6829 fill(
6830 _window,
6831 'fetch',
6832 function(origFetch) {
6833 return function(fn, t) {
6834 // preserve arity
6835 // Make a copy of the arguments to prevent deoptimization
6836 // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
6837 var args = new Array(arguments.length);
6838 for (var i = 0; i < args.length; ++i) {
6839 args[i] = arguments[i];
6840 }
6841
6842 var fetchInput = args[0];
6843 var method = 'GET';
6844 var url;
6845
6846 if (typeof fetchInput === 'string') {
6847 url = fetchInput;
6848 } else if ('Request' in _window && fetchInput instanceof _window.Request) {
6849 url = fetchInput.url;
6850 if (fetchInput.method) {
6851 method = fetchInput.method;
6852 }
6853 } else {
6854 url = '' + fetchInput;
6855 }
6856
6857 if (args[1] && args[1].method) {
6858 method = args[1].method;
6859 }
6860
6861 var fetchData = {
6862 method: method,
6863 url: url,
6864 status_code: null
6865 };
6866
6867 self.captureBreadcrumb({
6868 type: 'http',
6869 category: 'fetch',
6870 data: fetchData
6871 });
6872
6873 return origFetch.apply(this, args).then(function(response) {
6874 fetchData.status_code = response.status;
6875
6876 return response;
6877 });
6878 };
6879 },
6880 wrappedBuiltIns
6881 );
6882 }
6883
6884 // Capture breadcrumbs from any click that is unhandled / bubbled up all the way
6885 // to the document. Do this before we instrument addEventListener.
6886 if (autoBreadcrumbs.dom && this._hasDocument) {
6887 if (_document.addEventListener) {
6888 _document.addEventListener('click', self._breadcrumbEventHandler('click'), false);
6889 _document.addEventListener('keypress', self._keypressEventHandler(), false);
6890 } else {
6891 // IE8 Compatibility
6892 _document.attachEvent('onclick', self._breadcrumbEventHandler('click'));
6893 _document.attachEvent('onkeypress', self._keypressEventHandler());
6894 }
6895 }
6896
6897 // record navigation (URL) changes
6898 // NOTE: in Chrome App environment, touching history.pushState, *even inside
6899 // a try/catch block*, will cause Chrome to output an error to console.error
6900 // borrowed from: https://github.com/angular/angular.js/pull/13945/files
6901 var chrome = _window.chrome;
6902 var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;
6903 var hasPushAndReplaceState =
6904 !isChromePackagedApp &&
6905 _window.history &&
6906 history.pushState &&
6907 history.replaceState;
6908 if (autoBreadcrumbs.location && hasPushAndReplaceState) {
6909 // TODO: remove onpopstate handler on uninstall()
6910 var oldOnPopState = _window.onpopstate;
6911 _window.onpopstate = function() {
6912 var currentHref = self._location.href;
6913 self._captureUrlChange(self._lastHref, currentHref);
6914
6915 if (oldOnPopState) {
6916 return oldOnPopState.apply(this, arguments);
6917 }
6918 };
6919
6920 var historyReplacementFunction = function(origHistFunction) {
6921 // note history.pushState.length is 0; intentionally not declaring
6922 // params to preserve 0 arity
6923 return function(/* state, title, url */) {
6924 var url = arguments.length > 2 ? arguments[2] : undefined;
6925
6926 // url argument is optional
6927 if (url) {
6928 // coerce to string (this is what pushState does)
6929 self._captureUrlChange(self._lastHref, url + '');
6930 }
6931
6932 return origHistFunction.apply(this, arguments);
6933 };
6934 };
6935
6936 fill(history, 'pushState', historyReplacementFunction, wrappedBuiltIns);
6937 fill(history, 'replaceState', historyReplacementFunction, wrappedBuiltIns);
6938 }
6939
6940 if (autoBreadcrumbs.console && 'console' in _window && console.log) {
6941 // console
6942 var consoleMethodCallback = function(msg, data) {
6943 self.captureBreadcrumb({
6944 message: msg,
6945 level: data.level,
6946 category: 'console'
6947 });
6948 };
6949
6950 each(['debug', 'info', 'warn', 'error', 'log'], function(_, level) {
6951 wrapConsoleMethod(console, level, consoleMethodCallback);
6952 });
6953 }
6954 },
6955
6956 _restoreBuiltIns: function() {
6957 // restore any wrapped builtins
6958 var builtin;
6959 while (this._wrappedBuiltIns.length) {
6960 builtin = this._wrappedBuiltIns.shift();
6961
6962 var obj = builtin[0],
6963 name = builtin[1],
6964 orig = builtin[2];
6965
6966 obj[name] = orig;
6967 }
6968 },
6969
6970 _drainPlugins: function() {
6971 var self = this;
6972
6973 // FIX ME TODO
6974 each(this._plugins, function(_, plugin) {
6975 var installer = plugin[0];
6976 var args = plugin[1];
6977 installer.apply(self, [self].concat(args));
6978 });
6979 },
6980
6981 _parseDSN: function(str) {
6982 var m = dsnPattern.exec(str),
6983 dsn = {},
6984 i = 7;
6985
6986 try {
6987 while (i--) dsn[dsnKeys[i]] = m[i] || '';
6988 } catch (e) {
6989 throw new RavenConfigError('Invalid DSN: ' + str);
6990 }
6991
6992 if (dsn.pass && !this._globalOptions.allowSecretKey) {
6993 throw new RavenConfigError(
6994 'Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key'
6995 );
6996 }
6997
6998 return dsn;
6999 },
7000
7001 _getGlobalServer: function(uri) {
7002 // assemble the endpoint from the uri pieces
7003 var globalServer = '//' + uri.host + (uri.port ? ':' + uri.port : '');
7004
7005 if (uri.protocol) {
7006 globalServer = uri.protocol + ':' + globalServer;
7007 }
7008 return globalServer;
7009 },
7010
7011 _handleOnErrorStackInfo: function() {
7012 // if we are intentionally ignoring errors via onerror, bail out
7013 if (!this._ignoreOnError) {
7014 this._handleStackInfo.apply(this, arguments);
7015 }
7016 },
7017
7018 _handleStackInfo: function(stackInfo, options) {
7019 var frames = this._prepareFrames(stackInfo, options);
7020
7021 this._triggerEvent('handle', {
7022 stackInfo: stackInfo,
7023 options: options
7024 });
7025
7026 this._processException(
7027 stackInfo.name,
7028 stackInfo.message,
7029 stackInfo.url,
7030 stackInfo.lineno,
7031 frames,
7032 options
7033 );
7034 },
7035
7036 _prepareFrames: function(stackInfo, options) {
7037 var self = this;
7038 var frames = [];
7039 if (stackInfo.stack && stackInfo.stack.length) {
7040 each(stackInfo.stack, function(i, stack) {
7041 var frame = self._normalizeFrame(stack, stackInfo.url);
7042 if (frame) {
7043 frames.push(frame);
7044 }
7045 });
7046
7047 // e.g. frames captured via captureMessage throw
7048 if (options && options.trimHeadFrames) {
7049 for (var j = 0; j < options.trimHeadFrames && j < frames.length; j++) {
7050 frames[j].in_app = false;
7051 }
7052 }
7053 }
7054 frames = frames.slice(0, this._globalOptions.stackTraceLimit);
7055 return frames;
7056 },
7057
7058 _normalizeFrame: function(frame, stackInfoUrl) {
7059 // normalize the frames data
7060 var normalized = {
7061 filename: frame.url,
7062 lineno: frame.line,
7063 colno: frame.column,
7064 function: frame.func || '?'
7065 };
7066
7067 // Case when we don't have any information about the error
7068 // E.g. throwing a string or raw object, instead of an `Error` in Firefox
7069 // Generating synthetic error doesn't add any value here
7070 //
7071 // We should probably somehow let a user know that they should fix their code
7072 if (!frame.url) {
7073 normalized.filename = stackInfoUrl; // fallback to whole stacks url from onerror handler
7074 }
7075
7076 normalized.in_app = !// determine if an exception came from outside of our app
7077 // first we check the global includePaths list.
7078 (
7079 (!!this._globalOptions.includePaths.test &&
7080 !this._globalOptions.includePaths.test(normalized.filename)) ||
7081 // Now we check for fun, if the function name is Raven or TraceKit
7082 /(Raven|TraceKit)\./.test(normalized['function']) ||
7083 // finally, we do a last ditch effort and check for raven.min.js
7084 /raven\.(min\.)?js$/.test(normalized.filename)
7085 );
7086
7087 return normalized;
7088 },
7089
7090 _processException: function(type, message, fileurl, lineno, frames, options) {
7091 var prefixedMessage = (type ? type + ': ' : '') + (message || '');
7092 if (
7093 !!this._globalOptions.ignoreErrors.test &&
7094 (this._globalOptions.ignoreErrors.test(message) ||
7095 this._globalOptions.ignoreErrors.test(prefixedMessage))
7096 ) {
7097 return;
7098 }
7099
7100 var stacktrace;
7101
7102 if (frames && frames.length) {
7103 fileurl = frames[0].filename || fileurl;
7104 // Sentry expects frames oldest to newest
7105 // and JS sends them as newest to oldest
7106 frames.reverse();
7107 stacktrace = {frames: frames};
7108 } else if (fileurl) {
7109 stacktrace = {
7110 frames: [
7111 {
7112 filename: fileurl,
7113 lineno: lineno,
7114 in_app: true
7115 }
7116 ]
7117 };
7118 }
7119
7120 if (
7121 !!this._globalOptions.ignoreUrls.test &&
7122 this._globalOptions.ignoreUrls.test(fileurl)
7123 ) {
7124 return;
7125 }
7126
7127 if (
7128 !!this._globalOptions.whitelistUrls.test &&
7129 !this._globalOptions.whitelistUrls.test(fileurl)
7130 ) {
7131 return;
7132 }
7133
7134 var data = objectMerge(
7135 {
7136 // sentry.interfaces.Exception
7137 exception: {
7138 values: [
7139 {
7140 type: type,
7141 value: message,
7142 stacktrace: stacktrace
7143 }
7144 ]
7145 },
7146 culprit: fileurl
7147 },
7148 options
7149 );
7150
7151 // Fire away!
7152 this._send(data);
7153 },
7154
7155 _trimPacket: function(data) {
7156 // For now, we only want to truncate the two different messages
7157 // but this could/should be expanded to just trim everything
7158 var max = this._globalOptions.maxMessageLength;
7159 if (data.message) {
7160 data.message = truncate(data.message, max);
7161 }
7162 if (data.exception) {
7163 var exception = data.exception.values[0];
7164 exception.value = truncate(exception.value, max);
7165 }
7166
7167 var request = data.request;
7168 if (request) {
7169 if (request.url) {
7170 request.url = truncate(request.url, this._globalOptions.maxUrlLength);
7171 }
7172 if (request.Referer) {
7173 request.Referer = truncate(request.Referer, this._globalOptions.maxUrlLength);
7174 }
7175 }
7176
7177 if (data.breadcrumbs && data.breadcrumbs.values)
7178 this._trimBreadcrumbs(data.breadcrumbs);
7179
7180 return data;
7181 },
7182
7183 /**
7184 * Truncate breadcrumb values (right now just URLs)
7185 */
7186 _trimBreadcrumbs: function(breadcrumbs) {
7187 // known breadcrumb properties with urls
7188 // TODO: also consider arbitrary prop values that start with (https?)?://
7189 var urlProps = ['to', 'from', 'url'],
7190 urlProp,
7191 crumb,
7192 data;
7193
7194 for (var i = 0; i < breadcrumbs.values.length; ++i) {
7195 crumb = breadcrumbs.values[i];
7196 if (
7197 !crumb.hasOwnProperty('data') ||
7198 !isObject(crumb.data) ||
7199 objectFrozen(crumb.data)
7200 )
7201 continue;
7202
7203 data = objectMerge({}, crumb.data);
7204 for (var j = 0; j < urlProps.length; ++j) {
7205 urlProp = urlProps[j];
7206 if (data.hasOwnProperty(urlProp) && data[urlProp]) {
7207 data[urlProp] = truncate(data[urlProp], this._globalOptions.maxUrlLength);
7208 }
7209 }
7210 breadcrumbs.values[i].data = data;
7211 }
7212 },
7213
7214 _getHttpData: function() {
7215 if (!this._hasNavigator && !this._hasDocument) return;
7216 var httpData = {};
7217
7218 if (this._hasNavigator && _navigator.userAgent) {
7219 httpData.headers = {
7220 'User-Agent': navigator.userAgent
7221 };
7222 }
7223
7224 if (this._hasDocument) {
7225 if (_document.location && _document.location.href) {
7226 httpData.url = _document.location.href;
7227 }
7228 if (_document.referrer) {
7229 if (!httpData.headers) httpData.headers = {};
7230 httpData.headers.Referer = _document.referrer;
7231 }
7232 }
7233
7234 return httpData;
7235 },
7236
7237 _resetBackoff: function() {
7238 this._backoffDuration = 0;
7239 this._backoffStart = null;
7240 },
7241
7242 _shouldBackoff: function() {
7243 return this._backoffDuration && now() - this._backoffStart < this._backoffDuration;
7244 },
7245
7246 /**
7247 * Returns true if the in-process data payload matches the signature
7248 * of the previously-sent data
7249 *
7250 * NOTE: This has to be done at this level because TraceKit can generate
7251 * data from window.onerror WITHOUT an exception object (IE8, IE9,
7252 * other old browsers). This can take the form of an "exception"
7253 * data object with a single frame (derived from the onerror args).
7254 */
7255 _isRepeatData: function(current) {
7256 var last = this._lastData;
7257
7258 if (
7259 !last ||
7260 current.message !== last.message || // defined for captureMessage
7261 current.culprit !== last.culprit // defined for captureException/onerror
7262 )
7263 return false;
7264
7265 // Stacktrace interface (i.e. from captureMessage)
7266 if (current.stacktrace || last.stacktrace) {
7267 return isSameStacktrace(current.stacktrace, last.stacktrace);
7268 } else if (current.exception || last.exception) {
7269 // Exception interface (i.e. from captureException/onerror)
7270 return isSameException(current.exception, last.exception);
7271 }
7272
7273 return true;
7274 },
7275
7276 _setBackoffState: function(request) {
7277 // If we are already in a backoff state, don't change anything
7278 if (this._shouldBackoff()) {
7279 return;
7280 }
7281
7282 var status = request.status;
7283
7284 // 400 - project_id doesn't exist or some other fatal
7285 // 401 - invalid/revoked dsn
7286 // 429 - too many requests
7287 if (!(status === 400 || status === 401 || status === 429)) return;
7288
7289 var retry;
7290 try {
7291 // If Retry-After is not in Access-Control-Expose-Headers, most
7292 // browsers will throw an exception trying to access it
7293 retry = request.getResponseHeader('Retry-After');
7294 retry = parseInt(retry, 10) * 1000; // Retry-After is returned in seconds
7295 } catch (e) {
7296 /* eslint no-empty:0 */
7297 }
7298
7299 this._backoffDuration = retry
7300 ? // If Sentry server returned a Retry-After value, use it
7301 retry
7302 : // Otherwise, double the last backoff duration (starts at 1 sec)
7303 this._backoffDuration * 2 || 1000;
7304
7305 this._backoffStart = now();
7306 },
7307
7308 _send: function(data) {
7309 var globalOptions = this._globalOptions;
7310
7311 var baseData = {
7312 project: this._globalProject,
7313 logger: globalOptions.logger,
7314 platform: 'javascript'
7315 },
7316 httpData = this._getHttpData();
7317
7318 if (httpData) {
7319 baseData.request = httpData;
7320 }
7321
7322 // HACK: delete `trimHeadFrames` to prevent from appearing in outbound payload
7323 if (data.trimHeadFrames) delete data.trimHeadFrames;
7324
7325 data = objectMerge(baseData, data);
7326
7327 // Merge in the tags and extra separately since objectMerge doesn't handle a deep merge
7328 data.tags = objectMerge(objectMerge({}, this._globalContext.tags), data.tags);
7329 data.extra = objectMerge(objectMerge({}, this._globalContext.extra), data.extra);
7330
7331 // Send along our own collected metadata with extra
7332 data.extra['session:duration'] = now() - this._startTime;
7333
7334 if (this._breadcrumbs && this._breadcrumbs.length > 0) {
7335 // intentionally make shallow copy so that additions
7336 // to breadcrumbs aren't accidentally sent in this request
7337 data.breadcrumbs = {
7338 values: [].slice.call(this._breadcrumbs, 0)
7339 };
7340 }
7341
7342 // If there are no tags/extra, strip the key from the payload alltogther.
7343 if (isEmptyObject(data.tags)) delete data.tags;
7344
7345 if (this._globalContext.user) {
7346 // sentry.interfaces.User
7347 data.user = this._globalContext.user;
7348 }
7349
7350 // Include the environment if it's defined in globalOptions
7351 if (globalOptions.environment) data.environment = globalOptions.environment;
7352
7353 // Include the release if it's defined in globalOptions
7354 if (globalOptions.release) data.release = globalOptions.release;
7355
7356 // Include server_name if it's defined in globalOptions
7357 if (globalOptions.serverName) data.server_name = globalOptions.serverName;
7358
7359 if (isFunction(globalOptions.dataCallback)) {
7360 data = globalOptions.dataCallback(data) || data;
7361 }
7362
7363 // Why??????????
7364 if (!data || isEmptyObject(data)) {
7365 return;
7366 }
7367
7368 // Check if the request should be filtered or not
7369 if (
7370 isFunction(globalOptions.shouldSendCallback) &&
7371 !globalOptions.shouldSendCallback(data)
7372 ) {
7373 return;
7374 }
7375
7376 // Backoff state: Sentry server previously responded w/ an error (e.g. 429 - too many requests),
7377 // so drop requests until "cool-off" period has elapsed.
7378 if (this._shouldBackoff()) {
7379 this._logDebug('warn', 'Raven dropped error due to backoff: ', data);
7380 return;
7381 }
7382
7383 if (typeof globalOptions.sampleRate === 'number') {
7384 if (Math.random() < globalOptions.sampleRate) {
7385 this._sendProcessedPayload(data);
7386 }
7387 } else {
7388 this._sendProcessedPayload(data);
7389 }
7390 },
7391
7392 _getUuid: function() {
7393 return uuid4();
7394 },
7395
7396 _sendProcessedPayload: function(data, callback) {
7397 var self = this;
7398 var globalOptions = this._globalOptions;
7399
7400 if (!this.isSetup()) return;
7401
7402 // Try and clean up the packet before sending by truncating long values
7403 data = this._trimPacket(data);
7404
7405 // ideally duplicate error testing should occur *before* dataCallback/shouldSendCallback,
7406 // but this would require copying an un-truncated copy of the data packet, which can be
7407 // arbitrarily deep (extra_data) -- could be worthwhile? will revisit
7408 if (!this._globalOptions.allowDuplicates && this._isRepeatData(data)) {
7409 this._logDebug('warn', 'Raven dropped repeat event: ', data);
7410 return;
7411 }
7412
7413 // Send along an event_id if not explicitly passed.
7414 // This event_id can be used to reference the error within Sentry itself.
7415 // Set lastEventId after we know the error should actually be sent
7416 this._lastEventId = data.event_id || (data.event_id = this._getUuid());
7417
7418 // Store outbound payload after trim
7419 this._lastData = data;
7420
7421 this._logDebug('debug', 'Raven about to send:', data);
7422
7423 var auth = {
7424 sentry_version: '7',
7425 sentry_client: 'raven-js/' + this.VERSION,
7426 sentry_key: this._globalKey
7427 };
7428
7429 if (this._globalSecret) {
7430 auth.sentry_secret = this._globalSecret;
7431 }
7432
7433 var exception = data.exception && data.exception.values[0];
7434 this.captureBreadcrumb({
7435 category: 'sentry',
7436 message: exception
7437 ? (exception.type ? exception.type + ': ' : '') + exception.value
7438 : data.message,
7439 event_id: data.event_id,
7440 level: data.level || 'error' // presume error unless specified
7441 });
7442
7443 var url = this._globalEndpoint;
7444 (globalOptions.transport || this._makeRequest).call(this, {
7445 url: url,
7446 auth: auth,
7447 data: data,
7448 options: globalOptions,
7449 onSuccess: function success() {
7450 self._resetBackoff();
7451
7452 self._triggerEvent('success', {
7453 data: data,
7454 src: url
7455 });
7456 callback && callback();
7457 },
7458 onError: function failure(error) {
7459 self._logDebug('error', 'Raven transport failed to send: ', error);
7460
7461 if (error.request) {
7462 self._setBackoffState(error.request);
7463 }
7464
7465 self._triggerEvent('failure', {
7466 data: data,
7467 src: url
7468 });
7469 error = error || new Error('Raven send failed (no additional details provided)');
7470 callback && callback(error);
7471 }
7472 });
7473 },
7474
7475 _makeRequest: function(opts) {
7476 var request = _window.XMLHttpRequest && new _window.XMLHttpRequest();
7477 if (!request) return;
7478
7479 // if browser doesn't support CORS (e.g. IE7), we are out of luck
7480 var hasCORS = 'withCredentials' in request || typeof XDomainRequest !== 'undefined';
7481
7482 if (!hasCORS) return;
7483
7484 var url = opts.url;
7485
7486 if ('withCredentials' in request) {
7487 request.onreadystatechange = function() {
7488 if (request.readyState !== 4) {
7489 return;
7490 } else if (request.status === 200) {
7491 opts.onSuccess && opts.onSuccess();
7492 } else if (opts.onError) {
7493 var err = new Error('Sentry error code: ' + request.status);
7494 err.request = request;
7495 opts.onError(err);
7496 }
7497 };
7498 } else {
7499 request = new XDomainRequest();
7500 // xdomainrequest cannot go http -> https (or vice versa),
7501 // so always use protocol relative
7502 url = url.replace(/^https?:/, '');
7503
7504 // onreadystatechange not supported by XDomainRequest
7505 if (opts.onSuccess) {
7506 request.onload = opts.onSuccess;
7507 }
7508 if (opts.onError) {
7509 request.onerror = function() {
7510 var err = new Error('Sentry error code: XDomainRequest');
7511 err.request = request;
7512 opts.onError(err);
7513 };
7514 }
7515 }
7516
7517 // NOTE: auth is intentionally sent as part of query string (NOT as custom
7518 // HTTP header) so as to avoid preflight CORS requests
7519 request.open('POST', url + '?' + urlencode(opts.auth));
7520 request.send(stringify(opts.data));
7521 },
7522
7523 _logDebug: function(level) {
7524 if (this._originalConsoleMethods[level] && this.debug) {
7525 // In IE<10 console methods do not have their own 'apply' method
7526 Function.prototype.apply.call(
7527 this._originalConsoleMethods[level],
7528 this._originalConsole,
7529 [].slice.call(arguments, 1)
7530 );
7531 }
7532 },
7533
7534 _mergeContext: function(key, context) {
7535 if (isUndefined(context)) {
7536 delete this._globalContext[key];
7537 } else {
7538 this._globalContext[key] = objectMerge(this._globalContext[key] || {}, context);
7539 }
7540 }
7541 };
7542
7543 // Deprecations
7544 Raven.prototype.setUser = Raven.prototype.setUserContext;
7545 Raven.prototype.setReleaseContext = Raven.prototype.setRelease;
7546
7547 module.exports = Raven;
7548
7549
7550 /***/ }),
7551
7552 /***/ "./node_modules/raven-js/src/singleton.js":
7553 /*!************************************************!*\
7554 !*** ./node_modules/raven-js/src/singleton.js ***!
7555 \************************************************/
7556 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7557
7558 /**
7559 * Enforces a single instance of the Raven client, and the
7560 * main entry point for Raven. If you are a consumer of the
7561 * Raven library, you SHOULD load this file (vs raven.js).
7562 **/
7563
7564 var RavenConstructor = __webpack_require__(/*! ./raven */ "./node_modules/raven-js/src/raven.js");
7565
7566 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
7567 var _window =
7568 typeof window !== 'undefined'
7569 ? window
7570 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
7571 var _Raven = _window.Raven;
7572
7573 var Raven = new RavenConstructor();
7574
7575 /*
7576 * Allow multiple versions of Raven to be installed.
7577 * Strip Raven from the global context and returns the instance.
7578 *
7579 * @return {Raven}
7580 */
7581 Raven.noConflict = function() {
7582 _window.Raven = _Raven;
7583 return Raven;
7584 };
7585
7586 Raven.afterLoad();
7587
7588 module.exports = Raven;
7589
7590
7591 /***/ }),
7592
7593 /***/ "./node_modules/raven-js/src/utils.js":
7594 /*!********************************************!*\
7595 !*** ./node_modules/raven-js/src/utils.js ***!
7596 \********************************************/
7597 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7598
7599 var _window =
7600 typeof window !== 'undefined'
7601 ? window
7602 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
7603
7604 function isObject(what) {
7605 return typeof what === 'object' && what !== null;
7606 }
7607
7608 // Yanked from https://git.io/vS8DV re-used under CC0
7609 // with some tiny modifications
7610 function isError(value) {
7611 switch ({}.toString.call(value)) {
7612 case '[object Error]':
7613 return true;
7614 case '[object Exception]':
7615 return true;
7616 case '[object DOMException]':
7617 return true;
7618 default:
7619 return value instanceof Error;
7620 }
7621 }
7622
7623 function isErrorEvent(value) {
7624 return supportsErrorEvent() && {}.toString.call(value) === '[object ErrorEvent]';
7625 }
7626
7627 function isUndefined(what) {
7628 return what === void 0;
7629 }
7630
7631 function isFunction(what) {
7632 return typeof what === 'function';
7633 }
7634
7635 function isString(what) {
7636 return Object.prototype.toString.call(what) === '[object String]';
7637 }
7638
7639 function isEmptyObject(what) {
7640 for (var _ in what) return false; // eslint-disable-line guard-for-in, no-unused-vars
7641 return true;
7642 }
7643
7644 function supportsErrorEvent() {
7645 try {
7646 new ErrorEvent(''); // eslint-disable-line no-new
7647 return true;
7648 } catch (e) {
7649 return false;
7650 }
7651 }
7652
7653 function wrappedCallback(callback) {
7654 function dataCallback(data, original) {
7655 var normalizedData = callback(data) || data;
7656 if (original) {
7657 return original(normalizedData) || normalizedData;
7658 }
7659 return normalizedData;
7660 }
7661
7662 return dataCallback;
7663 }
7664
7665 function each(obj, callback) {
7666 var i, j;
7667
7668 if (isUndefined(obj.length)) {
7669 for (i in obj) {
7670 if (hasKey(obj, i)) {
7671 callback.call(null, i, obj[i]);
7672 }
7673 }
7674 } else {
7675 j = obj.length;
7676 if (j) {
7677 for (i = 0; i < j; i++) {
7678 callback.call(null, i, obj[i]);
7679 }
7680 }
7681 }
7682 }
7683
7684 function objectMerge(obj1, obj2) {
7685 if (!obj2) {
7686 return obj1;
7687 }
7688 each(obj2, function(key, value) {
7689 obj1[key] = value;
7690 });
7691 return obj1;
7692 }
7693
7694 /**
7695 * This function is only used for react-native.
7696 * react-native freezes object that have already been sent over the
7697 * js bridge. We need this function in order to check if the object is frozen.
7698 * So it's ok that objectFrozen returns false if Object.isFrozen is not
7699 * supported because it's not relevant for other "platforms". See related issue:
7700 * https://github.com/getsentry/react-native-sentry/issues/57
7701 */
7702 function objectFrozen(obj) {
7703 if (!Object.isFrozen) {
7704 return false;
7705 }
7706 return Object.isFrozen(obj);
7707 }
7708
7709 function truncate(str, max) {
7710 return !max || str.length <= max ? str : str.substr(0, max) + '\u2026';
7711 }
7712
7713 /**
7714 * hasKey, a better form of hasOwnProperty
7715 * Example: hasKey(MainHostObject, property) === true/false
7716 *
7717 * @param {Object} host object to check property
7718 * @param {string} key to check
7719 */
7720 function hasKey(object, key) {
7721 return Object.prototype.hasOwnProperty.call(object, key);
7722 }
7723
7724 function joinRegExp(patterns) {
7725 // Combine an array of regular expressions and strings into one large regexp
7726 // Be mad.
7727 var sources = [],
7728 i = 0,
7729 len = patterns.length,
7730 pattern;
7731
7732 for (; i < len; i++) {
7733 pattern = patterns[i];
7734 if (isString(pattern)) {
7735 // If it's a string, we need to escape it
7736 // Taken from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
7737 sources.push(pattern.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, '\\$1'));
7738 } else if (pattern && pattern.source) {
7739 // If it's a regexp already, we want to extract the source
7740 sources.push(pattern.source);
7741 }
7742 // Intentionally skip other cases
7743 }
7744 return new RegExp(sources.join('|'), 'i');
7745 }
7746
7747 function urlencode(o) {
7748 var pairs = [];
7749 each(o, function(key, value) {
7750 pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));
7751 });
7752 return pairs.join('&');
7753 }
7754
7755 // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B
7756 // intentionally using regex and not <a/> href parsing trick because React Native and other
7757 // environments where DOM might not be available
7758 function parseUrl(url) {
7759 var match = url.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);
7760 if (!match) return {};
7761
7762 // coerce to undefined values to empty string so we don't get 'undefined'
7763 var query = match[6] || '';
7764 var fragment = match[8] || '';
7765 return {
7766 protocol: match[2],
7767 host: match[4],
7768 path: match[5],
7769 relative: match[5] + query + fragment // everything minus origin
7770 };
7771 }
7772 function uuid4() {
7773 var crypto = _window.crypto || _window.msCrypto;
7774
7775 if (!isUndefined(crypto) && crypto.getRandomValues) {
7776 // Use window.crypto API if available
7777 // eslint-disable-next-line no-undef
7778 var arr = new Uint16Array(8);
7779 crypto.getRandomValues(arr);
7780
7781 // set 4 in byte 7
7782 arr[3] = (arr[3] & 0xfff) | 0x4000;
7783 // set 2 most significant bits of byte 9 to '10'
7784 arr[4] = (arr[4] & 0x3fff) | 0x8000;
7785
7786 var pad = function(num) {
7787 var v = num.toString(16);
7788 while (v.length < 4) {
7789 v = '0' + v;
7790 }
7791 return v;
7792 };
7793
7794 return (
7795 pad(arr[0]) +
7796 pad(arr[1]) +
7797 pad(arr[2]) +
7798 pad(arr[3]) +
7799 pad(arr[4]) +
7800 pad(arr[5]) +
7801 pad(arr[6]) +
7802 pad(arr[7])
7803 );
7804 } else {
7805 // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523
7806 return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
7807 var r = (Math.random() * 16) | 0,
7808 v = c === 'x' ? r : (r & 0x3) | 0x8;
7809 return v.toString(16);
7810 });
7811 }
7812 }
7813
7814 /**
7815 * Given a child DOM element, returns a query-selector statement describing that
7816 * and its ancestors
7817 * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]
7818 * @param elem
7819 * @returns {string}
7820 */
7821 function htmlTreeAsString(elem) {
7822 /* eslint no-extra-parens:0*/
7823 var MAX_TRAVERSE_HEIGHT = 5,
7824 MAX_OUTPUT_LEN = 80,
7825 out = [],
7826 height = 0,
7827 len = 0,
7828 separator = ' > ',
7829 sepLength = separator.length,
7830 nextStr;
7831
7832 while (elem && height++ < MAX_TRAVERSE_HEIGHT) {
7833 nextStr = htmlElementAsString(elem);
7834 // bail out if
7835 // - nextStr is the 'html' element
7836 // - the length of the string that would be created exceeds MAX_OUTPUT_LEN
7837 // (ignore this limit if we are on the first iteration)
7838 if (
7839 nextStr === 'html' ||
7840 (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)
7841 ) {
7842 break;
7843 }
7844
7845 out.push(nextStr);
7846
7847 len += nextStr.length;
7848 elem = elem.parentNode;
7849 }
7850
7851 return out.reverse().join(separator);
7852 }
7853
7854 /**
7855 * Returns a simple, query-selector representation of a DOM element
7856 * e.g. [HTMLElement] => input#foo.btn[name=baz]
7857 * @param HTMLElement
7858 * @returns {string}
7859 */
7860 function htmlElementAsString(elem) {
7861 var out = [],
7862 className,
7863 classes,
7864 key,
7865 attr,
7866 i;
7867
7868 if (!elem || !elem.tagName) {
7869 return '';
7870 }
7871
7872 out.push(elem.tagName.toLowerCase());
7873 if (elem.id) {
7874 out.push('#' + elem.id);
7875 }
7876
7877 className = elem.className;
7878 if (className && isString(className)) {
7879 classes = className.split(/\s+/);
7880 for (i = 0; i < classes.length; i++) {
7881 out.push('.' + classes[i]);
7882 }
7883 }
7884 var attrWhitelist = ['type', 'name', 'title', 'alt'];
7885 for (i = 0; i < attrWhitelist.length; i++) {
7886 key = attrWhitelist[i];
7887 attr = elem.getAttribute(key);
7888 if (attr) {
7889 out.push('[' + key + '="' + attr + '"]');
7890 }
7891 }
7892 return out.join('');
7893 }
7894
7895 /**
7896 * Returns true if either a OR b is truthy, but not both
7897 */
7898 function isOnlyOneTruthy(a, b) {
7899 return !!(!!a ^ !!b);
7900 }
7901
7902 /**
7903 * Returns true if the two input exception interfaces have the same content
7904 */
7905 function isSameException(ex1, ex2) {
7906 if (isOnlyOneTruthy(ex1, ex2)) return false;
7907
7908 ex1 = ex1.values[0];
7909 ex2 = ex2.values[0];
7910
7911 if (ex1.type !== ex2.type || ex1.value !== ex2.value) return false;
7912
7913 return isSameStacktrace(ex1.stacktrace, ex2.stacktrace);
7914 }
7915
7916 /**
7917 * Returns true if the two input stack trace interfaces have the same content
7918 */
7919 function isSameStacktrace(stack1, stack2) {
7920 if (isOnlyOneTruthy(stack1, stack2)) return false;
7921
7922 var frames1 = stack1.frames;
7923 var frames2 = stack2.frames;
7924
7925 // Exit early if frame count differs
7926 if (frames1.length !== frames2.length) return false;
7927
7928 // Iterate through every frame; bail out if anything differs
7929 var a, b;
7930 for (var i = 0; i < frames1.length; i++) {
7931 a = frames1[i];
7932 b = frames2[i];
7933 if (
7934 a.filename !== b.filename ||
7935 a.lineno !== b.lineno ||
7936 a.colno !== b.colno ||
7937 a['function'] !== b['function']
7938 )
7939 return false;
7940 }
7941 return true;
7942 }
7943
7944 /**
7945 * Polyfill a method
7946 * @param obj object e.g. `document`
7947 * @param name method name present on object e.g. `addEventListener`
7948 * @param replacement replacement function
7949 * @param track {optional} record instrumentation to an array
7950 */
7951 function fill(obj, name, replacement, track) {
7952 var orig = obj[name];
7953 obj[name] = replacement(orig);
7954 if (track) {
7955 track.push([obj, name, orig]);
7956 }
7957 }
7958
7959 module.exports = {
7960 isObject: isObject,
7961 isError: isError,
7962 isErrorEvent: isErrorEvent,
7963 isUndefined: isUndefined,
7964 isFunction: isFunction,
7965 isString: isString,
7966 isEmptyObject: isEmptyObject,
7967 supportsErrorEvent: supportsErrorEvent,
7968 wrappedCallback: wrappedCallback,
7969 each: each,
7970 objectMerge: objectMerge,
7971 truncate: truncate,
7972 objectFrozen: objectFrozen,
7973 hasKey: hasKey,
7974 joinRegExp: joinRegExp,
7975 urlencode: urlencode,
7976 uuid4: uuid4,
7977 htmlTreeAsString: htmlTreeAsString,
7978 htmlElementAsString: htmlElementAsString,
7979 isSameException: isSameException,
7980 isSameStacktrace: isSameStacktrace,
7981 parseUrl: parseUrl,
7982 fill: fill
7983 };
7984
7985
7986 /***/ }),
7987
7988 /***/ "./node_modules/raven-js/vendor/TraceKit/tracekit.js":
7989 /*!***********************************************************!*\
7990 !*** ./node_modules/raven-js/vendor/TraceKit/tracekit.js ***!
7991 \***********************************************************/
7992 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7993
7994 var utils = __webpack_require__(/*! ../../src/utils */ "./node_modules/raven-js/src/utils.js");
7995
7996 /*
7997 TraceKit - Cross brower stack traces
7998
7999 This was originally forked from github.com/occ/TraceKit, but has since been
8000 largely re-written and is now maintained as part of raven-js. Tests for
8001 this are in test/vendor.
8002
8003 MIT license
8004 */
8005
8006 var TraceKit = {
8007 collectWindowErrors: true,
8008 debug: false
8009 };
8010
8011 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
8012 var _window =
8013 typeof window !== 'undefined'
8014 ? window
8015 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
8016
8017 // global reference to slice
8018 var _slice = [].slice;
8019 var UNKNOWN_FUNCTION = '?';
8020
8021 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types
8022 var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;
8023
8024 function getLocationHref() {
8025 if (typeof document === 'undefined' || document.location == null) return '';
8026
8027 return document.location.href;
8028 }
8029
8030 /**
8031 * TraceKit.report: cross-browser processing of unhandled exceptions
8032 *
8033 * Syntax:
8034 * TraceKit.report.subscribe(function(stackInfo) { ... })
8035 * TraceKit.report.unsubscribe(function(stackInfo) { ... })
8036 * TraceKit.report(exception)
8037 * try { ...code... } catch(ex) { TraceKit.report(ex); }
8038 *
8039 * Supports:
8040 * - Firefox: full stack trace with line numbers, plus column number
8041 * on top frame; column number is not guaranteed
8042 * - Opera: full stack trace with line and column numbers
8043 * - Chrome: full stack trace with line and column numbers
8044 * - Safari: line and column number for the top frame only; some frames
8045 * may be missing, and column number is not guaranteed
8046 * - IE: line and column number for the top frame only; some frames
8047 * may be missing, and column number is not guaranteed
8048 *
8049 * In theory, TraceKit should work on all of the following versions:
8050 * - IE5.5+ (only 8.0 tested)
8051 * - Firefox 0.9+ (only 3.5+ tested)
8052 * - Opera 7+ (only 10.50 tested; versions 9 and earlier may require
8053 * Exceptions Have Stacktrace to be enabled in opera:config)
8054 * - Safari 3+ (only 4+ tested)
8055 * - Chrome 1+ (only 5+ tested)
8056 * - Konqueror 3.5+ (untested)
8057 *
8058 * Requires TraceKit.computeStackTrace.
8059 *
8060 * Tries to catch all unhandled exceptions and report them to the
8061 * subscribed handlers. Please note that TraceKit.report will rethrow the
8062 * exception. This is REQUIRED in order to get a useful stack trace in IE.
8063 * If the exception does not reach the top of the browser, you will only
8064 * get a stack trace from the point where TraceKit.report was called.
8065 *
8066 * Handlers receive a stackInfo object as described in the
8067 * TraceKit.computeStackTrace docs.
8068 */
8069 TraceKit.report = (function reportModuleWrapper() {
8070 var handlers = [],
8071 lastArgs = null,
8072 lastException = null,
8073 lastExceptionStack = null;
8074
8075 /**
8076 * Add a crash handler.
8077 * @param {Function} handler
8078 */
8079 function subscribe(handler) {
8080 installGlobalHandler();
8081 handlers.push(handler);
8082 }
8083
8084 /**
8085 * Remove a crash handler.
8086 * @param {Function} handler
8087 */
8088 function unsubscribe(handler) {
8089 for (var i = handlers.length - 1; i >= 0; --i) {
8090 if (handlers[i] === handler) {
8091 handlers.splice(i, 1);
8092 }
8093 }
8094 }
8095
8096 /**
8097 * Remove all crash handlers.
8098 */
8099 function unsubscribeAll() {
8100 uninstallGlobalHandler();
8101 handlers = [];
8102 }
8103
8104 /**
8105 * Dispatch stack information to all handlers.
8106 * @param {Object.<string, *>} stack
8107 */
8108 function notifyHandlers(stack, isWindowError) {
8109 var exception = null;
8110 if (isWindowError && !TraceKit.collectWindowErrors) {
8111 return;
8112 }
8113 for (var i in handlers) {
8114 if (handlers.hasOwnProperty(i)) {
8115 try {
8116 handlers[i].apply(null, [stack].concat(_slice.call(arguments, 2)));
8117 } catch (inner) {
8118 exception = inner;
8119 }
8120 }
8121 }
8122
8123 if (exception) {
8124 throw exception;
8125 }
8126 }
8127
8128 var _oldOnerrorHandler, _onErrorHandlerInstalled;
8129
8130 /**
8131 * Ensures all global unhandled exceptions are recorded.
8132 * Supported by Gecko and IE.
8133 * @param {string} message Error message.
8134 * @param {string} url URL of script that generated the exception.
8135 * @param {(number|string)} lineNo The line number at which the error
8136 * occurred.
8137 * @param {?(number|string)} colNo The column number at which the error
8138 * occurred.
8139 * @param {?Error} ex The actual Error object.
8140 */
8141 function traceKitWindowOnError(message, url, lineNo, colNo, ex) {
8142 var stack = null;
8143
8144 if (lastExceptionStack) {
8145 TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(
8146 lastExceptionStack,
8147 url,
8148 lineNo,
8149 message
8150 );
8151 processLastException();
8152 } else if (ex && utils.isError(ex)) {
8153 // non-string `ex` arg; attempt to extract stack trace
8154
8155 // New chrome and blink send along a real error object
8156 // Let's just report that like a normal error.
8157 // See: https://mikewest.org/2013/08/debugging-runtime-errors-with-window-onerror
8158 stack = TraceKit.computeStackTrace(ex);
8159 notifyHandlers(stack, true);
8160 } else {
8161 var location = {
8162 url: url,
8163 line: lineNo,
8164 column: colNo
8165 };
8166
8167 var name = undefined;
8168 var msg = message; // must be new var or will modify original `arguments`
8169 var groups;
8170 if ({}.toString.call(message) === '[object String]') {
8171 var groups = message.match(ERROR_TYPES_RE);
8172 if (groups) {
8173 name = groups[1];
8174 msg = groups[2];
8175 }
8176 }
8177
8178 location.func = UNKNOWN_FUNCTION;
8179
8180 stack = {
8181 name: name,
8182 message: msg,
8183 url: getLocationHref(),
8184 stack: [location]
8185 };
8186 notifyHandlers(stack, true);
8187 }
8188
8189 if (_oldOnerrorHandler) {
8190 return _oldOnerrorHandler.apply(this, arguments);
8191 }
8192
8193 return false;
8194 }
8195
8196 function installGlobalHandler() {
8197 if (_onErrorHandlerInstalled) {
8198 return;
8199 }
8200 _oldOnerrorHandler = _window.onerror;
8201 _window.onerror = traceKitWindowOnError;
8202 _onErrorHandlerInstalled = true;
8203 }
8204
8205 function uninstallGlobalHandler() {
8206 if (!_onErrorHandlerInstalled) {
8207 return;
8208 }
8209 _window.onerror = _oldOnerrorHandler;
8210 _onErrorHandlerInstalled = false;
8211 _oldOnerrorHandler = undefined;
8212 }
8213
8214 function processLastException() {
8215 var _lastExceptionStack = lastExceptionStack,
8216 _lastArgs = lastArgs;
8217 lastArgs = null;
8218 lastExceptionStack = null;
8219 lastException = null;
8220 notifyHandlers.apply(null, [_lastExceptionStack, false].concat(_lastArgs));
8221 }
8222
8223 /**
8224 * Reports an unhandled Error to TraceKit.
8225 * @param {Error} ex
8226 * @param {?boolean} rethrow If false, do not re-throw the exception.
8227 * Only used for window.onerror to not cause an infinite loop of
8228 * rethrowing.
8229 */
8230 function report(ex, rethrow) {
8231 var args = _slice.call(arguments, 1);
8232 if (lastExceptionStack) {
8233 if (lastException === ex) {
8234 return; // already caught by an inner catch block, ignore
8235 } else {
8236 processLastException();
8237 }
8238 }
8239
8240 var stack = TraceKit.computeStackTrace(ex);
8241 lastExceptionStack = stack;
8242 lastException = ex;
8243 lastArgs = args;
8244
8245 // If the stack trace is incomplete, wait for 2 seconds for
8246 // slow slow IE to see if onerror occurs or not before reporting
8247 // this exception; otherwise, we will end up with an incomplete
8248 // stack trace
8249 setTimeout(function() {
8250 if (lastException === ex) {
8251 processLastException();
8252 }
8253 }, stack.incomplete ? 2000 : 0);
8254
8255 if (rethrow !== false) {
8256 throw ex; // re-throw to propagate to the top level (and cause window.onerror)
8257 }
8258 }
8259
8260 report.subscribe = subscribe;
8261 report.unsubscribe = unsubscribe;
8262 report.uninstall = unsubscribeAll;
8263 return report;
8264 })();
8265
8266 /**
8267 * TraceKit.computeStackTrace: cross-browser stack traces in JavaScript
8268 *
8269 * Syntax:
8270 * s = TraceKit.computeStackTrace(exception) // consider using TraceKit.report instead (see below)
8271 * Returns:
8272 * s.name - exception name
8273 * s.message - exception message
8274 * s.stack[i].url - JavaScript or HTML file URL
8275 * s.stack[i].func - function name, or empty for anonymous functions (if guessing did not work)
8276 * s.stack[i].args - arguments passed to the function, if known
8277 * s.stack[i].line - line number, if known
8278 * s.stack[i].column - column number, if known
8279 *
8280 * Supports:
8281 * - Firefox: full stack trace with line numbers and unreliable column
8282 * number on top frame
8283 * - Opera 10: full stack trace with line and column numbers
8284 * - Opera 9-: full stack trace with line numbers
8285 * - Chrome: full stack trace with line and column numbers
8286 * - Safari: line and column number for the topmost stacktrace element
8287 * only
8288 * - IE: no line numbers whatsoever
8289 *
8290 * Tries to guess names of anonymous functions by looking for assignments
8291 * in the source code. In IE and Safari, we have to guess source file names
8292 * by searching for function bodies inside all page scripts. This will not
8293 * work for scripts that are loaded cross-domain.
8294 * Here be dragons: some function names may be guessed incorrectly, and
8295 * duplicate functions may be mismatched.
8296 *
8297 * TraceKit.computeStackTrace should only be used for tracing purposes.
8298 * Logging of unhandled exceptions should be done with TraceKit.report,
8299 * which builds on top of TraceKit.computeStackTrace and provides better
8300 * IE support by utilizing the window.onerror event to retrieve information
8301 * about the top of the stack.
8302 *
8303 * Note: In IE and Safari, no stack trace is recorded on the Error object,
8304 * so computeStackTrace instead walks its *own* chain of callers.
8305 * This means that:
8306 * * in Safari, some methods may be missing from the stack trace;
8307 * * in IE, the topmost function in the stack trace will always be the
8308 * caller of computeStackTrace.
8309 *
8310 * This is okay for tracing (because you are likely to be calling
8311 * computeStackTrace from the function you want to be the topmost element
8312 * of the stack trace anyway), but not okay for logging unhandled
8313 * exceptions (because your catch block will likely be far away from the
8314 * inner function that actually caused the exception).
8315 *
8316 */
8317 TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
8318 // Contents of Exception in various browsers.
8319 //
8320 // SAFARI:
8321 // ex.message = Can't find variable: qq
8322 // ex.line = 59
8323 // ex.sourceId = 580238192
8324 // ex.sourceURL = http://...
8325 // ex.expressionBeginOffset = 96
8326 // ex.expressionCaretOffset = 98
8327 // ex.expressionEndOffset = 98
8328 // ex.name = ReferenceError
8329 //
8330 // FIREFOX:
8331 // ex.message = qq is not defined
8332 // ex.fileName = http://...
8333 // ex.lineNumber = 59
8334 // ex.columnNumber = 69
8335 // ex.stack = ...stack trace... (see the example below)
8336 // ex.name = ReferenceError
8337 //
8338 // CHROME:
8339 // ex.message = qq is not defined
8340 // ex.name = ReferenceError
8341 // ex.type = not_defined
8342 // ex.arguments = ['aa']
8343 // ex.stack = ...stack trace...
8344 //
8345 // INTERNET EXPLORER:
8346 // ex.message = ...
8347 // ex.name = ReferenceError
8348 //
8349 // OPERA:
8350 // ex.message = ...message... (see the example below)
8351 // ex.name = ReferenceError
8352 // ex.opera#sourceloc = 11 (pretty much useless, duplicates the info in ex.message)
8353 // ex.stacktrace = n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'
8354
8355 /**
8356 * Computes stack trace information from the stack property.
8357 * Chrome and Gecko use this property.
8358 * @param {Error} ex
8359 * @return {?Object.<string, *>} Stack trace information.
8360 */
8361 function computeStackTraceFromStackProp(ex) {
8362 if (typeof ex.stack === 'undefined' || !ex.stack) return;
8363
8364 var chrome = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,
8365 gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,
8366 winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,
8367 // Used to additionally parse URL/line/column from eval frames
8368 geckoEval = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i,
8369 chromeEval = /\((\S*)(?::(\d+))(?::(\d+))\)/,
8370 lines = ex.stack.split('\n'),
8371 stack = [],
8372 submatch,
8373 parts,
8374 element,
8375 reference = /^(.*) is undefined$/.exec(ex.message);
8376
8377 for (var i = 0, j = lines.length; i < j; ++i) {
8378 if ((parts = chrome.exec(lines[i]))) {
8379 var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line
8380 var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line
8381 if (isEval && (submatch = chromeEval.exec(parts[2]))) {
8382 // throw out eval line/column and use top-most line/column number
8383 parts[2] = submatch[1]; // url
8384 parts[3] = submatch[2]; // line
8385 parts[4] = submatch[3]; // column
8386 }
8387 element = {
8388 url: !isNative ? parts[2] : null,
8389 func: parts[1] || UNKNOWN_FUNCTION,
8390 args: isNative ? [parts[2]] : [],
8391 line: parts[3] ? +parts[3] : null,
8392 column: parts[4] ? +parts[4] : null
8393 };
8394 } else if ((parts = winjs.exec(lines[i]))) {
8395 element = {
8396 url: parts[2],
8397 func: parts[1] || UNKNOWN_FUNCTION,
8398 args: [],
8399 line: +parts[3],
8400 column: parts[4] ? +parts[4] : null
8401 };
8402 } else if ((parts = gecko.exec(lines[i]))) {
8403 var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;
8404 if (isEval && (submatch = geckoEval.exec(parts[3]))) {
8405 // throw out eval line/column and use top-most line number
8406 parts[3] = submatch[1];
8407 parts[4] = submatch[2];
8408 parts[5] = null; // no column when eval
8409 } else if (i === 0 && !parts[5] && typeof ex.columnNumber !== 'undefined') {
8410 // FireFox uses this awesome columnNumber property for its top frame
8411 // Also note, Firefox's column number is 0-based and everything else expects 1-based,
8412 // so adding 1
8413 // NOTE: this hack doesn't work if top-most frame is eval
8414 stack[0].column = ex.columnNumber + 1;
8415 }
8416 element = {
8417 url: parts[3],
8418 func: parts[1] || UNKNOWN_FUNCTION,
8419 args: parts[2] ? parts[2].split(',') : [],
8420 line: parts[4] ? +parts[4] : null,
8421 column: parts[5] ? +parts[5] : null
8422 };
8423 } else {
8424 continue;
8425 }
8426
8427 if (!element.func && element.line) {
8428 element.func = UNKNOWN_FUNCTION;
8429 }
8430
8431 stack.push(element);
8432 }
8433
8434 if (!stack.length) {
8435 return null;
8436 }
8437
8438 return {
8439 name: ex.name,
8440 message: ex.message,
8441 url: getLocationHref(),
8442 stack: stack
8443 };
8444 }
8445
8446 /**
8447 * Adds information about the first frame to incomplete stack traces.
8448 * Safari and IE require this to get complete data on the first frame.
8449 * @param {Object.<string, *>} stackInfo Stack trace information from
8450 * one of the compute* methods.
8451 * @param {string} url The URL of the script that caused an error.
8452 * @param {(number|string)} lineNo The line number of the script that
8453 * caused an error.
8454 * @param {string=} message The error generated by the browser, which
8455 * hopefully contains the name of the object that caused the error.
8456 * @return {boolean} Whether or not the stack information was
8457 * augmented.
8458 */
8459 function augmentStackTraceWithInitialElement(stackInfo, url, lineNo, message) {
8460 var initial = {
8461 url: url,
8462 line: lineNo
8463 };
8464
8465 if (initial.url && initial.line) {
8466 stackInfo.incomplete = false;
8467
8468 if (!initial.func) {
8469 initial.func = UNKNOWN_FUNCTION;
8470 }
8471
8472 if (stackInfo.stack.length > 0) {
8473 if (stackInfo.stack[0].url === initial.url) {
8474 if (stackInfo.stack[0].line === initial.line) {
8475 return false; // already in stack trace
8476 } else if (
8477 !stackInfo.stack[0].line &&
8478 stackInfo.stack[0].func === initial.func
8479 ) {
8480 stackInfo.stack[0].line = initial.line;
8481 return false;
8482 }
8483 }
8484 }
8485
8486 stackInfo.stack.unshift(initial);
8487 stackInfo.partial = true;
8488 return true;
8489 } else {
8490 stackInfo.incomplete = true;
8491 }
8492
8493 return false;
8494 }
8495
8496 /**
8497 * Computes stack trace information by walking the arguments.caller
8498 * chain at the time the exception occurred. This will cause earlier
8499 * frames to be missed but is the only way to get any stack trace in
8500 * Safari and IE. The top frame is restored by
8501 * {@link augmentStackTraceWithInitialElement}.
8502 * @param {Error} ex
8503 * @return {?Object.<string, *>} Stack trace information.
8504 */
8505 function computeStackTraceByWalkingCallerChain(ex, depth) {
8506 var functionName = /function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,
8507 stack = [],
8508 funcs = {},
8509 recursion = false,
8510 parts,
8511 item,
8512 source;
8513
8514 for (
8515 var curr = computeStackTraceByWalkingCallerChain.caller;
8516 curr && !recursion;
8517 curr = curr.caller
8518 ) {
8519 if (curr === computeStackTrace || curr === TraceKit.report) {
8520 // console.log('skipping internal function');
8521 continue;
8522 }
8523
8524 item = {
8525 url: null,
8526 func: UNKNOWN_FUNCTION,
8527 line: null,
8528 column: null
8529 };
8530
8531 if (curr.name) {
8532 item.func = curr.name;
8533 } else if ((parts = functionName.exec(curr.toString()))) {
8534 item.func = parts[1];
8535 }
8536
8537 if (typeof item.func === 'undefined') {
8538 try {
8539 item.func = parts.input.substring(0, parts.input.indexOf('{'));
8540 } catch (e) {}
8541 }
8542
8543 if (funcs['' + curr]) {
8544 recursion = true;
8545 } else {
8546 funcs['' + curr] = true;
8547 }
8548
8549 stack.push(item);
8550 }
8551
8552 if (depth) {
8553 // console.log('depth is ' + depth);
8554 // console.log('stack is ' + stack.length);
8555 stack.splice(0, depth);
8556 }
8557
8558 var result = {
8559 name: ex.name,
8560 message: ex.message,
8561 url: getLocationHref(),
8562 stack: stack
8563 };
8564 augmentStackTraceWithInitialElement(
8565 result,
8566 ex.sourceURL || ex.fileName,
8567 ex.line || ex.lineNumber,
8568 ex.message || ex.description
8569 );
8570 return result;
8571 }
8572
8573 /**
8574 * Computes a stack trace for an exception.
8575 * @param {Error} ex
8576 * @param {(string|number)=} depth
8577 */
8578 function computeStackTrace(ex, depth) {
8579 var stack = null;
8580 depth = depth == null ? 0 : +depth;
8581
8582 try {
8583 stack = computeStackTraceFromStackProp(ex);
8584 if (stack) {
8585 return stack;
8586 }
8587 } catch (e) {
8588 if (TraceKit.debug) {
8589 throw e;
8590 }
8591 }
8592
8593 try {
8594 stack = computeStackTraceByWalkingCallerChain(ex, depth + 1);
8595 if (stack) {
8596 return stack;
8597 }
8598 } catch (e) {
8599 if (TraceKit.debug) {
8600 throw e;
8601 }
8602 }
8603 return {
8604 name: ex.name,
8605 message: ex.message,
8606 url: getLocationHref()
8607 };
8608 }
8609
8610 computeStackTrace.augmentStackTraceWithInitialElement = augmentStackTraceWithInitialElement;
8611 computeStackTrace.computeStackTraceFromStackProp = computeStackTraceFromStackProp;
8612
8613 return computeStackTrace;
8614 })();
8615
8616 module.exports = TraceKit;
8617
8618
8619 /***/ }),
8620
8621 /***/ "./node_modules/raven-js/vendor/json-stringify-safe/stringify.js":
8622 /*!***********************************************************************!*\
8623 !*** ./node_modules/raven-js/vendor/json-stringify-safe/stringify.js ***!
8624 \***********************************************************************/
8625 /***/ ((module, exports) => {
8626
8627 /*
8628 json-stringify-safe
8629 Like JSON.stringify, but doesn't throw on circular references.
8630
8631 Originally forked from https://github.com/isaacs/json-stringify-safe
8632 version 5.0.1 on 3/8/2017 and modified to handle Errors serialization
8633 and IE8 compatibility. Tests for this are in test/vendor.
8634
8635 ISC license: https://github.com/isaacs/json-stringify-safe/blob/master/LICENSE
8636 */
8637
8638 exports = module.exports = stringify;
8639 exports.getSerialize = serializer;
8640
8641 function indexOf(haystack, needle) {
8642 for (var i = 0; i < haystack.length; ++i) {
8643 if (haystack[i] === needle) return i;
8644 }
8645 return -1;
8646 }
8647
8648 function stringify(obj, replacer, spaces, cycleReplacer) {
8649 return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces);
8650 }
8651
8652 // https://github.com/ftlabs/js-abbreviate/blob/fa709e5f139e7770a71827b1893f22418097fbda/index.js#L95-L106
8653 function stringifyError(value) {
8654 var err = {
8655 // These properties are implemented as magical getters and don't show up in for in
8656 stack: value.stack,
8657 message: value.message,
8658 name: value.name
8659 };
8660
8661 for (var i in value) {
8662 if (Object.prototype.hasOwnProperty.call(value, i)) {
8663 err[i] = value[i];
8664 }
8665 }
8666
8667 return err;
8668 }
8669
8670 function serializer(replacer, cycleReplacer) {
8671 var stack = [];
8672 var keys = [];
8673
8674 if (cycleReplacer == null) {
8675 cycleReplacer = function(key, value) {
8676 if (stack[0] === value) {
8677 return '[Circular ~]';
8678 }
8679 return '[Circular ~.' + keys.slice(0, indexOf(stack, value)).join('.') + ']';
8680 };
8681 }
8682
8683 return function(key, value) {
8684 if (stack.length > 0) {
8685 var thisPos = indexOf(stack, this);
8686 ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
8687 ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
8688
8689 if (~indexOf(stack, value)) {
8690 value = cycleReplacer.call(this, key, value);
8691 }
8692 } else {
8693 stack.push(value);
8694 }
8695
8696 return replacer == null
8697 ? value instanceof Error ? stringifyError(value) : value
8698 : replacer.call(this, key, value);
8699 };
8700 }
8701
8702
8703 /***/ }),
8704
8705 /***/ "./node_modules/react-is/cjs/react-is.development.js":
8706 /*!***********************************************************!*\
8707 !*** ./node_modules/react-is/cjs/react-is.development.js ***!
8708 \***********************************************************/
8709 /***/ ((__unused_webpack_module, exports) => {
8710
8711 "use strict";
8712 /** @license React v16.13.1
8713 * react-is.development.js
8714 *
8715 * Copyright (c) Facebook, Inc. and its affiliates.
8716 *
8717 * This source code is licensed under the MIT license found in the
8718 * LICENSE file in the root directory of this source tree.
8719 */
8720
8721
8722
8723
8724
8725 if (true) {
8726 (function() {
8727 'use strict';
8728
8729 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
8730 // nor polyfill, then a plain number is used for performance.
8731 var hasSymbol = typeof Symbol === 'function' && Symbol.for;
8732 var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
8733 var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
8734 var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
8735 var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
8736 var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
8737 var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
8738 var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
8739 // (unstable) APIs that have been removed. Can we remove the symbols?
8740
8741 var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
8742 var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
8743 var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
8744 var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
8745 var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
8746 var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
8747 var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
8748 var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
8749 var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
8750 var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
8751 var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
8752
8753 function isValidElementType(type) {
8754 return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
8755 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);
8756 }
8757
8758 function typeOf(object) {
8759 if (typeof object === 'object' && object !== null) {
8760 var $$typeof = object.$$typeof;
8761
8762 switch ($$typeof) {
8763 case REACT_ELEMENT_TYPE:
8764 var type = object.type;
8765
8766 switch (type) {
8767 case REACT_ASYNC_MODE_TYPE:
8768 case REACT_CONCURRENT_MODE_TYPE:
8769 case REACT_FRAGMENT_TYPE:
8770 case REACT_PROFILER_TYPE:
8771 case REACT_STRICT_MODE_TYPE:
8772 case REACT_SUSPENSE_TYPE:
8773 return type;
8774
8775 default:
8776 var $$typeofType = type && type.$$typeof;
8777
8778 switch ($$typeofType) {
8779 case REACT_CONTEXT_TYPE:
8780 case REACT_FORWARD_REF_TYPE:
8781 case REACT_LAZY_TYPE:
8782 case REACT_MEMO_TYPE:
8783 case REACT_PROVIDER_TYPE:
8784 return $$typeofType;
8785
8786 default:
8787 return $$typeof;
8788 }
8789
8790 }
8791
8792 case REACT_PORTAL_TYPE:
8793 return $$typeof;
8794 }
8795 }
8796
8797 return undefined;
8798 } // AsyncMode is deprecated along with isAsyncMode
8799
8800 var AsyncMode = REACT_ASYNC_MODE_TYPE;
8801 var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
8802 var ContextConsumer = REACT_CONTEXT_TYPE;
8803 var ContextProvider = REACT_PROVIDER_TYPE;
8804 var Element = REACT_ELEMENT_TYPE;
8805 var ForwardRef = REACT_FORWARD_REF_TYPE;
8806 var Fragment = REACT_FRAGMENT_TYPE;
8807 var Lazy = REACT_LAZY_TYPE;
8808 var Memo = REACT_MEMO_TYPE;
8809 var Portal = REACT_PORTAL_TYPE;
8810 var Profiler = REACT_PROFILER_TYPE;
8811 var StrictMode = REACT_STRICT_MODE_TYPE;
8812 var Suspense = REACT_SUSPENSE_TYPE;
8813 var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
8814
8815 function isAsyncMode(object) {
8816 {
8817 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
8818 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
8819
8820 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.');
8821 }
8822 }
8823
8824 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
8825 }
8826 function isConcurrentMode(object) {
8827 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
8828 }
8829 function isContextConsumer(object) {
8830 return typeOf(object) === REACT_CONTEXT_TYPE;
8831 }
8832 function isContextProvider(object) {
8833 return typeOf(object) === REACT_PROVIDER_TYPE;
8834 }
8835 function isElement(object) {
8836 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
8837 }
8838 function isForwardRef(object) {
8839 return typeOf(object) === REACT_FORWARD_REF_TYPE;
8840 }
8841 function isFragment(object) {
8842 return typeOf(object) === REACT_FRAGMENT_TYPE;
8843 }
8844 function isLazy(object) {
8845 return typeOf(object) === REACT_LAZY_TYPE;
8846 }
8847 function isMemo(object) {
8848 return typeOf(object) === REACT_MEMO_TYPE;
8849 }
8850 function isPortal(object) {
8851 return typeOf(object) === REACT_PORTAL_TYPE;
8852 }
8853 function isProfiler(object) {
8854 return typeOf(object) === REACT_PROFILER_TYPE;
8855 }
8856 function isStrictMode(object) {
8857 return typeOf(object) === REACT_STRICT_MODE_TYPE;
8858 }
8859 function isSuspense(object) {
8860 return typeOf(object) === REACT_SUSPENSE_TYPE;
8861 }
8862
8863 exports.AsyncMode = AsyncMode;
8864 exports.ConcurrentMode = ConcurrentMode;
8865 exports.ContextConsumer = ContextConsumer;
8866 exports.ContextProvider = ContextProvider;
8867 exports.Element = Element;
8868 exports.ForwardRef = ForwardRef;
8869 exports.Fragment = Fragment;
8870 exports.Lazy = Lazy;
8871 exports.Memo = Memo;
8872 exports.Portal = Portal;
8873 exports.Profiler = Profiler;
8874 exports.StrictMode = StrictMode;
8875 exports.Suspense = Suspense;
8876 exports.isAsyncMode = isAsyncMode;
8877 exports.isConcurrentMode = isConcurrentMode;
8878 exports.isContextConsumer = isContextConsumer;
8879 exports.isContextProvider = isContextProvider;
8880 exports.isElement = isElement;
8881 exports.isForwardRef = isForwardRef;
8882 exports.isFragment = isFragment;
8883 exports.isLazy = isLazy;
8884 exports.isMemo = isMemo;
8885 exports.isPortal = isPortal;
8886 exports.isProfiler = isProfiler;
8887 exports.isStrictMode = isStrictMode;
8888 exports.isSuspense = isSuspense;
8889 exports.isValidElementType = isValidElementType;
8890 exports.typeOf = typeOf;
8891 })();
8892 }
8893
8894
8895 /***/ }),
8896
8897 /***/ "./node_modules/react-is/index.js":
8898 /*!****************************************!*\
8899 !*** ./node_modules/react-is/index.js ***!
8900 \****************************************/
8901 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8902
8903 "use strict";
8904
8905
8906 if (false) {} else {
8907 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js");
8908 }
8909
8910
8911 /***/ }),
8912
8913 /***/ "./node_modules/react/cjs/react-jsx-runtime.development.js":
8914 /*!*****************************************************************!*\
8915 !*** ./node_modules/react/cjs/react-jsx-runtime.development.js ***!
8916 \*****************************************************************/
8917 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8918
8919 "use strict";
8920 /** @license React v17.0.2
8921 * react-jsx-runtime.development.js
8922 *
8923 * Copyright (c) Facebook, Inc. and its affiliates.
8924 *
8925 * This source code is licensed under the MIT license found in the
8926 * LICENSE file in the root directory of this source tree.
8927 */
8928
8929
8930
8931 if (true) {
8932 (function() {
8933 'use strict';
8934
8935 var React = __webpack_require__(/*! react */ "react");
8936 var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
8937
8938 // ATTENTION
8939 // When adding new symbols to this file,
8940 // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
8941 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
8942 // nor polyfill, then a plain number is used for performance.
8943 var REACT_ELEMENT_TYPE = 0xeac7;
8944 var REACT_PORTAL_TYPE = 0xeaca;
8945 exports.Fragment = 0xeacb;
8946 var REACT_STRICT_MODE_TYPE = 0xeacc;
8947 var REACT_PROFILER_TYPE = 0xead2;
8948 var REACT_PROVIDER_TYPE = 0xeacd;
8949 var REACT_CONTEXT_TYPE = 0xeace;
8950 var REACT_FORWARD_REF_TYPE = 0xead0;
8951 var REACT_SUSPENSE_TYPE = 0xead1;
8952 var REACT_SUSPENSE_LIST_TYPE = 0xead8;
8953 var REACT_MEMO_TYPE = 0xead3;
8954 var REACT_LAZY_TYPE = 0xead4;
8955 var REACT_BLOCK_TYPE = 0xead9;
8956 var REACT_SERVER_BLOCK_TYPE = 0xeada;
8957 var REACT_FUNDAMENTAL_TYPE = 0xead5;
8958 var REACT_SCOPE_TYPE = 0xead7;
8959 var REACT_OPAQUE_ID_TYPE = 0xeae0;
8960 var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
8961 var REACT_OFFSCREEN_TYPE = 0xeae2;
8962 var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
8963
8964 if (typeof Symbol === 'function' && Symbol.for) {
8965 var symbolFor = Symbol.for;
8966 REACT_ELEMENT_TYPE = symbolFor('react.element');
8967 REACT_PORTAL_TYPE = symbolFor('react.portal');
8968 exports.Fragment = symbolFor('react.fragment');
8969 REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
8970 REACT_PROFILER_TYPE = symbolFor('react.profiler');
8971 REACT_PROVIDER_TYPE = symbolFor('react.provider');
8972 REACT_CONTEXT_TYPE = symbolFor('react.context');
8973 REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
8974 REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
8975 REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
8976 REACT_MEMO_TYPE = symbolFor('react.memo');
8977 REACT_LAZY_TYPE = symbolFor('react.lazy');
8978 REACT_BLOCK_TYPE = symbolFor('react.block');
8979 REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
8980 REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
8981 REACT_SCOPE_TYPE = symbolFor('react.scope');
8982 REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
8983 REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
8984 REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
8985 REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
8986 }
8987
8988 var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
8989 var FAUX_ITERATOR_SYMBOL = '@@iterator';
8990 function getIteratorFn(maybeIterable) {
8991 if (maybeIterable === null || typeof maybeIterable !== 'object') {
8992 return null;
8993 }
8994
8995 var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
8996
8997 if (typeof maybeIterator === 'function') {
8998 return maybeIterator;
8999 }
9000
9001 return null;
9002 }
9003
9004 var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
9005
9006 function error(format) {
9007 {
9008 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
9009 args[_key2 - 1] = arguments[_key2];
9010 }
9011
9012 printWarning('error', format, args);
9013 }
9014 }
9015
9016 function printWarning(level, format, args) {
9017 // When changing this logic, you might want to also
9018 // update consoleWithStackDev.www.js as well.
9019 {
9020 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
9021 var stack = ReactDebugCurrentFrame.getStackAddendum();
9022
9023 if (stack !== '') {
9024 format += '%s';
9025 args = args.concat([stack]);
9026 }
9027
9028 var argsWithFormat = args.map(function (item) {
9029 return '' + item;
9030 }); // Careful: RN currently depends on this prefix
9031
9032 argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
9033 // breaks IE9: https://github.com/facebook/react/issues/13610
9034 // eslint-disable-next-line react-internal/no-production-logging
9035
9036 Function.prototype.apply.call(console[level], console, argsWithFormat);
9037 }
9038 }
9039
9040 // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
9041
9042 var enableScopeAPI = false; // Experimental Create Event Handle API.
9043
9044 function isValidElementType(type) {
9045 if (typeof type === 'string' || typeof type === 'function') {
9046 return true;
9047 } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
9048
9049
9050 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 ) {
9051 return true;
9052 }
9053
9054 if (typeof type === 'object' && type !== null) {
9055 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) {
9056 return true;
9057 }
9058 }
9059
9060 return false;
9061 }
9062
9063 function getWrappedName(outerType, innerType, wrapperName) {
9064 var functionName = innerType.displayName || innerType.name || '';
9065 return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
9066 }
9067
9068 function getContextName(type) {
9069 return type.displayName || 'Context';
9070 }
9071
9072 function getComponentName(type) {
9073 if (type == null) {
9074 // Host root, text node or just invalid type.
9075 return null;
9076 }
9077
9078 {
9079 if (typeof type.tag === 'number') {
9080 error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
9081 }
9082 }
9083
9084 if (typeof type === 'function') {
9085 return type.displayName || type.name || null;
9086 }
9087
9088 if (typeof type === 'string') {
9089 return type;
9090 }
9091
9092 switch (type) {
9093 case exports.Fragment:
9094 return 'Fragment';
9095
9096 case REACT_PORTAL_TYPE:
9097 return 'Portal';
9098
9099 case REACT_PROFILER_TYPE:
9100 return 'Profiler';
9101
9102 case REACT_STRICT_MODE_TYPE:
9103 return 'StrictMode';
9104
9105 case REACT_SUSPENSE_TYPE:
9106 return 'Suspense';
9107
9108 case REACT_SUSPENSE_LIST_TYPE:
9109 return 'SuspenseList';
9110 }
9111
9112 if (typeof type === 'object') {
9113 switch (type.$$typeof) {
9114 case REACT_CONTEXT_TYPE:
9115 var context = type;
9116 return getContextName(context) + '.Consumer';
9117
9118 case REACT_PROVIDER_TYPE:
9119 var provider = type;
9120 return getContextName(provider._context) + '.Provider';
9121
9122 case REACT_FORWARD_REF_TYPE:
9123 return getWrappedName(type, type.render, 'ForwardRef');
9124
9125 case REACT_MEMO_TYPE:
9126 return getComponentName(type.type);
9127
9128 case REACT_BLOCK_TYPE:
9129 return getComponentName(type._render);
9130
9131 case REACT_LAZY_TYPE:
9132 {
9133 var lazyComponent = type;
9134 var payload = lazyComponent._payload;
9135 var init = lazyComponent._init;
9136
9137 try {
9138 return getComponentName(init(payload));
9139 } catch (x) {
9140 return null;
9141 }
9142 }
9143 }
9144 }
9145
9146 return null;
9147 }
9148
9149 // Helpers to patch console.logs to avoid logging during side-effect free
9150 // replaying on render function. This currently only patches the object
9151 // lazily which won't cover if the log function was extracted eagerly.
9152 // We could also eagerly patch the method.
9153 var disabledDepth = 0;
9154 var prevLog;
9155 var prevInfo;
9156 var prevWarn;
9157 var prevError;
9158 var prevGroup;
9159 var prevGroupCollapsed;
9160 var prevGroupEnd;
9161
9162 function disabledLog() {}
9163
9164 disabledLog.__reactDisabledLog = true;
9165 function disableLogs() {
9166 {
9167 if (disabledDepth === 0) {
9168 /* eslint-disable react-internal/no-production-logging */
9169 prevLog = console.log;
9170 prevInfo = console.info;
9171 prevWarn = console.warn;
9172 prevError = console.error;
9173 prevGroup = console.group;
9174 prevGroupCollapsed = console.groupCollapsed;
9175 prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
9176
9177 var props = {
9178 configurable: true,
9179 enumerable: true,
9180 value: disabledLog,
9181 writable: true
9182 }; // $FlowFixMe Flow thinks console is immutable.
9183
9184 Object.defineProperties(console, {
9185 info: props,
9186 log: props,
9187 warn: props,
9188 error: props,
9189 group: props,
9190 groupCollapsed: props,
9191 groupEnd: props
9192 });
9193 /* eslint-enable react-internal/no-production-logging */
9194 }
9195
9196 disabledDepth++;
9197 }
9198 }
9199 function reenableLogs() {
9200 {
9201 disabledDepth--;
9202
9203 if (disabledDepth === 0) {
9204 /* eslint-disable react-internal/no-production-logging */
9205 var props = {
9206 configurable: true,
9207 enumerable: true,
9208 writable: true
9209 }; // $FlowFixMe Flow thinks console is immutable.
9210
9211 Object.defineProperties(console, {
9212 log: _assign({}, props, {
9213 value: prevLog
9214 }),
9215 info: _assign({}, props, {
9216 value: prevInfo
9217 }),
9218 warn: _assign({}, props, {
9219 value: prevWarn
9220 }),
9221 error: _assign({}, props, {
9222 value: prevError
9223 }),
9224 group: _assign({}, props, {
9225 value: prevGroup
9226 }),
9227 groupCollapsed: _assign({}, props, {
9228 value: prevGroupCollapsed
9229 }),
9230 groupEnd: _assign({}, props, {
9231 value: prevGroupEnd
9232 })
9233 });
9234 /* eslint-enable react-internal/no-production-logging */
9235 }
9236
9237 if (disabledDepth < 0) {
9238 error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
9239 }
9240 }
9241 }
9242
9243 var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
9244 var prefix;
9245 function describeBuiltInComponentFrame(name, source, ownerFn) {
9246 {
9247 if (prefix === undefined) {
9248 // Extract the VM specific prefix used by each line.
9249 try {
9250 throw Error();
9251 } catch (x) {
9252 var match = x.stack.trim().match(/\n( *(at )?)/);
9253 prefix = match && match[1] || '';
9254 }
9255 } // We use the prefix to ensure our stacks line up with native stack frames.
9256
9257
9258 return '\n' + prefix + name;
9259 }
9260 }
9261 var reentry = false;
9262 var componentFrameCache;
9263
9264 {
9265 var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
9266 componentFrameCache = new PossiblyWeakMap();
9267 }
9268
9269 function describeNativeComponentFrame(fn, construct) {
9270 // If something asked for a stack inside a fake render, it should get ignored.
9271 if (!fn || reentry) {
9272 return '';
9273 }
9274
9275 {
9276 var frame = componentFrameCache.get(fn);
9277
9278 if (frame !== undefined) {
9279 return frame;
9280 }
9281 }
9282
9283 var control;
9284 reentry = true;
9285 var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
9286
9287 Error.prepareStackTrace = undefined;
9288 var previousDispatcher;
9289
9290 {
9291 previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
9292 // for warnings.
9293
9294 ReactCurrentDispatcher.current = null;
9295 disableLogs();
9296 }
9297
9298 try {
9299 // This should throw.
9300 if (construct) {
9301 // Something should be setting the props in the constructor.
9302 var Fake = function () {
9303 throw Error();
9304 }; // $FlowFixMe
9305
9306
9307 Object.defineProperty(Fake.prototype, 'props', {
9308 set: function () {
9309 // We use a throwing setter instead of frozen or non-writable props
9310 // because that won't throw in a non-strict mode function.
9311 throw Error();
9312 }
9313 });
9314
9315 if (typeof Reflect === 'object' && Reflect.construct) {
9316 // We construct a different control for this case to include any extra
9317 // frames added by the construct call.
9318 try {
9319 Reflect.construct(Fake, []);
9320 } catch (x) {
9321 control = x;
9322 }
9323
9324 Reflect.construct(fn, [], Fake);
9325 } else {
9326 try {
9327 Fake.call();
9328 } catch (x) {
9329 control = x;
9330 }
9331
9332 fn.call(Fake.prototype);
9333 }
9334 } else {
9335 try {
9336 throw Error();
9337 } catch (x) {
9338 control = x;
9339 }
9340
9341 fn();
9342 }
9343 } catch (sample) {
9344 // This is inlined manually because closure doesn't do it for us.
9345 if (sample && control && typeof sample.stack === 'string') {
9346 // This extracts the first frame from the sample that isn't also in the control.
9347 // Skipping one frame that we assume is the frame that calls the two.
9348 var sampleLines = sample.stack.split('\n');
9349 var controlLines = control.stack.split('\n');
9350 var s = sampleLines.length - 1;
9351 var c = controlLines.length - 1;
9352
9353 while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
9354 // We expect at least one stack frame to be shared.
9355 // Typically this will be the root most one. However, stack frames may be
9356 // cut off due to maximum stack limits. In this case, one maybe cut off
9357 // earlier than the other. We assume that the sample is longer or the same
9358 // and there for cut off earlier. So we should find the root most frame in
9359 // the sample somewhere in the control.
9360 c--;
9361 }
9362
9363 for (; s >= 1 && c >= 0; s--, c--) {
9364 // Next we find the first one that isn't the same which should be the
9365 // frame that called our sample function and the control.
9366 if (sampleLines[s] !== controlLines[c]) {
9367 // In V8, the first line is describing the message but other VMs don't.
9368 // If we're about to return the first line, and the control is also on the same
9369 // line, that's a pretty good indicator that our sample threw at same line as
9370 // the control. I.e. before we entered the sample frame. So we ignore this result.
9371 // This can happen if you passed a class to function component, or non-function.
9372 if (s !== 1 || c !== 1) {
9373 do {
9374 s--;
9375 c--; // We may still have similar intermediate frames from the construct call.
9376 // The next one that isn't the same should be our match though.
9377
9378 if (c < 0 || sampleLines[s] !== controlLines[c]) {
9379 // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
9380 var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
9381
9382 {
9383 if (typeof fn === 'function') {
9384 componentFrameCache.set(fn, _frame);
9385 }
9386 } // Return the line we found.
9387
9388
9389 return _frame;
9390 }
9391 } while (s >= 1 && c >= 0);
9392 }
9393
9394 break;
9395 }
9396 }
9397 }
9398 } finally {
9399 reentry = false;
9400
9401 {
9402 ReactCurrentDispatcher.current = previousDispatcher;
9403 reenableLogs();
9404 }
9405
9406 Error.prepareStackTrace = previousPrepareStackTrace;
9407 } // Fallback to just using the name if we couldn't make it throw.
9408
9409
9410 var name = fn ? fn.displayName || fn.name : '';
9411 var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
9412
9413 {
9414 if (typeof fn === 'function') {
9415 componentFrameCache.set(fn, syntheticFrame);
9416 }
9417 }
9418
9419 return syntheticFrame;
9420 }
9421 function describeFunctionComponentFrame(fn, source, ownerFn) {
9422 {
9423 return describeNativeComponentFrame(fn, false);
9424 }
9425 }
9426
9427 function shouldConstruct(Component) {
9428 var prototype = Component.prototype;
9429 return !!(prototype && prototype.isReactComponent);
9430 }
9431
9432 function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
9433
9434 if (type == null) {
9435 return '';
9436 }
9437
9438 if (typeof type === 'function') {
9439 {
9440 return describeNativeComponentFrame(type, shouldConstruct(type));
9441 }
9442 }
9443
9444 if (typeof type === 'string') {
9445 return describeBuiltInComponentFrame(type);
9446 }
9447
9448 switch (type) {
9449 case REACT_SUSPENSE_TYPE:
9450 return describeBuiltInComponentFrame('Suspense');
9451
9452 case REACT_SUSPENSE_LIST_TYPE:
9453 return describeBuiltInComponentFrame('SuspenseList');
9454 }
9455
9456 if (typeof type === 'object') {
9457 switch (type.$$typeof) {
9458 case REACT_FORWARD_REF_TYPE:
9459 return describeFunctionComponentFrame(type.render);
9460
9461 case REACT_MEMO_TYPE:
9462 // Memo may contain any component type so we recursively resolve it.
9463 return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
9464
9465 case REACT_BLOCK_TYPE:
9466 return describeFunctionComponentFrame(type._render);
9467
9468 case REACT_LAZY_TYPE:
9469 {
9470 var lazyComponent = type;
9471 var payload = lazyComponent._payload;
9472 var init = lazyComponent._init;
9473
9474 try {
9475 // Lazy may contain any component type so we recursively resolve it.
9476 return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
9477 } catch (x) {}
9478 }
9479 }
9480 }
9481
9482 return '';
9483 }
9484
9485 var loggedTypeFailures = {};
9486 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
9487
9488 function setCurrentlyValidatingElement(element) {
9489 {
9490 if (element) {
9491 var owner = element._owner;
9492 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
9493 ReactDebugCurrentFrame.setExtraStackFrame(stack);
9494 } else {
9495 ReactDebugCurrentFrame.setExtraStackFrame(null);
9496 }
9497 }
9498 }
9499
9500 function checkPropTypes(typeSpecs, values, location, componentName, element) {
9501 {
9502 // $FlowFixMe This is okay but Flow doesn't know it.
9503 var has = Function.call.bind(Object.prototype.hasOwnProperty);
9504
9505 for (var typeSpecName in typeSpecs) {
9506 if (has(typeSpecs, typeSpecName)) {
9507 var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
9508 // fail the render phase where it didn't fail before. So we log it.
9509 // After these have been cleaned up, we'll let them throw.
9510
9511 try {
9512 // This is intentionally an invariant that gets caught. It's the same
9513 // behavior as without this statement except with a better message.
9514 if (typeof typeSpecs[typeSpecName] !== 'function') {
9515 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`.');
9516 err.name = 'Invariant Violation';
9517 throw err;
9518 }
9519
9520 error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
9521 } catch (ex) {
9522 error$1 = ex;
9523 }
9524
9525 if (error$1 && !(error$1 instanceof Error)) {
9526 setCurrentlyValidatingElement(element);
9527
9528 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);
9529
9530 setCurrentlyValidatingElement(null);
9531 }
9532
9533 if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
9534 // Only monitor this failure once because there tends to be a lot of the
9535 // same error.
9536 loggedTypeFailures[error$1.message] = true;
9537 setCurrentlyValidatingElement(element);
9538
9539 error('Failed %s type: %s', location, error$1.message);
9540
9541 setCurrentlyValidatingElement(null);
9542 }
9543 }
9544 }
9545 }
9546 }
9547
9548 var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
9549 var hasOwnProperty = Object.prototype.hasOwnProperty;
9550 var RESERVED_PROPS = {
9551 key: true,
9552 ref: true,
9553 __self: true,
9554 __source: true
9555 };
9556 var specialPropKeyWarningShown;
9557 var specialPropRefWarningShown;
9558 var didWarnAboutStringRefs;
9559
9560 {
9561 didWarnAboutStringRefs = {};
9562 }
9563
9564 function hasValidRef(config) {
9565 {
9566 if (hasOwnProperty.call(config, 'ref')) {
9567 var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
9568
9569 if (getter && getter.isReactWarning) {
9570 return false;
9571 }
9572 }
9573 }
9574
9575 return config.ref !== undefined;
9576 }
9577
9578 function hasValidKey(config) {
9579 {
9580 if (hasOwnProperty.call(config, 'key')) {
9581 var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
9582
9583 if (getter && getter.isReactWarning) {
9584 return false;
9585 }
9586 }
9587 }
9588
9589 return config.key !== undefined;
9590 }
9591
9592 function warnIfStringRefCannotBeAutoConverted(config, self) {
9593 {
9594 if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
9595 var componentName = getComponentName(ReactCurrentOwner.current.type);
9596
9597 if (!didWarnAboutStringRefs[componentName]) {
9598 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);
9599
9600 didWarnAboutStringRefs[componentName] = true;
9601 }
9602 }
9603 }
9604 }
9605
9606 function defineKeyPropWarningGetter(props, displayName) {
9607 {
9608 var warnAboutAccessingKey = function () {
9609 if (!specialPropKeyWarningShown) {
9610 specialPropKeyWarningShown = true;
9611
9612 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);
9613 }
9614 };
9615
9616 warnAboutAccessingKey.isReactWarning = true;
9617 Object.defineProperty(props, 'key', {
9618 get: warnAboutAccessingKey,
9619 configurable: true
9620 });
9621 }
9622 }
9623
9624 function defineRefPropWarningGetter(props, displayName) {
9625 {
9626 var warnAboutAccessingRef = function () {
9627 if (!specialPropRefWarningShown) {
9628 specialPropRefWarningShown = true;
9629
9630 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);
9631 }
9632 };
9633
9634 warnAboutAccessingRef.isReactWarning = true;
9635 Object.defineProperty(props, 'ref', {
9636 get: warnAboutAccessingRef,
9637 configurable: true
9638 });
9639 }
9640 }
9641 /**
9642 * Factory method to create a new React element. This no longer adheres to
9643 * the class pattern, so do not use new to call it. Also, instanceof check
9644 * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
9645 * if something is a React Element.
9646 *
9647 * @param {*} type
9648 * @param {*} props
9649 * @param {*} key
9650 * @param {string|object} ref
9651 * @param {*} owner
9652 * @param {*} self A *temporary* helper to detect places where `this` is
9653 * different from the `owner` when React.createElement is called, so that we
9654 * can warn. We want to get rid of owner and replace string `ref`s with arrow
9655 * functions, and as long as `this` and owner are the same, there will be no
9656 * change in behavior.
9657 * @param {*} source An annotation object (added by a transpiler or otherwise)
9658 * indicating filename, line number, and/or other information.
9659 * @internal
9660 */
9661
9662
9663 var ReactElement = function (type, key, ref, self, source, owner, props) {
9664 var element = {
9665 // This tag allows us to uniquely identify this as a React Element
9666 $$typeof: REACT_ELEMENT_TYPE,
9667 // Built-in properties that belong on the element
9668 type: type,
9669 key: key,
9670 ref: ref,
9671 props: props,
9672 // Record the component responsible for creating this element.
9673 _owner: owner
9674 };
9675
9676 {
9677 // The validation flag is currently mutative. We put it on
9678 // an external backing store so that we can freeze the whole object.
9679 // This can be replaced with a WeakMap once they are implemented in
9680 // commonly used development environments.
9681 element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
9682 // the validation flag non-enumerable (where possible, which should
9683 // include every environment we run tests in), so the test framework
9684 // ignores it.
9685
9686 Object.defineProperty(element._store, 'validated', {
9687 configurable: false,
9688 enumerable: false,
9689 writable: true,
9690 value: false
9691 }); // self and source are DEV only properties.
9692
9693 Object.defineProperty(element, '_self', {
9694 configurable: false,
9695 enumerable: false,
9696 writable: false,
9697 value: self
9698 }); // Two elements created in two different places should be considered
9699 // equal for testing purposes and therefore we hide it from enumeration.
9700
9701 Object.defineProperty(element, '_source', {
9702 configurable: false,
9703 enumerable: false,
9704 writable: false,
9705 value: source
9706 });
9707
9708 if (Object.freeze) {
9709 Object.freeze(element.props);
9710 Object.freeze(element);
9711 }
9712 }
9713
9714 return element;
9715 };
9716 /**
9717 * https://github.com/reactjs/rfcs/pull/107
9718 * @param {*} type
9719 * @param {object} props
9720 * @param {string} key
9721 */
9722
9723 function jsxDEV(type, config, maybeKey, source, self) {
9724 {
9725 var propName; // Reserved names are extracted
9726
9727 var props = {};
9728 var key = null;
9729 var ref = null; // Currently, key can be spread in as a prop. This causes a potential
9730 // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
9731 // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
9732 // but as an intermediary step, we will use jsxDEV for everything except
9733 // <div {...props} key="Hi" />, because we aren't currently able to tell if
9734 // key is explicitly declared to be undefined or not.
9735
9736 if (maybeKey !== undefined) {
9737 key = '' + maybeKey;
9738 }
9739
9740 if (hasValidKey(config)) {
9741 key = '' + config.key;
9742 }
9743
9744 if (hasValidRef(config)) {
9745 ref = config.ref;
9746 warnIfStringRefCannotBeAutoConverted(config, self);
9747 } // Remaining properties are added to a new props object
9748
9749
9750 for (propName in config) {
9751 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
9752 props[propName] = config[propName];
9753 }
9754 } // Resolve default props
9755
9756
9757 if (type && type.defaultProps) {
9758 var defaultProps = type.defaultProps;
9759
9760 for (propName in defaultProps) {
9761 if (props[propName] === undefined) {
9762 props[propName] = defaultProps[propName];
9763 }
9764 }
9765 }
9766
9767 if (key || ref) {
9768 var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
9769
9770 if (key) {
9771 defineKeyPropWarningGetter(props, displayName);
9772 }
9773
9774 if (ref) {
9775 defineRefPropWarningGetter(props, displayName);
9776 }
9777 }
9778
9779 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
9780 }
9781 }
9782
9783 var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
9784 var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
9785
9786 function setCurrentlyValidatingElement$1(element) {
9787 {
9788 if (element) {
9789 var owner = element._owner;
9790 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
9791 ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
9792 } else {
9793 ReactDebugCurrentFrame$1.setExtraStackFrame(null);
9794 }
9795 }
9796 }
9797
9798 var propTypesMisspellWarningShown;
9799
9800 {
9801 propTypesMisspellWarningShown = false;
9802 }
9803 /**
9804 * Verifies the object is a ReactElement.
9805 * See https://reactjs.org/docs/react-api.html#isvalidelement
9806 * @param {?object} object
9807 * @return {boolean} True if `object` is a ReactElement.
9808 * @final
9809 */
9810
9811 function isValidElement(object) {
9812 {
9813 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
9814 }
9815 }
9816
9817 function getDeclarationErrorAddendum() {
9818 {
9819 if (ReactCurrentOwner$1.current) {
9820 var name = getComponentName(ReactCurrentOwner$1.current.type);
9821
9822 if (name) {
9823 return '\n\nCheck the render method of `' + name + '`.';
9824 }
9825 }
9826
9827 return '';
9828 }
9829 }
9830
9831 function getSourceInfoErrorAddendum(source) {
9832 {
9833 if (source !== undefined) {
9834 var fileName = source.fileName.replace(/^.*[\\\/]/, '');
9835 var lineNumber = source.lineNumber;
9836 return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
9837 }
9838
9839 return '';
9840 }
9841 }
9842 /**
9843 * Warn if there's no key explicitly set on dynamic arrays of children or
9844 * object keys are not valid. This allows us to keep track of children between
9845 * updates.
9846 */
9847
9848
9849 var ownerHasKeyUseWarning = {};
9850
9851 function getCurrentComponentErrorInfo(parentType) {
9852 {
9853 var info = getDeclarationErrorAddendum();
9854
9855 if (!info) {
9856 var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
9857
9858 if (parentName) {
9859 info = "\n\nCheck the top-level render call using <" + parentName + ">.";
9860 }
9861 }
9862
9863 return info;
9864 }
9865 }
9866 /**
9867 * Warn if the element doesn't have an explicit key assigned to it.
9868 * This element is in an array. The array could grow and shrink or be
9869 * reordered. All children that haven't already been validated are required to
9870 * have a "key" property assigned to it. Error statuses are cached so a warning
9871 * will only be shown once.
9872 *
9873 * @internal
9874 * @param {ReactElement} element Element that requires a key.
9875 * @param {*} parentType element's parent's type.
9876 */
9877
9878
9879 function validateExplicitKey(element, parentType) {
9880 {
9881 if (!element._store || element._store.validated || element.key != null) {
9882 return;
9883 }
9884
9885 element._store.validated = true;
9886 var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
9887
9888 if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
9889 return;
9890 }
9891
9892 ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
9893 // property, it may be the creator of the child that's responsible for
9894 // assigning it a key.
9895
9896 var childOwner = '';
9897
9898 if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
9899 // Give the component that originally created this child.
9900 childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
9901 }
9902
9903 setCurrentlyValidatingElement$1(element);
9904
9905 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);
9906
9907 setCurrentlyValidatingElement$1(null);
9908 }
9909 }
9910 /**
9911 * Ensure that every element either is passed in a static location, in an
9912 * array with an explicit keys property defined, or in an object literal
9913 * with valid key property.
9914 *
9915 * @internal
9916 * @param {ReactNode} node Statically passed child of any type.
9917 * @param {*} parentType node's parent's type.
9918 */
9919
9920
9921 function validateChildKeys(node, parentType) {
9922 {
9923 if (typeof node !== 'object') {
9924 return;
9925 }
9926
9927 if (Array.isArray(node)) {
9928 for (var i = 0; i < node.length; i++) {
9929 var child = node[i];
9930
9931 if (isValidElement(child)) {
9932 validateExplicitKey(child, parentType);
9933 }
9934 }
9935 } else if (isValidElement(node)) {
9936 // This element was passed in a valid location.
9937 if (node._store) {
9938 node._store.validated = true;
9939 }
9940 } else if (node) {
9941 var iteratorFn = getIteratorFn(node);
9942
9943 if (typeof iteratorFn === 'function') {
9944 // Entry iterators used to provide implicit keys,
9945 // but now we print a separate warning for them later.
9946 if (iteratorFn !== node.entries) {
9947 var iterator = iteratorFn.call(node);
9948 var step;
9949
9950 while (!(step = iterator.next()).done) {
9951 if (isValidElement(step.value)) {
9952 validateExplicitKey(step.value, parentType);
9953 }
9954 }
9955 }
9956 }
9957 }
9958 }
9959 }
9960 /**
9961 * Given an element, validate that its props follow the propTypes definition,
9962 * provided by the type.
9963 *
9964 * @param {ReactElement} element
9965 */
9966
9967
9968 function validatePropTypes(element) {
9969 {
9970 var type = element.type;
9971
9972 if (type === null || type === undefined || typeof type === 'string') {
9973 return;
9974 }
9975
9976 var propTypes;
9977
9978 if (typeof type === 'function') {
9979 propTypes = type.propTypes;
9980 } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
9981 // Inner props are checked in the reconciler.
9982 type.$$typeof === REACT_MEMO_TYPE)) {
9983 propTypes = type.propTypes;
9984 } else {
9985 return;
9986 }
9987
9988 if (propTypes) {
9989 // Intentionally inside to avoid triggering lazy initializers:
9990 var name = getComponentName(type);
9991 checkPropTypes(propTypes, element.props, 'prop', name, element);
9992 } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
9993 propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
9994
9995 var _name = getComponentName(type);
9996
9997 error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
9998 }
9999
10000 if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
10001 error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
10002 }
10003 }
10004 }
10005 /**
10006 * Given a fragment, validate that it can only be provided with fragment props
10007 * @param {ReactElement} fragment
10008 */
10009
10010
10011 function validateFragmentProps(fragment) {
10012 {
10013 var keys = Object.keys(fragment.props);
10014
10015 for (var i = 0; i < keys.length; i++) {
10016 var key = keys[i];
10017
10018 if (key !== 'children' && key !== 'key') {
10019 setCurrentlyValidatingElement$1(fragment);
10020
10021 error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
10022
10023 setCurrentlyValidatingElement$1(null);
10024 break;
10025 }
10026 }
10027
10028 if (fragment.ref !== null) {
10029 setCurrentlyValidatingElement$1(fragment);
10030
10031 error('Invalid attribute `ref` supplied to `React.Fragment`.');
10032
10033 setCurrentlyValidatingElement$1(null);
10034 }
10035 }
10036 }
10037
10038 function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
10039 {
10040 var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
10041 // succeed and there will likely be errors in render.
10042
10043 if (!validType) {
10044 var info = '';
10045
10046 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
10047 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.";
10048 }
10049
10050 var sourceInfo = getSourceInfoErrorAddendum(source);
10051
10052 if (sourceInfo) {
10053 info += sourceInfo;
10054 } else {
10055 info += getDeclarationErrorAddendum();
10056 }
10057
10058 var typeString;
10059
10060 if (type === null) {
10061 typeString = 'null';
10062 } else if (Array.isArray(type)) {
10063 typeString = 'array';
10064 } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
10065 typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
10066 info = ' Did you accidentally export a JSX literal instead of a component?';
10067 } else {
10068 typeString = typeof type;
10069 }
10070
10071 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);
10072 }
10073
10074 var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
10075 // TODO: Drop this when these are no longer allowed as the type argument.
10076
10077 if (element == null) {
10078 return element;
10079 } // Skip key warning if the type isn't valid since our key validation logic
10080 // doesn't expect a non-string/function type and can throw confusing errors.
10081 // We don't want exception behavior to differ between dev and prod.
10082 // (Rendering will throw with a helpful message and as soon as the type is
10083 // fixed, the key warnings will appear.)
10084
10085
10086 if (validType) {
10087 var children = props.children;
10088
10089 if (children !== undefined) {
10090 if (isStaticChildren) {
10091 if (Array.isArray(children)) {
10092 for (var i = 0; i < children.length; i++) {
10093 validateChildKeys(children[i], type);
10094 }
10095
10096 if (Object.freeze) {
10097 Object.freeze(children);
10098 }
10099 } else {
10100 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.');
10101 }
10102 } else {
10103 validateChildKeys(children, type);
10104 }
10105 }
10106 }
10107
10108 if (type === exports.Fragment) {
10109 validateFragmentProps(element);
10110 } else {
10111 validatePropTypes(element);
10112 }
10113
10114 return element;
10115 }
10116 } // These two functions exist to still get child warnings in dev
10117 // even with the prod transform. This means that jsxDEV is purely
10118 // opt-in behavior for better messages but that we won't stop
10119 // giving you warnings if you use production apis.
10120
10121 function jsxWithValidationStatic(type, props, key) {
10122 {
10123 return jsxWithValidation(type, props, key, true);
10124 }
10125 }
10126 function jsxWithValidationDynamic(type, props, key) {
10127 {
10128 return jsxWithValidation(type, props, key, false);
10129 }
10130 }
10131
10132 var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
10133 // for now we can ship identical prod functions
10134
10135 var jsxs = jsxWithValidationStatic ;
10136
10137 exports.jsx = jsx;
10138 exports.jsxs = jsxs;
10139 })();
10140 }
10141
10142
10143 /***/ }),
10144
10145 /***/ "./node_modules/react/jsx-runtime.js":
10146 /*!*******************************************!*\
10147 !*** ./node_modules/react/jsx-runtime.js ***!
10148 \*******************************************/
10149 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
10150
10151 "use strict";
10152
10153
10154 if (false) {} else {
10155 module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ "./node_modules/react/cjs/react-jsx-runtime.development.js");
10156 }
10157
10158
10159 /***/ }),
10160
10161 /***/ "./node_modules/styled-components/dist/styled-components.browser.esm.js":
10162 /*!******************************************************************************!*\
10163 !*** ./node_modules/styled-components/dist/styled-components.browser.esm.js ***!
10164 \******************************************************************************/
10165 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10166
10167 "use strict";
10168 __webpack_require__.r(__webpack_exports__);
10169 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10170 /* harmony export */ "ServerStyleSheet": () => (/* binding */ ServerStyleSheet),
10171 /* harmony export */ "StyleSheetConsumer": () => (/* binding */ StyleSheetConsumer),
10172 /* harmony export */ "StyleSheetContext": () => (/* binding */ StyleSheetContext),
10173 /* harmony export */ "StyleSheetManager": () => (/* binding */ StyleSheetManager),
10174 /* harmony export */ "ThemeConsumer": () => (/* binding */ ThemeConsumer),
10175 /* harmony export */ "ThemeContext": () => (/* binding */ ThemeContext),
10176 /* harmony export */ "ThemeProvider": () => (/* binding */ ThemeProvider),
10177 /* 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),
10178 /* harmony export */ "createGlobalStyle": () => (/* binding */ createGlobalStyle),
10179 /* harmony export */ "css": () => (/* binding */ css),
10180 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
10181 /* harmony export */ "isStyledComponent": () => (/* binding */ isStyledComponent),
10182 /* harmony export */ "keyframes": () => (/* binding */ keyframes),
10183 /* harmony export */ "withTheme": () => (/* binding */ withTheme)
10184 /* harmony export */ });
10185 /* harmony import */ var stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! stylis/stylis.min */ "./node_modules/stylis/stylis.min.js");
10186 /* harmony import */ var stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0__);
10187 /* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! stylis-rule-sheet */ "./node_modules/stylis-rule-sheet/index.js");
10188 /* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1__);
10189 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
10190 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
10191 /* harmony import */ var _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/unitless */ "./node_modules/@emotion/unitless/dist/unitless.browser.esm.js");
10192 /* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
10193 /* harmony import */ var memoize_one__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! memoize-one */ "./node_modules/memoize-one/dist/memoize-one.esm.js");
10194 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
10195 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__);
10196 /* 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");
10197 /* harmony import */ var merge_anything__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! merge-anything */ "./node_modules/merge-anything/dist/index.esm.js");
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208 //
10209
10210 var interleave = (function (strings, interpolations) {
10211 var result = [strings[0]];
10212
10213 for (var i = 0, len = interpolations.length; i < len; i += 1) {
10214 result.push(interpolations[i], strings[i + 1]);
10215 }
10216
10217 return result;
10218 });
10219
10220 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
10221 return typeof obj;
10222 } : function (obj) {
10223 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
10224 };
10225
10226 var classCallCheck = function (instance, Constructor) {
10227 if (!(instance instanceof Constructor)) {
10228 throw new TypeError("Cannot call a class as a function");
10229 }
10230 };
10231
10232 var createClass = function () {
10233 function defineProperties(target, props) {
10234 for (var i = 0; i < props.length; i++) {
10235 var descriptor = props[i];
10236 descriptor.enumerable = descriptor.enumerable || false;
10237 descriptor.configurable = true;
10238 if ("value" in descriptor) descriptor.writable = true;
10239 Object.defineProperty(target, descriptor.key, descriptor);
10240 }
10241 }
10242
10243 return function (Constructor, protoProps, staticProps) {
10244 if (protoProps) defineProperties(Constructor.prototype, protoProps);
10245 if (staticProps) defineProperties(Constructor, staticProps);
10246 return Constructor;
10247 };
10248 }();
10249
10250 var _extends = Object.assign || function (target) {
10251 for (var i = 1; i < arguments.length; i++) {
10252 var source = arguments[i];
10253
10254 for (var key in source) {
10255 if (Object.prototype.hasOwnProperty.call(source, key)) {
10256 target[key] = source[key];
10257 }
10258 }
10259 }
10260
10261 return target;
10262 };
10263
10264 var inherits = function (subClass, superClass) {
10265 if (typeof superClass !== "function" && superClass !== null) {
10266 throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
10267 }
10268
10269 subClass.prototype = Object.create(superClass && superClass.prototype, {
10270 constructor: {
10271 value: subClass,
10272 enumerable: false,
10273 writable: true,
10274 configurable: true
10275 }
10276 });
10277 if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
10278 };
10279
10280 var objectWithoutProperties = function (obj, keys) {
10281 var target = {};
10282
10283 for (var i in obj) {
10284 if (keys.indexOf(i) >= 0) continue;
10285 if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
10286 target[i] = obj[i];
10287 }
10288
10289 return target;
10290 };
10291
10292 var possibleConstructorReturn = function (self, call) {
10293 if (!self) {
10294 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
10295 }
10296
10297 return call && (typeof call === "object" || typeof call === "function") ? call : self;
10298 };
10299
10300 //
10301 var isPlainObject = (function (x) {
10302 return (typeof x === 'undefined' ? 'undefined' : _typeof(x)) === 'object' && x.constructor === Object;
10303 });
10304
10305 //
10306 var EMPTY_ARRAY = Object.freeze([]);
10307 var EMPTY_OBJECT = Object.freeze({});
10308
10309 //
10310 function isFunction(test) {
10311 return typeof test === 'function';
10312 }
10313
10314 //
10315
10316 function getComponentName(target) {
10317 return ( true ? typeof target === 'string' && target : 0) || target.displayName || target.name || 'Component';
10318 }
10319
10320 //
10321 function isStatelessFunction(test) {
10322 return typeof test === 'function' && !(test.prototype && test.prototype.isReactComponent);
10323 }
10324
10325 //
10326 function isStyledComponent(target) {
10327 return target && typeof target.styledComponentId === 'string';
10328 }
10329
10330 //
10331
10332 var SC_ATTR = typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || 'data-styled';
10333
10334 var SC_VERSION_ATTR = 'data-styled-version';
10335
10336 var SC_STREAM_ATTR = 'data-styled-streamed';
10337
10338 var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;
10339
10340 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';
10341
10342 // Shared empty execution context when generating static styles
10343 var STATIC_EXECUTION_CONTEXT = {};
10344
10345 //
10346
10347
10348 /**
10349 * Parse errors.md and turn it into a simple hash of code: message
10350 */
10351 var ERRORS = true ? {
10352 "1": "Cannot create styled-component for component: %s.\n\n",
10353 "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",
10354 "3": "Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",
10355 "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",
10356 "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",
10357 "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",
10358 "7": "ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n",
10359 "8": "ThemeProvider: Please make your \"theme\" prop an object.\n\n",
10360 "9": "Missing document `<head>`\n\n",
10361 "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",
10362 "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",
10363 "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",
10364 "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"
10365 } : 0;
10366
10367 /**
10368 * super basic version of sprintf
10369 */
10370 function format() {
10371 var a = arguments.length <= 0 ? undefined : arguments[0];
10372 var b = [];
10373
10374 for (var c = 1, len = arguments.length; c < len; c += 1) {
10375 b.push(arguments.length <= c ? undefined : arguments[c]);
10376 }
10377
10378 b.forEach(function (d) {
10379 a = a.replace(/%[a-z]/, d);
10380 });
10381
10382 return a;
10383 }
10384
10385 /**
10386 * Create an error file out of errors.md for development and a simple web link to the full errors
10387 * in production mode.
10388 */
10389
10390 var StyledComponentsError = function (_Error) {
10391 inherits(StyledComponentsError, _Error);
10392
10393 function StyledComponentsError(code) {
10394 classCallCheck(this, StyledComponentsError);
10395
10396 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
10397 interpolations[_key - 1] = arguments[_key];
10398 }
10399
10400 if (false) { var _this; } else {
10401 var _this = possibleConstructorReturn(this, _Error.call(this, format.apply(undefined, [ERRORS[code]].concat(interpolations)).trim()));
10402 }
10403 return possibleConstructorReturn(_this);
10404 }
10405
10406 return StyledComponentsError;
10407 }(Error);
10408
10409 //
10410 var SC_COMPONENT_ID = /^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm;
10411
10412 var extractComps = (function (maybeCSS) {
10413 var css = '' + (maybeCSS || ''); // Definitely a string, and a clone
10414 var existingComponents = [];
10415 css.replace(SC_COMPONENT_ID, function (match, componentId, matchIndex) {
10416 existingComponents.push({ componentId: componentId, matchIndex: matchIndex });
10417 return match;
10418 });
10419 return existingComponents.map(function (_ref, i) {
10420 var componentId = _ref.componentId,
10421 matchIndex = _ref.matchIndex;
10422
10423 var nextComp = existingComponents[i + 1];
10424 var cssFromDOM = nextComp ? css.slice(matchIndex, nextComp.matchIndex) : css.slice(matchIndex);
10425 return { componentId: componentId, cssFromDOM: cssFromDOM };
10426 });
10427 });
10428
10429 //
10430
10431 var COMMENT_REGEX = /^\s*\/\/.*$/gm;
10432
10433 // NOTE: This stylis instance is only used to split rules from SSR'd style tags
10434 var stylisSplitter = new (stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default())({
10435 global: false,
10436 cascade: true,
10437 keyframe: false,
10438 prefix: false,
10439 compress: false,
10440 semicolon: true
10441 });
10442
10443 var stylis = new (stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default())({
10444 global: false,
10445 cascade: true,
10446 keyframe: false,
10447 prefix: true,
10448 compress: false,
10449 semicolon: false // NOTE: This means "autocomplete missing semicolons"
10450 });
10451
10452 // Wrap `insertRulePlugin to build a list of rules,
10453 // and then make our own plugin to return the rules. This
10454 // makes it easier to hook into the existing SSR architecture
10455
10456 var parsingRules = [];
10457
10458 // eslint-disable-next-line consistent-return
10459 var returnRulesPlugin = function returnRulesPlugin(context) {
10460 if (context === -2) {
10461 var parsedRules = parsingRules;
10462 parsingRules = [];
10463 return parsedRules;
10464 }
10465 };
10466
10467 var parseRulesPlugin = stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1___default()(function (rule) {
10468 parsingRules.push(rule);
10469 });
10470
10471 var _componentId = void 0;
10472 var _selector = void 0;
10473 var _selectorRegexp = void 0;
10474
10475 var selfReferenceReplacer = function selfReferenceReplacer(match, offset, string) {
10476 if (
10477 // the first self-ref is always untouched
10478 offset > 0 &&
10479 // there should be at least two self-refs to do a replacement (.b > .b)
10480 string.slice(0, offset).indexOf(_selector) !== -1 &&
10481 // no consecutive self refs (.b.b); that is a precedence boost and treated differently
10482 string.slice(offset - _selector.length, offset) !== _selector) {
10483 return '.' + _componentId;
10484 }
10485
10486 return match;
10487 };
10488
10489 /**
10490 * When writing a style like
10491 *
10492 * & + & {
10493 * color: red;
10494 * }
10495 *
10496 * The second ampersand should be a reference to the static component class. stylis
10497 * has no knowledge of static class so we have to intelligently replace the base selector.
10498 */
10499 var selfReferenceReplacementPlugin = function selfReferenceReplacementPlugin(context, _, selectors) {
10500 if (context === 2 && selectors.length && selectors[0].lastIndexOf(_selector) > 0) {
10501 // eslint-disable-next-line no-param-reassign
10502 selectors[0] = selectors[0].replace(_selectorRegexp, selfReferenceReplacer);
10503 }
10504 };
10505
10506 stylis.use([selfReferenceReplacementPlugin, parseRulesPlugin, returnRulesPlugin]);
10507 stylisSplitter.use([parseRulesPlugin, returnRulesPlugin]);
10508
10509 var splitByRules = function splitByRules(css) {
10510 return stylisSplitter('', css);
10511 };
10512
10513 function stringifyRules(rules, selector, prefix) {
10514 var componentId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '&';
10515
10516 var flatCSS = rules.join('').replace(COMMENT_REGEX, ''); // replace JS comments
10517
10518 var cssStr = selector && prefix ? prefix + ' ' + selector + ' { ' + flatCSS + ' }' : flatCSS;
10519
10520 // stylis has no concept of state to be passed to plugins
10521 // but since JS is single=threaded, we can rely on that to ensure
10522 // these properties stay in sync with the current stylis run
10523 _componentId = componentId;
10524 _selector = selector;
10525 _selectorRegexp = new RegExp('\\' + _selector + '\\b', 'g');
10526
10527 return stylis(prefix || !selector ? '' : selector, cssStr);
10528 }
10529
10530 //
10531 /* eslint-disable camelcase, no-undef */
10532
10533 var getNonce = (function () {
10534 return true ? __webpack_require__.nc : 0;
10535 });
10536
10537 //
10538 /* These are helpers for the StyleTags to keep track of the injected
10539 * rule names for each (component) ID that they're keeping track of.
10540 * They're crucial for detecting whether a name has already been
10541 * injected.
10542 * (This excludes rehydrated names) */
10543
10544 /* adds a new ID:name pairing to a names dictionary */
10545 var addNameForId = function addNameForId(names, id, name) {
10546 if (name) {
10547 // eslint-disable-next-line no-param-reassign
10548 var namesForId = names[id] || (names[id] = Object.create(null));
10549 namesForId[name] = true;
10550 }
10551 };
10552
10553 /* resets an ID entirely by overwriting it in the dictionary */
10554 var resetIdNames = function resetIdNames(names, id) {
10555 // eslint-disable-next-line no-param-reassign
10556 names[id] = Object.create(null);
10557 };
10558
10559 /* factory for a names dictionary checking the existance of an ID:name pairing */
10560 var hasNameForId = function hasNameForId(names) {
10561 return function (id, name) {
10562 return names[id] !== undefined && names[id][name];
10563 };
10564 };
10565
10566 /* stringifies names for the html/element output */
10567 var stringifyNames = function stringifyNames(names) {
10568 var str = '';
10569 // eslint-disable-next-line guard-for-in
10570 for (var id in names) {
10571 str += Object.keys(names[id]).join(' ') + ' ';
10572 }
10573 return str.trim();
10574 };
10575
10576 /* clones the nested names dictionary */
10577 var cloneNames = function cloneNames(names) {
10578 var clone = Object.create(null);
10579 // eslint-disable-next-line guard-for-in
10580 for (var id in names) {
10581 clone[id] = _extends({}, names[id]);
10582 }
10583 return clone;
10584 };
10585
10586 //
10587
10588 /* These are helpers that deal with the insertRule (aka speedy) API
10589 * They are used in the StyleTags and specifically the speedy tag
10590 */
10591
10592 /* retrieve a sheet for a given style tag */
10593 var sheetForTag = function sheetForTag(tag) {
10594 // $FlowFixMe
10595 if (tag.sheet) return tag.sheet;
10596
10597 /* Firefox quirk requires us to step through all stylesheets to find one owned by the given tag */
10598 var size = tag.ownerDocument.styleSheets.length;
10599 for (var i = 0; i < size; i += 1) {
10600 var sheet = tag.ownerDocument.styleSheets[i];
10601 // $FlowFixMe
10602 if (sheet.ownerNode === tag) return sheet;
10603 }
10604
10605 /* we should always be able to find a tag */
10606 throw new StyledComponentsError(10);
10607 };
10608
10609 /* insert a rule safely and return whether it was actually injected */
10610 var safeInsertRule = function safeInsertRule(sheet, cssRule, index) {
10611 /* abort early if cssRule string is falsy */
10612 if (!cssRule) return false;
10613
10614 var maxIndex = sheet.cssRules.length;
10615
10616 try {
10617 /* use insertRule and cap passed index with maxIndex (no of cssRules) */
10618 sheet.insertRule(cssRule, index <= maxIndex ? index : maxIndex);
10619 } catch (err) {
10620 /* any error indicates an invalid rule */
10621 return false;
10622 }
10623
10624 return true;
10625 };
10626
10627 /* deletes `size` rules starting from `removalIndex` */
10628 var deleteRules = function deleteRules(sheet, removalIndex, size) {
10629 var lowerBound = removalIndex - size;
10630 for (var i = removalIndex; i > lowerBound; i -= 1) {
10631 sheet.deleteRule(i);
10632 }
10633 };
10634
10635 //
10636
10637 /* this marker separates component styles and is important for rehydration */
10638 var makeTextMarker = function makeTextMarker(id) {
10639 return '\n/* sc-component-id: ' + id + ' */\n';
10640 };
10641
10642 /* add up all numbers in array up until and including the index */
10643 var addUpUntilIndex = function addUpUntilIndex(sizes, index) {
10644 var totalUpToIndex = 0;
10645 for (var i = 0; i <= index; i += 1) {
10646 totalUpToIndex += sizes[i];
10647 }
10648
10649 return totalUpToIndex;
10650 };
10651
10652 /* create a new style tag after lastEl */
10653 var makeStyleTag = function makeStyleTag(target, tagEl, insertBefore) {
10654 var targetDocument = document;
10655 if (target) targetDocument = target.ownerDocument;else if (tagEl) targetDocument = tagEl.ownerDocument;
10656
10657 var el = targetDocument.createElement('style');
10658 el.setAttribute(SC_ATTR, '');
10659 el.setAttribute(SC_VERSION_ATTR, "4.4.1");
10660
10661 var nonce = getNonce();
10662 if (nonce) {
10663 el.setAttribute('nonce', nonce);
10664 }
10665
10666 /* Work around insertRule quirk in EdgeHTML */
10667 el.appendChild(targetDocument.createTextNode(''));
10668
10669 if (target && !tagEl) {
10670 /* Append to target when no previous element was passed */
10671 target.appendChild(el);
10672 } else {
10673 if (!tagEl || !target || !tagEl.parentNode) {
10674 throw new StyledComponentsError(6);
10675 }
10676
10677 /* Insert new style tag after the previous one */
10678 tagEl.parentNode.insertBefore(el, insertBefore ? tagEl : tagEl.nextSibling);
10679 }
10680
10681 return el;
10682 };
10683
10684 /* takes a css factory function and outputs an html styled tag factory */
10685 var wrapAsHtmlTag = function wrapAsHtmlTag(css, names) {
10686 return function (additionalAttrs) {
10687 var nonce = getNonce();
10688 var attrs = [nonce && 'nonce="' + nonce + '"', SC_ATTR + '="' + stringifyNames(names) + '"', SC_VERSION_ATTR + '="' + "4.4.1" + '"', additionalAttrs];
10689
10690 var htmlAttr = attrs.filter(Boolean).join(' ');
10691 return '<style ' + htmlAttr + '>' + css() + '</style>';
10692 };
10693 };
10694
10695 /* takes a css factory function and outputs an element factory */
10696 var wrapAsElement = function wrapAsElement(css, names) {
10697 return function () {
10698 var _props;
10699
10700 var props = (_props = {}, _props[SC_ATTR] = stringifyNames(names), _props[SC_VERSION_ATTR] = "4.4.1", _props);
10701
10702 var nonce = getNonce();
10703 if (nonce) {
10704 // $FlowFixMe
10705 props.nonce = nonce;
10706 }
10707
10708 // eslint-disable-next-line react/no-danger
10709 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement('style', _extends({}, props, { dangerouslySetInnerHTML: { __html: css() } }));
10710 };
10711 };
10712
10713 var getIdsFromMarkersFactory = function getIdsFromMarkersFactory(markers) {
10714 return function () {
10715 return Object.keys(markers);
10716 };
10717 };
10718
10719 /* speedy tags utilise insertRule */
10720 var makeSpeedyTag = function makeSpeedyTag(el, getImportRuleTag) {
10721 var names = Object.create(null);
10722 var markers = Object.create(null);
10723 var sizes = [];
10724
10725 var extractImport = getImportRuleTag !== undefined;
10726 /* indicates whether getImportRuleTag was called */
10727 var usedImportRuleTag = false;
10728
10729 var insertMarker = function insertMarker(id) {
10730 var prev = markers[id];
10731 if (prev !== undefined) {
10732 return prev;
10733 }
10734
10735 markers[id] = sizes.length;
10736 sizes.push(0);
10737 resetIdNames(names, id);
10738
10739 return markers[id];
10740 };
10741
10742 var insertRules = function insertRules(id, cssRules, name) {
10743 var marker = insertMarker(id);
10744 var sheet = sheetForTag(el);
10745 var insertIndex = addUpUntilIndex(sizes, marker);
10746
10747 var injectedRules = 0;
10748 var importRules = [];
10749 var cssRulesSize = cssRules.length;
10750
10751 for (var i = 0; i < cssRulesSize; i += 1) {
10752 var cssRule = cssRules[i];
10753 var mayHaveImport = extractImport; /* @import rules are reordered to appear first */
10754 if (mayHaveImport && cssRule.indexOf('@import') !== -1) {
10755 importRules.push(cssRule);
10756 } else if (safeInsertRule(sheet, cssRule, insertIndex + injectedRules)) {
10757 mayHaveImport = false;
10758 injectedRules += 1;
10759 }
10760 }
10761
10762 if (extractImport && importRules.length > 0) {
10763 usedImportRuleTag = true;
10764 // $FlowFixMe
10765 getImportRuleTag().insertRules(id + '-import', importRules);
10766 }
10767
10768 sizes[marker] += injectedRules; /* add up no of injected rules */
10769 addNameForId(names, id, name);
10770 };
10771
10772 var removeRules = function removeRules(id) {
10773 var marker = markers[id];
10774 if (marker === undefined) return;
10775 // $FlowFixMe
10776 if (el.isConnected === false) return;
10777
10778 var size = sizes[marker];
10779 var sheet = sheetForTag(el);
10780 var removalIndex = addUpUntilIndex(sizes, marker) - 1;
10781 deleteRules(sheet, removalIndex, size);
10782 sizes[marker] = 0;
10783 resetIdNames(names, id);
10784
10785 if (extractImport && usedImportRuleTag) {
10786 // $FlowFixMe
10787 getImportRuleTag().removeRules(id + '-import');
10788 }
10789 };
10790
10791 var css = function css() {
10792 var _sheetForTag = sheetForTag(el),
10793 cssRules = _sheetForTag.cssRules;
10794
10795 var str = '';
10796
10797 // eslint-disable-next-line guard-for-in
10798 for (var id in markers) {
10799 str += makeTextMarker(id);
10800 var marker = markers[id];
10801 var end = addUpUntilIndex(sizes, marker);
10802 var size = sizes[marker];
10803 for (var i = end - size; i < end; i += 1) {
10804 var rule = cssRules[i];
10805 if (rule !== undefined) {
10806 str += rule.cssText;
10807 }
10808 }
10809 }
10810
10811 return str;
10812 };
10813
10814 return {
10815 clone: function clone() {
10816 throw new StyledComponentsError(5);
10817 },
10818
10819 css: css,
10820 getIds: getIdsFromMarkersFactory(markers),
10821 hasNameForId: hasNameForId(names),
10822 insertMarker: insertMarker,
10823 insertRules: insertRules,
10824 removeRules: removeRules,
10825 sealed: false,
10826 styleTag: el,
10827 toElement: wrapAsElement(css, names),
10828 toHTML: wrapAsHtmlTag(css, names)
10829 };
10830 };
10831
10832 var makeTextNode = function makeTextNode(targetDocument, id) {
10833 return targetDocument.createTextNode(makeTextMarker(id));
10834 };
10835
10836 var makeBrowserTag = function makeBrowserTag(el, getImportRuleTag) {
10837 var names = Object.create(null);
10838 var markers = Object.create(null);
10839
10840 var extractImport = getImportRuleTag !== undefined;
10841
10842 /* indicates whether getImportRuleTag was called */
10843 var usedImportRuleTag = false;
10844
10845 var insertMarker = function insertMarker(id) {
10846 var prev = markers[id];
10847 if (prev !== undefined) {
10848 return prev;
10849 }
10850
10851 markers[id] = makeTextNode(el.ownerDocument, id);
10852 el.appendChild(markers[id]);
10853 names[id] = Object.create(null);
10854
10855 return markers[id];
10856 };
10857
10858 var insertRules = function insertRules(id, cssRules, name) {
10859 var marker = insertMarker(id);
10860 var importRules = [];
10861 var cssRulesSize = cssRules.length;
10862
10863 for (var i = 0; i < cssRulesSize; i += 1) {
10864 var rule = cssRules[i];
10865 var mayHaveImport = extractImport;
10866 if (mayHaveImport && rule.indexOf('@import') !== -1) {
10867 importRules.push(rule);
10868 } else {
10869 mayHaveImport = false;
10870 var separator = i === cssRulesSize - 1 ? '' : ' ';
10871 marker.appendData('' + rule + separator);
10872 }
10873 }
10874
10875 addNameForId(names, id, name);
10876
10877 if (extractImport && importRules.length > 0) {
10878 usedImportRuleTag = true;
10879 // $FlowFixMe
10880 getImportRuleTag().insertRules(id + '-import', importRules);
10881 }
10882 };
10883
10884 var removeRules = function removeRules(id) {
10885 var marker = markers[id];
10886 if (marker === undefined) return;
10887
10888 /* create new empty text node and replace the current one */
10889 var newMarker = makeTextNode(el.ownerDocument, id);
10890 el.replaceChild(newMarker, marker);
10891 markers[id] = newMarker;
10892 resetIdNames(names, id);
10893
10894 if (extractImport && usedImportRuleTag) {
10895 // $FlowFixMe
10896 getImportRuleTag().removeRules(id + '-import');
10897 }
10898 };
10899
10900 var css = function css() {
10901 var str = '';
10902
10903 // eslint-disable-next-line guard-for-in
10904 for (var id in markers) {
10905 str += markers[id].data;
10906 }
10907
10908 return str;
10909 };
10910
10911 return {
10912 clone: function clone() {
10913 throw new StyledComponentsError(5);
10914 },
10915
10916 css: css,
10917 getIds: getIdsFromMarkersFactory(markers),
10918 hasNameForId: hasNameForId(names),
10919 insertMarker: insertMarker,
10920 insertRules: insertRules,
10921 removeRules: removeRules,
10922 sealed: false,
10923 styleTag: el,
10924 toElement: wrapAsElement(css, names),
10925 toHTML: wrapAsHtmlTag(css, names)
10926 };
10927 };
10928
10929 var makeServerTag = function makeServerTag(namesArg, markersArg) {
10930 var names = namesArg === undefined ? Object.create(null) : namesArg;
10931 var markers = markersArg === undefined ? Object.create(null) : markersArg;
10932
10933 var insertMarker = function insertMarker(id) {
10934 var prev = markers[id];
10935 if (prev !== undefined) {
10936 return prev;
10937 }
10938
10939 return markers[id] = [''];
10940 };
10941
10942 var insertRules = function insertRules(id, cssRules, name) {
10943 var marker = insertMarker(id);
10944 marker[0] += cssRules.join(' ');
10945 addNameForId(names, id, name);
10946 };
10947
10948 var removeRules = function removeRules(id) {
10949 var marker = markers[id];
10950 if (marker === undefined) return;
10951 marker[0] = '';
10952 resetIdNames(names, id);
10953 };
10954
10955 var css = function css() {
10956 var str = '';
10957 // eslint-disable-next-line guard-for-in
10958 for (var id in markers) {
10959 var cssForId = markers[id][0];
10960 if (cssForId) {
10961 str += makeTextMarker(id) + cssForId;
10962 }
10963 }
10964 return str;
10965 };
10966
10967 var clone = function clone() {
10968 var namesClone = cloneNames(names);
10969 var markersClone = Object.create(null);
10970
10971 // eslint-disable-next-line guard-for-in
10972 for (var id in markers) {
10973 markersClone[id] = [markers[id][0]];
10974 }
10975
10976 return makeServerTag(namesClone, markersClone);
10977 };
10978
10979 var tag = {
10980 clone: clone,
10981 css: css,
10982 getIds: getIdsFromMarkersFactory(markers),
10983 hasNameForId: hasNameForId(names),
10984 insertMarker: insertMarker,
10985 insertRules: insertRules,
10986 removeRules: removeRules,
10987 sealed: false,
10988 styleTag: null,
10989 toElement: wrapAsElement(css, names),
10990 toHTML: wrapAsHtmlTag(css, names)
10991 };
10992
10993 return tag;
10994 };
10995
10996 var makeTag = function makeTag(target, tagEl, forceServer, insertBefore, getImportRuleTag) {
10997 if (IS_BROWSER && !forceServer) {
10998 var el = makeStyleTag(target, tagEl, insertBefore);
10999
11000 if (DISABLE_SPEEDY) {
11001 return makeBrowserTag(el, getImportRuleTag);
11002 } else {
11003 return makeSpeedyTag(el, getImportRuleTag);
11004 }
11005 }
11006
11007 return makeServerTag();
11008 };
11009
11010 var rehydrate = function rehydrate(tag, els, extracted) {
11011 /* add all extracted components to the new tag */
11012 for (var i = 0, len = extracted.length; i < len; i += 1) {
11013 var _extracted$i = extracted[i],
11014 componentId = _extracted$i.componentId,
11015 cssFromDOM = _extracted$i.cssFromDOM;
11016
11017 var cssRules = splitByRules(cssFromDOM);
11018 tag.insertRules(componentId, cssRules);
11019 }
11020
11021 /* remove old HTMLStyleElements, since they have been rehydrated */
11022 for (var _i = 0, _len = els.length; _i < _len; _i += 1) {
11023 var el = els[_i];
11024 if (el.parentNode) {
11025 el.parentNode.removeChild(el);
11026 }
11027 }
11028 };
11029
11030 //
11031
11032 var SPLIT_REGEX = /\s+/;
11033
11034 /* determine the maximum number of components before tags are sharded */
11035 var MAX_SIZE = void 0;
11036 if (IS_BROWSER) {
11037 /* in speedy mode we can keep a lot more rules in a sheet before a slowdown can be expected */
11038 MAX_SIZE = DISABLE_SPEEDY ? 40 : 1000;
11039 } else {
11040 /* for servers we do not need to shard at all */
11041 MAX_SIZE = -1;
11042 }
11043
11044 var sheetRunningId = 0;
11045 var master = void 0;
11046
11047 var StyleSheet = function () {
11048
11049 /* a map from ids to tags */
11050
11051 /* deferred rules for a given id */
11052
11053 /* this is used for not reinjecting rules via hasNameForId() */
11054
11055 /* when rules for an id are removed using remove() we have to ignore rehydratedNames for it */
11056
11057 /* a list of tags belonging to this StyleSheet */
11058
11059 /* a tag for import rules */
11060
11061 /* current capacity until a new tag must be created */
11062
11063 /* children (aka clones) of this StyleSheet inheriting all and future injections */
11064
11065 function StyleSheet() {
11066 var _this = this;
11067
11068 var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : IS_BROWSER ? document.head : null;
11069 var forceServer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
11070 classCallCheck(this, StyleSheet);
11071
11072 this.getImportRuleTag = function () {
11073 var importRuleTag = _this.importRuleTag;
11074
11075 if (importRuleTag !== undefined) {
11076 return importRuleTag;
11077 }
11078
11079 var firstTag = _this.tags[0];
11080 var insertBefore = true;
11081
11082 return _this.importRuleTag = makeTag(_this.target, firstTag ? firstTag.styleTag : null, _this.forceServer, insertBefore);
11083 };
11084
11085 sheetRunningId += 1;
11086 this.id = sheetRunningId;
11087 this.forceServer = forceServer;
11088 this.target = forceServer ? null : target;
11089 this.tagMap = {};
11090 this.deferred = {};
11091 this.rehydratedNames = {};
11092 this.ignoreRehydratedNames = {};
11093 this.tags = [];
11094 this.capacity = 1;
11095 this.clones = [];
11096 }
11097
11098 /* rehydrate all SSR'd style tags */
11099
11100
11101 StyleSheet.prototype.rehydrate = function rehydrate$$1() {
11102 if (!IS_BROWSER || this.forceServer) return this;
11103
11104 var els = [];
11105 var extracted = [];
11106 var isStreamed = false;
11107
11108 /* retrieve all of our SSR style elements from the DOM */
11109 var nodes = document.querySelectorAll('style[' + SC_ATTR + '][' + SC_VERSION_ATTR + '="' + "4.4.1" + '"]');
11110
11111 var nodesSize = nodes.length;
11112
11113 /* abort rehydration if no previous style tags were found */
11114 if (!nodesSize) return this;
11115
11116 for (var i = 0; i < nodesSize; i += 1) {
11117 var el = nodes[i];
11118
11119 /* check if style tag is a streamed tag */
11120 if (!isStreamed) isStreamed = !!el.getAttribute(SC_STREAM_ATTR);
11121
11122 /* retrieve all component names */
11123 var elNames = (el.getAttribute(SC_ATTR) || '').trim().split(SPLIT_REGEX);
11124 var elNamesSize = elNames.length;
11125 for (var j = 0, name; j < elNamesSize; j += 1) {
11126 name = elNames[j];
11127 /* add rehydrated name to sheet to avoid re-adding styles */
11128 this.rehydratedNames[name] = true;
11129 }
11130
11131 /* extract all components and their CSS */
11132 extracted.push.apply(extracted, extractComps(el.textContent));
11133
11134 /* store original HTMLStyleElement */
11135 els.push(el);
11136 }
11137
11138 /* abort rehydration if nothing was extracted */
11139 var extractedSize = extracted.length;
11140 if (!extractedSize) return this;
11141
11142 /* create a tag to be used for rehydration */
11143 var tag = this.makeTag(null);
11144
11145 rehydrate(tag, els, extracted);
11146
11147 /* reset capacity and adjust MAX_SIZE by the initial size of the rehydration */
11148 this.capacity = Math.max(1, MAX_SIZE - extractedSize);
11149 this.tags.push(tag);
11150
11151 /* retrieve all component ids */
11152 for (var _j = 0; _j < extractedSize; _j += 1) {
11153 this.tagMap[extracted[_j].componentId] = tag;
11154 }
11155
11156 return this;
11157 };
11158
11159 /* retrieve a "master" instance of StyleSheet which is typically used when no other is available
11160 * The master StyleSheet is targeted by createGlobalStyle, keyframes, and components outside of any
11161 * StyleSheetManager's context */
11162
11163
11164 /* reset the internal "master" instance */
11165 StyleSheet.reset = function reset() {
11166 var forceServer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
11167
11168 master = new StyleSheet(undefined, forceServer).rehydrate();
11169 };
11170
11171 /* adds "children" to the StyleSheet that inherit all of the parents' rules
11172 * while their own rules do not affect the parent */
11173
11174
11175 StyleSheet.prototype.clone = function clone() {
11176 var sheet = new StyleSheet(this.target, this.forceServer);
11177
11178 /* add to clone array */
11179 this.clones.push(sheet);
11180
11181 /* clone all tags */
11182 sheet.tags = this.tags.map(function (tag) {
11183 var ids = tag.getIds();
11184 var newTag = tag.clone();
11185
11186 /* reconstruct tagMap */
11187 for (var i = 0; i < ids.length; i += 1) {
11188 sheet.tagMap[ids[i]] = newTag;
11189 }
11190
11191 return newTag;
11192 });
11193
11194 /* clone other maps */
11195 sheet.rehydratedNames = _extends({}, this.rehydratedNames);
11196 sheet.deferred = _extends({}, this.deferred);
11197
11198 return sheet;
11199 };
11200
11201 /* force StyleSheet to create a new tag on the next injection */
11202
11203
11204 StyleSheet.prototype.sealAllTags = function sealAllTags() {
11205 this.capacity = 1;
11206
11207 this.tags.forEach(function (tag) {
11208 // eslint-disable-next-line no-param-reassign
11209 tag.sealed = true;
11210 });
11211 };
11212
11213 StyleSheet.prototype.makeTag = function makeTag$$1(tag) {
11214 var lastEl = tag ? tag.styleTag : null;
11215 var insertBefore = false;
11216
11217 return makeTag(this.target, lastEl, this.forceServer, insertBefore, this.getImportRuleTag);
11218 };
11219
11220 /* get a tag for a given componentId, assign the componentId to one, or shard */
11221 StyleSheet.prototype.getTagForId = function getTagForId(id) {
11222 /* simply return a tag, when the componentId was already assigned one */
11223 var prev = this.tagMap[id];
11224 if (prev !== undefined && !prev.sealed) {
11225 return prev;
11226 }
11227
11228 var tag = this.tags[this.tags.length - 1];
11229
11230 /* shard (create a new tag) if the tag is exhausted (See MAX_SIZE) */
11231 this.capacity -= 1;
11232
11233 if (this.capacity === 0) {
11234 this.capacity = MAX_SIZE;
11235 tag = this.makeTag(tag);
11236 this.tags.push(tag);
11237 }
11238
11239 return this.tagMap[id] = tag;
11240 };
11241
11242 /* mainly for createGlobalStyle to check for its id */
11243
11244
11245 StyleSheet.prototype.hasId = function hasId(id) {
11246 return this.tagMap[id] !== undefined;
11247 };
11248
11249 /* caching layer checking id+name to already have a corresponding tag and injected rules */
11250
11251
11252 StyleSheet.prototype.hasNameForId = function hasNameForId(id, name) {
11253 /* exception for rehydrated names which are checked separately */
11254 if (this.ignoreRehydratedNames[id] === undefined && this.rehydratedNames[name]) {
11255 return true;
11256 }
11257
11258 var tag = this.tagMap[id];
11259 return tag !== undefined && tag.hasNameForId(id, name);
11260 };
11261
11262 /* registers a componentId and registers it on its tag */
11263
11264
11265 StyleSheet.prototype.deferredInject = function deferredInject(id, cssRules) {
11266 /* don't inject when the id is already registered */
11267 if (this.tagMap[id] !== undefined) return;
11268
11269 var clones = this.clones;
11270
11271 for (var i = 0; i < clones.length; i += 1) {
11272 clones[i].deferredInject(id, cssRules);
11273 }
11274
11275 this.getTagForId(id).insertMarker(id);
11276 this.deferred[id] = cssRules;
11277 };
11278
11279 /* injects rules for a given id with a name that will need to be cached */
11280
11281
11282 StyleSheet.prototype.inject = function inject(id, cssRules, name) {
11283 var clones = this.clones;
11284
11285
11286 for (var i = 0; i < clones.length; i += 1) {
11287 clones[i].inject(id, cssRules, name);
11288 }
11289
11290 var tag = this.getTagForId(id);
11291
11292 /* add deferred rules for component */
11293 if (this.deferred[id] !== undefined) {
11294 // Combine passed cssRules with previously deferred CSS rules
11295 // NOTE: We cannot mutate the deferred array itself as all clones
11296 // do the same (see clones[i].inject)
11297 var rules = this.deferred[id].concat(cssRules);
11298 tag.insertRules(id, rules, name);
11299
11300 this.deferred[id] = undefined;
11301 } else {
11302 tag.insertRules(id, cssRules, name);
11303 }
11304 };
11305
11306 /* removes all rules for a given id, which doesn't remove its marker but resets it */
11307
11308
11309 StyleSheet.prototype.remove = function remove(id) {
11310 var tag = this.tagMap[id];
11311 if (tag === undefined) return;
11312
11313 var clones = this.clones;
11314
11315 for (var i = 0; i < clones.length; i += 1) {
11316 clones[i].remove(id);
11317 }
11318
11319 /* remove all rules from the tag */
11320 tag.removeRules(id);
11321
11322 /* ignore possible rehydrated names */
11323 this.ignoreRehydratedNames[id] = true;
11324
11325 /* delete possible deferred rules */
11326 this.deferred[id] = undefined;
11327 };
11328
11329 StyleSheet.prototype.toHTML = function toHTML() {
11330 return this.tags.map(function (tag) {
11331 return tag.toHTML();
11332 }).join('');
11333 };
11334
11335 StyleSheet.prototype.toReactElements = function toReactElements() {
11336 var id = this.id;
11337
11338
11339 return this.tags.map(function (tag, i) {
11340 var key = 'sc-' + id + '-' + i;
11341 return (0,react__WEBPACK_IMPORTED_MODULE_2__.cloneElement)(tag.toElement(), { key: key });
11342 });
11343 };
11344
11345 createClass(StyleSheet, null, [{
11346 key: 'master',
11347 get: function get$$1() {
11348 return master || (master = new StyleSheet().rehydrate());
11349 }
11350
11351 /* NOTE: This is just for backwards-compatibility with jest-styled-components */
11352
11353 }, {
11354 key: 'instance',
11355 get: function get$$1() {
11356 return StyleSheet.master;
11357 }
11358 }]);
11359 return StyleSheet;
11360 }();
11361
11362 //
11363
11364 var Keyframes = function () {
11365 function Keyframes(name, rules) {
11366 var _this = this;
11367
11368 classCallCheck(this, Keyframes);
11369
11370 this.inject = function (styleSheet) {
11371 if (!styleSheet.hasNameForId(_this.id, _this.name)) {
11372 styleSheet.inject(_this.id, _this.rules, _this.name);
11373 }
11374 };
11375
11376 this.toString = function () {
11377 throw new StyledComponentsError(12, String(_this.name));
11378 };
11379
11380 this.name = name;
11381 this.rules = rules;
11382
11383 this.id = 'sc-keyframes-' + name;
11384 }
11385
11386 Keyframes.prototype.getName = function getName() {
11387 return this.name;
11388 };
11389
11390 return Keyframes;
11391 }();
11392
11393 //
11394
11395 /**
11396 * inlined version of
11397 * https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/hyphenateStyleName.js
11398 */
11399
11400 var uppercasePattern = /([A-Z])/g;
11401 var msPattern = /^ms-/;
11402
11403 /**
11404 * Hyphenates a camelcased CSS property name, for example:
11405 *
11406 * > hyphenateStyleName('backgroundColor')
11407 * < "background-color"
11408 * > hyphenateStyleName('MozTransition')
11409 * < "-moz-transition"
11410 * > hyphenateStyleName('msTransition')
11411 * < "-ms-transition"
11412 *
11413 * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
11414 * is converted to `-ms-`.
11415 *
11416 * @param {string} string
11417 * @return {string}
11418 */
11419 function hyphenateStyleName(string) {
11420 return string.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
11421 }
11422
11423 //
11424
11425 // Taken from https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/shared/dangerousStyleValue.js
11426 function addUnitIfNeeded(name, value) {
11427 // https://github.com/amilajack/eslint-plugin-flowtype-errors/issues/133
11428 // $FlowFixMe
11429 if (value == null || typeof value === 'boolean' || value === '') {
11430 return '';
11431 }
11432
11433 if (typeof value === 'number' && value !== 0 && !(name in _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__["default"])) {
11434 return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
11435 }
11436
11437 return String(value).trim();
11438 }
11439
11440 //
11441
11442 /**
11443 * It's falsish not falsy because 0 is allowed.
11444 */
11445 var isFalsish = function isFalsish(chunk) {
11446 return chunk === undefined || chunk === null || chunk === false || chunk === '';
11447 };
11448
11449 var objToCssArray = function objToCssArray(obj, prevKey) {
11450 var rules = [];
11451 var keys = Object.keys(obj);
11452
11453 keys.forEach(function (key) {
11454 if (!isFalsish(obj[key])) {
11455 if (isPlainObject(obj[key])) {
11456 rules.push.apply(rules, objToCssArray(obj[key], key));
11457
11458 return rules;
11459 } else if (isFunction(obj[key])) {
11460 rules.push(hyphenateStyleName(key) + ':', obj[key], ';');
11461
11462 return rules;
11463 }
11464 rules.push(hyphenateStyleName(key) + ': ' + addUnitIfNeeded(key, obj[key]) + ';');
11465 }
11466 return rules;
11467 });
11468
11469 return prevKey ? [prevKey + ' {'].concat(rules, ['}']) : rules;
11470 };
11471
11472 function flatten(chunk, executionContext, styleSheet) {
11473 if (Array.isArray(chunk)) {
11474 var ruleSet = [];
11475
11476 for (var i = 0, len = chunk.length, result; i < len; i += 1) {
11477 result = flatten(chunk[i], executionContext, styleSheet);
11478
11479 if (result === null) continue;else if (Array.isArray(result)) ruleSet.push.apply(ruleSet, result);else ruleSet.push(result);
11480 }
11481
11482 return ruleSet;
11483 }
11484
11485 if (isFalsish(chunk)) {
11486 return null;
11487 }
11488
11489 /* Handle other components */
11490 if (isStyledComponent(chunk)) {
11491 return '.' + chunk.styledComponentId;
11492 }
11493
11494 /* Either execute or defer the function */
11495 if (isFunction(chunk)) {
11496 if (isStatelessFunction(chunk) && executionContext) {
11497 var _result = chunk(executionContext);
11498
11499 if ( true && (0,react_is__WEBPACK_IMPORTED_MODULE_4__.isElement)(_result)) {
11500 // eslint-disable-next-line no-console
11501 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.');
11502 }
11503
11504 return flatten(_result, executionContext, styleSheet);
11505 } else return chunk;
11506 }
11507
11508 if (chunk instanceof Keyframes) {
11509 if (styleSheet) {
11510 chunk.inject(styleSheet);
11511 return chunk.getName();
11512 } else return chunk;
11513 }
11514
11515 /* Handle objects */
11516 return isPlainObject(chunk) ? objToCssArray(chunk) : chunk.toString();
11517 }
11518
11519 //
11520
11521 function css(styles) {
11522 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
11523 interpolations[_key - 1] = arguments[_key];
11524 }
11525
11526 if (isFunction(styles) || isPlainObject(styles)) {
11527 // $FlowFixMe
11528 return flatten(interleave(EMPTY_ARRAY, [styles].concat(interpolations)));
11529 }
11530
11531 // $FlowFixMe
11532 return flatten(interleave(styles, interpolations));
11533 }
11534
11535 //
11536
11537 function constructWithOptions(componentConstructor, tag) {
11538 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT;
11539
11540 if (!(0,react_is__WEBPACK_IMPORTED_MODULE_4__.isValidElementType)(tag)) {
11541 throw new StyledComponentsError(1, String(tag));
11542 }
11543
11544 /* This is callable directly as a template function */
11545 // $FlowFixMe: Not typed to avoid destructuring arguments
11546 var templateFunction = function templateFunction() {
11547 return componentConstructor(tag, options, css.apply(undefined, arguments));
11548 };
11549
11550 /* If config methods are called, wrap up a new template function and merge options */
11551 templateFunction.withConfig = function (config) {
11552 return constructWithOptions(componentConstructor, tag, _extends({}, options, config));
11553 };
11554
11555 /* Modify/inject new props at runtime */
11556 templateFunction.attrs = function (attrs) {
11557 return constructWithOptions(componentConstructor, tag, _extends({}, options, {
11558 attrs: Array.prototype.concat(options.attrs, attrs).filter(Boolean)
11559 }));
11560 };
11561
11562 return templateFunction;
11563 }
11564
11565 //
11566 // Source: https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js
11567 function murmurhash(c) {
11568 for (var e = c.length | 0, a = e | 0, d = 0, b; e >= 4;) {
11569 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;
11570 }
11571 switch (e) {
11572 case 3:
11573 a ^= (c.charCodeAt(d + 2) & 255) << 16;
11574 case 2:
11575 a ^= (c.charCodeAt(d + 1) & 255) << 8;
11576 case 1:
11577 a ^= c.charCodeAt(d) & 255, a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
11578 }
11579 a ^= a >>> 13;
11580 a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
11581 return (a ^ a >>> 15) >>> 0;
11582 }
11583
11584 //
11585 /* eslint-disable no-bitwise */
11586
11587 /* This is the "capacity" of our alphabet i.e. 2x26 for all letters plus their capitalised
11588 * counterparts */
11589 var charsLength = 52;
11590
11591 /* start at 75 for 'a' until 'z' (25) and then start at 65 for capitalised letters */
11592 var getAlphabeticChar = function getAlphabeticChar(code) {
11593 return String.fromCharCode(code + (code > 25 ? 39 : 97));
11594 };
11595
11596 /* input a number, usually a hash and convert it to base-52 */
11597 function generateAlphabeticName(code) {
11598 var name = '';
11599 var x = void 0;
11600
11601 /* get a char and divide by alphabet-length */
11602 for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {
11603 name = getAlphabeticChar(x % charsLength) + name;
11604 }
11605
11606 return getAlphabeticChar(x % charsLength) + name;
11607 }
11608
11609 //
11610
11611 function hasFunctionObjectKey(obj) {
11612 // eslint-disable-next-line guard-for-in, no-restricted-syntax
11613 for (var key in obj) {
11614 if (isFunction(obj[key])) {
11615 return true;
11616 }
11617 }
11618
11619 return false;
11620 }
11621
11622 function isStaticRules(rules, attrs) {
11623 for (var i = 0; i < rules.length; i += 1) {
11624 var rule = rules[i];
11625
11626 // recursive case
11627 if (Array.isArray(rule) && !isStaticRules(rule, attrs)) {
11628 return false;
11629 } else if (isFunction(rule) && !isStyledComponent(rule)) {
11630 // functions are allowed to be static if they're just being
11631 // used to get the classname of a nested styled component
11632 return false;
11633 }
11634 }
11635
11636 if (attrs.some(function (x) {
11637 return isFunction(x) || hasFunctionObjectKey(x);
11638 })) return false;
11639
11640 return true;
11641 }
11642
11643 //
11644
11645 /* combines hashStr (murmurhash) and nameGenerator for convenience */
11646 var hasher = function hasher(str) {
11647 return generateAlphabeticName(murmurhash(str));
11648 };
11649
11650 /*
11651 ComponentStyle is all the CSS-specific stuff, not
11652 the React-specific stuff.
11653 */
11654
11655 var ComponentStyle = function () {
11656 function ComponentStyle(rules, attrs, componentId) {
11657 classCallCheck(this, ComponentStyle);
11658
11659 this.rules = rules;
11660 this.isStatic = false && 0;
11661 this.componentId = componentId;
11662
11663 if (!StyleSheet.master.hasId(componentId)) {
11664 StyleSheet.master.deferredInject(componentId, []);
11665 }
11666 }
11667
11668 /*
11669 * Flattens a rule set into valid CSS
11670 * Hashes it, wraps the whole chunk in a .hash1234 {}
11671 * Returns the hash to be injected on render()
11672 * */
11673
11674
11675 ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) {
11676 var isStatic = this.isStatic,
11677 componentId = this.componentId,
11678 lastClassName = this.lastClassName;
11679
11680 if (IS_BROWSER && isStatic && typeof lastClassName === 'string' && styleSheet.hasNameForId(componentId, lastClassName)) {
11681 return lastClassName;
11682 }
11683
11684 var flatCSS = flatten(this.rules, executionContext, styleSheet);
11685 var name = hasher(this.componentId + flatCSS.join(''));
11686 if (!styleSheet.hasNameForId(componentId, name)) {
11687 styleSheet.inject(this.componentId, stringifyRules(flatCSS, '.' + name, undefined, componentId), name);
11688 }
11689
11690 this.lastClassName = name;
11691 return name;
11692 };
11693
11694 ComponentStyle.generateName = function generateName(str) {
11695 return hasher(str);
11696 };
11697
11698 return ComponentStyle;
11699 }();
11700
11701 //
11702
11703 var LIMIT = 200;
11704
11705 var createWarnTooManyClasses = (function (displayName) {
11706 var generatedClasses = {};
11707 var warningSeen = false;
11708
11709 return function (className) {
11710 if (!warningSeen) {
11711 generatedClasses[className] = true;
11712 if (Object.keys(generatedClasses).length >= LIMIT) {
11713 // Unable to find latestRule in test environment.
11714 /* eslint-disable no-console, prefer-template */
11715 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 />');
11716 warningSeen = true;
11717 generatedClasses = {};
11718 }
11719 }
11720 };
11721 });
11722
11723 //
11724
11725 var determineTheme = (function (props, fallbackTheme) {
11726 var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT;
11727
11728 // Props should take precedence over ThemeProvider, which should take precedence over
11729 // defaultProps, but React automatically puts defaultProps on props.
11730
11731 /* eslint-disable react/prop-types, flowtype-errors/show-errors */
11732 var isDefaultTheme = defaultProps ? props.theme === defaultProps.theme : false;
11733 var theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme || defaultProps.theme;
11734 /* eslint-enable */
11735
11736 return theme;
11737 });
11738
11739 //
11740 var escapeRegex = /[[\].#*$><+~=|^:(),"'`-]+/g;
11741 var dashesAtEnds = /(^-|-$)/g;
11742
11743 /**
11744 * TODO: Explore using CSS.escape when it becomes more available
11745 * in evergreen browsers.
11746 */
11747 function escape(str) {
11748 return str
11749 // Replace all possible CSS selectors
11750 .replace(escapeRegex, '-')
11751
11752 // Remove extraneous hyphens at the start and end
11753 .replace(dashesAtEnds, '');
11754 }
11755
11756 //
11757
11758 function isTag(target) {
11759 return typeof target === 'string' && ( true ? target.charAt(0) === target.charAt(0).toLowerCase() : 0);
11760 }
11761
11762 //
11763
11764 function generateDisplayName(target) {
11765 // $FlowFixMe
11766 return isTag(target) ? 'styled.' + target : 'Styled(' + getComponentName(target) + ')';
11767 }
11768
11769 var _TYPE_STATICS;
11770
11771 var REACT_STATICS = {
11772 childContextTypes: true,
11773 contextTypes: true,
11774 defaultProps: true,
11775 displayName: true,
11776 getDerivedStateFromProps: true,
11777 propTypes: true,
11778 type: true
11779 };
11780
11781 var KNOWN_STATICS = {
11782 name: true,
11783 length: true,
11784 prototype: true,
11785 caller: true,
11786 callee: true,
11787 arguments: true,
11788 arity: true
11789 };
11790
11791 var TYPE_STATICS = (_TYPE_STATICS = {}, _TYPE_STATICS[react_is__WEBPACK_IMPORTED_MODULE_4__.ForwardRef] = {
11792 $$typeof: true,
11793 render: true
11794 }, _TYPE_STATICS);
11795
11796 var defineProperty$1 = Object.defineProperty,
11797 getOwnPropertyNames = Object.getOwnPropertyNames,
11798 _Object$getOwnPropert = Object.getOwnPropertySymbols,
11799 getOwnPropertySymbols = _Object$getOwnPropert === undefined ? function () {
11800 return [];
11801 } : _Object$getOwnPropert,
11802 getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor,
11803 getPrototypeOf = Object.getPrototypeOf,
11804 objectPrototype = Object.prototype;
11805 var arrayPrototype = Array.prototype;
11806
11807
11808 function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
11809 if (typeof sourceComponent !== 'string') {
11810 // don't hoist over string (html) components
11811
11812 var inheritedComponent = getPrototypeOf(sourceComponent);
11813
11814 if (inheritedComponent && inheritedComponent !== objectPrototype) {
11815 hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
11816 }
11817
11818 var keys = arrayPrototype.concat(getOwnPropertyNames(sourceComponent),
11819 // $FlowFixMe
11820 getOwnPropertySymbols(sourceComponent));
11821
11822 var targetStatics = TYPE_STATICS[targetComponent.$$typeof] || REACT_STATICS;
11823
11824 var sourceStatics = TYPE_STATICS[sourceComponent.$$typeof] || REACT_STATICS;
11825
11826 var i = keys.length;
11827 var descriptor = void 0;
11828 var key = void 0;
11829
11830 // eslint-disable-next-line no-plusplus
11831 while (i--) {
11832 key = keys[i];
11833
11834 if (
11835 // $FlowFixMe
11836 !KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) &&
11837 // $FlowFixMe
11838 !(targetStatics && targetStatics[key])) {
11839 descriptor = getOwnPropertyDescriptor(sourceComponent, key);
11840
11841 if (descriptor) {
11842 try {
11843 // Avoid failures from read-only properties
11844 defineProperty$1(targetComponent, key, descriptor);
11845 } catch (e) {
11846 /* fail silently */
11847 }
11848 }
11849 }
11850 }
11851
11852 return targetComponent;
11853 }
11854
11855 return targetComponent;
11856 }
11857
11858 //
11859 function isDerivedReactComponent(fn) {
11860 return !!(fn && fn.prototype && fn.prototype.isReactComponent);
11861 }
11862
11863 //
11864 // Helper to call a given function, only once
11865 var once = (function (cb) {
11866 var called = false;
11867
11868 return function () {
11869 if (!called) {
11870 called = true;
11871 cb.apply(undefined, arguments);
11872 }
11873 };
11874 });
11875
11876 //
11877
11878 var ThemeContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.createContext)();
11879
11880 var ThemeConsumer = ThemeContext.Consumer;
11881
11882 /**
11883 * Provide a theme to an entire react component tree via context
11884 */
11885
11886 var ThemeProvider = function (_Component) {
11887 inherits(ThemeProvider, _Component);
11888
11889 function ThemeProvider(props) {
11890 classCallCheck(this, ThemeProvider);
11891
11892 var _this = possibleConstructorReturn(this, _Component.call(this, props));
11893
11894 _this.getContext = (0,memoize_one__WEBPACK_IMPORTED_MODULE_7__["default"])(_this.getContext.bind(_this));
11895 _this.renderInner = _this.renderInner.bind(_this);
11896 return _this;
11897 }
11898
11899 ThemeProvider.prototype.render = function render() {
11900 if (!this.props.children) return null;
11901
11902 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
11903 ThemeContext.Consumer,
11904 null,
11905 this.renderInner
11906 );
11907 };
11908
11909 ThemeProvider.prototype.renderInner = function renderInner(outerTheme) {
11910 var context = this.getContext(this.props.theme, outerTheme);
11911
11912 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
11913 ThemeContext.Provider,
11914 { value: context },
11915 this.props.children
11916 );
11917 };
11918
11919 /**
11920 * Get the theme from the props, supporting both (outerTheme) => {}
11921 * as well as object notation
11922 */
11923
11924
11925 ThemeProvider.prototype.getTheme = function getTheme(theme, outerTheme) {
11926 if (isFunction(theme)) {
11927 var mergedTheme = theme(outerTheme);
11928
11929 if ( true && (mergedTheme === null || Array.isArray(mergedTheme) || (typeof mergedTheme === 'undefined' ? 'undefined' : _typeof(mergedTheme)) !== 'object')) {
11930 throw new StyledComponentsError(7);
11931 }
11932
11933 return mergedTheme;
11934 }
11935
11936 if (theme === null || Array.isArray(theme) || (typeof theme === 'undefined' ? 'undefined' : _typeof(theme)) !== 'object') {
11937 throw new StyledComponentsError(8);
11938 }
11939
11940 return _extends({}, outerTheme, theme);
11941 };
11942
11943 ThemeProvider.prototype.getContext = function getContext(theme, outerTheme) {
11944 return this.getTheme(theme, outerTheme);
11945 };
11946
11947 return ThemeProvider;
11948 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
11949
11950 //
11951
11952 var CLOSING_TAG_R = /^\s*<\/[a-z]/i;
11953
11954 var ServerStyleSheet = function () {
11955 function ServerStyleSheet() {
11956 classCallCheck(this, ServerStyleSheet);
11957
11958 /* The master sheet might be reset, so keep a reference here */
11959 this.masterSheet = StyleSheet.master;
11960 this.instance = this.masterSheet.clone();
11961 this.sealed = false;
11962 }
11963
11964 /**
11965 * Mark the ServerStyleSheet as being fully emitted and manually GC it from the
11966 * StyleSheet singleton.
11967 */
11968
11969
11970 ServerStyleSheet.prototype.seal = function seal() {
11971 if (!this.sealed) {
11972 /* Remove sealed StyleSheets from the master sheet */
11973 var index = this.masterSheet.clones.indexOf(this.instance);
11974 this.masterSheet.clones.splice(index, 1);
11975 this.sealed = true;
11976 }
11977 };
11978
11979 ServerStyleSheet.prototype.collectStyles = function collectStyles(children) {
11980 if (this.sealed) {
11981 throw new StyledComponentsError(2);
11982 }
11983
11984 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
11985 StyleSheetManager,
11986 { sheet: this.instance },
11987 children
11988 );
11989 };
11990
11991 ServerStyleSheet.prototype.getStyleTags = function getStyleTags() {
11992 this.seal();
11993 return this.instance.toHTML();
11994 };
11995
11996 ServerStyleSheet.prototype.getStyleElement = function getStyleElement() {
11997 this.seal();
11998 return this.instance.toReactElements();
11999 };
12000
12001 ServerStyleSheet.prototype.interleaveWithNodeStream = function interleaveWithNodeStream(readableStream) {
12002 var _this = this;
12003
12004 {
12005 throw new StyledComponentsError(3);
12006 }
12007
12008 /* the tag index keeps track of which tags have already been emitted */
12009 var instance = this.instance;
12010
12011 var instanceTagIndex = 0;
12012
12013 var streamAttr = SC_STREAM_ATTR + '="true"';
12014
12015 var transformer = new stream.Transform({
12016 transform: function appendStyleChunks(chunk, /* encoding */_, callback) {
12017 var tags = instance.tags;
12018
12019 var html = '';
12020
12021 /* retrieve html for each new style tag */
12022 for (; instanceTagIndex < tags.length; instanceTagIndex += 1) {
12023 var tag = tags[instanceTagIndex];
12024 html += tag.toHTML(streamAttr);
12025 }
12026
12027 /* force our StyleSheets to emit entirely new tags */
12028 instance.sealAllTags();
12029
12030 var renderedHtml = chunk.toString();
12031
12032 /* prepend style html to chunk, unless the start of the chunk is a closing tag in which case append right after that */
12033 if (CLOSING_TAG_R.test(renderedHtml)) {
12034 var endOfClosingTag = renderedHtml.indexOf('>');
12035
12036 this.push(renderedHtml.slice(0, endOfClosingTag + 1) + html + renderedHtml.slice(endOfClosingTag + 1));
12037 } else this.push(html + renderedHtml);
12038
12039 callback();
12040 }
12041 });
12042
12043 readableStream.on('end', function () {
12044 return _this.seal();
12045 });
12046
12047 readableStream.on('error', function (err) {
12048 _this.seal();
12049
12050 // forward the error to the transform stream
12051 transformer.emit('error', err);
12052 });
12053
12054 return readableStream.pipe(transformer);
12055 };
12056
12057 return ServerStyleSheet;
12058 }();
12059
12060 //
12061
12062 var StyleSheetContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.createContext)();
12063 var StyleSheetConsumer = StyleSheetContext.Consumer;
12064
12065 var StyleSheetManager = function (_Component) {
12066 inherits(StyleSheetManager, _Component);
12067
12068 function StyleSheetManager(props) {
12069 classCallCheck(this, StyleSheetManager);
12070
12071 var _this = possibleConstructorReturn(this, _Component.call(this, props));
12072
12073 _this.getContext = (0,memoize_one__WEBPACK_IMPORTED_MODULE_7__["default"])(_this.getContext);
12074 return _this;
12075 }
12076
12077 StyleSheetManager.prototype.getContext = function getContext(sheet, target) {
12078 if (sheet) {
12079 return sheet;
12080 } else if (target) {
12081 return new StyleSheet(target);
12082 } else {
12083 throw new StyledComponentsError(4);
12084 }
12085 };
12086
12087 StyleSheetManager.prototype.render = function render() {
12088 var _props = this.props,
12089 children = _props.children,
12090 sheet = _props.sheet,
12091 target = _props.target;
12092
12093
12094 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12095 StyleSheetContext.Provider,
12096 { value: this.getContext(sheet, target) },
12097 true ? react__WEBPACK_IMPORTED_MODULE_2___default().Children.only(children) : 0
12098 );
12099 };
12100
12101 return StyleSheetManager;
12102 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
12103 true ? StyleSheetManager.propTypes = {
12104 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)]),
12105
12106 target: prop_types__WEBPACK_IMPORTED_MODULE_8___default().shape({
12107 appendChild: (prop_types__WEBPACK_IMPORTED_MODULE_8___default().func.isRequired)
12108 })
12109 } : 0;
12110
12111 //
12112
12113 var identifiers = {};
12114
12115 /* We depend on components having unique IDs */
12116 function generateId(_ComponentStyle, _displayName, parentComponentId) {
12117 var displayName = typeof _displayName !== 'string' ? 'sc' : escape(_displayName);
12118
12119 /**
12120 * This ensures uniqueness if two components happen to share
12121 * the same displayName.
12122 */
12123 var nr = (identifiers[displayName] || 0) + 1;
12124 identifiers[displayName] = nr;
12125
12126 var componentId = displayName + '-' + _ComponentStyle.generateName(displayName + nr);
12127
12128 return parentComponentId ? parentComponentId + '-' + componentId : componentId;
12129 }
12130
12131 // $FlowFixMe
12132
12133 var StyledComponent = function (_Component) {
12134 inherits(StyledComponent, _Component);
12135
12136 function StyledComponent() {
12137 classCallCheck(this, StyledComponent);
12138
12139 var _this = possibleConstructorReturn(this, _Component.call(this));
12140
12141 _this.attrs = {};
12142
12143 _this.renderOuter = _this.renderOuter.bind(_this);
12144 _this.renderInner = _this.renderInner.bind(_this);
12145
12146 if (true) {
12147 _this.warnInnerRef = once(function (displayName) {
12148 return (
12149 // eslint-disable-next-line no-console
12150 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 + '".')
12151 );
12152 });
12153
12154 _this.warnAttrsFnObjectKeyDeprecated = once(function (key, displayName) {
12155 return (
12156 // eslint-disable-next-line no-console
12157 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)
12158 );
12159 });
12160
12161 _this.warnNonStyledComponentAttrsObjectKey = once(function (key, displayName) {
12162 return (
12163 // eslint-disable-next-line no-console
12164 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 }'))
12165 );
12166 });
12167 }
12168 return _this;
12169 }
12170
12171 StyledComponent.prototype.render = function render() {
12172 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12173 StyleSheetConsumer,
12174 null,
12175 this.renderOuter
12176 );
12177 };
12178
12179 StyledComponent.prototype.renderOuter = function renderOuter() {
12180 var styleSheet = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : StyleSheet.master;
12181
12182 this.styleSheet = styleSheet;
12183
12184 // No need to subscribe a static component to theme changes, it won't change anything
12185 if (this.props.forwardedComponent.componentStyle.isStatic) return this.renderInner();
12186
12187 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12188 ThemeConsumer,
12189 null,
12190 this.renderInner
12191 );
12192 };
12193
12194 StyledComponent.prototype.renderInner = function renderInner(theme) {
12195 var _props$forwardedCompo = this.props.forwardedComponent,
12196 componentStyle = _props$forwardedCompo.componentStyle,
12197 defaultProps = _props$forwardedCompo.defaultProps,
12198 displayName = _props$forwardedCompo.displayName,
12199 foldedComponentIds = _props$forwardedCompo.foldedComponentIds,
12200 styledComponentId = _props$forwardedCompo.styledComponentId,
12201 target = _props$forwardedCompo.target;
12202
12203
12204 var generatedClassName = void 0;
12205 if (componentStyle.isStatic) {
12206 generatedClassName = this.generateAndInjectStyles(EMPTY_OBJECT, this.props);
12207 } else {
12208 generatedClassName = this.generateAndInjectStyles(determineTheme(this.props, theme, defaultProps) || EMPTY_OBJECT, this.props);
12209 }
12210
12211 var elementToBeCreated = this.props.as || this.attrs.as || target;
12212 var isTargetTag = isTag(elementToBeCreated);
12213
12214 var propsForElement = {};
12215 var computedProps = _extends({}, this.props, this.attrs);
12216
12217 var key = void 0;
12218 // eslint-disable-next-line guard-for-in
12219 for (key in computedProps) {
12220 if ( true && key === 'innerRef' && isTargetTag) {
12221 this.warnInnerRef(displayName);
12222 }
12223
12224 if (key === 'forwardedComponent' || key === 'as') {
12225 continue;
12226 } 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)) {
12227 // Don't pass through non HTML tags through to HTML elements
12228 propsForElement[key] = computedProps[key];
12229 }
12230 }
12231
12232 if (this.props.style && this.attrs.style) {
12233 propsForElement.style = _extends({}, this.attrs.style, this.props.style);
12234 }
12235
12236 propsForElement.className = Array.prototype.concat(foldedComponentIds, styledComponentId, generatedClassName !== styledComponentId ? generatedClassName : null, this.props.className, this.attrs.className).filter(Boolean).join(' ');
12237
12238 return (0,react__WEBPACK_IMPORTED_MODULE_2__.createElement)(elementToBeCreated, propsForElement);
12239 };
12240
12241 StyledComponent.prototype.buildExecutionContext = function buildExecutionContext(theme, props, attrs) {
12242 var _this2 = this;
12243
12244 var context = _extends({}, props, { theme: theme });
12245
12246 if (!attrs.length) return context;
12247
12248 this.attrs = {};
12249
12250 attrs.forEach(function (attrDef) {
12251 var resolvedAttrDef = attrDef;
12252 var attrDefWasFn = false;
12253 var attr = void 0;
12254 var key = void 0;
12255
12256 if (isFunction(resolvedAttrDef)) {
12257 // $FlowFixMe
12258 resolvedAttrDef = resolvedAttrDef(context);
12259 attrDefWasFn = true;
12260 }
12261
12262 /* eslint-disable guard-for-in */
12263 // $FlowFixMe
12264 for (key in resolvedAttrDef) {
12265 attr = resolvedAttrDef[key];
12266
12267 if (!attrDefWasFn) {
12268 if (isFunction(attr) && !isDerivedReactComponent(attr) && !isStyledComponent(attr)) {
12269 if (true) {
12270 _this2.warnAttrsFnObjectKeyDeprecated(key, props.forwardedComponent.displayName);
12271 }
12272
12273 attr = attr(context);
12274
12275 if ( true && react__WEBPACK_IMPORTED_MODULE_2___default().isValidElement(attr)) {
12276 _this2.warnNonStyledComponentAttrsObjectKey(key, props.forwardedComponent.displayName);
12277 }
12278 }
12279 }
12280
12281 _this2.attrs[key] = attr;
12282 context[key] = attr;
12283 }
12284 /* eslint-enable */
12285 });
12286
12287 return context;
12288 };
12289
12290 StyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) {
12291 var _props$forwardedCompo2 = props.forwardedComponent,
12292 attrs = _props$forwardedCompo2.attrs,
12293 componentStyle = _props$forwardedCompo2.componentStyle,
12294 warnTooManyClasses = _props$forwardedCompo2.warnTooManyClasses;
12295
12296 // statically styled-components don't need to build an execution context object,
12297 // and shouldn't be increasing the number of class names
12298
12299 if (componentStyle.isStatic && !attrs.length) {
12300 return componentStyle.generateAndInjectStyles(EMPTY_OBJECT, this.styleSheet);
12301 }
12302
12303 var className = componentStyle.generateAndInjectStyles(this.buildExecutionContext(theme, props, attrs), this.styleSheet);
12304
12305 if ( true && warnTooManyClasses) warnTooManyClasses(className);
12306
12307 return className;
12308 };
12309
12310 return StyledComponent;
12311 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
12312
12313 function createStyledComponent(target, options, rules) {
12314 var isTargetStyledComp = isStyledComponent(target);
12315 var isClass = !isTag(target);
12316
12317 var _options$displayName = options.displayName,
12318 displayName = _options$displayName === undefined ? generateDisplayName(target) : _options$displayName,
12319 _options$componentId = options.componentId,
12320 componentId = _options$componentId === undefined ? generateId(ComponentStyle, options.displayName, options.parentComponentId) : _options$componentId,
12321 _options$ParentCompon = options.ParentComponent,
12322 ParentComponent = _options$ParentCompon === undefined ? StyledComponent : _options$ParentCompon,
12323 _options$attrs = options.attrs,
12324 attrs = _options$attrs === undefined ? EMPTY_ARRAY : _options$attrs;
12325
12326
12327 var styledComponentId = options.displayName && options.componentId ? escape(options.displayName) + '-' + options.componentId : options.componentId || componentId;
12328
12329 // fold the underlying StyledComponent attrs up (implicit extend)
12330 var finalAttrs =
12331 // $FlowFixMe
12332 isTargetStyledComp && target.attrs ? Array.prototype.concat(target.attrs, attrs).filter(Boolean) : attrs;
12333
12334 var componentStyle = new ComponentStyle(isTargetStyledComp ? // fold the underlying StyledComponent rules up (implicit extend)
12335 // $FlowFixMe
12336 target.componentStyle.rules.concat(rules) : rules, finalAttrs, styledComponentId);
12337
12338 /**
12339 * forwardRef creates a new interim component, which we'll take advantage of
12340 * instead of extending ParentComponent to create _another_ interim class
12341 */
12342 var WrappedStyledComponent = void 0;
12343 var forwardRef = function forwardRef(props, ref) {
12344 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ParentComponent, _extends({}, props, { forwardedComponent: WrappedStyledComponent, forwardedRef: ref }));
12345 };
12346 forwardRef.displayName = displayName;
12347 WrappedStyledComponent = react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(forwardRef);
12348 WrappedStyledComponent.displayName = displayName;
12349
12350 // $FlowFixMe
12351 WrappedStyledComponent.attrs = finalAttrs;
12352 // $FlowFixMe
12353 WrappedStyledComponent.componentStyle = componentStyle;
12354
12355 // $FlowFixMe
12356 WrappedStyledComponent.foldedComponentIds = isTargetStyledComp ? // $FlowFixMe
12357 Array.prototype.concat(target.foldedComponentIds, target.styledComponentId) : EMPTY_ARRAY;
12358
12359 // $FlowFixMe
12360 WrappedStyledComponent.styledComponentId = styledComponentId;
12361
12362 // fold the underlying StyledComponent target up since we folded the styles
12363 // $FlowFixMe
12364 WrappedStyledComponent.target = isTargetStyledComp ? target.target : target;
12365
12366 // $FlowFixMe
12367 WrappedStyledComponent.withComponent = function withComponent(tag) {
12368 var previousComponentId = options.componentId,
12369 optionsToCopy = objectWithoutProperties(options, ['componentId']);
12370
12371
12372 var newComponentId = previousComponentId && previousComponentId + '-' + (isTag(tag) ? tag : escape(getComponentName(tag)));
12373
12374 var newOptions = _extends({}, optionsToCopy, {
12375 attrs: finalAttrs,
12376 componentId: newComponentId,
12377 ParentComponent: ParentComponent
12378 });
12379
12380 return createStyledComponent(tag, newOptions, rules);
12381 };
12382
12383 // $FlowFixMe
12384 Object.defineProperty(WrappedStyledComponent, 'defaultProps', {
12385 get: function get$$1() {
12386 return this._foldedDefaultProps;
12387 },
12388 set: function set$$1(obj) {
12389 // $FlowFixMe
12390 this._foldedDefaultProps = isTargetStyledComp ? (0,merge_anything__WEBPACK_IMPORTED_MODULE_6__["default"])(target.defaultProps, obj) : obj;
12391 }
12392 });
12393
12394 if (true) {
12395 // $FlowFixMe
12396 WrappedStyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName);
12397 }
12398
12399 // $FlowFixMe
12400 WrappedStyledComponent.toString = function () {
12401 return '.' + WrappedStyledComponent.styledComponentId;
12402 };
12403
12404 if (isClass) {
12405 hoistNonReactStatics(WrappedStyledComponent, target, {
12406 // all SC-specific things should not be hoisted
12407 attrs: true,
12408 componentStyle: true,
12409 displayName: true,
12410 foldedComponentIds: true,
12411 styledComponentId: true,
12412 target: true,
12413 withComponent: true
12414 });
12415 }
12416
12417 return WrappedStyledComponent;
12418 }
12419
12420 //
12421 // Thanks to ReactDOMFactories for this handy list!
12422
12423 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',
12424
12425 // SVG
12426 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'marker', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
12427
12428 //
12429
12430 var styled = function styled(tag) {
12431 return constructWithOptions(createStyledComponent, tag);
12432 };
12433
12434 // Shorthands for all valid HTML Elements
12435 domElements.forEach(function (domElement) {
12436 styled[domElement] = styled(domElement);
12437 });
12438
12439 //
12440
12441 var GlobalStyle = function () {
12442 function GlobalStyle(rules, componentId) {
12443 classCallCheck(this, GlobalStyle);
12444
12445 this.rules = rules;
12446 this.componentId = componentId;
12447 this.isStatic = isStaticRules(rules, EMPTY_ARRAY);
12448
12449 if (!StyleSheet.master.hasId(componentId)) {
12450 StyleSheet.master.deferredInject(componentId, []);
12451 }
12452 }
12453
12454 GlobalStyle.prototype.createStyles = function createStyles(executionContext, styleSheet) {
12455 var flatCSS = flatten(this.rules, executionContext, styleSheet);
12456 var css = stringifyRules(flatCSS, '');
12457
12458 styleSheet.inject(this.componentId, css);
12459 };
12460
12461 GlobalStyle.prototype.removeStyles = function removeStyles(styleSheet) {
12462 var componentId = this.componentId;
12463
12464 if (styleSheet.hasId(componentId)) {
12465 styleSheet.remove(componentId);
12466 }
12467 };
12468
12469 // TODO: overwrite in-place instead of remove+create?
12470
12471
12472 GlobalStyle.prototype.renderStyles = function renderStyles(executionContext, styleSheet) {
12473 this.removeStyles(styleSheet);
12474 this.createStyles(executionContext, styleSheet);
12475 };
12476
12477 return GlobalStyle;
12478 }();
12479
12480 //
12481
12482 // place our cache into shared context so it'll persist between HMRs
12483 if (IS_BROWSER) {
12484 window.scCGSHMRCache = {};
12485 }
12486
12487 function createGlobalStyle(strings) {
12488 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12489 interpolations[_key - 1] = arguments[_key];
12490 }
12491
12492 var rules = css.apply(undefined, [strings].concat(interpolations));
12493 var id = 'sc-global-' + murmurhash(JSON.stringify(rules));
12494 var style = new GlobalStyle(rules, id);
12495
12496 var GlobalStyleComponent = function (_React$Component) {
12497 inherits(GlobalStyleComponent, _React$Component);
12498
12499 function GlobalStyleComponent(props) {
12500 classCallCheck(this, GlobalStyleComponent);
12501
12502 var _this = possibleConstructorReturn(this, _React$Component.call(this, props));
12503
12504 var _this$constructor = _this.constructor,
12505 globalStyle = _this$constructor.globalStyle,
12506 styledComponentId = _this$constructor.styledComponentId;
12507
12508
12509 if (IS_BROWSER) {
12510 window.scCGSHMRCache[styledComponentId] = (window.scCGSHMRCache[styledComponentId] || 0) + 1;
12511 }
12512
12513 /**
12514 * This fixes HMR compatibility. Don't ask me why, but this combination of
12515 * caching the closure variables via statics and then persisting the statics in
12516 * state works across HMR where no other combination did. ¯\_(ツ)_/¯
12517 */
12518 _this.state = {
12519 globalStyle: globalStyle,
12520 styledComponentId: styledComponentId
12521 };
12522 return _this;
12523 }
12524
12525 GlobalStyleComponent.prototype.componentWillUnmount = function componentWillUnmount() {
12526 if (window.scCGSHMRCache[this.state.styledComponentId]) {
12527 window.scCGSHMRCache[this.state.styledComponentId] -= 1;
12528 }
12529 /**
12530 * Depending on the order "render" is called this can cause the styles to be lost
12531 * until the next render pass of the remaining instance, which may
12532 * not be immediate.
12533 */
12534 if (window.scCGSHMRCache[this.state.styledComponentId] === 0) {
12535 this.state.globalStyle.removeStyles(this.styleSheet);
12536 }
12537 };
12538
12539 GlobalStyleComponent.prototype.render = function render() {
12540 var _this2 = this;
12541
12542 if ( true && react__WEBPACK_IMPORTED_MODULE_2___default().Children.count(this.props.children)) {
12543 // eslint-disable-next-line no-console
12544 console.warn('The global style component ' + this.state.styledComponentId + ' was given child JSX. createGlobalStyle does not render children.');
12545 }
12546
12547 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12548 StyleSheetConsumer,
12549 null,
12550 function (styleSheet) {
12551 _this2.styleSheet = styleSheet || StyleSheet.master;
12552
12553 var globalStyle = _this2.state.globalStyle;
12554
12555
12556 if (globalStyle.isStatic) {
12557 globalStyle.renderStyles(STATIC_EXECUTION_CONTEXT, _this2.styleSheet);
12558
12559 return null;
12560 } else {
12561 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12562 ThemeConsumer,
12563 null,
12564 function (theme) {
12565 // $FlowFixMe
12566 var defaultProps = _this2.constructor.defaultProps;
12567
12568
12569 var context = _extends({}, _this2.props);
12570
12571 if (typeof theme !== 'undefined') {
12572 context.theme = determineTheme(_this2.props, theme, defaultProps);
12573 }
12574
12575 globalStyle.renderStyles(context, _this2.styleSheet);
12576
12577 return null;
12578 }
12579 );
12580 }
12581 }
12582 );
12583 };
12584
12585 return GlobalStyleComponent;
12586 }((react__WEBPACK_IMPORTED_MODULE_2___default().Component));
12587
12588 GlobalStyleComponent.globalStyle = style;
12589 GlobalStyleComponent.styledComponentId = id;
12590
12591
12592 return GlobalStyleComponent;
12593 }
12594
12595 //
12596
12597 var replaceWhitespace = function replaceWhitespace(str) {
12598 return str.replace(/\s|\\n/g, '');
12599 };
12600
12601 function keyframes(strings) {
12602 /* Warning if you've used keyframes on React Native */
12603 if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
12604 // eslint-disable-next-line no-console
12605 console.warn('`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.');
12606 }
12607
12608 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12609 interpolations[_key - 1] = arguments[_key];
12610 }
12611
12612 var rules = css.apply(undefined, [strings].concat(interpolations));
12613
12614 var name = generateAlphabeticName(murmurhash(replaceWhitespace(JSON.stringify(rules))));
12615
12616 return new Keyframes(name, stringifyRules(rules, name, '@keyframes'));
12617 }
12618
12619 //
12620
12621 var withTheme = (function (Component$$1) {
12622 var WithTheme = react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(function (props, ref) {
12623 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12624 ThemeConsumer,
12625 null,
12626 function (theme) {
12627 // $FlowFixMe
12628 var defaultProps = Component$$1.defaultProps;
12629
12630 var themeProp = determineTheme(props, theme, defaultProps);
12631
12632 if ( true && themeProp === undefined) {
12633 // eslint-disable-next-line no-console
12634 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) + '"');
12635 }
12636
12637 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(Component$$1, _extends({}, props, { theme: themeProp, ref: ref }));
12638 }
12639 );
12640 });
12641
12642 hoistNonReactStatics(WithTheme, Component$$1);
12643
12644 WithTheme.displayName = 'WithTheme(' + getComponentName(Component$$1) + ')';
12645
12646 return WithTheme;
12647 });
12648
12649 //
12650
12651 /* eslint-disable */
12652 var __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS = {
12653 StyleSheet: StyleSheet
12654 };
12655
12656 //
12657
12658 /* Warning if you've imported this file on React Native */
12659 if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
12660 // eslint-disable-next-line no-console
12661 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');
12662 }
12663
12664 /* Warning if there are several instances of styled-components */
12665 if ( true && typeof window !== 'undefined' && typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Node.js') === -1 && navigator.userAgent.indexOf('jsdom') === -1) {
12666 window['__styled-components-init__'] = window['__styled-components-init__'] || 0;
12667
12668 if (window['__styled-components-init__'] === 1) {
12669 // eslint-disable-next-line no-console
12670 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.');
12671 }
12672
12673 window['__styled-components-init__'] += 1;
12674 }
12675
12676 //
12677
12678 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (styled);
12679
12680 //# sourceMappingURL=styled-components.browser.esm.js.map
12681
12682
12683 /***/ }),
12684
12685 /***/ "./node_modules/stylis-rule-sheet/index.js":
12686 /*!*************************************************!*\
12687 !*** ./node_modules/stylis-rule-sheet/index.js ***!
12688 \*************************************************/
12689 /***/ ((module) => {
12690
12691 (function (factory) {
12692 true ? (module['exports'] = factory()) :
12693 0
12694 }(function () {
12695
12696 'use strict'
12697
12698 return function (insertRule) {
12699 var delimiter = '/*|*/'
12700 var needle = delimiter+'}'
12701
12702 function toSheet (block) {
12703 if (block)
12704 try {
12705 insertRule(block + '}')
12706 } catch (e) {}
12707 }
12708
12709 return function ruleSheet (context, content, selectors, parents, line, column, length, ns, depth, at) {
12710 switch (context) {
12711 // property
12712 case 1:
12713 // @import
12714 if (depth === 0 && content.charCodeAt(0) === 64)
12715 return insertRule(content+';'), ''
12716 break
12717 // selector
12718 case 2:
12719 if (ns === 0)
12720 return content + delimiter
12721 break
12722 // at-rule
12723 case 3:
12724 switch (ns) {
12725 // @font-face, @page
12726 case 102:
12727 case 112:
12728 return insertRule(selectors[0]+content), ''
12729 default:
12730 return content + (at === 0 ? delimiter : '')
12731 }
12732 case -2:
12733 content.split(needle).forEach(toSheet)
12734 }
12735 }
12736 }
12737 }))
12738
12739
12740 /***/ }),
12741
12742 /***/ "./node_modules/stylis/stylis.min.js":
12743 /*!*******************************************!*\
12744 !*** ./node_modules/stylis/stylis.min.js ***!
12745 \*******************************************/
12746 /***/ ((module) => {
12747
12748 !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});
12749 //# sourceMappingURL=stylis.min.js.map
12750
12751 /***/ }),
12752
12753 /***/ "react":
12754 /*!************************!*\
12755 !*** external "React" ***!
12756 \************************/
12757 /***/ ((module) => {
12758
12759 "use strict";
12760 module.exports = window["React"];
12761
12762 /***/ }),
12763
12764 /***/ "jquery":
12765 /*!*************************!*\
12766 !*** external "jQuery" ***!
12767 \*************************/
12768 /***/ ((module) => {
12769
12770 "use strict";
12771 module.exports = window["jQuery"];
12772
12773 /***/ }),
12774
12775 /***/ "@wordpress/blocks":
12776 /*!********************************!*\
12777 !*** external ["wp","blocks"] ***!
12778 \********************************/
12779 /***/ ((module) => {
12780
12781 "use strict";
12782 module.exports = window["wp"]["blocks"];
12783
12784 /***/ }),
12785
12786 /***/ "@wordpress/components":
12787 /*!************************************!*\
12788 !*** external ["wp","components"] ***!
12789 \************************************/
12790 /***/ ((module) => {
12791
12792 "use strict";
12793 module.exports = window["wp"]["components"];
12794
12795 /***/ }),
12796
12797 /***/ "@wordpress/data":
12798 /*!******************************!*\
12799 !*** external ["wp","data"] ***!
12800 \******************************/
12801 /***/ ((module) => {
12802
12803 "use strict";
12804 module.exports = window["wp"]["data"];
12805
12806 /***/ }),
12807
12808 /***/ "@wordpress/edit-post":
12809 /*!**********************************!*\
12810 !*** external ["wp","editPost"] ***!
12811 \**********************************/
12812 /***/ ((module) => {
12813
12814 "use strict";
12815 module.exports = window["wp"]["editPost"];
12816
12817 /***/ }),
12818
12819 /***/ "@wordpress/element":
12820 /*!*********************************!*\
12821 !*** external ["wp","element"] ***!
12822 \*********************************/
12823 /***/ ((module) => {
12824
12825 "use strict";
12826 module.exports = window["wp"]["element"];
12827
12828 /***/ }),
12829
12830 /***/ "@wordpress/i18n":
12831 /*!******************************!*\
12832 !*** external ["wp","i18n"] ***!
12833 \******************************/
12834 /***/ ((module) => {
12835
12836 "use strict";
12837 module.exports = window["wp"]["i18n"];
12838
12839 /***/ }),
12840
12841 /***/ "@wordpress/plugins":
12842 /*!*********************************!*\
12843 !*** external ["wp","plugins"] ***!
12844 \*********************************/
12845 /***/ ((module) => {
12846
12847 "use strict";
12848 module.exports = window["wp"]["plugins"];
12849
12850 /***/ }),
12851
12852 /***/ "./node_modules/@linaria/react/dist/index.mjs":
12853 /*!****************************************************!*\
12854 !*** ./node_modules/@linaria/react/dist/index.mjs ***!
12855 \****************************************************/
12856 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12857
12858 "use strict";
12859 __webpack_require__.r(__webpack_exports__);
12860 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12861 /* harmony export */ "styled": () => (/* binding */ styled_default)
12862 /* harmony export */ });
12863 /* 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");
12864 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
12865 /* harmony import */ var _linaria_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @linaria/core */ "./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs");
12866 // src/styled.ts
12867
12868
12869
12870 var isCapital = (ch) => ch.toUpperCase() === ch;
12871 var filterKey = (keys) => (key) => keys.indexOf(key) === -1;
12872 var omit = (obj, keys) => {
12873 const res = {};
12874 Object.keys(obj).filter(filterKey(keys)).forEach((key) => {
12875 res[key] = obj[key];
12876 });
12877 return res;
12878 };
12879 function filterProps(asIs, props, omitKeys) {
12880 const filteredProps = omit(props, omitKeys);
12881 if (!asIs) {
12882 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"];
12883 Object.keys(filteredProps).forEach((key) => {
12884 if (!interopValidAttr.default(key)) {
12885 delete filteredProps[key];
12886 }
12887 });
12888 }
12889 return filteredProps;
12890 }
12891 var warnIfInvalid = (value, componentName) => {
12892 if (true) {
12893 if (typeof value === "string" || typeof value === "number" && isFinite(value)) {
12894 return;
12895 }
12896 const stringified = typeof value === "object" ? JSON.stringify(value) : String(value);
12897 console.warn(
12898 `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.`
12899 );
12900 }
12901 };
12902 function styled(tag) {
12903 return (options) => {
12904 if (true) {
12905 if (Array.isArray(options)) {
12906 throw new Error(
12907 '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'
12908 );
12909 }
12910 }
12911 const render = (props, ref) => {
12912 const { as: component = tag, class: className } = props;
12913 const shouldKeepProps = options.propsAsIs === void 0 ? !(typeof component === "string" && component.indexOf("-") === -1 && !isCapital(component[0])) : options.propsAsIs;
12914 const filteredProps = filterProps(shouldKeepProps, props, [
12915 "as",
12916 "class"
12917 ]);
12918 filteredProps.ref = ref;
12919 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);
12920 const { vars } = options;
12921 if (vars) {
12922 const style = {};
12923 for (const name in vars) {
12924 const variable = vars[name];
12925 const result = variable[0];
12926 const unit = variable[1] || "";
12927 const value = typeof result === "function" ? result(props) : result;
12928 warnIfInvalid(value, options.name);
12929 style[`--${name}`] = `${value}${unit}`;
12930 }
12931 const ownStyle = filteredProps.style || {};
12932 const keys = Object.keys(ownStyle);
12933 if (keys.length > 0) {
12934 keys.forEach((key) => {
12935 style[key] = ownStyle[key];
12936 });
12937 }
12938 filteredProps.style = style;
12939 }
12940 if (tag.__linaria && tag !== component) {
12941 filteredProps.as = component;
12942 return react__WEBPACK_IMPORTED_MODULE_1__.createElement(tag, filteredProps);
12943 }
12944 return react__WEBPACK_IMPORTED_MODULE_1__.createElement(component, filteredProps);
12945 };
12946 const Result = react__WEBPACK_IMPORTED_MODULE_1__.forwardRef ? react__WEBPACK_IMPORTED_MODULE_1__.forwardRef(render) : (props) => {
12947 const rest = omit(props, ["innerRef"]);
12948 return render(rest, props.innerRef);
12949 };
12950 Result.displayName = options.name;
12951 Result.__linaria = {
12952 className: options.class,
12953 extends: tag
12954 };
12955 return Result;
12956 };
12957 }
12958 var styled_default = true ? new Proxy(styled, {
12959 get(o, prop) {
12960 return o(prop);
12961 }
12962 }) : 0;
12963
12964 //# sourceMappingURL=index.mjs.map
12965
12966 /***/ }),
12967
12968 /***/ "./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs":
12969 /*!*******************************************************************************!*\
12970 !*** ./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs ***!
12971 \*******************************************************************************/
12972 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12973
12974 "use strict";
12975 __webpack_require__.r(__webpack_exports__);
12976 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12977 /* harmony export */ "css": () => (/* binding */ css_default),
12978 /* harmony export */ "cx": () => (/* binding */ cx_default)
12979 /* harmony export */ });
12980 // src/css.ts
12981 var css = () => {
12982 throw new Error(
12983 'Using the "css" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly.'
12984 );
12985 };
12986 var css_default = css;
12987
12988 // src/cx.ts
12989 var cx = function cx2() {
12990 const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
12991 const atomicClasses = {};
12992 const nonAtomicClasses = [];
12993 presentClassNames.forEach((arg) => {
12994 const individualClassNames = arg ? arg.split(" ") : [];
12995 individualClassNames.forEach((className) => {
12996 if (className.startsWith("atm_")) {
12997 const [, keyHash] = className.split("_");
12998 atomicClasses[keyHash] = className;
12999 } else {
13000 nonAtomicClasses.push(className);
13001 }
13002 });
13003 });
13004 const result = [];
13005 for (const keyHash in atomicClasses) {
13006 if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
13007 result.push(atomicClasses[keyHash]);
13008 }
13009 }
13010 result.push(...nonAtomicClasses);
13011 return result.join(" ");
13012 };
13013 var cx_default = cx;
13014
13015 //# sourceMappingURL=index.mjs.map
13016
13017 /***/ })
13018
13019 /******/ });
13020 /************************************************************************/
13021 /******/ // The module cache
13022 /******/ var __webpack_module_cache__ = {};
13023 /******/
13024 /******/ // The require function
13025 /******/ function __webpack_require__(moduleId) {
13026 /******/ // Check if module is in cache
13027 /******/ var cachedModule = __webpack_module_cache__[moduleId];
13028 /******/ if (cachedModule !== undefined) {
13029 /******/ return cachedModule.exports;
13030 /******/ }
13031 /******/ // Create a new module (and put it into the cache)
13032 /******/ var module = __webpack_module_cache__[moduleId] = {
13033 /******/ // no module.id needed
13034 /******/ // no module.loaded needed
13035 /******/ exports: {}
13036 /******/ };
13037 /******/
13038 /******/ // Execute the module function
13039 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
13040 /******/
13041 /******/ // Return the exports of the module
13042 /******/ return module.exports;
13043 /******/ }
13044 /******/
13045 /************************************************************************/
13046 /******/ /* webpack/runtime/compat get default export */
13047 /******/ (() => {
13048 /******/ // getDefaultExport function for compatibility with non-harmony modules
13049 /******/ __webpack_require__.n = (module) => {
13050 /******/ var getter = module && module.__esModule ?
13051 /******/ () => (module['default']) :
13052 /******/ () => (module);
13053 /******/ __webpack_require__.d(getter, { a: getter });
13054 /******/ return getter;
13055 /******/ };
13056 /******/ })();
13057 /******/
13058 /******/ /* webpack/runtime/define property getters */
13059 /******/ (() => {
13060 /******/ // define getter functions for harmony exports
13061 /******/ __webpack_require__.d = (exports, definition) => {
13062 /******/ for(var key in definition) {
13063 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
13064 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
13065 /******/ }
13066 /******/ }
13067 /******/ };
13068 /******/ })();
13069 /******/
13070 /******/ /* webpack/runtime/global */
13071 /******/ (() => {
13072 /******/ __webpack_require__.g = (function() {
13073 /******/ if (typeof globalThis === 'object') return globalThis;
13074 /******/ try {
13075 /******/ return this || new Function('return this')();
13076 /******/ } catch (e) {
13077 /******/ if (typeof window === 'object') return window;
13078 /******/ }
13079 /******/ })();
13080 /******/ })();
13081 /******/
13082 /******/ /* webpack/runtime/hasOwnProperty shorthand */
13083 /******/ (() => {
13084 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
13085 /******/ })();
13086 /******/
13087 /******/ /* webpack/runtime/make namespace object */
13088 /******/ (() => {
13089 /******/ // define __esModule on exports
13090 /******/ __webpack_require__.r = (exports) => {
13091 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
13092 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
13093 /******/ }
13094 /******/ Object.defineProperty(exports, '__esModule', { value: true });
13095 /******/ };
13096 /******/ })();
13097 /******/
13098 /******/ /* webpack/runtime/nonce */
13099 /******/ (() => {
13100 /******/ __webpack_require__.nc = undefined;
13101 /******/ })();
13102 /******/
13103 /************************************************************************/
13104 var __webpack_exports__ = {};
13105 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
13106 (() => {
13107 "use strict";
13108 /*!**************************************!*\
13109 !*** ./scripts/entries/gutenberg.ts ***!
13110 \**************************************/
13111 __webpack_require__.r(__webpack_exports__);
13112 /* harmony import */ var _gutenberg_FormBlock_registerFormBlock__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../gutenberg/FormBlock/registerFormBlock */ "./scripts/gutenberg/FormBlock/registerFormBlock.tsx");
13113 /* harmony import */ var _gutenberg_Sidebar_contentType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../gutenberg/Sidebar/contentType */ "./scripts/gutenberg/Sidebar/contentType.tsx");
13114 /* harmony import */ var _gutenberg_MeetingsBlock_registerMeetingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../gutenberg/MeetingsBlock/registerMeetingBlock */ "./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx");
13115 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
13116
13117
13118
13119
13120 (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]);
13121 })();
13122
13123 /******/ })()
13124 ;
13125 //# sourceMappingURL=gutenberg.js.map