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

13,128 lines 500.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /******/ (() => { // webpackBootstrap
2 /******/ var __webpack_modules__ = ({
3
4 /***/ "./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js":
5 /*!*******************************************************************************!*\
6 !*** ./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js ***!
7 \*******************************************************************************/
8 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9
10 "use strict";
11 __webpack_require__.r(__webpack_exports__);
12 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
14 /* harmony export */ });
15 /* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ "./node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize/dist/memoize.browser.esm.js");
16
17
18 var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
19
20 var index = (0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prop) {
21 return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
22 /* o */
23 && prop.charCodeAt(1) === 110
24 /* n */
25 && prop.charCodeAt(2) < 91;
26 }
27 /* Z+1 */
28 );
29
30 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (index);
31
32
33 /***/ }),
34
35 /***/ "./node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize/dist/memoize.browser.esm.js":
36 /*!*******************************************************************************************************!*\
37 !*** ./node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize/dist/memoize.browser.esm.js ***!
38 \*******************************************************************************************************/
39 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
40
41 "use strict";
42 __webpack_require__.r(__webpack_exports__);
43 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
44 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
45 /* harmony export */ });
46 function memoize(fn) {
47 var cache = {};
48 return function (arg) {
49 if (cache[arg] === undefined) cache[arg] = fn(arg);
50 return cache[arg];
51 };
52 }
53
54 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoize);
55
56
57 /***/ }),
58
59 /***/ "./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js":
60 /*!*******************************************************************!*\
61 !*** ./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js ***!
62 \*******************************************************************/
63 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
64
65 "use strict";
66 __webpack_require__.r(__webpack_exports__);
67 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
68 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
69 /* harmony export */ });
70 function memoize(fn) {
71 var cache = Object.create(null);
72 return function (arg) {
73 if (cache[arg] === undefined) cache[arg] = fn(arg);
74 return cache[arg];
75 };
76 }
77
78 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoize);
79
80
81 /***/ }),
82
83 /***/ "./node_modules/@emotion/unitless/dist/unitless.browser.esm.js":
84 /*!*********************************************************************!*\
85 !*** ./node_modules/@emotion/unitless/dist/unitless.browser.esm.js ***!
86 \*********************************************************************/
87 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
88
89 "use strict";
90 __webpack_require__.r(__webpack_exports__);
91 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
92 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
93 /* harmony export */ });
94 var unitlessKeys = {
95 animationIterationCount: 1,
96 borderImageOutset: 1,
97 borderImageSlice: 1,
98 borderImageWidth: 1,
99 boxFlex: 1,
100 boxFlexGroup: 1,
101 boxOrdinalGroup: 1,
102 columnCount: 1,
103 columns: 1,
104 flex: 1,
105 flexGrow: 1,
106 flexPositive: 1,
107 flexShrink: 1,
108 flexNegative: 1,
109 flexOrder: 1,
110 gridRow: 1,
111 gridRowEnd: 1,
112 gridRowSpan: 1,
113 gridRowStart: 1,
114 gridColumn: 1,
115 gridColumnEnd: 1,
116 gridColumnSpan: 1,
117 gridColumnStart: 1,
118 msGridRow: 1,
119 msGridRowSpan: 1,
120 msGridColumn: 1,
121 msGridColumnSpan: 1,
122 fontWeight: 1,
123 lineHeight: 1,
124 opacity: 1,
125 order: 1,
126 orphans: 1,
127 tabSize: 1,
128 widows: 1,
129 zIndex: 1,
130 zoom: 1,
131 WebkitLineClamp: 1,
132 // SVG-related properties
133 fillOpacity: 1,
134 floodOpacity: 1,
135 stopOpacity: 1,
136 strokeDasharray: 1,
137 strokeDashoffset: 1,
138 strokeMiterlimit: 1,
139 strokeOpacity: 1,
140 strokeWidth: 1
141 };
142
143 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (unitlessKeys);
144
145
146 /***/ }),
147
148 /***/ "./node_modules/@linaria/react/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js":
149 /*!***********************************************************************************************************!*\
150 !*** ./node_modules/@linaria/react/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js ***!
151 \***********************************************************************************************************/
152 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
153
154 "use strict";
155 __webpack_require__.r(__webpack_exports__);
156 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
157 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
158 /* harmony export */ });
159 /* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ "./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js");
160
161
162 var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
163
164 var isPropValid = /* #__PURE__ */(0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prop) {
165 return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
166 /* o */
167 && prop.charCodeAt(1) === 110
168 /* n */
169 && prop.charCodeAt(2) < 91;
170 }
171 /* Z+1 */
172 );
173
174 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isPropValid);
175
176
177 /***/ }),
178
179 /***/ "./scripts/constants/defaultFormOptions.ts":
180 /*!*************************************************!*\
181 !*** ./scripts/constants/defaultFormOptions.ts ***!
182 \*************************************************/
183 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
184
185 "use strict";
186 __webpack_require__.r(__webpack_exports__);
187 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
188 /* harmony export */ "DEFAULT_OPTIONS": () => (/* binding */ DEFAULT_OPTIONS),
189 /* harmony export */ "isDefaultForm": () => (/* binding */ isDefaultForm)
190 /* harmony export */ });
191 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
192 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
193
194 var REGISTRATION_FORM = 'REGISTRATION_FORM';
195 var CONTACT_US_FORM = 'CONTACT_US_FORM';
196 var NEWSLETTER_FORM = 'NEWSLETTER_FORM';
197 var SUPPORT_FORM = 'SUPPORT_FORM';
198 var EVENT_FORM = 'EVENT_FORM';
199 var DEFAULT_OPTIONS = {
200 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Templates', 'leadin'),
201 options: [{
202 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Registration Form', 'leadin'),
203 value: REGISTRATION_FORM
204 }, {
205 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Contact us Form', 'leadin'),
206 value: CONTACT_US_FORM
207 }, {
208 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Newsletter sign-up Form', 'leadin'),
209 value: NEWSLETTER_FORM
210 }, {
211 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Support Form', 'leadin'),
212 value: SUPPORT_FORM
213 }, {
214 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Event Registration Form', 'leadin'),
215 value: EVENT_FORM
216 }]
217 };
218 function isDefaultForm(value) {
219 return value === REGISTRATION_FORM || value === CONTACT_US_FORM || value === NEWSLETTER_FORM || value === SUPPORT_FORM || value === EVENT_FORM;
220 }
221
222 /***/ }),
223
224 /***/ "./scripts/constants/leadinConfig.ts":
225 /*!*******************************************!*\
226 !*** ./scripts/constants/leadinConfig.ts ***!
227 \*******************************************/
228 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
229
230 "use strict";
231 __webpack_require__.r(__webpack_exports__);
232 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
233 /* harmony export */ "accountName": () => (/* binding */ accountName),
234 /* harmony export */ "activationTime": () => (/* binding */ activationTime),
235 /* harmony export */ "adminUrl": () => (/* binding */ adminUrl),
236 /* harmony export */ "connectionStatus": () => (/* binding */ connectionStatus),
237 /* harmony export */ "contentEmbed": () => (/* binding */ contentEmbed),
238 /* harmony export */ "deviceId": () => (/* binding */ deviceId),
239 /* harmony export */ "didDisconnect": () => (/* binding */ didDisconnect),
240 /* harmony export */ "encryptionError": () => (/* binding */ encryptionError),
241 /* harmony export */ "env": () => (/* binding */ env),
242 /* harmony export */ "formsScript": () => (/* binding */ formsScript),
243 /* harmony export */ "formsScriptPayload": () => (/* binding */ formsScriptPayload),
244 /* harmony export */ "hublet": () => (/* binding */ hublet),
245 /* harmony export */ "hubspotBaseUrl": () => (/* binding */ hubspotBaseUrl),
246 /* harmony export */ "hubspotNonce": () => (/* binding */ hubspotNonce),
247 /* harmony export */ "iframeUrl": () => (/* binding */ iframeUrl),
248 /* harmony export */ "impactLink": () => (/* binding */ impactLink),
249 /* harmony export */ "lastAuthorizeTime": () => (/* binding */ lastAuthorizeTime),
250 /* harmony export */ "lastDeauthorizeTime": () => (/* binding */ lastDeauthorizeTime),
251 /* harmony export */ "lastDisconnectTime": () => (/* binding */ lastDisconnectTime),
252 /* harmony export */ "leadinPluginVersion": () => (/* binding */ leadinPluginVersion),
253 /* harmony export */ "leadinQueryParams": () => (/* binding */ leadinQueryParams),
254 /* harmony export */ "locale": () => (/* binding */ locale),
255 /* harmony export */ "loginUrl": () => (/* binding */ loginUrl),
256 /* harmony export */ "meetingsScript": () => (/* binding */ meetingsScript),
257 /* harmony export */ "phpVersion": () => (/* binding */ phpVersion),
258 /* harmony export */ "pluginPath": () => (/* binding */ pluginPath),
259 /* harmony export */ "plugins": () => (/* binding */ plugins),
260 /* harmony export */ "portalDomain": () => (/* binding */ portalDomain),
261 /* harmony export */ "portalEmail": () => (/* binding */ portalEmail),
262 /* harmony export */ "portalId": () => (/* binding */ portalId),
263 /* harmony export */ "redirectNonce": () => (/* binding */ redirectNonce),
264 /* harmony export */ "refreshToken": () => (/* binding */ refreshToken),
265 /* harmony export */ "refreshTokenError": () => (/* binding */ refreshTokenError),
266 /* harmony export */ "requiresContentEmbedScope": () => (/* binding */ requiresContentEmbedScope),
267 /* harmony export */ "restNonce": () => (/* binding */ restNonce),
268 /* harmony export */ "restUrl": () => (/* binding */ restUrl),
269 /* harmony export */ "reviewSkippedDate": () => (/* binding */ reviewSkippedDate),
270 /* harmony export */ "theme": () => (/* binding */ theme),
271 /* harmony export */ "trackConsent": () => (/* binding */ trackConsent),
272 /* harmony export */ "wpVersion": () => (/* binding */ wpVersion)
273 /* harmony export */ });
274 var _window$leadinConfig = window.leadinConfig,
275 accountName = _window$leadinConfig.accountName,
276 adminUrl = _window$leadinConfig.adminUrl,
277 activationTime = _window$leadinConfig.activationTime,
278 connectionStatus = _window$leadinConfig.connectionStatus,
279 deviceId = _window$leadinConfig.deviceId,
280 didDisconnect = _window$leadinConfig.didDisconnect,
281 env = _window$leadinConfig.env,
282 formsScript = _window$leadinConfig.formsScript,
283 meetingsScript = _window$leadinConfig.meetingsScript,
284 formsScriptPayload = _window$leadinConfig.formsScriptPayload,
285 hublet = _window$leadinConfig.hublet,
286 hubspotBaseUrl = _window$leadinConfig.hubspotBaseUrl,
287 hubspotNonce = _window$leadinConfig.hubspotNonce,
288 iframeUrl = _window$leadinConfig.iframeUrl,
289 impactLink = _window$leadinConfig.impactLink,
290 lastAuthorizeTime = _window$leadinConfig.lastAuthorizeTime,
291 lastDeauthorizeTime = _window$leadinConfig.lastDeauthorizeTime,
292 lastDisconnectTime = _window$leadinConfig.lastDisconnectTime,
293 leadinPluginVersion = _window$leadinConfig.leadinPluginVersion,
294 leadinQueryParams = _window$leadinConfig.leadinQueryParams,
295 locale = _window$leadinConfig.locale,
296 loginUrl = _window$leadinConfig.loginUrl,
297 phpVersion = _window$leadinConfig.phpVersion,
298 pluginPath = _window$leadinConfig.pluginPath,
299 plugins = _window$leadinConfig.plugins,
300 portalDomain = _window$leadinConfig.portalDomain,
301 portalEmail = _window$leadinConfig.portalEmail,
302 portalId = _window$leadinConfig.portalId,
303 redirectNonce = _window$leadinConfig.redirectNonce,
304 restNonce = _window$leadinConfig.restNonce,
305 restUrl = _window$leadinConfig.restUrl,
306 refreshToken = _window$leadinConfig.refreshToken,
307 reviewSkippedDate = _window$leadinConfig.reviewSkippedDate,
308 theme = _window$leadinConfig.theme,
309 trackConsent = _window$leadinConfig.trackConsent,
310 wpVersion = _window$leadinConfig.wpVersion,
311 contentEmbed = _window$leadinConfig.contentEmbed,
312 requiresContentEmbedScope = _window$leadinConfig.requiresContentEmbedScope,
313 refreshTokenError = _window$leadinConfig.refreshTokenError,
314 encryptionError = _window$leadinConfig.encryptionError;
315
316
317 /***/ }),
318
319 /***/ "./scripts/gutenberg/Common/CalendarIcon.tsx":
320 /*!***************************************************!*\
321 !*** ./scripts/gutenberg/Common/CalendarIcon.tsx ***!
322 \***************************************************/
323 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
324
325 "use strict";
326 __webpack_require__.r(__webpack_exports__);
327 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
328 /* harmony export */ "default": () => (/* binding */ CalendarIcon)
329 /* harmony export */ });
330 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
331
332 function CalendarIcon() {
333 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
334 width: "18",
335 height: "18",
336 viewBox: "0 0 18 18",
337 fill: "none",
338 xmlns: "http://www.w3.org/2000/svg",
339 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
340 clipPath: "url(#clip0_903_1965)",
341 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
342 fillRule: "evenodd",
343 clipRule: "evenodd",
344 d: "M13.519 2.48009H15.069H15.0697C16.2619 2.48719 17.2262 3.45597 17.2262 4.65016V12.7434C17.223 12.9953 17.1203 13.2226 16.9549 13.3886L12.6148 17.7287C12.4488 17.8941 12.2214 17.9968 11.9689 18H3.29508C2.09637 18 1.125 17.0286 1.125 15.8299V4.65016C1.125 3.45404 2.09314 2.48396 3.28862 2.48009H4.83867V0.930032C4.83867 0.416577 5.25525 0 5.7687 0C6.28216 0 6.69874 0.416577 6.69874 0.930032V2.48009H11.6589V0.930032C11.6589 0.416577 12.0755 0 12.5889 0C13.1024 0 13.519 0.416577 13.519 0.930032V2.48009ZM2.98506 15.8312C2.99863 15.9882 3.12909 16.1115 3.28862 16.1141H11.5814L11.6589 16.0366V13.634C11.6589 12.9494 12.2143 12.394 12.899 12.394H15.2951L15.3726 12.3165V7.4338H2.98506V15.8312ZM4.83868 8.68029H6.07873H6.07937C6.42684 8.68029 6.71037 8.95478 6.72458 9.30032V14.2863C6.72458 14.6428 6.43524 14.9322 6.07873 14.9322H4.83868C4.48217 14.9322 4.19283 14.6428 4.19283 14.2863V9.32615C4.19283 8.96964 4.48217 8.68029 4.83868 8.68029ZM8.53298 8.68029H9.82469H9.82534C10.1728 8.68029 10.4563 8.95478 10.4705 9.30032V14.2863C10.4705 14.6428 10.1812 14.9322 9.82469 14.9322H8.53298C8.17647 14.9322 7.88712 14.6428 7.88712 14.2863V9.32615C7.88712 8.96964 8.17647 8.68029 8.53298 8.68029ZM13.519 8.68029H12.2789C11.9366 8.68029 11.6589 8.95801 11.6589 9.30032V10.5404C11.6589 10.8827 11.9366 11.1604 12.2789 11.1604H13.519C13.8613 11.1604 14.139 10.8827 14.139 10.5404V9.30032C14.139 8.95801 13.8613 8.68029 13.519 8.68029Z",
345 fill: "#FF7A59"
346 })
347 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("defs", {
348 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("clipPath", {
349 id: "clip0_903_1965",
350 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("rect", {
351 width: "18",
352 height: "18",
353 fill: "white"
354 })
355 })
356 })]
357 });
358 }
359
360 /***/ }),
361
362 /***/ "./scripts/gutenberg/Common/SidebarSprocketIcon.tsx":
363 /*!**********************************************************!*\
364 !*** ./scripts/gutenberg/Common/SidebarSprocketIcon.tsx ***!
365 \**********************************************************/
366 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
367
368 "use strict";
369 __webpack_require__.r(__webpack_exports__);
370 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
371 /* harmony export */ "default": () => (/* binding */ SidebarSprocketIcon)
372 /* harmony export */ });
373 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
374
375 function SidebarSprocketIcon() {
376 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", {
377 width: "20px",
378 height: "20px",
379 version: "1.1",
380 viewBox: "0 0 40 42",
381 xmlns: "http://www.w3.org/2000/svg",
382 xmlnsXlink: "http://www.w3.org/1999/xlink",
383 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
384 d: "M28.8989809,30.0402293 C25.817707,30.0402293 23.319363,27.5423949 23.319363,24.461121 C23.319363,21.3798471 25.817707,18.881758 28.8989809,18.881758 C31.98,18.881758 34.4780892,21.3798471 34.4780892,24.461121 C34.4780892,27.5423949 31.98,30.0402293 28.8989809,30.0402293 M30.5692994,13.7199745 L30.5692994,8.75717196 C31.864586,8.14519744 32.7723567,6.8346242 32.7723567,5.31360508 L32.7723567,5.1989554 C32.7723567,3.10010191 31.0546497,1.38264968 28.956051,1.38264968 L28.8414013,1.38264968 C26.7425478,1.38264968 25.0248408,3.10010191 25.0248408,5.1989554 L25.0248408,5.31360508 C25.0248408,6.8346242 25.9328662,8.14519744 27.2281529,8.75717196 L27.2281529,13.7202293 C25.2994904,14.0180637 23.5371974,14.8137325 22.0829299,15.9844331 L8.45643312,5.38417836 C8.54611464,5.0392102 8.6090446,4.6835414 8.60955416,4.310293 C8.61261148,1.93271338 6.68777072,0.00303184713 4.31019108,-2.5477707e-05 C1.93286624,-0.00308280255 0.0029299363,1.92175796 0.000127388535,4.29933756 C-0.0029299363,6.67666244 1.92191083,8.60634396 4.29949044,8.60940128 C5.07426752,8.6104204 5.7912102,8.390293 6.42,8.03284076 L19.8243312,18.4603567 C18.6842038,20.181121 18.0166879,22.2422675 18.0166879,24.461121 C18.0166879,26.7841784 18.7504458,28.9327134 19.9907006,30.7001019 L15.9142675,34.776535 C15.5919745,34.6799745 15.2574522,34.6122038 14.9033121,34.6122038 C12.9499363,34.6122038 11.3659873,36.1961529 11.3659873,38.1497834 C11.3659873,40.103414 12.9499363,41.6871084 14.9033121,41.6871084 C16.8571974,41.6871084 18.4408917,40.103414 18.4408917,38.1497834 C18.4408917,37.7958981 18.3733758,37.461121 18.2765605,37.1390828 L22.3089172,33.1067261 C24.1392357,34.5041784 26.4184713,35.3431592 28.8989809,35.3431592 C34.9089172,35.3431592 39.7810191,30.4710573 39.7810191,24.461121 C39.7810191,19.0203567 35.7840764,14.5255796 30.5692994,13.7199745",
385 id: "Fill-1",
386 fillRule: "evenodd"
387 })
388 });
389 }
390
391 /***/ }),
392
393 /***/ "./scripts/gutenberg/Common/SprocketIcon.tsx":
394 /*!***************************************************!*\
395 !*** ./scripts/gutenberg/Common/SprocketIcon.tsx ***!
396 \***************************************************/
397 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
398
399 "use strict";
400 __webpack_require__.r(__webpack_exports__);
401 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
402 /* harmony export */ "default": () => (/* binding */ SprocketIcon)
403 /* harmony export */ });
404 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
405
406 function SprocketIcon() {
407 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
408 width: "40px",
409 height: "42px",
410 viewBox: "0 0 40 42",
411 version: "1.1",
412 xmlns: "http://www.w3.org/2000/svg",
413 xmlnsXlink: "http://www.w3.org/1999/xlink",
414 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("defs", {
415 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("polygon", {
416 id: "path-1",
417 points: "0.000123751494 0 39.7808917 0 39.7808917 41.6871084 0.000123751494 41.6871084"
418 })
419 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
420 id: "Page-1",
421 stroke: "none",
422 strokeWidth: "1",
423 fill: "none",
424 fillRule: "evenodd",
425 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("g", {
426 id: "HubSpot-Sprocket---Full-Color",
427 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("mask", {
428 id: "mask-2",
429 fill: "white",
430 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("use", {
431 xlinkHref: "#path-1"
432 })
433 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
434 id: "path-1"
435 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
436 d: "M28.8989809,30.0402293 C25.817707,30.0402293 23.319363,27.5423949 23.319363,24.461121 C23.319363,21.3798471 25.817707,18.881758 28.8989809,18.881758 C31.98,18.881758 34.4780892,21.3798471 34.4780892,24.461121 C34.4780892,27.5423949 31.98,30.0402293 28.8989809,30.0402293 M30.5692994,13.7199745 L30.5692994,8.75717196 C31.864586,8.14519744 32.7723567,6.8346242 32.7723567,5.31360508 L32.7723567,5.1989554 C32.7723567,3.10010191 31.0546497,1.38264968 28.956051,1.38264968 L28.8414013,1.38264968 C26.7425478,1.38264968 25.0248408,3.10010191 25.0248408,5.1989554 L25.0248408,5.31360508 C25.0248408,6.8346242 25.9328662,8.14519744 27.2281529,8.75717196 L27.2281529,13.7202293 C25.2994904,14.0180637 23.5371974,14.8137325 22.0829299,15.9844331 L8.45643312,5.38417836 C8.54611464,5.0392102 8.6090446,4.6835414 8.60955416,4.310293 C8.61261148,1.93271338 6.68777072,0.00303184713 4.31019108,-2.5477707e-05 C1.93286624,-0.00308280255 0.0029299363,1.92175796 0.000127388535,4.29933756 C-0.0029299363,6.67666244 1.92191083,8.60634396 4.29949044,8.60940128 C5.07426752,8.6104204 5.7912102,8.390293 6.42,8.03284076 L19.8243312,18.4603567 C18.6842038,20.181121 18.0166879,22.2422675 18.0166879,24.461121 C18.0166879,26.7841784 18.7504458,28.9327134 19.9907006,30.7001019 L15.9142675,34.776535 C15.5919745,34.6799745 15.2574522,34.6122038 14.9033121,34.6122038 C12.9499363,34.6122038 11.3659873,36.1961529 11.3659873,38.1497834 C11.3659873,40.103414 12.9499363,41.6871084 14.9033121,41.6871084 C16.8571974,41.6871084 18.4408917,40.103414 18.4408917,38.1497834 C18.4408917,37.7958981 18.3733758,37.461121 18.2765605,37.1390828 L22.3089172,33.1067261 C24.1392357,34.5041784 26.4184713,35.3431592 28.8989809,35.3431592 C34.9089172,35.3431592 39.7810191,30.4710573 39.7810191,24.461121 C39.7810191,19.0203567 35.7840764,14.5255796 30.5692994,13.7199745",
437 id: "Fill-1",
438 fill: "#F3785B",
439 fillRule: "nonzero",
440 mask: "url(#mask-2)"
441 })]
442 })
443 })]
444 });
445 }
446
447 /***/ }),
448
449 /***/ "./scripts/gutenberg/FormBlock/FormBlockSave.tsx":
450 /*!*******************************************************!*\
451 !*** ./scripts/gutenberg/FormBlock/FormBlockSave.tsx ***!
452 \*******************************************************/
453 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
454
455 "use strict";
456 __webpack_require__.r(__webpack_exports__);
457 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
458 /* harmony export */ "default": () => (/* binding */ FormSaveBlock)
459 /* harmony export */ });
460 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
461 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
462 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
463
464
465 function FormSaveBlock(_ref) {
466 var attributes = _ref.attributes;
467 var portalId = attributes.portalId,
468 formId = attributes.formId;
469
470 if (portalId && formId) {
471 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, {
472 className: "wp-block-leadin-hubspot-form-block",
473 children: "[hubspot portal=\"".concat(portalId, "\" id=\"").concat(formId, "\" type=\"form\"]")
474 });
475 }
476
477 return null;
478 }
479
480 /***/ }),
481
482 /***/ "./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx":
483 /*!**************************************************************!*\
484 !*** ./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx ***!
485 \**************************************************************/
486 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
487
488 "use strict";
489 __webpack_require__.r(__webpack_exports__);
490 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
491 /* harmony export */ "default": () => (/* binding */ FormGutenbergPreview)
492 /* harmony export */ });
493 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
494 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
495 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
496 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
497 /* harmony import */ var _UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UIImage */ "./scripts/gutenberg/UIComponents/UIImage.ts");
498
499
500
501
502 function FormGutenbergPreview() {
503 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
504 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__["default"], {
505 alt: "Create a new Hubspot Form",
506 src: "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath, "/public/assets/images/hubspot-form.png")
507 })
508 });
509 }
510
511 /***/ }),
512
513 /***/ "./scripts/gutenberg/FormBlock/registerFormBlock.tsx":
514 /*!***********************************************************!*\
515 !*** ./scripts/gutenberg/FormBlock/registerFormBlock.tsx ***!
516 \***********************************************************/
517 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
518
519 "use strict";
520 __webpack_require__.r(__webpack_exports__);
521 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
522 /* harmony export */ "default": () => (/* binding */ registerFormBlock)
523 /* harmony export */ });
524 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
525 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
526 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
527 /* harmony import */ var _Common_SprocketIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/SprocketIcon */ "./scripts/gutenberg/Common/SprocketIcon.tsx");
528 /* harmony import */ var _FormBlockSave__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FormBlockSave */ "./scripts/gutenberg/FormBlock/FormBlockSave.tsx");
529 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
530 /* harmony import */ var _FormGutenbergPreview__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FormGutenbergPreview */ "./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx");
531 /* harmony import */ var _shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../shared/Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
532 /* harmony import */ var _shared_Form_FormEdit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../shared/Form/FormEdit */ "./scripts/shared/Form/FormEdit.tsx");
533 /* harmony import */ var _shared_enums_connectionStatus__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../shared/enums/connectionStatus */ "./scripts/shared/enums/connectionStatus.ts");
534 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
535 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);
536 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
537 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
538
539 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
540
541 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
542
543
544
545
546
547
548
549
550
551
552
553
554 function registerFormBlock() {
555 var editComponent = function editComponent(props) {
556 if (props.attributes.preview) {
557 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormGutenbergPreview__WEBPACK_IMPORTED_MODULE_5__["default"], {});
558 } else if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__.connectionStatus === _shared_enums_connectionStatus__WEBPACK_IMPORTED_MODULE_8__["default"].Connected) {
559 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Form_FormEdit__WEBPACK_IMPORTED_MODULE_7__["default"], _objectSpread(_objectSpread({}, props), {}, {
560 origin: "gutenberg",
561 preview: true
562 }));
563 } else {
564 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_6__["default"], {
565 status: 401
566 });
567 }
568 }; // We do not support the full site editor: https://issues.hubspotcentral.com/browse/WP-1033
569
570
571 if (!_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ || (0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_10__.isFullSiteEditor)()) {
572 return null;
573 }
574
575 _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType('leadin/hubspot-form-block', {
576 apiVersion: 2,
577 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('HubSpot Form', 'leadin'),
578 description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Select and embed a HubSpot form', 'leadin'),
579 icon: _Common_SprocketIcon__WEBPACK_IMPORTED_MODULE_2__["default"],
580 category: 'leadin-blocks',
581 attributes: {
582 portalId: {
583 type: 'string',
584 "default": ''
585 },
586 formId: {
587 type: 'string'
588 },
589 formName: {
590 type: 'string'
591 },
592 preview: {
593 type: 'boolean',
594 "default": false
595 }
596 },
597 example: {
598 attributes: {
599 preview: true
600 }
601 },
602 edit: editComponent,
603 save: function save(props) {
604 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormBlockSave__WEBPACK_IMPORTED_MODULE_3__["default"], _objectSpread({}, props));
605 }
606 });
607 }
608
609 /***/ }),
610
611 /***/ "./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx":
612 /*!*********************************************************************!*\
613 !*** ./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx ***!
614 \*********************************************************************/
615 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
616
617 "use strict";
618 __webpack_require__.r(__webpack_exports__);
619 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
620 /* harmony export */ "default": () => (/* binding */ MeetingGutenbergPreview)
621 /* harmony export */ });
622 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
623 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
624 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
625 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
626 /* harmony import */ var _UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UIImage */ "./scripts/gutenberg/UIComponents/UIImage.ts");
627
628
629
630
631 function MeetingGutenbergPreview() {
632 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
633 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__["default"], {
634 alt: "Create a new Hubspot Meeting",
635 width: "100%",
636 src: "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath, "/public/assets/images/hubspot-meetings.png")
637 })
638 });
639 }
640
641 /***/ }),
642
643 /***/ "./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx":
644 /*!**************************************************************!*\
645 !*** ./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx ***!
646 \**************************************************************/
647 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
648
649 "use strict";
650 __webpack_require__.r(__webpack_exports__);
651 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
652 /* harmony export */ "default": () => (/* binding */ MeetingSaveBlock)
653 /* harmony export */ });
654 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
655 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
656 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
657
658
659 function MeetingSaveBlock(_ref) {
660 var attributes = _ref.attributes;
661 var url = attributes.url;
662
663 if (url) {
664 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, {
665 className: "wp-block-leadin-hubspot-meeting-block",
666 children: "[hubspot url=\"".concat(url, "\" type=\"meeting\"]")
667 });
668 }
669
670 return null;
671 }
672
673 /***/ }),
674
675 /***/ "./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx":
676 /*!******************************************************************!*\
677 !*** ./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx ***!
678 \******************************************************************/
679 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
680
681 "use strict";
682 __webpack_require__.r(__webpack_exports__);
683 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
684 /* harmony export */ "default": () => (/* binding */ registerMeetingBlock)
685 /* harmony export */ });
686 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
687 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
688 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
689 /* harmony import */ var _Common_CalendarIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/CalendarIcon */ "./scripts/gutenberg/Common/CalendarIcon.tsx");
690 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
691 /* harmony import */ var _MeetingGutenbergPreview__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MeetingGutenbergPreview */ "./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx");
692 /* harmony import */ var _MeetingSaveBlock__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./MeetingSaveBlock */ "./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx");
693 /* harmony import */ var _shared_Meeting_MeetingEdit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../shared/Meeting/MeetingEdit */ "./scripts/shared/Meeting/MeetingEdit.tsx");
694 /* harmony import */ var _shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../shared/Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
695 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
696 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__);
697 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
698 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; }
699
700 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; }
701
702 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; }
703
704
705
706
707
708
709
710
711
712
713
714 var ConnectionStatus = {
715 Connected: 'Connected',
716 NotConnected: 'NotConnected'
717 };
718 function registerMeetingBlock() {
719 var editComponent = function editComponent(props) {
720 if (props.attributes.preview) {
721 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingGutenbergPreview__WEBPACK_IMPORTED_MODULE_4__["default"], {});
722 } else if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.connectionStatus === ConnectionStatus.Connected) {
723 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Meeting_MeetingEdit__WEBPACK_IMPORTED_MODULE_6__["default"], _objectSpread(_objectSpread({}, props), {}, {
724 preview: true,
725 origin: "gutenberg"
726 }));
727 } else {
728 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__["default"], {
729 status: 401
730 });
731 }
732 }; // We do not support the full site editor: https://issues.hubspotcentral.com/browse/WP-1033
733
734
735 if (!_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ || (0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_9__.isFullSiteEditor)()) {
736 return null;
737 }
738
739 _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType('leadin/hubspot-meeting-block', {
740 apiVersion: 2,
741 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Hubspot Meetings Scheduler', 'leadin'),
742 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'),
743 icon: _Common_CalendarIcon__WEBPACK_IMPORTED_MODULE_2__["default"],
744 category: 'leadin-blocks',
745 attributes: {
746 url: {
747 type: 'string',
748 "default": ''
749 },
750 preview: {
751 type: 'boolean',
752 "default": false
753 }
754 },
755 example: {
756 attributes: {
757 preview: true
758 }
759 },
760 edit: editComponent,
761 save: function save(props) {
762 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingSaveBlock__WEBPACK_IMPORTED_MODULE_5__["default"], _objectSpread({}, props));
763 }
764 });
765 }
766
767 /***/ }),
768
769 /***/ "./scripts/gutenberg/Sidebar/contentType.tsx":
770 /*!***************************************************!*\
771 !*** ./scripts/gutenberg/Sidebar/contentType.tsx ***!
772 \***************************************************/
773 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
774
775 "use strict";
776 __webpack_require__.r(__webpack_exports__);
777 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
778 /* harmony export */ "registerHubspotSidebar": () => (/* binding */ registerHubspotSidebar)
779 /* harmony export */ });
780 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
781 /* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/plugins */ "@wordpress/plugins");
782 /* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__);
783 /* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/edit-post */ "@wordpress/edit-post");
784 /* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__);
785 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
786 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
787 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
788 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);
789 /* harmony import */ var _UIComponents_UISidebarSelectControl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../UIComponents/UISidebarSelectControl */ "./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx");
790 /* harmony import */ var _Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Common/SidebarSprocketIcon */ "./scripts/gutenberg/Common/SidebarSprocketIcon.tsx");
791 /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js");
792 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
793 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__);
794 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
795 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
796 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
797 var _templateObject;
798
799 function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
800
801
802
803
804
805
806
807
808
809
810
811
812
813 function registerHubspotSidebar() {
814 var ContentTypeLabelStyle = styled_components__WEBPACK_IMPORTED_MODULE_11__["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n white-space: normal;\n text-transform: none;\n "])));
815
816 var ContentTypeLabel = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ContentTypeLabelStyle, {
817 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Select the content type HubSpot Analytics uses to track this page', 'leadin')
818 });
819
820 var LeadinPluginSidebar = function LeadinPluginSidebar(_ref) {
821 var postType = _ref.postType;
822 return postType ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__.PluginSidebar, {
823 name: "leadin",
824 title: "HubSpot",
825 icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Icon, {
826 className: "hs-plugin-sidebar-sprocket",
827 icon: (0,_Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_6__["default"])()
828 }),
829 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, {
830 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('HubSpot Analytics', 'leadin'),
831 initialOpen: true,
832 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_8__.BackgroudAppContext.Provider, {
833 value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_9__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_10__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_9__.refreshToken),
834 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISidebarSelectControl__WEBPACK_IMPORTED_MODULE_5__["default"], {
835 metaKey: "content-type",
836 className: "select-content-type",
837 label: ContentTypeLabel,
838 options: [{
839 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Detect Automatically', 'leadin'),
840 value: ''
841 }, {
842 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Blog Post', 'leadin'),
843 value: 'blog-post'
844 }, {
845 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Knowledge Article', 'leadin'),
846 value: 'knowledge-article'
847 }, {
848 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Landing Page', 'leadin'),
849 value: 'landing-page'
850 }, {
851 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Listing Page', 'leadin'),
852 value: 'listing-page'
853 }, {
854 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Standard Page', 'leadin'),
855 value: 'standard-page'
856 }]
857 })
858 })
859 })
860 }) : null;
861 };
862
863 var LeadinPluginSidebarWrapper = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.withSelect)(function (select) {
864 var data = select('core/editor');
865 return {
866 postType: data && data.getCurrentPostType() && data.getEditedPostAttribute('meta')
867 };
868 })(LeadinPluginSidebar);
869
870 if (_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__) {
871 _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__.registerPlugin('leadin', {
872 render: LeadinPluginSidebarWrapper,
873 icon: _Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_6__["default"]
874 });
875 }
876 }
877
878 /***/ }),
879
880 /***/ "./scripts/gutenberg/UIComponents/UIImage.ts":
881 /*!***************************************************!*\
882 !*** ./scripts/gutenberg/UIComponents/UIImage.ts ***!
883 \***************************************************/
884 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
885
886 "use strict";
887 __webpack_require__.r(__webpack_exports__);
888 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
889 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
890 /* harmony export */ });
891 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
892
893
894 var _exp = /*#__PURE__*/function _exp() {
895 return function (props) {
896 return props.height ? props.height : 'auto';
897 };
898 };
899
900 var _exp2 = /*#__PURE__*/function _exp2() {
901 return function (props) {
902 return props.width ? props.width : 'auto';
903 };
904 };
905
906 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('img')({
907 name: "UIImage0",
908 "class": "ump7xqy",
909 propsAsIs: false,
910 vars: {
911 "ump7xqy-0": [_exp()],
912 "ump7xqy-1": [_exp2()]
913 }
914 }));
915
916 __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");
917
918 /***/ }),
919
920 /***/ "./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx":
921 /*!*******************************************************************!*\
922 !*** ./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx ***!
923 \*******************************************************************/
924 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
925
926 "use strict";
927 __webpack_require__.r(__webpack_exports__);
928 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
929 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
930 /* harmony export */ });
931 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
932 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
933 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
934 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
935 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
936 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
937 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; }
938
939 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; }
940
941 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; }
942
943
944
945
946
947
948
949 var UISidebarSelectControl = function UISidebarSelectControl(props) {
950 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__.useBackgroundAppContext)();
951 var monitorSidebarMetaChange = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__.usePostBackgroundMessage)();
952 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, _objectSpread({
953 value: props.metaValue,
954 onChange: function onChange(content) {
955 if (props.setMetaValue) {
956 props.setMetaValue(content);
957 }
958
959 isBackgroundAppReady && monitorSidebarMetaChange({
960 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages.TrackSidebarMetaChange,
961 payload: {
962 metaKey: props.metaKey
963 }
964 });
965 }
966 }, props));
967 };
968
969 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_2__["default"])(UISidebarSelectControl));
970
971 /***/ }),
972
973 /***/ "./scripts/iframe/integratedMessages/core/CoreMessages.ts":
974 /*!****************************************************************!*\
975 !*** ./scripts/iframe/integratedMessages/core/CoreMessages.ts ***!
976 \****************************************************************/
977 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
978
979 "use strict";
980 __webpack_require__.r(__webpack_exports__);
981 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
982 /* harmony export */ "CoreMessages": () => (/* binding */ CoreMessages)
983 /* harmony export */ });
984 var CoreMessages = {
985 HandshakeReceive: 'INTEGRATED_APP_EMBEDDER_HANDSHAKE_RECEIVED',
986 SendRefreshToken: 'INTEGRATED_APP_EMBEDDER_SEND_REFRESH_TOKEN',
987 ReloadParentFrame: 'INTEGRATED_APP_EMBEDDER_RELOAD_PARENT_FRAME',
988 RedirectParentFrame: 'INTEGRATED_APP_EMBEDDER_REDIRECT_PARENT_FRAME',
989 SendLocale: 'INTEGRATED_APP_EMBEDDER_SEND_LOCALE',
990 SendDeviceId: 'INTEGRATED_APP_EMBEDDER_SEND_DEVICE_ID'
991 };
992
993 /***/ }),
994
995 /***/ "./scripts/iframe/integratedMessages/forms/FormsMessages.ts":
996 /*!******************************************************************!*\
997 !*** ./scripts/iframe/integratedMessages/forms/FormsMessages.ts ***!
998 \******************************************************************/
999 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1000
1001 "use strict";
1002 __webpack_require__.r(__webpack_exports__);
1003 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1004 /* harmony export */ "FormMessages": () => (/* binding */ FormMessages)
1005 /* harmony export */ });
1006 var FormMessages = {
1007 CreateFormAppNavigation: 'CREATE_FORM_APP_NAVIGATION'
1008 };
1009
1010 /***/ }),
1011
1012 /***/ "./scripts/iframe/integratedMessages/index.ts":
1013 /*!****************************************************!*\
1014 !*** ./scripts/iframe/integratedMessages/index.ts ***!
1015 \****************************************************/
1016 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1017
1018 "use strict";
1019 __webpack_require__.r(__webpack_exports__);
1020 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1021 /* harmony export */ "CoreMessages": () => (/* reexport safe */ _core_CoreMessages__WEBPACK_IMPORTED_MODULE_0__.CoreMessages),
1022 /* harmony export */ "FormMessages": () => (/* reexport safe */ _forms_FormsMessages__WEBPACK_IMPORTED_MODULE_1__.FormMessages),
1023 /* harmony export */ "LiveChatMessages": () => (/* reexport safe */ _livechat_LiveChatMessages__WEBPACK_IMPORTED_MODULE_2__.LiveChatMessages),
1024 /* harmony export */ "PluginMessages": () => (/* reexport safe */ _plugin_PluginMessages__WEBPACK_IMPORTED_MODULE_3__.PluginMessages),
1025 /* harmony export */ "ProxyMessages": () => (/* reexport safe */ _proxy_ProxyMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages)
1026 /* harmony export */ });
1027 /* harmony import */ var _core_CoreMessages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/CoreMessages */ "./scripts/iframe/integratedMessages/core/CoreMessages.ts");
1028 /* harmony import */ var _forms_FormsMessages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./forms/FormsMessages */ "./scripts/iframe/integratedMessages/forms/FormsMessages.ts");
1029 /* harmony import */ var _livechat_LiveChatMessages__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./livechat/LiveChatMessages */ "./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts");
1030 /* harmony import */ var _plugin_PluginMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./plugin/PluginMessages */ "./scripts/iframe/integratedMessages/plugin/PluginMessages.ts");
1031 /* harmony import */ var _proxy_ProxyMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./proxy/ProxyMessages */ "./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts");
1032
1033
1034
1035
1036
1037
1038 /***/ }),
1039
1040 /***/ "./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts":
1041 /*!************************************************************************!*\
1042 !*** ./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts ***!
1043 \************************************************************************/
1044 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1045
1046 "use strict";
1047 __webpack_require__.r(__webpack_exports__);
1048 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1049 /* harmony export */ "LiveChatMessages": () => (/* binding */ LiveChatMessages)
1050 /* harmony export */ });
1051 var LiveChatMessages = {
1052 CreateLiveChatAppNavigation: 'CREATE_LIVE_CHAT_APP_NAVIGATION'
1053 };
1054
1055 /***/ }),
1056
1057 /***/ "./scripts/iframe/integratedMessages/plugin/PluginMessages.ts":
1058 /*!********************************************************************!*\
1059 !*** ./scripts/iframe/integratedMessages/plugin/PluginMessages.ts ***!
1060 \********************************************************************/
1061 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1062
1063 "use strict";
1064 __webpack_require__.r(__webpack_exports__);
1065 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1066 /* harmony export */ "PluginMessages": () => (/* binding */ PluginMessages)
1067 /* harmony export */ });
1068 var PluginMessages = {
1069 PluginSettingsNavigation: 'PLUGIN_SETTINGS_NAVIGATION',
1070 PluginLeadinConfig: 'PLUGIN_LEADIN_CONFIG',
1071 TrackConsent: 'INTEGRATED_APP_EMBEDDER_TRACK_CONSENT',
1072 InternalTrackingFetchRequest: 'INTEGRATED_TRACKING_FETCH_REQUEST',
1073 InternalTrackingFetchResponse: 'INTEGRATED_TRACKING_FETCH_RESPONSE',
1074 InternalTrackingFetchError: 'INTEGRATED_TRACKING_FETCH_ERROR',
1075 InternalTrackingChangeRequest: 'INTEGRATED_TRACKING_CHANGE_REQUEST',
1076 InternalTrackingChangeError: 'INTEGRATED_TRACKING_CHANGE_ERROR',
1077 BusinessUnitFetchRequest: 'BUSINESS_UNIT_FETCH_REQUEST',
1078 BusinessUnitFetchResponse: 'BUSINESS_UNIT_FETCH_FETCH_RESPONSE',
1079 BusinessUnitFetchError: 'BUSINESS_UNIT_FETCH_FETCH_ERROR',
1080 BusinessUnitChangeRequest: 'BUSINESS_UNIT_CHANGE_REQUEST',
1081 BusinessUnitChangeError: 'BUSINESS_UNIT_CHANGE_ERROR',
1082 SkipReviewRequest: 'SKIP_REVIEW_REQUEST',
1083 SkipReviewResponse: 'SKIP_REVIEW_RESPONSE',
1084 SkipReviewError: 'SKIP_REVIEW_ERROR',
1085 RemoveParentQueryParam: 'REMOVE_PARENT_QUERY_PARAM',
1086 ContentEmbedInstallRequest: 'CONTENT_EMBED_INSTALL_REQUEST',
1087 ContentEmbedInstallResponse: 'CONTENT_EMBED_INSTALL_RESPONSE',
1088 ContentEmbedInstallError: 'CONTENT_EMBED_INSTALL_ERROR',
1089 ContentEmbedActivationRequest: 'CONTENT_EMBED_ACTIVATION_REQUEST',
1090 ContentEmbedActivationResponse: 'CONTENT_EMBED_ACTIVATION_RESPONSE',
1091 ContentEmbedActivationError: 'CONTENT_EMBED_ACTIVATION_ERROR'
1092 };
1093
1094 /***/ }),
1095
1096 /***/ "./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts":
1097 /*!******************************************************************!*\
1098 !*** ./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts ***!
1099 \******************************************************************/
1100 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1101
1102 "use strict";
1103 __webpack_require__.r(__webpack_exports__);
1104 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1105 /* harmony export */ "ProxyMessages": () => (/* binding */ ProxyMessages)
1106 /* harmony export */ });
1107 var ProxyMessages = {
1108 FetchForms: 'FETCH_FORMS',
1109 FetchForm: 'FETCH_FORM',
1110 CreateFormFromTemplate: 'CREATE_FORM_FROM_TEMPLATE',
1111 FetchAuth: 'FETCH_AUTH',
1112 FetchMeetingsAndUsers: 'FETCH_MEETINGS_AND_USERS',
1113 FetchContactsCreateSinceActivation: 'FETCH_CONTACTS_CREATED_SINCE_ACTIVATION',
1114 FetchOrCreateMeetingUser: 'FETCH_OR_CREATE_MEETING_USER',
1115 ConnectMeetingsCalendar: 'CONNECT_MEETINGS_CALENDAR',
1116 TrackFormPreviewRender: 'TRACK_FORM_PREVIEW_RENDER',
1117 TrackFormCreatedFromTemplate: 'TRACK_FORM_CREATED_FROM_TEMPLATE',
1118 TrackFormCreationFailed: 'TRACK_FORM_CREATION_FAILED',
1119 TrackMeetingPreviewRender: 'TRACK_MEETING_PREVIEW_RENDER',
1120 TrackSidebarMetaChange: 'TRACK_SIDEBAR_META_CHANGE',
1121 TrackReviewBannerRender: 'TRACK_REVIEW_BANNER_RENDER',
1122 TrackReviewBannerInteraction: 'TRACK_REVIEW_BANNER_INTERACTION',
1123 TrackReviewBannerDismissed: 'TRACK_REVIEW_BANNER_DISMISSED',
1124 TrackPluginDeactivation: 'TRACK_PLUGIN_DEACTIVATION'
1125 };
1126
1127 /***/ }),
1128
1129 /***/ "./scripts/iframe/useBackgroundApp.ts":
1130 /*!********************************************!*\
1131 !*** ./scripts/iframe/useBackgroundApp.ts ***!
1132 \********************************************/
1133 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1134
1135 "use strict";
1136 __webpack_require__.r(__webpack_exports__);
1137 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1138 /* harmony export */ "BackgroudAppContext": () => (/* binding */ BackgroudAppContext),
1139 /* harmony export */ "useBackgroundAppContext": () => (/* binding */ useBackgroundAppContext),
1140 /* harmony export */ "usePostAsyncBackgroundMessage": () => (/* binding */ usePostAsyncBackgroundMessage),
1141 /* harmony export */ "usePostBackgroundMessage": () => (/* binding */ usePostBackgroundMessage)
1142 /* harmony export */ });
1143 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1144 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1145
1146 var BackgroudAppContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
1147 function useBackgroundAppContext() {
1148 return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(BackgroudAppContext);
1149 }
1150 function usePostBackgroundMessage() {
1151 var app = useBackgroundAppContext();
1152 return function (message) {
1153 app.postMessage(message);
1154 };
1155 }
1156 function usePostAsyncBackgroundMessage() {
1157 var app = useBackgroundAppContext();
1158 return function (message) {
1159 return app.postAsyncMessage(message);
1160 };
1161 }
1162
1163 /***/ }),
1164
1165 /***/ "./scripts/lib/Raven.ts":
1166 /*!******************************!*\
1167 !*** ./scripts/lib/Raven.ts ***!
1168 \******************************/
1169 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1170
1171 "use strict";
1172 __webpack_require__.r(__webpack_exports__);
1173 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1174 /* harmony export */ "configureRaven": () => (/* binding */ configureRaven),
1175 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1176 /* harmony export */ });
1177 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! raven-js */ "./node_modules/raven-js/src/singleton.js");
1178 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(raven_js__WEBPACK_IMPORTED_MODULE_0__);
1179 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1180
1181
1182 function configureRaven() {
1183 if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.hubspotBaseUrl.indexOf('app.hubspot.com') === -1) {
1184 return;
1185 }
1186
1187 raven_js__WEBPACK_IMPORTED_MODULE_0___default().config('https://e9b8f382cdd130c0d415cd977d2be56f@exceptions.hubspot.com/1', {
1188 instrument: {
1189 tryCatch: false
1190 },
1191 release: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.leadinPluginVersion
1192 }).install();
1193 raven_js__WEBPACK_IMPORTED_MODULE_0___default().setTagsContext({
1194 v: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.leadinPluginVersion,
1195 php: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.phpVersion,
1196 wordpress: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.wpVersion
1197 });
1198 raven_js__WEBPACK_IMPORTED_MODULE_0___default().setExtraContext({
1199 hub: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.portalId,
1200 plugins: Object.keys(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.plugins).map(function (name) {
1201 return "".concat(name, "#").concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.plugins[name]);
1202 }).join(',')
1203 });
1204 }
1205 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((raven_js__WEBPACK_IMPORTED_MODULE_0___default()));
1206
1207 /***/ }),
1208
1209 /***/ "./scripts/shared/Common/AsyncSelect.tsx":
1210 /*!***********************************************!*\
1211 !*** ./scripts/shared/Common/AsyncSelect.tsx ***!
1212 \***********************************************/
1213 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1214
1215 "use strict";
1216 __webpack_require__.r(__webpack_exports__);
1217 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1218 /* harmony export */ "default": () => (/* binding */ AsyncSelect)
1219 /* harmony export */ });
1220 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1221 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1222 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1223 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
1224 /* harmony import */ var _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/colors */ "./scripts/shared/UIComponents/colors.ts");
1225 /* harmony import */ var _UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpinner */ "./scripts/shared/UIComponents/UISpinner.tsx");
1226 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../enums/loadState */ "./scripts/shared/enums/loadState.ts");
1227 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1228
1229 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."); }
1230
1231 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); }
1232
1233 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; }
1234
1235 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; }
1236
1237 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1238
1239
1240
1241
1242
1243
1244
1245 var Container = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1246 name: "Container",
1247 "class": "c1wxx7eu",
1248 propsAsIs: false
1249 });
1250
1251 var _exp2 = /*#__PURE__*/function _exp2() {
1252 return function (props) {
1253 return props.focused ? '0' : '1px';
1254 };
1255 };
1256
1257 var _exp3 = /*#__PURE__*/function _exp3() {
1258 return function (props) {
1259 return props.focused ? "0 0 0 2px ".concat(_UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM) : 'none';
1260 };
1261 };
1262
1263 var ControlContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1264 name: "ControlContainer",
1265 "class": "c1rgwbep",
1266 propsAsIs: false,
1267 vars: {
1268 "c1rgwbep-0": [_exp2()],
1269 "c1rgwbep-1": [_exp3()]
1270 }
1271 });
1272 var ValueContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1273 name: "ValueContainer",
1274 "class": "v1mdmbaj",
1275 propsAsIs: false
1276 });
1277 var Placeholder = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1278 name: "Placeholder",
1279 "class": "p1gwkvxy",
1280 propsAsIs: false
1281 });
1282 var SingleValue = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1283 name: "SingleValue",
1284 "class": "s1bwlafs",
1285 propsAsIs: false
1286 });
1287 var IndicatorContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1288 name: "IndicatorContainer",
1289 "class": "i196z9y5",
1290 propsAsIs: false
1291 });
1292 var DropdownIndicator = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1293 name: "DropdownIndicator",
1294 "class": "d1dfo5ow",
1295 propsAsIs: false
1296 });
1297 var InputContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1298 name: "InputContainer",
1299 "class": "if3lze",
1300 propsAsIs: false
1301 });
1302 var Input = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('input')({
1303 name: "Input",
1304 "class": "i9kxf50",
1305 propsAsIs: false
1306 });
1307 var InputShadow = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1308 name: "InputShadow",
1309 "class": "igjr3uc",
1310 propsAsIs: false
1311 });
1312 var MenuContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1313 name: "MenuContainer",
1314 "class": "mhb9if7",
1315 propsAsIs: false
1316 });
1317 var MenuList = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1318 name: "MenuList",
1319 "class": "mxaof7s",
1320 propsAsIs: false
1321 });
1322 var MenuGroup = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1323 name: "MenuGroup",
1324 "class": "mw50s5v",
1325 propsAsIs: false
1326 });
1327 var MenuGroupHeader = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1328 name: "MenuGroupHeader",
1329 "class": "m11rzvjw",
1330 propsAsIs: false
1331 });
1332
1333 var _exp5 = /*#__PURE__*/function _exp5() {
1334 return function (props) {
1335 return props.selected ? _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM : 'transparent';
1336 };
1337 };
1338
1339 var _exp6 = /*#__PURE__*/function _exp6() {
1340 return function (props) {
1341 return props.selected ? '#fff' : 'inherit';
1342 };
1343 };
1344
1345 var _exp7 = /*#__PURE__*/function _exp7() {
1346 return function (props) {
1347 return props.selected ? _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM : _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_LIGHT;
1348 };
1349 };
1350
1351 var MenuItem = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1352 name: "MenuItem",
1353 "class": "m1jcdsjv",
1354 propsAsIs: false,
1355 vars: {
1356 "m1jcdsjv-0": [_exp5()],
1357 "m1jcdsjv-1": [_exp6()],
1358 "m1jcdsjv-2": [_exp7()]
1359 }
1360 });
1361 function AsyncSelect(_ref) {
1362 var placeholder = _ref.placeholder,
1363 value = _ref.value,
1364 loadOptions = _ref.loadOptions,
1365 onChange = _ref.onChange,
1366 defaultOptions = _ref.defaultOptions;
1367 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1368 var inputShadowEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1369
1370 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
1371 _useState2 = _slicedToArray(_useState, 2),
1372 isFocused = _useState2[0],
1373 setFocus = _useState2[1];
1374
1375 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].NotLoaded),
1376 _useState4 = _slicedToArray(_useState3, 2),
1377 loadState = _useState4[0],
1378 setLoadState = _useState4[1];
1379
1380 var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
1381 _useState6 = _slicedToArray(_useState5, 2),
1382 localValue = _useState6[0],
1383 setLocalValue = _useState6[1];
1384
1385 var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultOptions),
1386 _useState8 = _slicedToArray(_useState7, 2),
1387 options = _useState8[0],
1388 setOptions = _useState8[1];
1389
1390 var inputSize = "".concat(inputShadowEl.current ? inputShadowEl.current.clientWidth + 10 : 2, "px");
1391 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1392 if (loadOptions && loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].NotLoaded) {
1393 loadOptions('', function (result) {
1394 setOptions(result);
1395 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Idle);
1396 });
1397 }
1398 }, [loadOptions, loadState]);
1399
1400 var renderItems = function renderItems() {
1401 var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
1402 var parentKey = arguments.length > 1 ? arguments[1] : undefined;
1403 return items.map(function (item, index) {
1404 if (item.options) {
1405 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(MenuGroup, {
1406 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuGroupHeader, {
1407 id: "".concat(index, "-heading"),
1408 children: item.label
1409 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
1410 children: renderItems(item.options, index)
1411 })]
1412 }, "async-select-item-".concat(index));
1413 } else {
1414 var key = "async-select-item-".concat(parentKey !== undefined ? "".concat(parentKey, "-").concat(index) : index);
1415 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuItem, {
1416 id: key,
1417 selected: value && item.value === value.value,
1418 onClick: function onClick() {
1419 onChange(item);
1420 setFocus(false);
1421 },
1422 children: item.label
1423 }, key);
1424 }
1425 });
1426 };
1427
1428 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(Container, {
1429 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ControlContainer, {
1430 id: "leadin-async-selector",
1431 focused: isFocused,
1432 onClick: function onClick() {
1433 if (isFocused) {
1434 if (inputEl.current) {
1435 inputEl.current.blur();
1436 }
1437
1438 setFocus(false);
1439 setLocalValue('');
1440 } else {
1441 if (inputEl.current) {
1442 inputEl.current.focus();
1443 }
1444
1445 setFocus(true);
1446 }
1447 },
1448 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ValueContainer, {
1449 children: [localValue === '' && (!value ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Placeholder, {
1450 children: placeholder
1451 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SingleValue, {
1452 children: value.label
1453 })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(InputContainer, {
1454 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Input, {
1455 ref: inputEl,
1456 onFocus: function onFocus() {
1457 setFocus(true);
1458 },
1459 onChange: function onChange(e) {
1460 setLocalValue(e.target.value);
1461 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Loading);
1462 loadOptions && loadOptions(e.target.value, function (result) {
1463 setOptions(result);
1464 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Idle);
1465 });
1466 },
1467 value: localValue,
1468 width: inputSize,
1469 id: "asycn-select-input"
1470 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(InputShadow, {
1471 ref: inputShadowEl,
1472 children: localValue
1473 })]
1474 })]
1475 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(IndicatorContainer, {
1476 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, {})]
1477 })]
1478 }), isFocused && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuContainer, {
1479 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuList, {
1480 children: renderItems(options)
1481 })
1482 })]
1483 });
1484 }
1485
1486 __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");
1487
1488 /***/ }),
1489
1490 /***/ "./scripts/shared/Common/ErrorHandler.tsx":
1491 /*!************************************************!*\
1492 !*** ./scripts/shared/Common/ErrorHandler.tsx ***!
1493 \************************************************/
1494 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1495
1496 "use strict";
1497 __webpack_require__.r(__webpack_exports__);
1498 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1499 /* harmony export */ "default": () => (/* binding */ ErrorHandler)
1500 /* harmony export */ });
1501 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1502 /* harmony import */ var _UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../UIComponents/UIButton */ "./scripts/shared/UIComponents/UIButton.ts");
1503 /* harmony import */ var _UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIContainer */ "./scripts/shared/UIComponents/UIContainer.ts");
1504 /* harmony import */ var _HubspotWrapper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1505 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1506 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1507 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);
1508
1509
1510
1511
1512
1513
1514
1515
1516 function redirectToPlugin() {
1517 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);
1518 }
1519
1520 function ErrorHandler(_ref) {
1521 var status = _ref.status,
1522 resetErrorState = _ref.resetErrorState,
1523 _ref$errorInfo = _ref.errorInfo,
1524 errorInfo = _ref$errorInfo === void 0 ? {
1525 header: '',
1526 message: '',
1527 action: ''
1528 } : _ref$errorInfo;
1529 var isUnauthorized = status === 401 || status === 403;
1530 var errorHeader = isUnauthorized ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)("Your plugin isn't authorized", 'leadin') : errorInfo.header;
1531 var errorMessage = isUnauthorized ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Reauthorize your plugin to access your free HubSpot tools', 'leadin') : errorInfo.message;
1532 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HubspotWrapper__WEBPACK_IMPORTED_MODULE_3__["default"], {
1533 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__.pluginPath,
1534 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_2__["default"], {
1535 textAlign: "center",
1536 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h4", {
1537 children: errorHeader
1538 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
1539 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
1540 children: errorMessage
1541 })
1542 }), isUnauthorized ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__["default"], {
1543 "data-test-id": "authorize-button",
1544 onClick: redirectToPlugin,
1545 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Go to plugin', 'leadin')
1546 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__["default"], {
1547 "data-test-id": "retry-button",
1548 onClick: resetErrorState,
1549 children: errorInfo.action
1550 })]
1551 })
1552 });
1553 }
1554
1555 /***/ }),
1556
1557 /***/ "./scripts/shared/Common/HubspotWrapper.ts":
1558 /*!*************************************************!*\
1559 !*** ./scripts/shared/Common/HubspotWrapper.ts ***!
1560 \*************************************************/
1561 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1562
1563 "use strict";
1564 __webpack_require__.r(__webpack_exports__);
1565 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1566 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1567 /* harmony export */ });
1568 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
1569
1570
1571 var _exp = /*#__PURE__*/function _exp() {
1572 return function (props) {
1573 return "url(".concat(props.pluginPath, "/public/assets/images/hubspot.svg)");
1574 };
1575 };
1576
1577 var _exp2 = /*#__PURE__*/function _exp2() {
1578 return function (props) {
1579 return props.padding || '90px 20% 25px';
1580 };
1581 };
1582
1583 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
1584 name: "HubspotWrapper0",
1585 "class": "h1q5v5ee",
1586 propsAsIs: false,
1587 vars: {
1588 "h1q5v5ee-0": [_exp()],
1589 "h1q5v5ee-1": [_exp2()]
1590 }
1591 }));
1592
1593 __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");
1594
1595 /***/ }),
1596
1597 /***/ "./scripts/shared/Common/LoadingBlock.tsx":
1598 /*!************************************************!*\
1599 !*** ./scripts/shared/Common/LoadingBlock.tsx ***!
1600 \************************************************/
1601 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1602
1603 "use strict";
1604 __webpack_require__.r(__webpack_exports__);
1605 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1606 /* harmony export */ "default": () => (/* binding */ LoadingBlock)
1607 /* harmony export */ });
1608 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1609 /* harmony import */ var _HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1610 /* harmony import */ var _UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UISpinner */ "./scripts/shared/UIComponents/UISpinner.tsx");
1611 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1612
1613
1614
1615
1616 function LoadingBlock() {
1617 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__["default"], {
1618 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.pluginPath,
1619 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_2__["default"], {
1620 size: 50
1621 })
1622 });
1623 }
1624
1625 /***/ }),
1626
1627 /***/ "./scripts/shared/Form/FormEdit.tsx":
1628 /*!******************************************!*\
1629 !*** ./scripts/shared/Form/FormEdit.tsx ***!
1630 \******************************************/
1631 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1632
1633 "use strict";
1634 __webpack_require__.r(__webpack_exports__);
1635 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1636 /* harmony export */ "default": () => (/* binding */ FormEditContainer)
1637 /* harmony export */ });
1638 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1639 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1640 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1641 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1642 /* harmony import */ var _UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpacer */ "./scripts/shared/UIComponents/UISpacer.ts");
1643 /* harmony import */ var _PreviewForm__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PreviewForm */ "./scripts/shared/Form/PreviewForm.tsx");
1644 /* harmony import */ var _FormSelect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FormSelect */ "./scripts/shared/Form/FormSelect.tsx");
1645 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1646 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
1647 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
1648 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
1649 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; }
1650
1651 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; }
1652
1653 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; }
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666 function FormEdit(_ref) {
1667 var attributes = _ref.attributes,
1668 isSelected = _ref.isSelected,
1669 setAttributes = _ref.setAttributes,
1670 _ref$preview = _ref.preview,
1671 preview = _ref$preview === void 0 ? true : _ref$preview,
1672 _ref$origin = _ref.origin,
1673 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin;
1674 var formId = attributes.formId,
1675 formName = attributes.formName;
1676 var formSelected = _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId && formId;
1677 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.useBackgroundAppContext)();
1678 var monitorFormPreviewRender = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.usePostBackgroundMessage)();
1679
1680 var handleChange = function handleChange(selectedForm) {
1681 setAttributes({
1682 portalId: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId,
1683 formId: selectedForm.value,
1684 formName: selectedForm.label
1685 });
1686 };
1687
1688 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1689 monitorFormPreviewRender({
1690 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__.ProxyMessages.TrackFormPreviewRender,
1691 payload: {
1692 origin: origin
1693 }
1694 });
1695 }, [origin]);
1696 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, {
1697 children: [(isSelected || !formSelected) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormSelect__WEBPACK_IMPORTED_MODULE_5__["default"], {
1698 formId: formId,
1699 formName: formName,
1700 handleChange: handleChange,
1701 origin: origin
1702 }), formSelected && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
1703 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"], {
1704 portalId: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId,
1705 formId: formId
1706 })]
1707 })]
1708 });
1709 }
1710
1711 function FormEditContainer(props) {
1712 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.BackgroudAppContext.Provider, {
1713 value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_9__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.refreshToken),
1714 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(FormEdit, _objectSpread({}, props))
1715 });
1716 }
1717
1718 /***/ }),
1719
1720 /***/ "./scripts/shared/Form/FormSelect.tsx":
1721 /*!********************************************!*\
1722 !*** ./scripts/shared/Form/FormSelect.tsx ***!
1723 \********************************************/
1724 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1725
1726 "use strict";
1727 __webpack_require__.r(__webpack_exports__);
1728 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1729 /* harmony export */ "default": () => (/* binding */ FormSelect)
1730 /* harmony export */ });
1731 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1732 /* harmony import */ var _FormSelector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FormSelector */ "./scripts/shared/Form/FormSelector.tsx");
1733 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
1734 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1735 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
1736 /* harmony import */ var _hooks_useForms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useForms */ "./scripts/shared/Form/hooks/useForms.ts");
1737 /* harmony import */ var _hooks_useCreateFormFromTemplate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useCreateFormFromTemplate */ "./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts");
1738 /* harmony import */ var _constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../constants/defaultFormOptions */ "./scripts/constants/defaultFormOptions.ts");
1739 /* harmony import */ var _Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
1740
1741
1742
1743
1744
1745
1746
1747
1748 function FormSelect(_ref) {
1749 var formId = _ref.formId,
1750 formName = _ref.formName,
1751 handleChange = _ref.handleChange,
1752 _ref$origin = _ref.origin,
1753 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin;
1754
1755 var _useForms = (0,_hooks_useForms__WEBPACK_IMPORTED_MODULE_4__["default"])(),
1756 search = _useForms.search,
1757 formApiError = _useForms.formApiError,
1758 reset = _useForms.reset;
1759
1760 var _useCreateFormFromTem = (0,_hooks_useCreateFormFromTemplate__WEBPACK_IMPORTED_MODULE_5__["default"])(origin),
1761 createFormByTemplate = _useCreateFormFromTem.createFormByTemplate,
1762 createReset = _useCreateFormFromTem.reset,
1763 isCreating = _useCreateFormFromTem.isCreating,
1764 hasError = _useCreateFormFromTem.hasError,
1765 createApiError = _useCreateFormFromTem.formApiError;
1766
1767 var value = formId && formName ? {
1768 label: formName,
1769 value: formId
1770 } : null;
1771
1772 var handleLocalChange = function handleLocalChange(option) {
1773 if ((0,_constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_6__.isDefaultForm)(option.value)) {
1774 createFormByTemplate(option.value).then(function (_ref2) {
1775 var guid = _ref2.guid,
1776 name = _ref2.name;
1777 handleChange({
1778 value: guid,
1779 label: name
1780 });
1781 });
1782 } else {
1783 handleChange(option);
1784 }
1785 };
1786
1787 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"], {
1788 status: formApiError ? formApiError.status : createApiError.status,
1789 resetErrorState: function resetErrorState() {
1790 if (hasError) {
1791 createReset();
1792 } else {
1793 reset();
1794 }
1795 },
1796 errorInfo: {
1797 header: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('There was a problem retrieving your forms', 'leadin'),
1798 message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Please refresh your forms or try again in a few minutes', 'leadin'),
1799 action: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Refresh forms', 'leadin')
1800 }
1801 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormSelector__WEBPACK_IMPORTED_MODULE_1__["default"], {
1802 loadOptions: search,
1803 onChange: function onChange(option) {
1804 return handleLocalChange(option);
1805 },
1806 value: value
1807 });
1808 }
1809
1810 /***/ }),
1811
1812 /***/ "./scripts/shared/Form/FormSelector.tsx":
1813 /*!**********************************************!*\
1814 !*** ./scripts/shared/Form/FormSelector.tsx ***!
1815 \**********************************************/
1816 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1817
1818 "use strict";
1819 __webpack_require__.r(__webpack_exports__);
1820 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1821 /* harmony export */ "default": () => (/* binding */ FormSelector)
1822 /* harmony export */ });
1823 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1824 /* harmony import */ var _Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Common/HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1825 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1826 /* harmony import */ var _Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Common/AsyncSelect */ "./scripts/shared/Common/AsyncSelect.tsx");
1827 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1828 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
1829
1830
1831
1832
1833
1834 function FormSelector(_ref) {
1835 var loadOptions = _ref.loadOptions,
1836 onChange = _ref.onChange,
1837 value = _ref.value;
1838 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__["default"], {
1839 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath,
1840 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
1841 "data-test-id": "leadin-form-select",
1842 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
1843 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select an existing form or create a new one from a template', 'leadin')
1844 })
1845 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_3__["default"], {
1846 placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Search for a form', 'leadin'),
1847 value: value,
1848 loadOptions: loadOptions,
1849 onChange: onChange
1850 })]
1851 });
1852 }
1853
1854 /***/ }),
1855
1856 /***/ "./scripts/shared/Form/PreviewForm.tsx":
1857 /*!*********************************************!*\
1858 !*** ./scripts/shared/Form/PreviewForm.tsx ***!
1859 \*********************************************/
1860 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1861
1862 "use strict";
1863 __webpack_require__.r(__webpack_exports__);
1864 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1865 /* harmony export */ "default": () => (/* binding */ PreviewForm)
1866 /* harmony export */ });
1867 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1868 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1869 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1870 /* harmony import */ var _UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIOverlay */ "./scripts/shared/UIComponents/UIOverlay.ts");
1871 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1872 /* harmony import */ var _hooks_useFormsScript__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useFormsScript */ "./scripts/shared/Form/hooks/useFormsScript.ts");
1873
1874
1875
1876
1877
1878 function PreviewForm(_ref) {
1879 var portalId = _ref.portalId,
1880 formId = _ref.formId;
1881 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1882 var ready = (0,_hooks_useFormsScript__WEBPACK_IMPORTED_MODULE_4__["default"])();
1883 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1884 if (!ready) {
1885 return;
1886 }
1887
1888 if (inputEl.current) {
1889 inputEl.current.innerHTML = '';
1890 var embedScript = document.createElement('script');
1891 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, " });");
1892 inputEl.current.appendChild(embedScript);
1893 }
1894 }, [formId, portalId, ready, inputEl]);
1895 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__["default"], {
1896 ref: inputEl
1897 });
1898 }
1899
1900 /***/ }),
1901
1902 /***/ "./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts":
1903 /*!****************************************************************!*\
1904 !*** ./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts ***!
1905 \****************************************************************/
1906 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1907
1908 "use strict";
1909 __webpack_require__.r(__webpack_exports__);
1910 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1911 /* harmony export */ "default": () => (/* binding */ useCreateFormFromTemplate)
1912 /* harmony export */ });
1913 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1914 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1915 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1916 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
1917 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
1918 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1919
1920 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."); }
1921
1922 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); }
1923
1924 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; }
1925
1926 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; }
1927
1928 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1929
1930
1931
1932
1933
1934 function useCreateFormFromTemplate() {
1935 var origin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'gutenberg';
1936 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
1937 var track = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostBackgroundMessage)();
1938
1939 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle),
1940 _useState2 = _slicedToArray(_useState, 2),
1941 loadState = _useState2[0],
1942 setLoadState = _useState2[1];
1943
1944 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
1945 _useState4 = _slicedToArray(_useState3, 2),
1946 formApiError = _useState4[0],
1947 setFormApiError = _useState4[1];
1948
1949 var createFormByTemplate = function createFormByTemplate(type) {
1950 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
1951 track({
1952 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.TrackFormCreatedFromTemplate,
1953 payload: {
1954 type: type,
1955 origin: origin
1956 }
1957 });
1958 return proxy({
1959 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.CreateFormFromTemplate,
1960 payload: type
1961 }).then(function (form) {
1962 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
1963 return form;
1964 })["catch"](function (err) {
1965 setFormApiError(err);
1966 track({
1967 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.TrackFormCreationFailed,
1968 payload: {
1969 origin: origin
1970 }
1971 });
1972 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
1973 });
1974 };
1975
1976 return {
1977 isCreating: loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading,
1978 hasError: loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed,
1979 formApiError: formApiError,
1980 createFormByTemplate: createFormByTemplate,
1981 reset: function reset() {
1982 return setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
1983 }
1984 };
1985 }
1986
1987 /***/ }),
1988
1989 /***/ "./scripts/shared/Form/hooks/useForms.ts":
1990 /*!***********************************************!*\
1991 !*** ./scripts/shared/Form/hooks/useForms.ts ***!
1992 \***********************************************/
1993 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1994
1995 "use strict";
1996 __webpack_require__.r(__webpack_exports__);
1997 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1998 /* harmony export */ "default": () => (/* binding */ useForms)
1999 /* harmony export */ });
2000 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2001 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2002 /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/debounce */ "./node_modules/lodash/debounce.js");
2003 /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_1__);
2004 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2005 /* harmony import */ var _constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../constants/defaultFormOptions */ "./scripts/constants/defaultFormOptions.ts");
2006 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2007 function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2008
2009 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."); }
2010
2011 function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
2012
2013 function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
2014
2015 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2016
2017 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."); }
2018
2019 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); }
2020
2021 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; }
2022
2023 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; }
2024
2025 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2026
2027
2028
2029
2030
2031
2032 function useForms() {
2033 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__.usePostAsyncBackgroundMessage)();
2034
2035 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2036 _useState2 = _slicedToArray(_useState, 2),
2037 formApiError = _useState2[0],
2038 setFormApiError = _useState2[1];
2039
2040 var search = lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default()(function (search, callback) {
2041 return proxy({
2042 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages.FetchForms,
2043 payload: {
2044 search: search
2045 }
2046 }).then(function (forms) {
2047 callback([].concat(_toConsumableArray(forms.map(function (form) {
2048 return {
2049 label: form.name,
2050 value: form.guid
2051 };
2052 })), [_constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_OPTIONS]));
2053 })["catch"](function (error) {
2054 setFormApiError(error);
2055 });
2056 }, 300, {
2057 trailing: true
2058 });
2059 return {
2060 search: search,
2061 formApiError: formApiError,
2062 reset: function reset() {
2063 return setFormApiError(null);
2064 }
2065 };
2066 }
2067
2068 /***/ }),
2069
2070 /***/ "./scripts/shared/Form/hooks/useFormsScript.ts":
2071 /*!*****************************************************!*\
2072 !*** ./scripts/shared/Form/hooks/useFormsScript.ts ***!
2073 \*****************************************************/
2074 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2075
2076 "use strict";
2077 __webpack_require__.r(__webpack_exports__);
2078 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2079 /* harmony export */ "default": () => (/* binding */ useFormScript)
2080 /* harmony export */ });
2081 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
2082 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
2083 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2084 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2085 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2086 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../lib/Raven */ "./scripts/lib/Raven.ts");
2087 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2088
2089 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."); }
2090
2091 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); }
2092
2093 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; }
2094
2095 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; }
2096
2097 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2098
2099
2100
2101
2102
2103 var promise;
2104
2105 function loadFormsScript() {
2106 if (!promise) {
2107 promise = new Promise(function (resolve, reject) {
2108 return jquery__WEBPACK_IMPORTED_MODULE_0___default().getScript(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.formsScript).done(resolve).fail(reject);
2109 });
2110 }
2111
2112 return promise;
2113 }
2114
2115 function useFormScript() {
2116 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
2117 _useState2 = _slicedToArray(_useState, 2),
2118 ready = _useState2[0],
2119 setReady = _useState2[1];
2120
2121 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2122 loadFormsScript().then(function () {
2123 return setReady(true);
2124 })["catch"](function (error) {
2125 return _lib_Raven__WEBPACK_IMPORTED_MODULE_3__["default"].captureException(error);
2126 });
2127 }, []);
2128 return ready;
2129 }
2130
2131 /***/ }),
2132
2133 /***/ "./scripts/shared/Meeting/MeetingController.tsx":
2134 /*!******************************************************!*\
2135 !*** ./scripts/shared/Meeting/MeetingController.tsx ***!
2136 \******************************************************/
2137 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2138
2139 "use strict";
2140 __webpack_require__.r(__webpack_exports__);
2141 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2142 /* harmony export */ "default": () => (/* binding */ MeetingController)
2143 /* harmony export */ });
2144 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2145 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2146 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2147 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
2148 /* harmony import */ var _MeetingSelector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./MeetingSelector */ "./scripts/shared/Meeting/MeetingSelector.tsx");
2149 /* harmony import */ var _MeetingWarning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MeetingWarning */ "./scripts/shared/Meeting/MeetingWarning.tsx");
2150 /* harmony import */ var _hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useMeetings */ "./scripts/shared/Meeting/hooks/useMeetings.ts");
2151 /* harmony import */ var _Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Common/HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
2152 /* harmony import */ var _Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
2153 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2154 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2155 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);
2156 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! raven-js */ "./node_modules/raven-js/src/singleton.js");
2157 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(raven_js__WEBPACK_IMPORTED_MODULE_10__);
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169 function MeetingController(_ref) {
2170 var handleChange = _ref.handleChange,
2171 url = _ref.url;
2172
2173 var _useMeetings = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__["default"])(),
2174 meetings = _useMeetings.mappedMeetings,
2175 loading = _useMeetings.loading,
2176 error = _useMeetings.error,
2177 reload = _useMeetings.reload,
2178 connectCalendar = _useMeetings.connectCalendar;
2179
2180 var selectedMeetingOption = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__.useSelectedMeeting)(url);
2181 var selectedMeetingCalendar = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__.useSelectedMeetingCalendar)(url);
2182 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2183 if (!url && meetings.length > 0) {
2184 handleChange(meetings[0].value);
2185 }
2186 }, [meetings, url, handleChange]);
2187
2188 var handleLocalChange = function handleLocalChange(option) {
2189 handleChange(option.value);
2190 };
2191
2192 var handleConnectCalendar = function handleConnectCalendar() {
2193 return connectCalendar().then(function () {
2194 reload();
2195 })["catch"](function (error) {
2196 raven_js__WEBPACK_IMPORTED_MODULE_10___default().captureMessage('Unable to connect calendar', {
2197 extra: {
2198 error: error
2199 }
2200 });
2201 });
2202 };
2203
2204 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2205 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"], {
2206 status: error && error.status || error,
2207 resetErrorState: function resetErrorState() {
2208 return reload();
2209 },
2210 errorInfo: {
2211 header: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('There was a problem retrieving your meetings', 'leadin'),
2212 message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Please refresh your meetings or try again in a few minutes', 'leadin'),
2213 action: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Refresh meetings', 'leadin')
2214 }
2215 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_6__["default"], {
2216 padding: "90px 32px 24px",
2217 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_8__.pluginPath,
2218 children: [selectedMeetingCalendar && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingWarning__WEBPACK_IMPORTED_MODULE_4__["default"], {
2219 status: selectedMeetingCalendar,
2220 onConnectCalendar: handleConnectCalendar
2221 }), meetings.length > 1 && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingSelector__WEBPACK_IMPORTED_MODULE_3__["default"], {
2222 onChange: handleLocalChange,
2223 options: meetings,
2224 value: selectedMeetingOption
2225 })]
2226 })
2227 });
2228 }
2229
2230 /***/ }),
2231
2232 /***/ "./scripts/shared/Meeting/MeetingEdit.tsx":
2233 /*!************************************************!*\
2234 !*** ./scripts/shared/Meeting/MeetingEdit.tsx ***!
2235 \************************************************/
2236 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2237
2238 "use strict";
2239 __webpack_require__.r(__webpack_exports__);
2240 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2241 /* harmony export */ "default": () => (/* binding */ MeetingsEditContainer)
2242 /* harmony export */ });
2243 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2244 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2245 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2246 /* harmony import */ var _MeetingController__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./MeetingController */ "./scripts/shared/Meeting/MeetingController.tsx");
2247 /* harmony import */ var _PreviewMeeting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PreviewMeeting */ "./scripts/shared/Meeting/PreviewMeeting.tsx");
2248 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2249 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2250 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2251 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
2252 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
2253 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; }
2254
2255 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; }
2256
2257 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; }
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269 function MeetingEdit(_ref) {
2270 var url = _ref.attributes.url,
2271 isSelected = _ref.isSelected,
2272 setAttributes = _ref.setAttributes,
2273 _ref$preview = _ref.preview,
2274 preview = _ref$preview === void 0 ? true : _ref$preview,
2275 _ref$origin = _ref.origin,
2276 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin;
2277 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.useBackgroundAppContext)();
2278 var monitorFormPreviewRender = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.usePostBackgroundMessage)();
2279
2280 var handleChange = function handleChange(newUrl) {
2281 setAttributes({
2282 url: newUrl
2283 });
2284 };
2285
2286 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2287 monitorFormPreviewRender({
2288 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_6__.ProxyMessages.TrackMeetingPreviewRender,
2289 payload: {
2290 origin: origin
2291 }
2292 });
2293 }, [origin]);
2294 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, {
2295 children: [(isSelected || !url) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingController__WEBPACK_IMPORTED_MODULE_2__["default"], {
2296 url: url,
2297 handleChange: handleChange
2298 }), preview && url && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PreviewMeeting__WEBPACK_IMPORTED_MODULE_3__["default"], {
2299 url: url
2300 })]
2301 });
2302 }
2303
2304 function MeetingsEditContainer(props) {
2305 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.BackgroudAppContext.Provider, {
2306 value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_8__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__.refreshToken),
2307 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MeetingEdit, _objectSpread({}, props))
2308 });
2309 }
2310
2311 /***/ }),
2312
2313 /***/ "./scripts/shared/Meeting/MeetingSelector.tsx":
2314 /*!****************************************************!*\
2315 !*** ./scripts/shared/Meeting/MeetingSelector.tsx ***!
2316 \****************************************************/
2317 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2318
2319 "use strict";
2320 __webpack_require__.r(__webpack_exports__);
2321 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2322 /* harmony export */ "default": () => (/* binding */ MeetingSelector)
2323 /* harmony export */ });
2324 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2325 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2326 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2327 /* harmony import */ var _Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/AsyncSelect */ "./scripts/shared/Common/AsyncSelect.tsx");
2328 /* harmony import */ var _UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpacer */ "./scripts/shared/UIComponents/UISpacer.ts");
2329 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2330 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
2331
2332
2333
2334
2335
2336 function MeetingSelector(_ref) {
2337 var options = _ref.options,
2338 onChange = _ref.onChange,
2339 value = _ref.value;
2340 var optionsWrapper = [{
2341 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Meeting name', 'leadin'),
2342 options: options
2343 }];
2344 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2345 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", {
2346 "data-test-id": "leadin-meeting-select",
2347 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
2348 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select a meeting scheduling page', 'leadin')
2349 })
2350 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_2__["default"], {
2351 defaultOptions: optionsWrapper,
2352 onChange: onChange,
2353 placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select a meeting', 'leadin'),
2354 value: value
2355 })]
2356 });
2357 }
2358
2359 /***/ }),
2360
2361 /***/ "./scripts/shared/Meeting/MeetingWarning.tsx":
2362 /*!***************************************************!*\
2363 !*** ./scripts/shared/Meeting/MeetingWarning.tsx ***!
2364 \***************************************************/
2365 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2366
2367 "use strict";
2368 __webpack_require__.r(__webpack_exports__);
2369 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2370 /* harmony export */ "default": () => (/* binding */ MeetingWarning)
2371 /* harmony export */ });
2372 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2373 /* harmony import */ var _UIComponents_UIAlert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../UIComponents/UIAlert */ "./scripts/shared/UIComponents/UIAlert.tsx");
2374 /* harmony import */ var _UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIButton */ "./scripts/shared/UIComponents/UIButton.ts");
2375 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants */ "./scripts/shared/Meeting/constants.ts");
2376 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2377 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
2378
2379
2380
2381
2382
2383 function MeetingWarning(_ref) {
2384 var status = _ref.status,
2385 onConnectCalendar = _ref.onConnectCalendar;
2386 var isMeetingOwner = status === _constants__WEBPACK_IMPORTED_MODULE_3__.CURRENT_USER_CALENDAR_MISSING;
2387 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');
2388 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');
2389 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIAlert__WEBPACK_IMPORTED_MODULE_1__["default"], {
2390 titleText: titleText,
2391 titleMessage: titleMessage,
2392 children: isMeetingOwner && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_2__["default"], {
2393 use: "tertiary",
2394 id: "meetings-connect-calendar",
2395 onClick: onConnectCalendar,
2396 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Connect calendar', 'leadin')
2397 })
2398 });
2399 }
2400
2401 /***/ }),
2402
2403 /***/ "./scripts/shared/Meeting/PreviewMeeting.tsx":
2404 /*!***************************************************!*\
2405 !*** ./scripts/shared/Meeting/PreviewMeeting.tsx ***!
2406 \***************************************************/
2407 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2408
2409 "use strict";
2410 __webpack_require__.r(__webpack_exports__);
2411 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2412 /* harmony export */ "default": () => (/* binding */ PreviewForm)
2413 /* harmony export */ });
2414 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2415 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2416 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2417 /* harmony import */ var _UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIOverlay */ "./scripts/shared/UIComponents/UIOverlay.ts");
2418 /* harmony import */ var _hooks_useMeetingsScript__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hooks/useMeetingsScript */ "./scripts/shared/Meeting/hooks/useMeetingsScript.ts");
2419
2420
2421
2422
2423 function PreviewForm(_ref) {
2424 var url = _ref.url;
2425 var ready = (0,_hooks_useMeetingsScript__WEBPACK_IMPORTED_MODULE_3__["default"])();
2426 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
2427 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2428 if (!ready) {
2429 return;
2430 }
2431
2432 if (inputEl.current) {
2433 inputEl.current.innerHTML = '';
2434 var container = document.createElement('div');
2435 container.dataset.src = "".concat(url, "?embed=true");
2436 container.classList.add('meetings-iframe-container');
2437 inputEl.current.appendChild(container);
2438 var embedScript = document.createElement('script');
2439 embedScript.innerHTML = 'hbspt.meetings.create(".meetings-iframe-container");';
2440 inputEl.current.appendChild(embedScript);
2441 }
2442 }, [url, ready, inputEl]);
2443 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2444 children: url && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__["default"], {
2445 ref: inputEl
2446 })
2447 });
2448 }
2449
2450 /***/ }),
2451
2452 /***/ "./scripts/shared/Meeting/constants.ts":
2453 /*!*********************************************!*\
2454 !*** ./scripts/shared/Meeting/constants.ts ***!
2455 \*********************************************/
2456 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2457
2458 "use strict";
2459 __webpack_require__.r(__webpack_exports__);
2460 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2461 /* harmony export */ "CURRENT_USER_CALENDAR_MISSING": () => (/* binding */ CURRENT_USER_CALENDAR_MISSING),
2462 /* harmony export */ "OTHER_USER_CALENDAR_MISSING": () => (/* binding */ OTHER_USER_CALENDAR_MISSING)
2463 /* harmony export */ });
2464 var OTHER_USER_CALENDAR_MISSING = 'OTHER_USER_CALENDAR_MISSING';
2465 var CURRENT_USER_CALENDAR_MISSING = 'CURRENT_USER_CALENDAR_MISSING';
2466
2467 /***/ }),
2468
2469 /***/ "./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts":
2470 /*!*************************************************************!*\
2471 !*** ./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts ***!
2472 \*************************************************************/
2473 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2474
2475 "use strict";
2476 __webpack_require__.r(__webpack_exports__);
2477 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2478 /* harmony export */ "default": () => (/* binding */ useCurrentUserFetch)
2479 /* harmony export */ });
2480 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2481 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2482 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2483 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2484 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2485 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2486
2487 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."); }
2488
2489 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); }
2490
2491 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; }
2492
2493 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; }
2494
2495 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2496
2497
2498
2499
2500
2501 var user = null;
2502 function useCurrentUserFetch() {
2503 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
2504
2505 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded),
2506 _useState2 = _slicedToArray(_useState, 2),
2507 loadState = _useState2[0],
2508 setLoadState = _useState2[1];
2509
2510 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2511 _useState4 = _slicedToArray(_useState3, 2),
2512 error = _useState4[0],
2513 setError = _useState4[1];
2514
2515 var createUser = function createUser() {
2516 if (!user) {
2517 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2518 }
2519 };
2520
2521 var reload = function reload() {
2522 user = null;
2523 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2524 setError(null);
2525 };
2526
2527 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2528 if (loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded && !user) {
2529 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
2530 proxy({
2531 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.FetchOrCreateMeetingUser
2532 }).then(function (data) {
2533 user = data;
2534 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
2535 })["catch"](function (err) {
2536 setError(err);
2537 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
2538 });
2539 }
2540 }, [loadState]);
2541 return {
2542 user: user,
2543 loadUserState: loadState,
2544 error: error,
2545 createUser: createUser,
2546 reload: reload
2547 };
2548 }
2549
2550 /***/ }),
2551
2552 /***/ "./scripts/shared/Meeting/hooks/useMeetings.ts":
2553 /*!*****************************************************!*\
2554 !*** ./scripts/shared/Meeting/hooks/useMeetings.ts ***!
2555 \*****************************************************/
2556 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2557
2558 "use strict";
2559 __webpack_require__.r(__webpack_exports__);
2560 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2561 /* harmony export */ "default": () => (/* binding */ useMeetings),
2562 /* harmony export */ "useSelectedMeeting": () => (/* binding */ useSelectedMeeting),
2563 /* harmony export */ "useSelectedMeetingCalendar": () => (/* binding */ useSelectedMeetingCalendar)
2564 /* harmony export */ });
2565 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2566 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2567 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2568 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
2569 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants */ "./scripts/shared/Meeting/constants.ts");
2570 /* harmony import */ var _useMeetingsFetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./useMeetingsFetch */ "./scripts/shared/Meeting/hooks/useMeetingsFetch.ts");
2571 /* harmony import */ var _useCurrentUserFetch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./useCurrentUserFetch */ "./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts");
2572 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2573 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2574 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2575 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; }
2576
2577 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; }
2578
2579 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; }
2580
2581 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2582
2583 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."); }
2584
2585 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); }
2586
2587 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; }
2588
2589 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; }
2590
2591 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602 function getDefaultMeetingName(meeting, currentUser, meetingUsers) {
2603 var _meeting$meetingsUser = _slicedToArray(meeting.meetingsUserIds, 1),
2604 meetingOwnerId = _meeting$meetingsUser[0];
2605
2606 var result = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Default', 'leadin');
2607
2608 if (currentUser && meetingOwnerId !== currentUser.id && meetingUsers[meetingOwnerId]) {
2609 var user = meetingUsers[meetingOwnerId];
2610 result += " (".concat(user.userProfile.fullName, ")");
2611 }
2612
2613 return result;
2614 }
2615
2616 function hasCalendarObject(user) {
2617 return user && user.meetingsUserBlob && user.meetingsUserBlob.calendarSettings && user.meetingsUserBlob.calendarSettings.email;
2618 }
2619
2620 function useMeetings() {
2621 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.usePostAsyncBackgroundMessage)();
2622
2623 var _useMeetingsFetch = (0,_useMeetingsFetch__WEBPACK_IMPORTED_MODULE_3__["default"])(),
2624 meetings = _useMeetingsFetch.meetings,
2625 meetingUsers = _useMeetingsFetch.meetingUsers,
2626 meetingsError = _useMeetingsFetch.error,
2627 loadMeetingsState = _useMeetingsFetch.loadMeetingsState,
2628 reloadMeetings = _useMeetingsFetch.reload;
2629
2630 var _useCurrentUserFetch = (0,_useCurrentUserFetch__WEBPACK_IMPORTED_MODULE_4__["default"])(),
2631 currentUser = _useCurrentUserFetch.user,
2632 userError = _useCurrentUserFetch.error,
2633 loadUserState = _useCurrentUserFetch.loadUserState,
2634 reloadUser = _useCurrentUserFetch.reload;
2635
2636 var reload = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
2637 reloadUser();
2638 reloadMeetings();
2639 }, [reloadUser, reloadMeetings]);
2640
2641 var connectCalendar = function connectCalendar() {
2642 return proxy({
2643 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__.ProxyMessages.ConnectMeetingsCalendar
2644 });
2645 };
2646
2647 return {
2648 mappedMeetings: meetings.map(function (meet) {
2649 return {
2650 label: meet.name || getDefaultMeetingName(meet, currentUser, meetingUsers),
2651 value: meet.link
2652 };
2653 }),
2654 meetings: meetings,
2655 meetingUsers: meetingUsers,
2656 currentUser: currentUser,
2657 error: meetingsError || userError,
2658 loading: loadMeetingsState == _enums_loadState__WEBPACK_IMPORTED_MODULE_5__["default"].Loading || loadUserState === _enums_loadState__WEBPACK_IMPORTED_MODULE_5__["default"].Loading,
2659 reload: reload,
2660 connectCalendar: connectCalendar
2661 };
2662 }
2663 function useSelectedMeeting(url) {
2664 var _useMeetings = useMeetings(),
2665 meetings = _useMeetings.mappedMeetings;
2666
2667 var option = meetings.find(function (_ref) {
2668 var value = _ref.value;
2669 return value === url;
2670 });
2671 return option;
2672 }
2673 function useSelectedMeetingCalendar(url) {
2674 var _useMeetings2 = useMeetings(),
2675 meetings = _useMeetings2.meetings,
2676 meetingUsers = _useMeetings2.meetingUsers,
2677 currentUser = _useMeetings2.currentUser;
2678
2679 var meeting = meetings.find(function (meet) {
2680 return meet.link === url;
2681 });
2682 var mappedMeetingUsersId = meetingUsers.reduce(function (p, c) {
2683 return _objectSpread(_objectSpread({}, p), {}, _defineProperty({}, c.id, c));
2684 }, {});
2685
2686 if (!meeting) {
2687 return null;
2688 } else {
2689 var meetingsUserIds = meeting.meetingsUserIds;
2690
2691 if (currentUser && meetingsUserIds.includes(currentUser.id) && !hasCalendarObject(currentUser)) {
2692 return _constants__WEBPACK_IMPORTED_MODULE_2__.CURRENT_USER_CALENDAR_MISSING;
2693 } else if (meetingsUserIds.map(function (id) {
2694 return mappedMeetingUsersId[id];
2695 }).some(function (user) {
2696 return !hasCalendarObject(user);
2697 })) {
2698 return _constants__WEBPACK_IMPORTED_MODULE_2__.OTHER_USER_CALENDAR_MISSING;
2699 } else {
2700 return null;
2701 }
2702 }
2703 }
2704
2705 /***/ }),
2706
2707 /***/ "./scripts/shared/Meeting/hooks/useMeetingsFetch.ts":
2708 /*!**********************************************************!*\
2709 !*** ./scripts/shared/Meeting/hooks/useMeetingsFetch.ts ***!
2710 \**********************************************************/
2711 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2712
2713 "use strict";
2714 __webpack_require__.r(__webpack_exports__);
2715 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2716 /* harmony export */ "default": () => (/* binding */ useMeetingsFetch)
2717 /* harmony export */ });
2718 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2719 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2720 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2721 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2722 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2723 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2724
2725 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."); }
2726
2727 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); }
2728
2729 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; }
2730
2731 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; }
2732
2733 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2734
2735
2736
2737
2738
2739 var meetings = [];
2740 var meetingUsers = [];
2741 function useMeetingsFetch() {
2742 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
2743
2744 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded),
2745 _useState2 = _slicedToArray(_useState, 2),
2746 loadState = _useState2[0],
2747 setLoadState = _useState2[1];
2748
2749 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2750 _useState4 = _slicedToArray(_useState3, 2),
2751 error = _useState4[0],
2752 setError = _useState4[1];
2753
2754 var reload = function reload() {
2755 meetings = [];
2756 setError(null);
2757 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2758 };
2759
2760 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2761 if (loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded && meetings.length === 0) {
2762 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
2763 proxy({
2764 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.FetchMeetingsAndUsers
2765 }).then(function (data) {
2766 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loaded);
2767 meetings = data && data.meetingLinks;
2768 meetingUsers = data && data.meetingUsers;
2769 })["catch"](function (e) {
2770 setError(e);
2771 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
2772 });
2773 }
2774 }, [loadState]);
2775 return {
2776 meetings: meetings,
2777 meetingUsers: meetingUsers,
2778 loadMeetingsState: loadState,
2779 error: error,
2780 reload: reload
2781 };
2782 }
2783
2784 /***/ }),
2785
2786 /***/ "./scripts/shared/Meeting/hooks/useMeetingsScript.ts":
2787 /*!***********************************************************!*\
2788 !*** ./scripts/shared/Meeting/hooks/useMeetingsScript.ts ***!
2789 \***********************************************************/
2790 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2791
2792 "use strict";
2793 __webpack_require__.r(__webpack_exports__);
2794 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2795 /* harmony export */ "default": () => (/* binding */ useMeetingsScript)
2796 /* harmony export */ });
2797 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
2798 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
2799 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2800 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2801 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2802 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../lib/Raven */ "./scripts/lib/Raven.ts");
2803 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2804
2805 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2806
2807 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); }
2808
2809 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; }
2810
2811 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; }
2812
2813 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2814
2815
2816
2817
2818
2819 var promise;
2820
2821 function loadMeetingsScript() {
2822 if (!promise) {
2823 promise = new Promise(function (resolve, reject) {
2824 return jquery__WEBPACK_IMPORTED_MODULE_0___default().getScript(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.meetingsScript).done(resolve).fail(reject);
2825 });
2826 }
2827
2828 return promise;
2829 }
2830
2831 function useMeetingsScript() {
2832 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
2833 _useState2 = _slicedToArray(_useState, 2),
2834 ready = _useState2[0],
2835 setReady = _useState2[1];
2836
2837 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2838 loadMeetingsScript().then(function () {
2839 return setReady(true);
2840 })["catch"](function (error) {
2841 return _lib_Raven__WEBPACK_IMPORTED_MODULE_3__["default"].captureException(error);
2842 });
2843 }, []);
2844 return ready;
2845 }
2846
2847 /***/ }),
2848
2849 /***/ "./scripts/shared/UIComponents/UIAlert.tsx":
2850 /*!*************************************************!*\
2851 !*** ./scripts/shared/UIComponents/UIAlert.tsx ***!
2852 \*************************************************/
2853 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2854
2855 "use strict";
2856 __webpack_require__.r(__webpack_exports__);
2857 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2858 /* harmony export */ "default": () => (/* binding */ UIAlert)
2859 /* harmony export */ });
2860 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2861 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2862
2863
2864 var AlertContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('div')({
2865 name: "AlertContainer",
2866 "class": "a1h8m4fo",
2867 propsAsIs: false
2868 });
2869 var Title = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('p')({
2870 name: "Title",
2871 "class": "tyndzxk",
2872 propsAsIs: false
2873 });
2874 var Message = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('p')({
2875 name: "Message",
2876 "class": "m1m9sbk4",
2877 propsAsIs: false
2878 });
2879 var MessageContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('div')({
2880 name: "MessageContainer",
2881 "class": "mg5o421",
2882 propsAsIs: false
2883 });
2884 function UIAlert(_ref) {
2885 var titleText = _ref.titleText,
2886 titleMessage = _ref.titleMessage,
2887 children = _ref.children;
2888 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(AlertContainer, {
2889 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(MessageContainer, {
2890 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Title, {
2891 children: titleText
2892 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Message, {
2893 children: titleMessage
2894 })]
2895 }), children]
2896 });
2897 }
2898
2899 __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");
2900
2901 /***/ }),
2902
2903 /***/ "./scripts/shared/UIComponents/UIButton.ts":
2904 /*!*************************************************!*\
2905 !*** ./scripts/shared/UIComponents/UIButton.ts ***!
2906 \*************************************************/
2907 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2908
2909 "use strict";
2910 __webpack_require__.r(__webpack_exports__);
2911 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2912 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2913 /* harmony export */ });
2914 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2915 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colors */ "./scripts/shared/UIComponents/colors.ts");
2916
2917
2918
2919 var _exp2 = /*#__PURE__*/function _exp2() {
2920 return function (props) {
2921 return props.use === 'tertiary' ? _colors__WEBPACK_IMPORTED_MODULE_0__.HEFFALUMP : _colors__WEBPACK_IMPORTED_MODULE_0__.LORAX;
2922 };
2923 };
2924
2925 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('button')({
2926 name: "UIButton0",
2927 "class": "ug152ch",
2928 propsAsIs: false,
2929 vars: {
2930 "ug152ch-0": [_exp2()]
2931 }
2932 }));
2933
2934 __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");
2935
2936 /***/ }),
2937
2938 /***/ "./scripts/shared/UIComponents/UIContainer.ts":
2939 /*!****************************************************!*\
2940 !*** ./scripts/shared/UIComponents/UIContainer.ts ***!
2941 \****************************************************/
2942 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2943
2944 "use strict";
2945 __webpack_require__.r(__webpack_exports__);
2946 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2947 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2948 /* harmony export */ });
2949 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2950
2951
2952 var _exp = /*#__PURE__*/function _exp() {
2953 return function (props) {
2954 return props.textAlign ? props.textAlign : 'inherit';
2955 };
2956 };
2957
2958 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
2959 name: "UIContainer0",
2960 "class": "ua13n1c",
2961 propsAsIs: false,
2962 vars: {
2963 "ua13n1c-0": [_exp()]
2964 }
2965 }));
2966
2967 __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");
2968
2969 /***/ }),
2970
2971 /***/ "./scripts/shared/UIComponents/UIOverlay.ts":
2972 /*!**************************************************!*\
2973 !*** ./scripts/shared/UIComponents/UIOverlay.ts ***!
2974 \**************************************************/
2975 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2976
2977 "use strict";
2978 __webpack_require__.r(__webpack_exports__);
2979 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2980 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2981 /* harmony export */ });
2982 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2983
2984 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
2985 name: "UIOverlay0",
2986 "class": "u1q7a48k",
2987 propsAsIs: false
2988 }));
2989
2990 __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");
2991
2992 /***/ }),
2993
2994 /***/ "./scripts/shared/UIComponents/UISpacer.ts":
2995 /*!*************************************************!*\
2996 !*** ./scripts/shared/UIComponents/UISpacer.ts ***!
2997 \*************************************************/
2998 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2999
3000 "use strict";
3001 __webpack_require__.r(__webpack_exports__);
3002 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3003 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3004 /* harmony export */ });
3005 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3006
3007 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
3008 name: "UISpacer0",
3009 "class": "u3qxofx",
3010 propsAsIs: false
3011 }));
3012
3013 __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");
3014
3015 /***/ }),
3016
3017 /***/ "./scripts/shared/UIComponents/UISpinner.tsx":
3018 /*!***************************************************!*\
3019 !*** ./scripts/shared/UIComponents/UISpinner.tsx ***!
3020 \***************************************************/
3021 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3022
3023 "use strict";
3024 __webpack_require__.r(__webpack_exports__);
3025 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3026 /* harmony export */ "default": () => (/* binding */ UISpinner)
3027 /* harmony export */ });
3028 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
3029 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3030 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./colors */ "./scripts/shared/UIComponents/colors.ts");
3031
3032
3033
3034 var SpinnerOuter = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('div')({
3035 name: "SpinnerOuter",
3036 "class": "sxa9zrc",
3037 propsAsIs: false
3038 });
3039 var SpinnerInner = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('div')({
3040 name: "SpinnerInner",
3041 "class": "s14430wa",
3042 propsAsIs: false
3043 });
3044
3045 var _exp = /*#__PURE__*/function _exp() {
3046 return function (props) {
3047 return props.color;
3048 };
3049 };
3050
3051 var Circle = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('circle')({
3052 name: "Circle",
3053 "class": "ct87ghk",
3054 propsAsIs: true,
3055 vars: {
3056 "ct87ghk-0": [_exp()]
3057 }
3058 });
3059
3060 var _exp2 = /*#__PURE__*/function _exp2() {
3061 return function (props) {
3062 return props.color;
3063 };
3064 };
3065
3066 var AnimatedCircle = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('circle')({
3067 name: "AnimatedCircle",
3068 "class": "avili0h",
3069 propsAsIs: true,
3070 vars: {
3071 "avili0h-0": [_exp2()]
3072 }
3073 });
3074 function UISpinner(_ref) {
3075 var _ref$size = _ref.size,
3076 size = _ref$size === void 0 ? 20 : _ref$size;
3077 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SpinnerOuter, {
3078 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SpinnerInner, {
3079 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
3080 height: size,
3081 width: size,
3082 viewBox: "0 0 50 50",
3083 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Circle, {
3084 color: _colors__WEBPACK_IMPORTED_MODULE_1__.CALYPSO_MEDIUM,
3085 cx: "25",
3086 cy: "25",
3087 r: "22.5"
3088 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(AnimatedCircle, {
3089 color: _colors__WEBPACK_IMPORTED_MODULE_1__.CALYPSO,
3090 cx: "25",
3091 cy: "25",
3092 r: "22.5"
3093 })]
3094 })
3095 })
3096 });
3097 }
3098
3099 __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");
3100
3101 /***/ }),
3102
3103 /***/ "./scripts/shared/UIComponents/colors.ts":
3104 /*!***********************************************!*\
3105 !*** ./scripts/shared/UIComponents/colors.ts ***!
3106 \***********************************************/
3107 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3108
3109 "use strict";
3110 __webpack_require__.r(__webpack_exports__);
3111 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3112 /* harmony export */ "CALYPSO": () => (/* binding */ CALYPSO),
3113 /* harmony export */ "CALYPSO_LIGHT": () => (/* binding */ CALYPSO_LIGHT),
3114 /* harmony export */ "CALYPSO_MEDIUM": () => (/* binding */ CALYPSO_MEDIUM),
3115 /* harmony export */ "HEFFALUMP": () => (/* binding */ HEFFALUMP),
3116 /* harmony export */ "LORAX": () => (/* binding */ LORAX),
3117 /* harmony export */ "MARIGOLD_LIGHT": () => (/* binding */ MARIGOLD_LIGHT),
3118 /* harmony export */ "MARIGOLD_MEDIUM": () => (/* binding */ MARIGOLD_MEDIUM),
3119 /* harmony export */ "OBSIDIAN": () => (/* binding */ OBSIDIAN),
3120 /* harmony export */ "OLAF": () => (/* binding */ OLAF)
3121 /* harmony export */ });
3122 var CALYPSO = '#00a4bd';
3123 var CALYPSO_MEDIUM = '#7fd1de';
3124 var CALYPSO_LIGHT = '#e5f5f8';
3125 var LORAX = '#ff7a59';
3126 var OLAF = '#ffffff';
3127 var HEFFALUMP = '#425b76';
3128 var MARIGOLD_LIGHT = '#fef8f0';
3129 var MARIGOLD_MEDIUM = '#fae0b5';
3130 var OBSIDIAN = '#33475b';
3131
3132 /***/ }),
3133
3134 /***/ "./scripts/shared/enums/connectionStatus.ts":
3135 /*!**************************************************!*\
3136 !*** ./scripts/shared/enums/connectionStatus.ts ***!
3137 \**************************************************/
3138 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3139
3140 "use strict";
3141 __webpack_require__.r(__webpack_exports__);
3142 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3143 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3144 /* harmony export */ });
3145 var ConnectionStatus = {
3146 Connected: 'Connected',
3147 NotConnected: 'NotConnected'
3148 };
3149 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ConnectionStatus);
3150
3151 /***/ }),
3152
3153 /***/ "./scripts/shared/enums/loadState.ts":
3154 /*!*******************************************!*\
3155 !*** ./scripts/shared/enums/loadState.ts ***!
3156 \*******************************************/
3157 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3158
3159 "use strict";
3160 __webpack_require__.r(__webpack_exports__);
3161 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3162 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3163 /* harmony export */ });
3164 var LoadState = {
3165 NotLoaded: 'NotLoaded',
3166 Loading: 'Loading',
3167 Loaded: 'Loaded',
3168 Idle: 'Idle',
3169 Failed: 'Failed'
3170 };
3171 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LoadState);
3172
3173 /***/ }),
3174
3175 /***/ "./scripts/utils/appUtils.ts":
3176 /*!***********************************!*\
3177 !*** ./scripts/utils/appUtils.ts ***!
3178 \***********************************/
3179 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3180
3181 "use strict";
3182 __webpack_require__.r(__webpack_exports__);
3183 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3184 /* harmony export */ "initApp": () => (/* binding */ initApp),
3185 /* harmony export */ "initAppOnReady": () => (/* binding */ initAppOnReady)
3186 /* harmony export */ });
3187 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
3188 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
3189 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lib/Raven */ "./scripts/lib/Raven.ts");
3190
3191
3192 function initApp(initFn) {
3193 (0,_lib_Raven__WEBPACK_IMPORTED_MODULE_1__.configureRaven)();
3194 _lib_Raven__WEBPACK_IMPORTED_MODULE_1__["default"].context(initFn);
3195 }
3196 function initAppOnReady(initFn) {
3197 function main() {
3198 jquery__WEBPACK_IMPORTED_MODULE_0___default()(initFn);
3199 }
3200
3201 initApp(main);
3202 }
3203
3204 /***/ }),
3205
3206 /***/ "./scripts/utils/backgroundAppUtils.ts":
3207 /*!*********************************************!*\
3208 !*** ./scripts/utils/backgroundAppUtils.ts ***!
3209 \*********************************************/
3210 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3211
3212 "use strict";
3213 __webpack_require__.r(__webpack_exports__);
3214 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3215 /* harmony export */ "getOrCreateBackgroundApp": () => (/* binding */ getOrCreateBackgroundApp),
3216 /* harmony export */ "initBackgroundApp": () => (/* binding */ initBackgroundApp)
3217 /* harmony export */ });
3218 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
3219 /* harmony import */ var _appUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./appUtils */ "./scripts/utils/appUtils.ts");
3220
3221
3222 function initBackgroundApp(initFn) {
3223 function main() {
3224 if (Array.isArray(initFn)) {
3225 initFn.forEach(function (callback) {
3226 return callback();
3227 });
3228 } else {
3229 initFn();
3230 }
3231 }
3232
3233 (0,_appUtils__WEBPACK_IMPORTED_MODULE_1__.initApp)(main);
3234 }
3235 var getOrCreateBackgroundApp = function getOrCreateBackgroundApp(refreshToken) {
3236 if (window.LeadinBackgroundApp) {
3237 return window.LeadinBackgroundApp;
3238 }
3239
3240 var _window = window,
3241 IntegratedAppEmbedder = _window.IntegratedAppEmbedder,
3242 IntegratedAppOptions = _window.IntegratedAppOptions;
3243 var options = new IntegratedAppOptions().setLocale(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.locale).setDeviceId(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.deviceId).setRefreshToken(refreshToken);
3244 var embedder = new IntegratedAppEmbedder('integrated-plugin-proxy', _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.portalId, _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.hubspotBaseUrl, function () {}).setOptions(options);
3245 embedder.attachTo(document.body, false);
3246 embedder.postStartAppMessage(); // lets the app know all all data has been passed to it
3247
3248 window.LeadinBackgroundApp = embedder;
3249 return window.LeadinBackgroundApp;
3250 };
3251
3252 /***/ }),
3253
3254 /***/ "./scripts/utils/withMetaData.ts":
3255 /*!***************************************!*\
3256 !*** ./scripts/utils/withMetaData.ts ***!
3257 \***************************************/
3258 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3259
3260 "use strict";
3261 __webpack_require__.r(__webpack_exports__);
3262 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3263 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
3264 /* harmony export */ "isFullSiteEditor": () => (/* binding */ isFullSiteEditor)
3265 /* harmony export */ });
3266 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
3267 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
3268 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; }
3269
3270 // from answer here: https://github.com/WordPress/gutenberg/issues/44477#issuecomment-1263026599
3271
3272 var isFullSiteEditor = function isFullSiteEditor() {
3273 return _wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select && !!(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select)('core/edit-site');
3274 };
3275 var applyWithSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.withSelect)(function (select, props) {
3276 return {
3277 metaValue: select('core/editor').getEditedPostAttribute('meta')[props.metaKey]
3278 };
3279 });
3280 var applyWithDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.withDispatch)(function (dispatch, props) {
3281 return {
3282 setMetaValue: function setMetaValue(value) {
3283 dispatch('core/editor').editPost({
3284 meta: _defineProperty({}, props.metaKey, value)
3285 });
3286 }
3287 };
3288 });
3289
3290 function apply(el) {
3291 return applyWithSelect(applyWithDispatch(el));
3292 }
3293
3294 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (apply);
3295
3296 /***/ }),
3297
3298 /***/ "./node_modules/is-what/dist/index.esm.js":
3299 /*!************************************************!*\
3300 !*** ./node_modules/is-what/dist/index.esm.js ***!
3301 \************************************************/
3302 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3303
3304 "use strict";
3305 __webpack_require__.r(__webpack_exports__);
3306 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3307 /* harmony export */ "getType": () => (/* binding */ getType),
3308 /* harmony export */ "isAnyObject": () => (/* binding */ isAnyObject),
3309 /* harmony export */ "isArray": () => (/* binding */ isArray),
3310 /* harmony export */ "isBlob": () => (/* binding */ isBlob),
3311 /* harmony export */ "isBoolean": () => (/* binding */ isBoolean),
3312 /* harmony export */ "isDate": () => (/* binding */ isDate),
3313 /* harmony export */ "isEmptyArray": () => (/* binding */ isEmptyArray),
3314 /* harmony export */ "isEmptyObject": () => (/* binding */ isEmptyObject),
3315 /* harmony export */ "isEmptyString": () => (/* binding */ isEmptyString),
3316 /* harmony export */ "isError": () => (/* binding */ isError),
3317 /* harmony export */ "isFile": () => (/* binding */ isFile),
3318 /* harmony export */ "isFullArray": () => (/* binding */ isFullArray),
3319 /* harmony export */ "isFullObject": () => (/* binding */ isFullObject),
3320 /* harmony export */ "isFullString": () => (/* binding */ isFullString),
3321 /* harmony export */ "isFunction": () => (/* binding */ isFunction),
3322 /* harmony export */ "isMap": () => (/* binding */ isMap),
3323 /* harmony export */ "isNaNValue": () => (/* binding */ isNaNValue),
3324 /* harmony export */ "isNull": () => (/* binding */ isNull),
3325 /* harmony export */ "isNullOrUndefined": () => (/* binding */ isNullOrUndefined),
3326 /* harmony export */ "isNumber": () => (/* binding */ isNumber),
3327 /* harmony export */ "isObject": () => (/* binding */ isObject),
3328 /* harmony export */ "isObjectLike": () => (/* binding */ isObjectLike),
3329 /* harmony export */ "isOneOf": () => (/* binding */ isOneOf),
3330 /* harmony export */ "isPlainObject": () => (/* binding */ isPlainObject),
3331 /* harmony export */ "isPrimitive": () => (/* binding */ isPrimitive),
3332 /* harmony export */ "isPromise": () => (/* binding */ isPromise),
3333 /* harmony export */ "isRegExp": () => (/* binding */ isRegExp),
3334 /* harmony export */ "isSet": () => (/* binding */ isSet),
3335 /* harmony export */ "isString": () => (/* binding */ isString),
3336 /* harmony export */ "isSymbol": () => (/* binding */ isSymbol),
3337 /* harmony export */ "isType": () => (/* binding */ isType),
3338 /* harmony export */ "isUndefined": () => (/* binding */ isUndefined),
3339 /* harmony export */ "isWeakMap": () => (/* binding */ isWeakMap),
3340 /* harmony export */ "isWeakSet": () => (/* binding */ isWeakSet)
3341 /* harmony export */ });
3342 /**
3343 * Returns the object type of the given payload
3344 *
3345 * @param {*} payload
3346 * @returns {string}
3347 */
3348 function getType(payload) {
3349 return Object.prototype.toString.call(payload).slice(8, -1);
3350 }
3351 /**
3352 * Returns whether the payload is undefined
3353 *
3354 * @param {*} payload
3355 * @returns {payload is undefined}
3356 */
3357 function isUndefined(payload) {
3358 return getType(payload) === 'Undefined';
3359 }
3360 /**
3361 * Returns whether the payload is null
3362 *
3363 * @param {*} payload
3364 * @returns {payload is null}
3365 */
3366 function isNull(payload) {
3367 return getType(payload) === 'Null';
3368 }
3369 /**
3370 * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
3371 *
3372 * @param {*} payload
3373 * @returns {payload is PlainObject}
3374 */
3375 function isPlainObject(payload) {
3376 if (getType(payload) !== 'Object')
3377 return false;
3378 return payload.constructor === Object && Object.getPrototypeOf(payload) === Object.prototype;
3379 }
3380 /**
3381 * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
3382 *
3383 * @param {*} payload
3384 * @returns {payload is PlainObject}
3385 */
3386 function isObject(payload) {
3387 return isPlainObject(payload);
3388 }
3389 /**
3390 * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
3391 *
3392 * @param {*} payload
3393 * @returns {payload is { [K in any]: never }}
3394 */
3395 function isEmptyObject(payload) {
3396 return isPlainObject(payload) && Object.keys(payload).length === 0;
3397 }
3398 /**
3399 * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
3400 *
3401 * @param {*} payload
3402 * @returns {payload is PlainObject}
3403 */
3404 function isFullObject(payload) {
3405 return isPlainObject(payload) && Object.keys(payload).length > 0;
3406 }
3407 /**
3408 * Returns whether the payload is an any kind of object (including special classes or objects with different prototypes)
3409 *
3410 * @param {*} payload
3411 * @returns {payload is PlainObject}
3412 */
3413 function isAnyObject(payload) {
3414 return getType(payload) === 'Object';
3415 }
3416 /**
3417 * Returns whether the payload is an object like a type passed in < >
3418 *
3419 * Usage: isObjectLike<{id: any}>(payload) // will make sure it's an object and has an `id` prop.
3420 *
3421 * @template T this must be passed in < >
3422 * @param {*} payload
3423 * @returns {payload is T}
3424 */
3425 function isObjectLike(payload) {
3426 return isAnyObject(payload);
3427 }
3428 /**
3429 * Returns whether the payload is a function (regular or async)
3430 *
3431 * @param {*} payload
3432 * @returns {payload is AnyFunction}
3433 */
3434 function isFunction(payload) {
3435 return typeof payload === 'function';
3436 }
3437 /**
3438 * Returns whether the payload is an array
3439 *
3440 * @param {any} payload
3441 * @returns {payload is any[]}
3442 */
3443 function isArray(payload) {
3444 return getType(payload) === 'Array';
3445 }
3446 /**
3447 * Returns whether the payload is a an array with at least 1 item
3448 *
3449 * @param {*} payload
3450 * @returns {payload is any[]}
3451 */
3452 function isFullArray(payload) {
3453 return isArray(payload) && payload.length > 0;
3454 }
3455 /**
3456 * Returns whether the payload is a an empty array
3457 *
3458 * @param {*} payload
3459 * @returns {payload is []}
3460 */
3461 function isEmptyArray(payload) {
3462 return isArray(payload) && payload.length === 0;
3463 }
3464 /**
3465 * Returns whether the payload is a string
3466 *
3467 * @param {*} payload
3468 * @returns {payload is string}
3469 */
3470 function isString(payload) {
3471 return getType(payload) === 'String';
3472 }
3473 /**
3474 * Returns whether the payload is a string, BUT returns false for ''
3475 *
3476 * @param {*} payload
3477 * @returns {payload is string}
3478 */
3479 function isFullString(payload) {
3480 return isString(payload) && payload !== '';
3481 }
3482 /**
3483 * Returns whether the payload is ''
3484 *
3485 * @param {*} payload
3486 * @returns {payload is string}
3487 */
3488 function isEmptyString(payload) {
3489 return payload === '';
3490 }
3491 /**
3492 * Returns whether the payload is a number (but not NaN)
3493 *
3494 * This will return `false` for `NaN`!!
3495 *
3496 * @param {*} payload
3497 * @returns {payload is number}
3498 */
3499 function isNumber(payload) {
3500 return getType(payload) === 'Number' && !isNaN(payload);
3501 }
3502 /**
3503 * Returns whether the payload is a boolean
3504 *
3505 * @param {*} payload
3506 * @returns {payload is boolean}
3507 */
3508 function isBoolean(payload) {
3509 return getType(payload) === 'Boolean';
3510 }
3511 /**
3512 * Returns whether the payload is a regular expression (RegExp)
3513 *
3514 * @param {*} payload
3515 * @returns {payload is RegExp}
3516 */
3517 function isRegExp(payload) {
3518 return getType(payload) === 'RegExp';
3519 }
3520 /**
3521 * Returns whether the payload is a Map
3522 *
3523 * @param {*} payload
3524 * @returns {payload is Map<any, any>}
3525 */
3526 function isMap(payload) {
3527 return getType(payload) === 'Map';
3528 }
3529 /**
3530 * Returns whether the payload is a WeakMap
3531 *
3532 * @param {*} payload
3533 * @returns {payload is WeakMap<any, any>}
3534 */
3535 function isWeakMap(payload) {
3536 return getType(payload) === 'WeakMap';
3537 }
3538 /**
3539 * Returns whether the payload is a Set
3540 *
3541 * @param {*} payload
3542 * @returns {payload is Set<any>}
3543 */
3544 function isSet(payload) {
3545 return getType(payload) === 'Set';
3546 }
3547 /**
3548 * Returns whether the payload is a WeakSet
3549 *
3550 * @param {*} payload
3551 * @returns {payload is WeakSet<any>}
3552 */
3553 function isWeakSet(payload) {
3554 return getType(payload) === 'WeakSet';
3555 }
3556 /**
3557 * Returns whether the payload is a Symbol
3558 *
3559 * @param {*} payload
3560 * @returns {payload is symbol}
3561 */
3562 function isSymbol(payload) {
3563 return getType(payload) === 'Symbol';
3564 }
3565 /**
3566 * Returns whether the payload is a Date, and that the date is valid
3567 *
3568 * @param {*} payload
3569 * @returns {payload is Date}
3570 */
3571 function isDate(payload) {
3572 return getType(payload) === 'Date' && !isNaN(payload);
3573 }
3574 /**
3575 * Returns whether the payload is a Blob
3576 *
3577 * @param {*} payload
3578 * @returns {payload is Blob}
3579 */
3580 function isBlob(payload) {
3581 return getType(payload) === 'Blob';
3582 }
3583 /**
3584 * Returns whether the payload is a File
3585 *
3586 * @param {*} payload
3587 * @returns {payload is File}
3588 */
3589 function isFile(payload) {
3590 return getType(payload) === 'File';
3591 }
3592 /**
3593 * Returns whether the payload is a Promise
3594 *
3595 * @param {*} payload
3596 * @returns {payload is Promise<any>}
3597 */
3598 function isPromise(payload) {
3599 return getType(payload) === 'Promise';
3600 }
3601 /**
3602 * Returns whether the payload is an Error
3603 *
3604 * @param {*} payload
3605 * @returns {payload is Error}
3606 */
3607 function isError(payload) {
3608 return getType(payload) === 'Error';
3609 }
3610 /**
3611 * Returns whether the payload is literally the value `NaN` (it's `NaN` and also a `number`)
3612 *
3613 * @param {*} payload
3614 * @returns {payload is typeof NaN}
3615 */
3616 function isNaNValue(payload) {
3617 return getType(payload) === 'Number' && isNaN(payload);
3618 }
3619 /**
3620 * Returns whether the payload is a primitive type (eg. Boolean | Null | Undefined | Number | String | Symbol)
3621 *
3622 * @param {*} payload
3623 * @returns {(payload is boolean | null | undefined | number | string | symbol)}
3624 */
3625 function isPrimitive(payload) {
3626 return (isBoolean(payload) ||
3627 isNull(payload) ||
3628 isUndefined(payload) ||
3629 isNumber(payload) ||
3630 isString(payload) ||
3631 isSymbol(payload));
3632 }
3633 /**
3634 * Returns true whether the payload is null or undefined
3635 *
3636 * @param {*} payload
3637 * @returns {(payload is null | undefined)}
3638 */
3639 var isNullOrUndefined = isOneOf(isNull, isUndefined);
3640 function isOneOf(a, b, c, d, e) {
3641 return function (value) {
3642 return a(value) || b(value) || (!!c && c(value)) || (!!d && d(value)) || (!!e && e(value));
3643 };
3644 }
3645 /**
3646 * Does a generic check to check that the given payload is of a given type.
3647 * In cases like Number, it will return true for NaN as NaN is a Number (thanks javascript!);
3648 * It will, however, differentiate between object and null
3649 *
3650 * @template T
3651 * @param {*} payload
3652 * @param {T} type
3653 * @throws {TypeError} Will throw type error if type is an invalid type
3654 * @returns {payload is T}
3655 */
3656 function isType(payload, type) {
3657 if (!(type instanceof Function)) {
3658 throw new TypeError('Type must be a function');
3659 }
3660 if (!Object.prototype.hasOwnProperty.call(type, 'prototype')) {
3661 throw new TypeError('Type is not a class');
3662 }
3663 // Classes usually have names (as functions usually have names)
3664 var name = type.name;
3665 return getType(payload) === name || Boolean(payload && payload.constructor === type);
3666 }
3667
3668
3669
3670
3671 /***/ }),
3672
3673 /***/ "./node_modules/lodash/_Symbol.js":
3674 /*!****************************************!*\
3675 !*** ./node_modules/lodash/_Symbol.js ***!
3676 \****************************************/
3677 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3678
3679 var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
3680
3681 /** Built-in value references. */
3682 var Symbol = root.Symbol;
3683
3684 module.exports = Symbol;
3685
3686
3687 /***/ }),
3688
3689 /***/ "./node_modules/lodash/_baseGetTag.js":
3690 /*!********************************************!*\
3691 !*** ./node_modules/lodash/_baseGetTag.js ***!
3692 \********************************************/
3693 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3694
3695 var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"),
3696 getRawTag = __webpack_require__(/*! ./_getRawTag */ "./node_modules/lodash/_getRawTag.js"),
3697 objectToString = __webpack_require__(/*! ./_objectToString */ "./node_modules/lodash/_objectToString.js");
3698
3699 /** `Object#toString` result references. */
3700 var nullTag = '[object Null]',
3701 undefinedTag = '[object Undefined]';
3702
3703 /** Built-in value references. */
3704 var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
3705
3706 /**
3707 * The base implementation of `getTag` without fallbacks for buggy environments.
3708 *
3709 * @private
3710 * @param {*} value The value to query.
3711 * @returns {string} Returns the `toStringTag`.
3712 */
3713 function baseGetTag(value) {
3714 if (value == null) {
3715 return value === undefined ? undefinedTag : nullTag;
3716 }
3717 return (symToStringTag && symToStringTag in Object(value))
3718 ? getRawTag(value)
3719 : objectToString(value);
3720 }
3721
3722 module.exports = baseGetTag;
3723
3724
3725 /***/ }),
3726
3727 /***/ "./node_modules/lodash/_baseTrim.js":
3728 /*!******************************************!*\
3729 !*** ./node_modules/lodash/_baseTrim.js ***!
3730 \******************************************/
3731 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3732
3733 var trimmedEndIndex = __webpack_require__(/*! ./_trimmedEndIndex */ "./node_modules/lodash/_trimmedEndIndex.js");
3734
3735 /** Used to match leading whitespace. */
3736 var reTrimStart = /^\s+/;
3737
3738 /**
3739 * The base implementation of `_.trim`.
3740 *
3741 * @private
3742 * @param {string} string The string to trim.
3743 * @returns {string} Returns the trimmed string.
3744 */
3745 function baseTrim(string) {
3746 return string
3747 ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
3748 : string;
3749 }
3750
3751 module.exports = baseTrim;
3752
3753
3754 /***/ }),
3755
3756 /***/ "./node_modules/lodash/_freeGlobal.js":
3757 /*!********************************************!*\
3758 !*** ./node_modules/lodash/_freeGlobal.js ***!
3759 \********************************************/
3760 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3761
3762 /** Detect free variable `global` from Node.js. */
3763 var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
3764
3765 module.exports = freeGlobal;
3766
3767
3768 /***/ }),
3769
3770 /***/ "./node_modules/lodash/_getRawTag.js":
3771 /*!*******************************************!*\
3772 !*** ./node_modules/lodash/_getRawTag.js ***!
3773 \*******************************************/
3774 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3775
3776 var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js");
3777
3778 /** Used for built-in method references. */
3779 var objectProto = Object.prototype;
3780
3781 /** Used to check objects for own properties. */
3782 var hasOwnProperty = objectProto.hasOwnProperty;
3783
3784 /**
3785 * Used to resolve the
3786 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3787 * of values.
3788 */
3789 var nativeObjectToString = objectProto.toString;
3790
3791 /** Built-in value references. */
3792 var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
3793
3794 /**
3795 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
3796 *
3797 * @private
3798 * @param {*} value The value to query.
3799 * @returns {string} Returns the raw `toStringTag`.
3800 */
3801 function getRawTag(value) {
3802 var isOwn = hasOwnProperty.call(value, symToStringTag),
3803 tag = value[symToStringTag];
3804
3805 try {
3806 value[symToStringTag] = undefined;
3807 var unmasked = true;
3808 } catch (e) {}
3809
3810 var result = nativeObjectToString.call(value);
3811 if (unmasked) {
3812 if (isOwn) {
3813 value[symToStringTag] = tag;
3814 } else {
3815 delete value[symToStringTag];
3816 }
3817 }
3818 return result;
3819 }
3820
3821 module.exports = getRawTag;
3822
3823
3824 /***/ }),
3825
3826 /***/ "./node_modules/lodash/_objectToString.js":
3827 /*!************************************************!*\
3828 !*** ./node_modules/lodash/_objectToString.js ***!
3829 \************************************************/
3830 /***/ ((module) => {
3831
3832 /** Used for built-in method references. */
3833 var objectProto = Object.prototype;
3834
3835 /**
3836 * Used to resolve the
3837 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3838 * of values.
3839 */
3840 var nativeObjectToString = objectProto.toString;
3841
3842 /**
3843 * Converts `value` to a string using `Object.prototype.toString`.
3844 *
3845 * @private
3846 * @param {*} value The value to convert.
3847 * @returns {string} Returns the converted string.
3848 */
3849 function objectToString(value) {
3850 return nativeObjectToString.call(value);
3851 }
3852
3853 module.exports = objectToString;
3854
3855
3856 /***/ }),
3857
3858 /***/ "./node_modules/lodash/_root.js":
3859 /*!**************************************!*\
3860 !*** ./node_modules/lodash/_root.js ***!
3861 \**************************************/
3862 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3863
3864 var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js");
3865
3866 /** Detect free variable `self`. */
3867 var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
3868
3869 /** Used as a reference to the global object. */
3870 var root = freeGlobal || freeSelf || Function('return this')();
3871
3872 module.exports = root;
3873
3874
3875 /***/ }),
3876
3877 /***/ "./node_modules/lodash/_trimmedEndIndex.js":
3878 /*!*************************************************!*\
3879 !*** ./node_modules/lodash/_trimmedEndIndex.js ***!
3880 \*************************************************/
3881 /***/ ((module) => {
3882
3883 /** Used to match a single whitespace character. */
3884 var reWhitespace = /\s/;
3885
3886 /**
3887 * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
3888 * character of `string`.
3889 *
3890 * @private
3891 * @param {string} string The string to inspect.
3892 * @returns {number} Returns the index of the last non-whitespace character.
3893 */
3894 function trimmedEndIndex(string) {
3895 var index = string.length;
3896
3897 while (index-- && reWhitespace.test(string.charAt(index))) {}
3898 return index;
3899 }
3900
3901 module.exports = trimmedEndIndex;
3902
3903
3904 /***/ }),
3905
3906 /***/ "./node_modules/lodash/debounce.js":
3907 /*!*****************************************!*\
3908 !*** ./node_modules/lodash/debounce.js ***!
3909 \*****************************************/
3910 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3911
3912 var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
3913 now = __webpack_require__(/*! ./now */ "./node_modules/lodash/now.js"),
3914 toNumber = __webpack_require__(/*! ./toNumber */ "./node_modules/lodash/toNumber.js");
3915
3916 /** Error message constants. */
3917 var FUNC_ERROR_TEXT = 'Expected a function';
3918
3919 /* Built-in method references for those with the same name as other `lodash` methods. */
3920 var nativeMax = Math.max,
3921 nativeMin = Math.min;
3922
3923 /**
3924 * Creates a debounced function that delays invoking `func` until after `wait`
3925 * milliseconds have elapsed since the last time the debounced function was
3926 * invoked. The debounced function comes with a `cancel` method to cancel
3927 * delayed `func` invocations and a `flush` method to immediately invoke them.
3928 * Provide `options` to indicate whether `func` should be invoked on the
3929 * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
3930 * with the last arguments provided to the debounced function. Subsequent
3931 * calls to the debounced function return the result of the last `func`
3932 * invocation.
3933 *
3934 * **Note:** If `leading` and `trailing` options are `true`, `func` is
3935 * invoked on the trailing edge of the timeout only if the debounced function
3936 * is invoked more than once during the `wait` timeout.
3937 *
3938 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
3939 * until to the next tick, similar to `setTimeout` with a timeout of `0`.
3940 *
3941 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
3942 * for details over the differences between `_.debounce` and `_.throttle`.
3943 *
3944 * @static
3945 * @memberOf _
3946 * @since 0.1.0
3947 * @category Function
3948 * @param {Function} func The function to debounce.
3949 * @param {number} [wait=0] The number of milliseconds to delay.
3950 * @param {Object} [options={}] The options object.
3951 * @param {boolean} [options.leading=false]
3952 * Specify invoking on the leading edge of the timeout.
3953 * @param {number} [options.maxWait]
3954 * The maximum time `func` is allowed to be delayed before it's invoked.
3955 * @param {boolean} [options.trailing=true]
3956 * Specify invoking on the trailing edge of the timeout.
3957 * @returns {Function} Returns the new debounced function.
3958 * @example
3959 *
3960 * // Avoid costly calculations while the window size is in flux.
3961 * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
3962 *
3963 * // Invoke `sendMail` when clicked, debouncing subsequent calls.
3964 * jQuery(element).on('click', _.debounce(sendMail, 300, {
3965 * 'leading': true,
3966 * 'trailing': false
3967 * }));
3968 *
3969 * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
3970 * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
3971 * var source = new EventSource('/stream');
3972 * jQuery(source).on('message', debounced);
3973 *
3974 * // Cancel the trailing debounced invocation.
3975 * jQuery(window).on('popstate', debounced.cancel);
3976 */
3977 function debounce(func, wait, options) {
3978 var lastArgs,
3979 lastThis,
3980 maxWait,
3981 result,
3982 timerId,
3983 lastCallTime,
3984 lastInvokeTime = 0,
3985 leading = false,
3986 maxing = false,
3987 trailing = true;
3988
3989 if (typeof func != 'function') {
3990 throw new TypeError(FUNC_ERROR_TEXT);
3991 }
3992 wait = toNumber(wait) || 0;
3993 if (isObject(options)) {
3994 leading = !!options.leading;
3995 maxing = 'maxWait' in options;
3996 maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
3997 trailing = 'trailing' in options ? !!options.trailing : trailing;
3998 }
3999
4000 function invokeFunc(time) {
4001 var args = lastArgs,
4002 thisArg = lastThis;
4003
4004 lastArgs = lastThis = undefined;
4005 lastInvokeTime = time;
4006 result = func.apply(thisArg, args);
4007 return result;
4008 }
4009
4010 function leadingEdge(time) {
4011 // Reset any `maxWait` timer.
4012 lastInvokeTime = time;
4013 // Start the timer for the trailing edge.
4014 timerId = setTimeout(timerExpired, wait);
4015 // Invoke the leading edge.
4016 return leading ? invokeFunc(time) : result;
4017 }
4018
4019 function remainingWait(time) {
4020 var timeSinceLastCall = time - lastCallTime,
4021 timeSinceLastInvoke = time - lastInvokeTime,
4022 timeWaiting = wait - timeSinceLastCall;
4023
4024 return maxing
4025 ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
4026 : timeWaiting;
4027 }
4028
4029 function shouldInvoke(time) {
4030 var timeSinceLastCall = time - lastCallTime,
4031 timeSinceLastInvoke = time - lastInvokeTime;
4032
4033 // Either this is the first call, activity has stopped and we're at the
4034 // trailing edge, the system time has gone backwards and we're treating
4035 // it as the trailing edge, or we've hit the `maxWait` limit.
4036 return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
4037 (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
4038 }
4039
4040 function timerExpired() {
4041 var time = now();
4042 if (shouldInvoke(time)) {
4043 return trailingEdge(time);
4044 }
4045 // Restart the timer.
4046 timerId = setTimeout(timerExpired, remainingWait(time));
4047 }
4048
4049 function trailingEdge(time) {
4050 timerId = undefined;
4051
4052 // Only invoke if we have `lastArgs` which means `func` has been
4053 // debounced at least once.
4054 if (trailing && lastArgs) {
4055 return invokeFunc(time);
4056 }
4057 lastArgs = lastThis = undefined;
4058 return result;
4059 }
4060
4061 function cancel() {
4062 if (timerId !== undefined) {
4063 clearTimeout(timerId);
4064 }
4065 lastInvokeTime = 0;
4066 lastArgs = lastCallTime = lastThis = timerId = undefined;
4067 }
4068
4069 function flush() {
4070 return timerId === undefined ? result : trailingEdge(now());
4071 }
4072
4073 function debounced() {
4074 var time = now(),
4075 isInvoking = shouldInvoke(time);
4076
4077 lastArgs = arguments;
4078 lastThis = this;
4079 lastCallTime = time;
4080
4081 if (isInvoking) {
4082 if (timerId === undefined) {
4083 return leadingEdge(lastCallTime);
4084 }
4085 if (maxing) {
4086 // Handle invocations in a tight loop.
4087 clearTimeout(timerId);
4088 timerId = setTimeout(timerExpired, wait);
4089 return invokeFunc(lastCallTime);
4090 }
4091 }
4092 if (timerId === undefined) {
4093 timerId = setTimeout(timerExpired, wait);
4094 }
4095 return result;
4096 }
4097 debounced.cancel = cancel;
4098 debounced.flush = flush;
4099 return debounced;
4100 }
4101
4102 module.exports = debounce;
4103
4104
4105 /***/ }),
4106
4107 /***/ "./node_modules/lodash/isObject.js":
4108 /*!*****************************************!*\
4109 !*** ./node_modules/lodash/isObject.js ***!
4110 \*****************************************/
4111 /***/ ((module) => {
4112
4113 /**
4114 * Checks if `value` is the
4115 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
4116 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
4117 *
4118 * @static
4119 * @memberOf _
4120 * @since 0.1.0
4121 * @category Lang
4122 * @param {*} value The value to check.
4123 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
4124 * @example
4125 *
4126 * _.isObject({});
4127 * // => true
4128 *
4129 * _.isObject([1, 2, 3]);
4130 * // => true
4131 *
4132 * _.isObject(_.noop);
4133 * // => true
4134 *
4135 * _.isObject(null);
4136 * // => false
4137 */
4138 function isObject(value) {
4139 var type = typeof value;
4140 return value != null && (type == 'object' || type == 'function');
4141 }
4142
4143 module.exports = isObject;
4144
4145
4146 /***/ }),
4147
4148 /***/ "./node_modules/lodash/isObjectLike.js":
4149 /*!*********************************************!*\
4150 !*** ./node_modules/lodash/isObjectLike.js ***!
4151 \*********************************************/
4152 /***/ ((module) => {
4153
4154 /**
4155 * Checks if `value` is object-like. A value is object-like if it's not `null`
4156 * and has a `typeof` result of "object".
4157 *
4158 * @static
4159 * @memberOf _
4160 * @since 4.0.0
4161 * @category Lang
4162 * @param {*} value The value to check.
4163 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
4164 * @example
4165 *
4166 * _.isObjectLike({});
4167 * // => true
4168 *
4169 * _.isObjectLike([1, 2, 3]);
4170 * // => true
4171 *
4172 * _.isObjectLike(_.noop);
4173 * // => false
4174 *
4175 * _.isObjectLike(null);
4176 * // => false
4177 */
4178 function isObjectLike(value) {
4179 return value != null && typeof value == 'object';
4180 }
4181
4182 module.exports = isObjectLike;
4183
4184
4185 /***/ }),
4186
4187 /***/ "./node_modules/lodash/isSymbol.js":
4188 /*!*****************************************!*\
4189 !*** ./node_modules/lodash/isSymbol.js ***!
4190 \*****************************************/
4191 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4192
4193 var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
4194 isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
4195
4196 /** `Object#toString` result references. */
4197 var symbolTag = '[object Symbol]';
4198
4199 /**
4200 * Checks if `value` is classified as a `Symbol` primitive or object.
4201 *
4202 * @static
4203 * @memberOf _
4204 * @since 4.0.0
4205 * @category Lang
4206 * @param {*} value The value to check.
4207 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
4208 * @example
4209 *
4210 * _.isSymbol(Symbol.iterator);
4211 * // => true
4212 *
4213 * _.isSymbol('abc');
4214 * // => false
4215 */
4216 function isSymbol(value) {
4217 return typeof value == 'symbol' ||
4218 (isObjectLike(value) && baseGetTag(value) == symbolTag);
4219 }
4220
4221 module.exports = isSymbol;
4222
4223
4224 /***/ }),
4225
4226 /***/ "./node_modules/lodash/now.js":
4227 /*!************************************!*\
4228 !*** ./node_modules/lodash/now.js ***!
4229 \************************************/
4230 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4231
4232 var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
4233
4234 /**
4235 * Gets the timestamp of the number of milliseconds that have elapsed since
4236 * the Unix epoch (1 January 1970 00:00:00 UTC).
4237 *
4238 * @static
4239 * @memberOf _
4240 * @since 2.4.0
4241 * @category Date
4242 * @returns {number} Returns the timestamp.
4243 * @example
4244 *
4245 * _.defer(function(stamp) {
4246 * console.log(_.now() - stamp);
4247 * }, _.now());
4248 * // => Logs the number of milliseconds it took for the deferred invocation.
4249 */
4250 var now = function() {
4251 return root.Date.now();
4252 };
4253
4254 module.exports = now;
4255
4256
4257 /***/ }),
4258
4259 /***/ "./node_modules/lodash/toNumber.js":
4260 /*!*****************************************!*\
4261 !*** ./node_modules/lodash/toNumber.js ***!
4262 \*****************************************/
4263 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4264
4265 var baseTrim = __webpack_require__(/*! ./_baseTrim */ "./node_modules/lodash/_baseTrim.js"),
4266 isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
4267 isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js");
4268
4269 /** Used as references for various `Number` constants. */
4270 var NAN = 0 / 0;
4271
4272 /** Used to detect bad signed hexadecimal string values. */
4273 var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
4274
4275 /** Used to detect binary string values. */
4276 var reIsBinary = /^0b[01]+$/i;
4277
4278 /** Used to detect octal string values. */
4279 var reIsOctal = /^0o[0-7]+$/i;
4280
4281 /** Built-in method references without a dependency on `root`. */
4282 var freeParseInt = parseInt;
4283
4284 /**
4285 * Converts `value` to a number.
4286 *
4287 * @static
4288 * @memberOf _
4289 * @since 4.0.0
4290 * @category Lang
4291 * @param {*} value The value to process.
4292 * @returns {number} Returns the number.
4293 * @example
4294 *
4295 * _.toNumber(3.2);
4296 * // => 3.2
4297 *
4298 * _.toNumber(Number.MIN_VALUE);
4299 * // => 5e-324
4300 *
4301 * _.toNumber(Infinity);
4302 * // => Infinity
4303 *
4304 * _.toNumber('3.2');
4305 * // => 3.2
4306 */
4307 function toNumber(value) {
4308 if (typeof value == 'number') {
4309 return value;
4310 }
4311 if (isSymbol(value)) {
4312 return NAN;
4313 }
4314 if (isObject(value)) {
4315 var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
4316 value = isObject(other) ? (other + '') : other;
4317 }
4318 if (typeof value != 'string') {
4319 return value === 0 ? value : +value;
4320 }
4321 value = baseTrim(value);
4322 var isBinary = reIsBinary.test(value);
4323 return (isBinary || reIsOctal.test(value))
4324 ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
4325 : (reIsBadHex.test(value) ? NAN : +value);
4326 }
4327
4328 module.exports = toNumber;
4329
4330
4331 /***/ }),
4332
4333 /***/ "./node_modules/memoize-one/dist/memoize-one.esm.js":
4334 /*!**********************************************************!*\
4335 !*** ./node_modules/memoize-one/dist/memoize-one.esm.js ***!
4336 \**********************************************************/
4337 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4338
4339 "use strict";
4340 __webpack_require__.r(__webpack_exports__);
4341 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4342 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
4343 /* harmony export */ });
4344 var safeIsNaN = Number.isNaN ||
4345 function ponyfill(value) {
4346 return typeof value === 'number' && value !== value;
4347 };
4348 function isEqual(first, second) {
4349 if (first === second) {
4350 return true;
4351 }
4352 if (safeIsNaN(first) && safeIsNaN(second)) {
4353 return true;
4354 }
4355 return false;
4356 }
4357 function areInputsEqual(newInputs, lastInputs) {
4358 if (newInputs.length !== lastInputs.length) {
4359 return false;
4360 }
4361 for (var i = 0; i < newInputs.length; i++) {
4362 if (!isEqual(newInputs[i], lastInputs[i])) {
4363 return false;
4364 }
4365 }
4366 return true;
4367 }
4368
4369 function memoizeOne(resultFn, isEqual) {
4370 if (isEqual === void 0) { isEqual = areInputsEqual; }
4371 var lastThis;
4372 var lastArgs = [];
4373 var lastResult;
4374 var calledOnce = false;
4375 function memoized() {
4376 var newArgs = [];
4377 for (var _i = 0; _i < arguments.length; _i++) {
4378 newArgs[_i] = arguments[_i];
4379 }
4380 if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {
4381 return lastResult;
4382 }
4383 lastResult = resultFn.apply(this, newArgs);
4384 calledOnce = true;
4385 lastThis = this;
4386 lastArgs = newArgs;
4387 return lastResult;
4388 }
4389 return memoized;
4390 }
4391
4392 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoizeOne);
4393
4394
4395 /***/ }),
4396
4397 /***/ "./node_modules/merge-anything/dist/index.esm.js":
4398 /*!*******************************************************!*\
4399 !*** ./node_modules/merge-anything/dist/index.esm.js ***!
4400 \*******************************************************/
4401 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4402
4403 "use strict";
4404 __webpack_require__.r(__webpack_exports__);
4405 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4406 /* harmony export */ "concatArrays": () => (/* binding */ concatArrays),
4407 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
4408 /* harmony export */ "merge": () => (/* binding */ merge)
4409 /* harmony export */ });
4410 /* harmony import */ var is_what__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-what */ "./node_modules/is-what/dist/index.esm.js");
4411
4412
4413 /*! *****************************************************************************
4414 Copyright (c) Microsoft Corporation. All rights reserved.
4415 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4416 this file except in compliance with the License. You may obtain a copy of the
4417 License at http://www.apache.org/licenses/LICENSE-2.0
4418
4419 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
4420 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
4421 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
4422 MERCHANTABLITY OR NON-INFRINGEMENT.
4423
4424 See the Apache Version 2.0 License for specific language governing permissions
4425 and limitations under the License.
4426 ***************************************************************************** */
4427
4428 function __spreadArrays() {
4429 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
4430 for (var r = Array(s), k = 0, i = 0; i < il; i++)
4431 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
4432 r[k] = a[j];
4433 return r;
4434 }
4435
4436 function assignProp(carry, key, newVal, originalObject) {
4437 var propType = originalObject.propertyIsEnumerable(key)
4438 ? 'enumerable'
4439 : 'nonenumerable';
4440 if (propType === 'enumerable')
4441 carry[key] = newVal;
4442 if (propType === 'nonenumerable') {
4443 Object.defineProperty(carry, key, {
4444 value: newVal,
4445 enumerable: false,
4446 writable: true,
4447 configurable: true
4448 });
4449 }
4450 }
4451 function mergeRecursively(origin, newComer, extensions) {
4452 // work directly on newComer if its not an object
4453 if (!(0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(newComer)) {
4454 // extend merge rules
4455 if (extensions && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(extensions)) {
4456 extensions.forEach(function (extend) {
4457 newComer = extend(origin, newComer);
4458 });
4459 }
4460 return newComer;
4461 }
4462 // define newObject to merge all values upon
4463 var newObject = {};
4464 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin)) {
4465 var props_1 = Object.getOwnPropertyNames(origin);
4466 var symbols_1 = Object.getOwnPropertySymbols(origin);
4467 newObject = __spreadArrays(props_1, symbols_1).reduce(function (carry, key) {
4468 // @ts-ignore
4469 var targetVal = origin[key];
4470 if ((!(0,is_what__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) && !Object.getOwnPropertyNames(newComer).includes(key)) ||
4471 ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) && !Object.getOwnPropertySymbols(newComer).includes(key))) {
4472 assignProp(carry, key, targetVal, origin);
4473 }
4474 return carry;
4475 }, {});
4476 }
4477 var props = Object.getOwnPropertyNames(newComer);
4478 var symbols = Object.getOwnPropertySymbols(newComer);
4479 var result = __spreadArrays(props, symbols).reduce(function (carry, key) {
4480 // re-define the origin and newComer as targetVal and newVal
4481 var newVal = newComer[key];
4482 var targetVal = ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin))
4483 // @ts-ignore
4484 ? origin[key]
4485 : undefined;
4486 // extend merge rules
4487 if (extensions && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(extensions)) {
4488 extensions.forEach(function (extend) {
4489 newVal = extend(targetVal, newVal);
4490 });
4491 }
4492 // When newVal is an object do the merge recursively
4493 if (targetVal !== undefined && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(newVal)) {
4494 newVal = mergeRecursively(targetVal, newVal, extensions);
4495 }
4496 assignProp(carry, key, newVal, newComer);
4497 return carry;
4498 }, newObject);
4499 return result;
4500 }
4501 /**
4502 * Merge anything recursively.
4503 * Objects get merged, special objects (classes etc.) are re-assigned "as is".
4504 * Basic types overwrite objects or other basic types.
4505 *
4506 * @param {(IConfig | any)} origin
4507 * @param {...any[]} newComers
4508 * @returns the result
4509 */
4510 function merge(origin) {
4511 var newComers = [];
4512 for (var _i = 1; _i < arguments.length; _i++) {
4513 newComers[_i - 1] = arguments[_i];
4514 }
4515 var extensions = null;
4516 var base = origin;
4517 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin) && origin.extensions && Object.keys(origin).length === 1) {
4518 base = {};
4519 extensions = origin.extensions;
4520 }
4521 return newComers.reduce(function (result, newComer) {
4522 return mergeRecursively(result, newComer, extensions);
4523 }, base);
4524 }
4525
4526 function concatArrays(originVal, newVal) {
4527 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(originVal) && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(newVal)) {
4528 // concat logic
4529 return originVal.concat(newVal);
4530 }
4531 return newVal; // always return newVal as fallback!!
4532 }
4533
4534 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (merge);
4535
4536
4537
4538 /***/ }),
4539
4540 /***/ "./scripts/gutenberg/UIComponents/UIImage.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/gutenberg/UIComponents/UIImage.ts":
4541 /*!****************************************************************************************************************************************************************************************!*\
4542 !*** ./scripts/gutenberg/UIComponents/UIImage.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/gutenberg/UIComponents/UIImage.ts ***!
4543 \****************************************************************************************************************************************************************************************/
4544 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4545
4546 "use strict";
4547 __webpack_require__.r(__webpack_exports__);
4548 // extracted by mini-css-extract-plugin
4549
4550
4551 /***/ }),
4552
4553 /***/ "./scripts/shared/Common/AsyncSelect.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/AsyncSelect.tsx":
4554 /*!*******************************************************************************************************************************************************************************!*\
4555 !*** ./scripts/shared/Common/AsyncSelect.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/AsyncSelect.tsx ***!
4556 \*******************************************************************************************************************************************************************************/
4557 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4558
4559 "use strict";
4560 __webpack_require__.r(__webpack_exports__);
4561 // extracted by mini-css-extract-plugin
4562
4563
4564 /***/ }),
4565
4566 /***/ "./scripts/shared/Common/HubspotWrapper.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/HubspotWrapper.ts":
4567 /*!************************************************************************************************************************************************************************************!*\
4568 !*** ./scripts/shared/Common/HubspotWrapper.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/HubspotWrapper.ts ***!
4569 \************************************************************************************************************************************************************************************/
4570 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4571
4572 "use strict";
4573 __webpack_require__.r(__webpack_exports__);
4574 // extracted by mini-css-extract-plugin
4575
4576
4577 /***/ }),
4578
4579 /***/ "./scripts/shared/UIComponents/UIAlert.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIAlert.tsx":
4580 /*!***********************************************************************************************************************************************************************************!*\
4581 !*** ./scripts/shared/UIComponents/UIAlert.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIAlert.tsx ***!
4582 \***********************************************************************************************************************************************************************************/
4583 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4584
4585 "use strict";
4586 __webpack_require__.r(__webpack_exports__);
4587 // extracted by mini-css-extract-plugin
4588
4589
4590 /***/ }),
4591
4592 /***/ "./scripts/shared/UIComponents/UIButton.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIButton.ts":
4593 /*!************************************************************************************************************************************************************************************!*\
4594 !*** ./scripts/shared/UIComponents/UIButton.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIButton.ts ***!
4595 \************************************************************************************************************************************************************************************/
4596 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4597
4598 "use strict";
4599 __webpack_require__.r(__webpack_exports__);
4600 // extracted by mini-css-extract-plugin
4601
4602
4603 /***/ }),
4604
4605 /***/ "./scripts/shared/UIComponents/UIContainer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIContainer.ts":
4606 /*!******************************************************************************************************************************************************************************************!*\
4607 !*** ./scripts/shared/UIComponents/UIContainer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIContainer.ts ***!
4608 \******************************************************************************************************************************************************************************************/
4609 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4610
4611 "use strict";
4612 __webpack_require__.r(__webpack_exports__);
4613 // extracted by mini-css-extract-plugin
4614
4615
4616 /***/ }),
4617
4618 /***/ "./scripts/shared/UIComponents/UIOverlay.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIOverlay.ts":
4619 /*!**************************************************************************************************************************************************************************************!*\
4620 !*** ./scripts/shared/UIComponents/UIOverlay.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIOverlay.ts ***!
4621 \**************************************************************************************************************************************************************************************/
4622 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4623
4624 "use strict";
4625 __webpack_require__.r(__webpack_exports__);
4626 // extracted by mini-css-extract-plugin
4627
4628
4629 /***/ }),
4630
4631 /***/ "./scripts/shared/UIComponents/UISpacer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpacer.ts":
4632 /*!************************************************************************************************************************************************************************************!*\
4633 !*** ./scripts/shared/UIComponents/UISpacer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpacer.ts ***!
4634 \************************************************************************************************************************************************************************************/
4635 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4636
4637 "use strict";
4638 __webpack_require__.r(__webpack_exports__);
4639 // extracted by mini-css-extract-plugin
4640
4641
4642 /***/ }),
4643
4644 /***/ "./scripts/shared/UIComponents/UISpinner.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpinner.tsx":
4645 /*!***************************************************************************************************************************************************************************************!*\
4646 !*** ./scripts/shared/UIComponents/UISpinner.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpinner.tsx ***!
4647 \***************************************************************************************************************************************************************************************/
4648 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4649
4650 "use strict";
4651 __webpack_require__.r(__webpack_exports__);
4652 // extracted by mini-css-extract-plugin
4653
4654
4655 /***/ }),
4656
4657 /***/ "./node_modules/object-assign/index.js":
4658 /*!*********************************************!*\
4659 !*** ./node_modules/object-assign/index.js ***!
4660 \*********************************************/
4661 /***/ ((module) => {
4662
4663 "use strict";
4664 /*
4665 object-assign
4666 (c) Sindre Sorhus
4667 @license MIT
4668 */
4669
4670
4671 /* eslint-disable no-unused-vars */
4672 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
4673 var hasOwnProperty = Object.prototype.hasOwnProperty;
4674 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
4675
4676 function toObject(val) {
4677 if (val === null || val === undefined) {
4678 throw new TypeError('Object.assign cannot be called with null or undefined');
4679 }
4680
4681 return Object(val);
4682 }
4683
4684 function shouldUseNative() {
4685 try {
4686 if (!Object.assign) {
4687 return false;
4688 }
4689
4690 // Detect buggy property enumeration order in older V8 versions.
4691
4692 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
4693 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
4694 test1[5] = 'de';
4695 if (Object.getOwnPropertyNames(test1)[0] === '5') {
4696 return false;
4697 }
4698
4699 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4700 var test2 = {};
4701 for (var i = 0; i < 10; i++) {
4702 test2['_' + String.fromCharCode(i)] = i;
4703 }
4704 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
4705 return test2[n];
4706 });
4707 if (order2.join('') !== '0123456789') {
4708 return false;
4709 }
4710
4711 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4712 var test3 = {};
4713 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
4714 test3[letter] = letter;
4715 });
4716 if (Object.keys(Object.assign({}, test3)).join('') !==
4717 'abcdefghijklmnopqrst') {
4718 return false;
4719 }
4720
4721 return true;
4722 } catch (err) {
4723 // We don't expect any of the above to throw, but better to be safe.
4724 return false;
4725 }
4726 }
4727
4728 module.exports = shouldUseNative() ? Object.assign : function (target, source) {
4729 var from;
4730 var to = toObject(target);
4731 var symbols;
4732
4733 for (var s = 1; s < arguments.length; s++) {
4734 from = Object(arguments[s]);
4735
4736 for (var key in from) {
4737 if (hasOwnProperty.call(from, key)) {
4738 to[key] = from[key];
4739 }
4740 }
4741
4742 if (getOwnPropertySymbols) {
4743 symbols = getOwnPropertySymbols(from);
4744 for (var i = 0; i < symbols.length; i++) {
4745 if (propIsEnumerable.call(from, symbols[i])) {
4746 to[symbols[i]] = from[symbols[i]];
4747 }
4748 }
4749 }
4750 }
4751
4752 return to;
4753 };
4754
4755
4756 /***/ }),
4757
4758 /***/ "./node_modules/prop-types/checkPropTypes.js":
4759 /*!***************************************************!*\
4760 !*** ./node_modules/prop-types/checkPropTypes.js ***!
4761 \***************************************************/
4762 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4763
4764 "use strict";
4765 /**
4766 * Copyright (c) 2013-present, Facebook, Inc.
4767 *
4768 * This source code is licensed under the MIT license found in the
4769 * LICENSE file in the root directory of this source tree.
4770 */
4771
4772
4773
4774 var printWarning = function() {};
4775
4776 if (true) {
4777 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
4778 var loggedTypeFailures = {};
4779 var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
4780
4781 printWarning = function(text) {
4782 var message = 'Warning: ' + text;
4783 if (typeof console !== 'undefined') {
4784 console.error(message);
4785 }
4786 try {
4787 // --- Welcome to debugging React ---
4788 // This error was thrown as a convenience so that you can use this stack
4789 // to find the callsite that caused this warning to fire.
4790 throw new Error(message);
4791 } catch (x) { /**/ }
4792 };
4793 }
4794
4795 /**
4796 * Assert that the values match with the type specs.
4797 * Error messages are memorized and will only be shown once.
4798 *
4799 * @param {object} typeSpecs Map of name to a ReactPropType
4800 * @param {object} values Runtime values that need to be type-checked
4801 * @param {string} location e.g. "prop", "context", "child context"
4802 * @param {string} componentName Name of the component for error messages.
4803 * @param {?Function} getStack Returns the component stack.
4804 * @private
4805 */
4806 function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
4807 if (true) {
4808 for (var typeSpecName in typeSpecs) {
4809 if (has(typeSpecs, typeSpecName)) {
4810 var error;
4811 // Prop type validation may throw. In case they do, we don't want to
4812 // fail the render phase where it didn't fail before. So we log it.
4813 // After these have been cleaned up, we'll let them throw.
4814 try {
4815 // This is intentionally an invariant that gets caught. It's the same
4816 // behavior as without this statement except with a better message.
4817 if (typeof typeSpecs[typeSpecName] !== 'function') {
4818 var err = Error(
4819 (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
4820 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
4821 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
4822 );
4823 err.name = 'Invariant Violation';
4824 throw err;
4825 }
4826 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
4827 } catch (ex) {
4828 error = ex;
4829 }
4830 if (error && !(error instanceof Error)) {
4831 printWarning(
4832 (componentName || 'React class') + ': type specification of ' +
4833 location + ' `' + typeSpecName + '` is invalid; the type checker ' +
4834 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
4835 'You may have forgotten to pass an argument to the type checker ' +
4836 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
4837 'shape all require an argument).'
4838 );
4839 }
4840 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
4841 // Only monitor this failure once because there tends to be a lot of the
4842 // same error.
4843 loggedTypeFailures[error.message] = true;
4844
4845 var stack = getStack ? getStack() : '';
4846
4847 printWarning(
4848 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
4849 );
4850 }
4851 }
4852 }
4853 }
4854 }
4855
4856 /**
4857 * Resets warning cache when testing.
4858 *
4859 * @private
4860 */
4861 checkPropTypes.resetWarningCache = function() {
4862 if (true) {
4863 loggedTypeFailures = {};
4864 }
4865 }
4866
4867 module.exports = checkPropTypes;
4868
4869
4870 /***/ }),
4871
4872 /***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
4873 /*!************************************************************!*\
4874 !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
4875 \************************************************************/
4876 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4877
4878 "use strict";
4879 /**
4880 * Copyright (c) 2013-present, Facebook, Inc.
4881 *
4882 * This source code is licensed under the MIT license found in the
4883 * LICENSE file in the root directory of this source tree.
4884 */
4885
4886
4887
4888 var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
4889 var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
4890
4891 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
4892 var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
4893 var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
4894
4895 var printWarning = function() {};
4896
4897 if (true) {
4898 printWarning = function(text) {
4899 var message = 'Warning: ' + text;
4900 if (typeof console !== 'undefined') {
4901 console.error(message);
4902 }
4903 try {
4904 // --- Welcome to debugging React ---
4905 // This error was thrown as a convenience so that you can use this stack
4906 // to find the callsite that caused this warning to fire.
4907 throw new Error(message);
4908 } catch (x) {}
4909 };
4910 }
4911
4912 function emptyFunctionThatReturnsNull() {
4913 return null;
4914 }
4915
4916 module.exports = function(isValidElement, throwOnDirectAccess) {
4917 /* global Symbol */
4918 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
4919 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
4920
4921 /**
4922 * Returns the iterator method function contained on the iterable object.
4923 *
4924 * Be sure to invoke the function with the iterable as context:
4925 *
4926 * var iteratorFn = getIteratorFn(myIterable);
4927 * if (iteratorFn) {
4928 * var iterator = iteratorFn.call(myIterable);
4929 * ...
4930 * }
4931 *
4932 * @param {?object} maybeIterable
4933 * @return {?function}
4934 */
4935 function getIteratorFn(maybeIterable) {
4936 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
4937 if (typeof iteratorFn === 'function') {
4938 return iteratorFn;
4939 }
4940 }
4941
4942 /**
4943 * Collection of methods that allow declaration and validation of props that are
4944 * supplied to React components. Example usage:
4945 *
4946 * var Props = require('ReactPropTypes');
4947 * var MyArticle = React.createClass({
4948 * propTypes: {
4949 * // An optional string prop named "description".
4950 * description: Props.string,
4951 *
4952 * // A required enum prop named "category".
4953 * category: Props.oneOf(['News','Photos']).isRequired,
4954 *
4955 * // A prop named "dialog" that requires an instance of Dialog.
4956 * dialog: Props.instanceOf(Dialog).isRequired
4957 * },
4958 * render: function() { ... }
4959 * });
4960 *
4961 * A more formal specification of how these methods are used:
4962 *
4963 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
4964 * decl := ReactPropTypes.{type}(.isRequired)?
4965 *
4966 * Each and every declaration produces a function with the same signature. This
4967 * allows the creation of custom validation functions. For example:
4968 *
4969 * var MyLink = React.createClass({
4970 * propTypes: {
4971 * // An optional string or URI prop named "href".
4972 * href: function(props, propName, componentName) {
4973 * var propValue = props[propName];
4974 * if (propValue != null && typeof propValue !== 'string' &&
4975 * !(propValue instanceof URI)) {
4976 * return new Error(
4977 * 'Expected a string or an URI for ' + propName + ' in ' +
4978 * componentName
4979 * );
4980 * }
4981 * }
4982 * },
4983 * render: function() {...}
4984 * });
4985 *
4986 * @internal
4987 */
4988
4989 var ANONYMOUS = '<<anonymous>>';
4990
4991 // Important!
4992 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
4993 var ReactPropTypes = {
4994 array: createPrimitiveTypeChecker('array'),
4995 bigint: createPrimitiveTypeChecker('bigint'),
4996 bool: createPrimitiveTypeChecker('boolean'),
4997 func: createPrimitiveTypeChecker('function'),
4998 number: createPrimitiveTypeChecker('number'),
4999 object: createPrimitiveTypeChecker('object'),
5000 string: createPrimitiveTypeChecker('string'),
5001 symbol: createPrimitiveTypeChecker('symbol'),
5002
5003 any: createAnyTypeChecker(),
5004 arrayOf: createArrayOfTypeChecker,
5005 element: createElementTypeChecker(),
5006 elementType: createElementTypeTypeChecker(),
5007 instanceOf: createInstanceTypeChecker,
5008 node: createNodeChecker(),
5009 objectOf: createObjectOfTypeChecker,
5010 oneOf: createEnumTypeChecker,
5011 oneOfType: createUnionTypeChecker,
5012 shape: createShapeTypeChecker,
5013 exact: createStrictShapeTypeChecker,
5014 };
5015
5016 /**
5017 * inlined Object.is polyfill to avoid requiring consumers ship their own
5018 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
5019 */
5020 /*eslint-disable no-self-compare*/
5021 function is(x, y) {
5022 // SameValue algorithm
5023 if (x === y) {
5024 // Steps 1-5, 7-10
5025 // Steps 6.b-6.e: +0 != -0
5026 return x !== 0 || 1 / x === 1 / y;
5027 } else {
5028 // Step 6.a: NaN == NaN
5029 return x !== x && y !== y;
5030 }
5031 }
5032 /*eslint-enable no-self-compare*/
5033
5034 /**
5035 * We use an Error-like object for backward compatibility as people may call
5036 * PropTypes directly and inspect their output. However, we don't use real
5037 * Errors anymore. We don't inspect their stack anyway, and creating them
5038 * is prohibitively expensive if they are created too often, such as what
5039 * happens in oneOfType() for any type before the one that matched.
5040 */
5041 function PropTypeError(message, data) {
5042 this.message = message;
5043 this.data = data && typeof data === 'object' ? data: {};
5044 this.stack = '';
5045 }
5046 // Make `instanceof Error` still work for returned errors.
5047 PropTypeError.prototype = Error.prototype;
5048
5049 function createChainableTypeChecker(validate) {
5050 if (true) {
5051 var manualPropTypeCallCache = {};
5052 var manualPropTypeWarningCount = 0;
5053 }
5054 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
5055 componentName = componentName || ANONYMOUS;
5056 propFullName = propFullName || propName;
5057
5058 if (secret !== ReactPropTypesSecret) {
5059 if (throwOnDirectAccess) {
5060 // New behavior only for users of `prop-types` package
5061 var err = new Error(
5062 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
5063 'Use `PropTypes.checkPropTypes()` to call them. ' +
5064 'Read more at http://fb.me/use-check-prop-types'
5065 );
5066 err.name = 'Invariant Violation';
5067 throw err;
5068 } else if ( true && typeof console !== 'undefined') {
5069 // Old behavior for people using React.PropTypes
5070 var cacheKey = componentName + ':' + propName;
5071 if (
5072 !manualPropTypeCallCache[cacheKey] &&
5073 // Avoid spamming the console because they are often not actionable except for lib authors
5074 manualPropTypeWarningCount < 3
5075 ) {
5076 printWarning(
5077 'You are manually calling a React.PropTypes validation ' +
5078 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
5079 'and will throw in the standalone `prop-types` package. ' +
5080 'You may be seeing this warning due to a third-party PropTypes ' +
5081 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
5082 );
5083 manualPropTypeCallCache[cacheKey] = true;
5084 manualPropTypeWarningCount++;
5085 }
5086 }
5087 }
5088 if (props[propName] == null) {
5089 if (isRequired) {
5090 if (props[propName] === null) {
5091 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
5092 }
5093 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
5094 }
5095 return null;
5096 } else {
5097 return validate(props, propName, componentName, location, propFullName);
5098 }
5099 }
5100
5101 var chainedCheckType = checkType.bind(null, false);
5102 chainedCheckType.isRequired = checkType.bind(null, true);
5103
5104 return chainedCheckType;
5105 }
5106
5107 function createPrimitiveTypeChecker(expectedType) {
5108 function validate(props, propName, componentName, location, propFullName, secret) {
5109 var propValue = props[propName];
5110 var propType = getPropType(propValue);
5111 if (propType !== expectedType) {
5112 // `propValue` being instance of, say, date/regexp, pass the 'object'
5113 // check, but we can offer a more precise error message here rather than
5114 // 'of type `object`'.
5115 var preciseType = getPreciseType(propValue);
5116
5117 return new PropTypeError(
5118 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
5119 {expectedType: expectedType}
5120 );
5121 }
5122 return null;
5123 }
5124 return createChainableTypeChecker(validate);
5125 }
5126
5127 function createAnyTypeChecker() {
5128 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
5129 }
5130
5131 function createArrayOfTypeChecker(typeChecker) {
5132 function validate(props, propName, componentName, location, propFullName) {
5133 if (typeof typeChecker !== 'function') {
5134 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
5135 }
5136 var propValue = props[propName];
5137 if (!Array.isArray(propValue)) {
5138 var propType = getPropType(propValue);
5139 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
5140 }
5141 for (var i = 0; i < propValue.length; i++) {
5142 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
5143 if (error instanceof Error) {
5144 return error;
5145 }
5146 }
5147 return null;
5148 }
5149 return createChainableTypeChecker(validate);
5150 }
5151
5152 function createElementTypeChecker() {
5153 function validate(props, propName, componentName, location, propFullName) {
5154 var propValue = props[propName];
5155 if (!isValidElement(propValue)) {
5156 var propType = getPropType(propValue);
5157 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
5158 }
5159 return null;
5160 }
5161 return createChainableTypeChecker(validate);
5162 }
5163
5164 function createElementTypeTypeChecker() {
5165 function validate(props, propName, componentName, location, propFullName) {
5166 var propValue = props[propName];
5167 if (!ReactIs.isValidElementType(propValue)) {
5168 var propType = getPropType(propValue);
5169 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
5170 }
5171 return null;
5172 }
5173 return createChainableTypeChecker(validate);
5174 }
5175
5176 function createInstanceTypeChecker(expectedClass) {
5177 function validate(props, propName, componentName, location, propFullName) {
5178 if (!(props[propName] instanceof expectedClass)) {
5179 var expectedClassName = expectedClass.name || ANONYMOUS;
5180 var actualClassName = getClassName(props[propName]);
5181 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
5182 }
5183 return null;
5184 }
5185 return createChainableTypeChecker(validate);
5186 }
5187
5188 function createEnumTypeChecker(expectedValues) {
5189 if (!Array.isArray(expectedValues)) {
5190 if (true) {
5191 if (arguments.length > 1) {
5192 printWarning(
5193 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
5194 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
5195 );
5196 } else {
5197 printWarning('Invalid argument supplied to oneOf, expected an array.');
5198 }
5199 }
5200 return emptyFunctionThatReturnsNull;
5201 }
5202
5203 function validate(props, propName, componentName, location, propFullName) {
5204 var propValue = props[propName];
5205 for (var i = 0; i < expectedValues.length; i++) {
5206 if (is(propValue, expectedValues[i])) {
5207 return null;
5208 }
5209 }
5210
5211 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
5212 var type = getPreciseType(value);
5213 if (type === 'symbol') {
5214 return String(value);
5215 }
5216 return value;
5217 });
5218 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
5219 }
5220 return createChainableTypeChecker(validate);
5221 }
5222
5223 function createObjectOfTypeChecker(typeChecker) {
5224 function validate(props, propName, componentName, location, propFullName) {
5225 if (typeof typeChecker !== 'function') {
5226 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
5227 }
5228 var propValue = props[propName];
5229 var propType = getPropType(propValue);
5230 if (propType !== 'object') {
5231 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
5232 }
5233 for (var key in propValue) {
5234 if (has(propValue, key)) {
5235 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5236 if (error instanceof Error) {
5237 return error;
5238 }
5239 }
5240 }
5241 return null;
5242 }
5243 return createChainableTypeChecker(validate);
5244 }
5245
5246 function createUnionTypeChecker(arrayOfTypeCheckers) {
5247 if (!Array.isArray(arrayOfTypeCheckers)) {
5248 true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
5249 return emptyFunctionThatReturnsNull;
5250 }
5251
5252 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5253 var checker = arrayOfTypeCheckers[i];
5254 if (typeof checker !== 'function') {
5255 printWarning(
5256 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
5257 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
5258 );
5259 return emptyFunctionThatReturnsNull;
5260 }
5261 }
5262
5263 function validate(props, propName, componentName, location, propFullName) {
5264 var expectedTypes = [];
5265 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5266 var checker = arrayOfTypeCheckers[i];
5267 var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
5268 if (checkerResult == null) {
5269 return null;
5270 }
5271 if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
5272 expectedTypes.push(checkerResult.data.expectedType);
5273 }
5274 }
5275 var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
5276 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
5277 }
5278 return createChainableTypeChecker(validate);
5279 }
5280
5281 function createNodeChecker() {
5282 function validate(props, propName, componentName, location, propFullName) {
5283 if (!isNode(props[propName])) {
5284 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
5285 }
5286 return null;
5287 }
5288 return createChainableTypeChecker(validate);
5289 }
5290
5291 function invalidValidatorError(componentName, location, propFullName, key, type) {
5292 return new PropTypeError(
5293 (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
5294 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
5295 );
5296 }
5297
5298 function createShapeTypeChecker(shapeTypes) {
5299 function validate(props, propName, componentName, location, propFullName) {
5300 var propValue = props[propName];
5301 var propType = getPropType(propValue);
5302 if (propType !== 'object') {
5303 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5304 }
5305 for (var key in shapeTypes) {
5306 var checker = shapeTypes[key];
5307 if (typeof checker !== 'function') {
5308 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
5309 }
5310 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5311 if (error) {
5312 return error;
5313 }
5314 }
5315 return null;
5316 }
5317 return createChainableTypeChecker(validate);
5318 }
5319
5320 function createStrictShapeTypeChecker(shapeTypes) {
5321 function validate(props, propName, componentName, location, propFullName) {
5322 var propValue = props[propName];
5323 var propType = getPropType(propValue);
5324 if (propType !== 'object') {
5325 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5326 }
5327 // We need to check all keys in case some are required but missing from props.
5328 var allKeys = assign({}, props[propName], shapeTypes);
5329 for (var key in allKeys) {
5330 var checker = shapeTypes[key];
5331 if (has(shapeTypes, key) && typeof checker !== 'function') {
5332 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
5333 }
5334 if (!checker) {
5335 return new PropTypeError(
5336 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
5337 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
5338 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
5339 );
5340 }
5341 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5342 if (error) {
5343 return error;
5344 }
5345 }
5346 return null;
5347 }
5348
5349 return createChainableTypeChecker(validate);
5350 }
5351
5352 function isNode(propValue) {
5353 switch (typeof propValue) {
5354 case 'number':
5355 case 'string':
5356 case 'undefined':
5357 return true;
5358 case 'boolean':
5359 return !propValue;
5360 case 'object':
5361 if (Array.isArray(propValue)) {
5362 return propValue.every(isNode);
5363 }
5364 if (propValue === null || isValidElement(propValue)) {
5365 return true;
5366 }
5367
5368 var iteratorFn = getIteratorFn(propValue);
5369 if (iteratorFn) {
5370 var iterator = iteratorFn.call(propValue);
5371 var step;
5372 if (iteratorFn !== propValue.entries) {
5373 while (!(step = iterator.next()).done) {
5374 if (!isNode(step.value)) {
5375 return false;
5376 }
5377 }
5378 } else {
5379 // Iterator will provide entry [k,v] tuples rather than values.
5380 while (!(step = iterator.next()).done) {
5381 var entry = step.value;
5382 if (entry) {
5383 if (!isNode(entry[1])) {
5384 return false;
5385 }
5386 }
5387 }
5388 }
5389 } else {
5390 return false;
5391 }
5392
5393 return true;
5394 default:
5395 return false;
5396 }
5397 }
5398
5399 function isSymbol(propType, propValue) {
5400 // Native Symbol.
5401 if (propType === 'symbol') {
5402 return true;
5403 }
5404
5405 // falsy value can't be a Symbol
5406 if (!propValue) {
5407 return false;
5408 }
5409
5410 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
5411 if (propValue['@@toStringTag'] === 'Symbol') {
5412 return true;
5413 }
5414
5415 // Fallback for non-spec compliant Symbols which are polyfilled.
5416 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
5417 return true;
5418 }
5419
5420 return false;
5421 }
5422
5423 // Equivalent of `typeof` but with special handling for array and regexp.
5424 function getPropType(propValue) {
5425 var propType = typeof propValue;
5426 if (Array.isArray(propValue)) {
5427 return 'array';
5428 }
5429 if (propValue instanceof RegExp) {
5430 // Old webkits (at least until Android 4.0) return 'function' rather than
5431 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
5432 // passes PropTypes.object.
5433 return 'object';
5434 }
5435 if (isSymbol(propType, propValue)) {
5436 return 'symbol';
5437 }
5438 return propType;
5439 }
5440
5441 // This handles more types than `getPropType`. Only used for error messages.
5442 // See `createPrimitiveTypeChecker`.
5443 function getPreciseType(propValue) {
5444 if (typeof propValue === 'undefined' || propValue === null) {
5445 return '' + propValue;
5446 }
5447 var propType = getPropType(propValue);
5448 if (propType === 'object') {
5449 if (propValue instanceof Date) {
5450 return 'date';
5451 } else if (propValue instanceof RegExp) {
5452 return 'regexp';
5453 }
5454 }
5455 return propType;
5456 }
5457
5458 // Returns a string that is postfixed to a warning about an invalid type.
5459 // For example, "undefined" or "of type array"
5460 function getPostfixForTypeWarning(value) {
5461 var type = getPreciseType(value);
5462 switch (type) {
5463 case 'array':
5464 case 'object':
5465 return 'an ' + type;
5466 case 'boolean':
5467 case 'date':
5468 case 'regexp':
5469 return 'a ' + type;
5470 default:
5471 return type;
5472 }
5473 }
5474
5475 // Returns class name of the object, if any.
5476 function getClassName(propValue) {
5477 if (!propValue.constructor || !propValue.constructor.name) {
5478 return ANONYMOUS;
5479 }
5480 return propValue.constructor.name;
5481 }
5482
5483 ReactPropTypes.checkPropTypes = checkPropTypes;
5484 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
5485 ReactPropTypes.PropTypes = ReactPropTypes;
5486
5487 return ReactPropTypes;
5488 };
5489
5490
5491 /***/ }),
5492
5493 /***/ "./node_modules/prop-types/index.js":
5494 /*!******************************************!*\
5495 !*** ./node_modules/prop-types/index.js ***!
5496 \******************************************/
5497 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5498
5499 /**
5500 * Copyright (c) 2013-present, Facebook, Inc.
5501 *
5502 * This source code is licensed under the MIT license found in the
5503 * LICENSE file in the root directory of this source tree.
5504 */
5505
5506 if (true) {
5507 var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
5508
5509 // By explicitly using `prop-types` you are opting into new development behavior.
5510 // http://fb.me/prop-types-in-prod
5511 var throwOnDirectAccess = true;
5512 module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
5513 } else {}
5514
5515
5516 /***/ }),
5517
5518 /***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
5519 /*!*************************************************************!*\
5520 !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
5521 \*************************************************************/
5522 /***/ ((module) => {
5523
5524 "use strict";
5525 /**
5526 * Copyright (c) 2013-present, Facebook, Inc.
5527 *
5528 * This source code is licensed under the MIT license found in the
5529 * LICENSE file in the root directory of this source tree.
5530 */
5531
5532
5533
5534 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
5535
5536 module.exports = ReactPropTypesSecret;
5537
5538
5539 /***/ }),
5540
5541 /***/ "./node_modules/prop-types/lib/has.js":
5542 /*!********************************************!*\
5543 !*** ./node_modules/prop-types/lib/has.js ***!
5544 \********************************************/
5545 /***/ ((module) => {
5546
5547 module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
5548
5549
5550 /***/ }),
5551
5552 /***/ "./node_modules/raven-js/src/configError.js":
5553 /*!**************************************************!*\
5554 !*** ./node_modules/raven-js/src/configError.js ***!
5555 \**************************************************/
5556 /***/ ((module) => {
5557
5558 function RavenConfigError(message) {
5559 this.name = 'RavenConfigError';
5560 this.message = message;
5561 }
5562 RavenConfigError.prototype = new Error();
5563 RavenConfigError.prototype.constructor = RavenConfigError;
5564
5565 module.exports = RavenConfigError;
5566
5567
5568 /***/ }),
5569
5570 /***/ "./node_modules/raven-js/src/console.js":
5571 /*!**********************************************!*\
5572 !*** ./node_modules/raven-js/src/console.js ***!
5573 \**********************************************/
5574 /***/ ((module) => {
5575
5576 var wrapMethod = function(console, level, callback) {
5577 var originalConsoleLevel = console[level];
5578 var originalConsole = console;
5579
5580 if (!(level in console)) {
5581 return;
5582 }
5583
5584 var sentryLevel = level === 'warn' ? 'warning' : level;
5585
5586 console[level] = function() {
5587 var args = [].slice.call(arguments);
5588
5589 var msg = '' + args.join(' ');
5590 var data = {level: sentryLevel, logger: 'console', extra: {arguments: args}};
5591
5592 if (level === 'assert') {
5593 if (args[0] === false) {
5594 // Default browsers message
5595 msg = 'Assertion failed: ' + (args.slice(1).join(' ') || 'console.assert');
5596 data.extra.arguments = args.slice(1);
5597 callback && callback(msg, data);
5598 }
5599 } else {
5600 callback && callback(msg, data);
5601 }
5602
5603 // this fails for some browsers. :(
5604 if (originalConsoleLevel) {
5605 // IE9 doesn't allow calling apply on console functions directly
5606 // See: https://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function#answer-5473193
5607 Function.prototype.apply.call(originalConsoleLevel, originalConsole, args);
5608 }
5609 };
5610 };
5611
5612 module.exports = {
5613 wrapMethod: wrapMethod
5614 };
5615
5616
5617 /***/ }),
5618
5619 /***/ "./node_modules/raven-js/src/raven.js":
5620 /*!********************************************!*\
5621 !*** ./node_modules/raven-js/src/raven.js ***!
5622 \********************************************/
5623 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5624
5625 /*global XDomainRequest:false */
5626
5627 var TraceKit = __webpack_require__(/*! ../vendor/TraceKit/tracekit */ "./node_modules/raven-js/vendor/TraceKit/tracekit.js");
5628 var stringify = __webpack_require__(/*! ../vendor/json-stringify-safe/stringify */ "./node_modules/raven-js/vendor/json-stringify-safe/stringify.js");
5629 var RavenConfigError = __webpack_require__(/*! ./configError */ "./node_modules/raven-js/src/configError.js");
5630
5631 var utils = __webpack_require__(/*! ./utils */ "./node_modules/raven-js/src/utils.js");
5632 var isError = utils.isError;
5633 var isObject = utils.isObject;
5634 var isObject = utils.isObject;
5635 var isErrorEvent = utils.isErrorEvent;
5636 var isUndefined = utils.isUndefined;
5637 var isFunction = utils.isFunction;
5638 var isString = utils.isString;
5639 var isEmptyObject = utils.isEmptyObject;
5640 var each = utils.each;
5641 var objectMerge = utils.objectMerge;
5642 var truncate = utils.truncate;
5643 var objectFrozen = utils.objectFrozen;
5644 var hasKey = utils.hasKey;
5645 var joinRegExp = utils.joinRegExp;
5646 var urlencode = utils.urlencode;
5647 var uuid4 = utils.uuid4;
5648 var htmlTreeAsString = utils.htmlTreeAsString;
5649 var isSameException = utils.isSameException;
5650 var isSameStacktrace = utils.isSameStacktrace;
5651 var parseUrl = utils.parseUrl;
5652 var fill = utils.fill;
5653
5654 var wrapConsoleMethod = (__webpack_require__(/*! ./console */ "./node_modules/raven-js/src/console.js").wrapMethod);
5655
5656 var dsnKeys = 'source protocol user pass host port path'.split(' '),
5657 dsnPattern = /^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;
5658
5659 function now() {
5660 return +new Date();
5661 }
5662
5663 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
5664 var _window =
5665 typeof window !== 'undefined'
5666 ? window
5667 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
5668 var _document = _window.document;
5669 var _navigator = _window.navigator;
5670
5671 function keepOriginalCallback(original, callback) {
5672 return isFunction(callback)
5673 ? function(data) {
5674 return callback(data, original);
5675 }
5676 : callback;
5677 }
5678
5679 // First, check for JSON support
5680 // If there is no JSON, we no-op the core features of Raven
5681 // since JSON is required to encode the payload
5682 function Raven() {
5683 this._hasJSON = !!(typeof JSON === 'object' && JSON.stringify);
5684 // Raven can run in contexts where there's no document (react-native)
5685 this._hasDocument = !isUndefined(_document);
5686 this._hasNavigator = !isUndefined(_navigator);
5687 this._lastCapturedException = null;
5688 this._lastData = null;
5689 this._lastEventId = null;
5690 this._globalServer = null;
5691 this._globalKey = null;
5692 this._globalProject = null;
5693 this._globalContext = {};
5694 this._globalOptions = {
5695 logger: 'javascript',
5696 ignoreErrors: [],
5697 ignoreUrls: [],
5698 whitelistUrls: [],
5699 includePaths: [],
5700 collectWindowErrors: true,
5701 maxMessageLength: 0,
5702
5703 // By default, truncates URL values to 250 chars
5704 maxUrlLength: 250,
5705 stackTraceLimit: 50,
5706 autoBreadcrumbs: true,
5707 instrument: true,
5708 sampleRate: 1
5709 };
5710 this._ignoreOnError = 0;
5711 this._isRavenInstalled = false;
5712 this._originalErrorStackTraceLimit = Error.stackTraceLimit;
5713 // capture references to window.console *and* all its methods first
5714 // before the console plugin has a chance to monkey patch
5715 this._originalConsole = _window.console || {};
5716 this._originalConsoleMethods = {};
5717 this._plugins = [];
5718 this._startTime = now();
5719 this._wrappedBuiltIns = [];
5720 this._breadcrumbs = [];
5721 this._lastCapturedEvent = null;
5722 this._keypressTimeout;
5723 this._location = _window.location;
5724 this._lastHref = this._location && this._location.href;
5725 this._resetBackoff();
5726
5727 // eslint-disable-next-line guard-for-in
5728 for (var method in this._originalConsole) {
5729 this._originalConsoleMethods[method] = this._originalConsole[method];
5730 }
5731 }
5732
5733 /*
5734 * The core Raven singleton
5735 *
5736 * @this {Raven}
5737 */
5738
5739 Raven.prototype = {
5740 // Hardcode version string so that raven source can be loaded directly via
5741 // webpack (using a build step causes webpack #1617). Grunt verifies that
5742 // this value matches package.json during build.
5743 // See: https://github.com/getsentry/raven-js/issues/465
5744 VERSION: '3.19.1',
5745
5746 debug: false,
5747
5748 TraceKit: TraceKit, // alias to TraceKit
5749
5750 /*
5751 * Configure Raven with a DSN and extra options
5752 *
5753 * @param {string} dsn The public Sentry DSN
5754 * @param {object} options Set of global options [optional]
5755 * @return {Raven}
5756 */
5757 config: function(dsn, options) {
5758 var self = this;
5759
5760 if (self._globalServer) {
5761 this._logDebug('error', 'Error: Raven has already been configured');
5762 return self;
5763 }
5764 if (!dsn) return self;
5765
5766 var globalOptions = self._globalOptions;
5767
5768 // merge in options
5769 if (options) {
5770 each(options, function(key, value) {
5771 // tags and extra are special and need to be put into context
5772 if (key === 'tags' || key === 'extra' || key === 'user') {
5773 self._globalContext[key] = value;
5774 } else {
5775 globalOptions[key] = value;
5776 }
5777 });
5778 }
5779
5780 self.setDSN(dsn);
5781
5782 // "Script error." is hard coded into browsers for errors that it can't read.
5783 // this is the result of a script being pulled in from an external domain and CORS.
5784 globalOptions.ignoreErrors.push(/^Script error\.?$/);
5785 globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/);
5786
5787 // join regexp rules into one big rule
5788 globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors);
5789 globalOptions.ignoreUrls = globalOptions.ignoreUrls.length
5790 ? joinRegExp(globalOptions.ignoreUrls)
5791 : false;
5792 globalOptions.whitelistUrls = globalOptions.whitelistUrls.length
5793 ? joinRegExp(globalOptions.whitelistUrls)
5794 : false;
5795 globalOptions.includePaths = joinRegExp(globalOptions.includePaths);
5796 globalOptions.maxBreadcrumbs = Math.max(
5797 0,
5798 Math.min(globalOptions.maxBreadcrumbs || 100, 100)
5799 ); // default and hard limit is 100
5800
5801 var autoBreadcrumbDefaults = {
5802 xhr: true,
5803 console: true,
5804 dom: true,
5805 location: true
5806 };
5807
5808 var autoBreadcrumbs = globalOptions.autoBreadcrumbs;
5809 if ({}.toString.call(autoBreadcrumbs) === '[object Object]') {
5810 autoBreadcrumbs = objectMerge(autoBreadcrumbDefaults, autoBreadcrumbs);
5811 } else if (autoBreadcrumbs !== false) {
5812 autoBreadcrumbs = autoBreadcrumbDefaults;
5813 }
5814 globalOptions.autoBreadcrumbs = autoBreadcrumbs;
5815
5816 var instrumentDefaults = {
5817 tryCatch: true
5818 };
5819
5820 var instrument = globalOptions.instrument;
5821 if ({}.toString.call(instrument) === '[object Object]') {
5822 instrument = objectMerge(instrumentDefaults, instrument);
5823 } else if (instrument !== false) {
5824 instrument = instrumentDefaults;
5825 }
5826 globalOptions.instrument = instrument;
5827
5828 TraceKit.collectWindowErrors = !!globalOptions.collectWindowErrors;
5829
5830 // return for chaining
5831 return self;
5832 },
5833
5834 /*
5835 * Installs a global window.onerror error handler
5836 * to capture and report uncaught exceptions.
5837 * At this point, install() is required to be called due
5838 * to the way TraceKit is set up.
5839 *
5840 * @return {Raven}
5841 */
5842 install: function() {
5843 var self = this;
5844 if (self.isSetup() && !self._isRavenInstalled) {
5845 TraceKit.report.subscribe(function() {
5846 self._handleOnErrorStackInfo.apply(self, arguments);
5847 });
5848 if (self._globalOptions.instrument && self._globalOptions.instrument.tryCatch) {
5849 self._instrumentTryCatch();
5850 }
5851
5852 if (self._globalOptions.autoBreadcrumbs) self._instrumentBreadcrumbs();
5853
5854 // Install all of the plugins
5855 self._drainPlugins();
5856
5857 self._isRavenInstalled = true;
5858 }
5859
5860 Error.stackTraceLimit = self._globalOptions.stackTraceLimit;
5861 return this;
5862 },
5863
5864 /*
5865 * Set the DSN (can be called multiple time unlike config)
5866 *
5867 * @param {string} dsn The public Sentry DSN
5868 */
5869 setDSN: function(dsn) {
5870 var self = this,
5871 uri = self._parseDSN(dsn),
5872 lastSlash = uri.path.lastIndexOf('/'),
5873 path = uri.path.substr(1, lastSlash);
5874
5875 self._dsn = dsn;
5876 self._globalKey = uri.user;
5877 self._globalSecret = uri.pass && uri.pass.substr(1);
5878 self._globalProject = uri.path.substr(lastSlash + 1);
5879
5880 self._globalServer = self._getGlobalServer(uri);
5881
5882 self._globalEndpoint =
5883 self._globalServer + '/' + path + 'api/' + self._globalProject + '/store/';
5884
5885 // Reset backoff state since we may be pointing at a
5886 // new project/server
5887 this._resetBackoff();
5888 },
5889
5890 /*
5891 * Wrap code within a context so Raven can capture errors
5892 * reliably across domains that is executed immediately.
5893 *
5894 * @param {object} options A specific set of options for this context [optional]
5895 * @param {function} func The callback to be immediately executed within the context
5896 * @param {array} args An array of arguments to be called with the callback [optional]
5897 */
5898 context: function(options, func, args) {
5899 if (isFunction(options)) {
5900 args = func || [];
5901 func = options;
5902 options = undefined;
5903 }
5904
5905 return this.wrap(options, func).apply(this, args);
5906 },
5907
5908 /*
5909 * Wrap code within a context and returns back a new function to be executed
5910 *
5911 * @param {object} options A specific set of options for this context [optional]
5912 * @param {function} func The function to be wrapped in a new context
5913 * @param {function} func A function to call before the try/catch wrapper [optional, private]
5914 * @return {function} The newly wrapped functions with a context
5915 */
5916 wrap: function(options, func, _before) {
5917 var self = this;
5918 // 1 argument has been passed, and it's not a function
5919 // so just return it
5920 if (isUndefined(func) && !isFunction(options)) {
5921 return options;
5922 }
5923
5924 // options is optional
5925 if (isFunction(options)) {
5926 func = options;
5927 options = undefined;
5928 }
5929
5930 // At this point, we've passed along 2 arguments, and the second one
5931 // is not a function either, so we'll just return the second argument.
5932 if (!isFunction(func)) {
5933 return func;
5934 }
5935
5936 // We don't wanna wrap it twice!
5937 try {
5938 if (func.__raven__) {
5939 return func;
5940 }
5941
5942 // If this has already been wrapped in the past, return that
5943 if (func.__raven_wrapper__) {
5944 return func.__raven_wrapper__;
5945 }
5946 } catch (e) {
5947 // Just accessing custom props in some Selenium environments
5948 // can cause a "Permission denied" exception (see raven-js#495).
5949 // Bail on wrapping and return the function as-is (defers to window.onerror).
5950 return func;
5951 }
5952
5953 function wrapped() {
5954 var args = [],
5955 i = arguments.length,
5956 deep = !options || (options && options.deep !== false);
5957
5958 if (_before && isFunction(_before)) {
5959 _before.apply(this, arguments);
5960 }
5961
5962 // Recursively wrap all of a function's arguments that are
5963 // functions themselves.
5964 while (i--) args[i] = deep ? self.wrap(options, arguments[i]) : arguments[i];
5965
5966 try {
5967 // Attempt to invoke user-land function
5968 // NOTE: If you are a Sentry user, and you are seeing this stack frame, it
5969 // means Raven caught an error invoking your application code. This is
5970 // expected behavior and NOT indicative of a bug with Raven.js.
5971 return func.apply(this, args);
5972 } catch (e) {
5973 self._ignoreNextOnError();
5974 self.captureException(e, options);
5975 throw e;
5976 }
5977 }
5978
5979 // copy over properties of the old function
5980 for (var property in func) {
5981 if (hasKey(func, property)) {
5982 wrapped[property] = func[property];
5983 }
5984 }
5985 wrapped.prototype = func.prototype;
5986
5987 func.__raven_wrapper__ = wrapped;
5988 // Signal that this function has been wrapped already
5989 // for both debugging and to prevent it to being wrapped twice
5990 wrapped.__raven__ = true;
5991 wrapped.__inner__ = func;
5992
5993 return wrapped;
5994 },
5995
5996 /*
5997 * Uninstalls the global error handler.
5998 *
5999 * @return {Raven}
6000 */
6001 uninstall: function() {
6002 TraceKit.report.uninstall();
6003
6004 this._restoreBuiltIns();
6005
6006 Error.stackTraceLimit = this._originalErrorStackTraceLimit;
6007 this._isRavenInstalled = false;
6008
6009 return this;
6010 },
6011
6012 /*
6013 * Manually capture an exception and send it over to Sentry
6014 *
6015 * @param {error} ex An exception to be logged
6016 * @param {object} options A specific set of options for this error [optional]
6017 * @return {Raven}
6018 */
6019 captureException: function(ex, options) {
6020 // Cases for sending ex as a message, rather than an exception
6021 var isNotError = !isError(ex);
6022 var isNotErrorEvent = !isErrorEvent(ex);
6023 var isErrorEventWithoutError = isErrorEvent(ex) && !ex.error;
6024
6025 if ((isNotError && isNotErrorEvent) || isErrorEventWithoutError) {
6026 return this.captureMessage(
6027 ex,
6028 objectMerge(
6029 {
6030 trimHeadFrames: 1,
6031 stacktrace: true // if we fall back to captureMessage, default to attempting a new trace
6032 },
6033 options
6034 )
6035 );
6036 }
6037
6038 // Get actual Error from ErrorEvent
6039 if (isErrorEvent(ex)) ex = ex.error;
6040
6041 // Store the raw exception object for potential debugging and introspection
6042 this._lastCapturedException = ex;
6043
6044 // TraceKit.report will re-raise any exception passed to it,
6045 // which means you have to wrap it in try/catch. Instead, we
6046 // can wrap it here and only re-raise if TraceKit.report
6047 // raises an exception different from the one we asked to
6048 // report on.
6049 try {
6050 var stack = TraceKit.computeStackTrace(ex);
6051 this._handleStackInfo(stack, options);
6052 } catch (ex1) {
6053 if (ex !== ex1) {
6054 throw ex1;
6055 }
6056 }
6057
6058 return this;
6059 },
6060
6061 /*
6062 * Manually send a message to Sentry
6063 *
6064 * @param {string} msg A plain message to be captured in Sentry
6065 * @param {object} options A specific set of options for this message [optional]
6066 * @return {Raven}
6067 */
6068 captureMessage: function(msg, options) {
6069 // config() automagically converts ignoreErrors from a list to a RegExp so we need to test for an
6070 // early call; we'll error on the side of logging anything called before configuration since it's
6071 // probably something you should see:
6072 if (
6073 !!this._globalOptions.ignoreErrors.test &&
6074 this._globalOptions.ignoreErrors.test(msg)
6075 ) {
6076 return;
6077 }
6078
6079 options = options || {};
6080
6081 var data = objectMerge(
6082 {
6083 message: msg + '' // Make sure it's actually a string
6084 },
6085 options
6086 );
6087
6088 var ex;
6089 // Generate a "synthetic" stack trace from this point.
6090 // NOTE: If you are a Sentry user, and you are seeing this stack frame, it is NOT indicative
6091 // of a bug with Raven.js. Sentry generates synthetic traces either by configuration,
6092 // or if it catches a thrown object without a "stack" property.
6093 try {
6094 throw new Error(msg);
6095 } catch (ex1) {
6096 ex = ex1;
6097 }
6098
6099 // null exception name so `Error` isn't prefixed to msg
6100 ex.name = null;
6101 var stack = TraceKit.computeStackTrace(ex);
6102
6103 // stack[0] is `throw new Error(msg)` call itself, we are interested in the frame that was just before that, stack[1]
6104 var initialCall = stack.stack[1];
6105
6106 var fileurl = (initialCall && initialCall.url) || '';
6107
6108 if (
6109 !!this._globalOptions.ignoreUrls.test &&
6110 this._globalOptions.ignoreUrls.test(fileurl)
6111 ) {
6112 return;
6113 }
6114
6115 if (
6116 !!this._globalOptions.whitelistUrls.test &&
6117 !this._globalOptions.whitelistUrls.test(fileurl)
6118 ) {
6119 return;
6120 }
6121
6122 if (this._globalOptions.stacktrace || (options && options.stacktrace)) {
6123 options = objectMerge(
6124 {
6125 // fingerprint on msg, not stack trace (legacy behavior, could be
6126 // revisited)
6127 fingerprint: msg,
6128 // since we know this is a synthetic trace, the top N-most frames
6129 // MUST be from Raven.js, so mark them as in_app later by setting
6130 // trimHeadFrames
6131 trimHeadFrames: (options.trimHeadFrames || 0) + 1
6132 },
6133 options
6134 );
6135
6136 var frames = this._prepareFrames(stack, options);
6137 data.stacktrace = {
6138 // Sentry expects frames oldest to newest
6139 frames: frames.reverse()
6140 };
6141 }
6142
6143 // Fire away!
6144 this._send(data);
6145
6146 return this;
6147 },
6148
6149 captureBreadcrumb: function(obj) {
6150 var crumb = objectMerge(
6151 {
6152 timestamp: now() / 1000
6153 },
6154 obj
6155 );
6156
6157 if (isFunction(this._globalOptions.breadcrumbCallback)) {
6158 var result = this._globalOptions.breadcrumbCallback(crumb);
6159
6160 if (isObject(result) && !isEmptyObject(result)) {
6161 crumb = result;
6162 } else if (result === false) {
6163 return this;
6164 }
6165 }
6166
6167 this._breadcrumbs.push(crumb);
6168 if (this._breadcrumbs.length > this._globalOptions.maxBreadcrumbs) {
6169 this._breadcrumbs.shift();
6170 }
6171 return this;
6172 },
6173
6174 addPlugin: function(plugin /*arg1, arg2, ... argN*/) {
6175 var pluginArgs = [].slice.call(arguments, 1);
6176
6177 this._plugins.push([plugin, pluginArgs]);
6178 if (this._isRavenInstalled) {
6179 this._drainPlugins();
6180 }
6181
6182 return this;
6183 },
6184
6185 /*
6186 * Set/clear a user to be sent along with the payload.
6187 *
6188 * @param {object} user An object representing user data [optional]
6189 * @return {Raven}
6190 */
6191 setUserContext: function(user) {
6192 // Intentionally do not merge here since that's an unexpected behavior.
6193 this._globalContext.user = user;
6194
6195 return this;
6196 },
6197
6198 /*
6199 * Merge extra attributes to be sent along with the payload.
6200 *
6201 * @param {object} extra An object representing extra data [optional]
6202 * @return {Raven}
6203 */
6204 setExtraContext: function(extra) {
6205 this._mergeContext('extra', extra);
6206
6207 return this;
6208 },
6209
6210 /*
6211 * Merge tags to be sent along with the payload.
6212 *
6213 * @param {object} tags An object representing tags [optional]
6214 * @return {Raven}
6215 */
6216 setTagsContext: function(tags) {
6217 this._mergeContext('tags', tags);
6218
6219 return this;
6220 },
6221
6222 /*
6223 * Clear all of the context.
6224 *
6225 * @return {Raven}
6226 */
6227 clearContext: function() {
6228 this._globalContext = {};
6229
6230 return this;
6231 },
6232
6233 /*
6234 * Get a copy of the current context. This cannot be mutated.
6235 *
6236 * @return {object} copy of context
6237 */
6238 getContext: function() {
6239 // lol javascript
6240 return JSON.parse(stringify(this._globalContext));
6241 },
6242
6243 /*
6244 * Set environment of application
6245 *
6246 * @param {string} environment Typically something like 'production'.
6247 * @return {Raven}
6248 */
6249 setEnvironment: function(environment) {
6250 this._globalOptions.environment = environment;
6251
6252 return this;
6253 },
6254
6255 /*
6256 * Set release version of application
6257 *
6258 * @param {string} release Typically something like a git SHA to identify version
6259 * @return {Raven}
6260 */
6261 setRelease: function(release) {
6262 this._globalOptions.release = release;
6263
6264 return this;
6265 },
6266
6267 /*
6268 * Set the dataCallback option
6269 *
6270 * @param {function} callback The callback to run which allows the
6271 * data blob to be mutated before sending
6272 * @return {Raven}
6273 */
6274 setDataCallback: function(callback) {
6275 var original = this._globalOptions.dataCallback;
6276 this._globalOptions.dataCallback = keepOriginalCallback(original, callback);
6277 return this;
6278 },
6279
6280 /*
6281 * Set the breadcrumbCallback option
6282 *
6283 * @param {function} callback The callback to run which allows filtering
6284 * or mutating breadcrumbs
6285 * @return {Raven}
6286 */
6287 setBreadcrumbCallback: function(callback) {
6288 var original = this._globalOptions.breadcrumbCallback;
6289 this._globalOptions.breadcrumbCallback = keepOriginalCallback(original, callback);
6290 return this;
6291 },
6292
6293 /*
6294 * Set the shouldSendCallback option
6295 *
6296 * @param {function} callback The callback to run which allows
6297 * introspecting the blob before sending
6298 * @return {Raven}
6299 */
6300 setShouldSendCallback: function(callback) {
6301 var original = this._globalOptions.shouldSendCallback;
6302 this._globalOptions.shouldSendCallback = keepOriginalCallback(original, callback);
6303 return this;
6304 },
6305
6306 /**
6307 * Override the default HTTP transport mechanism that transmits data
6308 * to the Sentry server.
6309 *
6310 * @param {function} transport Function invoked instead of the default
6311 * `makeRequest` handler.
6312 *
6313 * @return {Raven}
6314 */
6315 setTransport: function(transport) {
6316 this._globalOptions.transport = transport;
6317
6318 return this;
6319 },
6320
6321 /*
6322 * Get the latest raw exception that was captured by Raven.
6323 *
6324 * @return {error}
6325 */
6326 lastException: function() {
6327 return this._lastCapturedException;
6328 },
6329
6330 /*
6331 * Get the last event id
6332 *
6333 * @return {string}
6334 */
6335 lastEventId: function() {
6336 return this._lastEventId;
6337 },
6338
6339 /*
6340 * Determine if Raven is setup and ready to go.
6341 *
6342 * @return {boolean}
6343 */
6344 isSetup: function() {
6345 if (!this._hasJSON) return false; // needs JSON support
6346 if (!this._globalServer) {
6347 if (!this.ravenNotConfiguredError) {
6348 this.ravenNotConfiguredError = true;
6349 this._logDebug('error', 'Error: Raven has not been configured.');
6350 }
6351 return false;
6352 }
6353 return true;
6354 },
6355
6356 afterLoad: function() {
6357 // TODO: remove window dependence?
6358
6359 // Attempt to initialize Raven on load
6360 var RavenConfig = _window.RavenConfig;
6361 if (RavenConfig) {
6362 this.config(RavenConfig.dsn, RavenConfig.config).install();
6363 }
6364 },
6365
6366 showReportDialog: function(options) {
6367 if (
6368 !_document // doesn't work without a document (React native)
6369 )
6370 return;
6371
6372 options = options || {};
6373
6374 var lastEventId = options.eventId || this.lastEventId();
6375 if (!lastEventId) {
6376 throw new RavenConfigError('Missing eventId');
6377 }
6378
6379 var dsn = options.dsn || this._dsn;
6380 if (!dsn) {
6381 throw new RavenConfigError('Missing DSN');
6382 }
6383
6384 var encode = encodeURIComponent;
6385 var qs = '';
6386 qs += '?eventId=' + encode(lastEventId);
6387 qs += '&dsn=' + encode(dsn);
6388
6389 var user = options.user || this._globalContext.user;
6390 if (user) {
6391 if (user.name) qs += '&name=' + encode(user.name);
6392 if (user.email) qs += '&email=' + encode(user.email);
6393 }
6394
6395 var globalServer = this._getGlobalServer(this._parseDSN(dsn));
6396
6397 var script = _document.createElement('script');
6398 script.async = true;
6399 script.src = globalServer + '/api/embed/error-page/' + qs;
6400 (_document.head || _document.body).appendChild(script);
6401 },
6402
6403 /**** Private functions ****/
6404 _ignoreNextOnError: function() {
6405 var self = this;
6406 this._ignoreOnError += 1;
6407 setTimeout(function() {
6408 // onerror should trigger before setTimeout
6409 self._ignoreOnError -= 1;
6410 });
6411 },
6412
6413 _triggerEvent: function(eventType, options) {
6414 // NOTE: `event` is a native browser thing, so let's avoid conflicting wiht it
6415 var evt, key;
6416
6417 if (!this._hasDocument) return;
6418
6419 options = options || {};
6420
6421 eventType = 'raven' + eventType.substr(0, 1).toUpperCase() + eventType.substr(1);
6422
6423 if (_document.createEvent) {
6424 evt = _document.createEvent('HTMLEvents');
6425 evt.initEvent(eventType, true, true);
6426 } else {
6427 evt = _document.createEventObject();
6428 evt.eventType = eventType;
6429 }
6430
6431 for (key in options)
6432 if (hasKey(options, key)) {
6433 evt[key] = options[key];
6434 }
6435
6436 if (_document.createEvent) {
6437 // IE9 if standards
6438 _document.dispatchEvent(evt);
6439 } else {
6440 // IE8 regardless of Quirks or Standards
6441 // IE9 if quirks
6442 try {
6443 _document.fireEvent('on' + evt.eventType.toLowerCase(), evt);
6444 } catch (e) {
6445 // Do nothing
6446 }
6447 }
6448 },
6449
6450 /**
6451 * Wraps addEventListener to capture UI breadcrumbs
6452 * @param evtName the event name (e.g. "click")
6453 * @returns {Function}
6454 * @private
6455 */
6456 _breadcrumbEventHandler: function(evtName) {
6457 var self = this;
6458 return function(evt) {
6459 // reset keypress timeout; e.g. triggering a 'click' after
6460 // a 'keypress' will reset the keypress debounce so that a new
6461 // set of keypresses can be recorded
6462 self._keypressTimeout = null;
6463
6464 // It's possible this handler might trigger multiple times for the same
6465 // event (e.g. event propagation through node ancestors). Ignore if we've
6466 // already captured the event.
6467 if (self._lastCapturedEvent === evt) return;
6468
6469 self._lastCapturedEvent = evt;
6470
6471 // try/catch both:
6472 // - accessing evt.target (see getsentry/raven-js#838, #768)
6473 // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly
6474 // can throw an exception in some circumstances.
6475 var target;
6476 try {
6477 target = htmlTreeAsString(evt.target);
6478 } catch (e) {
6479 target = '<unknown>';
6480 }
6481
6482 self.captureBreadcrumb({
6483 category: 'ui.' + evtName, // e.g. ui.click, ui.input
6484 message: target
6485 });
6486 };
6487 },
6488
6489 /**
6490 * Wraps addEventListener to capture keypress UI events
6491 * @returns {Function}
6492 * @private
6493 */
6494 _keypressEventHandler: function() {
6495 var self = this,
6496 debounceDuration = 1000; // milliseconds
6497
6498 // TODO: if somehow user switches keypress target before
6499 // debounce timeout is triggered, we will only capture
6500 // a single breadcrumb from the FIRST target (acceptable?)
6501 return function(evt) {
6502 var target;
6503 try {
6504 target = evt.target;
6505 } catch (e) {
6506 // just accessing event properties can throw an exception in some rare circumstances
6507 // see: https://github.com/getsentry/raven-js/issues/838
6508 return;
6509 }
6510 var tagName = target && target.tagName;
6511
6512 // only consider keypress events on actual input elements
6513 // this will disregard keypresses targeting body (e.g. tabbing
6514 // through elements, hotkeys, etc)
6515 if (
6516 !tagName ||
6517 (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable)
6518 )
6519 return;
6520
6521 // record first keypress in a series, but ignore subsequent
6522 // keypresses until debounce clears
6523 var timeout = self._keypressTimeout;
6524 if (!timeout) {
6525 self._breadcrumbEventHandler('input')(evt);
6526 }
6527 clearTimeout(timeout);
6528 self._keypressTimeout = setTimeout(function() {
6529 self._keypressTimeout = null;
6530 }, debounceDuration);
6531 };
6532 },
6533
6534 /**
6535 * Captures a breadcrumb of type "navigation", normalizing input URLs
6536 * @param to the originating URL
6537 * @param from the target URL
6538 * @private
6539 */
6540 _captureUrlChange: function(from, to) {
6541 var parsedLoc = parseUrl(this._location.href);
6542 var parsedTo = parseUrl(to);
6543 var parsedFrom = parseUrl(from);
6544
6545 // because onpopstate only tells you the "new" (to) value of location.href, and
6546 // not the previous (from) value, we need to track the value of the current URL
6547 // state ourselves
6548 this._lastHref = to;
6549
6550 // Use only the path component of the URL if the URL matches the current
6551 // document (almost all the time when using pushState)
6552 if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host)
6553 to = parsedTo.relative;
6554 if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host)
6555 from = parsedFrom.relative;
6556
6557 this.captureBreadcrumb({
6558 category: 'navigation',
6559 data: {
6560 to: to,
6561 from: from
6562 }
6563 });
6564 },
6565
6566 /**
6567 * Wrap timer functions and event targets to catch errors and provide
6568 * better metadata.
6569 */
6570 _instrumentTryCatch: function() {
6571 var self = this;
6572
6573 var wrappedBuiltIns = self._wrappedBuiltIns;
6574
6575 function wrapTimeFn(orig) {
6576 return function(fn, t) {
6577 // preserve arity
6578 // Make a copy of the arguments to prevent deoptimization
6579 // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
6580 var args = new Array(arguments.length);
6581 for (var i = 0; i < args.length; ++i) {
6582 args[i] = arguments[i];
6583 }
6584 var originalCallback = args[0];
6585 if (isFunction(originalCallback)) {
6586 args[0] = self.wrap(originalCallback);
6587 }
6588
6589 // IE < 9 doesn't support .call/.apply on setInterval/setTimeout, but it
6590 // also supports only two arguments and doesn't care what this is, so we
6591 // can just call the original function directly.
6592 if (orig.apply) {
6593 return orig.apply(this, args);
6594 } else {
6595 return orig(args[0], args[1]);
6596 }
6597 };
6598 }
6599
6600 var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
6601
6602 function wrapEventTarget(global) {
6603 var proto = _window[global] && _window[global].prototype;
6604 if (proto && proto.hasOwnProperty && proto.hasOwnProperty('addEventListener')) {
6605 fill(
6606 proto,
6607 'addEventListener',
6608 function(orig) {
6609 return function(evtName, fn, capture, secure) {
6610 // preserve arity
6611 try {
6612 if (fn && fn.handleEvent) {
6613 fn.handleEvent = self.wrap(fn.handleEvent);
6614 }
6615 } catch (err) {
6616 // can sometimes get 'Permission denied to access property "handle Event'
6617 }
6618
6619 // More breadcrumb DOM capture ... done here and not in `_instrumentBreadcrumbs`
6620 // so that we don't have more than one wrapper function
6621 var before, clickHandler, keypressHandler;
6622
6623 if (
6624 autoBreadcrumbs &&
6625 autoBreadcrumbs.dom &&
6626 (global === 'EventTarget' || global === 'Node')
6627 ) {
6628 // NOTE: generating multiple handlers per addEventListener invocation, should
6629 // revisit and verify we can just use one (almost certainly)
6630 clickHandler = self._breadcrumbEventHandler('click');
6631 keypressHandler = self._keypressEventHandler();
6632 before = function(evt) {
6633 // need to intercept every DOM event in `before` argument, in case that
6634 // same wrapped method is re-used for different events (e.g. mousemove THEN click)
6635 // see #724
6636 if (!evt) return;
6637
6638 var eventType;
6639 try {
6640 eventType = evt.type;
6641 } catch (e) {
6642 // just accessing event properties can throw an exception in some rare circumstances
6643 // see: https://github.com/getsentry/raven-js/issues/838
6644 return;
6645 }
6646 if (eventType === 'click') return clickHandler(evt);
6647 else if (eventType === 'keypress') return keypressHandler(evt);
6648 };
6649 }
6650 return orig.call(
6651 this,
6652 evtName,
6653 self.wrap(fn, undefined, before),
6654 capture,
6655 secure
6656 );
6657 };
6658 },
6659 wrappedBuiltIns
6660 );
6661 fill(
6662 proto,
6663 'removeEventListener',
6664 function(orig) {
6665 return function(evt, fn, capture, secure) {
6666 try {
6667 fn = fn && (fn.__raven_wrapper__ ? fn.__raven_wrapper__ : fn);
6668 } catch (e) {
6669 // ignore, accessing __raven_wrapper__ will throw in some Selenium environments
6670 }
6671 return orig.call(this, evt, fn, capture, secure);
6672 };
6673 },
6674 wrappedBuiltIns
6675 );
6676 }
6677 }
6678
6679 fill(_window, 'setTimeout', wrapTimeFn, wrappedBuiltIns);
6680 fill(_window, 'setInterval', wrapTimeFn, wrappedBuiltIns);
6681 if (_window.requestAnimationFrame) {
6682 fill(
6683 _window,
6684 'requestAnimationFrame',
6685 function(orig) {
6686 return function(cb) {
6687 return orig(self.wrap(cb));
6688 };
6689 },
6690 wrappedBuiltIns
6691 );
6692 }
6693
6694 // event targets borrowed from bugsnag-js:
6695 // https://github.com/bugsnag/bugsnag-js/blob/master/src/bugsnag.js#L666
6696 var eventTargets = [
6697 'EventTarget',
6698 'Window',
6699 'Node',
6700 'ApplicationCache',
6701 'AudioTrackList',
6702 'ChannelMergerNode',
6703 'CryptoOperation',
6704 'EventSource',
6705 'FileReader',
6706 'HTMLUnknownElement',
6707 'IDBDatabase',
6708 'IDBRequest',
6709 'IDBTransaction',
6710 'KeyOperation',
6711 'MediaController',
6712 'MessagePort',
6713 'ModalWindow',
6714 'Notification',
6715 'SVGElementInstance',
6716 'Screen',
6717 'TextTrack',
6718 'TextTrackCue',
6719 'TextTrackList',
6720 'WebSocket',
6721 'WebSocketWorker',
6722 'Worker',
6723 'XMLHttpRequest',
6724 'XMLHttpRequestEventTarget',
6725 'XMLHttpRequestUpload'
6726 ];
6727 for (var i = 0; i < eventTargets.length; i++) {
6728 wrapEventTarget(eventTargets[i]);
6729 }
6730 },
6731
6732 /**
6733 * Instrument browser built-ins w/ breadcrumb capturing
6734 * - XMLHttpRequests
6735 * - DOM interactions (click/typing)
6736 * - window.location changes
6737 * - console
6738 *
6739 * Can be disabled or individually configured via the `autoBreadcrumbs` config option
6740 */
6741 _instrumentBreadcrumbs: function() {
6742 var self = this;
6743 var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
6744
6745 var wrappedBuiltIns = self._wrappedBuiltIns;
6746
6747 function wrapProp(prop, xhr) {
6748 if (prop in xhr && isFunction(xhr[prop])) {
6749 fill(xhr, prop, function(orig) {
6750 return self.wrap(orig);
6751 }); // intentionally don't track filled methods on XHR instances
6752 }
6753 }
6754
6755 if (autoBreadcrumbs.xhr && 'XMLHttpRequest' in _window) {
6756 var xhrproto = XMLHttpRequest.prototype;
6757 fill(
6758 xhrproto,
6759 'open',
6760 function(origOpen) {
6761 return function(method, url) {
6762 // preserve arity
6763
6764 // if Sentry key appears in URL, don't capture
6765 if (isString(url) && url.indexOf(self._globalKey) === -1) {
6766 this.__raven_xhr = {
6767 method: method,
6768 url: url,
6769 status_code: null
6770 };
6771 }
6772
6773 return origOpen.apply(this, arguments);
6774 };
6775 },
6776 wrappedBuiltIns
6777 );
6778
6779 fill(
6780 xhrproto,
6781 'send',
6782 function(origSend) {
6783 return function(data) {
6784 // preserve arity
6785 var xhr = this;
6786
6787 function onreadystatechangeHandler() {
6788 if (xhr.__raven_xhr && xhr.readyState === 4) {
6789 try {
6790 // touching statusCode in some platforms throws
6791 // an exception
6792 xhr.__raven_xhr.status_code = xhr.status;
6793 } catch (e) {
6794 /* do nothing */
6795 }
6796
6797 self.captureBreadcrumb({
6798 type: 'http',
6799 category: 'xhr',
6800 data: xhr.__raven_xhr
6801 });
6802 }
6803 }
6804
6805 var props = ['onload', 'onerror', 'onprogress'];
6806 for (var j = 0; j < props.length; j++) {
6807 wrapProp(props[j], xhr);
6808 }
6809
6810 if ('onreadystatechange' in xhr && isFunction(xhr.onreadystatechange)) {
6811 fill(
6812 xhr,
6813 'onreadystatechange',
6814 function(orig) {
6815 return self.wrap(orig, undefined, onreadystatechangeHandler);
6816 } /* intentionally don't track this instrumentation */
6817 );
6818 } else {
6819 // if onreadystatechange wasn't actually set by the page on this xhr, we
6820 // are free to set our own and capture the breadcrumb
6821 xhr.onreadystatechange = onreadystatechangeHandler;
6822 }
6823
6824 return origSend.apply(this, arguments);
6825 };
6826 },
6827 wrappedBuiltIns
6828 );
6829 }
6830
6831 if (autoBreadcrumbs.xhr && 'fetch' in _window) {
6832 fill(
6833 _window,
6834 'fetch',
6835 function(origFetch) {
6836 return function(fn, t) {
6837 // preserve arity
6838 // Make a copy of the arguments to prevent deoptimization
6839 // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
6840 var args = new Array(arguments.length);
6841 for (var i = 0; i < args.length; ++i) {
6842 args[i] = arguments[i];
6843 }
6844
6845 var fetchInput = args[0];
6846 var method = 'GET';
6847 var url;
6848
6849 if (typeof fetchInput === 'string') {
6850 url = fetchInput;
6851 } else if ('Request' in _window && fetchInput instanceof _window.Request) {
6852 url = fetchInput.url;
6853 if (fetchInput.method) {
6854 method = fetchInput.method;
6855 }
6856 } else {
6857 url = '' + fetchInput;
6858 }
6859
6860 if (args[1] && args[1].method) {
6861 method = args[1].method;
6862 }
6863
6864 var fetchData = {
6865 method: method,
6866 url: url,
6867 status_code: null
6868 };
6869
6870 self.captureBreadcrumb({
6871 type: 'http',
6872 category: 'fetch',
6873 data: fetchData
6874 });
6875
6876 return origFetch.apply(this, args).then(function(response) {
6877 fetchData.status_code = response.status;
6878
6879 return response;
6880 });
6881 };
6882 },
6883 wrappedBuiltIns
6884 );
6885 }
6886
6887 // Capture breadcrumbs from any click that is unhandled / bubbled up all the way
6888 // to the document. Do this before we instrument addEventListener.
6889 if (autoBreadcrumbs.dom && this._hasDocument) {
6890 if (_document.addEventListener) {
6891 _document.addEventListener('click', self._breadcrumbEventHandler('click'), false);
6892 _document.addEventListener('keypress', self._keypressEventHandler(), false);
6893 } else {
6894 // IE8 Compatibility
6895 _document.attachEvent('onclick', self._breadcrumbEventHandler('click'));
6896 _document.attachEvent('onkeypress', self._keypressEventHandler());
6897 }
6898 }
6899
6900 // record navigation (URL) changes
6901 // NOTE: in Chrome App environment, touching history.pushState, *even inside
6902 // a try/catch block*, will cause Chrome to output an error to console.error
6903 // borrowed from: https://github.com/angular/angular.js/pull/13945/files
6904 var chrome = _window.chrome;
6905 var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;
6906 var hasPushAndReplaceState =
6907 !isChromePackagedApp &&
6908 _window.history &&
6909 history.pushState &&
6910 history.replaceState;
6911 if (autoBreadcrumbs.location && hasPushAndReplaceState) {
6912 // TODO: remove onpopstate handler on uninstall()
6913 var oldOnPopState = _window.onpopstate;
6914 _window.onpopstate = function() {
6915 var currentHref = self._location.href;
6916 self._captureUrlChange(self._lastHref, currentHref);
6917
6918 if (oldOnPopState) {
6919 return oldOnPopState.apply(this, arguments);
6920 }
6921 };
6922
6923 var historyReplacementFunction = function(origHistFunction) {
6924 // note history.pushState.length is 0; intentionally not declaring
6925 // params to preserve 0 arity
6926 return function(/* state, title, url */) {
6927 var url = arguments.length > 2 ? arguments[2] : undefined;
6928
6929 // url argument is optional
6930 if (url) {
6931 // coerce to string (this is what pushState does)
6932 self._captureUrlChange(self._lastHref, url + '');
6933 }
6934
6935 return origHistFunction.apply(this, arguments);
6936 };
6937 };
6938
6939 fill(history, 'pushState', historyReplacementFunction, wrappedBuiltIns);
6940 fill(history, 'replaceState', historyReplacementFunction, wrappedBuiltIns);
6941 }
6942
6943 if (autoBreadcrumbs.console && 'console' in _window && console.log) {
6944 // console
6945 var consoleMethodCallback = function(msg, data) {
6946 self.captureBreadcrumb({
6947 message: msg,
6948 level: data.level,
6949 category: 'console'
6950 });
6951 };
6952
6953 each(['debug', 'info', 'warn', 'error', 'log'], function(_, level) {
6954 wrapConsoleMethod(console, level, consoleMethodCallback);
6955 });
6956 }
6957 },
6958
6959 _restoreBuiltIns: function() {
6960 // restore any wrapped builtins
6961 var builtin;
6962 while (this._wrappedBuiltIns.length) {
6963 builtin = this._wrappedBuiltIns.shift();
6964
6965 var obj = builtin[0],
6966 name = builtin[1],
6967 orig = builtin[2];
6968
6969 obj[name] = orig;
6970 }
6971 },
6972
6973 _drainPlugins: function() {
6974 var self = this;
6975
6976 // FIX ME TODO
6977 each(this._plugins, function(_, plugin) {
6978 var installer = plugin[0];
6979 var args = plugin[1];
6980 installer.apply(self, [self].concat(args));
6981 });
6982 },
6983
6984 _parseDSN: function(str) {
6985 var m = dsnPattern.exec(str),
6986 dsn = {},
6987 i = 7;
6988
6989 try {
6990 while (i--) dsn[dsnKeys[i]] = m[i] || '';
6991 } catch (e) {
6992 throw new RavenConfigError('Invalid DSN: ' + str);
6993 }
6994
6995 if (dsn.pass && !this._globalOptions.allowSecretKey) {
6996 throw new RavenConfigError(
6997 'Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key'
6998 );
6999 }
7000
7001 return dsn;
7002 },
7003
7004 _getGlobalServer: function(uri) {
7005 // assemble the endpoint from the uri pieces
7006 var globalServer = '//' + uri.host + (uri.port ? ':' + uri.port : '');
7007
7008 if (uri.protocol) {
7009 globalServer = uri.protocol + ':' + globalServer;
7010 }
7011 return globalServer;
7012 },
7013
7014 _handleOnErrorStackInfo: function() {
7015 // if we are intentionally ignoring errors via onerror, bail out
7016 if (!this._ignoreOnError) {
7017 this._handleStackInfo.apply(this, arguments);
7018 }
7019 },
7020
7021 _handleStackInfo: function(stackInfo, options) {
7022 var frames = this._prepareFrames(stackInfo, options);
7023
7024 this._triggerEvent('handle', {
7025 stackInfo: stackInfo,
7026 options: options
7027 });
7028
7029 this._processException(
7030 stackInfo.name,
7031 stackInfo.message,
7032 stackInfo.url,
7033 stackInfo.lineno,
7034 frames,
7035 options
7036 );
7037 },
7038
7039 _prepareFrames: function(stackInfo, options) {
7040 var self = this;
7041 var frames = [];
7042 if (stackInfo.stack && stackInfo.stack.length) {
7043 each(stackInfo.stack, function(i, stack) {
7044 var frame = self._normalizeFrame(stack, stackInfo.url);
7045 if (frame) {
7046 frames.push(frame);
7047 }
7048 });
7049
7050 // e.g. frames captured via captureMessage throw
7051 if (options && options.trimHeadFrames) {
7052 for (var j = 0; j < options.trimHeadFrames && j < frames.length; j++) {
7053 frames[j].in_app = false;
7054 }
7055 }
7056 }
7057 frames = frames.slice(0, this._globalOptions.stackTraceLimit);
7058 return frames;
7059 },
7060
7061 _normalizeFrame: function(frame, stackInfoUrl) {
7062 // normalize the frames data
7063 var normalized = {
7064 filename: frame.url,
7065 lineno: frame.line,
7066 colno: frame.column,
7067 function: frame.func || '?'
7068 };
7069
7070 // Case when we don't have any information about the error
7071 // E.g. throwing a string or raw object, instead of an `Error` in Firefox
7072 // Generating synthetic error doesn't add any value here
7073 //
7074 // We should probably somehow let a user know that they should fix their code
7075 if (!frame.url) {
7076 normalized.filename = stackInfoUrl; // fallback to whole stacks url from onerror handler
7077 }
7078
7079 normalized.in_app = !// determine if an exception came from outside of our app
7080 // first we check the global includePaths list.
7081 (
7082 (!!this._globalOptions.includePaths.test &&
7083 !this._globalOptions.includePaths.test(normalized.filename)) ||
7084 // Now we check for fun, if the function name is Raven or TraceKit
7085 /(Raven|TraceKit)\./.test(normalized['function']) ||
7086 // finally, we do a last ditch effort and check for raven.min.js
7087 /raven\.(min\.)?js$/.test(normalized.filename)
7088 );
7089
7090 return normalized;
7091 },
7092
7093 _processException: function(type, message, fileurl, lineno, frames, options) {
7094 var prefixedMessage = (type ? type + ': ' : '') + (message || '');
7095 if (
7096 !!this._globalOptions.ignoreErrors.test &&
7097 (this._globalOptions.ignoreErrors.test(message) ||
7098 this._globalOptions.ignoreErrors.test(prefixedMessage))
7099 ) {
7100 return;
7101 }
7102
7103 var stacktrace;
7104
7105 if (frames && frames.length) {
7106 fileurl = frames[0].filename || fileurl;
7107 // Sentry expects frames oldest to newest
7108 // and JS sends them as newest to oldest
7109 frames.reverse();
7110 stacktrace = {frames: frames};
7111 } else if (fileurl) {
7112 stacktrace = {
7113 frames: [
7114 {
7115 filename: fileurl,
7116 lineno: lineno,
7117 in_app: true
7118 }
7119 ]
7120 };
7121 }
7122
7123 if (
7124 !!this._globalOptions.ignoreUrls.test &&
7125 this._globalOptions.ignoreUrls.test(fileurl)
7126 ) {
7127 return;
7128 }
7129
7130 if (
7131 !!this._globalOptions.whitelistUrls.test &&
7132 !this._globalOptions.whitelistUrls.test(fileurl)
7133 ) {
7134 return;
7135 }
7136
7137 var data = objectMerge(
7138 {
7139 // sentry.interfaces.Exception
7140 exception: {
7141 values: [
7142 {
7143 type: type,
7144 value: message,
7145 stacktrace: stacktrace
7146 }
7147 ]
7148 },
7149 culprit: fileurl
7150 },
7151 options
7152 );
7153
7154 // Fire away!
7155 this._send(data);
7156 },
7157
7158 _trimPacket: function(data) {
7159 // For now, we only want to truncate the two different messages
7160 // but this could/should be expanded to just trim everything
7161 var max = this._globalOptions.maxMessageLength;
7162 if (data.message) {
7163 data.message = truncate(data.message, max);
7164 }
7165 if (data.exception) {
7166 var exception = data.exception.values[0];
7167 exception.value = truncate(exception.value, max);
7168 }
7169
7170 var request = data.request;
7171 if (request) {
7172 if (request.url) {
7173 request.url = truncate(request.url, this._globalOptions.maxUrlLength);
7174 }
7175 if (request.Referer) {
7176 request.Referer = truncate(request.Referer, this._globalOptions.maxUrlLength);
7177 }
7178 }
7179
7180 if (data.breadcrumbs && data.breadcrumbs.values)
7181 this._trimBreadcrumbs(data.breadcrumbs);
7182
7183 return data;
7184 },
7185
7186 /**
7187 * Truncate breadcrumb values (right now just URLs)
7188 */
7189 _trimBreadcrumbs: function(breadcrumbs) {
7190 // known breadcrumb properties with urls
7191 // TODO: also consider arbitrary prop values that start with (https?)?://
7192 var urlProps = ['to', 'from', 'url'],
7193 urlProp,
7194 crumb,
7195 data;
7196
7197 for (var i = 0; i < breadcrumbs.values.length; ++i) {
7198 crumb = breadcrumbs.values[i];
7199 if (
7200 !crumb.hasOwnProperty('data') ||
7201 !isObject(crumb.data) ||
7202 objectFrozen(crumb.data)
7203 )
7204 continue;
7205
7206 data = objectMerge({}, crumb.data);
7207 for (var j = 0; j < urlProps.length; ++j) {
7208 urlProp = urlProps[j];
7209 if (data.hasOwnProperty(urlProp) && data[urlProp]) {
7210 data[urlProp] = truncate(data[urlProp], this._globalOptions.maxUrlLength);
7211 }
7212 }
7213 breadcrumbs.values[i].data = data;
7214 }
7215 },
7216
7217 _getHttpData: function() {
7218 if (!this._hasNavigator && !this._hasDocument) return;
7219 var httpData = {};
7220
7221 if (this._hasNavigator && _navigator.userAgent) {
7222 httpData.headers = {
7223 'User-Agent': navigator.userAgent
7224 };
7225 }
7226
7227 if (this._hasDocument) {
7228 if (_document.location && _document.location.href) {
7229 httpData.url = _document.location.href;
7230 }
7231 if (_document.referrer) {
7232 if (!httpData.headers) httpData.headers = {};
7233 httpData.headers.Referer = _document.referrer;
7234 }
7235 }
7236
7237 return httpData;
7238 },
7239
7240 _resetBackoff: function() {
7241 this._backoffDuration = 0;
7242 this._backoffStart = null;
7243 },
7244
7245 _shouldBackoff: function() {
7246 return this._backoffDuration && now() - this._backoffStart < this._backoffDuration;
7247 },
7248
7249 /**
7250 * Returns true if the in-process data payload matches the signature
7251 * of the previously-sent data
7252 *
7253 * NOTE: This has to be done at this level because TraceKit can generate
7254 * data from window.onerror WITHOUT an exception object (IE8, IE9,
7255 * other old browsers). This can take the form of an "exception"
7256 * data object with a single frame (derived from the onerror args).
7257 */
7258 _isRepeatData: function(current) {
7259 var last = this._lastData;
7260
7261 if (
7262 !last ||
7263 current.message !== last.message || // defined for captureMessage
7264 current.culprit !== last.culprit // defined for captureException/onerror
7265 )
7266 return false;
7267
7268 // Stacktrace interface (i.e. from captureMessage)
7269 if (current.stacktrace || last.stacktrace) {
7270 return isSameStacktrace(current.stacktrace, last.stacktrace);
7271 } else if (current.exception || last.exception) {
7272 // Exception interface (i.e. from captureException/onerror)
7273 return isSameException(current.exception, last.exception);
7274 }
7275
7276 return true;
7277 },
7278
7279 _setBackoffState: function(request) {
7280 // If we are already in a backoff state, don't change anything
7281 if (this._shouldBackoff()) {
7282 return;
7283 }
7284
7285 var status = request.status;
7286
7287 // 400 - project_id doesn't exist or some other fatal
7288 // 401 - invalid/revoked dsn
7289 // 429 - too many requests
7290 if (!(status === 400 || status === 401 || status === 429)) return;
7291
7292 var retry;
7293 try {
7294 // If Retry-After is not in Access-Control-Expose-Headers, most
7295 // browsers will throw an exception trying to access it
7296 retry = request.getResponseHeader('Retry-After');
7297 retry = parseInt(retry, 10) * 1000; // Retry-After is returned in seconds
7298 } catch (e) {
7299 /* eslint no-empty:0 */
7300 }
7301
7302 this._backoffDuration = retry
7303 ? // If Sentry server returned a Retry-After value, use it
7304 retry
7305 : // Otherwise, double the last backoff duration (starts at 1 sec)
7306 this._backoffDuration * 2 || 1000;
7307
7308 this._backoffStart = now();
7309 },
7310
7311 _send: function(data) {
7312 var globalOptions = this._globalOptions;
7313
7314 var baseData = {
7315 project: this._globalProject,
7316 logger: globalOptions.logger,
7317 platform: 'javascript'
7318 },
7319 httpData = this._getHttpData();
7320
7321 if (httpData) {
7322 baseData.request = httpData;
7323 }
7324
7325 // HACK: delete `trimHeadFrames` to prevent from appearing in outbound payload
7326 if (data.trimHeadFrames) delete data.trimHeadFrames;
7327
7328 data = objectMerge(baseData, data);
7329
7330 // Merge in the tags and extra separately since objectMerge doesn't handle a deep merge
7331 data.tags = objectMerge(objectMerge({}, this._globalContext.tags), data.tags);
7332 data.extra = objectMerge(objectMerge({}, this._globalContext.extra), data.extra);
7333
7334 // Send along our own collected metadata with extra
7335 data.extra['session:duration'] = now() - this._startTime;
7336
7337 if (this._breadcrumbs && this._breadcrumbs.length > 0) {
7338 // intentionally make shallow copy so that additions
7339 // to breadcrumbs aren't accidentally sent in this request
7340 data.breadcrumbs = {
7341 values: [].slice.call(this._breadcrumbs, 0)
7342 };
7343 }
7344
7345 // If there are no tags/extra, strip the key from the payload alltogther.
7346 if (isEmptyObject(data.tags)) delete data.tags;
7347
7348 if (this._globalContext.user) {
7349 // sentry.interfaces.User
7350 data.user = this._globalContext.user;
7351 }
7352
7353 // Include the environment if it's defined in globalOptions
7354 if (globalOptions.environment) data.environment = globalOptions.environment;
7355
7356 // Include the release if it's defined in globalOptions
7357 if (globalOptions.release) data.release = globalOptions.release;
7358
7359 // Include server_name if it's defined in globalOptions
7360 if (globalOptions.serverName) data.server_name = globalOptions.serverName;
7361
7362 if (isFunction(globalOptions.dataCallback)) {
7363 data = globalOptions.dataCallback(data) || data;
7364 }
7365
7366 // Why??????????
7367 if (!data || isEmptyObject(data)) {
7368 return;
7369 }
7370
7371 // Check if the request should be filtered or not
7372 if (
7373 isFunction(globalOptions.shouldSendCallback) &&
7374 !globalOptions.shouldSendCallback(data)
7375 ) {
7376 return;
7377 }
7378
7379 // Backoff state: Sentry server previously responded w/ an error (e.g. 429 - too many requests),
7380 // so drop requests until "cool-off" period has elapsed.
7381 if (this._shouldBackoff()) {
7382 this._logDebug('warn', 'Raven dropped error due to backoff: ', data);
7383 return;
7384 }
7385
7386 if (typeof globalOptions.sampleRate === 'number') {
7387 if (Math.random() < globalOptions.sampleRate) {
7388 this._sendProcessedPayload(data);
7389 }
7390 } else {
7391 this._sendProcessedPayload(data);
7392 }
7393 },
7394
7395 _getUuid: function() {
7396 return uuid4();
7397 },
7398
7399 _sendProcessedPayload: function(data, callback) {
7400 var self = this;
7401 var globalOptions = this._globalOptions;
7402
7403 if (!this.isSetup()) return;
7404
7405 // Try and clean up the packet before sending by truncating long values
7406 data = this._trimPacket(data);
7407
7408 // ideally duplicate error testing should occur *before* dataCallback/shouldSendCallback,
7409 // but this would require copying an un-truncated copy of the data packet, which can be
7410 // arbitrarily deep (extra_data) -- could be worthwhile? will revisit
7411 if (!this._globalOptions.allowDuplicates && this._isRepeatData(data)) {
7412 this._logDebug('warn', 'Raven dropped repeat event: ', data);
7413 return;
7414 }
7415
7416 // Send along an event_id if not explicitly passed.
7417 // This event_id can be used to reference the error within Sentry itself.
7418 // Set lastEventId after we know the error should actually be sent
7419 this._lastEventId = data.event_id || (data.event_id = this._getUuid());
7420
7421 // Store outbound payload after trim
7422 this._lastData = data;
7423
7424 this._logDebug('debug', 'Raven about to send:', data);
7425
7426 var auth = {
7427 sentry_version: '7',
7428 sentry_client: 'raven-js/' + this.VERSION,
7429 sentry_key: this._globalKey
7430 };
7431
7432 if (this._globalSecret) {
7433 auth.sentry_secret = this._globalSecret;
7434 }
7435
7436 var exception = data.exception && data.exception.values[0];
7437 this.captureBreadcrumb({
7438 category: 'sentry',
7439 message: exception
7440 ? (exception.type ? exception.type + ': ' : '') + exception.value
7441 : data.message,
7442 event_id: data.event_id,
7443 level: data.level || 'error' // presume error unless specified
7444 });
7445
7446 var url = this._globalEndpoint;
7447 (globalOptions.transport || this._makeRequest).call(this, {
7448 url: url,
7449 auth: auth,
7450 data: data,
7451 options: globalOptions,
7452 onSuccess: function success() {
7453 self._resetBackoff();
7454
7455 self._triggerEvent('success', {
7456 data: data,
7457 src: url
7458 });
7459 callback && callback();
7460 },
7461 onError: function failure(error) {
7462 self._logDebug('error', 'Raven transport failed to send: ', error);
7463
7464 if (error.request) {
7465 self._setBackoffState(error.request);
7466 }
7467
7468 self._triggerEvent('failure', {
7469 data: data,
7470 src: url
7471 });
7472 error = error || new Error('Raven send failed (no additional details provided)');
7473 callback && callback(error);
7474 }
7475 });
7476 },
7477
7478 _makeRequest: function(opts) {
7479 var request = _window.XMLHttpRequest && new _window.XMLHttpRequest();
7480 if (!request) return;
7481
7482 // if browser doesn't support CORS (e.g. IE7), we are out of luck
7483 var hasCORS = 'withCredentials' in request || typeof XDomainRequest !== 'undefined';
7484
7485 if (!hasCORS) return;
7486
7487 var url = opts.url;
7488
7489 if ('withCredentials' in request) {
7490 request.onreadystatechange = function() {
7491 if (request.readyState !== 4) {
7492 return;
7493 } else if (request.status === 200) {
7494 opts.onSuccess && opts.onSuccess();
7495 } else if (opts.onError) {
7496 var err = new Error('Sentry error code: ' + request.status);
7497 err.request = request;
7498 opts.onError(err);
7499 }
7500 };
7501 } else {
7502 request = new XDomainRequest();
7503 // xdomainrequest cannot go http -> https (or vice versa),
7504 // so always use protocol relative
7505 url = url.replace(/^https?:/, '');
7506
7507 // onreadystatechange not supported by XDomainRequest
7508 if (opts.onSuccess) {
7509 request.onload = opts.onSuccess;
7510 }
7511 if (opts.onError) {
7512 request.onerror = function() {
7513 var err = new Error('Sentry error code: XDomainRequest');
7514 err.request = request;
7515 opts.onError(err);
7516 };
7517 }
7518 }
7519
7520 // NOTE: auth is intentionally sent as part of query string (NOT as custom
7521 // HTTP header) so as to avoid preflight CORS requests
7522 request.open('POST', url + '?' + urlencode(opts.auth));
7523 request.send(stringify(opts.data));
7524 },
7525
7526 _logDebug: function(level) {
7527 if (this._originalConsoleMethods[level] && this.debug) {
7528 // In IE<10 console methods do not have their own 'apply' method
7529 Function.prototype.apply.call(
7530 this._originalConsoleMethods[level],
7531 this._originalConsole,
7532 [].slice.call(arguments, 1)
7533 );
7534 }
7535 },
7536
7537 _mergeContext: function(key, context) {
7538 if (isUndefined(context)) {
7539 delete this._globalContext[key];
7540 } else {
7541 this._globalContext[key] = objectMerge(this._globalContext[key] || {}, context);
7542 }
7543 }
7544 };
7545
7546 // Deprecations
7547 Raven.prototype.setUser = Raven.prototype.setUserContext;
7548 Raven.prototype.setReleaseContext = Raven.prototype.setRelease;
7549
7550 module.exports = Raven;
7551
7552
7553 /***/ }),
7554
7555 /***/ "./node_modules/raven-js/src/singleton.js":
7556 /*!************************************************!*\
7557 !*** ./node_modules/raven-js/src/singleton.js ***!
7558 \************************************************/
7559 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7560
7561 /**
7562 * Enforces a single instance of the Raven client, and the
7563 * main entry point for Raven. If you are a consumer of the
7564 * Raven library, you SHOULD load this file (vs raven.js).
7565 **/
7566
7567 var RavenConstructor = __webpack_require__(/*! ./raven */ "./node_modules/raven-js/src/raven.js");
7568
7569 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
7570 var _window =
7571 typeof window !== 'undefined'
7572 ? window
7573 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
7574 var _Raven = _window.Raven;
7575
7576 var Raven = new RavenConstructor();
7577
7578 /*
7579 * Allow multiple versions of Raven to be installed.
7580 * Strip Raven from the global context and returns the instance.
7581 *
7582 * @return {Raven}
7583 */
7584 Raven.noConflict = function() {
7585 _window.Raven = _Raven;
7586 return Raven;
7587 };
7588
7589 Raven.afterLoad();
7590
7591 module.exports = Raven;
7592
7593
7594 /***/ }),
7595
7596 /***/ "./node_modules/raven-js/src/utils.js":
7597 /*!********************************************!*\
7598 !*** ./node_modules/raven-js/src/utils.js ***!
7599 \********************************************/
7600 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7601
7602 var _window =
7603 typeof window !== 'undefined'
7604 ? window
7605 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
7606
7607 function isObject(what) {
7608 return typeof what === 'object' && what !== null;
7609 }
7610
7611 // Yanked from https://git.io/vS8DV re-used under CC0
7612 // with some tiny modifications
7613 function isError(value) {
7614 switch ({}.toString.call(value)) {
7615 case '[object Error]':
7616 return true;
7617 case '[object Exception]':
7618 return true;
7619 case '[object DOMException]':
7620 return true;
7621 default:
7622 return value instanceof Error;
7623 }
7624 }
7625
7626 function isErrorEvent(value) {
7627 return supportsErrorEvent() && {}.toString.call(value) === '[object ErrorEvent]';
7628 }
7629
7630 function isUndefined(what) {
7631 return what === void 0;
7632 }
7633
7634 function isFunction(what) {
7635 return typeof what === 'function';
7636 }
7637
7638 function isString(what) {
7639 return Object.prototype.toString.call(what) === '[object String]';
7640 }
7641
7642 function isEmptyObject(what) {
7643 for (var _ in what) return false; // eslint-disable-line guard-for-in, no-unused-vars
7644 return true;
7645 }
7646
7647 function supportsErrorEvent() {
7648 try {
7649 new ErrorEvent(''); // eslint-disable-line no-new
7650 return true;
7651 } catch (e) {
7652 return false;
7653 }
7654 }
7655
7656 function wrappedCallback(callback) {
7657 function dataCallback(data, original) {
7658 var normalizedData = callback(data) || data;
7659 if (original) {
7660 return original(normalizedData) || normalizedData;
7661 }
7662 return normalizedData;
7663 }
7664
7665 return dataCallback;
7666 }
7667
7668 function each(obj, callback) {
7669 var i, j;
7670
7671 if (isUndefined(obj.length)) {
7672 for (i in obj) {
7673 if (hasKey(obj, i)) {
7674 callback.call(null, i, obj[i]);
7675 }
7676 }
7677 } else {
7678 j = obj.length;
7679 if (j) {
7680 for (i = 0; i < j; i++) {
7681 callback.call(null, i, obj[i]);
7682 }
7683 }
7684 }
7685 }
7686
7687 function objectMerge(obj1, obj2) {
7688 if (!obj2) {
7689 return obj1;
7690 }
7691 each(obj2, function(key, value) {
7692 obj1[key] = value;
7693 });
7694 return obj1;
7695 }
7696
7697 /**
7698 * This function is only used for react-native.
7699 * react-native freezes object that have already been sent over the
7700 * js bridge. We need this function in order to check if the object is frozen.
7701 * So it's ok that objectFrozen returns false if Object.isFrozen is not
7702 * supported because it's not relevant for other "platforms". See related issue:
7703 * https://github.com/getsentry/react-native-sentry/issues/57
7704 */
7705 function objectFrozen(obj) {
7706 if (!Object.isFrozen) {
7707 return false;
7708 }
7709 return Object.isFrozen(obj);
7710 }
7711
7712 function truncate(str, max) {
7713 return !max || str.length <= max ? str : str.substr(0, max) + '\u2026';
7714 }
7715
7716 /**
7717 * hasKey, a better form of hasOwnProperty
7718 * Example: hasKey(MainHostObject, property) === true/false
7719 *
7720 * @param {Object} host object to check property
7721 * @param {string} key to check
7722 */
7723 function hasKey(object, key) {
7724 return Object.prototype.hasOwnProperty.call(object, key);
7725 }
7726
7727 function joinRegExp(patterns) {
7728 // Combine an array of regular expressions and strings into one large regexp
7729 // Be mad.
7730 var sources = [],
7731 i = 0,
7732 len = patterns.length,
7733 pattern;
7734
7735 for (; i < len; i++) {
7736 pattern = patterns[i];
7737 if (isString(pattern)) {
7738 // If it's a string, we need to escape it
7739 // Taken from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
7740 sources.push(pattern.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, '\\$1'));
7741 } else if (pattern && pattern.source) {
7742 // If it's a regexp already, we want to extract the source
7743 sources.push(pattern.source);
7744 }
7745 // Intentionally skip other cases
7746 }
7747 return new RegExp(sources.join('|'), 'i');
7748 }
7749
7750 function urlencode(o) {
7751 var pairs = [];
7752 each(o, function(key, value) {
7753 pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));
7754 });
7755 return pairs.join('&');
7756 }
7757
7758 // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B
7759 // intentionally using regex and not <a/> href parsing trick because React Native and other
7760 // environments where DOM might not be available
7761 function parseUrl(url) {
7762 var match = url.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);
7763 if (!match) return {};
7764
7765 // coerce to undefined values to empty string so we don't get 'undefined'
7766 var query = match[6] || '';
7767 var fragment = match[8] || '';
7768 return {
7769 protocol: match[2],
7770 host: match[4],
7771 path: match[5],
7772 relative: match[5] + query + fragment // everything minus origin
7773 };
7774 }
7775 function uuid4() {
7776 var crypto = _window.crypto || _window.msCrypto;
7777
7778 if (!isUndefined(crypto) && crypto.getRandomValues) {
7779 // Use window.crypto API if available
7780 // eslint-disable-next-line no-undef
7781 var arr = new Uint16Array(8);
7782 crypto.getRandomValues(arr);
7783
7784 // set 4 in byte 7
7785 arr[3] = (arr[3] & 0xfff) | 0x4000;
7786 // set 2 most significant bits of byte 9 to '10'
7787 arr[4] = (arr[4] & 0x3fff) | 0x8000;
7788
7789 var pad = function(num) {
7790 var v = num.toString(16);
7791 while (v.length < 4) {
7792 v = '0' + v;
7793 }
7794 return v;
7795 };
7796
7797 return (
7798 pad(arr[0]) +
7799 pad(arr[1]) +
7800 pad(arr[2]) +
7801 pad(arr[3]) +
7802 pad(arr[4]) +
7803 pad(arr[5]) +
7804 pad(arr[6]) +
7805 pad(arr[7])
7806 );
7807 } else {
7808 // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523
7809 return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
7810 var r = (Math.random() * 16) | 0,
7811 v = c === 'x' ? r : (r & 0x3) | 0x8;
7812 return v.toString(16);
7813 });
7814 }
7815 }
7816
7817 /**
7818 * Given a child DOM element, returns a query-selector statement describing that
7819 * and its ancestors
7820 * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]
7821 * @param elem
7822 * @returns {string}
7823 */
7824 function htmlTreeAsString(elem) {
7825 /* eslint no-extra-parens:0*/
7826 var MAX_TRAVERSE_HEIGHT = 5,
7827 MAX_OUTPUT_LEN = 80,
7828 out = [],
7829 height = 0,
7830 len = 0,
7831 separator = ' > ',
7832 sepLength = separator.length,
7833 nextStr;
7834
7835 while (elem && height++ < MAX_TRAVERSE_HEIGHT) {
7836 nextStr = htmlElementAsString(elem);
7837 // bail out if
7838 // - nextStr is the 'html' element
7839 // - the length of the string that would be created exceeds MAX_OUTPUT_LEN
7840 // (ignore this limit if we are on the first iteration)
7841 if (
7842 nextStr === 'html' ||
7843 (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)
7844 ) {
7845 break;
7846 }
7847
7848 out.push(nextStr);
7849
7850 len += nextStr.length;
7851 elem = elem.parentNode;
7852 }
7853
7854 return out.reverse().join(separator);
7855 }
7856
7857 /**
7858 * Returns a simple, query-selector representation of a DOM element
7859 * e.g. [HTMLElement] => input#foo.btn[name=baz]
7860 * @param HTMLElement
7861 * @returns {string}
7862 */
7863 function htmlElementAsString(elem) {
7864 var out = [],
7865 className,
7866 classes,
7867 key,
7868 attr,
7869 i;
7870
7871 if (!elem || !elem.tagName) {
7872 return '';
7873 }
7874
7875 out.push(elem.tagName.toLowerCase());
7876 if (elem.id) {
7877 out.push('#' + elem.id);
7878 }
7879
7880 className = elem.className;
7881 if (className && isString(className)) {
7882 classes = className.split(/\s+/);
7883 for (i = 0; i < classes.length; i++) {
7884 out.push('.' + classes[i]);
7885 }
7886 }
7887 var attrWhitelist = ['type', 'name', 'title', 'alt'];
7888 for (i = 0; i < attrWhitelist.length; i++) {
7889 key = attrWhitelist[i];
7890 attr = elem.getAttribute(key);
7891 if (attr) {
7892 out.push('[' + key + '="' + attr + '"]');
7893 }
7894 }
7895 return out.join('');
7896 }
7897
7898 /**
7899 * Returns true if either a OR b is truthy, but not both
7900 */
7901 function isOnlyOneTruthy(a, b) {
7902 return !!(!!a ^ !!b);
7903 }
7904
7905 /**
7906 * Returns true if the two input exception interfaces have the same content
7907 */
7908 function isSameException(ex1, ex2) {
7909 if (isOnlyOneTruthy(ex1, ex2)) return false;
7910
7911 ex1 = ex1.values[0];
7912 ex2 = ex2.values[0];
7913
7914 if (ex1.type !== ex2.type || ex1.value !== ex2.value) return false;
7915
7916 return isSameStacktrace(ex1.stacktrace, ex2.stacktrace);
7917 }
7918
7919 /**
7920 * Returns true if the two input stack trace interfaces have the same content
7921 */
7922 function isSameStacktrace(stack1, stack2) {
7923 if (isOnlyOneTruthy(stack1, stack2)) return false;
7924
7925 var frames1 = stack1.frames;
7926 var frames2 = stack2.frames;
7927
7928 // Exit early if frame count differs
7929 if (frames1.length !== frames2.length) return false;
7930
7931 // Iterate through every frame; bail out if anything differs
7932 var a, b;
7933 for (var i = 0; i < frames1.length; i++) {
7934 a = frames1[i];
7935 b = frames2[i];
7936 if (
7937 a.filename !== b.filename ||
7938 a.lineno !== b.lineno ||
7939 a.colno !== b.colno ||
7940 a['function'] !== b['function']
7941 )
7942 return false;
7943 }
7944 return true;
7945 }
7946
7947 /**
7948 * Polyfill a method
7949 * @param obj object e.g. `document`
7950 * @param name method name present on object e.g. `addEventListener`
7951 * @param replacement replacement function
7952 * @param track {optional} record instrumentation to an array
7953 */
7954 function fill(obj, name, replacement, track) {
7955 var orig = obj[name];
7956 obj[name] = replacement(orig);
7957 if (track) {
7958 track.push([obj, name, orig]);
7959 }
7960 }
7961
7962 module.exports = {
7963 isObject: isObject,
7964 isError: isError,
7965 isErrorEvent: isErrorEvent,
7966 isUndefined: isUndefined,
7967 isFunction: isFunction,
7968 isString: isString,
7969 isEmptyObject: isEmptyObject,
7970 supportsErrorEvent: supportsErrorEvent,
7971 wrappedCallback: wrappedCallback,
7972 each: each,
7973 objectMerge: objectMerge,
7974 truncate: truncate,
7975 objectFrozen: objectFrozen,
7976 hasKey: hasKey,
7977 joinRegExp: joinRegExp,
7978 urlencode: urlencode,
7979 uuid4: uuid4,
7980 htmlTreeAsString: htmlTreeAsString,
7981 htmlElementAsString: htmlElementAsString,
7982 isSameException: isSameException,
7983 isSameStacktrace: isSameStacktrace,
7984 parseUrl: parseUrl,
7985 fill: fill
7986 };
7987
7988
7989 /***/ }),
7990
7991 /***/ "./node_modules/raven-js/vendor/TraceKit/tracekit.js":
7992 /*!***********************************************************!*\
7993 !*** ./node_modules/raven-js/vendor/TraceKit/tracekit.js ***!
7994 \***********************************************************/
7995 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7996
7997 var utils = __webpack_require__(/*! ../../src/utils */ "./node_modules/raven-js/src/utils.js");
7998
7999 /*
8000 TraceKit - Cross brower stack traces
8001
8002 This was originally forked from github.com/occ/TraceKit, but has since been
8003 largely re-written and is now maintained as part of raven-js. Tests for
8004 this are in test/vendor.
8005
8006 MIT license
8007 */
8008
8009 var TraceKit = {
8010 collectWindowErrors: true,
8011 debug: false
8012 };
8013
8014 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
8015 var _window =
8016 typeof window !== 'undefined'
8017 ? window
8018 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
8019
8020 // global reference to slice
8021 var _slice = [].slice;
8022 var UNKNOWN_FUNCTION = '?';
8023
8024 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types
8025 var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;
8026
8027 function getLocationHref() {
8028 if (typeof document === 'undefined' || document.location == null) return '';
8029
8030 return document.location.href;
8031 }
8032
8033 /**
8034 * TraceKit.report: cross-browser processing of unhandled exceptions
8035 *
8036 * Syntax:
8037 * TraceKit.report.subscribe(function(stackInfo) { ... })
8038 * TraceKit.report.unsubscribe(function(stackInfo) { ... })
8039 * TraceKit.report(exception)
8040 * try { ...code... } catch(ex) { TraceKit.report(ex); }
8041 *
8042 * Supports:
8043 * - Firefox: full stack trace with line numbers, plus column number
8044 * on top frame; column number is not guaranteed
8045 * - Opera: full stack trace with line and column numbers
8046 * - Chrome: full stack trace with line and column numbers
8047 * - Safari: line and column number for the top frame only; some frames
8048 * may be missing, and column number is not guaranteed
8049 * - IE: line and column number for the top frame only; some frames
8050 * may be missing, and column number is not guaranteed
8051 *
8052 * In theory, TraceKit should work on all of the following versions:
8053 * - IE5.5+ (only 8.0 tested)
8054 * - Firefox 0.9+ (only 3.5+ tested)
8055 * - Opera 7+ (only 10.50 tested; versions 9 and earlier may require
8056 * Exceptions Have Stacktrace to be enabled in opera:config)
8057 * - Safari 3+ (only 4+ tested)
8058 * - Chrome 1+ (only 5+ tested)
8059 * - Konqueror 3.5+ (untested)
8060 *
8061 * Requires TraceKit.computeStackTrace.
8062 *
8063 * Tries to catch all unhandled exceptions and report them to the
8064 * subscribed handlers. Please note that TraceKit.report will rethrow the
8065 * exception. This is REQUIRED in order to get a useful stack trace in IE.
8066 * If the exception does not reach the top of the browser, you will only
8067 * get a stack trace from the point where TraceKit.report was called.
8068 *
8069 * Handlers receive a stackInfo object as described in the
8070 * TraceKit.computeStackTrace docs.
8071 */
8072 TraceKit.report = (function reportModuleWrapper() {
8073 var handlers = [],
8074 lastArgs = null,
8075 lastException = null,
8076 lastExceptionStack = null;
8077
8078 /**
8079 * Add a crash handler.
8080 * @param {Function} handler
8081 */
8082 function subscribe(handler) {
8083 installGlobalHandler();
8084 handlers.push(handler);
8085 }
8086
8087 /**
8088 * Remove a crash handler.
8089 * @param {Function} handler
8090 */
8091 function unsubscribe(handler) {
8092 for (var i = handlers.length - 1; i >= 0; --i) {
8093 if (handlers[i] === handler) {
8094 handlers.splice(i, 1);
8095 }
8096 }
8097 }
8098
8099 /**
8100 * Remove all crash handlers.
8101 */
8102 function unsubscribeAll() {
8103 uninstallGlobalHandler();
8104 handlers = [];
8105 }
8106
8107 /**
8108 * Dispatch stack information to all handlers.
8109 * @param {Object.<string, *>} stack
8110 */
8111 function notifyHandlers(stack, isWindowError) {
8112 var exception = null;
8113 if (isWindowError && !TraceKit.collectWindowErrors) {
8114 return;
8115 }
8116 for (var i in handlers) {
8117 if (handlers.hasOwnProperty(i)) {
8118 try {
8119 handlers[i].apply(null, [stack].concat(_slice.call(arguments, 2)));
8120 } catch (inner) {
8121 exception = inner;
8122 }
8123 }
8124 }
8125
8126 if (exception) {
8127 throw exception;
8128 }
8129 }
8130
8131 var _oldOnerrorHandler, _onErrorHandlerInstalled;
8132
8133 /**
8134 * Ensures all global unhandled exceptions are recorded.
8135 * Supported by Gecko and IE.
8136 * @param {string} message Error message.
8137 * @param {string} url URL of script that generated the exception.
8138 * @param {(number|string)} lineNo The line number at which the error
8139 * occurred.
8140 * @param {?(number|string)} colNo The column number at which the error
8141 * occurred.
8142 * @param {?Error} ex The actual Error object.
8143 */
8144 function traceKitWindowOnError(message, url, lineNo, colNo, ex) {
8145 var stack = null;
8146
8147 if (lastExceptionStack) {
8148 TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(
8149 lastExceptionStack,
8150 url,
8151 lineNo,
8152 message
8153 );
8154 processLastException();
8155 } else if (ex && utils.isError(ex)) {
8156 // non-string `ex` arg; attempt to extract stack trace
8157
8158 // New chrome and blink send along a real error object
8159 // Let's just report that like a normal error.
8160 // See: https://mikewest.org/2013/08/debugging-runtime-errors-with-window-onerror
8161 stack = TraceKit.computeStackTrace(ex);
8162 notifyHandlers(stack, true);
8163 } else {
8164 var location = {
8165 url: url,
8166 line: lineNo,
8167 column: colNo
8168 };
8169
8170 var name = undefined;
8171 var msg = message; // must be new var or will modify original `arguments`
8172 var groups;
8173 if ({}.toString.call(message) === '[object String]') {
8174 var groups = message.match(ERROR_TYPES_RE);
8175 if (groups) {
8176 name = groups[1];
8177 msg = groups[2];
8178 }
8179 }
8180
8181 location.func = UNKNOWN_FUNCTION;
8182
8183 stack = {
8184 name: name,
8185 message: msg,
8186 url: getLocationHref(),
8187 stack: [location]
8188 };
8189 notifyHandlers(stack, true);
8190 }
8191
8192 if (_oldOnerrorHandler) {
8193 return _oldOnerrorHandler.apply(this, arguments);
8194 }
8195
8196 return false;
8197 }
8198
8199 function installGlobalHandler() {
8200 if (_onErrorHandlerInstalled) {
8201 return;
8202 }
8203 _oldOnerrorHandler = _window.onerror;
8204 _window.onerror = traceKitWindowOnError;
8205 _onErrorHandlerInstalled = true;
8206 }
8207
8208 function uninstallGlobalHandler() {
8209 if (!_onErrorHandlerInstalled) {
8210 return;
8211 }
8212 _window.onerror = _oldOnerrorHandler;
8213 _onErrorHandlerInstalled = false;
8214 _oldOnerrorHandler = undefined;
8215 }
8216
8217 function processLastException() {
8218 var _lastExceptionStack = lastExceptionStack,
8219 _lastArgs = lastArgs;
8220 lastArgs = null;
8221 lastExceptionStack = null;
8222 lastException = null;
8223 notifyHandlers.apply(null, [_lastExceptionStack, false].concat(_lastArgs));
8224 }
8225
8226 /**
8227 * Reports an unhandled Error to TraceKit.
8228 * @param {Error} ex
8229 * @param {?boolean} rethrow If false, do not re-throw the exception.
8230 * Only used for window.onerror to not cause an infinite loop of
8231 * rethrowing.
8232 */
8233 function report(ex, rethrow) {
8234 var args = _slice.call(arguments, 1);
8235 if (lastExceptionStack) {
8236 if (lastException === ex) {
8237 return; // already caught by an inner catch block, ignore
8238 } else {
8239 processLastException();
8240 }
8241 }
8242
8243 var stack = TraceKit.computeStackTrace(ex);
8244 lastExceptionStack = stack;
8245 lastException = ex;
8246 lastArgs = args;
8247
8248 // If the stack trace is incomplete, wait for 2 seconds for
8249 // slow slow IE to see if onerror occurs or not before reporting
8250 // this exception; otherwise, we will end up with an incomplete
8251 // stack trace
8252 setTimeout(function() {
8253 if (lastException === ex) {
8254 processLastException();
8255 }
8256 }, stack.incomplete ? 2000 : 0);
8257
8258 if (rethrow !== false) {
8259 throw ex; // re-throw to propagate to the top level (and cause window.onerror)
8260 }
8261 }
8262
8263 report.subscribe = subscribe;
8264 report.unsubscribe = unsubscribe;
8265 report.uninstall = unsubscribeAll;
8266 return report;
8267 })();
8268
8269 /**
8270 * TraceKit.computeStackTrace: cross-browser stack traces in JavaScript
8271 *
8272 * Syntax:
8273 * s = TraceKit.computeStackTrace(exception) // consider using TraceKit.report instead (see below)
8274 * Returns:
8275 * s.name - exception name
8276 * s.message - exception message
8277 * s.stack[i].url - JavaScript or HTML file URL
8278 * s.stack[i].func - function name, or empty for anonymous functions (if guessing did not work)
8279 * s.stack[i].args - arguments passed to the function, if known
8280 * s.stack[i].line - line number, if known
8281 * s.stack[i].column - column number, if known
8282 *
8283 * Supports:
8284 * - Firefox: full stack trace with line numbers and unreliable column
8285 * number on top frame
8286 * - Opera 10: full stack trace with line and column numbers
8287 * - Opera 9-: full stack trace with line numbers
8288 * - Chrome: full stack trace with line and column numbers
8289 * - Safari: line and column number for the topmost stacktrace element
8290 * only
8291 * - IE: no line numbers whatsoever
8292 *
8293 * Tries to guess names of anonymous functions by looking for assignments
8294 * in the source code. In IE and Safari, we have to guess source file names
8295 * by searching for function bodies inside all page scripts. This will not
8296 * work for scripts that are loaded cross-domain.
8297 * Here be dragons: some function names may be guessed incorrectly, and
8298 * duplicate functions may be mismatched.
8299 *
8300 * TraceKit.computeStackTrace should only be used for tracing purposes.
8301 * Logging of unhandled exceptions should be done with TraceKit.report,
8302 * which builds on top of TraceKit.computeStackTrace and provides better
8303 * IE support by utilizing the window.onerror event to retrieve information
8304 * about the top of the stack.
8305 *
8306 * Note: In IE and Safari, no stack trace is recorded on the Error object,
8307 * so computeStackTrace instead walks its *own* chain of callers.
8308 * This means that:
8309 * * in Safari, some methods may be missing from the stack trace;
8310 * * in IE, the topmost function in the stack trace will always be the
8311 * caller of computeStackTrace.
8312 *
8313 * This is okay for tracing (because you are likely to be calling
8314 * computeStackTrace from the function you want to be the topmost element
8315 * of the stack trace anyway), but not okay for logging unhandled
8316 * exceptions (because your catch block will likely be far away from the
8317 * inner function that actually caused the exception).
8318 *
8319 */
8320 TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
8321 // Contents of Exception in various browsers.
8322 //
8323 // SAFARI:
8324 // ex.message = Can't find variable: qq
8325 // ex.line = 59
8326 // ex.sourceId = 580238192
8327 // ex.sourceURL = http://...
8328 // ex.expressionBeginOffset = 96
8329 // ex.expressionCaretOffset = 98
8330 // ex.expressionEndOffset = 98
8331 // ex.name = ReferenceError
8332 //
8333 // FIREFOX:
8334 // ex.message = qq is not defined
8335 // ex.fileName = http://...
8336 // ex.lineNumber = 59
8337 // ex.columnNumber = 69
8338 // ex.stack = ...stack trace... (see the example below)
8339 // ex.name = ReferenceError
8340 //
8341 // CHROME:
8342 // ex.message = qq is not defined
8343 // ex.name = ReferenceError
8344 // ex.type = not_defined
8345 // ex.arguments = ['aa']
8346 // ex.stack = ...stack trace...
8347 //
8348 // INTERNET EXPLORER:
8349 // ex.message = ...
8350 // ex.name = ReferenceError
8351 //
8352 // OPERA:
8353 // ex.message = ...message... (see the example below)
8354 // ex.name = ReferenceError
8355 // ex.opera#sourceloc = 11 (pretty much useless, duplicates the info in ex.message)
8356 // ex.stacktrace = n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'
8357
8358 /**
8359 * Computes stack trace information from the stack property.
8360 * Chrome and Gecko use this property.
8361 * @param {Error} ex
8362 * @return {?Object.<string, *>} Stack trace information.
8363 */
8364 function computeStackTraceFromStackProp(ex) {
8365 if (typeof ex.stack === 'undefined' || !ex.stack) return;
8366
8367 var chrome = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,
8368 gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,
8369 winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,
8370 // Used to additionally parse URL/line/column from eval frames
8371 geckoEval = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i,
8372 chromeEval = /\((\S*)(?::(\d+))(?::(\d+))\)/,
8373 lines = ex.stack.split('\n'),
8374 stack = [],
8375 submatch,
8376 parts,
8377 element,
8378 reference = /^(.*) is undefined$/.exec(ex.message);
8379
8380 for (var i = 0, j = lines.length; i < j; ++i) {
8381 if ((parts = chrome.exec(lines[i]))) {
8382 var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line
8383 var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line
8384 if (isEval && (submatch = chromeEval.exec(parts[2]))) {
8385 // throw out eval line/column and use top-most line/column number
8386 parts[2] = submatch[1]; // url
8387 parts[3] = submatch[2]; // line
8388 parts[4] = submatch[3]; // column
8389 }
8390 element = {
8391 url: !isNative ? parts[2] : null,
8392 func: parts[1] || UNKNOWN_FUNCTION,
8393 args: isNative ? [parts[2]] : [],
8394 line: parts[3] ? +parts[3] : null,
8395 column: parts[4] ? +parts[4] : null
8396 };
8397 } else if ((parts = winjs.exec(lines[i]))) {
8398 element = {
8399 url: parts[2],
8400 func: parts[1] || UNKNOWN_FUNCTION,
8401 args: [],
8402 line: +parts[3],
8403 column: parts[4] ? +parts[4] : null
8404 };
8405 } else if ((parts = gecko.exec(lines[i]))) {
8406 var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;
8407 if (isEval && (submatch = geckoEval.exec(parts[3]))) {
8408 // throw out eval line/column and use top-most line number
8409 parts[3] = submatch[1];
8410 parts[4] = submatch[2];
8411 parts[5] = null; // no column when eval
8412 } else if (i === 0 && !parts[5] && typeof ex.columnNumber !== 'undefined') {
8413 // FireFox uses this awesome columnNumber property for its top frame
8414 // Also note, Firefox's column number is 0-based and everything else expects 1-based,
8415 // so adding 1
8416 // NOTE: this hack doesn't work if top-most frame is eval
8417 stack[0].column = ex.columnNumber + 1;
8418 }
8419 element = {
8420 url: parts[3],
8421 func: parts[1] || UNKNOWN_FUNCTION,
8422 args: parts[2] ? parts[2].split(',') : [],
8423 line: parts[4] ? +parts[4] : null,
8424 column: parts[5] ? +parts[5] : null
8425 };
8426 } else {
8427 continue;
8428 }
8429
8430 if (!element.func && element.line) {
8431 element.func = UNKNOWN_FUNCTION;
8432 }
8433
8434 stack.push(element);
8435 }
8436
8437 if (!stack.length) {
8438 return null;
8439 }
8440
8441 return {
8442 name: ex.name,
8443 message: ex.message,
8444 url: getLocationHref(),
8445 stack: stack
8446 };
8447 }
8448
8449 /**
8450 * Adds information about the first frame to incomplete stack traces.
8451 * Safari and IE require this to get complete data on the first frame.
8452 * @param {Object.<string, *>} stackInfo Stack trace information from
8453 * one of the compute* methods.
8454 * @param {string} url The URL of the script that caused an error.
8455 * @param {(number|string)} lineNo The line number of the script that
8456 * caused an error.
8457 * @param {string=} message The error generated by the browser, which
8458 * hopefully contains the name of the object that caused the error.
8459 * @return {boolean} Whether or not the stack information was
8460 * augmented.
8461 */
8462 function augmentStackTraceWithInitialElement(stackInfo, url, lineNo, message) {
8463 var initial = {
8464 url: url,
8465 line: lineNo
8466 };
8467
8468 if (initial.url && initial.line) {
8469 stackInfo.incomplete = false;
8470
8471 if (!initial.func) {
8472 initial.func = UNKNOWN_FUNCTION;
8473 }
8474
8475 if (stackInfo.stack.length > 0) {
8476 if (stackInfo.stack[0].url === initial.url) {
8477 if (stackInfo.stack[0].line === initial.line) {
8478 return false; // already in stack trace
8479 } else if (
8480 !stackInfo.stack[0].line &&
8481 stackInfo.stack[0].func === initial.func
8482 ) {
8483 stackInfo.stack[0].line = initial.line;
8484 return false;
8485 }
8486 }
8487 }
8488
8489 stackInfo.stack.unshift(initial);
8490 stackInfo.partial = true;
8491 return true;
8492 } else {
8493 stackInfo.incomplete = true;
8494 }
8495
8496 return false;
8497 }
8498
8499 /**
8500 * Computes stack trace information by walking the arguments.caller
8501 * chain at the time the exception occurred. This will cause earlier
8502 * frames to be missed but is the only way to get any stack trace in
8503 * Safari and IE. The top frame is restored by
8504 * {@link augmentStackTraceWithInitialElement}.
8505 * @param {Error} ex
8506 * @return {?Object.<string, *>} Stack trace information.
8507 */
8508 function computeStackTraceByWalkingCallerChain(ex, depth) {
8509 var functionName = /function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,
8510 stack = [],
8511 funcs = {},
8512 recursion = false,
8513 parts,
8514 item,
8515 source;
8516
8517 for (
8518 var curr = computeStackTraceByWalkingCallerChain.caller;
8519 curr && !recursion;
8520 curr = curr.caller
8521 ) {
8522 if (curr === computeStackTrace || curr === TraceKit.report) {
8523 // console.log('skipping internal function');
8524 continue;
8525 }
8526
8527 item = {
8528 url: null,
8529 func: UNKNOWN_FUNCTION,
8530 line: null,
8531 column: null
8532 };
8533
8534 if (curr.name) {
8535 item.func = curr.name;
8536 } else if ((parts = functionName.exec(curr.toString()))) {
8537 item.func = parts[1];
8538 }
8539
8540 if (typeof item.func === 'undefined') {
8541 try {
8542 item.func = parts.input.substring(0, parts.input.indexOf('{'));
8543 } catch (e) {}
8544 }
8545
8546 if (funcs['' + curr]) {
8547 recursion = true;
8548 } else {
8549 funcs['' + curr] = true;
8550 }
8551
8552 stack.push(item);
8553 }
8554
8555 if (depth) {
8556 // console.log('depth is ' + depth);
8557 // console.log('stack is ' + stack.length);
8558 stack.splice(0, depth);
8559 }
8560
8561 var result = {
8562 name: ex.name,
8563 message: ex.message,
8564 url: getLocationHref(),
8565 stack: stack
8566 };
8567 augmentStackTraceWithInitialElement(
8568 result,
8569 ex.sourceURL || ex.fileName,
8570 ex.line || ex.lineNumber,
8571 ex.message || ex.description
8572 );
8573 return result;
8574 }
8575
8576 /**
8577 * Computes a stack trace for an exception.
8578 * @param {Error} ex
8579 * @param {(string|number)=} depth
8580 */
8581 function computeStackTrace(ex, depth) {
8582 var stack = null;
8583 depth = depth == null ? 0 : +depth;
8584
8585 try {
8586 stack = computeStackTraceFromStackProp(ex);
8587 if (stack) {
8588 return stack;
8589 }
8590 } catch (e) {
8591 if (TraceKit.debug) {
8592 throw e;
8593 }
8594 }
8595
8596 try {
8597 stack = computeStackTraceByWalkingCallerChain(ex, depth + 1);
8598 if (stack) {
8599 return stack;
8600 }
8601 } catch (e) {
8602 if (TraceKit.debug) {
8603 throw e;
8604 }
8605 }
8606 return {
8607 name: ex.name,
8608 message: ex.message,
8609 url: getLocationHref()
8610 };
8611 }
8612
8613 computeStackTrace.augmentStackTraceWithInitialElement = augmentStackTraceWithInitialElement;
8614 computeStackTrace.computeStackTraceFromStackProp = computeStackTraceFromStackProp;
8615
8616 return computeStackTrace;
8617 })();
8618
8619 module.exports = TraceKit;
8620
8621
8622 /***/ }),
8623
8624 /***/ "./node_modules/raven-js/vendor/json-stringify-safe/stringify.js":
8625 /*!***********************************************************************!*\
8626 !*** ./node_modules/raven-js/vendor/json-stringify-safe/stringify.js ***!
8627 \***********************************************************************/
8628 /***/ ((module, exports) => {
8629
8630 /*
8631 json-stringify-safe
8632 Like JSON.stringify, but doesn't throw on circular references.
8633
8634 Originally forked from https://github.com/isaacs/json-stringify-safe
8635 version 5.0.1 on 3/8/2017 and modified to handle Errors serialization
8636 and IE8 compatibility. Tests for this are in test/vendor.
8637
8638 ISC license: https://github.com/isaacs/json-stringify-safe/blob/master/LICENSE
8639 */
8640
8641 exports = module.exports = stringify;
8642 exports.getSerialize = serializer;
8643
8644 function indexOf(haystack, needle) {
8645 for (var i = 0; i < haystack.length; ++i) {
8646 if (haystack[i] === needle) return i;
8647 }
8648 return -1;
8649 }
8650
8651 function stringify(obj, replacer, spaces, cycleReplacer) {
8652 return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces);
8653 }
8654
8655 // https://github.com/ftlabs/js-abbreviate/blob/fa709e5f139e7770a71827b1893f22418097fbda/index.js#L95-L106
8656 function stringifyError(value) {
8657 var err = {
8658 // These properties are implemented as magical getters and don't show up in for in
8659 stack: value.stack,
8660 message: value.message,
8661 name: value.name
8662 };
8663
8664 for (var i in value) {
8665 if (Object.prototype.hasOwnProperty.call(value, i)) {
8666 err[i] = value[i];
8667 }
8668 }
8669
8670 return err;
8671 }
8672
8673 function serializer(replacer, cycleReplacer) {
8674 var stack = [];
8675 var keys = [];
8676
8677 if (cycleReplacer == null) {
8678 cycleReplacer = function(key, value) {
8679 if (stack[0] === value) {
8680 return '[Circular ~]';
8681 }
8682 return '[Circular ~.' + keys.slice(0, indexOf(stack, value)).join('.') + ']';
8683 };
8684 }
8685
8686 return function(key, value) {
8687 if (stack.length > 0) {
8688 var thisPos = indexOf(stack, this);
8689 ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
8690 ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
8691
8692 if (~indexOf(stack, value)) {
8693 value = cycleReplacer.call(this, key, value);
8694 }
8695 } else {
8696 stack.push(value);
8697 }
8698
8699 return replacer == null
8700 ? value instanceof Error ? stringifyError(value) : value
8701 : replacer.call(this, key, value);
8702 };
8703 }
8704
8705
8706 /***/ }),
8707
8708 /***/ "./node_modules/react-is/cjs/react-is.development.js":
8709 /*!***********************************************************!*\
8710 !*** ./node_modules/react-is/cjs/react-is.development.js ***!
8711 \***********************************************************/
8712 /***/ ((__unused_webpack_module, exports) => {
8713
8714 "use strict";
8715 /** @license React v16.13.1
8716 * react-is.development.js
8717 *
8718 * Copyright (c) Facebook, Inc. and its affiliates.
8719 *
8720 * This source code is licensed under the MIT license found in the
8721 * LICENSE file in the root directory of this source tree.
8722 */
8723
8724
8725
8726
8727
8728 if (true) {
8729 (function() {
8730 'use strict';
8731
8732 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
8733 // nor polyfill, then a plain number is used for performance.
8734 var hasSymbol = typeof Symbol === 'function' && Symbol.for;
8735 var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
8736 var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
8737 var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
8738 var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
8739 var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
8740 var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
8741 var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
8742 // (unstable) APIs that have been removed. Can we remove the symbols?
8743
8744 var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
8745 var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
8746 var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
8747 var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
8748 var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
8749 var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
8750 var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
8751 var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
8752 var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
8753 var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
8754 var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
8755
8756 function isValidElementType(type) {
8757 return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
8758 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);
8759 }
8760
8761 function typeOf(object) {
8762 if (typeof object === 'object' && object !== null) {
8763 var $$typeof = object.$$typeof;
8764
8765 switch ($$typeof) {
8766 case REACT_ELEMENT_TYPE:
8767 var type = object.type;
8768
8769 switch (type) {
8770 case REACT_ASYNC_MODE_TYPE:
8771 case REACT_CONCURRENT_MODE_TYPE:
8772 case REACT_FRAGMENT_TYPE:
8773 case REACT_PROFILER_TYPE:
8774 case REACT_STRICT_MODE_TYPE:
8775 case REACT_SUSPENSE_TYPE:
8776 return type;
8777
8778 default:
8779 var $$typeofType = type && type.$$typeof;
8780
8781 switch ($$typeofType) {
8782 case REACT_CONTEXT_TYPE:
8783 case REACT_FORWARD_REF_TYPE:
8784 case REACT_LAZY_TYPE:
8785 case REACT_MEMO_TYPE:
8786 case REACT_PROVIDER_TYPE:
8787 return $$typeofType;
8788
8789 default:
8790 return $$typeof;
8791 }
8792
8793 }
8794
8795 case REACT_PORTAL_TYPE:
8796 return $$typeof;
8797 }
8798 }
8799
8800 return undefined;
8801 } // AsyncMode is deprecated along with isAsyncMode
8802
8803 var AsyncMode = REACT_ASYNC_MODE_TYPE;
8804 var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
8805 var ContextConsumer = REACT_CONTEXT_TYPE;
8806 var ContextProvider = REACT_PROVIDER_TYPE;
8807 var Element = REACT_ELEMENT_TYPE;
8808 var ForwardRef = REACT_FORWARD_REF_TYPE;
8809 var Fragment = REACT_FRAGMENT_TYPE;
8810 var Lazy = REACT_LAZY_TYPE;
8811 var Memo = REACT_MEMO_TYPE;
8812 var Portal = REACT_PORTAL_TYPE;
8813 var Profiler = REACT_PROFILER_TYPE;
8814 var StrictMode = REACT_STRICT_MODE_TYPE;
8815 var Suspense = REACT_SUSPENSE_TYPE;
8816 var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
8817
8818 function isAsyncMode(object) {
8819 {
8820 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
8821 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
8822
8823 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.');
8824 }
8825 }
8826
8827 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
8828 }
8829 function isConcurrentMode(object) {
8830 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
8831 }
8832 function isContextConsumer(object) {
8833 return typeOf(object) === REACT_CONTEXT_TYPE;
8834 }
8835 function isContextProvider(object) {
8836 return typeOf(object) === REACT_PROVIDER_TYPE;
8837 }
8838 function isElement(object) {
8839 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
8840 }
8841 function isForwardRef(object) {
8842 return typeOf(object) === REACT_FORWARD_REF_TYPE;
8843 }
8844 function isFragment(object) {
8845 return typeOf(object) === REACT_FRAGMENT_TYPE;
8846 }
8847 function isLazy(object) {
8848 return typeOf(object) === REACT_LAZY_TYPE;
8849 }
8850 function isMemo(object) {
8851 return typeOf(object) === REACT_MEMO_TYPE;
8852 }
8853 function isPortal(object) {
8854 return typeOf(object) === REACT_PORTAL_TYPE;
8855 }
8856 function isProfiler(object) {
8857 return typeOf(object) === REACT_PROFILER_TYPE;
8858 }
8859 function isStrictMode(object) {
8860 return typeOf(object) === REACT_STRICT_MODE_TYPE;
8861 }
8862 function isSuspense(object) {
8863 return typeOf(object) === REACT_SUSPENSE_TYPE;
8864 }
8865
8866 exports.AsyncMode = AsyncMode;
8867 exports.ConcurrentMode = ConcurrentMode;
8868 exports.ContextConsumer = ContextConsumer;
8869 exports.ContextProvider = ContextProvider;
8870 exports.Element = Element;
8871 exports.ForwardRef = ForwardRef;
8872 exports.Fragment = Fragment;
8873 exports.Lazy = Lazy;
8874 exports.Memo = Memo;
8875 exports.Portal = Portal;
8876 exports.Profiler = Profiler;
8877 exports.StrictMode = StrictMode;
8878 exports.Suspense = Suspense;
8879 exports.isAsyncMode = isAsyncMode;
8880 exports.isConcurrentMode = isConcurrentMode;
8881 exports.isContextConsumer = isContextConsumer;
8882 exports.isContextProvider = isContextProvider;
8883 exports.isElement = isElement;
8884 exports.isForwardRef = isForwardRef;
8885 exports.isFragment = isFragment;
8886 exports.isLazy = isLazy;
8887 exports.isMemo = isMemo;
8888 exports.isPortal = isPortal;
8889 exports.isProfiler = isProfiler;
8890 exports.isStrictMode = isStrictMode;
8891 exports.isSuspense = isSuspense;
8892 exports.isValidElementType = isValidElementType;
8893 exports.typeOf = typeOf;
8894 })();
8895 }
8896
8897
8898 /***/ }),
8899
8900 /***/ "./node_modules/react-is/index.js":
8901 /*!****************************************!*\
8902 !*** ./node_modules/react-is/index.js ***!
8903 \****************************************/
8904 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8905
8906 "use strict";
8907
8908
8909 if (false) {} else {
8910 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js");
8911 }
8912
8913
8914 /***/ }),
8915
8916 /***/ "./node_modules/react/cjs/react-jsx-runtime.development.js":
8917 /*!*****************************************************************!*\
8918 !*** ./node_modules/react/cjs/react-jsx-runtime.development.js ***!
8919 \*****************************************************************/
8920 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8921
8922 "use strict";
8923 /** @license React v17.0.2
8924 * react-jsx-runtime.development.js
8925 *
8926 * Copyright (c) Facebook, Inc. and its affiliates.
8927 *
8928 * This source code is licensed under the MIT license found in the
8929 * LICENSE file in the root directory of this source tree.
8930 */
8931
8932
8933
8934 if (true) {
8935 (function() {
8936 'use strict';
8937
8938 var React = __webpack_require__(/*! react */ "react");
8939 var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
8940
8941 // ATTENTION
8942 // When adding new symbols to this file,
8943 // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
8944 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
8945 // nor polyfill, then a plain number is used for performance.
8946 var REACT_ELEMENT_TYPE = 0xeac7;
8947 var REACT_PORTAL_TYPE = 0xeaca;
8948 exports.Fragment = 0xeacb;
8949 var REACT_STRICT_MODE_TYPE = 0xeacc;
8950 var REACT_PROFILER_TYPE = 0xead2;
8951 var REACT_PROVIDER_TYPE = 0xeacd;
8952 var REACT_CONTEXT_TYPE = 0xeace;
8953 var REACT_FORWARD_REF_TYPE = 0xead0;
8954 var REACT_SUSPENSE_TYPE = 0xead1;
8955 var REACT_SUSPENSE_LIST_TYPE = 0xead8;
8956 var REACT_MEMO_TYPE = 0xead3;
8957 var REACT_LAZY_TYPE = 0xead4;
8958 var REACT_BLOCK_TYPE = 0xead9;
8959 var REACT_SERVER_BLOCK_TYPE = 0xeada;
8960 var REACT_FUNDAMENTAL_TYPE = 0xead5;
8961 var REACT_SCOPE_TYPE = 0xead7;
8962 var REACT_OPAQUE_ID_TYPE = 0xeae0;
8963 var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
8964 var REACT_OFFSCREEN_TYPE = 0xeae2;
8965 var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
8966
8967 if (typeof Symbol === 'function' && Symbol.for) {
8968 var symbolFor = Symbol.for;
8969 REACT_ELEMENT_TYPE = symbolFor('react.element');
8970 REACT_PORTAL_TYPE = symbolFor('react.portal');
8971 exports.Fragment = symbolFor('react.fragment');
8972 REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
8973 REACT_PROFILER_TYPE = symbolFor('react.profiler');
8974 REACT_PROVIDER_TYPE = symbolFor('react.provider');
8975 REACT_CONTEXT_TYPE = symbolFor('react.context');
8976 REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
8977 REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
8978 REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
8979 REACT_MEMO_TYPE = symbolFor('react.memo');
8980 REACT_LAZY_TYPE = symbolFor('react.lazy');
8981 REACT_BLOCK_TYPE = symbolFor('react.block');
8982 REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
8983 REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
8984 REACT_SCOPE_TYPE = symbolFor('react.scope');
8985 REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
8986 REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
8987 REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
8988 REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
8989 }
8990
8991 var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
8992 var FAUX_ITERATOR_SYMBOL = '@@iterator';
8993 function getIteratorFn(maybeIterable) {
8994 if (maybeIterable === null || typeof maybeIterable !== 'object') {
8995 return null;
8996 }
8997
8998 var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
8999
9000 if (typeof maybeIterator === 'function') {
9001 return maybeIterator;
9002 }
9003
9004 return null;
9005 }
9006
9007 var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
9008
9009 function error(format) {
9010 {
9011 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
9012 args[_key2 - 1] = arguments[_key2];
9013 }
9014
9015 printWarning('error', format, args);
9016 }
9017 }
9018
9019 function printWarning(level, format, args) {
9020 // When changing this logic, you might want to also
9021 // update consoleWithStackDev.www.js as well.
9022 {
9023 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
9024 var stack = ReactDebugCurrentFrame.getStackAddendum();
9025
9026 if (stack !== '') {
9027 format += '%s';
9028 args = args.concat([stack]);
9029 }
9030
9031 var argsWithFormat = args.map(function (item) {
9032 return '' + item;
9033 }); // Careful: RN currently depends on this prefix
9034
9035 argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
9036 // breaks IE9: https://github.com/facebook/react/issues/13610
9037 // eslint-disable-next-line react-internal/no-production-logging
9038
9039 Function.prototype.apply.call(console[level], console, argsWithFormat);
9040 }
9041 }
9042
9043 // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
9044
9045 var enableScopeAPI = false; // Experimental Create Event Handle API.
9046
9047 function isValidElementType(type) {
9048 if (typeof type === 'string' || typeof type === 'function') {
9049 return true;
9050 } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
9051
9052
9053 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 ) {
9054 return true;
9055 }
9056
9057 if (typeof type === 'object' && type !== null) {
9058 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) {
9059 return true;
9060 }
9061 }
9062
9063 return false;
9064 }
9065
9066 function getWrappedName(outerType, innerType, wrapperName) {
9067 var functionName = innerType.displayName || innerType.name || '';
9068 return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
9069 }
9070
9071 function getContextName(type) {
9072 return type.displayName || 'Context';
9073 }
9074
9075 function getComponentName(type) {
9076 if (type == null) {
9077 // Host root, text node or just invalid type.
9078 return null;
9079 }
9080
9081 {
9082 if (typeof type.tag === 'number') {
9083 error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
9084 }
9085 }
9086
9087 if (typeof type === 'function') {
9088 return type.displayName || type.name || null;
9089 }
9090
9091 if (typeof type === 'string') {
9092 return type;
9093 }
9094
9095 switch (type) {
9096 case exports.Fragment:
9097 return 'Fragment';
9098
9099 case REACT_PORTAL_TYPE:
9100 return 'Portal';
9101
9102 case REACT_PROFILER_TYPE:
9103 return 'Profiler';
9104
9105 case REACT_STRICT_MODE_TYPE:
9106 return 'StrictMode';
9107
9108 case REACT_SUSPENSE_TYPE:
9109 return 'Suspense';
9110
9111 case REACT_SUSPENSE_LIST_TYPE:
9112 return 'SuspenseList';
9113 }
9114
9115 if (typeof type === 'object') {
9116 switch (type.$$typeof) {
9117 case REACT_CONTEXT_TYPE:
9118 var context = type;
9119 return getContextName(context) + '.Consumer';
9120
9121 case REACT_PROVIDER_TYPE:
9122 var provider = type;
9123 return getContextName(provider._context) + '.Provider';
9124
9125 case REACT_FORWARD_REF_TYPE:
9126 return getWrappedName(type, type.render, 'ForwardRef');
9127
9128 case REACT_MEMO_TYPE:
9129 return getComponentName(type.type);
9130
9131 case REACT_BLOCK_TYPE:
9132 return getComponentName(type._render);
9133
9134 case REACT_LAZY_TYPE:
9135 {
9136 var lazyComponent = type;
9137 var payload = lazyComponent._payload;
9138 var init = lazyComponent._init;
9139
9140 try {
9141 return getComponentName(init(payload));
9142 } catch (x) {
9143 return null;
9144 }
9145 }
9146 }
9147 }
9148
9149 return null;
9150 }
9151
9152 // Helpers to patch console.logs to avoid logging during side-effect free
9153 // replaying on render function. This currently only patches the object
9154 // lazily which won't cover if the log function was extracted eagerly.
9155 // We could also eagerly patch the method.
9156 var disabledDepth = 0;
9157 var prevLog;
9158 var prevInfo;
9159 var prevWarn;
9160 var prevError;
9161 var prevGroup;
9162 var prevGroupCollapsed;
9163 var prevGroupEnd;
9164
9165 function disabledLog() {}
9166
9167 disabledLog.__reactDisabledLog = true;
9168 function disableLogs() {
9169 {
9170 if (disabledDepth === 0) {
9171 /* eslint-disable react-internal/no-production-logging */
9172 prevLog = console.log;
9173 prevInfo = console.info;
9174 prevWarn = console.warn;
9175 prevError = console.error;
9176 prevGroup = console.group;
9177 prevGroupCollapsed = console.groupCollapsed;
9178 prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
9179
9180 var props = {
9181 configurable: true,
9182 enumerable: true,
9183 value: disabledLog,
9184 writable: true
9185 }; // $FlowFixMe Flow thinks console is immutable.
9186
9187 Object.defineProperties(console, {
9188 info: props,
9189 log: props,
9190 warn: props,
9191 error: props,
9192 group: props,
9193 groupCollapsed: props,
9194 groupEnd: props
9195 });
9196 /* eslint-enable react-internal/no-production-logging */
9197 }
9198
9199 disabledDepth++;
9200 }
9201 }
9202 function reenableLogs() {
9203 {
9204 disabledDepth--;
9205
9206 if (disabledDepth === 0) {
9207 /* eslint-disable react-internal/no-production-logging */
9208 var props = {
9209 configurable: true,
9210 enumerable: true,
9211 writable: true
9212 }; // $FlowFixMe Flow thinks console is immutable.
9213
9214 Object.defineProperties(console, {
9215 log: _assign({}, props, {
9216 value: prevLog
9217 }),
9218 info: _assign({}, props, {
9219 value: prevInfo
9220 }),
9221 warn: _assign({}, props, {
9222 value: prevWarn
9223 }),
9224 error: _assign({}, props, {
9225 value: prevError
9226 }),
9227 group: _assign({}, props, {
9228 value: prevGroup
9229 }),
9230 groupCollapsed: _assign({}, props, {
9231 value: prevGroupCollapsed
9232 }),
9233 groupEnd: _assign({}, props, {
9234 value: prevGroupEnd
9235 })
9236 });
9237 /* eslint-enable react-internal/no-production-logging */
9238 }
9239
9240 if (disabledDepth < 0) {
9241 error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
9242 }
9243 }
9244 }
9245
9246 var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
9247 var prefix;
9248 function describeBuiltInComponentFrame(name, source, ownerFn) {
9249 {
9250 if (prefix === undefined) {
9251 // Extract the VM specific prefix used by each line.
9252 try {
9253 throw Error();
9254 } catch (x) {
9255 var match = x.stack.trim().match(/\n( *(at )?)/);
9256 prefix = match && match[1] || '';
9257 }
9258 } // We use the prefix to ensure our stacks line up with native stack frames.
9259
9260
9261 return '\n' + prefix + name;
9262 }
9263 }
9264 var reentry = false;
9265 var componentFrameCache;
9266
9267 {
9268 var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
9269 componentFrameCache = new PossiblyWeakMap();
9270 }
9271
9272 function describeNativeComponentFrame(fn, construct) {
9273 // If something asked for a stack inside a fake render, it should get ignored.
9274 if (!fn || reentry) {
9275 return '';
9276 }
9277
9278 {
9279 var frame = componentFrameCache.get(fn);
9280
9281 if (frame !== undefined) {
9282 return frame;
9283 }
9284 }
9285
9286 var control;
9287 reentry = true;
9288 var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
9289
9290 Error.prepareStackTrace = undefined;
9291 var previousDispatcher;
9292
9293 {
9294 previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
9295 // for warnings.
9296
9297 ReactCurrentDispatcher.current = null;
9298 disableLogs();
9299 }
9300
9301 try {
9302 // This should throw.
9303 if (construct) {
9304 // Something should be setting the props in the constructor.
9305 var Fake = function () {
9306 throw Error();
9307 }; // $FlowFixMe
9308
9309
9310 Object.defineProperty(Fake.prototype, 'props', {
9311 set: function () {
9312 // We use a throwing setter instead of frozen or non-writable props
9313 // because that won't throw in a non-strict mode function.
9314 throw Error();
9315 }
9316 });
9317
9318 if (typeof Reflect === 'object' && Reflect.construct) {
9319 // We construct a different control for this case to include any extra
9320 // frames added by the construct call.
9321 try {
9322 Reflect.construct(Fake, []);
9323 } catch (x) {
9324 control = x;
9325 }
9326
9327 Reflect.construct(fn, [], Fake);
9328 } else {
9329 try {
9330 Fake.call();
9331 } catch (x) {
9332 control = x;
9333 }
9334
9335 fn.call(Fake.prototype);
9336 }
9337 } else {
9338 try {
9339 throw Error();
9340 } catch (x) {
9341 control = x;
9342 }
9343
9344 fn();
9345 }
9346 } catch (sample) {
9347 // This is inlined manually because closure doesn't do it for us.
9348 if (sample && control && typeof sample.stack === 'string') {
9349 // This extracts the first frame from the sample that isn't also in the control.
9350 // Skipping one frame that we assume is the frame that calls the two.
9351 var sampleLines = sample.stack.split('\n');
9352 var controlLines = control.stack.split('\n');
9353 var s = sampleLines.length - 1;
9354 var c = controlLines.length - 1;
9355
9356 while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
9357 // We expect at least one stack frame to be shared.
9358 // Typically this will be the root most one. However, stack frames may be
9359 // cut off due to maximum stack limits. In this case, one maybe cut off
9360 // earlier than the other. We assume that the sample is longer or the same
9361 // and there for cut off earlier. So we should find the root most frame in
9362 // the sample somewhere in the control.
9363 c--;
9364 }
9365
9366 for (; s >= 1 && c >= 0; s--, c--) {
9367 // Next we find the first one that isn't the same which should be the
9368 // frame that called our sample function and the control.
9369 if (sampleLines[s] !== controlLines[c]) {
9370 // In V8, the first line is describing the message but other VMs don't.
9371 // If we're about to return the first line, and the control is also on the same
9372 // line, that's a pretty good indicator that our sample threw at same line as
9373 // the control. I.e. before we entered the sample frame. So we ignore this result.
9374 // This can happen if you passed a class to function component, or non-function.
9375 if (s !== 1 || c !== 1) {
9376 do {
9377 s--;
9378 c--; // We may still have similar intermediate frames from the construct call.
9379 // The next one that isn't the same should be our match though.
9380
9381 if (c < 0 || sampleLines[s] !== controlLines[c]) {
9382 // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
9383 var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
9384
9385 {
9386 if (typeof fn === 'function') {
9387 componentFrameCache.set(fn, _frame);
9388 }
9389 } // Return the line we found.
9390
9391
9392 return _frame;
9393 }
9394 } while (s >= 1 && c >= 0);
9395 }
9396
9397 break;
9398 }
9399 }
9400 }
9401 } finally {
9402 reentry = false;
9403
9404 {
9405 ReactCurrentDispatcher.current = previousDispatcher;
9406 reenableLogs();
9407 }
9408
9409 Error.prepareStackTrace = previousPrepareStackTrace;
9410 } // Fallback to just using the name if we couldn't make it throw.
9411
9412
9413 var name = fn ? fn.displayName || fn.name : '';
9414 var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
9415
9416 {
9417 if (typeof fn === 'function') {
9418 componentFrameCache.set(fn, syntheticFrame);
9419 }
9420 }
9421
9422 return syntheticFrame;
9423 }
9424 function describeFunctionComponentFrame(fn, source, ownerFn) {
9425 {
9426 return describeNativeComponentFrame(fn, false);
9427 }
9428 }
9429
9430 function shouldConstruct(Component) {
9431 var prototype = Component.prototype;
9432 return !!(prototype && prototype.isReactComponent);
9433 }
9434
9435 function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
9436
9437 if (type == null) {
9438 return '';
9439 }
9440
9441 if (typeof type === 'function') {
9442 {
9443 return describeNativeComponentFrame(type, shouldConstruct(type));
9444 }
9445 }
9446
9447 if (typeof type === 'string') {
9448 return describeBuiltInComponentFrame(type);
9449 }
9450
9451 switch (type) {
9452 case REACT_SUSPENSE_TYPE:
9453 return describeBuiltInComponentFrame('Suspense');
9454
9455 case REACT_SUSPENSE_LIST_TYPE:
9456 return describeBuiltInComponentFrame('SuspenseList');
9457 }
9458
9459 if (typeof type === 'object') {
9460 switch (type.$$typeof) {
9461 case REACT_FORWARD_REF_TYPE:
9462 return describeFunctionComponentFrame(type.render);
9463
9464 case REACT_MEMO_TYPE:
9465 // Memo may contain any component type so we recursively resolve it.
9466 return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
9467
9468 case REACT_BLOCK_TYPE:
9469 return describeFunctionComponentFrame(type._render);
9470
9471 case REACT_LAZY_TYPE:
9472 {
9473 var lazyComponent = type;
9474 var payload = lazyComponent._payload;
9475 var init = lazyComponent._init;
9476
9477 try {
9478 // Lazy may contain any component type so we recursively resolve it.
9479 return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
9480 } catch (x) {}
9481 }
9482 }
9483 }
9484
9485 return '';
9486 }
9487
9488 var loggedTypeFailures = {};
9489 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
9490
9491 function setCurrentlyValidatingElement(element) {
9492 {
9493 if (element) {
9494 var owner = element._owner;
9495 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
9496 ReactDebugCurrentFrame.setExtraStackFrame(stack);
9497 } else {
9498 ReactDebugCurrentFrame.setExtraStackFrame(null);
9499 }
9500 }
9501 }
9502
9503 function checkPropTypes(typeSpecs, values, location, componentName, element) {
9504 {
9505 // $FlowFixMe This is okay but Flow doesn't know it.
9506 var has = Function.call.bind(Object.prototype.hasOwnProperty);
9507
9508 for (var typeSpecName in typeSpecs) {
9509 if (has(typeSpecs, typeSpecName)) {
9510 var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
9511 // fail the render phase where it didn't fail before. So we log it.
9512 // After these have been cleaned up, we'll let them throw.
9513
9514 try {
9515 // This is intentionally an invariant that gets caught. It's the same
9516 // behavior as without this statement except with a better message.
9517 if (typeof typeSpecs[typeSpecName] !== 'function') {
9518 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`.');
9519 err.name = 'Invariant Violation';
9520 throw err;
9521 }
9522
9523 error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
9524 } catch (ex) {
9525 error$1 = ex;
9526 }
9527
9528 if (error$1 && !(error$1 instanceof Error)) {
9529 setCurrentlyValidatingElement(element);
9530
9531 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);
9532
9533 setCurrentlyValidatingElement(null);
9534 }
9535
9536 if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
9537 // Only monitor this failure once because there tends to be a lot of the
9538 // same error.
9539 loggedTypeFailures[error$1.message] = true;
9540 setCurrentlyValidatingElement(element);
9541
9542 error('Failed %s type: %s', location, error$1.message);
9543
9544 setCurrentlyValidatingElement(null);
9545 }
9546 }
9547 }
9548 }
9549 }
9550
9551 var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
9552 var hasOwnProperty = Object.prototype.hasOwnProperty;
9553 var RESERVED_PROPS = {
9554 key: true,
9555 ref: true,
9556 __self: true,
9557 __source: true
9558 };
9559 var specialPropKeyWarningShown;
9560 var specialPropRefWarningShown;
9561 var didWarnAboutStringRefs;
9562
9563 {
9564 didWarnAboutStringRefs = {};
9565 }
9566
9567 function hasValidRef(config) {
9568 {
9569 if (hasOwnProperty.call(config, 'ref')) {
9570 var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
9571
9572 if (getter && getter.isReactWarning) {
9573 return false;
9574 }
9575 }
9576 }
9577
9578 return config.ref !== undefined;
9579 }
9580
9581 function hasValidKey(config) {
9582 {
9583 if (hasOwnProperty.call(config, 'key')) {
9584 var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
9585
9586 if (getter && getter.isReactWarning) {
9587 return false;
9588 }
9589 }
9590 }
9591
9592 return config.key !== undefined;
9593 }
9594
9595 function warnIfStringRefCannotBeAutoConverted(config, self) {
9596 {
9597 if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
9598 var componentName = getComponentName(ReactCurrentOwner.current.type);
9599
9600 if (!didWarnAboutStringRefs[componentName]) {
9601 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);
9602
9603 didWarnAboutStringRefs[componentName] = true;
9604 }
9605 }
9606 }
9607 }
9608
9609 function defineKeyPropWarningGetter(props, displayName) {
9610 {
9611 var warnAboutAccessingKey = function () {
9612 if (!specialPropKeyWarningShown) {
9613 specialPropKeyWarningShown = true;
9614
9615 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);
9616 }
9617 };
9618
9619 warnAboutAccessingKey.isReactWarning = true;
9620 Object.defineProperty(props, 'key', {
9621 get: warnAboutAccessingKey,
9622 configurable: true
9623 });
9624 }
9625 }
9626
9627 function defineRefPropWarningGetter(props, displayName) {
9628 {
9629 var warnAboutAccessingRef = function () {
9630 if (!specialPropRefWarningShown) {
9631 specialPropRefWarningShown = true;
9632
9633 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);
9634 }
9635 };
9636
9637 warnAboutAccessingRef.isReactWarning = true;
9638 Object.defineProperty(props, 'ref', {
9639 get: warnAboutAccessingRef,
9640 configurable: true
9641 });
9642 }
9643 }
9644 /**
9645 * Factory method to create a new React element. This no longer adheres to
9646 * the class pattern, so do not use new to call it. Also, instanceof check
9647 * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
9648 * if something is a React Element.
9649 *
9650 * @param {*} type
9651 * @param {*} props
9652 * @param {*} key
9653 * @param {string|object} ref
9654 * @param {*} owner
9655 * @param {*} self A *temporary* helper to detect places where `this` is
9656 * different from the `owner` when React.createElement is called, so that we
9657 * can warn. We want to get rid of owner and replace string `ref`s with arrow
9658 * functions, and as long as `this` and owner are the same, there will be no
9659 * change in behavior.
9660 * @param {*} source An annotation object (added by a transpiler or otherwise)
9661 * indicating filename, line number, and/or other information.
9662 * @internal
9663 */
9664
9665
9666 var ReactElement = function (type, key, ref, self, source, owner, props) {
9667 var element = {
9668 // This tag allows us to uniquely identify this as a React Element
9669 $$typeof: REACT_ELEMENT_TYPE,
9670 // Built-in properties that belong on the element
9671 type: type,
9672 key: key,
9673 ref: ref,
9674 props: props,
9675 // Record the component responsible for creating this element.
9676 _owner: owner
9677 };
9678
9679 {
9680 // The validation flag is currently mutative. We put it on
9681 // an external backing store so that we can freeze the whole object.
9682 // This can be replaced with a WeakMap once they are implemented in
9683 // commonly used development environments.
9684 element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
9685 // the validation flag non-enumerable (where possible, which should
9686 // include every environment we run tests in), so the test framework
9687 // ignores it.
9688
9689 Object.defineProperty(element._store, 'validated', {
9690 configurable: false,
9691 enumerable: false,
9692 writable: true,
9693 value: false
9694 }); // self and source are DEV only properties.
9695
9696 Object.defineProperty(element, '_self', {
9697 configurable: false,
9698 enumerable: false,
9699 writable: false,
9700 value: self
9701 }); // Two elements created in two different places should be considered
9702 // equal for testing purposes and therefore we hide it from enumeration.
9703
9704 Object.defineProperty(element, '_source', {
9705 configurable: false,
9706 enumerable: false,
9707 writable: false,
9708 value: source
9709 });
9710
9711 if (Object.freeze) {
9712 Object.freeze(element.props);
9713 Object.freeze(element);
9714 }
9715 }
9716
9717 return element;
9718 };
9719 /**
9720 * https://github.com/reactjs/rfcs/pull/107
9721 * @param {*} type
9722 * @param {object} props
9723 * @param {string} key
9724 */
9725
9726 function jsxDEV(type, config, maybeKey, source, self) {
9727 {
9728 var propName; // Reserved names are extracted
9729
9730 var props = {};
9731 var key = null;
9732 var ref = null; // Currently, key can be spread in as a prop. This causes a potential
9733 // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
9734 // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
9735 // but as an intermediary step, we will use jsxDEV for everything except
9736 // <div {...props} key="Hi" />, because we aren't currently able to tell if
9737 // key is explicitly declared to be undefined or not.
9738
9739 if (maybeKey !== undefined) {
9740 key = '' + maybeKey;
9741 }
9742
9743 if (hasValidKey(config)) {
9744 key = '' + config.key;
9745 }
9746
9747 if (hasValidRef(config)) {
9748 ref = config.ref;
9749 warnIfStringRefCannotBeAutoConverted(config, self);
9750 } // Remaining properties are added to a new props object
9751
9752
9753 for (propName in config) {
9754 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
9755 props[propName] = config[propName];
9756 }
9757 } // Resolve default props
9758
9759
9760 if (type && type.defaultProps) {
9761 var defaultProps = type.defaultProps;
9762
9763 for (propName in defaultProps) {
9764 if (props[propName] === undefined) {
9765 props[propName] = defaultProps[propName];
9766 }
9767 }
9768 }
9769
9770 if (key || ref) {
9771 var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
9772
9773 if (key) {
9774 defineKeyPropWarningGetter(props, displayName);
9775 }
9776
9777 if (ref) {
9778 defineRefPropWarningGetter(props, displayName);
9779 }
9780 }
9781
9782 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
9783 }
9784 }
9785
9786 var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
9787 var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
9788
9789 function setCurrentlyValidatingElement$1(element) {
9790 {
9791 if (element) {
9792 var owner = element._owner;
9793 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
9794 ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
9795 } else {
9796 ReactDebugCurrentFrame$1.setExtraStackFrame(null);
9797 }
9798 }
9799 }
9800
9801 var propTypesMisspellWarningShown;
9802
9803 {
9804 propTypesMisspellWarningShown = false;
9805 }
9806 /**
9807 * Verifies the object is a ReactElement.
9808 * See https://reactjs.org/docs/react-api.html#isvalidelement
9809 * @param {?object} object
9810 * @return {boolean} True if `object` is a ReactElement.
9811 * @final
9812 */
9813
9814 function isValidElement(object) {
9815 {
9816 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
9817 }
9818 }
9819
9820 function getDeclarationErrorAddendum() {
9821 {
9822 if (ReactCurrentOwner$1.current) {
9823 var name = getComponentName(ReactCurrentOwner$1.current.type);
9824
9825 if (name) {
9826 return '\n\nCheck the render method of `' + name + '`.';
9827 }
9828 }
9829
9830 return '';
9831 }
9832 }
9833
9834 function getSourceInfoErrorAddendum(source) {
9835 {
9836 if (source !== undefined) {
9837 var fileName = source.fileName.replace(/^.*[\\\/]/, '');
9838 var lineNumber = source.lineNumber;
9839 return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
9840 }
9841
9842 return '';
9843 }
9844 }
9845 /**
9846 * Warn if there's no key explicitly set on dynamic arrays of children or
9847 * object keys are not valid. This allows us to keep track of children between
9848 * updates.
9849 */
9850
9851
9852 var ownerHasKeyUseWarning = {};
9853
9854 function getCurrentComponentErrorInfo(parentType) {
9855 {
9856 var info = getDeclarationErrorAddendum();
9857
9858 if (!info) {
9859 var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
9860
9861 if (parentName) {
9862 info = "\n\nCheck the top-level render call using <" + parentName + ">.";
9863 }
9864 }
9865
9866 return info;
9867 }
9868 }
9869 /**
9870 * Warn if the element doesn't have an explicit key assigned to it.
9871 * This element is in an array. The array could grow and shrink or be
9872 * reordered. All children that haven't already been validated are required to
9873 * have a "key" property assigned to it. Error statuses are cached so a warning
9874 * will only be shown once.
9875 *
9876 * @internal
9877 * @param {ReactElement} element Element that requires a key.
9878 * @param {*} parentType element's parent's type.
9879 */
9880
9881
9882 function validateExplicitKey(element, parentType) {
9883 {
9884 if (!element._store || element._store.validated || element.key != null) {
9885 return;
9886 }
9887
9888 element._store.validated = true;
9889 var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
9890
9891 if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
9892 return;
9893 }
9894
9895 ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
9896 // property, it may be the creator of the child that's responsible for
9897 // assigning it a key.
9898
9899 var childOwner = '';
9900
9901 if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
9902 // Give the component that originally created this child.
9903 childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
9904 }
9905
9906 setCurrentlyValidatingElement$1(element);
9907
9908 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);
9909
9910 setCurrentlyValidatingElement$1(null);
9911 }
9912 }
9913 /**
9914 * Ensure that every element either is passed in a static location, in an
9915 * array with an explicit keys property defined, or in an object literal
9916 * with valid key property.
9917 *
9918 * @internal
9919 * @param {ReactNode} node Statically passed child of any type.
9920 * @param {*} parentType node's parent's type.
9921 */
9922
9923
9924 function validateChildKeys(node, parentType) {
9925 {
9926 if (typeof node !== 'object') {
9927 return;
9928 }
9929
9930 if (Array.isArray(node)) {
9931 for (var i = 0; i < node.length; i++) {
9932 var child = node[i];
9933
9934 if (isValidElement(child)) {
9935 validateExplicitKey(child, parentType);
9936 }
9937 }
9938 } else if (isValidElement(node)) {
9939 // This element was passed in a valid location.
9940 if (node._store) {
9941 node._store.validated = true;
9942 }
9943 } else if (node) {
9944 var iteratorFn = getIteratorFn(node);
9945
9946 if (typeof iteratorFn === 'function') {
9947 // Entry iterators used to provide implicit keys,
9948 // but now we print a separate warning for them later.
9949 if (iteratorFn !== node.entries) {
9950 var iterator = iteratorFn.call(node);
9951 var step;
9952
9953 while (!(step = iterator.next()).done) {
9954 if (isValidElement(step.value)) {
9955 validateExplicitKey(step.value, parentType);
9956 }
9957 }
9958 }
9959 }
9960 }
9961 }
9962 }
9963 /**
9964 * Given an element, validate that its props follow the propTypes definition,
9965 * provided by the type.
9966 *
9967 * @param {ReactElement} element
9968 */
9969
9970
9971 function validatePropTypes(element) {
9972 {
9973 var type = element.type;
9974
9975 if (type === null || type === undefined || typeof type === 'string') {
9976 return;
9977 }
9978
9979 var propTypes;
9980
9981 if (typeof type === 'function') {
9982 propTypes = type.propTypes;
9983 } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
9984 // Inner props are checked in the reconciler.
9985 type.$$typeof === REACT_MEMO_TYPE)) {
9986 propTypes = type.propTypes;
9987 } else {
9988 return;
9989 }
9990
9991 if (propTypes) {
9992 // Intentionally inside to avoid triggering lazy initializers:
9993 var name = getComponentName(type);
9994 checkPropTypes(propTypes, element.props, 'prop', name, element);
9995 } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
9996 propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
9997
9998 var _name = getComponentName(type);
9999
10000 error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
10001 }
10002
10003 if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
10004 error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
10005 }
10006 }
10007 }
10008 /**
10009 * Given a fragment, validate that it can only be provided with fragment props
10010 * @param {ReactElement} fragment
10011 */
10012
10013
10014 function validateFragmentProps(fragment) {
10015 {
10016 var keys = Object.keys(fragment.props);
10017
10018 for (var i = 0; i < keys.length; i++) {
10019 var key = keys[i];
10020
10021 if (key !== 'children' && key !== 'key') {
10022 setCurrentlyValidatingElement$1(fragment);
10023
10024 error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
10025
10026 setCurrentlyValidatingElement$1(null);
10027 break;
10028 }
10029 }
10030
10031 if (fragment.ref !== null) {
10032 setCurrentlyValidatingElement$1(fragment);
10033
10034 error('Invalid attribute `ref` supplied to `React.Fragment`.');
10035
10036 setCurrentlyValidatingElement$1(null);
10037 }
10038 }
10039 }
10040
10041 function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
10042 {
10043 var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
10044 // succeed and there will likely be errors in render.
10045
10046 if (!validType) {
10047 var info = '';
10048
10049 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
10050 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.";
10051 }
10052
10053 var sourceInfo = getSourceInfoErrorAddendum(source);
10054
10055 if (sourceInfo) {
10056 info += sourceInfo;
10057 } else {
10058 info += getDeclarationErrorAddendum();
10059 }
10060
10061 var typeString;
10062
10063 if (type === null) {
10064 typeString = 'null';
10065 } else if (Array.isArray(type)) {
10066 typeString = 'array';
10067 } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
10068 typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
10069 info = ' Did you accidentally export a JSX literal instead of a component?';
10070 } else {
10071 typeString = typeof type;
10072 }
10073
10074 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);
10075 }
10076
10077 var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
10078 // TODO: Drop this when these are no longer allowed as the type argument.
10079
10080 if (element == null) {
10081 return element;
10082 } // Skip key warning if the type isn't valid since our key validation logic
10083 // doesn't expect a non-string/function type and can throw confusing errors.
10084 // We don't want exception behavior to differ between dev and prod.
10085 // (Rendering will throw with a helpful message and as soon as the type is
10086 // fixed, the key warnings will appear.)
10087
10088
10089 if (validType) {
10090 var children = props.children;
10091
10092 if (children !== undefined) {
10093 if (isStaticChildren) {
10094 if (Array.isArray(children)) {
10095 for (var i = 0; i < children.length; i++) {
10096 validateChildKeys(children[i], type);
10097 }
10098
10099 if (Object.freeze) {
10100 Object.freeze(children);
10101 }
10102 } else {
10103 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.');
10104 }
10105 } else {
10106 validateChildKeys(children, type);
10107 }
10108 }
10109 }
10110
10111 if (type === exports.Fragment) {
10112 validateFragmentProps(element);
10113 } else {
10114 validatePropTypes(element);
10115 }
10116
10117 return element;
10118 }
10119 } // These two functions exist to still get child warnings in dev
10120 // even with the prod transform. This means that jsxDEV is purely
10121 // opt-in behavior for better messages but that we won't stop
10122 // giving you warnings if you use production apis.
10123
10124 function jsxWithValidationStatic(type, props, key) {
10125 {
10126 return jsxWithValidation(type, props, key, true);
10127 }
10128 }
10129 function jsxWithValidationDynamic(type, props, key) {
10130 {
10131 return jsxWithValidation(type, props, key, false);
10132 }
10133 }
10134
10135 var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
10136 // for now we can ship identical prod functions
10137
10138 var jsxs = jsxWithValidationStatic ;
10139
10140 exports.jsx = jsx;
10141 exports.jsxs = jsxs;
10142 })();
10143 }
10144
10145
10146 /***/ }),
10147
10148 /***/ "./node_modules/react/jsx-runtime.js":
10149 /*!*******************************************!*\
10150 !*** ./node_modules/react/jsx-runtime.js ***!
10151 \*******************************************/
10152 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
10153
10154 "use strict";
10155
10156
10157 if (false) {} else {
10158 module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ "./node_modules/react/cjs/react-jsx-runtime.development.js");
10159 }
10160
10161
10162 /***/ }),
10163
10164 /***/ "./node_modules/styled-components/dist/styled-components.browser.esm.js":
10165 /*!******************************************************************************!*\
10166 !*** ./node_modules/styled-components/dist/styled-components.browser.esm.js ***!
10167 \******************************************************************************/
10168 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10169
10170 "use strict";
10171 __webpack_require__.r(__webpack_exports__);
10172 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10173 /* harmony export */ "ServerStyleSheet": () => (/* binding */ ServerStyleSheet),
10174 /* harmony export */ "StyleSheetConsumer": () => (/* binding */ StyleSheetConsumer),
10175 /* harmony export */ "StyleSheetContext": () => (/* binding */ StyleSheetContext),
10176 /* harmony export */ "StyleSheetManager": () => (/* binding */ StyleSheetManager),
10177 /* harmony export */ "ThemeConsumer": () => (/* binding */ ThemeConsumer),
10178 /* harmony export */ "ThemeContext": () => (/* binding */ ThemeContext),
10179 /* harmony export */ "ThemeProvider": () => (/* binding */ ThemeProvider),
10180 /* 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),
10181 /* harmony export */ "createGlobalStyle": () => (/* binding */ createGlobalStyle),
10182 /* harmony export */ "css": () => (/* binding */ css),
10183 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
10184 /* harmony export */ "isStyledComponent": () => (/* binding */ isStyledComponent),
10185 /* harmony export */ "keyframes": () => (/* binding */ keyframes),
10186 /* harmony export */ "withTheme": () => (/* binding */ withTheme)
10187 /* harmony export */ });
10188 /* harmony import */ var stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! stylis/stylis.min */ "./node_modules/stylis/stylis.min.js");
10189 /* harmony import */ var stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0__);
10190 /* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! stylis-rule-sheet */ "./node_modules/stylis-rule-sheet/index.js");
10191 /* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1__);
10192 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
10193 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
10194 /* harmony import */ var _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/unitless */ "./node_modules/@emotion/unitless/dist/unitless.browser.esm.js");
10195 /* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
10196 /* harmony import */ var memoize_one__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! memoize-one */ "./node_modules/memoize-one/dist/memoize-one.esm.js");
10197 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
10198 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__);
10199 /* 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");
10200 /* harmony import */ var merge_anything__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! merge-anything */ "./node_modules/merge-anything/dist/index.esm.js");
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211 //
10212
10213 var interleave = (function (strings, interpolations) {
10214 var result = [strings[0]];
10215
10216 for (var i = 0, len = interpolations.length; i < len; i += 1) {
10217 result.push(interpolations[i], strings[i + 1]);
10218 }
10219
10220 return result;
10221 });
10222
10223 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
10224 return typeof obj;
10225 } : function (obj) {
10226 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
10227 };
10228
10229 var classCallCheck = function (instance, Constructor) {
10230 if (!(instance instanceof Constructor)) {
10231 throw new TypeError("Cannot call a class as a function");
10232 }
10233 };
10234
10235 var createClass = function () {
10236 function defineProperties(target, props) {
10237 for (var i = 0; i < props.length; i++) {
10238 var descriptor = props[i];
10239 descriptor.enumerable = descriptor.enumerable || false;
10240 descriptor.configurable = true;
10241 if ("value" in descriptor) descriptor.writable = true;
10242 Object.defineProperty(target, descriptor.key, descriptor);
10243 }
10244 }
10245
10246 return function (Constructor, protoProps, staticProps) {
10247 if (protoProps) defineProperties(Constructor.prototype, protoProps);
10248 if (staticProps) defineProperties(Constructor, staticProps);
10249 return Constructor;
10250 };
10251 }();
10252
10253 var _extends = Object.assign || function (target) {
10254 for (var i = 1; i < arguments.length; i++) {
10255 var source = arguments[i];
10256
10257 for (var key in source) {
10258 if (Object.prototype.hasOwnProperty.call(source, key)) {
10259 target[key] = source[key];
10260 }
10261 }
10262 }
10263
10264 return target;
10265 };
10266
10267 var inherits = function (subClass, superClass) {
10268 if (typeof superClass !== "function" && superClass !== null) {
10269 throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
10270 }
10271
10272 subClass.prototype = Object.create(superClass && superClass.prototype, {
10273 constructor: {
10274 value: subClass,
10275 enumerable: false,
10276 writable: true,
10277 configurable: true
10278 }
10279 });
10280 if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
10281 };
10282
10283 var objectWithoutProperties = function (obj, keys) {
10284 var target = {};
10285
10286 for (var i in obj) {
10287 if (keys.indexOf(i) >= 0) continue;
10288 if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
10289 target[i] = obj[i];
10290 }
10291
10292 return target;
10293 };
10294
10295 var possibleConstructorReturn = function (self, call) {
10296 if (!self) {
10297 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
10298 }
10299
10300 return call && (typeof call === "object" || typeof call === "function") ? call : self;
10301 };
10302
10303 //
10304 var isPlainObject = (function (x) {
10305 return (typeof x === 'undefined' ? 'undefined' : _typeof(x)) === 'object' && x.constructor === Object;
10306 });
10307
10308 //
10309 var EMPTY_ARRAY = Object.freeze([]);
10310 var EMPTY_OBJECT = Object.freeze({});
10311
10312 //
10313 function isFunction(test) {
10314 return typeof test === 'function';
10315 }
10316
10317 //
10318
10319 function getComponentName(target) {
10320 return ( true ? typeof target === 'string' && target : 0) || target.displayName || target.name || 'Component';
10321 }
10322
10323 //
10324 function isStatelessFunction(test) {
10325 return typeof test === 'function' && !(test.prototype && test.prototype.isReactComponent);
10326 }
10327
10328 //
10329 function isStyledComponent(target) {
10330 return target && typeof target.styledComponentId === 'string';
10331 }
10332
10333 //
10334
10335 var SC_ATTR = typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || 'data-styled';
10336
10337 var SC_VERSION_ATTR = 'data-styled-version';
10338
10339 var SC_STREAM_ATTR = 'data-styled-streamed';
10340
10341 var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;
10342
10343 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';
10344
10345 // Shared empty execution context when generating static styles
10346 var STATIC_EXECUTION_CONTEXT = {};
10347
10348 //
10349
10350
10351 /**
10352 * Parse errors.md and turn it into a simple hash of code: message
10353 */
10354 var ERRORS = true ? {
10355 "1": "Cannot create styled-component for component: %s.\n\n",
10356 "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",
10357 "3": "Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",
10358 "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",
10359 "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",
10360 "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",
10361 "7": "ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n",
10362 "8": "ThemeProvider: Please make your \"theme\" prop an object.\n\n",
10363 "9": "Missing document `<head>`\n\n",
10364 "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",
10365 "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",
10366 "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",
10367 "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"
10368 } : 0;
10369
10370 /**
10371 * super basic version of sprintf
10372 */
10373 function format() {
10374 var a = arguments.length <= 0 ? undefined : arguments[0];
10375 var b = [];
10376
10377 for (var c = 1, len = arguments.length; c < len; c += 1) {
10378 b.push(arguments.length <= c ? undefined : arguments[c]);
10379 }
10380
10381 b.forEach(function (d) {
10382 a = a.replace(/%[a-z]/, d);
10383 });
10384
10385 return a;
10386 }
10387
10388 /**
10389 * Create an error file out of errors.md for development and a simple web link to the full errors
10390 * in production mode.
10391 */
10392
10393 var StyledComponentsError = function (_Error) {
10394 inherits(StyledComponentsError, _Error);
10395
10396 function StyledComponentsError(code) {
10397 classCallCheck(this, StyledComponentsError);
10398
10399 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
10400 interpolations[_key - 1] = arguments[_key];
10401 }
10402
10403 if (false) { var _this; } else {
10404 var _this = possibleConstructorReturn(this, _Error.call(this, format.apply(undefined, [ERRORS[code]].concat(interpolations)).trim()));
10405 }
10406 return possibleConstructorReturn(_this);
10407 }
10408
10409 return StyledComponentsError;
10410 }(Error);
10411
10412 //
10413 var SC_COMPONENT_ID = /^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm;
10414
10415 var extractComps = (function (maybeCSS) {
10416 var css = '' + (maybeCSS || ''); // Definitely a string, and a clone
10417 var existingComponents = [];
10418 css.replace(SC_COMPONENT_ID, function (match, componentId, matchIndex) {
10419 existingComponents.push({ componentId: componentId, matchIndex: matchIndex });
10420 return match;
10421 });
10422 return existingComponents.map(function (_ref, i) {
10423 var componentId = _ref.componentId,
10424 matchIndex = _ref.matchIndex;
10425
10426 var nextComp = existingComponents[i + 1];
10427 var cssFromDOM = nextComp ? css.slice(matchIndex, nextComp.matchIndex) : css.slice(matchIndex);
10428 return { componentId: componentId, cssFromDOM: cssFromDOM };
10429 });
10430 });
10431
10432 //
10433
10434 var COMMENT_REGEX = /^\s*\/\/.*$/gm;
10435
10436 // NOTE: This stylis instance is only used to split rules from SSR'd style tags
10437 var stylisSplitter = new (stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default())({
10438 global: false,
10439 cascade: true,
10440 keyframe: false,
10441 prefix: false,
10442 compress: false,
10443 semicolon: true
10444 });
10445
10446 var stylis = new (stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default())({
10447 global: false,
10448 cascade: true,
10449 keyframe: false,
10450 prefix: true,
10451 compress: false,
10452 semicolon: false // NOTE: This means "autocomplete missing semicolons"
10453 });
10454
10455 // Wrap `insertRulePlugin to build a list of rules,
10456 // and then make our own plugin to return the rules. This
10457 // makes it easier to hook into the existing SSR architecture
10458
10459 var parsingRules = [];
10460
10461 // eslint-disable-next-line consistent-return
10462 var returnRulesPlugin = function returnRulesPlugin(context) {
10463 if (context === -2) {
10464 var parsedRules = parsingRules;
10465 parsingRules = [];
10466 return parsedRules;
10467 }
10468 };
10469
10470 var parseRulesPlugin = stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1___default()(function (rule) {
10471 parsingRules.push(rule);
10472 });
10473
10474 var _componentId = void 0;
10475 var _selector = void 0;
10476 var _selectorRegexp = void 0;
10477
10478 var selfReferenceReplacer = function selfReferenceReplacer(match, offset, string) {
10479 if (
10480 // the first self-ref is always untouched
10481 offset > 0 &&
10482 // there should be at least two self-refs to do a replacement (.b > .b)
10483 string.slice(0, offset).indexOf(_selector) !== -1 &&
10484 // no consecutive self refs (.b.b); that is a precedence boost and treated differently
10485 string.slice(offset - _selector.length, offset) !== _selector) {
10486 return '.' + _componentId;
10487 }
10488
10489 return match;
10490 };
10491
10492 /**
10493 * When writing a style like
10494 *
10495 * & + & {
10496 * color: red;
10497 * }
10498 *
10499 * The second ampersand should be a reference to the static component class. stylis
10500 * has no knowledge of static class so we have to intelligently replace the base selector.
10501 */
10502 var selfReferenceReplacementPlugin = function selfReferenceReplacementPlugin(context, _, selectors) {
10503 if (context === 2 && selectors.length && selectors[0].lastIndexOf(_selector) > 0) {
10504 // eslint-disable-next-line no-param-reassign
10505 selectors[0] = selectors[0].replace(_selectorRegexp, selfReferenceReplacer);
10506 }
10507 };
10508
10509 stylis.use([selfReferenceReplacementPlugin, parseRulesPlugin, returnRulesPlugin]);
10510 stylisSplitter.use([parseRulesPlugin, returnRulesPlugin]);
10511
10512 var splitByRules = function splitByRules(css) {
10513 return stylisSplitter('', css);
10514 };
10515
10516 function stringifyRules(rules, selector, prefix) {
10517 var componentId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '&';
10518
10519 var flatCSS = rules.join('').replace(COMMENT_REGEX, ''); // replace JS comments
10520
10521 var cssStr = selector && prefix ? prefix + ' ' + selector + ' { ' + flatCSS + ' }' : flatCSS;
10522
10523 // stylis has no concept of state to be passed to plugins
10524 // but since JS is single=threaded, we can rely on that to ensure
10525 // these properties stay in sync with the current stylis run
10526 _componentId = componentId;
10527 _selector = selector;
10528 _selectorRegexp = new RegExp('\\' + _selector + '\\b', 'g');
10529
10530 return stylis(prefix || !selector ? '' : selector, cssStr);
10531 }
10532
10533 //
10534 /* eslint-disable camelcase, no-undef */
10535
10536 var getNonce = (function () {
10537 return true ? __webpack_require__.nc : 0;
10538 });
10539
10540 //
10541 /* These are helpers for the StyleTags to keep track of the injected
10542 * rule names for each (component) ID that they're keeping track of.
10543 * They're crucial for detecting whether a name has already been
10544 * injected.
10545 * (This excludes rehydrated names) */
10546
10547 /* adds a new ID:name pairing to a names dictionary */
10548 var addNameForId = function addNameForId(names, id, name) {
10549 if (name) {
10550 // eslint-disable-next-line no-param-reassign
10551 var namesForId = names[id] || (names[id] = Object.create(null));
10552 namesForId[name] = true;
10553 }
10554 };
10555
10556 /* resets an ID entirely by overwriting it in the dictionary */
10557 var resetIdNames = function resetIdNames(names, id) {
10558 // eslint-disable-next-line no-param-reassign
10559 names[id] = Object.create(null);
10560 };
10561
10562 /* factory for a names dictionary checking the existance of an ID:name pairing */
10563 var hasNameForId = function hasNameForId(names) {
10564 return function (id, name) {
10565 return names[id] !== undefined && names[id][name];
10566 };
10567 };
10568
10569 /* stringifies names for the html/element output */
10570 var stringifyNames = function stringifyNames(names) {
10571 var str = '';
10572 // eslint-disable-next-line guard-for-in
10573 for (var id in names) {
10574 str += Object.keys(names[id]).join(' ') + ' ';
10575 }
10576 return str.trim();
10577 };
10578
10579 /* clones the nested names dictionary */
10580 var cloneNames = function cloneNames(names) {
10581 var clone = Object.create(null);
10582 // eslint-disable-next-line guard-for-in
10583 for (var id in names) {
10584 clone[id] = _extends({}, names[id]);
10585 }
10586 return clone;
10587 };
10588
10589 //
10590
10591 /* These are helpers that deal with the insertRule (aka speedy) API
10592 * They are used in the StyleTags and specifically the speedy tag
10593 */
10594
10595 /* retrieve a sheet for a given style tag */
10596 var sheetForTag = function sheetForTag(tag) {
10597 // $FlowFixMe
10598 if (tag.sheet) return tag.sheet;
10599
10600 /* Firefox quirk requires us to step through all stylesheets to find one owned by the given tag */
10601 var size = tag.ownerDocument.styleSheets.length;
10602 for (var i = 0; i < size; i += 1) {
10603 var sheet = tag.ownerDocument.styleSheets[i];
10604 // $FlowFixMe
10605 if (sheet.ownerNode === tag) return sheet;
10606 }
10607
10608 /* we should always be able to find a tag */
10609 throw new StyledComponentsError(10);
10610 };
10611
10612 /* insert a rule safely and return whether it was actually injected */
10613 var safeInsertRule = function safeInsertRule(sheet, cssRule, index) {
10614 /* abort early if cssRule string is falsy */
10615 if (!cssRule) return false;
10616
10617 var maxIndex = sheet.cssRules.length;
10618
10619 try {
10620 /* use insertRule and cap passed index with maxIndex (no of cssRules) */
10621 sheet.insertRule(cssRule, index <= maxIndex ? index : maxIndex);
10622 } catch (err) {
10623 /* any error indicates an invalid rule */
10624 return false;
10625 }
10626
10627 return true;
10628 };
10629
10630 /* deletes `size` rules starting from `removalIndex` */
10631 var deleteRules = function deleteRules(sheet, removalIndex, size) {
10632 var lowerBound = removalIndex - size;
10633 for (var i = removalIndex; i > lowerBound; i -= 1) {
10634 sheet.deleteRule(i);
10635 }
10636 };
10637
10638 //
10639
10640 /* this marker separates component styles and is important for rehydration */
10641 var makeTextMarker = function makeTextMarker(id) {
10642 return '\n/* sc-component-id: ' + id + ' */\n';
10643 };
10644
10645 /* add up all numbers in array up until and including the index */
10646 var addUpUntilIndex = function addUpUntilIndex(sizes, index) {
10647 var totalUpToIndex = 0;
10648 for (var i = 0; i <= index; i += 1) {
10649 totalUpToIndex += sizes[i];
10650 }
10651
10652 return totalUpToIndex;
10653 };
10654
10655 /* create a new style tag after lastEl */
10656 var makeStyleTag = function makeStyleTag(target, tagEl, insertBefore) {
10657 var targetDocument = document;
10658 if (target) targetDocument = target.ownerDocument;else if (tagEl) targetDocument = tagEl.ownerDocument;
10659
10660 var el = targetDocument.createElement('style');
10661 el.setAttribute(SC_ATTR, '');
10662 el.setAttribute(SC_VERSION_ATTR, "4.4.1");
10663
10664 var nonce = getNonce();
10665 if (nonce) {
10666 el.setAttribute('nonce', nonce);
10667 }
10668
10669 /* Work around insertRule quirk in EdgeHTML */
10670 el.appendChild(targetDocument.createTextNode(''));
10671
10672 if (target && !tagEl) {
10673 /* Append to target when no previous element was passed */
10674 target.appendChild(el);
10675 } else {
10676 if (!tagEl || !target || !tagEl.parentNode) {
10677 throw new StyledComponentsError(6);
10678 }
10679
10680 /* Insert new style tag after the previous one */
10681 tagEl.parentNode.insertBefore(el, insertBefore ? tagEl : tagEl.nextSibling);
10682 }
10683
10684 return el;
10685 };
10686
10687 /* takes a css factory function and outputs an html styled tag factory */
10688 var wrapAsHtmlTag = function wrapAsHtmlTag(css, names) {
10689 return function (additionalAttrs) {
10690 var nonce = getNonce();
10691 var attrs = [nonce && 'nonce="' + nonce + '"', SC_ATTR + '="' + stringifyNames(names) + '"', SC_VERSION_ATTR + '="' + "4.4.1" + '"', additionalAttrs];
10692
10693 var htmlAttr = attrs.filter(Boolean).join(' ');
10694 return '<style ' + htmlAttr + '>' + css() + '</style>';
10695 };
10696 };
10697
10698 /* takes a css factory function and outputs an element factory */
10699 var wrapAsElement = function wrapAsElement(css, names) {
10700 return function () {
10701 var _props;
10702
10703 var props = (_props = {}, _props[SC_ATTR] = stringifyNames(names), _props[SC_VERSION_ATTR] = "4.4.1", _props);
10704
10705 var nonce = getNonce();
10706 if (nonce) {
10707 // $FlowFixMe
10708 props.nonce = nonce;
10709 }
10710
10711 // eslint-disable-next-line react/no-danger
10712 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement('style', _extends({}, props, { dangerouslySetInnerHTML: { __html: css() } }));
10713 };
10714 };
10715
10716 var getIdsFromMarkersFactory = function getIdsFromMarkersFactory(markers) {
10717 return function () {
10718 return Object.keys(markers);
10719 };
10720 };
10721
10722 /* speedy tags utilise insertRule */
10723 var makeSpeedyTag = function makeSpeedyTag(el, getImportRuleTag) {
10724 var names = Object.create(null);
10725 var markers = Object.create(null);
10726 var sizes = [];
10727
10728 var extractImport = getImportRuleTag !== undefined;
10729 /* indicates whether getImportRuleTag was called */
10730 var usedImportRuleTag = false;
10731
10732 var insertMarker = function insertMarker(id) {
10733 var prev = markers[id];
10734 if (prev !== undefined) {
10735 return prev;
10736 }
10737
10738 markers[id] = sizes.length;
10739 sizes.push(0);
10740 resetIdNames(names, id);
10741
10742 return markers[id];
10743 };
10744
10745 var insertRules = function insertRules(id, cssRules, name) {
10746 var marker = insertMarker(id);
10747 var sheet = sheetForTag(el);
10748 var insertIndex = addUpUntilIndex(sizes, marker);
10749
10750 var injectedRules = 0;
10751 var importRules = [];
10752 var cssRulesSize = cssRules.length;
10753
10754 for (var i = 0; i < cssRulesSize; i += 1) {
10755 var cssRule = cssRules[i];
10756 var mayHaveImport = extractImport; /* @import rules are reordered to appear first */
10757 if (mayHaveImport && cssRule.indexOf('@import') !== -1) {
10758 importRules.push(cssRule);
10759 } else if (safeInsertRule(sheet, cssRule, insertIndex + injectedRules)) {
10760 mayHaveImport = false;
10761 injectedRules += 1;
10762 }
10763 }
10764
10765 if (extractImport && importRules.length > 0) {
10766 usedImportRuleTag = true;
10767 // $FlowFixMe
10768 getImportRuleTag().insertRules(id + '-import', importRules);
10769 }
10770
10771 sizes[marker] += injectedRules; /* add up no of injected rules */
10772 addNameForId(names, id, name);
10773 };
10774
10775 var removeRules = function removeRules(id) {
10776 var marker = markers[id];
10777 if (marker === undefined) return;
10778 // $FlowFixMe
10779 if (el.isConnected === false) return;
10780
10781 var size = sizes[marker];
10782 var sheet = sheetForTag(el);
10783 var removalIndex = addUpUntilIndex(sizes, marker) - 1;
10784 deleteRules(sheet, removalIndex, size);
10785 sizes[marker] = 0;
10786 resetIdNames(names, id);
10787
10788 if (extractImport && usedImportRuleTag) {
10789 // $FlowFixMe
10790 getImportRuleTag().removeRules(id + '-import');
10791 }
10792 };
10793
10794 var css = function css() {
10795 var _sheetForTag = sheetForTag(el),
10796 cssRules = _sheetForTag.cssRules;
10797
10798 var str = '';
10799
10800 // eslint-disable-next-line guard-for-in
10801 for (var id in markers) {
10802 str += makeTextMarker(id);
10803 var marker = markers[id];
10804 var end = addUpUntilIndex(sizes, marker);
10805 var size = sizes[marker];
10806 for (var i = end - size; i < end; i += 1) {
10807 var rule = cssRules[i];
10808 if (rule !== undefined) {
10809 str += rule.cssText;
10810 }
10811 }
10812 }
10813
10814 return str;
10815 };
10816
10817 return {
10818 clone: function clone() {
10819 throw new StyledComponentsError(5);
10820 },
10821
10822 css: css,
10823 getIds: getIdsFromMarkersFactory(markers),
10824 hasNameForId: hasNameForId(names),
10825 insertMarker: insertMarker,
10826 insertRules: insertRules,
10827 removeRules: removeRules,
10828 sealed: false,
10829 styleTag: el,
10830 toElement: wrapAsElement(css, names),
10831 toHTML: wrapAsHtmlTag(css, names)
10832 };
10833 };
10834
10835 var makeTextNode = function makeTextNode(targetDocument, id) {
10836 return targetDocument.createTextNode(makeTextMarker(id));
10837 };
10838
10839 var makeBrowserTag = function makeBrowserTag(el, getImportRuleTag) {
10840 var names = Object.create(null);
10841 var markers = Object.create(null);
10842
10843 var extractImport = getImportRuleTag !== undefined;
10844
10845 /* indicates whether getImportRuleTag was called */
10846 var usedImportRuleTag = false;
10847
10848 var insertMarker = function insertMarker(id) {
10849 var prev = markers[id];
10850 if (prev !== undefined) {
10851 return prev;
10852 }
10853
10854 markers[id] = makeTextNode(el.ownerDocument, id);
10855 el.appendChild(markers[id]);
10856 names[id] = Object.create(null);
10857
10858 return markers[id];
10859 };
10860
10861 var insertRules = function insertRules(id, cssRules, name) {
10862 var marker = insertMarker(id);
10863 var importRules = [];
10864 var cssRulesSize = cssRules.length;
10865
10866 for (var i = 0; i < cssRulesSize; i += 1) {
10867 var rule = cssRules[i];
10868 var mayHaveImport = extractImport;
10869 if (mayHaveImport && rule.indexOf('@import') !== -1) {
10870 importRules.push(rule);
10871 } else {
10872 mayHaveImport = false;
10873 var separator = i === cssRulesSize - 1 ? '' : ' ';
10874 marker.appendData('' + rule + separator);
10875 }
10876 }
10877
10878 addNameForId(names, id, name);
10879
10880 if (extractImport && importRules.length > 0) {
10881 usedImportRuleTag = true;
10882 // $FlowFixMe
10883 getImportRuleTag().insertRules(id + '-import', importRules);
10884 }
10885 };
10886
10887 var removeRules = function removeRules(id) {
10888 var marker = markers[id];
10889 if (marker === undefined) return;
10890
10891 /* create new empty text node and replace the current one */
10892 var newMarker = makeTextNode(el.ownerDocument, id);
10893 el.replaceChild(newMarker, marker);
10894 markers[id] = newMarker;
10895 resetIdNames(names, id);
10896
10897 if (extractImport && usedImportRuleTag) {
10898 // $FlowFixMe
10899 getImportRuleTag().removeRules(id + '-import');
10900 }
10901 };
10902
10903 var css = function css() {
10904 var str = '';
10905
10906 // eslint-disable-next-line guard-for-in
10907 for (var id in markers) {
10908 str += markers[id].data;
10909 }
10910
10911 return str;
10912 };
10913
10914 return {
10915 clone: function clone() {
10916 throw new StyledComponentsError(5);
10917 },
10918
10919 css: css,
10920 getIds: getIdsFromMarkersFactory(markers),
10921 hasNameForId: hasNameForId(names),
10922 insertMarker: insertMarker,
10923 insertRules: insertRules,
10924 removeRules: removeRules,
10925 sealed: false,
10926 styleTag: el,
10927 toElement: wrapAsElement(css, names),
10928 toHTML: wrapAsHtmlTag(css, names)
10929 };
10930 };
10931
10932 var makeServerTag = function makeServerTag(namesArg, markersArg) {
10933 var names = namesArg === undefined ? Object.create(null) : namesArg;
10934 var markers = markersArg === undefined ? Object.create(null) : markersArg;
10935
10936 var insertMarker = function insertMarker(id) {
10937 var prev = markers[id];
10938 if (prev !== undefined) {
10939 return prev;
10940 }
10941
10942 return markers[id] = [''];
10943 };
10944
10945 var insertRules = function insertRules(id, cssRules, name) {
10946 var marker = insertMarker(id);
10947 marker[0] += cssRules.join(' ');
10948 addNameForId(names, id, name);
10949 };
10950
10951 var removeRules = function removeRules(id) {
10952 var marker = markers[id];
10953 if (marker === undefined) return;
10954 marker[0] = '';
10955 resetIdNames(names, id);
10956 };
10957
10958 var css = function css() {
10959 var str = '';
10960 // eslint-disable-next-line guard-for-in
10961 for (var id in markers) {
10962 var cssForId = markers[id][0];
10963 if (cssForId) {
10964 str += makeTextMarker(id) + cssForId;
10965 }
10966 }
10967 return str;
10968 };
10969
10970 var clone = function clone() {
10971 var namesClone = cloneNames(names);
10972 var markersClone = Object.create(null);
10973
10974 // eslint-disable-next-line guard-for-in
10975 for (var id in markers) {
10976 markersClone[id] = [markers[id][0]];
10977 }
10978
10979 return makeServerTag(namesClone, markersClone);
10980 };
10981
10982 var tag = {
10983 clone: clone,
10984 css: css,
10985 getIds: getIdsFromMarkersFactory(markers),
10986 hasNameForId: hasNameForId(names),
10987 insertMarker: insertMarker,
10988 insertRules: insertRules,
10989 removeRules: removeRules,
10990 sealed: false,
10991 styleTag: null,
10992 toElement: wrapAsElement(css, names),
10993 toHTML: wrapAsHtmlTag(css, names)
10994 };
10995
10996 return tag;
10997 };
10998
10999 var makeTag = function makeTag(target, tagEl, forceServer, insertBefore, getImportRuleTag) {
11000 if (IS_BROWSER && !forceServer) {
11001 var el = makeStyleTag(target, tagEl, insertBefore);
11002
11003 if (DISABLE_SPEEDY) {
11004 return makeBrowserTag(el, getImportRuleTag);
11005 } else {
11006 return makeSpeedyTag(el, getImportRuleTag);
11007 }
11008 }
11009
11010 return makeServerTag();
11011 };
11012
11013 var rehydrate = function rehydrate(tag, els, extracted) {
11014 /* add all extracted components to the new tag */
11015 for (var i = 0, len = extracted.length; i < len; i += 1) {
11016 var _extracted$i = extracted[i],
11017 componentId = _extracted$i.componentId,
11018 cssFromDOM = _extracted$i.cssFromDOM;
11019
11020 var cssRules = splitByRules(cssFromDOM);
11021 tag.insertRules(componentId, cssRules);
11022 }
11023
11024 /* remove old HTMLStyleElements, since they have been rehydrated */
11025 for (var _i = 0, _len = els.length; _i < _len; _i += 1) {
11026 var el = els[_i];
11027 if (el.parentNode) {
11028 el.parentNode.removeChild(el);
11029 }
11030 }
11031 };
11032
11033 //
11034
11035 var SPLIT_REGEX = /\s+/;
11036
11037 /* determine the maximum number of components before tags are sharded */
11038 var MAX_SIZE = void 0;
11039 if (IS_BROWSER) {
11040 /* in speedy mode we can keep a lot more rules in a sheet before a slowdown can be expected */
11041 MAX_SIZE = DISABLE_SPEEDY ? 40 : 1000;
11042 } else {
11043 /* for servers we do not need to shard at all */
11044 MAX_SIZE = -1;
11045 }
11046
11047 var sheetRunningId = 0;
11048 var master = void 0;
11049
11050 var StyleSheet = function () {
11051
11052 /* a map from ids to tags */
11053
11054 /* deferred rules for a given id */
11055
11056 /* this is used for not reinjecting rules via hasNameForId() */
11057
11058 /* when rules for an id are removed using remove() we have to ignore rehydratedNames for it */
11059
11060 /* a list of tags belonging to this StyleSheet */
11061
11062 /* a tag for import rules */
11063
11064 /* current capacity until a new tag must be created */
11065
11066 /* children (aka clones) of this StyleSheet inheriting all and future injections */
11067
11068 function StyleSheet() {
11069 var _this = this;
11070
11071 var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : IS_BROWSER ? document.head : null;
11072 var forceServer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
11073 classCallCheck(this, StyleSheet);
11074
11075 this.getImportRuleTag = function () {
11076 var importRuleTag = _this.importRuleTag;
11077
11078 if (importRuleTag !== undefined) {
11079 return importRuleTag;
11080 }
11081
11082 var firstTag = _this.tags[0];
11083 var insertBefore = true;
11084
11085 return _this.importRuleTag = makeTag(_this.target, firstTag ? firstTag.styleTag : null, _this.forceServer, insertBefore);
11086 };
11087
11088 sheetRunningId += 1;
11089 this.id = sheetRunningId;
11090 this.forceServer = forceServer;
11091 this.target = forceServer ? null : target;
11092 this.tagMap = {};
11093 this.deferred = {};
11094 this.rehydratedNames = {};
11095 this.ignoreRehydratedNames = {};
11096 this.tags = [];
11097 this.capacity = 1;
11098 this.clones = [];
11099 }
11100
11101 /* rehydrate all SSR'd style tags */
11102
11103
11104 StyleSheet.prototype.rehydrate = function rehydrate$$1() {
11105 if (!IS_BROWSER || this.forceServer) return this;
11106
11107 var els = [];
11108 var extracted = [];
11109 var isStreamed = false;
11110
11111 /* retrieve all of our SSR style elements from the DOM */
11112 var nodes = document.querySelectorAll('style[' + SC_ATTR + '][' + SC_VERSION_ATTR + '="' + "4.4.1" + '"]');
11113
11114 var nodesSize = nodes.length;
11115
11116 /* abort rehydration if no previous style tags were found */
11117 if (!nodesSize) return this;
11118
11119 for (var i = 0; i < nodesSize; i += 1) {
11120 var el = nodes[i];
11121
11122 /* check if style tag is a streamed tag */
11123 if (!isStreamed) isStreamed = !!el.getAttribute(SC_STREAM_ATTR);
11124
11125 /* retrieve all component names */
11126 var elNames = (el.getAttribute(SC_ATTR) || '').trim().split(SPLIT_REGEX);
11127 var elNamesSize = elNames.length;
11128 for (var j = 0, name; j < elNamesSize; j += 1) {
11129 name = elNames[j];
11130 /* add rehydrated name to sheet to avoid re-adding styles */
11131 this.rehydratedNames[name] = true;
11132 }
11133
11134 /* extract all components and their CSS */
11135 extracted.push.apply(extracted, extractComps(el.textContent));
11136
11137 /* store original HTMLStyleElement */
11138 els.push(el);
11139 }
11140
11141 /* abort rehydration if nothing was extracted */
11142 var extractedSize = extracted.length;
11143 if (!extractedSize) return this;
11144
11145 /* create a tag to be used for rehydration */
11146 var tag = this.makeTag(null);
11147
11148 rehydrate(tag, els, extracted);
11149
11150 /* reset capacity and adjust MAX_SIZE by the initial size of the rehydration */
11151 this.capacity = Math.max(1, MAX_SIZE - extractedSize);
11152 this.tags.push(tag);
11153
11154 /* retrieve all component ids */
11155 for (var _j = 0; _j < extractedSize; _j += 1) {
11156 this.tagMap[extracted[_j].componentId] = tag;
11157 }
11158
11159 return this;
11160 };
11161
11162 /* retrieve a "master" instance of StyleSheet which is typically used when no other is available
11163 * The master StyleSheet is targeted by createGlobalStyle, keyframes, and components outside of any
11164 * StyleSheetManager's context */
11165
11166
11167 /* reset the internal "master" instance */
11168 StyleSheet.reset = function reset() {
11169 var forceServer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
11170
11171 master = new StyleSheet(undefined, forceServer).rehydrate();
11172 };
11173
11174 /* adds "children" to the StyleSheet that inherit all of the parents' rules
11175 * while their own rules do not affect the parent */
11176
11177
11178 StyleSheet.prototype.clone = function clone() {
11179 var sheet = new StyleSheet(this.target, this.forceServer);
11180
11181 /* add to clone array */
11182 this.clones.push(sheet);
11183
11184 /* clone all tags */
11185 sheet.tags = this.tags.map(function (tag) {
11186 var ids = tag.getIds();
11187 var newTag = tag.clone();
11188
11189 /* reconstruct tagMap */
11190 for (var i = 0; i < ids.length; i += 1) {
11191 sheet.tagMap[ids[i]] = newTag;
11192 }
11193
11194 return newTag;
11195 });
11196
11197 /* clone other maps */
11198 sheet.rehydratedNames = _extends({}, this.rehydratedNames);
11199 sheet.deferred = _extends({}, this.deferred);
11200
11201 return sheet;
11202 };
11203
11204 /* force StyleSheet to create a new tag on the next injection */
11205
11206
11207 StyleSheet.prototype.sealAllTags = function sealAllTags() {
11208 this.capacity = 1;
11209
11210 this.tags.forEach(function (tag) {
11211 // eslint-disable-next-line no-param-reassign
11212 tag.sealed = true;
11213 });
11214 };
11215
11216 StyleSheet.prototype.makeTag = function makeTag$$1(tag) {
11217 var lastEl = tag ? tag.styleTag : null;
11218 var insertBefore = false;
11219
11220 return makeTag(this.target, lastEl, this.forceServer, insertBefore, this.getImportRuleTag);
11221 };
11222
11223 /* get a tag for a given componentId, assign the componentId to one, or shard */
11224 StyleSheet.prototype.getTagForId = function getTagForId(id) {
11225 /* simply return a tag, when the componentId was already assigned one */
11226 var prev = this.tagMap[id];
11227 if (prev !== undefined && !prev.sealed) {
11228 return prev;
11229 }
11230
11231 var tag = this.tags[this.tags.length - 1];
11232
11233 /* shard (create a new tag) if the tag is exhausted (See MAX_SIZE) */
11234 this.capacity -= 1;
11235
11236 if (this.capacity === 0) {
11237 this.capacity = MAX_SIZE;
11238 tag = this.makeTag(tag);
11239 this.tags.push(tag);
11240 }
11241
11242 return this.tagMap[id] = tag;
11243 };
11244
11245 /* mainly for createGlobalStyle to check for its id */
11246
11247
11248 StyleSheet.prototype.hasId = function hasId(id) {
11249 return this.tagMap[id] !== undefined;
11250 };
11251
11252 /* caching layer checking id+name to already have a corresponding tag and injected rules */
11253
11254
11255 StyleSheet.prototype.hasNameForId = function hasNameForId(id, name) {
11256 /* exception for rehydrated names which are checked separately */
11257 if (this.ignoreRehydratedNames[id] === undefined && this.rehydratedNames[name]) {
11258 return true;
11259 }
11260
11261 var tag = this.tagMap[id];
11262 return tag !== undefined && tag.hasNameForId(id, name);
11263 };
11264
11265 /* registers a componentId and registers it on its tag */
11266
11267
11268 StyleSheet.prototype.deferredInject = function deferredInject(id, cssRules) {
11269 /* don't inject when the id is already registered */
11270 if (this.tagMap[id] !== undefined) return;
11271
11272 var clones = this.clones;
11273
11274 for (var i = 0; i < clones.length; i += 1) {
11275 clones[i].deferredInject(id, cssRules);
11276 }
11277
11278 this.getTagForId(id).insertMarker(id);
11279 this.deferred[id] = cssRules;
11280 };
11281
11282 /* injects rules for a given id with a name that will need to be cached */
11283
11284
11285 StyleSheet.prototype.inject = function inject(id, cssRules, name) {
11286 var clones = this.clones;
11287
11288
11289 for (var i = 0; i < clones.length; i += 1) {
11290 clones[i].inject(id, cssRules, name);
11291 }
11292
11293 var tag = this.getTagForId(id);
11294
11295 /* add deferred rules for component */
11296 if (this.deferred[id] !== undefined) {
11297 // Combine passed cssRules with previously deferred CSS rules
11298 // NOTE: We cannot mutate the deferred array itself as all clones
11299 // do the same (see clones[i].inject)
11300 var rules = this.deferred[id].concat(cssRules);
11301 tag.insertRules(id, rules, name);
11302
11303 this.deferred[id] = undefined;
11304 } else {
11305 tag.insertRules(id, cssRules, name);
11306 }
11307 };
11308
11309 /* removes all rules for a given id, which doesn't remove its marker but resets it */
11310
11311
11312 StyleSheet.prototype.remove = function remove(id) {
11313 var tag = this.tagMap[id];
11314 if (tag === undefined) return;
11315
11316 var clones = this.clones;
11317
11318 for (var i = 0; i < clones.length; i += 1) {
11319 clones[i].remove(id);
11320 }
11321
11322 /* remove all rules from the tag */
11323 tag.removeRules(id);
11324
11325 /* ignore possible rehydrated names */
11326 this.ignoreRehydratedNames[id] = true;
11327
11328 /* delete possible deferred rules */
11329 this.deferred[id] = undefined;
11330 };
11331
11332 StyleSheet.prototype.toHTML = function toHTML() {
11333 return this.tags.map(function (tag) {
11334 return tag.toHTML();
11335 }).join('');
11336 };
11337
11338 StyleSheet.prototype.toReactElements = function toReactElements() {
11339 var id = this.id;
11340
11341
11342 return this.tags.map(function (tag, i) {
11343 var key = 'sc-' + id + '-' + i;
11344 return (0,react__WEBPACK_IMPORTED_MODULE_2__.cloneElement)(tag.toElement(), { key: key });
11345 });
11346 };
11347
11348 createClass(StyleSheet, null, [{
11349 key: 'master',
11350 get: function get$$1() {
11351 return master || (master = new StyleSheet().rehydrate());
11352 }
11353
11354 /* NOTE: This is just for backwards-compatibility with jest-styled-components */
11355
11356 }, {
11357 key: 'instance',
11358 get: function get$$1() {
11359 return StyleSheet.master;
11360 }
11361 }]);
11362 return StyleSheet;
11363 }();
11364
11365 //
11366
11367 var Keyframes = function () {
11368 function Keyframes(name, rules) {
11369 var _this = this;
11370
11371 classCallCheck(this, Keyframes);
11372
11373 this.inject = function (styleSheet) {
11374 if (!styleSheet.hasNameForId(_this.id, _this.name)) {
11375 styleSheet.inject(_this.id, _this.rules, _this.name);
11376 }
11377 };
11378
11379 this.toString = function () {
11380 throw new StyledComponentsError(12, String(_this.name));
11381 };
11382
11383 this.name = name;
11384 this.rules = rules;
11385
11386 this.id = 'sc-keyframes-' + name;
11387 }
11388
11389 Keyframes.prototype.getName = function getName() {
11390 return this.name;
11391 };
11392
11393 return Keyframes;
11394 }();
11395
11396 //
11397
11398 /**
11399 * inlined version of
11400 * https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/hyphenateStyleName.js
11401 */
11402
11403 var uppercasePattern = /([A-Z])/g;
11404 var msPattern = /^ms-/;
11405
11406 /**
11407 * Hyphenates a camelcased CSS property name, for example:
11408 *
11409 * > hyphenateStyleName('backgroundColor')
11410 * < "background-color"
11411 * > hyphenateStyleName('MozTransition')
11412 * < "-moz-transition"
11413 * > hyphenateStyleName('msTransition')
11414 * < "-ms-transition"
11415 *
11416 * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
11417 * is converted to `-ms-`.
11418 *
11419 * @param {string} string
11420 * @return {string}
11421 */
11422 function hyphenateStyleName(string) {
11423 return string.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
11424 }
11425
11426 //
11427
11428 // Taken from https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/shared/dangerousStyleValue.js
11429 function addUnitIfNeeded(name, value) {
11430 // https://github.com/amilajack/eslint-plugin-flowtype-errors/issues/133
11431 // $FlowFixMe
11432 if (value == null || typeof value === 'boolean' || value === '') {
11433 return '';
11434 }
11435
11436 if (typeof value === 'number' && value !== 0 && !(name in _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__["default"])) {
11437 return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
11438 }
11439
11440 return String(value).trim();
11441 }
11442
11443 //
11444
11445 /**
11446 * It's falsish not falsy because 0 is allowed.
11447 */
11448 var isFalsish = function isFalsish(chunk) {
11449 return chunk === undefined || chunk === null || chunk === false || chunk === '';
11450 };
11451
11452 var objToCssArray = function objToCssArray(obj, prevKey) {
11453 var rules = [];
11454 var keys = Object.keys(obj);
11455
11456 keys.forEach(function (key) {
11457 if (!isFalsish(obj[key])) {
11458 if (isPlainObject(obj[key])) {
11459 rules.push.apply(rules, objToCssArray(obj[key], key));
11460
11461 return rules;
11462 } else if (isFunction(obj[key])) {
11463 rules.push(hyphenateStyleName(key) + ':', obj[key], ';');
11464
11465 return rules;
11466 }
11467 rules.push(hyphenateStyleName(key) + ': ' + addUnitIfNeeded(key, obj[key]) + ';');
11468 }
11469 return rules;
11470 });
11471
11472 return prevKey ? [prevKey + ' {'].concat(rules, ['}']) : rules;
11473 };
11474
11475 function flatten(chunk, executionContext, styleSheet) {
11476 if (Array.isArray(chunk)) {
11477 var ruleSet = [];
11478
11479 for (var i = 0, len = chunk.length, result; i < len; i += 1) {
11480 result = flatten(chunk[i], executionContext, styleSheet);
11481
11482 if (result === null) continue;else if (Array.isArray(result)) ruleSet.push.apply(ruleSet, result);else ruleSet.push(result);
11483 }
11484
11485 return ruleSet;
11486 }
11487
11488 if (isFalsish(chunk)) {
11489 return null;
11490 }
11491
11492 /* Handle other components */
11493 if (isStyledComponent(chunk)) {
11494 return '.' + chunk.styledComponentId;
11495 }
11496
11497 /* Either execute or defer the function */
11498 if (isFunction(chunk)) {
11499 if (isStatelessFunction(chunk) && executionContext) {
11500 var _result = chunk(executionContext);
11501
11502 if ( true && (0,react_is__WEBPACK_IMPORTED_MODULE_4__.isElement)(_result)) {
11503 // eslint-disable-next-line no-console
11504 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.');
11505 }
11506
11507 return flatten(_result, executionContext, styleSheet);
11508 } else return chunk;
11509 }
11510
11511 if (chunk instanceof Keyframes) {
11512 if (styleSheet) {
11513 chunk.inject(styleSheet);
11514 return chunk.getName();
11515 } else return chunk;
11516 }
11517
11518 /* Handle objects */
11519 return isPlainObject(chunk) ? objToCssArray(chunk) : chunk.toString();
11520 }
11521
11522 //
11523
11524 function css(styles) {
11525 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
11526 interpolations[_key - 1] = arguments[_key];
11527 }
11528
11529 if (isFunction(styles) || isPlainObject(styles)) {
11530 // $FlowFixMe
11531 return flatten(interleave(EMPTY_ARRAY, [styles].concat(interpolations)));
11532 }
11533
11534 // $FlowFixMe
11535 return flatten(interleave(styles, interpolations));
11536 }
11537
11538 //
11539
11540 function constructWithOptions(componentConstructor, tag) {
11541 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT;
11542
11543 if (!(0,react_is__WEBPACK_IMPORTED_MODULE_4__.isValidElementType)(tag)) {
11544 throw new StyledComponentsError(1, String(tag));
11545 }
11546
11547 /* This is callable directly as a template function */
11548 // $FlowFixMe: Not typed to avoid destructuring arguments
11549 var templateFunction = function templateFunction() {
11550 return componentConstructor(tag, options, css.apply(undefined, arguments));
11551 };
11552
11553 /* If config methods are called, wrap up a new template function and merge options */
11554 templateFunction.withConfig = function (config) {
11555 return constructWithOptions(componentConstructor, tag, _extends({}, options, config));
11556 };
11557
11558 /* Modify/inject new props at runtime */
11559 templateFunction.attrs = function (attrs) {
11560 return constructWithOptions(componentConstructor, tag, _extends({}, options, {
11561 attrs: Array.prototype.concat(options.attrs, attrs).filter(Boolean)
11562 }));
11563 };
11564
11565 return templateFunction;
11566 }
11567
11568 //
11569 // Source: https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js
11570 function murmurhash(c) {
11571 for (var e = c.length | 0, a = e | 0, d = 0, b; e >= 4;) {
11572 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;
11573 }
11574 switch (e) {
11575 case 3:
11576 a ^= (c.charCodeAt(d + 2) & 255) << 16;
11577 case 2:
11578 a ^= (c.charCodeAt(d + 1) & 255) << 8;
11579 case 1:
11580 a ^= c.charCodeAt(d) & 255, a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
11581 }
11582 a ^= a >>> 13;
11583 a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
11584 return (a ^ a >>> 15) >>> 0;
11585 }
11586
11587 //
11588 /* eslint-disable no-bitwise */
11589
11590 /* This is the "capacity" of our alphabet i.e. 2x26 for all letters plus their capitalised
11591 * counterparts */
11592 var charsLength = 52;
11593
11594 /* start at 75 for 'a' until 'z' (25) and then start at 65 for capitalised letters */
11595 var getAlphabeticChar = function getAlphabeticChar(code) {
11596 return String.fromCharCode(code + (code > 25 ? 39 : 97));
11597 };
11598
11599 /* input a number, usually a hash and convert it to base-52 */
11600 function generateAlphabeticName(code) {
11601 var name = '';
11602 var x = void 0;
11603
11604 /* get a char and divide by alphabet-length */
11605 for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {
11606 name = getAlphabeticChar(x % charsLength) + name;
11607 }
11608
11609 return getAlphabeticChar(x % charsLength) + name;
11610 }
11611
11612 //
11613
11614 function hasFunctionObjectKey(obj) {
11615 // eslint-disable-next-line guard-for-in, no-restricted-syntax
11616 for (var key in obj) {
11617 if (isFunction(obj[key])) {
11618 return true;
11619 }
11620 }
11621
11622 return false;
11623 }
11624
11625 function isStaticRules(rules, attrs) {
11626 for (var i = 0; i < rules.length; i += 1) {
11627 var rule = rules[i];
11628
11629 // recursive case
11630 if (Array.isArray(rule) && !isStaticRules(rule, attrs)) {
11631 return false;
11632 } else if (isFunction(rule) && !isStyledComponent(rule)) {
11633 // functions are allowed to be static if they're just being
11634 // used to get the classname of a nested styled component
11635 return false;
11636 }
11637 }
11638
11639 if (attrs.some(function (x) {
11640 return isFunction(x) || hasFunctionObjectKey(x);
11641 })) return false;
11642
11643 return true;
11644 }
11645
11646 //
11647
11648 /* combines hashStr (murmurhash) and nameGenerator for convenience */
11649 var hasher = function hasher(str) {
11650 return generateAlphabeticName(murmurhash(str));
11651 };
11652
11653 /*
11654 ComponentStyle is all the CSS-specific stuff, not
11655 the React-specific stuff.
11656 */
11657
11658 var ComponentStyle = function () {
11659 function ComponentStyle(rules, attrs, componentId) {
11660 classCallCheck(this, ComponentStyle);
11661
11662 this.rules = rules;
11663 this.isStatic = false && 0;
11664 this.componentId = componentId;
11665
11666 if (!StyleSheet.master.hasId(componentId)) {
11667 StyleSheet.master.deferredInject(componentId, []);
11668 }
11669 }
11670
11671 /*
11672 * Flattens a rule set into valid CSS
11673 * Hashes it, wraps the whole chunk in a .hash1234 {}
11674 * Returns the hash to be injected on render()
11675 * */
11676
11677
11678 ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) {
11679 var isStatic = this.isStatic,
11680 componentId = this.componentId,
11681 lastClassName = this.lastClassName;
11682
11683 if (IS_BROWSER && isStatic && typeof lastClassName === 'string' && styleSheet.hasNameForId(componentId, lastClassName)) {
11684 return lastClassName;
11685 }
11686
11687 var flatCSS = flatten(this.rules, executionContext, styleSheet);
11688 var name = hasher(this.componentId + flatCSS.join(''));
11689 if (!styleSheet.hasNameForId(componentId, name)) {
11690 styleSheet.inject(this.componentId, stringifyRules(flatCSS, '.' + name, undefined, componentId), name);
11691 }
11692
11693 this.lastClassName = name;
11694 return name;
11695 };
11696
11697 ComponentStyle.generateName = function generateName(str) {
11698 return hasher(str);
11699 };
11700
11701 return ComponentStyle;
11702 }();
11703
11704 //
11705
11706 var LIMIT = 200;
11707
11708 var createWarnTooManyClasses = (function (displayName) {
11709 var generatedClasses = {};
11710 var warningSeen = false;
11711
11712 return function (className) {
11713 if (!warningSeen) {
11714 generatedClasses[className] = true;
11715 if (Object.keys(generatedClasses).length >= LIMIT) {
11716 // Unable to find latestRule in test environment.
11717 /* eslint-disable no-console, prefer-template */
11718 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 />');
11719 warningSeen = true;
11720 generatedClasses = {};
11721 }
11722 }
11723 };
11724 });
11725
11726 //
11727
11728 var determineTheme = (function (props, fallbackTheme) {
11729 var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT;
11730
11731 // Props should take precedence over ThemeProvider, which should take precedence over
11732 // defaultProps, but React automatically puts defaultProps on props.
11733
11734 /* eslint-disable react/prop-types, flowtype-errors/show-errors */
11735 var isDefaultTheme = defaultProps ? props.theme === defaultProps.theme : false;
11736 var theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme || defaultProps.theme;
11737 /* eslint-enable */
11738
11739 return theme;
11740 });
11741
11742 //
11743 var escapeRegex = /[[\].#*$><+~=|^:(),"'`-]+/g;
11744 var dashesAtEnds = /(^-|-$)/g;
11745
11746 /**
11747 * TODO: Explore using CSS.escape when it becomes more available
11748 * in evergreen browsers.
11749 */
11750 function escape(str) {
11751 return str
11752 // Replace all possible CSS selectors
11753 .replace(escapeRegex, '-')
11754
11755 // Remove extraneous hyphens at the start and end
11756 .replace(dashesAtEnds, '');
11757 }
11758
11759 //
11760
11761 function isTag(target) {
11762 return typeof target === 'string' && ( true ? target.charAt(0) === target.charAt(0).toLowerCase() : 0);
11763 }
11764
11765 //
11766
11767 function generateDisplayName(target) {
11768 // $FlowFixMe
11769 return isTag(target) ? 'styled.' + target : 'Styled(' + getComponentName(target) + ')';
11770 }
11771
11772 var _TYPE_STATICS;
11773
11774 var REACT_STATICS = {
11775 childContextTypes: true,
11776 contextTypes: true,
11777 defaultProps: true,
11778 displayName: true,
11779 getDerivedStateFromProps: true,
11780 propTypes: true,
11781 type: true
11782 };
11783
11784 var KNOWN_STATICS = {
11785 name: true,
11786 length: true,
11787 prototype: true,
11788 caller: true,
11789 callee: true,
11790 arguments: true,
11791 arity: true
11792 };
11793
11794 var TYPE_STATICS = (_TYPE_STATICS = {}, _TYPE_STATICS[react_is__WEBPACK_IMPORTED_MODULE_4__.ForwardRef] = {
11795 $$typeof: true,
11796 render: true
11797 }, _TYPE_STATICS);
11798
11799 var defineProperty$1 = Object.defineProperty,
11800 getOwnPropertyNames = Object.getOwnPropertyNames,
11801 _Object$getOwnPropert = Object.getOwnPropertySymbols,
11802 getOwnPropertySymbols = _Object$getOwnPropert === undefined ? function () {
11803 return [];
11804 } : _Object$getOwnPropert,
11805 getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor,
11806 getPrototypeOf = Object.getPrototypeOf,
11807 objectPrototype = Object.prototype;
11808 var arrayPrototype = Array.prototype;
11809
11810
11811 function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
11812 if (typeof sourceComponent !== 'string') {
11813 // don't hoist over string (html) components
11814
11815 var inheritedComponent = getPrototypeOf(sourceComponent);
11816
11817 if (inheritedComponent && inheritedComponent !== objectPrototype) {
11818 hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
11819 }
11820
11821 var keys = arrayPrototype.concat(getOwnPropertyNames(sourceComponent),
11822 // $FlowFixMe
11823 getOwnPropertySymbols(sourceComponent));
11824
11825 var targetStatics = TYPE_STATICS[targetComponent.$$typeof] || REACT_STATICS;
11826
11827 var sourceStatics = TYPE_STATICS[sourceComponent.$$typeof] || REACT_STATICS;
11828
11829 var i = keys.length;
11830 var descriptor = void 0;
11831 var key = void 0;
11832
11833 // eslint-disable-next-line no-plusplus
11834 while (i--) {
11835 key = keys[i];
11836
11837 if (
11838 // $FlowFixMe
11839 !KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) &&
11840 // $FlowFixMe
11841 !(targetStatics && targetStatics[key])) {
11842 descriptor = getOwnPropertyDescriptor(sourceComponent, key);
11843
11844 if (descriptor) {
11845 try {
11846 // Avoid failures from read-only properties
11847 defineProperty$1(targetComponent, key, descriptor);
11848 } catch (e) {
11849 /* fail silently */
11850 }
11851 }
11852 }
11853 }
11854
11855 return targetComponent;
11856 }
11857
11858 return targetComponent;
11859 }
11860
11861 //
11862 function isDerivedReactComponent(fn) {
11863 return !!(fn && fn.prototype && fn.prototype.isReactComponent);
11864 }
11865
11866 //
11867 // Helper to call a given function, only once
11868 var once = (function (cb) {
11869 var called = false;
11870
11871 return function () {
11872 if (!called) {
11873 called = true;
11874 cb.apply(undefined, arguments);
11875 }
11876 };
11877 });
11878
11879 //
11880
11881 var ThemeContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.createContext)();
11882
11883 var ThemeConsumer = ThemeContext.Consumer;
11884
11885 /**
11886 * Provide a theme to an entire react component tree via context
11887 */
11888
11889 var ThemeProvider = function (_Component) {
11890 inherits(ThemeProvider, _Component);
11891
11892 function ThemeProvider(props) {
11893 classCallCheck(this, ThemeProvider);
11894
11895 var _this = possibleConstructorReturn(this, _Component.call(this, props));
11896
11897 _this.getContext = (0,memoize_one__WEBPACK_IMPORTED_MODULE_7__["default"])(_this.getContext.bind(_this));
11898 _this.renderInner = _this.renderInner.bind(_this);
11899 return _this;
11900 }
11901
11902 ThemeProvider.prototype.render = function render() {
11903 if (!this.props.children) return null;
11904
11905 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
11906 ThemeContext.Consumer,
11907 null,
11908 this.renderInner
11909 );
11910 };
11911
11912 ThemeProvider.prototype.renderInner = function renderInner(outerTheme) {
11913 var context = this.getContext(this.props.theme, outerTheme);
11914
11915 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
11916 ThemeContext.Provider,
11917 { value: context },
11918 this.props.children
11919 );
11920 };
11921
11922 /**
11923 * Get the theme from the props, supporting both (outerTheme) => {}
11924 * as well as object notation
11925 */
11926
11927
11928 ThemeProvider.prototype.getTheme = function getTheme(theme, outerTheme) {
11929 if (isFunction(theme)) {
11930 var mergedTheme = theme(outerTheme);
11931
11932 if ( true && (mergedTheme === null || Array.isArray(mergedTheme) || (typeof mergedTheme === 'undefined' ? 'undefined' : _typeof(mergedTheme)) !== 'object')) {
11933 throw new StyledComponentsError(7);
11934 }
11935
11936 return mergedTheme;
11937 }
11938
11939 if (theme === null || Array.isArray(theme) || (typeof theme === 'undefined' ? 'undefined' : _typeof(theme)) !== 'object') {
11940 throw new StyledComponentsError(8);
11941 }
11942
11943 return _extends({}, outerTheme, theme);
11944 };
11945
11946 ThemeProvider.prototype.getContext = function getContext(theme, outerTheme) {
11947 return this.getTheme(theme, outerTheme);
11948 };
11949
11950 return ThemeProvider;
11951 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
11952
11953 //
11954
11955 var CLOSING_TAG_R = /^\s*<\/[a-z]/i;
11956
11957 var ServerStyleSheet = function () {
11958 function ServerStyleSheet() {
11959 classCallCheck(this, ServerStyleSheet);
11960
11961 /* The master sheet might be reset, so keep a reference here */
11962 this.masterSheet = StyleSheet.master;
11963 this.instance = this.masterSheet.clone();
11964 this.sealed = false;
11965 }
11966
11967 /**
11968 * Mark the ServerStyleSheet as being fully emitted and manually GC it from the
11969 * StyleSheet singleton.
11970 */
11971
11972
11973 ServerStyleSheet.prototype.seal = function seal() {
11974 if (!this.sealed) {
11975 /* Remove sealed StyleSheets from the master sheet */
11976 var index = this.masterSheet.clones.indexOf(this.instance);
11977 this.masterSheet.clones.splice(index, 1);
11978 this.sealed = true;
11979 }
11980 };
11981
11982 ServerStyleSheet.prototype.collectStyles = function collectStyles(children) {
11983 if (this.sealed) {
11984 throw new StyledComponentsError(2);
11985 }
11986
11987 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
11988 StyleSheetManager,
11989 { sheet: this.instance },
11990 children
11991 );
11992 };
11993
11994 ServerStyleSheet.prototype.getStyleTags = function getStyleTags() {
11995 this.seal();
11996 return this.instance.toHTML();
11997 };
11998
11999 ServerStyleSheet.prototype.getStyleElement = function getStyleElement() {
12000 this.seal();
12001 return this.instance.toReactElements();
12002 };
12003
12004 ServerStyleSheet.prototype.interleaveWithNodeStream = function interleaveWithNodeStream(readableStream) {
12005 var _this = this;
12006
12007 {
12008 throw new StyledComponentsError(3);
12009 }
12010
12011 /* the tag index keeps track of which tags have already been emitted */
12012 var instance = this.instance;
12013
12014 var instanceTagIndex = 0;
12015
12016 var streamAttr = SC_STREAM_ATTR + '="true"';
12017
12018 var transformer = new stream.Transform({
12019 transform: function appendStyleChunks(chunk, /* encoding */_, callback) {
12020 var tags = instance.tags;
12021
12022 var html = '';
12023
12024 /* retrieve html for each new style tag */
12025 for (; instanceTagIndex < tags.length; instanceTagIndex += 1) {
12026 var tag = tags[instanceTagIndex];
12027 html += tag.toHTML(streamAttr);
12028 }
12029
12030 /* force our StyleSheets to emit entirely new tags */
12031 instance.sealAllTags();
12032
12033 var renderedHtml = chunk.toString();
12034
12035 /* prepend style html to chunk, unless the start of the chunk is a closing tag in which case append right after that */
12036 if (CLOSING_TAG_R.test(renderedHtml)) {
12037 var endOfClosingTag = renderedHtml.indexOf('>');
12038
12039 this.push(renderedHtml.slice(0, endOfClosingTag + 1) + html + renderedHtml.slice(endOfClosingTag + 1));
12040 } else this.push(html + renderedHtml);
12041
12042 callback();
12043 }
12044 });
12045
12046 readableStream.on('end', function () {
12047 return _this.seal();
12048 });
12049
12050 readableStream.on('error', function (err) {
12051 _this.seal();
12052
12053 // forward the error to the transform stream
12054 transformer.emit('error', err);
12055 });
12056
12057 return readableStream.pipe(transformer);
12058 };
12059
12060 return ServerStyleSheet;
12061 }();
12062
12063 //
12064
12065 var StyleSheetContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.createContext)();
12066 var StyleSheetConsumer = StyleSheetContext.Consumer;
12067
12068 var StyleSheetManager = function (_Component) {
12069 inherits(StyleSheetManager, _Component);
12070
12071 function StyleSheetManager(props) {
12072 classCallCheck(this, StyleSheetManager);
12073
12074 var _this = possibleConstructorReturn(this, _Component.call(this, props));
12075
12076 _this.getContext = (0,memoize_one__WEBPACK_IMPORTED_MODULE_7__["default"])(_this.getContext);
12077 return _this;
12078 }
12079
12080 StyleSheetManager.prototype.getContext = function getContext(sheet, target) {
12081 if (sheet) {
12082 return sheet;
12083 } else if (target) {
12084 return new StyleSheet(target);
12085 } else {
12086 throw new StyledComponentsError(4);
12087 }
12088 };
12089
12090 StyleSheetManager.prototype.render = function render() {
12091 var _props = this.props,
12092 children = _props.children,
12093 sheet = _props.sheet,
12094 target = _props.target;
12095
12096
12097 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12098 StyleSheetContext.Provider,
12099 { value: this.getContext(sheet, target) },
12100 true ? react__WEBPACK_IMPORTED_MODULE_2___default().Children.only(children) : 0
12101 );
12102 };
12103
12104 return StyleSheetManager;
12105 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
12106 true ? StyleSheetManager.propTypes = {
12107 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)]),
12108
12109 target: prop_types__WEBPACK_IMPORTED_MODULE_8___default().shape({
12110 appendChild: (prop_types__WEBPACK_IMPORTED_MODULE_8___default().func.isRequired)
12111 })
12112 } : 0;
12113
12114 //
12115
12116 var identifiers = {};
12117
12118 /* We depend on components having unique IDs */
12119 function generateId(_ComponentStyle, _displayName, parentComponentId) {
12120 var displayName = typeof _displayName !== 'string' ? 'sc' : escape(_displayName);
12121
12122 /**
12123 * This ensures uniqueness if two components happen to share
12124 * the same displayName.
12125 */
12126 var nr = (identifiers[displayName] || 0) + 1;
12127 identifiers[displayName] = nr;
12128
12129 var componentId = displayName + '-' + _ComponentStyle.generateName(displayName + nr);
12130
12131 return parentComponentId ? parentComponentId + '-' + componentId : componentId;
12132 }
12133
12134 // $FlowFixMe
12135
12136 var StyledComponent = function (_Component) {
12137 inherits(StyledComponent, _Component);
12138
12139 function StyledComponent() {
12140 classCallCheck(this, StyledComponent);
12141
12142 var _this = possibleConstructorReturn(this, _Component.call(this));
12143
12144 _this.attrs = {};
12145
12146 _this.renderOuter = _this.renderOuter.bind(_this);
12147 _this.renderInner = _this.renderInner.bind(_this);
12148
12149 if (true) {
12150 _this.warnInnerRef = once(function (displayName) {
12151 return (
12152 // eslint-disable-next-line no-console
12153 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 + '".')
12154 );
12155 });
12156
12157 _this.warnAttrsFnObjectKeyDeprecated = once(function (key, displayName) {
12158 return (
12159 // eslint-disable-next-line no-console
12160 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)
12161 );
12162 });
12163
12164 _this.warnNonStyledComponentAttrsObjectKey = once(function (key, displayName) {
12165 return (
12166 // eslint-disable-next-line no-console
12167 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 }'))
12168 );
12169 });
12170 }
12171 return _this;
12172 }
12173
12174 StyledComponent.prototype.render = function render() {
12175 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12176 StyleSheetConsumer,
12177 null,
12178 this.renderOuter
12179 );
12180 };
12181
12182 StyledComponent.prototype.renderOuter = function renderOuter() {
12183 var styleSheet = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : StyleSheet.master;
12184
12185 this.styleSheet = styleSheet;
12186
12187 // No need to subscribe a static component to theme changes, it won't change anything
12188 if (this.props.forwardedComponent.componentStyle.isStatic) return this.renderInner();
12189
12190 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12191 ThemeConsumer,
12192 null,
12193 this.renderInner
12194 );
12195 };
12196
12197 StyledComponent.prototype.renderInner = function renderInner(theme) {
12198 var _props$forwardedCompo = this.props.forwardedComponent,
12199 componentStyle = _props$forwardedCompo.componentStyle,
12200 defaultProps = _props$forwardedCompo.defaultProps,
12201 displayName = _props$forwardedCompo.displayName,
12202 foldedComponentIds = _props$forwardedCompo.foldedComponentIds,
12203 styledComponentId = _props$forwardedCompo.styledComponentId,
12204 target = _props$forwardedCompo.target;
12205
12206
12207 var generatedClassName = void 0;
12208 if (componentStyle.isStatic) {
12209 generatedClassName = this.generateAndInjectStyles(EMPTY_OBJECT, this.props);
12210 } else {
12211 generatedClassName = this.generateAndInjectStyles(determineTheme(this.props, theme, defaultProps) || EMPTY_OBJECT, this.props);
12212 }
12213
12214 var elementToBeCreated = this.props.as || this.attrs.as || target;
12215 var isTargetTag = isTag(elementToBeCreated);
12216
12217 var propsForElement = {};
12218 var computedProps = _extends({}, this.props, this.attrs);
12219
12220 var key = void 0;
12221 // eslint-disable-next-line guard-for-in
12222 for (key in computedProps) {
12223 if ( true && key === 'innerRef' && isTargetTag) {
12224 this.warnInnerRef(displayName);
12225 }
12226
12227 if (key === 'forwardedComponent' || key === 'as') {
12228 continue;
12229 } 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)) {
12230 // Don't pass through non HTML tags through to HTML elements
12231 propsForElement[key] = computedProps[key];
12232 }
12233 }
12234
12235 if (this.props.style && this.attrs.style) {
12236 propsForElement.style = _extends({}, this.attrs.style, this.props.style);
12237 }
12238
12239 propsForElement.className = Array.prototype.concat(foldedComponentIds, styledComponentId, generatedClassName !== styledComponentId ? generatedClassName : null, this.props.className, this.attrs.className).filter(Boolean).join(' ');
12240
12241 return (0,react__WEBPACK_IMPORTED_MODULE_2__.createElement)(elementToBeCreated, propsForElement);
12242 };
12243
12244 StyledComponent.prototype.buildExecutionContext = function buildExecutionContext(theme, props, attrs) {
12245 var _this2 = this;
12246
12247 var context = _extends({}, props, { theme: theme });
12248
12249 if (!attrs.length) return context;
12250
12251 this.attrs = {};
12252
12253 attrs.forEach(function (attrDef) {
12254 var resolvedAttrDef = attrDef;
12255 var attrDefWasFn = false;
12256 var attr = void 0;
12257 var key = void 0;
12258
12259 if (isFunction(resolvedAttrDef)) {
12260 // $FlowFixMe
12261 resolvedAttrDef = resolvedAttrDef(context);
12262 attrDefWasFn = true;
12263 }
12264
12265 /* eslint-disable guard-for-in */
12266 // $FlowFixMe
12267 for (key in resolvedAttrDef) {
12268 attr = resolvedAttrDef[key];
12269
12270 if (!attrDefWasFn) {
12271 if (isFunction(attr) && !isDerivedReactComponent(attr) && !isStyledComponent(attr)) {
12272 if (true) {
12273 _this2.warnAttrsFnObjectKeyDeprecated(key, props.forwardedComponent.displayName);
12274 }
12275
12276 attr = attr(context);
12277
12278 if ( true && react__WEBPACK_IMPORTED_MODULE_2___default().isValidElement(attr)) {
12279 _this2.warnNonStyledComponentAttrsObjectKey(key, props.forwardedComponent.displayName);
12280 }
12281 }
12282 }
12283
12284 _this2.attrs[key] = attr;
12285 context[key] = attr;
12286 }
12287 /* eslint-enable */
12288 });
12289
12290 return context;
12291 };
12292
12293 StyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) {
12294 var _props$forwardedCompo2 = props.forwardedComponent,
12295 attrs = _props$forwardedCompo2.attrs,
12296 componentStyle = _props$forwardedCompo2.componentStyle,
12297 warnTooManyClasses = _props$forwardedCompo2.warnTooManyClasses;
12298
12299 // statically styled-components don't need to build an execution context object,
12300 // and shouldn't be increasing the number of class names
12301
12302 if (componentStyle.isStatic && !attrs.length) {
12303 return componentStyle.generateAndInjectStyles(EMPTY_OBJECT, this.styleSheet);
12304 }
12305
12306 var className = componentStyle.generateAndInjectStyles(this.buildExecutionContext(theme, props, attrs), this.styleSheet);
12307
12308 if ( true && warnTooManyClasses) warnTooManyClasses(className);
12309
12310 return className;
12311 };
12312
12313 return StyledComponent;
12314 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
12315
12316 function createStyledComponent(target, options, rules) {
12317 var isTargetStyledComp = isStyledComponent(target);
12318 var isClass = !isTag(target);
12319
12320 var _options$displayName = options.displayName,
12321 displayName = _options$displayName === undefined ? generateDisplayName(target) : _options$displayName,
12322 _options$componentId = options.componentId,
12323 componentId = _options$componentId === undefined ? generateId(ComponentStyle, options.displayName, options.parentComponentId) : _options$componentId,
12324 _options$ParentCompon = options.ParentComponent,
12325 ParentComponent = _options$ParentCompon === undefined ? StyledComponent : _options$ParentCompon,
12326 _options$attrs = options.attrs,
12327 attrs = _options$attrs === undefined ? EMPTY_ARRAY : _options$attrs;
12328
12329
12330 var styledComponentId = options.displayName && options.componentId ? escape(options.displayName) + '-' + options.componentId : options.componentId || componentId;
12331
12332 // fold the underlying StyledComponent attrs up (implicit extend)
12333 var finalAttrs =
12334 // $FlowFixMe
12335 isTargetStyledComp && target.attrs ? Array.prototype.concat(target.attrs, attrs).filter(Boolean) : attrs;
12336
12337 var componentStyle = new ComponentStyle(isTargetStyledComp ? // fold the underlying StyledComponent rules up (implicit extend)
12338 // $FlowFixMe
12339 target.componentStyle.rules.concat(rules) : rules, finalAttrs, styledComponentId);
12340
12341 /**
12342 * forwardRef creates a new interim component, which we'll take advantage of
12343 * instead of extending ParentComponent to create _another_ interim class
12344 */
12345 var WrappedStyledComponent = void 0;
12346 var forwardRef = function forwardRef(props, ref) {
12347 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ParentComponent, _extends({}, props, { forwardedComponent: WrappedStyledComponent, forwardedRef: ref }));
12348 };
12349 forwardRef.displayName = displayName;
12350 WrappedStyledComponent = react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(forwardRef);
12351 WrappedStyledComponent.displayName = displayName;
12352
12353 // $FlowFixMe
12354 WrappedStyledComponent.attrs = finalAttrs;
12355 // $FlowFixMe
12356 WrappedStyledComponent.componentStyle = componentStyle;
12357
12358 // $FlowFixMe
12359 WrappedStyledComponent.foldedComponentIds = isTargetStyledComp ? // $FlowFixMe
12360 Array.prototype.concat(target.foldedComponentIds, target.styledComponentId) : EMPTY_ARRAY;
12361
12362 // $FlowFixMe
12363 WrappedStyledComponent.styledComponentId = styledComponentId;
12364
12365 // fold the underlying StyledComponent target up since we folded the styles
12366 // $FlowFixMe
12367 WrappedStyledComponent.target = isTargetStyledComp ? target.target : target;
12368
12369 // $FlowFixMe
12370 WrappedStyledComponent.withComponent = function withComponent(tag) {
12371 var previousComponentId = options.componentId,
12372 optionsToCopy = objectWithoutProperties(options, ['componentId']);
12373
12374
12375 var newComponentId = previousComponentId && previousComponentId + '-' + (isTag(tag) ? tag : escape(getComponentName(tag)));
12376
12377 var newOptions = _extends({}, optionsToCopy, {
12378 attrs: finalAttrs,
12379 componentId: newComponentId,
12380 ParentComponent: ParentComponent
12381 });
12382
12383 return createStyledComponent(tag, newOptions, rules);
12384 };
12385
12386 // $FlowFixMe
12387 Object.defineProperty(WrappedStyledComponent, 'defaultProps', {
12388 get: function get$$1() {
12389 return this._foldedDefaultProps;
12390 },
12391 set: function set$$1(obj) {
12392 // $FlowFixMe
12393 this._foldedDefaultProps = isTargetStyledComp ? (0,merge_anything__WEBPACK_IMPORTED_MODULE_6__["default"])(target.defaultProps, obj) : obj;
12394 }
12395 });
12396
12397 if (true) {
12398 // $FlowFixMe
12399 WrappedStyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName);
12400 }
12401
12402 // $FlowFixMe
12403 WrappedStyledComponent.toString = function () {
12404 return '.' + WrappedStyledComponent.styledComponentId;
12405 };
12406
12407 if (isClass) {
12408 hoistNonReactStatics(WrappedStyledComponent, target, {
12409 // all SC-specific things should not be hoisted
12410 attrs: true,
12411 componentStyle: true,
12412 displayName: true,
12413 foldedComponentIds: true,
12414 styledComponentId: true,
12415 target: true,
12416 withComponent: true
12417 });
12418 }
12419
12420 return WrappedStyledComponent;
12421 }
12422
12423 //
12424 // Thanks to ReactDOMFactories for this handy list!
12425
12426 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',
12427
12428 // SVG
12429 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'marker', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
12430
12431 //
12432
12433 var styled = function styled(tag) {
12434 return constructWithOptions(createStyledComponent, tag);
12435 };
12436
12437 // Shorthands for all valid HTML Elements
12438 domElements.forEach(function (domElement) {
12439 styled[domElement] = styled(domElement);
12440 });
12441
12442 //
12443
12444 var GlobalStyle = function () {
12445 function GlobalStyle(rules, componentId) {
12446 classCallCheck(this, GlobalStyle);
12447
12448 this.rules = rules;
12449 this.componentId = componentId;
12450 this.isStatic = isStaticRules(rules, EMPTY_ARRAY);
12451
12452 if (!StyleSheet.master.hasId(componentId)) {
12453 StyleSheet.master.deferredInject(componentId, []);
12454 }
12455 }
12456
12457 GlobalStyle.prototype.createStyles = function createStyles(executionContext, styleSheet) {
12458 var flatCSS = flatten(this.rules, executionContext, styleSheet);
12459 var css = stringifyRules(flatCSS, '');
12460
12461 styleSheet.inject(this.componentId, css);
12462 };
12463
12464 GlobalStyle.prototype.removeStyles = function removeStyles(styleSheet) {
12465 var componentId = this.componentId;
12466
12467 if (styleSheet.hasId(componentId)) {
12468 styleSheet.remove(componentId);
12469 }
12470 };
12471
12472 // TODO: overwrite in-place instead of remove+create?
12473
12474
12475 GlobalStyle.prototype.renderStyles = function renderStyles(executionContext, styleSheet) {
12476 this.removeStyles(styleSheet);
12477 this.createStyles(executionContext, styleSheet);
12478 };
12479
12480 return GlobalStyle;
12481 }();
12482
12483 //
12484
12485 // place our cache into shared context so it'll persist between HMRs
12486 if (IS_BROWSER) {
12487 window.scCGSHMRCache = {};
12488 }
12489
12490 function createGlobalStyle(strings) {
12491 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12492 interpolations[_key - 1] = arguments[_key];
12493 }
12494
12495 var rules = css.apply(undefined, [strings].concat(interpolations));
12496 var id = 'sc-global-' + murmurhash(JSON.stringify(rules));
12497 var style = new GlobalStyle(rules, id);
12498
12499 var GlobalStyleComponent = function (_React$Component) {
12500 inherits(GlobalStyleComponent, _React$Component);
12501
12502 function GlobalStyleComponent(props) {
12503 classCallCheck(this, GlobalStyleComponent);
12504
12505 var _this = possibleConstructorReturn(this, _React$Component.call(this, props));
12506
12507 var _this$constructor = _this.constructor,
12508 globalStyle = _this$constructor.globalStyle,
12509 styledComponentId = _this$constructor.styledComponentId;
12510
12511
12512 if (IS_BROWSER) {
12513 window.scCGSHMRCache[styledComponentId] = (window.scCGSHMRCache[styledComponentId] || 0) + 1;
12514 }
12515
12516 /**
12517 * This fixes HMR compatibility. Don't ask me why, but this combination of
12518 * caching the closure variables via statics and then persisting the statics in
12519 * state works across HMR where no other combination did. ¯\_(ツ)_/¯
12520 */
12521 _this.state = {
12522 globalStyle: globalStyle,
12523 styledComponentId: styledComponentId
12524 };
12525 return _this;
12526 }
12527
12528 GlobalStyleComponent.prototype.componentWillUnmount = function componentWillUnmount() {
12529 if (window.scCGSHMRCache[this.state.styledComponentId]) {
12530 window.scCGSHMRCache[this.state.styledComponentId] -= 1;
12531 }
12532 /**
12533 * Depending on the order "render" is called this can cause the styles to be lost
12534 * until the next render pass of the remaining instance, which may
12535 * not be immediate.
12536 */
12537 if (window.scCGSHMRCache[this.state.styledComponentId] === 0) {
12538 this.state.globalStyle.removeStyles(this.styleSheet);
12539 }
12540 };
12541
12542 GlobalStyleComponent.prototype.render = function render() {
12543 var _this2 = this;
12544
12545 if ( true && react__WEBPACK_IMPORTED_MODULE_2___default().Children.count(this.props.children)) {
12546 // eslint-disable-next-line no-console
12547 console.warn('The global style component ' + this.state.styledComponentId + ' was given child JSX. createGlobalStyle does not render children.');
12548 }
12549
12550 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12551 StyleSheetConsumer,
12552 null,
12553 function (styleSheet) {
12554 _this2.styleSheet = styleSheet || StyleSheet.master;
12555
12556 var globalStyle = _this2.state.globalStyle;
12557
12558
12559 if (globalStyle.isStatic) {
12560 globalStyle.renderStyles(STATIC_EXECUTION_CONTEXT, _this2.styleSheet);
12561
12562 return null;
12563 } else {
12564 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12565 ThemeConsumer,
12566 null,
12567 function (theme) {
12568 // $FlowFixMe
12569 var defaultProps = _this2.constructor.defaultProps;
12570
12571
12572 var context = _extends({}, _this2.props);
12573
12574 if (typeof theme !== 'undefined') {
12575 context.theme = determineTheme(_this2.props, theme, defaultProps);
12576 }
12577
12578 globalStyle.renderStyles(context, _this2.styleSheet);
12579
12580 return null;
12581 }
12582 );
12583 }
12584 }
12585 );
12586 };
12587
12588 return GlobalStyleComponent;
12589 }((react__WEBPACK_IMPORTED_MODULE_2___default().Component));
12590
12591 GlobalStyleComponent.globalStyle = style;
12592 GlobalStyleComponent.styledComponentId = id;
12593
12594
12595 return GlobalStyleComponent;
12596 }
12597
12598 //
12599
12600 var replaceWhitespace = function replaceWhitespace(str) {
12601 return str.replace(/\s|\\n/g, '');
12602 };
12603
12604 function keyframes(strings) {
12605 /* Warning if you've used keyframes on React Native */
12606 if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
12607 // eslint-disable-next-line no-console
12608 console.warn('`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.');
12609 }
12610
12611 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12612 interpolations[_key - 1] = arguments[_key];
12613 }
12614
12615 var rules = css.apply(undefined, [strings].concat(interpolations));
12616
12617 var name = generateAlphabeticName(murmurhash(replaceWhitespace(JSON.stringify(rules))));
12618
12619 return new Keyframes(name, stringifyRules(rules, name, '@keyframes'));
12620 }
12621
12622 //
12623
12624 var withTheme = (function (Component$$1) {
12625 var WithTheme = react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(function (props, ref) {
12626 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12627 ThemeConsumer,
12628 null,
12629 function (theme) {
12630 // $FlowFixMe
12631 var defaultProps = Component$$1.defaultProps;
12632
12633 var themeProp = determineTheme(props, theme, defaultProps);
12634
12635 if ( true && themeProp === undefined) {
12636 // eslint-disable-next-line no-console
12637 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) + '"');
12638 }
12639
12640 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(Component$$1, _extends({}, props, { theme: themeProp, ref: ref }));
12641 }
12642 );
12643 });
12644
12645 hoistNonReactStatics(WithTheme, Component$$1);
12646
12647 WithTheme.displayName = 'WithTheme(' + getComponentName(Component$$1) + ')';
12648
12649 return WithTheme;
12650 });
12651
12652 //
12653
12654 /* eslint-disable */
12655 var __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS = {
12656 StyleSheet: StyleSheet
12657 };
12658
12659 //
12660
12661 /* Warning if you've imported this file on React Native */
12662 if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
12663 // eslint-disable-next-line no-console
12664 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');
12665 }
12666
12667 /* Warning if there are several instances of styled-components */
12668 if ( true && typeof window !== 'undefined' && typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Node.js') === -1 && navigator.userAgent.indexOf('jsdom') === -1) {
12669 window['__styled-components-init__'] = window['__styled-components-init__'] || 0;
12670
12671 if (window['__styled-components-init__'] === 1) {
12672 // eslint-disable-next-line no-console
12673 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.');
12674 }
12675
12676 window['__styled-components-init__'] += 1;
12677 }
12678
12679 //
12680
12681 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (styled);
12682
12683 //# sourceMappingURL=styled-components.browser.esm.js.map
12684
12685
12686 /***/ }),
12687
12688 /***/ "./node_modules/stylis-rule-sheet/index.js":
12689 /*!*************************************************!*\
12690 !*** ./node_modules/stylis-rule-sheet/index.js ***!
12691 \*************************************************/
12692 /***/ ((module) => {
12693
12694 (function (factory) {
12695 true ? (module['exports'] = factory()) :
12696 0
12697 }(function () {
12698
12699 'use strict'
12700
12701 return function (insertRule) {
12702 var delimiter = '/*|*/'
12703 var needle = delimiter+'}'
12704
12705 function toSheet (block) {
12706 if (block)
12707 try {
12708 insertRule(block + '}')
12709 } catch (e) {}
12710 }
12711
12712 return function ruleSheet (context, content, selectors, parents, line, column, length, ns, depth, at) {
12713 switch (context) {
12714 // property
12715 case 1:
12716 // @import
12717 if (depth === 0 && content.charCodeAt(0) === 64)
12718 return insertRule(content+';'), ''
12719 break
12720 // selector
12721 case 2:
12722 if (ns === 0)
12723 return content + delimiter
12724 break
12725 // at-rule
12726 case 3:
12727 switch (ns) {
12728 // @font-face, @page
12729 case 102:
12730 case 112:
12731 return insertRule(selectors[0]+content), ''
12732 default:
12733 return content + (at === 0 ? delimiter : '')
12734 }
12735 case -2:
12736 content.split(needle).forEach(toSheet)
12737 }
12738 }
12739 }
12740 }))
12741
12742
12743 /***/ }),
12744
12745 /***/ "./node_modules/stylis/stylis.min.js":
12746 /*!*******************************************!*\
12747 !*** ./node_modules/stylis/stylis.min.js ***!
12748 \*******************************************/
12749 /***/ ((module) => {
12750
12751 !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});
12752 //# sourceMappingURL=stylis.min.js.map
12753
12754 /***/ }),
12755
12756 /***/ "react":
12757 /*!************************!*\
12758 !*** external "React" ***!
12759 \************************/
12760 /***/ ((module) => {
12761
12762 "use strict";
12763 module.exports = window["React"];
12764
12765 /***/ }),
12766
12767 /***/ "jquery":
12768 /*!*************************!*\
12769 !*** external "jQuery" ***!
12770 \*************************/
12771 /***/ ((module) => {
12772
12773 "use strict";
12774 module.exports = window["jQuery"];
12775
12776 /***/ }),
12777
12778 /***/ "@wordpress/blocks":
12779 /*!********************************!*\
12780 !*** external ["wp","blocks"] ***!
12781 \********************************/
12782 /***/ ((module) => {
12783
12784 "use strict";
12785 module.exports = window["wp"]["blocks"];
12786
12787 /***/ }),
12788
12789 /***/ "@wordpress/components":
12790 /*!************************************!*\
12791 !*** external ["wp","components"] ***!
12792 \************************************/
12793 /***/ ((module) => {
12794
12795 "use strict";
12796 module.exports = window["wp"]["components"];
12797
12798 /***/ }),
12799
12800 /***/ "@wordpress/data":
12801 /*!******************************!*\
12802 !*** external ["wp","data"] ***!
12803 \******************************/
12804 /***/ ((module) => {
12805
12806 "use strict";
12807 module.exports = window["wp"]["data"];
12808
12809 /***/ }),
12810
12811 /***/ "@wordpress/edit-post":
12812 /*!**********************************!*\
12813 !*** external ["wp","editPost"] ***!
12814 \**********************************/
12815 /***/ ((module) => {
12816
12817 "use strict";
12818 module.exports = window["wp"]["editPost"];
12819
12820 /***/ }),
12821
12822 /***/ "@wordpress/element":
12823 /*!*********************************!*\
12824 !*** external ["wp","element"] ***!
12825 \*********************************/
12826 /***/ ((module) => {
12827
12828 "use strict";
12829 module.exports = window["wp"]["element"];
12830
12831 /***/ }),
12832
12833 /***/ "@wordpress/i18n":
12834 /*!******************************!*\
12835 !*** external ["wp","i18n"] ***!
12836 \******************************/
12837 /***/ ((module) => {
12838
12839 "use strict";
12840 module.exports = window["wp"]["i18n"];
12841
12842 /***/ }),
12843
12844 /***/ "@wordpress/plugins":
12845 /*!*********************************!*\
12846 !*** external ["wp","plugins"] ***!
12847 \*********************************/
12848 /***/ ((module) => {
12849
12850 "use strict";
12851 module.exports = window["wp"]["plugins"];
12852
12853 /***/ }),
12854
12855 /***/ "./node_modules/@linaria/react/dist/index.mjs":
12856 /*!****************************************************!*\
12857 !*** ./node_modules/@linaria/react/dist/index.mjs ***!
12858 \****************************************************/
12859 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12860
12861 "use strict";
12862 __webpack_require__.r(__webpack_exports__);
12863 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12864 /* harmony export */ "styled": () => (/* binding */ styled_default)
12865 /* harmony export */ });
12866 /* 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");
12867 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
12868 /* harmony import */ var _linaria_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @linaria/core */ "./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs");
12869 // src/styled.ts
12870
12871
12872
12873 var isCapital = (ch) => ch.toUpperCase() === ch;
12874 var filterKey = (keys) => (key) => keys.indexOf(key) === -1;
12875 var omit = (obj, keys) => {
12876 const res = {};
12877 Object.keys(obj).filter(filterKey(keys)).forEach((key) => {
12878 res[key] = obj[key];
12879 });
12880 return res;
12881 };
12882 function filterProps(asIs, props, omitKeys) {
12883 const filteredProps = omit(props, omitKeys);
12884 if (!asIs) {
12885 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"];
12886 Object.keys(filteredProps).forEach((key) => {
12887 if (!interopValidAttr.default(key)) {
12888 delete filteredProps[key];
12889 }
12890 });
12891 }
12892 return filteredProps;
12893 }
12894 var warnIfInvalid = (value, componentName) => {
12895 if (true) {
12896 if (typeof value === "string" || typeof value === "number" && isFinite(value)) {
12897 return;
12898 }
12899 const stringified = typeof value === "object" ? JSON.stringify(value) : String(value);
12900 console.warn(
12901 `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.`
12902 );
12903 }
12904 };
12905 function styled(tag) {
12906 return (options) => {
12907 if (true) {
12908 if (Array.isArray(options)) {
12909 throw new Error(
12910 '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'
12911 );
12912 }
12913 }
12914 const render = (props, ref) => {
12915 const { as: component = tag, class: className } = props;
12916 const shouldKeepProps = options.propsAsIs === void 0 ? !(typeof component === "string" && component.indexOf("-") === -1 && !isCapital(component[0])) : options.propsAsIs;
12917 const filteredProps = filterProps(shouldKeepProps, props, [
12918 "as",
12919 "class"
12920 ]);
12921 filteredProps.ref = ref;
12922 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);
12923 const { vars } = options;
12924 if (vars) {
12925 const style = {};
12926 for (const name in vars) {
12927 const variable = vars[name];
12928 const result = variable[0];
12929 const unit = variable[1] || "";
12930 const value = typeof result === "function" ? result(props) : result;
12931 warnIfInvalid(value, options.name);
12932 style[`--${name}`] = `${value}${unit}`;
12933 }
12934 const ownStyle = filteredProps.style || {};
12935 const keys = Object.keys(ownStyle);
12936 if (keys.length > 0) {
12937 keys.forEach((key) => {
12938 style[key] = ownStyle[key];
12939 });
12940 }
12941 filteredProps.style = style;
12942 }
12943 if (tag.__linaria && tag !== component) {
12944 filteredProps.as = component;
12945 return react__WEBPACK_IMPORTED_MODULE_1__.createElement(tag, filteredProps);
12946 }
12947 return react__WEBPACK_IMPORTED_MODULE_1__.createElement(component, filteredProps);
12948 };
12949 const Result = react__WEBPACK_IMPORTED_MODULE_1__.forwardRef ? react__WEBPACK_IMPORTED_MODULE_1__.forwardRef(render) : (props) => {
12950 const rest = omit(props, ["innerRef"]);
12951 return render(rest, props.innerRef);
12952 };
12953 Result.displayName = options.name;
12954 Result.__linaria = {
12955 className: options.class,
12956 extends: tag
12957 };
12958 return Result;
12959 };
12960 }
12961 var styled_default = true ? new Proxy(styled, {
12962 get(o, prop) {
12963 return o(prop);
12964 }
12965 }) : 0;
12966
12967 //# sourceMappingURL=index.mjs.map
12968
12969 /***/ }),
12970
12971 /***/ "./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs":
12972 /*!*******************************************************************************!*\
12973 !*** ./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs ***!
12974 \*******************************************************************************/
12975 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12976
12977 "use strict";
12978 __webpack_require__.r(__webpack_exports__);
12979 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12980 /* harmony export */ "css": () => (/* binding */ css_default),
12981 /* harmony export */ "cx": () => (/* binding */ cx_default)
12982 /* harmony export */ });
12983 // src/css.ts
12984 var css = () => {
12985 throw new Error(
12986 'Using the "css" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly.'
12987 );
12988 };
12989 var css_default = css;
12990
12991 // src/cx.ts
12992 var cx = function cx2() {
12993 const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
12994 const atomicClasses = {};
12995 const nonAtomicClasses = [];
12996 presentClassNames.forEach((arg) => {
12997 const individualClassNames = arg ? arg.split(" ") : [];
12998 individualClassNames.forEach((className) => {
12999 if (className.startsWith("atm_")) {
13000 const [, keyHash] = className.split("_");
13001 atomicClasses[keyHash] = className;
13002 } else {
13003 nonAtomicClasses.push(className);
13004 }
13005 });
13006 });
13007 const result = [];
13008 for (const keyHash in atomicClasses) {
13009 if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
13010 result.push(atomicClasses[keyHash]);
13011 }
13012 }
13013 result.push(...nonAtomicClasses);
13014 return result.join(" ");
13015 };
13016 var cx_default = cx;
13017
13018 //# sourceMappingURL=index.mjs.map
13019
13020 /***/ })
13021
13022 /******/ });
13023 /************************************************************************/
13024 /******/ // The module cache
13025 /******/ var __webpack_module_cache__ = {};
13026 /******/
13027 /******/ // The require function
13028 /******/ function __webpack_require__(moduleId) {
13029 /******/ // Check if module is in cache
13030 /******/ var cachedModule = __webpack_module_cache__[moduleId];
13031 /******/ if (cachedModule !== undefined) {
13032 /******/ return cachedModule.exports;
13033 /******/ }
13034 /******/ // Create a new module (and put it into the cache)
13035 /******/ var module = __webpack_module_cache__[moduleId] = {
13036 /******/ // no module.id needed
13037 /******/ // no module.loaded needed
13038 /******/ exports: {}
13039 /******/ };
13040 /******/
13041 /******/ // Execute the module function
13042 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
13043 /******/
13044 /******/ // Return the exports of the module
13045 /******/ return module.exports;
13046 /******/ }
13047 /******/
13048 /************************************************************************/
13049 /******/ /* webpack/runtime/compat get default export */
13050 /******/ (() => {
13051 /******/ // getDefaultExport function for compatibility with non-harmony modules
13052 /******/ __webpack_require__.n = (module) => {
13053 /******/ var getter = module && module.__esModule ?
13054 /******/ () => (module['default']) :
13055 /******/ () => (module);
13056 /******/ __webpack_require__.d(getter, { a: getter });
13057 /******/ return getter;
13058 /******/ };
13059 /******/ })();
13060 /******/
13061 /******/ /* webpack/runtime/define property getters */
13062 /******/ (() => {
13063 /******/ // define getter functions for harmony exports
13064 /******/ __webpack_require__.d = (exports, definition) => {
13065 /******/ for(var key in definition) {
13066 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
13067 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
13068 /******/ }
13069 /******/ }
13070 /******/ };
13071 /******/ })();
13072 /******/
13073 /******/ /* webpack/runtime/global */
13074 /******/ (() => {
13075 /******/ __webpack_require__.g = (function() {
13076 /******/ if (typeof globalThis === 'object') return globalThis;
13077 /******/ try {
13078 /******/ return this || new Function('return this')();
13079 /******/ } catch (e) {
13080 /******/ if (typeof window === 'object') return window;
13081 /******/ }
13082 /******/ })();
13083 /******/ })();
13084 /******/
13085 /******/ /* webpack/runtime/hasOwnProperty shorthand */
13086 /******/ (() => {
13087 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
13088 /******/ })();
13089 /******/
13090 /******/ /* webpack/runtime/make namespace object */
13091 /******/ (() => {
13092 /******/ // define __esModule on exports
13093 /******/ __webpack_require__.r = (exports) => {
13094 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
13095 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
13096 /******/ }
13097 /******/ Object.defineProperty(exports, '__esModule', { value: true });
13098 /******/ };
13099 /******/ })();
13100 /******/
13101 /******/ /* webpack/runtime/nonce */
13102 /******/ (() => {
13103 /******/ __webpack_require__.nc = undefined;
13104 /******/ })();
13105 /******/
13106 /************************************************************************/
13107 var __webpack_exports__ = {};
13108 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
13109 (() => {
13110 "use strict";
13111 /*!**************************************!*\
13112 !*** ./scripts/entries/gutenberg.ts ***!
13113 \**************************************/
13114 __webpack_require__.r(__webpack_exports__);
13115 /* harmony import */ var _gutenberg_FormBlock_registerFormBlock__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../gutenberg/FormBlock/registerFormBlock */ "./scripts/gutenberg/FormBlock/registerFormBlock.tsx");
13116 /* harmony import */ var _gutenberg_Sidebar_contentType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../gutenberg/Sidebar/contentType */ "./scripts/gutenberg/Sidebar/contentType.tsx");
13117 /* harmony import */ var _gutenberg_MeetingsBlock_registerMeetingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../gutenberg/MeetingsBlock/registerMeetingBlock */ "./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx");
13118 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
13119
13120
13121
13122
13123 (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]);
13124 })();
13125
13126 /******/ })()
13127 ;
13128 //# sourceMappingURL=gutenberg.js.map