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

13,116 lines 499.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /******/ (() => { // webpackBootstrap
2 /******/ var __webpack_modules__ = ({
3
4 /***/ "./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js":
5 /*!*******************************************************************************!*\
6 !*** ./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js ***!
7 \*******************************************************************************/
8 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9
10 "use strict";
11 __webpack_require__.r(__webpack_exports__);
12 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
14 /* harmony export */ });
15 /* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ "./node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize/dist/memoize.browser.esm.js");
16
17
18 var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
19
20 var index = (0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prop) {
21 return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
22 /* o */
23 && prop.charCodeAt(1) === 110
24 /* n */
25 && prop.charCodeAt(2) < 91;
26 }
27 /* Z+1 */
28 );
29
30 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (index);
31
32
33 /***/ }),
34
35 /***/ "./node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize/dist/memoize.browser.esm.js":
36 /*!*******************************************************************************************************!*\
37 !*** ./node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize/dist/memoize.browser.esm.js ***!
38 \*******************************************************************************************************/
39 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
40
41 "use strict";
42 __webpack_require__.r(__webpack_exports__);
43 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
44 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
45 /* harmony export */ });
46 function memoize(fn) {
47 var cache = {};
48 return function (arg) {
49 if (cache[arg] === undefined) cache[arg] = fn(arg);
50 return cache[arg];
51 };
52 }
53
54 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoize);
55
56
57 /***/ }),
58
59 /***/ "./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js":
60 /*!*******************************************************************!*\
61 !*** ./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js ***!
62 \*******************************************************************/
63 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
64
65 "use strict";
66 __webpack_require__.r(__webpack_exports__);
67 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
68 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
69 /* harmony export */ });
70 function memoize(fn) {
71 var cache = Object.create(null);
72 return function (arg) {
73 if (cache[arg] === undefined) cache[arg] = fn(arg);
74 return cache[arg];
75 };
76 }
77
78 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoize);
79
80
81 /***/ }),
82
83 /***/ "./node_modules/@emotion/unitless/dist/unitless.browser.esm.js":
84 /*!*********************************************************************!*\
85 !*** ./node_modules/@emotion/unitless/dist/unitless.browser.esm.js ***!
86 \*********************************************************************/
87 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
88
89 "use strict";
90 __webpack_require__.r(__webpack_exports__);
91 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
92 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
93 /* harmony export */ });
94 var unitlessKeys = {
95 animationIterationCount: 1,
96 borderImageOutset: 1,
97 borderImageSlice: 1,
98 borderImageWidth: 1,
99 boxFlex: 1,
100 boxFlexGroup: 1,
101 boxOrdinalGroup: 1,
102 columnCount: 1,
103 columns: 1,
104 flex: 1,
105 flexGrow: 1,
106 flexPositive: 1,
107 flexShrink: 1,
108 flexNegative: 1,
109 flexOrder: 1,
110 gridRow: 1,
111 gridRowEnd: 1,
112 gridRowSpan: 1,
113 gridRowStart: 1,
114 gridColumn: 1,
115 gridColumnEnd: 1,
116 gridColumnSpan: 1,
117 gridColumnStart: 1,
118 msGridRow: 1,
119 msGridRowSpan: 1,
120 msGridColumn: 1,
121 msGridColumnSpan: 1,
122 fontWeight: 1,
123 lineHeight: 1,
124 opacity: 1,
125 order: 1,
126 orphans: 1,
127 tabSize: 1,
128 widows: 1,
129 zIndex: 1,
130 zoom: 1,
131 WebkitLineClamp: 1,
132 // SVG-related properties
133 fillOpacity: 1,
134 floodOpacity: 1,
135 stopOpacity: 1,
136 strokeDasharray: 1,
137 strokeDashoffset: 1,
138 strokeMiterlimit: 1,
139 strokeOpacity: 1,
140 strokeWidth: 1
141 };
142
143 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (unitlessKeys);
144
145
146 /***/ }),
147
148 /***/ "./node_modules/@linaria/react/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js":
149 /*!***********************************************************************************************************!*\
150 !*** ./node_modules/@linaria/react/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js ***!
151 \***********************************************************************************************************/
152 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
153
154 "use strict";
155 __webpack_require__.r(__webpack_exports__);
156 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
157 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
158 /* harmony export */ });
159 /* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ "./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js");
160
161
162 var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
163
164 var isPropValid = /* #__PURE__ */(0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prop) {
165 return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
166 /* o */
167 && prop.charCodeAt(1) === 110
168 /* n */
169 && prop.charCodeAt(2) < 91;
170 }
171 /* Z+1 */
172 );
173
174 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isPropValid);
175
176
177 /***/ }),
178
179 /***/ "./scripts/constants/defaultFormOptions.ts":
180 /*!*************************************************!*\
181 !*** ./scripts/constants/defaultFormOptions.ts ***!
182 \*************************************************/
183 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
184
185 "use strict";
186 __webpack_require__.r(__webpack_exports__);
187 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
188 /* harmony export */ "DEFAULT_OPTIONS": () => (/* binding */ DEFAULT_OPTIONS),
189 /* harmony export */ "isDefaultForm": () => (/* binding */ isDefaultForm)
190 /* harmony export */ });
191 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
192 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
193
194 var REGISTRATION_FORM = 'REGISTRATION_FORM';
195 var CONTACT_US_FORM = 'CONTACT_US_FORM';
196 var NEWSLETTER_FORM = 'NEWSLETTER_FORM';
197 var SUPPORT_FORM = 'SUPPORT_FORM';
198 var EVENT_FORM = 'EVENT_FORM';
199 var DEFAULT_OPTIONS = {
200 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Templates', 'leadin'),
201 options: [{
202 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Registration Form', 'leadin'),
203 value: REGISTRATION_FORM
204 }, {
205 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Contact us Form', 'leadin'),
206 value: CONTACT_US_FORM
207 }, {
208 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Newsletter sign-up Form', 'leadin'),
209 value: NEWSLETTER_FORM
210 }, {
211 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Support Form', 'leadin'),
212 value: SUPPORT_FORM
213 }, {
214 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Event Registration Form', 'leadin'),
215 value: EVENT_FORM
216 }]
217 };
218 function isDefaultForm(value) {
219 return value === REGISTRATION_FORM || value === CONTACT_US_FORM || value === NEWSLETTER_FORM || value === SUPPORT_FORM || value === EVENT_FORM;
220 }
221
222 /***/ }),
223
224 /***/ "./scripts/constants/leadinConfig.ts":
225 /*!*******************************************!*\
226 !*** ./scripts/constants/leadinConfig.ts ***!
227 \*******************************************/
228 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
229
230 "use strict";
231 __webpack_require__.r(__webpack_exports__);
232 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
233 /* harmony export */ "accountName": () => (/* binding */ accountName),
234 /* harmony export */ "activationTime": () => (/* binding */ activationTime),
235 /* harmony export */ "adminUrl": () => (/* binding */ adminUrl),
236 /* harmony export */ "connectionStatus": () => (/* binding */ connectionStatus),
237 /* harmony export */ "contentEmbed": () => (/* binding */ contentEmbed),
238 /* harmony export */ "deviceId": () => (/* binding */ deviceId),
239 /* harmony export */ "didDisconnect": () => (/* binding */ didDisconnect),
240 /* harmony export */ "env": () => (/* binding */ env),
241 /* harmony export */ "formsScript": () => (/* binding */ formsScript),
242 /* harmony export */ "formsScriptPayload": () => (/* binding */ formsScriptPayload),
243 /* harmony export */ "hublet": () => (/* binding */ hublet),
244 /* harmony export */ "hubspotBaseUrl": () => (/* binding */ hubspotBaseUrl),
245 /* harmony export */ "hubspotNonce": () => (/* binding */ hubspotNonce),
246 /* harmony export */ "iframeUrl": () => (/* binding */ iframeUrl),
247 /* harmony export */ "impactLink": () => (/* binding */ impactLink),
248 /* harmony export */ "leadinPluginVersion": () => (/* binding */ leadinPluginVersion),
249 /* harmony export */ "leadinQueryParams": () => (/* binding */ leadinQueryParams),
250 /* harmony export */ "locale": () => (/* binding */ locale),
251 /* harmony export */ "loginUrl": () => (/* binding */ loginUrl),
252 /* harmony export */ "meetingsScript": () => (/* binding */ meetingsScript),
253 /* harmony export */ "phpVersion": () => (/* binding */ phpVersion),
254 /* harmony export */ "pluginPath": () => (/* binding */ pluginPath),
255 /* harmony export */ "plugins": () => (/* binding */ plugins),
256 /* harmony export */ "portalDomain": () => (/* binding */ portalDomain),
257 /* harmony export */ "portalEmail": () => (/* binding */ portalEmail),
258 /* harmony export */ "portalId": () => (/* binding */ portalId),
259 /* harmony export */ "redirectNonce": () => (/* binding */ redirectNonce),
260 /* harmony export */ "refreshToken": () => (/* binding */ refreshToken),
261 /* harmony export */ "requiresContentEmbedScope": () => (/* binding */ requiresContentEmbedScope),
262 /* harmony export */ "restNonce": () => (/* binding */ restNonce),
263 /* harmony export */ "restUrl": () => (/* binding */ restUrl),
264 /* harmony export */ "reviewSkippedDate": () => (/* binding */ reviewSkippedDate),
265 /* harmony export */ "theme": () => (/* binding */ theme),
266 /* harmony export */ "trackConsent": () => (/* binding */ trackConsent),
267 /* harmony export */ "wpVersion": () => (/* binding */ wpVersion)
268 /* harmony export */ });
269 var _window$leadinConfig = window.leadinConfig,
270 accountName = _window$leadinConfig.accountName,
271 adminUrl = _window$leadinConfig.adminUrl,
272 activationTime = _window$leadinConfig.activationTime,
273 connectionStatus = _window$leadinConfig.connectionStatus,
274 deviceId = _window$leadinConfig.deviceId,
275 didDisconnect = _window$leadinConfig.didDisconnect,
276 env = _window$leadinConfig.env,
277 formsScript = _window$leadinConfig.formsScript,
278 meetingsScript = _window$leadinConfig.meetingsScript,
279 formsScriptPayload = _window$leadinConfig.formsScriptPayload,
280 hublet = _window$leadinConfig.hublet,
281 hubspotBaseUrl = _window$leadinConfig.hubspotBaseUrl,
282 hubspotNonce = _window$leadinConfig.hubspotNonce,
283 iframeUrl = _window$leadinConfig.iframeUrl,
284 impactLink = _window$leadinConfig.impactLink,
285 leadinPluginVersion = _window$leadinConfig.leadinPluginVersion,
286 leadinQueryParams = _window$leadinConfig.leadinQueryParams,
287 locale = _window$leadinConfig.locale,
288 loginUrl = _window$leadinConfig.loginUrl,
289 phpVersion = _window$leadinConfig.phpVersion,
290 pluginPath = _window$leadinConfig.pluginPath,
291 plugins = _window$leadinConfig.plugins,
292 portalDomain = _window$leadinConfig.portalDomain,
293 portalEmail = _window$leadinConfig.portalEmail,
294 portalId = _window$leadinConfig.portalId,
295 redirectNonce = _window$leadinConfig.redirectNonce,
296 restNonce = _window$leadinConfig.restNonce,
297 restUrl = _window$leadinConfig.restUrl,
298 refreshToken = _window$leadinConfig.refreshToken,
299 reviewSkippedDate = _window$leadinConfig.reviewSkippedDate,
300 theme = _window$leadinConfig.theme,
301 trackConsent = _window$leadinConfig.trackConsent,
302 wpVersion = _window$leadinConfig.wpVersion,
303 contentEmbed = _window$leadinConfig.contentEmbed,
304 requiresContentEmbedScope = _window$leadinConfig.requiresContentEmbedScope;
305
306
307 /***/ }),
308
309 /***/ "./scripts/gutenberg/Common/CalendarIcon.tsx":
310 /*!***************************************************!*\
311 !*** ./scripts/gutenberg/Common/CalendarIcon.tsx ***!
312 \***************************************************/
313 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
314
315 "use strict";
316 __webpack_require__.r(__webpack_exports__);
317 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
318 /* harmony export */ "default": () => (/* binding */ CalendarIcon)
319 /* harmony export */ });
320 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
321
322 function CalendarIcon() {
323 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
324 width: "18",
325 height: "18",
326 viewBox: "0 0 18 18",
327 fill: "none",
328 xmlns: "http://www.w3.org/2000/svg",
329 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
330 clipPath: "url(#clip0_903_1965)",
331 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
332 fillRule: "evenodd",
333 clipRule: "evenodd",
334 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",
335 fill: "#FF7A59"
336 })
337 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("defs", {
338 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("clipPath", {
339 id: "clip0_903_1965",
340 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("rect", {
341 width: "18",
342 height: "18",
343 fill: "white"
344 })
345 })
346 })]
347 });
348 }
349
350 /***/ }),
351
352 /***/ "./scripts/gutenberg/Common/SidebarSprocketIcon.tsx":
353 /*!**********************************************************!*\
354 !*** ./scripts/gutenberg/Common/SidebarSprocketIcon.tsx ***!
355 \**********************************************************/
356 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
357
358 "use strict";
359 __webpack_require__.r(__webpack_exports__);
360 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
361 /* harmony export */ "default": () => (/* binding */ SidebarSprocketIcon)
362 /* harmony export */ });
363 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
364
365 function SidebarSprocketIcon() {
366 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", {
367 width: "20px",
368 height: "20px",
369 version: "1.1",
370 viewBox: "0 0 40 42",
371 xmlns: "http://www.w3.org/2000/svg",
372 xmlnsXlink: "http://www.w3.org/1999/xlink",
373 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
374 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",
375 id: "Fill-1",
376 fillRule: "evenodd"
377 })
378 });
379 }
380
381 /***/ }),
382
383 /***/ "./scripts/gutenberg/Common/SprocketIcon.tsx":
384 /*!***************************************************!*\
385 !*** ./scripts/gutenberg/Common/SprocketIcon.tsx ***!
386 \***************************************************/
387 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
388
389 "use strict";
390 __webpack_require__.r(__webpack_exports__);
391 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
392 /* harmony export */ "default": () => (/* binding */ SprocketIcon)
393 /* harmony export */ });
394 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
395
396 function SprocketIcon() {
397 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
398 width: "40px",
399 height: "42px",
400 viewBox: "0 0 40 42",
401 version: "1.1",
402 xmlns: "http://www.w3.org/2000/svg",
403 xmlnsXlink: "http://www.w3.org/1999/xlink",
404 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("defs", {
405 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("polygon", {
406 id: "path-1",
407 points: "0.000123751494 0 39.7808917 0 39.7808917 41.6871084 0.000123751494 41.6871084"
408 })
409 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
410 id: "Page-1",
411 stroke: "none",
412 strokeWidth: "1",
413 fill: "none",
414 fillRule: "evenodd",
415 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("g", {
416 id: "HubSpot-Sprocket---Full-Color",
417 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("mask", {
418 id: "mask-2",
419 fill: "white",
420 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("use", {
421 xlinkHref: "#path-1"
422 })
423 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
424 id: "path-1"
425 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
426 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",
427 id: "Fill-1",
428 fill: "#F3785B",
429 fillRule: "nonzero",
430 mask: "url(#mask-2)"
431 })]
432 })
433 })]
434 });
435 }
436
437 /***/ }),
438
439 /***/ "./scripts/gutenberg/FormBlock/FormBlockSave.tsx":
440 /*!*******************************************************!*\
441 !*** ./scripts/gutenberg/FormBlock/FormBlockSave.tsx ***!
442 \*******************************************************/
443 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
444
445 "use strict";
446 __webpack_require__.r(__webpack_exports__);
447 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
448 /* harmony export */ "default": () => (/* binding */ FormSaveBlock)
449 /* harmony export */ });
450 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
451 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
452 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
453
454
455 function FormSaveBlock(_ref) {
456 var attributes = _ref.attributes;
457 var portalId = attributes.portalId,
458 formId = attributes.formId;
459
460 if (portalId && formId) {
461 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, {
462 className: "wp-block-leadin-hubspot-form-block",
463 children: "[hubspot portal=\"".concat(portalId, "\" id=\"").concat(formId, "\" type=\"form\"]")
464 });
465 }
466
467 return null;
468 }
469
470 /***/ }),
471
472 /***/ "./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx":
473 /*!**************************************************************!*\
474 !*** ./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx ***!
475 \**************************************************************/
476 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
477
478 "use strict";
479 __webpack_require__.r(__webpack_exports__);
480 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
481 /* harmony export */ "default": () => (/* binding */ FormGutenbergPreview)
482 /* harmony export */ });
483 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
484 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
485 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
486 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
487 /* harmony import */ var _UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UIImage */ "./scripts/gutenberg/UIComponents/UIImage.ts");
488
489
490
491
492 function FormGutenbergPreview() {
493 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
494 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__["default"], {
495 alt: "Create a new Hubspot Form",
496 src: "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath, "/public/assets/images/hubspot-form.png")
497 })
498 });
499 }
500
501 /***/ }),
502
503 /***/ "./scripts/gutenberg/FormBlock/registerFormBlock.tsx":
504 /*!***********************************************************!*\
505 !*** ./scripts/gutenberg/FormBlock/registerFormBlock.tsx ***!
506 \***********************************************************/
507 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
508
509 "use strict";
510 __webpack_require__.r(__webpack_exports__);
511 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
512 /* harmony export */ "default": () => (/* binding */ registerFormBlock)
513 /* harmony export */ });
514 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
515 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
516 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
517 /* harmony import */ var _Common_SprocketIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/SprocketIcon */ "./scripts/gutenberg/Common/SprocketIcon.tsx");
518 /* harmony import */ var _FormBlockSave__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FormBlockSave */ "./scripts/gutenberg/FormBlock/FormBlockSave.tsx");
519 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
520 /* harmony import */ var _FormGutenbergPreview__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FormGutenbergPreview */ "./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx");
521 /* harmony import */ var _shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../shared/Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
522 /* harmony import */ var _shared_Form_FormEdit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../shared/Form/FormEdit */ "./scripts/shared/Form/FormEdit.tsx");
523 /* harmony import */ var _shared_enums_connectionStatus__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../shared/enums/connectionStatus */ "./scripts/shared/enums/connectionStatus.ts");
524 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
525 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);
526 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
527 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; }
528
529 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; }
530
531 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; }
532
533
534
535
536
537
538
539
540
541
542
543
544 function registerFormBlock() {
545 var editComponent = function editComponent(props) {
546 if (props.attributes.preview) {
547 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormGutenbergPreview__WEBPACK_IMPORTED_MODULE_5__["default"], {});
548 } else if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__.connectionStatus === _shared_enums_connectionStatus__WEBPACK_IMPORTED_MODULE_8__["default"].Connected) {
549 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Form_FormEdit__WEBPACK_IMPORTED_MODULE_7__["default"], _objectSpread(_objectSpread({}, props), {}, {
550 origin: "gutenberg",
551 preview: true
552 }));
553 } else {
554 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_6__["default"], {
555 status: 401
556 });
557 }
558 }; // We do not support the full site editor: https://issues.hubspotcentral.com/browse/WP-1033
559
560
561 if (!_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ || (0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_10__.isFullSiteEditor)()) {
562 return null;
563 }
564
565 _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType('leadin/hubspot-form-block', {
566 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('HubSpot Form', 'leadin'),
567 description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Select and embed a HubSpot form', 'leadin'),
568 icon: _Common_SprocketIcon__WEBPACK_IMPORTED_MODULE_2__["default"],
569 category: 'leadin-blocks',
570 attributes: {
571 portalId: {
572 type: 'string',
573 "default": ''
574 },
575 formId: {
576 type: 'string'
577 },
578 formName: {
579 type: 'string'
580 },
581 preview: {
582 type: 'boolean',
583 "default": false
584 }
585 },
586 example: {
587 attributes: {
588 preview: true
589 }
590 },
591 edit: editComponent,
592 save: function save(props) {
593 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormBlockSave__WEBPACK_IMPORTED_MODULE_3__["default"], _objectSpread({}, props));
594 }
595 });
596 }
597
598 /***/ }),
599
600 /***/ "./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx":
601 /*!*********************************************************************!*\
602 !*** ./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx ***!
603 \*********************************************************************/
604 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
605
606 "use strict";
607 __webpack_require__.r(__webpack_exports__);
608 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
609 /* harmony export */ "default": () => (/* binding */ MeetingGutenbergPreview)
610 /* harmony export */ });
611 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
612 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
613 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
614 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
615 /* harmony import */ var _UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UIImage */ "./scripts/gutenberg/UIComponents/UIImage.ts");
616
617
618
619
620 function MeetingGutenbergPreview() {
621 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
622 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__["default"], {
623 alt: "Create a new Hubspot Meeting",
624 width: "100%",
625 src: "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath, "/public/assets/images/hubspot-meetings.png")
626 })
627 });
628 }
629
630 /***/ }),
631
632 /***/ "./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx":
633 /*!**************************************************************!*\
634 !*** ./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx ***!
635 \**************************************************************/
636 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
637
638 "use strict";
639 __webpack_require__.r(__webpack_exports__);
640 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
641 /* harmony export */ "default": () => (/* binding */ MeetingSaveBlock)
642 /* harmony export */ });
643 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
644 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
645 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
646
647
648 function MeetingSaveBlock(_ref) {
649 var attributes = _ref.attributes;
650 var url = attributes.url;
651
652 if (url) {
653 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, {
654 className: "wp-block-leadin-hubspot-meeting-block",
655 children: "[hubspot url=\"".concat(url, "\" type=\"meeting\"]")
656 });
657 }
658
659 return null;
660 }
661
662 /***/ }),
663
664 /***/ "./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx":
665 /*!******************************************************************!*\
666 !*** ./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx ***!
667 \******************************************************************/
668 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
669
670 "use strict";
671 __webpack_require__.r(__webpack_exports__);
672 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
673 /* harmony export */ "default": () => (/* binding */ registerMeetingBlock)
674 /* harmony export */ });
675 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
676 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
677 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
678 /* harmony import */ var _Common_CalendarIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/CalendarIcon */ "./scripts/gutenberg/Common/CalendarIcon.tsx");
679 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
680 /* harmony import */ var _MeetingGutenbergPreview__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MeetingGutenbergPreview */ "./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx");
681 /* harmony import */ var _MeetingSaveBlock__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./MeetingSaveBlock */ "./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx");
682 /* harmony import */ var _shared_Meeting_MeetingEdit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../shared/Meeting/MeetingEdit */ "./scripts/shared/Meeting/MeetingEdit.tsx");
683 /* harmony import */ var _shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../shared/Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
684 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
685 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__);
686 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
687 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; }
688
689 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; }
690
691 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; }
692
693
694
695
696
697
698
699
700
701
702
703 var ConnectionStatus = {
704 Connected: 'Connected',
705 NotConnected: 'NotConnected'
706 };
707 function registerMeetingBlock() {
708 var editComponent = function editComponent(props) {
709 if (props.attributes.preview) {
710 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingGutenbergPreview__WEBPACK_IMPORTED_MODULE_4__["default"], {});
711 } else if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.connectionStatus === ConnectionStatus.Connected) {
712 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Meeting_MeetingEdit__WEBPACK_IMPORTED_MODULE_6__["default"], _objectSpread(_objectSpread({}, props), {}, {
713 preview: true,
714 origin: "gutenberg"
715 }));
716 } else {
717 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__["default"], {
718 status: 401
719 });
720 }
721 }; // We do not support the full site editor: https://issues.hubspotcentral.com/browse/WP-1033
722
723
724 if (!_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ || (0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_9__.isFullSiteEditor)()) {
725 return null;
726 }
727
728 _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType('leadin/hubspot-meeting-block', {
729 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Hubspot Meetings Scheduler', 'leadin'),
730 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'),
731 icon: _Common_CalendarIcon__WEBPACK_IMPORTED_MODULE_2__["default"],
732 category: 'leadin-blocks',
733 attributes: {
734 url: {
735 type: 'string',
736 "default": ''
737 },
738 preview: {
739 type: 'boolean',
740 "default": false
741 }
742 },
743 example: {
744 attributes: {
745 preview: true
746 }
747 },
748 edit: editComponent,
749 save: function save(props) {
750 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingSaveBlock__WEBPACK_IMPORTED_MODULE_5__["default"], _objectSpread({}, props));
751 }
752 });
753 }
754
755 /***/ }),
756
757 /***/ "./scripts/gutenberg/Sidebar/contentType.tsx":
758 /*!***************************************************!*\
759 !*** ./scripts/gutenberg/Sidebar/contentType.tsx ***!
760 \***************************************************/
761 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
762
763 "use strict";
764 __webpack_require__.r(__webpack_exports__);
765 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
766 /* harmony export */ "registerHubspotSidebar": () => (/* binding */ registerHubspotSidebar)
767 /* harmony export */ });
768 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
769 /* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/plugins */ "@wordpress/plugins");
770 /* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__);
771 /* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/edit-post */ "@wordpress/edit-post");
772 /* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__);
773 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
774 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
775 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
776 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);
777 /* harmony import */ var _UIComponents_UISidebarSelectControl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../UIComponents/UISidebarSelectControl */ "./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx");
778 /* harmony import */ var _Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Common/SidebarSprocketIcon */ "./scripts/gutenberg/Common/SidebarSprocketIcon.tsx");
779 /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js");
780 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
781 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__);
782 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
783 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
784 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
785 var _templateObject;
786
787 function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
788
789
790
791
792
793
794
795
796
797
798
799
800
801 function registerHubspotSidebar() {
802 var ContentTypeLabelStyle = styled_components__WEBPACK_IMPORTED_MODULE_11__["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n white-space: normal;\n text-transform: none;\n "])));
803
804 var ContentTypeLabel = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ContentTypeLabelStyle, {
805 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Select the content type HubSpot Analytics uses to track this page', 'leadin')
806 });
807
808 var LeadinPluginSidebar = function LeadinPluginSidebar(_ref) {
809 var postType = _ref.postType;
810 return postType ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__.PluginSidebar, {
811 name: "leadin",
812 title: "HubSpot",
813 icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Icon, {
814 className: "hs-plugin-sidebar-sprocket",
815 icon: (0,_Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_6__["default"])()
816 }),
817 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, {
818 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('HubSpot Analytics', 'leadin'),
819 initialOpen: true,
820 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_8__.BackgroudAppContext.Provider, {
821 value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_9__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_10__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_9__.refreshToken),
822 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISidebarSelectControl__WEBPACK_IMPORTED_MODULE_5__["default"], {
823 metaKey: "content-type",
824 className: "select-content-type",
825 label: ContentTypeLabel,
826 options: [{
827 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Detect Automatically', 'leadin'),
828 value: ''
829 }, {
830 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Blog Post', 'leadin'),
831 value: 'blog-post'
832 }, {
833 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Knowledge Article', 'leadin'),
834 value: 'knowledge-article'
835 }, {
836 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Landing Page', 'leadin'),
837 value: 'landing-page'
838 }, {
839 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Listing Page', 'leadin'),
840 value: 'listing-page'
841 }, {
842 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Standard Page', 'leadin'),
843 value: 'standard-page'
844 }]
845 })
846 })
847 })
848 }) : null;
849 };
850
851 var LeadinPluginSidebarWrapper = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.withSelect)(function (select) {
852 var data = select('core/editor');
853 return {
854 postType: data && data.getCurrentPostType() && data.getEditedPostAttribute('meta')
855 };
856 })(LeadinPluginSidebar);
857
858 if (_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__) {
859 _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__.registerPlugin('leadin', {
860 render: LeadinPluginSidebarWrapper,
861 icon: _Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_6__["default"]
862 });
863 }
864 }
865
866 /***/ }),
867
868 /***/ "./scripts/gutenberg/UIComponents/UIImage.ts":
869 /*!***************************************************!*\
870 !*** ./scripts/gutenberg/UIComponents/UIImage.ts ***!
871 \***************************************************/
872 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
873
874 "use strict";
875 __webpack_require__.r(__webpack_exports__);
876 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
877 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
878 /* harmony export */ });
879 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
880
881
882 var _exp = /*#__PURE__*/function _exp() {
883 return function (props) {
884 return props.height ? props.height : 'auto';
885 };
886 };
887
888 var _exp2 = /*#__PURE__*/function _exp2() {
889 return function (props) {
890 return props.width ? props.width : 'auto';
891 };
892 };
893
894 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('img')({
895 name: "UIImage0",
896 "class": "ump7xqy",
897 propsAsIs: false,
898 vars: {
899 "ump7xqy-0": [_exp()],
900 "ump7xqy-1": [_exp2()]
901 }
902 }));
903
904 __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");
905
906 /***/ }),
907
908 /***/ "./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx":
909 /*!*******************************************************************!*\
910 !*** ./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx ***!
911 \*******************************************************************/
912 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
913
914 "use strict";
915 __webpack_require__.r(__webpack_exports__);
916 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
917 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
918 /* harmony export */ });
919 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
920 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
921 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
922 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
923 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
924 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
925 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; }
926
927 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; }
928
929 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; }
930
931
932
933
934
935
936
937 var UISidebarSelectControl = function UISidebarSelectControl(props) {
938 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__.useBackgroundAppContext)();
939 var monitorSidebarMetaChange = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__.usePostBackgroundMessage)();
940 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, _objectSpread({
941 value: props.metaValue,
942 onChange: function onChange(content) {
943 if (props.setMetaValue) {
944 props.setMetaValue(content);
945 }
946
947 isBackgroundAppReady && monitorSidebarMetaChange({
948 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages.TrackSidebarMetaChange,
949 payload: {
950 metaKey: props.metaKey
951 }
952 });
953 }
954 }, props));
955 };
956
957 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_2__["default"])(UISidebarSelectControl));
958
959 /***/ }),
960
961 /***/ "./scripts/iframe/integratedMessages/core/CoreMessages.ts":
962 /*!****************************************************************!*\
963 !*** ./scripts/iframe/integratedMessages/core/CoreMessages.ts ***!
964 \****************************************************************/
965 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
966
967 "use strict";
968 __webpack_require__.r(__webpack_exports__);
969 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
970 /* harmony export */ "CoreMessages": () => (/* binding */ CoreMessages)
971 /* harmony export */ });
972 var CoreMessages = {
973 HandshakeReceive: 'INTEGRATED_APP_EMBEDDER_HANDSHAKE_RECEIVED',
974 SendRefreshToken: 'INTEGRATED_APP_EMBEDDER_SEND_REFRESH_TOKEN',
975 ReloadParentFrame: 'INTEGRATED_APP_EMBEDDER_RELOAD_PARENT_FRAME',
976 RedirectParentFrame: 'INTEGRATED_APP_EMBEDDER_REDIRECT_PARENT_FRAME',
977 SendLocale: 'INTEGRATED_APP_EMBEDDER_SEND_LOCALE',
978 SendDeviceId: 'INTEGRATED_APP_EMBEDDER_SEND_DEVICE_ID'
979 };
980
981 /***/ }),
982
983 /***/ "./scripts/iframe/integratedMessages/forms/FormsMessages.ts":
984 /*!******************************************************************!*\
985 !*** ./scripts/iframe/integratedMessages/forms/FormsMessages.ts ***!
986 \******************************************************************/
987 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
988
989 "use strict";
990 __webpack_require__.r(__webpack_exports__);
991 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
992 /* harmony export */ "FormMessages": () => (/* binding */ FormMessages)
993 /* harmony export */ });
994 var FormMessages = {
995 CreateFormAppNavigation: 'CREATE_FORM_APP_NAVIGATION'
996 };
997
998 /***/ }),
999
1000 /***/ "./scripts/iframe/integratedMessages/index.ts":
1001 /*!****************************************************!*\
1002 !*** ./scripts/iframe/integratedMessages/index.ts ***!
1003 \****************************************************/
1004 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1005
1006 "use strict";
1007 __webpack_require__.r(__webpack_exports__);
1008 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1009 /* harmony export */ "CoreMessages": () => (/* reexport safe */ _core_CoreMessages__WEBPACK_IMPORTED_MODULE_0__.CoreMessages),
1010 /* harmony export */ "FormMessages": () => (/* reexport safe */ _forms_FormsMessages__WEBPACK_IMPORTED_MODULE_1__.FormMessages),
1011 /* harmony export */ "LiveChatMessages": () => (/* reexport safe */ _livechat_LiveChatMessages__WEBPACK_IMPORTED_MODULE_2__.LiveChatMessages),
1012 /* harmony export */ "PluginMessages": () => (/* reexport safe */ _plugin_PluginMessages__WEBPACK_IMPORTED_MODULE_3__.PluginMessages),
1013 /* harmony export */ "ProxyMessages": () => (/* reexport safe */ _proxy_ProxyMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages)
1014 /* harmony export */ });
1015 /* harmony import */ var _core_CoreMessages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/CoreMessages */ "./scripts/iframe/integratedMessages/core/CoreMessages.ts");
1016 /* harmony import */ var _forms_FormsMessages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./forms/FormsMessages */ "./scripts/iframe/integratedMessages/forms/FormsMessages.ts");
1017 /* harmony import */ var _livechat_LiveChatMessages__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./livechat/LiveChatMessages */ "./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts");
1018 /* harmony import */ var _plugin_PluginMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./plugin/PluginMessages */ "./scripts/iframe/integratedMessages/plugin/PluginMessages.ts");
1019 /* harmony import */ var _proxy_ProxyMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./proxy/ProxyMessages */ "./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts");
1020
1021
1022
1023
1024
1025
1026 /***/ }),
1027
1028 /***/ "./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts":
1029 /*!************************************************************************!*\
1030 !*** ./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts ***!
1031 \************************************************************************/
1032 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1033
1034 "use strict";
1035 __webpack_require__.r(__webpack_exports__);
1036 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1037 /* harmony export */ "LiveChatMessages": () => (/* binding */ LiveChatMessages)
1038 /* harmony export */ });
1039 var LiveChatMessages = {
1040 CreateLiveChatAppNavigation: 'CREATE_LIVE_CHAT_APP_NAVIGATION'
1041 };
1042
1043 /***/ }),
1044
1045 /***/ "./scripts/iframe/integratedMessages/plugin/PluginMessages.ts":
1046 /*!********************************************************************!*\
1047 !*** ./scripts/iframe/integratedMessages/plugin/PluginMessages.ts ***!
1048 \********************************************************************/
1049 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1050
1051 "use strict";
1052 __webpack_require__.r(__webpack_exports__);
1053 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1054 /* harmony export */ "PluginMessages": () => (/* binding */ PluginMessages)
1055 /* harmony export */ });
1056 var PluginMessages = {
1057 PluginSettingsNavigation: 'PLUGIN_SETTINGS_NAVIGATION',
1058 PluginLeadinConfig: 'PLUGIN_LEADIN_CONFIG',
1059 TrackConsent: 'INTEGRATED_APP_EMBEDDER_TRACK_CONSENT',
1060 InternalTrackingFetchRequest: 'INTEGRATED_TRACKING_FETCH_REQUEST',
1061 InternalTrackingFetchResponse: 'INTEGRATED_TRACKING_FETCH_RESPONSE',
1062 InternalTrackingFetchError: 'INTEGRATED_TRACKING_FETCH_ERROR',
1063 InternalTrackingChangeRequest: 'INTEGRATED_TRACKING_CHANGE_REQUEST',
1064 InternalTrackingChangeError: 'INTEGRATED_TRACKING_CHANGE_ERROR',
1065 BusinessUnitFetchRequest: 'BUSINESS_UNIT_FETCH_REQUEST',
1066 BusinessUnitFetchResponse: 'BUSINESS_UNIT_FETCH_FETCH_RESPONSE',
1067 BusinessUnitFetchError: 'BUSINESS_UNIT_FETCH_FETCH_ERROR',
1068 BusinessUnitChangeRequest: 'BUSINESS_UNIT_CHANGE_REQUEST',
1069 BusinessUnitChangeError: 'BUSINESS_UNIT_CHANGE_ERROR',
1070 SkipReviewRequest: 'SKIP_REVIEW_REQUEST',
1071 SkipReviewResponse: 'SKIP_REVIEW_RESPONSE',
1072 SkipReviewError: 'SKIP_REVIEW_ERROR',
1073 RemoveParentQueryParam: 'REMOVE_PARENT_QUERY_PARAM',
1074 ContentEmbedInstallRequest: 'CONTENT_EMBED_INSTALL_REQUEST',
1075 ContentEmbedInstallResponse: 'CONTENT_EMBED_INSTALL_RESPONSE',
1076 ContentEmbedInstallError: 'CONTENT_EMBED_INSTALL_ERROR',
1077 ContentEmbedActivationRequest: 'CONTENT_EMBED_ACTIVATION_REQUEST',
1078 ContentEmbedActivationResponse: 'CONTENT_EMBED_ACTIVATION_RESPONSE',
1079 ContentEmbedActivationError: 'CONTENT_EMBED_ACTIVATION_ERROR'
1080 };
1081
1082 /***/ }),
1083
1084 /***/ "./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts":
1085 /*!******************************************************************!*\
1086 !*** ./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts ***!
1087 \******************************************************************/
1088 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1089
1090 "use strict";
1091 __webpack_require__.r(__webpack_exports__);
1092 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1093 /* harmony export */ "ProxyMessages": () => (/* binding */ ProxyMessages)
1094 /* harmony export */ });
1095 var ProxyMessages = {
1096 FetchForms: 'FETCH_FORMS',
1097 FetchForm: 'FETCH_FORM',
1098 CreateFormFromTemplate: 'CREATE_FORM_FROM_TEMPLATE',
1099 FetchAuth: 'FETCH_AUTH',
1100 FetchMeetingsAndUsers: 'FETCH_MEETINGS_AND_USERS',
1101 FetchContactsCreateSinceActivation: 'FETCH_CONTACTS_CREATED_SINCE_ACTIVATION',
1102 FetchOrCreateMeetingUser: 'FETCH_OR_CREATE_MEETING_USER',
1103 ConnectMeetingsCalendar: 'CONNECT_MEETINGS_CALENDAR',
1104 TrackFormPreviewRender: 'TRACK_FORM_PREVIEW_RENDER',
1105 TrackFormCreatedFromTemplate: 'TRACK_FORM_CREATED_FROM_TEMPLATE',
1106 TrackFormCreationFailed: 'TRACK_FORM_CREATION_FAILED',
1107 TrackMeetingPreviewRender: 'TRACK_MEETING_PREVIEW_RENDER',
1108 TrackSidebarMetaChange: 'TRACK_SIDEBAR_META_CHANGE',
1109 TrackReviewBannerRender: 'TRACK_REVIEW_BANNER_RENDER',
1110 TrackReviewBannerInteraction: 'TRACK_REVIEW_BANNER_INTERACTION',
1111 TrackReviewBannerDismissed: 'TRACK_REVIEW_BANNER_DISMISSED',
1112 TrackPluginDeactivation: 'TRACK_PLUGIN_DEACTIVATION'
1113 };
1114
1115 /***/ }),
1116
1117 /***/ "./scripts/iframe/useBackgroundApp.ts":
1118 /*!********************************************!*\
1119 !*** ./scripts/iframe/useBackgroundApp.ts ***!
1120 \********************************************/
1121 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1122
1123 "use strict";
1124 __webpack_require__.r(__webpack_exports__);
1125 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1126 /* harmony export */ "BackgroudAppContext": () => (/* binding */ BackgroudAppContext),
1127 /* harmony export */ "useBackgroundAppContext": () => (/* binding */ useBackgroundAppContext),
1128 /* harmony export */ "usePostAsyncBackgroundMessage": () => (/* binding */ usePostAsyncBackgroundMessage),
1129 /* harmony export */ "usePostBackgroundMessage": () => (/* binding */ usePostBackgroundMessage)
1130 /* harmony export */ });
1131 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1132 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1133
1134 var BackgroudAppContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
1135 function useBackgroundAppContext() {
1136 return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(BackgroudAppContext);
1137 }
1138 function usePostBackgroundMessage() {
1139 var app = useBackgroundAppContext();
1140 return function (message) {
1141 app.postMessage(message);
1142 };
1143 }
1144 function usePostAsyncBackgroundMessage() {
1145 var app = useBackgroundAppContext();
1146 return function (message) {
1147 return app.postAsyncMessage(message);
1148 };
1149 }
1150
1151 /***/ }),
1152
1153 /***/ "./scripts/lib/Raven.ts":
1154 /*!******************************!*\
1155 !*** ./scripts/lib/Raven.ts ***!
1156 \******************************/
1157 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1158
1159 "use strict";
1160 __webpack_require__.r(__webpack_exports__);
1161 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1162 /* harmony export */ "configureRaven": () => (/* binding */ configureRaven),
1163 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1164 /* harmony export */ });
1165 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! raven-js */ "./node_modules/raven-js/src/singleton.js");
1166 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(raven_js__WEBPACK_IMPORTED_MODULE_0__);
1167 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1168
1169
1170 function configureRaven() {
1171 if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.hubspotBaseUrl.indexOf('app.hubspot.com') === -1) {
1172 return;
1173 }
1174
1175 raven_js__WEBPACK_IMPORTED_MODULE_0___default().config('https://e9b8f382cdd130c0d415cd977d2be56f@exceptions.hubspot.com/1', {
1176 instrument: {
1177 tryCatch: false
1178 },
1179 release: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.leadinPluginVersion
1180 }).install();
1181 raven_js__WEBPACK_IMPORTED_MODULE_0___default().setTagsContext({
1182 v: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.leadinPluginVersion,
1183 php: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.phpVersion,
1184 wordpress: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.wpVersion
1185 });
1186 raven_js__WEBPACK_IMPORTED_MODULE_0___default().setExtraContext({
1187 hub: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.portalId,
1188 plugins: Object.keys(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.plugins).map(function (name) {
1189 return "".concat(name, "#").concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.plugins[name]);
1190 }).join(',')
1191 });
1192 }
1193 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((raven_js__WEBPACK_IMPORTED_MODULE_0___default()));
1194
1195 /***/ }),
1196
1197 /***/ "./scripts/shared/Common/AsyncSelect.tsx":
1198 /*!***********************************************!*\
1199 !*** ./scripts/shared/Common/AsyncSelect.tsx ***!
1200 \***********************************************/
1201 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1202
1203 "use strict";
1204 __webpack_require__.r(__webpack_exports__);
1205 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1206 /* harmony export */ "default": () => (/* binding */ AsyncSelect)
1207 /* harmony export */ });
1208 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1209 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1210 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1211 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
1212 /* harmony import */ var _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/colors */ "./scripts/shared/UIComponents/colors.ts");
1213 /* harmony import */ var _UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpinner */ "./scripts/shared/UIComponents/UISpinner.tsx");
1214 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../enums/loadState */ "./scripts/shared/enums/loadState.ts");
1215 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1216
1217 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."); }
1218
1219 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); }
1220
1221 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; }
1222
1223 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; }
1224
1225 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1226
1227
1228
1229
1230
1231
1232
1233 var Container = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1234 name: "Container",
1235 "class": "c1wxx7eu",
1236 propsAsIs: false
1237 });
1238
1239 var _exp2 = /*#__PURE__*/function _exp2() {
1240 return function (props) {
1241 return props.focused ? '0' : '1px';
1242 };
1243 };
1244
1245 var _exp3 = /*#__PURE__*/function _exp3() {
1246 return function (props) {
1247 return props.focused ? "0 0 0 2px ".concat(_UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM) : 'none';
1248 };
1249 };
1250
1251 var ControlContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1252 name: "ControlContainer",
1253 "class": "c1rgwbep",
1254 propsAsIs: false,
1255 vars: {
1256 "c1rgwbep-0": [_exp2()],
1257 "c1rgwbep-1": [_exp3()]
1258 }
1259 });
1260 var ValueContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1261 name: "ValueContainer",
1262 "class": "v1mdmbaj",
1263 propsAsIs: false
1264 });
1265 var Placeholder = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1266 name: "Placeholder",
1267 "class": "p1gwkvxy",
1268 propsAsIs: false
1269 });
1270 var SingleValue = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1271 name: "SingleValue",
1272 "class": "s1bwlafs",
1273 propsAsIs: false
1274 });
1275 var IndicatorContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1276 name: "IndicatorContainer",
1277 "class": "i196z9y5",
1278 propsAsIs: false
1279 });
1280 var DropdownIndicator = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1281 name: "DropdownIndicator",
1282 "class": "d1dfo5ow",
1283 propsAsIs: false
1284 });
1285 var InputContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1286 name: "InputContainer",
1287 "class": "if3lze",
1288 propsAsIs: false
1289 });
1290 var Input = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('input')({
1291 name: "Input",
1292 "class": "i9kxf50",
1293 propsAsIs: false
1294 });
1295 var InputShadow = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1296 name: "InputShadow",
1297 "class": "igjr3uc",
1298 propsAsIs: false
1299 });
1300 var MenuContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1301 name: "MenuContainer",
1302 "class": "mhb9if7",
1303 propsAsIs: false
1304 });
1305 var MenuList = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1306 name: "MenuList",
1307 "class": "mxaof7s",
1308 propsAsIs: false
1309 });
1310 var MenuGroup = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1311 name: "MenuGroup",
1312 "class": "mw50s5v",
1313 propsAsIs: false
1314 });
1315 var MenuGroupHeader = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1316 name: "MenuGroupHeader",
1317 "class": "m11rzvjw",
1318 propsAsIs: false
1319 });
1320
1321 var _exp5 = /*#__PURE__*/function _exp5() {
1322 return function (props) {
1323 return props.selected ? _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM : 'transparent';
1324 };
1325 };
1326
1327 var _exp6 = /*#__PURE__*/function _exp6() {
1328 return function (props) {
1329 return props.selected ? '#fff' : 'inherit';
1330 };
1331 };
1332
1333 var _exp7 = /*#__PURE__*/function _exp7() {
1334 return function (props) {
1335 return props.selected ? _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM : _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_LIGHT;
1336 };
1337 };
1338
1339 var MenuItem = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1340 name: "MenuItem",
1341 "class": "m1jcdsjv",
1342 propsAsIs: false,
1343 vars: {
1344 "m1jcdsjv-0": [_exp5()],
1345 "m1jcdsjv-1": [_exp6()],
1346 "m1jcdsjv-2": [_exp7()]
1347 }
1348 });
1349 function AsyncSelect(_ref) {
1350 var placeholder = _ref.placeholder,
1351 value = _ref.value,
1352 loadOptions = _ref.loadOptions,
1353 onChange = _ref.onChange,
1354 defaultOptions = _ref.defaultOptions;
1355 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1356 var inputShadowEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1357
1358 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
1359 _useState2 = _slicedToArray(_useState, 2),
1360 isFocused = _useState2[0],
1361 setFocus = _useState2[1];
1362
1363 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].NotLoaded),
1364 _useState4 = _slicedToArray(_useState3, 2),
1365 loadState = _useState4[0],
1366 setLoadState = _useState4[1];
1367
1368 var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
1369 _useState6 = _slicedToArray(_useState5, 2),
1370 localValue = _useState6[0],
1371 setLocalValue = _useState6[1];
1372
1373 var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultOptions),
1374 _useState8 = _slicedToArray(_useState7, 2),
1375 options = _useState8[0],
1376 setOptions = _useState8[1];
1377
1378 var inputSize = "".concat(inputShadowEl.current ? inputShadowEl.current.clientWidth + 10 : 2, "px");
1379 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1380 if (loadOptions && loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].NotLoaded) {
1381 loadOptions('', function (result) {
1382 setOptions(result);
1383 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Idle);
1384 });
1385 }
1386 }, [loadOptions, loadState]);
1387
1388 var renderItems = function renderItems() {
1389 var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
1390 var parentKey = arguments.length > 1 ? arguments[1] : undefined;
1391 return items.map(function (item, index) {
1392 if (item.options) {
1393 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(MenuGroup, {
1394 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuGroupHeader, {
1395 id: "".concat(index, "-heading"),
1396 children: item.label
1397 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
1398 children: renderItems(item.options, index)
1399 })]
1400 }, "async-select-item-".concat(index));
1401 } else {
1402 var key = "async-select-item-".concat(parentKey !== undefined ? "".concat(parentKey, "-").concat(index) : index);
1403 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuItem, {
1404 id: key,
1405 selected: value && item.value === value.value,
1406 onClick: function onClick() {
1407 onChange(item);
1408 setFocus(false);
1409 },
1410 children: item.label
1411 }, key);
1412 }
1413 });
1414 };
1415
1416 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(Container, {
1417 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ControlContainer, {
1418 id: "leadin-async-selector",
1419 focused: isFocused,
1420 onClick: function onClick() {
1421 if (isFocused) {
1422 if (inputEl.current) {
1423 inputEl.current.blur();
1424 }
1425
1426 setFocus(false);
1427 setLocalValue('');
1428 } else {
1429 if (inputEl.current) {
1430 inputEl.current.focus();
1431 }
1432
1433 setFocus(true);
1434 }
1435 },
1436 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ValueContainer, {
1437 children: [localValue === '' && (!value ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Placeholder, {
1438 children: placeholder
1439 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SingleValue, {
1440 children: value.label
1441 })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(InputContainer, {
1442 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Input, {
1443 ref: inputEl,
1444 onFocus: function onFocus() {
1445 setFocus(true);
1446 },
1447 onChange: function onChange(e) {
1448 setLocalValue(e.target.value);
1449 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Loading);
1450 loadOptions && loadOptions(e.target.value, function (result) {
1451 setOptions(result);
1452 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Idle);
1453 });
1454 },
1455 value: localValue,
1456 width: inputSize,
1457 id: "asycn-select-input"
1458 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(InputShadow, {
1459 ref: inputShadowEl,
1460 children: localValue
1461 })]
1462 })]
1463 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(IndicatorContainer, {
1464 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, {})]
1465 })]
1466 }), isFocused && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuContainer, {
1467 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuList, {
1468 children: renderItems(options)
1469 })
1470 })]
1471 });
1472 }
1473
1474 __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");
1475
1476 /***/ }),
1477
1478 /***/ "./scripts/shared/Common/ErrorHandler.tsx":
1479 /*!************************************************!*\
1480 !*** ./scripts/shared/Common/ErrorHandler.tsx ***!
1481 \************************************************/
1482 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1483
1484 "use strict";
1485 __webpack_require__.r(__webpack_exports__);
1486 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1487 /* harmony export */ "default": () => (/* binding */ ErrorHandler)
1488 /* harmony export */ });
1489 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1490 /* harmony import */ var _UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../UIComponents/UIButton */ "./scripts/shared/UIComponents/UIButton.ts");
1491 /* harmony import */ var _UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIContainer */ "./scripts/shared/UIComponents/UIContainer.ts");
1492 /* harmony import */ var _HubspotWrapper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1493 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1494 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1495 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);
1496
1497
1498
1499
1500
1501
1502
1503
1504 function redirectToPlugin() {
1505 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);
1506 }
1507
1508 function ErrorHandler(_ref) {
1509 var status = _ref.status,
1510 resetErrorState = _ref.resetErrorState,
1511 _ref$errorInfo = _ref.errorInfo,
1512 errorInfo = _ref$errorInfo === void 0 ? {
1513 header: '',
1514 message: '',
1515 action: ''
1516 } : _ref$errorInfo;
1517 var isUnauthorized = status === 401 || status === 403;
1518 var errorHeader = isUnauthorized ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)("Your plugin isn't authorized", 'leadin') : errorInfo.header;
1519 var errorMessage = isUnauthorized ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Reauthorize your plugin to access your free HubSpot tools', 'leadin') : errorInfo.message;
1520 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HubspotWrapper__WEBPACK_IMPORTED_MODULE_3__["default"], {
1521 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__.pluginPath,
1522 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_2__["default"], {
1523 textAlign: "center",
1524 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h4", {
1525 children: errorHeader
1526 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
1527 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
1528 children: errorMessage
1529 })
1530 }), isUnauthorized ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__["default"], {
1531 "data-test-id": "authorize-button",
1532 onClick: redirectToPlugin,
1533 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Go to plugin', 'leadin')
1534 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__["default"], {
1535 "data-test-id": "retry-button",
1536 onClick: resetErrorState,
1537 children: errorInfo.action
1538 })]
1539 })
1540 });
1541 }
1542
1543 /***/ }),
1544
1545 /***/ "./scripts/shared/Common/HubspotWrapper.ts":
1546 /*!*************************************************!*\
1547 !*** ./scripts/shared/Common/HubspotWrapper.ts ***!
1548 \*************************************************/
1549 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1550
1551 "use strict";
1552 __webpack_require__.r(__webpack_exports__);
1553 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1554 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1555 /* harmony export */ });
1556 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
1557
1558
1559 var _exp = /*#__PURE__*/function _exp() {
1560 return function (props) {
1561 return "url(".concat(props.pluginPath, "/public/assets/images/hubspot.svg)");
1562 };
1563 };
1564
1565 var _exp2 = /*#__PURE__*/function _exp2() {
1566 return function (props) {
1567 return props.padding || '90px 20% 25px';
1568 };
1569 };
1570
1571 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
1572 name: "HubspotWrapper0",
1573 "class": "h1q5v5ee",
1574 propsAsIs: false,
1575 vars: {
1576 "h1q5v5ee-0": [_exp()],
1577 "h1q5v5ee-1": [_exp2()]
1578 }
1579 }));
1580
1581 __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");
1582
1583 /***/ }),
1584
1585 /***/ "./scripts/shared/Common/LoadingBlock.tsx":
1586 /*!************************************************!*\
1587 !*** ./scripts/shared/Common/LoadingBlock.tsx ***!
1588 \************************************************/
1589 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1590
1591 "use strict";
1592 __webpack_require__.r(__webpack_exports__);
1593 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1594 /* harmony export */ "default": () => (/* binding */ LoadingBlock)
1595 /* harmony export */ });
1596 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1597 /* harmony import */ var _HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1598 /* harmony import */ var _UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UISpinner */ "./scripts/shared/UIComponents/UISpinner.tsx");
1599 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1600
1601
1602
1603
1604 function LoadingBlock() {
1605 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__["default"], {
1606 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.pluginPath,
1607 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_2__["default"], {
1608 size: 50
1609 })
1610 });
1611 }
1612
1613 /***/ }),
1614
1615 /***/ "./scripts/shared/Form/FormEdit.tsx":
1616 /*!******************************************!*\
1617 !*** ./scripts/shared/Form/FormEdit.tsx ***!
1618 \******************************************/
1619 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1620
1621 "use strict";
1622 __webpack_require__.r(__webpack_exports__);
1623 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1624 /* harmony export */ "default": () => (/* binding */ FormEditContainer)
1625 /* harmony export */ });
1626 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1627 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1628 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1629 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1630 /* harmony import */ var _UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpacer */ "./scripts/shared/UIComponents/UISpacer.ts");
1631 /* harmony import */ var _PreviewForm__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PreviewForm */ "./scripts/shared/Form/PreviewForm.tsx");
1632 /* harmony import */ var _FormSelect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FormSelect */ "./scripts/shared/Form/FormSelect.tsx");
1633 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1634 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
1635 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
1636 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
1637 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; }
1638
1639 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; }
1640
1641 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; }
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654 function FormEdit(_ref) {
1655 var attributes = _ref.attributes,
1656 isSelected = _ref.isSelected,
1657 setAttributes = _ref.setAttributes,
1658 _ref$preview = _ref.preview,
1659 preview = _ref$preview === void 0 ? true : _ref$preview,
1660 _ref$origin = _ref.origin,
1661 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin;
1662 var formId = attributes.formId,
1663 formName = attributes.formName;
1664 var formSelected = _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId && formId;
1665 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.useBackgroundAppContext)();
1666 var monitorFormPreviewRender = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.usePostBackgroundMessage)();
1667
1668 var handleChange = function handleChange(selectedForm) {
1669 setAttributes({
1670 portalId: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId,
1671 formId: selectedForm.value,
1672 formName: selectedForm.label
1673 });
1674 };
1675
1676 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1677 monitorFormPreviewRender({
1678 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__.ProxyMessages.TrackFormPreviewRender,
1679 payload: {
1680 origin: origin
1681 }
1682 });
1683 }, [origin]);
1684 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, {
1685 children: [(isSelected || !formSelected) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormSelect__WEBPACK_IMPORTED_MODULE_5__["default"], {
1686 formId: formId,
1687 formName: formName,
1688 handleChange: handleChange,
1689 origin: origin
1690 }), formSelected && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
1691 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"], {
1692 portalId: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId,
1693 formId: formId
1694 })]
1695 })]
1696 });
1697 }
1698
1699 function FormEditContainer(props) {
1700 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.BackgroudAppContext.Provider, {
1701 value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_9__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.refreshToken),
1702 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(FormEdit, _objectSpread({}, props))
1703 });
1704 }
1705
1706 /***/ }),
1707
1708 /***/ "./scripts/shared/Form/FormSelect.tsx":
1709 /*!********************************************!*\
1710 !*** ./scripts/shared/Form/FormSelect.tsx ***!
1711 \********************************************/
1712 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1713
1714 "use strict";
1715 __webpack_require__.r(__webpack_exports__);
1716 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1717 /* harmony export */ "default": () => (/* binding */ FormSelect)
1718 /* harmony export */ });
1719 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1720 /* harmony import */ var _FormSelector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FormSelector */ "./scripts/shared/Form/FormSelector.tsx");
1721 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
1722 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1723 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
1724 /* harmony import */ var _hooks_useForms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useForms */ "./scripts/shared/Form/hooks/useForms.ts");
1725 /* harmony import */ var _hooks_useCreateFormFromTemplate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useCreateFormFromTemplate */ "./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts");
1726 /* harmony import */ var _constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../constants/defaultFormOptions */ "./scripts/constants/defaultFormOptions.ts");
1727 /* harmony import */ var _Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
1728
1729
1730
1731
1732
1733
1734
1735
1736 function FormSelect(_ref) {
1737 var formId = _ref.formId,
1738 formName = _ref.formName,
1739 handleChange = _ref.handleChange,
1740 _ref$origin = _ref.origin,
1741 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin;
1742
1743 var _useForms = (0,_hooks_useForms__WEBPACK_IMPORTED_MODULE_4__["default"])(),
1744 search = _useForms.search,
1745 formApiError = _useForms.formApiError,
1746 reset = _useForms.reset;
1747
1748 var _useCreateFormFromTem = (0,_hooks_useCreateFormFromTemplate__WEBPACK_IMPORTED_MODULE_5__["default"])(origin),
1749 createFormByTemplate = _useCreateFormFromTem.createFormByTemplate,
1750 createReset = _useCreateFormFromTem.reset,
1751 isCreating = _useCreateFormFromTem.isCreating,
1752 hasError = _useCreateFormFromTem.hasError,
1753 createApiError = _useCreateFormFromTem.formApiError;
1754
1755 var value = formId && formName ? {
1756 label: formName,
1757 value: formId
1758 } : null;
1759
1760 var handleLocalChange = function handleLocalChange(option) {
1761 if ((0,_constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_6__.isDefaultForm)(option.value)) {
1762 createFormByTemplate(option.value).then(function (_ref2) {
1763 var guid = _ref2.guid,
1764 name = _ref2.name;
1765 handleChange({
1766 value: guid,
1767 label: name
1768 });
1769 });
1770 } else {
1771 handleChange(option);
1772 }
1773 };
1774
1775 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"], {
1776 status: formApiError ? formApiError.status : createApiError.status,
1777 resetErrorState: function resetErrorState() {
1778 if (hasError) {
1779 createReset();
1780 } else {
1781 reset();
1782 }
1783 },
1784 errorInfo: {
1785 header: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('There was a problem retrieving your forms', 'leadin'),
1786 message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Please refresh your forms or try again in a few minutes', 'leadin'),
1787 action: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Refresh forms', 'leadin')
1788 }
1789 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormSelector__WEBPACK_IMPORTED_MODULE_1__["default"], {
1790 loadOptions: search,
1791 onChange: function onChange(option) {
1792 return handleLocalChange(option);
1793 },
1794 value: value
1795 });
1796 }
1797
1798 /***/ }),
1799
1800 /***/ "./scripts/shared/Form/FormSelector.tsx":
1801 /*!**********************************************!*\
1802 !*** ./scripts/shared/Form/FormSelector.tsx ***!
1803 \**********************************************/
1804 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1805
1806 "use strict";
1807 __webpack_require__.r(__webpack_exports__);
1808 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1809 /* harmony export */ "default": () => (/* binding */ FormSelector)
1810 /* harmony export */ });
1811 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1812 /* harmony import */ var _Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Common/HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1813 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1814 /* harmony import */ var _Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Common/AsyncSelect */ "./scripts/shared/Common/AsyncSelect.tsx");
1815 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1816 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
1817
1818
1819
1820
1821
1822 function FormSelector(_ref) {
1823 var loadOptions = _ref.loadOptions,
1824 onChange = _ref.onChange,
1825 value = _ref.value;
1826 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__["default"], {
1827 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath,
1828 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
1829 "data-test-id": "leadin-form-select",
1830 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
1831 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select an existing form or create a new one from a template', 'leadin')
1832 })
1833 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_3__["default"], {
1834 placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Search for a form', 'leadin'),
1835 value: value,
1836 loadOptions: loadOptions,
1837 onChange: onChange
1838 })]
1839 });
1840 }
1841
1842 /***/ }),
1843
1844 /***/ "./scripts/shared/Form/PreviewForm.tsx":
1845 /*!*********************************************!*\
1846 !*** ./scripts/shared/Form/PreviewForm.tsx ***!
1847 \*********************************************/
1848 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1849
1850 "use strict";
1851 __webpack_require__.r(__webpack_exports__);
1852 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1853 /* harmony export */ "default": () => (/* binding */ PreviewForm)
1854 /* harmony export */ });
1855 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1856 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1857 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1858 /* harmony import */ var _UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIOverlay */ "./scripts/shared/UIComponents/UIOverlay.ts");
1859 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1860 /* harmony import */ var _hooks_useFormsScript__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useFormsScript */ "./scripts/shared/Form/hooks/useFormsScript.ts");
1861
1862
1863
1864
1865
1866 function PreviewForm(_ref) {
1867 var portalId = _ref.portalId,
1868 formId = _ref.formId;
1869 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1870 var ready = (0,_hooks_useFormsScript__WEBPACK_IMPORTED_MODULE_4__["default"])();
1871 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1872 if (!ready) {
1873 return;
1874 }
1875
1876 if (inputEl.current) {
1877 inputEl.current.innerHTML = '';
1878 var embedScript = document.createElement('script');
1879 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, " });");
1880 inputEl.current.appendChild(embedScript);
1881 }
1882 }, [formId, portalId, ready, inputEl]);
1883 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__["default"], {
1884 ref: inputEl
1885 });
1886 }
1887
1888 /***/ }),
1889
1890 /***/ "./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts":
1891 /*!****************************************************************!*\
1892 !*** ./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts ***!
1893 \****************************************************************/
1894 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1895
1896 "use strict";
1897 __webpack_require__.r(__webpack_exports__);
1898 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1899 /* harmony export */ "default": () => (/* binding */ useCreateFormFromTemplate)
1900 /* harmony export */ });
1901 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1902 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1903 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1904 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
1905 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
1906 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1907
1908 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."); }
1909
1910 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); }
1911
1912 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; }
1913
1914 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; }
1915
1916 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1917
1918
1919
1920
1921
1922 function useCreateFormFromTemplate() {
1923 var origin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'gutenberg';
1924 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
1925 var track = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostBackgroundMessage)();
1926
1927 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle),
1928 _useState2 = _slicedToArray(_useState, 2),
1929 loadState = _useState2[0],
1930 setLoadState = _useState2[1];
1931
1932 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
1933 _useState4 = _slicedToArray(_useState3, 2),
1934 formApiError = _useState4[0],
1935 setFormApiError = _useState4[1];
1936
1937 var createFormByTemplate = function createFormByTemplate(type) {
1938 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
1939 track({
1940 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.TrackFormCreatedFromTemplate,
1941 payload: {
1942 type: type,
1943 origin: origin
1944 }
1945 });
1946 return proxy({
1947 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.CreateFormFromTemplate,
1948 payload: type
1949 }).then(function (form) {
1950 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
1951 return form;
1952 })["catch"](function (err) {
1953 setFormApiError(err);
1954 track({
1955 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.TrackFormCreationFailed,
1956 payload: {
1957 origin: origin
1958 }
1959 });
1960 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
1961 });
1962 };
1963
1964 return {
1965 isCreating: loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading,
1966 hasError: loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed,
1967 formApiError: formApiError,
1968 createFormByTemplate: createFormByTemplate,
1969 reset: function reset() {
1970 return setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
1971 }
1972 };
1973 }
1974
1975 /***/ }),
1976
1977 /***/ "./scripts/shared/Form/hooks/useForms.ts":
1978 /*!***********************************************!*\
1979 !*** ./scripts/shared/Form/hooks/useForms.ts ***!
1980 \***********************************************/
1981 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1982
1983 "use strict";
1984 __webpack_require__.r(__webpack_exports__);
1985 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1986 /* harmony export */ "default": () => (/* binding */ useForms)
1987 /* harmony export */ });
1988 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1989 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1990 /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/debounce */ "./node_modules/lodash/debounce.js");
1991 /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_1__);
1992 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1993 /* harmony import */ var _constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../constants/defaultFormOptions */ "./scripts/constants/defaultFormOptions.ts");
1994 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
1995 function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
1996
1997 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."); }
1998
1999 function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
2000
2001 function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
2002
2003 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2004
2005 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."); }
2006
2007 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); }
2008
2009 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; }
2010
2011 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; }
2012
2013 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2014
2015
2016
2017
2018
2019
2020 function useForms() {
2021 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__.usePostAsyncBackgroundMessage)();
2022
2023 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2024 _useState2 = _slicedToArray(_useState, 2),
2025 formApiError = _useState2[0],
2026 setFormApiError = _useState2[1];
2027
2028 var search = lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default()(function (search, callback) {
2029 return proxy({
2030 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages.FetchForms,
2031 payload: {
2032 search: search
2033 }
2034 }).then(function (forms) {
2035 callback([].concat(_toConsumableArray(forms.map(function (form) {
2036 return {
2037 label: form.name,
2038 value: form.guid
2039 };
2040 })), [_constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_OPTIONS]));
2041 })["catch"](function (error) {
2042 setFormApiError(error);
2043 });
2044 }, 300, {
2045 trailing: true
2046 });
2047 return {
2048 search: search,
2049 formApiError: formApiError,
2050 reset: function reset() {
2051 return setFormApiError(null);
2052 }
2053 };
2054 }
2055
2056 /***/ }),
2057
2058 /***/ "./scripts/shared/Form/hooks/useFormsScript.ts":
2059 /*!*****************************************************!*\
2060 !*** ./scripts/shared/Form/hooks/useFormsScript.ts ***!
2061 \*****************************************************/
2062 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2063
2064 "use strict";
2065 __webpack_require__.r(__webpack_exports__);
2066 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2067 /* harmony export */ "default": () => (/* binding */ useFormScript)
2068 /* harmony export */ });
2069 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
2070 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
2071 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2072 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2073 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2074 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../lib/Raven */ "./scripts/lib/Raven.ts");
2075 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2076
2077 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."); }
2078
2079 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); }
2080
2081 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; }
2082
2083 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; }
2084
2085 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2086
2087
2088
2089
2090
2091 var promise;
2092
2093 function loadFormsScript() {
2094 if (!promise) {
2095 promise = new Promise(function (resolve, reject) {
2096 return jquery__WEBPACK_IMPORTED_MODULE_0___default().getScript(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.formsScript).done(resolve).fail(reject);
2097 });
2098 }
2099
2100 return promise;
2101 }
2102
2103 function useFormScript() {
2104 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
2105 _useState2 = _slicedToArray(_useState, 2),
2106 ready = _useState2[0],
2107 setReady = _useState2[1];
2108
2109 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2110 loadFormsScript().then(function () {
2111 return setReady(true);
2112 })["catch"](function (error) {
2113 return _lib_Raven__WEBPACK_IMPORTED_MODULE_3__["default"].captureException(error);
2114 });
2115 }, []);
2116 return ready;
2117 }
2118
2119 /***/ }),
2120
2121 /***/ "./scripts/shared/Meeting/MeetingController.tsx":
2122 /*!******************************************************!*\
2123 !*** ./scripts/shared/Meeting/MeetingController.tsx ***!
2124 \******************************************************/
2125 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2126
2127 "use strict";
2128 __webpack_require__.r(__webpack_exports__);
2129 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2130 /* harmony export */ "default": () => (/* binding */ MeetingController)
2131 /* harmony export */ });
2132 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2133 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2134 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2135 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
2136 /* harmony import */ var _MeetingSelector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./MeetingSelector */ "./scripts/shared/Meeting/MeetingSelector.tsx");
2137 /* harmony import */ var _MeetingWarning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MeetingWarning */ "./scripts/shared/Meeting/MeetingWarning.tsx");
2138 /* harmony import */ var _hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useMeetings */ "./scripts/shared/Meeting/hooks/useMeetings.ts");
2139 /* harmony import */ var _Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Common/HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
2140 /* harmony import */ var _Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
2141 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2142 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2143 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);
2144 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! raven-js */ "./node_modules/raven-js/src/singleton.js");
2145 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(raven_js__WEBPACK_IMPORTED_MODULE_10__);
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157 function MeetingController(_ref) {
2158 var handleChange = _ref.handleChange,
2159 url = _ref.url;
2160
2161 var _useMeetings = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__["default"])(),
2162 meetings = _useMeetings.mappedMeetings,
2163 loading = _useMeetings.loading,
2164 error = _useMeetings.error,
2165 reload = _useMeetings.reload,
2166 connectCalendar = _useMeetings.connectCalendar;
2167
2168 var selectedMeetingOption = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__.useSelectedMeeting)(url);
2169 var selectedMeetingCalendar = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__.useSelectedMeetingCalendar)(url);
2170 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2171 if (!url && meetings.length > 0) {
2172 handleChange(meetings[0].value);
2173 }
2174 }, [meetings, url, handleChange]);
2175
2176 var handleLocalChange = function handleLocalChange(option) {
2177 handleChange(option.value);
2178 };
2179
2180 var handleConnectCalendar = function handleConnectCalendar() {
2181 return connectCalendar().then(function () {
2182 reload();
2183 })["catch"](function (error) {
2184 raven_js__WEBPACK_IMPORTED_MODULE_10___default().captureMessage('Unable to connect calendar', {
2185 extra: {
2186 error: error
2187 }
2188 });
2189 });
2190 };
2191
2192 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2193 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"], {
2194 status: error && error.status || error,
2195 resetErrorState: function resetErrorState() {
2196 return reload();
2197 },
2198 errorInfo: {
2199 header: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('There was a problem retrieving your meetings', 'leadin'),
2200 message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Please refresh your meetings or try again in a few minutes', 'leadin'),
2201 action: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Refresh meetings', 'leadin')
2202 }
2203 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_6__["default"], {
2204 padding: "90px 32px 24px",
2205 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_8__.pluginPath,
2206 children: [selectedMeetingCalendar && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingWarning__WEBPACK_IMPORTED_MODULE_4__["default"], {
2207 status: selectedMeetingCalendar,
2208 onConnectCalendar: handleConnectCalendar
2209 }), meetings.length > 1 && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingSelector__WEBPACK_IMPORTED_MODULE_3__["default"], {
2210 onChange: handleLocalChange,
2211 options: meetings,
2212 value: selectedMeetingOption
2213 })]
2214 })
2215 });
2216 }
2217
2218 /***/ }),
2219
2220 /***/ "./scripts/shared/Meeting/MeetingEdit.tsx":
2221 /*!************************************************!*\
2222 !*** ./scripts/shared/Meeting/MeetingEdit.tsx ***!
2223 \************************************************/
2224 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2225
2226 "use strict";
2227 __webpack_require__.r(__webpack_exports__);
2228 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2229 /* harmony export */ "default": () => (/* binding */ MeetingsEditContainer)
2230 /* harmony export */ });
2231 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2232 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2233 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2234 /* harmony import */ var _MeetingController__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./MeetingController */ "./scripts/shared/Meeting/MeetingController.tsx");
2235 /* harmony import */ var _PreviewMeeting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PreviewMeeting */ "./scripts/shared/Meeting/PreviewMeeting.tsx");
2236 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2237 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2238 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2239 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
2240 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
2241 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; }
2242
2243 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; }
2244
2245 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; }
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257 function MeetingEdit(_ref) {
2258 var url = _ref.attributes.url,
2259 isSelected = _ref.isSelected,
2260 setAttributes = _ref.setAttributes,
2261 _ref$preview = _ref.preview,
2262 preview = _ref$preview === void 0 ? true : _ref$preview,
2263 _ref$origin = _ref.origin,
2264 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin;
2265 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.useBackgroundAppContext)();
2266 var monitorFormPreviewRender = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.usePostBackgroundMessage)();
2267
2268 var handleChange = function handleChange(newUrl) {
2269 setAttributes({
2270 url: newUrl
2271 });
2272 };
2273
2274 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2275 monitorFormPreviewRender({
2276 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_6__.ProxyMessages.TrackMeetingPreviewRender,
2277 payload: {
2278 origin: origin
2279 }
2280 });
2281 }, [origin]);
2282 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, {
2283 children: [(isSelected || !url) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingController__WEBPACK_IMPORTED_MODULE_2__["default"], {
2284 url: url,
2285 handleChange: handleChange
2286 }), preview && url && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PreviewMeeting__WEBPACK_IMPORTED_MODULE_3__["default"], {
2287 url: url
2288 })]
2289 });
2290 }
2291
2292 function MeetingsEditContainer(props) {
2293 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.BackgroudAppContext.Provider, {
2294 value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_8__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__.refreshToken),
2295 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MeetingEdit, _objectSpread({}, props))
2296 });
2297 }
2298
2299 /***/ }),
2300
2301 /***/ "./scripts/shared/Meeting/MeetingSelector.tsx":
2302 /*!****************************************************!*\
2303 !*** ./scripts/shared/Meeting/MeetingSelector.tsx ***!
2304 \****************************************************/
2305 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2306
2307 "use strict";
2308 __webpack_require__.r(__webpack_exports__);
2309 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2310 /* harmony export */ "default": () => (/* binding */ MeetingSelector)
2311 /* harmony export */ });
2312 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2313 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2314 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2315 /* harmony import */ var _Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/AsyncSelect */ "./scripts/shared/Common/AsyncSelect.tsx");
2316 /* harmony import */ var _UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpacer */ "./scripts/shared/UIComponents/UISpacer.ts");
2317 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2318 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
2319
2320
2321
2322
2323
2324 function MeetingSelector(_ref) {
2325 var options = _ref.options,
2326 onChange = _ref.onChange,
2327 value = _ref.value;
2328 var optionsWrapper = [{
2329 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Meeting name', 'leadin'),
2330 options: options
2331 }];
2332 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2333 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", {
2334 "data-test-id": "leadin-meeting-select",
2335 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
2336 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select a meeting scheduling page', 'leadin')
2337 })
2338 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_2__["default"], {
2339 defaultOptions: optionsWrapper,
2340 onChange: onChange,
2341 placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select a meeting', 'leadin'),
2342 value: value
2343 })]
2344 });
2345 }
2346
2347 /***/ }),
2348
2349 /***/ "./scripts/shared/Meeting/MeetingWarning.tsx":
2350 /*!***************************************************!*\
2351 !*** ./scripts/shared/Meeting/MeetingWarning.tsx ***!
2352 \***************************************************/
2353 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2354
2355 "use strict";
2356 __webpack_require__.r(__webpack_exports__);
2357 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2358 /* harmony export */ "default": () => (/* binding */ MeetingWarning)
2359 /* harmony export */ });
2360 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2361 /* harmony import */ var _UIComponents_UIAlert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../UIComponents/UIAlert */ "./scripts/shared/UIComponents/UIAlert.tsx");
2362 /* harmony import */ var _UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIButton */ "./scripts/shared/UIComponents/UIButton.ts");
2363 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants */ "./scripts/shared/Meeting/constants.ts");
2364 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2365 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
2366
2367
2368
2369
2370
2371 function MeetingWarning(_ref) {
2372 var status = _ref.status,
2373 onConnectCalendar = _ref.onConnectCalendar;
2374 var isMeetingOwner = status === _constants__WEBPACK_IMPORTED_MODULE_3__.CURRENT_USER_CALENDAR_MISSING;
2375 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');
2376 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');
2377 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIAlert__WEBPACK_IMPORTED_MODULE_1__["default"], {
2378 titleText: titleText,
2379 titleMessage: titleMessage,
2380 children: isMeetingOwner && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_2__["default"], {
2381 use: "tertiary",
2382 id: "meetings-connect-calendar",
2383 onClick: onConnectCalendar,
2384 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Connect calendar', 'leadin')
2385 })
2386 });
2387 }
2388
2389 /***/ }),
2390
2391 /***/ "./scripts/shared/Meeting/PreviewMeeting.tsx":
2392 /*!***************************************************!*\
2393 !*** ./scripts/shared/Meeting/PreviewMeeting.tsx ***!
2394 \***************************************************/
2395 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2396
2397 "use strict";
2398 __webpack_require__.r(__webpack_exports__);
2399 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2400 /* harmony export */ "default": () => (/* binding */ PreviewForm)
2401 /* harmony export */ });
2402 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2403 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2404 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2405 /* harmony import */ var _UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIOverlay */ "./scripts/shared/UIComponents/UIOverlay.ts");
2406 /* harmony import */ var _hooks_useMeetingsScript__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hooks/useMeetingsScript */ "./scripts/shared/Meeting/hooks/useMeetingsScript.ts");
2407
2408
2409
2410
2411 function PreviewForm(_ref) {
2412 var url = _ref.url;
2413 var ready = (0,_hooks_useMeetingsScript__WEBPACK_IMPORTED_MODULE_3__["default"])();
2414 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
2415 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2416 if (!ready) {
2417 return;
2418 }
2419
2420 if (inputEl.current) {
2421 inputEl.current.innerHTML = '';
2422 var container = document.createElement('div');
2423 container.dataset.src = "".concat(url, "?embed=true");
2424 container.classList.add('meetings-iframe-container');
2425 inputEl.current.appendChild(container);
2426 var embedScript = document.createElement('script');
2427 embedScript.innerHTML = 'hbspt.meetings.create(".meetings-iframe-container");';
2428 inputEl.current.appendChild(embedScript);
2429 }
2430 }, [url, ready, inputEl]);
2431 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2432 children: url && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__["default"], {
2433 ref: inputEl
2434 })
2435 });
2436 }
2437
2438 /***/ }),
2439
2440 /***/ "./scripts/shared/Meeting/constants.ts":
2441 /*!*********************************************!*\
2442 !*** ./scripts/shared/Meeting/constants.ts ***!
2443 \*********************************************/
2444 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2445
2446 "use strict";
2447 __webpack_require__.r(__webpack_exports__);
2448 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2449 /* harmony export */ "CURRENT_USER_CALENDAR_MISSING": () => (/* binding */ CURRENT_USER_CALENDAR_MISSING),
2450 /* harmony export */ "OTHER_USER_CALENDAR_MISSING": () => (/* binding */ OTHER_USER_CALENDAR_MISSING)
2451 /* harmony export */ });
2452 var OTHER_USER_CALENDAR_MISSING = 'OTHER_USER_CALENDAR_MISSING';
2453 var CURRENT_USER_CALENDAR_MISSING = 'CURRENT_USER_CALENDAR_MISSING';
2454
2455 /***/ }),
2456
2457 /***/ "./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts":
2458 /*!*************************************************************!*\
2459 !*** ./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts ***!
2460 \*************************************************************/
2461 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2462
2463 "use strict";
2464 __webpack_require__.r(__webpack_exports__);
2465 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2466 /* harmony export */ "default": () => (/* binding */ useCurrentUserFetch)
2467 /* harmony export */ });
2468 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2469 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2470 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2471 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2472 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2473 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2474
2475 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."); }
2476
2477 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); }
2478
2479 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; }
2480
2481 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; }
2482
2483 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2484
2485
2486
2487
2488
2489 var user = null;
2490 function useCurrentUserFetch() {
2491 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
2492
2493 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded),
2494 _useState2 = _slicedToArray(_useState, 2),
2495 loadState = _useState2[0],
2496 setLoadState = _useState2[1];
2497
2498 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2499 _useState4 = _slicedToArray(_useState3, 2),
2500 error = _useState4[0],
2501 setError = _useState4[1];
2502
2503 var createUser = function createUser() {
2504 if (!user) {
2505 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2506 }
2507 };
2508
2509 var reload = function reload() {
2510 user = null;
2511 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2512 setError(null);
2513 };
2514
2515 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2516 if (loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded && !user) {
2517 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
2518 proxy({
2519 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.FetchOrCreateMeetingUser
2520 }).then(function (data) {
2521 user = data;
2522 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
2523 })["catch"](function (err) {
2524 setError(err);
2525 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
2526 });
2527 }
2528 }, [loadState]);
2529 return {
2530 user: user,
2531 loadUserState: loadState,
2532 error: error,
2533 createUser: createUser,
2534 reload: reload
2535 };
2536 }
2537
2538 /***/ }),
2539
2540 /***/ "./scripts/shared/Meeting/hooks/useMeetings.ts":
2541 /*!*****************************************************!*\
2542 !*** ./scripts/shared/Meeting/hooks/useMeetings.ts ***!
2543 \*****************************************************/
2544 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2545
2546 "use strict";
2547 __webpack_require__.r(__webpack_exports__);
2548 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2549 /* harmony export */ "default": () => (/* binding */ useMeetings),
2550 /* harmony export */ "useSelectedMeeting": () => (/* binding */ useSelectedMeeting),
2551 /* harmony export */ "useSelectedMeetingCalendar": () => (/* binding */ useSelectedMeetingCalendar)
2552 /* harmony export */ });
2553 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2554 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2555 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2556 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
2557 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants */ "./scripts/shared/Meeting/constants.ts");
2558 /* harmony import */ var _useMeetingsFetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./useMeetingsFetch */ "./scripts/shared/Meeting/hooks/useMeetingsFetch.ts");
2559 /* harmony import */ var _useCurrentUserFetch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./useCurrentUserFetch */ "./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts");
2560 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2561 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2562 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2563 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; }
2564
2565 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; }
2566
2567 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; }
2568
2569 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2570
2571 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."); }
2572
2573 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); }
2574
2575 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; }
2576
2577 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; }
2578
2579 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590 function getDefaultMeetingName(meeting, currentUser, meetingUsers) {
2591 var _meeting$meetingsUser = _slicedToArray(meeting.meetingsUserIds, 1),
2592 meetingOwnerId = _meeting$meetingsUser[0];
2593
2594 var result = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Default', 'leadin');
2595
2596 if (currentUser && meetingOwnerId !== currentUser.id && meetingUsers[meetingOwnerId]) {
2597 var user = meetingUsers[meetingOwnerId];
2598 result += " (".concat(user.userProfile.fullName, ")");
2599 }
2600
2601 return result;
2602 }
2603
2604 function hasCalendarObject(user) {
2605 return user && user.meetingsUserBlob && user.meetingsUserBlob.calendarSettings && user.meetingsUserBlob.calendarSettings.email;
2606 }
2607
2608 function useMeetings() {
2609 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.usePostAsyncBackgroundMessage)();
2610
2611 var _useMeetingsFetch = (0,_useMeetingsFetch__WEBPACK_IMPORTED_MODULE_3__["default"])(),
2612 meetings = _useMeetingsFetch.meetings,
2613 meetingUsers = _useMeetingsFetch.meetingUsers,
2614 meetingsError = _useMeetingsFetch.error,
2615 loadMeetingsState = _useMeetingsFetch.loadMeetingsState,
2616 reloadMeetings = _useMeetingsFetch.reload;
2617
2618 var _useCurrentUserFetch = (0,_useCurrentUserFetch__WEBPACK_IMPORTED_MODULE_4__["default"])(),
2619 currentUser = _useCurrentUserFetch.user,
2620 userError = _useCurrentUserFetch.error,
2621 loadUserState = _useCurrentUserFetch.loadUserState,
2622 reloadUser = _useCurrentUserFetch.reload;
2623
2624 var reload = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
2625 reloadUser();
2626 reloadMeetings();
2627 }, [reloadUser, reloadMeetings]);
2628
2629 var connectCalendar = function connectCalendar() {
2630 return proxy({
2631 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__.ProxyMessages.ConnectMeetingsCalendar
2632 });
2633 };
2634
2635 return {
2636 mappedMeetings: meetings.map(function (meet) {
2637 return {
2638 label: meet.name || getDefaultMeetingName(meet, currentUser, meetingUsers),
2639 value: meet.link
2640 };
2641 }),
2642 meetings: meetings,
2643 meetingUsers: meetingUsers,
2644 currentUser: currentUser,
2645 error: meetingsError || userError,
2646 loading: loadMeetingsState == _enums_loadState__WEBPACK_IMPORTED_MODULE_5__["default"].Loading || loadUserState === _enums_loadState__WEBPACK_IMPORTED_MODULE_5__["default"].Loading,
2647 reload: reload,
2648 connectCalendar: connectCalendar
2649 };
2650 }
2651 function useSelectedMeeting(url) {
2652 var _useMeetings = useMeetings(),
2653 meetings = _useMeetings.mappedMeetings;
2654
2655 var option = meetings.find(function (_ref) {
2656 var value = _ref.value;
2657 return value === url;
2658 });
2659 return option;
2660 }
2661 function useSelectedMeetingCalendar(url) {
2662 var _useMeetings2 = useMeetings(),
2663 meetings = _useMeetings2.meetings,
2664 meetingUsers = _useMeetings2.meetingUsers,
2665 currentUser = _useMeetings2.currentUser;
2666
2667 var meeting = meetings.find(function (meet) {
2668 return meet.link === url;
2669 });
2670 var mappedMeetingUsersId = meetingUsers.reduce(function (p, c) {
2671 return _objectSpread(_objectSpread({}, p), {}, _defineProperty({}, c.id, c));
2672 }, {});
2673
2674 if (!meeting) {
2675 return null;
2676 } else {
2677 var meetingsUserIds = meeting.meetingsUserIds;
2678
2679 if (currentUser && meetingsUserIds.includes(currentUser.id) && !hasCalendarObject(currentUser)) {
2680 return _constants__WEBPACK_IMPORTED_MODULE_2__.CURRENT_USER_CALENDAR_MISSING;
2681 } else if (meetingsUserIds.map(function (id) {
2682 return mappedMeetingUsersId[id];
2683 }).some(function (user) {
2684 return !hasCalendarObject(user);
2685 })) {
2686 return _constants__WEBPACK_IMPORTED_MODULE_2__.OTHER_USER_CALENDAR_MISSING;
2687 } else {
2688 return null;
2689 }
2690 }
2691 }
2692
2693 /***/ }),
2694
2695 /***/ "./scripts/shared/Meeting/hooks/useMeetingsFetch.ts":
2696 /*!**********************************************************!*\
2697 !*** ./scripts/shared/Meeting/hooks/useMeetingsFetch.ts ***!
2698 \**********************************************************/
2699 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2700
2701 "use strict";
2702 __webpack_require__.r(__webpack_exports__);
2703 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2704 /* harmony export */ "default": () => (/* binding */ useMeetingsFetch)
2705 /* harmony export */ });
2706 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2707 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2708 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2709 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2710 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2711 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2712
2713 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."); }
2714
2715 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); }
2716
2717 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; }
2718
2719 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; }
2720
2721 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2722
2723
2724
2725
2726
2727 var meetings = [];
2728 var meetingUsers = [];
2729 function useMeetingsFetch() {
2730 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
2731
2732 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded),
2733 _useState2 = _slicedToArray(_useState, 2),
2734 loadState = _useState2[0],
2735 setLoadState = _useState2[1];
2736
2737 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2738 _useState4 = _slicedToArray(_useState3, 2),
2739 error = _useState4[0],
2740 setError = _useState4[1];
2741
2742 var reload = function reload() {
2743 meetings = [];
2744 setError(null);
2745 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2746 };
2747
2748 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2749 if (loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded && meetings.length === 0) {
2750 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
2751 proxy({
2752 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.FetchMeetingsAndUsers
2753 }).then(function (data) {
2754 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loaded);
2755 meetings = data && data.meetingLinks;
2756 meetingUsers = data && data.meetingUsers;
2757 })["catch"](function (e) {
2758 setError(e);
2759 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
2760 });
2761 }
2762 }, [loadState]);
2763 return {
2764 meetings: meetings,
2765 meetingUsers: meetingUsers,
2766 loadMeetingsState: loadState,
2767 error: error,
2768 reload: reload
2769 };
2770 }
2771
2772 /***/ }),
2773
2774 /***/ "./scripts/shared/Meeting/hooks/useMeetingsScript.ts":
2775 /*!***********************************************************!*\
2776 !*** ./scripts/shared/Meeting/hooks/useMeetingsScript.ts ***!
2777 \***********************************************************/
2778 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2779
2780 "use strict";
2781 __webpack_require__.r(__webpack_exports__);
2782 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2783 /* harmony export */ "default": () => (/* binding */ useMeetingsScript)
2784 /* harmony export */ });
2785 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
2786 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
2787 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2788 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2789 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2790 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../lib/Raven */ "./scripts/lib/Raven.ts");
2791 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2792
2793 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."); }
2794
2795 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); }
2796
2797 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; }
2798
2799 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; }
2800
2801 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2802
2803
2804
2805
2806
2807 var promise;
2808
2809 function loadMeetingsScript() {
2810 if (!promise) {
2811 promise = new Promise(function (resolve, reject) {
2812 return jquery__WEBPACK_IMPORTED_MODULE_0___default().getScript(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.meetingsScript).done(resolve).fail(reject);
2813 });
2814 }
2815
2816 return promise;
2817 }
2818
2819 function useMeetingsScript() {
2820 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
2821 _useState2 = _slicedToArray(_useState, 2),
2822 ready = _useState2[0],
2823 setReady = _useState2[1];
2824
2825 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2826 loadMeetingsScript().then(function () {
2827 return setReady(true);
2828 })["catch"](function (error) {
2829 return _lib_Raven__WEBPACK_IMPORTED_MODULE_3__["default"].captureException(error);
2830 });
2831 }, []);
2832 return ready;
2833 }
2834
2835 /***/ }),
2836
2837 /***/ "./scripts/shared/UIComponents/UIAlert.tsx":
2838 /*!*************************************************!*\
2839 !*** ./scripts/shared/UIComponents/UIAlert.tsx ***!
2840 \*************************************************/
2841 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2842
2843 "use strict";
2844 __webpack_require__.r(__webpack_exports__);
2845 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2846 /* harmony export */ "default": () => (/* binding */ UIAlert)
2847 /* harmony export */ });
2848 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2849 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2850
2851
2852 var AlertContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('div')({
2853 name: "AlertContainer",
2854 "class": "a1h8m4fo",
2855 propsAsIs: false
2856 });
2857 var Title = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('p')({
2858 name: "Title",
2859 "class": "tyndzxk",
2860 propsAsIs: false
2861 });
2862 var Message = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('p')({
2863 name: "Message",
2864 "class": "m1m9sbk4",
2865 propsAsIs: false
2866 });
2867 var MessageContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('div')({
2868 name: "MessageContainer",
2869 "class": "mg5o421",
2870 propsAsIs: false
2871 });
2872 function UIAlert(_ref) {
2873 var titleText = _ref.titleText,
2874 titleMessage = _ref.titleMessage,
2875 children = _ref.children;
2876 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(AlertContainer, {
2877 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(MessageContainer, {
2878 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Title, {
2879 children: titleText
2880 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Message, {
2881 children: titleMessage
2882 })]
2883 }), children]
2884 });
2885 }
2886
2887 __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");
2888
2889 /***/ }),
2890
2891 /***/ "./scripts/shared/UIComponents/UIButton.ts":
2892 /*!*************************************************!*\
2893 !*** ./scripts/shared/UIComponents/UIButton.ts ***!
2894 \*************************************************/
2895 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2896
2897 "use strict";
2898 __webpack_require__.r(__webpack_exports__);
2899 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2900 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2901 /* harmony export */ });
2902 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2903 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colors */ "./scripts/shared/UIComponents/colors.ts");
2904
2905
2906
2907 var _exp2 = /*#__PURE__*/function _exp2() {
2908 return function (props) {
2909 return props.use === 'tertiary' ? _colors__WEBPACK_IMPORTED_MODULE_0__.HEFFALUMP : _colors__WEBPACK_IMPORTED_MODULE_0__.LORAX;
2910 };
2911 };
2912
2913 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('button')({
2914 name: "UIButton0",
2915 "class": "ug152ch",
2916 propsAsIs: false,
2917 vars: {
2918 "ug152ch-0": [_exp2()]
2919 }
2920 }));
2921
2922 __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");
2923
2924 /***/ }),
2925
2926 /***/ "./scripts/shared/UIComponents/UIContainer.ts":
2927 /*!****************************************************!*\
2928 !*** ./scripts/shared/UIComponents/UIContainer.ts ***!
2929 \****************************************************/
2930 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2931
2932 "use strict";
2933 __webpack_require__.r(__webpack_exports__);
2934 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2935 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2936 /* harmony export */ });
2937 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2938
2939
2940 var _exp = /*#__PURE__*/function _exp() {
2941 return function (props) {
2942 return props.textAlign ? props.textAlign : 'inherit';
2943 };
2944 };
2945
2946 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
2947 name: "UIContainer0",
2948 "class": "ua13n1c",
2949 propsAsIs: false,
2950 vars: {
2951 "ua13n1c-0": [_exp()]
2952 }
2953 }));
2954
2955 __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");
2956
2957 /***/ }),
2958
2959 /***/ "./scripts/shared/UIComponents/UIOverlay.ts":
2960 /*!**************************************************!*\
2961 !*** ./scripts/shared/UIComponents/UIOverlay.ts ***!
2962 \**************************************************/
2963 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2964
2965 "use strict";
2966 __webpack_require__.r(__webpack_exports__);
2967 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2968 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2969 /* harmony export */ });
2970 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2971
2972 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
2973 name: "UIOverlay0",
2974 "class": "u1q7a48k",
2975 propsAsIs: false
2976 }));
2977
2978 __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");
2979
2980 /***/ }),
2981
2982 /***/ "./scripts/shared/UIComponents/UISpacer.ts":
2983 /*!*************************************************!*\
2984 !*** ./scripts/shared/UIComponents/UISpacer.ts ***!
2985 \*************************************************/
2986 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2987
2988 "use strict";
2989 __webpack_require__.r(__webpack_exports__);
2990 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2991 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2992 /* harmony export */ });
2993 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2994
2995 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
2996 name: "UISpacer0",
2997 "class": "u3qxofx",
2998 propsAsIs: false
2999 }));
3000
3001 __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");
3002
3003 /***/ }),
3004
3005 /***/ "./scripts/shared/UIComponents/UISpinner.tsx":
3006 /*!***************************************************!*\
3007 !*** ./scripts/shared/UIComponents/UISpinner.tsx ***!
3008 \***************************************************/
3009 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3010
3011 "use strict";
3012 __webpack_require__.r(__webpack_exports__);
3013 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3014 /* harmony export */ "default": () => (/* binding */ UISpinner)
3015 /* harmony export */ });
3016 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
3017 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3018 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./colors */ "./scripts/shared/UIComponents/colors.ts");
3019
3020
3021
3022 var SpinnerOuter = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('div')({
3023 name: "SpinnerOuter",
3024 "class": "sxa9zrc",
3025 propsAsIs: false
3026 });
3027 var SpinnerInner = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('div')({
3028 name: "SpinnerInner",
3029 "class": "s14430wa",
3030 propsAsIs: false
3031 });
3032
3033 var _exp = /*#__PURE__*/function _exp() {
3034 return function (props) {
3035 return props.color;
3036 };
3037 };
3038
3039 var Circle = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('circle')({
3040 name: "Circle",
3041 "class": "ct87ghk",
3042 propsAsIs: true,
3043 vars: {
3044 "ct87ghk-0": [_exp()]
3045 }
3046 });
3047
3048 var _exp2 = /*#__PURE__*/function _exp2() {
3049 return function (props) {
3050 return props.color;
3051 };
3052 };
3053
3054 var AnimatedCircle = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('circle')({
3055 name: "AnimatedCircle",
3056 "class": "avili0h",
3057 propsAsIs: true,
3058 vars: {
3059 "avili0h-0": [_exp2()]
3060 }
3061 });
3062 function UISpinner(_ref) {
3063 var _ref$size = _ref.size,
3064 size = _ref$size === void 0 ? 20 : _ref$size;
3065 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SpinnerOuter, {
3066 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SpinnerInner, {
3067 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
3068 height: size,
3069 width: size,
3070 viewBox: "0 0 50 50",
3071 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Circle, {
3072 color: _colors__WEBPACK_IMPORTED_MODULE_1__.CALYPSO_MEDIUM,
3073 cx: "25",
3074 cy: "25",
3075 r: "22.5"
3076 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(AnimatedCircle, {
3077 color: _colors__WEBPACK_IMPORTED_MODULE_1__.CALYPSO,
3078 cx: "25",
3079 cy: "25",
3080 r: "22.5"
3081 })]
3082 })
3083 })
3084 });
3085 }
3086
3087 __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");
3088
3089 /***/ }),
3090
3091 /***/ "./scripts/shared/UIComponents/colors.ts":
3092 /*!***********************************************!*\
3093 !*** ./scripts/shared/UIComponents/colors.ts ***!
3094 \***********************************************/
3095 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3096
3097 "use strict";
3098 __webpack_require__.r(__webpack_exports__);
3099 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3100 /* harmony export */ "CALYPSO": () => (/* binding */ CALYPSO),
3101 /* harmony export */ "CALYPSO_LIGHT": () => (/* binding */ CALYPSO_LIGHT),
3102 /* harmony export */ "CALYPSO_MEDIUM": () => (/* binding */ CALYPSO_MEDIUM),
3103 /* harmony export */ "HEFFALUMP": () => (/* binding */ HEFFALUMP),
3104 /* harmony export */ "LORAX": () => (/* binding */ LORAX),
3105 /* harmony export */ "MARIGOLD_LIGHT": () => (/* binding */ MARIGOLD_LIGHT),
3106 /* harmony export */ "MARIGOLD_MEDIUM": () => (/* binding */ MARIGOLD_MEDIUM),
3107 /* harmony export */ "OBSIDIAN": () => (/* binding */ OBSIDIAN),
3108 /* harmony export */ "OLAF": () => (/* binding */ OLAF)
3109 /* harmony export */ });
3110 var CALYPSO = '#00a4bd';
3111 var CALYPSO_MEDIUM = '#7fd1de';
3112 var CALYPSO_LIGHT = '#e5f5f8';
3113 var LORAX = '#ff7a59';
3114 var OLAF = '#ffffff';
3115 var HEFFALUMP = '#425b76';
3116 var MARIGOLD_LIGHT = '#fef8f0';
3117 var MARIGOLD_MEDIUM = '#fae0b5';
3118 var OBSIDIAN = '#33475b';
3119
3120 /***/ }),
3121
3122 /***/ "./scripts/shared/enums/connectionStatus.ts":
3123 /*!**************************************************!*\
3124 !*** ./scripts/shared/enums/connectionStatus.ts ***!
3125 \**************************************************/
3126 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3127
3128 "use strict";
3129 __webpack_require__.r(__webpack_exports__);
3130 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3131 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3132 /* harmony export */ });
3133 var ConnectionStatus = {
3134 Connected: 'Connected',
3135 NotConnected: 'NotConnected'
3136 };
3137 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ConnectionStatus);
3138
3139 /***/ }),
3140
3141 /***/ "./scripts/shared/enums/loadState.ts":
3142 /*!*******************************************!*\
3143 !*** ./scripts/shared/enums/loadState.ts ***!
3144 \*******************************************/
3145 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3146
3147 "use strict";
3148 __webpack_require__.r(__webpack_exports__);
3149 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3150 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3151 /* harmony export */ });
3152 var LoadState = {
3153 NotLoaded: 'NotLoaded',
3154 Loading: 'Loading',
3155 Loaded: 'Loaded',
3156 Idle: 'Idle',
3157 Failed: 'Failed'
3158 };
3159 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LoadState);
3160
3161 /***/ }),
3162
3163 /***/ "./scripts/utils/appUtils.ts":
3164 /*!***********************************!*\
3165 !*** ./scripts/utils/appUtils.ts ***!
3166 \***********************************/
3167 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3168
3169 "use strict";
3170 __webpack_require__.r(__webpack_exports__);
3171 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3172 /* harmony export */ "initApp": () => (/* binding */ initApp),
3173 /* harmony export */ "initAppOnReady": () => (/* binding */ initAppOnReady)
3174 /* harmony export */ });
3175 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
3176 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
3177 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lib/Raven */ "./scripts/lib/Raven.ts");
3178
3179
3180 function initApp(initFn) {
3181 (0,_lib_Raven__WEBPACK_IMPORTED_MODULE_1__.configureRaven)();
3182 _lib_Raven__WEBPACK_IMPORTED_MODULE_1__["default"].context(initFn);
3183 }
3184 function initAppOnReady(initFn) {
3185 function main() {
3186 jquery__WEBPACK_IMPORTED_MODULE_0___default()(initFn);
3187 }
3188
3189 initApp(main);
3190 }
3191
3192 /***/ }),
3193
3194 /***/ "./scripts/utils/backgroundAppUtils.ts":
3195 /*!*********************************************!*\
3196 !*** ./scripts/utils/backgroundAppUtils.ts ***!
3197 \*********************************************/
3198 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3199
3200 "use strict";
3201 __webpack_require__.r(__webpack_exports__);
3202 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3203 /* harmony export */ "getOrCreateBackgroundApp": () => (/* binding */ getOrCreateBackgroundApp),
3204 /* harmony export */ "initBackgroundApp": () => (/* binding */ initBackgroundApp)
3205 /* harmony export */ });
3206 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
3207 /* harmony import */ var _appUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./appUtils */ "./scripts/utils/appUtils.ts");
3208
3209
3210 function initBackgroundApp(initFn) {
3211 function main() {
3212 if (Array.isArray(initFn)) {
3213 initFn.forEach(function (callback) {
3214 return callback();
3215 });
3216 } else {
3217 initFn();
3218 }
3219 }
3220
3221 (0,_appUtils__WEBPACK_IMPORTED_MODULE_1__.initApp)(main);
3222 }
3223 var getOrCreateBackgroundApp = function getOrCreateBackgroundApp(refreshToken) {
3224 if (window.LeadinBackgroundApp) {
3225 return window.LeadinBackgroundApp;
3226 }
3227
3228 var _window = window,
3229 IntegratedAppEmbedder = _window.IntegratedAppEmbedder,
3230 IntegratedAppOptions = _window.IntegratedAppOptions;
3231 var options = new IntegratedAppOptions().setLocale(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.locale).setDeviceId(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.deviceId).setRefreshToken(refreshToken);
3232 var embedder = new IntegratedAppEmbedder('integrated-plugin-proxy', _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.portalId, _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.hubspotBaseUrl, function () {}).setOptions(options);
3233 embedder.attachTo(document.body, false);
3234 embedder.postStartAppMessage(); // lets the app know all all data has been passed to it
3235
3236 window.LeadinBackgroundApp = embedder;
3237 return window.LeadinBackgroundApp;
3238 };
3239
3240 /***/ }),
3241
3242 /***/ "./scripts/utils/withMetaData.ts":
3243 /*!***************************************!*\
3244 !*** ./scripts/utils/withMetaData.ts ***!
3245 \***************************************/
3246 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3247
3248 "use strict";
3249 __webpack_require__.r(__webpack_exports__);
3250 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3251 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
3252 /* harmony export */ "isFullSiteEditor": () => (/* binding */ isFullSiteEditor)
3253 /* harmony export */ });
3254 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
3255 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
3256 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; }
3257
3258 // from answer here: https://github.com/WordPress/gutenberg/issues/44477#issuecomment-1263026599
3259
3260 var isFullSiteEditor = function isFullSiteEditor() {
3261 return !!(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select)('core/edit-site');
3262 };
3263 var applyWithSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.withSelect)(function (select, props) {
3264 return {
3265 metaValue: select('core/editor').getEditedPostAttribute('meta')[props.metaKey]
3266 };
3267 });
3268 var applyWithDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.withDispatch)(function (dispatch, props) {
3269 return {
3270 setMetaValue: function setMetaValue(value) {
3271 dispatch('core/editor').editPost({
3272 meta: _defineProperty({}, props.metaKey, value)
3273 });
3274 }
3275 };
3276 });
3277
3278 function apply(el) {
3279 return applyWithSelect(applyWithDispatch(el));
3280 }
3281
3282 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (apply);
3283
3284 /***/ }),
3285
3286 /***/ "./node_modules/is-what/dist/index.esm.js":
3287 /*!************************************************!*\
3288 !*** ./node_modules/is-what/dist/index.esm.js ***!
3289 \************************************************/
3290 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3291
3292 "use strict";
3293 __webpack_require__.r(__webpack_exports__);
3294 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3295 /* harmony export */ "getType": () => (/* binding */ getType),
3296 /* harmony export */ "isAnyObject": () => (/* binding */ isAnyObject),
3297 /* harmony export */ "isArray": () => (/* binding */ isArray),
3298 /* harmony export */ "isBlob": () => (/* binding */ isBlob),
3299 /* harmony export */ "isBoolean": () => (/* binding */ isBoolean),
3300 /* harmony export */ "isDate": () => (/* binding */ isDate),
3301 /* harmony export */ "isEmptyArray": () => (/* binding */ isEmptyArray),
3302 /* harmony export */ "isEmptyObject": () => (/* binding */ isEmptyObject),
3303 /* harmony export */ "isEmptyString": () => (/* binding */ isEmptyString),
3304 /* harmony export */ "isError": () => (/* binding */ isError),
3305 /* harmony export */ "isFile": () => (/* binding */ isFile),
3306 /* harmony export */ "isFullArray": () => (/* binding */ isFullArray),
3307 /* harmony export */ "isFullObject": () => (/* binding */ isFullObject),
3308 /* harmony export */ "isFullString": () => (/* binding */ isFullString),
3309 /* harmony export */ "isFunction": () => (/* binding */ isFunction),
3310 /* harmony export */ "isMap": () => (/* binding */ isMap),
3311 /* harmony export */ "isNaNValue": () => (/* binding */ isNaNValue),
3312 /* harmony export */ "isNull": () => (/* binding */ isNull),
3313 /* harmony export */ "isNullOrUndefined": () => (/* binding */ isNullOrUndefined),
3314 /* harmony export */ "isNumber": () => (/* binding */ isNumber),
3315 /* harmony export */ "isObject": () => (/* binding */ isObject),
3316 /* harmony export */ "isObjectLike": () => (/* binding */ isObjectLike),
3317 /* harmony export */ "isOneOf": () => (/* binding */ isOneOf),
3318 /* harmony export */ "isPlainObject": () => (/* binding */ isPlainObject),
3319 /* harmony export */ "isPrimitive": () => (/* binding */ isPrimitive),
3320 /* harmony export */ "isPromise": () => (/* binding */ isPromise),
3321 /* harmony export */ "isRegExp": () => (/* binding */ isRegExp),
3322 /* harmony export */ "isSet": () => (/* binding */ isSet),
3323 /* harmony export */ "isString": () => (/* binding */ isString),
3324 /* harmony export */ "isSymbol": () => (/* binding */ isSymbol),
3325 /* harmony export */ "isType": () => (/* binding */ isType),
3326 /* harmony export */ "isUndefined": () => (/* binding */ isUndefined),
3327 /* harmony export */ "isWeakMap": () => (/* binding */ isWeakMap),
3328 /* harmony export */ "isWeakSet": () => (/* binding */ isWeakSet)
3329 /* harmony export */ });
3330 /**
3331 * Returns the object type of the given payload
3332 *
3333 * @param {*} payload
3334 * @returns {string}
3335 */
3336 function getType(payload) {
3337 return Object.prototype.toString.call(payload).slice(8, -1);
3338 }
3339 /**
3340 * Returns whether the payload is undefined
3341 *
3342 * @param {*} payload
3343 * @returns {payload is undefined}
3344 */
3345 function isUndefined(payload) {
3346 return getType(payload) === 'Undefined';
3347 }
3348 /**
3349 * Returns whether the payload is null
3350 *
3351 * @param {*} payload
3352 * @returns {payload is null}
3353 */
3354 function isNull(payload) {
3355 return getType(payload) === 'Null';
3356 }
3357 /**
3358 * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
3359 *
3360 * @param {*} payload
3361 * @returns {payload is PlainObject}
3362 */
3363 function isPlainObject(payload) {
3364 if (getType(payload) !== 'Object')
3365 return false;
3366 return payload.constructor === Object && Object.getPrototypeOf(payload) === Object.prototype;
3367 }
3368 /**
3369 * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
3370 *
3371 * @param {*} payload
3372 * @returns {payload is PlainObject}
3373 */
3374 function isObject(payload) {
3375 return isPlainObject(payload);
3376 }
3377 /**
3378 * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
3379 *
3380 * @param {*} payload
3381 * @returns {payload is { [K in any]: never }}
3382 */
3383 function isEmptyObject(payload) {
3384 return isPlainObject(payload) && Object.keys(payload).length === 0;
3385 }
3386 /**
3387 * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
3388 *
3389 * @param {*} payload
3390 * @returns {payload is PlainObject}
3391 */
3392 function isFullObject(payload) {
3393 return isPlainObject(payload) && Object.keys(payload).length > 0;
3394 }
3395 /**
3396 * Returns whether the payload is an any kind of object (including special classes or objects with different prototypes)
3397 *
3398 * @param {*} payload
3399 * @returns {payload is PlainObject}
3400 */
3401 function isAnyObject(payload) {
3402 return getType(payload) === 'Object';
3403 }
3404 /**
3405 * Returns whether the payload is an object like a type passed in < >
3406 *
3407 * Usage: isObjectLike<{id: any}>(payload) // will make sure it's an object and has an `id` prop.
3408 *
3409 * @template T this must be passed in < >
3410 * @param {*} payload
3411 * @returns {payload is T}
3412 */
3413 function isObjectLike(payload) {
3414 return isAnyObject(payload);
3415 }
3416 /**
3417 * Returns whether the payload is a function (regular or async)
3418 *
3419 * @param {*} payload
3420 * @returns {payload is AnyFunction}
3421 */
3422 function isFunction(payload) {
3423 return typeof payload === 'function';
3424 }
3425 /**
3426 * Returns whether the payload is an array
3427 *
3428 * @param {any} payload
3429 * @returns {payload is any[]}
3430 */
3431 function isArray(payload) {
3432 return getType(payload) === 'Array';
3433 }
3434 /**
3435 * Returns whether the payload is a an array with at least 1 item
3436 *
3437 * @param {*} payload
3438 * @returns {payload is any[]}
3439 */
3440 function isFullArray(payload) {
3441 return isArray(payload) && payload.length > 0;
3442 }
3443 /**
3444 * Returns whether the payload is a an empty array
3445 *
3446 * @param {*} payload
3447 * @returns {payload is []}
3448 */
3449 function isEmptyArray(payload) {
3450 return isArray(payload) && payload.length === 0;
3451 }
3452 /**
3453 * Returns whether the payload is a string
3454 *
3455 * @param {*} payload
3456 * @returns {payload is string}
3457 */
3458 function isString(payload) {
3459 return getType(payload) === 'String';
3460 }
3461 /**
3462 * Returns whether the payload is a string, BUT returns false for ''
3463 *
3464 * @param {*} payload
3465 * @returns {payload is string}
3466 */
3467 function isFullString(payload) {
3468 return isString(payload) && payload !== '';
3469 }
3470 /**
3471 * Returns whether the payload is ''
3472 *
3473 * @param {*} payload
3474 * @returns {payload is string}
3475 */
3476 function isEmptyString(payload) {
3477 return payload === '';
3478 }
3479 /**
3480 * Returns whether the payload is a number (but not NaN)
3481 *
3482 * This will return `false` for `NaN`!!
3483 *
3484 * @param {*} payload
3485 * @returns {payload is number}
3486 */
3487 function isNumber(payload) {
3488 return getType(payload) === 'Number' && !isNaN(payload);
3489 }
3490 /**
3491 * Returns whether the payload is a boolean
3492 *
3493 * @param {*} payload
3494 * @returns {payload is boolean}
3495 */
3496 function isBoolean(payload) {
3497 return getType(payload) === 'Boolean';
3498 }
3499 /**
3500 * Returns whether the payload is a regular expression (RegExp)
3501 *
3502 * @param {*} payload
3503 * @returns {payload is RegExp}
3504 */
3505 function isRegExp(payload) {
3506 return getType(payload) === 'RegExp';
3507 }
3508 /**
3509 * Returns whether the payload is a Map
3510 *
3511 * @param {*} payload
3512 * @returns {payload is Map<any, any>}
3513 */
3514 function isMap(payload) {
3515 return getType(payload) === 'Map';
3516 }
3517 /**
3518 * Returns whether the payload is a WeakMap
3519 *
3520 * @param {*} payload
3521 * @returns {payload is WeakMap<any, any>}
3522 */
3523 function isWeakMap(payload) {
3524 return getType(payload) === 'WeakMap';
3525 }
3526 /**
3527 * Returns whether the payload is a Set
3528 *
3529 * @param {*} payload
3530 * @returns {payload is Set<any>}
3531 */
3532 function isSet(payload) {
3533 return getType(payload) === 'Set';
3534 }
3535 /**
3536 * Returns whether the payload is a WeakSet
3537 *
3538 * @param {*} payload
3539 * @returns {payload is WeakSet<any>}
3540 */
3541 function isWeakSet(payload) {
3542 return getType(payload) === 'WeakSet';
3543 }
3544 /**
3545 * Returns whether the payload is a Symbol
3546 *
3547 * @param {*} payload
3548 * @returns {payload is symbol}
3549 */
3550 function isSymbol(payload) {
3551 return getType(payload) === 'Symbol';
3552 }
3553 /**
3554 * Returns whether the payload is a Date, and that the date is valid
3555 *
3556 * @param {*} payload
3557 * @returns {payload is Date}
3558 */
3559 function isDate(payload) {
3560 return getType(payload) === 'Date' && !isNaN(payload);
3561 }
3562 /**
3563 * Returns whether the payload is a Blob
3564 *
3565 * @param {*} payload
3566 * @returns {payload is Blob}
3567 */
3568 function isBlob(payload) {
3569 return getType(payload) === 'Blob';
3570 }
3571 /**
3572 * Returns whether the payload is a File
3573 *
3574 * @param {*} payload
3575 * @returns {payload is File}
3576 */
3577 function isFile(payload) {
3578 return getType(payload) === 'File';
3579 }
3580 /**
3581 * Returns whether the payload is a Promise
3582 *
3583 * @param {*} payload
3584 * @returns {payload is Promise<any>}
3585 */
3586 function isPromise(payload) {
3587 return getType(payload) === 'Promise';
3588 }
3589 /**
3590 * Returns whether the payload is an Error
3591 *
3592 * @param {*} payload
3593 * @returns {payload is Error}
3594 */
3595 function isError(payload) {
3596 return getType(payload) === 'Error';
3597 }
3598 /**
3599 * Returns whether the payload is literally the value `NaN` (it's `NaN` and also a `number`)
3600 *
3601 * @param {*} payload
3602 * @returns {payload is typeof NaN}
3603 */
3604 function isNaNValue(payload) {
3605 return getType(payload) === 'Number' && isNaN(payload);
3606 }
3607 /**
3608 * Returns whether the payload is a primitive type (eg. Boolean | Null | Undefined | Number | String | Symbol)
3609 *
3610 * @param {*} payload
3611 * @returns {(payload is boolean | null | undefined | number | string | symbol)}
3612 */
3613 function isPrimitive(payload) {
3614 return (isBoolean(payload) ||
3615 isNull(payload) ||
3616 isUndefined(payload) ||
3617 isNumber(payload) ||
3618 isString(payload) ||
3619 isSymbol(payload));
3620 }
3621 /**
3622 * Returns true whether the payload is null or undefined
3623 *
3624 * @param {*} payload
3625 * @returns {(payload is null | undefined)}
3626 */
3627 var isNullOrUndefined = isOneOf(isNull, isUndefined);
3628 function isOneOf(a, b, c, d, e) {
3629 return function (value) {
3630 return a(value) || b(value) || (!!c && c(value)) || (!!d && d(value)) || (!!e && e(value));
3631 };
3632 }
3633 /**
3634 * Does a generic check to check that the given payload is of a given type.
3635 * In cases like Number, it will return true for NaN as NaN is a Number (thanks javascript!);
3636 * It will, however, differentiate between object and null
3637 *
3638 * @template T
3639 * @param {*} payload
3640 * @param {T} type
3641 * @throws {TypeError} Will throw type error if type is an invalid type
3642 * @returns {payload is T}
3643 */
3644 function isType(payload, type) {
3645 if (!(type instanceof Function)) {
3646 throw new TypeError('Type must be a function');
3647 }
3648 if (!Object.prototype.hasOwnProperty.call(type, 'prototype')) {
3649 throw new TypeError('Type is not a class');
3650 }
3651 // Classes usually have names (as functions usually have names)
3652 var name = type.name;
3653 return getType(payload) === name || Boolean(payload && payload.constructor === type);
3654 }
3655
3656
3657
3658
3659 /***/ }),
3660
3661 /***/ "./node_modules/lodash/_Symbol.js":
3662 /*!****************************************!*\
3663 !*** ./node_modules/lodash/_Symbol.js ***!
3664 \****************************************/
3665 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3666
3667 var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
3668
3669 /** Built-in value references. */
3670 var Symbol = root.Symbol;
3671
3672 module.exports = Symbol;
3673
3674
3675 /***/ }),
3676
3677 /***/ "./node_modules/lodash/_baseGetTag.js":
3678 /*!********************************************!*\
3679 !*** ./node_modules/lodash/_baseGetTag.js ***!
3680 \********************************************/
3681 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3682
3683 var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"),
3684 getRawTag = __webpack_require__(/*! ./_getRawTag */ "./node_modules/lodash/_getRawTag.js"),
3685 objectToString = __webpack_require__(/*! ./_objectToString */ "./node_modules/lodash/_objectToString.js");
3686
3687 /** `Object#toString` result references. */
3688 var nullTag = '[object Null]',
3689 undefinedTag = '[object Undefined]';
3690
3691 /** Built-in value references. */
3692 var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
3693
3694 /**
3695 * The base implementation of `getTag` without fallbacks for buggy environments.
3696 *
3697 * @private
3698 * @param {*} value The value to query.
3699 * @returns {string} Returns the `toStringTag`.
3700 */
3701 function baseGetTag(value) {
3702 if (value == null) {
3703 return value === undefined ? undefinedTag : nullTag;
3704 }
3705 return (symToStringTag && symToStringTag in Object(value))
3706 ? getRawTag(value)
3707 : objectToString(value);
3708 }
3709
3710 module.exports = baseGetTag;
3711
3712
3713 /***/ }),
3714
3715 /***/ "./node_modules/lodash/_baseTrim.js":
3716 /*!******************************************!*\
3717 !*** ./node_modules/lodash/_baseTrim.js ***!
3718 \******************************************/
3719 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3720
3721 var trimmedEndIndex = __webpack_require__(/*! ./_trimmedEndIndex */ "./node_modules/lodash/_trimmedEndIndex.js");
3722
3723 /** Used to match leading whitespace. */
3724 var reTrimStart = /^\s+/;
3725
3726 /**
3727 * The base implementation of `_.trim`.
3728 *
3729 * @private
3730 * @param {string} string The string to trim.
3731 * @returns {string} Returns the trimmed string.
3732 */
3733 function baseTrim(string) {
3734 return string
3735 ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
3736 : string;
3737 }
3738
3739 module.exports = baseTrim;
3740
3741
3742 /***/ }),
3743
3744 /***/ "./node_modules/lodash/_freeGlobal.js":
3745 /*!********************************************!*\
3746 !*** ./node_modules/lodash/_freeGlobal.js ***!
3747 \********************************************/
3748 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3749
3750 /** Detect free variable `global` from Node.js. */
3751 var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
3752
3753 module.exports = freeGlobal;
3754
3755
3756 /***/ }),
3757
3758 /***/ "./node_modules/lodash/_getRawTag.js":
3759 /*!*******************************************!*\
3760 !*** ./node_modules/lodash/_getRawTag.js ***!
3761 \*******************************************/
3762 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3763
3764 var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js");
3765
3766 /** Used for built-in method references. */
3767 var objectProto = Object.prototype;
3768
3769 /** Used to check objects for own properties. */
3770 var hasOwnProperty = objectProto.hasOwnProperty;
3771
3772 /**
3773 * Used to resolve the
3774 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3775 * of values.
3776 */
3777 var nativeObjectToString = objectProto.toString;
3778
3779 /** Built-in value references. */
3780 var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
3781
3782 /**
3783 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
3784 *
3785 * @private
3786 * @param {*} value The value to query.
3787 * @returns {string} Returns the raw `toStringTag`.
3788 */
3789 function getRawTag(value) {
3790 var isOwn = hasOwnProperty.call(value, symToStringTag),
3791 tag = value[symToStringTag];
3792
3793 try {
3794 value[symToStringTag] = undefined;
3795 var unmasked = true;
3796 } catch (e) {}
3797
3798 var result = nativeObjectToString.call(value);
3799 if (unmasked) {
3800 if (isOwn) {
3801 value[symToStringTag] = tag;
3802 } else {
3803 delete value[symToStringTag];
3804 }
3805 }
3806 return result;
3807 }
3808
3809 module.exports = getRawTag;
3810
3811
3812 /***/ }),
3813
3814 /***/ "./node_modules/lodash/_objectToString.js":
3815 /*!************************************************!*\
3816 !*** ./node_modules/lodash/_objectToString.js ***!
3817 \************************************************/
3818 /***/ ((module) => {
3819
3820 /** Used for built-in method references. */
3821 var objectProto = Object.prototype;
3822
3823 /**
3824 * Used to resolve the
3825 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3826 * of values.
3827 */
3828 var nativeObjectToString = objectProto.toString;
3829
3830 /**
3831 * Converts `value` to a string using `Object.prototype.toString`.
3832 *
3833 * @private
3834 * @param {*} value The value to convert.
3835 * @returns {string} Returns the converted string.
3836 */
3837 function objectToString(value) {
3838 return nativeObjectToString.call(value);
3839 }
3840
3841 module.exports = objectToString;
3842
3843
3844 /***/ }),
3845
3846 /***/ "./node_modules/lodash/_root.js":
3847 /*!**************************************!*\
3848 !*** ./node_modules/lodash/_root.js ***!
3849 \**************************************/
3850 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3851
3852 var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js");
3853
3854 /** Detect free variable `self`. */
3855 var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
3856
3857 /** Used as a reference to the global object. */
3858 var root = freeGlobal || freeSelf || Function('return this')();
3859
3860 module.exports = root;
3861
3862
3863 /***/ }),
3864
3865 /***/ "./node_modules/lodash/_trimmedEndIndex.js":
3866 /*!*************************************************!*\
3867 !*** ./node_modules/lodash/_trimmedEndIndex.js ***!
3868 \*************************************************/
3869 /***/ ((module) => {
3870
3871 /** Used to match a single whitespace character. */
3872 var reWhitespace = /\s/;
3873
3874 /**
3875 * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
3876 * character of `string`.
3877 *
3878 * @private
3879 * @param {string} string The string to inspect.
3880 * @returns {number} Returns the index of the last non-whitespace character.
3881 */
3882 function trimmedEndIndex(string) {
3883 var index = string.length;
3884
3885 while (index-- && reWhitespace.test(string.charAt(index))) {}
3886 return index;
3887 }
3888
3889 module.exports = trimmedEndIndex;
3890
3891
3892 /***/ }),
3893
3894 /***/ "./node_modules/lodash/debounce.js":
3895 /*!*****************************************!*\
3896 !*** ./node_modules/lodash/debounce.js ***!
3897 \*****************************************/
3898 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3899
3900 var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
3901 now = __webpack_require__(/*! ./now */ "./node_modules/lodash/now.js"),
3902 toNumber = __webpack_require__(/*! ./toNumber */ "./node_modules/lodash/toNumber.js");
3903
3904 /** Error message constants. */
3905 var FUNC_ERROR_TEXT = 'Expected a function';
3906
3907 /* Built-in method references for those with the same name as other `lodash` methods. */
3908 var nativeMax = Math.max,
3909 nativeMin = Math.min;
3910
3911 /**
3912 * Creates a debounced function that delays invoking `func` until after `wait`
3913 * milliseconds have elapsed since the last time the debounced function was
3914 * invoked. The debounced function comes with a `cancel` method to cancel
3915 * delayed `func` invocations and a `flush` method to immediately invoke them.
3916 * Provide `options` to indicate whether `func` should be invoked on the
3917 * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
3918 * with the last arguments provided to the debounced function. Subsequent
3919 * calls to the debounced function return the result of the last `func`
3920 * invocation.
3921 *
3922 * **Note:** If `leading` and `trailing` options are `true`, `func` is
3923 * invoked on the trailing edge of the timeout only if the debounced function
3924 * is invoked more than once during the `wait` timeout.
3925 *
3926 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
3927 * until to the next tick, similar to `setTimeout` with a timeout of `0`.
3928 *
3929 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
3930 * for details over the differences between `_.debounce` and `_.throttle`.
3931 *
3932 * @static
3933 * @memberOf _
3934 * @since 0.1.0
3935 * @category Function
3936 * @param {Function} func The function to debounce.
3937 * @param {number} [wait=0] The number of milliseconds to delay.
3938 * @param {Object} [options={}] The options object.
3939 * @param {boolean} [options.leading=false]
3940 * Specify invoking on the leading edge of the timeout.
3941 * @param {number} [options.maxWait]
3942 * The maximum time `func` is allowed to be delayed before it's invoked.
3943 * @param {boolean} [options.trailing=true]
3944 * Specify invoking on the trailing edge of the timeout.
3945 * @returns {Function} Returns the new debounced function.
3946 * @example
3947 *
3948 * // Avoid costly calculations while the window size is in flux.
3949 * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
3950 *
3951 * // Invoke `sendMail` when clicked, debouncing subsequent calls.
3952 * jQuery(element).on('click', _.debounce(sendMail, 300, {
3953 * 'leading': true,
3954 * 'trailing': false
3955 * }));
3956 *
3957 * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
3958 * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
3959 * var source = new EventSource('/stream');
3960 * jQuery(source).on('message', debounced);
3961 *
3962 * // Cancel the trailing debounced invocation.
3963 * jQuery(window).on('popstate', debounced.cancel);
3964 */
3965 function debounce(func, wait, options) {
3966 var lastArgs,
3967 lastThis,
3968 maxWait,
3969 result,
3970 timerId,
3971 lastCallTime,
3972 lastInvokeTime = 0,
3973 leading = false,
3974 maxing = false,
3975 trailing = true;
3976
3977 if (typeof func != 'function') {
3978 throw new TypeError(FUNC_ERROR_TEXT);
3979 }
3980 wait = toNumber(wait) || 0;
3981 if (isObject(options)) {
3982 leading = !!options.leading;
3983 maxing = 'maxWait' in options;
3984 maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
3985 trailing = 'trailing' in options ? !!options.trailing : trailing;
3986 }
3987
3988 function invokeFunc(time) {
3989 var args = lastArgs,
3990 thisArg = lastThis;
3991
3992 lastArgs = lastThis = undefined;
3993 lastInvokeTime = time;
3994 result = func.apply(thisArg, args);
3995 return result;
3996 }
3997
3998 function leadingEdge(time) {
3999 // Reset any `maxWait` timer.
4000 lastInvokeTime = time;
4001 // Start the timer for the trailing edge.
4002 timerId = setTimeout(timerExpired, wait);
4003 // Invoke the leading edge.
4004 return leading ? invokeFunc(time) : result;
4005 }
4006
4007 function remainingWait(time) {
4008 var timeSinceLastCall = time - lastCallTime,
4009 timeSinceLastInvoke = time - lastInvokeTime,
4010 timeWaiting = wait - timeSinceLastCall;
4011
4012 return maxing
4013 ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
4014 : timeWaiting;
4015 }
4016
4017 function shouldInvoke(time) {
4018 var timeSinceLastCall = time - lastCallTime,
4019 timeSinceLastInvoke = time - lastInvokeTime;
4020
4021 // Either this is the first call, activity has stopped and we're at the
4022 // trailing edge, the system time has gone backwards and we're treating
4023 // it as the trailing edge, or we've hit the `maxWait` limit.
4024 return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
4025 (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
4026 }
4027
4028 function timerExpired() {
4029 var time = now();
4030 if (shouldInvoke(time)) {
4031 return trailingEdge(time);
4032 }
4033 // Restart the timer.
4034 timerId = setTimeout(timerExpired, remainingWait(time));
4035 }
4036
4037 function trailingEdge(time) {
4038 timerId = undefined;
4039
4040 // Only invoke if we have `lastArgs` which means `func` has been
4041 // debounced at least once.
4042 if (trailing && lastArgs) {
4043 return invokeFunc(time);
4044 }
4045 lastArgs = lastThis = undefined;
4046 return result;
4047 }
4048
4049 function cancel() {
4050 if (timerId !== undefined) {
4051 clearTimeout(timerId);
4052 }
4053 lastInvokeTime = 0;
4054 lastArgs = lastCallTime = lastThis = timerId = undefined;
4055 }
4056
4057 function flush() {
4058 return timerId === undefined ? result : trailingEdge(now());
4059 }
4060
4061 function debounced() {
4062 var time = now(),
4063 isInvoking = shouldInvoke(time);
4064
4065 lastArgs = arguments;
4066 lastThis = this;
4067 lastCallTime = time;
4068
4069 if (isInvoking) {
4070 if (timerId === undefined) {
4071 return leadingEdge(lastCallTime);
4072 }
4073 if (maxing) {
4074 // Handle invocations in a tight loop.
4075 clearTimeout(timerId);
4076 timerId = setTimeout(timerExpired, wait);
4077 return invokeFunc(lastCallTime);
4078 }
4079 }
4080 if (timerId === undefined) {
4081 timerId = setTimeout(timerExpired, wait);
4082 }
4083 return result;
4084 }
4085 debounced.cancel = cancel;
4086 debounced.flush = flush;
4087 return debounced;
4088 }
4089
4090 module.exports = debounce;
4091
4092
4093 /***/ }),
4094
4095 /***/ "./node_modules/lodash/isObject.js":
4096 /*!*****************************************!*\
4097 !*** ./node_modules/lodash/isObject.js ***!
4098 \*****************************************/
4099 /***/ ((module) => {
4100
4101 /**
4102 * Checks if `value` is the
4103 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
4104 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
4105 *
4106 * @static
4107 * @memberOf _
4108 * @since 0.1.0
4109 * @category Lang
4110 * @param {*} value The value to check.
4111 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
4112 * @example
4113 *
4114 * _.isObject({});
4115 * // => true
4116 *
4117 * _.isObject([1, 2, 3]);
4118 * // => true
4119 *
4120 * _.isObject(_.noop);
4121 * // => true
4122 *
4123 * _.isObject(null);
4124 * // => false
4125 */
4126 function isObject(value) {
4127 var type = typeof value;
4128 return value != null && (type == 'object' || type == 'function');
4129 }
4130
4131 module.exports = isObject;
4132
4133
4134 /***/ }),
4135
4136 /***/ "./node_modules/lodash/isObjectLike.js":
4137 /*!*********************************************!*\
4138 !*** ./node_modules/lodash/isObjectLike.js ***!
4139 \*********************************************/
4140 /***/ ((module) => {
4141
4142 /**
4143 * Checks if `value` is object-like. A value is object-like if it's not `null`
4144 * and has a `typeof` result of "object".
4145 *
4146 * @static
4147 * @memberOf _
4148 * @since 4.0.0
4149 * @category Lang
4150 * @param {*} value The value to check.
4151 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
4152 * @example
4153 *
4154 * _.isObjectLike({});
4155 * // => true
4156 *
4157 * _.isObjectLike([1, 2, 3]);
4158 * // => true
4159 *
4160 * _.isObjectLike(_.noop);
4161 * // => false
4162 *
4163 * _.isObjectLike(null);
4164 * // => false
4165 */
4166 function isObjectLike(value) {
4167 return value != null && typeof value == 'object';
4168 }
4169
4170 module.exports = isObjectLike;
4171
4172
4173 /***/ }),
4174
4175 /***/ "./node_modules/lodash/isSymbol.js":
4176 /*!*****************************************!*\
4177 !*** ./node_modules/lodash/isSymbol.js ***!
4178 \*****************************************/
4179 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4180
4181 var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
4182 isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
4183
4184 /** `Object#toString` result references. */
4185 var symbolTag = '[object Symbol]';
4186
4187 /**
4188 * Checks if `value` is classified as a `Symbol` primitive or object.
4189 *
4190 * @static
4191 * @memberOf _
4192 * @since 4.0.0
4193 * @category Lang
4194 * @param {*} value The value to check.
4195 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
4196 * @example
4197 *
4198 * _.isSymbol(Symbol.iterator);
4199 * // => true
4200 *
4201 * _.isSymbol('abc');
4202 * // => false
4203 */
4204 function isSymbol(value) {
4205 return typeof value == 'symbol' ||
4206 (isObjectLike(value) && baseGetTag(value) == symbolTag);
4207 }
4208
4209 module.exports = isSymbol;
4210
4211
4212 /***/ }),
4213
4214 /***/ "./node_modules/lodash/now.js":
4215 /*!************************************!*\
4216 !*** ./node_modules/lodash/now.js ***!
4217 \************************************/
4218 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4219
4220 var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
4221
4222 /**
4223 * Gets the timestamp of the number of milliseconds that have elapsed since
4224 * the Unix epoch (1 January 1970 00:00:00 UTC).
4225 *
4226 * @static
4227 * @memberOf _
4228 * @since 2.4.0
4229 * @category Date
4230 * @returns {number} Returns the timestamp.
4231 * @example
4232 *
4233 * _.defer(function(stamp) {
4234 * console.log(_.now() - stamp);
4235 * }, _.now());
4236 * // => Logs the number of milliseconds it took for the deferred invocation.
4237 */
4238 var now = function() {
4239 return root.Date.now();
4240 };
4241
4242 module.exports = now;
4243
4244
4245 /***/ }),
4246
4247 /***/ "./node_modules/lodash/toNumber.js":
4248 /*!*****************************************!*\
4249 !*** ./node_modules/lodash/toNumber.js ***!
4250 \*****************************************/
4251 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4252
4253 var baseTrim = __webpack_require__(/*! ./_baseTrim */ "./node_modules/lodash/_baseTrim.js"),
4254 isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
4255 isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js");
4256
4257 /** Used as references for various `Number` constants. */
4258 var NAN = 0 / 0;
4259
4260 /** Used to detect bad signed hexadecimal string values. */
4261 var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
4262
4263 /** Used to detect binary string values. */
4264 var reIsBinary = /^0b[01]+$/i;
4265
4266 /** Used to detect octal string values. */
4267 var reIsOctal = /^0o[0-7]+$/i;
4268
4269 /** Built-in method references without a dependency on `root`. */
4270 var freeParseInt = parseInt;
4271
4272 /**
4273 * Converts `value` to a number.
4274 *
4275 * @static
4276 * @memberOf _
4277 * @since 4.0.0
4278 * @category Lang
4279 * @param {*} value The value to process.
4280 * @returns {number} Returns the number.
4281 * @example
4282 *
4283 * _.toNumber(3.2);
4284 * // => 3.2
4285 *
4286 * _.toNumber(Number.MIN_VALUE);
4287 * // => 5e-324
4288 *
4289 * _.toNumber(Infinity);
4290 * // => Infinity
4291 *
4292 * _.toNumber('3.2');
4293 * // => 3.2
4294 */
4295 function toNumber(value) {
4296 if (typeof value == 'number') {
4297 return value;
4298 }
4299 if (isSymbol(value)) {
4300 return NAN;
4301 }
4302 if (isObject(value)) {
4303 var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
4304 value = isObject(other) ? (other + '') : other;
4305 }
4306 if (typeof value != 'string') {
4307 return value === 0 ? value : +value;
4308 }
4309 value = baseTrim(value);
4310 var isBinary = reIsBinary.test(value);
4311 return (isBinary || reIsOctal.test(value))
4312 ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
4313 : (reIsBadHex.test(value) ? NAN : +value);
4314 }
4315
4316 module.exports = toNumber;
4317
4318
4319 /***/ }),
4320
4321 /***/ "./node_modules/memoize-one/dist/memoize-one.esm.js":
4322 /*!**********************************************************!*\
4323 !*** ./node_modules/memoize-one/dist/memoize-one.esm.js ***!
4324 \**********************************************************/
4325 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4326
4327 "use strict";
4328 __webpack_require__.r(__webpack_exports__);
4329 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4330 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
4331 /* harmony export */ });
4332 var safeIsNaN = Number.isNaN ||
4333 function ponyfill(value) {
4334 return typeof value === 'number' && value !== value;
4335 };
4336 function isEqual(first, second) {
4337 if (first === second) {
4338 return true;
4339 }
4340 if (safeIsNaN(first) && safeIsNaN(second)) {
4341 return true;
4342 }
4343 return false;
4344 }
4345 function areInputsEqual(newInputs, lastInputs) {
4346 if (newInputs.length !== lastInputs.length) {
4347 return false;
4348 }
4349 for (var i = 0; i < newInputs.length; i++) {
4350 if (!isEqual(newInputs[i], lastInputs[i])) {
4351 return false;
4352 }
4353 }
4354 return true;
4355 }
4356
4357 function memoizeOne(resultFn, isEqual) {
4358 if (isEqual === void 0) { isEqual = areInputsEqual; }
4359 var lastThis;
4360 var lastArgs = [];
4361 var lastResult;
4362 var calledOnce = false;
4363 function memoized() {
4364 var newArgs = [];
4365 for (var _i = 0; _i < arguments.length; _i++) {
4366 newArgs[_i] = arguments[_i];
4367 }
4368 if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {
4369 return lastResult;
4370 }
4371 lastResult = resultFn.apply(this, newArgs);
4372 calledOnce = true;
4373 lastThis = this;
4374 lastArgs = newArgs;
4375 return lastResult;
4376 }
4377 return memoized;
4378 }
4379
4380 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoizeOne);
4381
4382
4383 /***/ }),
4384
4385 /***/ "./node_modules/merge-anything/dist/index.esm.js":
4386 /*!*******************************************************!*\
4387 !*** ./node_modules/merge-anything/dist/index.esm.js ***!
4388 \*******************************************************/
4389 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4390
4391 "use strict";
4392 __webpack_require__.r(__webpack_exports__);
4393 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4394 /* harmony export */ "concatArrays": () => (/* binding */ concatArrays),
4395 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
4396 /* harmony export */ "merge": () => (/* binding */ merge)
4397 /* harmony export */ });
4398 /* harmony import */ var is_what__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-what */ "./node_modules/is-what/dist/index.esm.js");
4399
4400
4401 /*! *****************************************************************************
4402 Copyright (c) Microsoft Corporation. All rights reserved.
4403 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4404 this file except in compliance with the License. You may obtain a copy of the
4405 License at http://www.apache.org/licenses/LICENSE-2.0
4406
4407 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
4408 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
4409 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
4410 MERCHANTABLITY OR NON-INFRINGEMENT.
4411
4412 See the Apache Version 2.0 License for specific language governing permissions
4413 and limitations under the License.
4414 ***************************************************************************** */
4415
4416 function __spreadArrays() {
4417 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
4418 for (var r = Array(s), k = 0, i = 0; i < il; i++)
4419 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
4420 r[k] = a[j];
4421 return r;
4422 }
4423
4424 function assignProp(carry, key, newVal, originalObject) {
4425 var propType = originalObject.propertyIsEnumerable(key)
4426 ? 'enumerable'
4427 : 'nonenumerable';
4428 if (propType === 'enumerable')
4429 carry[key] = newVal;
4430 if (propType === 'nonenumerable') {
4431 Object.defineProperty(carry, key, {
4432 value: newVal,
4433 enumerable: false,
4434 writable: true,
4435 configurable: true
4436 });
4437 }
4438 }
4439 function mergeRecursively(origin, newComer, extensions) {
4440 // work directly on newComer if its not an object
4441 if (!(0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(newComer)) {
4442 // extend merge rules
4443 if (extensions && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(extensions)) {
4444 extensions.forEach(function (extend) {
4445 newComer = extend(origin, newComer);
4446 });
4447 }
4448 return newComer;
4449 }
4450 // define newObject to merge all values upon
4451 var newObject = {};
4452 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin)) {
4453 var props_1 = Object.getOwnPropertyNames(origin);
4454 var symbols_1 = Object.getOwnPropertySymbols(origin);
4455 newObject = __spreadArrays(props_1, symbols_1).reduce(function (carry, key) {
4456 // @ts-ignore
4457 var targetVal = origin[key];
4458 if ((!(0,is_what__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) && !Object.getOwnPropertyNames(newComer).includes(key)) ||
4459 ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) && !Object.getOwnPropertySymbols(newComer).includes(key))) {
4460 assignProp(carry, key, targetVal, origin);
4461 }
4462 return carry;
4463 }, {});
4464 }
4465 var props = Object.getOwnPropertyNames(newComer);
4466 var symbols = Object.getOwnPropertySymbols(newComer);
4467 var result = __spreadArrays(props, symbols).reduce(function (carry, key) {
4468 // re-define the origin and newComer as targetVal and newVal
4469 var newVal = newComer[key];
4470 var targetVal = ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin))
4471 // @ts-ignore
4472 ? origin[key]
4473 : undefined;
4474 // extend merge rules
4475 if (extensions && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(extensions)) {
4476 extensions.forEach(function (extend) {
4477 newVal = extend(targetVal, newVal);
4478 });
4479 }
4480 // When newVal is an object do the merge recursively
4481 if (targetVal !== undefined && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(newVal)) {
4482 newVal = mergeRecursively(targetVal, newVal, extensions);
4483 }
4484 assignProp(carry, key, newVal, newComer);
4485 return carry;
4486 }, newObject);
4487 return result;
4488 }
4489 /**
4490 * Merge anything recursively.
4491 * Objects get merged, special objects (classes etc.) are re-assigned "as is".
4492 * Basic types overwrite objects or other basic types.
4493 *
4494 * @param {(IConfig | any)} origin
4495 * @param {...any[]} newComers
4496 * @returns the result
4497 */
4498 function merge(origin) {
4499 var newComers = [];
4500 for (var _i = 1; _i < arguments.length; _i++) {
4501 newComers[_i - 1] = arguments[_i];
4502 }
4503 var extensions = null;
4504 var base = origin;
4505 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin) && origin.extensions && Object.keys(origin).length === 1) {
4506 base = {};
4507 extensions = origin.extensions;
4508 }
4509 return newComers.reduce(function (result, newComer) {
4510 return mergeRecursively(result, newComer, extensions);
4511 }, base);
4512 }
4513
4514 function concatArrays(originVal, newVal) {
4515 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(originVal) && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(newVal)) {
4516 // concat logic
4517 return originVal.concat(newVal);
4518 }
4519 return newVal; // always return newVal as fallback!!
4520 }
4521
4522 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (merge);
4523
4524
4525
4526 /***/ }),
4527
4528 /***/ "./scripts/gutenberg/UIComponents/UIImage.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/gutenberg/UIComponents/UIImage.ts":
4529 /*!****************************************************************************************************************************************************************************************!*\
4530 !*** ./scripts/gutenberg/UIComponents/UIImage.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/gutenberg/UIComponents/UIImage.ts ***!
4531 \****************************************************************************************************************************************************************************************/
4532 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4533
4534 "use strict";
4535 __webpack_require__.r(__webpack_exports__);
4536 // extracted by mini-css-extract-plugin
4537
4538
4539 /***/ }),
4540
4541 /***/ "./scripts/shared/Common/AsyncSelect.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/AsyncSelect.tsx":
4542 /*!*******************************************************************************************************************************************************************************!*\
4543 !*** ./scripts/shared/Common/AsyncSelect.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/AsyncSelect.tsx ***!
4544 \*******************************************************************************************************************************************************************************/
4545 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4546
4547 "use strict";
4548 __webpack_require__.r(__webpack_exports__);
4549 // extracted by mini-css-extract-plugin
4550
4551
4552 /***/ }),
4553
4554 /***/ "./scripts/shared/Common/HubspotWrapper.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/HubspotWrapper.ts":
4555 /*!************************************************************************************************************************************************************************************!*\
4556 !*** ./scripts/shared/Common/HubspotWrapper.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/HubspotWrapper.ts ***!
4557 \************************************************************************************************************************************************************************************/
4558 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4559
4560 "use strict";
4561 __webpack_require__.r(__webpack_exports__);
4562 // extracted by mini-css-extract-plugin
4563
4564
4565 /***/ }),
4566
4567 /***/ "./scripts/shared/UIComponents/UIAlert.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIAlert.tsx":
4568 /*!***********************************************************************************************************************************************************************************!*\
4569 !*** ./scripts/shared/UIComponents/UIAlert.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIAlert.tsx ***!
4570 \***********************************************************************************************************************************************************************************/
4571 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4572
4573 "use strict";
4574 __webpack_require__.r(__webpack_exports__);
4575 // extracted by mini-css-extract-plugin
4576
4577
4578 /***/ }),
4579
4580 /***/ "./scripts/shared/UIComponents/UIButton.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIButton.ts":
4581 /*!************************************************************************************************************************************************************************************!*\
4582 !*** ./scripts/shared/UIComponents/UIButton.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIButton.ts ***!
4583 \************************************************************************************************************************************************************************************/
4584 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4585
4586 "use strict";
4587 __webpack_require__.r(__webpack_exports__);
4588 // extracted by mini-css-extract-plugin
4589
4590
4591 /***/ }),
4592
4593 /***/ "./scripts/shared/UIComponents/UIContainer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIContainer.ts":
4594 /*!******************************************************************************************************************************************************************************************!*\
4595 !*** ./scripts/shared/UIComponents/UIContainer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIContainer.ts ***!
4596 \******************************************************************************************************************************************************************************************/
4597 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4598
4599 "use strict";
4600 __webpack_require__.r(__webpack_exports__);
4601 // extracted by mini-css-extract-plugin
4602
4603
4604 /***/ }),
4605
4606 /***/ "./scripts/shared/UIComponents/UIOverlay.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIOverlay.ts":
4607 /*!**************************************************************************************************************************************************************************************!*\
4608 !*** ./scripts/shared/UIComponents/UIOverlay.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIOverlay.ts ***!
4609 \**************************************************************************************************************************************************************************************/
4610 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4611
4612 "use strict";
4613 __webpack_require__.r(__webpack_exports__);
4614 // extracted by mini-css-extract-plugin
4615
4616
4617 /***/ }),
4618
4619 /***/ "./scripts/shared/UIComponents/UISpacer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpacer.ts":
4620 /*!************************************************************************************************************************************************************************************!*\
4621 !*** ./scripts/shared/UIComponents/UISpacer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpacer.ts ***!
4622 \************************************************************************************************************************************************************************************/
4623 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4624
4625 "use strict";
4626 __webpack_require__.r(__webpack_exports__);
4627 // extracted by mini-css-extract-plugin
4628
4629
4630 /***/ }),
4631
4632 /***/ "./scripts/shared/UIComponents/UISpinner.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpinner.tsx":
4633 /*!***************************************************************************************************************************************************************************************!*\
4634 !*** ./scripts/shared/UIComponents/UISpinner.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpinner.tsx ***!
4635 \***************************************************************************************************************************************************************************************/
4636 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4637
4638 "use strict";
4639 __webpack_require__.r(__webpack_exports__);
4640 // extracted by mini-css-extract-plugin
4641
4642
4643 /***/ }),
4644
4645 /***/ "./node_modules/object-assign/index.js":
4646 /*!*********************************************!*\
4647 !*** ./node_modules/object-assign/index.js ***!
4648 \*********************************************/
4649 /***/ ((module) => {
4650
4651 "use strict";
4652 /*
4653 object-assign
4654 (c) Sindre Sorhus
4655 @license MIT
4656 */
4657
4658
4659 /* eslint-disable no-unused-vars */
4660 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
4661 var hasOwnProperty = Object.prototype.hasOwnProperty;
4662 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
4663
4664 function toObject(val) {
4665 if (val === null || val === undefined) {
4666 throw new TypeError('Object.assign cannot be called with null or undefined');
4667 }
4668
4669 return Object(val);
4670 }
4671
4672 function shouldUseNative() {
4673 try {
4674 if (!Object.assign) {
4675 return false;
4676 }
4677
4678 // Detect buggy property enumeration order in older V8 versions.
4679
4680 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
4681 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
4682 test1[5] = 'de';
4683 if (Object.getOwnPropertyNames(test1)[0] === '5') {
4684 return false;
4685 }
4686
4687 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4688 var test2 = {};
4689 for (var i = 0; i < 10; i++) {
4690 test2['_' + String.fromCharCode(i)] = i;
4691 }
4692 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
4693 return test2[n];
4694 });
4695 if (order2.join('') !== '0123456789') {
4696 return false;
4697 }
4698
4699 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4700 var test3 = {};
4701 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
4702 test3[letter] = letter;
4703 });
4704 if (Object.keys(Object.assign({}, test3)).join('') !==
4705 'abcdefghijklmnopqrst') {
4706 return false;
4707 }
4708
4709 return true;
4710 } catch (err) {
4711 // We don't expect any of the above to throw, but better to be safe.
4712 return false;
4713 }
4714 }
4715
4716 module.exports = shouldUseNative() ? Object.assign : function (target, source) {
4717 var from;
4718 var to = toObject(target);
4719 var symbols;
4720
4721 for (var s = 1; s < arguments.length; s++) {
4722 from = Object(arguments[s]);
4723
4724 for (var key in from) {
4725 if (hasOwnProperty.call(from, key)) {
4726 to[key] = from[key];
4727 }
4728 }
4729
4730 if (getOwnPropertySymbols) {
4731 symbols = getOwnPropertySymbols(from);
4732 for (var i = 0; i < symbols.length; i++) {
4733 if (propIsEnumerable.call(from, symbols[i])) {
4734 to[symbols[i]] = from[symbols[i]];
4735 }
4736 }
4737 }
4738 }
4739
4740 return to;
4741 };
4742
4743
4744 /***/ }),
4745
4746 /***/ "./node_modules/prop-types/checkPropTypes.js":
4747 /*!***************************************************!*\
4748 !*** ./node_modules/prop-types/checkPropTypes.js ***!
4749 \***************************************************/
4750 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4751
4752 "use strict";
4753 /**
4754 * Copyright (c) 2013-present, Facebook, Inc.
4755 *
4756 * This source code is licensed under the MIT license found in the
4757 * LICENSE file in the root directory of this source tree.
4758 */
4759
4760
4761
4762 var printWarning = function() {};
4763
4764 if (true) {
4765 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
4766 var loggedTypeFailures = {};
4767 var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
4768
4769 printWarning = function(text) {
4770 var message = 'Warning: ' + text;
4771 if (typeof console !== 'undefined') {
4772 console.error(message);
4773 }
4774 try {
4775 // --- Welcome to debugging React ---
4776 // This error was thrown as a convenience so that you can use this stack
4777 // to find the callsite that caused this warning to fire.
4778 throw new Error(message);
4779 } catch (x) { /**/ }
4780 };
4781 }
4782
4783 /**
4784 * Assert that the values match with the type specs.
4785 * Error messages are memorized and will only be shown once.
4786 *
4787 * @param {object} typeSpecs Map of name to a ReactPropType
4788 * @param {object} values Runtime values that need to be type-checked
4789 * @param {string} location e.g. "prop", "context", "child context"
4790 * @param {string} componentName Name of the component for error messages.
4791 * @param {?Function} getStack Returns the component stack.
4792 * @private
4793 */
4794 function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
4795 if (true) {
4796 for (var typeSpecName in typeSpecs) {
4797 if (has(typeSpecs, typeSpecName)) {
4798 var error;
4799 // Prop type validation may throw. In case they do, we don't want to
4800 // fail the render phase where it didn't fail before. So we log it.
4801 // After these have been cleaned up, we'll let them throw.
4802 try {
4803 // This is intentionally an invariant that gets caught. It's the same
4804 // behavior as without this statement except with a better message.
4805 if (typeof typeSpecs[typeSpecName] !== 'function') {
4806 var err = Error(
4807 (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
4808 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
4809 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
4810 );
4811 err.name = 'Invariant Violation';
4812 throw err;
4813 }
4814 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
4815 } catch (ex) {
4816 error = ex;
4817 }
4818 if (error && !(error instanceof Error)) {
4819 printWarning(
4820 (componentName || 'React class') + ': type specification of ' +
4821 location + ' `' + typeSpecName + '` is invalid; the type checker ' +
4822 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
4823 'You may have forgotten to pass an argument to the type checker ' +
4824 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
4825 'shape all require an argument).'
4826 );
4827 }
4828 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
4829 // Only monitor this failure once because there tends to be a lot of the
4830 // same error.
4831 loggedTypeFailures[error.message] = true;
4832
4833 var stack = getStack ? getStack() : '';
4834
4835 printWarning(
4836 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
4837 );
4838 }
4839 }
4840 }
4841 }
4842 }
4843
4844 /**
4845 * Resets warning cache when testing.
4846 *
4847 * @private
4848 */
4849 checkPropTypes.resetWarningCache = function() {
4850 if (true) {
4851 loggedTypeFailures = {};
4852 }
4853 }
4854
4855 module.exports = checkPropTypes;
4856
4857
4858 /***/ }),
4859
4860 /***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
4861 /*!************************************************************!*\
4862 !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
4863 \************************************************************/
4864 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4865
4866 "use strict";
4867 /**
4868 * Copyright (c) 2013-present, Facebook, Inc.
4869 *
4870 * This source code is licensed under the MIT license found in the
4871 * LICENSE file in the root directory of this source tree.
4872 */
4873
4874
4875
4876 var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
4877 var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
4878
4879 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
4880 var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
4881 var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
4882
4883 var printWarning = function() {};
4884
4885 if (true) {
4886 printWarning = function(text) {
4887 var message = 'Warning: ' + text;
4888 if (typeof console !== 'undefined') {
4889 console.error(message);
4890 }
4891 try {
4892 // --- Welcome to debugging React ---
4893 // This error was thrown as a convenience so that you can use this stack
4894 // to find the callsite that caused this warning to fire.
4895 throw new Error(message);
4896 } catch (x) {}
4897 };
4898 }
4899
4900 function emptyFunctionThatReturnsNull() {
4901 return null;
4902 }
4903
4904 module.exports = function(isValidElement, throwOnDirectAccess) {
4905 /* global Symbol */
4906 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
4907 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
4908
4909 /**
4910 * Returns the iterator method function contained on the iterable object.
4911 *
4912 * Be sure to invoke the function with the iterable as context:
4913 *
4914 * var iteratorFn = getIteratorFn(myIterable);
4915 * if (iteratorFn) {
4916 * var iterator = iteratorFn.call(myIterable);
4917 * ...
4918 * }
4919 *
4920 * @param {?object} maybeIterable
4921 * @return {?function}
4922 */
4923 function getIteratorFn(maybeIterable) {
4924 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
4925 if (typeof iteratorFn === 'function') {
4926 return iteratorFn;
4927 }
4928 }
4929
4930 /**
4931 * Collection of methods that allow declaration and validation of props that are
4932 * supplied to React components. Example usage:
4933 *
4934 * var Props = require('ReactPropTypes');
4935 * var MyArticle = React.createClass({
4936 * propTypes: {
4937 * // An optional string prop named "description".
4938 * description: Props.string,
4939 *
4940 * // A required enum prop named "category".
4941 * category: Props.oneOf(['News','Photos']).isRequired,
4942 *
4943 * // A prop named "dialog" that requires an instance of Dialog.
4944 * dialog: Props.instanceOf(Dialog).isRequired
4945 * },
4946 * render: function() { ... }
4947 * });
4948 *
4949 * A more formal specification of how these methods are used:
4950 *
4951 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
4952 * decl := ReactPropTypes.{type}(.isRequired)?
4953 *
4954 * Each and every declaration produces a function with the same signature. This
4955 * allows the creation of custom validation functions. For example:
4956 *
4957 * var MyLink = React.createClass({
4958 * propTypes: {
4959 * // An optional string or URI prop named "href".
4960 * href: function(props, propName, componentName) {
4961 * var propValue = props[propName];
4962 * if (propValue != null && typeof propValue !== 'string' &&
4963 * !(propValue instanceof URI)) {
4964 * return new Error(
4965 * 'Expected a string or an URI for ' + propName + ' in ' +
4966 * componentName
4967 * );
4968 * }
4969 * }
4970 * },
4971 * render: function() {...}
4972 * });
4973 *
4974 * @internal
4975 */
4976
4977 var ANONYMOUS = '<<anonymous>>';
4978
4979 // Important!
4980 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
4981 var ReactPropTypes = {
4982 array: createPrimitiveTypeChecker('array'),
4983 bigint: createPrimitiveTypeChecker('bigint'),
4984 bool: createPrimitiveTypeChecker('boolean'),
4985 func: createPrimitiveTypeChecker('function'),
4986 number: createPrimitiveTypeChecker('number'),
4987 object: createPrimitiveTypeChecker('object'),
4988 string: createPrimitiveTypeChecker('string'),
4989 symbol: createPrimitiveTypeChecker('symbol'),
4990
4991 any: createAnyTypeChecker(),
4992 arrayOf: createArrayOfTypeChecker,
4993 element: createElementTypeChecker(),
4994 elementType: createElementTypeTypeChecker(),
4995 instanceOf: createInstanceTypeChecker,
4996 node: createNodeChecker(),
4997 objectOf: createObjectOfTypeChecker,
4998 oneOf: createEnumTypeChecker,
4999 oneOfType: createUnionTypeChecker,
5000 shape: createShapeTypeChecker,
5001 exact: createStrictShapeTypeChecker,
5002 };
5003
5004 /**
5005 * inlined Object.is polyfill to avoid requiring consumers ship their own
5006 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
5007 */
5008 /*eslint-disable no-self-compare*/
5009 function is(x, y) {
5010 // SameValue algorithm
5011 if (x === y) {
5012 // Steps 1-5, 7-10
5013 // Steps 6.b-6.e: +0 != -0
5014 return x !== 0 || 1 / x === 1 / y;
5015 } else {
5016 // Step 6.a: NaN == NaN
5017 return x !== x && y !== y;
5018 }
5019 }
5020 /*eslint-enable no-self-compare*/
5021
5022 /**
5023 * We use an Error-like object for backward compatibility as people may call
5024 * PropTypes directly and inspect their output. However, we don't use real
5025 * Errors anymore. We don't inspect their stack anyway, and creating them
5026 * is prohibitively expensive if they are created too often, such as what
5027 * happens in oneOfType() for any type before the one that matched.
5028 */
5029 function PropTypeError(message, data) {
5030 this.message = message;
5031 this.data = data && typeof data === 'object' ? data: {};
5032 this.stack = '';
5033 }
5034 // Make `instanceof Error` still work for returned errors.
5035 PropTypeError.prototype = Error.prototype;
5036
5037 function createChainableTypeChecker(validate) {
5038 if (true) {
5039 var manualPropTypeCallCache = {};
5040 var manualPropTypeWarningCount = 0;
5041 }
5042 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
5043 componentName = componentName || ANONYMOUS;
5044 propFullName = propFullName || propName;
5045
5046 if (secret !== ReactPropTypesSecret) {
5047 if (throwOnDirectAccess) {
5048 // New behavior only for users of `prop-types` package
5049 var err = new Error(
5050 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
5051 'Use `PropTypes.checkPropTypes()` to call them. ' +
5052 'Read more at http://fb.me/use-check-prop-types'
5053 );
5054 err.name = 'Invariant Violation';
5055 throw err;
5056 } else if ( true && typeof console !== 'undefined') {
5057 // Old behavior for people using React.PropTypes
5058 var cacheKey = componentName + ':' + propName;
5059 if (
5060 !manualPropTypeCallCache[cacheKey] &&
5061 // Avoid spamming the console because they are often not actionable except for lib authors
5062 manualPropTypeWarningCount < 3
5063 ) {
5064 printWarning(
5065 'You are manually calling a React.PropTypes validation ' +
5066 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
5067 'and will throw in the standalone `prop-types` package. ' +
5068 'You may be seeing this warning due to a third-party PropTypes ' +
5069 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
5070 );
5071 manualPropTypeCallCache[cacheKey] = true;
5072 manualPropTypeWarningCount++;
5073 }
5074 }
5075 }
5076 if (props[propName] == null) {
5077 if (isRequired) {
5078 if (props[propName] === null) {
5079 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
5080 }
5081 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
5082 }
5083 return null;
5084 } else {
5085 return validate(props, propName, componentName, location, propFullName);
5086 }
5087 }
5088
5089 var chainedCheckType = checkType.bind(null, false);
5090 chainedCheckType.isRequired = checkType.bind(null, true);
5091
5092 return chainedCheckType;
5093 }
5094
5095 function createPrimitiveTypeChecker(expectedType) {
5096 function validate(props, propName, componentName, location, propFullName, secret) {
5097 var propValue = props[propName];
5098 var propType = getPropType(propValue);
5099 if (propType !== expectedType) {
5100 // `propValue` being instance of, say, date/regexp, pass the 'object'
5101 // check, but we can offer a more precise error message here rather than
5102 // 'of type `object`'.
5103 var preciseType = getPreciseType(propValue);
5104
5105 return new PropTypeError(
5106 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
5107 {expectedType: expectedType}
5108 );
5109 }
5110 return null;
5111 }
5112 return createChainableTypeChecker(validate);
5113 }
5114
5115 function createAnyTypeChecker() {
5116 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
5117 }
5118
5119 function createArrayOfTypeChecker(typeChecker) {
5120 function validate(props, propName, componentName, location, propFullName) {
5121 if (typeof typeChecker !== 'function') {
5122 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
5123 }
5124 var propValue = props[propName];
5125 if (!Array.isArray(propValue)) {
5126 var propType = getPropType(propValue);
5127 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
5128 }
5129 for (var i = 0; i < propValue.length; i++) {
5130 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
5131 if (error instanceof Error) {
5132 return error;
5133 }
5134 }
5135 return null;
5136 }
5137 return createChainableTypeChecker(validate);
5138 }
5139
5140 function createElementTypeChecker() {
5141 function validate(props, propName, componentName, location, propFullName) {
5142 var propValue = props[propName];
5143 if (!isValidElement(propValue)) {
5144 var propType = getPropType(propValue);
5145 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
5146 }
5147 return null;
5148 }
5149 return createChainableTypeChecker(validate);
5150 }
5151
5152 function createElementTypeTypeChecker() {
5153 function validate(props, propName, componentName, location, propFullName) {
5154 var propValue = props[propName];
5155 if (!ReactIs.isValidElementType(propValue)) {
5156 var propType = getPropType(propValue);
5157 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
5158 }
5159 return null;
5160 }
5161 return createChainableTypeChecker(validate);
5162 }
5163
5164 function createInstanceTypeChecker(expectedClass) {
5165 function validate(props, propName, componentName, location, propFullName) {
5166 if (!(props[propName] instanceof expectedClass)) {
5167 var expectedClassName = expectedClass.name || ANONYMOUS;
5168 var actualClassName = getClassName(props[propName]);
5169 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
5170 }
5171 return null;
5172 }
5173 return createChainableTypeChecker(validate);
5174 }
5175
5176 function createEnumTypeChecker(expectedValues) {
5177 if (!Array.isArray(expectedValues)) {
5178 if (true) {
5179 if (arguments.length > 1) {
5180 printWarning(
5181 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
5182 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
5183 );
5184 } else {
5185 printWarning('Invalid argument supplied to oneOf, expected an array.');
5186 }
5187 }
5188 return emptyFunctionThatReturnsNull;
5189 }
5190
5191 function validate(props, propName, componentName, location, propFullName) {
5192 var propValue = props[propName];
5193 for (var i = 0; i < expectedValues.length; i++) {
5194 if (is(propValue, expectedValues[i])) {
5195 return null;
5196 }
5197 }
5198
5199 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
5200 var type = getPreciseType(value);
5201 if (type === 'symbol') {
5202 return String(value);
5203 }
5204 return value;
5205 });
5206 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
5207 }
5208 return createChainableTypeChecker(validate);
5209 }
5210
5211 function createObjectOfTypeChecker(typeChecker) {
5212 function validate(props, propName, componentName, location, propFullName) {
5213 if (typeof typeChecker !== 'function') {
5214 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
5215 }
5216 var propValue = props[propName];
5217 var propType = getPropType(propValue);
5218 if (propType !== 'object') {
5219 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
5220 }
5221 for (var key in propValue) {
5222 if (has(propValue, key)) {
5223 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5224 if (error instanceof Error) {
5225 return error;
5226 }
5227 }
5228 }
5229 return null;
5230 }
5231 return createChainableTypeChecker(validate);
5232 }
5233
5234 function createUnionTypeChecker(arrayOfTypeCheckers) {
5235 if (!Array.isArray(arrayOfTypeCheckers)) {
5236 true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
5237 return emptyFunctionThatReturnsNull;
5238 }
5239
5240 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5241 var checker = arrayOfTypeCheckers[i];
5242 if (typeof checker !== 'function') {
5243 printWarning(
5244 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
5245 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
5246 );
5247 return emptyFunctionThatReturnsNull;
5248 }
5249 }
5250
5251 function validate(props, propName, componentName, location, propFullName) {
5252 var expectedTypes = [];
5253 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5254 var checker = arrayOfTypeCheckers[i];
5255 var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
5256 if (checkerResult == null) {
5257 return null;
5258 }
5259 if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
5260 expectedTypes.push(checkerResult.data.expectedType);
5261 }
5262 }
5263 var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
5264 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
5265 }
5266 return createChainableTypeChecker(validate);
5267 }
5268
5269 function createNodeChecker() {
5270 function validate(props, propName, componentName, location, propFullName) {
5271 if (!isNode(props[propName])) {
5272 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
5273 }
5274 return null;
5275 }
5276 return createChainableTypeChecker(validate);
5277 }
5278
5279 function invalidValidatorError(componentName, location, propFullName, key, type) {
5280 return new PropTypeError(
5281 (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
5282 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
5283 );
5284 }
5285
5286 function createShapeTypeChecker(shapeTypes) {
5287 function validate(props, propName, componentName, location, propFullName) {
5288 var propValue = props[propName];
5289 var propType = getPropType(propValue);
5290 if (propType !== 'object') {
5291 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5292 }
5293 for (var key in shapeTypes) {
5294 var checker = shapeTypes[key];
5295 if (typeof checker !== 'function') {
5296 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
5297 }
5298 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5299 if (error) {
5300 return error;
5301 }
5302 }
5303 return null;
5304 }
5305 return createChainableTypeChecker(validate);
5306 }
5307
5308 function createStrictShapeTypeChecker(shapeTypes) {
5309 function validate(props, propName, componentName, location, propFullName) {
5310 var propValue = props[propName];
5311 var propType = getPropType(propValue);
5312 if (propType !== 'object') {
5313 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5314 }
5315 // We need to check all keys in case some are required but missing from props.
5316 var allKeys = assign({}, props[propName], shapeTypes);
5317 for (var key in allKeys) {
5318 var checker = shapeTypes[key];
5319 if (has(shapeTypes, key) && typeof checker !== 'function') {
5320 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
5321 }
5322 if (!checker) {
5323 return new PropTypeError(
5324 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
5325 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
5326 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
5327 );
5328 }
5329 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5330 if (error) {
5331 return error;
5332 }
5333 }
5334 return null;
5335 }
5336
5337 return createChainableTypeChecker(validate);
5338 }
5339
5340 function isNode(propValue) {
5341 switch (typeof propValue) {
5342 case 'number':
5343 case 'string':
5344 case 'undefined':
5345 return true;
5346 case 'boolean':
5347 return !propValue;
5348 case 'object':
5349 if (Array.isArray(propValue)) {
5350 return propValue.every(isNode);
5351 }
5352 if (propValue === null || isValidElement(propValue)) {
5353 return true;
5354 }
5355
5356 var iteratorFn = getIteratorFn(propValue);
5357 if (iteratorFn) {
5358 var iterator = iteratorFn.call(propValue);
5359 var step;
5360 if (iteratorFn !== propValue.entries) {
5361 while (!(step = iterator.next()).done) {
5362 if (!isNode(step.value)) {
5363 return false;
5364 }
5365 }
5366 } else {
5367 // Iterator will provide entry [k,v] tuples rather than values.
5368 while (!(step = iterator.next()).done) {
5369 var entry = step.value;
5370 if (entry) {
5371 if (!isNode(entry[1])) {
5372 return false;
5373 }
5374 }
5375 }
5376 }
5377 } else {
5378 return false;
5379 }
5380
5381 return true;
5382 default:
5383 return false;
5384 }
5385 }
5386
5387 function isSymbol(propType, propValue) {
5388 // Native Symbol.
5389 if (propType === 'symbol') {
5390 return true;
5391 }
5392
5393 // falsy value can't be a Symbol
5394 if (!propValue) {
5395 return false;
5396 }
5397
5398 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
5399 if (propValue['@@toStringTag'] === 'Symbol') {
5400 return true;
5401 }
5402
5403 // Fallback for non-spec compliant Symbols which are polyfilled.
5404 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
5405 return true;
5406 }
5407
5408 return false;
5409 }
5410
5411 // Equivalent of `typeof` but with special handling for array and regexp.
5412 function getPropType(propValue) {
5413 var propType = typeof propValue;
5414 if (Array.isArray(propValue)) {
5415 return 'array';
5416 }
5417 if (propValue instanceof RegExp) {
5418 // Old webkits (at least until Android 4.0) return 'function' rather than
5419 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
5420 // passes PropTypes.object.
5421 return 'object';
5422 }
5423 if (isSymbol(propType, propValue)) {
5424 return 'symbol';
5425 }
5426 return propType;
5427 }
5428
5429 // This handles more types than `getPropType`. Only used for error messages.
5430 // See `createPrimitiveTypeChecker`.
5431 function getPreciseType(propValue) {
5432 if (typeof propValue === 'undefined' || propValue === null) {
5433 return '' + propValue;
5434 }
5435 var propType = getPropType(propValue);
5436 if (propType === 'object') {
5437 if (propValue instanceof Date) {
5438 return 'date';
5439 } else if (propValue instanceof RegExp) {
5440 return 'regexp';
5441 }
5442 }
5443 return propType;
5444 }
5445
5446 // Returns a string that is postfixed to a warning about an invalid type.
5447 // For example, "undefined" or "of type array"
5448 function getPostfixForTypeWarning(value) {
5449 var type = getPreciseType(value);
5450 switch (type) {
5451 case 'array':
5452 case 'object':
5453 return 'an ' + type;
5454 case 'boolean':
5455 case 'date':
5456 case 'regexp':
5457 return 'a ' + type;
5458 default:
5459 return type;
5460 }
5461 }
5462
5463 // Returns class name of the object, if any.
5464 function getClassName(propValue) {
5465 if (!propValue.constructor || !propValue.constructor.name) {
5466 return ANONYMOUS;
5467 }
5468 return propValue.constructor.name;
5469 }
5470
5471 ReactPropTypes.checkPropTypes = checkPropTypes;
5472 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
5473 ReactPropTypes.PropTypes = ReactPropTypes;
5474
5475 return ReactPropTypes;
5476 };
5477
5478
5479 /***/ }),
5480
5481 /***/ "./node_modules/prop-types/index.js":
5482 /*!******************************************!*\
5483 !*** ./node_modules/prop-types/index.js ***!
5484 \******************************************/
5485 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5486
5487 /**
5488 * Copyright (c) 2013-present, Facebook, Inc.
5489 *
5490 * This source code is licensed under the MIT license found in the
5491 * LICENSE file in the root directory of this source tree.
5492 */
5493
5494 if (true) {
5495 var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
5496
5497 // By explicitly using `prop-types` you are opting into new development behavior.
5498 // http://fb.me/prop-types-in-prod
5499 var throwOnDirectAccess = true;
5500 module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
5501 } else {}
5502
5503
5504 /***/ }),
5505
5506 /***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
5507 /*!*************************************************************!*\
5508 !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
5509 \*************************************************************/
5510 /***/ ((module) => {
5511
5512 "use strict";
5513 /**
5514 * Copyright (c) 2013-present, Facebook, Inc.
5515 *
5516 * This source code is licensed under the MIT license found in the
5517 * LICENSE file in the root directory of this source tree.
5518 */
5519
5520
5521
5522 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
5523
5524 module.exports = ReactPropTypesSecret;
5525
5526
5527 /***/ }),
5528
5529 /***/ "./node_modules/prop-types/lib/has.js":
5530 /*!********************************************!*\
5531 !*** ./node_modules/prop-types/lib/has.js ***!
5532 \********************************************/
5533 /***/ ((module) => {
5534
5535 module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
5536
5537
5538 /***/ }),
5539
5540 /***/ "./node_modules/raven-js/src/configError.js":
5541 /*!**************************************************!*\
5542 !*** ./node_modules/raven-js/src/configError.js ***!
5543 \**************************************************/
5544 /***/ ((module) => {
5545
5546 function RavenConfigError(message) {
5547 this.name = 'RavenConfigError';
5548 this.message = message;
5549 }
5550 RavenConfigError.prototype = new Error();
5551 RavenConfigError.prototype.constructor = RavenConfigError;
5552
5553 module.exports = RavenConfigError;
5554
5555
5556 /***/ }),
5557
5558 /***/ "./node_modules/raven-js/src/console.js":
5559 /*!**********************************************!*\
5560 !*** ./node_modules/raven-js/src/console.js ***!
5561 \**********************************************/
5562 /***/ ((module) => {
5563
5564 var wrapMethod = function(console, level, callback) {
5565 var originalConsoleLevel = console[level];
5566 var originalConsole = console;
5567
5568 if (!(level in console)) {
5569 return;
5570 }
5571
5572 var sentryLevel = level === 'warn' ? 'warning' : level;
5573
5574 console[level] = function() {
5575 var args = [].slice.call(arguments);
5576
5577 var msg = '' + args.join(' ');
5578 var data = {level: sentryLevel, logger: 'console', extra: {arguments: args}};
5579
5580 if (level === 'assert') {
5581 if (args[0] === false) {
5582 // Default browsers message
5583 msg = 'Assertion failed: ' + (args.slice(1).join(' ') || 'console.assert');
5584 data.extra.arguments = args.slice(1);
5585 callback && callback(msg, data);
5586 }
5587 } else {
5588 callback && callback(msg, data);
5589 }
5590
5591 // this fails for some browsers. :(
5592 if (originalConsoleLevel) {
5593 // IE9 doesn't allow calling apply on console functions directly
5594 // See: https://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function#answer-5473193
5595 Function.prototype.apply.call(originalConsoleLevel, originalConsole, args);
5596 }
5597 };
5598 };
5599
5600 module.exports = {
5601 wrapMethod: wrapMethod
5602 };
5603
5604
5605 /***/ }),
5606
5607 /***/ "./node_modules/raven-js/src/raven.js":
5608 /*!********************************************!*\
5609 !*** ./node_modules/raven-js/src/raven.js ***!
5610 \********************************************/
5611 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5612
5613 /*global XDomainRequest:false */
5614
5615 var TraceKit = __webpack_require__(/*! ../vendor/TraceKit/tracekit */ "./node_modules/raven-js/vendor/TraceKit/tracekit.js");
5616 var stringify = __webpack_require__(/*! ../vendor/json-stringify-safe/stringify */ "./node_modules/raven-js/vendor/json-stringify-safe/stringify.js");
5617 var RavenConfigError = __webpack_require__(/*! ./configError */ "./node_modules/raven-js/src/configError.js");
5618
5619 var utils = __webpack_require__(/*! ./utils */ "./node_modules/raven-js/src/utils.js");
5620 var isError = utils.isError;
5621 var isObject = utils.isObject;
5622 var isObject = utils.isObject;
5623 var isErrorEvent = utils.isErrorEvent;
5624 var isUndefined = utils.isUndefined;
5625 var isFunction = utils.isFunction;
5626 var isString = utils.isString;
5627 var isEmptyObject = utils.isEmptyObject;
5628 var each = utils.each;
5629 var objectMerge = utils.objectMerge;
5630 var truncate = utils.truncate;
5631 var objectFrozen = utils.objectFrozen;
5632 var hasKey = utils.hasKey;
5633 var joinRegExp = utils.joinRegExp;
5634 var urlencode = utils.urlencode;
5635 var uuid4 = utils.uuid4;
5636 var htmlTreeAsString = utils.htmlTreeAsString;
5637 var isSameException = utils.isSameException;
5638 var isSameStacktrace = utils.isSameStacktrace;
5639 var parseUrl = utils.parseUrl;
5640 var fill = utils.fill;
5641
5642 var wrapConsoleMethod = (__webpack_require__(/*! ./console */ "./node_modules/raven-js/src/console.js").wrapMethod);
5643
5644 var dsnKeys = 'source protocol user pass host port path'.split(' '),
5645 dsnPattern = /^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;
5646
5647 function now() {
5648 return +new Date();
5649 }
5650
5651 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
5652 var _window =
5653 typeof window !== 'undefined'
5654 ? window
5655 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
5656 var _document = _window.document;
5657 var _navigator = _window.navigator;
5658
5659 function keepOriginalCallback(original, callback) {
5660 return isFunction(callback)
5661 ? function(data) {
5662 return callback(data, original);
5663 }
5664 : callback;
5665 }
5666
5667 // First, check for JSON support
5668 // If there is no JSON, we no-op the core features of Raven
5669 // since JSON is required to encode the payload
5670 function Raven() {
5671 this._hasJSON = !!(typeof JSON === 'object' && JSON.stringify);
5672 // Raven can run in contexts where there's no document (react-native)
5673 this._hasDocument = !isUndefined(_document);
5674 this._hasNavigator = !isUndefined(_navigator);
5675 this._lastCapturedException = null;
5676 this._lastData = null;
5677 this._lastEventId = null;
5678 this._globalServer = null;
5679 this._globalKey = null;
5680 this._globalProject = null;
5681 this._globalContext = {};
5682 this._globalOptions = {
5683 logger: 'javascript',
5684 ignoreErrors: [],
5685 ignoreUrls: [],
5686 whitelistUrls: [],
5687 includePaths: [],
5688 collectWindowErrors: true,
5689 maxMessageLength: 0,
5690
5691 // By default, truncates URL values to 250 chars
5692 maxUrlLength: 250,
5693 stackTraceLimit: 50,
5694 autoBreadcrumbs: true,
5695 instrument: true,
5696 sampleRate: 1
5697 };
5698 this._ignoreOnError = 0;
5699 this._isRavenInstalled = false;
5700 this._originalErrorStackTraceLimit = Error.stackTraceLimit;
5701 // capture references to window.console *and* all its methods first
5702 // before the console plugin has a chance to monkey patch
5703 this._originalConsole = _window.console || {};
5704 this._originalConsoleMethods = {};
5705 this._plugins = [];
5706 this._startTime = now();
5707 this._wrappedBuiltIns = [];
5708 this._breadcrumbs = [];
5709 this._lastCapturedEvent = null;
5710 this._keypressTimeout;
5711 this._location = _window.location;
5712 this._lastHref = this._location && this._location.href;
5713 this._resetBackoff();
5714
5715 // eslint-disable-next-line guard-for-in
5716 for (var method in this._originalConsole) {
5717 this._originalConsoleMethods[method] = this._originalConsole[method];
5718 }
5719 }
5720
5721 /*
5722 * The core Raven singleton
5723 *
5724 * @this {Raven}
5725 */
5726
5727 Raven.prototype = {
5728 // Hardcode version string so that raven source can be loaded directly via
5729 // webpack (using a build step causes webpack #1617). Grunt verifies that
5730 // this value matches package.json during build.
5731 // See: https://github.com/getsentry/raven-js/issues/465
5732 VERSION: '3.19.1',
5733
5734 debug: false,
5735
5736 TraceKit: TraceKit, // alias to TraceKit
5737
5738 /*
5739 * Configure Raven with a DSN and extra options
5740 *
5741 * @param {string} dsn The public Sentry DSN
5742 * @param {object} options Set of global options [optional]
5743 * @return {Raven}
5744 */
5745 config: function(dsn, options) {
5746 var self = this;
5747
5748 if (self._globalServer) {
5749 this._logDebug('error', 'Error: Raven has already been configured');
5750 return self;
5751 }
5752 if (!dsn) return self;
5753
5754 var globalOptions = self._globalOptions;
5755
5756 // merge in options
5757 if (options) {
5758 each(options, function(key, value) {
5759 // tags and extra are special and need to be put into context
5760 if (key === 'tags' || key === 'extra' || key === 'user') {
5761 self._globalContext[key] = value;
5762 } else {
5763 globalOptions[key] = value;
5764 }
5765 });
5766 }
5767
5768 self.setDSN(dsn);
5769
5770 // "Script error." is hard coded into browsers for errors that it can't read.
5771 // this is the result of a script being pulled in from an external domain and CORS.
5772 globalOptions.ignoreErrors.push(/^Script error\.?$/);
5773 globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/);
5774
5775 // join regexp rules into one big rule
5776 globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors);
5777 globalOptions.ignoreUrls = globalOptions.ignoreUrls.length
5778 ? joinRegExp(globalOptions.ignoreUrls)
5779 : false;
5780 globalOptions.whitelistUrls = globalOptions.whitelistUrls.length
5781 ? joinRegExp(globalOptions.whitelistUrls)
5782 : false;
5783 globalOptions.includePaths = joinRegExp(globalOptions.includePaths);
5784 globalOptions.maxBreadcrumbs = Math.max(
5785 0,
5786 Math.min(globalOptions.maxBreadcrumbs || 100, 100)
5787 ); // default and hard limit is 100
5788
5789 var autoBreadcrumbDefaults = {
5790 xhr: true,
5791 console: true,
5792 dom: true,
5793 location: true
5794 };
5795
5796 var autoBreadcrumbs = globalOptions.autoBreadcrumbs;
5797 if ({}.toString.call(autoBreadcrumbs) === '[object Object]') {
5798 autoBreadcrumbs = objectMerge(autoBreadcrumbDefaults, autoBreadcrumbs);
5799 } else if (autoBreadcrumbs !== false) {
5800 autoBreadcrumbs = autoBreadcrumbDefaults;
5801 }
5802 globalOptions.autoBreadcrumbs = autoBreadcrumbs;
5803
5804 var instrumentDefaults = {
5805 tryCatch: true
5806 };
5807
5808 var instrument = globalOptions.instrument;
5809 if ({}.toString.call(instrument) === '[object Object]') {
5810 instrument = objectMerge(instrumentDefaults, instrument);
5811 } else if (instrument !== false) {
5812 instrument = instrumentDefaults;
5813 }
5814 globalOptions.instrument = instrument;
5815
5816 TraceKit.collectWindowErrors = !!globalOptions.collectWindowErrors;
5817
5818 // return for chaining
5819 return self;
5820 },
5821
5822 /*
5823 * Installs a global window.onerror error handler
5824 * to capture and report uncaught exceptions.
5825 * At this point, install() is required to be called due
5826 * to the way TraceKit is set up.
5827 *
5828 * @return {Raven}
5829 */
5830 install: function() {
5831 var self = this;
5832 if (self.isSetup() && !self._isRavenInstalled) {
5833 TraceKit.report.subscribe(function() {
5834 self._handleOnErrorStackInfo.apply(self, arguments);
5835 });
5836 if (self._globalOptions.instrument && self._globalOptions.instrument.tryCatch) {
5837 self._instrumentTryCatch();
5838 }
5839
5840 if (self._globalOptions.autoBreadcrumbs) self._instrumentBreadcrumbs();
5841
5842 // Install all of the plugins
5843 self._drainPlugins();
5844
5845 self._isRavenInstalled = true;
5846 }
5847
5848 Error.stackTraceLimit = self._globalOptions.stackTraceLimit;
5849 return this;
5850 },
5851
5852 /*
5853 * Set the DSN (can be called multiple time unlike config)
5854 *
5855 * @param {string} dsn The public Sentry DSN
5856 */
5857 setDSN: function(dsn) {
5858 var self = this,
5859 uri = self._parseDSN(dsn),
5860 lastSlash = uri.path.lastIndexOf('/'),
5861 path = uri.path.substr(1, lastSlash);
5862
5863 self._dsn = dsn;
5864 self._globalKey = uri.user;
5865 self._globalSecret = uri.pass && uri.pass.substr(1);
5866 self._globalProject = uri.path.substr(lastSlash + 1);
5867
5868 self._globalServer = self._getGlobalServer(uri);
5869
5870 self._globalEndpoint =
5871 self._globalServer + '/' + path + 'api/' + self._globalProject + '/store/';
5872
5873 // Reset backoff state since we may be pointing at a
5874 // new project/server
5875 this._resetBackoff();
5876 },
5877
5878 /*
5879 * Wrap code within a context so Raven can capture errors
5880 * reliably across domains that is executed immediately.
5881 *
5882 * @param {object} options A specific set of options for this context [optional]
5883 * @param {function} func The callback to be immediately executed within the context
5884 * @param {array} args An array of arguments to be called with the callback [optional]
5885 */
5886 context: function(options, func, args) {
5887 if (isFunction(options)) {
5888 args = func || [];
5889 func = options;
5890 options = undefined;
5891 }
5892
5893 return this.wrap(options, func).apply(this, args);
5894 },
5895
5896 /*
5897 * Wrap code within a context and returns back a new function to be executed
5898 *
5899 * @param {object} options A specific set of options for this context [optional]
5900 * @param {function} func The function to be wrapped in a new context
5901 * @param {function} func A function to call before the try/catch wrapper [optional, private]
5902 * @return {function} The newly wrapped functions with a context
5903 */
5904 wrap: function(options, func, _before) {
5905 var self = this;
5906 // 1 argument has been passed, and it's not a function
5907 // so just return it
5908 if (isUndefined(func) && !isFunction(options)) {
5909 return options;
5910 }
5911
5912 // options is optional
5913 if (isFunction(options)) {
5914 func = options;
5915 options = undefined;
5916 }
5917
5918 // At this point, we've passed along 2 arguments, and the second one
5919 // is not a function either, so we'll just return the second argument.
5920 if (!isFunction(func)) {
5921 return func;
5922 }
5923
5924 // We don't wanna wrap it twice!
5925 try {
5926 if (func.__raven__) {
5927 return func;
5928 }
5929
5930 // If this has already been wrapped in the past, return that
5931 if (func.__raven_wrapper__) {
5932 return func.__raven_wrapper__;
5933 }
5934 } catch (e) {
5935 // Just accessing custom props in some Selenium environments
5936 // can cause a "Permission denied" exception (see raven-js#495).
5937 // Bail on wrapping and return the function as-is (defers to window.onerror).
5938 return func;
5939 }
5940
5941 function wrapped() {
5942 var args = [],
5943 i = arguments.length,
5944 deep = !options || (options && options.deep !== false);
5945
5946 if (_before && isFunction(_before)) {
5947 _before.apply(this, arguments);
5948 }
5949
5950 // Recursively wrap all of a function's arguments that are
5951 // functions themselves.
5952 while (i--) args[i] = deep ? self.wrap(options, arguments[i]) : arguments[i];
5953
5954 try {
5955 // Attempt to invoke user-land function
5956 // NOTE: If you are a Sentry user, and you are seeing this stack frame, it
5957 // means Raven caught an error invoking your application code. This is
5958 // expected behavior and NOT indicative of a bug with Raven.js.
5959 return func.apply(this, args);
5960 } catch (e) {
5961 self._ignoreNextOnError();
5962 self.captureException(e, options);
5963 throw e;
5964 }
5965 }
5966
5967 // copy over properties of the old function
5968 for (var property in func) {
5969 if (hasKey(func, property)) {
5970 wrapped[property] = func[property];
5971 }
5972 }
5973 wrapped.prototype = func.prototype;
5974
5975 func.__raven_wrapper__ = wrapped;
5976 // Signal that this function has been wrapped already
5977 // for both debugging and to prevent it to being wrapped twice
5978 wrapped.__raven__ = true;
5979 wrapped.__inner__ = func;
5980
5981 return wrapped;
5982 },
5983
5984 /*
5985 * Uninstalls the global error handler.
5986 *
5987 * @return {Raven}
5988 */
5989 uninstall: function() {
5990 TraceKit.report.uninstall();
5991
5992 this._restoreBuiltIns();
5993
5994 Error.stackTraceLimit = this._originalErrorStackTraceLimit;
5995 this._isRavenInstalled = false;
5996
5997 return this;
5998 },
5999
6000 /*
6001 * Manually capture an exception and send it over to Sentry
6002 *
6003 * @param {error} ex An exception to be logged
6004 * @param {object} options A specific set of options for this error [optional]
6005 * @return {Raven}
6006 */
6007 captureException: function(ex, options) {
6008 // Cases for sending ex as a message, rather than an exception
6009 var isNotError = !isError(ex);
6010 var isNotErrorEvent = !isErrorEvent(ex);
6011 var isErrorEventWithoutError = isErrorEvent(ex) && !ex.error;
6012
6013 if ((isNotError && isNotErrorEvent) || isErrorEventWithoutError) {
6014 return this.captureMessage(
6015 ex,
6016 objectMerge(
6017 {
6018 trimHeadFrames: 1,
6019 stacktrace: true // if we fall back to captureMessage, default to attempting a new trace
6020 },
6021 options
6022 )
6023 );
6024 }
6025
6026 // Get actual Error from ErrorEvent
6027 if (isErrorEvent(ex)) ex = ex.error;
6028
6029 // Store the raw exception object for potential debugging and introspection
6030 this._lastCapturedException = ex;
6031
6032 // TraceKit.report will re-raise any exception passed to it,
6033 // which means you have to wrap it in try/catch. Instead, we
6034 // can wrap it here and only re-raise if TraceKit.report
6035 // raises an exception different from the one we asked to
6036 // report on.
6037 try {
6038 var stack = TraceKit.computeStackTrace(ex);
6039 this._handleStackInfo(stack, options);
6040 } catch (ex1) {
6041 if (ex !== ex1) {
6042 throw ex1;
6043 }
6044 }
6045
6046 return this;
6047 },
6048
6049 /*
6050 * Manually send a message to Sentry
6051 *
6052 * @param {string} msg A plain message to be captured in Sentry
6053 * @param {object} options A specific set of options for this message [optional]
6054 * @return {Raven}
6055 */
6056 captureMessage: function(msg, options) {
6057 // config() automagically converts ignoreErrors from a list to a RegExp so we need to test for an
6058 // early call; we'll error on the side of logging anything called before configuration since it's
6059 // probably something you should see:
6060 if (
6061 !!this._globalOptions.ignoreErrors.test &&
6062 this._globalOptions.ignoreErrors.test(msg)
6063 ) {
6064 return;
6065 }
6066
6067 options = options || {};
6068
6069 var data = objectMerge(
6070 {
6071 message: msg + '' // Make sure it's actually a string
6072 },
6073 options
6074 );
6075
6076 var ex;
6077 // Generate a "synthetic" stack trace from this point.
6078 // NOTE: If you are a Sentry user, and you are seeing this stack frame, it is NOT indicative
6079 // of a bug with Raven.js. Sentry generates synthetic traces either by configuration,
6080 // or if it catches a thrown object without a "stack" property.
6081 try {
6082 throw new Error(msg);
6083 } catch (ex1) {
6084 ex = ex1;
6085 }
6086
6087 // null exception name so `Error` isn't prefixed to msg
6088 ex.name = null;
6089 var stack = TraceKit.computeStackTrace(ex);
6090
6091 // stack[0] is `throw new Error(msg)` call itself, we are interested in the frame that was just before that, stack[1]
6092 var initialCall = stack.stack[1];
6093
6094 var fileurl = (initialCall && initialCall.url) || '';
6095
6096 if (
6097 !!this._globalOptions.ignoreUrls.test &&
6098 this._globalOptions.ignoreUrls.test(fileurl)
6099 ) {
6100 return;
6101 }
6102
6103 if (
6104 !!this._globalOptions.whitelistUrls.test &&
6105 !this._globalOptions.whitelistUrls.test(fileurl)
6106 ) {
6107 return;
6108 }
6109
6110 if (this._globalOptions.stacktrace || (options && options.stacktrace)) {
6111 options = objectMerge(
6112 {
6113 // fingerprint on msg, not stack trace (legacy behavior, could be
6114 // revisited)
6115 fingerprint: msg,
6116 // since we know this is a synthetic trace, the top N-most frames
6117 // MUST be from Raven.js, so mark them as in_app later by setting
6118 // trimHeadFrames
6119 trimHeadFrames: (options.trimHeadFrames || 0) + 1
6120 },
6121 options
6122 );
6123
6124 var frames = this._prepareFrames(stack, options);
6125 data.stacktrace = {
6126 // Sentry expects frames oldest to newest
6127 frames: frames.reverse()
6128 };
6129 }
6130
6131 // Fire away!
6132 this._send(data);
6133
6134 return this;
6135 },
6136
6137 captureBreadcrumb: function(obj) {
6138 var crumb = objectMerge(
6139 {
6140 timestamp: now() / 1000
6141 },
6142 obj
6143 );
6144
6145 if (isFunction(this._globalOptions.breadcrumbCallback)) {
6146 var result = this._globalOptions.breadcrumbCallback(crumb);
6147
6148 if (isObject(result) && !isEmptyObject(result)) {
6149 crumb = result;
6150 } else if (result === false) {
6151 return this;
6152 }
6153 }
6154
6155 this._breadcrumbs.push(crumb);
6156 if (this._breadcrumbs.length > this._globalOptions.maxBreadcrumbs) {
6157 this._breadcrumbs.shift();
6158 }
6159 return this;
6160 },
6161
6162 addPlugin: function(plugin /*arg1, arg2, ... argN*/) {
6163 var pluginArgs = [].slice.call(arguments, 1);
6164
6165 this._plugins.push([plugin, pluginArgs]);
6166 if (this._isRavenInstalled) {
6167 this._drainPlugins();
6168 }
6169
6170 return this;
6171 },
6172
6173 /*
6174 * Set/clear a user to be sent along with the payload.
6175 *
6176 * @param {object} user An object representing user data [optional]
6177 * @return {Raven}
6178 */
6179 setUserContext: function(user) {
6180 // Intentionally do not merge here since that's an unexpected behavior.
6181 this._globalContext.user = user;
6182
6183 return this;
6184 },
6185
6186 /*
6187 * Merge extra attributes to be sent along with the payload.
6188 *
6189 * @param {object} extra An object representing extra data [optional]
6190 * @return {Raven}
6191 */
6192 setExtraContext: function(extra) {
6193 this._mergeContext('extra', extra);
6194
6195 return this;
6196 },
6197
6198 /*
6199 * Merge tags to be sent along with the payload.
6200 *
6201 * @param {object} tags An object representing tags [optional]
6202 * @return {Raven}
6203 */
6204 setTagsContext: function(tags) {
6205 this._mergeContext('tags', tags);
6206
6207 return this;
6208 },
6209
6210 /*
6211 * Clear all of the context.
6212 *
6213 * @return {Raven}
6214 */
6215 clearContext: function() {
6216 this._globalContext = {};
6217
6218 return this;
6219 },
6220
6221 /*
6222 * Get a copy of the current context. This cannot be mutated.
6223 *
6224 * @return {object} copy of context
6225 */
6226 getContext: function() {
6227 // lol javascript
6228 return JSON.parse(stringify(this._globalContext));
6229 },
6230
6231 /*
6232 * Set environment of application
6233 *
6234 * @param {string} environment Typically something like 'production'.
6235 * @return {Raven}
6236 */
6237 setEnvironment: function(environment) {
6238 this._globalOptions.environment = environment;
6239
6240 return this;
6241 },
6242
6243 /*
6244 * Set release version of application
6245 *
6246 * @param {string} release Typically something like a git SHA to identify version
6247 * @return {Raven}
6248 */
6249 setRelease: function(release) {
6250 this._globalOptions.release = release;
6251
6252 return this;
6253 },
6254
6255 /*
6256 * Set the dataCallback option
6257 *
6258 * @param {function} callback The callback to run which allows the
6259 * data blob to be mutated before sending
6260 * @return {Raven}
6261 */
6262 setDataCallback: function(callback) {
6263 var original = this._globalOptions.dataCallback;
6264 this._globalOptions.dataCallback = keepOriginalCallback(original, callback);
6265 return this;
6266 },
6267
6268 /*
6269 * Set the breadcrumbCallback option
6270 *
6271 * @param {function} callback The callback to run which allows filtering
6272 * or mutating breadcrumbs
6273 * @return {Raven}
6274 */
6275 setBreadcrumbCallback: function(callback) {
6276 var original = this._globalOptions.breadcrumbCallback;
6277 this._globalOptions.breadcrumbCallback = keepOriginalCallback(original, callback);
6278 return this;
6279 },
6280
6281 /*
6282 * Set the shouldSendCallback option
6283 *
6284 * @param {function} callback The callback to run which allows
6285 * introspecting the blob before sending
6286 * @return {Raven}
6287 */
6288 setShouldSendCallback: function(callback) {
6289 var original = this._globalOptions.shouldSendCallback;
6290 this._globalOptions.shouldSendCallback = keepOriginalCallback(original, callback);
6291 return this;
6292 },
6293
6294 /**
6295 * Override the default HTTP transport mechanism that transmits data
6296 * to the Sentry server.
6297 *
6298 * @param {function} transport Function invoked instead of the default
6299 * `makeRequest` handler.
6300 *
6301 * @return {Raven}
6302 */
6303 setTransport: function(transport) {
6304 this._globalOptions.transport = transport;
6305
6306 return this;
6307 },
6308
6309 /*
6310 * Get the latest raw exception that was captured by Raven.
6311 *
6312 * @return {error}
6313 */
6314 lastException: function() {
6315 return this._lastCapturedException;
6316 },
6317
6318 /*
6319 * Get the last event id
6320 *
6321 * @return {string}
6322 */
6323 lastEventId: function() {
6324 return this._lastEventId;
6325 },
6326
6327 /*
6328 * Determine if Raven is setup and ready to go.
6329 *
6330 * @return {boolean}
6331 */
6332 isSetup: function() {
6333 if (!this._hasJSON) return false; // needs JSON support
6334 if (!this._globalServer) {
6335 if (!this.ravenNotConfiguredError) {
6336 this.ravenNotConfiguredError = true;
6337 this._logDebug('error', 'Error: Raven has not been configured.');
6338 }
6339 return false;
6340 }
6341 return true;
6342 },
6343
6344 afterLoad: function() {
6345 // TODO: remove window dependence?
6346
6347 // Attempt to initialize Raven on load
6348 var RavenConfig = _window.RavenConfig;
6349 if (RavenConfig) {
6350 this.config(RavenConfig.dsn, RavenConfig.config).install();
6351 }
6352 },
6353
6354 showReportDialog: function(options) {
6355 if (
6356 !_document // doesn't work without a document (React native)
6357 )
6358 return;
6359
6360 options = options || {};
6361
6362 var lastEventId = options.eventId || this.lastEventId();
6363 if (!lastEventId) {
6364 throw new RavenConfigError('Missing eventId');
6365 }
6366
6367 var dsn = options.dsn || this._dsn;
6368 if (!dsn) {
6369 throw new RavenConfigError('Missing DSN');
6370 }
6371
6372 var encode = encodeURIComponent;
6373 var qs = '';
6374 qs += '?eventId=' + encode(lastEventId);
6375 qs += '&dsn=' + encode(dsn);
6376
6377 var user = options.user || this._globalContext.user;
6378 if (user) {
6379 if (user.name) qs += '&name=' + encode(user.name);
6380 if (user.email) qs += '&email=' + encode(user.email);
6381 }
6382
6383 var globalServer = this._getGlobalServer(this._parseDSN(dsn));
6384
6385 var script = _document.createElement('script');
6386 script.async = true;
6387 script.src = globalServer + '/api/embed/error-page/' + qs;
6388 (_document.head || _document.body).appendChild(script);
6389 },
6390
6391 /**** Private functions ****/
6392 _ignoreNextOnError: function() {
6393 var self = this;
6394 this._ignoreOnError += 1;
6395 setTimeout(function() {
6396 // onerror should trigger before setTimeout
6397 self._ignoreOnError -= 1;
6398 });
6399 },
6400
6401 _triggerEvent: function(eventType, options) {
6402 // NOTE: `event` is a native browser thing, so let's avoid conflicting wiht it
6403 var evt, key;
6404
6405 if (!this._hasDocument) return;
6406
6407 options = options || {};
6408
6409 eventType = 'raven' + eventType.substr(0, 1).toUpperCase() + eventType.substr(1);
6410
6411 if (_document.createEvent) {
6412 evt = _document.createEvent('HTMLEvents');
6413 evt.initEvent(eventType, true, true);
6414 } else {
6415 evt = _document.createEventObject();
6416 evt.eventType = eventType;
6417 }
6418
6419 for (key in options)
6420 if (hasKey(options, key)) {
6421 evt[key] = options[key];
6422 }
6423
6424 if (_document.createEvent) {
6425 // IE9 if standards
6426 _document.dispatchEvent(evt);
6427 } else {
6428 // IE8 regardless of Quirks or Standards
6429 // IE9 if quirks
6430 try {
6431 _document.fireEvent('on' + evt.eventType.toLowerCase(), evt);
6432 } catch (e) {
6433 // Do nothing
6434 }
6435 }
6436 },
6437
6438 /**
6439 * Wraps addEventListener to capture UI breadcrumbs
6440 * @param evtName the event name (e.g. "click")
6441 * @returns {Function}
6442 * @private
6443 */
6444 _breadcrumbEventHandler: function(evtName) {
6445 var self = this;
6446 return function(evt) {
6447 // reset keypress timeout; e.g. triggering a 'click' after
6448 // a 'keypress' will reset the keypress debounce so that a new
6449 // set of keypresses can be recorded
6450 self._keypressTimeout = null;
6451
6452 // It's possible this handler might trigger multiple times for the same
6453 // event (e.g. event propagation through node ancestors). Ignore if we've
6454 // already captured the event.
6455 if (self._lastCapturedEvent === evt) return;
6456
6457 self._lastCapturedEvent = evt;
6458
6459 // try/catch both:
6460 // - accessing evt.target (see getsentry/raven-js#838, #768)
6461 // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly
6462 // can throw an exception in some circumstances.
6463 var target;
6464 try {
6465 target = htmlTreeAsString(evt.target);
6466 } catch (e) {
6467 target = '<unknown>';
6468 }
6469
6470 self.captureBreadcrumb({
6471 category: 'ui.' + evtName, // e.g. ui.click, ui.input
6472 message: target
6473 });
6474 };
6475 },
6476
6477 /**
6478 * Wraps addEventListener to capture keypress UI events
6479 * @returns {Function}
6480 * @private
6481 */
6482 _keypressEventHandler: function() {
6483 var self = this,
6484 debounceDuration = 1000; // milliseconds
6485
6486 // TODO: if somehow user switches keypress target before
6487 // debounce timeout is triggered, we will only capture
6488 // a single breadcrumb from the FIRST target (acceptable?)
6489 return function(evt) {
6490 var target;
6491 try {
6492 target = evt.target;
6493 } catch (e) {
6494 // just accessing event properties can throw an exception in some rare circumstances
6495 // see: https://github.com/getsentry/raven-js/issues/838
6496 return;
6497 }
6498 var tagName = target && target.tagName;
6499
6500 // only consider keypress events on actual input elements
6501 // this will disregard keypresses targeting body (e.g. tabbing
6502 // through elements, hotkeys, etc)
6503 if (
6504 !tagName ||
6505 (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable)
6506 )
6507 return;
6508
6509 // record first keypress in a series, but ignore subsequent
6510 // keypresses until debounce clears
6511 var timeout = self._keypressTimeout;
6512 if (!timeout) {
6513 self._breadcrumbEventHandler('input')(evt);
6514 }
6515 clearTimeout(timeout);
6516 self._keypressTimeout = setTimeout(function() {
6517 self._keypressTimeout = null;
6518 }, debounceDuration);
6519 };
6520 },
6521
6522 /**
6523 * Captures a breadcrumb of type "navigation", normalizing input URLs
6524 * @param to the originating URL
6525 * @param from the target URL
6526 * @private
6527 */
6528 _captureUrlChange: function(from, to) {
6529 var parsedLoc = parseUrl(this._location.href);
6530 var parsedTo = parseUrl(to);
6531 var parsedFrom = parseUrl(from);
6532
6533 // because onpopstate only tells you the "new" (to) value of location.href, and
6534 // not the previous (from) value, we need to track the value of the current URL
6535 // state ourselves
6536 this._lastHref = to;
6537
6538 // Use only the path component of the URL if the URL matches the current
6539 // document (almost all the time when using pushState)
6540 if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host)
6541 to = parsedTo.relative;
6542 if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host)
6543 from = parsedFrom.relative;
6544
6545 this.captureBreadcrumb({
6546 category: 'navigation',
6547 data: {
6548 to: to,
6549 from: from
6550 }
6551 });
6552 },
6553
6554 /**
6555 * Wrap timer functions and event targets to catch errors and provide
6556 * better metadata.
6557 */
6558 _instrumentTryCatch: function() {
6559 var self = this;
6560
6561 var wrappedBuiltIns = self._wrappedBuiltIns;
6562
6563 function wrapTimeFn(orig) {
6564 return function(fn, t) {
6565 // preserve arity
6566 // Make a copy of the arguments to prevent deoptimization
6567 // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
6568 var args = new Array(arguments.length);
6569 for (var i = 0; i < args.length; ++i) {
6570 args[i] = arguments[i];
6571 }
6572 var originalCallback = args[0];
6573 if (isFunction(originalCallback)) {
6574 args[0] = self.wrap(originalCallback);
6575 }
6576
6577 // IE < 9 doesn't support .call/.apply on setInterval/setTimeout, but it
6578 // also supports only two arguments and doesn't care what this is, so we
6579 // can just call the original function directly.
6580 if (orig.apply) {
6581 return orig.apply(this, args);
6582 } else {
6583 return orig(args[0], args[1]);
6584 }
6585 };
6586 }
6587
6588 var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
6589
6590 function wrapEventTarget(global) {
6591 var proto = _window[global] && _window[global].prototype;
6592 if (proto && proto.hasOwnProperty && proto.hasOwnProperty('addEventListener')) {
6593 fill(
6594 proto,
6595 'addEventListener',
6596 function(orig) {
6597 return function(evtName, fn, capture, secure) {
6598 // preserve arity
6599 try {
6600 if (fn && fn.handleEvent) {
6601 fn.handleEvent = self.wrap(fn.handleEvent);
6602 }
6603 } catch (err) {
6604 // can sometimes get 'Permission denied to access property "handle Event'
6605 }
6606
6607 // More breadcrumb DOM capture ... done here and not in `_instrumentBreadcrumbs`
6608 // so that we don't have more than one wrapper function
6609 var before, clickHandler, keypressHandler;
6610
6611 if (
6612 autoBreadcrumbs &&
6613 autoBreadcrumbs.dom &&
6614 (global === 'EventTarget' || global === 'Node')
6615 ) {
6616 // NOTE: generating multiple handlers per addEventListener invocation, should
6617 // revisit and verify we can just use one (almost certainly)
6618 clickHandler = self._breadcrumbEventHandler('click');
6619 keypressHandler = self._keypressEventHandler();
6620 before = function(evt) {
6621 // need to intercept every DOM event in `before` argument, in case that
6622 // same wrapped method is re-used for different events (e.g. mousemove THEN click)
6623 // see #724
6624 if (!evt) return;
6625
6626 var eventType;
6627 try {
6628 eventType = evt.type;
6629 } catch (e) {
6630 // just accessing event properties can throw an exception in some rare circumstances
6631 // see: https://github.com/getsentry/raven-js/issues/838
6632 return;
6633 }
6634 if (eventType === 'click') return clickHandler(evt);
6635 else if (eventType === 'keypress') return keypressHandler(evt);
6636 };
6637 }
6638 return orig.call(
6639 this,
6640 evtName,
6641 self.wrap(fn, undefined, before),
6642 capture,
6643 secure
6644 );
6645 };
6646 },
6647 wrappedBuiltIns
6648 );
6649 fill(
6650 proto,
6651 'removeEventListener',
6652 function(orig) {
6653 return function(evt, fn, capture, secure) {
6654 try {
6655 fn = fn && (fn.__raven_wrapper__ ? fn.__raven_wrapper__ : fn);
6656 } catch (e) {
6657 // ignore, accessing __raven_wrapper__ will throw in some Selenium environments
6658 }
6659 return orig.call(this, evt, fn, capture, secure);
6660 };
6661 },
6662 wrappedBuiltIns
6663 );
6664 }
6665 }
6666
6667 fill(_window, 'setTimeout', wrapTimeFn, wrappedBuiltIns);
6668 fill(_window, 'setInterval', wrapTimeFn, wrappedBuiltIns);
6669 if (_window.requestAnimationFrame) {
6670 fill(
6671 _window,
6672 'requestAnimationFrame',
6673 function(orig) {
6674 return function(cb) {
6675 return orig(self.wrap(cb));
6676 };
6677 },
6678 wrappedBuiltIns
6679 );
6680 }
6681
6682 // event targets borrowed from bugsnag-js:
6683 // https://github.com/bugsnag/bugsnag-js/blob/master/src/bugsnag.js#L666
6684 var eventTargets = [
6685 'EventTarget',
6686 'Window',
6687 'Node',
6688 'ApplicationCache',
6689 'AudioTrackList',
6690 'ChannelMergerNode',
6691 'CryptoOperation',
6692 'EventSource',
6693 'FileReader',
6694 'HTMLUnknownElement',
6695 'IDBDatabase',
6696 'IDBRequest',
6697 'IDBTransaction',
6698 'KeyOperation',
6699 'MediaController',
6700 'MessagePort',
6701 'ModalWindow',
6702 'Notification',
6703 'SVGElementInstance',
6704 'Screen',
6705 'TextTrack',
6706 'TextTrackCue',
6707 'TextTrackList',
6708 'WebSocket',
6709 'WebSocketWorker',
6710 'Worker',
6711 'XMLHttpRequest',
6712 'XMLHttpRequestEventTarget',
6713 'XMLHttpRequestUpload'
6714 ];
6715 for (var i = 0; i < eventTargets.length; i++) {
6716 wrapEventTarget(eventTargets[i]);
6717 }
6718 },
6719
6720 /**
6721 * Instrument browser built-ins w/ breadcrumb capturing
6722 * - XMLHttpRequests
6723 * - DOM interactions (click/typing)
6724 * - window.location changes
6725 * - console
6726 *
6727 * Can be disabled or individually configured via the `autoBreadcrumbs` config option
6728 */
6729 _instrumentBreadcrumbs: function() {
6730 var self = this;
6731 var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
6732
6733 var wrappedBuiltIns = self._wrappedBuiltIns;
6734
6735 function wrapProp(prop, xhr) {
6736 if (prop in xhr && isFunction(xhr[prop])) {
6737 fill(xhr, prop, function(orig) {
6738 return self.wrap(orig);
6739 }); // intentionally don't track filled methods on XHR instances
6740 }
6741 }
6742
6743 if (autoBreadcrumbs.xhr && 'XMLHttpRequest' in _window) {
6744 var xhrproto = XMLHttpRequest.prototype;
6745 fill(
6746 xhrproto,
6747 'open',
6748 function(origOpen) {
6749 return function(method, url) {
6750 // preserve arity
6751
6752 // if Sentry key appears in URL, don't capture
6753 if (isString(url) && url.indexOf(self._globalKey) === -1) {
6754 this.__raven_xhr = {
6755 method: method,
6756 url: url,
6757 status_code: null
6758 };
6759 }
6760
6761 return origOpen.apply(this, arguments);
6762 };
6763 },
6764 wrappedBuiltIns
6765 );
6766
6767 fill(
6768 xhrproto,
6769 'send',
6770 function(origSend) {
6771 return function(data) {
6772 // preserve arity
6773 var xhr = this;
6774
6775 function onreadystatechangeHandler() {
6776 if (xhr.__raven_xhr && xhr.readyState === 4) {
6777 try {
6778 // touching statusCode in some platforms throws
6779 // an exception
6780 xhr.__raven_xhr.status_code = xhr.status;
6781 } catch (e) {
6782 /* do nothing */
6783 }
6784
6785 self.captureBreadcrumb({
6786 type: 'http',
6787 category: 'xhr',
6788 data: xhr.__raven_xhr
6789 });
6790 }
6791 }
6792
6793 var props = ['onload', 'onerror', 'onprogress'];
6794 for (var j = 0; j < props.length; j++) {
6795 wrapProp(props[j], xhr);
6796 }
6797
6798 if ('onreadystatechange' in xhr && isFunction(xhr.onreadystatechange)) {
6799 fill(
6800 xhr,
6801 'onreadystatechange',
6802 function(orig) {
6803 return self.wrap(orig, undefined, onreadystatechangeHandler);
6804 } /* intentionally don't track this instrumentation */
6805 );
6806 } else {
6807 // if onreadystatechange wasn't actually set by the page on this xhr, we
6808 // are free to set our own and capture the breadcrumb
6809 xhr.onreadystatechange = onreadystatechangeHandler;
6810 }
6811
6812 return origSend.apply(this, arguments);
6813 };
6814 },
6815 wrappedBuiltIns
6816 );
6817 }
6818
6819 if (autoBreadcrumbs.xhr && 'fetch' in _window) {
6820 fill(
6821 _window,
6822 'fetch',
6823 function(origFetch) {
6824 return function(fn, t) {
6825 // preserve arity
6826 // Make a copy of the arguments to prevent deoptimization
6827 // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
6828 var args = new Array(arguments.length);
6829 for (var i = 0; i < args.length; ++i) {
6830 args[i] = arguments[i];
6831 }
6832
6833 var fetchInput = args[0];
6834 var method = 'GET';
6835 var url;
6836
6837 if (typeof fetchInput === 'string') {
6838 url = fetchInput;
6839 } else if ('Request' in _window && fetchInput instanceof _window.Request) {
6840 url = fetchInput.url;
6841 if (fetchInput.method) {
6842 method = fetchInput.method;
6843 }
6844 } else {
6845 url = '' + fetchInput;
6846 }
6847
6848 if (args[1] && args[1].method) {
6849 method = args[1].method;
6850 }
6851
6852 var fetchData = {
6853 method: method,
6854 url: url,
6855 status_code: null
6856 };
6857
6858 self.captureBreadcrumb({
6859 type: 'http',
6860 category: 'fetch',
6861 data: fetchData
6862 });
6863
6864 return origFetch.apply(this, args).then(function(response) {
6865 fetchData.status_code = response.status;
6866
6867 return response;
6868 });
6869 };
6870 },
6871 wrappedBuiltIns
6872 );
6873 }
6874
6875 // Capture breadcrumbs from any click that is unhandled / bubbled up all the way
6876 // to the document. Do this before we instrument addEventListener.
6877 if (autoBreadcrumbs.dom && this._hasDocument) {
6878 if (_document.addEventListener) {
6879 _document.addEventListener('click', self._breadcrumbEventHandler('click'), false);
6880 _document.addEventListener('keypress', self._keypressEventHandler(), false);
6881 } else {
6882 // IE8 Compatibility
6883 _document.attachEvent('onclick', self._breadcrumbEventHandler('click'));
6884 _document.attachEvent('onkeypress', self._keypressEventHandler());
6885 }
6886 }
6887
6888 // record navigation (URL) changes
6889 // NOTE: in Chrome App environment, touching history.pushState, *even inside
6890 // a try/catch block*, will cause Chrome to output an error to console.error
6891 // borrowed from: https://github.com/angular/angular.js/pull/13945/files
6892 var chrome = _window.chrome;
6893 var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;
6894 var hasPushAndReplaceState =
6895 !isChromePackagedApp &&
6896 _window.history &&
6897 history.pushState &&
6898 history.replaceState;
6899 if (autoBreadcrumbs.location && hasPushAndReplaceState) {
6900 // TODO: remove onpopstate handler on uninstall()
6901 var oldOnPopState = _window.onpopstate;
6902 _window.onpopstate = function() {
6903 var currentHref = self._location.href;
6904 self._captureUrlChange(self._lastHref, currentHref);
6905
6906 if (oldOnPopState) {
6907 return oldOnPopState.apply(this, arguments);
6908 }
6909 };
6910
6911 var historyReplacementFunction = function(origHistFunction) {
6912 // note history.pushState.length is 0; intentionally not declaring
6913 // params to preserve 0 arity
6914 return function(/* state, title, url */) {
6915 var url = arguments.length > 2 ? arguments[2] : undefined;
6916
6917 // url argument is optional
6918 if (url) {
6919 // coerce to string (this is what pushState does)
6920 self._captureUrlChange(self._lastHref, url + '');
6921 }
6922
6923 return origHistFunction.apply(this, arguments);
6924 };
6925 };
6926
6927 fill(history, 'pushState', historyReplacementFunction, wrappedBuiltIns);
6928 fill(history, 'replaceState', historyReplacementFunction, wrappedBuiltIns);
6929 }
6930
6931 if (autoBreadcrumbs.console && 'console' in _window && console.log) {
6932 // console
6933 var consoleMethodCallback = function(msg, data) {
6934 self.captureBreadcrumb({
6935 message: msg,
6936 level: data.level,
6937 category: 'console'
6938 });
6939 };
6940
6941 each(['debug', 'info', 'warn', 'error', 'log'], function(_, level) {
6942 wrapConsoleMethod(console, level, consoleMethodCallback);
6943 });
6944 }
6945 },
6946
6947 _restoreBuiltIns: function() {
6948 // restore any wrapped builtins
6949 var builtin;
6950 while (this._wrappedBuiltIns.length) {
6951 builtin = this._wrappedBuiltIns.shift();
6952
6953 var obj = builtin[0],
6954 name = builtin[1],
6955 orig = builtin[2];
6956
6957 obj[name] = orig;
6958 }
6959 },
6960
6961 _drainPlugins: function() {
6962 var self = this;
6963
6964 // FIX ME TODO
6965 each(this._plugins, function(_, plugin) {
6966 var installer = plugin[0];
6967 var args = plugin[1];
6968 installer.apply(self, [self].concat(args));
6969 });
6970 },
6971
6972 _parseDSN: function(str) {
6973 var m = dsnPattern.exec(str),
6974 dsn = {},
6975 i = 7;
6976
6977 try {
6978 while (i--) dsn[dsnKeys[i]] = m[i] || '';
6979 } catch (e) {
6980 throw new RavenConfigError('Invalid DSN: ' + str);
6981 }
6982
6983 if (dsn.pass && !this._globalOptions.allowSecretKey) {
6984 throw new RavenConfigError(
6985 'Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key'
6986 );
6987 }
6988
6989 return dsn;
6990 },
6991
6992 _getGlobalServer: function(uri) {
6993 // assemble the endpoint from the uri pieces
6994 var globalServer = '//' + uri.host + (uri.port ? ':' + uri.port : '');
6995
6996 if (uri.protocol) {
6997 globalServer = uri.protocol + ':' + globalServer;
6998 }
6999 return globalServer;
7000 },
7001
7002 _handleOnErrorStackInfo: function() {
7003 // if we are intentionally ignoring errors via onerror, bail out
7004 if (!this._ignoreOnError) {
7005 this._handleStackInfo.apply(this, arguments);
7006 }
7007 },
7008
7009 _handleStackInfo: function(stackInfo, options) {
7010 var frames = this._prepareFrames(stackInfo, options);
7011
7012 this._triggerEvent('handle', {
7013 stackInfo: stackInfo,
7014 options: options
7015 });
7016
7017 this._processException(
7018 stackInfo.name,
7019 stackInfo.message,
7020 stackInfo.url,
7021 stackInfo.lineno,
7022 frames,
7023 options
7024 );
7025 },
7026
7027 _prepareFrames: function(stackInfo, options) {
7028 var self = this;
7029 var frames = [];
7030 if (stackInfo.stack && stackInfo.stack.length) {
7031 each(stackInfo.stack, function(i, stack) {
7032 var frame = self._normalizeFrame(stack, stackInfo.url);
7033 if (frame) {
7034 frames.push(frame);
7035 }
7036 });
7037
7038 // e.g. frames captured via captureMessage throw
7039 if (options && options.trimHeadFrames) {
7040 for (var j = 0; j < options.trimHeadFrames && j < frames.length; j++) {
7041 frames[j].in_app = false;
7042 }
7043 }
7044 }
7045 frames = frames.slice(0, this._globalOptions.stackTraceLimit);
7046 return frames;
7047 },
7048
7049 _normalizeFrame: function(frame, stackInfoUrl) {
7050 // normalize the frames data
7051 var normalized = {
7052 filename: frame.url,
7053 lineno: frame.line,
7054 colno: frame.column,
7055 function: frame.func || '?'
7056 };
7057
7058 // Case when we don't have any information about the error
7059 // E.g. throwing a string or raw object, instead of an `Error` in Firefox
7060 // Generating synthetic error doesn't add any value here
7061 //
7062 // We should probably somehow let a user know that they should fix their code
7063 if (!frame.url) {
7064 normalized.filename = stackInfoUrl; // fallback to whole stacks url from onerror handler
7065 }
7066
7067 normalized.in_app = !// determine if an exception came from outside of our app
7068 // first we check the global includePaths list.
7069 (
7070 (!!this._globalOptions.includePaths.test &&
7071 !this._globalOptions.includePaths.test(normalized.filename)) ||
7072 // Now we check for fun, if the function name is Raven or TraceKit
7073 /(Raven|TraceKit)\./.test(normalized['function']) ||
7074 // finally, we do a last ditch effort and check for raven.min.js
7075 /raven\.(min\.)?js$/.test(normalized.filename)
7076 );
7077
7078 return normalized;
7079 },
7080
7081 _processException: function(type, message, fileurl, lineno, frames, options) {
7082 var prefixedMessage = (type ? type + ': ' : '') + (message || '');
7083 if (
7084 !!this._globalOptions.ignoreErrors.test &&
7085 (this._globalOptions.ignoreErrors.test(message) ||
7086 this._globalOptions.ignoreErrors.test(prefixedMessage))
7087 ) {
7088 return;
7089 }
7090
7091 var stacktrace;
7092
7093 if (frames && frames.length) {
7094 fileurl = frames[0].filename || fileurl;
7095 // Sentry expects frames oldest to newest
7096 // and JS sends them as newest to oldest
7097 frames.reverse();
7098 stacktrace = {frames: frames};
7099 } else if (fileurl) {
7100 stacktrace = {
7101 frames: [
7102 {
7103 filename: fileurl,
7104 lineno: lineno,
7105 in_app: true
7106 }
7107 ]
7108 };
7109 }
7110
7111 if (
7112 !!this._globalOptions.ignoreUrls.test &&
7113 this._globalOptions.ignoreUrls.test(fileurl)
7114 ) {
7115 return;
7116 }
7117
7118 if (
7119 !!this._globalOptions.whitelistUrls.test &&
7120 !this._globalOptions.whitelistUrls.test(fileurl)
7121 ) {
7122 return;
7123 }
7124
7125 var data = objectMerge(
7126 {
7127 // sentry.interfaces.Exception
7128 exception: {
7129 values: [
7130 {
7131 type: type,
7132 value: message,
7133 stacktrace: stacktrace
7134 }
7135 ]
7136 },
7137 culprit: fileurl
7138 },
7139 options
7140 );
7141
7142 // Fire away!
7143 this._send(data);
7144 },
7145
7146 _trimPacket: function(data) {
7147 // For now, we only want to truncate the two different messages
7148 // but this could/should be expanded to just trim everything
7149 var max = this._globalOptions.maxMessageLength;
7150 if (data.message) {
7151 data.message = truncate(data.message, max);
7152 }
7153 if (data.exception) {
7154 var exception = data.exception.values[0];
7155 exception.value = truncate(exception.value, max);
7156 }
7157
7158 var request = data.request;
7159 if (request) {
7160 if (request.url) {
7161 request.url = truncate(request.url, this._globalOptions.maxUrlLength);
7162 }
7163 if (request.Referer) {
7164 request.Referer = truncate(request.Referer, this._globalOptions.maxUrlLength);
7165 }
7166 }
7167
7168 if (data.breadcrumbs && data.breadcrumbs.values)
7169 this._trimBreadcrumbs(data.breadcrumbs);
7170
7171 return data;
7172 },
7173
7174 /**
7175 * Truncate breadcrumb values (right now just URLs)
7176 */
7177 _trimBreadcrumbs: function(breadcrumbs) {
7178 // known breadcrumb properties with urls
7179 // TODO: also consider arbitrary prop values that start with (https?)?://
7180 var urlProps = ['to', 'from', 'url'],
7181 urlProp,
7182 crumb,
7183 data;
7184
7185 for (var i = 0; i < breadcrumbs.values.length; ++i) {
7186 crumb = breadcrumbs.values[i];
7187 if (
7188 !crumb.hasOwnProperty('data') ||
7189 !isObject(crumb.data) ||
7190 objectFrozen(crumb.data)
7191 )
7192 continue;
7193
7194 data = objectMerge({}, crumb.data);
7195 for (var j = 0; j < urlProps.length; ++j) {
7196 urlProp = urlProps[j];
7197 if (data.hasOwnProperty(urlProp) && data[urlProp]) {
7198 data[urlProp] = truncate(data[urlProp], this._globalOptions.maxUrlLength);
7199 }
7200 }
7201 breadcrumbs.values[i].data = data;
7202 }
7203 },
7204
7205 _getHttpData: function() {
7206 if (!this._hasNavigator && !this._hasDocument) return;
7207 var httpData = {};
7208
7209 if (this._hasNavigator && _navigator.userAgent) {
7210 httpData.headers = {
7211 'User-Agent': navigator.userAgent
7212 };
7213 }
7214
7215 if (this._hasDocument) {
7216 if (_document.location && _document.location.href) {
7217 httpData.url = _document.location.href;
7218 }
7219 if (_document.referrer) {
7220 if (!httpData.headers) httpData.headers = {};
7221 httpData.headers.Referer = _document.referrer;
7222 }
7223 }
7224
7225 return httpData;
7226 },
7227
7228 _resetBackoff: function() {
7229 this._backoffDuration = 0;
7230 this._backoffStart = null;
7231 },
7232
7233 _shouldBackoff: function() {
7234 return this._backoffDuration && now() - this._backoffStart < this._backoffDuration;
7235 },
7236
7237 /**
7238 * Returns true if the in-process data payload matches the signature
7239 * of the previously-sent data
7240 *
7241 * NOTE: This has to be done at this level because TraceKit can generate
7242 * data from window.onerror WITHOUT an exception object (IE8, IE9,
7243 * other old browsers). This can take the form of an "exception"
7244 * data object with a single frame (derived from the onerror args).
7245 */
7246 _isRepeatData: function(current) {
7247 var last = this._lastData;
7248
7249 if (
7250 !last ||
7251 current.message !== last.message || // defined for captureMessage
7252 current.culprit !== last.culprit // defined for captureException/onerror
7253 )
7254 return false;
7255
7256 // Stacktrace interface (i.e. from captureMessage)
7257 if (current.stacktrace || last.stacktrace) {
7258 return isSameStacktrace(current.stacktrace, last.stacktrace);
7259 } else if (current.exception || last.exception) {
7260 // Exception interface (i.e. from captureException/onerror)
7261 return isSameException(current.exception, last.exception);
7262 }
7263
7264 return true;
7265 },
7266
7267 _setBackoffState: function(request) {
7268 // If we are already in a backoff state, don't change anything
7269 if (this._shouldBackoff()) {
7270 return;
7271 }
7272
7273 var status = request.status;
7274
7275 // 400 - project_id doesn't exist or some other fatal
7276 // 401 - invalid/revoked dsn
7277 // 429 - too many requests
7278 if (!(status === 400 || status === 401 || status === 429)) return;
7279
7280 var retry;
7281 try {
7282 // If Retry-After is not in Access-Control-Expose-Headers, most
7283 // browsers will throw an exception trying to access it
7284 retry = request.getResponseHeader('Retry-After');
7285 retry = parseInt(retry, 10) * 1000; // Retry-After is returned in seconds
7286 } catch (e) {
7287 /* eslint no-empty:0 */
7288 }
7289
7290 this._backoffDuration = retry
7291 ? // If Sentry server returned a Retry-After value, use it
7292 retry
7293 : // Otherwise, double the last backoff duration (starts at 1 sec)
7294 this._backoffDuration * 2 || 1000;
7295
7296 this._backoffStart = now();
7297 },
7298
7299 _send: function(data) {
7300 var globalOptions = this._globalOptions;
7301
7302 var baseData = {
7303 project: this._globalProject,
7304 logger: globalOptions.logger,
7305 platform: 'javascript'
7306 },
7307 httpData = this._getHttpData();
7308
7309 if (httpData) {
7310 baseData.request = httpData;
7311 }
7312
7313 // HACK: delete `trimHeadFrames` to prevent from appearing in outbound payload
7314 if (data.trimHeadFrames) delete data.trimHeadFrames;
7315
7316 data = objectMerge(baseData, data);
7317
7318 // Merge in the tags and extra separately since objectMerge doesn't handle a deep merge
7319 data.tags = objectMerge(objectMerge({}, this._globalContext.tags), data.tags);
7320 data.extra = objectMerge(objectMerge({}, this._globalContext.extra), data.extra);
7321
7322 // Send along our own collected metadata with extra
7323 data.extra['session:duration'] = now() - this._startTime;
7324
7325 if (this._breadcrumbs && this._breadcrumbs.length > 0) {
7326 // intentionally make shallow copy so that additions
7327 // to breadcrumbs aren't accidentally sent in this request
7328 data.breadcrumbs = {
7329 values: [].slice.call(this._breadcrumbs, 0)
7330 };
7331 }
7332
7333 // If there are no tags/extra, strip the key from the payload alltogther.
7334 if (isEmptyObject(data.tags)) delete data.tags;
7335
7336 if (this._globalContext.user) {
7337 // sentry.interfaces.User
7338 data.user = this._globalContext.user;
7339 }
7340
7341 // Include the environment if it's defined in globalOptions
7342 if (globalOptions.environment) data.environment = globalOptions.environment;
7343
7344 // Include the release if it's defined in globalOptions
7345 if (globalOptions.release) data.release = globalOptions.release;
7346
7347 // Include server_name if it's defined in globalOptions
7348 if (globalOptions.serverName) data.server_name = globalOptions.serverName;
7349
7350 if (isFunction(globalOptions.dataCallback)) {
7351 data = globalOptions.dataCallback(data) || data;
7352 }
7353
7354 // Why??????????
7355 if (!data || isEmptyObject(data)) {
7356 return;
7357 }
7358
7359 // Check if the request should be filtered or not
7360 if (
7361 isFunction(globalOptions.shouldSendCallback) &&
7362 !globalOptions.shouldSendCallback(data)
7363 ) {
7364 return;
7365 }
7366
7367 // Backoff state: Sentry server previously responded w/ an error (e.g. 429 - too many requests),
7368 // so drop requests until "cool-off" period has elapsed.
7369 if (this._shouldBackoff()) {
7370 this._logDebug('warn', 'Raven dropped error due to backoff: ', data);
7371 return;
7372 }
7373
7374 if (typeof globalOptions.sampleRate === 'number') {
7375 if (Math.random() < globalOptions.sampleRate) {
7376 this._sendProcessedPayload(data);
7377 }
7378 } else {
7379 this._sendProcessedPayload(data);
7380 }
7381 },
7382
7383 _getUuid: function() {
7384 return uuid4();
7385 },
7386
7387 _sendProcessedPayload: function(data, callback) {
7388 var self = this;
7389 var globalOptions = this._globalOptions;
7390
7391 if (!this.isSetup()) return;
7392
7393 // Try and clean up the packet before sending by truncating long values
7394 data = this._trimPacket(data);
7395
7396 // ideally duplicate error testing should occur *before* dataCallback/shouldSendCallback,
7397 // but this would require copying an un-truncated copy of the data packet, which can be
7398 // arbitrarily deep (extra_data) -- could be worthwhile? will revisit
7399 if (!this._globalOptions.allowDuplicates && this._isRepeatData(data)) {
7400 this._logDebug('warn', 'Raven dropped repeat event: ', data);
7401 return;
7402 }
7403
7404 // Send along an event_id if not explicitly passed.
7405 // This event_id can be used to reference the error within Sentry itself.
7406 // Set lastEventId after we know the error should actually be sent
7407 this._lastEventId = data.event_id || (data.event_id = this._getUuid());
7408
7409 // Store outbound payload after trim
7410 this._lastData = data;
7411
7412 this._logDebug('debug', 'Raven about to send:', data);
7413
7414 var auth = {
7415 sentry_version: '7',
7416 sentry_client: 'raven-js/' + this.VERSION,
7417 sentry_key: this._globalKey
7418 };
7419
7420 if (this._globalSecret) {
7421 auth.sentry_secret = this._globalSecret;
7422 }
7423
7424 var exception = data.exception && data.exception.values[0];
7425 this.captureBreadcrumb({
7426 category: 'sentry',
7427 message: exception
7428 ? (exception.type ? exception.type + ': ' : '') + exception.value
7429 : data.message,
7430 event_id: data.event_id,
7431 level: data.level || 'error' // presume error unless specified
7432 });
7433
7434 var url = this._globalEndpoint;
7435 (globalOptions.transport || this._makeRequest).call(this, {
7436 url: url,
7437 auth: auth,
7438 data: data,
7439 options: globalOptions,
7440 onSuccess: function success() {
7441 self._resetBackoff();
7442
7443 self._triggerEvent('success', {
7444 data: data,
7445 src: url
7446 });
7447 callback && callback();
7448 },
7449 onError: function failure(error) {
7450 self._logDebug('error', 'Raven transport failed to send: ', error);
7451
7452 if (error.request) {
7453 self._setBackoffState(error.request);
7454 }
7455
7456 self._triggerEvent('failure', {
7457 data: data,
7458 src: url
7459 });
7460 error = error || new Error('Raven send failed (no additional details provided)');
7461 callback && callback(error);
7462 }
7463 });
7464 },
7465
7466 _makeRequest: function(opts) {
7467 var request = _window.XMLHttpRequest && new _window.XMLHttpRequest();
7468 if (!request) return;
7469
7470 // if browser doesn't support CORS (e.g. IE7), we are out of luck
7471 var hasCORS = 'withCredentials' in request || typeof XDomainRequest !== 'undefined';
7472
7473 if (!hasCORS) return;
7474
7475 var url = opts.url;
7476
7477 if ('withCredentials' in request) {
7478 request.onreadystatechange = function() {
7479 if (request.readyState !== 4) {
7480 return;
7481 } else if (request.status === 200) {
7482 opts.onSuccess && opts.onSuccess();
7483 } else if (opts.onError) {
7484 var err = new Error('Sentry error code: ' + request.status);
7485 err.request = request;
7486 opts.onError(err);
7487 }
7488 };
7489 } else {
7490 request = new XDomainRequest();
7491 // xdomainrequest cannot go http -> https (or vice versa),
7492 // so always use protocol relative
7493 url = url.replace(/^https?:/, '');
7494
7495 // onreadystatechange not supported by XDomainRequest
7496 if (opts.onSuccess) {
7497 request.onload = opts.onSuccess;
7498 }
7499 if (opts.onError) {
7500 request.onerror = function() {
7501 var err = new Error('Sentry error code: XDomainRequest');
7502 err.request = request;
7503 opts.onError(err);
7504 };
7505 }
7506 }
7507
7508 // NOTE: auth is intentionally sent as part of query string (NOT as custom
7509 // HTTP header) so as to avoid preflight CORS requests
7510 request.open('POST', url + '?' + urlencode(opts.auth));
7511 request.send(stringify(opts.data));
7512 },
7513
7514 _logDebug: function(level) {
7515 if (this._originalConsoleMethods[level] && this.debug) {
7516 // In IE<10 console methods do not have their own 'apply' method
7517 Function.prototype.apply.call(
7518 this._originalConsoleMethods[level],
7519 this._originalConsole,
7520 [].slice.call(arguments, 1)
7521 );
7522 }
7523 },
7524
7525 _mergeContext: function(key, context) {
7526 if (isUndefined(context)) {
7527 delete this._globalContext[key];
7528 } else {
7529 this._globalContext[key] = objectMerge(this._globalContext[key] || {}, context);
7530 }
7531 }
7532 };
7533
7534 // Deprecations
7535 Raven.prototype.setUser = Raven.prototype.setUserContext;
7536 Raven.prototype.setReleaseContext = Raven.prototype.setRelease;
7537
7538 module.exports = Raven;
7539
7540
7541 /***/ }),
7542
7543 /***/ "./node_modules/raven-js/src/singleton.js":
7544 /*!************************************************!*\
7545 !*** ./node_modules/raven-js/src/singleton.js ***!
7546 \************************************************/
7547 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7548
7549 /**
7550 * Enforces a single instance of the Raven client, and the
7551 * main entry point for Raven. If you are a consumer of the
7552 * Raven library, you SHOULD load this file (vs raven.js).
7553 **/
7554
7555 var RavenConstructor = __webpack_require__(/*! ./raven */ "./node_modules/raven-js/src/raven.js");
7556
7557 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
7558 var _window =
7559 typeof window !== 'undefined'
7560 ? window
7561 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
7562 var _Raven = _window.Raven;
7563
7564 var Raven = new RavenConstructor();
7565
7566 /*
7567 * Allow multiple versions of Raven to be installed.
7568 * Strip Raven from the global context and returns the instance.
7569 *
7570 * @return {Raven}
7571 */
7572 Raven.noConflict = function() {
7573 _window.Raven = _Raven;
7574 return Raven;
7575 };
7576
7577 Raven.afterLoad();
7578
7579 module.exports = Raven;
7580
7581
7582 /***/ }),
7583
7584 /***/ "./node_modules/raven-js/src/utils.js":
7585 /*!********************************************!*\
7586 !*** ./node_modules/raven-js/src/utils.js ***!
7587 \********************************************/
7588 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7589
7590 var _window =
7591 typeof window !== 'undefined'
7592 ? window
7593 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
7594
7595 function isObject(what) {
7596 return typeof what === 'object' && what !== null;
7597 }
7598
7599 // Yanked from https://git.io/vS8DV re-used under CC0
7600 // with some tiny modifications
7601 function isError(value) {
7602 switch ({}.toString.call(value)) {
7603 case '[object Error]':
7604 return true;
7605 case '[object Exception]':
7606 return true;
7607 case '[object DOMException]':
7608 return true;
7609 default:
7610 return value instanceof Error;
7611 }
7612 }
7613
7614 function isErrorEvent(value) {
7615 return supportsErrorEvent() && {}.toString.call(value) === '[object ErrorEvent]';
7616 }
7617
7618 function isUndefined(what) {
7619 return what === void 0;
7620 }
7621
7622 function isFunction(what) {
7623 return typeof what === 'function';
7624 }
7625
7626 function isString(what) {
7627 return Object.prototype.toString.call(what) === '[object String]';
7628 }
7629
7630 function isEmptyObject(what) {
7631 for (var _ in what) return false; // eslint-disable-line guard-for-in, no-unused-vars
7632 return true;
7633 }
7634
7635 function supportsErrorEvent() {
7636 try {
7637 new ErrorEvent(''); // eslint-disable-line no-new
7638 return true;
7639 } catch (e) {
7640 return false;
7641 }
7642 }
7643
7644 function wrappedCallback(callback) {
7645 function dataCallback(data, original) {
7646 var normalizedData = callback(data) || data;
7647 if (original) {
7648 return original(normalizedData) || normalizedData;
7649 }
7650 return normalizedData;
7651 }
7652
7653 return dataCallback;
7654 }
7655
7656 function each(obj, callback) {
7657 var i, j;
7658
7659 if (isUndefined(obj.length)) {
7660 for (i in obj) {
7661 if (hasKey(obj, i)) {
7662 callback.call(null, i, obj[i]);
7663 }
7664 }
7665 } else {
7666 j = obj.length;
7667 if (j) {
7668 for (i = 0; i < j; i++) {
7669 callback.call(null, i, obj[i]);
7670 }
7671 }
7672 }
7673 }
7674
7675 function objectMerge(obj1, obj2) {
7676 if (!obj2) {
7677 return obj1;
7678 }
7679 each(obj2, function(key, value) {
7680 obj1[key] = value;
7681 });
7682 return obj1;
7683 }
7684
7685 /**
7686 * This function is only used for react-native.
7687 * react-native freezes object that have already been sent over the
7688 * js bridge. We need this function in order to check if the object is frozen.
7689 * So it's ok that objectFrozen returns false if Object.isFrozen is not
7690 * supported because it's not relevant for other "platforms". See related issue:
7691 * https://github.com/getsentry/react-native-sentry/issues/57
7692 */
7693 function objectFrozen(obj) {
7694 if (!Object.isFrozen) {
7695 return false;
7696 }
7697 return Object.isFrozen(obj);
7698 }
7699
7700 function truncate(str, max) {
7701 return !max || str.length <= max ? str : str.substr(0, max) + '\u2026';
7702 }
7703
7704 /**
7705 * hasKey, a better form of hasOwnProperty
7706 * Example: hasKey(MainHostObject, property) === true/false
7707 *
7708 * @param {Object} host object to check property
7709 * @param {string} key to check
7710 */
7711 function hasKey(object, key) {
7712 return Object.prototype.hasOwnProperty.call(object, key);
7713 }
7714
7715 function joinRegExp(patterns) {
7716 // Combine an array of regular expressions and strings into one large regexp
7717 // Be mad.
7718 var sources = [],
7719 i = 0,
7720 len = patterns.length,
7721 pattern;
7722
7723 for (; i < len; i++) {
7724 pattern = patterns[i];
7725 if (isString(pattern)) {
7726 // If it's a string, we need to escape it
7727 // Taken from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
7728 sources.push(pattern.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, '\\$1'));
7729 } else if (pattern && pattern.source) {
7730 // If it's a regexp already, we want to extract the source
7731 sources.push(pattern.source);
7732 }
7733 // Intentionally skip other cases
7734 }
7735 return new RegExp(sources.join('|'), 'i');
7736 }
7737
7738 function urlencode(o) {
7739 var pairs = [];
7740 each(o, function(key, value) {
7741 pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));
7742 });
7743 return pairs.join('&');
7744 }
7745
7746 // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B
7747 // intentionally using regex and not <a/> href parsing trick because React Native and other
7748 // environments where DOM might not be available
7749 function parseUrl(url) {
7750 var match = url.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);
7751 if (!match) return {};
7752
7753 // coerce to undefined values to empty string so we don't get 'undefined'
7754 var query = match[6] || '';
7755 var fragment = match[8] || '';
7756 return {
7757 protocol: match[2],
7758 host: match[4],
7759 path: match[5],
7760 relative: match[5] + query + fragment // everything minus origin
7761 };
7762 }
7763 function uuid4() {
7764 var crypto = _window.crypto || _window.msCrypto;
7765
7766 if (!isUndefined(crypto) && crypto.getRandomValues) {
7767 // Use window.crypto API if available
7768 // eslint-disable-next-line no-undef
7769 var arr = new Uint16Array(8);
7770 crypto.getRandomValues(arr);
7771
7772 // set 4 in byte 7
7773 arr[3] = (arr[3] & 0xfff) | 0x4000;
7774 // set 2 most significant bits of byte 9 to '10'
7775 arr[4] = (arr[4] & 0x3fff) | 0x8000;
7776
7777 var pad = function(num) {
7778 var v = num.toString(16);
7779 while (v.length < 4) {
7780 v = '0' + v;
7781 }
7782 return v;
7783 };
7784
7785 return (
7786 pad(arr[0]) +
7787 pad(arr[1]) +
7788 pad(arr[2]) +
7789 pad(arr[3]) +
7790 pad(arr[4]) +
7791 pad(arr[5]) +
7792 pad(arr[6]) +
7793 pad(arr[7])
7794 );
7795 } else {
7796 // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523
7797 return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
7798 var r = (Math.random() * 16) | 0,
7799 v = c === 'x' ? r : (r & 0x3) | 0x8;
7800 return v.toString(16);
7801 });
7802 }
7803 }
7804
7805 /**
7806 * Given a child DOM element, returns a query-selector statement describing that
7807 * and its ancestors
7808 * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]
7809 * @param elem
7810 * @returns {string}
7811 */
7812 function htmlTreeAsString(elem) {
7813 /* eslint no-extra-parens:0*/
7814 var MAX_TRAVERSE_HEIGHT = 5,
7815 MAX_OUTPUT_LEN = 80,
7816 out = [],
7817 height = 0,
7818 len = 0,
7819 separator = ' > ',
7820 sepLength = separator.length,
7821 nextStr;
7822
7823 while (elem && height++ < MAX_TRAVERSE_HEIGHT) {
7824 nextStr = htmlElementAsString(elem);
7825 // bail out if
7826 // - nextStr is the 'html' element
7827 // - the length of the string that would be created exceeds MAX_OUTPUT_LEN
7828 // (ignore this limit if we are on the first iteration)
7829 if (
7830 nextStr === 'html' ||
7831 (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)
7832 ) {
7833 break;
7834 }
7835
7836 out.push(nextStr);
7837
7838 len += nextStr.length;
7839 elem = elem.parentNode;
7840 }
7841
7842 return out.reverse().join(separator);
7843 }
7844
7845 /**
7846 * Returns a simple, query-selector representation of a DOM element
7847 * e.g. [HTMLElement] => input#foo.btn[name=baz]
7848 * @param HTMLElement
7849 * @returns {string}
7850 */
7851 function htmlElementAsString(elem) {
7852 var out = [],
7853 className,
7854 classes,
7855 key,
7856 attr,
7857 i;
7858
7859 if (!elem || !elem.tagName) {
7860 return '';
7861 }
7862
7863 out.push(elem.tagName.toLowerCase());
7864 if (elem.id) {
7865 out.push('#' + elem.id);
7866 }
7867
7868 className = elem.className;
7869 if (className && isString(className)) {
7870 classes = className.split(/\s+/);
7871 for (i = 0; i < classes.length; i++) {
7872 out.push('.' + classes[i]);
7873 }
7874 }
7875 var attrWhitelist = ['type', 'name', 'title', 'alt'];
7876 for (i = 0; i < attrWhitelist.length; i++) {
7877 key = attrWhitelist[i];
7878 attr = elem.getAttribute(key);
7879 if (attr) {
7880 out.push('[' + key + '="' + attr + '"]');
7881 }
7882 }
7883 return out.join('');
7884 }
7885
7886 /**
7887 * Returns true if either a OR b is truthy, but not both
7888 */
7889 function isOnlyOneTruthy(a, b) {
7890 return !!(!!a ^ !!b);
7891 }
7892
7893 /**
7894 * Returns true if the two input exception interfaces have the same content
7895 */
7896 function isSameException(ex1, ex2) {
7897 if (isOnlyOneTruthy(ex1, ex2)) return false;
7898
7899 ex1 = ex1.values[0];
7900 ex2 = ex2.values[0];
7901
7902 if (ex1.type !== ex2.type || ex1.value !== ex2.value) return false;
7903
7904 return isSameStacktrace(ex1.stacktrace, ex2.stacktrace);
7905 }
7906
7907 /**
7908 * Returns true if the two input stack trace interfaces have the same content
7909 */
7910 function isSameStacktrace(stack1, stack2) {
7911 if (isOnlyOneTruthy(stack1, stack2)) return false;
7912
7913 var frames1 = stack1.frames;
7914 var frames2 = stack2.frames;
7915
7916 // Exit early if frame count differs
7917 if (frames1.length !== frames2.length) return false;
7918
7919 // Iterate through every frame; bail out if anything differs
7920 var a, b;
7921 for (var i = 0; i < frames1.length; i++) {
7922 a = frames1[i];
7923 b = frames2[i];
7924 if (
7925 a.filename !== b.filename ||
7926 a.lineno !== b.lineno ||
7927 a.colno !== b.colno ||
7928 a['function'] !== b['function']
7929 )
7930 return false;
7931 }
7932 return true;
7933 }
7934
7935 /**
7936 * Polyfill a method
7937 * @param obj object e.g. `document`
7938 * @param name method name present on object e.g. `addEventListener`
7939 * @param replacement replacement function
7940 * @param track {optional} record instrumentation to an array
7941 */
7942 function fill(obj, name, replacement, track) {
7943 var orig = obj[name];
7944 obj[name] = replacement(orig);
7945 if (track) {
7946 track.push([obj, name, orig]);
7947 }
7948 }
7949
7950 module.exports = {
7951 isObject: isObject,
7952 isError: isError,
7953 isErrorEvent: isErrorEvent,
7954 isUndefined: isUndefined,
7955 isFunction: isFunction,
7956 isString: isString,
7957 isEmptyObject: isEmptyObject,
7958 supportsErrorEvent: supportsErrorEvent,
7959 wrappedCallback: wrappedCallback,
7960 each: each,
7961 objectMerge: objectMerge,
7962 truncate: truncate,
7963 objectFrozen: objectFrozen,
7964 hasKey: hasKey,
7965 joinRegExp: joinRegExp,
7966 urlencode: urlencode,
7967 uuid4: uuid4,
7968 htmlTreeAsString: htmlTreeAsString,
7969 htmlElementAsString: htmlElementAsString,
7970 isSameException: isSameException,
7971 isSameStacktrace: isSameStacktrace,
7972 parseUrl: parseUrl,
7973 fill: fill
7974 };
7975
7976
7977 /***/ }),
7978
7979 /***/ "./node_modules/raven-js/vendor/TraceKit/tracekit.js":
7980 /*!***********************************************************!*\
7981 !*** ./node_modules/raven-js/vendor/TraceKit/tracekit.js ***!
7982 \***********************************************************/
7983 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7984
7985 var utils = __webpack_require__(/*! ../../src/utils */ "./node_modules/raven-js/src/utils.js");
7986
7987 /*
7988 TraceKit - Cross brower stack traces
7989
7990 This was originally forked from github.com/occ/TraceKit, but has since been
7991 largely re-written and is now maintained as part of raven-js. Tests for
7992 this are in test/vendor.
7993
7994 MIT license
7995 */
7996
7997 var TraceKit = {
7998 collectWindowErrors: true,
7999 debug: false
8000 };
8001
8002 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
8003 var _window =
8004 typeof window !== 'undefined'
8005 ? window
8006 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
8007
8008 // global reference to slice
8009 var _slice = [].slice;
8010 var UNKNOWN_FUNCTION = '?';
8011
8012 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types
8013 var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;
8014
8015 function getLocationHref() {
8016 if (typeof document === 'undefined' || document.location == null) return '';
8017
8018 return document.location.href;
8019 }
8020
8021 /**
8022 * TraceKit.report: cross-browser processing of unhandled exceptions
8023 *
8024 * Syntax:
8025 * TraceKit.report.subscribe(function(stackInfo) { ... })
8026 * TraceKit.report.unsubscribe(function(stackInfo) { ... })
8027 * TraceKit.report(exception)
8028 * try { ...code... } catch(ex) { TraceKit.report(ex); }
8029 *
8030 * Supports:
8031 * - Firefox: full stack trace with line numbers, plus column number
8032 * on top frame; column number is not guaranteed
8033 * - Opera: full stack trace with line and column numbers
8034 * - Chrome: full stack trace with line and column numbers
8035 * - Safari: line and column number for the top frame only; some frames
8036 * may be missing, and column number is not guaranteed
8037 * - IE: line and column number for the top frame only; some frames
8038 * may be missing, and column number is not guaranteed
8039 *
8040 * In theory, TraceKit should work on all of the following versions:
8041 * - IE5.5+ (only 8.0 tested)
8042 * - Firefox 0.9+ (only 3.5+ tested)
8043 * - Opera 7+ (only 10.50 tested; versions 9 and earlier may require
8044 * Exceptions Have Stacktrace to be enabled in opera:config)
8045 * - Safari 3+ (only 4+ tested)
8046 * - Chrome 1+ (only 5+ tested)
8047 * - Konqueror 3.5+ (untested)
8048 *
8049 * Requires TraceKit.computeStackTrace.
8050 *
8051 * Tries to catch all unhandled exceptions and report them to the
8052 * subscribed handlers. Please note that TraceKit.report will rethrow the
8053 * exception. This is REQUIRED in order to get a useful stack trace in IE.
8054 * If the exception does not reach the top of the browser, you will only
8055 * get a stack trace from the point where TraceKit.report was called.
8056 *
8057 * Handlers receive a stackInfo object as described in the
8058 * TraceKit.computeStackTrace docs.
8059 */
8060 TraceKit.report = (function reportModuleWrapper() {
8061 var handlers = [],
8062 lastArgs = null,
8063 lastException = null,
8064 lastExceptionStack = null;
8065
8066 /**
8067 * Add a crash handler.
8068 * @param {Function} handler
8069 */
8070 function subscribe(handler) {
8071 installGlobalHandler();
8072 handlers.push(handler);
8073 }
8074
8075 /**
8076 * Remove a crash handler.
8077 * @param {Function} handler
8078 */
8079 function unsubscribe(handler) {
8080 for (var i = handlers.length - 1; i >= 0; --i) {
8081 if (handlers[i] === handler) {
8082 handlers.splice(i, 1);
8083 }
8084 }
8085 }
8086
8087 /**
8088 * Remove all crash handlers.
8089 */
8090 function unsubscribeAll() {
8091 uninstallGlobalHandler();
8092 handlers = [];
8093 }
8094
8095 /**
8096 * Dispatch stack information to all handlers.
8097 * @param {Object.<string, *>} stack
8098 */
8099 function notifyHandlers(stack, isWindowError) {
8100 var exception = null;
8101 if (isWindowError && !TraceKit.collectWindowErrors) {
8102 return;
8103 }
8104 for (var i in handlers) {
8105 if (handlers.hasOwnProperty(i)) {
8106 try {
8107 handlers[i].apply(null, [stack].concat(_slice.call(arguments, 2)));
8108 } catch (inner) {
8109 exception = inner;
8110 }
8111 }
8112 }
8113
8114 if (exception) {
8115 throw exception;
8116 }
8117 }
8118
8119 var _oldOnerrorHandler, _onErrorHandlerInstalled;
8120
8121 /**
8122 * Ensures all global unhandled exceptions are recorded.
8123 * Supported by Gecko and IE.
8124 * @param {string} message Error message.
8125 * @param {string} url URL of script that generated the exception.
8126 * @param {(number|string)} lineNo The line number at which the error
8127 * occurred.
8128 * @param {?(number|string)} colNo The column number at which the error
8129 * occurred.
8130 * @param {?Error} ex The actual Error object.
8131 */
8132 function traceKitWindowOnError(message, url, lineNo, colNo, ex) {
8133 var stack = null;
8134
8135 if (lastExceptionStack) {
8136 TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(
8137 lastExceptionStack,
8138 url,
8139 lineNo,
8140 message
8141 );
8142 processLastException();
8143 } else if (ex && utils.isError(ex)) {
8144 // non-string `ex` arg; attempt to extract stack trace
8145
8146 // New chrome and blink send along a real error object
8147 // Let's just report that like a normal error.
8148 // See: https://mikewest.org/2013/08/debugging-runtime-errors-with-window-onerror
8149 stack = TraceKit.computeStackTrace(ex);
8150 notifyHandlers(stack, true);
8151 } else {
8152 var location = {
8153 url: url,
8154 line: lineNo,
8155 column: colNo
8156 };
8157
8158 var name = undefined;
8159 var msg = message; // must be new var or will modify original `arguments`
8160 var groups;
8161 if ({}.toString.call(message) === '[object String]') {
8162 var groups = message.match(ERROR_TYPES_RE);
8163 if (groups) {
8164 name = groups[1];
8165 msg = groups[2];
8166 }
8167 }
8168
8169 location.func = UNKNOWN_FUNCTION;
8170
8171 stack = {
8172 name: name,
8173 message: msg,
8174 url: getLocationHref(),
8175 stack: [location]
8176 };
8177 notifyHandlers(stack, true);
8178 }
8179
8180 if (_oldOnerrorHandler) {
8181 return _oldOnerrorHandler.apply(this, arguments);
8182 }
8183
8184 return false;
8185 }
8186
8187 function installGlobalHandler() {
8188 if (_onErrorHandlerInstalled) {
8189 return;
8190 }
8191 _oldOnerrorHandler = _window.onerror;
8192 _window.onerror = traceKitWindowOnError;
8193 _onErrorHandlerInstalled = true;
8194 }
8195
8196 function uninstallGlobalHandler() {
8197 if (!_onErrorHandlerInstalled) {
8198 return;
8199 }
8200 _window.onerror = _oldOnerrorHandler;
8201 _onErrorHandlerInstalled = false;
8202 _oldOnerrorHandler = undefined;
8203 }
8204
8205 function processLastException() {
8206 var _lastExceptionStack = lastExceptionStack,
8207 _lastArgs = lastArgs;
8208 lastArgs = null;
8209 lastExceptionStack = null;
8210 lastException = null;
8211 notifyHandlers.apply(null, [_lastExceptionStack, false].concat(_lastArgs));
8212 }
8213
8214 /**
8215 * Reports an unhandled Error to TraceKit.
8216 * @param {Error} ex
8217 * @param {?boolean} rethrow If false, do not re-throw the exception.
8218 * Only used for window.onerror to not cause an infinite loop of
8219 * rethrowing.
8220 */
8221 function report(ex, rethrow) {
8222 var args = _slice.call(arguments, 1);
8223 if (lastExceptionStack) {
8224 if (lastException === ex) {
8225 return; // already caught by an inner catch block, ignore
8226 } else {
8227 processLastException();
8228 }
8229 }
8230
8231 var stack = TraceKit.computeStackTrace(ex);
8232 lastExceptionStack = stack;
8233 lastException = ex;
8234 lastArgs = args;
8235
8236 // If the stack trace is incomplete, wait for 2 seconds for
8237 // slow slow IE to see if onerror occurs or not before reporting
8238 // this exception; otherwise, we will end up with an incomplete
8239 // stack trace
8240 setTimeout(function() {
8241 if (lastException === ex) {
8242 processLastException();
8243 }
8244 }, stack.incomplete ? 2000 : 0);
8245
8246 if (rethrow !== false) {
8247 throw ex; // re-throw to propagate to the top level (and cause window.onerror)
8248 }
8249 }
8250
8251 report.subscribe = subscribe;
8252 report.unsubscribe = unsubscribe;
8253 report.uninstall = unsubscribeAll;
8254 return report;
8255 })();
8256
8257 /**
8258 * TraceKit.computeStackTrace: cross-browser stack traces in JavaScript
8259 *
8260 * Syntax:
8261 * s = TraceKit.computeStackTrace(exception) // consider using TraceKit.report instead (see below)
8262 * Returns:
8263 * s.name - exception name
8264 * s.message - exception message
8265 * s.stack[i].url - JavaScript or HTML file URL
8266 * s.stack[i].func - function name, or empty for anonymous functions (if guessing did not work)
8267 * s.stack[i].args - arguments passed to the function, if known
8268 * s.stack[i].line - line number, if known
8269 * s.stack[i].column - column number, if known
8270 *
8271 * Supports:
8272 * - Firefox: full stack trace with line numbers and unreliable column
8273 * number on top frame
8274 * - Opera 10: full stack trace with line and column numbers
8275 * - Opera 9-: full stack trace with line numbers
8276 * - Chrome: full stack trace with line and column numbers
8277 * - Safari: line and column number for the topmost stacktrace element
8278 * only
8279 * - IE: no line numbers whatsoever
8280 *
8281 * Tries to guess names of anonymous functions by looking for assignments
8282 * in the source code. In IE and Safari, we have to guess source file names
8283 * by searching for function bodies inside all page scripts. This will not
8284 * work for scripts that are loaded cross-domain.
8285 * Here be dragons: some function names may be guessed incorrectly, and
8286 * duplicate functions may be mismatched.
8287 *
8288 * TraceKit.computeStackTrace should only be used for tracing purposes.
8289 * Logging of unhandled exceptions should be done with TraceKit.report,
8290 * which builds on top of TraceKit.computeStackTrace and provides better
8291 * IE support by utilizing the window.onerror event to retrieve information
8292 * about the top of the stack.
8293 *
8294 * Note: In IE and Safari, no stack trace is recorded on the Error object,
8295 * so computeStackTrace instead walks its *own* chain of callers.
8296 * This means that:
8297 * * in Safari, some methods may be missing from the stack trace;
8298 * * in IE, the topmost function in the stack trace will always be the
8299 * caller of computeStackTrace.
8300 *
8301 * This is okay for tracing (because you are likely to be calling
8302 * computeStackTrace from the function you want to be the topmost element
8303 * of the stack trace anyway), but not okay for logging unhandled
8304 * exceptions (because your catch block will likely be far away from the
8305 * inner function that actually caused the exception).
8306 *
8307 */
8308 TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
8309 // Contents of Exception in various browsers.
8310 //
8311 // SAFARI:
8312 // ex.message = Can't find variable: qq
8313 // ex.line = 59
8314 // ex.sourceId = 580238192
8315 // ex.sourceURL = http://...
8316 // ex.expressionBeginOffset = 96
8317 // ex.expressionCaretOffset = 98
8318 // ex.expressionEndOffset = 98
8319 // ex.name = ReferenceError
8320 //
8321 // FIREFOX:
8322 // ex.message = qq is not defined
8323 // ex.fileName = http://...
8324 // ex.lineNumber = 59
8325 // ex.columnNumber = 69
8326 // ex.stack = ...stack trace... (see the example below)
8327 // ex.name = ReferenceError
8328 //
8329 // CHROME:
8330 // ex.message = qq is not defined
8331 // ex.name = ReferenceError
8332 // ex.type = not_defined
8333 // ex.arguments = ['aa']
8334 // ex.stack = ...stack trace...
8335 //
8336 // INTERNET EXPLORER:
8337 // ex.message = ...
8338 // ex.name = ReferenceError
8339 //
8340 // OPERA:
8341 // ex.message = ...message... (see the example below)
8342 // ex.name = ReferenceError
8343 // ex.opera#sourceloc = 11 (pretty much useless, duplicates the info in ex.message)
8344 // ex.stacktrace = n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'
8345
8346 /**
8347 * Computes stack trace information from the stack property.
8348 * Chrome and Gecko use this property.
8349 * @param {Error} ex
8350 * @return {?Object.<string, *>} Stack trace information.
8351 */
8352 function computeStackTraceFromStackProp(ex) {
8353 if (typeof ex.stack === 'undefined' || !ex.stack) return;
8354
8355 var chrome = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,
8356 gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,
8357 winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,
8358 // Used to additionally parse URL/line/column from eval frames
8359 geckoEval = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i,
8360 chromeEval = /\((\S*)(?::(\d+))(?::(\d+))\)/,
8361 lines = ex.stack.split('\n'),
8362 stack = [],
8363 submatch,
8364 parts,
8365 element,
8366 reference = /^(.*) is undefined$/.exec(ex.message);
8367
8368 for (var i = 0, j = lines.length; i < j; ++i) {
8369 if ((parts = chrome.exec(lines[i]))) {
8370 var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line
8371 var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line
8372 if (isEval && (submatch = chromeEval.exec(parts[2]))) {
8373 // throw out eval line/column and use top-most line/column number
8374 parts[2] = submatch[1]; // url
8375 parts[3] = submatch[2]; // line
8376 parts[4] = submatch[3]; // column
8377 }
8378 element = {
8379 url: !isNative ? parts[2] : null,
8380 func: parts[1] || UNKNOWN_FUNCTION,
8381 args: isNative ? [parts[2]] : [],
8382 line: parts[3] ? +parts[3] : null,
8383 column: parts[4] ? +parts[4] : null
8384 };
8385 } else if ((parts = winjs.exec(lines[i]))) {
8386 element = {
8387 url: parts[2],
8388 func: parts[1] || UNKNOWN_FUNCTION,
8389 args: [],
8390 line: +parts[3],
8391 column: parts[4] ? +parts[4] : null
8392 };
8393 } else if ((parts = gecko.exec(lines[i]))) {
8394 var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;
8395 if (isEval && (submatch = geckoEval.exec(parts[3]))) {
8396 // throw out eval line/column and use top-most line number
8397 parts[3] = submatch[1];
8398 parts[4] = submatch[2];
8399 parts[5] = null; // no column when eval
8400 } else if (i === 0 && !parts[5] && typeof ex.columnNumber !== 'undefined') {
8401 // FireFox uses this awesome columnNumber property for its top frame
8402 // Also note, Firefox's column number is 0-based and everything else expects 1-based,
8403 // so adding 1
8404 // NOTE: this hack doesn't work if top-most frame is eval
8405 stack[0].column = ex.columnNumber + 1;
8406 }
8407 element = {
8408 url: parts[3],
8409 func: parts[1] || UNKNOWN_FUNCTION,
8410 args: parts[2] ? parts[2].split(',') : [],
8411 line: parts[4] ? +parts[4] : null,
8412 column: parts[5] ? +parts[5] : null
8413 };
8414 } else {
8415 continue;
8416 }
8417
8418 if (!element.func && element.line) {
8419 element.func = UNKNOWN_FUNCTION;
8420 }
8421
8422 stack.push(element);
8423 }
8424
8425 if (!stack.length) {
8426 return null;
8427 }
8428
8429 return {
8430 name: ex.name,
8431 message: ex.message,
8432 url: getLocationHref(),
8433 stack: stack
8434 };
8435 }
8436
8437 /**
8438 * Adds information about the first frame to incomplete stack traces.
8439 * Safari and IE require this to get complete data on the first frame.
8440 * @param {Object.<string, *>} stackInfo Stack trace information from
8441 * one of the compute* methods.
8442 * @param {string} url The URL of the script that caused an error.
8443 * @param {(number|string)} lineNo The line number of the script that
8444 * caused an error.
8445 * @param {string=} message The error generated by the browser, which
8446 * hopefully contains the name of the object that caused the error.
8447 * @return {boolean} Whether or not the stack information was
8448 * augmented.
8449 */
8450 function augmentStackTraceWithInitialElement(stackInfo, url, lineNo, message) {
8451 var initial = {
8452 url: url,
8453 line: lineNo
8454 };
8455
8456 if (initial.url && initial.line) {
8457 stackInfo.incomplete = false;
8458
8459 if (!initial.func) {
8460 initial.func = UNKNOWN_FUNCTION;
8461 }
8462
8463 if (stackInfo.stack.length > 0) {
8464 if (stackInfo.stack[0].url === initial.url) {
8465 if (stackInfo.stack[0].line === initial.line) {
8466 return false; // already in stack trace
8467 } else if (
8468 !stackInfo.stack[0].line &&
8469 stackInfo.stack[0].func === initial.func
8470 ) {
8471 stackInfo.stack[0].line = initial.line;
8472 return false;
8473 }
8474 }
8475 }
8476
8477 stackInfo.stack.unshift(initial);
8478 stackInfo.partial = true;
8479 return true;
8480 } else {
8481 stackInfo.incomplete = true;
8482 }
8483
8484 return false;
8485 }
8486
8487 /**
8488 * Computes stack trace information by walking the arguments.caller
8489 * chain at the time the exception occurred. This will cause earlier
8490 * frames to be missed but is the only way to get any stack trace in
8491 * Safari and IE. The top frame is restored by
8492 * {@link augmentStackTraceWithInitialElement}.
8493 * @param {Error} ex
8494 * @return {?Object.<string, *>} Stack trace information.
8495 */
8496 function computeStackTraceByWalkingCallerChain(ex, depth) {
8497 var functionName = /function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,
8498 stack = [],
8499 funcs = {},
8500 recursion = false,
8501 parts,
8502 item,
8503 source;
8504
8505 for (
8506 var curr = computeStackTraceByWalkingCallerChain.caller;
8507 curr && !recursion;
8508 curr = curr.caller
8509 ) {
8510 if (curr === computeStackTrace || curr === TraceKit.report) {
8511 // console.log('skipping internal function');
8512 continue;
8513 }
8514
8515 item = {
8516 url: null,
8517 func: UNKNOWN_FUNCTION,
8518 line: null,
8519 column: null
8520 };
8521
8522 if (curr.name) {
8523 item.func = curr.name;
8524 } else if ((parts = functionName.exec(curr.toString()))) {
8525 item.func = parts[1];
8526 }
8527
8528 if (typeof item.func === 'undefined') {
8529 try {
8530 item.func = parts.input.substring(0, parts.input.indexOf('{'));
8531 } catch (e) {}
8532 }
8533
8534 if (funcs['' + curr]) {
8535 recursion = true;
8536 } else {
8537 funcs['' + curr] = true;
8538 }
8539
8540 stack.push(item);
8541 }
8542
8543 if (depth) {
8544 // console.log('depth is ' + depth);
8545 // console.log('stack is ' + stack.length);
8546 stack.splice(0, depth);
8547 }
8548
8549 var result = {
8550 name: ex.name,
8551 message: ex.message,
8552 url: getLocationHref(),
8553 stack: stack
8554 };
8555 augmentStackTraceWithInitialElement(
8556 result,
8557 ex.sourceURL || ex.fileName,
8558 ex.line || ex.lineNumber,
8559 ex.message || ex.description
8560 );
8561 return result;
8562 }
8563
8564 /**
8565 * Computes a stack trace for an exception.
8566 * @param {Error} ex
8567 * @param {(string|number)=} depth
8568 */
8569 function computeStackTrace(ex, depth) {
8570 var stack = null;
8571 depth = depth == null ? 0 : +depth;
8572
8573 try {
8574 stack = computeStackTraceFromStackProp(ex);
8575 if (stack) {
8576 return stack;
8577 }
8578 } catch (e) {
8579 if (TraceKit.debug) {
8580 throw e;
8581 }
8582 }
8583
8584 try {
8585 stack = computeStackTraceByWalkingCallerChain(ex, depth + 1);
8586 if (stack) {
8587 return stack;
8588 }
8589 } catch (e) {
8590 if (TraceKit.debug) {
8591 throw e;
8592 }
8593 }
8594 return {
8595 name: ex.name,
8596 message: ex.message,
8597 url: getLocationHref()
8598 };
8599 }
8600
8601 computeStackTrace.augmentStackTraceWithInitialElement = augmentStackTraceWithInitialElement;
8602 computeStackTrace.computeStackTraceFromStackProp = computeStackTraceFromStackProp;
8603
8604 return computeStackTrace;
8605 })();
8606
8607 module.exports = TraceKit;
8608
8609
8610 /***/ }),
8611
8612 /***/ "./node_modules/raven-js/vendor/json-stringify-safe/stringify.js":
8613 /*!***********************************************************************!*\
8614 !*** ./node_modules/raven-js/vendor/json-stringify-safe/stringify.js ***!
8615 \***********************************************************************/
8616 /***/ ((module, exports) => {
8617
8618 /*
8619 json-stringify-safe
8620 Like JSON.stringify, but doesn't throw on circular references.
8621
8622 Originally forked from https://github.com/isaacs/json-stringify-safe
8623 version 5.0.1 on 3/8/2017 and modified to handle Errors serialization
8624 and IE8 compatibility. Tests for this are in test/vendor.
8625
8626 ISC license: https://github.com/isaacs/json-stringify-safe/blob/master/LICENSE
8627 */
8628
8629 exports = module.exports = stringify;
8630 exports.getSerialize = serializer;
8631
8632 function indexOf(haystack, needle) {
8633 for (var i = 0; i < haystack.length; ++i) {
8634 if (haystack[i] === needle) return i;
8635 }
8636 return -1;
8637 }
8638
8639 function stringify(obj, replacer, spaces, cycleReplacer) {
8640 return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces);
8641 }
8642
8643 // https://github.com/ftlabs/js-abbreviate/blob/fa709e5f139e7770a71827b1893f22418097fbda/index.js#L95-L106
8644 function stringifyError(value) {
8645 var err = {
8646 // These properties are implemented as magical getters and don't show up in for in
8647 stack: value.stack,
8648 message: value.message,
8649 name: value.name
8650 };
8651
8652 for (var i in value) {
8653 if (Object.prototype.hasOwnProperty.call(value, i)) {
8654 err[i] = value[i];
8655 }
8656 }
8657
8658 return err;
8659 }
8660
8661 function serializer(replacer, cycleReplacer) {
8662 var stack = [];
8663 var keys = [];
8664
8665 if (cycleReplacer == null) {
8666 cycleReplacer = function(key, value) {
8667 if (stack[0] === value) {
8668 return '[Circular ~]';
8669 }
8670 return '[Circular ~.' + keys.slice(0, indexOf(stack, value)).join('.') + ']';
8671 };
8672 }
8673
8674 return function(key, value) {
8675 if (stack.length > 0) {
8676 var thisPos = indexOf(stack, this);
8677 ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
8678 ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
8679
8680 if (~indexOf(stack, value)) {
8681 value = cycleReplacer.call(this, key, value);
8682 }
8683 } else {
8684 stack.push(value);
8685 }
8686
8687 return replacer == null
8688 ? value instanceof Error ? stringifyError(value) : value
8689 : replacer.call(this, key, value);
8690 };
8691 }
8692
8693
8694 /***/ }),
8695
8696 /***/ "./node_modules/react-is/cjs/react-is.development.js":
8697 /*!***********************************************************!*\
8698 !*** ./node_modules/react-is/cjs/react-is.development.js ***!
8699 \***********************************************************/
8700 /***/ ((__unused_webpack_module, exports) => {
8701
8702 "use strict";
8703 /** @license React v16.13.1
8704 * react-is.development.js
8705 *
8706 * Copyright (c) Facebook, Inc. and its affiliates.
8707 *
8708 * This source code is licensed under the MIT license found in the
8709 * LICENSE file in the root directory of this source tree.
8710 */
8711
8712
8713
8714
8715
8716 if (true) {
8717 (function() {
8718 'use strict';
8719
8720 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
8721 // nor polyfill, then a plain number is used for performance.
8722 var hasSymbol = typeof Symbol === 'function' && Symbol.for;
8723 var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
8724 var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
8725 var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
8726 var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
8727 var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
8728 var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
8729 var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
8730 // (unstable) APIs that have been removed. Can we remove the symbols?
8731
8732 var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
8733 var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
8734 var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
8735 var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
8736 var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
8737 var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
8738 var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
8739 var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
8740 var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
8741 var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
8742 var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
8743
8744 function isValidElementType(type) {
8745 return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
8746 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);
8747 }
8748
8749 function typeOf(object) {
8750 if (typeof object === 'object' && object !== null) {
8751 var $$typeof = object.$$typeof;
8752
8753 switch ($$typeof) {
8754 case REACT_ELEMENT_TYPE:
8755 var type = object.type;
8756
8757 switch (type) {
8758 case REACT_ASYNC_MODE_TYPE:
8759 case REACT_CONCURRENT_MODE_TYPE:
8760 case REACT_FRAGMENT_TYPE:
8761 case REACT_PROFILER_TYPE:
8762 case REACT_STRICT_MODE_TYPE:
8763 case REACT_SUSPENSE_TYPE:
8764 return type;
8765
8766 default:
8767 var $$typeofType = type && type.$$typeof;
8768
8769 switch ($$typeofType) {
8770 case REACT_CONTEXT_TYPE:
8771 case REACT_FORWARD_REF_TYPE:
8772 case REACT_LAZY_TYPE:
8773 case REACT_MEMO_TYPE:
8774 case REACT_PROVIDER_TYPE:
8775 return $$typeofType;
8776
8777 default:
8778 return $$typeof;
8779 }
8780
8781 }
8782
8783 case REACT_PORTAL_TYPE:
8784 return $$typeof;
8785 }
8786 }
8787
8788 return undefined;
8789 } // AsyncMode is deprecated along with isAsyncMode
8790
8791 var AsyncMode = REACT_ASYNC_MODE_TYPE;
8792 var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
8793 var ContextConsumer = REACT_CONTEXT_TYPE;
8794 var ContextProvider = REACT_PROVIDER_TYPE;
8795 var Element = REACT_ELEMENT_TYPE;
8796 var ForwardRef = REACT_FORWARD_REF_TYPE;
8797 var Fragment = REACT_FRAGMENT_TYPE;
8798 var Lazy = REACT_LAZY_TYPE;
8799 var Memo = REACT_MEMO_TYPE;
8800 var Portal = REACT_PORTAL_TYPE;
8801 var Profiler = REACT_PROFILER_TYPE;
8802 var StrictMode = REACT_STRICT_MODE_TYPE;
8803 var Suspense = REACT_SUSPENSE_TYPE;
8804 var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
8805
8806 function isAsyncMode(object) {
8807 {
8808 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
8809 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
8810
8811 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.');
8812 }
8813 }
8814
8815 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
8816 }
8817 function isConcurrentMode(object) {
8818 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
8819 }
8820 function isContextConsumer(object) {
8821 return typeOf(object) === REACT_CONTEXT_TYPE;
8822 }
8823 function isContextProvider(object) {
8824 return typeOf(object) === REACT_PROVIDER_TYPE;
8825 }
8826 function isElement(object) {
8827 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
8828 }
8829 function isForwardRef(object) {
8830 return typeOf(object) === REACT_FORWARD_REF_TYPE;
8831 }
8832 function isFragment(object) {
8833 return typeOf(object) === REACT_FRAGMENT_TYPE;
8834 }
8835 function isLazy(object) {
8836 return typeOf(object) === REACT_LAZY_TYPE;
8837 }
8838 function isMemo(object) {
8839 return typeOf(object) === REACT_MEMO_TYPE;
8840 }
8841 function isPortal(object) {
8842 return typeOf(object) === REACT_PORTAL_TYPE;
8843 }
8844 function isProfiler(object) {
8845 return typeOf(object) === REACT_PROFILER_TYPE;
8846 }
8847 function isStrictMode(object) {
8848 return typeOf(object) === REACT_STRICT_MODE_TYPE;
8849 }
8850 function isSuspense(object) {
8851 return typeOf(object) === REACT_SUSPENSE_TYPE;
8852 }
8853
8854 exports.AsyncMode = AsyncMode;
8855 exports.ConcurrentMode = ConcurrentMode;
8856 exports.ContextConsumer = ContextConsumer;
8857 exports.ContextProvider = ContextProvider;
8858 exports.Element = Element;
8859 exports.ForwardRef = ForwardRef;
8860 exports.Fragment = Fragment;
8861 exports.Lazy = Lazy;
8862 exports.Memo = Memo;
8863 exports.Portal = Portal;
8864 exports.Profiler = Profiler;
8865 exports.StrictMode = StrictMode;
8866 exports.Suspense = Suspense;
8867 exports.isAsyncMode = isAsyncMode;
8868 exports.isConcurrentMode = isConcurrentMode;
8869 exports.isContextConsumer = isContextConsumer;
8870 exports.isContextProvider = isContextProvider;
8871 exports.isElement = isElement;
8872 exports.isForwardRef = isForwardRef;
8873 exports.isFragment = isFragment;
8874 exports.isLazy = isLazy;
8875 exports.isMemo = isMemo;
8876 exports.isPortal = isPortal;
8877 exports.isProfiler = isProfiler;
8878 exports.isStrictMode = isStrictMode;
8879 exports.isSuspense = isSuspense;
8880 exports.isValidElementType = isValidElementType;
8881 exports.typeOf = typeOf;
8882 })();
8883 }
8884
8885
8886 /***/ }),
8887
8888 /***/ "./node_modules/react-is/index.js":
8889 /*!****************************************!*\
8890 !*** ./node_modules/react-is/index.js ***!
8891 \****************************************/
8892 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8893
8894 "use strict";
8895
8896
8897 if (false) {} else {
8898 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js");
8899 }
8900
8901
8902 /***/ }),
8903
8904 /***/ "./node_modules/react/cjs/react-jsx-runtime.development.js":
8905 /*!*****************************************************************!*\
8906 !*** ./node_modules/react/cjs/react-jsx-runtime.development.js ***!
8907 \*****************************************************************/
8908 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8909
8910 "use strict";
8911 /** @license React v17.0.2
8912 * react-jsx-runtime.development.js
8913 *
8914 * Copyright (c) Facebook, Inc. and its affiliates.
8915 *
8916 * This source code is licensed under the MIT license found in the
8917 * LICENSE file in the root directory of this source tree.
8918 */
8919
8920
8921
8922 if (true) {
8923 (function() {
8924 'use strict';
8925
8926 var React = __webpack_require__(/*! react */ "react");
8927 var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
8928
8929 // ATTENTION
8930 // When adding new symbols to this file,
8931 // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
8932 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
8933 // nor polyfill, then a plain number is used for performance.
8934 var REACT_ELEMENT_TYPE = 0xeac7;
8935 var REACT_PORTAL_TYPE = 0xeaca;
8936 exports.Fragment = 0xeacb;
8937 var REACT_STRICT_MODE_TYPE = 0xeacc;
8938 var REACT_PROFILER_TYPE = 0xead2;
8939 var REACT_PROVIDER_TYPE = 0xeacd;
8940 var REACT_CONTEXT_TYPE = 0xeace;
8941 var REACT_FORWARD_REF_TYPE = 0xead0;
8942 var REACT_SUSPENSE_TYPE = 0xead1;
8943 var REACT_SUSPENSE_LIST_TYPE = 0xead8;
8944 var REACT_MEMO_TYPE = 0xead3;
8945 var REACT_LAZY_TYPE = 0xead4;
8946 var REACT_BLOCK_TYPE = 0xead9;
8947 var REACT_SERVER_BLOCK_TYPE = 0xeada;
8948 var REACT_FUNDAMENTAL_TYPE = 0xead5;
8949 var REACT_SCOPE_TYPE = 0xead7;
8950 var REACT_OPAQUE_ID_TYPE = 0xeae0;
8951 var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
8952 var REACT_OFFSCREEN_TYPE = 0xeae2;
8953 var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
8954
8955 if (typeof Symbol === 'function' && Symbol.for) {
8956 var symbolFor = Symbol.for;
8957 REACT_ELEMENT_TYPE = symbolFor('react.element');
8958 REACT_PORTAL_TYPE = symbolFor('react.portal');
8959 exports.Fragment = symbolFor('react.fragment');
8960 REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
8961 REACT_PROFILER_TYPE = symbolFor('react.profiler');
8962 REACT_PROVIDER_TYPE = symbolFor('react.provider');
8963 REACT_CONTEXT_TYPE = symbolFor('react.context');
8964 REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
8965 REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
8966 REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
8967 REACT_MEMO_TYPE = symbolFor('react.memo');
8968 REACT_LAZY_TYPE = symbolFor('react.lazy');
8969 REACT_BLOCK_TYPE = symbolFor('react.block');
8970 REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
8971 REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
8972 REACT_SCOPE_TYPE = symbolFor('react.scope');
8973 REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
8974 REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
8975 REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
8976 REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
8977 }
8978
8979 var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
8980 var FAUX_ITERATOR_SYMBOL = '@@iterator';
8981 function getIteratorFn(maybeIterable) {
8982 if (maybeIterable === null || typeof maybeIterable !== 'object') {
8983 return null;
8984 }
8985
8986 var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
8987
8988 if (typeof maybeIterator === 'function') {
8989 return maybeIterator;
8990 }
8991
8992 return null;
8993 }
8994
8995 var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
8996
8997 function error(format) {
8998 {
8999 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
9000 args[_key2 - 1] = arguments[_key2];
9001 }
9002
9003 printWarning('error', format, args);
9004 }
9005 }
9006
9007 function printWarning(level, format, args) {
9008 // When changing this logic, you might want to also
9009 // update consoleWithStackDev.www.js as well.
9010 {
9011 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
9012 var stack = ReactDebugCurrentFrame.getStackAddendum();
9013
9014 if (stack !== '') {
9015 format += '%s';
9016 args = args.concat([stack]);
9017 }
9018
9019 var argsWithFormat = args.map(function (item) {
9020 return '' + item;
9021 }); // Careful: RN currently depends on this prefix
9022
9023 argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
9024 // breaks IE9: https://github.com/facebook/react/issues/13610
9025 // eslint-disable-next-line react-internal/no-production-logging
9026
9027 Function.prototype.apply.call(console[level], console, argsWithFormat);
9028 }
9029 }
9030
9031 // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
9032
9033 var enableScopeAPI = false; // Experimental Create Event Handle API.
9034
9035 function isValidElementType(type) {
9036 if (typeof type === 'string' || typeof type === 'function') {
9037 return true;
9038 } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
9039
9040
9041 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 ) {
9042 return true;
9043 }
9044
9045 if (typeof type === 'object' && type !== null) {
9046 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) {
9047 return true;
9048 }
9049 }
9050
9051 return false;
9052 }
9053
9054 function getWrappedName(outerType, innerType, wrapperName) {
9055 var functionName = innerType.displayName || innerType.name || '';
9056 return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
9057 }
9058
9059 function getContextName(type) {
9060 return type.displayName || 'Context';
9061 }
9062
9063 function getComponentName(type) {
9064 if (type == null) {
9065 // Host root, text node or just invalid type.
9066 return null;
9067 }
9068
9069 {
9070 if (typeof type.tag === 'number') {
9071 error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
9072 }
9073 }
9074
9075 if (typeof type === 'function') {
9076 return type.displayName || type.name || null;
9077 }
9078
9079 if (typeof type === 'string') {
9080 return type;
9081 }
9082
9083 switch (type) {
9084 case exports.Fragment:
9085 return 'Fragment';
9086
9087 case REACT_PORTAL_TYPE:
9088 return 'Portal';
9089
9090 case REACT_PROFILER_TYPE:
9091 return 'Profiler';
9092
9093 case REACT_STRICT_MODE_TYPE:
9094 return 'StrictMode';
9095
9096 case REACT_SUSPENSE_TYPE:
9097 return 'Suspense';
9098
9099 case REACT_SUSPENSE_LIST_TYPE:
9100 return 'SuspenseList';
9101 }
9102
9103 if (typeof type === 'object') {
9104 switch (type.$$typeof) {
9105 case REACT_CONTEXT_TYPE:
9106 var context = type;
9107 return getContextName(context) + '.Consumer';
9108
9109 case REACT_PROVIDER_TYPE:
9110 var provider = type;
9111 return getContextName(provider._context) + '.Provider';
9112
9113 case REACT_FORWARD_REF_TYPE:
9114 return getWrappedName(type, type.render, 'ForwardRef');
9115
9116 case REACT_MEMO_TYPE:
9117 return getComponentName(type.type);
9118
9119 case REACT_BLOCK_TYPE:
9120 return getComponentName(type._render);
9121
9122 case REACT_LAZY_TYPE:
9123 {
9124 var lazyComponent = type;
9125 var payload = lazyComponent._payload;
9126 var init = lazyComponent._init;
9127
9128 try {
9129 return getComponentName(init(payload));
9130 } catch (x) {
9131 return null;
9132 }
9133 }
9134 }
9135 }
9136
9137 return null;
9138 }
9139
9140 // Helpers to patch console.logs to avoid logging during side-effect free
9141 // replaying on render function. This currently only patches the object
9142 // lazily which won't cover if the log function was extracted eagerly.
9143 // We could also eagerly patch the method.
9144 var disabledDepth = 0;
9145 var prevLog;
9146 var prevInfo;
9147 var prevWarn;
9148 var prevError;
9149 var prevGroup;
9150 var prevGroupCollapsed;
9151 var prevGroupEnd;
9152
9153 function disabledLog() {}
9154
9155 disabledLog.__reactDisabledLog = true;
9156 function disableLogs() {
9157 {
9158 if (disabledDepth === 0) {
9159 /* eslint-disable react-internal/no-production-logging */
9160 prevLog = console.log;
9161 prevInfo = console.info;
9162 prevWarn = console.warn;
9163 prevError = console.error;
9164 prevGroup = console.group;
9165 prevGroupCollapsed = console.groupCollapsed;
9166 prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
9167
9168 var props = {
9169 configurable: true,
9170 enumerable: true,
9171 value: disabledLog,
9172 writable: true
9173 }; // $FlowFixMe Flow thinks console is immutable.
9174
9175 Object.defineProperties(console, {
9176 info: props,
9177 log: props,
9178 warn: props,
9179 error: props,
9180 group: props,
9181 groupCollapsed: props,
9182 groupEnd: props
9183 });
9184 /* eslint-enable react-internal/no-production-logging */
9185 }
9186
9187 disabledDepth++;
9188 }
9189 }
9190 function reenableLogs() {
9191 {
9192 disabledDepth--;
9193
9194 if (disabledDepth === 0) {
9195 /* eslint-disable react-internal/no-production-logging */
9196 var props = {
9197 configurable: true,
9198 enumerable: true,
9199 writable: true
9200 }; // $FlowFixMe Flow thinks console is immutable.
9201
9202 Object.defineProperties(console, {
9203 log: _assign({}, props, {
9204 value: prevLog
9205 }),
9206 info: _assign({}, props, {
9207 value: prevInfo
9208 }),
9209 warn: _assign({}, props, {
9210 value: prevWarn
9211 }),
9212 error: _assign({}, props, {
9213 value: prevError
9214 }),
9215 group: _assign({}, props, {
9216 value: prevGroup
9217 }),
9218 groupCollapsed: _assign({}, props, {
9219 value: prevGroupCollapsed
9220 }),
9221 groupEnd: _assign({}, props, {
9222 value: prevGroupEnd
9223 })
9224 });
9225 /* eslint-enable react-internal/no-production-logging */
9226 }
9227
9228 if (disabledDepth < 0) {
9229 error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
9230 }
9231 }
9232 }
9233
9234 var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
9235 var prefix;
9236 function describeBuiltInComponentFrame(name, source, ownerFn) {
9237 {
9238 if (prefix === undefined) {
9239 // Extract the VM specific prefix used by each line.
9240 try {
9241 throw Error();
9242 } catch (x) {
9243 var match = x.stack.trim().match(/\n( *(at )?)/);
9244 prefix = match && match[1] || '';
9245 }
9246 } // We use the prefix to ensure our stacks line up with native stack frames.
9247
9248
9249 return '\n' + prefix + name;
9250 }
9251 }
9252 var reentry = false;
9253 var componentFrameCache;
9254
9255 {
9256 var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
9257 componentFrameCache = new PossiblyWeakMap();
9258 }
9259
9260 function describeNativeComponentFrame(fn, construct) {
9261 // If something asked for a stack inside a fake render, it should get ignored.
9262 if (!fn || reentry) {
9263 return '';
9264 }
9265
9266 {
9267 var frame = componentFrameCache.get(fn);
9268
9269 if (frame !== undefined) {
9270 return frame;
9271 }
9272 }
9273
9274 var control;
9275 reentry = true;
9276 var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
9277
9278 Error.prepareStackTrace = undefined;
9279 var previousDispatcher;
9280
9281 {
9282 previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
9283 // for warnings.
9284
9285 ReactCurrentDispatcher.current = null;
9286 disableLogs();
9287 }
9288
9289 try {
9290 // This should throw.
9291 if (construct) {
9292 // Something should be setting the props in the constructor.
9293 var Fake = function () {
9294 throw Error();
9295 }; // $FlowFixMe
9296
9297
9298 Object.defineProperty(Fake.prototype, 'props', {
9299 set: function () {
9300 // We use a throwing setter instead of frozen or non-writable props
9301 // because that won't throw in a non-strict mode function.
9302 throw Error();
9303 }
9304 });
9305
9306 if (typeof Reflect === 'object' && Reflect.construct) {
9307 // We construct a different control for this case to include any extra
9308 // frames added by the construct call.
9309 try {
9310 Reflect.construct(Fake, []);
9311 } catch (x) {
9312 control = x;
9313 }
9314
9315 Reflect.construct(fn, [], Fake);
9316 } else {
9317 try {
9318 Fake.call();
9319 } catch (x) {
9320 control = x;
9321 }
9322
9323 fn.call(Fake.prototype);
9324 }
9325 } else {
9326 try {
9327 throw Error();
9328 } catch (x) {
9329 control = x;
9330 }
9331
9332 fn();
9333 }
9334 } catch (sample) {
9335 // This is inlined manually because closure doesn't do it for us.
9336 if (sample && control && typeof sample.stack === 'string') {
9337 // This extracts the first frame from the sample that isn't also in the control.
9338 // Skipping one frame that we assume is the frame that calls the two.
9339 var sampleLines = sample.stack.split('\n');
9340 var controlLines = control.stack.split('\n');
9341 var s = sampleLines.length - 1;
9342 var c = controlLines.length - 1;
9343
9344 while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
9345 // We expect at least one stack frame to be shared.
9346 // Typically this will be the root most one. However, stack frames may be
9347 // cut off due to maximum stack limits. In this case, one maybe cut off
9348 // earlier than the other. We assume that the sample is longer or the same
9349 // and there for cut off earlier. So we should find the root most frame in
9350 // the sample somewhere in the control.
9351 c--;
9352 }
9353
9354 for (; s >= 1 && c >= 0; s--, c--) {
9355 // Next we find the first one that isn't the same which should be the
9356 // frame that called our sample function and the control.
9357 if (sampleLines[s] !== controlLines[c]) {
9358 // In V8, the first line is describing the message but other VMs don't.
9359 // If we're about to return the first line, and the control is also on the same
9360 // line, that's a pretty good indicator that our sample threw at same line as
9361 // the control. I.e. before we entered the sample frame. So we ignore this result.
9362 // This can happen if you passed a class to function component, or non-function.
9363 if (s !== 1 || c !== 1) {
9364 do {
9365 s--;
9366 c--; // We may still have similar intermediate frames from the construct call.
9367 // The next one that isn't the same should be our match though.
9368
9369 if (c < 0 || sampleLines[s] !== controlLines[c]) {
9370 // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
9371 var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
9372
9373 {
9374 if (typeof fn === 'function') {
9375 componentFrameCache.set(fn, _frame);
9376 }
9377 } // Return the line we found.
9378
9379
9380 return _frame;
9381 }
9382 } while (s >= 1 && c >= 0);
9383 }
9384
9385 break;
9386 }
9387 }
9388 }
9389 } finally {
9390 reentry = false;
9391
9392 {
9393 ReactCurrentDispatcher.current = previousDispatcher;
9394 reenableLogs();
9395 }
9396
9397 Error.prepareStackTrace = previousPrepareStackTrace;
9398 } // Fallback to just using the name if we couldn't make it throw.
9399
9400
9401 var name = fn ? fn.displayName || fn.name : '';
9402 var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
9403
9404 {
9405 if (typeof fn === 'function') {
9406 componentFrameCache.set(fn, syntheticFrame);
9407 }
9408 }
9409
9410 return syntheticFrame;
9411 }
9412 function describeFunctionComponentFrame(fn, source, ownerFn) {
9413 {
9414 return describeNativeComponentFrame(fn, false);
9415 }
9416 }
9417
9418 function shouldConstruct(Component) {
9419 var prototype = Component.prototype;
9420 return !!(prototype && prototype.isReactComponent);
9421 }
9422
9423 function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
9424
9425 if (type == null) {
9426 return '';
9427 }
9428
9429 if (typeof type === 'function') {
9430 {
9431 return describeNativeComponentFrame(type, shouldConstruct(type));
9432 }
9433 }
9434
9435 if (typeof type === 'string') {
9436 return describeBuiltInComponentFrame(type);
9437 }
9438
9439 switch (type) {
9440 case REACT_SUSPENSE_TYPE:
9441 return describeBuiltInComponentFrame('Suspense');
9442
9443 case REACT_SUSPENSE_LIST_TYPE:
9444 return describeBuiltInComponentFrame('SuspenseList');
9445 }
9446
9447 if (typeof type === 'object') {
9448 switch (type.$$typeof) {
9449 case REACT_FORWARD_REF_TYPE:
9450 return describeFunctionComponentFrame(type.render);
9451
9452 case REACT_MEMO_TYPE:
9453 // Memo may contain any component type so we recursively resolve it.
9454 return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
9455
9456 case REACT_BLOCK_TYPE:
9457 return describeFunctionComponentFrame(type._render);
9458
9459 case REACT_LAZY_TYPE:
9460 {
9461 var lazyComponent = type;
9462 var payload = lazyComponent._payload;
9463 var init = lazyComponent._init;
9464
9465 try {
9466 // Lazy may contain any component type so we recursively resolve it.
9467 return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
9468 } catch (x) {}
9469 }
9470 }
9471 }
9472
9473 return '';
9474 }
9475
9476 var loggedTypeFailures = {};
9477 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
9478
9479 function setCurrentlyValidatingElement(element) {
9480 {
9481 if (element) {
9482 var owner = element._owner;
9483 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
9484 ReactDebugCurrentFrame.setExtraStackFrame(stack);
9485 } else {
9486 ReactDebugCurrentFrame.setExtraStackFrame(null);
9487 }
9488 }
9489 }
9490
9491 function checkPropTypes(typeSpecs, values, location, componentName, element) {
9492 {
9493 // $FlowFixMe This is okay but Flow doesn't know it.
9494 var has = Function.call.bind(Object.prototype.hasOwnProperty);
9495
9496 for (var typeSpecName in typeSpecs) {
9497 if (has(typeSpecs, typeSpecName)) {
9498 var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
9499 // fail the render phase where it didn't fail before. So we log it.
9500 // After these have been cleaned up, we'll let them throw.
9501
9502 try {
9503 // This is intentionally an invariant that gets caught. It's the same
9504 // behavior as without this statement except with a better message.
9505 if (typeof typeSpecs[typeSpecName] !== 'function') {
9506 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`.');
9507 err.name = 'Invariant Violation';
9508 throw err;
9509 }
9510
9511 error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
9512 } catch (ex) {
9513 error$1 = ex;
9514 }
9515
9516 if (error$1 && !(error$1 instanceof Error)) {
9517 setCurrentlyValidatingElement(element);
9518
9519 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);
9520
9521 setCurrentlyValidatingElement(null);
9522 }
9523
9524 if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
9525 // Only monitor this failure once because there tends to be a lot of the
9526 // same error.
9527 loggedTypeFailures[error$1.message] = true;
9528 setCurrentlyValidatingElement(element);
9529
9530 error('Failed %s type: %s', location, error$1.message);
9531
9532 setCurrentlyValidatingElement(null);
9533 }
9534 }
9535 }
9536 }
9537 }
9538
9539 var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
9540 var hasOwnProperty = Object.prototype.hasOwnProperty;
9541 var RESERVED_PROPS = {
9542 key: true,
9543 ref: true,
9544 __self: true,
9545 __source: true
9546 };
9547 var specialPropKeyWarningShown;
9548 var specialPropRefWarningShown;
9549 var didWarnAboutStringRefs;
9550
9551 {
9552 didWarnAboutStringRefs = {};
9553 }
9554
9555 function hasValidRef(config) {
9556 {
9557 if (hasOwnProperty.call(config, 'ref')) {
9558 var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
9559
9560 if (getter && getter.isReactWarning) {
9561 return false;
9562 }
9563 }
9564 }
9565
9566 return config.ref !== undefined;
9567 }
9568
9569 function hasValidKey(config) {
9570 {
9571 if (hasOwnProperty.call(config, 'key')) {
9572 var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
9573
9574 if (getter && getter.isReactWarning) {
9575 return false;
9576 }
9577 }
9578 }
9579
9580 return config.key !== undefined;
9581 }
9582
9583 function warnIfStringRefCannotBeAutoConverted(config, self) {
9584 {
9585 if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
9586 var componentName = getComponentName(ReactCurrentOwner.current.type);
9587
9588 if (!didWarnAboutStringRefs[componentName]) {
9589 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);
9590
9591 didWarnAboutStringRefs[componentName] = true;
9592 }
9593 }
9594 }
9595 }
9596
9597 function defineKeyPropWarningGetter(props, displayName) {
9598 {
9599 var warnAboutAccessingKey = function () {
9600 if (!specialPropKeyWarningShown) {
9601 specialPropKeyWarningShown = true;
9602
9603 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);
9604 }
9605 };
9606
9607 warnAboutAccessingKey.isReactWarning = true;
9608 Object.defineProperty(props, 'key', {
9609 get: warnAboutAccessingKey,
9610 configurable: true
9611 });
9612 }
9613 }
9614
9615 function defineRefPropWarningGetter(props, displayName) {
9616 {
9617 var warnAboutAccessingRef = function () {
9618 if (!specialPropRefWarningShown) {
9619 specialPropRefWarningShown = true;
9620
9621 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);
9622 }
9623 };
9624
9625 warnAboutAccessingRef.isReactWarning = true;
9626 Object.defineProperty(props, 'ref', {
9627 get: warnAboutAccessingRef,
9628 configurable: true
9629 });
9630 }
9631 }
9632 /**
9633 * Factory method to create a new React element. This no longer adheres to
9634 * the class pattern, so do not use new to call it. Also, instanceof check
9635 * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
9636 * if something is a React Element.
9637 *
9638 * @param {*} type
9639 * @param {*} props
9640 * @param {*} key
9641 * @param {string|object} ref
9642 * @param {*} owner
9643 * @param {*} self A *temporary* helper to detect places where `this` is
9644 * different from the `owner` when React.createElement is called, so that we
9645 * can warn. We want to get rid of owner and replace string `ref`s with arrow
9646 * functions, and as long as `this` and owner are the same, there will be no
9647 * change in behavior.
9648 * @param {*} source An annotation object (added by a transpiler or otherwise)
9649 * indicating filename, line number, and/or other information.
9650 * @internal
9651 */
9652
9653
9654 var ReactElement = function (type, key, ref, self, source, owner, props) {
9655 var element = {
9656 // This tag allows us to uniquely identify this as a React Element
9657 $$typeof: REACT_ELEMENT_TYPE,
9658 // Built-in properties that belong on the element
9659 type: type,
9660 key: key,
9661 ref: ref,
9662 props: props,
9663 // Record the component responsible for creating this element.
9664 _owner: owner
9665 };
9666
9667 {
9668 // The validation flag is currently mutative. We put it on
9669 // an external backing store so that we can freeze the whole object.
9670 // This can be replaced with a WeakMap once they are implemented in
9671 // commonly used development environments.
9672 element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
9673 // the validation flag non-enumerable (where possible, which should
9674 // include every environment we run tests in), so the test framework
9675 // ignores it.
9676
9677 Object.defineProperty(element._store, 'validated', {
9678 configurable: false,
9679 enumerable: false,
9680 writable: true,
9681 value: false
9682 }); // self and source are DEV only properties.
9683
9684 Object.defineProperty(element, '_self', {
9685 configurable: false,
9686 enumerable: false,
9687 writable: false,
9688 value: self
9689 }); // Two elements created in two different places should be considered
9690 // equal for testing purposes and therefore we hide it from enumeration.
9691
9692 Object.defineProperty(element, '_source', {
9693 configurable: false,
9694 enumerable: false,
9695 writable: false,
9696 value: source
9697 });
9698
9699 if (Object.freeze) {
9700 Object.freeze(element.props);
9701 Object.freeze(element);
9702 }
9703 }
9704
9705 return element;
9706 };
9707 /**
9708 * https://github.com/reactjs/rfcs/pull/107
9709 * @param {*} type
9710 * @param {object} props
9711 * @param {string} key
9712 */
9713
9714 function jsxDEV(type, config, maybeKey, source, self) {
9715 {
9716 var propName; // Reserved names are extracted
9717
9718 var props = {};
9719 var key = null;
9720 var ref = null; // Currently, key can be spread in as a prop. This causes a potential
9721 // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
9722 // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
9723 // but as an intermediary step, we will use jsxDEV for everything except
9724 // <div {...props} key="Hi" />, because we aren't currently able to tell if
9725 // key is explicitly declared to be undefined or not.
9726
9727 if (maybeKey !== undefined) {
9728 key = '' + maybeKey;
9729 }
9730
9731 if (hasValidKey(config)) {
9732 key = '' + config.key;
9733 }
9734
9735 if (hasValidRef(config)) {
9736 ref = config.ref;
9737 warnIfStringRefCannotBeAutoConverted(config, self);
9738 } // Remaining properties are added to a new props object
9739
9740
9741 for (propName in config) {
9742 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
9743 props[propName] = config[propName];
9744 }
9745 } // Resolve default props
9746
9747
9748 if (type && type.defaultProps) {
9749 var defaultProps = type.defaultProps;
9750
9751 for (propName in defaultProps) {
9752 if (props[propName] === undefined) {
9753 props[propName] = defaultProps[propName];
9754 }
9755 }
9756 }
9757
9758 if (key || ref) {
9759 var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
9760
9761 if (key) {
9762 defineKeyPropWarningGetter(props, displayName);
9763 }
9764
9765 if (ref) {
9766 defineRefPropWarningGetter(props, displayName);
9767 }
9768 }
9769
9770 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
9771 }
9772 }
9773
9774 var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
9775 var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
9776
9777 function setCurrentlyValidatingElement$1(element) {
9778 {
9779 if (element) {
9780 var owner = element._owner;
9781 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
9782 ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
9783 } else {
9784 ReactDebugCurrentFrame$1.setExtraStackFrame(null);
9785 }
9786 }
9787 }
9788
9789 var propTypesMisspellWarningShown;
9790
9791 {
9792 propTypesMisspellWarningShown = false;
9793 }
9794 /**
9795 * Verifies the object is a ReactElement.
9796 * See https://reactjs.org/docs/react-api.html#isvalidelement
9797 * @param {?object} object
9798 * @return {boolean} True if `object` is a ReactElement.
9799 * @final
9800 */
9801
9802 function isValidElement(object) {
9803 {
9804 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
9805 }
9806 }
9807
9808 function getDeclarationErrorAddendum() {
9809 {
9810 if (ReactCurrentOwner$1.current) {
9811 var name = getComponentName(ReactCurrentOwner$1.current.type);
9812
9813 if (name) {
9814 return '\n\nCheck the render method of `' + name + '`.';
9815 }
9816 }
9817
9818 return '';
9819 }
9820 }
9821
9822 function getSourceInfoErrorAddendum(source) {
9823 {
9824 if (source !== undefined) {
9825 var fileName = source.fileName.replace(/^.*[\\\/]/, '');
9826 var lineNumber = source.lineNumber;
9827 return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
9828 }
9829
9830 return '';
9831 }
9832 }
9833 /**
9834 * Warn if there's no key explicitly set on dynamic arrays of children or
9835 * object keys are not valid. This allows us to keep track of children between
9836 * updates.
9837 */
9838
9839
9840 var ownerHasKeyUseWarning = {};
9841
9842 function getCurrentComponentErrorInfo(parentType) {
9843 {
9844 var info = getDeclarationErrorAddendum();
9845
9846 if (!info) {
9847 var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
9848
9849 if (parentName) {
9850 info = "\n\nCheck the top-level render call using <" + parentName + ">.";
9851 }
9852 }
9853
9854 return info;
9855 }
9856 }
9857 /**
9858 * Warn if the element doesn't have an explicit key assigned to it.
9859 * This element is in an array. The array could grow and shrink or be
9860 * reordered. All children that haven't already been validated are required to
9861 * have a "key" property assigned to it. Error statuses are cached so a warning
9862 * will only be shown once.
9863 *
9864 * @internal
9865 * @param {ReactElement} element Element that requires a key.
9866 * @param {*} parentType element's parent's type.
9867 */
9868
9869
9870 function validateExplicitKey(element, parentType) {
9871 {
9872 if (!element._store || element._store.validated || element.key != null) {
9873 return;
9874 }
9875
9876 element._store.validated = true;
9877 var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
9878
9879 if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
9880 return;
9881 }
9882
9883 ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
9884 // property, it may be the creator of the child that's responsible for
9885 // assigning it a key.
9886
9887 var childOwner = '';
9888
9889 if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
9890 // Give the component that originally created this child.
9891 childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
9892 }
9893
9894 setCurrentlyValidatingElement$1(element);
9895
9896 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);
9897
9898 setCurrentlyValidatingElement$1(null);
9899 }
9900 }
9901 /**
9902 * Ensure that every element either is passed in a static location, in an
9903 * array with an explicit keys property defined, or in an object literal
9904 * with valid key property.
9905 *
9906 * @internal
9907 * @param {ReactNode} node Statically passed child of any type.
9908 * @param {*} parentType node's parent's type.
9909 */
9910
9911
9912 function validateChildKeys(node, parentType) {
9913 {
9914 if (typeof node !== 'object') {
9915 return;
9916 }
9917
9918 if (Array.isArray(node)) {
9919 for (var i = 0; i < node.length; i++) {
9920 var child = node[i];
9921
9922 if (isValidElement(child)) {
9923 validateExplicitKey(child, parentType);
9924 }
9925 }
9926 } else if (isValidElement(node)) {
9927 // This element was passed in a valid location.
9928 if (node._store) {
9929 node._store.validated = true;
9930 }
9931 } else if (node) {
9932 var iteratorFn = getIteratorFn(node);
9933
9934 if (typeof iteratorFn === 'function') {
9935 // Entry iterators used to provide implicit keys,
9936 // but now we print a separate warning for them later.
9937 if (iteratorFn !== node.entries) {
9938 var iterator = iteratorFn.call(node);
9939 var step;
9940
9941 while (!(step = iterator.next()).done) {
9942 if (isValidElement(step.value)) {
9943 validateExplicitKey(step.value, parentType);
9944 }
9945 }
9946 }
9947 }
9948 }
9949 }
9950 }
9951 /**
9952 * Given an element, validate that its props follow the propTypes definition,
9953 * provided by the type.
9954 *
9955 * @param {ReactElement} element
9956 */
9957
9958
9959 function validatePropTypes(element) {
9960 {
9961 var type = element.type;
9962
9963 if (type === null || type === undefined || typeof type === 'string') {
9964 return;
9965 }
9966
9967 var propTypes;
9968
9969 if (typeof type === 'function') {
9970 propTypes = type.propTypes;
9971 } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
9972 // Inner props are checked in the reconciler.
9973 type.$$typeof === REACT_MEMO_TYPE)) {
9974 propTypes = type.propTypes;
9975 } else {
9976 return;
9977 }
9978
9979 if (propTypes) {
9980 // Intentionally inside to avoid triggering lazy initializers:
9981 var name = getComponentName(type);
9982 checkPropTypes(propTypes, element.props, 'prop', name, element);
9983 } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
9984 propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
9985
9986 var _name = getComponentName(type);
9987
9988 error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
9989 }
9990
9991 if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
9992 error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
9993 }
9994 }
9995 }
9996 /**
9997 * Given a fragment, validate that it can only be provided with fragment props
9998 * @param {ReactElement} fragment
9999 */
10000
10001
10002 function validateFragmentProps(fragment) {
10003 {
10004 var keys = Object.keys(fragment.props);
10005
10006 for (var i = 0; i < keys.length; i++) {
10007 var key = keys[i];
10008
10009 if (key !== 'children' && key !== 'key') {
10010 setCurrentlyValidatingElement$1(fragment);
10011
10012 error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
10013
10014 setCurrentlyValidatingElement$1(null);
10015 break;
10016 }
10017 }
10018
10019 if (fragment.ref !== null) {
10020 setCurrentlyValidatingElement$1(fragment);
10021
10022 error('Invalid attribute `ref` supplied to `React.Fragment`.');
10023
10024 setCurrentlyValidatingElement$1(null);
10025 }
10026 }
10027 }
10028
10029 function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
10030 {
10031 var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
10032 // succeed and there will likely be errors in render.
10033
10034 if (!validType) {
10035 var info = '';
10036
10037 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
10038 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.";
10039 }
10040
10041 var sourceInfo = getSourceInfoErrorAddendum(source);
10042
10043 if (sourceInfo) {
10044 info += sourceInfo;
10045 } else {
10046 info += getDeclarationErrorAddendum();
10047 }
10048
10049 var typeString;
10050
10051 if (type === null) {
10052 typeString = 'null';
10053 } else if (Array.isArray(type)) {
10054 typeString = 'array';
10055 } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
10056 typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
10057 info = ' Did you accidentally export a JSX literal instead of a component?';
10058 } else {
10059 typeString = typeof type;
10060 }
10061
10062 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);
10063 }
10064
10065 var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
10066 // TODO: Drop this when these are no longer allowed as the type argument.
10067
10068 if (element == null) {
10069 return element;
10070 } // Skip key warning if the type isn't valid since our key validation logic
10071 // doesn't expect a non-string/function type and can throw confusing errors.
10072 // We don't want exception behavior to differ between dev and prod.
10073 // (Rendering will throw with a helpful message and as soon as the type is
10074 // fixed, the key warnings will appear.)
10075
10076
10077 if (validType) {
10078 var children = props.children;
10079
10080 if (children !== undefined) {
10081 if (isStaticChildren) {
10082 if (Array.isArray(children)) {
10083 for (var i = 0; i < children.length; i++) {
10084 validateChildKeys(children[i], type);
10085 }
10086
10087 if (Object.freeze) {
10088 Object.freeze(children);
10089 }
10090 } else {
10091 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.');
10092 }
10093 } else {
10094 validateChildKeys(children, type);
10095 }
10096 }
10097 }
10098
10099 if (type === exports.Fragment) {
10100 validateFragmentProps(element);
10101 } else {
10102 validatePropTypes(element);
10103 }
10104
10105 return element;
10106 }
10107 } // These two functions exist to still get child warnings in dev
10108 // even with the prod transform. This means that jsxDEV is purely
10109 // opt-in behavior for better messages but that we won't stop
10110 // giving you warnings if you use production apis.
10111
10112 function jsxWithValidationStatic(type, props, key) {
10113 {
10114 return jsxWithValidation(type, props, key, true);
10115 }
10116 }
10117 function jsxWithValidationDynamic(type, props, key) {
10118 {
10119 return jsxWithValidation(type, props, key, false);
10120 }
10121 }
10122
10123 var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
10124 // for now we can ship identical prod functions
10125
10126 var jsxs = jsxWithValidationStatic ;
10127
10128 exports.jsx = jsx;
10129 exports.jsxs = jsxs;
10130 })();
10131 }
10132
10133
10134 /***/ }),
10135
10136 /***/ "./node_modules/react/jsx-runtime.js":
10137 /*!*******************************************!*\
10138 !*** ./node_modules/react/jsx-runtime.js ***!
10139 \*******************************************/
10140 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
10141
10142 "use strict";
10143
10144
10145 if (false) {} else {
10146 module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ "./node_modules/react/cjs/react-jsx-runtime.development.js");
10147 }
10148
10149
10150 /***/ }),
10151
10152 /***/ "./node_modules/styled-components/dist/styled-components.browser.esm.js":
10153 /*!******************************************************************************!*\
10154 !*** ./node_modules/styled-components/dist/styled-components.browser.esm.js ***!
10155 \******************************************************************************/
10156 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10157
10158 "use strict";
10159 __webpack_require__.r(__webpack_exports__);
10160 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10161 /* harmony export */ "ServerStyleSheet": () => (/* binding */ ServerStyleSheet),
10162 /* harmony export */ "StyleSheetConsumer": () => (/* binding */ StyleSheetConsumer),
10163 /* harmony export */ "StyleSheetContext": () => (/* binding */ StyleSheetContext),
10164 /* harmony export */ "StyleSheetManager": () => (/* binding */ StyleSheetManager),
10165 /* harmony export */ "ThemeConsumer": () => (/* binding */ ThemeConsumer),
10166 /* harmony export */ "ThemeContext": () => (/* binding */ ThemeContext),
10167 /* harmony export */ "ThemeProvider": () => (/* binding */ ThemeProvider),
10168 /* 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),
10169 /* harmony export */ "createGlobalStyle": () => (/* binding */ createGlobalStyle),
10170 /* harmony export */ "css": () => (/* binding */ css),
10171 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
10172 /* harmony export */ "isStyledComponent": () => (/* binding */ isStyledComponent),
10173 /* harmony export */ "keyframes": () => (/* binding */ keyframes),
10174 /* harmony export */ "withTheme": () => (/* binding */ withTheme)
10175 /* harmony export */ });
10176 /* harmony import */ var stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! stylis/stylis.min */ "./node_modules/stylis/stylis.min.js");
10177 /* harmony import */ var stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0__);
10178 /* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! stylis-rule-sheet */ "./node_modules/stylis-rule-sheet/index.js");
10179 /* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1__);
10180 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
10181 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
10182 /* harmony import */ var _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/unitless */ "./node_modules/@emotion/unitless/dist/unitless.browser.esm.js");
10183 /* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
10184 /* harmony import */ var memoize_one__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! memoize-one */ "./node_modules/memoize-one/dist/memoize-one.esm.js");
10185 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
10186 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__);
10187 /* 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");
10188 /* harmony import */ var merge_anything__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! merge-anything */ "./node_modules/merge-anything/dist/index.esm.js");
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199 //
10200
10201 var interleave = (function (strings, interpolations) {
10202 var result = [strings[0]];
10203
10204 for (var i = 0, len = interpolations.length; i < len; i += 1) {
10205 result.push(interpolations[i], strings[i + 1]);
10206 }
10207
10208 return result;
10209 });
10210
10211 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
10212 return typeof obj;
10213 } : function (obj) {
10214 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
10215 };
10216
10217 var classCallCheck = function (instance, Constructor) {
10218 if (!(instance instanceof Constructor)) {
10219 throw new TypeError("Cannot call a class as a function");
10220 }
10221 };
10222
10223 var createClass = function () {
10224 function defineProperties(target, props) {
10225 for (var i = 0; i < props.length; i++) {
10226 var descriptor = props[i];
10227 descriptor.enumerable = descriptor.enumerable || false;
10228 descriptor.configurable = true;
10229 if ("value" in descriptor) descriptor.writable = true;
10230 Object.defineProperty(target, descriptor.key, descriptor);
10231 }
10232 }
10233
10234 return function (Constructor, protoProps, staticProps) {
10235 if (protoProps) defineProperties(Constructor.prototype, protoProps);
10236 if (staticProps) defineProperties(Constructor, staticProps);
10237 return Constructor;
10238 };
10239 }();
10240
10241 var _extends = Object.assign || function (target) {
10242 for (var i = 1; i < arguments.length; i++) {
10243 var source = arguments[i];
10244
10245 for (var key in source) {
10246 if (Object.prototype.hasOwnProperty.call(source, key)) {
10247 target[key] = source[key];
10248 }
10249 }
10250 }
10251
10252 return target;
10253 };
10254
10255 var inherits = function (subClass, superClass) {
10256 if (typeof superClass !== "function" && superClass !== null) {
10257 throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
10258 }
10259
10260 subClass.prototype = Object.create(superClass && superClass.prototype, {
10261 constructor: {
10262 value: subClass,
10263 enumerable: false,
10264 writable: true,
10265 configurable: true
10266 }
10267 });
10268 if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
10269 };
10270
10271 var objectWithoutProperties = function (obj, keys) {
10272 var target = {};
10273
10274 for (var i in obj) {
10275 if (keys.indexOf(i) >= 0) continue;
10276 if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
10277 target[i] = obj[i];
10278 }
10279
10280 return target;
10281 };
10282
10283 var possibleConstructorReturn = function (self, call) {
10284 if (!self) {
10285 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
10286 }
10287
10288 return call && (typeof call === "object" || typeof call === "function") ? call : self;
10289 };
10290
10291 //
10292 var isPlainObject = (function (x) {
10293 return (typeof x === 'undefined' ? 'undefined' : _typeof(x)) === 'object' && x.constructor === Object;
10294 });
10295
10296 //
10297 var EMPTY_ARRAY = Object.freeze([]);
10298 var EMPTY_OBJECT = Object.freeze({});
10299
10300 //
10301 function isFunction(test) {
10302 return typeof test === 'function';
10303 }
10304
10305 //
10306
10307 function getComponentName(target) {
10308 return ( true ? typeof target === 'string' && target : 0) || target.displayName || target.name || 'Component';
10309 }
10310
10311 //
10312 function isStatelessFunction(test) {
10313 return typeof test === 'function' && !(test.prototype && test.prototype.isReactComponent);
10314 }
10315
10316 //
10317 function isStyledComponent(target) {
10318 return target && typeof target.styledComponentId === 'string';
10319 }
10320
10321 //
10322
10323 var SC_ATTR = typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || 'data-styled';
10324
10325 var SC_VERSION_ATTR = 'data-styled-version';
10326
10327 var SC_STREAM_ATTR = 'data-styled-streamed';
10328
10329 var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;
10330
10331 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';
10332
10333 // Shared empty execution context when generating static styles
10334 var STATIC_EXECUTION_CONTEXT = {};
10335
10336 //
10337
10338
10339 /**
10340 * Parse errors.md and turn it into a simple hash of code: message
10341 */
10342 var ERRORS = true ? {
10343 "1": "Cannot create styled-component for component: %s.\n\n",
10344 "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",
10345 "3": "Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",
10346 "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",
10347 "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",
10348 "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",
10349 "7": "ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n",
10350 "8": "ThemeProvider: Please make your \"theme\" prop an object.\n\n",
10351 "9": "Missing document `<head>`\n\n",
10352 "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",
10353 "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",
10354 "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",
10355 "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"
10356 } : 0;
10357
10358 /**
10359 * super basic version of sprintf
10360 */
10361 function format() {
10362 var a = arguments.length <= 0 ? undefined : arguments[0];
10363 var b = [];
10364
10365 for (var c = 1, len = arguments.length; c < len; c += 1) {
10366 b.push(arguments.length <= c ? undefined : arguments[c]);
10367 }
10368
10369 b.forEach(function (d) {
10370 a = a.replace(/%[a-z]/, d);
10371 });
10372
10373 return a;
10374 }
10375
10376 /**
10377 * Create an error file out of errors.md for development and a simple web link to the full errors
10378 * in production mode.
10379 */
10380
10381 var StyledComponentsError = function (_Error) {
10382 inherits(StyledComponentsError, _Error);
10383
10384 function StyledComponentsError(code) {
10385 classCallCheck(this, StyledComponentsError);
10386
10387 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
10388 interpolations[_key - 1] = arguments[_key];
10389 }
10390
10391 if (false) { var _this; } else {
10392 var _this = possibleConstructorReturn(this, _Error.call(this, format.apply(undefined, [ERRORS[code]].concat(interpolations)).trim()));
10393 }
10394 return possibleConstructorReturn(_this);
10395 }
10396
10397 return StyledComponentsError;
10398 }(Error);
10399
10400 //
10401 var SC_COMPONENT_ID = /^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm;
10402
10403 var extractComps = (function (maybeCSS) {
10404 var css = '' + (maybeCSS || ''); // Definitely a string, and a clone
10405 var existingComponents = [];
10406 css.replace(SC_COMPONENT_ID, function (match, componentId, matchIndex) {
10407 existingComponents.push({ componentId: componentId, matchIndex: matchIndex });
10408 return match;
10409 });
10410 return existingComponents.map(function (_ref, i) {
10411 var componentId = _ref.componentId,
10412 matchIndex = _ref.matchIndex;
10413
10414 var nextComp = existingComponents[i + 1];
10415 var cssFromDOM = nextComp ? css.slice(matchIndex, nextComp.matchIndex) : css.slice(matchIndex);
10416 return { componentId: componentId, cssFromDOM: cssFromDOM };
10417 });
10418 });
10419
10420 //
10421
10422 var COMMENT_REGEX = /^\s*\/\/.*$/gm;
10423
10424 // NOTE: This stylis instance is only used to split rules from SSR'd style tags
10425 var stylisSplitter = new (stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default())({
10426 global: false,
10427 cascade: true,
10428 keyframe: false,
10429 prefix: false,
10430 compress: false,
10431 semicolon: true
10432 });
10433
10434 var stylis = new (stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default())({
10435 global: false,
10436 cascade: true,
10437 keyframe: false,
10438 prefix: true,
10439 compress: false,
10440 semicolon: false // NOTE: This means "autocomplete missing semicolons"
10441 });
10442
10443 // Wrap `insertRulePlugin to build a list of rules,
10444 // and then make our own plugin to return the rules. This
10445 // makes it easier to hook into the existing SSR architecture
10446
10447 var parsingRules = [];
10448
10449 // eslint-disable-next-line consistent-return
10450 var returnRulesPlugin = function returnRulesPlugin(context) {
10451 if (context === -2) {
10452 var parsedRules = parsingRules;
10453 parsingRules = [];
10454 return parsedRules;
10455 }
10456 };
10457
10458 var parseRulesPlugin = stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1___default()(function (rule) {
10459 parsingRules.push(rule);
10460 });
10461
10462 var _componentId = void 0;
10463 var _selector = void 0;
10464 var _selectorRegexp = void 0;
10465
10466 var selfReferenceReplacer = function selfReferenceReplacer(match, offset, string) {
10467 if (
10468 // the first self-ref is always untouched
10469 offset > 0 &&
10470 // there should be at least two self-refs to do a replacement (.b > .b)
10471 string.slice(0, offset).indexOf(_selector) !== -1 &&
10472 // no consecutive self refs (.b.b); that is a precedence boost and treated differently
10473 string.slice(offset - _selector.length, offset) !== _selector) {
10474 return '.' + _componentId;
10475 }
10476
10477 return match;
10478 };
10479
10480 /**
10481 * When writing a style like
10482 *
10483 * & + & {
10484 * color: red;
10485 * }
10486 *
10487 * The second ampersand should be a reference to the static component class. stylis
10488 * has no knowledge of static class so we have to intelligently replace the base selector.
10489 */
10490 var selfReferenceReplacementPlugin = function selfReferenceReplacementPlugin(context, _, selectors) {
10491 if (context === 2 && selectors.length && selectors[0].lastIndexOf(_selector) > 0) {
10492 // eslint-disable-next-line no-param-reassign
10493 selectors[0] = selectors[0].replace(_selectorRegexp, selfReferenceReplacer);
10494 }
10495 };
10496
10497 stylis.use([selfReferenceReplacementPlugin, parseRulesPlugin, returnRulesPlugin]);
10498 stylisSplitter.use([parseRulesPlugin, returnRulesPlugin]);
10499
10500 var splitByRules = function splitByRules(css) {
10501 return stylisSplitter('', css);
10502 };
10503
10504 function stringifyRules(rules, selector, prefix) {
10505 var componentId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '&';
10506
10507 var flatCSS = rules.join('').replace(COMMENT_REGEX, ''); // replace JS comments
10508
10509 var cssStr = selector && prefix ? prefix + ' ' + selector + ' { ' + flatCSS + ' }' : flatCSS;
10510
10511 // stylis has no concept of state to be passed to plugins
10512 // but since JS is single=threaded, we can rely on that to ensure
10513 // these properties stay in sync with the current stylis run
10514 _componentId = componentId;
10515 _selector = selector;
10516 _selectorRegexp = new RegExp('\\' + _selector + '\\b', 'g');
10517
10518 return stylis(prefix || !selector ? '' : selector, cssStr);
10519 }
10520
10521 //
10522 /* eslint-disable camelcase, no-undef */
10523
10524 var getNonce = (function () {
10525 return true ? __webpack_require__.nc : 0;
10526 });
10527
10528 //
10529 /* These are helpers for the StyleTags to keep track of the injected
10530 * rule names for each (component) ID that they're keeping track of.
10531 * They're crucial for detecting whether a name has already been
10532 * injected.
10533 * (This excludes rehydrated names) */
10534
10535 /* adds a new ID:name pairing to a names dictionary */
10536 var addNameForId = function addNameForId(names, id, name) {
10537 if (name) {
10538 // eslint-disable-next-line no-param-reassign
10539 var namesForId = names[id] || (names[id] = Object.create(null));
10540 namesForId[name] = true;
10541 }
10542 };
10543
10544 /* resets an ID entirely by overwriting it in the dictionary */
10545 var resetIdNames = function resetIdNames(names, id) {
10546 // eslint-disable-next-line no-param-reassign
10547 names[id] = Object.create(null);
10548 };
10549
10550 /* factory for a names dictionary checking the existance of an ID:name pairing */
10551 var hasNameForId = function hasNameForId(names) {
10552 return function (id, name) {
10553 return names[id] !== undefined && names[id][name];
10554 };
10555 };
10556
10557 /* stringifies names for the html/element output */
10558 var stringifyNames = function stringifyNames(names) {
10559 var str = '';
10560 // eslint-disable-next-line guard-for-in
10561 for (var id in names) {
10562 str += Object.keys(names[id]).join(' ') + ' ';
10563 }
10564 return str.trim();
10565 };
10566
10567 /* clones the nested names dictionary */
10568 var cloneNames = function cloneNames(names) {
10569 var clone = Object.create(null);
10570 // eslint-disable-next-line guard-for-in
10571 for (var id in names) {
10572 clone[id] = _extends({}, names[id]);
10573 }
10574 return clone;
10575 };
10576
10577 //
10578
10579 /* These are helpers that deal with the insertRule (aka speedy) API
10580 * They are used in the StyleTags and specifically the speedy tag
10581 */
10582
10583 /* retrieve a sheet for a given style tag */
10584 var sheetForTag = function sheetForTag(tag) {
10585 // $FlowFixMe
10586 if (tag.sheet) return tag.sheet;
10587
10588 /* Firefox quirk requires us to step through all stylesheets to find one owned by the given tag */
10589 var size = tag.ownerDocument.styleSheets.length;
10590 for (var i = 0; i < size; i += 1) {
10591 var sheet = tag.ownerDocument.styleSheets[i];
10592 // $FlowFixMe
10593 if (sheet.ownerNode === tag) return sheet;
10594 }
10595
10596 /* we should always be able to find a tag */
10597 throw new StyledComponentsError(10);
10598 };
10599
10600 /* insert a rule safely and return whether it was actually injected */
10601 var safeInsertRule = function safeInsertRule(sheet, cssRule, index) {
10602 /* abort early if cssRule string is falsy */
10603 if (!cssRule) return false;
10604
10605 var maxIndex = sheet.cssRules.length;
10606
10607 try {
10608 /* use insertRule and cap passed index with maxIndex (no of cssRules) */
10609 sheet.insertRule(cssRule, index <= maxIndex ? index : maxIndex);
10610 } catch (err) {
10611 /* any error indicates an invalid rule */
10612 return false;
10613 }
10614
10615 return true;
10616 };
10617
10618 /* deletes `size` rules starting from `removalIndex` */
10619 var deleteRules = function deleteRules(sheet, removalIndex, size) {
10620 var lowerBound = removalIndex - size;
10621 for (var i = removalIndex; i > lowerBound; i -= 1) {
10622 sheet.deleteRule(i);
10623 }
10624 };
10625
10626 //
10627
10628 /* this marker separates component styles and is important for rehydration */
10629 var makeTextMarker = function makeTextMarker(id) {
10630 return '\n/* sc-component-id: ' + id + ' */\n';
10631 };
10632
10633 /* add up all numbers in array up until and including the index */
10634 var addUpUntilIndex = function addUpUntilIndex(sizes, index) {
10635 var totalUpToIndex = 0;
10636 for (var i = 0; i <= index; i += 1) {
10637 totalUpToIndex += sizes[i];
10638 }
10639
10640 return totalUpToIndex;
10641 };
10642
10643 /* create a new style tag after lastEl */
10644 var makeStyleTag = function makeStyleTag(target, tagEl, insertBefore) {
10645 var targetDocument = document;
10646 if (target) targetDocument = target.ownerDocument;else if (tagEl) targetDocument = tagEl.ownerDocument;
10647
10648 var el = targetDocument.createElement('style');
10649 el.setAttribute(SC_ATTR, '');
10650 el.setAttribute(SC_VERSION_ATTR, "4.4.1");
10651
10652 var nonce = getNonce();
10653 if (nonce) {
10654 el.setAttribute('nonce', nonce);
10655 }
10656
10657 /* Work around insertRule quirk in EdgeHTML */
10658 el.appendChild(targetDocument.createTextNode(''));
10659
10660 if (target && !tagEl) {
10661 /* Append to target when no previous element was passed */
10662 target.appendChild(el);
10663 } else {
10664 if (!tagEl || !target || !tagEl.parentNode) {
10665 throw new StyledComponentsError(6);
10666 }
10667
10668 /* Insert new style tag after the previous one */
10669 tagEl.parentNode.insertBefore(el, insertBefore ? tagEl : tagEl.nextSibling);
10670 }
10671
10672 return el;
10673 };
10674
10675 /* takes a css factory function and outputs an html styled tag factory */
10676 var wrapAsHtmlTag = function wrapAsHtmlTag(css, names) {
10677 return function (additionalAttrs) {
10678 var nonce = getNonce();
10679 var attrs = [nonce && 'nonce="' + nonce + '"', SC_ATTR + '="' + stringifyNames(names) + '"', SC_VERSION_ATTR + '="' + "4.4.1" + '"', additionalAttrs];
10680
10681 var htmlAttr = attrs.filter(Boolean).join(' ');
10682 return '<style ' + htmlAttr + '>' + css() + '</style>';
10683 };
10684 };
10685
10686 /* takes a css factory function and outputs an element factory */
10687 var wrapAsElement = function wrapAsElement(css, names) {
10688 return function () {
10689 var _props;
10690
10691 var props = (_props = {}, _props[SC_ATTR] = stringifyNames(names), _props[SC_VERSION_ATTR] = "4.4.1", _props);
10692
10693 var nonce = getNonce();
10694 if (nonce) {
10695 // $FlowFixMe
10696 props.nonce = nonce;
10697 }
10698
10699 // eslint-disable-next-line react/no-danger
10700 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement('style', _extends({}, props, { dangerouslySetInnerHTML: { __html: css() } }));
10701 };
10702 };
10703
10704 var getIdsFromMarkersFactory = function getIdsFromMarkersFactory(markers) {
10705 return function () {
10706 return Object.keys(markers);
10707 };
10708 };
10709
10710 /* speedy tags utilise insertRule */
10711 var makeSpeedyTag = function makeSpeedyTag(el, getImportRuleTag) {
10712 var names = Object.create(null);
10713 var markers = Object.create(null);
10714 var sizes = [];
10715
10716 var extractImport = getImportRuleTag !== undefined;
10717 /* indicates whether getImportRuleTag was called */
10718 var usedImportRuleTag = false;
10719
10720 var insertMarker = function insertMarker(id) {
10721 var prev = markers[id];
10722 if (prev !== undefined) {
10723 return prev;
10724 }
10725
10726 markers[id] = sizes.length;
10727 sizes.push(0);
10728 resetIdNames(names, id);
10729
10730 return markers[id];
10731 };
10732
10733 var insertRules = function insertRules(id, cssRules, name) {
10734 var marker = insertMarker(id);
10735 var sheet = sheetForTag(el);
10736 var insertIndex = addUpUntilIndex(sizes, marker);
10737
10738 var injectedRules = 0;
10739 var importRules = [];
10740 var cssRulesSize = cssRules.length;
10741
10742 for (var i = 0; i < cssRulesSize; i += 1) {
10743 var cssRule = cssRules[i];
10744 var mayHaveImport = extractImport; /* @import rules are reordered to appear first */
10745 if (mayHaveImport && cssRule.indexOf('@import') !== -1) {
10746 importRules.push(cssRule);
10747 } else if (safeInsertRule(sheet, cssRule, insertIndex + injectedRules)) {
10748 mayHaveImport = false;
10749 injectedRules += 1;
10750 }
10751 }
10752
10753 if (extractImport && importRules.length > 0) {
10754 usedImportRuleTag = true;
10755 // $FlowFixMe
10756 getImportRuleTag().insertRules(id + '-import', importRules);
10757 }
10758
10759 sizes[marker] += injectedRules; /* add up no of injected rules */
10760 addNameForId(names, id, name);
10761 };
10762
10763 var removeRules = function removeRules(id) {
10764 var marker = markers[id];
10765 if (marker === undefined) return;
10766 // $FlowFixMe
10767 if (el.isConnected === false) return;
10768
10769 var size = sizes[marker];
10770 var sheet = sheetForTag(el);
10771 var removalIndex = addUpUntilIndex(sizes, marker) - 1;
10772 deleteRules(sheet, removalIndex, size);
10773 sizes[marker] = 0;
10774 resetIdNames(names, id);
10775
10776 if (extractImport && usedImportRuleTag) {
10777 // $FlowFixMe
10778 getImportRuleTag().removeRules(id + '-import');
10779 }
10780 };
10781
10782 var css = function css() {
10783 var _sheetForTag = sheetForTag(el),
10784 cssRules = _sheetForTag.cssRules;
10785
10786 var str = '';
10787
10788 // eslint-disable-next-line guard-for-in
10789 for (var id in markers) {
10790 str += makeTextMarker(id);
10791 var marker = markers[id];
10792 var end = addUpUntilIndex(sizes, marker);
10793 var size = sizes[marker];
10794 for (var i = end - size; i < end; i += 1) {
10795 var rule = cssRules[i];
10796 if (rule !== undefined) {
10797 str += rule.cssText;
10798 }
10799 }
10800 }
10801
10802 return str;
10803 };
10804
10805 return {
10806 clone: function clone() {
10807 throw new StyledComponentsError(5);
10808 },
10809
10810 css: css,
10811 getIds: getIdsFromMarkersFactory(markers),
10812 hasNameForId: hasNameForId(names),
10813 insertMarker: insertMarker,
10814 insertRules: insertRules,
10815 removeRules: removeRules,
10816 sealed: false,
10817 styleTag: el,
10818 toElement: wrapAsElement(css, names),
10819 toHTML: wrapAsHtmlTag(css, names)
10820 };
10821 };
10822
10823 var makeTextNode = function makeTextNode(targetDocument, id) {
10824 return targetDocument.createTextNode(makeTextMarker(id));
10825 };
10826
10827 var makeBrowserTag = function makeBrowserTag(el, getImportRuleTag) {
10828 var names = Object.create(null);
10829 var markers = Object.create(null);
10830
10831 var extractImport = getImportRuleTag !== undefined;
10832
10833 /* indicates whether getImportRuleTag was called */
10834 var usedImportRuleTag = false;
10835
10836 var insertMarker = function insertMarker(id) {
10837 var prev = markers[id];
10838 if (prev !== undefined) {
10839 return prev;
10840 }
10841
10842 markers[id] = makeTextNode(el.ownerDocument, id);
10843 el.appendChild(markers[id]);
10844 names[id] = Object.create(null);
10845
10846 return markers[id];
10847 };
10848
10849 var insertRules = function insertRules(id, cssRules, name) {
10850 var marker = insertMarker(id);
10851 var importRules = [];
10852 var cssRulesSize = cssRules.length;
10853
10854 for (var i = 0; i < cssRulesSize; i += 1) {
10855 var rule = cssRules[i];
10856 var mayHaveImport = extractImport;
10857 if (mayHaveImport && rule.indexOf('@import') !== -1) {
10858 importRules.push(rule);
10859 } else {
10860 mayHaveImport = false;
10861 var separator = i === cssRulesSize - 1 ? '' : ' ';
10862 marker.appendData('' + rule + separator);
10863 }
10864 }
10865
10866 addNameForId(names, id, name);
10867
10868 if (extractImport && importRules.length > 0) {
10869 usedImportRuleTag = true;
10870 // $FlowFixMe
10871 getImportRuleTag().insertRules(id + '-import', importRules);
10872 }
10873 };
10874
10875 var removeRules = function removeRules(id) {
10876 var marker = markers[id];
10877 if (marker === undefined) return;
10878
10879 /* create new empty text node and replace the current one */
10880 var newMarker = makeTextNode(el.ownerDocument, id);
10881 el.replaceChild(newMarker, marker);
10882 markers[id] = newMarker;
10883 resetIdNames(names, id);
10884
10885 if (extractImport && usedImportRuleTag) {
10886 // $FlowFixMe
10887 getImportRuleTag().removeRules(id + '-import');
10888 }
10889 };
10890
10891 var css = function css() {
10892 var str = '';
10893
10894 // eslint-disable-next-line guard-for-in
10895 for (var id in markers) {
10896 str += markers[id].data;
10897 }
10898
10899 return str;
10900 };
10901
10902 return {
10903 clone: function clone() {
10904 throw new StyledComponentsError(5);
10905 },
10906
10907 css: css,
10908 getIds: getIdsFromMarkersFactory(markers),
10909 hasNameForId: hasNameForId(names),
10910 insertMarker: insertMarker,
10911 insertRules: insertRules,
10912 removeRules: removeRules,
10913 sealed: false,
10914 styleTag: el,
10915 toElement: wrapAsElement(css, names),
10916 toHTML: wrapAsHtmlTag(css, names)
10917 };
10918 };
10919
10920 var makeServerTag = function makeServerTag(namesArg, markersArg) {
10921 var names = namesArg === undefined ? Object.create(null) : namesArg;
10922 var markers = markersArg === undefined ? Object.create(null) : markersArg;
10923
10924 var insertMarker = function insertMarker(id) {
10925 var prev = markers[id];
10926 if (prev !== undefined) {
10927 return prev;
10928 }
10929
10930 return markers[id] = [''];
10931 };
10932
10933 var insertRules = function insertRules(id, cssRules, name) {
10934 var marker = insertMarker(id);
10935 marker[0] += cssRules.join(' ');
10936 addNameForId(names, id, name);
10937 };
10938
10939 var removeRules = function removeRules(id) {
10940 var marker = markers[id];
10941 if (marker === undefined) return;
10942 marker[0] = '';
10943 resetIdNames(names, id);
10944 };
10945
10946 var css = function css() {
10947 var str = '';
10948 // eslint-disable-next-line guard-for-in
10949 for (var id in markers) {
10950 var cssForId = markers[id][0];
10951 if (cssForId) {
10952 str += makeTextMarker(id) + cssForId;
10953 }
10954 }
10955 return str;
10956 };
10957
10958 var clone = function clone() {
10959 var namesClone = cloneNames(names);
10960 var markersClone = Object.create(null);
10961
10962 // eslint-disable-next-line guard-for-in
10963 for (var id in markers) {
10964 markersClone[id] = [markers[id][0]];
10965 }
10966
10967 return makeServerTag(namesClone, markersClone);
10968 };
10969
10970 var tag = {
10971 clone: clone,
10972 css: css,
10973 getIds: getIdsFromMarkersFactory(markers),
10974 hasNameForId: hasNameForId(names),
10975 insertMarker: insertMarker,
10976 insertRules: insertRules,
10977 removeRules: removeRules,
10978 sealed: false,
10979 styleTag: null,
10980 toElement: wrapAsElement(css, names),
10981 toHTML: wrapAsHtmlTag(css, names)
10982 };
10983
10984 return tag;
10985 };
10986
10987 var makeTag = function makeTag(target, tagEl, forceServer, insertBefore, getImportRuleTag) {
10988 if (IS_BROWSER && !forceServer) {
10989 var el = makeStyleTag(target, tagEl, insertBefore);
10990
10991 if (DISABLE_SPEEDY) {
10992 return makeBrowserTag(el, getImportRuleTag);
10993 } else {
10994 return makeSpeedyTag(el, getImportRuleTag);
10995 }
10996 }
10997
10998 return makeServerTag();
10999 };
11000
11001 var rehydrate = function rehydrate(tag, els, extracted) {
11002 /* add all extracted components to the new tag */
11003 for (var i = 0, len = extracted.length; i < len; i += 1) {
11004 var _extracted$i = extracted[i],
11005 componentId = _extracted$i.componentId,
11006 cssFromDOM = _extracted$i.cssFromDOM;
11007
11008 var cssRules = splitByRules(cssFromDOM);
11009 tag.insertRules(componentId, cssRules);
11010 }
11011
11012 /* remove old HTMLStyleElements, since they have been rehydrated */
11013 for (var _i = 0, _len = els.length; _i < _len; _i += 1) {
11014 var el = els[_i];
11015 if (el.parentNode) {
11016 el.parentNode.removeChild(el);
11017 }
11018 }
11019 };
11020
11021 //
11022
11023 var SPLIT_REGEX = /\s+/;
11024
11025 /* determine the maximum number of components before tags are sharded */
11026 var MAX_SIZE = void 0;
11027 if (IS_BROWSER) {
11028 /* in speedy mode we can keep a lot more rules in a sheet before a slowdown can be expected */
11029 MAX_SIZE = DISABLE_SPEEDY ? 40 : 1000;
11030 } else {
11031 /* for servers we do not need to shard at all */
11032 MAX_SIZE = -1;
11033 }
11034
11035 var sheetRunningId = 0;
11036 var master = void 0;
11037
11038 var StyleSheet = function () {
11039
11040 /* a map from ids to tags */
11041
11042 /* deferred rules for a given id */
11043
11044 /* this is used for not reinjecting rules via hasNameForId() */
11045
11046 /* when rules for an id are removed using remove() we have to ignore rehydratedNames for it */
11047
11048 /* a list of tags belonging to this StyleSheet */
11049
11050 /* a tag for import rules */
11051
11052 /* current capacity until a new tag must be created */
11053
11054 /* children (aka clones) of this StyleSheet inheriting all and future injections */
11055
11056 function StyleSheet() {
11057 var _this = this;
11058
11059 var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : IS_BROWSER ? document.head : null;
11060 var forceServer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
11061 classCallCheck(this, StyleSheet);
11062
11063 this.getImportRuleTag = function () {
11064 var importRuleTag = _this.importRuleTag;
11065
11066 if (importRuleTag !== undefined) {
11067 return importRuleTag;
11068 }
11069
11070 var firstTag = _this.tags[0];
11071 var insertBefore = true;
11072
11073 return _this.importRuleTag = makeTag(_this.target, firstTag ? firstTag.styleTag : null, _this.forceServer, insertBefore);
11074 };
11075
11076 sheetRunningId += 1;
11077 this.id = sheetRunningId;
11078 this.forceServer = forceServer;
11079 this.target = forceServer ? null : target;
11080 this.tagMap = {};
11081 this.deferred = {};
11082 this.rehydratedNames = {};
11083 this.ignoreRehydratedNames = {};
11084 this.tags = [];
11085 this.capacity = 1;
11086 this.clones = [];
11087 }
11088
11089 /* rehydrate all SSR'd style tags */
11090
11091
11092 StyleSheet.prototype.rehydrate = function rehydrate$$1() {
11093 if (!IS_BROWSER || this.forceServer) return this;
11094
11095 var els = [];
11096 var extracted = [];
11097 var isStreamed = false;
11098
11099 /* retrieve all of our SSR style elements from the DOM */
11100 var nodes = document.querySelectorAll('style[' + SC_ATTR + '][' + SC_VERSION_ATTR + '="' + "4.4.1" + '"]');
11101
11102 var nodesSize = nodes.length;
11103
11104 /* abort rehydration if no previous style tags were found */
11105 if (!nodesSize) return this;
11106
11107 for (var i = 0; i < nodesSize; i += 1) {
11108 var el = nodes[i];
11109
11110 /* check if style tag is a streamed tag */
11111 if (!isStreamed) isStreamed = !!el.getAttribute(SC_STREAM_ATTR);
11112
11113 /* retrieve all component names */
11114 var elNames = (el.getAttribute(SC_ATTR) || '').trim().split(SPLIT_REGEX);
11115 var elNamesSize = elNames.length;
11116 for (var j = 0, name; j < elNamesSize; j += 1) {
11117 name = elNames[j];
11118 /* add rehydrated name to sheet to avoid re-adding styles */
11119 this.rehydratedNames[name] = true;
11120 }
11121
11122 /* extract all components and their CSS */
11123 extracted.push.apply(extracted, extractComps(el.textContent));
11124
11125 /* store original HTMLStyleElement */
11126 els.push(el);
11127 }
11128
11129 /* abort rehydration if nothing was extracted */
11130 var extractedSize = extracted.length;
11131 if (!extractedSize) return this;
11132
11133 /* create a tag to be used for rehydration */
11134 var tag = this.makeTag(null);
11135
11136 rehydrate(tag, els, extracted);
11137
11138 /* reset capacity and adjust MAX_SIZE by the initial size of the rehydration */
11139 this.capacity = Math.max(1, MAX_SIZE - extractedSize);
11140 this.tags.push(tag);
11141
11142 /* retrieve all component ids */
11143 for (var _j = 0; _j < extractedSize; _j += 1) {
11144 this.tagMap[extracted[_j].componentId] = tag;
11145 }
11146
11147 return this;
11148 };
11149
11150 /* retrieve a "master" instance of StyleSheet which is typically used when no other is available
11151 * The master StyleSheet is targeted by createGlobalStyle, keyframes, and components outside of any
11152 * StyleSheetManager's context */
11153
11154
11155 /* reset the internal "master" instance */
11156 StyleSheet.reset = function reset() {
11157 var forceServer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
11158
11159 master = new StyleSheet(undefined, forceServer).rehydrate();
11160 };
11161
11162 /* adds "children" to the StyleSheet that inherit all of the parents' rules
11163 * while their own rules do not affect the parent */
11164
11165
11166 StyleSheet.prototype.clone = function clone() {
11167 var sheet = new StyleSheet(this.target, this.forceServer);
11168
11169 /* add to clone array */
11170 this.clones.push(sheet);
11171
11172 /* clone all tags */
11173 sheet.tags = this.tags.map(function (tag) {
11174 var ids = tag.getIds();
11175 var newTag = tag.clone();
11176
11177 /* reconstruct tagMap */
11178 for (var i = 0; i < ids.length; i += 1) {
11179 sheet.tagMap[ids[i]] = newTag;
11180 }
11181
11182 return newTag;
11183 });
11184
11185 /* clone other maps */
11186 sheet.rehydratedNames = _extends({}, this.rehydratedNames);
11187 sheet.deferred = _extends({}, this.deferred);
11188
11189 return sheet;
11190 };
11191
11192 /* force StyleSheet to create a new tag on the next injection */
11193
11194
11195 StyleSheet.prototype.sealAllTags = function sealAllTags() {
11196 this.capacity = 1;
11197
11198 this.tags.forEach(function (tag) {
11199 // eslint-disable-next-line no-param-reassign
11200 tag.sealed = true;
11201 });
11202 };
11203
11204 StyleSheet.prototype.makeTag = function makeTag$$1(tag) {
11205 var lastEl = tag ? tag.styleTag : null;
11206 var insertBefore = false;
11207
11208 return makeTag(this.target, lastEl, this.forceServer, insertBefore, this.getImportRuleTag);
11209 };
11210
11211 /* get a tag for a given componentId, assign the componentId to one, or shard */
11212 StyleSheet.prototype.getTagForId = function getTagForId(id) {
11213 /* simply return a tag, when the componentId was already assigned one */
11214 var prev = this.tagMap[id];
11215 if (prev !== undefined && !prev.sealed) {
11216 return prev;
11217 }
11218
11219 var tag = this.tags[this.tags.length - 1];
11220
11221 /* shard (create a new tag) if the tag is exhausted (See MAX_SIZE) */
11222 this.capacity -= 1;
11223
11224 if (this.capacity === 0) {
11225 this.capacity = MAX_SIZE;
11226 tag = this.makeTag(tag);
11227 this.tags.push(tag);
11228 }
11229
11230 return this.tagMap[id] = tag;
11231 };
11232
11233 /* mainly for createGlobalStyle to check for its id */
11234
11235
11236 StyleSheet.prototype.hasId = function hasId(id) {
11237 return this.tagMap[id] !== undefined;
11238 };
11239
11240 /* caching layer checking id+name to already have a corresponding tag and injected rules */
11241
11242
11243 StyleSheet.prototype.hasNameForId = function hasNameForId(id, name) {
11244 /* exception for rehydrated names which are checked separately */
11245 if (this.ignoreRehydratedNames[id] === undefined && this.rehydratedNames[name]) {
11246 return true;
11247 }
11248
11249 var tag = this.tagMap[id];
11250 return tag !== undefined && tag.hasNameForId(id, name);
11251 };
11252
11253 /* registers a componentId and registers it on its tag */
11254
11255
11256 StyleSheet.prototype.deferredInject = function deferredInject(id, cssRules) {
11257 /* don't inject when the id is already registered */
11258 if (this.tagMap[id] !== undefined) return;
11259
11260 var clones = this.clones;
11261
11262 for (var i = 0; i < clones.length; i += 1) {
11263 clones[i].deferredInject(id, cssRules);
11264 }
11265
11266 this.getTagForId(id).insertMarker(id);
11267 this.deferred[id] = cssRules;
11268 };
11269
11270 /* injects rules for a given id with a name that will need to be cached */
11271
11272
11273 StyleSheet.prototype.inject = function inject(id, cssRules, name) {
11274 var clones = this.clones;
11275
11276
11277 for (var i = 0; i < clones.length; i += 1) {
11278 clones[i].inject(id, cssRules, name);
11279 }
11280
11281 var tag = this.getTagForId(id);
11282
11283 /* add deferred rules for component */
11284 if (this.deferred[id] !== undefined) {
11285 // Combine passed cssRules with previously deferred CSS rules
11286 // NOTE: We cannot mutate the deferred array itself as all clones
11287 // do the same (see clones[i].inject)
11288 var rules = this.deferred[id].concat(cssRules);
11289 tag.insertRules(id, rules, name);
11290
11291 this.deferred[id] = undefined;
11292 } else {
11293 tag.insertRules(id, cssRules, name);
11294 }
11295 };
11296
11297 /* removes all rules for a given id, which doesn't remove its marker but resets it */
11298
11299
11300 StyleSheet.prototype.remove = function remove(id) {
11301 var tag = this.tagMap[id];
11302 if (tag === undefined) return;
11303
11304 var clones = this.clones;
11305
11306 for (var i = 0; i < clones.length; i += 1) {
11307 clones[i].remove(id);
11308 }
11309
11310 /* remove all rules from the tag */
11311 tag.removeRules(id);
11312
11313 /* ignore possible rehydrated names */
11314 this.ignoreRehydratedNames[id] = true;
11315
11316 /* delete possible deferred rules */
11317 this.deferred[id] = undefined;
11318 };
11319
11320 StyleSheet.prototype.toHTML = function toHTML() {
11321 return this.tags.map(function (tag) {
11322 return tag.toHTML();
11323 }).join('');
11324 };
11325
11326 StyleSheet.prototype.toReactElements = function toReactElements() {
11327 var id = this.id;
11328
11329
11330 return this.tags.map(function (tag, i) {
11331 var key = 'sc-' + id + '-' + i;
11332 return (0,react__WEBPACK_IMPORTED_MODULE_2__.cloneElement)(tag.toElement(), { key: key });
11333 });
11334 };
11335
11336 createClass(StyleSheet, null, [{
11337 key: 'master',
11338 get: function get$$1() {
11339 return master || (master = new StyleSheet().rehydrate());
11340 }
11341
11342 /* NOTE: This is just for backwards-compatibility with jest-styled-components */
11343
11344 }, {
11345 key: 'instance',
11346 get: function get$$1() {
11347 return StyleSheet.master;
11348 }
11349 }]);
11350 return StyleSheet;
11351 }();
11352
11353 //
11354
11355 var Keyframes = function () {
11356 function Keyframes(name, rules) {
11357 var _this = this;
11358
11359 classCallCheck(this, Keyframes);
11360
11361 this.inject = function (styleSheet) {
11362 if (!styleSheet.hasNameForId(_this.id, _this.name)) {
11363 styleSheet.inject(_this.id, _this.rules, _this.name);
11364 }
11365 };
11366
11367 this.toString = function () {
11368 throw new StyledComponentsError(12, String(_this.name));
11369 };
11370
11371 this.name = name;
11372 this.rules = rules;
11373
11374 this.id = 'sc-keyframes-' + name;
11375 }
11376
11377 Keyframes.prototype.getName = function getName() {
11378 return this.name;
11379 };
11380
11381 return Keyframes;
11382 }();
11383
11384 //
11385
11386 /**
11387 * inlined version of
11388 * https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/hyphenateStyleName.js
11389 */
11390
11391 var uppercasePattern = /([A-Z])/g;
11392 var msPattern = /^ms-/;
11393
11394 /**
11395 * Hyphenates a camelcased CSS property name, for example:
11396 *
11397 * > hyphenateStyleName('backgroundColor')
11398 * < "background-color"
11399 * > hyphenateStyleName('MozTransition')
11400 * < "-moz-transition"
11401 * > hyphenateStyleName('msTransition')
11402 * < "-ms-transition"
11403 *
11404 * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
11405 * is converted to `-ms-`.
11406 *
11407 * @param {string} string
11408 * @return {string}
11409 */
11410 function hyphenateStyleName(string) {
11411 return string.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
11412 }
11413
11414 //
11415
11416 // Taken from https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/shared/dangerousStyleValue.js
11417 function addUnitIfNeeded(name, value) {
11418 // https://github.com/amilajack/eslint-plugin-flowtype-errors/issues/133
11419 // $FlowFixMe
11420 if (value == null || typeof value === 'boolean' || value === '') {
11421 return '';
11422 }
11423
11424 if (typeof value === 'number' && value !== 0 && !(name in _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__["default"])) {
11425 return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
11426 }
11427
11428 return String(value).trim();
11429 }
11430
11431 //
11432
11433 /**
11434 * It's falsish not falsy because 0 is allowed.
11435 */
11436 var isFalsish = function isFalsish(chunk) {
11437 return chunk === undefined || chunk === null || chunk === false || chunk === '';
11438 };
11439
11440 var objToCssArray = function objToCssArray(obj, prevKey) {
11441 var rules = [];
11442 var keys = Object.keys(obj);
11443
11444 keys.forEach(function (key) {
11445 if (!isFalsish(obj[key])) {
11446 if (isPlainObject(obj[key])) {
11447 rules.push.apply(rules, objToCssArray(obj[key], key));
11448
11449 return rules;
11450 } else if (isFunction(obj[key])) {
11451 rules.push(hyphenateStyleName(key) + ':', obj[key], ';');
11452
11453 return rules;
11454 }
11455 rules.push(hyphenateStyleName(key) + ': ' + addUnitIfNeeded(key, obj[key]) + ';');
11456 }
11457 return rules;
11458 });
11459
11460 return prevKey ? [prevKey + ' {'].concat(rules, ['}']) : rules;
11461 };
11462
11463 function flatten(chunk, executionContext, styleSheet) {
11464 if (Array.isArray(chunk)) {
11465 var ruleSet = [];
11466
11467 for (var i = 0, len = chunk.length, result; i < len; i += 1) {
11468 result = flatten(chunk[i], executionContext, styleSheet);
11469
11470 if (result === null) continue;else if (Array.isArray(result)) ruleSet.push.apply(ruleSet, result);else ruleSet.push(result);
11471 }
11472
11473 return ruleSet;
11474 }
11475
11476 if (isFalsish(chunk)) {
11477 return null;
11478 }
11479
11480 /* Handle other components */
11481 if (isStyledComponent(chunk)) {
11482 return '.' + chunk.styledComponentId;
11483 }
11484
11485 /* Either execute or defer the function */
11486 if (isFunction(chunk)) {
11487 if (isStatelessFunction(chunk) && executionContext) {
11488 var _result = chunk(executionContext);
11489
11490 if ( true && (0,react_is__WEBPACK_IMPORTED_MODULE_4__.isElement)(_result)) {
11491 // eslint-disable-next-line no-console
11492 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.');
11493 }
11494
11495 return flatten(_result, executionContext, styleSheet);
11496 } else return chunk;
11497 }
11498
11499 if (chunk instanceof Keyframes) {
11500 if (styleSheet) {
11501 chunk.inject(styleSheet);
11502 return chunk.getName();
11503 } else return chunk;
11504 }
11505
11506 /* Handle objects */
11507 return isPlainObject(chunk) ? objToCssArray(chunk) : chunk.toString();
11508 }
11509
11510 //
11511
11512 function css(styles) {
11513 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
11514 interpolations[_key - 1] = arguments[_key];
11515 }
11516
11517 if (isFunction(styles) || isPlainObject(styles)) {
11518 // $FlowFixMe
11519 return flatten(interleave(EMPTY_ARRAY, [styles].concat(interpolations)));
11520 }
11521
11522 // $FlowFixMe
11523 return flatten(interleave(styles, interpolations));
11524 }
11525
11526 //
11527
11528 function constructWithOptions(componentConstructor, tag) {
11529 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT;
11530
11531 if (!(0,react_is__WEBPACK_IMPORTED_MODULE_4__.isValidElementType)(tag)) {
11532 throw new StyledComponentsError(1, String(tag));
11533 }
11534
11535 /* This is callable directly as a template function */
11536 // $FlowFixMe: Not typed to avoid destructuring arguments
11537 var templateFunction = function templateFunction() {
11538 return componentConstructor(tag, options, css.apply(undefined, arguments));
11539 };
11540
11541 /* If config methods are called, wrap up a new template function and merge options */
11542 templateFunction.withConfig = function (config) {
11543 return constructWithOptions(componentConstructor, tag, _extends({}, options, config));
11544 };
11545
11546 /* Modify/inject new props at runtime */
11547 templateFunction.attrs = function (attrs) {
11548 return constructWithOptions(componentConstructor, tag, _extends({}, options, {
11549 attrs: Array.prototype.concat(options.attrs, attrs).filter(Boolean)
11550 }));
11551 };
11552
11553 return templateFunction;
11554 }
11555
11556 //
11557 // Source: https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js
11558 function murmurhash(c) {
11559 for (var e = c.length | 0, a = e | 0, d = 0, b; e >= 4;) {
11560 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;
11561 }
11562 switch (e) {
11563 case 3:
11564 a ^= (c.charCodeAt(d + 2) & 255) << 16;
11565 case 2:
11566 a ^= (c.charCodeAt(d + 1) & 255) << 8;
11567 case 1:
11568 a ^= c.charCodeAt(d) & 255, a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
11569 }
11570 a ^= a >>> 13;
11571 a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
11572 return (a ^ a >>> 15) >>> 0;
11573 }
11574
11575 //
11576 /* eslint-disable no-bitwise */
11577
11578 /* This is the "capacity" of our alphabet i.e. 2x26 for all letters plus their capitalised
11579 * counterparts */
11580 var charsLength = 52;
11581
11582 /* start at 75 for 'a' until 'z' (25) and then start at 65 for capitalised letters */
11583 var getAlphabeticChar = function getAlphabeticChar(code) {
11584 return String.fromCharCode(code + (code > 25 ? 39 : 97));
11585 };
11586
11587 /* input a number, usually a hash and convert it to base-52 */
11588 function generateAlphabeticName(code) {
11589 var name = '';
11590 var x = void 0;
11591
11592 /* get a char and divide by alphabet-length */
11593 for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {
11594 name = getAlphabeticChar(x % charsLength) + name;
11595 }
11596
11597 return getAlphabeticChar(x % charsLength) + name;
11598 }
11599
11600 //
11601
11602 function hasFunctionObjectKey(obj) {
11603 // eslint-disable-next-line guard-for-in, no-restricted-syntax
11604 for (var key in obj) {
11605 if (isFunction(obj[key])) {
11606 return true;
11607 }
11608 }
11609
11610 return false;
11611 }
11612
11613 function isStaticRules(rules, attrs) {
11614 for (var i = 0; i < rules.length; i += 1) {
11615 var rule = rules[i];
11616
11617 // recursive case
11618 if (Array.isArray(rule) && !isStaticRules(rule, attrs)) {
11619 return false;
11620 } else if (isFunction(rule) && !isStyledComponent(rule)) {
11621 // functions are allowed to be static if they're just being
11622 // used to get the classname of a nested styled component
11623 return false;
11624 }
11625 }
11626
11627 if (attrs.some(function (x) {
11628 return isFunction(x) || hasFunctionObjectKey(x);
11629 })) return false;
11630
11631 return true;
11632 }
11633
11634 //
11635
11636 /* combines hashStr (murmurhash) and nameGenerator for convenience */
11637 var hasher = function hasher(str) {
11638 return generateAlphabeticName(murmurhash(str));
11639 };
11640
11641 /*
11642 ComponentStyle is all the CSS-specific stuff, not
11643 the React-specific stuff.
11644 */
11645
11646 var ComponentStyle = function () {
11647 function ComponentStyle(rules, attrs, componentId) {
11648 classCallCheck(this, ComponentStyle);
11649
11650 this.rules = rules;
11651 this.isStatic = false && 0;
11652 this.componentId = componentId;
11653
11654 if (!StyleSheet.master.hasId(componentId)) {
11655 StyleSheet.master.deferredInject(componentId, []);
11656 }
11657 }
11658
11659 /*
11660 * Flattens a rule set into valid CSS
11661 * Hashes it, wraps the whole chunk in a .hash1234 {}
11662 * Returns the hash to be injected on render()
11663 * */
11664
11665
11666 ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) {
11667 var isStatic = this.isStatic,
11668 componentId = this.componentId,
11669 lastClassName = this.lastClassName;
11670
11671 if (IS_BROWSER && isStatic && typeof lastClassName === 'string' && styleSheet.hasNameForId(componentId, lastClassName)) {
11672 return lastClassName;
11673 }
11674
11675 var flatCSS = flatten(this.rules, executionContext, styleSheet);
11676 var name = hasher(this.componentId + flatCSS.join(''));
11677 if (!styleSheet.hasNameForId(componentId, name)) {
11678 styleSheet.inject(this.componentId, stringifyRules(flatCSS, '.' + name, undefined, componentId), name);
11679 }
11680
11681 this.lastClassName = name;
11682 return name;
11683 };
11684
11685 ComponentStyle.generateName = function generateName(str) {
11686 return hasher(str);
11687 };
11688
11689 return ComponentStyle;
11690 }();
11691
11692 //
11693
11694 var LIMIT = 200;
11695
11696 var createWarnTooManyClasses = (function (displayName) {
11697 var generatedClasses = {};
11698 var warningSeen = false;
11699
11700 return function (className) {
11701 if (!warningSeen) {
11702 generatedClasses[className] = true;
11703 if (Object.keys(generatedClasses).length >= LIMIT) {
11704 // Unable to find latestRule in test environment.
11705 /* eslint-disable no-console, prefer-template */
11706 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 />');
11707 warningSeen = true;
11708 generatedClasses = {};
11709 }
11710 }
11711 };
11712 });
11713
11714 //
11715
11716 var determineTheme = (function (props, fallbackTheme) {
11717 var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT;
11718
11719 // Props should take precedence over ThemeProvider, which should take precedence over
11720 // defaultProps, but React automatically puts defaultProps on props.
11721
11722 /* eslint-disable react/prop-types, flowtype-errors/show-errors */
11723 var isDefaultTheme = defaultProps ? props.theme === defaultProps.theme : false;
11724 var theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme || defaultProps.theme;
11725 /* eslint-enable */
11726
11727 return theme;
11728 });
11729
11730 //
11731 var escapeRegex = /[[\].#*$><+~=|^:(),"'`-]+/g;
11732 var dashesAtEnds = /(^-|-$)/g;
11733
11734 /**
11735 * TODO: Explore using CSS.escape when it becomes more available
11736 * in evergreen browsers.
11737 */
11738 function escape(str) {
11739 return str
11740 // Replace all possible CSS selectors
11741 .replace(escapeRegex, '-')
11742
11743 // Remove extraneous hyphens at the start and end
11744 .replace(dashesAtEnds, '');
11745 }
11746
11747 //
11748
11749 function isTag(target) {
11750 return typeof target === 'string' && ( true ? target.charAt(0) === target.charAt(0).toLowerCase() : 0);
11751 }
11752
11753 //
11754
11755 function generateDisplayName(target) {
11756 // $FlowFixMe
11757 return isTag(target) ? 'styled.' + target : 'Styled(' + getComponentName(target) + ')';
11758 }
11759
11760 var _TYPE_STATICS;
11761
11762 var REACT_STATICS = {
11763 childContextTypes: true,
11764 contextTypes: true,
11765 defaultProps: true,
11766 displayName: true,
11767 getDerivedStateFromProps: true,
11768 propTypes: true,
11769 type: true
11770 };
11771
11772 var KNOWN_STATICS = {
11773 name: true,
11774 length: true,
11775 prototype: true,
11776 caller: true,
11777 callee: true,
11778 arguments: true,
11779 arity: true
11780 };
11781
11782 var TYPE_STATICS = (_TYPE_STATICS = {}, _TYPE_STATICS[react_is__WEBPACK_IMPORTED_MODULE_4__.ForwardRef] = {
11783 $$typeof: true,
11784 render: true
11785 }, _TYPE_STATICS);
11786
11787 var defineProperty$1 = Object.defineProperty,
11788 getOwnPropertyNames = Object.getOwnPropertyNames,
11789 _Object$getOwnPropert = Object.getOwnPropertySymbols,
11790 getOwnPropertySymbols = _Object$getOwnPropert === undefined ? function () {
11791 return [];
11792 } : _Object$getOwnPropert,
11793 getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor,
11794 getPrototypeOf = Object.getPrototypeOf,
11795 objectPrototype = Object.prototype;
11796 var arrayPrototype = Array.prototype;
11797
11798
11799 function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
11800 if (typeof sourceComponent !== 'string') {
11801 // don't hoist over string (html) components
11802
11803 var inheritedComponent = getPrototypeOf(sourceComponent);
11804
11805 if (inheritedComponent && inheritedComponent !== objectPrototype) {
11806 hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
11807 }
11808
11809 var keys = arrayPrototype.concat(getOwnPropertyNames(sourceComponent),
11810 // $FlowFixMe
11811 getOwnPropertySymbols(sourceComponent));
11812
11813 var targetStatics = TYPE_STATICS[targetComponent.$$typeof] || REACT_STATICS;
11814
11815 var sourceStatics = TYPE_STATICS[sourceComponent.$$typeof] || REACT_STATICS;
11816
11817 var i = keys.length;
11818 var descriptor = void 0;
11819 var key = void 0;
11820
11821 // eslint-disable-next-line no-plusplus
11822 while (i--) {
11823 key = keys[i];
11824
11825 if (
11826 // $FlowFixMe
11827 !KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) &&
11828 // $FlowFixMe
11829 !(targetStatics && targetStatics[key])) {
11830 descriptor = getOwnPropertyDescriptor(sourceComponent, key);
11831
11832 if (descriptor) {
11833 try {
11834 // Avoid failures from read-only properties
11835 defineProperty$1(targetComponent, key, descriptor);
11836 } catch (e) {
11837 /* fail silently */
11838 }
11839 }
11840 }
11841 }
11842
11843 return targetComponent;
11844 }
11845
11846 return targetComponent;
11847 }
11848
11849 //
11850 function isDerivedReactComponent(fn) {
11851 return !!(fn && fn.prototype && fn.prototype.isReactComponent);
11852 }
11853
11854 //
11855 // Helper to call a given function, only once
11856 var once = (function (cb) {
11857 var called = false;
11858
11859 return function () {
11860 if (!called) {
11861 called = true;
11862 cb.apply(undefined, arguments);
11863 }
11864 };
11865 });
11866
11867 //
11868
11869 var ThemeContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.createContext)();
11870
11871 var ThemeConsumer = ThemeContext.Consumer;
11872
11873 /**
11874 * Provide a theme to an entire react component tree via context
11875 */
11876
11877 var ThemeProvider = function (_Component) {
11878 inherits(ThemeProvider, _Component);
11879
11880 function ThemeProvider(props) {
11881 classCallCheck(this, ThemeProvider);
11882
11883 var _this = possibleConstructorReturn(this, _Component.call(this, props));
11884
11885 _this.getContext = (0,memoize_one__WEBPACK_IMPORTED_MODULE_7__["default"])(_this.getContext.bind(_this));
11886 _this.renderInner = _this.renderInner.bind(_this);
11887 return _this;
11888 }
11889
11890 ThemeProvider.prototype.render = function render() {
11891 if (!this.props.children) return null;
11892
11893 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
11894 ThemeContext.Consumer,
11895 null,
11896 this.renderInner
11897 );
11898 };
11899
11900 ThemeProvider.prototype.renderInner = function renderInner(outerTheme) {
11901 var context = this.getContext(this.props.theme, outerTheme);
11902
11903 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
11904 ThemeContext.Provider,
11905 { value: context },
11906 this.props.children
11907 );
11908 };
11909
11910 /**
11911 * Get the theme from the props, supporting both (outerTheme) => {}
11912 * as well as object notation
11913 */
11914
11915
11916 ThemeProvider.prototype.getTheme = function getTheme(theme, outerTheme) {
11917 if (isFunction(theme)) {
11918 var mergedTheme = theme(outerTheme);
11919
11920 if ( true && (mergedTheme === null || Array.isArray(mergedTheme) || (typeof mergedTheme === 'undefined' ? 'undefined' : _typeof(mergedTheme)) !== 'object')) {
11921 throw new StyledComponentsError(7);
11922 }
11923
11924 return mergedTheme;
11925 }
11926
11927 if (theme === null || Array.isArray(theme) || (typeof theme === 'undefined' ? 'undefined' : _typeof(theme)) !== 'object') {
11928 throw new StyledComponentsError(8);
11929 }
11930
11931 return _extends({}, outerTheme, theme);
11932 };
11933
11934 ThemeProvider.prototype.getContext = function getContext(theme, outerTheme) {
11935 return this.getTheme(theme, outerTheme);
11936 };
11937
11938 return ThemeProvider;
11939 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
11940
11941 //
11942
11943 var CLOSING_TAG_R = /^\s*<\/[a-z]/i;
11944
11945 var ServerStyleSheet = function () {
11946 function ServerStyleSheet() {
11947 classCallCheck(this, ServerStyleSheet);
11948
11949 /* The master sheet might be reset, so keep a reference here */
11950 this.masterSheet = StyleSheet.master;
11951 this.instance = this.masterSheet.clone();
11952 this.sealed = false;
11953 }
11954
11955 /**
11956 * Mark the ServerStyleSheet as being fully emitted and manually GC it from the
11957 * StyleSheet singleton.
11958 */
11959
11960
11961 ServerStyleSheet.prototype.seal = function seal() {
11962 if (!this.sealed) {
11963 /* Remove sealed StyleSheets from the master sheet */
11964 var index = this.masterSheet.clones.indexOf(this.instance);
11965 this.masterSheet.clones.splice(index, 1);
11966 this.sealed = true;
11967 }
11968 };
11969
11970 ServerStyleSheet.prototype.collectStyles = function collectStyles(children) {
11971 if (this.sealed) {
11972 throw new StyledComponentsError(2);
11973 }
11974
11975 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
11976 StyleSheetManager,
11977 { sheet: this.instance },
11978 children
11979 );
11980 };
11981
11982 ServerStyleSheet.prototype.getStyleTags = function getStyleTags() {
11983 this.seal();
11984 return this.instance.toHTML();
11985 };
11986
11987 ServerStyleSheet.prototype.getStyleElement = function getStyleElement() {
11988 this.seal();
11989 return this.instance.toReactElements();
11990 };
11991
11992 ServerStyleSheet.prototype.interleaveWithNodeStream = function interleaveWithNodeStream(readableStream) {
11993 var _this = this;
11994
11995 {
11996 throw new StyledComponentsError(3);
11997 }
11998
11999 /* the tag index keeps track of which tags have already been emitted */
12000 var instance = this.instance;
12001
12002 var instanceTagIndex = 0;
12003
12004 var streamAttr = SC_STREAM_ATTR + '="true"';
12005
12006 var transformer = new stream.Transform({
12007 transform: function appendStyleChunks(chunk, /* encoding */_, callback) {
12008 var tags = instance.tags;
12009
12010 var html = '';
12011
12012 /* retrieve html for each new style tag */
12013 for (; instanceTagIndex < tags.length; instanceTagIndex += 1) {
12014 var tag = tags[instanceTagIndex];
12015 html += tag.toHTML(streamAttr);
12016 }
12017
12018 /* force our StyleSheets to emit entirely new tags */
12019 instance.sealAllTags();
12020
12021 var renderedHtml = chunk.toString();
12022
12023 /* prepend style html to chunk, unless the start of the chunk is a closing tag in which case append right after that */
12024 if (CLOSING_TAG_R.test(renderedHtml)) {
12025 var endOfClosingTag = renderedHtml.indexOf('>');
12026
12027 this.push(renderedHtml.slice(0, endOfClosingTag + 1) + html + renderedHtml.slice(endOfClosingTag + 1));
12028 } else this.push(html + renderedHtml);
12029
12030 callback();
12031 }
12032 });
12033
12034 readableStream.on('end', function () {
12035 return _this.seal();
12036 });
12037
12038 readableStream.on('error', function (err) {
12039 _this.seal();
12040
12041 // forward the error to the transform stream
12042 transformer.emit('error', err);
12043 });
12044
12045 return readableStream.pipe(transformer);
12046 };
12047
12048 return ServerStyleSheet;
12049 }();
12050
12051 //
12052
12053 var StyleSheetContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.createContext)();
12054 var StyleSheetConsumer = StyleSheetContext.Consumer;
12055
12056 var StyleSheetManager = function (_Component) {
12057 inherits(StyleSheetManager, _Component);
12058
12059 function StyleSheetManager(props) {
12060 classCallCheck(this, StyleSheetManager);
12061
12062 var _this = possibleConstructorReturn(this, _Component.call(this, props));
12063
12064 _this.getContext = (0,memoize_one__WEBPACK_IMPORTED_MODULE_7__["default"])(_this.getContext);
12065 return _this;
12066 }
12067
12068 StyleSheetManager.prototype.getContext = function getContext(sheet, target) {
12069 if (sheet) {
12070 return sheet;
12071 } else if (target) {
12072 return new StyleSheet(target);
12073 } else {
12074 throw new StyledComponentsError(4);
12075 }
12076 };
12077
12078 StyleSheetManager.prototype.render = function render() {
12079 var _props = this.props,
12080 children = _props.children,
12081 sheet = _props.sheet,
12082 target = _props.target;
12083
12084
12085 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12086 StyleSheetContext.Provider,
12087 { value: this.getContext(sheet, target) },
12088 true ? react__WEBPACK_IMPORTED_MODULE_2___default().Children.only(children) : 0
12089 );
12090 };
12091
12092 return StyleSheetManager;
12093 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
12094 true ? StyleSheetManager.propTypes = {
12095 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)]),
12096
12097 target: prop_types__WEBPACK_IMPORTED_MODULE_8___default().shape({
12098 appendChild: (prop_types__WEBPACK_IMPORTED_MODULE_8___default().func.isRequired)
12099 })
12100 } : 0;
12101
12102 //
12103
12104 var identifiers = {};
12105
12106 /* We depend on components having unique IDs */
12107 function generateId(_ComponentStyle, _displayName, parentComponentId) {
12108 var displayName = typeof _displayName !== 'string' ? 'sc' : escape(_displayName);
12109
12110 /**
12111 * This ensures uniqueness if two components happen to share
12112 * the same displayName.
12113 */
12114 var nr = (identifiers[displayName] || 0) + 1;
12115 identifiers[displayName] = nr;
12116
12117 var componentId = displayName + '-' + _ComponentStyle.generateName(displayName + nr);
12118
12119 return parentComponentId ? parentComponentId + '-' + componentId : componentId;
12120 }
12121
12122 // $FlowFixMe
12123
12124 var StyledComponent = function (_Component) {
12125 inherits(StyledComponent, _Component);
12126
12127 function StyledComponent() {
12128 classCallCheck(this, StyledComponent);
12129
12130 var _this = possibleConstructorReturn(this, _Component.call(this));
12131
12132 _this.attrs = {};
12133
12134 _this.renderOuter = _this.renderOuter.bind(_this);
12135 _this.renderInner = _this.renderInner.bind(_this);
12136
12137 if (true) {
12138 _this.warnInnerRef = once(function (displayName) {
12139 return (
12140 // eslint-disable-next-line no-console
12141 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 + '".')
12142 );
12143 });
12144
12145 _this.warnAttrsFnObjectKeyDeprecated = once(function (key, displayName) {
12146 return (
12147 // eslint-disable-next-line no-console
12148 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)
12149 );
12150 });
12151
12152 _this.warnNonStyledComponentAttrsObjectKey = once(function (key, displayName) {
12153 return (
12154 // eslint-disable-next-line no-console
12155 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 }'))
12156 );
12157 });
12158 }
12159 return _this;
12160 }
12161
12162 StyledComponent.prototype.render = function render() {
12163 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12164 StyleSheetConsumer,
12165 null,
12166 this.renderOuter
12167 );
12168 };
12169
12170 StyledComponent.prototype.renderOuter = function renderOuter() {
12171 var styleSheet = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : StyleSheet.master;
12172
12173 this.styleSheet = styleSheet;
12174
12175 // No need to subscribe a static component to theme changes, it won't change anything
12176 if (this.props.forwardedComponent.componentStyle.isStatic) return this.renderInner();
12177
12178 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12179 ThemeConsumer,
12180 null,
12181 this.renderInner
12182 );
12183 };
12184
12185 StyledComponent.prototype.renderInner = function renderInner(theme) {
12186 var _props$forwardedCompo = this.props.forwardedComponent,
12187 componentStyle = _props$forwardedCompo.componentStyle,
12188 defaultProps = _props$forwardedCompo.defaultProps,
12189 displayName = _props$forwardedCompo.displayName,
12190 foldedComponentIds = _props$forwardedCompo.foldedComponentIds,
12191 styledComponentId = _props$forwardedCompo.styledComponentId,
12192 target = _props$forwardedCompo.target;
12193
12194
12195 var generatedClassName = void 0;
12196 if (componentStyle.isStatic) {
12197 generatedClassName = this.generateAndInjectStyles(EMPTY_OBJECT, this.props);
12198 } else {
12199 generatedClassName = this.generateAndInjectStyles(determineTheme(this.props, theme, defaultProps) || EMPTY_OBJECT, this.props);
12200 }
12201
12202 var elementToBeCreated = this.props.as || this.attrs.as || target;
12203 var isTargetTag = isTag(elementToBeCreated);
12204
12205 var propsForElement = {};
12206 var computedProps = _extends({}, this.props, this.attrs);
12207
12208 var key = void 0;
12209 // eslint-disable-next-line guard-for-in
12210 for (key in computedProps) {
12211 if ( true && key === 'innerRef' && isTargetTag) {
12212 this.warnInnerRef(displayName);
12213 }
12214
12215 if (key === 'forwardedComponent' || key === 'as') {
12216 continue;
12217 } 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)) {
12218 // Don't pass through non HTML tags through to HTML elements
12219 propsForElement[key] = computedProps[key];
12220 }
12221 }
12222
12223 if (this.props.style && this.attrs.style) {
12224 propsForElement.style = _extends({}, this.attrs.style, this.props.style);
12225 }
12226
12227 propsForElement.className = Array.prototype.concat(foldedComponentIds, styledComponentId, generatedClassName !== styledComponentId ? generatedClassName : null, this.props.className, this.attrs.className).filter(Boolean).join(' ');
12228
12229 return (0,react__WEBPACK_IMPORTED_MODULE_2__.createElement)(elementToBeCreated, propsForElement);
12230 };
12231
12232 StyledComponent.prototype.buildExecutionContext = function buildExecutionContext(theme, props, attrs) {
12233 var _this2 = this;
12234
12235 var context = _extends({}, props, { theme: theme });
12236
12237 if (!attrs.length) return context;
12238
12239 this.attrs = {};
12240
12241 attrs.forEach(function (attrDef) {
12242 var resolvedAttrDef = attrDef;
12243 var attrDefWasFn = false;
12244 var attr = void 0;
12245 var key = void 0;
12246
12247 if (isFunction(resolvedAttrDef)) {
12248 // $FlowFixMe
12249 resolvedAttrDef = resolvedAttrDef(context);
12250 attrDefWasFn = true;
12251 }
12252
12253 /* eslint-disable guard-for-in */
12254 // $FlowFixMe
12255 for (key in resolvedAttrDef) {
12256 attr = resolvedAttrDef[key];
12257
12258 if (!attrDefWasFn) {
12259 if (isFunction(attr) && !isDerivedReactComponent(attr) && !isStyledComponent(attr)) {
12260 if (true) {
12261 _this2.warnAttrsFnObjectKeyDeprecated(key, props.forwardedComponent.displayName);
12262 }
12263
12264 attr = attr(context);
12265
12266 if ( true && react__WEBPACK_IMPORTED_MODULE_2___default().isValidElement(attr)) {
12267 _this2.warnNonStyledComponentAttrsObjectKey(key, props.forwardedComponent.displayName);
12268 }
12269 }
12270 }
12271
12272 _this2.attrs[key] = attr;
12273 context[key] = attr;
12274 }
12275 /* eslint-enable */
12276 });
12277
12278 return context;
12279 };
12280
12281 StyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) {
12282 var _props$forwardedCompo2 = props.forwardedComponent,
12283 attrs = _props$forwardedCompo2.attrs,
12284 componentStyle = _props$forwardedCompo2.componentStyle,
12285 warnTooManyClasses = _props$forwardedCompo2.warnTooManyClasses;
12286
12287 // statically styled-components don't need to build an execution context object,
12288 // and shouldn't be increasing the number of class names
12289
12290 if (componentStyle.isStatic && !attrs.length) {
12291 return componentStyle.generateAndInjectStyles(EMPTY_OBJECT, this.styleSheet);
12292 }
12293
12294 var className = componentStyle.generateAndInjectStyles(this.buildExecutionContext(theme, props, attrs), this.styleSheet);
12295
12296 if ( true && warnTooManyClasses) warnTooManyClasses(className);
12297
12298 return className;
12299 };
12300
12301 return StyledComponent;
12302 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
12303
12304 function createStyledComponent(target, options, rules) {
12305 var isTargetStyledComp = isStyledComponent(target);
12306 var isClass = !isTag(target);
12307
12308 var _options$displayName = options.displayName,
12309 displayName = _options$displayName === undefined ? generateDisplayName(target) : _options$displayName,
12310 _options$componentId = options.componentId,
12311 componentId = _options$componentId === undefined ? generateId(ComponentStyle, options.displayName, options.parentComponentId) : _options$componentId,
12312 _options$ParentCompon = options.ParentComponent,
12313 ParentComponent = _options$ParentCompon === undefined ? StyledComponent : _options$ParentCompon,
12314 _options$attrs = options.attrs,
12315 attrs = _options$attrs === undefined ? EMPTY_ARRAY : _options$attrs;
12316
12317
12318 var styledComponentId = options.displayName && options.componentId ? escape(options.displayName) + '-' + options.componentId : options.componentId || componentId;
12319
12320 // fold the underlying StyledComponent attrs up (implicit extend)
12321 var finalAttrs =
12322 // $FlowFixMe
12323 isTargetStyledComp && target.attrs ? Array.prototype.concat(target.attrs, attrs).filter(Boolean) : attrs;
12324
12325 var componentStyle = new ComponentStyle(isTargetStyledComp ? // fold the underlying StyledComponent rules up (implicit extend)
12326 // $FlowFixMe
12327 target.componentStyle.rules.concat(rules) : rules, finalAttrs, styledComponentId);
12328
12329 /**
12330 * forwardRef creates a new interim component, which we'll take advantage of
12331 * instead of extending ParentComponent to create _another_ interim class
12332 */
12333 var WrappedStyledComponent = void 0;
12334 var forwardRef = function forwardRef(props, ref) {
12335 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ParentComponent, _extends({}, props, { forwardedComponent: WrappedStyledComponent, forwardedRef: ref }));
12336 };
12337 forwardRef.displayName = displayName;
12338 WrappedStyledComponent = react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(forwardRef);
12339 WrappedStyledComponent.displayName = displayName;
12340
12341 // $FlowFixMe
12342 WrappedStyledComponent.attrs = finalAttrs;
12343 // $FlowFixMe
12344 WrappedStyledComponent.componentStyle = componentStyle;
12345
12346 // $FlowFixMe
12347 WrappedStyledComponent.foldedComponentIds = isTargetStyledComp ? // $FlowFixMe
12348 Array.prototype.concat(target.foldedComponentIds, target.styledComponentId) : EMPTY_ARRAY;
12349
12350 // $FlowFixMe
12351 WrappedStyledComponent.styledComponentId = styledComponentId;
12352
12353 // fold the underlying StyledComponent target up since we folded the styles
12354 // $FlowFixMe
12355 WrappedStyledComponent.target = isTargetStyledComp ? target.target : target;
12356
12357 // $FlowFixMe
12358 WrappedStyledComponent.withComponent = function withComponent(tag) {
12359 var previousComponentId = options.componentId,
12360 optionsToCopy = objectWithoutProperties(options, ['componentId']);
12361
12362
12363 var newComponentId = previousComponentId && previousComponentId + '-' + (isTag(tag) ? tag : escape(getComponentName(tag)));
12364
12365 var newOptions = _extends({}, optionsToCopy, {
12366 attrs: finalAttrs,
12367 componentId: newComponentId,
12368 ParentComponent: ParentComponent
12369 });
12370
12371 return createStyledComponent(tag, newOptions, rules);
12372 };
12373
12374 // $FlowFixMe
12375 Object.defineProperty(WrappedStyledComponent, 'defaultProps', {
12376 get: function get$$1() {
12377 return this._foldedDefaultProps;
12378 },
12379 set: function set$$1(obj) {
12380 // $FlowFixMe
12381 this._foldedDefaultProps = isTargetStyledComp ? (0,merge_anything__WEBPACK_IMPORTED_MODULE_6__["default"])(target.defaultProps, obj) : obj;
12382 }
12383 });
12384
12385 if (true) {
12386 // $FlowFixMe
12387 WrappedStyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName);
12388 }
12389
12390 // $FlowFixMe
12391 WrappedStyledComponent.toString = function () {
12392 return '.' + WrappedStyledComponent.styledComponentId;
12393 };
12394
12395 if (isClass) {
12396 hoistNonReactStatics(WrappedStyledComponent, target, {
12397 // all SC-specific things should not be hoisted
12398 attrs: true,
12399 componentStyle: true,
12400 displayName: true,
12401 foldedComponentIds: true,
12402 styledComponentId: true,
12403 target: true,
12404 withComponent: true
12405 });
12406 }
12407
12408 return WrappedStyledComponent;
12409 }
12410
12411 //
12412 // Thanks to ReactDOMFactories for this handy list!
12413
12414 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',
12415
12416 // SVG
12417 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'marker', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
12418
12419 //
12420
12421 var styled = function styled(tag) {
12422 return constructWithOptions(createStyledComponent, tag);
12423 };
12424
12425 // Shorthands for all valid HTML Elements
12426 domElements.forEach(function (domElement) {
12427 styled[domElement] = styled(domElement);
12428 });
12429
12430 //
12431
12432 var GlobalStyle = function () {
12433 function GlobalStyle(rules, componentId) {
12434 classCallCheck(this, GlobalStyle);
12435
12436 this.rules = rules;
12437 this.componentId = componentId;
12438 this.isStatic = isStaticRules(rules, EMPTY_ARRAY);
12439
12440 if (!StyleSheet.master.hasId(componentId)) {
12441 StyleSheet.master.deferredInject(componentId, []);
12442 }
12443 }
12444
12445 GlobalStyle.prototype.createStyles = function createStyles(executionContext, styleSheet) {
12446 var flatCSS = flatten(this.rules, executionContext, styleSheet);
12447 var css = stringifyRules(flatCSS, '');
12448
12449 styleSheet.inject(this.componentId, css);
12450 };
12451
12452 GlobalStyle.prototype.removeStyles = function removeStyles(styleSheet) {
12453 var componentId = this.componentId;
12454
12455 if (styleSheet.hasId(componentId)) {
12456 styleSheet.remove(componentId);
12457 }
12458 };
12459
12460 // TODO: overwrite in-place instead of remove+create?
12461
12462
12463 GlobalStyle.prototype.renderStyles = function renderStyles(executionContext, styleSheet) {
12464 this.removeStyles(styleSheet);
12465 this.createStyles(executionContext, styleSheet);
12466 };
12467
12468 return GlobalStyle;
12469 }();
12470
12471 //
12472
12473 // place our cache into shared context so it'll persist between HMRs
12474 if (IS_BROWSER) {
12475 window.scCGSHMRCache = {};
12476 }
12477
12478 function createGlobalStyle(strings) {
12479 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12480 interpolations[_key - 1] = arguments[_key];
12481 }
12482
12483 var rules = css.apply(undefined, [strings].concat(interpolations));
12484 var id = 'sc-global-' + murmurhash(JSON.stringify(rules));
12485 var style = new GlobalStyle(rules, id);
12486
12487 var GlobalStyleComponent = function (_React$Component) {
12488 inherits(GlobalStyleComponent, _React$Component);
12489
12490 function GlobalStyleComponent(props) {
12491 classCallCheck(this, GlobalStyleComponent);
12492
12493 var _this = possibleConstructorReturn(this, _React$Component.call(this, props));
12494
12495 var _this$constructor = _this.constructor,
12496 globalStyle = _this$constructor.globalStyle,
12497 styledComponentId = _this$constructor.styledComponentId;
12498
12499
12500 if (IS_BROWSER) {
12501 window.scCGSHMRCache[styledComponentId] = (window.scCGSHMRCache[styledComponentId] || 0) + 1;
12502 }
12503
12504 /**
12505 * This fixes HMR compatibility. Don't ask me why, but this combination of
12506 * caching the closure variables via statics and then persisting the statics in
12507 * state works across HMR where no other combination did. ¯\_(ツ)_/¯
12508 */
12509 _this.state = {
12510 globalStyle: globalStyle,
12511 styledComponentId: styledComponentId
12512 };
12513 return _this;
12514 }
12515
12516 GlobalStyleComponent.prototype.componentWillUnmount = function componentWillUnmount() {
12517 if (window.scCGSHMRCache[this.state.styledComponentId]) {
12518 window.scCGSHMRCache[this.state.styledComponentId] -= 1;
12519 }
12520 /**
12521 * Depending on the order "render" is called this can cause the styles to be lost
12522 * until the next render pass of the remaining instance, which may
12523 * not be immediate.
12524 */
12525 if (window.scCGSHMRCache[this.state.styledComponentId] === 0) {
12526 this.state.globalStyle.removeStyles(this.styleSheet);
12527 }
12528 };
12529
12530 GlobalStyleComponent.prototype.render = function render() {
12531 var _this2 = this;
12532
12533 if ( true && react__WEBPACK_IMPORTED_MODULE_2___default().Children.count(this.props.children)) {
12534 // eslint-disable-next-line no-console
12535 console.warn('The global style component ' + this.state.styledComponentId + ' was given child JSX. createGlobalStyle does not render children.');
12536 }
12537
12538 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12539 StyleSheetConsumer,
12540 null,
12541 function (styleSheet) {
12542 _this2.styleSheet = styleSheet || StyleSheet.master;
12543
12544 var globalStyle = _this2.state.globalStyle;
12545
12546
12547 if (globalStyle.isStatic) {
12548 globalStyle.renderStyles(STATIC_EXECUTION_CONTEXT, _this2.styleSheet);
12549
12550 return null;
12551 } else {
12552 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12553 ThemeConsumer,
12554 null,
12555 function (theme) {
12556 // $FlowFixMe
12557 var defaultProps = _this2.constructor.defaultProps;
12558
12559
12560 var context = _extends({}, _this2.props);
12561
12562 if (typeof theme !== 'undefined') {
12563 context.theme = determineTheme(_this2.props, theme, defaultProps);
12564 }
12565
12566 globalStyle.renderStyles(context, _this2.styleSheet);
12567
12568 return null;
12569 }
12570 );
12571 }
12572 }
12573 );
12574 };
12575
12576 return GlobalStyleComponent;
12577 }((react__WEBPACK_IMPORTED_MODULE_2___default().Component));
12578
12579 GlobalStyleComponent.globalStyle = style;
12580 GlobalStyleComponent.styledComponentId = id;
12581
12582
12583 return GlobalStyleComponent;
12584 }
12585
12586 //
12587
12588 var replaceWhitespace = function replaceWhitespace(str) {
12589 return str.replace(/\s|\\n/g, '');
12590 };
12591
12592 function keyframes(strings) {
12593 /* Warning if you've used keyframes on React Native */
12594 if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
12595 // eslint-disable-next-line no-console
12596 console.warn('`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.');
12597 }
12598
12599 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12600 interpolations[_key - 1] = arguments[_key];
12601 }
12602
12603 var rules = css.apply(undefined, [strings].concat(interpolations));
12604
12605 var name = generateAlphabeticName(murmurhash(replaceWhitespace(JSON.stringify(rules))));
12606
12607 return new Keyframes(name, stringifyRules(rules, name, '@keyframes'));
12608 }
12609
12610 //
12611
12612 var withTheme = (function (Component$$1) {
12613 var WithTheme = react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(function (props, ref) {
12614 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12615 ThemeConsumer,
12616 null,
12617 function (theme) {
12618 // $FlowFixMe
12619 var defaultProps = Component$$1.defaultProps;
12620
12621 var themeProp = determineTheme(props, theme, defaultProps);
12622
12623 if ( true && themeProp === undefined) {
12624 // eslint-disable-next-line no-console
12625 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) + '"');
12626 }
12627
12628 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(Component$$1, _extends({}, props, { theme: themeProp, ref: ref }));
12629 }
12630 );
12631 });
12632
12633 hoistNonReactStatics(WithTheme, Component$$1);
12634
12635 WithTheme.displayName = 'WithTheme(' + getComponentName(Component$$1) + ')';
12636
12637 return WithTheme;
12638 });
12639
12640 //
12641
12642 /* eslint-disable */
12643 var __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS = {
12644 StyleSheet: StyleSheet
12645 };
12646
12647 //
12648
12649 /* Warning if you've imported this file on React Native */
12650 if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
12651 // eslint-disable-next-line no-console
12652 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');
12653 }
12654
12655 /* Warning if there are several instances of styled-components */
12656 if ( true && typeof window !== 'undefined' && typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Node.js') === -1 && navigator.userAgent.indexOf('jsdom') === -1) {
12657 window['__styled-components-init__'] = window['__styled-components-init__'] || 0;
12658
12659 if (window['__styled-components-init__'] === 1) {
12660 // eslint-disable-next-line no-console
12661 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.');
12662 }
12663
12664 window['__styled-components-init__'] += 1;
12665 }
12666
12667 //
12668
12669 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (styled);
12670
12671 //# sourceMappingURL=styled-components.browser.esm.js.map
12672
12673
12674 /***/ }),
12675
12676 /***/ "./node_modules/stylis-rule-sheet/index.js":
12677 /*!*************************************************!*\
12678 !*** ./node_modules/stylis-rule-sheet/index.js ***!
12679 \*************************************************/
12680 /***/ ((module) => {
12681
12682 (function (factory) {
12683 true ? (module['exports'] = factory()) :
12684 0
12685 }(function () {
12686
12687 'use strict'
12688
12689 return function (insertRule) {
12690 var delimiter = '/*|*/'
12691 var needle = delimiter+'}'
12692
12693 function toSheet (block) {
12694 if (block)
12695 try {
12696 insertRule(block + '}')
12697 } catch (e) {}
12698 }
12699
12700 return function ruleSheet (context, content, selectors, parents, line, column, length, ns, depth, at) {
12701 switch (context) {
12702 // property
12703 case 1:
12704 // @import
12705 if (depth === 0 && content.charCodeAt(0) === 64)
12706 return insertRule(content+';'), ''
12707 break
12708 // selector
12709 case 2:
12710 if (ns === 0)
12711 return content + delimiter
12712 break
12713 // at-rule
12714 case 3:
12715 switch (ns) {
12716 // @font-face, @page
12717 case 102:
12718 case 112:
12719 return insertRule(selectors[0]+content), ''
12720 default:
12721 return content + (at === 0 ? delimiter : '')
12722 }
12723 case -2:
12724 content.split(needle).forEach(toSheet)
12725 }
12726 }
12727 }
12728 }))
12729
12730
12731 /***/ }),
12732
12733 /***/ "./node_modules/stylis/stylis.min.js":
12734 /*!*******************************************!*\
12735 !*** ./node_modules/stylis/stylis.min.js ***!
12736 \*******************************************/
12737 /***/ ((module) => {
12738
12739 !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});
12740 //# sourceMappingURL=stylis.min.js.map
12741
12742 /***/ }),
12743
12744 /***/ "react":
12745 /*!************************!*\
12746 !*** external "React" ***!
12747 \************************/
12748 /***/ ((module) => {
12749
12750 "use strict";
12751 module.exports = window["React"];
12752
12753 /***/ }),
12754
12755 /***/ "jquery":
12756 /*!*************************!*\
12757 !*** external "jQuery" ***!
12758 \*************************/
12759 /***/ ((module) => {
12760
12761 "use strict";
12762 module.exports = window["jQuery"];
12763
12764 /***/ }),
12765
12766 /***/ "@wordpress/blocks":
12767 /*!********************************!*\
12768 !*** external ["wp","blocks"] ***!
12769 \********************************/
12770 /***/ ((module) => {
12771
12772 "use strict";
12773 module.exports = window["wp"]["blocks"];
12774
12775 /***/ }),
12776
12777 /***/ "@wordpress/components":
12778 /*!************************************!*\
12779 !*** external ["wp","components"] ***!
12780 \************************************/
12781 /***/ ((module) => {
12782
12783 "use strict";
12784 module.exports = window["wp"]["components"];
12785
12786 /***/ }),
12787
12788 /***/ "@wordpress/data":
12789 /*!******************************!*\
12790 !*** external ["wp","data"] ***!
12791 \******************************/
12792 /***/ ((module) => {
12793
12794 "use strict";
12795 module.exports = window["wp"]["data"];
12796
12797 /***/ }),
12798
12799 /***/ "@wordpress/edit-post":
12800 /*!**********************************!*\
12801 !*** external ["wp","editPost"] ***!
12802 \**********************************/
12803 /***/ ((module) => {
12804
12805 "use strict";
12806 module.exports = window["wp"]["editPost"];
12807
12808 /***/ }),
12809
12810 /***/ "@wordpress/element":
12811 /*!*********************************!*\
12812 !*** external ["wp","element"] ***!
12813 \*********************************/
12814 /***/ ((module) => {
12815
12816 "use strict";
12817 module.exports = window["wp"]["element"];
12818
12819 /***/ }),
12820
12821 /***/ "@wordpress/i18n":
12822 /*!******************************!*\
12823 !*** external ["wp","i18n"] ***!
12824 \******************************/
12825 /***/ ((module) => {
12826
12827 "use strict";
12828 module.exports = window["wp"]["i18n"];
12829
12830 /***/ }),
12831
12832 /***/ "@wordpress/plugins":
12833 /*!*********************************!*\
12834 !*** external ["wp","plugins"] ***!
12835 \*********************************/
12836 /***/ ((module) => {
12837
12838 "use strict";
12839 module.exports = window["wp"]["plugins"];
12840
12841 /***/ }),
12842
12843 /***/ "./node_modules/@linaria/react/dist/index.mjs":
12844 /*!****************************************************!*\
12845 !*** ./node_modules/@linaria/react/dist/index.mjs ***!
12846 \****************************************************/
12847 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12848
12849 "use strict";
12850 __webpack_require__.r(__webpack_exports__);
12851 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12852 /* harmony export */ "styled": () => (/* binding */ styled_default)
12853 /* harmony export */ });
12854 /* 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");
12855 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
12856 /* harmony import */ var _linaria_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @linaria/core */ "./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs");
12857 // src/styled.ts
12858
12859
12860
12861 var isCapital = (ch) => ch.toUpperCase() === ch;
12862 var filterKey = (keys) => (key) => keys.indexOf(key) === -1;
12863 var omit = (obj, keys) => {
12864 const res = {};
12865 Object.keys(obj).filter(filterKey(keys)).forEach((key) => {
12866 res[key] = obj[key];
12867 });
12868 return res;
12869 };
12870 function filterProps(asIs, props, omitKeys) {
12871 const filteredProps = omit(props, omitKeys);
12872 if (!asIs) {
12873 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"];
12874 Object.keys(filteredProps).forEach((key) => {
12875 if (!interopValidAttr.default(key)) {
12876 delete filteredProps[key];
12877 }
12878 });
12879 }
12880 return filteredProps;
12881 }
12882 var warnIfInvalid = (value, componentName) => {
12883 if (true) {
12884 if (typeof value === "string" || typeof value === "number" && isFinite(value)) {
12885 return;
12886 }
12887 const stringified = typeof value === "object" ? JSON.stringify(value) : String(value);
12888 console.warn(
12889 `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.`
12890 );
12891 }
12892 };
12893 function styled(tag) {
12894 return (options) => {
12895 if (true) {
12896 if (Array.isArray(options)) {
12897 throw new Error(
12898 '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'
12899 );
12900 }
12901 }
12902 const render = (props, ref) => {
12903 const { as: component = tag, class: className } = props;
12904 const shouldKeepProps = options.propsAsIs === void 0 ? !(typeof component === "string" && component.indexOf("-") === -1 && !isCapital(component[0])) : options.propsAsIs;
12905 const filteredProps = filterProps(shouldKeepProps, props, [
12906 "as",
12907 "class"
12908 ]);
12909 filteredProps.ref = ref;
12910 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);
12911 const { vars } = options;
12912 if (vars) {
12913 const style = {};
12914 for (const name in vars) {
12915 const variable = vars[name];
12916 const result = variable[0];
12917 const unit = variable[1] || "";
12918 const value = typeof result === "function" ? result(props) : result;
12919 warnIfInvalid(value, options.name);
12920 style[`--${name}`] = `${value}${unit}`;
12921 }
12922 const ownStyle = filteredProps.style || {};
12923 const keys = Object.keys(ownStyle);
12924 if (keys.length > 0) {
12925 keys.forEach((key) => {
12926 style[key] = ownStyle[key];
12927 });
12928 }
12929 filteredProps.style = style;
12930 }
12931 if (tag.__linaria && tag !== component) {
12932 filteredProps.as = component;
12933 return react__WEBPACK_IMPORTED_MODULE_1__.createElement(tag, filteredProps);
12934 }
12935 return react__WEBPACK_IMPORTED_MODULE_1__.createElement(component, filteredProps);
12936 };
12937 const Result = react__WEBPACK_IMPORTED_MODULE_1__.forwardRef ? react__WEBPACK_IMPORTED_MODULE_1__.forwardRef(render) : (props) => {
12938 const rest = omit(props, ["innerRef"]);
12939 return render(rest, props.innerRef);
12940 };
12941 Result.displayName = options.name;
12942 Result.__linaria = {
12943 className: options.class,
12944 extends: tag
12945 };
12946 return Result;
12947 };
12948 }
12949 var styled_default = true ? new Proxy(styled, {
12950 get(o, prop) {
12951 return o(prop);
12952 }
12953 }) : 0;
12954
12955 //# sourceMappingURL=index.mjs.map
12956
12957 /***/ }),
12958
12959 /***/ "./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs":
12960 /*!*******************************************************************************!*\
12961 !*** ./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs ***!
12962 \*******************************************************************************/
12963 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12964
12965 "use strict";
12966 __webpack_require__.r(__webpack_exports__);
12967 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12968 /* harmony export */ "css": () => (/* binding */ css_default),
12969 /* harmony export */ "cx": () => (/* binding */ cx_default)
12970 /* harmony export */ });
12971 // src/css.ts
12972 var css = () => {
12973 throw new Error(
12974 'Using the "css" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly.'
12975 );
12976 };
12977 var css_default = css;
12978
12979 // src/cx.ts
12980 var cx = function cx2() {
12981 const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
12982 const atomicClasses = {};
12983 const nonAtomicClasses = [];
12984 presentClassNames.forEach((arg) => {
12985 const individualClassNames = arg ? arg.split(" ") : [];
12986 individualClassNames.forEach((className) => {
12987 if (className.startsWith("atm_")) {
12988 const [, keyHash] = className.split("_");
12989 atomicClasses[keyHash] = className;
12990 } else {
12991 nonAtomicClasses.push(className);
12992 }
12993 });
12994 });
12995 const result = [];
12996 for (const keyHash in atomicClasses) {
12997 if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
12998 result.push(atomicClasses[keyHash]);
12999 }
13000 }
13001 result.push(...nonAtomicClasses);
13002 return result.join(" ");
13003 };
13004 var cx_default = cx;
13005
13006 //# sourceMappingURL=index.mjs.map
13007
13008 /***/ })
13009
13010 /******/ });
13011 /************************************************************************/
13012 /******/ // The module cache
13013 /******/ var __webpack_module_cache__ = {};
13014 /******/
13015 /******/ // The require function
13016 /******/ function __webpack_require__(moduleId) {
13017 /******/ // Check if module is in cache
13018 /******/ var cachedModule = __webpack_module_cache__[moduleId];
13019 /******/ if (cachedModule !== undefined) {
13020 /******/ return cachedModule.exports;
13021 /******/ }
13022 /******/ // Create a new module (and put it into the cache)
13023 /******/ var module = __webpack_module_cache__[moduleId] = {
13024 /******/ // no module.id needed
13025 /******/ // no module.loaded needed
13026 /******/ exports: {}
13027 /******/ };
13028 /******/
13029 /******/ // Execute the module function
13030 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
13031 /******/
13032 /******/ // Return the exports of the module
13033 /******/ return module.exports;
13034 /******/ }
13035 /******/
13036 /************************************************************************/
13037 /******/ /* webpack/runtime/compat get default export */
13038 /******/ (() => {
13039 /******/ // getDefaultExport function for compatibility with non-harmony modules
13040 /******/ __webpack_require__.n = (module) => {
13041 /******/ var getter = module && module.__esModule ?
13042 /******/ () => (module['default']) :
13043 /******/ () => (module);
13044 /******/ __webpack_require__.d(getter, { a: getter });
13045 /******/ return getter;
13046 /******/ };
13047 /******/ })();
13048 /******/
13049 /******/ /* webpack/runtime/define property getters */
13050 /******/ (() => {
13051 /******/ // define getter functions for harmony exports
13052 /******/ __webpack_require__.d = (exports, definition) => {
13053 /******/ for(var key in definition) {
13054 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
13055 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
13056 /******/ }
13057 /******/ }
13058 /******/ };
13059 /******/ })();
13060 /******/
13061 /******/ /* webpack/runtime/global */
13062 /******/ (() => {
13063 /******/ __webpack_require__.g = (function() {
13064 /******/ if (typeof globalThis === 'object') return globalThis;
13065 /******/ try {
13066 /******/ return this || new Function('return this')();
13067 /******/ } catch (e) {
13068 /******/ if (typeof window === 'object') return window;
13069 /******/ }
13070 /******/ })();
13071 /******/ })();
13072 /******/
13073 /******/ /* webpack/runtime/hasOwnProperty shorthand */
13074 /******/ (() => {
13075 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
13076 /******/ })();
13077 /******/
13078 /******/ /* webpack/runtime/make namespace object */
13079 /******/ (() => {
13080 /******/ // define __esModule on exports
13081 /******/ __webpack_require__.r = (exports) => {
13082 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
13083 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
13084 /******/ }
13085 /******/ Object.defineProperty(exports, '__esModule', { value: true });
13086 /******/ };
13087 /******/ })();
13088 /******/
13089 /******/ /* webpack/runtime/nonce */
13090 /******/ (() => {
13091 /******/ __webpack_require__.nc = undefined;
13092 /******/ })();
13093 /******/
13094 /************************************************************************/
13095 var __webpack_exports__ = {};
13096 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
13097 (() => {
13098 "use strict";
13099 /*!**************************************!*\
13100 !*** ./scripts/entries/gutenberg.ts ***!
13101 \**************************************/
13102 __webpack_require__.r(__webpack_exports__);
13103 /* harmony import */ var _gutenberg_FormBlock_registerFormBlock__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../gutenberg/FormBlock/registerFormBlock */ "./scripts/gutenberg/FormBlock/registerFormBlock.tsx");
13104 /* harmony import */ var _gutenberg_Sidebar_contentType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../gutenberg/Sidebar/contentType */ "./scripts/gutenberg/Sidebar/contentType.tsx");
13105 /* harmony import */ var _gutenberg_MeetingsBlock_registerMeetingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../gutenberg/MeetingsBlock/registerMeetingBlock */ "./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx");
13106 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
13107
13108
13109
13110
13111 (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]);
13112 })();
13113
13114 /******/ })()
13115 ;
13116 //# sourceMappingURL=gutenberg.js.map