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

13,111 lines 500.7 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 */ "deviceId": () => (/* binding */ deviceId),
238 /* harmony export */ "didDisconnect": () => (/* binding */ didDisconnect),
239 /* harmony export */ "env": () => (/* binding */ env),
240 /* harmony export */ "formsScript": () => (/* binding */ formsScript),
241 /* harmony export */ "formsScriptPayload": () => (/* binding */ formsScriptPayload),
242 /* harmony export */ "hublet": () => (/* binding */ hublet),
243 /* harmony export */ "hubspotBaseUrl": () => (/* binding */ hubspotBaseUrl),
244 /* harmony export */ "hubspotNonce": () => (/* binding */ hubspotNonce),
245 /* harmony export */ "iframeUrl": () => (/* binding */ iframeUrl),
246 /* harmony export */ "impactLink": () => (/* binding */ impactLink),
247 /* harmony export */ "leadinPluginVersion": () => (/* binding */ leadinPluginVersion),
248 /* harmony export */ "leadinQueryParams": () => (/* binding */ leadinQueryParams),
249 /* harmony export */ "locale": () => (/* binding */ locale),
250 /* harmony export */ "loginUrl": () => (/* binding */ loginUrl),
251 /* harmony export */ "meetingsScript": () => (/* binding */ meetingsScript),
252 /* harmony export */ "phpVersion": () => (/* binding */ phpVersion),
253 /* harmony export */ "pluginPath": () => (/* binding */ pluginPath),
254 /* harmony export */ "plugins": () => (/* binding */ plugins),
255 /* harmony export */ "portalDomain": () => (/* binding */ portalDomain),
256 /* harmony export */ "portalEmail": () => (/* binding */ portalEmail),
257 /* harmony export */ "portalId": () => (/* binding */ portalId),
258 /* harmony export */ "redirectNonce": () => (/* binding */ redirectNonce),
259 /* harmony export */ "refreshToken": () => (/* binding */ refreshToken),
260 /* harmony export */ "restNonce": () => (/* binding */ restNonce),
261 /* harmony export */ "restUrl": () => (/* binding */ restUrl),
262 /* harmony export */ "reviewSkippedDate": () => (/* binding */ reviewSkippedDate),
263 /* harmony export */ "theme": () => (/* binding */ theme),
264 /* harmony export */ "trackConsent": () => (/* binding */ trackConsent),
265 /* harmony export */ "wpVersion": () => (/* binding */ wpVersion)
266 /* harmony export */ });
267 var _window$leadinConfig = window.leadinConfig,
268 accountName = _window$leadinConfig.accountName,
269 adminUrl = _window$leadinConfig.adminUrl,
270 activationTime = _window$leadinConfig.activationTime,
271 connectionStatus = _window$leadinConfig.connectionStatus,
272 deviceId = _window$leadinConfig.deviceId,
273 didDisconnect = _window$leadinConfig.didDisconnect,
274 env = _window$leadinConfig.env,
275 formsScript = _window$leadinConfig.formsScript,
276 meetingsScript = _window$leadinConfig.meetingsScript,
277 formsScriptPayload = _window$leadinConfig.formsScriptPayload,
278 hublet = _window$leadinConfig.hublet,
279 hubspotBaseUrl = _window$leadinConfig.hubspotBaseUrl,
280 hubspotNonce = _window$leadinConfig.hubspotNonce,
281 iframeUrl = _window$leadinConfig.iframeUrl,
282 impactLink = _window$leadinConfig.impactLink,
283 leadinPluginVersion = _window$leadinConfig.leadinPluginVersion,
284 leadinQueryParams = _window$leadinConfig.leadinQueryParams,
285 locale = _window$leadinConfig.locale,
286 loginUrl = _window$leadinConfig.loginUrl,
287 phpVersion = _window$leadinConfig.phpVersion,
288 pluginPath = _window$leadinConfig.pluginPath,
289 plugins = _window$leadinConfig.plugins,
290 portalDomain = _window$leadinConfig.portalDomain,
291 portalEmail = _window$leadinConfig.portalEmail,
292 portalId = _window$leadinConfig.portalId,
293 redirectNonce = _window$leadinConfig.redirectNonce,
294 restNonce = _window$leadinConfig.restNonce,
295 restUrl = _window$leadinConfig.restUrl,
296 refreshToken = _window$leadinConfig.refreshToken,
297 reviewSkippedDate = _window$leadinConfig.reviewSkippedDate,
298 theme = _window$leadinConfig.theme,
299 trackConsent = _window$leadinConfig.trackConsent,
300 wpVersion = _window$leadinConfig.wpVersion;
301
302
303 /***/ }),
304
305 /***/ "./scripts/gutenberg/Common/CalendarIcon.tsx":
306 /*!***************************************************!*\
307 !*** ./scripts/gutenberg/Common/CalendarIcon.tsx ***!
308 \***************************************************/
309 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
310
311 "use strict";
312 __webpack_require__.r(__webpack_exports__);
313 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
314 /* harmony export */ "default": () => (/* binding */ CalendarIcon)
315 /* harmony export */ });
316 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
317
318 function CalendarIcon() {
319 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
320 width: "18",
321 height: "18",
322 viewBox: "0 0 18 18",
323 fill: "none",
324 xmlns: "http://www.w3.org/2000/svg",
325 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
326 clipPath: "url(#clip0_903_1965)",
327 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
328 fillRule: "evenodd",
329 clipRule: "evenodd",
330 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",
331 fill: "#FF7A59"
332 })
333 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("defs", {
334 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("clipPath", {
335 id: "clip0_903_1965",
336 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("rect", {
337 width: "18",
338 height: "18",
339 fill: "white"
340 })
341 })
342 })]
343 });
344 }
345
346 /***/ }),
347
348 /***/ "./scripts/gutenberg/Common/SidebarSprocketIcon.tsx":
349 /*!**********************************************************!*\
350 !*** ./scripts/gutenberg/Common/SidebarSprocketIcon.tsx ***!
351 \**********************************************************/
352 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
353
354 "use strict";
355 __webpack_require__.r(__webpack_exports__);
356 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
357 /* harmony export */ "default": () => (/* binding */ SidebarSprocketIcon)
358 /* harmony export */ });
359 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
360
361 function SidebarSprocketIcon() {
362 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", {
363 width: "20px",
364 height: "20px",
365 version: "1.1",
366 viewBox: "0 0 40 42",
367 xmlns: "http://www.w3.org/2000/svg",
368 xmlnsXlink: "http://www.w3.org/1999/xlink",
369 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
370 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",
371 id: "Fill-1",
372 fillRule: "evenodd"
373 })
374 });
375 }
376
377 /***/ }),
378
379 /***/ "./scripts/gutenberg/Common/SprocketIcon.tsx":
380 /*!***************************************************!*\
381 !*** ./scripts/gutenberg/Common/SprocketIcon.tsx ***!
382 \***************************************************/
383 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
384
385 "use strict";
386 __webpack_require__.r(__webpack_exports__);
387 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
388 /* harmony export */ "default": () => (/* binding */ SprocketIcon)
389 /* harmony export */ });
390 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
391
392 function SprocketIcon() {
393 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
394 width: "40px",
395 height: "42px",
396 viewBox: "0 0 40 42",
397 version: "1.1",
398 xmlns: "http://www.w3.org/2000/svg",
399 xmlnsXlink: "http://www.w3.org/1999/xlink",
400 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("defs", {
401 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("polygon", {
402 id: "path-1",
403 points: "0.000123751494 0 39.7808917 0 39.7808917 41.6871084 0.000123751494 41.6871084"
404 })
405 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
406 id: "Page-1",
407 stroke: "none",
408 strokeWidth: "1",
409 fill: "none",
410 fillRule: "evenodd",
411 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("g", {
412 id: "HubSpot-Sprocket---Full-Color",
413 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("mask", {
414 id: "mask-2",
415 fill: "white",
416 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("use", {
417 xlinkHref: "#path-1"
418 })
419 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
420 id: "path-1"
421 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
422 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",
423 id: "Fill-1",
424 fill: "#F3785B",
425 fillRule: "nonzero",
426 mask: "url(#mask-2)"
427 })]
428 })
429 })]
430 });
431 }
432
433 /***/ }),
434
435 /***/ "./scripts/gutenberg/FormBlock/FormBlockSave.tsx":
436 /*!*******************************************************!*\
437 !*** ./scripts/gutenberg/FormBlock/FormBlockSave.tsx ***!
438 \*******************************************************/
439 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
440
441 "use strict";
442 __webpack_require__.r(__webpack_exports__);
443 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
444 /* harmony export */ "default": () => (/* binding */ FormSaveBlock)
445 /* harmony export */ });
446 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
447 /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
448 /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
449 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
450 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
451 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; }
452
453 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; }
454
455 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; }
456
457
458
459
460 function FormSaveBlock(_ref) {
461 var attributes = _ref.attributes;
462 var portalId = attributes.portalId,
463 formId = attributes.formId;
464
465 if (portalId && formId) {
466 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.RawHTML, _objectSpread(_objectSpread({}, _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps.save()), {}, {
467 children: "[hubspot portal=\"".concat(portalId, "\" id=\"").concat(formId, "\" type=\"form\"]")
468 }));
469 }
470
471 return null;
472 }
473
474 /***/ }),
475
476 /***/ "./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx":
477 /*!**************************************************************!*\
478 !*** ./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx ***!
479 \**************************************************************/
480 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
481
482 "use strict";
483 __webpack_require__.r(__webpack_exports__);
484 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
485 /* harmony export */ "default": () => (/* binding */ FormGutenbergPreview)
486 /* harmony export */ });
487 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
488 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
489 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
490 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
491 /* harmony import */ var _UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UIImage */ "./scripts/gutenberg/UIComponents/UIImage.ts");
492
493
494
495
496 function FormGutenbergPreview() {
497 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
498 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__["default"], {
499 alt: "Create a new Hubspot Form",
500 src: "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath, "/public/assets/images/hubspot-form.png")
501 })
502 });
503 }
504
505 /***/ }),
506
507 /***/ "./scripts/gutenberg/FormBlock/registerFormBlock.tsx":
508 /*!***********************************************************!*\
509 !*** ./scripts/gutenberg/FormBlock/registerFormBlock.tsx ***!
510 \***********************************************************/
511 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
512
513 "use strict";
514 __webpack_require__.r(__webpack_exports__);
515 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
516 /* harmony export */ "default": () => (/* binding */ registerFormBlock)
517 /* harmony export */ });
518 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
519 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
520 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
521 /* harmony import */ var _Common_SprocketIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/SprocketIcon */ "./scripts/gutenberg/Common/SprocketIcon.tsx");
522 /* harmony import */ var _FormBlockSave__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FormBlockSave */ "./scripts/gutenberg/FormBlock/FormBlockSave.tsx");
523 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
524 /* harmony import */ var _FormGutenbergPreview__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FormGutenbergPreview */ "./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx");
525 /* harmony import */ var _shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../shared/Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
526 /* harmony import */ var _shared_Form_FormEdit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../shared/Form/FormEdit */ "./scripts/shared/Form/FormEdit.tsx");
527 /* harmony import */ var _shared_enums_connectionStatus__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../shared/enums/connectionStatus */ "./scripts/shared/enums/connectionStatus.ts");
528 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
529 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);
530 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; }
531
532 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; }
533
534 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; }
535
536
537
538
539
540
541
542
543
544
545
546 function registerFormBlock() {
547 var editComponent = function editComponent(props) {
548 if (props.attributes.preview) {
549 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormGutenbergPreview__WEBPACK_IMPORTED_MODULE_5__["default"], {});
550 } else if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__.connectionStatus === _shared_enums_connectionStatus__WEBPACK_IMPORTED_MODULE_8__["default"].Connected) {
551 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Form_FormEdit__WEBPACK_IMPORTED_MODULE_7__["default"], _objectSpread(_objectSpread({}, props), {}, {
552 origin: "gutenberg",
553 preview: true
554 }));
555 } else {
556 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_6__["default"], {
557 status: 401
558 });
559 }
560 };
561
562 (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)('leadin/hubspot-form-block', {
563 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('HubSpot Form', 'leadin'),
564 description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Select and embed a HubSpot form', 'leadin'),
565 icon: _Common_SprocketIcon__WEBPACK_IMPORTED_MODULE_2__["default"],
566 category: 'leadin-blocks',
567 attributes: {
568 portalId: {
569 type: 'string',
570 "default": ''
571 },
572 formId: {
573 type: 'string'
574 },
575 formName: {
576 type: 'string'
577 },
578 preview: {
579 type: 'boolean',
580 "default": false
581 }
582 },
583 example: {
584 attributes: {
585 preview: true
586 }
587 },
588 edit: editComponent,
589 save: function save(props) {
590 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormBlockSave__WEBPACK_IMPORTED_MODULE_3__["default"], _objectSpread({}, props));
591 }
592 });
593 }
594
595 /***/ }),
596
597 /***/ "./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx":
598 /*!*********************************************************************!*\
599 !*** ./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx ***!
600 \*********************************************************************/
601 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
602
603 "use strict";
604 __webpack_require__.r(__webpack_exports__);
605 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
606 /* harmony export */ "default": () => (/* binding */ MeetingGutenbergPreview)
607 /* harmony export */ });
608 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
609 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
610 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
611 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
612 /* harmony import */ var _UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UIImage */ "./scripts/gutenberg/UIComponents/UIImage.ts");
613
614
615
616
617 function MeetingGutenbergPreview() {
618 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
619 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__["default"], {
620 alt: "Create a new Hubspot Meeting",
621 width: "100%",
622 src: "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath, "/public/assets/images/hubspot-meetings.png")
623 })
624 });
625 }
626
627 /***/ }),
628
629 /***/ "./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx":
630 /*!**************************************************************!*\
631 !*** ./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx ***!
632 \**************************************************************/
633 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
634
635 "use strict";
636 __webpack_require__.r(__webpack_exports__);
637 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
638 /* harmony export */ "default": () => (/* binding */ MeetingSaveBlock)
639 /* harmony export */ });
640 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
641 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
642 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
643 /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
644 /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__);
645 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; }
646
647 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; }
648
649 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; }
650
651
652
653
654 function MeetingSaveBlock(_ref) {
655 var attributes = _ref.attributes;
656 var url = attributes.url;
657
658 if (url) {
659 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, _objectSpread(_objectSpread({}, _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps.save()), {}, {
660 children: "[hubspot url=\"".concat(url, "\" type=\"meeting\"]")
661 }));
662 }
663
664 return null;
665 }
666
667 /***/ }),
668
669 /***/ "./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx":
670 /*!******************************************************************!*\
671 !*** ./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx ***!
672 \******************************************************************/
673 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
674
675 "use strict";
676 __webpack_require__.r(__webpack_exports__);
677 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
678 /* harmony export */ "default": () => (/* binding */ registerMeetingBlock)
679 /* harmony export */ });
680 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
681 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
682 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
683 /* harmony import */ var _Common_CalendarIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/CalendarIcon */ "./scripts/gutenberg/Common/CalendarIcon.tsx");
684 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
685 /* harmony import */ var _MeetingGutenbergPreview__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MeetingGutenbergPreview */ "./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx");
686 /* harmony import */ var _MeetingSaveBlock__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./MeetingSaveBlock */ "./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx");
687 /* harmony import */ var _shared_Meeting_MeetingEdit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../shared/Meeting/MeetingEdit */ "./scripts/shared/Meeting/MeetingEdit.tsx");
688 /* harmony import */ var _shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../shared/Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
689 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
690 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__);
691 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; }
692
693 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; }
694
695 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; }
696
697
698
699
700
701
702
703
704
705
706 var ConnectionStatus = {
707 Connected: 'Connected',
708 NotConnected: 'NotConnected'
709 };
710 function registerMeetingBlock() {
711 var editComponent = function editComponent(props) {
712 if (props.attributes.preview) {
713 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingGutenbergPreview__WEBPACK_IMPORTED_MODULE_4__["default"], {});
714 } else if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.connectionStatus === ConnectionStatus.Connected) {
715 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Meeting_MeetingEdit__WEBPACK_IMPORTED_MODULE_6__["default"], _objectSpread(_objectSpread({}, props), {}, {
716 preview: true,
717 origin: "gutenberg"
718 }));
719 } else {
720 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__["default"], {
721 status: 401
722 });
723 }
724 };
725
726 (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)('leadin/hubspot-meeting-block', {
727 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Hubspot Meetings Scheduler', 'leadin'),
728 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'),
729 icon: _Common_CalendarIcon__WEBPACK_IMPORTED_MODULE_2__["default"],
730 category: 'leadin-blocks',
731 attributes: {
732 url: {
733 type: 'string',
734 "default": ''
735 },
736 preview: {
737 type: 'boolean',
738 "default": false
739 }
740 },
741 example: {
742 attributes: {
743 preview: true
744 }
745 },
746 edit: editComponent,
747 save: function save(props) {
748 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingSaveBlock__WEBPACK_IMPORTED_MODULE_5__["default"], _objectSpread({}, props));
749 }
750 });
751 }
752
753 /***/ }),
754
755 /***/ "./scripts/gutenberg/Sidebar/contentType.tsx":
756 /*!***************************************************!*\
757 !*** ./scripts/gutenberg/Sidebar/contentType.tsx ***!
758 \***************************************************/
759 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
760
761 "use strict";
762 __webpack_require__.r(__webpack_exports__);
763 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
764 /* harmony export */ "registerHubspotSidebar": () => (/* binding */ registerHubspotSidebar)
765 /* harmony export */ });
766 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
767 /* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/plugins */ "@wordpress/plugins");
768 /* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__);
769 /* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/edit-post */ "@wordpress/edit-post");
770 /* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__);
771 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
772 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
773 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
774 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);
775 /* harmony import */ var _UIComponents_UISidebarSelectControl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../UIComponents/UISidebarSelectControl */ "./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx");
776 /* harmony import */ var _Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Common/SidebarSprocketIcon */ "./scripts/gutenberg/Common/SidebarSprocketIcon.tsx");
777 /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js");
778 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
779 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__);
780 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
781 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
782 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
783 var _templateObject;
784
785 function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
786
787
788
789
790
791
792
793
794
795
796
797
798
799 function registerHubspotSidebar() {
800 var ContentTypeLabelStyle = styled_components__WEBPACK_IMPORTED_MODULE_11__["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n white-space: normal;\n text-transform: none;\n "])));
801
802 var ContentTypeLabel = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ContentTypeLabelStyle, {
803 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Select the content type HubSpot Analytics uses to track this page.', 'leadin')
804 });
805
806 var LeadinPluginSidebar = function LeadinPluginSidebar(_ref) {
807 var postType = _ref.postType;
808 return postType ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__.PluginSidebar, {
809 name: "leadin",
810 title: "HubSpot",
811 icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Icon, {
812 className: "hs-plugin-sidebar-sprocket",
813 icon: (0,_Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_6__["default"])()
814 }),
815 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, {
816 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('HubSpot Analytics', 'leadin'),
817 initialOpen: true,
818 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_8__.BackgroudAppContext.Provider, {
819 value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_9__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_10__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_9__.refreshToken),
820 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISidebarSelectControl__WEBPACK_IMPORTED_MODULE_5__["default"], {
821 metaKey: "content-type",
822 className: "select-content-type",
823 label: ContentTypeLabel,
824 options: [{
825 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Detect Automatically', 'leadin'),
826 value: ''
827 }, {
828 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Blog Post', 'leadin'),
829 value: 'blog-post'
830 }, {
831 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Knowledge Article', 'leadin'),
832 value: 'knowledge-article'
833 }, {
834 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Landing Page', 'leadin'),
835 value: 'landing-page'
836 }, {
837 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Listing Page', 'leadin'),
838 value: 'listing-page'
839 }, {
840 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Standard Page', 'leadin'),
841 value: 'standard-page'
842 }]
843 })
844 })
845 })
846 }) : null;
847 };
848
849 var LeadinPluginSidebarWrapper = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.withSelect)(function (select) {
850 var data = select('core/editor');
851 return {
852 postType: data && data.getCurrentPostType() && data.getEditedPostAttribute('meta')
853 };
854 })(LeadinPluginSidebar);
855 (0,_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__.registerPlugin)('leadin', {
856 render: LeadinPluginSidebarWrapper,
857 icon: _Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_6__["default"]
858 });
859 }
860
861 /***/ }),
862
863 /***/ "./scripts/gutenberg/UIComponents/UIImage.ts":
864 /*!***************************************************!*\
865 !*** ./scripts/gutenberg/UIComponents/UIImage.ts ***!
866 \***************************************************/
867 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
868
869 "use strict";
870 __webpack_require__.r(__webpack_exports__);
871 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
872 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
873 /* harmony export */ });
874 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
875
876
877 var _exp = /*#__PURE__*/function _exp() {
878 return function (props) {
879 return props.height ? props.height : 'auto';
880 };
881 };
882
883 var _exp2 = /*#__PURE__*/function _exp2() {
884 return function (props) {
885 return props.width ? props.width : 'auto';
886 };
887 };
888
889 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('img')({
890 name: "UIImage0",
891 "class": "ump7xqy",
892 propsAsIs: false,
893 vars: {
894 "ump7xqy-0": [_exp()],
895 "ump7xqy-1": [_exp2()]
896 }
897 }));
898
899 __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");
900
901 /***/ }),
902
903 /***/ "./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx":
904 /*!*******************************************************************!*\
905 !*** ./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx ***!
906 \*******************************************************************/
907 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
908
909 "use strict";
910 __webpack_require__.r(__webpack_exports__);
911 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
912 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
913 /* harmony export */ });
914 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
915 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
916 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
917 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
918 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
919 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
920 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; }
921
922 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; }
923
924 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; }
925
926
927
928
929
930
931
932 var UISidebarSelectControl = function UISidebarSelectControl(props) {
933 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__.useBackgroundAppContext)();
934 var monitorSidebarMetaChange = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__.usePostBackgroundMessage)();
935 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, _objectSpread({
936 value: props.metaValue,
937 onChange: function onChange(content) {
938 if (props.setMetaValue) {
939 props.setMetaValue(content);
940 }
941
942 isBackgroundAppReady && monitorSidebarMetaChange({
943 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages.TrackSidebarMetaChange,
944 payload: {
945 metaKey: props.metaKey
946 }
947 });
948 }
949 }, props));
950 };
951
952 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_2__["default"])(UISidebarSelectControl));
953
954 /***/ }),
955
956 /***/ "./scripts/iframe/integratedMessages/core/CoreMessages.ts":
957 /*!****************************************************************!*\
958 !*** ./scripts/iframe/integratedMessages/core/CoreMessages.ts ***!
959 \****************************************************************/
960 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
961
962 "use strict";
963 __webpack_require__.r(__webpack_exports__);
964 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
965 /* harmony export */ "CoreMessages": () => (/* binding */ CoreMessages)
966 /* harmony export */ });
967 var CoreMessages = {
968 HandshakeReceive: 'INTEGRATED_APP_EMBEDDER_HANDSHAKE_RECEIVED',
969 SendRefreshToken: 'INTEGRATED_APP_EMBEDDER_SEND_REFRESH_TOKEN',
970 ReloadParentFrame: 'INTEGRATED_APP_EMBEDDER_RELOAD_PARENT_FRAME',
971 RedirectParentFrame: 'INTEGRATED_APP_EMBEDDER_REDIRECT_PARENT_FRAME',
972 SendLocale: 'INTEGRATED_APP_EMBEDDER_SEND_LOCALE',
973 SendDeviceId: 'INTEGRATED_APP_EMBEDDER_SEND_DEVICE_ID'
974 };
975
976 /***/ }),
977
978 /***/ "./scripts/iframe/integratedMessages/forms/FormsMessages.ts":
979 /*!******************************************************************!*\
980 !*** ./scripts/iframe/integratedMessages/forms/FormsMessages.ts ***!
981 \******************************************************************/
982 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
983
984 "use strict";
985 __webpack_require__.r(__webpack_exports__);
986 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
987 /* harmony export */ "FormMessages": () => (/* binding */ FormMessages)
988 /* harmony export */ });
989 var FormMessages = {
990 CreateFormAppNavigation: 'CREATE_FORM_APP_NAVIGATION'
991 };
992
993 /***/ }),
994
995 /***/ "./scripts/iframe/integratedMessages/index.ts":
996 /*!****************************************************!*\
997 !*** ./scripts/iframe/integratedMessages/index.ts ***!
998 \****************************************************/
999 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1000
1001 "use strict";
1002 __webpack_require__.r(__webpack_exports__);
1003 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1004 /* harmony export */ "CoreMessages": () => (/* reexport safe */ _core_CoreMessages__WEBPACK_IMPORTED_MODULE_0__.CoreMessages),
1005 /* harmony export */ "FormMessages": () => (/* reexport safe */ _forms_FormsMessages__WEBPACK_IMPORTED_MODULE_1__.FormMessages),
1006 /* harmony export */ "LiveChatMessages": () => (/* reexport safe */ _livechat_LiveChatMessages__WEBPACK_IMPORTED_MODULE_2__.LiveChatMessages),
1007 /* harmony export */ "PluginMessages": () => (/* reexport safe */ _plugin_PluginMessages__WEBPACK_IMPORTED_MODULE_3__.PluginMessages),
1008 /* harmony export */ "ProxyMessages": () => (/* reexport safe */ _proxy_ProxyMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages)
1009 /* harmony export */ });
1010 /* harmony import */ var _core_CoreMessages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/CoreMessages */ "./scripts/iframe/integratedMessages/core/CoreMessages.ts");
1011 /* harmony import */ var _forms_FormsMessages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./forms/FormsMessages */ "./scripts/iframe/integratedMessages/forms/FormsMessages.ts");
1012 /* harmony import */ var _livechat_LiveChatMessages__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./livechat/LiveChatMessages */ "./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts");
1013 /* harmony import */ var _plugin_PluginMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./plugin/PluginMessages */ "./scripts/iframe/integratedMessages/plugin/PluginMessages.ts");
1014 /* harmony import */ var _proxy_ProxyMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./proxy/ProxyMessages */ "./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts");
1015
1016
1017
1018
1019
1020
1021 /***/ }),
1022
1023 /***/ "./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts":
1024 /*!************************************************************************!*\
1025 !*** ./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts ***!
1026 \************************************************************************/
1027 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1028
1029 "use strict";
1030 __webpack_require__.r(__webpack_exports__);
1031 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1032 /* harmony export */ "LiveChatMessages": () => (/* binding */ LiveChatMessages)
1033 /* harmony export */ });
1034 var LiveChatMessages = {
1035 CreateLiveChatAppNavigation: 'CREATE_LIVE_CHAT_APP_NAVIGATION'
1036 };
1037
1038 /***/ }),
1039
1040 /***/ "./scripts/iframe/integratedMessages/plugin/PluginMessages.ts":
1041 /*!********************************************************************!*\
1042 !*** ./scripts/iframe/integratedMessages/plugin/PluginMessages.ts ***!
1043 \********************************************************************/
1044 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1045
1046 "use strict";
1047 __webpack_require__.r(__webpack_exports__);
1048 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1049 /* harmony export */ "PluginMessages": () => (/* binding */ PluginMessages)
1050 /* harmony export */ });
1051 var PluginMessages = {
1052 PluginSettingsNavigation: 'PLUGIN_SETTINGS_NAVIGATION',
1053 PluginLeadinConfig: 'PLUGIN_LEADIN_CONFIG',
1054 TrackConsent: 'INTEGRATED_APP_EMBEDDER_TRACK_CONSENT',
1055 InternalTrackingFetchRequest: 'INTEGRATED_TRACKING_FETCH_REQUEST',
1056 InternalTrackingFetchResponse: 'INTEGRATED_TRACKING_FETCH_RESPONSE',
1057 InternalTrackingFetchError: 'INTEGRATED_TRACKING_FETCH_ERROR',
1058 InternalTrackingChangeRequest: 'INTEGRATED_TRACKING_CHANGE_REQUEST',
1059 InternalTrackingChangeError: 'INTEGRATED_TRACKING_CHANGE_ERROR',
1060 BusinessUnitFetchRequest: 'BUSINESS_UNIT_FETCH_REQUEST',
1061 BusinessUnitFetchResponse: 'BUSINESS_UNIT_FETCH_FETCH_RESPONSE',
1062 BusinessUnitFetchError: 'BUSINESS_UNIT_FETCH_FETCH_ERROR',
1063 BusinessUnitChangeRequest: 'BUSINESS_UNIT_CHANGE_REQUEST',
1064 BusinessUnitChangeError: 'BUSINESS_UNIT_CHANGE_ERROR',
1065 SkipReviewRequest: 'SKIP_REVIEW_REQUEST',
1066 SkipReviewResponse: 'SKIP_REVIEW_RESPONSE',
1067 SkipReviewError: 'SKIP_REVIEW_ERROR',
1068 RemoveParentQueryParam: 'REMOVE_PARENT_QUERY_PARAM'
1069 };
1070
1071 /***/ }),
1072
1073 /***/ "./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts":
1074 /*!******************************************************************!*\
1075 !*** ./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts ***!
1076 \******************************************************************/
1077 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1078
1079 "use strict";
1080 __webpack_require__.r(__webpack_exports__);
1081 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1082 /* harmony export */ "ProxyMessages": () => (/* binding */ ProxyMessages)
1083 /* harmony export */ });
1084 var ProxyMessages = {
1085 FetchForms: 'FETCH_FORMS',
1086 FetchForm: 'FETCH_FORM',
1087 CreateFormFromTemplate: 'CREATE_FORM_FROM_TEMPLATE',
1088 FetchAuth: 'FETCH_AUTH',
1089 FetchMeetingsAndUsers: 'FETCH_MEETINGS_AND_USERS',
1090 FetchContactsCreateSinceActivation: 'FETCH_CONTACTS_CREATED_SINCE_ACTIVATION',
1091 FetchOrCreateMeetingUser: 'FETCH_OR_CREATE_MEETING_USER',
1092 ConnectMeetingsCalendar: 'CONNECT_MEETINGS_CALENDAR',
1093 TrackFormPreviewRender: 'TRACK_FORM_PREVIEW_RENDER',
1094 TrackFormCreatedFromTemplate: 'TRACK_FORM_CREATED_FROM_TEMPLATE',
1095 TrackFormCreationFailed: 'TRACK_FORM_CREATION_FAILED',
1096 TrackMeetingPreviewRender: 'TRACK_MEETING_PREVIEW_RENDER',
1097 TrackSidebarMetaChange: 'TRACK_SIDEBAR_META_CHANGE',
1098 TrackReviewBannerRender: 'TRACK_REVIEW_BANNER_RENDER',
1099 TrackReviewBannerInteraction: 'TRACK_REVIEW_BANNER_INTERACTION',
1100 TrackReviewBannerDismissed: 'TRACK_REVIEW_BANNER_DISMISSED',
1101 TrackPluginDeactivation: 'TRACK_PLUGIN_DEACTIVATION'
1102 };
1103
1104 /***/ }),
1105
1106 /***/ "./scripts/iframe/useBackgroundApp.ts":
1107 /*!********************************************!*\
1108 !*** ./scripts/iframe/useBackgroundApp.ts ***!
1109 \********************************************/
1110 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1111
1112 "use strict";
1113 __webpack_require__.r(__webpack_exports__);
1114 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1115 /* harmony export */ "BackgroudAppContext": () => (/* binding */ BackgroudAppContext),
1116 /* harmony export */ "useBackgroundAppContext": () => (/* binding */ useBackgroundAppContext),
1117 /* harmony export */ "usePostAsyncBackgroundMessage": () => (/* binding */ usePostAsyncBackgroundMessage),
1118 /* harmony export */ "usePostBackgroundMessage": () => (/* binding */ usePostBackgroundMessage)
1119 /* harmony export */ });
1120 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1121 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1122
1123 var BackgroudAppContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
1124 function useBackgroundAppContext() {
1125 return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(BackgroudAppContext);
1126 }
1127 function usePostBackgroundMessage() {
1128 var app = useBackgroundAppContext();
1129 return function (message) {
1130 app.postMessage(message);
1131 };
1132 }
1133 function usePostAsyncBackgroundMessage() {
1134 var app = useBackgroundAppContext();
1135 return function (message) {
1136 return app.postAsyncMessage(message);
1137 };
1138 }
1139
1140 /***/ }),
1141
1142 /***/ "./scripts/lib/Raven.ts":
1143 /*!******************************!*\
1144 !*** ./scripts/lib/Raven.ts ***!
1145 \******************************/
1146 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1147
1148 "use strict";
1149 __webpack_require__.r(__webpack_exports__);
1150 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1151 /* harmony export */ "configureRaven": () => (/* binding */ configureRaven),
1152 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1153 /* harmony export */ });
1154 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! raven-js */ "./node_modules/raven-js/src/singleton.js");
1155 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(raven_js__WEBPACK_IMPORTED_MODULE_0__);
1156 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1157
1158
1159 function configureRaven() {
1160 if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.hubspotBaseUrl.indexOf('app.hubspot.com') === -1) {
1161 return;
1162 }
1163
1164 raven_js__WEBPACK_IMPORTED_MODULE_0___default().config('https://e9b8f382cdd130c0d415cd977d2be56f@exceptions.hubspot.com/1', {
1165 instrument: {
1166 tryCatch: false
1167 },
1168 release: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.leadinPluginVersion
1169 }).install();
1170 raven_js__WEBPACK_IMPORTED_MODULE_0___default().setTagsContext({
1171 v: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.leadinPluginVersion,
1172 php: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.phpVersion,
1173 wordpress: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.wpVersion
1174 });
1175 raven_js__WEBPACK_IMPORTED_MODULE_0___default().setExtraContext({
1176 hub: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.portalId,
1177 plugins: Object.keys(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.plugins).map(function (name) {
1178 return "".concat(name, "#").concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.plugins[name]);
1179 }).join(',')
1180 });
1181 }
1182 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((raven_js__WEBPACK_IMPORTED_MODULE_0___default()));
1183
1184 /***/ }),
1185
1186 /***/ "./scripts/shared/Common/AsyncSelect.tsx":
1187 /*!***********************************************!*\
1188 !*** ./scripts/shared/Common/AsyncSelect.tsx ***!
1189 \***********************************************/
1190 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1191
1192 "use strict";
1193 __webpack_require__.r(__webpack_exports__);
1194 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1195 /* harmony export */ "default": () => (/* binding */ AsyncSelect)
1196 /* harmony export */ });
1197 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1198 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1199 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1200 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
1201 /* harmony import */ var _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/colors */ "./scripts/shared/UIComponents/colors.ts");
1202 /* harmony import */ var _UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpinner */ "./scripts/shared/UIComponents/UISpinner.tsx");
1203 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../enums/loadState */ "./scripts/shared/enums/loadState.ts");
1204 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1205
1206 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."); }
1207
1208 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); }
1209
1210 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; }
1211
1212 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; }
1213
1214 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1215
1216
1217
1218
1219
1220
1221
1222 var Container = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1223 name: "Container",
1224 "class": "c1wxx7eu",
1225 propsAsIs: false
1226 });
1227
1228 var _exp2 = /*#__PURE__*/function _exp2() {
1229 return function (props) {
1230 return props.focused ? '0' : '1px';
1231 };
1232 };
1233
1234 var _exp3 = /*#__PURE__*/function _exp3() {
1235 return function (props) {
1236 return props.focused ? "0 0 0 2px ".concat(_UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM) : 'none';
1237 };
1238 };
1239
1240 var ControlContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1241 name: "ControlContainer",
1242 "class": "c1rgwbep",
1243 propsAsIs: false,
1244 vars: {
1245 "c1rgwbep-0": [_exp2()],
1246 "c1rgwbep-1": [_exp3()]
1247 }
1248 });
1249 var ValueContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1250 name: "ValueContainer",
1251 "class": "v1mdmbaj",
1252 propsAsIs: false
1253 });
1254 var Placeholder = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1255 name: "Placeholder",
1256 "class": "p1gwkvxy",
1257 propsAsIs: false
1258 });
1259 var SingleValue = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1260 name: "SingleValue",
1261 "class": "s1bwlafs",
1262 propsAsIs: false
1263 });
1264 var IndicatorContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1265 name: "IndicatorContainer",
1266 "class": "i196z9y5",
1267 propsAsIs: false
1268 });
1269 var DropdownIndicator = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1270 name: "DropdownIndicator",
1271 "class": "d1dfo5ow",
1272 propsAsIs: false
1273 });
1274 var InputContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1275 name: "InputContainer",
1276 "class": "if3lze",
1277 propsAsIs: false
1278 });
1279 var Input = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('input')({
1280 name: "Input",
1281 "class": "i9kxf50",
1282 propsAsIs: false
1283 });
1284 var InputShadow = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1285 name: "InputShadow",
1286 "class": "igjr3uc",
1287 propsAsIs: false
1288 });
1289 var MenuContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1290 name: "MenuContainer",
1291 "class": "mhb9if7",
1292 propsAsIs: false
1293 });
1294 var MenuList = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1295 name: "MenuList",
1296 "class": "mxaof7s",
1297 propsAsIs: false
1298 });
1299 var MenuGroup = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1300 name: "MenuGroup",
1301 "class": "mw50s5v",
1302 propsAsIs: false
1303 });
1304 var MenuGroupHeader = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1305 name: "MenuGroupHeader",
1306 "class": "m11rzvjw",
1307 propsAsIs: false
1308 });
1309
1310 var _exp5 = /*#__PURE__*/function _exp5() {
1311 return function (props) {
1312 return props.selected ? _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM : 'transparent';
1313 };
1314 };
1315
1316 var _exp6 = /*#__PURE__*/function _exp6() {
1317 return function (props) {
1318 return props.selected ? '#fff' : 'inherit';
1319 };
1320 };
1321
1322 var _exp7 = /*#__PURE__*/function _exp7() {
1323 return function (props) {
1324 return props.selected ? _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM : _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_LIGHT;
1325 };
1326 };
1327
1328 var MenuItem = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1329 name: "MenuItem",
1330 "class": "m1jcdsjv",
1331 propsAsIs: false,
1332 vars: {
1333 "m1jcdsjv-0": [_exp5()],
1334 "m1jcdsjv-1": [_exp6()],
1335 "m1jcdsjv-2": [_exp7()]
1336 }
1337 });
1338 function AsyncSelect(_ref) {
1339 var placeholder = _ref.placeholder,
1340 value = _ref.value,
1341 loadOptions = _ref.loadOptions,
1342 onChange = _ref.onChange,
1343 defaultOptions = _ref.defaultOptions;
1344 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1345 var inputShadowEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1346
1347 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
1348 _useState2 = _slicedToArray(_useState, 2),
1349 isFocused = _useState2[0],
1350 setFocus = _useState2[1];
1351
1352 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].NotLoaded),
1353 _useState4 = _slicedToArray(_useState3, 2),
1354 loadState = _useState4[0],
1355 setLoadState = _useState4[1];
1356
1357 var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
1358 _useState6 = _slicedToArray(_useState5, 2),
1359 localValue = _useState6[0],
1360 setLocalValue = _useState6[1];
1361
1362 var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultOptions),
1363 _useState8 = _slicedToArray(_useState7, 2),
1364 options = _useState8[0],
1365 setOptions = _useState8[1];
1366
1367 var inputSize = "".concat(inputShadowEl.current ? inputShadowEl.current.clientWidth + 10 : 2, "px");
1368 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1369 if (loadOptions && loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].NotLoaded) {
1370 loadOptions('', function (result) {
1371 setOptions(result);
1372 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Idle);
1373 });
1374 }
1375 }, [loadOptions, loadState]);
1376
1377 var renderItems = function renderItems() {
1378 var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
1379 var parentKey = arguments.length > 1 ? arguments[1] : undefined;
1380 return items.map(function (item, index) {
1381 if (item.options) {
1382 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(MenuGroup, {
1383 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuGroupHeader, {
1384 id: "".concat(index, "-heading"),
1385 children: item.label
1386 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
1387 children: renderItems(item.options, index)
1388 })]
1389 }, "async-select-item-".concat(index));
1390 } else {
1391 var key = "async-select-item-".concat(parentKey !== undefined ? "".concat(parentKey, "-").concat(index) : index);
1392 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuItem, {
1393 id: key,
1394 selected: value && item.value === value.value,
1395 onClick: function onClick() {
1396 onChange(item);
1397 setFocus(false);
1398 },
1399 children: item.label
1400 }, key);
1401 }
1402 });
1403 };
1404
1405 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(Container, {
1406 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ControlContainer, {
1407 id: "leadin-async-selector",
1408 focused: isFocused,
1409 onClick: function onClick() {
1410 if (isFocused) {
1411 if (inputEl.current) {
1412 inputEl.current.blur();
1413 }
1414
1415 setFocus(false);
1416 setLocalValue('');
1417 } else {
1418 if (inputEl.current) {
1419 inputEl.current.focus();
1420 }
1421
1422 setFocus(true);
1423 }
1424 },
1425 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ValueContainer, {
1426 children: [localValue === '' && (!value ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Placeholder, {
1427 children: placeholder
1428 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SingleValue, {
1429 children: value.label
1430 })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(InputContainer, {
1431 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Input, {
1432 ref: inputEl,
1433 onFocus: function onFocus() {
1434 setFocus(true);
1435 },
1436 onChange: function onChange(e) {
1437 setLocalValue(e.target.value);
1438 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Loading);
1439 loadOptions && loadOptions(e.target.value, function (result) {
1440 setOptions(result);
1441 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Idle);
1442 });
1443 },
1444 value: localValue,
1445 width: inputSize,
1446 id: "asycn-select-input"
1447 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(InputShadow, {
1448 ref: inputShadowEl,
1449 children: localValue
1450 })]
1451 })]
1452 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(IndicatorContainer, {
1453 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, {})]
1454 })]
1455 }), isFocused && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuContainer, {
1456 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuList, {
1457 children: renderItems(options)
1458 })
1459 })]
1460 });
1461 }
1462
1463 __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");
1464
1465 /***/ }),
1466
1467 /***/ "./scripts/shared/Common/ErrorHandler.tsx":
1468 /*!************************************************!*\
1469 !*** ./scripts/shared/Common/ErrorHandler.tsx ***!
1470 \************************************************/
1471 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1472
1473 "use strict";
1474 __webpack_require__.r(__webpack_exports__);
1475 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1476 /* harmony export */ "default": () => (/* binding */ ErrorHandler)
1477 /* harmony export */ });
1478 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1479 /* harmony import */ var _UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../UIComponents/UIButton */ "./scripts/shared/UIComponents/UIButton.ts");
1480 /* harmony import */ var _UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIContainer */ "./scripts/shared/UIComponents/UIContainer.ts");
1481 /* harmony import */ var _HubspotWrapper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1482 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1483 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1484 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);
1485
1486
1487
1488
1489
1490
1491
1492
1493 function redirectToPlugin() {
1494 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);
1495 }
1496
1497 function ErrorHandler(_ref) {
1498 var status = _ref.status,
1499 resetErrorState = _ref.resetErrorState,
1500 _ref$errorInfo = _ref.errorInfo,
1501 errorInfo = _ref$errorInfo === void 0 ? {
1502 header: '',
1503 message: '',
1504 action: ''
1505 } : _ref$errorInfo;
1506 var isUnauthorized = status === 401 || status === 403;
1507 var errorHeader = isUnauthorized ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)("Your plugin isn't authorized", 'leadin') : errorInfo.header;
1508 var errorMessage = isUnauthorized ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Reauthorize your plugin to access your free HubSpot tools.', 'leadin') : errorInfo.message;
1509 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HubspotWrapper__WEBPACK_IMPORTED_MODULE_3__["default"], {
1510 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__.pluginPath,
1511 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_2__["default"], {
1512 textAlign: "center",
1513 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h4", {
1514 children: errorHeader
1515 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
1516 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
1517 children: errorMessage
1518 })
1519 }), isUnauthorized ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__["default"], {
1520 "data-test-id": "authorize-button",
1521 onClick: redirectToPlugin,
1522 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Go to plugin', 'leadin')
1523 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__["default"], {
1524 "data-test-id": "retry-button",
1525 onClick: resetErrorState,
1526 children: errorInfo.action
1527 })]
1528 })
1529 });
1530 }
1531
1532 /***/ }),
1533
1534 /***/ "./scripts/shared/Common/HubspotWrapper.ts":
1535 /*!*************************************************!*\
1536 !*** ./scripts/shared/Common/HubspotWrapper.ts ***!
1537 \*************************************************/
1538 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1539
1540 "use strict";
1541 __webpack_require__.r(__webpack_exports__);
1542 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1543 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1544 /* harmony export */ });
1545 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
1546
1547
1548 var _exp = /*#__PURE__*/function _exp() {
1549 return function (props) {
1550 return "url(".concat(props.pluginPath, "/public/assets/images/hubspot.svg)");
1551 };
1552 };
1553
1554 var _exp2 = /*#__PURE__*/function _exp2() {
1555 return function (props) {
1556 return props.padding || '90px 20% 25px';
1557 };
1558 };
1559
1560 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
1561 name: "HubspotWrapper0",
1562 "class": "h1q5v5ee",
1563 propsAsIs: false,
1564 vars: {
1565 "h1q5v5ee-0": [_exp()],
1566 "h1q5v5ee-1": [_exp2()]
1567 }
1568 }));
1569
1570 __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");
1571
1572 /***/ }),
1573
1574 /***/ "./scripts/shared/Common/LoadingBlock.tsx":
1575 /*!************************************************!*\
1576 !*** ./scripts/shared/Common/LoadingBlock.tsx ***!
1577 \************************************************/
1578 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1579
1580 "use strict";
1581 __webpack_require__.r(__webpack_exports__);
1582 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1583 /* harmony export */ "default": () => (/* binding */ LoadingBlock)
1584 /* harmony export */ });
1585 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1586 /* harmony import */ var _HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1587 /* harmony import */ var _UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UISpinner */ "./scripts/shared/UIComponents/UISpinner.tsx");
1588 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1589
1590
1591
1592
1593 function LoadingBlock() {
1594 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__["default"], {
1595 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.pluginPath,
1596 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_2__["default"], {
1597 size: 50
1598 })
1599 });
1600 }
1601
1602 /***/ }),
1603
1604 /***/ "./scripts/shared/Form/FormEdit.tsx":
1605 /*!******************************************!*\
1606 !*** ./scripts/shared/Form/FormEdit.tsx ***!
1607 \******************************************/
1608 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1609
1610 "use strict";
1611 __webpack_require__.r(__webpack_exports__);
1612 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1613 /* harmony export */ "default": () => (/* binding */ FormEditContainer)
1614 /* harmony export */ });
1615 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1616 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1617 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1618 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1619 /* harmony import */ var _UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpacer */ "./scripts/shared/UIComponents/UISpacer.ts");
1620 /* harmony import */ var _PreviewForm__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PreviewForm */ "./scripts/shared/Form/PreviewForm.tsx");
1621 /* harmony import */ var _FormSelect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FormSelect */ "./scripts/shared/Form/FormSelect.tsx");
1622 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1623 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
1624 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
1625 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
1626 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; }
1627
1628 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; }
1629
1630 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; }
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643 function FormEdit(_ref) {
1644 var attributes = _ref.attributes,
1645 isSelected = _ref.isSelected,
1646 setAttributes = _ref.setAttributes,
1647 _ref$preview = _ref.preview,
1648 preview = _ref$preview === void 0 ? true : _ref$preview,
1649 _ref$origin = _ref.origin,
1650 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin;
1651 var formId = attributes.formId,
1652 formName = attributes.formName;
1653 var formSelected = _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId && formId;
1654 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.useBackgroundAppContext)();
1655 var monitorFormPreviewRender = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.usePostBackgroundMessage)();
1656
1657 var handleChange = function handleChange(selectedForm) {
1658 setAttributes({
1659 portalId: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId,
1660 formId: selectedForm.value,
1661 formName: selectedForm.label
1662 });
1663 };
1664
1665 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1666 monitorFormPreviewRender({
1667 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__.ProxyMessages.TrackFormPreviewRender,
1668 payload: {
1669 origin: origin
1670 }
1671 });
1672 }, [origin]);
1673 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, {
1674 children: [(isSelected || !formSelected) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormSelect__WEBPACK_IMPORTED_MODULE_5__["default"], {
1675 formId: formId,
1676 formName: formName,
1677 handleChange: handleChange,
1678 origin: origin
1679 }), formSelected && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
1680 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"], {
1681 portalId: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId,
1682 formId: formId
1683 })]
1684 })]
1685 });
1686 }
1687
1688 function FormEditContainer(props) {
1689 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.BackgroudAppContext.Provider, {
1690 value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_9__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.refreshToken),
1691 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(FormEdit, _objectSpread({}, props))
1692 });
1693 }
1694
1695 /***/ }),
1696
1697 /***/ "./scripts/shared/Form/FormSelect.tsx":
1698 /*!********************************************!*\
1699 !*** ./scripts/shared/Form/FormSelect.tsx ***!
1700 \********************************************/
1701 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1702
1703 "use strict";
1704 __webpack_require__.r(__webpack_exports__);
1705 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1706 /* harmony export */ "default": () => (/* binding */ FormSelect)
1707 /* harmony export */ });
1708 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1709 /* harmony import */ var _FormSelector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FormSelector */ "./scripts/shared/Form/FormSelector.tsx");
1710 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
1711 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1712 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
1713 /* harmony import */ var _hooks_useForms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useForms */ "./scripts/shared/Form/hooks/useForms.ts");
1714 /* harmony import */ var _hooks_useCreateFormFromTemplate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useCreateFormFromTemplate */ "./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts");
1715 /* harmony import */ var _constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../constants/defaultFormOptions */ "./scripts/constants/defaultFormOptions.ts");
1716 /* harmony import */ var _Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
1717
1718
1719
1720
1721
1722
1723
1724
1725 function FormSelect(_ref) {
1726 var formId = _ref.formId,
1727 formName = _ref.formName,
1728 handleChange = _ref.handleChange,
1729 _ref$origin = _ref.origin,
1730 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin;
1731
1732 var _useForms = (0,_hooks_useForms__WEBPACK_IMPORTED_MODULE_4__["default"])(),
1733 search = _useForms.search,
1734 formApiError = _useForms.formApiError,
1735 reset = _useForms.reset;
1736
1737 var _useCreateFormFromTem = (0,_hooks_useCreateFormFromTemplate__WEBPACK_IMPORTED_MODULE_5__["default"])(origin),
1738 createFormByTemplate = _useCreateFormFromTem.createFormByTemplate,
1739 createReset = _useCreateFormFromTem.reset,
1740 isCreating = _useCreateFormFromTem.isCreating,
1741 hasError = _useCreateFormFromTem.hasError,
1742 createApiError = _useCreateFormFromTem.formApiError;
1743
1744 var value = formId && formName ? {
1745 label: formName,
1746 value: formId
1747 } : null;
1748
1749 var handleLocalChange = function handleLocalChange(option) {
1750 if ((0,_constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_6__.isDefaultForm)(option.value)) {
1751 createFormByTemplate(option.value).then(function (_ref2) {
1752 var guid = _ref2.guid,
1753 name = _ref2.name;
1754 handleChange({
1755 value: guid,
1756 label: name
1757 });
1758 });
1759 } else {
1760 handleChange(option);
1761 }
1762 };
1763
1764 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"], {
1765 status: formApiError ? formApiError.status : createApiError.status,
1766 resetErrorState: function resetErrorState() {
1767 if (hasError) {
1768 createReset();
1769 } else {
1770 reset();
1771 }
1772 },
1773 errorInfo: {
1774 header: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('There was a problem retrieving your forms', 'leadin'),
1775 message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Please refresh your forms or try again in a few minutes.', 'leadin'),
1776 action: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Refresh forms', 'leadin')
1777 }
1778 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormSelector__WEBPACK_IMPORTED_MODULE_1__["default"], {
1779 loadOptions: search,
1780 onChange: function onChange(option) {
1781 return handleLocalChange(option);
1782 },
1783 value: value
1784 });
1785 }
1786
1787 /***/ }),
1788
1789 /***/ "./scripts/shared/Form/FormSelector.tsx":
1790 /*!**********************************************!*\
1791 !*** ./scripts/shared/Form/FormSelector.tsx ***!
1792 \**********************************************/
1793 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1794
1795 "use strict";
1796 __webpack_require__.r(__webpack_exports__);
1797 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1798 /* harmony export */ "default": () => (/* binding */ FormSelector)
1799 /* harmony export */ });
1800 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1801 /* harmony import */ var _Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Common/HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1802 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1803 /* harmony import */ var _Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Common/AsyncSelect */ "./scripts/shared/Common/AsyncSelect.tsx");
1804 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1805 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
1806
1807
1808
1809
1810
1811 function FormSelector(_ref) {
1812 var loadOptions = _ref.loadOptions,
1813 onChange = _ref.onChange,
1814 value = _ref.value;
1815 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__["default"], {
1816 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath,
1817 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
1818 "data-test-id": "leadin-form-select",
1819 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
1820 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select an existing form or create a new one from a template', 'leadin')
1821 })
1822 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_3__["default"], {
1823 placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Search for a form', 'leadin'),
1824 value: value,
1825 loadOptions: loadOptions,
1826 onChange: onChange
1827 })]
1828 });
1829 }
1830
1831 /***/ }),
1832
1833 /***/ "./scripts/shared/Form/PreviewForm.tsx":
1834 /*!*********************************************!*\
1835 !*** ./scripts/shared/Form/PreviewForm.tsx ***!
1836 \*********************************************/
1837 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1838
1839 "use strict";
1840 __webpack_require__.r(__webpack_exports__);
1841 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1842 /* harmony export */ "default": () => (/* binding */ PreviewForm)
1843 /* harmony export */ });
1844 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1845 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1846 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1847 /* harmony import */ var _UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIOverlay */ "./scripts/shared/UIComponents/UIOverlay.ts");
1848 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1849 /* harmony import */ var _hooks_useFormsScript__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useFormsScript */ "./scripts/shared/Form/hooks/useFormsScript.ts");
1850
1851
1852
1853
1854
1855 function PreviewForm(_ref) {
1856 var portalId = _ref.portalId,
1857 formId = _ref.formId;
1858 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1859 var ready = (0,_hooks_useFormsScript__WEBPACK_IMPORTED_MODULE_4__["default"])();
1860 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1861 if (!ready) {
1862 return;
1863 }
1864
1865 if (inputEl.current) {
1866 inputEl.current.innerHTML = '';
1867 var embedScript = document.createElement('script');
1868 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, " });");
1869 inputEl.current.appendChild(embedScript);
1870 }
1871 }, [formId, portalId, ready, inputEl]);
1872 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__["default"], {
1873 ref: inputEl
1874 });
1875 }
1876
1877 /***/ }),
1878
1879 /***/ "./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts":
1880 /*!****************************************************************!*\
1881 !*** ./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts ***!
1882 \****************************************************************/
1883 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1884
1885 "use strict";
1886 __webpack_require__.r(__webpack_exports__);
1887 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1888 /* harmony export */ "default": () => (/* binding */ useCreateFormFromTemplate)
1889 /* harmony export */ });
1890 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1891 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1892 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1893 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
1894 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
1895 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1896
1897 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."); }
1898
1899 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); }
1900
1901 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; }
1902
1903 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; }
1904
1905 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1906
1907
1908
1909
1910
1911 function useCreateFormFromTemplate() {
1912 var origin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'gutenberg';
1913 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
1914 var track = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostBackgroundMessage)();
1915
1916 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle),
1917 _useState2 = _slicedToArray(_useState, 2),
1918 loadState = _useState2[0],
1919 setLoadState = _useState2[1];
1920
1921 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
1922 _useState4 = _slicedToArray(_useState3, 2),
1923 formApiError = _useState4[0],
1924 setFormApiError = _useState4[1];
1925
1926 var createFormByTemplate = function createFormByTemplate(type) {
1927 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
1928 track({
1929 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.TrackFormCreatedFromTemplate,
1930 payload: {
1931 type: type,
1932 origin: origin
1933 }
1934 });
1935 return proxy({
1936 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.CreateFormFromTemplate,
1937 payload: type
1938 }).then(function (form) {
1939 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
1940 return form;
1941 })["catch"](function (err) {
1942 setFormApiError(err);
1943 track({
1944 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.TrackFormCreationFailed,
1945 payload: {
1946 origin: origin
1947 }
1948 });
1949 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
1950 });
1951 };
1952
1953 return {
1954 isCreating: loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading,
1955 hasError: loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed,
1956 formApiError: formApiError,
1957 createFormByTemplate: createFormByTemplate,
1958 reset: function reset() {
1959 return setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
1960 }
1961 };
1962 }
1963
1964 /***/ }),
1965
1966 /***/ "./scripts/shared/Form/hooks/useForms.ts":
1967 /*!***********************************************!*\
1968 !*** ./scripts/shared/Form/hooks/useForms.ts ***!
1969 \***********************************************/
1970 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1971
1972 "use strict";
1973 __webpack_require__.r(__webpack_exports__);
1974 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1975 /* harmony export */ "default": () => (/* binding */ useForms)
1976 /* harmony export */ });
1977 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1978 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1979 /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/debounce */ "./node_modules/lodash/debounce.js");
1980 /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_1__);
1981 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1982 /* harmony import */ var _constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../constants/defaultFormOptions */ "./scripts/constants/defaultFormOptions.ts");
1983 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
1984 function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
1985
1986 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."); }
1987
1988 function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
1989
1990 function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
1991
1992 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1993
1994 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."); }
1995
1996 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); }
1997
1998 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; }
1999
2000 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; }
2001
2002 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2003
2004
2005
2006
2007
2008
2009 function useForms() {
2010 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__.usePostAsyncBackgroundMessage)();
2011
2012 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2013 _useState2 = _slicedToArray(_useState, 2),
2014 formApiError = _useState2[0],
2015 setFormApiError = _useState2[1];
2016
2017 var search = lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default()(function (search, callback) {
2018 return proxy({
2019 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages.FetchForms,
2020 payload: {
2021 search: search
2022 }
2023 }).then(function (forms) {
2024 callback([].concat(_toConsumableArray(forms.map(function (form) {
2025 return {
2026 label: form.name,
2027 value: form.guid
2028 };
2029 })), [_constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_OPTIONS]));
2030 })["catch"](function (error) {
2031 setFormApiError(error);
2032 });
2033 }, 300, {
2034 trailing: true
2035 });
2036 return {
2037 search: search,
2038 formApiError: formApiError,
2039 reset: function reset() {
2040 return setFormApiError(null);
2041 }
2042 };
2043 }
2044
2045 /***/ }),
2046
2047 /***/ "./scripts/shared/Form/hooks/useFormsScript.ts":
2048 /*!*****************************************************!*\
2049 !*** ./scripts/shared/Form/hooks/useFormsScript.ts ***!
2050 \*****************************************************/
2051 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2052
2053 "use strict";
2054 __webpack_require__.r(__webpack_exports__);
2055 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2056 /* harmony export */ "default": () => (/* binding */ useFormScript)
2057 /* harmony export */ });
2058 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
2059 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
2060 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2061 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2062 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2063 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../lib/Raven */ "./scripts/lib/Raven.ts");
2064 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2065
2066 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."); }
2067
2068 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); }
2069
2070 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; }
2071
2072 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; }
2073
2074 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2075
2076
2077
2078
2079
2080 var promise;
2081
2082 function loadFormsScript() {
2083 if (!promise) {
2084 promise = new Promise(function (resolve, reject) {
2085 return jquery__WEBPACK_IMPORTED_MODULE_0___default().getScript(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.formsScript).done(resolve).fail(reject);
2086 });
2087 }
2088
2089 return promise;
2090 }
2091
2092 function useFormScript() {
2093 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
2094 _useState2 = _slicedToArray(_useState, 2),
2095 ready = _useState2[0],
2096 setReady = _useState2[1];
2097
2098 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2099 loadFormsScript().then(function () {
2100 return setReady(true);
2101 })["catch"](function (error) {
2102 return _lib_Raven__WEBPACK_IMPORTED_MODULE_3__["default"].captureException(error);
2103 });
2104 }, []);
2105 return ready;
2106 }
2107
2108 /***/ }),
2109
2110 /***/ "./scripts/shared/Meeting/MeetingController.tsx":
2111 /*!******************************************************!*\
2112 !*** ./scripts/shared/Meeting/MeetingController.tsx ***!
2113 \******************************************************/
2114 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2115
2116 "use strict";
2117 __webpack_require__.r(__webpack_exports__);
2118 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2119 /* harmony export */ "default": () => (/* binding */ MeetingController)
2120 /* harmony export */ });
2121 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2122 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2123 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2124 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
2125 /* harmony import */ var _MeetingSelector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./MeetingSelector */ "./scripts/shared/Meeting/MeetingSelector.tsx");
2126 /* harmony import */ var _MeetingWarning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MeetingWarning */ "./scripts/shared/Meeting/MeetingWarning.tsx");
2127 /* harmony import */ var _hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useMeetings */ "./scripts/shared/Meeting/hooks/useMeetings.ts");
2128 /* harmony import */ var _Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Common/HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
2129 /* harmony import */ var _Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
2130 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2131 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2132 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);
2133 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! raven-js */ "./node_modules/raven-js/src/singleton.js");
2134 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(raven_js__WEBPACK_IMPORTED_MODULE_10__);
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146 function MeetingController(_ref) {
2147 var handleChange = _ref.handleChange,
2148 url = _ref.url;
2149
2150 var _useMeetings = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__["default"])(),
2151 meetings = _useMeetings.mappedMeetings,
2152 loading = _useMeetings.loading,
2153 error = _useMeetings.error,
2154 reload = _useMeetings.reload,
2155 connectCalendar = _useMeetings.connectCalendar;
2156
2157 var selectedMeetingOption = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__.useSelectedMeeting)(url);
2158 var selectedMeetingCalendar = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__.useSelectedMeetingCalendar)(url);
2159 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2160 if (!url && meetings.length > 0) {
2161 handleChange(meetings[0].value);
2162 }
2163 }, [meetings, url, handleChange]);
2164
2165 var handleLocalChange = function handleLocalChange(option) {
2166 handleChange(option.value);
2167 };
2168
2169 var handleConnectCalendar = function handleConnectCalendar() {
2170 return connectCalendar().then(function () {
2171 reload();
2172 })["catch"](function (error) {
2173 raven_js__WEBPACK_IMPORTED_MODULE_10___default().captureMessage('Unable to connect calendar', {
2174 extra: {
2175 error: error
2176 }
2177 });
2178 });
2179 };
2180
2181 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2182 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"], {
2183 status: error && error.status || error,
2184 resetErrorState: function resetErrorState() {
2185 return reload();
2186 },
2187 errorInfo: {
2188 header: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('There was a problem retrieving your meetings', 'leadin'),
2189 message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Please refresh your meetings or try again in a few minutes.', 'leadin'),
2190 action: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Refresh meetings', 'leadin')
2191 }
2192 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_6__["default"], {
2193 padding: "90px 32px 24px",
2194 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_8__.pluginPath,
2195 children: [selectedMeetingCalendar && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingWarning__WEBPACK_IMPORTED_MODULE_4__["default"], {
2196 status: selectedMeetingCalendar,
2197 onConnectCalendar: handleConnectCalendar
2198 }), meetings.length > 1 && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingSelector__WEBPACK_IMPORTED_MODULE_3__["default"], {
2199 onChange: handleLocalChange,
2200 options: meetings,
2201 value: selectedMeetingOption
2202 })]
2203 })
2204 });
2205 }
2206
2207 /***/ }),
2208
2209 /***/ "./scripts/shared/Meeting/MeetingEdit.tsx":
2210 /*!************************************************!*\
2211 !*** ./scripts/shared/Meeting/MeetingEdit.tsx ***!
2212 \************************************************/
2213 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2214
2215 "use strict";
2216 __webpack_require__.r(__webpack_exports__);
2217 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2218 /* harmony export */ "default": () => (/* binding */ MeetingsEditContainer)
2219 /* harmony export */ });
2220 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2221 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2222 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2223 /* harmony import */ var _MeetingController__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./MeetingController */ "./scripts/shared/Meeting/MeetingController.tsx");
2224 /* harmony import */ var _PreviewMeeting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PreviewMeeting */ "./scripts/shared/Meeting/PreviewMeeting.tsx");
2225 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2226 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2227 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2228 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
2229 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
2230 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; }
2231
2232 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; }
2233
2234 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; }
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246 function MeetingEdit(_ref) {
2247 var url = _ref.attributes.url,
2248 isSelected = _ref.isSelected,
2249 setAttributes = _ref.setAttributes,
2250 _ref$preview = _ref.preview,
2251 preview = _ref$preview === void 0 ? true : _ref$preview,
2252 _ref$origin = _ref.origin,
2253 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin;
2254 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.useBackgroundAppContext)();
2255 var monitorFormPreviewRender = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.usePostBackgroundMessage)();
2256
2257 var handleChange = function handleChange(newUrl) {
2258 setAttributes({
2259 url: newUrl
2260 });
2261 };
2262
2263 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2264 monitorFormPreviewRender({
2265 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_6__.ProxyMessages.TrackMeetingPreviewRender,
2266 payload: {
2267 origin: origin
2268 }
2269 });
2270 }, [origin]);
2271 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, {
2272 children: [(isSelected || !url) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingController__WEBPACK_IMPORTED_MODULE_2__["default"], {
2273 url: url,
2274 handleChange: handleChange
2275 }), preview && url && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PreviewMeeting__WEBPACK_IMPORTED_MODULE_3__["default"], {
2276 url: url
2277 })]
2278 });
2279 }
2280
2281 function MeetingsEditContainer(props) {
2282 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.BackgroudAppContext.Provider, {
2283 value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_8__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__.refreshToken),
2284 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MeetingEdit, _objectSpread({}, props))
2285 });
2286 }
2287
2288 /***/ }),
2289
2290 /***/ "./scripts/shared/Meeting/MeetingSelector.tsx":
2291 /*!****************************************************!*\
2292 !*** ./scripts/shared/Meeting/MeetingSelector.tsx ***!
2293 \****************************************************/
2294 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2295
2296 "use strict";
2297 __webpack_require__.r(__webpack_exports__);
2298 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2299 /* harmony export */ "default": () => (/* binding */ MeetingSelector)
2300 /* harmony export */ });
2301 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2302 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2303 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2304 /* harmony import */ var _Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/AsyncSelect */ "./scripts/shared/Common/AsyncSelect.tsx");
2305 /* harmony import */ var _UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpacer */ "./scripts/shared/UIComponents/UISpacer.ts");
2306 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2307 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
2308
2309
2310
2311
2312
2313 function MeetingSelector(_ref) {
2314 var options = _ref.options,
2315 onChange = _ref.onChange,
2316 value = _ref.value;
2317 var optionsWrapper = [{
2318 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Meeting name', 'leadin'),
2319 options: options
2320 }];
2321 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2322 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", {
2323 "data-test-id": "leadin-meeting-select",
2324 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
2325 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select a meeting scheduling page', 'leadin')
2326 })
2327 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_2__["default"], {
2328 defaultOptions: optionsWrapper,
2329 onChange: onChange,
2330 placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select a meeting', 'leadin'),
2331 value: value
2332 })]
2333 });
2334 }
2335
2336 /***/ }),
2337
2338 /***/ "./scripts/shared/Meeting/MeetingWarning.tsx":
2339 /*!***************************************************!*\
2340 !*** ./scripts/shared/Meeting/MeetingWarning.tsx ***!
2341 \***************************************************/
2342 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2343
2344 "use strict";
2345 __webpack_require__.r(__webpack_exports__);
2346 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2347 /* harmony export */ "default": () => (/* binding */ MeetingWarning)
2348 /* harmony export */ });
2349 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2350 /* harmony import */ var _UIComponents_UIAlert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../UIComponents/UIAlert */ "./scripts/shared/UIComponents/UIAlert.tsx");
2351 /* harmony import */ var _UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIButton */ "./scripts/shared/UIComponents/UIButton.ts");
2352 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants */ "./scripts/shared/Meeting/constants.ts");
2353 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2354 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
2355
2356
2357
2358
2359
2360 function MeetingWarning(_ref) {
2361 var status = _ref.status,
2362 onConnectCalendar = _ref.onConnectCalendar;
2363 var isMeetingOwner = status === _constants__WEBPACK_IMPORTED_MODULE_3__.CURRENT_USER_CALENDAR_MISSING;
2364 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');
2365 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');
2366 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIAlert__WEBPACK_IMPORTED_MODULE_1__["default"], {
2367 titleText: titleText,
2368 titleMessage: titleMessage,
2369 children: isMeetingOwner && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_2__["default"], {
2370 use: "tertiary",
2371 id: "meetings-connect-calendar",
2372 onClick: onConnectCalendar,
2373 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Connect calendar', 'leadin')
2374 })
2375 });
2376 }
2377
2378 /***/ }),
2379
2380 /***/ "./scripts/shared/Meeting/PreviewMeeting.tsx":
2381 /*!***************************************************!*\
2382 !*** ./scripts/shared/Meeting/PreviewMeeting.tsx ***!
2383 \***************************************************/
2384 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2385
2386 "use strict";
2387 __webpack_require__.r(__webpack_exports__);
2388 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2389 /* harmony export */ "default": () => (/* binding */ PreviewForm)
2390 /* harmony export */ });
2391 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2392 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2393 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2394 /* harmony import */ var _UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIOverlay */ "./scripts/shared/UIComponents/UIOverlay.ts");
2395 /* harmony import */ var _hooks_useMeetingsScript__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hooks/useMeetingsScript */ "./scripts/shared/Meeting/hooks/useMeetingsScript.ts");
2396
2397
2398
2399
2400 function PreviewForm(_ref) {
2401 var url = _ref.url;
2402 var ready = (0,_hooks_useMeetingsScript__WEBPACK_IMPORTED_MODULE_3__["default"])();
2403 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
2404 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2405 if (!ready) {
2406 return;
2407 }
2408
2409 if (inputEl.current) {
2410 inputEl.current.innerHTML = '';
2411 var container = document.createElement('div');
2412 container.dataset.src = "".concat(url, "?embed=true");
2413 container.classList.add('meetings-iframe-container');
2414 inputEl.current.appendChild(container);
2415 var embedScript = document.createElement('script');
2416 embedScript.innerHTML = 'hbspt.meetings.create(".meetings-iframe-container");';
2417 inputEl.current.appendChild(embedScript);
2418 }
2419 }, [url, ready, inputEl]);
2420 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2421 children: url && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__["default"], {
2422 ref: inputEl
2423 })
2424 });
2425 }
2426
2427 /***/ }),
2428
2429 /***/ "./scripts/shared/Meeting/constants.ts":
2430 /*!*********************************************!*\
2431 !*** ./scripts/shared/Meeting/constants.ts ***!
2432 \*********************************************/
2433 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2434
2435 "use strict";
2436 __webpack_require__.r(__webpack_exports__);
2437 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2438 /* harmony export */ "CURRENT_USER_CALENDAR_MISSING": () => (/* binding */ CURRENT_USER_CALENDAR_MISSING),
2439 /* harmony export */ "OTHER_USER_CALENDAR_MISSING": () => (/* binding */ OTHER_USER_CALENDAR_MISSING)
2440 /* harmony export */ });
2441 var OTHER_USER_CALENDAR_MISSING = 'OTHER_USER_CALENDAR_MISSING';
2442 var CURRENT_USER_CALENDAR_MISSING = 'CURRENT_USER_CALENDAR_MISSING';
2443
2444 /***/ }),
2445
2446 /***/ "./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts":
2447 /*!*************************************************************!*\
2448 !*** ./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts ***!
2449 \*************************************************************/
2450 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2451
2452 "use strict";
2453 __webpack_require__.r(__webpack_exports__);
2454 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2455 /* harmony export */ "default": () => (/* binding */ useCurrentUserFetch)
2456 /* harmony export */ });
2457 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2458 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2459 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2460 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2461 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2462 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2463
2464 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."); }
2465
2466 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); }
2467
2468 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; }
2469
2470 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; }
2471
2472 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2473
2474
2475
2476
2477
2478 var user = null;
2479 function useCurrentUserFetch() {
2480 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
2481
2482 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded),
2483 _useState2 = _slicedToArray(_useState, 2),
2484 loadState = _useState2[0],
2485 setLoadState = _useState2[1];
2486
2487 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2488 _useState4 = _slicedToArray(_useState3, 2),
2489 error = _useState4[0],
2490 setError = _useState4[1];
2491
2492 var createUser = function createUser() {
2493 if (!user) {
2494 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2495 }
2496 };
2497
2498 var reload = function reload() {
2499 user = null;
2500 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2501 setError(null);
2502 };
2503
2504 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2505 if (loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded && !user) {
2506 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
2507 proxy({
2508 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.FetchOrCreateMeetingUser
2509 }).then(function (data) {
2510 user = data;
2511 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
2512 })["catch"](function (err) {
2513 setError(err);
2514 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
2515 });
2516 }
2517 }, [loadState]);
2518 return {
2519 user: user,
2520 loadUserState: loadState,
2521 error: error,
2522 createUser: createUser,
2523 reload: reload
2524 };
2525 }
2526
2527 /***/ }),
2528
2529 /***/ "./scripts/shared/Meeting/hooks/useMeetings.ts":
2530 /*!*****************************************************!*\
2531 !*** ./scripts/shared/Meeting/hooks/useMeetings.ts ***!
2532 \*****************************************************/
2533 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2534
2535 "use strict";
2536 __webpack_require__.r(__webpack_exports__);
2537 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2538 /* harmony export */ "default": () => (/* binding */ useMeetings),
2539 /* harmony export */ "useSelectedMeeting": () => (/* binding */ useSelectedMeeting),
2540 /* harmony export */ "useSelectedMeetingCalendar": () => (/* binding */ useSelectedMeetingCalendar)
2541 /* harmony export */ });
2542 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2543 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2544 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2545 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
2546 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants */ "./scripts/shared/Meeting/constants.ts");
2547 /* harmony import */ var _useMeetingsFetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./useMeetingsFetch */ "./scripts/shared/Meeting/hooks/useMeetingsFetch.ts");
2548 /* harmony import */ var _useCurrentUserFetch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./useCurrentUserFetch */ "./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts");
2549 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2550 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2551 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2552 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; }
2553
2554 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; }
2555
2556 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; }
2557
2558 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2559
2560 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."); }
2561
2562 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); }
2563
2564 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; }
2565
2566 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; }
2567
2568 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579 function getDefaultMeetingName(meeting, currentUser, meetingUsers) {
2580 var _meeting$meetingsUser = _slicedToArray(meeting.meetingsUserIds, 1),
2581 meetingOwnerId = _meeting$meetingsUser[0];
2582
2583 var result = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Default', 'leadin');
2584
2585 if (currentUser && meetingOwnerId !== currentUser.id && meetingUsers[meetingOwnerId]) {
2586 var user = meetingUsers[meetingOwnerId];
2587 result += " (".concat(user.userProfile.fullName, ")");
2588 }
2589
2590 return result;
2591 }
2592
2593 function hasCalendarObject(user) {
2594 return user && user.meetingsUserBlob && user.meetingsUserBlob.calendarSettings && user.meetingsUserBlob.calendarSettings.email;
2595 }
2596
2597 function useMeetings() {
2598 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.usePostAsyncBackgroundMessage)();
2599
2600 var _useMeetingsFetch = (0,_useMeetingsFetch__WEBPACK_IMPORTED_MODULE_3__["default"])(),
2601 meetings = _useMeetingsFetch.meetings,
2602 meetingUsers = _useMeetingsFetch.meetingUsers,
2603 meetingsError = _useMeetingsFetch.error,
2604 loadMeetingsState = _useMeetingsFetch.loadMeetingsState,
2605 reloadMeetings = _useMeetingsFetch.reload;
2606
2607 var _useCurrentUserFetch = (0,_useCurrentUserFetch__WEBPACK_IMPORTED_MODULE_4__["default"])(),
2608 currentUser = _useCurrentUserFetch.user,
2609 userError = _useCurrentUserFetch.error,
2610 loadUserState = _useCurrentUserFetch.loadUserState,
2611 reloadUser = _useCurrentUserFetch.reload;
2612
2613 var reload = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
2614 reloadUser();
2615 reloadMeetings();
2616 }, [reloadUser, reloadMeetings]);
2617
2618 var connectCalendar = function connectCalendar() {
2619 return proxy({
2620 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__.ProxyMessages.ConnectMeetingsCalendar
2621 });
2622 };
2623
2624 return {
2625 mappedMeetings: meetings.map(function (meet) {
2626 return {
2627 label: meet.name || getDefaultMeetingName(meet, currentUser, meetingUsers),
2628 value: meet.link
2629 };
2630 }),
2631 meetings: meetings,
2632 meetingUsers: meetingUsers,
2633 currentUser: currentUser,
2634 error: meetingsError || userError,
2635 loading: loadMeetingsState == _enums_loadState__WEBPACK_IMPORTED_MODULE_5__["default"].Loading || loadUserState === _enums_loadState__WEBPACK_IMPORTED_MODULE_5__["default"].Loading,
2636 reload: reload,
2637 connectCalendar: connectCalendar
2638 };
2639 }
2640 function useSelectedMeeting(url) {
2641 var _useMeetings = useMeetings(),
2642 meetings = _useMeetings.mappedMeetings;
2643
2644 var option = meetings.find(function (_ref) {
2645 var value = _ref.value;
2646 return value === url;
2647 });
2648 return option;
2649 }
2650 function useSelectedMeetingCalendar(url) {
2651 var _useMeetings2 = useMeetings(),
2652 meetings = _useMeetings2.meetings,
2653 meetingUsers = _useMeetings2.meetingUsers,
2654 currentUser = _useMeetings2.currentUser;
2655
2656 var meeting = meetings.find(function (meet) {
2657 return meet.link === url;
2658 });
2659 var mappedMeetingUsersId = meetingUsers.reduce(function (p, c) {
2660 return _objectSpread(_objectSpread({}, p), {}, _defineProperty({}, c.id, c));
2661 }, {});
2662
2663 if (!meeting) {
2664 return null;
2665 } else {
2666 var meetingsUserIds = meeting.meetingsUserIds;
2667
2668 if (currentUser && meetingsUserIds.includes(currentUser.id) && !hasCalendarObject(currentUser)) {
2669 return _constants__WEBPACK_IMPORTED_MODULE_2__.CURRENT_USER_CALENDAR_MISSING;
2670 } else if (meetingsUserIds.map(function (id) {
2671 return mappedMeetingUsersId[id];
2672 }).some(function (user) {
2673 return !hasCalendarObject(user);
2674 })) {
2675 return _constants__WEBPACK_IMPORTED_MODULE_2__.OTHER_USER_CALENDAR_MISSING;
2676 } else {
2677 return null;
2678 }
2679 }
2680 }
2681
2682 /***/ }),
2683
2684 /***/ "./scripts/shared/Meeting/hooks/useMeetingsFetch.ts":
2685 /*!**********************************************************!*\
2686 !*** ./scripts/shared/Meeting/hooks/useMeetingsFetch.ts ***!
2687 \**********************************************************/
2688 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2689
2690 "use strict";
2691 __webpack_require__.r(__webpack_exports__);
2692 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2693 /* harmony export */ "default": () => (/* binding */ useMeetingsFetch)
2694 /* harmony export */ });
2695 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2696 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2697 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2698 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2699 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2700 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2701
2702 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."); }
2703
2704 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); }
2705
2706 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; }
2707
2708 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; }
2709
2710 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2711
2712
2713
2714
2715
2716 var meetings = [];
2717 var meetingUsers = [];
2718 function useMeetingsFetch() {
2719 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
2720
2721 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded),
2722 _useState2 = _slicedToArray(_useState, 2),
2723 loadState = _useState2[0],
2724 setLoadState = _useState2[1];
2725
2726 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2727 _useState4 = _slicedToArray(_useState3, 2),
2728 error = _useState4[0],
2729 setError = _useState4[1];
2730
2731 var reload = function reload() {
2732 meetings = [];
2733 setError(null);
2734 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2735 };
2736
2737 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2738 if (loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded && meetings.length === 0) {
2739 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
2740 proxy({
2741 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.FetchMeetingsAndUsers
2742 }).then(function (data) {
2743 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loaded);
2744 meetings = data && data.meetingLinks;
2745 meetingUsers = data && data.meetingUsers;
2746 })["catch"](function (e) {
2747 setError(e);
2748 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
2749 });
2750 }
2751 }, [loadState]);
2752 return {
2753 meetings: meetings,
2754 meetingUsers: meetingUsers,
2755 loadMeetingsState: loadState,
2756 error: error,
2757 reload: reload
2758 };
2759 }
2760
2761 /***/ }),
2762
2763 /***/ "./scripts/shared/Meeting/hooks/useMeetingsScript.ts":
2764 /*!***********************************************************!*\
2765 !*** ./scripts/shared/Meeting/hooks/useMeetingsScript.ts ***!
2766 \***********************************************************/
2767 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2768
2769 "use strict";
2770 __webpack_require__.r(__webpack_exports__);
2771 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2772 /* harmony export */ "default": () => (/* binding */ useMeetingsScript)
2773 /* harmony export */ });
2774 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
2775 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
2776 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2777 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2778 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2779 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../lib/Raven */ "./scripts/lib/Raven.ts");
2780 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2781
2782 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."); }
2783
2784 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); }
2785
2786 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; }
2787
2788 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; }
2789
2790 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2791
2792
2793
2794
2795
2796 var promise;
2797
2798 function loadMeetingsScript() {
2799 if (!promise) {
2800 promise = new Promise(function (resolve, reject) {
2801 return jquery__WEBPACK_IMPORTED_MODULE_0___default().getScript(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.meetingsScript).done(resolve).fail(reject);
2802 });
2803 }
2804
2805 return promise;
2806 }
2807
2808 function useMeetingsScript() {
2809 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
2810 _useState2 = _slicedToArray(_useState, 2),
2811 ready = _useState2[0],
2812 setReady = _useState2[1];
2813
2814 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2815 loadMeetingsScript().then(function () {
2816 return setReady(true);
2817 })["catch"](function (error) {
2818 return _lib_Raven__WEBPACK_IMPORTED_MODULE_3__["default"].captureException(error);
2819 });
2820 }, []);
2821 return ready;
2822 }
2823
2824 /***/ }),
2825
2826 /***/ "./scripts/shared/UIComponents/UIAlert.tsx":
2827 /*!*************************************************!*\
2828 !*** ./scripts/shared/UIComponents/UIAlert.tsx ***!
2829 \*************************************************/
2830 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2831
2832 "use strict";
2833 __webpack_require__.r(__webpack_exports__);
2834 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2835 /* harmony export */ "default": () => (/* binding */ UIAlert)
2836 /* harmony export */ });
2837 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2838 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2839
2840
2841 var AlertContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('div')({
2842 name: "AlertContainer",
2843 "class": "a1h8m4fo",
2844 propsAsIs: false
2845 });
2846 var Title = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('p')({
2847 name: "Title",
2848 "class": "tyndzxk",
2849 propsAsIs: false
2850 });
2851 var Message = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('p')({
2852 name: "Message",
2853 "class": "m1m9sbk4",
2854 propsAsIs: false
2855 });
2856 var MessageContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('div')({
2857 name: "MessageContainer",
2858 "class": "mg5o421",
2859 propsAsIs: false
2860 });
2861 function UIAlert(_ref) {
2862 var titleText = _ref.titleText,
2863 titleMessage = _ref.titleMessage,
2864 children = _ref.children;
2865 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(AlertContainer, {
2866 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(MessageContainer, {
2867 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Title, {
2868 children: titleText
2869 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Message, {
2870 children: titleMessage
2871 })]
2872 }), children]
2873 });
2874 }
2875
2876 __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");
2877
2878 /***/ }),
2879
2880 /***/ "./scripts/shared/UIComponents/UIButton.ts":
2881 /*!*************************************************!*\
2882 !*** ./scripts/shared/UIComponents/UIButton.ts ***!
2883 \*************************************************/
2884 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2885
2886 "use strict";
2887 __webpack_require__.r(__webpack_exports__);
2888 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2889 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2890 /* harmony export */ });
2891 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2892 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colors */ "./scripts/shared/UIComponents/colors.ts");
2893
2894
2895
2896 var _exp2 = /*#__PURE__*/function _exp2() {
2897 return function (props) {
2898 return props.use === 'tertiary' ? _colors__WEBPACK_IMPORTED_MODULE_0__.HEFFALUMP : _colors__WEBPACK_IMPORTED_MODULE_0__.LORAX;
2899 };
2900 };
2901
2902 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('button')({
2903 name: "UIButton0",
2904 "class": "ug152ch",
2905 propsAsIs: false,
2906 vars: {
2907 "ug152ch-0": [_exp2()]
2908 }
2909 }));
2910
2911 __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");
2912
2913 /***/ }),
2914
2915 /***/ "./scripts/shared/UIComponents/UIContainer.ts":
2916 /*!****************************************************!*\
2917 !*** ./scripts/shared/UIComponents/UIContainer.ts ***!
2918 \****************************************************/
2919 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2920
2921 "use strict";
2922 __webpack_require__.r(__webpack_exports__);
2923 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2924 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2925 /* harmony export */ });
2926 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2927
2928
2929 var _exp = /*#__PURE__*/function _exp() {
2930 return function (props) {
2931 return props.textAlign ? props.textAlign : 'inherit';
2932 };
2933 };
2934
2935 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
2936 name: "UIContainer0",
2937 "class": "ua13n1c",
2938 propsAsIs: false,
2939 vars: {
2940 "ua13n1c-0": [_exp()]
2941 }
2942 }));
2943
2944 __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");
2945
2946 /***/ }),
2947
2948 /***/ "./scripts/shared/UIComponents/UIOverlay.ts":
2949 /*!**************************************************!*\
2950 !*** ./scripts/shared/UIComponents/UIOverlay.ts ***!
2951 \**************************************************/
2952 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2953
2954 "use strict";
2955 __webpack_require__.r(__webpack_exports__);
2956 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2957 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2958 /* harmony export */ });
2959 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2960
2961 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
2962 name: "UIOverlay0",
2963 "class": "u1q7a48k",
2964 propsAsIs: false
2965 }));
2966
2967 __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");
2968
2969 /***/ }),
2970
2971 /***/ "./scripts/shared/UIComponents/UISpacer.ts":
2972 /*!*************************************************!*\
2973 !*** ./scripts/shared/UIComponents/UISpacer.ts ***!
2974 \*************************************************/
2975 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2976
2977 "use strict";
2978 __webpack_require__.r(__webpack_exports__);
2979 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2980 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2981 /* harmony export */ });
2982 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2983
2984 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
2985 name: "UISpacer0",
2986 "class": "u3qxofx",
2987 propsAsIs: false
2988 }));
2989
2990 __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");
2991
2992 /***/ }),
2993
2994 /***/ "./scripts/shared/UIComponents/UISpinner.tsx":
2995 /*!***************************************************!*\
2996 !*** ./scripts/shared/UIComponents/UISpinner.tsx ***!
2997 \***************************************************/
2998 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2999
3000 "use strict";
3001 __webpack_require__.r(__webpack_exports__);
3002 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3003 /* harmony export */ "default": () => (/* binding */ UISpinner)
3004 /* harmony export */ });
3005 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
3006 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3007 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./colors */ "./scripts/shared/UIComponents/colors.ts");
3008
3009
3010
3011 var SpinnerOuter = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('div')({
3012 name: "SpinnerOuter",
3013 "class": "sxa9zrc",
3014 propsAsIs: false
3015 });
3016 var SpinnerInner = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('div')({
3017 name: "SpinnerInner",
3018 "class": "s14430wa",
3019 propsAsIs: false
3020 });
3021
3022 var _exp = /*#__PURE__*/function _exp() {
3023 return function (props) {
3024 return props.color;
3025 };
3026 };
3027
3028 var Circle = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('circle')({
3029 name: "Circle",
3030 "class": "ct87ghk",
3031 propsAsIs: true,
3032 vars: {
3033 "ct87ghk-0": [_exp()]
3034 }
3035 });
3036
3037 var _exp2 = /*#__PURE__*/function _exp2() {
3038 return function (props) {
3039 return props.color;
3040 };
3041 };
3042
3043 var AnimatedCircle = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('circle')({
3044 name: "AnimatedCircle",
3045 "class": "avili0h",
3046 propsAsIs: true,
3047 vars: {
3048 "avili0h-0": [_exp2()]
3049 }
3050 });
3051 function UISpinner(_ref) {
3052 var _ref$size = _ref.size,
3053 size = _ref$size === void 0 ? 20 : _ref$size;
3054 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SpinnerOuter, {
3055 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SpinnerInner, {
3056 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
3057 height: size,
3058 width: size,
3059 viewBox: "0 0 50 50",
3060 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Circle, {
3061 color: _colors__WEBPACK_IMPORTED_MODULE_1__.CALYPSO_MEDIUM,
3062 cx: "25",
3063 cy: "25",
3064 r: "22.5"
3065 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(AnimatedCircle, {
3066 color: _colors__WEBPACK_IMPORTED_MODULE_1__.CALYPSO,
3067 cx: "25",
3068 cy: "25",
3069 r: "22.5"
3070 })]
3071 })
3072 })
3073 });
3074 }
3075
3076 __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");
3077
3078 /***/ }),
3079
3080 /***/ "./scripts/shared/UIComponents/colors.ts":
3081 /*!***********************************************!*\
3082 !*** ./scripts/shared/UIComponents/colors.ts ***!
3083 \***********************************************/
3084 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3085
3086 "use strict";
3087 __webpack_require__.r(__webpack_exports__);
3088 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3089 /* harmony export */ "CALYPSO": () => (/* binding */ CALYPSO),
3090 /* harmony export */ "CALYPSO_LIGHT": () => (/* binding */ CALYPSO_LIGHT),
3091 /* harmony export */ "CALYPSO_MEDIUM": () => (/* binding */ CALYPSO_MEDIUM),
3092 /* harmony export */ "HEFFALUMP": () => (/* binding */ HEFFALUMP),
3093 /* harmony export */ "LORAX": () => (/* binding */ LORAX),
3094 /* harmony export */ "MARIGOLD_LIGHT": () => (/* binding */ MARIGOLD_LIGHT),
3095 /* harmony export */ "MARIGOLD_MEDIUM": () => (/* binding */ MARIGOLD_MEDIUM),
3096 /* harmony export */ "OBSIDIAN": () => (/* binding */ OBSIDIAN),
3097 /* harmony export */ "OLAF": () => (/* binding */ OLAF)
3098 /* harmony export */ });
3099 var CALYPSO = '#00a4bd';
3100 var CALYPSO_MEDIUM = '#7fd1de';
3101 var CALYPSO_LIGHT = '#e5f5f8';
3102 var LORAX = '#ff7a59';
3103 var OLAF = '#ffffff';
3104 var HEFFALUMP = '#425b76';
3105 var MARIGOLD_LIGHT = '#fef8f0';
3106 var MARIGOLD_MEDIUM = '#fae0b5';
3107 var OBSIDIAN = '#33475b';
3108
3109 /***/ }),
3110
3111 /***/ "./scripts/shared/enums/connectionStatus.ts":
3112 /*!**************************************************!*\
3113 !*** ./scripts/shared/enums/connectionStatus.ts ***!
3114 \**************************************************/
3115 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3116
3117 "use strict";
3118 __webpack_require__.r(__webpack_exports__);
3119 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3120 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3121 /* harmony export */ });
3122 var ConnectionStatus = {
3123 Connected: 'Connected',
3124 NotConnected: 'NotConnected'
3125 };
3126 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ConnectionStatus);
3127
3128 /***/ }),
3129
3130 /***/ "./scripts/shared/enums/loadState.ts":
3131 /*!*******************************************!*\
3132 !*** ./scripts/shared/enums/loadState.ts ***!
3133 \*******************************************/
3134 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3135
3136 "use strict";
3137 __webpack_require__.r(__webpack_exports__);
3138 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3139 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3140 /* harmony export */ });
3141 var LoadState = {
3142 NotLoaded: 'NotLoaded',
3143 Loading: 'Loading',
3144 Loaded: 'Loaded',
3145 Idle: 'Idle',
3146 Failed: 'Failed'
3147 };
3148 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LoadState);
3149
3150 /***/ }),
3151
3152 /***/ "./scripts/utils/appUtils.ts":
3153 /*!***********************************!*\
3154 !*** ./scripts/utils/appUtils.ts ***!
3155 \***********************************/
3156 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3157
3158 "use strict";
3159 __webpack_require__.r(__webpack_exports__);
3160 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3161 /* harmony export */ "initApp": () => (/* binding */ initApp),
3162 /* harmony export */ "initAppOnReady": () => (/* binding */ initAppOnReady)
3163 /* harmony export */ });
3164 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
3165 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
3166 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lib/Raven */ "./scripts/lib/Raven.ts");
3167
3168
3169 function initApp(initFn) {
3170 (0,_lib_Raven__WEBPACK_IMPORTED_MODULE_1__.configureRaven)();
3171 _lib_Raven__WEBPACK_IMPORTED_MODULE_1__["default"].context(initFn);
3172 }
3173 function initAppOnReady(initFn) {
3174 function main() {
3175 jquery__WEBPACK_IMPORTED_MODULE_0___default()(initFn);
3176 }
3177
3178 initApp(main);
3179 }
3180
3181 /***/ }),
3182
3183 /***/ "./scripts/utils/backgroundAppUtils.ts":
3184 /*!*********************************************!*\
3185 !*** ./scripts/utils/backgroundAppUtils.ts ***!
3186 \*********************************************/
3187 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3188
3189 "use strict";
3190 __webpack_require__.r(__webpack_exports__);
3191 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3192 /* harmony export */ "getOrCreateBackgroundApp": () => (/* binding */ getOrCreateBackgroundApp),
3193 /* harmony export */ "initBackgroundApp": () => (/* binding */ initBackgroundApp)
3194 /* harmony export */ });
3195 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
3196 /* harmony import */ var _appUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./appUtils */ "./scripts/utils/appUtils.ts");
3197
3198
3199 function initBackgroundApp(initFn) {
3200 function main() {
3201 if (Array.isArray(initFn)) {
3202 initFn.forEach(function (callback) {
3203 return callback();
3204 });
3205 } else {
3206 initFn();
3207 }
3208 }
3209
3210 (0,_appUtils__WEBPACK_IMPORTED_MODULE_1__.initApp)(main);
3211 }
3212 var getOrCreateBackgroundApp = function getOrCreateBackgroundApp(refreshToken) {
3213 if (window.LeadinBackgroundApp) {
3214 return window.LeadinBackgroundApp;
3215 }
3216
3217 var _window = window,
3218 IntegratedAppEmbedder = _window.IntegratedAppEmbedder,
3219 IntegratedAppOptions = _window.IntegratedAppOptions;
3220 var options = new IntegratedAppOptions().setLocale(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.locale).setDeviceId(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.deviceId).setRefreshToken(refreshToken);
3221 var embedder = new IntegratedAppEmbedder('integrated-plugin-proxy', _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.portalId, _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.hubspotBaseUrl, function () {}).setOptions(options);
3222 embedder.attachTo(document.body, false);
3223 embedder.postStartAppMessage(); // lets the app know all all data has been passed to it
3224
3225 window.LeadinBackgroundApp = embedder;
3226 return window.LeadinBackgroundApp;
3227 };
3228
3229 /***/ }),
3230
3231 /***/ "./scripts/utils/withMetaData.ts":
3232 /*!***************************************!*\
3233 !*** ./scripts/utils/withMetaData.ts ***!
3234 \***************************************/
3235 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3236
3237 "use strict";
3238 __webpack_require__.r(__webpack_exports__);
3239 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3240 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3241 /* harmony export */ });
3242 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
3243 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
3244 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; }
3245
3246
3247 var applyWithSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.withSelect)(function (select, props) {
3248 return {
3249 metaValue: select('core/editor').getEditedPostAttribute('meta')[props.metaKey]
3250 };
3251 });
3252 var applyWithDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.withDispatch)(function (dispatch, props) {
3253 return {
3254 setMetaValue: function setMetaValue(value) {
3255 dispatch('core/editor').editPost({
3256 meta: _defineProperty({}, props.metaKey, value)
3257 });
3258 }
3259 };
3260 });
3261
3262 function apply(el) {
3263 return applyWithSelect(applyWithDispatch(el));
3264 }
3265
3266 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (apply);
3267
3268 /***/ }),
3269
3270 /***/ "./node_modules/is-what/dist/index.esm.js":
3271 /*!************************************************!*\
3272 !*** ./node_modules/is-what/dist/index.esm.js ***!
3273 \************************************************/
3274 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3275
3276 "use strict";
3277 __webpack_require__.r(__webpack_exports__);
3278 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3279 /* harmony export */ "getType": () => (/* binding */ getType),
3280 /* harmony export */ "isAnyObject": () => (/* binding */ isAnyObject),
3281 /* harmony export */ "isArray": () => (/* binding */ isArray),
3282 /* harmony export */ "isBlob": () => (/* binding */ isBlob),
3283 /* harmony export */ "isBoolean": () => (/* binding */ isBoolean),
3284 /* harmony export */ "isDate": () => (/* binding */ isDate),
3285 /* harmony export */ "isEmptyArray": () => (/* binding */ isEmptyArray),
3286 /* harmony export */ "isEmptyObject": () => (/* binding */ isEmptyObject),
3287 /* harmony export */ "isEmptyString": () => (/* binding */ isEmptyString),
3288 /* harmony export */ "isError": () => (/* binding */ isError),
3289 /* harmony export */ "isFile": () => (/* binding */ isFile),
3290 /* harmony export */ "isFullArray": () => (/* binding */ isFullArray),
3291 /* harmony export */ "isFullObject": () => (/* binding */ isFullObject),
3292 /* harmony export */ "isFullString": () => (/* binding */ isFullString),
3293 /* harmony export */ "isFunction": () => (/* binding */ isFunction),
3294 /* harmony export */ "isMap": () => (/* binding */ isMap),
3295 /* harmony export */ "isNaNValue": () => (/* binding */ isNaNValue),
3296 /* harmony export */ "isNull": () => (/* binding */ isNull),
3297 /* harmony export */ "isNullOrUndefined": () => (/* binding */ isNullOrUndefined),
3298 /* harmony export */ "isNumber": () => (/* binding */ isNumber),
3299 /* harmony export */ "isObject": () => (/* binding */ isObject),
3300 /* harmony export */ "isObjectLike": () => (/* binding */ isObjectLike),
3301 /* harmony export */ "isOneOf": () => (/* binding */ isOneOf),
3302 /* harmony export */ "isPlainObject": () => (/* binding */ isPlainObject),
3303 /* harmony export */ "isPrimitive": () => (/* binding */ isPrimitive),
3304 /* harmony export */ "isPromise": () => (/* binding */ isPromise),
3305 /* harmony export */ "isRegExp": () => (/* binding */ isRegExp),
3306 /* harmony export */ "isSet": () => (/* binding */ isSet),
3307 /* harmony export */ "isString": () => (/* binding */ isString),
3308 /* harmony export */ "isSymbol": () => (/* binding */ isSymbol),
3309 /* harmony export */ "isType": () => (/* binding */ isType),
3310 /* harmony export */ "isUndefined": () => (/* binding */ isUndefined),
3311 /* harmony export */ "isWeakMap": () => (/* binding */ isWeakMap),
3312 /* harmony export */ "isWeakSet": () => (/* binding */ isWeakSet)
3313 /* harmony export */ });
3314 /**
3315 * Returns the object type of the given payload
3316 *
3317 * @param {*} payload
3318 * @returns {string}
3319 */
3320 function getType(payload) {
3321 return Object.prototype.toString.call(payload).slice(8, -1);
3322 }
3323 /**
3324 * Returns whether the payload is undefined
3325 *
3326 * @param {*} payload
3327 * @returns {payload is undefined}
3328 */
3329 function isUndefined(payload) {
3330 return getType(payload) === 'Undefined';
3331 }
3332 /**
3333 * Returns whether the payload is null
3334 *
3335 * @param {*} payload
3336 * @returns {payload is null}
3337 */
3338 function isNull(payload) {
3339 return getType(payload) === 'Null';
3340 }
3341 /**
3342 * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
3343 *
3344 * @param {*} payload
3345 * @returns {payload is PlainObject}
3346 */
3347 function isPlainObject(payload) {
3348 if (getType(payload) !== 'Object')
3349 return false;
3350 return payload.constructor === Object && Object.getPrototypeOf(payload) === Object.prototype;
3351 }
3352 /**
3353 * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
3354 *
3355 * @param {*} payload
3356 * @returns {payload is PlainObject}
3357 */
3358 function isObject(payload) {
3359 return isPlainObject(payload);
3360 }
3361 /**
3362 * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
3363 *
3364 * @param {*} payload
3365 * @returns {payload is { [K in any]: never }}
3366 */
3367 function isEmptyObject(payload) {
3368 return isPlainObject(payload) && Object.keys(payload).length === 0;
3369 }
3370 /**
3371 * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
3372 *
3373 * @param {*} payload
3374 * @returns {payload is PlainObject}
3375 */
3376 function isFullObject(payload) {
3377 return isPlainObject(payload) && Object.keys(payload).length > 0;
3378 }
3379 /**
3380 * Returns whether the payload is an any kind of object (including special classes or objects with different prototypes)
3381 *
3382 * @param {*} payload
3383 * @returns {payload is PlainObject}
3384 */
3385 function isAnyObject(payload) {
3386 return getType(payload) === 'Object';
3387 }
3388 /**
3389 * Returns whether the payload is an object like a type passed in < >
3390 *
3391 * Usage: isObjectLike<{id: any}>(payload) // will make sure it's an object and has an `id` prop.
3392 *
3393 * @template T this must be passed in < >
3394 * @param {*} payload
3395 * @returns {payload is T}
3396 */
3397 function isObjectLike(payload) {
3398 return isAnyObject(payload);
3399 }
3400 /**
3401 * Returns whether the payload is a function (regular or async)
3402 *
3403 * @param {*} payload
3404 * @returns {payload is AnyFunction}
3405 */
3406 function isFunction(payload) {
3407 return typeof payload === 'function';
3408 }
3409 /**
3410 * Returns whether the payload is an array
3411 *
3412 * @param {any} payload
3413 * @returns {payload is any[]}
3414 */
3415 function isArray(payload) {
3416 return getType(payload) === 'Array';
3417 }
3418 /**
3419 * Returns whether the payload is a an array with at least 1 item
3420 *
3421 * @param {*} payload
3422 * @returns {payload is any[]}
3423 */
3424 function isFullArray(payload) {
3425 return isArray(payload) && payload.length > 0;
3426 }
3427 /**
3428 * Returns whether the payload is a an empty array
3429 *
3430 * @param {*} payload
3431 * @returns {payload is []}
3432 */
3433 function isEmptyArray(payload) {
3434 return isArray(payload) && payload.length === 0;
3435 }
3436 /**
3437 * Returns whether the payload is a string
3438 *
3439 * @param {*} payload
3440 * @returns {payload is string}
3441 */
3442 function isString(payload) {
3443 return getType(payload) === 'String';
3444 }
3445 /**
3446 * Returns whether the payload is a string, BUT returns false for ''
3447 *
3448 * @param {*} payload
3449 * @returns {payload is string}
3450 */
3451 function isFullString(payload) {
3452 return isString(payload) && payload !== '';
3453 }
3454 /**
3455 * Returns whether the payload is ''
3456 *
3457 * @param {*} payload
3458 * @returns {payload is string}
3459 */
3460 function isEmptyString(payload) {
3461 return payload === '';
3462 }
3463 /**
3464 * Returns whether the payload is a number (but not NaN)
3465 *
3466 * This will return `false` for `NaN`!!
3467 *
3468 * @param {*} payload
3469 * @returns {payload is number}
3470 */
3471 function isNumber(payload) {
3472 return getType(payload) === 'Number' && !isNaN(payload);
3473 }
3474 /**
3475 * Returns whether the payload is a boolean
3476 *
3477 * @param {*} payload
3478 * @returns {payload is boolean}
3479 */
3480 function isBoolean(payload) {
3481 return getType(payload) === 'Boolean';
3482 }
3483 /**
3484 * Returns whether the payload is a regular expression (RegExp)
3485 *
3486 * @param {*} payload
3487 * @returns {payload is RegExp}
3488 */
3489 function isRegExp(payload) {
3490 return getType(payload) === 'RegExp';
3491 }
3492 /**
3493 * Returns whether the payload is a Map
3494 *
3495 * @param {*} payload
3496 * @returns {payload is Map<any, any>}
3497 */
3498 function isMap(payload) {
3499 return getType(payload) === 'Map';
3500 }
3501 /**
3502 * Returns whether the payload is a WeakMap
3503 *
3504 * @param {*} payload
3505 * @returns {payload is WeakMap<any, any>}
3506 */
3507 function isWeakMap(payload) {
3508 return getType(payload) === 'WeakMap';
3509 }
3510 /**
3511 * Returns whether the payload is a Set
3512 *
3513 * @param {*} payload
3514 * @returns {payload is Set<any>}
3515 */
3516 function isSet(payload) {
3517 return getType(payload) === 'Set';
3518 }
3519 /**
3520 * Returns whether the payload is a WeakSet
3521 *
3522 * @param {*} payload
3523 * @returns {payload is WeakSet<any>}
3524 */
3525 function isWeakSet(payload) {
3526 return getType(payload) === 'WeakSet';
3527 }
3528 /**
3529 * Returns whether the payload is a Symbol
3530 *
3531 * @param {*} payload
3532 * @returns {payload is symbol}
3533 */
3534 function isSymbol(payload) {
3535 return getType(payload) === 'Symbol';
3536 }
3537 /**
3538 * Returns whether the payload is a Date, and that the date is valid
3539 *
3540 * @param {*} payload
3541 * @returns {payload is Date}
3542 */
3543 function isDate(payload) {
3544 return getType(payload) === 'Date' && !isNaN(payload);
3545 }
3546 /**
3547 * Returns whether the payload is a Blob
3548 *
3549 * @param {*} payload
3550 * @returns {payload is Blob}
3551 */
3552 function isBlob(payload) {
3553 return getType(payload) === 'Blob';
3554 }
3555 /**
3556 * Returns whether the payload is a File
3557 *
3558 * @param {*} payload
3559 * @returns {payload is File}
3560 */
3561 function isFile(payload) {
3562 return getType(payload) === 'File';
3563 }
3564 /**
3565 * Returns whether the payload is a Promise
3566 *
3567 * @param {*} payload
3568 * @returns {payload is Promise<any>}
3569 */
3570 function isPromise(payload) {
3571 return getType(payload) === 'Promise';
3572 }
3573 /**
3574 * Returns whether the payload is an Error
3575 *
3576 * @param {*} payload
3577 * @returns {payload is Error}
3578 */
3579 function isError(payload) {
3580 return getType(payload) === 'Error';
3581 }
3582 /**
3583 * Returns whether the payload is literally the value `NaN` (it's `NaN` and also a `number`)
3584 *
3585 * @param {*} payload
3586 * @returns {payload is typeof NaN}
3587 */
3588 function isNaNValue(payload) {
3589 return getType(payload) === 'Number' && isNaN(payload);
3590 }
3591 /**
3592 * Returns whether the payload is a primitive type (eg. Boolean | Null | Undefined | Number | String | Symbol)
3593 *
3594 * @param {*} payload
3595 * @returns {(payload is boolean | null | undefined | number | string | symbol)}
3596 */
3597 function isPrimitive(payload) {
3598 return (isBoolean(payload) ||
3599 isNull(payload) ||
3600 isUndefined(payload) ||
3601 isNumber(payload) ||
3602 isString(payload) ||
3603 isSymbol(payload));
3604 }
3605 /**
3606 * Returns true whether the payload is null or undefined
3607 *
3608 * @param {*} payload
3609 * @returns {(payload is null | undefined)}
3610 */
3611 var isNullOrUndefined = isOneOf(isNull, isUndefined);
3612 function isOneOf(a, b, c, d, e) {
3613 return function (value) {
3614 return a(value) || b(value) || (!!c && c(value)) || (!!d && d(value)) || (!!e && e(value));
3615 };
3616 }
3617 /**
3618 * Does a generic check to check that the given payload is of a given type.
3619 * In cases like Number, it will return true for NaN as NaN is a Number (thanks javascript!);
3620 * It will, however, differentiate between object and null
3621 *
3622 * @template T
3623 * @param {*} payload
3624 * @param {T} type
3625 * @throws {TypeError} Will throw type error if type is an invalid type
3626 * @returns {payload is T}
3627 */
3628 function isType(payload, type) {
3629 if (!(type instanceof Function)) {
3630 throw new TypeError('Type must be a function');
3631 }
3632 if (!Object.prototype.hasOwnProperty.call(type, 'prototype')) {
3633 throw new TypeError('Type is not a class');
3634 }
3635 // Classes usually have names (as functions usually have names)
3636 var name = type.name;
3637 return getType(payload) === name || Boolean(payload && payload.constructor === type);
3638 }
3639
3640
3641
3642
3643 /***/ }),
3644
3645 /***/ "./node_modules/lodash/_Symbol.js":
3646 /*!****************************************!*\
3647 !*** ./node_modules/lodash/_Symbol.js ***!
3648 \****************************************/
3649 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3650
3651 var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
3652
3653 /** Built-in value references. */
3654 var Symbol = root.Symbol;
3655
3656 module.exports = Symbol;
3657
3658
3659 /***/ }),
3660
3661 /***/ "./node_modules/lodash/_baseGetTag.js":
3662 /*!********************************************!*\
3663 !*** ./node_modules/lodash/_baseGetTag.js ***!
3664 \********************************************/
3665 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3666
3667 var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"),
3668 getRawTag = __webpack_require__(/*! ./_getRawTag */ "./node_modules/lodash/_getRawTag.js"),
3669 objectToString = __webpack_require__(/*! ./_objectToString */ "./node_modules/lodash/_objectToString.js");
3670
3671 /** `Object#toString` result references. */
3672 var nullTag = '[object Null]',
3673 undefinedTag = '[object Undefined]';
3674
3675 /** Built-in value references. */
3676 var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
3677
3678 /**
3679 * The base implementation of `getTag` without fallbacks for buggy environments.
3680 *
3681 * @private
3682 * @param {*} value The value to query.
3683 * @returns {string} Returns the `toStringTag`.
3684 */
3685 function baseGetTag(value) {
3686 if (value == null) {
3687 return value === undefined ? undefinedTag : nullTag;
3688 }
3689 return (symToStringTag && symToStringTag in Object(value))
3690 ? getRawTag(value)
3691 : objectToString(value);
3692 }
3693
3694 module.exports = baseGetTag;
3695
3696
3697 /***/ }),
3698
3699 /***/ "./node_modules/lodash/_baseTrim.js":
3700 /*!******************************************!*\
3701 !*** ./node_modules/lodash/_baseTrim.js ***!
3702 \******************************************/
3703 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3704
3705 var trimmedEndIndex = __webpack_require__(/*! ./_trimmedEndIndex */ "./node_modules/lodash/_trimmedEndIndex.js");
3706
3707 /** Used to match leading whitespace. */
3708 var reTrimStart = /^\s+/;
3709
3710 /**
3711 * The base implementation of `_.trim`.
3712 *
3713 * @private
3714 * @param {string} string The string to trim.
3715 * @returns {string} Returns the trimmed string.
3716 */
3717 function baseTrim(string) {
3718 return string
3719 ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
3720 : string;
3721 }
3722
3723 module.exports = baseTrim;
3724
3725
3726 /***/ }),
3727
3728 /***/ "./node_modules/lodash/_freeGlobal.js":
3729 /*!********************************************!*\
3730 !*** ./node_modules/lodash/_freeGlobal.js ***!
3731 \********************************************/
3732 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3733
3734 /** Detect free variable `global` from Node.js. */
3735 var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
3736
3737 module.exports = freeGlobal;
3738
3739
3740 /***/ }),
3741
3742 /***/ "./node_modules/lodash/_getRawTag.js":
3743 /*!*******************************************!*\
3744 !*** ./node_modules/lodash/_getRawTag.js ***!
3745 \*******************************************/
3746 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3747
3748 var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js");
3749
3750 /** Used for built-in method references. */
3751 var objectProto = Object.prototype;
3752
3753 /** Used to check objects for own properties. */
3754 var hasOwnProperty = objectProto.hasOwnProperty;
3755
3756 /**
3757 * Used to resolve the
3758 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3759 * of values.
3760 */
3761 var nativeObjectToString = objectProto.toString;
3762
3763 /** Built-in value references. */
3764 var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
3765
3766 /**
3767 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
3768 *
3769 * @private
3770 * @param {*} value The value to query.
3771 * @returns {string} Returns the raw `toStringTag`.
3772 */
3773 function getRawTag(value) {
3774 var isOwn = hasOwnProperty.call(value, symToStringTag),
3775 tag = value[symToStringTag];
3776
3777 try {
3778 value[symToStringTag] = undefined;
3779 var unmasked = true;
3780 } catch (e) {}
3781
3782 var result = nativeObjectToString.call(value);
3783 if (unmasked) {
3784 if (isOwn) {
3785 value[symToStringTag] = tag;
3786 } else {
3787 delete value[symToStringTag];
3788 }
3789 }
3790 return result;
3791 }
3792
3793 module.exports = getRawTag;
3794
3795
3796 /***/ }),
3797
3798 /***/ "./node_modules/lodash/_objectToString.js":
3799 /*!************************************************!*\
3800 !*** ./node_modules/lodash/_objectToString.js ***!
3801 \************************************************/
3802 /***/ ((module) => {
3803
3804 /** Used for built-in method references. */
3805 var objectProto = Object.prototype;
3806
3807 /**
3808 * Used to resolve the
3809 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3810 * of values.
3811 */
3812 var nativeObjectToString = objectProto.toString;
3813
3814 /**
3815 * Converts `value` to a string using `Object.prototype.toString`.
3816 *
3817 * @private
3818 * @param {*} value The value to convert.
3819 * @returns {string} Returns the converted string.
3820 */
3821 function objectToString(value) {
3822 return nativeObjectToString.call(value);
3823 }
3824
3825 module.exports = objectToString;
3826
3827
3828 /***/ }),
3829
3830 /***/ "./node_modules/lodash/_root.js":
3831 /*!**************************************!*\
3832 !*** ./node_modules/lodash/_root.js ***!
3833 \**************************************/
3834 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3835
3836 var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js");
3837
3838 /** Detect free variable `self`. */
3839 var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
3840
3841 /** Used as a reference to the global object. */
3842 var root = freeGlobal || freeSelf || Function('return this')();
3843
3844 module.exports = root;
3845
3846
3847 /***/ }),
3848
3849 /***/ "./node_modules/lodash/_trimmedEndIndex.js":
3850 /*!*************************************************!*\
3851 !*** ./node_modules/lodash/_trimmedEndIndex.js ***!
3852 \*************************************************/
3853 /***/ ((module) => {
3854
3855 /** Used to match a single whitespace character. */
3856 var reWhitespace = /\s/;
3857
3858 /**
3859 * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
3860 * character of `string`.
3861 *
3862 * @private
3863 * @param {string} string The string to inspect.
3864 * @returns {number} Returns the index of the last non-whitespace character.
3865 */
3866 function trimmedEndIndex(string) {
3867 var index = string.length;
3868
3869 while (index-- && reWhitespace.test(string.charAt(index))) {}
3870 return index;
3871 }
3872
3873 module.exports = trimmedEndIndex;
3874
3875
3876 /***/ }),
3877
3878 /***/ "./node_modules/lodash/debounce.js":
3879 /*!*****************************************!*\
3880 !*** ./node_modules/lodash/debounce.js ***!
3881 \*****************************************/
3882 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3883
3884 var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
3885 now = __webpack_require__(/*! ./now */ "./node_modules/lodash/now.js"),
3886 toNumber = __webpack_require__(/*! ./toNumber */ "./node_modules/lodash/toNumber.js");
3887
3888 /** Error message constants. */
3889 var FUNC_ERROR_TEXT = 'Expected a function';
3890
3891 /* Built-in method references for those with the same name as other `lodash` methods. */
3892 var nativeMax = Math.max,
3893 nativeMin = Math.min;
3894
3895 /**
3896 * Creates a debounced function that delays invoking `func` until after `wait`
3897 * milliseconds have elapsed since the last time the debounced function was
3898 * invoked. The debounced function comes with a `cancel` method to cancel
3899 * delayed `func` invocations and a `flush` method to immediately invoke them.
3900 * Provide `options` to indicate whether `func` should be invoked on the
3901 * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
3902 * with the last arguments provided to the debounced function. Subsequent
3903 * calls to the debounced function return the result of the last `func`
3904 * invocation.
3905 *
3906 * **Note:** If `leading` and `trailing` options are `true`, `func` is
3907 * invoked on the trailing edge of the timeout only if the debounced function
3908 * is invoked more than once during the `wait` timeout.
3909 *
3910 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
3911 * until to the next tick, similar to `setTimeout` with a timeout of `0`.
3912 *
3913 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
3914 * for details over the differences between `_.debounce` and `_.throttle`.
3915 *
3916 * @static
3917 * @memberOf _
3918 * @since 0.1.0
3919 * @category Function
3920 * @param {Function} func The function to debounce.
3921 * @param {number} [wait=0] The number of milliseconds to delay.
3922 * @param {Object} [options={}] The options object.
3923 * @param {boolean} [options.leading=false]
3924 * Specify invoking on the leading edge of the timeout.
3925 * @param {number} [options.maxWait]
3926 * The maximum time `func` is allowed to be delayed before it's invoked.
3927 * @param {boolean} [options.trailing=true]
3928 * Specify invoking on the trailing edge of the timeout.
3929 * @returns {Function} Returns the new debounced function.
3930 * @example
3931 *
3932 * // Avoid costly calculations while the window size is in flux.
3933 * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
3934 *
3935 * // Invoke `sendMail` when clicked, debouncing subsequent calls.
3936 * jQuery(element).on('click', _.debounce(sendMail, 300, {
3937 * 'leading': true,
3938 * 'trailing': false
3939 * }));
3940 *
3941 * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
3942 * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
3943 * var source = new EventSource('/stream');
3944 * jQuery(source).on('message', debounced);
3945 *
3946 * // Cancel the trailing debounced invocation.
3947 * jQuery(window).on('popstate', debounced.cancel);
3948 */
3949 function debounce(func, wait, options) {
3950 var lastArgs,
3951 lastThis,
3952 maxWait,
3953 result,
3954 timerId,
3955 lastCallTime,
3956 lastInvokeTime = 0,
3957 leading = false,
3958 maxing = false,
3959 trailing = true;
3960
3961 if (typeof func != 'function') {
3962 throw new TypeError(FUNC_ERROR_TEXT);
3963 }
3964 wait = toNumber(wait) || 0;
3965 if (isObject(options)) {
3966 leading = !!options.leading;
3967 maxing = 'maxWait' in options;
3968 maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
3969 trailing = 'trailing' in options ? !!options.trailing : trailing;
3970 }
3971
3972 function invokeFunc(time) {
3973 var args = lastArgs,
3974 thisArg = lastThis;
3975
3976 lastArgs = lastThis = undefined;
3977 lastInvokeTime = time;
3978 result = func.apply(thisArg, args);
3979 return result;
3980 }
3981
3982 function leadingEdge(time) {
3983 // Reset any `maxWait` timer.
3984 lastInvokeTime = time;
3985 // Start the timer for the trailing edge.
3986 timerId = setTimeout(timerExpired, wait);
3987 // Invoke the leading edge.
3988 return leading ? invokeFunc(time) : result;
3989 }
3990
3991 function remainingWait(time) {
3992 var timeSinceLastCall = time - lastCallTime,
3993 timeSinceLastInvoke = time - lastInvokeTime,
3994 timeWaiting = wait - timeSinceLastCall;
3995
3996 return maxing
3997 ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
3998 : timeWaiting;
3999 }
4000
4001 function shouldInvoke(time) {
4002 var timeSinceLastCall = time - lastCallTime,
4003 timeSinceLastInvoke = time - lastInvokeTime;
4004
4005 // Either this is the first call, activity has stopped and we're at the
4006 // trailing edge, the system time has gone backwards and we're treating
4007 // it as the trailing edge, or we've hit the `maxWait` limit.
4008 return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
4009 (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
4010 }
4011
4012 function timerExpired() {
4013 var time = now();
4014 if (shouldInvoke(time)) {
4015 return trailingEdge(time);
4016 }
4017 // Restart the timer.
4018 timerId = setTimeout(timerExpired, remainingWait(time));
4019 }
4020
4021 function trailingEdge(time) {
4022 timerId = undefined;
4023
4024 // Only invoke if we have `lastArgs` which means `func` has been
4025 // debounced at least once.
4026 if (trailing && lastArgs) {
4027 return invokeFunc(time);
4028 }
4029 lastArgs = lastThis = undefined;
4030 return result;
4031 }
4032
4033 function cancel() {
4034 if (timerId !== undefined) {
4035 clearTimeout(timerId);
4036 }
4037 lastInvokeTime = 0;
4038 lastArgs = lastCallTime = lastThis = timerId = undefined;
4039 }
4040
4041 function flush() {
4042 return timerId === undefined ? result : trailingEdge(now());
4043 }
4044
4045 function debounced() {
4046 var time = now(),
4047 isInvoking = shouldInvoke(time);
4048
4049 lastArgs = arguments;
4050 lastThis = this;
4051 lastCallTime = time;
4052
4053 if (isInvoking) {
4054 if (timerId === undefined) {
4055 return leadingEdge(lastCallTime);
4056 }
4057 if (maxing) {
4058 // Handle invocations in a tight loop.
4059 clearTimeout(timerId);
4060 timerId = setTimeout(timerExpired, wait);
4061 return invokeFunc(lastCallTime);
4062 }
4063 }
4064 if (timerId === undefined) {
4065 timerId = setTimeout(timerExpired, wait);
4066 }
4067 return result;
4068 }
4069 debounced.cancel = cancel;
4070 debounced.flush = flush;
4071 return debounced;
4072 }
4073
4074 module.exports = debounce;
4075
4076
4077 /***/ }),
4078
4079 /***/ "./node_modules/lodash/isObject.js":
4080 /*!*****************************************!*\
4081 !*** ./node_modules/lodash/isObject.js ***!
4082 \*****************************************/
4083 /***/ ((module) => {
4084
4085 /**
4086 * Checks if `value` is the
4087 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
4088 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
4089 *
4090 * @static
4091 * @memberOf _
4092 * @since 0.1.0
4093 * @category Lang
4094 * @param {*} value The value to check.
4095 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
4096 * @example
4097 *
4098 * _.isObject({});
4099 * // => true
4100 *
4101 * _.isObject([1, 2, 3]);
4102 * // => true
4103 *
4104 * _.isObject(_.noop);
4105 * // => true
4106 *
4107 * _.isObject(null);
4108 * // => false
4109 */
4110 function isObject(value) {
4111 var type = typeof value;
4112 return value != null && (type == 'object' || type == 'function');
4113 }
4114
4115 module.exports = isObject;
4116
4117
4118 /***/ }),
4119
4120 /***/ "./node_modules/lodash/isObjectLike.js":
4121 /*!*********************************************!*\
4122 !*** ./node_modules/lodash/isObjectLike.js ***!
4123 \*********************************************/
4124 /***/ ((module) => {
4125
4126 /**
4127 * Checks if `value` is object-like. A value is object-like if it's not `null`
4128 * and has a `typeof` result of "object".
4129 *
4130 * @static
4131 * @memberOf _
4132 * @since 4.0.0
4133 * @category Lang
4134 * @param {*} value The value to check.
4135 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
4136 * @example
4137 *
4138 * _.isObjectLike({});
4139 * // => true
4140 *
4141 * _.isObjectLike([1, 2, 3]);
4142 * // => true
4143 *
4144 * _.isObjectLike(_.noop);
4145 * // => false
4146 *
4147 * _.isObjectLike(null);
4148 * // => false
4149 */
4150 function isObjectLike(value) {
4151 return value != null && typeof value == 'object';
4152 }
4153
4154 module.exports = isObjectLike;
4155
4156
4157 /***/ }),
4158
4159 /***/ "./node_modules/lodash/isSymbol.js":
4160 /*!*****************************************!*\
4161 !*** ./node_modules/lodash/isSymbol.js ***!
4162 \*****************************************/
4163 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4164
4165 var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
4166 isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
4167
4168 /** `Object#toString` result references. */
4169 var symbolTag = '[object Symbol]';
4170
4171 /**
4172 * Checks if `value` is classified as a `Symbol` primitive or object.
4173 *
4174 * @static
4175 * @memberOf _
4176 * @since 4.0.0
4177 * @category Lang
4178 * @param {*} value The value to check.
4179 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
4180 * @example
4181 *
4182 * _.isSymbol(Symbol.iterator);
4183 * // => true
4184 *
4185 * _.isSymbol('abc');
4186 * // => false
4187 */
4188 function isSymbol(value) {
4189 return typeof value == 'symbol' ||
4190 (isObjectLike(value) && baseGetTag(value) == symbolTag);
4191 }
4192
4193 module.exports = isSymbol;
4194
4195
4196 /***/ }),
4197
4198 /***/ "./node_modules/lodash/now.js":
4199 /*!************************************!*\
4200 !*** ./node_modules/lodash/now.js ***!
4201 \************************************/
4202 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4203
4204 var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
4205
4206 /**
4207 * Gets the timestamp of the number of milliseconds that have elapsed since
4208 * the Unix epoch (1 January 1970 00:00:00 UTC).
4209 *
4210 * @static
4211 * @memberOf _
4212 * @since 2.4.0
4213 * @category Date
4214 * @returns {number} Returns the timestamp.
4215 * @example
4216 *
4217 * _.defer(function(stamp) {
4218 * console.log(_.now() - stamp);
4219 * }, _.now());
4220 * // => Logs the number of milliseconds it took for the deferred invocation.
4221 */
4222 var now = function() {
4223 return root.Date.now();
4224 };
4225
4226 module.exports = now;
4227
4228
4229 /***/ }),
4230
4231 /***/ "./node_modules/lodash/toNumber.js":
4232 /*!*****************************************!*\
4233 !*** ./node_modules/lodash/toNumber.js ***!
4234 \*****************************************/
4235 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4236
4237 var baseTrim = __webpack_require__(/*! ./_baseTrim */ "./node_modules/lodash/_baseTrim.js"),
4238 isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
4239 isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js");
4240
4241 /** Used as references for various `Number` constants. */
4242 var NAN = 0 / 0;
4243
4244 /** Used to detect bad signed hexadecimal string values. */
4245 var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
4246
4247 /** Used to detect binary string values. */
4248 var reIsBinary = /^0b[01]+$/i;
4249
4250 /** Used to detect octal string values. */
4251 var reIsOctal = /^0o[0-7]+$/i;
4252
4253 /** Built-in method references without a dependency on `root`. */
4254 var freeParseInt = parseInt;
4255
4256 /**
4257 * Converts `value` to a number.
4258 *
4259 * @static
4260 * @memberOf _
4261 * @since 4.0.0
4262 * @category Lang
4263 * @param {*} value The value to process.
4264 * @returns {number} Returns the number.
4265 * @example
4266 *
4267 * _.toNumber(3.2);
4268 * // => 3.2
4269 *
4270 * _.toNumber(Number.MIN_VALUE);
4271 * // => 5e-324
4272 *
4273 * _.toNumber(Infinity);
4274 * // => Infinity
4275 *
4276 * _.toNumber('3.2');
4277 * // => 3.2
4278 */
4279 function toNumber(value) {
4280 if (typeof value == 'number') {
4281 return value;
4282 }
4283 if (isSymbol(value)) {
4284 return NAN;
4285 }
4286 if (isObject(value)) {
4287 var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
4288 value = isObject(other) ? (other + '') : other;
4289 }
4290 if (typeof value != 'string') {
4291 return value === 0 ? value : +value;
4292 }
4293 value = baseTrim(value);
4294 var isBinary = reIsBinary.test(value);
4295 return (isBinary || reIsOctal.test(value))
4296 ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
4297 : (reIsBadHex.test(value) ? NAN : +value);
4298 }
4299
4300 module.exports = toNumber;
4301
4302
4303 /***/ }),
4304
4305 /***/ "./node_modules/memoize-one/dist/memoize-one.esm.js":
4306 /*!**********************************************************!*\
4307 !*** ./node_modules/memoize-one/dist/memoize-one.esm.js ***!
4308 \**********************************************************/
4309 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4310
4311 "use strict";
4312 __webpack_require__.r(__webpack_exports__);
4313 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4314 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
4315 /* harmony export */ });
4316 var safeIsNaN = Number.isNaN ||
4317 function ponyfill(value) {
4318 return typeof value === 'number' && value !== value;
4319 };
4320 function isEqual(first, second) {
4321 if (first === second) {
4322 return true;
4323 }
4324 if (safeIsNaN(first) && safeIsNaN(second)) {
4325 return true;
4326 }
4327 return false;
4328 }
4329 function areInputsEqual(newInputs, lastInputs) {
4330 if (newInputs.length !== lastInputs.length) {
4331 return false;
4332 }
4333 for (var i = 0; i < newInputs.length; i++) {
4334 if (!isEqual(newInputs[i], lastInputs[i])) {
4335 return false;
4336 }
4337 }
4338 return true;
4339 }
4340
4341 function memoizeOne(resultFn, isEqual) {
4342 if (isEqual === void 0) { isEqual = areInputsEqual; }
4343 var lastThis;
4344 var lastArgs = [];
4345 var lastResult;
4346 var calledOnce = false;
4347 function memoized() {
4348 var newArgs = [];
4349 for (var _i = 0; _i < arguments.length; _i++) {
4350 newArgs[_i] = arguments[_i];
4351 }
4352 if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {
4353 return lastResult;
4354 }
4355 lastResult = resultFn.apply(this, newArgs);
4356 calledOnce = true;
4357 lastThis = this;
4358 lastArgs = newArgs;
4359 return lastResult;
4360 }
4361 return memoized;
4362 }
4363
4364 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoizeOne);
4365
4366
4367 /***/ }),
4368
4369 /***/ "./node_modules/merge-anything/dist/index.esm.js":
4370 /*!*******************************************************!*\
4371 !*** ./node_modules/merge-anything/dist/index.esm.js ***!
4372 \*******************************************************/
4373 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4374
4375 "use strict";
4376 __webpack_require__.r(__webpack_exports__);
4377 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4378 /* harmony export */ "concatArrays": () => (/* binding */ concatArrays),
4379 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
4380 /* harmony export */ "merge": () => (/* binding */ merge)
4381 /* harmony export */ });
4382 /* harmony import */ var is_what__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-what */ "./node_modules/is-what/dist/index.esm.js");
4383
4384
4385 /*! *****************************************************************************
4386 Copyright (c) Microsoft Corporation. All rights reserved.
4387 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4388 this file except in compliance with the License. You may obtain a copy of the
4389 License at http://www.apache.org/licenses/LICENSE-2.0
4390
4391 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
4392 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
4393 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
4394 MERCHANTABLITY OR NON-INFRINGEMENT.
4395
4396 See the Apache Version 2.0 License for specific language governing permissions
4397 and limitations under the License.
4398 ***************************************************************************** */
4399
4400 function __spreadArrays() {
4401 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
4402 for (var r = Array(s), k = 0, i = 0; i < il; i++)
4403 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
4404 r[k] = a[j];
4405 return r;
4406 }
4407
4408 function assignProp(carry, key, newVal, originalObject) {
4409 var propType = originalObject.propertyIsEnumerable(key)
4410 ? 'enumerable'
4411 : 'nonenumerable';
4412 if (propType === 'enumerable')
4413 carry[key] = newVal;
4414 if (propType === 'nonenumerable') {
4415 Object.defineProperty(carry, key, {
4416 value: newVal,
4417 enumerable: false,
4418 writable: true,
4419 configurable: true
4420 });
4421 }
4422 }
4423 function mergeRecursively(origin, newComer, extensions) {
4424 // work directly on newComer if its not an object
4425 if (!(0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(newComer)) {
4426 // extend merge rules
4427 if (extensions && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(extensions)) {
4428 extensions.forEach(function (extend) {
4429 newComer = extend(origin, newComer);
4430 });
4431 }
4432 return newComer;
4433 }
4434 // define newObject to merge all values upon
4435 var newObject = {};
4436 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin)) {
4437 var props_1 = Object.getOwnPropertyNames(origin);
4438 var symbols_1 = Object.getOwnPropertySymbols(origin);
4439 newObject = __spreadArrays(props_1, symbols_1).reduce(function (carry, key) {
4440 // @ts-ignore
4441 var targetVal = origin[key];
4442 if ((!(0,is_what__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) && !Object.getOwnPropertyNames(newComer).includes(key)) ||
4443 ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) && !Object.getOwnPropertySymbols(newComer).includes(key))) {
4444 assignProp(carry, key, targetVal, origin);
4445 }
4446 return carry;
4447 }, {});
4448 }
4449 var props = Object.getOwnPropertyNames(newComer);
4450 var symbols = Object.getOwnPropertySymbols(newComer);
4451 var result = __spreadArrays(props, symbols).reduce(function (carry, key) {
4452 // re-define the origin and newComer as targetVal and newVal
4453 var newVal = newComer[key];
4454 var targetVal = ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin))
4455 // @ts-ignore
4456 ? origin[key]
4457 : undefined;
4458 // extend merge rules
4459 if (extensions && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(extensions)) {
4460 extensions.forEach(function (extend) {
4461 newVal = extend(targetVal, newVal);
4462 });
4463 }
4464 // When newVal is an object do the merge recursively
4465 if (targetVal !== undefined && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(newVal)) {
4466 newVal = mergeRecursively(targetVal, newVal, extensions);
4467 }
4468 assignProp(carry, key, newVal, newComer);
4469 return carry;
4470 }, newObject);
4471 return result;
4472 }
4473 /**
4474 * Merge anything recursively.
4475 * Objects get merged, special objects (classes etc.) are re-assigned "as is".
4476 * Basic types overwrite objects or other basic types.
4477 *
4478 * @param {(IConfig | any)} origin
4479 * @param {...any[]} newComers
4480 * @returns the result
4481 */
4482 function merge(origin) {
4483 var newComers = [];
4484 for (var _i = 1; _i < arguments.length; _i++) {
4485 newComers[_i - 1] = arguments[_i];
4486 }
4487 var extensions = null;
4488 var base = origin;
4489 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin) && origin.extensions && Object.keys(origin).length === 1) {
4490 base = {};
4491 extensions = origin.extensions;
4492 }
4493 return newComers.reduce(function (result, newComer) {
4494 return mergeRecursively(result, newComer, extensions);
4495 }, base);
4496 }
4497
4498 function concatArrays(originVal, newVal) {
4499 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(originVal) && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(newVal)) {
4500 // concat logic
4501 return originVal.concat(newVal);
4502 }
4503 return newVal; // always return newVal as fallback!!
4504 }
4505
4506 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (merge);
4507
4508
4509
4510 /***/ }),
4511
4512 /***/ "./scripts/gutenberg/UIComponents/UIImage.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/gutenberg/UIComponents/UIImage.ts":
4513 /*!****************************************************************************************************************************************************************************************!*\
4514 !*** ./scripts/gutenberg/UIComponents/UIImage.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/gutenberg/UIComponents/UIImage.ts ***!
4515 \****************************************************************************************************************************************************************************************/
4516 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4517
4518 "use strict";
4519 __webpack_require__.r(__webpack_exports__);
4520 // extracted by mini-css-extract-plugin
4521
4522
4523 /***/ }),
4524
4525 /***/ "./scripts/shared/Common/AsyncSelect.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/AsyncSelect.tsx":
4526 /*!*******************************************************************************************************************************************************************************!*\
4527 !*** ./scripts/shared/Common/AsyncSelect.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/AsyncSelect.tsx ***!
4528 \*******************************************************************************************************************************************************************************/
4529 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4530
4531 "use strict";
4532 __webpack_require__.r(__webpack_exports__);
4533 // extracted by mini-css-extract-plugin
4534
4535
4536 /***/ }),
4537
4538 /***/ "./scripts/shared/Common/HubspotWrapper.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/HubspotWrapper.ts":
4539 /*!************************************************************************************************************************************************************************************!*\
4540 !*** ./scripts/shared/Common/HubspotWrapper.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/HubspotWrapper.ts ***!
4541 \************************************************************************************************************************************************************************************/
4542 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4543
4544 "use strict";
4545 __webpack_require__.r(__webpack_exports__);
4546 // extracted by mini-css-extract-plugin
4547
4548
4549 /***/ }),
4550
4551 /***/ "./scripts/shared/UIComponents/UIAlert.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIAlert.tsx":
4552 /*!***********************************************************************************************************************************************************************************!*\
4553 !*** ./scripts/shared/UIComponents/UIAlert.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIAlert.tsx ***!
4554 \***********************************************************************************************************************************************************************************/
4555 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4556
4557 "use strict";
4558 __webpack_require__.r(__webpack_exports__);
4559 // extracted by mini-css-extract-plugin
4560
4561
4562 /***/ }),
4563
4564 /***/ "./scripts/shared/UIComponents/UIButton.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIButton.ts":
4565 /*!************************************************************************************************************************************************************************************!*\
4566 !*** ./scripts/shared/UIComponents/UIButton.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIButton.ts ***!
4567 \************************************************************************************************************************************************************************************/
4568 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4569
4570 "use strict";
4571 __webpack_require__.r(__webpack_exports__);
4572 // extracted by mini-css-extract-plugin
4573
4574
4575 /***/ }),
4576
4577 /***/ "./scripts/shared/UIComponents/UIContainer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIContainer.ts":
4578 /*!******************************************************************************************************************************************************************************************!*\
4579 !*** ./scripts/shared/UIComponents/UIContainer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIContainer.ts ***!
4580 \******************************************************************************************************************************************************************************************/
4581 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4582
4583 "use strict";
4584 __webpack_require__.r(__webpack_exports__);
4585 // extracted by mini-css-extract-plugin
4586
4587
4588 /***/ }),
4589
4590 /***/ "./scripts/shared/UIComponents/UIOverlay.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIOverlay.ts":
4591 /*!**************************************************************************************************************************************************************************************!*\
4592 !*** ./scripts/shared/UIComponents/UIOverlay.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIOverlay.ts ***!
4593 \**************************************************************************************************************************************************************************************/
4594 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4595
4596 "use strict";
4597 __webpack_require__.r(__webpack_exports__);
4598 // extracted by mini-css-extract-plugin
4599
4600
4601 /***/ }),
4602
4603 /***/ "./scripts/shared/UIComponents/UISpacer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpacer.ts":
4604 /*!************************************************************************************************************************************************************************************!*\
4605 !*** ./scripts/shared/UIComponents/UISpacer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpacer.ts ***!
4606 \************************************************************************************************************************************************************************************/
4607 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4608
4609 "use strict";
4610 __webpack_require__.r(__webpack_exports__);
4611 // extracted by mini-css-extract-plugin
4612
4613
4614 /***/ }),
4615
4616 /***/ "./scripts/shared/UIComponents/UISpinner.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpinner.tsx":
4617 /*!***************************************************************************************************************************************************************************************!*\
4618 !*** ./scripts/shared/UIComponents/UISpinner.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpinner.tsx ***!
4619 \***************************************************************************************************************************************************************************************/
4620 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4621
4622 "use strict";
4623 __webpack_require__.r(__webpack_exports__);
4624 // extracted by mini-css-extract-plugin
4625
4626
4627 /***/ }),
4628
4629 /***/ "./node_modules/object-assign/index.js":
4630 /*!*********************************************!*\
4631 !*** ./node_modules/object-assign/index.js ***!
4632 \*********************************************/
4633 /***/ ((module) => {
4634
4635 "use strict";
4636 /*
4637 object-assign
4638 (c) Sindre Sorhus
4639 @license MIT
4640 */
4641
4642
4643 /* eslint-disable no-unused-vars */
4644 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
4645 var hasOwnProperty = Object.prototype.hasOwnProperty;
4646 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
4647
4648 function toObject(val) {
4649 if (val === null || val === undefined) {
4650 throw new TypeError('Object.assign cannot be called with null or undefined');
4651 }
4652
4653 return Object(val);
4654 }
4655
4656 function shouldUseNative() {
4657 try {
4658 if (!Object.assign) {
4659 return false;
4660 }
4661
4662 // Detect buggy property enumeration order in older V8 versions.
4663
4664 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
4665 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
4666 test1[5] = 'de';
4667 if (Object.getOwnPropertyNames(test1)[0] === '5') {
4668 return false;
4669 }
4670
4671 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4672 var test2 = {};
4673 for (var i = 0; i < 10; i++) {
4674 test2['_' + String.fromCharCode(i)] = i;
4675 }
4676 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
4677 return test2[n];
4678 });
4679 if (order2.join('') !== '0123456789') {
4680 return false;
4681 }
4682
4683 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4684 var test3 = {};
4685 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
4686 test3[letter] = letter;
4687 });
4688 if (Object.keys(Object.assign({}, test3)).join('') !==
4689 'abcdefghijklmnopqrst') {
4690 return false;
4691 }
4692
4693 return true;
4694 } catch (err) {
4695 // We don't expect any of the above to throw, but better to be safe.
4696 return false;
4697 }
4698 }
4699
4700 module.exports = shouldUseNative() ? Object.assign : function (target, source) {
4701 var from;
4702 var to = toObject(target);
4703 var symbols;
4704
4705 for (var s = 1; s < arguments.length; s++) {
4706 from = Object(arguments[s]);
4707
4708 for (var key in from) {
4709 if (hasOwnProperty.call(from, key)) {
4710 to[key] = from[key];
4711 }
4712 }
4713
4714 if (getOwnPropertySymbols) {
4715 symbols = getOwnPropertySymbols(from);
4716 for (var i = 0; i < symbols.length; i++) {
4717 if (propIsEnumerable.call(from, symbols[i])) {
4718 to[symbols[i]] = from[symbols[i]];
4719 }
4720 }
4721 }
4722 }
4723
4724 return to;
4725 };
4726
4727
4728 /***/ }),
4729
4730 /***/ "./node_modules/prop-types/checkPropTypes.js":
4731 /*!***************************************************!*\
4732 !*** ./node_modules/prop-types/checkPropTypes.js ***!
4733 \***************************************************/
4734 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4735
4736 "use strict";
4737 /**
4738 * Copyright (c) 2013-present, Facebook, Inc.
4739 *
4740 * This source code is licensed under the MIT license found in the
4741 * LICENSE file in the root directory of this source tree.
4742 */
4743
4744
4745
4746 var printWarning = function() {};
4747
4748 if (true) {
4749 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
4750 var loggedTypeFailures = {};
4751 var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
4752
4753 printWarning = function(text) {
4754 var message = 'Warning: ' + text;
4755 if (typeof console !== 'undefined') {
4756 console.error(message);
4757 }
4758 try {
4759 // --- Welcome to debugging React ---
4760 // This error was thrown as a convenience so that you can use this stack
4761 // to find the callsite that caused this warning to fire.
4762 throw new Error(message);
4763 } catch (x) { /**/ }
4764 };
4765 }
4766
4767 /**
4768 * Assert that the values match with the type specs.
4769 * Error messages are memorized and will only be shown once.
4770 *
4771 * @param {object} typeSpecs Map of name to a ReactPropType
4772 * @param {object} values Runtime values that need to be type-checked
4773 * @param {string} location e.g. "prop", "context", "child context"
4774 * @param {string} componentName Name of the component for error messages.
4775 * @param {?Function} getStack Returns the component stack.
4776 * @private
4777 */
4778 function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
4779 if (true) {
4780 for (var typeSpecName in typeSpecs) {
4781 if (has(typeSpecs, typeSpecName)) {
4782 var error;
4783 // Prop type validation may throw. In case they do, we don't want to
4784 // fail the render phase where it didn't fail before. So we log it.
4785 // After these have been cleaned up, we'll let them throw.
4786 try {
4787 // This is intentionally an invariant that gets caught. It's the same
4788 // behavior as without this statement except with a better message.
4789 if (typeof typeSpecs[typeSpecName] !== 'function') {
4790 var err = Error(
4791 (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
4792 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
4793 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
4794 );
4795 err.name = 'Invariant Violation';
4796 throw err;
4797 }
4798 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
4799 } catch (ex) {
4800 error = ex;
4801 }
4802 if (error && !(error instanceof Error)) {
4803 printWarning(
4804 (componentName || 'React class') + ': type specification of ' +
4805 location + ' `' + typeSpecName + '` is invalid; the type checker ' +
4806 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
4807 'You may have forgotten to pass an argument to the type checker ' +
4808 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
4809 'shape all require an argument).'
4810 );
4811 }
4812 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
4813 // Only monitor this failure once because there tends to be a lot of the
4814 // same error.
4815 loggedTypeFailures[error.message] = true;
4816
4817 var stack = getStack ? getStack() : '';
4818
4819 printWarning(
4820 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
4821 );
4822 }
4823 }
4824 }
4825 }
4826 }
4827
4828 /**
4829 * Resets warning cache when testing.
4830 *
4831 * @private
4832 */
4833 checkPropTypes.resetWarningCache = function() {
4834 if (true) {
4835 loggedTypeFailures = {};
4836 }
4837 }
4838
4839 module.exports = checkPropTypes;
4840
4841
4842 /***/ }),
4843
4844 /***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
4845 /*!************************************************************!*\
4846 !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
4847 \************************************************************/
4848 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4849
4850 "use strict";
4851 /**
4852 * Copyright (c) 2013-present, Facebook, Inc.
4853 *
4854 * This source code is licensed under the MIT license found in the
4855 * LICENSE file in the root directory of this source tree.
4856 */
4857
4858
4859
4860 var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
4861 var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
4862
4863 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
4864 var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
4865 var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
4866
4867 var printWarning = function() {};
4868
4869 if (true) {
4870 printWarning = function(text) {
4871 var message = 'Warning: ' + text;
4872 if (typeof console !== 'undefined') {
4873 console.error(message);
4874 }
4875 try {
4876 // --- Welcome to debugging React ---
4877 // This error was thrown as a convenience so that you can use this stack
4878 // to find the callsite that caused this warning to fire.
4879 throw new Error(message);
4880 } catch (x) {}
4881 };
4882 }
4883
4884 function emptyFunctionThatReturnsNull() {
4885 return null;
4886 }
4887
4888 module.exports = function(isValidElement, throwOnDirectAccess) {
4889 /* global Symbol */
4890 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
4891 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
4892
4893 /**
4894 * Returns the iterator method function contained on the iterable object.
4895 *
4896 * Be sure to invoke the function with the iterable as context:
4897 *
4898 * var iteratorFn = getIteratorFn(myIterable);
4899 * if (iteratorFn) {
4900 * var iterator = iteratorFn.call(myIterable);
4901 * ...
4902 * }
4903 *
4904 * @param {?object} maybeIterable
4905 * @return {?function}
4906 */
4907 function getIteratorFn(maybeIterable) {
4908 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
4909 if (typeof iteratorFn === 'function') {
4910 return iteratorFn;
4911 }
4912 }
4913
4914 /**
4915 * Collection of methods that allow declaration and validation of props that are
4916 * supplied to React components. Example usage:
4917 *
4918 * var Props = require('ReactPropTypes');
4919 * var MyArticle = React.createClass({
4920 * propTypes: {
4921 * // An optional string prop named "description".
4922 * description: Props.string,
4923 *
4924 * // A required enum prop named "category".
4925 * category: Props.oneOf(['News','Photos']).isRequired,
4926 *
4927 * // A prop named "dialog" that requires an instance of Dialog.
4928 * dialog: Props.instanceOf(Dialog).isRequired
4929 * },
4930 * render: function() { ... }
4931 * });
4932 *
4933 * A more formal specification of how these methods are used:
4934 *
4935 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
4936 * decl := ReactPropTypes.{type}(.isRequired)?
4937 *
4938 * Each and every declaration produces a function with the same signature. This
4939 * allows the creation of custom validation functions. For example:
4940 *
4941 * var MyLink = React.createClass({
4942 * propTypes: {
4943 * // An optional string or URI prop named "href".
4944 * href: function(props, propName, componentName) {
4945 * var propValue = props[propName];
4946 * if (propValue != null && typeof propValue !== 'string' &&
4947 * !(propValue instanceof URI)) {
4948 * return new Error(
4949 * 'Expected a string or an URI for ' + propName + ' in ' +
4950 * componentName
4951 * );
4952 * }
4953 * }
4954 * },
4955 * render: function() {...}
4956 * });
4957 *
4958 * @internal
4959 */
4960
4961 var ANONYMOUS = '<<anonymous>>';
4962
4963 // Important!
4964 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
4965 var ReactPropTypes = {
4966 array: createPrimitiveTypeChecker('array'),
4967 bigint: createPrimitiveTypeChecker('bigint'),
4968 bool: createPrimitiveTypeChecker('boolean'),
4969 func: createPrimitiveTypeChecker('function'),
4970 number: createPrimitiveTypeChecker('number'),
4971 object: createPrimitiveTypeChecker('object'),
4972 string: createPrimitiveTypeChecker('string'),
4973 symbol: createPrimitiveTypeChecker('symbol'),
4974
4975 any: createAnyTypeChecker(),
4976 arrayOf: createArrayOfTypeChecker,
4977 element: createElementTypeChecker(),
4978 elementType: createElementTypeTypeChecker(),
4979 instanceOf: createInstanceTypeChecker,
4980 node: createNodeChecker(),
4981 objectOf: createObjectOfTypeChecker,
4982 oneOf: createEnumTypeChecker,
4983 oneOfType: createUnionTypeChecker,
4984 shape: createShapeTypeChecker,
4985 exact: createStrictShapeTypeChecker,
4986 };
4987
4988 /**
4989 * inlined Object.is polyfill to avoid requiring consumers ship their own
4990 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
4991 */
4992 /*eslint-disable no-self-compare*/
4993 function is(x, y) {
4994 // SameValue algorithm
4995 if (x === y) {
4996 // Steps 1-5, 7-10
4997 // Steps 6.b-6.e: +0 != -0
4998 return x !== 0 || 1 / x === 1 / y;
4999 } else {
5000 // Step 6.a: NaN == NaN
5001 return x !== x && y !== y;
5002 }
5003 }
5004 /*eslint-enable no-self-compare*/
5005
5006 /**
5007 * We use an Error-like object for backward compatibility as people may call
5008 * PropTypes directly and inspect their output. However, we don't use real
5009 * Errors anymore. We don't inspect their stack anyway, and creating them
5010 * is prohibitively expensive if they are created too often, such as what
5011 * happens in oneOfType() for any type before the one that matched.
5012 */
5013 function PropTypeError(message, data) {
5014 this.message = message;
5015 this.data = data && typeof data === 'object' ? data: {};
5016 this.stack = '';
5017 }
5018 // Make `instanceof Error` still work for returned errors.
5019 PropTypeError.prototype = Error.prototype;
5020
5021 function createChainableTypeChecker(validate) {
5022 if (true) {
5023 var manualPropTypeCallCache = {};
5024 var manualPropTypeWarningCount = 0;
5025 }
5026 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
5027 componentName = componentName || ANONYMOUS;
5028 propFullName = propFullName || propName;
5029
5030 if (secret !== ReactPropTypesSecret) {
5031 if (throwOnDirectAccess) {
5032 // New behavior only for users of `prop-types` package
5033 var err = new Error(
5034 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
5035 'Use `PropTypes.checkPropTypes()` to call them. ' +
5036 'Read more at http://fb.me/use-check-prop-types'
5037 );
5038 err.name = 'Invariant Violation';
5039 throw err;
5040 } else if ( true && typeof console !== 'undefined') {
5041 // Old behavior for people using React.PropTypes
5042 var cacheKey = componentName + ':' + propName;
5043 if (
5044 !manualPropTypeCallCache[cacheKey] &&
5045 // Avoid spamming the console because they are often not actionable except for lib authors
5046 manualPropTypeWarningCount < 3
5047 ) {
5048 printWarning(
5049 'You are manually calling a React.PropTypes validation ' +
5050 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
5051 'and will throw in the standalone `prop-types` package. ' +
5052 'You may be seeing this warning due to a third-party PropTypes ' +
5053 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
5054 );
5055 manualPropTypeCallCache[cacheKey] = true;
5056 manualPropTypeWarningCount++;
5057 }
5058 }
5059 }
5060 if (props[propName] == null) {
5061 if (isRequired) {
5062 if (props[propName] === null) {
5063 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
5064 }
5065 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
5066 }
5067 return null;
5068 } else {
5069 return validate(props, propName, componentName, location, propFullName);
5070 }
5071 }
5072
5073 var chainedCheckType = checkType.bind(null, false);
5074 chainedCheckType.isRequired = checkType.bind(null, true);
5075
5076 return chainedCheckType;
5077 }
5078
5079 function createPrimitiveTypeChecker(expectedType) {
5080 function validate(props, propName, componentName, location, propFullName, secret) {
5081 var propValue = props[propName];
5082 var propType = getPropType(propValue);
5083 if (propType !== expectedType) {
5084 // `propValue` being instance of, say, date/regexp, pass the 'object'
5085 // check, but we can offer a more precise error message here rather than
5086 // 'of type `object`'.
5087 var preciseType = getPreciseType(propValue);
5088
5089 return new PropTypeError(
5090 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
5091 {expectedType: expectedType}
5092 );
5093 }
5094 return null;
5095 }
5096 return createChainableTypeChecker(validate);
5097 }
5098
5099 function createAnyTypeChecker() {
5100 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
5101 }
5102
5103 function createArrayOfTypeChecker(typeChecker) {
5104 function validate(props, propName, componentName, location, propFullName) {
5105 if (typeof typeChecker !== 'function') {
5106 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
5107 }
5108 var propValue = props[propName];
5109 if (!Array.isArray(propValue)) {
5110 var propType = getPropType(propValue);
5111 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
5112 }
5113 for (var i = 0; i < propValue.length; i++) {
5114 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
5115 if (error instanceof Error) {
5116 return error;
5117 }
5118 }
5119 return null;
5120 }
5121 return createChainableTypeChecker(validate);
5122 }
5123
5124 function createElementTypeChecker() {
5125 function validate(props, propName, componentName, location, propFullName) {
5126 var propValue = props[propName];
5127 if (!isValidElement(propValue)) {
5128 var propType = getPropType(propValue);
5129 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
5130 }
5131 return null;
5132 }
5133 return createChainableTypeChecker(validate);
5134 }
5135
5136 function createElementTypeTypeChecker() {
5137 function validate(props, propName, componentName, location, propFullName) {
5138 var propValue = props[propName];
5139 if (!ReactIs.isValidElementType(propValue)) {
5140 var propType = getPropType(propValue);
5141 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
5142 }
5143 return null;
5144 }
5145 return createChainableTypeChecker(validate);
5146 }
5147
5148 function createInstanceTypeChecker(expectedClass) {
5149 function validate(props, propName, componentName, location, propFullName) {
5150 if (!(props[propName] instanceof expectedClass)) {
5151 var expectedClassName = expectedClass.name || ANONYMOUS;
5152 var actualClassName = getClassName(props[propName]);
5153 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
5154 }
5155 return null;
5156 }
5157 return createChainableTypeChecker(validate);
5158 }
5159
5160 function createEnumTypeChecker(expectedValues) {
5161 if (!Array.isArray(expectedValues)) {
5162 if (true) {
5163 if (arguments.length > 1) {
5164 printWarning(
5165 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
5166 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
5167 );
5168 } else {
5169 printWarning('Invalid argument supplied to oneOf, expected an array.');
5170 }
5171 }
5172 return emptyFunctionThatReturnsNull;
5173 }
5174
5175 function validate(props, propName, componentName, location, propFullName) {
5176 var propValue = props[propName];
5177 for (var i = 0; i < expectedValues.length; i++) {
5178 if (is(propValue, expectedValues[i])) {
5179 return null;
5180 }
5181 }
5182
5183 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
5184 var type = getPreciseType(value);
5185 if (type === 'symbol') {
5186 return String(value);
5187 }
5188 return value;
5189 });
5190 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
5191 }
5192 return createChainableTypeChecker(validate);
5193 }
5194
5195 function createObjectOfTypeChecker(typeChecker) {
5196 function validate(props, propName, componentName, location, propFullName) {
5197 if (typeof typeChecker !== 'function') {
5198 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
5199 }
5200 var propValue = props[propName];
5201 var propType = getPropType(propValue);
5202 if (propType !== 'object') {
5203 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
5204 }
5205 for (var key in propValue) {
5206 if (has(propValue, key)) {
5207 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5208 if (error instanceof Error) {
5209 return error;
5210 }
5211 }
5212 }
5213 return null;
5214 }
5215 return createChainableTypeChecker(validate);
5216 }
5217
5218 function createUnionTypeChecker(arrayOfTypeCheckers) {
5219 if (!Array.isArray(arrayOfTypeCheckers)) {
5220 true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
5221 return emptyFunctionThatReturnsNull;
5222 }
5223
5224 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5225 var checker = arrayOfTypeCheckers[i];
5226 if (typeof checker !== 'function') {
5227 printWarning(
5228 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
5229 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
5230 );
5231 return emptyFunctionThatReturnsNull;
5232 }
5233 }
5234
5235 function validate(props, propName, componentName, location, propFullName) {
5236 var expectedTypes = [];
5237 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5238 var checker = arrayOfTypeCheckers[i];
5239 var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
5240 if (checkerResult == null) {
5241 return null;
5242 }
5243 if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
5244 expectedTypes.push(checkerResult.data.expectedType);
5245 }
5246 }
5247 var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
5248 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
5249 }
5250 return createChainableTypeChecker(validate);
5251 }
5252
5253 function createNodeChecker() {
5254 function validate(props, propName, componentName, location, propFullName) {
5255 if (!isNode(props[propName])) {
5256 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
5257 }
5258 return null;
5259 }
5260 return createChainableTypeChecker(validate);
5261 }
5262
5263 function invalidValidatorError(componentName, location, propFullName, key, type) {
5264 return new PropTypeError(
5265 (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
5266 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
5267 );
5268 }
5269
5270 function createShapeTypeChecker(shapeTypes) {
5271 function validate(props, propName, componentName, location, propFullName) {
5272 var propValue = props[propName];
5273 var propType = getPropType(propValue);
5274 if (propType !== 'object') {
5275 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5276 }
5277 for (var key in shapeTypes) {
5278 var checker = shapeTypes[key];
5279 if (typeof checker !== 'function') {
5280 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
5281 }
5282 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5283 if (error) {
5284 return error;
5285 }
5286 }
5287 return null;
5288 }
5289 return createChainableTypeChecker(validate);
5290 }
5291
5292 function createStrictShapeTypeChecker(shapeTypes) {
5293 function validate(props, propName, componentName, location, propFullName) {
5294 var propValue = props[propName];
5295 var propType = getPropType(propValue);
5296 if (propType !== 'object') {
5297 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5298 }
5299 // We need to check all keys in case some are required but missing from props.
5300 var allKeys = assign({}, props[propName], shapeTypes);
5301 for (var key in allKeys) {
5302 var checker = shapeTypes[key];
5303 if (has(shapeTypes, key) && typeof checker !== 'function') {
5304 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
5305 }
5306 if (!checker) {
5307 return new PropTypeError(
5308 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
5309 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
5310 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
5311 );
5312 }
5313 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5314 if (error) {
5315 return error;
5316 }
5317 }
5318 return null;
5319 }
5320
5321 return createChainableTypeChecker(validate);
5322 }
5323
5324 function isNode(propValue) {
5325 switch (typeof propValue) {
5326 case 'number':
5327 case 'string':
5328 case 'undefined':
5329 return true;
5330 case 'boolean':
5331 return !propValue;
5332 case 'object':
5333 if (Array.isArray(propValue)) {
5334 return propValue.every(isNode);
5335 }
5336 if (propValue === null || isValidElement(propValue)) {
5337 return true;
5338 }
5339
5340 var iteratorFn = getIteratorFn(propValue);
5341 if (iteratorFn) {
5342 var iterator = iteratorFn.call(propValue);
5343 var step;
5344 if (iteratorFn !== propValue.entries) {
5345 while (!(step = iterator.next()).done) {
5346 if (!isNode(step.value)) {
5347 return false;
5348 }
5349 }
5350 } else {
5351 // Iterator will provide entry [k,v] tuples rather than values.
5352 while (!(step = iterator.next()).done) {
5353 var entry = step.value;
5354 if (entry) {
5355 if (!isNode(entry[1])) {
5356 return false;
5357 }
5358 }
5359 }
5360 }
5361 } else {
5362 return false;
5363 }
5364
5365 return true;
5366 default:
5367 return false;
5368 }
5369 }
5370
5371 function isSymbol(propType, propValue) {
5372 // Native Symbol.
5373 if (propType === 'symbol') {
5374 return true;
5375 }
5376
5377 // falsy value can't be a Symbol
5378 if (!propValue) {
5379 return false;
5380 }
5381
5382 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
5383 if (propValue['@@toStringTag'] === 'Symbol') {
5384 return true;
5385 }
5386
5387 // Fallback for non-spec compliant Symbols which are polyfilled.
5388 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
5389 return true;
5390 }
5391
5392 return false;
5393 }
5394
5395 // Equivalent of `typeof` but with special handling for array and regexp.
5396 function getPropType(propValue) {
5397 var propType = typeof propValue;
5398 if (Array.isArray(propValue)) {
5399 return 'array';
5400 }
5401 if (propValue instanceof RegExp) {
5402 // Old webkits (at least until Android 4.0) return 'function' rather than
5403 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
5404 // passes PropTypes.object.
5405 return 'object';
5406 }
5407 if (isSymbol(propType, propValue)) {
5408 return 'symbol';
5409 }
5410 return propType;
5411 }
5412
5413 // This handles more types than `getPropType`. Only used for error messages.
5414 // See `createPrimitiveTypeChecker`.
5415 function getPreciseType(propValue) {
5416 if (typeof propValue === 'undefined' || propValue === null) {
5417 return '' + propValue;
5418 }
5419 var propType = getPropType(propValue);
5420 if (propType === 'object') {
5421 if (propValue instanceof Date) {
5422 return 'date';
5423 } else if (propValue instanceof RegExp) {
5424 return 'regexp';
5425 }
5426 }
5427 return propType;
5428 }
5429
5430 // Returns a string that is postfixed to a warning about an invalid type.
5431 // For example, "undefined" or "of type array"
5432 function getPostfixForTypeWarning(value) {
5433 var type = getPreciseType(value);
5434 switch (type) {
5435 case 'array':
5436 case 'object':
5437 return 'an ' + type;
5438 case 'boolean':
5439 case 'date':
5440 case 'regexp':
5441 return 'a ' + type;
5442 default:
5443 return type;
5444 }
5445 }
5446
5447 // Returns class name of the object, if any.
5448 function getClassName(propValue) {
5449 if (!propValue.constructor || !propValue.constructor.name) {
5450 return ANONYMOUS;
5451 }
5452 return propValue.constructor.name;
5453 }
5454
5455 ReactPropTypes.checkPropTypes = checkPropTypes;
5456 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
5457 ReactPropTypes.PropTypes = ReactPropTypes;
5458
5459 return ReactPropTypes;
5460 };
5461
5462
5463 /***/ }),
5464
5465 /***/ "./node_modules/prop-types/index.js":
5466 /*!******************************************!*\
5467 !*** ./node_modules/prop-types/index.js ***!
5468 \******************************************/
5469 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5470
5471 /**
5472 * Copyright (c) 2013-present, Facebook, Inc.
5473 *
5474 * This source code is licensed under the MIT license found in the
5475 * LICENSE file in the root directory of this source tree.
5476 */
5477
5478 if (true) {
5479 var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
5480
5481 // By explicitly using `prop-types` you are opting into new development behavior.
5482 // http://fb.me/prop-types-in-prod
5483 var throwOnDirectAccess = true;
5484 module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
5485 } else {}
5486
5487
5488 /***/ }),
5489
5490 /***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
5491 /*!*************************************************************!*\
5492 !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
5493 \*************************************************************/
5494 /***/ ((module) => {
5495
5496 "use strict";
5497 /**
5498 * Copyright (c) 2013-present, Facebook, Inc.
5499 *
5500 * This source code is licensed under the MIT license found in the
5501 * LICENSE file in the root directory of this source tree.
5502 */
5503
5504
5505
5506 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
5507
5508 module.exports = ReactPropTypesSecret;
5509
5510
5511 /***/ }),
5512
5513 /***/ "./node_modules/prop-types/lib/has.js":
5514 /*!********************************************!*\
5515 !*** ./node_modules/prop-types/lib/has.js ***!
5516 \********************************************/
5517 /***/ ((module) => {
5518
5519 module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
5520
5521
5522 /***/ }),
5523
5524 /***/ "./node_modules/raven-js/src/configError.js":
5525 /*!**************************************************!*\
5526 !*** ./node_modules/raven-js/src/configError.js ***!
5527 \**************************************************/
5528 /***/ ((module) => {
5529
5530 function RavenConfigError(message) {
5531 this.name = 'RavenConfigError';
5532 this.message = message;
5533 }
5534 RavenConfigError.prototype = new Error();
5535 RavenConfigError.prototype.constructor = RavenConfigError;
5536
5537 module.exports = RavenConfigError;
5538
5539
5540 /***/ }),
5541
5542 /***/ "./node_modules/raven-js/src/console.js":
5543 /*!**********************************************!*\
5544 !*** ./node_modules/raven-js/src/console.js ***!
5545 \**********************************************/
5546 /***/ ((module) => {
5547
5548 var wrapMethod = function(console, level, callback) {
5549 var originalConsoleLevel = console[level];
5550 var originalConsole = console;
5551
5552 if (!(level in console)) {
5553 return;
5554 }
5555
5556 var sentryLevel = level === 'warn' ? 'warning' : level;
5557
5558 console[level] = function() {
5559 var args = [].slice.call(arguments);
5560
5561 var msg = '' + args.join(' ');
5562 var data = {level: sentryLevel, logger: 'console', extra: {arguments: args}};
5563
5564 if (level === 'assert') {
5565 if (args[0] === false) {
5566 // Default browsers message
5567 msg = 'Assertion failed: ' + (args.slice(1).join(' ') || 'console.assert');
5568 data.extra.arguments = args.slice(1);
5569 callback && callback(msg, data);
5570 }
5571 } else {
5572 callback && callback(msg, data);
5573 }
5574
5575 // this fails for some browsers. :(
5576 if (originalConsoleLevel) {
5577 // IE9 doesn't allow calling apply on console functions directly
5578 // See: https://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function#answer-5473193
5579 Function.prototype.apply.call(originalConsoleLevel, originalConsole, args);
5580 }
5581 };
5582 };
5583
5584 module.exports = {
5585 wrapMethod: wrapMethod
5586 };
5587
5588
5589 /***/ }),
5590
5591 /***/ "./node_modules/raven-js/src/raven.js":
5592 /*!********************************************!*\
5593 !*** ./node_modules/raven-js/src/raven.js ***!
5594 \********************************************/
5595 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5596
5597 /*global XDomainRequest:false */
5598
5599 var TraceKit = __webpack_require__(/*! ../vendor/TraceKit/tracekit */ "./node_modules/raven-js/vendor/TraceKit/tracekit.js");
5600 var stringify = __webpack_require__(/*! ../vendor/json-stringify-safe/stringify */ "./node_modules/raven-js/vendor/json-stringify-safe/stringify.js");
5601 var RavenConfigError = __webpack_require__(/*! ./configError */ "./node_modules/raven-js/src/configError.js");
5602
5603 var utils = __webpack_require__(/*! ./utils */ "./node_modules/raven-js/src/utils.js");
5604 var isError = utils.isError;
5605 var isObject = utils.isObject;
5606 var isObject = utils.isObject;
5607 var isErrorEvent = utils.isErrorEvent;
5608 var isUndefined = utils.isUndefined;
5609 var isFunction = utils.isFunction;
5610 var isString = utils.isString;
5611 var isEmptyObject = utils.isEmptyObject;
5612 var each = utils.each;
5613 var objectMerge = utils.objectMerge;
5614 var truncate = utils.truncate;
5615 var objectFrozen = utils.objectFrozen;
5616 var hasKey = utils.hasKey;
5617 var joinRegExp = utils.joinRegExp;
5618 var urlencode = utils.urlencode;
5619 var uuid4 = utils.uuid4;
5620 var htmlTreeAsString = utils.htmlTreeAsString;
5621 var isSameException = utils.isSameException;
5622 var isSameStacktrace = utils.isSameStacktrace;
5623 var parseUrl = utils.parseUrl;
5624 var fill = utils.fill;
5625
5626 var wrapConsoleMethod = (__webpack_require__(/*! ./console */ "./node_modules/raven-js/src/console.js").wrapMethod);
5627
5628 var dsnKeys = 'source protocol user pass host port path'.split(' '),
5629 dsnPattern = /^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;
5630
5631 function now() {
5632 return +new Date();
5633 }
5634
5635 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
5636 var _window =
5637 typeof window !== 'undefined'
5638 ? window
5639 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
5640 var _document = _window.document;
5641 var _navigator = _window.navigator;
5642
5643 function keepOriginalCallback(original, callback) {
5644 return isFunction(callback)
5645 ? function(data) {
5646 return callback(data, original);
5647 }
5648 : callback;
5649 }
5650
5651 // First, check for JSON support
5652 // If there is no JSON, we no-op the core features of Raven
5653 // since JSON is required to encode the payload
5654 function Raven() {
5655 this._hasJSON = !!(typeof JSON === 'object' && JSON.stringify);
5656 // Raven can run in contexts where there's no document (react-native)
5657 this._hasDocument = !isUndefined(_document);
5658 this._hasNavigator = !isUndefined(_navigator);
5659 this._lastCapturedException = null;
5660 this._lastData = null;
5661 this._lastEventId = null;
5662 this._globalServer = null;
5663 this._globalKey = null;
5664 this._globalProject = null;
5665 this._globalContext = {};
5666 this._globalOptions = {
5667 logger: 'javascript',
5668 ignoreErrors: [],
5669 ignoreUrls: [],
5670 whitelistUrls: [],
5671 includePaths: [],
5672 collectWindowErrors: true,
5673 maxMessageLength: 0,
5674
5675 // By default, truncates URL values to 250 chars
5676 maxUrlLength: 250,
5677 stackTraceLimit: 50,
5678 autoBreadcrumbs: true,
5679 instrument: true,
5680 sampleRate: 1
5681 };
5682 this._ignoreOnError = 0;
5683 this._isRavenInstalled = false;
5684 this._originalErrorStackTraceLimit = Error.stackTraceLimit;
5685 // capture references to window.console *and* all its methods first
5686 // before the console plugin has a chance to monkey patch
5687 this._originalConsole = _window.console || {};
5688 this._originalConsoleMethods = {};
5689 this._plugins = [];
5690 this._startTime = now();
5691 this._wrappedBuiltIns = [];
5692 this._breadcrumbs = [];
5693 this._lastCapturedEvent = null;
5694 this._keypressTimeout;
5695 this._location = _window.location;
5696 this._lastHref = this._location && this._location.href;
5697 this._resetBackoff();
5698
5699 // eslint-disable-next-line guard-for-in
5700 for (var method in this._originalConsole) {
5701 this._originalConsoleMethods[method] = this._originalConsole[method];
5702 }
5703 }
5704
5705 /*
5706 * The core Raven singleton
5707 *
5708 * @this {Raven}
5709 */
5710
5711 Raven.prototype = {
5712 // Hardcode version string so that raven source can be loaded directly via
5713 // webpack (using a build step causes webpack #1617). Grunt verifies that
5714 // this value matches package.json during build.
5715 // See: https://github.com/getsentry/raven-js/issues/465
5716 VERSION: '3.19.1',
5717
5718 debug: false,
5719
5720 TraceKit: TraceKit, // alias to TraceKit
5721
5722 /*
5723 * Configure Raven with a DSN and extra options
5724 *
5725 * @param {string} dsn The public Sentry DSN
5726 * @param {object} options Set of global options [optional]
5727 * @return {Raven}
5728 */
5729 config: function(dsn, options) {
5730 var self = this;
5731
5732 if (self._globalServer) {
5733 this._logDebug('error', 'Error: Raven has already been configured');
5734 return self;
5735 }
5736 if (!dsn) return self;
5737
5738 var globalOptions = self._globalOptions;
5739
5740 // merge in options
5741 if (options) {
5742 each(options, function(key, value) {
5743 // tags and extra are special and need to be put into context
5744 if (key === 'tags' || key === 'extra' || key === 'user') {
5745 self._globalContext[key] = value;
5746 } else {
5747 globalOptions[key] = value;
5748 }
5749 });
5750 }
5751
5752 self.setDSN(dsn);
5753
5754 // "Script error." is hard coded into browsers for errors that it can't read.
5755 // this is the result of a script being pulled in from an external domain and CORS.
5756 globalOptions.ignoreErrors.push(/^Script error\.?$/);
5757 globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/);
5758
5759 // join regexp rules into one big rule
5760 globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors);
5761 globalOptions.ignoreUrls = globalOptions.ignoreUrls.length
5762 ? joinRegExp(globalOptions.ignoreUrls)
5763 : false;
5764 globalOptions.whitelistUrls = globalOptions.whitelistUrls.length
5765 ? joinRegExp(globalOptions.whitelistUrls)
5766 : false;
5767 globalOptions.includePaths = joinRegExp(globalOptions.includePaths);
5768 globalOptions.maxBreadcrumbs = Math.max(
5769 0,
5770 Math.min(globalOptions.maxBreadcrumbs || 100, 100)
5771 ); // default and hard limit is 100
5772
5773 var autoBreadcrumbDefaults = {
5774 xhr: true,
5775 console: true,
5776 dom: true,
5777 location: true
5778 };
5779
5780 var autoBreadcrumbs = globalOptions.autoBreadcrumbs;
5781 if ({}.toString.call(autoBreadcrumbs) === '[object Object]') {
5782 autoBreadcrumbs = objectMerge(autoBreadcrumbDefaults, autoBreadcrumbs);
5783 } else if (autoBreadcrumbs !== false) {
5784 autoBreadcrumbs = autoBreadcrumbDefaults;
5785 }
5786 globalOptions.autoBreadcrumbs = autoBreadcrumbs;
5787
5788 var instrumentDefaults = {
5789 tryCatch: true
5790 };
5791
5792 var instrument = globalOptions.instrument;
5793 if ({}.toString.call(instrument) === '[object Object]') {
5794 instrument = objectMerge(instrumentDefaults, instrument);
5795 } else if (instrument !== false) {
5796 instrument = instrumentDefaults;
5797 }
5798 globalOptions.instrument = instrument;
5799
5800 TraceKit.collectWindowErrors = !!globalOptions.collectWindowErrors;
5801
5802 // return for chaining
5803 return self;
5804 },
5805
5806 /*
5807 * Installs a global window.onerror error handler
5808 * to capture and report uncaught exceptions.
5809 * At this point, install() is required to be called due
5810 * to the way TraceKit is set up.
5811 *
5812 * @return {Raven}
5813 */
5814 install: function() {
5815 var self = this;
5816 if (self.isSetup() && !self._isRavenInstalled) {
5817 TraceKit.report.subscribe(function() {
5818 self._handleOnErrorStackInfo.apply(self, arguments);
5819 });
5820 if (self._globalOptions.instrument && self._globalOptions.instrument.tryCatch) {
5821 self._instrumentTryCatch();
5822 }
5823
5824 if (self._globalOptions.autoBreadcrumbs) self._instrumentBreadcrumbs();
5825
5826 // Install all of the plugins
5827 self._drainPlugins();
5828
5829 self._isRavenInstalled = true;
5830 }
5831
5832 Error.stackTraceLimit = self._globalOptions.stackTraceLimit;
5833 return this;
5834 },
5835
5836 /*
5837 * Set the DSN (can be called multiple time unlike config)
5838 *
5839 * @param {string} dsn The public Sentry DSN
5840 */
5841 setDSN: function(dsn) {
5842 var self = this,
5843 uri = self._parseDSN(dsn),
5844 lastSlash = uri.path.lastIndexOf('/'),
5845 path = uri.path.substr(1, lastSlash);
5846
5847 self._dsn = dsn;
5848 self._globalKey = uri.user;
5849 self._globalSecret = uri.pass && uri.pass.substr(1);
5850 self._globalProject = uri.path.substr(lastSlash + 1);
5851
5852 self._globalServer = self._getGlobalServer(uri);
5853
5854 self._globalEndpoint =
5855 self._globalServer + '/' + path + 'api/' + self._globalProject + '/store/';
5856
5857 // Reset backoff state since we may be pointing at a
5858 // new project/server
5859 this._resetBackoff();
5860 },
5861
5862 /*
5863 * Wrap code within a context so Raven can capture errors
5864 * reliably across domains that is executed immediately.
5865 *
5866 * @param {object} options A specific set of options for this context [optional]
5867 * @param {function} func The callback to be immediately executed within the context
5868 * @param {array} args An array of arguments to be called with the callback [optional]
5869 */
5870 context: function(options, func, args) {
5871 if (isFunction(options)) {
5872 args = func || [];
5873 func = options;
5874 options = undefined;
5875 }
5876
5877 return this.wrap(options, func).apply(this, args);
5878 },
5879
5880 /*
5881 * Wrap code within a context and returns back a new function to be executed
5882 *
5883 * @param {object} options A specific set of options for this context [optional]
5884 * @param {function} func The function to be wrapped in a new context
5885 * @param {function} func A function to call before the try/catch wrapper [optional, private]
5886 * @return {function} The newly wrapped functions with a context
5887 */
5888 wrap: function(options, func, _before) {
5889 var self = this;
5890 // 1 argument has been passed, and it's not a function
5891 // so just return it
5892 if (isUndefined(func) && !isFunction(options)) {
5893 return options;
5894 }
5895
5896 // options is optional
5897 if (isFunction(options)) {
5898 func = options;
5899 options = undefined;
5900 }
5901
5902 // At this point, we've passed along 2 arguments, and the second one
5903 // is not a function either, so we'll just return the second argument.
5904 if (!isFunction(func)) {
5905 return func;
5906 }
5907
5908 // We don't wanna wrap it twice!
5909 try {
5910 if (func.__raven__) {
5911 return func;
5912 }
5913
5914 // If this has already been wrapped in the past, return that
5915 if (func.__raven_wrapper__) {
5916 return func.__raven_wrapper__;
5917 }
5918 } catch (e) {
5919 // Just accessing custom props in some Selenium environments
5920 // can cause a "Permission denied" exception (see raven-js#495).
5921 // Bail on wrapping and return the function as-is (defers to window.onerror).
5922 return func;
5923 }
5924
5925 function wrapped() {
5926 var args = [],
5927 i = arguments.length,
5928 deep = !options || (options && options.deep !== false);
5929
5930 if (_before && isFunction(_before)) {
5931 _before.apply(this, arguments);
5932 }
5933
5934 // Recursively wrap all of a function's arguments that are
5935 // functions themselves.
5936 while (i--) args[i] = deep ? self.wrap(options, arguments[i]) : arguments[i];
5937
5938 try {
5939 // Attempt to invoke user-land function
5940 // NOTE: If you are a Sentry user, and you are seeing this stack frame, it
5941 // means Raven caught an error invoking your application code. This is
5942 // expected behavior and NOT indicative of a bug with Raven.js.
5943 return func.apply(this, args);
5944 } catch (e) {
5945 self._ignoreNextOnError();
5946 self.captureException(e, options);
5947 throw e;
5948 }
5949 }
5950
5951 // copy over properties of the old function
5952 for (var property in func) {
5953 if (hasKey(func, property)) {
5954 wrapped[property] = func[property];
5955 }
5956 }
5957 wrapped.prototype = func.prototype;
5958
5959 func.__raven_wrapper__ = wrapped;
5960 // Signal that this function has been wrapped already
5961 // for both debugging and to prevent it to being wrapped twice
5962 wrapped.__raven__ = true;
5963 wrapped.__inner__ = func;
5964
5965 return wrapped;
5966 },
5967
5968 /*
5969 * Uninstalls the global error handler.
5970 *
5971 * @return {Raven}
5972 */
5973 uninstall: function() {
5974 TraceKit.report.uninstall();
5975
5976 this._restoreBuiltIns();
5977
5978 Error.stackTraceLimit = this._originalErrorStackTraceLimit;
5979 this._isRavenInstalled = false;
5980
5981 return this;
5982 },
5983
5984 /*
5985 * Manually capture an exception and send it over to Sentry
5986 *
5987 * @param {error} ex An exception to be logged
5988 * @param {object} options A specific set of options for this error [optional]
5989 * @return {Raven}
5990 */
5991 captureException: function(ex, options) {
5992 // Cases for sending ex as a message, rather than an exception
5993 var isNotError = !isError(ex);
5994 var isNotErrorEvent = !isErrorEvent(ex);
5995 var isErrorEventWithoutError = isErrorEvent(ex) && !ex.error;
5996
5997 if ((isNotError && isNotErrorEvent) || isErrorEventWithoutError) {
5998 return this.captureMessage(
5999 ex,
6000 objectMerge(
6001 {
6002 trimHeadFrames: 1,
6003 stacktrace: true // if we fall back to captureMessage, default to attempting a new trace
6004 },
6005 options
6006 )
6007 );
6008 }
6009
6010 // Get actual Error from ErrorEvent
6011 if (isErrorEvent(ex)) ex = ex.error;
6012
6013 // Store the raw exception object for potential debugging and introspection
6014 this._lastCapturedException = ex;
6015
6016 // TraceKit.report will re-raise any exception passed to it,
6017 // which means you have to wrap it in try/catch. Instead, we
6018 // can wrap it here and only re-raise if TraceKit.report
6019 // raises an exception different from the one we asked to
6020 // report on.
6021 try {
6022 var stack = TraceKit.computeStackTrace(ex);
6023 this._handleStackInfo(stack, options);
6024 } catch (ex1) {
6025 if (ex !== ex1) {
6026 throw ex1;
6027 }
6028 }
6029
6030 return this;
6031 },
6032
6033 /*
6034 * Manually send a message to Sentry
6035 *
6036 * @param {string} msg A plain message to be captured in Sentry
6037 * @param {object} options A specific set of options for this message [optional]
6038 * @return {Raven}
6039 */
6040 captureMessage: function(msg, options) {
6041 // config() automagically converts ignoreErrors from a list to a RegExp so we need to test for an
6042 // early call; we'll error on the side of logging anything called before configuration since it's
6043 // probably something you should see:
6044 if (
6045 !!this._globalOptions.ignoreErrors.test &&
6046 this._globalOptions.ignoreErrors.test(msg)
6047 ) {
6048 return;
6049 }
6050
6051 options = options || {};
6052
6053 var data = objectMerge(
6054 {
6055 message: msg + '' // Make sure it's actually a string
6056 },
6057 options
6058 );
6059
6060 var ex;
6061 // Generate a "synthetic" stack trace from this point.
6062 // NOTE: If you are a Sentry user, and you are seeing this stack frame, it is NOT indicative
6063 // of a bug with Raven.js. Sentry generates synthetic traces either by configuration,
6064 // or if it catches a thrown object without a "stack" property.
6065 try {
6066 throw new Error(msg);
6067 } catch (ex1) {
6068 ex = ex1;
6069 }
6070
6071 // null exception name so `Error` isn't prefixed to msg
6072 ex.name = null;
6073 var stack = TraceKit.computeStackTrace(ex);
6074
6075 // stack[0] is `throw new Error(msg)` call itself, we are interested in the frame that was just before that, stack[1]
6076 var initialCall = stack.stack[1];
6077
6078 var fileurl = (initialCall && initialCall.url) || '';
6079
6080 if (
6081 !!this._globalOptions.ignoreUrls.test &&
6082 this._globalOptions.ignoreUrls.test(fileurl)
6083 ) {
6084 return;
6085 }
6086
6087 if (
6088 !!this._globalOptions.whitelistUrls.test &&
6089 !this._globalOptions.whitelistUrls.test(fileurl)
6090 ) {
6091 return;
6092 }
6093
6094 if (this._globalOptions.stacktrace || (options && options.stacktrace)) {
6095 options = objectMerge(
6096 {
6097 // fingerprint on msg, not stack trace (legacy behavior, could be
6098 // revisited)
6099 fingerprint: msg,
6100 // since we know this is a synthetic trace, the top N-most frames
6101 // MUST be from Raven.js, so mark them as in_app later by setting
6102 // trimHeadFrames
6103 trimHeadFrames: (options.trimHeadFrames || 0) + 1
6104 },
6105 options
6106 );
6107
6108 var frames = this._prepareFrames(stack, options);
6109 data.stacktrace = {
6110 // Sentry expects frames oldest to newest
6111 frames: frames.reverse()
6112 };
6113 }
6114
6115 // Fire away!
6116 this._send(data);
6117
6118 return this;
6119 },
6120
6121 captureBreadcrumb: function(obj) {
6122 var crumb = objectMerge(
6123 {
6124 timestamp: now() / 1000
6125 },
6126 obj
6127 );
6128
6129 if (isFunction(this._globalOptions.breadcrumbCallback)) {
6130 var result = this._globalOptions.breadcrumbCallback(crumb);
6131
6132 if (isObject(result) && !isEmptyObject(result)) {
6133 crumb = result;
6134 } else if (result === false) {
6135 return this;
6136 }
6137 }
6138
6139 this._breadcrumbs.push(crumb);
6140 if (this._breadcrumbs.length > this._globalOptions.maxBreadcrumbs) {
6141 this._breadcrumbs.shift();
6142 }
6143 return this;
6144 },
6145
6146 addPlugin: function(plugin /*arg1, arg2, ... argN*/) {
6147 var pluginArgs = [].slice.call(arguments, 1);
6148
6149 this._plugins.push([plugin, pluginArgs]);
6150 if (this._isRavenInstalled) {
6151 this._drainPlugins();
6152 }
6153
6154 return this;
6155 },
6156
6157 /*
6158 * Set/clear a user to be sent along with the payload.
6159 *
6160 * @param {object} user An object representing user data [optional]
6161 * @return {Raven}
6162 */
6163 setUserContext: function(user) {
6164 // Intentionally do not merge here since that's an unexpected behavior.
6165 this._globalContext.user = user;
6166
6167 return this;
6168 },
6169
6170 /*
6171 * Merge extra attributes to be sent along with the payload.
6172 *
6173 * @param {object} extra An object representing extra data [optional]
6174 * @return {Raven}
6175 */
6176 setExtraContext: function(extra) {
6177 this._mergeContext('extra', extra);
6178
6179 return this;
6180 },
6181
6182 /*
6183 * Merge tags to be sent along with the payload.
6184 *
6185 * @param {object} tags An object representing tags [optional]
6186 * @return {Raven}
6187 */
6188 setTagsContext: function(tags) {
6189 this._mergeContext('tags', tags);
6190
6191 return this;
6192 },
6193
6194 /*
6195 * Clear all of the context.
6196 *
6197 * @return {Raven}
6198 */
6199 clearContext: function() {
6200 this._globalContext = {};
6201
6202 return this;
6203 },
6204
6205 /*
6206 * Get a copy of the current context. This cannot be mutated.
6207 *
6208 * @return {object} copy of context
6209 */
6210 getContext: function() {
6211 // lol javascript
6212 return JSON.parse(stringify(this._globalContext));
6213 },
6214
6215 /*
6216 * Set environment of application
6217 *
6218 * @param {string} environment Typically something like 'production'.
6219 * @return {Raven}
6220 */
6221 setEnvironment: function(environment) {
6222 this._globalOptions.environment = environment;
6223
6224 return this;
6225 },
6226
6227 /*
6228 * Set release version of application
6229 *
6230 * @param {string} release Typically something like a git SHA to identify version
6231 * @return {Raven}
6232 */
6233 setRelease: function(release) {
6234 this._globalOptions.release = release;
6235
6236 return this;
6237 },
6238
6239 /*
6240 * Set the dataCallback option
6241 *
6242 * @param {function} callback The callback to run which allows the
6243 * data blob to be mutated before sending
6244 * @return {Raven}
6245 */
6246 setDataCallback: function(callback) {
6247 var original = this._globalOptions.dataCallback;
6248 this._globalOptions.dataCallback = keepOriginalCallback(original, callback);
6249 return this;
6250 },
6251
6252 /*
6253 * Set the breadcrumbCallback option
6254 *
6255 * @param {function} callback The callback to run which allows filtering
6256 * or mutating breadcrumbs
6257 * @return {Raven}
6258 */
6259 setBreadcrumbCallback: function(callback) {
6260 var original = this._globalOptions.breadcrumbCallback;
6261 this._globalOptions.breadcrumbCallback = keepOriginalCallback(original, callback);
6262 return this;
6263 },
6264
6265 /*
6266 * Set the shouldSendCallback option
6267 *
6268 * @param {function} callback The callback to run which allows
6269 * introspecting the blob before sending
6270 * @return {Raven}
6271 */
6272 setShouldSendCallback: function(callback) {
6273 var original = this._globalOptions.shouldSendCallback;
6274 this._globalOptions.shouldSendCallback = keepOriginalCallback(original, callback);
6275 return this;
6276 },
6277
6278 /**
6279 * Override the default HTTP transport mechanism that transmits data
6280 * to the Sentry server.
6281 *
6282 * @param {function} transport Function invoked instead of the default
6283 * `makeRequest` handler.
6284 *
6285 * @return {Raven}
6286 */
6287 setTransport: function(transport) {
6288 this._globalOptions.transport = transport;
6289
6290 return this;
6291 },
6292
6293 /*
6294 * Get the latest raw exception that was captured by Raven.
6295 *
6296 * @return {error}
6297 */
6298 lastException: function() {
6299 return this._lastCapturedException;
6300 },
6301
6302 /*
6303 * Get the last event id
6304 *
6305 * @return {string}
6306 */
6307 lastEventId: function() {
6308 return this._lastEventId;
6309 },
6310
6311 /*
6312 * Determine if Raven is setup and ready to go.
6313 *
6314 * @return {boolean}
6315 */
6316 isSetup: function() {
6317 if (!this._hasJSON) return false; // needs JSON support
6318 if (!this._globalServer) {
6319 if (!this.ravenNotConfiguredError) {
6320 this.ravenNotConfiguredError = true;
6321 this._logDebug('error', 'Error: Raven has not been configured.');
6322 }
6323 return false;
6324 }
6325 return true;
6326 },
6327
6328 afterLoad: function() {
6329 // TODO: remove window dependence?
6330
6331 // Attempt to initialize Raven on load
6332 var RavenConfig = _window.RavenConfig;
6333 if (RavenConfig) {
6334 this.config(RavenConfig.dsn, RavenConfig.config).install();
6335 }
6336 },
6337
6338 showReportDialog: function(options) {
6339 if (
6340 !_document // doesn't work without a document (React native)
6341 )
6342 return;
6343
6344 options = options || {};
6345
6346 var lastEventId = options.eventId || this.lastEventId();
6347 if (!lastEventId) {
6348 throw new RavenConfigError('Missing eventId');
6349 }
6350
6351 var dsn = options.dsn || this._dsn;
6352 if (!dsn) {
6353 throw new RavenConfigError('Missing DSN');
6354 }
6355
6356 var encode = encodeURIComponent;
6357 var qs = '';
6358 qs += '?eventId=' + encode(lastEventId);
6359 qs += '&dsn=' + encode(dsn);
6360
6361 var user = options.user || this._globalContext.user;
6362 if (user) {
6363 if (user.name) qs += '&name=' + encode(user.name);
6364 if (user.email) qs += '&email=' + encode(user.email);
6365 }
6366
6367 var globalServer = this._getGlobalServer(this._parseDSN(dsn));
6368
6369 var script = _document.createElement('script');
6370 script.async = true;
6371 script.src = globalServer + '/api/embed/error-page/' + qs;
6372 (_document.head || _document.body).appendChild(script);
6373 },
6374
6375 /**** Private functions ****/
6376 _ignoreNextOnError: function() {
6377 var self = this;
6378 this._ignoreOnError += 1;
6379 setTimeout(function() {
6380 // onerror should trigger before setTimeout
6381 self._ignoreOnError -= 1;
6382 });
6383 },
6384
6385 _triggerEvent: function(eventType, options) {
6386 // NOTE: `event` is a native browser thing, so let's avoid conflicting wiht it
6387 var evt, key;
6388
6389 if (!this._hasDocument) return;
6390
6391 options = options || {};
6392
6393 eventType = 'raven' + eventType.substr(0, 1).toUpperCase() + eventType.substr(1);
6394
6395 if (_document.createEvent) {
6396 evt = _document.createEvent('HTMLEvents');
6397 evt.initEvent(eventType, true, true);
6398 } else {
6399 evt = _document.createEventObject();
6400 evt.eventType = eventType;
6401 }
6402
6403 for (key in options)
6404 if (hasKey(options, key)) {
6405 evt[key] = options[key];
6406 }
6407
6408 if (_document.createEvent) {
6409 // IE9 if standards
6410 _document.dispatchEvent(evt);
6411 } else {
6412 // IE8 regardless of Quirks or Standards
6413 // IE9 if quirks
6414 try {
6415 _document.fireEvent('on' + evt.eventType.toLowerCase(), evt);
6416 } catch (e) {
6417 // Do nothing
6418 }
6419 }
6420 },
6421
6422 /**
6423 * Wraps addEventListener to capture UI breadcrumbs
6424 * @param evtName the event name (e.g. "click")
6425 * @returns {Function}
6426 * @private
6427 */
6428 _breadcrumbEventHandler: function(evtName) {
6429 var self = this;
6430 return function(evt) {
6431 // reset keypress timeout; e.g. triggering a 'click' after
6432 // a 'keypress' will reset the keypress debounce so that a new
6433 // set of keypresses can be recorded
6434 self._keypressTimeout = null;
6435
6436 // It's possible this handler might trigger multiple times for the same
6437 // event (e.g. event propagation through node ancestors). Ignore if we've
6438 // already captured the event.
6439 if (self._lastCapturedEvent === evt) return;
6440
6441 self._lastCapturedEvent = evt;
6442
6443 // try/catch both:
6444 // - accessing evt.target (see getsentry/raven-js#838, #768)
6445 // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly
6446 // can throw an exception in some circumstances.
6447 var target;
6448 try {
6449 target = htmlTreeAsString(evt.target);
6450 } catch (e) {
6451 target = '<unknown>';
6452 }
6453
6454 self.captureBreadcrumb({
6455 category: 'ui.' + evtName, // e.g. ui.click, ui.input
6456 message: target
6457 });
6458 };
6459 },
6460
6461 /**
6462 * Wraps addEventListener to capture keypress UI events
6463 * @returns {Function}
6464 * @private
6465 */
6466 _keypressEventHandler: function() {
6467 var self = this,
6468 debounceDuration = 1000; // milliseconds
6469
6470 // TODO: if somehow user switches keypress target before
6471 // debounce timeout is triggered, we will only capture
6472 // a single breadcrumb from the FIRST target (acceptable?)
6473 return function(evt) {
6474 var target;
6475 try {
6476 target = evt.target;
6477 } catch (e) {
6478 // just accessing event properties can throw an exception in some rare circumstances
6479 // see: https://github.com/getsentry/raven-js/issues/838
6480 return;
6481 }
6482 var tagName = target && target.tagName;
6483
6484 // only consider keypress events on actual input elements
6485 // this will disregard keypresses targeting body (e.g. tabbing
6486 // through elements, hotkeys, etc)
6487 if (
6488 !tagName ||
6489 (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable)
6490 )
6491 return;
6492
6493 // record first keypress in a series, but ignore subsequent
6494 // keypresses until debounce clears
6495 var timeout = self._keypressTimeout;
6496 if (!timeout) {
6497 self._breadcrumbEventHandler('input')(evt);
6498 }
6499 clearTimeout(timeout);
6500 self._keypressTimeout = setTimeout(function() {
6501 self._keypressTimeout = null;
6502 }, debounceDuration);
6503 };
6504 },
6505
6506 /**
6507 * Captures a breadcrumb of type "navigation", normalizing input URLs
6508 * @param to the originating URL
6509 * @param from the target URL
6510 * @private
6511 */
6512 _captureUrlChange: function(from, to) {
6513 var parsedLoc = parseUrl(this._location.href);
6514 var parsedTo = parseUrl(to);
6515 var parsedFrom = parseUrl(from);
6516
6517 // because onpopstate only tells you the "new" (to) value of location.href, and
6518 // not the previous (from) value, we need to track the value of the current URL
6519 // state ourselves
6520 this._lastHref = to;
6521
6522 // Use only the path component of the URL if the URL matches the current
6523 // document (almost all the time when using pushState)
6524 if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host)
6525 to = parsedTo.relative;
6526 if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host)
6527 from = parsedFrom.relative;
6528
6529 this.captureBreadcrumb({
6530 category: 'navigation',
6531 data: {
6532 to: to,
6533 from: from
6534 }
6535 });
6536 },
6537
6538 /**
6539 * Wrap timer functions and event targets to catch errors and provide
6540 * better metadata.
6541 */
6542 _instrumentTryCatch: function() {
6543 var self = this;
6544
6545 var wrappedBuiltIns = self._wrappedBuiltIns;
6546
6547 function wrapTimeFn(orig) {
6548 return function(fn, t) {
6549 // preserve arity
6550 // Make a copy of the arguments to prevent deoptimization
6551 // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
6552 var args = new Array(arguments.length);
6553 for (var i = 0; i < args.length; ++i) {
6554 args[i] = arguments[i];
6555 }
6556 var originalCallback = args[0];
6557 if (isFunction(originalCallback)) {
6558 args[0] = self.wrap(originalCallback);
6559 }
6560
6561 // IE < 9 doesn't support .call/.apply on setInterval/setTimeout, but it
6562 // also supports only two arguments and doesn't care what this is, so we
6563 // can just call the original function directly.
6564 if (orig.apply) {
6565 return orig.apply(this, args);
6566 } else {
6567 return orig(args[0], args[1]);
6568 }
6569 };
6570 }
6571
6572 var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
6573
6574 function wrapEventTarget(global) {
6575 var proto = _window[global] && _window[global].prototype;
6576 if (proto && proto.hasOwnProperty && proto.hasOwnProperty('addEventListener')) {
6577 fill(
6578 proto,
6579 'addEventListener',
6580 function(orig) {
6581 return function(evtName, fn, capture, secure) {
6582 // preserve arity
6583 try {
6584 if (fn && fn.handleEvent) {
6585 fn.handleEvent = self.wrap(fn.handleEvent);
6586 }
6587 } catch (err) {
6588 // can sometimes get 'Permission denied to access property "handle Event'
6589 }
6590
6591 // More breadcrumb DOM capture ... done here and not in `_instrumentBreadcrumbs`
6592 // so that we don't have more than one wrapper function
6593 var before, clickHandler, keypressHandler;
6594
6595 if (
6596 autoBreadcrumbs &&
6597 autoBreadcrumbs.dom &&
6598 (global === 'EventTarget' || global === 'Node')
6599 ) {
6600 // NOTE: generating multiple handlers per addEventListener invocation, should
6601 // revisit and verify we can just use one (almost certainly)
6602 clickHandler = self._breadcrumbEventHandler('click');
6603 keypressHandler = self._keypressEventHandler();
6604 before = function(evt) {
6605 // need to intercept every DOM event in `before` argument, in case that
6606 // same wrapped method is re-used for different events (e.g. mousemove THEN click)
6607 // see #724
6608 if (!evt) return;
6609
6610 var eventType;
6611 try {
6612 eventType = evt.type;
6613 } catch (e) {
6614 // just accessing event properties can throw an exception in some rare circumstances
6615 // see: https://github.com/getsentry/raven-js/issues/838
6616 return;
6617 }
6618 if (eventType === 'click') return clickHandler(evt);
6619 else if (eventType === 'keypress') return keypressHandler(evt);
6620 };
6621 }
6622 return orig.call(
6623 this,
6624 evtName,
6625 self.wrap(fn, undefined, before),
6626 capture,
6627 secure
6628 );
6629 };
6630 },
6631 wrappedBuiltIns
6632 );
6633 fill(
6634 proto,
6635 'removeEventListener',
6636 function(orig) {
6637 return function(evt, fn, capture, secure) {
6638 try {
6639 fn = fn && (fn.__raven_wrapper__ ? fn.__raven_wrapper__ : fn);
6640 } catch (e) {
6641 // ignore, accessing __raven_wrapper__ will throw in some Selenium environments
6642 }
6643 return orig.call(this, evt, fn, capture, secure);
6644 };
6645 },
6646 wrappedBuiltIns
6647 );
6648 }
6649 }
6650
6651 fill(_window, 'setTimeout', wrapTimeFn, wrappedBuiltIns);
6652 fill(_window, 'setInterval', wrapTimeFn, wrappedBuiltIns);
6653 if (_window.requestAnimationFrame) {
6654 fill(
6655 _window,
6656 'requestAnimationFrame',
6657 function(orig) {
6658 return function(cb) {
6659 return orig(self.wrap(cb));
6660 };
6661 },
6662 wrappedBuiltIns
6663 );
6664 }
6665
6666 // event targets borrowed from bugsnag-js:
6667 // https://github.com/bugsnag/bugsnag-js/blob/master/src/bugsnag.js#L666
6668 var eventTargets = [
6669 'EventTarget',
6670 'Window',
6671 'Node',
6672 'ApplicationCache',
6673 'AudioTrackList',
6674 'ChannelMergerNode',
6675 'CryptoOperation',
6676 'EventSource',
6677 'FileReader',
6678 'HTMLUnknownElement',
6679 'IDBDatabase',
6680 'IDBRequest',
6681 'IDBTransaction',
6682 'KeyOperation',
6683 'MediaController',
6684 'MessagePort',
6685 'ModalWindow',
6686 'Notification',
6687 'SVGElementInstance',
6688 'Screen',
6689 'TextTrack',
6690 'TextTrackCue',
6691 'TextTrackList',
6692 'WebSocket',
6693 'WebSocketWorker',
6694 'Worker',
6695 'XMLHttpRequest',
6696 'XMLHttpRequestEventTarget',
6697 'XMLHttpRequestUpload'
6698 ];
6699 for (var i = 0; i < eventTargets.length; i++) {
6700 wrapEventTarget(eventTargets[i]);
6701 }
6702 },
6703
6704 /**
6705 * Instrument browser built-ins w/ breadcrumb capturing
6706 * - XMLHttpRequests
6707 * - DOM interactions (click/typing)
6708 * - window.location changes
6709 * - console
6710 *
6711 * Can be disabled or individually configured via the `autoBreadcrumbs` config option
6712 */
6713 _instrumentBreadcrumbs: function() {
6714 var self = this;
6715 var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
6716
6717 var wrappedBuiltIns = self._wrappedBuiltIns;
6718
6719 function wrapProp(prop, xhr) {
6720 if (prop in xhr && isFunction(xhr[prop])) {
6721 fill(xhr, prop, function(orig) {
6722 return self.wrap(orig);
6723 }); // intentionally don't track filled methods on XHR instances
6724 }
6725 }
6726
6727 if (autoBreadcrumbs.xhr && 'XMLHttpRequest' in _window) {
6728 var xhrproto = XMLHttpRequest.prototype;
6729 fill(
6730 xhrproto,
6731 'open',
6732 function(origOpen) {
6733 return function(method, url) {
6734 // preserve arity
6735
6736 // if Sentry key appears in URL, don't capture
6737 if (isString(url) && url.indexOf(self._globalKey) === -1) {
6738 this.__raven_xhr = {
6739 method: method,
6740 url: url,
6741 status_code: null
6742 };
6743 }
6744
6745 return origOpen.apply(this, arguments);
6746 };
6747 },
6748 wrappedBuiltIns
6749 );
6750
6751 fill(
6752 xhrproto,
6753 'send',
6754 function(origSend) {
6755 return function(data) {
6756 // preserve arity
6757 var xhr = this;
6758
6759 function onreadystatechangeHandler() {
6760 if (xhr.__raven_xhr && xhr.readyState === 4) {
6761 try {
6762 // touching statusCode in some platforms throws
6763 // an exception
6764 xhr.__raven_xhr.status_code = xhr.status;
6765 } catch (e) {
6766 /* do nothing */
6767 }
6768
6769 self.captureBreadcrumb({
6770 type: 'http',
6771 category: 'xhr',
6772 data: xhr.__raven_xhr
6773 });
6774 }
6775 }
6776
6777 var props = ['onload', 'onerror', 'onprogress'];
6778 for (var j = 0; j < props.length; j++) {
6779 wrapProp(props[j], xhr);
6780 }
6781
6782 if ('onreadystatechange' in xhr && isFunction(xhr.onreadystatechange)) {
6783 fill(
6784 xhr,
6785 'onreadystatechange',
6786 function(orig) {
6787 return self.wrap(orig, undefined, onreadystatechangeHandler);
6788 } /* intentionally don't track this instrumentation */
6789 );
6790 } else {
6791 // if onreadystatechange wasn't actually set by the page on this xhr, we
6792 // are free to set our own and capture the breadcrumb
6793 xhr.onreadystatechange = onreadystatechangeHandler;
6794 }
6795
6796 return origSend.apply(this, arguments);
6797 };
6798 },
6799 wrappedBuiltIns
6800 );
6801 }
6802
6803 if (autoBreadcrumbs.xhr && 'fetch' in _window) {
6804 fill(
6805 _window,
6806 'fetch',
6807 function(origFetch) {
6808 return function(fn, t) {
6809 // preserve arity
6810 // Make a copy of the arguments to prevent deoptimization
6811 // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
6812 var args = new Array(arguments.length);
6813 for (var i = 0; i < args.length; ++i) {
6814 args[i] = arguments[i];
6815 }
6816
6817 var fetchInput = args[0];
6818 var method = 'GET';
6819 var url;
6820
6821 if (typeof fetchInput === 'string') {
6822 url = fetchInput;
6823 } else if ('Request' in _window && fetchInput instanceof _window.Request) {
6824 url = fetchInput.url;
6825 if (fetchInput.method) {
6826 method = fetchInput.method;
6827 }
6828 } else {
6829 url = '' + fetchInput;
6830 }
6831
6832 if (args[1] && args[1].method) {
6833 method = args[1].method;
6834 }
6835
6836 var fetchData = {
6837 method: method,
6838 url: url,
6839 status_code: null
6840 };
6841
6842 self.captureBreadcrumb({
6843 type: 'http',
6844 category: 'fetch',
6845 data: fetchData
6846 });
6847
6848 return origFetch.apply(this, args).then(function(response) {
6849 fetchData.status_code = response.status;
6850
6851 return response;
6852 });
6853 };
6854 },
6855 wrappedBuiltIns
6856 );
6857 }
6858
6859 // Capture breadcrumbs from any click that is unhandled / bubbled up all the way
6860 // to the document. Do this before we instrument addEventListener.
6861 if (autoBreadcrumbs.dom && this._hasDocument) {
6862 if (_document.addEventListener) {
6863 _document.addEventListener('click', self._breadcrumbEventHandler('click'), false);
6864 _document.addEventListener('keypress', self._keypressEventHandler(), false);
6865 } else {
6866 // IE8 Compatibility
6867 _document.attachEvent('onclick', self._breadcrumbEventHandler('click'));
6868 _document.attachEvent('onkeypress', self._keypressEventHandler());
6869 }
6870 }
6871
6872 // record navigation (URL) changes
6873 // NOTE: in Chrome App environment, touching history.pushState, *even inside
6874 // a try/catch block*, will cause Chrome to output an error to console.error
6875 // borrowed from: https://github.com/angular/angular.js/pull/13945/files
6876 var chrome = _window.chrome;
6877 var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;
6878 var hasPushAndReplaceState =
6879 !isChromePackagedApp &&
6880 _window.history &&
6881 history.pushState &&
6882 history.replaceState;
6883 if (autoBreadcrumbs.location && hasPushAndReplaceState) {
6884 // TODO: remove onpopstate handler on uninstall()
6885 var oldOnPopState = _window.onpopstate;
6886 _window.onpopstate = function() {
6887 var currentHref = self._location.href;
6888 self._captureUrlChange(self._lastHref, currentHref);
6889
6890 if (oldOnPopState) {
6891 return oldOnPopState.apply(this, arguments);
6892 }
6893 };
6894
6895 var historyReplacementFunction = function(origHistFunction) {
6896 // note history.pushState.length is 0; intentionally not declaring
6897 // params to preserve 0 arity
6898 return function(/* state, title, url */) {
6899 var url = arguments.length > 2 ? arguments[2] : undefined;
6900
6901 // url argument is optional
6902 if (url) {
6903 // coerce to string (this is what pushState does)
6904 self._captureUrlChange(self._lastHref, url + '');
6905 }
6906
6907 return origHistFunction.apply(this, arguments);
6908 };
6909 };
6910
6911 fill(history, 'pushState', historyReplacementFunction, wrappedBuiltIns);
6912 fill(history, 'replaceState', historyReplacementFunction, wrappedBuiltIns);
6913 }
6914
6915 if (autoBreadcrumbs.console && 'console' in _window && console.log) {
6916 // console
6917 var consoleMethodCallback = function(msg, data) {
6918 self.captureBreadcrumb({
6919 message: msg,
6920 level: data.level,
6921 category: 'console'
6922 });
6923 };
6924
6925 each(['debug', 'info', 'warn', 'error', 'log'], function(_, level) {
6926 wrapConsoleMethod(console, level, consoleMethodCallback);
6927 });
6928 }
6929 },
6930
6931 _restoreBuiltIns: function() {
6932 // restore any wrapped builtins
6933 var builtin;
6934 while (this._wrappedBuiltIns.length) {
6935 builtin = this._wrappedBuiltIns.shift();
6936
6937 var obj = builtin[0],
6938 name = builtin[1],
6939 orig = builtin[2];
6940
6941 obj[name] = orig;
6942 }
6943 },
6944
6945 _drainPlugins: function() {
6946 var self = this;
6947
6948 // FIX ME TODO
6949 each(this._plugins, function(_, plugin) {
6950 var installer = plugin[0];
6951 var args = plugin[1];
6952 installer.apply(self, [self].concat(args));
6953 });
6954 },
6955
6956 _parseDSN: function(str) {
6957 var m = dsnPattern.exec(str),
6958 dsn = {},
6959 i = 7;
6960
6961 try {
6962 while (i--) dsn[dsnKeys[i]] = m[i] || '';
6963 } catch (e) {
6964 throw new RavenConfigError('Invalid DSN: ' + str);
6965 }
6966
6967 if (dsn.pass && !this._globalOptions.allowSecretKey) {
6968 throw new RavenConfigError(
6969 'Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key'
6970 );
6971 }
6972
6973 return dsn;
6974 },
6975
6976 _getGlobalServer: function(uri) {
6977 // assemble the endpoint from the uri pieces
6978 var globalServer = '//' + uri.host + (uri.port ? ':' + uri.port : '');
6979
6980 if (uri.protocol) {
6981 globalServer = uri.protocol + ':' + globalServer;
6982 }
6983 return globalServer;
6984 },
6985
6986 _handleOnErrorStackInfo: function() {
6987 // if we are intentionally ignoring errors via onerror, bail out
6988 if (!this._ignoreOnError) {
6989 this._handleStackInfo.apply(this, arguments);
6990 }
6991 },
6992
6993 _handleStackInfo: function(stackInfo, options) {
6994 var frames = this._prepareFrames(stackInfo, options);
6995
6996 this._triggerEvent('handle', {
6997 stackInfo: stackInfo,
6998 options: options
6999 });
7000
7001 this._processException(
7002 stackInfo.name,
7003 stackInfo.message,
7004 stackInfo.url,
7005 stackInfo.lineno,
7006 frames,
7007 options
7008 );
7009 },
7010
7011 _prepareFrames: function(stackInfo, options) {
7012 var self = this;
7013 var frames = [];
7014 if (stackInfo.stack && stackInfo.stack.length) {
7015 each(stackInfo.stack, function(i, stack) {
7016 var frame = self._normalizeFrame(stack, stackInfo.url);
7017 if (frame) {
7018 frames.push(frame);
7019 }
7020 });
7021
7022 // e.g. frames captured via captureMessage throw
7023 if (options && options.trimHeadFrames) {
7024 for (var j = 0; j < options.trimHeadFrames && j < frames.length; j++) {
7025 frames[j].in_app = false;
7026 }
7027 }
7028 }
7029 frames = frames.slice(0, this._globalOptions.stackTraceLimit);
7030 return frames;
7031 },
7032
7033 _normalizeFrame: function(frame, stackInfoUrl) {
7034 // normalize the frames data
7035 var normalized = {
7036 filename: frame.url,
7037 lineno: frame.line,
7038 colno: frame.column,
7039 function: frame.func || '?'
7040 };
7041
7042 // Case when we don't have any information about the error
7043 // E.g. throwing a string or raw object, instead of an `Error` in Firefox
7044 // Generating synthetic error doesn't add any value here
7045 //
7046 // We should probably somehow let a user know that they should fix their code
7047 if (!frame.url) {
7048 normalized.filename = stackInfoUrl; // fallback to whole stacks url from onerror handler
7049 }
7050
7051 normalized.in_app = !// determine if an exception came from outside of our app
7052 // first we check the global includePaths list.
7053 (
7054 (!!this._globalOptions.includePaths.test &&
7055 !this._globalOptions.includePaths.test(normalized.filename)) ||
7056 // Now we check for fun, if the function name is Raven or TraceKit
7057 /(Raven|TraceKit)\./.test(normalized['function']) ||
7058 // finally, we do a last ditch effort and check for raven.min.js
7059 /raven\.(min\.)?js$/.test(normalized.filename)
7060 );
7061
7062 return normalized;
7063 },
7064
7065 _processException: function(type, message, fileurl, lineno, frames, options) {
7066 var prefixedMessage = (type ? type + ': ' : '') + (message || '');
7067 if (
7068 !!this._globalOptions.ignoreErrors.test &&
7069 (this._globalOptions.ignoreErrors.test(message) ||
7070 this._globalOptions.ignoreErrors.test(prefixedMessage))
7071 ) {
7072 return;
7073 }
7074
7075 var stacktrace;
7076
7077 if (frames && frames.length) {
7078 fileurl = frames[0].filename || fileurl;
7079 // Sentry expects frames oldest to newest
7080 // and JS sends them as newest to oldest
7081 frames.reverse();
7082 stacktrace = {frames: frames};
7083 } else if (fileurl) {
7084 stacktrace = {
7085 frames: [
7086 {
7087 filename: fileurl,
7088 lineno: lineno,
7089 in_app: true
7090 }
7091 ]
7092 };
7093 }
7094
7095 if (
7096 !!this._globalOptions.ignoreUrls.test &&
7097 this._globalOptions.ignoreUrls.test(fileurl)
7098 ) {
7099 return;
7100 }
7101
7102 if (
7103 !!this._globalOptions.whitelistUrls.test &&
7104 !this._globalOptions.whitelistUrls.test(fileurl)
7105 ) {
7106 return;
7107 }
7108
7109 var data = objectMerge(
7110 {
7111 // sentry.interfaces.Exception
7112 exception: {
7113 values: [
7114 {
7115 type: type,
7116 value: message,
7117 stacktrace: stacktrace
7118 }
7119 ]
7120 },
7121 culprit: fileurl
7122 },
7123 options
7124 );
7125
7126 // Fire away!
7127 this._send(data);
7128 },
7129
7130 _trimPacket: function(data) {
7131 // For now, we only want to truncate the two different messages
7132 // but this could/should be expanded to just trim everything
7133 var max = this._globalOptions.maxMessageLength;
7134 if (data.message) {
7135 data.message = truncate(data.message, max);
7136 }
7137 if (data.exception) {
7138 var exception = data.exception.values[0];
7139 exception.value = truncate(exception.value, max);
7140 }
7141
7142 var request = data.request;
7143 if (request) {
7144 if (request.url) {
7145 request.url = truncate(request.url, this._globalOptions.maxUrlLength);
7146 }
7147 if (request.Referer) {
7148 request.Referer = truncate(request.Referer, this._globalOptions.maxUrlLength);
7149 }
7150 }
7151
7152 if (data.breadcrumbs && data.breadcrumbs.values)
7153 this._trimBreadcrumbs(data.breadcrumbs);
7154
7155 return data;
7156 },
7157
7158 /**
7159 * Truncate breadcrumb values (right now just URLs)
7160 */
7161 _trimBreadcrumbs: function(breadcrumbs) {
7162 // known breadcrumb properties with urls
7163 // TODO: also consider arbitrary prop values that start with (https?)?://
7164 var urlProps = ['to', 'from', 'url'],
7165 urlProp,
7166 crumb,
7167 data;
7168
7169 for (var i = 0; i < breadcrumbs.values.length; ++i) {
7170 crumb = breadcrumbs.values[i];
7171 if (
7172 !crumb.hasOwnProperty('data') ||
7173 !isObject(crumb.data) ||
7174 objectFrozen(crumb.data)
7175 )
7176 continue;
7177
7178 data = objectMerge({}, crumb.data);
7179 for (var j = 0; j < urlProps.length; ++j) {
7180 urlProp = urlProps[j];
7181 if (data.hasOwnProperty(urlProp) && data[urlProp]) {
7182 data[urlProp] = truncate(data[urlProp], this._globalOptions.maxUrlLength);
7183 }
7184 }
7185 breadcrumbs.values[i].data = data;
7186 }
7187 },
7188
7189 _getHttpData: function() {
7190 if (!this._hasNavigator && !this._hasDocument) return;
7191 var httpData = {};
7192
7193 if (this._hasNavigator && _navigator.userAgent) {
7194 httpData.headers = {
7195 'User-Agent': navigator.userAgent
7196 };
7197 }
7198
7199 if (this._hasDocument) {
7200 if (_document.location && _document.location.href) {
7201 httpData.url = _document.location.href;
7202 }
7203 if (_document.referrer) {
7204 if (!httpData.headers) httpData.headers = {};
7205 httpData.headers.Referer = _document.referrer;
7206 }
7207 }
7208
7209 return httpData;
7210 },
7211
7212 _resetBackoff: function() {
7213 this._backoffDuration = 0;
7214 this._backoffStart = null;
7215 },
7216
7217 _shouldBackoff: function() {
7218 return this._backoffDuration && now() - this._backoffStart < this._backoffDuration;
7219 },
7220
7221 /**
7222 * Returns true if the in-process data payload matches the signature
7223 * of the previously-sent data
7224 *
7225 * NOTE: This has to be done at this level because TraceKit can generate
7226 * data from window.onerror WITHOUT an exception object (IE8, IE9,
7227 * other old browsers). This can take the form of an "exception"
7228 * data object with a single frame (derived from the onerror args).
7229 */
7230 _isRepeatData: function(current) {
7231 var last = this._lastData;
7232
7233 if (
7234 !last ||
7235 current.message !== last.message || // defined for captureMessage
7236 current.culprit !== last.culprit // defined for captureException/onerror
7237 )
7238 return false;
7239
7240 // Stacktrace interface (i.e. from captureMessage)
7241 if (current.stacktrace || last.stacktrace) {
7242 return isSameStacktrace(current.stacktrace, last.stacktrace);
7243 } else if (current.exception || last.exception) {
7244 // Exception interface (i.e. from captureException/onerror)
7245 return isSameException(current.exception, last.exception);
7246 }
7247
7248 return true;
7249 },
7250
7251 _setBackoffState: function(request) {
7252 // If we are already in a backoff state, don't change anything
7253 if (this._shouldBackoff()) {
7254 return;
7255 }
7256
7257 var status = request.status;
7258
7259 // 400 - project_id doesn't exist or some other fatal
7260 // 401 - invalid/revoked dsn
7261 // 429 - too many requests
7262 if (!(status === 400 || status === 401 || status === 429)) return;
7263
7264 var retry;
7265 try {
7266 // If Retry-After is not in Access-Control-Expose-Headers, most
7267 // browsers will throw an exception trying to access it
7268 retry = request.getResponseHeader('Retry-After');
7269 retry = parseInt(retry, 10) * 1000; // Retry-After is returned in seconds
7270 } catch (e) {
7271 /* eslint no-empty:0 */
7272 }
7273
7274 this._backoffDuration = retry
7275 ? // If Sentry server returned a Retry-After value, use it
7276 retry
7277 : // Otherwise, double the last backoff duration (starts at 1 sec)
7278 this._backoffDuration * 2 || 1000;
7279
7280 this._backoffStart = now();
7281 },
7282
7283 _send: function(data) {
7284 var globalOptions = this._globalOptions;
7285
7286 var baseData = {
7287 project: this._globalProject,
7288 logger: globalOptions.logger,
7289 platform: 'javascript'
7290 },
7291 httpData = this._getHttpData();
7292
7293 if (httpData) {
7294 baseData.request = httpData;
7295 }
7296
7297 // HACK: delete `trimHeadFrames` to prevent from appearing in outbound payload
7298 if (data.trimHeadFrames) delete data.trimHeadFrames;
7299
7300 data = objectMerge(baseData, data);
7301
7302 // Merge in the tags and extra separately since objectMerge doesn't handle a deep merge
7303 data.tags = objectMerge(objectMerge({}, this._globalContext.tags), data.tags);
7304 data.extra = objectMerge(objectMerge({}, this._globalContext.extra), data.extra);
7305
7306 // Send along our own collected metadata with extra
7307 data.extra['session:duration'] = now() - this._startTime;
7308
7309 if (this._breadcrumbs && this._breadcrumbs.length > 0) {
7310 // intentionally make shallow copy so that additions
7311 // to breadcrumbs aren't accidentally sent in this request
7312 data.breadcrumbs = {
7313 values: [].slice.call(this._breadcrumbs, 0)
7314 };
7315 }
7316
7317 // If there are no tags/extra, strip the key from the payload alltogther.
7318 if (isEmptyObject(data.tags)) delete data.tags;
7319
7320 if (this._globalContext.user) {
7321 // sentry.interfaces.User
7322 data.user = this._globalContext.user;
7323 }
7324
7325 // Include the environment if it's defined in globalOptions
7326 if (globalOptions.environment) data.environment = globalOptions.environment;
7327
7328 // Include the release if it's defined in globalOptions
7329 if (globalOptions.release) data.release = globalOptions.release;
7330
7331 // Include server_name if it's defined in globalOptions
7332 if (globalOptions.serverName) data.server_name = globalOptions.serverName;
7333
7334 if (isFunction(globalOptions.dataCallback)) {
7335 data = globalOptions.dataCallback(data) || data;
7336 }
7337
7338 // Why??????????
7339 if (!data || isEmptyObject(data)) {
7340 return;
7341 }
7342
7343 // Check if the request should be filtered or not
7344 if (
7345 isFunction(globalOptions.shouldSendCallback) &&
7346 !globalOptions.shouldSendCallback(data)
7347 ) {
7348 return;
7349 }
7350
7351 // Backoff state: Sentry server previously responded w/ an error (e.g. 429 - too many requests),
7352 // so drop requests until "cool-off" period has elapsed.
7353 if (this._shouldBackoff()) {
7354 this._logDebug('warn', 'Raven dropped error due to backoff: ', data);
7355 return;
7356 }
7357
7358 if (typeof globalOptions.sampleRate === 'number') {
7359 if (Math.random() < globalOptions.sampleRate) {
7360 this._sendProcessedPayload(data);
7361 }
7362 } else {
7363 this._sendProcessedPayload(data);
7364 }
7365 },
7366
7367 _getUuid: function() {
7368 return uuid4();
7369 },
7370
7371 _sendProcessedPayload: function(data, callback) {
7372 var self = this;
7373 var globalOptions = this._globalOptions;
7374
7375 if (!this.isSetup()) return;
7376
7377 // Try and clean up the packet before sending by truncating long values
7378 data = this._trimPacket(data);
7379
7380 // ideally duplicate error testing should occur *before* dataCallback/shouldSendCallback,
7381 // but this would require copying an un-truncated copy of the data packet, which can be
7382 // arbitrarily deep (extra_data) -- could be worthwhile? will revisit
7383 if (!this._globalOptions.allowDuplicates && this._isRepeatData(data)) {
7384 this._logDebug('warn', 'Raven dropped repeat event: ', data);
7385 return;
7386 }
7387
7388 // Send along an event_id if not explicitly passed.
7389 // This event_id can be used to reference the error within Sentry itself.
7390 // Set lastEventId after we know the error should actually be sent
7391 this._lastEventId = data.event_id || (data.event_id = this._getUuid());
7392
7393 // Store outbound payload after trim
7394 this._lastData = data;
7395
7396 this._logDebug('debug', 'Raven about to send:', data);
7397
7398 var auth = {
7399 sentry_version: '7',
7400 sentry_client: 'raven-js/' + this.VERSION,
7401 sentry_key: this._globalKey
7402 };
7403
7404 if (this._globalSecret) {
7405 auth.sentry_secret = this._globalSecret;
7406 }
7407
7408 var exception = data.exception && data.exception.values[0];
7409 this.captureBreadcrumb({
7410 category: 'sentry',
7411 message: exception
7412 ? (exception.type ? exception.type + ': ' : '') + exception.value
7413 : data.message,
7414 event_id: data.event_id,
7415 level: data.level || 'error' // presume error unless specified
7416 });
7417
7418 var url = this._globalEndpoint;
7419 (globalOptions.transport || this._makeRequest).call(this, {
7420 url: url,
7421 auth: auth,
7422 data: data,
7423 options: globalOptions,
7424 onSuccess: function success() {
7425 self._resetBackoff();
7426
7427 self._triggerEvent('success', {
7428 data: data,
7429 src: url
7430 });
7431 callback && callback();
7432 },
7433 onError: function failure(error) {
7434 self._logDebug('error', 'Raven transport failed to send: ', error);
7435
7436 if (error.request) {
7437 self._setBackoffState(error.request);
7438 }
7439
7440 self._triggerEvent('failure', {
7441 data: data,
7442 src: url
7443 });
7444 error = error || new Error('Raven send failed (no additional details provided)');
7445 callback && callback(error);
7446 }
7447 });
7448 },
7449
7450 _makeRequest: function(opts) {
7451 var request = _window.XMLHttpRequest && new _window.XMLHttpRequest();
7452 if (!request) return;
7453
7454 // if browser doesn't support CORS (e.g. IE7), we are out of luck
7455 var hasCORS = 'withCredentials' in request || typeof XDomainRequest !== 'undefined';
7456
7457 if (!hasCORS) return;
7458
7459 var url = opts.url;
7460
7461 if ('withCredentials' in request) {
7462 request.onreadystatechange = function() {
7463 if (request.readyState !== 4) {
7464 return;
7465 } else if (request.status === 200) {
7466 opts.onSuccess && opts.onSuccess();
7467 } else if (opts.onError) {
7468 var err = new Error('Sentry error code: ' + request.status);
7469 err.request = request;
7470 opts.onError(err);
7471 }
7472 };
7473 } else {
7474 request = new XDomainRequest();
7475 // xdomainrequest cannot go http -> https (or vice versa),
7476 // so always use protocol relative
7477 url = url.replace(/^https?:/, '');
7478
7479 // onreadystatechange not supported by XDomainRequest
7480 if (opts.onSuccess) {
7481 request.onload = opts.onSuccess;
7482 }
7483 if (opts.onError) {
7484 request.onerror = function() {
7485 var err = new Error('Sentry error code: XDomainRequest');
7486 err.request = request;
7487 opts.onError(err);
7488 };
7489 }
7490 }
7491
7492 // NOTE: auth is intentionally sent as part of query string (NOT as custom
7493 // HTTP header) so as to avoid preflight CORS requests
7494 request.open('POST', url + '?' + urlencode(opts.auth));
7495 request.send(stringify(opts.data));
7496 },
7497
7498 _logDebug: function(level) {
7499 if (this._originalConsoleMethods[level] && this.debug) {
7500 // In IE<10 console methods do not have their own 'apply' method
7501 Function.prototype.apply.call(
7502 this._originalConsoleMethods[level],
7503 this._originalConsole,
7504 [].slice.call(arguments, 1)
7505 );
7506 }
7507 },
7508
7509 _mergeContext: function(key, context) {
7510 if (isUndefined(context)) {
7511 delete this._globalContext[key];
7512 } else {
7513 this._globalContext[key] = objectMerge(this._globalContext[key] || {}, context);
7514 }
7515 }
7516 };
7517
7518 // Deprecations
7519 Raven.prototype.setUser = Raven.prototype.setUserContext;
7520 Raven.prototype.setReleaseContext = Raven.prototype.setRelease;
7521
7522 module.exports = Raven;
7523
7524
7525 /***/ }),
7526
7527 /***/ "./node_modules/raven-js/src/singleton.js":
7528 /*!************************************************!*\
7529 !*** ./node_modules/raven-js/src/singleton.js ***!
7530 \************************************************/
7531 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7532
7533 /**
7534 * Enforces a single instance of the Raven client, and the
7535 * main entry point for Raven. If you are a consumer of the
7536 * Raven library, you SHOULD load this file (vs raven.js).
7537 **/
7538
7539 var RavenConstructor = __webpack_require__(/*! ./raven */ "./node_modules/raven-js/src/raven.js");
7540
7541 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
7542 var _window =
7543 typeof window !== 'undefined'
7544 ? window
7545 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
7546 var _Raven = _window.Raven;
7547
7548 var Raven = new RavenConstructor();
7549
7550 /*
7551 * Allow multiple versions of Raven to be installed.
7552 * Strip Raven from the global context and returns the instance.
7553 *
7554 * @return {Raven}
7555 */
7556 Raven.noConflict = function() {
7557 _window.Raven = _Raven;
7558 return Raven;
7559 };
7560
7561 Raven.afterLoad();
7562
7563 module.exports = Raven;
7564
7565
7566 /***/ }),
7567
7568 /***/ "./node_modules/raven-js/src/utils.js":
7569 /*!********************************************!*\
7570 !*** ./node_modules/raven-js/src/utils.js ***!
7571 \********************************************/
7572 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7573
7574 var _window =
7575 typeof window !== 'undefined'
7576 ? window
7577 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
7578
7579 function isObject(what) {
7580 return typeof what === 'object' && what !== null;
7581 }
7582
7583 // Yanked from https://git.io/vS8DV re-used under CC0
7584 // with some tiny modifications
7585 function isError(value) {
7586 switch ({}.toString.call(value)) {
7587 case '[object Error]':
7588 return true;
7589 case '[object Exception]':
7590 return true;
7591 case '[object DOMException]':
7592 return true;
7593 default:
7594 return value instanceof Error;
7595 }
7596 }
7597
7598 function isErrorEvent(value) {
7599 return supportsErrorEvent() && {}.toString.call(value) === '[object ErrorEvent]';
7600 }
7601
7602 function isUndefined(what) {
7603 return what === void 0;
7604 }
7605
7606 function isFunction(what) {
7607 return typeof what === 'function';
7608 }
7609
7610 function isString(what) {
7611 return Object.prototype.toString.call(what) === '[object String]';
7612 }
7613
7614 function isEmptyObject(what) {
7615 for (var _ in what) return false; // eslint-disable-line guard-for-in, no-unused-vars
7616 return true;
7617 }
7618
7619 function supportsErrorEvent() {
7620 try {
7621 new ErrorEvent(''); // eslint-disable-line no-new
7622 return true;
7623 } catch (e) {
7624 return false;
7625 }
7626 }
7627
7628 function wrappedCallback(callback) {
7629 function dataCallback(data, original) {
7630 var normalizedData = callback(data) || data;
7631 if (original) {
7632 return original(normalizedData) || normalizedData;
7633 }
7634 return normalizedData;
7635 }
7636
7637 return dataCallback;
7638 }
7639
7640 function each(obj, callback) {
7641 var i, j;
7642
7643 if (isUndefined(obj.length)) {
7644 for (i in obj) {
7645 if (hasKey(obj, i)) {
7646 callback.call(null, i, obj[i]);
7647 }
7648 }
7649 } else {
7650 j = obj.length;
7651 if (j) {
7652 for (i = 0; i < j; i++) {
7653 callback.call(null, i, obj[i]);
7654 }
7655 }
7656 }
7657 }
7658
7659 function objectMerge(obj1, obj2) {
7660 if (!obj2) {
7661 return obj1;
7662 }
7663 each(obj2, function(key, value) {
7664 obj1[key] = value;
7665 });
7666 return obj1;
7667 }
7668
7669 /**
7670 * This function is only used for react-native.
7671 * react-native freezes object that have already been sent over the
7672 * js bridge. We need this function in order to check if the object is frozen.
7673 * So it's ok that objectFrozen returns false if Object.isFrozen is not
7674 * supported because it's not relevant for other "platforms". See related issue:
7675 * https://github.com/getsentry/react-native-sentry/issues/57
7676 */
7677 function objectFrozen(obj) {
7678 if (!Object.isFrozen) {
7679 return false;
7680 }
7681 return Object.isFrozen(obj);
7682 }
7683
7684 function truncate(str, max) {
7685 return !max || str.length <= max ? str : str.substr(0, max) + '\u2026';
7686 }
7687
7688 /**
7689 * hasKey, a better form of hasOwnProperty
7690 * Example: hasKey(MainHostObject, property) === true/false
7691 *
7692 * @param {Object} host object to check property
7693 * @param {string} key to check
7694 */
7695 function hasKey(object, key) {
7696 return Object.prototype.hasOwnProperty.call(object, key);
7697 }
7698
7699 function joinRegExp(patterns) {
7700 // Combine an array of regular expressions and strings into one large regexp
7701 // Be mad.
7702 var sources = [],
7703 i = 0,
7704 len = patterns.length,
7705 pattern;
7706
7707 for (; i < len; i++) {
7708 pattern = patterns[i];
7709 if (isString(pattern)) {
7710 // If it's a string, we need to escape it
7711 // Taken from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
7712 sources.push(pattern.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, '\\$1'));
7713 } else if (pattern && pattern.source) {
7714 // If it's a regexp already, we want to extract the source
7715 sources.push(pattern.source);
7716 }
7717 // Intentionally skip other cases
7718 }
7719 return new RegExp(sources.join('|'), 'i');
7720 }
7721
7722 function urlencode(o) {
7723 var pairs = [];
7724 each(o, function(key, value) {
7725 pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));
7726 });
7727 return pairs.join('&');
7728 }
7729
7730 // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B
7731 // intentionally using regex and not <a/> href parsing trick because React Native and other
7732 // environments where DOM might not be available
7733 function parseUrl(url) {
7734 var match = url.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);
7735 if (!match) return {};
7736
7737 // coerce to undefined values to empty string so we don't get 'undefined'
7738 var query = match[6] || '';
7739 var fragment = match[8] || '';
7740 return {
7741 protocol: match[2],
7742 host: match[4],
7743 path: match[5],
7744 relative: match[5] + query + fragment // everything minus origin
7745 };
7746 }
7747 function uuid4() {
7748 var crypto = _window.crypto || _window.msCrypto;
7749
7750 if (!isUndefined(crypto) && crypto.getRandomValues) {
7751 // Use window.crypto API if available
7752 // eslint-disable-next-line no-undef
7753 var arr = new Uint16Array(8);
7754 crypto.getRandomValues(arr);
7755
7756 // set 4 in byte 7
7757 arr[3] = (arr[3] & 0xfff) | 0x4000;
7758 // set 2 most significant bits of byte 9 to '10'
7759 arr[4] = (arr[4] & 0x3fff) | 0x8000;
7760
7761 var pad = function(num) {
7762 var v = num.toString(16);
7763 while (v.length < 4) {
7764 v = '0' + v;
7765 }
7766 return v;
7767 };
7768
7769 return (
7770 pad(arr[0]) +
7771 pad(arr[1]) +
7772 pad(arr[2]) +
7773 pad(arr[3]) +
7774 pad(arr[4]) +
7775 pad(arr[5]) +
7776 pad(arr[6]) +
7777 pad(arr[7])
7778 );
7779 } else {
7780 // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523
7781 return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
7782 var r = (Math.random() * 16) | 0,
7783 v = c === 'x' ? r : (r & 0x3) | 0x8;
7784 return v.toString(16);
7785 });
7786 }
7787 }
7788
7789 /**
7790 * Given a child DOM element, returns a query-selector statement describing that
7791 * and its ancestors
7792 * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]
7793 * @param elem
7794 * @returns {string}
7795 */
7796 function htmlTreeAsString(elem) {
7797 /* eslint no-extra-parens:0*/
7798 var MAX_TRAVERSE_HEIGHT = 5,
7799 MAX_OUTPUT_LEN = 80,
7800 out = [],
7801 height = 0,
7802 len = 0,
7803 separator = ' > ',
7804 sepLength = separator.length,
7805 nextStr;
7806
7807 while (elem && height++ < MAX_TRAVERSE_HEIGHT) {
7808 nextStr = htmlElementAsString(elem);
7809 // bail out if
7810 // - nextStr is the 'html' element
7811 // - the length of the string that would be created exceeds MAX_OUTPUT_LEN
7812 // (ignore this limit if we are on the first iteration)
7813 if (
7814 nextStr === 'html' ||
7815 (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)
7816 ) {
7817 break;
7818 }
7819
7820 out.push(nextStr);
7821
7822 len += nextStr.length;
7823 elem = elem.parentNode;
7824 }
7825
7826 return out.reverse().join(separator);
7827 }
7828
7829 /**
7830 * Returns a simple, query-selector representation of a DOM element
7831 * e.g. [HTMLElement] => input#foo.btn[name=baz]
7832 * @param HTMLElement
7833 * @returns {string}
7834 */
7835 function htmlElementAsString(elem) {
7836 var out = [],
7837 className,
7838 classes,
7839 key,
7840 attr,
7841 i;
7842
7843 if (!elem || !elem.tagName) {
7844 return '';
7845 }
7846
7847 out.push(elem.tagName.toLowerCase());
7848 if (elem.id) {
7849 out.push('#' + elem.id);
7850 }
7851
7852 className = elem.className;
7853 if (className && isString(className)) {
7854 classes = className.split(/\s+/);
7855 for (i = 0; i < classes.length; i++) {
7856 out.push('.' + classes[i]);
7857 }
7858 }
7859 var attrWhitelist = ['type', 'name', 'title', 'alt'];
7860 for (i = 0; i < attrWhitelist.length; i++) {
7861 key = attrWhitelist[i];
7862 attr = elem.getAttribute(key);
7863 if (attr) {
7864 out.push('[' + key + '="' + attr + '"]');
7865 }
7866 }
7867 return out.join('');
7868 }
7869
7870 /**
7871 * Returns true if either a OR b is truthy, but not both
7872 */
7873 function isOnlyOneTruthy(a, b) {
7874 return !!(!!a ^ !!b);
7875 }
7876
7877 /**
7878 * Returns true if the two input exception interfaces have the same content
7879 */
7880 function isSameException(ex1, ex2) {
7881 if (isOnlyOneTruthy(ex1, ex2)) return false;
7882
7883 ex1 = ex1.values[0];
7884 ex2 = ex2.values[0];
7885
7886 if (ex1.type !== ex2.type || ex1.value !== ex2.value) return false;
7887
7888 return isSameStacktrace(ex1.stacktrace, ex2.stacktrace);
7889 }
7890
7891 /**
7892 * Returns true if the two input stack trace interfaces have the same content
7893 */
7894 function isSameStacktrace(stack1, stack2) {
7895 if (isOnlyOneTruthy(stack1, stack2)) return false;
7896
7897 var frames1 = stack1.frames;
7898 var frames2 = stack2.frames;
7899
7900 // Exit early if frame count differs
7901 if (frames1.length !== frames2.length) return false;
7902
7903 // Iterate through every frame; bail out if anything differs
7904 var a, b;
7905 for (var i = 0; i < frames1.length; i++) {
7906 a = frames1[i];
7907 b = frames2[i];
7908 if (
7909 a.filename !== b.filename ||
7910 a.lineno !== b.lineno ||
7911 a.colno !== b.colno ||
7912 a['function'] !== b['function']
7913 )
7914 return false;
7915 }
7916 return true;
7917 }
7918
7919 /**
7920 * Polyfill a method
7921 * @param obj object e.g. `document`
7922 * @param name method name present on object e.g. `addEventListener`
7923 * @param replacement replacement function
7924 * @param track {optional} record instrumentation to an array
7925 */
7926 function fill(obj, name, replacement, track) {
7927 var orig = obj[name];
7928 obj[name] = replacement(orig);
7929 if (track) {
7930 track.push([obj, name, orig]);
7931 }
7932 }
7933
7934 module.exports = {
7935 isObject: isObject,
7936 isError: isError,
7937 isErrorEvent: isErrorEvent,
7938 isUndefined: isUndefined,
7939 isFunction: isFunction,
7940 isString: isString,
7941 isEmptyObject: isEmptyObject,
7942 supportsErrorEvent: supportsErrorEvent,
7943 wrappedCallback: wrappedCallback,
7944 each: each,
7945 objectMerge: objectMerge,
7946 truncate: truncate,
7947 objectFrozen: objectFrozen,
7948 hasKey: hasKey,
7949 joinRegExp: joinRegExp,
7950 urlencode: urlencode,
7951 uuid4: uuid4,
7952 htmlTreeAsString: htmlTreeAsString,
7953 htmlElementAsString: htmlElementAsString,
7954 isSameException: isSameException,
7955 isSameStacktrace: isSameStacktrace,
7956 parseUrl: parseUrl,
7957 fill: fill
7958 };
7959
7960
7961 /***/ }),
7962
7963 /***/ "./node_modules/raven-js/vendor/TraceKit/tracekit.js":
7964 /*!***********************************************************!*\
7965 !*** ./node_modules/raven-js/vendor/TraceKit/tracekit.js ***!
7966 \***********************************************************/
7967 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7968
7969 var utils = __webpack_require__(/*! ../../src/utils */ "./node_modules/raven-js/src/utils.js");
7970
7971 /*
7972 TraceKit - Cross brower stack traces
7973
7974 This was originally forked from github.com/occ/TraceKit, but has since been
7975 largely re-written and is now maintained as part of raven-js. Tests for
7976 this are in test/vendor.
7977
7978 MIT license
7979 */
7980
7981 var TraceKit = {
7982 collectWindowErrors: true,
7983 debug: false
7984 };
7985
7986 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
7987 var _window =
7988 typeof window !== 'undefined'
7989 ? window
7990 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
7991
7992 // global reference to slice
7993 var _slice = [].slice;
7994 var UNKNOWN_FUNCTION = '?';
7995
7996 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types
7997 var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;
7998
7999 function getLocationHref() {
8000 if (typeof document === 'undefined' || document.location == null) return '';
8001
8002 return document.location.href;
8003 }
8004
8005 /**
8006 * TraceKit.report: cross-browser processing of unhandled exceptions
8007 *
8008 * Syntax:
8009 * TraceKit.report.subscribe(function(stackInfo) { ... })
8010 * TraceKit.report.unsubscribe(function(stackInfo) { ... })
8011 * TraceKit.report(exception)
8012 * try { ...code... } catch(ex) { TraceKit.report(ex); }
8013 *
8014 * Supports:
8015 * - Firefox: full stack trace with line numbers, plus column number
8016 * on top frame; column number is not guaranteed
8017 * - Opera: full stack trace with line and column numbers
8018 * - Chrome: full stack trace with line and column numbers
8019 * - Safari: line and column number for the top frame only; some frames
8020 * may be missing, and column number is not guaranteed
8021 * - IE: line and column number for the top frame only; some frames
8022 * may be missing, and column number is not guaranteed
8023 *
8024 * In theory, TraceKit should work on all of the following versions:
8025 * - IE5.5+ (only 8.0 tested)
8026 * - Firefox 0.9+ (only 3.5+ tested)
8027 * - Opera 7+ (only 10.50 tested; versions 9 and earlier may require
8028 * Exceptions Have Stacktrace to be enabled in opera:config)
8029 * - Safari 3+ (only 4+ tested)
8030 * - Chrome 1+ (only 5+ tested)
8031 * - Konqueror 3.5+ (untested)
8032 *
8033 * Requires TraceKit.computeStackTrace.
8034 *
8035 * Tries to catch all unhandled exceptions and report them to the
8036 * subscribed handlers. Please note that TraceKit.report will rethrow the
8037 * exception. This is REQUIRED in order to get a useful stack trace in IE.
8038 * If the exception does not reach the top of the browser, you will only
8039 * get a stack trace from the point where TraceKit.report was called.
8040 *
8041 * Handlers receive a stackInfo object as described in the
8042 * TraceKit.computeStackTrace docs.
8043 */
8044 TraceKit.report = (function reportModuleWrapper() {
8045 var handlers = [],
8046 lastArgs = null,
8047 lastException = null,
8048 lastExceptionStack = null;
8049
8050 /**
8051 * Add a crash handler.
8052 * @param {Function} handler
8053 */
8054 function subscribe(handler) {
8055 installGlobalHandler();
8056 handlers.push(handler);
8057 }
8058
8059 /**
8060 * Remove a crash handler.
8061 * @param {Function} handler
8062 */
8063 function unsubscribe(handler) {
8064 for (var i = handlers.length - 1; i >= 0; --i) {
8065 if (handlers[i] === handler) {
8066 handlers.splice(i, 1);
8067 }
8068 }
8069 }
8070
8071 /**
8072 * Remove all crash handlers.
8073 */
8074 function unsubscribeAll() {
8075 uninstallGlobalHandler();
8076 handlers = [];
8077 }
8078
8079 /**
8080 * Dispatch stack information to all handlers.
8081 * @param {Object.<string, *>} stack
8082 */
8083 function notifyHandlers(stack, isWindowError) {
8084 var exception = null;
8085 if (isWindowError && !TraceKit.collectWindowErrors) {
8086 return;
8087 }
8088 for (var i in handlers) {
8089 if (handlers.hasOwnProperty(i)) {
8090 try {
8091 handlers[i].apply(null, [stack].concat(_slice.call(arguments, 2)));
8092 } catch (inner) {
8093 exception = inner;
8094 }
8095 }
8096 }
8097
8098 if (exception) {
8099 throw exception;
8100 }
8101 }
8102
8103 var _oldOnerrorHandler, _onErrorHandlerInstalled;
8104
8105 /**
8106 * Ensures all global unhandled exceptions are recorded.
8107 * Supported by Gecko and IE.
8108 * @param {string} message Error message.
8109 * @param {string} url URL of script that generated the exception.
8110 * @param {(number|string)} lineNo The line number at which the error
8111 * occurred.
8112 * @param {?(number|string)} colNo The column number at which the error
8113 * occurred.
8114 * @param {?Error} ex The actual Error object.
8115 */
8116 function traceKitWindowOnError(message, url, lineNo, colNo, ex) {
8117 var stack = null;
8118
8119 if (lastExceptionStack) {
8120 TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(
8121 lastExceptionStack,
8122 url,
8123 lineNo,
8124 message
8125 );
8126 processLastException();
8127 } else if (ex && utils.isError(ex)) {
8128 // non-string `ex` arg; attempt to extract stack trace
8129
8130 // New chrome and blink send along a real error object
8131 // Let's just report that like a normal error.
8132 // See: https://mikewest.org/2013/08/debugging-runtime-errors-with-window-onerror
8133 stack = TraceKit.computeStackTrace(ex);
8134 notifyHandlers(stack, true);
8135 } else {
8136 var location = {
8137 url: url,
8138 line: lineNo,
8139 column: colNo
8140 };
8141
8142 var name = undefined;
8143 var msg = message; // must be new var or will modify original `arguments`
8144 var groups;
8145 if ({}.toString.call(message) === '[object String]') {
8146 var groups = message.match(ERROR_TYPES_RE);
8147 if (groups) {
8148 name = groups[1];
8149 msg = groups[2];
8150 }
8151 }
8152
8153 location.func = UNKNOWN_FUNCTION;
8154
8155 stack = {
8156 name: name,
8157 message: msg,
8158 url: getLocationHref(),
8159 stack: [location]
8160 };
8161 notifyHandlers(stack, true);
8162 }
8163
8164 if (_oldOnerrorHandler) {
8165 return _oldOnerrorHandler.apply(this, arguments);
8166 }
8167
8168 return false;
8169 }
8170
8171 function installGlobalHandler() {
8172 if (_onErrorHandlerInstalled) {
8173 return;
8174 }
8175 _oldOnerrorHandler = _window.onerror;
8176 _window.onerror = traceKitWindowOnError;
8177 _onErrorHandlerInstalled = true;
8178 }
8179
8180 function uninstallGlobalHandler() {
8181 if (!_onErrorHandlerInstalled) {
8182 return;
8183 }
8184 _window.onerror = _oldOnerrorHandler;
8185 _onErrorHandlerInstalled = false;
8186 _oldOnerrorHandler = undefined;
8187 }
8188
8189 function processLastException() {
8190 var _lastExceptionStack = lastExceptionStack,
8191 _lastArgs = lastArgs;
8192 lastArgs = null;
8193 lastExceptionStack = null;
8194 lastException = null;
8195 notifyHandlers.apply(null, [_lastExceptionStack, false].concat(_lastArgs));
8196 }
8197
8198 /**
8199 * Reports an unhandled Error to TraceKit.
8200 * @param {Error} ex
8201 * @param {?boolean} rethrow If false, do not re-throw the exception.
8202 * Only used for window.onerror to not cause an infinite loop of
8203 * rethrowing.
8204 */
8205 function report(ex, rethrow) {
8206 var args = _slice.call(arguments, 1);
8207 if (lastExceptionStack) {
8208 if (lastException === ex) {
8209 return; // already caught by an inner catch block, ignore
8210 } else {
8211 processLastException();
8212 }
8213 }
8214
8215 var stack = TraceKit.computeStackTrace(ex);
8216 lastExceptionStack = stack;
8217 lastException = ex;
8218 lastArgs = args;
8219
8220 // If the stack trace is incomplete, wait for 2 seconds for
8221 // slow slow IE to see if onerror occurs or not before reporting
8222 // this exception; otherwise, we will end up with an incomplete
8223 // stack trace
8224 setTimeout(function() {
8225 if (lastException === ex) {
8226 processLastException();
8227 }
8228 }, stack.incomplete ? 2000 : 0);
8229
8230 if (rethrow !== false) {
8231 throw ex; // re-throw to propagate to the top level (and cause window.onerror)
8232 }
8233 }
8234
8235 report.subscribe = subscribe;
8236 report.unsubscribe = unsubscribe;
8237 report.uninstall = unsubscribeAll;
8238 return report;
8239 })();
8240
8241 /**
8242 * TraceKit.computeStackTrace: cross-browser stack traces in JavaScript
8243 *
8244 * Syntax:
8245 * s = TraceKit.computeStackTrace(exception) // consider using TraceKit.report instead (see below)
8246 * Returns:
8247 * s.name - exception name
8248 * s.message - exception message
8249 * s.stack[i].url - JavaScript or HTML file URL
8250 * s.stack[i].func - function name, or empty for anonymous functions (if guessing did not work)
8251 * s.stack[i].args - arguments passed to the function, if known
8252 * s.stack[i].line - line number, if known
8253 * s.stack[i].column - column number, if known
8254 *
8255 * Supports:
8256 * - Firefox: full stack trace with line numbers and unreliable column
8257 * number on top frame
8258 * - Opera 10: full stack trace with line and column numbers
8259 * - Opera 9-: full stack trace with line numbers
8260 * - Chrome: full stack trace with line and column numbers
8261 * - Safari: line and column number for the topmost stacktrace element
8262 * only
8263 * - IE: no line numbers whatsoever
8264 *
8265 * Tries to guess names of anonymous functions by looking for assignments
8266 * in the source code. In IE and Safari, we have to guess source file names
8267 * by searching for function bodies inside all page scripts. This will not
8268 * work for scripts that are loaded cross-domain.
8269 * Here be dragons: some function names may be guessed incorrectly, and
8270 * duplicate functions may be mismatched.
8271 *
8272 * TraceKit.computeStackTrace should only be used for tracing purposes.
8273 * Logging of unhandled exceptions should be done with TraceKit.report,
8274 * which builds on top of TraceKit.computeStackTrace and provides better
8275 * IE support by utilizing the window.onerror event to retrieve information
8276 * about the top of the stack.
8277 *
8278 * Note: In IE and Safari, no stack trace is recorded on the Error object,
8279 * so computeStackTrace instead walks its *own* chain of callers.
8280 * This means that:
8281 * * in Safari, some methods may be missing from the stack trace;
8282 * * in IE, the topmost function in the stack trace will always be the
8283 * caller of computeStackTrace.
8284 *
8285 * This is okay for tracing (because you are likely to be calling
8286 * computeStackTrace from the function you want to be the topmost element
8287 * of the stack trace anyway), but not okay for logging unhandled
8288 * exceptions (because your catch block will likely be far away from the
8289 * inner function that actually caused the exception).
8290 *
8291 */
8292 TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
8293 // Contents of Exception in various browsers.
8294 //
8295 // SAFARI:
8296 // ex.message = Can't find variable: qq
8297 // ex.line = 59
8298 // ex.sourceId = 580238192
8299 // ex.sourceURL = http://...
8300 // ex.expressionBeginOffset = 96
8301 // ex.expressionCaretOffset = 98
8302 // ex.expressionEndOffset = 98
8303 // ex.name = ReferenceError
8304 //
8305 // FIREFOX:
8306 // ex.message = qq is not defined
8307 // ex.fileName = http://...
8308 // ex.lineNumber = 59
8309 // ex.columnNumber = 69
8310 // ex.stack = ...stack trace... (see the example below)
8311 // ex.name = ReferenceError
8312 //
8313 // CHROME:
8314 // ex.message = qq is not defined
8315 // ex.name = ReferenceError
8316 // ex.type = not_defined
8317 // ex.arguments = ['aa']
8318 // ex.stack = ...stack trace...
8319 //
8320 // INTERNET EXPLORER:
8321 // ex.message = ...
8322 // ex.name = ReferenceError
8323 //
8324 // OPERA:
8325 // ex.message = ...message... (see the example below)
8326 // ex.name = ReferenceError
8327 // ex.opera#sourceloc = 11 (pretty much useless, duplicates the info in ex.message)
8328 // ex.stacktrace = n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'
8329
8330 /**
8331 * Computes stack trace information from the stack property.
8332 * Chrome and Gecko use this property.
8333 * @param {Error} ex
8334 * @return {?Object.<string, *>} Stack trace information.
8335 */
8336 function computeStackTraceFromStackProp(ex) {
8337 if (typeof ex.stack === 'undefined' || !ex.stack) return;
8338
8339 var chrome = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,
8340 gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,
8341 winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,
8342 // Used to additionally parse URL/line/column from eval frames
8343 geckoEval = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i,
8344 chromeEval = /\((\S*)(?::(\d+))(?::(\d+))\)/,
8345 lines = ex.stack.split('\n'),
8346 stack = [],
8347 submatch,
8348 parts,
8349 element,
8350 reference = /^(.*) is undefined$/.exec(ex.message);
8351
8352 for (var i = 0, j = lines.length; i < j; ++i) {
8353 if ((parts = chrome.exec(lines[i]))) {
8354 var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line
8355 var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line
8356 if (isEval && (submatch = chromeEval.exec(parts[2]))) {
8357 // throw out eval line/column and use top-most line/column number
8358 parts[2] = submatch[1]; // url
8359 parts[3] = submatch[2]; // line
8360 parts[4] = submatch[3]; // column
8361 }
8362 element = {
8363 url: !isNative ? parts[2] : null,
8364 func: parts[1] || UNKNOWN_FUNCTION,
8365 args: isNative ? [parts[2]] : [],
8366 line: parts[3] ? +parts[3] : null,
8367 column: parts[4] ? +parts[4] : null
8368 };
8369 } else if ((parts = winjs.exec(lines[i]))) {
8370 element = {
8371 url: parts[2],
8372 func: parts[1] || UNKNOWN_FUNCTION,
8373 args: [],
8374 line: +parts[3],
8375 column: parts[4] ? +parts[4] : null
8376 };
8377 } else if ((parts = gecko.exec(lines[i]))) {
8378 var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;
8379 if (isEval && (submatch = geckoEval.exec(parts[3]))) {
8380 // throw out eval line/column and use top-most line number
8381 parts[3] = submatch[1];
8382 parts[4] = submatch[2];
8383 parts[5] = null; // no column when eval
8384 } else if (i === 0 && !parts[5] && typeof ex.columnNumber !== 'undefined') {
8385 // FireFox uses this awesome columnNumber property for its top frame
8386 // Also note, Firefox's column number is 0-based and everything else expects 1-based,
8387 // so adding 1
8388 // NOTE: this hack doesn't work if top-most frame is eval
8389 stack[0].column = ex.columnNumber + 1;
8390 }
8391 element = {
8392 url: parts[3],
8393 func: parts[1] || UNKNOWN_FUNCTION,
8394 args: parts[2] ? parts[2].split(',') : [],
8395 line: parts[4] ? +parts[4] : null,
8396 column: parts[5] ? +parts[5] : null
8397 };
8398 } else {
8399 continue;
8400 }
8401
8402 if (!element.func && element.line) {
8403 element.func = UNKNOWN_FUNCTION;
8404 }
8405
8406 stack.push(element);
8407 }
8408
8409 if (!stack.length) {
8410 return null;
8411 }
8412
8413 return {
8414 name: ex.name,
8415 message: ex.message,
8416 url: getLocationHref(),
8417 stack: stack
8418 };
8419 }
8420
8421 /**
8422 * Adds information about the first frame to incomplete stack traces.
8423 * Safari and IE require this to get complete data on the first frame.
8424 * @param {Object.<string, *>} stackInfo Stack trace information from
8425 * one of the compute* methods.
8426 * @param {string} url The URL of the script that caused an error.
8427 * @param {(number|string)} lineNo The line number of the script that
8428 * caused an error.
8429 * @param {string=} message The error generated by the browser, which
8430 * hopefully contains the name of the object that caused the error.
8431 * @return {boolean} Whether or not the stack information was
8432 * augmented.
8433 */
8434 function augmentStackTraceWithInitialElement(stackInfo, url, lineNo, message) {
8435 var initial = {
8436 url: url,
8437 line: lineNo
8438 };
8439
8440 if (initial.url && initial.line) {
8441 stackInfo.incomplete = false;
8442
8443 if (!initial.func) {
8444 initial.func = UNKNOWN_FUNCTION;
8445 }
8446
8447 if (stackInfo.stack.length > 0) {
8448 if (stackInfo.stack[0].url === initial.url) {
8449 if (stackInfo.stack[0].line === initial.line) {
8450 return false; // already in stack trace
8451 } else if (
8452 !stackInfo.stack[0].line &&
8453 stackInfo.stack[0].func === initial.func
8454 ) {
8455 stackInfo.stack[0].line = initial.line;
8456 return false;
8457 }
8458 }
8459 }
8460
8461 stackInfo.stack.unshift(initial);
8462 stackInfo.partial = true;
8463 return true;
8464 } else {
8465 stackInfo.incomplete = true;
8466 }
8467
8468 return false;
8469 }
8470
8471 /**
8472 * Computes stack trace information by walking the arguments.caller
8473 * chain at the time the exception occurred. This will cause earlier
8474 * frames to be missed but is the only way to get any stack trace in
8475 * Safari and IE. The top frame is restored by
8476 * {@link augmentStackTraceWithInitialElement}.
8477 * @param {Error} ex
8478 * @return {?Object.<string, *>} Stack trace information.
8479 */
8480 function computeStackTraceByWalkingCallerChain(ex, depth) {
8481 var functionName = /function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,
8482 stack = [],
8483 funcs = {},
8484 recursion = false,
8485 parts,
8486 item,
8487 source;
8488
8489 for (
8490 var curr = computeStackTraceByWalkingCallerChain.caller;
8491 curr && !recursion;
8492 curr = curr.caller
8493 ) {
8494 if (curr === computeStackTrace || curr === TraceKit.report) {
8495 // console.log('skipping internal function');
8496 continue;
8497 }
8498
8499 item = {
8500 url: null,
8501 func: UNKNOWN_FUNCTION,
8502 line: null,
8503 column: null
8504 };
8505
8506 if (curr.name) {
8507 item.func = curr.name;
8508 } else if ((parts = functionName.exec(curr.toString()))) {
8509 item.func = parts[1];
8510 }
8511
8512 if (typeof item.func === 'undefined') {
8513 try {
8514 item.func = parts.input.substring(0, parts.input.indexOf('{'));
8515 } catch (e) {}
8516 }
8517
8518 if (funcs['' + curr]) {
8519 recursion = true;
8520 } else {
8521 funcs['' + curr] = true;
8522 }
8523
8524 stack.push(item);
8525 }
8526
8527 if (depth) {
8528 // console.log('depth is ' + depth);
8529 // console.log('stack is ' + stack.length);
8530 stack.splice(0, depth);
8531 }
8532
8533 var result = {
8534 name: ex.name,
8535 message: ex.message,
8536 url: getLocationHref(),
8537 stack: stack
8538 };
8539 augmentStackTraceWithInitialElement(
8540 result,
8541 ex.sourceURL || ex.fileName,
8542 ex.line || ex.lineNumber,
8543 ex.message || ex.description
8544 );
8545 return result;
8546 }
8547
8548 /**
8549 * Computes a stack trace for an exception.
8550 * @param {Error} ex
8551 * @param {(string|number)=} depth
8552 */
8553 function computeStackTrace(ex, depth) {
8554 var stack = null;
8555 depth = depth == null ? 0 : +depth;
8556
8557 try {
8558 stack = computeStackTraceFromStackProp(ex);
8559 if (stack) {
8560 return stack;
8561 }
8562 } catch (e) {
8563 if (TraceKit.debug) {
8564 throw e;
8565 }
8566 }
8567
8568 try {
8569 stack = computeStackTraceByWalkingCallerChain(ex, depth + 1);
8570 if (stack) {
8571 return stack;
8572 }
8573 } catch (e) {
8574 if (TraceKit.debug) {
8575 throw e;
8576 }
8577 }
8578 return {
8579 name: ex.name,
8580 message: ex.message,
8581 url: getLocationHref()
8582 };
8583 }
8584
8585 computeStackTrace.augmentStackTraceWithInitialElement = augmentStackTraceWithInitialElement;
8586 computeStackTrace.computeStackTraceFromStackProp = computeStackTraceFromStackProp;
8587
8588 return computeStackTrace;
8589 })();
8590
8591 module.exports = TraceKit;
8592
8593
8594 /***/ }),
8595
8596 /***/ "./node_modules/raven-js/vendor/json-stringify-safe/stringify.js":
8597 /*!***********************************************************************!*\
8598 !*** ./node_modules/raven-js/vendor/json-stringify-safe/stringify.js ***!
8599 \***********************************************************************/
8600 /***/ ((module, exports) => {
8601
8602 /*
8603 json-stringify-safe
8604 Like JSON.stringify, but doesn't throw on circular references.
8605
8606 Originally forked from https://github.com/isaacs/json-stringify-safe
8607 version 5.0.1 on 3/8/2017 and modified to handle Errors serialization
8608 and IE8 compatibility. Tests for this are in test/vendor.
8609
8610 ISC license: https://github.com/isaacs/json-stringify-safe/blob/master/LICENSE
8611 */
8612
8613 exports = module.exports = stringify;
8614 exports.getSerialize = serializer;
8615
8616 function indexOf(haystack, needle) {
8617 for (var i = 0; i < haystack.length; ++i) {
8618 if (haystack[i] === needle) return i;
8619 }
8620 return -1;
8621 }
8622
8623 function stringify(obj, replacer, spaces, cycleReplacer) {
8624 return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces);
8625 }
8626
8627 // https://github.com/ftlabs/js-abbreviate/blob/fa709e5f139e7770a71827b1893f22418097fbda/index.js#L95-L106
8628 function stringifyError(value) {
8629 var err = {
8630 // These properties are implemented as magical getters and don't show up in for in
8631 stack: value.stack,
8632 message: value.message,
8633 name: value.name
8634 };
8635
8636 for (var i in value) {
8637 if (Object.prototype.hasOwnProperty.call(value, i)) {
8638 err[i] = value[i];
8639 }
8640 }
8641
8642 return err;
8643 }
8644
8645 function serializer(replacer, cycleReplacer) {
8646 var stack = [];
8647 var keys = [];
8648
8649 if (cycleReplacer == null) {
8650 cycleReplacer = function(key, value) {
8651 if (stack[0] === value) {
8652 return '[Circular ~]';
8653 }
8654 return '[Circular ~.' + keys.slice(0, indexOf(stack, value)).join('.') + ']';
8655 };
8656 }
8657
8658 return function(key, value) {
8659 if (stack.length > 0) {
8660 var thisPos = indexOf(stack, this);
8661 ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
8662 ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
8663
8664 if (~indexOf(stack, value)) {
8665 value = cycleReplacer.call(this, key, value);
8666 }
8667 } else {
8668 stack.push(value);
8669 }
8670
8671 return replacer == null
8672 ? value instanceof Error ? stringifyError(value) : value
8673 : replacer.call(this, key, value);
8674 };
8675 }
8676
8677
8678 /***/ }),
8679
8680 /***/ "./node_modules/react-is/cjs/react-is.development.js":
8681 /*!***********************************************************!*\
8682 !*** ./node_modules/react-is/cjs/react-is.development.js ***!
8683 \***********************************************************/
8684 /***/ ((__unused_webpack_module, exports) => {
8685
8686 "use strict";
8687 /** @license React v16.13.1
8688 * react-is.development.js
8689 *
8690 * Copyright (c) Facebook, Inc. and its affiliates.
8691 *
8692 * This source code is licensed under the MIT license found in the
8693 * LICENSE file in the root directory of this source tree.
8694 */
8695
8696
8697
8698
8699
8700 if (true) {
8701 (function() {
8702 'use strict';
8703
8704 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
8705 // nor polyfill, then a plain number is used for performance.
8706 var hasSymbol = typeof Symbol === 'function' && Symbol.for;
8707 var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
8708 var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
8709 var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
8710 var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
8711 var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
8712 var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
8713 var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
8714 // (unstable) APIs that have been removed. Can we remove the symbols?
8715
8716 var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
8717 var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
8718 var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
8719 var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
8720 var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
8721 var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
8722 var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
8723 var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
8724 var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
8725 var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
8726 var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
8727
8728 function isValidElementType(type) {
8729 return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
8730 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);
8731 }
8732
8733 function typeOf(object) {
8734 if (typeof object === 'object' && object !== null) {
8735 var $$typeof = object.$$typeof;
8736
8737 switch ($$typeof) {
8738 case REACT_ELEMENT_TYPE:
8739 var type = object.type;
8740
8741 switch (type) {
8742 case REACT_ASYNC_MODE_TYPE:
8743 case REACT_CONCURRENT_MODE_TYPE:
8744 case REACT_FRAGMENT_TYPE:
8745 case REACT_PROFILER_TYPE:
8746 case REACT_STRICT_MODE_TYPE:
8747 case REACT_SUSPENSE_TYPE:
8748 return type;
8749
8750 default:
8751 var $$typeofType = type && type.$$typeof;
8752
8753 switch ($$typeofType) {
8754 case REACT_CONTEXT_TYPE:
8755 case REACT_FORWARD_REF_TYPE:
8756 case REACT_LAZY_TYPE:
8757 case REACT_MEMO_TYPE:
8758 case REACT_PROVIDER_TYPE:
8759 return $$typeofType;
8760
8761 default:
8762 return $$typeof;
8763 }
8764
8765 }
8766
8767 case REACT_PORTAL_TYPE:
8768 return $$typeof;
8769 }
8770 }
8771
8772 return undefined;
8773 } // AsyncMode is deprecated along with isAsyncMode
8774
8775 var AsyncMode = REACT_ASYNC_MODE_TYPE;
8776 var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
8777 var ContextConsumer = REACT_CONTEXT_TYPE;
8778 var ContextProvider = REACT_PROVIDER_TYPE;
8779 var Element = REACT_ELEMENT_TYPE;
8780 var ForwardRef = REACT_FORWARD_REF_TYPE;
8781 var Fragment = REACT_FRAGMENT_TYPE;
8782 var Lazy = REACT_LAZY_TYPE;
8783 var Memo = REACT_MEMO_TYPE;
8784 var Portal = REACT_PORTAL_TYPE;
8785 var Profiler = REACT_PROFILER_TYPE;
8786 var StrictMode = REACT_STRICT_MODE_TYPE;
8787 var Suspense = REACT_SUSPENSE_TYPE;
8788 var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
8789
8790 function isAsyncMode(object) {
8791 {
8792 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
8793 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
8794
8795 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.');
8796 }
8797 }
8798
8799 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
8800 }
8801 function isConcurrentMode(object) {
8802 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
8803 }
8804 function isContextConsumer(object) {
8805 return typeOf(object) === REACT_CONTEXT_TYPE;
8806 }
8807 function isContextProvider(object) {
8808 return typeOf(object) === REACT_PROVIDER_TYPE;
8809 }
8810 function isElement(object) {
8811 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
8812 }
8813 function isForwardRef(object) {
8814 return typeOf(object) === REACT_FORWARD_REF_TYPE;
8815 }
8816 function isFragment(object) {
8817 return typeOf(object) === REACT_FRAGMENT_TYPE;
8818 }
8819 function isLazy(object) {
8820 return typeOf(object) === REACT_LAZY_TYPE;
8821 }
8822 function isMemo(object) {
8823 return typeOf(object) === REACT_MEMO_TYPE;
8824 }
8825 function isPortal(object) {
8826 return typeOf(object) === REACT_PORTAL_TYPE;
8827 }
8828 function isProfiler(object) {
8829 return typeOf(object) === REACT_PROFILER_TYPE;
8830 }
8831 function isStrictMode(object) {
8832 return typeOf(object) === REACT_STRICT_MODE_TYPE;
8833 }
8834 function isSuspense(object) {
8835 return typeOf(object) === REACT_SUSPENSE_TYPE;
8836 }
8837
8838 exports.AsyncMode = AsyncMode;
8839 exports.ConcurrentMode = ConcurrentMode;
8840 exports.ContextConsumer = ContextConsumer;
8841 exports.ContextProvider = ContextProvider;
8842 exports.Element = Element;
8843 exports.ForwardRef = ForwardRef;
8844 exports.Fragment = Fragment;
8845 exports.Lazy = Lazy;
8846 exports.Memo = Memo;
8847 exports.Portal = Portal;
8848 exports.Profiler = Profiler;
8849 exports.StrictMode = StrictMode;
8850 exports.Suspense = Suspense;
8851 exports.isAsyncMode = isAsyncMode;
8852 exports.isConcurrentMode = isConcurrentMode;
8853 exports.isContextConsumer = isContextConsumer;
8854 exports.isContextProvider = isContextProvider;
8855 exports.isElement = isElement;
8856 exports.isForwardRef = isForwardRef;
8857 exports.isFragment = isFragment;
8858 exports.isLazy = isLazy;
8859 exports.isMemo = isMemo;
8860 exports.isPortal = isPortal;
8861 exports.isProfiler = isProfiler;
8862 exports.isStrictMode = isStrictMode;
8863 exports.isSuspense = isSuspense;
8864 exports.isValidElementType = isValidElementType;
8865 exports.typeOf = typeOf;
8866 })();
8867 }
8868
8869
8870 /***/ }),
8871
8872 /***/ "./node_modules/react-is/index.js":
8873 /*!****************************************!*\
8874 !*** ./node_modules/react-is/index.js ***!
8875 \****************************************/
8876 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8877
8878 "use strict";
8879
8880
8881 if (false) {} else {
8882 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js");
8883 }
8884
8885
8886 /***/ }),
8887
8888 /***/ "./node_modules/react/cjs/react-jsx-runtime.development.js":
8889 /*!*****************************************************************!*\
8890 !*** ./node_modules/react/cjs/react-jsx-runtime.development.js ***!
8891 \*****************************************************************/
8892 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8893
8894 "use strict";
8895 /** @license React v17.0.2
8896 * react-jsx-runtime.development.js
8897 *
8898 * Copyright (c) Facebook, Inc. and its affiliates.
8899 *
8900 * This source code is licensed under the MIT license found in the
8901 * LICENSE file in the root directory of this source tree.
8902 */
8903
8904
8905
8906 if (true) {
8907 (function() {
8908 'use strict';
8909
8910 var React = __webpack_require__(/*! react */ "react");
8911 var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
8912
8913 // ATTENTION
8914 // When adding new symbols to this file,
8915 // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
8916 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
8917 // nor polyfill, then a plain number is used for performance.
8918 var REACT_ELEMENT_TYPE = 0xeac7;
8919 var REACT_PORTAL_TYPE = 0xeaca;
8920 exports.Fragment = 0xeacb;
8921 var REACT_STRICT_MODE_TYPE = 0xeacc;
8922 var REACT_PROFILER_TYPE = 0xead2;
8923 var REACT_PROVIDER_TYPE = 0xeacd;
8924 var REACT_CONTEXT_TYPE = 0xeace;
8925 var REACT_FORWARD_REF_TYPE = 0xead0;
8926 var REACT_SUSPENSE_TYPE = 0xead1;
8927 var REACT_SUSPENSE_LIST_TYPE = 0xead8;
8928 var REACT_MEMO_TYPE = 0xead3;
8929 var REACT_LAZY_TYPE = 0xead4;
8930 var REACT_BLOCK_TYPE = 0xead9;
8931 var REACT_SERVER_BLOCK_TYPE = 0xeada;
8932 var REACT_FUNDAMENTAL_TYPE = 0xead5;
8933 var REACT_SCOPE_TYPE = 0xead7;
8934 var REACT_OPAQUE_ID_TYPE = 0xeae0;
8935 var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
8936 var REACT_OFFSCREEN_TYPE = 0xeae2;
8937 var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
8938
8939 if (typeof Symbol === 'function' && Symbol.for) {
8940 var symbolFor = Symbol.for;
8941 REACT_ELEMENT_TYPE = symbolFor('react.element');
8942 REACT_PORTAL_TYPE = symbolFor('react.portal');
8943 exports.Fragment = symbolFor('react.fragment');
8944 REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
8945 REACT_PROFILER_TYPE = symbolFor('react.profiler');
8946 REACT_PROVIDER_TYPE = symbolFor('react.provider');
8947 REACT_CONTEXT_TYPE = symbolFor('react.context');
8948 REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
8949 REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
8950 REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
8951 REACT_MEMO_TYPE = symbolFor('react.memo');
8952 REACT_LAZY_TYPE = symbolFor('react.lazy');
8953 REACT_BLOCK_TYPE = symbolFor('react.block');
8954 REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
8955 REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
8956 REACT_SCOPE_TYPE = symbolFor('react.scope');
8957 REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
8958 REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
8959 REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
8960 REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
8961 }
8962
8963 var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
8964 var FAUX_ITERATOR_SYMBOL = '@@iterator';
8965 function getIteratorFn(maybeIterable) {
8966 if (maybeIterable === null || typeof maybeIterable !== 'object') {
8967 return null;
8968 }
8969
8970 var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
8971
8972 if (typeof maybeIterator === 'function') {
8973 return maybeIterator;
8974 }
8975
8976 return null;
8977 }
8978
8979 var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
8980
8981 function error(format) {
8982 {
8983 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
8984 args[_key2 - 1] = arguments[_key2];
8985 }
8986
8987 printWarning('error', format, args);
8988 }
8989 }
8990
8991 function printWarning(level, format, args) {
8992 // When changing this logic, you might want to also
8993 // update consoleWithStackDev.www.js as well.
8994 {
8995 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
8996 var stack = ReactDebugCurrentFrame.getStackAddendum();
8997
8998 if (stack !== '') {
8999 format += '%s';
9000 args = args.concat([stack]);
9001 }
9002
9003 var argsWithFormat = args.map(function (item) {
9004 return '' + item;
9005 }); // Careful: RN currently depends on this prefix
9006
9007 argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
9008 // breaks IE9: https://github.com/facebook/react/issues/13610
9009 // eslint-disable-next-line react-internal/no-production-logging
9010
9011 Function.prototype.apply.call(console[level], console, argsWithFormat);
9012 }
9013 }
9014
9015 // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
9016
9017 var enableScopeAPI = false; // Experimental Create Event Handle API.
9018
9019 function isValidElementType(type) {
9020 if (typeof type === 'string' || typeof type === 'function') {
9021 return true;
9022 } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
9023
9024
9025 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 ) {
9026 return true;
9027 }
9028
9029 if (typeof type === 'object' && type !== null) {
9030 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) {
9031 return true;
9032 }
9033 }
9034
9035 return false;
9036 }
9037
9038 function getWrappedName(outerType, innerType, wrapperName) {
9039 var functionName = innerType.displayName || innerType.name || '';
9040 return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
9041 }
9042
9043 function getContextName(type) {
9044 return type.displayName || 'Context';
9045 }
9046
9047 function getComponentName(type) {
9048 if (type == null) {
9049 // Host root, text node or just invalid type.
9050 return null;
9051 }
9052
9053 {
9054 if (typeof type.tag === 'number') {
9055 error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
9056 }
9057 }
9058
9059 if (typeof type === 'function') {
9060 return type.displayName || type.name || null;
9061 }
9062
9063 if (typeof type === 'string') {
9064 return type;
9065 }
9066
9067 switch (type) {
9068 case exports.Fragment:
9069 return 'Fragment';
9070
9071 case REACT_PORTAL_TYPE:
9072 return 'Portal';
9073
9074 case REACT_PROFILER_TYPE:
9075 return 'Profiler';
9076
9077 case REACT_STRICT_MODE_TYPE:
9078 return 'StrictMode';
9079
9080 case REACT_SUSPENSE_TYPE:
9081 return 'Suspense';
9082
9083 case REACT_SUSPENSE_LIST_TYPE:
9084 return 'SuspenseList';
9085 }
9086
9087 if (typeof type === 'object') {
9088 switch (type.$$typeof) {
9089 case REACT_CONTEXT_TYPE:
9090 var context = type;
9091 return getContextName(context) + '.Consumer';
9092
9093 case REACT_PROVIDER_TYPE:
9094 var provider = type;
9095 return getContextName(provider._context) + '.Provider';
9096
9097 case REACT_FORWARD_REF_TYPE:
9098 return getWrappedName(type, type.render, 'ForwardRef');
9099
9100 case REACT_MEMO_TYPE:
9101 return getComponentName(type.type);
9102
9103 case REACT_BLOCK_TYPE:
9104 return getComponentName(type._render);
9105
9106 case REACT_LAZY_TYPE:
9107 {
9108 var lazyComponent = type;
9109 var payload = lazyComponent._payload;
9110 var init = lazyComponent._init;
9111
9112 try {
9113 return getComponentName(init(payload));
9114 } catch (x) {
9115 return null;
9116 }
9117 }
9118 }
9119 }
9120
9121 return null;
9122 }
9123
9124 // Helpers to patch console.logs to avoid logging during side-effect free
9125 // replaying on render function. This currently only patches the object
9126 // lazily which won't cover if the log function was extracted eagerly.
9127 // We could also eagerly patch the method.
9128 var disabledDepth = 0;
9129 var prevLog;
9130 var prevInfo;
9131 var prevWarn;
9132 var prevError;
9133 var prevGroup;
9134 var prevGroupCollapsed;
9135 var prevGroupEnd;
9136
9137 function disabledLog() {}
9138
9139 disabledLog.__reactDisabledLog = true;
9140 function disableLogs() {
9141 {
9142 if (disabledDepth === 0) {
9143 /* eslint-disable react-internal/no-production-logging */
9144 prevLog = console.log;
9145 prevInfo = console.info;
9146 prevWarn = console.warn;
9147 prevError = console.error;
9148 prevGroup = console.group;
9149 prevGroupCollapsed = console.groupCollapsed;
9150 prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
9151
9152 var props = {
9153 configurable: true,
9154 enumerable: true,
9155 value: disabledLog,
9156 writable: true
9157 }; // $FlowFixMe Flow thinks console is immutable.
9158
9159 Object.defineProperties(console, {
9160 info: props,
9161 log: props,
9162 warn: props,
9163 error: props,
9164 group: props,
9165 groupCollapsed: props,
9166 groupEnd: props
9167 });
9168 /* eslint-enable react-internal/no-production-logging */
9169 }
9170
9171 disabledDepth++;
9172 }
9173 }
9174 function reenableLogs() {
9175 {
9176 disabledDepth--;
9177
9178 if (disabledDepth === 0) {
9179 /* eslint-disable react-internal/no-production-logging */
9180 var props = {
9181 configurable: true,
9182 enumerable: true,
9183 writable: true
9184 }; // $FlowFixMe Flow thinks console is immutable.
9185
9186 Object.defineProperties(console, {
9187 log: _assign({}, props, {
9188 value: prevLog
9189 }),
9190 info: _assign({}, props, {
9191 value: prevInfo
9192 }),
9193 warn: _assign({}, props, {
9194 value: prevWarn
9195 }),
9196 error: _assign({}, props, {
9197 value: prevError
9198 }),
9199 group: _assign({}, props, {
9200 value: prevGroup
9201 }),
9202 groupCollapsed: _assign({}, props, {
9203 value: prevGroupCollapsed
9204 }),
9205 groupEnd: _assign({}, props, {
9206 value: prevGroupEnd
9207 })
9208 });
9209 /* eslint-enable react-internal/no-production-logging */
9210 }
9211
9212 if (disabledDepth < 0) {
9213 error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
9214 }
9215 }
9216 }
9217
9218 var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
9219 var prefix;
9220 function describeBuiltInComponentFrame(name, source, ownerFn) {
9221 {
9222 if (prefix === undefined) {
9223 // Extract the VM specific prefix used by each line.
9224 try {
9225 throw Error();
9226 } catch (x) {
9227 var match = x.stack.trim().match(/\n( *(at )?)/);
9228 prefix = match && match[1] || '';
9229 }
9230 } // We use the prefix to ensure our stacks line up with native stack frames.
9231
9232
9233 return '\n' + prefix + name;
9234 }
9235 }
9236 var reentry = false;
9237 var componentFrameCache;
9238
9239 {
9240 var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
9241 componentFrameCache = new PossiblyWeakMap();
9242 }
9243
9244 function describeNativeComponentFrame(fn, construct) {
9245 // If something asked for a stack inside a fake render, it should get ignored.
9246 if (!fn || reentry) {
9247 return '';
9248 }
9249
9250 {
9251 var frame = componentFrameCache.get(fn);
9252
9253 if (frame !== undefined) {
9254 return frame;
9255 }
9256 }
9257
9258 var control;
9259 reentry = true;
9260 var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
9261
9262 Error.prepareStackTrace = undefined;
9263 var previousDispatcher;
9264
9265 {
9266 previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
9267 // for warnings.
9268
9269 ReactCurrentDispatcher.current = null;
9270 disableLogs();
9271 }
9272
9273 try {
9274 // This should throw.
9275 if (construct) {
9276 // Something should be setting the props in the constructor.
9277 var Fake = function () {
9278 throw Error();
9279 }; // $FlowFixMe
9280
9281
9282 Object.defineProperty(Fake.prototype, 'props', {
9283 set: function () {
9284 // We use a throwing setter instead of frozen or non-writable props
9285 // because that won't throw in a non-strict mode function.
9286 throw Error();
9287 }
9288 });
9289
9290 if (typeof Reflect === 'object' && Reflect.construct) {
9291 // We construct a different control for this case to include any extra
9292 // frames added by the construct call.
9293 try {
9294 Reflect.construct(Fake, []);
9295 } catch (x) {
9296 control = x;
9297 }
9298
9299 Reflect.construct(fn, [], Fake);
9300 } else {
9301 try {
9302 Fake.call();
9303 } catch (x) {
9304 control = x;
9305 }
9306
9307 fn.call(Fake.prototype);
9308 }
9309 } else {
9310 try {
9311 throw Error();
9312 } catch (x) {
9313 control = x;
9314 }
9315
9316 fn();
9317 }
9318 } catch (sample) {
9319 // This is inlined manually because closure doesn't do it for us.
9320 if (sample && control && typeof sample.stack === 'string') {
9321 // This extracts the first frame from the sample that isn't also in the control.
9322 // Skipping one frame that we assume is the frame that calls the two.
9323 var sampleLines = sample.stack.split('\n');
9324 var controlLines = control.stack.split('\n');
9325 var s = sampleLines.length - 1;
9326 var c = controlLines.length - 1;
9327
9328 while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
9329 // We expect at least one stack frame to be shared.
9330 // Typically this will be the root most one. However, stack frames may be
9331 // cut off due to maximum stack limits. In this case, one maybe cut off
9332 // earlier than the other. We assume that the sample is longer or the same
9333 // and there for cut off earlier. So we should find the root most frame in
9334 // the sample somewhere in the control.
9335 c--;
9336 }
9337
9338 for (; s >= 1 && c >= 0; s--, c--) {
9339 // Next we find the first one that isn't the same which should be the
9340 // frame that called our sample function and the control.
9341 if (sampleLines[s] !== controlLines[c]) {
9342 // In V8, the first line is describing the message but other VMs don't.
9343 // If we're about to return the first line, and the control is also on the same
9344 // line, that's a pretty good indicator that our sample threw at same line as
9345 // the control. I.e. before we entered the sample frame. So we ignore this result.
9346 // This can happen if you passed a class to function component, or non-function.
9347 if (s !== 1 || c !== 1) {
9348 do {
9349 s--;
9350 c--; // We may still have similar intermediate frames from the construct call.
9351 // The next one that isn't the same should be our match though.
9352
9353 if (c < 0 || sampleLines[s] !== controlLines[c]) {
9354 // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
9355 var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
9356
9357 {
9358 if (typeof fn === 'function') {
9359 componentFrameCache.set(fn, _frame);
9360 }
9361 } // Return the line we found.
9362
9363
9364 return _frame;
9365 }
9366 } while (s >= 1 && c >= 0);
9367 }
9368
9369 break;
9370 }
9371 }
9372 }
9373 } finally {
9374 reentry = false;
9375
9376 {
9377 ReactCurrentDispatcher.current = previousDispatcher;
9378 reenableLogs();
9379 }
9380
9381 Error.prepareStackTrace = previousPrepareStackTrace;
9382 } // Fallback to just using the name if we couldn't make it throw.
9383
9384
9385 var name = fn ? fn.displayName || fn.name : '';
9386 var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
9387
9388 {
9389 if (typeof fn === 'function') {
9390 componentFrameCache.set(fn, syntheticFrame);
9391 }
9392 }
9393
9394 return syntheticFrame;
9395 }
9396 function describeFunctionComponentFrame(fn, source, ownerFn) {
9397 {
9398 return describeNativeComponentFrame(fn, false);
9399 }
9400 }
9401
9402 function shouldConstruct(Component) {
9403 var prototype = Component.prototype;
9404 return !!(prototype && prototype.isReactComponent);
9405 }
9406
9407 function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
9408
9409 if (type == null) {
9410 return '';
9411 }
9412
9413 if (typeof type === 'function') {
9414 {
9415 return describeNativeComponentFrame(type, shouldConstruct(type));
9416 }
9417 }
9418
9419 if (typeof type === 'string') {
9420 return describeBuiltInComponentFrame(type);
9421 }
9422
9423 switch (type) {
9424 case REACT_SUSPENSE_TYPE:
9425 return describeBuiltInComponentFrame('Suspense');
9426
9427 case REACT_SUSPENSE_LIST_TYPE:
9428 return describeBuiltInComponentFrame('SuspenseList');
9429 }
9430
9431 if (typeof type === 'object') {
9432 switch (type.$$typeof) {
9433 case REACT_FORWARD_REF_TYPE:
9434 return describeFunctionComponentFrame(type.render);
9435
9436 case REACT_MEMO_TYPE:
9437 // Memo may contain any component type so we recursively resolve it.
9438 return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
9439
9440 case REACT_BLOCK_TYPE:
9441 return describeFunctionComponentFrame(type._render);
9442
9443 case REACT_LAZY_TYPE:
9444 {
9445 var lazyComponent = type;
9446 var payload = lazyComponent._payload;
9447 var init = lazyComponent._init;
9448
9449 try {
9450 // Lazy may contain any component type so we recursively resolve it.
9451 return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
9452 } catch (x) {}
9453 }
9454 }
9455 }
9456
9457 return '';
9458 }
9459
9460 var loggedTypeFailures = {};
9461 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
9462
9463 function setCurrentlyValidatingElement(element) {
9464 {
9465 if (element) {
9466 var owner = element._owner;
9467 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
9468 ReactDebugCurrentFrame.setExtraStackFrame(stack);
9469 } else {
9470 ReactDebugCurrentFrame.setExtraStackFrame(null);
9471 }
9472 }
9473 }
9474
9475 function checkPropTypes(typeSpecs, values, location, componentName, element) {
9476 {
9477 // $FlowFixMe This is okay but Flow doesn't know it.
9478 var has = Function.call.bind(Object.prototype.hasOwnProperty);
9479
9480 for (var typeSpecName in typeSpecs) {
9481 if (has(typeSpecs, typeSpecName)) {
9482 var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
9483 // fail the render phase where it didn't fail before. So we log it.
9484 // After these have been cleaned up, we'll let them throw.
9485
9486 try {
9487 // This is intentionally an invariant that gets caught. It's the same
9488 // behavior as without this statement except with a better message.
9489 if (typeof typeSpecs[typeSpecName] !== 'function') {
9490 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`.');
9491 err.name = 'Invariant Violation';
9492 throw err;
9493 }
9494
9495 error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
9496 } catch (ex) {
9497 error$1 = ex;
9498 }
9499
9500 if (error$1 && !(error$1 instanceof Error)) {
9501 setCurrentlyValidatingElement(element);
9502
9503 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);
9504
9505 setCurrentlyValidatingElement(null);
9506 }
9507
9508 if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
9509 // Only monitor this failure once because there tends to be a lot of the
9510 // same error.
9511 loggedTypeFailures[error$1.message] = true;
9512 setCurrentlyValidatingElement(element);
9513
9514 error('Failed %s type: %s', location, error$1.message);
9515
9516 setCurrentlyValidatingElement(null);
9517 }
9518 }
9519 }
9520 }
9521 }
9522
9523 var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
9524 var hasOwnProperty = Object.prototype.hasOwnProperty;
9525 var RESERVED_PROPS = {
9526 key: true,
9527 ref: true,
9528 __self: true,
9529 __source: true
9530 };
9531 var specialPropKeyWarningShown;
9532 var specialPropRefWarningShown;
9533 var didWarnAboutStringRefs;
9534
9535 {
9536 didWarnAboutStringRefs = {};
9537 }
9538
9539 function hasValidRef(config) {
9540 {
9541 if (hasOwnProperty.call(config, 'ref')) {
9542 var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
9543
9544 if (getter && getter.isReactWarning) {
9545 return false;
9546 }
9547 }
9548 }
9549
9550 return config.ref !== undefined;
9551 }
9552
9553 function hasValidKey(config) {
9554 {
9555 if (hasOwnProperty.call(config, 'key')) {
9556 var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
9557
9558 if (getter && getter.isReactWarning) {
9559 return false;
9560 }
9561 }
9562 }
9563
9564 return config.key !== undefined;
9565 }
9566
9567 function warnIfStringRefCannotBeAutoConverted(config, self) {
9568 {
9569 if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
9570 var componentName = getComponentName(ReactCurrentOwner.current.type);
9571
9572 if (!didWarnAboutStringRefs[componentName]) {
9573 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);
9574
9575 didWarnAboutStringRefs[componentName] = true;
9576 }
9577 }
9578 }
9579 }
9580
9581 function defineKeyPropWarningGetter(props, displayName) {
9582 {
9583 var warnAboutAccessingKey = function () {
9584 if (!specialPropKeyWarningShown) {
9585 specialPropKeyWarningShown = true;
9586
9587 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);
9588 }
9589 };
9590
9591 warnAboutAccessingKey.isReactWarning = true;
9592 Object.defineProperty(props, 'key', {
9593 get: warnAboutAccessingKey,
9594 configurable: true
9595 });
9596 }
9597 }
9598
9599 function defineRefPropWarningGetter(props, displayName) {
9600 {
9601 var warnAboutAccessingRef = function () {
9602 if (!specialPropRefWarningShown) {
9603 specialPropRefWarningShown = true;
9604
9605 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);
9606 }
9607 };
9608
9609 warnAboutAccessingRef.isReactWarning = true;
9610 Object.defineProperty(props, 'ref', {
9611 get: warnAboutAccessingRef,
9612 configurable: true
9613 });
9614 }
9615 }
9616 /**
9617 * Factory method to create a new React element. This no longer adheres to
9618 * the class pattern, so do not use new to call it. Also, instanceof check
9619 * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
9620 * if something is a React Element.
9621 *
9622 * @param {*} type
9623 * @param {*} props
9624 * @param {*} key
9625 * @param {string|object} ref
9626 * @param {*} owner
9627 * @param {*} self A *temporary* helper to detect places where `this` is
9628 * different from the `owner` when React.createElement is called, so that we
9629 * can warn. We want to get rid of owner and replace string `ref`s with arrow
9630 * functions, and as long as `this` and owner are the same, there will be no
9631 * change in behavior.
9632 * @param {*} source An annotation object (added by a transpiler or otherwise)
9633 * indicating filename, line number, and/or other information.
9634 * @internal
9635 */
9636
9637
9638 var ReactElement = function (type, key, ref, self, source, owner, props) {
9639 var element = {
9640 // This tag allows us to uniquely identify this as a React Element
9641 $$typeof: REACT_ELEMENT_TYPE,
9642 // Built-in properties that belong on the element
9643 type: type,
9644 key: key,
9645 ref: ref,
9646 props: props,
9647 // Record the component responsible for creating this element.
9648 _owner: owner
9649 };
9650
9651 {
9652 // The validation flag is currently mutative. We put it on
9653 // an external backing store so that we can freeze the whole object.
9654 // This can be replaced with a WeakMap once they are implemented in
9655 // commonly used development environments.
9656 element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
9657 // the validation flag non-enumerable (where possible, which should
9658 // include every environment we run tests in), so the test framework
9659 // ignores it.
9660
9661 Object.defineProperty(element._store, 'validated', {
9662 configurable: false,
9663 enumerable: false,
9664 writable: true,
9665 value: false
9666 }); // self and source are DEV only properties.
9667
9668 Object.defineProperty(element, '_self', {
9669 configurable: false,
9670 enumerable: false,
9671 writable: false,
9672 value: self
9673 }); // Two elements created in two different places should be considered
9674 // equal for testing purposes and therefore we hide it from enumeration.
9675
9676 Object.defineProperty(element, '_source', {
9677 configurable: false,
9678 enumerable: false,
9679 writable: false,
9680 value: source
9681 });
9682
9683 if (Object.freeze) {
9684 Object.freeze(element.props);
9685 Object.freeze(element);
9686 }
9687 }
9688
9689 return element;
9690 };
9691 /**
9692 * https://github.com/reactjs/rfcs/pull/107
9693 * @param {*} type
9694 * @param {object} props
9695 * @param {string} key
9696 */
9697
9698 function jsxDEV(type, config, maybeKey, source, self) {
9699 {
9700 var propName; // Reserved names are extracted
9701
9702 var props = {};
9703 var key = null;
9704 var ref = null; // Currently, key can be spread in as a prop. This causes a potential
9705 // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
9706 // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
9707 // but as an intermediary step, we will use jsxDEV for everything except
9708 // <div {...props} key="Hi" />, because we aren't currently able to tell if
9709 // key is explicitly declared to be undefined or not.
9710
9711 if (maybeKey !== undefined) {
9712 key = '' + maybeKey;
9713 }
9714
9715 if (hasValidKey(config)) {
9716 key = '' + config.key;
9717 }
9718
9719 if (hasValidRef(config)) {
9720 ref = config.ref;
9721 warnIfStringRefCannotBeAutoConverted(config, self);
9722 } // Remaining properties are added to a new props object
9723
9724
9725 for (propName in config) {
9726 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
9727 props[propName] = config[propName];
9728 }
9729 } // Resolve default props
9730
9731
9732 if (type && type.defaultProps) {
9733 var defaultProps = type.defaultProps;
9734
9735 for (propName in defaultProps) {
9736 if (props[propName] === undefined) {
9737 props[propName] = defaultProps[propName];
9738 }
9739 }
9740 }
9741
9742 if (key || ref) {
9743 var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
9744
9745 if (key) {
9746 defineKeyPropWarningGetter(props, displayName);
9747 }
9748
9749 if (ref) {
9750 defineRefPropWarningGetter(props, displayName);
9751 }
9752 }
9753
9754 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
9755 }
9756 }
9757
9758 var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
9759 var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
9760
9761 function setCurrentlyValidatingElement$1(element) {
9762 {
9763 if (element) {
9764 var owner = element._owner;
9765 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
9766 ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
9767 } else {
9768 ReactDebugCurrentFrame$1.setExtraStackFrame(null);
9769 }
9770 }
9771 }
9772
9773 var propTypesMisspellWarningShown;
9774
9775 {
9776 propTypesMisspellWarningShown = false;
9777 }
9778 /**
9779 * Verifies the object is a ReactElement.
9780 * See https://reactjs.org/docs/react-api.html#isvalidelement
9781 * @param {?object} object
9782 * @return {boolean} True if `object` is a ReactElement.
9783 * @final
9784 */
9785
9786 function isValidElement(object) {
9787 {
9788 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
9789 }
9790 }
9791
9792 function getDeclarationErrorAddendum() {
9793 {
9794 if (ReactCurrentOwner$1.current) {
9795 var name = getComponentName(ReactCurrentOwner$1.current.type);
9796
9797 if (name) {
9798 return '\n\nCheck the render method of `' + name + '`.';
9799 }
9800 }
9801
9802 return '';
9803 }
9804 }
9805
9806 function getSourceInfoErrorAddendum(source) {
9807 {
9808 if (source !== undefined) {
9809 var fileName = source.fileName.replace(/^.*[\\\/]/, '');
9810 var lineNumber = source.lineNumber;
9811 return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
9812 }
9813
9814 return '';
9815 }
9816 }
9817 /**
9818 * Warn if there's no key explicitly set on dynamic arrays of children or
9819 * object keys are not valid. This allows us to keep track of children between
9820 * updates.
9821 */
9822
9823
9824 var ownerHasKeyUseWarning = {};
9825
9826 function getCurrentComponentErrorInfo(parentType) {
9827 {
9828 var info = getDeclarationErrorAddendum();
9829
9830 if (!info) {
9831 var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
9832
9833 if (parentName) {
9834 info = "\n\nCheck the top-level render call using <" + parentName + ">.";
9835 }
9836 }
9837
9838 return info;
9839 }
9840 }
9841 /**
9842 * Warn if the element doesn't have an explicit key assigned to it.
9843 * This element is in an array. The array could grow and shrink or be
9844 * reordered. All children that haven't already been validated are required to
9845 * have a "key" property assigned to it. Error statuses are cached so a warning
9846 * will only be shown once.
9847 *
9848 * @internal
9849 * @param {ReactElement} element Element that requires a key.
9850 * @param {*} parentType element's parent's type.
9851 */
9852
9853
9854 function validateExplicitKey(element, parentType) {
9855 {
9856 if (!element._store || element._store.validated || element.key != null) {
9857 return;
9858 }
9859
9860 element._store.validated = true;
9861 var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
9862
9863 if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
9864 return;
9865 }
9866
9867 ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
9868 // property, it may be the creator of the child that's responsible for
9869 // assigning it a key.
9870
9871 var childOwner = '';
9872
9873 if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
9874 // Give the component that originally created this child.
9875 childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
9876 }
9877
9878 setCurrentlyValidatingElement$1(element);
9879
9880 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);
9881
9882 setCurrentlyValidatingElement$1(null);
9883 }
9884 }
9885 /**
9886 * Ensure that every element either is passed in a static location, in an
9887 * array with an explicit keys property defined, or in an object literal
9888 * with valid key property.
9889 *
9890 * @internal
9891 * @param {ReactNode} node Statically passed child of any type.
9892 * @param {*} parentType node's parent's type.
9893 */
9894
9895
9896 function validateChildKeys(node, parentType) {
9897 {
9898 if (typeof node !== 'object') {
9899 return;
9900 }
9901
9902 if (Array.isArray(node)) {
9903 for (var i = 0; i < node.length; i++) {
9904 var child = node[i];
9905
9906 if (isValidElement(child)) {
9907 validateExplicitKey(child, parentType);
9908 }
9909 }
9910 } else if (isValidElement(node)) {
9911 // This element was passed in a valid location.
9912 if (node._store) {
9913 node._store.validated = true;
9914 }
9915 } else if (node) {
9916 var iteratorFn = getIteratorFn(node);
9917
9918 if (typeof iteratorFn === 'function') {
9919 // Entry iterators used to provide implicit keys,
9920 // but now we print a separate warning for them later.
9921 if (iteratorFn !== node.entries) {
9922 var iterator = iteratorFn.call(node);
9923 var step;
9924
9925 while (!(step = iterator.next()).done) {
9926 if (isValidElement(step.value)) {
9927 validateExplicitKey(step.value, parentType);
9928 }
9929 }
9930 }
9931 }
9932 }
9933 }
9934 }
9935 /**
9936 * Given an element, validate that its props follow the propTypes definition,
9937 * provided by the type.
9938 *
9939 * @param {ReactElement} element
9940 */
9941
9942
9943 function validatePropTypes(element) {
9944 {
9945 var type = element.type;
9946
9947 if (type === null || type === undefined || typeof type === 'string') {
9948 return;
9949 }
9950
9951 var propTypes;
9952
9953 if (typeof type === 'function') {
9954 propTypes = type.propTypes;
9955 } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
9956 // Inner props are checked in the reconciler.
9957 type.$$typeof === REACT_MEMO_TYPE)) {
9958 propTypes = type.propTypes;
9959 } else {
9960 return;
9961 }
9962
9963 if (propTypes) {
9964 // Intentionally inside to avoid triggering lazy initializers:
9965 var name = getComponentName(type);
9966 checkPropTypes(propTypes, element.props, 'prop', name, element);
9967 } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
9968 propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
9969
9970 var _name = getComponentName(type);
9971
9972 error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
9973 }
9974
9975 if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
9976 error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
9977 }
9978 }
9979 }
9980 /**
9981 * Given a fragment, validate that it can only be provided with fragment props
9982 * @param {ReactElement} fragment
9983 */
9984
9985
9986 function validateFragmentProps(fragment) {
9987 {
9988 var keys = Object.keys(fragment.props);
9989
9990 for (var i = 0; i < keys.length; i++) {
9991 var key = keys[i];
9992
9993 if (key !== 'children' && key !== 'key') {
9994 setCurrentlyValidatingElement$1(fragment);
9995
9996 error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
9997
9998 setCurrentlyValidatingElement$1(null);
9999 break;
10000 }
10001 }
10002
10003 if (fragment.ref !== null) {
10004 setCurrentlyValidatingElement$1(fragment);
10005
10006 error('Invalid attribute `ref` supplied to `React.Fragment`.');
10007
10008 setCurrentlyValidatingElement$1(null);
10009 }
10010 }
10011 }
10012
10013 function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
10014 {
10015 var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
10016 // succeed and there will likely be errors in render.
10017
10018 if (!validType) {
10019 var info = '';
10020
10021 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
10022 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.";
10023 }
10024
10025 var sourceInfo = getSourceInfoErrorAddendum(source);
10026
10027 if (sourceInfo) {
10028 info += sourceInfo;
10029 } else {
10030 info += getDeclarationErrorAddendum();
10031 }
10032
10033 var typeString;
10034
10035 if (type === null) {
10036 typeString = 'null';
10037 } else if (Array.isArray(type)) {
10038 typeString = 'array';
10039 } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
10040 typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
10041 info = ' Did you accidentally export a JSX literal instead of a component?';
10042 } else {
10043 typeString = typeof type;
10044 }
10045
10046 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);
10047 }
10048
10049 var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
10050 // TODO: Drop this when these are no longer allowed as the type argument.
10051
10052 if (element == null) {
10053 return element;
10054 } // Skip key warning if the type isn't valid since our key validation logic
10055 // doesn't expect a non-string/function type and can throw confusing errors.
10056 // We don't want exception behavior to differ between dev and prod.
10057 // (Rendering will throw with a helpful message and as soon as the type is
10058 // fixed, the key warnings will appear.)
10059
10060
10061 if (validType) {
10062 var children = props.children;
10063
10064 if (children !== undefined) {
10065 if (isStaticChildren) {
10066 if (Array.isArray(children)) {
10067 for (var i = 0; i < children.length; i++) {
10068 validateChildKeys(children[i], type);
10069 }
10070
10071 if (Object.freeze) {
10072 Object.freeze(children);
10073 }
10074 } else {
10075 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.');
10076 }
10077 } else {
10078 validateChildKeys(children, type);
10079 }
10080 }
10081 }
10082
10083 if (type === exports.Fragment) {
10084 validateFragmentProps(element);
10085 } else {
10086 validatePropTypes(element);
10087 }
10088
10089 return element;
10090 }
10091 } // These two functions exist to still get child warnings in dev
10092 // even with the prod transform. This means that jsxDEV is purely
10093 // opt-in behavior for better messages but that we won't stop
10094 // giving you warnings if you use production apis.
10095
10096 function jsxWithValidationStatic(type, props, key) {
10097 {
10098 return jsxWithValidation(type, props, key, true);
10099 }
10100 }
10101 function jsxWithValidationDynamic(type, props, key) {
10102 {
10103 return jsxWithValidation(type, props, key, false);
10104 }
10105 }
10106
10107 var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
10108 // for now we can ship identical prod functions
10109
10110 var jsxs = jsxWithValidationStatic ;
10111
10112 exports.jsx = jsx;
10113 exports.jsxs = jsxs;
10114 })();
10115 }
10116
10117
10118 /***/ }),
10119
10120 /***/ "./node_modules/react/jsx-runtime.js":
10121 /*!*******************************************!*\
10122 !*** ./node_modules/react/jsx-runtime.js ***!
10123 \*******************************************/
10124 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
10125
10126 "use strict";
10127
10128
10129 if (false) {} else {
10130 module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ "./node_modules/react/cjs/react-jsx-runtime.development.js");
10131 }
10132
10133
10134 /***/ }),
10135
10136 /***/ "./node_modules/styled-components/dist/styled-components.browser.esm.js":
10137 /*!******************************************************************************!*\
10138 !*** ./node_modules/styled-components/dist/styled-components.browser.esm.js ***!
10139 \******************************************************************************/
10140 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10141
10142 "use strict";
10143 __webpack_require__.r(__webpack_exports__);
10144 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10145 /* harmony export */ "ServerStyleSheet": () => (/* binding */ ServerStyleSheet),
10146 /* harmony export */ "StyleSheetConsumer": () => (/* binding */ StyleSheetConsumer),
10147 /* harmony export */ "StyleSheetContext": () => (/* binding */ StyleSheetContext),
10148 /* harmony export */ "StyleSheetManager": () => (/* binding */ StyleSheetManager),
10149 /* harmony export */ "ThemeConsumer": () => (/* binding */ ThemeConsumer),
10150 /* harmony export */ "ThemeContext": () => (/* binding */ ThemeContext),
10151 /* harmony export */ "ThemeProvider": () => (/* binding */ ThemeProvider),
10152 /* 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),
10153 /* harmony export */ "createGlobalStyle": () => (/* binding */ createGlobalStyle),
10154 /* harmony export */ "css": () => (/* binding */ css),
10155 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
10156 /* harmony export */ "isStyledComponent": () => (/* binding */ isStyledComponent),
10157 /* harmony export */ "keyframes": () => (/* binding */ keyframes),
10158 /* harmony export */ "withTheme": () => (/* binding */ withTheme)
10159 /* harmony export */ });
10160 /* harmony import */ var stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! stylis/stylis.min */ "./node_modules/stylis/stylis.min.js");
10161 /* harmony import */ var stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0__);
10162 /* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! stylis-rule-sheet */ "./node_modules/stylis-rule-sheet/index.js");
10163 /* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1__);
10164 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
10165 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
10166 /* harmony import */ var _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/unitless */ "./node_modules/@emotion/unitless/dist/unitless.browser.esm.js");
10167 /* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
10168 /* harmony import */ var memoize_one__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! memoize-one */ "./node_modules/memoize-one/dist/memoize-one.esm.js");
10169 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
10170 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__);
10171 /* 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");
10172 /* harmony import */ var merge_anything__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! merge-anything */ "./node_modules/merge-anything/dist/index.esm.js");
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183 //
10184
10185 var interleave = (function (strings, interpolations) {
10186 var result = [strings[0]];
10187
10188 for (var i = 0, len = interpolations.length; i < len; i += 1) {
10189 result.push(interpolations[i], strings[i + 1]);
10190 }
10191
10192 return result;
10193 });
10194
10195 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
10196 return typeof obj;
10197 } : function (obj) {
10198 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
10199 };
10200
10201 var classCallCheck = function (instance, Constructor) {
10202 if (!(instance instanceof Constructor)) {
10203 throw new TypeError("Cannot call a class as a function");
10204 }
10205 };
10206
10207 var createClass = function () {
10208 function defineProperties(target, props) {
10209 for (var i = 0; i < props.length; i++) {
10210 var descriptor = props[i];
10211 descriptor.enumerable = descriptor.enumerable || false;
10212 descriptor.configurable = true;
10213 if ("value" in descriptor) descriptor.writable = true;
10214 Object.defineProperty(target, descriptor.key, descriptor);
10215 }
10216 }
10217
10218 return function (Constructor, protoProps, staticProps) {
10219 if (protoProps) defineProperties(Constructor.prototype, protoProps);
10220 if (staticProps) defineProperties(Constructor, staticProps);
10221 return Constructor;
10222 };
10223 }();
10224
10225 var _extends = Object.assign || function (target) {
10226 for (var i = 1; i < arguments.length; i++) {
10227 var source = arguments[i];
10228
10229 for (var key in source) {
10230 if (Object.prototype.hasOwnProperty.call(source, key)) {
10231 target[key] = source[key];
10232 }
10233 }
10234 }
10235
10236 return target;
10237 };
10238
10239 var inherits = function (subClass, superClass) {
10240 if (typeof superClass !== "function" && superClass !== null) {
10241 throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
10242 }
10243
10244 subClass.prototype = Object.create(superClass && superClass.prototype, {
10245 constructor: {
10246 value: subClass,
10247 enumerable: false,
10248 writable: true,
10249 configurable: true
10250 }
10251 });
10252 if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
10253 };
10254
10255 var objectWithoutProperties = function (obj, keys) {
10256 var target = {};
10257
10258 for (var i in obj) {
10259 if (keys.indexOf(i) >= 0) continue;
10260 if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
10261 target[i] = obj[i];
10262 }
10263
10264 return target;
10265 };
10266
10267 var possibleConstructorReturn = function (self, call) {
10268 if (!self) {
10269 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
10270 }
10271
10272 return call && (typeof call === "object" || typeof call === "function") ? call : self;
10273 };
10274
10275 //
10276 var isPlainObject = (function (x) {
10277 return (typeof x === 'undefined' ? 'undefined' : _typeof(x)) === 'object' && x.constructor === Object;
10278 });
10279
10280 //
10281 var EMPTY_ARRAY = Object.freeze([]);
10282 var EMPTY_OBJECT = Object.freeze({});
10283
10284 //
10285 function isFunction(test) {
10286 return typeof test === 'function';
10287 }
10288
10289 //
10290
10291 function getComponentName(target) {
10292 return ( true ? typeof target === 'string' && target : 0) || target.displayName || target.name || 'Component';
10293 }
10294
10295 //
10296 function isStatelessFunction(test) {
10297 return typeof test === 'function' && !(test.prototype && test.prototype.isReactComponent);
10298 }
10299
10300 //
10301 function isStyledComponent(target) {
10302 return target && typeof target.styledComponentId === 'string';
10303 }
10304
10305 //
10306
10307 var SC_ATTR = typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || 'data-styled';
10308
10309 var SC_VERSION_ATTR = 'data-styled-version';
10310
10311 var SC_STREAM_ATTR = 'data-styled-streamed';
10312
10313 var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;
10314
10315 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';
10316
10317 // Shared empty execution context when generating static styles
10318 var STATIC_EXECUTION_CONTEXT = {};
10319
10320 //
10321
10322
10323 /**
10324 * Parse errors.md and turn it into a simple hash of code: message
10325 */
10326 var ERRORS = true ? {
10327 "1": "Cannot create styled-component for component: %s.\n\n",
10328 "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",
10329 "3": "Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",
10330 "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",
10331 "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",
10332 "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",
10333 "7": "ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n",
10334 "8": "ThemeProvider: Please make your \"theme\" prop an object.\n\n",
10335 "9": "Missing document `<head>`\n\n",
10336 "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",
10337 "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",
10338 "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",
10339 "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"
10340 } : 0;
10341
10342 /**
10343 * super basic version of sprintf
10344 */
10345 function format() {
10346 var a = arguments.length <= 0 ? undefined : arguments[0];
10347 var b = [];
10348
10349 for (var c = 1, len = arguments.length; c < len; c += 1) {
10350 b.push(arguments.length <= c ? undefined : arguments[c]);
10351 }
10352
10353 b.forEach(function (d) {
10354 a = a.replace(/%[a-z]/, d);
10355 });
10356
10357 return a;
10358 }
10359
10360 /**
10361 * Create an error file out of errors.md for development and a simple web link to the full errors
10362 * in production mode.
10363 */
10364
10365 var StyledComponentsError = function (_Error) {
10366 inherits(StyledComponentsError, _Error);
10367
10368 function StyledComponentsError(code) {
10369 classCallCheck(this, StyledComponentsError);
10370
10371 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
10372 interpolations[_key - 1] = arguments[_key];
10373 }
10374
10375 if (false) { var _this; } else {
10376 var _this = possibleConstructorReturn(this, _Error.call(this, format.apply(undefined, [ERRORS[code]].concat(interpolations)).trim()));
10377 }
10378 return possibleConstructorReturn(_this);
10379 }
10380
10381 return StyledComponentsError;
10382 }(Error);
10383
10384 //
10385 var SC_COMPONENT_ID = /^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm;
10386
10387 var extractComps = (function (maybeCSS) {
10388 var css = '' + (maybeCSS || ''); // Definitely a string, and a clone
10389 var existingComponents = [];
10390 css.replace(SC_COMPONENT_ID, function (match, componentId, matchIndex) {
10391 existingComponents.push({ componentId: componentId, matchIndex: matchIndex });
10392 return match;
10393 });
10394 return existingComponents.map(function (_ref, i) {
10395 var componentId = _ref.componentId,
10396 matchIndex = _ref.matchIndex;
10397
10398 var nextComp = existingComponents[i + 1];
10399 var cssFromDOM = nextComp ? css.slice(matchIndex, nextComp.matchIndex) : css.slice(matchIndex);
10400 return { componentId: componentId, cssFromDOM: cssFromDOM };
10401 });
10402 });
10403
10404 //
10405
10406 var COMMENT_REGEX = /^\s*\/\/.*$/gm;
10407
10408 // NOTE: This stylis instance is only used to split rules from SSR'd style tags
10409 var stylisSplitter = new (stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default())({
10410 global: false,
10411 cascade: true,
10412 keyframe: false,
10413 prefix: false,
10414 compress: false,
10415 semicolon: true
10416 });
10417
10418 var stylis = new (stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default())({
10419 global: false,
10420 cascade: true,
10421 keyframe: false,
10422 prefix: true,
10423 compress: false,
10424 semicolon: false // NOTE: This means "autocomplete missing semicolons"
10425 });
10426
10427 // Wrap `insertRulePlugin to build a list of rules,
10428 // and then make our own plugin to return the rules. This
10429 // makes it easier to hook into the existing SSR architecture
10430
10431 var parsingRules = [];
10432
10433 // eslint-disable-next-line consistent-return
10434 var returnRulesPlugin = function returnRulesPlugin(context) {
10435 if (context === -2) {
10436 var parsedRules = parsingRules;
10437 parsingRules = [];
10438 return parsedRules;
10439 }
10440 };
10441
10442 var parseRulesPlugin = stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1___default()(function (rule) {
10443 parsingRules.push(rule);
10444 });
10445
10446 var _componentId = void 0;
10447 var _selector = void 0;
10448 var _selectorRegexp = void 0;
10449
10450 var selfReferenceReplacer = function selfReferenceReplacer(match, offset, string) {
10451 if (
10452 // the first self-ref is always untouched
10453 offset > 0 &&
10454 // there should be at least two self-refs to do a replacement (.b > .b)
10455 string.slice(0, offset).indexOf(_selector) !== -1 &&
10456 // no consecutive self refs (.b.b); that is a precedence boost and treated differently
10457 string.slice(offset - _selector.length, offset) !== _selector) {
10458 return '.' + _componentId;
10459 }
10460
10461 return match;
10462 };
10463
10464 /**
10465 * When writing a style like
10466 *
10467 * & + & {
10468 * color: red;
10469 * }
10470 *
10471 * The second ampersand should be a reference to the static component class. stylis
10472 * has no knowledge of static class so we have to intelligently replace the base selector.
10473 */
10474 var selfReferenceReplacementPlugin = function selfReferenceReplacementPlugin(context, _, selectors) {
10475 if (context === 2 && selectors.length && selectors[0].lastIndexOf(_selector) > 0) {
10476 // eslint-disable-next-line no-param-reassign
10477 selectors[0] = selectors[0].replace(_selectorRegexp, selfReferenceReplacer);
10478 }
10479 };
10480
10481 stylis.use([selfReferenceReplacementPlugin, parseRulesPlugin, returnRulesPlugin]);
10482 stylisSplitter.use([parseRulesPlugin, returnRulesPlugin]);
10483
10484 var splitByRules = function splitByRules(css) {
10485 return stylisSplitter('', css);
10486 };
10487
10488 function stringifyRules(rules, selector, prefix) {
10489 var componentId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '&';
10490
10491 var flatCSS = rules.join('').replace(COMMENT_REGEX, ''); // replace JS comments
10492
10493 var cssStr = selector && prefix ? prefix + ' ' + selector + ' { ' + flatCSS + ' }' : flatCSS;
10494
10495 // stylis has no concept of state to be passed to plugins
10496 // but since JS is single=threaded, we can rely on that to ensure
10497 // these properties stay in sync with the current stylis run
10498 _componentId = componentId;
10499 _selector = selector;
10500 _selectorRegexp = new RegExp('\\' + _selector + '\\b', 'g');
10501
10502 return stylis(prefix || !selector ? '' : selector, cssStr);
10503 }
10504
10505 //
10506 /* eslint-disable camelcase, no-undef */
10507
10508 var getNonce = (function () {
10509 return true ? __webpack_require__.nc : 0;
10510 });
10511
10512 //
10513 /* These are helpers for the StyleTags to keep track of the injected
10514 * rule names for each (component) ID that they're keeping track of.
10515 * They're crucial for detecting whether a name has already been
10516 * injected.
10517 * (This excludes rehydrated names) */
10518
10519 /* adds a new ID:name pairing to a names dictionary */
10520 var addNameForId = function addNameForId(names, id, name) {
10521 if (name) {
10522 // eslint-disable-next-line no-param-reassign
10523 var namesForId = names[id] || (names[id] = Object.create(null));
10524 namesForId[name] = true;
10525 }
10526 };
10527
10528 /* resets an ID entirely by overwriting it in the dictionary */
10529 var resetIdNames = function resetIdNames(names, id) {
10530 // eslint-disable-next-line no-param-reassign
10531 names[id] = Object.create(null);
10532 };
10533
10534 /* factory for a names dictionary checking the existance of an ID:name pairing */
10535 var hasNameForId = function hasNameForId(names) {
10536 return function (id, name) {
10537 return names[id] !== undefined && names[id][name];
10538 };
10539 };
10540
10541 /* stringifies names for the html/element output */
10542 var stringifyNames = function stringifyNames(names) {
10543 var str = '';
10544 // eslint-disable-next-line guard-for-in
10545 for (var id in names) {
10546 str += Object.keys(names[id]).join(' ') + ' ';
10547 }
10548 return str.trim();
10549 };
10550
10551 /* clones the nested names dictionary */
10552 var cloneNames = function cloneNames(names) {
10553 var clone = Object.create(null);
10554 // eslint-disable-next-line guard-for-in
10555 for (var id in names) {
10556 clone[id] = _extends({}, names[id]);
10557 }
10558 return clone;
10559 };
10560
10561 //
10562
10563 /* These are helpers that deal with the insertRule (aka speedy) API
10564 * They are used in the StyleTags and specifically the speedy tag
10565 */
10566
10567 /* retrieve a sheet for a given style tag */
10568 var sheetForTag = function sheetForTag(tag) {
10569 // $FlowFixMe
10570 if (tag.sheet) return tag.sheet;
10571
10572 /* Firefox quirk requires us to step through all stylesheets to find one owned by the given tag */
10573 var size = tag.ownerDocument.styleSheets.length;
10574 for (var i = 0; i < size; i += 1) {
10575 var sheet = tag.ownerDocument.styleSheets[i];
10576 // $FlowFixMe
10577 if (sheet.ownerNode === tag) return sheet;
10578 }
10579
10580 /* we should always be able to find a tag */
10581 throw new StyledComponentsError(10);
10582 };
10583
10584 /* insert a rule safely and return whether it was actually injected */
10585 var safeInsertRule = function safeInsertRule(sheet, cssRule, index) {
10586 /* abort early if cssRule string is falsy */
10587 if (!cssRule) return false;
10588
10589 var maxIndex = sheet.cssRules.length;
10590
10591 try {
10592 /* use insertRule and cap passed index with maxIndex (no of cssRules) */
10593 sheet.insertRule(cssRule, index <= maxIndex ? index : maxIndex);
10594 } catch (err) {
10595 /* any error indicates an invalid rule */
10596 return false;
10597 }
10598
10599 return true;
10600 };
10601
10602 /* deletes `size` rules starting from `removalIndex` */
10603 var deleteRules = function deleteRules(sheet, removalIndex, size) {
10604 var lowerBound = removalIndex - size;
10605 for (var i = removalIndex; i > lowerBound; i -= 1) {
10606 sheet.deleteRule(i);
10607 }
10608 };
10609
10610 //
10611
10612 /* this marker separates component styles and is important for rehydration */
10613 var makeTextMarker = function makeTextMarker(id) {
10614 return '\n/* sc-component-id: ' + id + ' */\n';
10615 };
10616
10617 /* add up all numbers in array up until and including the index */
10618 var addUpUntilIndex = function addUpUntilIndex(sizes, index) {
10619 var totalUpToIndex = 0;
10620 for (var i = 0; i <= index; i += 1) {
10621 totalUpToIndex += sizes[i];
10622 }
10623
10624 return totalUpToIndex;
10625 };
10626
10627 /* create a new style tag after lastEl */
10628 var makeStyleTag = function makeStyleTag(target, tagEl, insertBefore) {
10629 var targetDocument = document;
10630 if (target) targetDocument = target.ownerDocument;else if (tagEl) targetDocument = tagEl.ownerDocument;
10631
10632 var el = targetDocument.createElement('style');
10633 el.setAttribute(SC_ATTR, '');
10634 el.setAttribute(SC_VERSION_ATTR, "4.4.1");
10635
10636 var nonce = getNonce();
10637 if (nonce) {
10638 el.setAttribute('nonce', nonce);
10639 }
10640
10641 /* Work around insertRule quirk in EdgeHTML */
10642 el.appendChild(targetDocument.createTextNode(''));
10643
10644 if (target && !tagEl) {
10645 /* Append to target when no previous element was passed */
10646 target.appendChild(el);
10647 } else {
10648 if (!tagEl || !target || !tagEl.parentNode) {
10649 throw new StyledComponentsError(6);
10650 }
10651
10652 /* Insert new style tag after the previous one */
10653 tagEl.parentNode.insertBefore(el, insertBefore ? tagEl : tagEl.nextSibling);
10654 }
10655
10656 return el;
10657 };
10658
10659 /* takes a css factory function and outputs an html styled tag factory */
10660 var wrapAsHtmlTag = function wrapAsHtmlTag(css, names) {
10661 return function (additionalAttrs) {
10662 var nonce = getNonce();
10663 var attrs = [nonce && 'nonce="' + nonce + '"', SC_ATTR + '="' + stringifyNames(names) + '"', SC_VERSION_ATTR + '="' + "4.4.1" + '"', additionalAttrs];
10664
10665 var htmlAttr = attrs.filter(Boolean).join(' ');
10666 return '<style ' + htmlAttr + '>' + css() + '</style>';
10667 };
10668 };
10669
10670 /* takes a css factory function and outputs an element factory */
10671 var wrapAsElement = function wrapAsElement(css, names) {
10672 return function () {
10673 var _props;
10674
10675 var props = (_props = {}, _props[SC_ATTR] = stringifyNames(names), _props[SC_VERSION_ATTR] = "4.4.1", _props);
10676
10677 var nonce = getNonce();
10678 if (nonce) {
10679 // $FlowFixMe
10680 props.nonce = nonce;
10681 }
10682
10683 // eslint-disable-next-line react/no-danger
10684 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement('style', _extends({}, props, { dangerouslySetInnerHTML: { __html: css() } }));
10685 };
10686 };
10687
10688 var getIdsFromMarkersFactory = function getIdsFromMarkersFactory(markers) {
10689 return function () {
10690 return Object.keys(markers);
10691 };
10692 };
10693
10694 /* speedy tags utilise insertRule */
10695 var makeSpeedyTag = function makeSpeedyTag(el, getImportRuleTag) {
10696 var names = Object.create(null);
10697 var markers = Object.create(null);
10698 var sizes = [];
10699
10700 var extractImport = getImportRuleTag !== undefined;
10701 /* indicates whether getImportRuleTag was called */
10702 var usedImportRuleTag = false;
10703
10704 var insertMarker = function insertMarker(id) {
10705 var prev = markers[id];
10706 if (prev !== undefined) {
10707 return prev;
10708 }
10709
10710 markers[id] = sizes.length;
10711 sizes.push(0);
10712 resetIdNames(names, id);
10713
10714 return markers[id];
10715 };
10716
10717 var insertRules = function insertRules(id, cssRules, name) {
10718 var marker = insertMarker(id);
10719 var sheet = sheetForTag(el);
10720 var insertIndex = addUpUntilIndex(sizes, marker);
10721
10722 var injectedRules = 0;
10723 var importRules = [];
10724 var cssRulesSize = cssRules.length;
10725
10726 for (var i = 0; i < cssRulesSize; i += 1) {
10727 var cssRule = cssRules[i];
10728 var mayHaveImport = extractImport; /* @import rules are reordered to appear first */
10729 if (mayHaveImport && cssRule.indexOf('@import') !== -1) {
10730 importRules.push(cssRule);
10731 } else if (safeInsertRule(sheet, cssRule, insertIndex + injectedRules)) {
10732 mayHaveImport = false;
10733 injectedRules += 1;
10734 }
10735 }
10736
10737 if (extractImport && importRules.length > 0) {
10738 usedImportRuleTag = true;
10739 // $FlowFixMe
10740 getImportRuleTag().insertRules(id + '-import', importRules);
10741 }
10742
10743 sizes[marker] += injectedRules; /* add up no of injected rules */
10744 addNameForId(names, id, name);
10745 };
10746
10747 var removeRules = function removeRules(id) {
10748 var marker = markers[id];
10749 if (marker === undefined) return;
10750 // $FlowFixMe
10751 if (el.isConnected === false) return;
10752
10753 var size = sizes[marker];
10754 var sheet = sheetForTag(el);
10755 var removalIndex = addUpUntilIndex(sizes, marker) - 1;
10756 deleteRules(sheet, removalIndex, size);
10757 sizes[marker] = 0;
10758 resetIdNames(names, id);
10759
10760 if (extractImport && usedImportRuleTag) {
10761 // $FlowFixMe
10762 getImportRuleTag().removeRules(id + '-import');
10763 }
10764 };
10765
10766 var css = function css() {
10767 var _sheetForTag = sheetForTag(el),
10768 cssRules = _sheetForTag.cssRules;
10769
10770 var str = '';
10771
10772 // eslint-disable-next-line guard-for-in
10773 for (var id in markers) {
10774 str += makeTextMarker(id);
10775 var marker = markers[id];
10776 var end = addUpUntilIndex(sizes, marker);
10777 var size = sizes[marker];
10778 for (var i = end - size; i < end; i += 1) {
10779 var rule = cssRules[i];
10780 if (rule !== undefined) {
10781 str += rule.cssText;
10782 }
10783 }
10784 }
10785
10786 return str;
10787 };
10788
10789 return {
10790 clone: function clone() {
10791 throw new StyledComponentsError(5);
10792 },
10793
10794 css: css,
10795 getIds: getIdsFromMarkersFactory(markers),
10796 hasNameForId: hasNameForId(names),
10797 insertMarker: insertMarker,
10798 insertRules: insertRules,
10799 removeRules: removeRules,
10800 sealed: false,
10801 styleTag: el,
10802 toElement: wrapAsElement(css, names),
10803 toHTML: wrapAsHtmlTag(css, names)
10804 };
10805 };
10806
10807 var makeTextNode = function makeTextNode(targetDocument, id) {
10808 return targetDocument.createTextNode(makeTextMarker(id));
10809 };
10810
10811 var makeBrowserTag = function makeBrowserTag(el, getImportRuleTag) {
10812 var names = Object.create(null);
10813 var markers = Object.create(null);
10814
10815 var extractImport = getImportRuleTag !== undefined;
10816
10817 /* indicates whether getImportRuleTag was called */
10818 var usedImportRuleTag = false;
10819
10820 var insertMarker = function insertMarker(id) {
10821 var prev = markers[id];
10822 if (prev !== undefined) {
10823 return prev;
10824 }
10825
10826 markers[id] = makeTextNode(el.ownerDocument, id);
10827 el.appendChild(markers[id]);
10828 names[id] = Object.create(null);
10829
10830 return markers[id];
10831 };
10832
10833 var insertRules = function insertRules(id, cssRules, name) {
10834 var marker = insertMarker(id);
10835 var importRules = [];
10836 var cssRulesSize = cssRules.length;
10837
10838 for (var i = 0; i < cssRulesSize; i += 1) {
10839 var rule = cssRules[i];
10840 var mayHaveImport = extractImport;
10841 if (mayHaveImport && rule.indexOf('@import') !== -1) {
10842 importRules.push(rule);
10843 } else {
10844 mayHaveImport = false;
10845 var separator = i === cssRulesSize - 1 ? '' : ' ';
10846 marker.appendData('' + rule + separator);
10847 }
10848 }
10849
10850 addNameForId(names, id, name);
10851
10852 if (extractImport && importRules.length > 0) {
10853 usedImportRuleTag = true;
10854 // $FlowFixMe
10855 getImportRuleTag().insertRules(id + '-import', importRules);
10856 }
10857 };
10858
10859 var removeRules = function removeRules(id) {
10860 var marker = markers[id];
10861 if (marker === undefined) return;
10862
10863 /* create new empty text node and replace the current one */
10864 var newMarker = makeTextNode(el.ownerDocument, id);
10865 el.replaceChild(newMarker, marker);
10866 markers[id] = newMarker;
10867 resetIdNames(names, id);
10868
10869 if (extractImport && usedImportRuleTag) {
10870 // $FlowFixMe
10871 getImportRuleTag().removeRules(id + '-import');
10872 }
10873 };
10874
10875 var css = function css() {
10876 var str = '';
10877
10878 // eslint-disable-next-line guard-for-in
10879 for (var id in markers) {
10880 str += markers[id].data;
10881 }
10882
10883 return str;
10884 };
10885
10886 return {
10887 clone: function clone() {
10888 throw new StyledComponentsError(5);
10889 },
10890
10891 css: css,
10892 getIds: getIdsFromMarkersFactory(markers),
10893 hasNameForId: hasNameForId(names),
10894 insertMarker: insertMarker,
10895 insertRules: insertRules,
10896 removeRules: removeRules,
10897 sealed: false,
10898 styleTag: el,
10899 toElement: wrapAsElement(css, names),
10900 toHTML: wrapAsHtmlTag(css, names)
10901 };
10902 };
10903
10904 var makeServerTag = function makeServerTag(namesArg, markersArg) {
10905 var names = namesArg === undefined ? Object.create(null) : namesArg;
10906 var markers = markersArg === undefined ? Object.create(null) : markersArg;
10907
10908 var insertMarker = function insertMarker(id) {
10909 var prev = markers[id];
10910 if (prev !== undefined) {
10911 return prev;
10912 }
10913
10914 return markers[id] = [''];
10915 };
10916
10917 var insertRules = function insertRules(id, cssRules, name) {
10918 var marker = insertMarker(id);
10919 marker[0] += cssRules.join(' ');
10920 addNameForId(names, id, name);
10921 };
10922
10923 var removeRules = function removeRules(id) {
10924 var marker = markers[id];
10925 if (marker === undefined) return;
10926 marker[0] = '';
10927 resetIdNames(names, id);
10928 };
10929
10930 var css = function css() {
10931 var str = '';
10932 // eslint-disable-next-line guard-for-in
10933 for (var id in markers) {
10934 var cssForId = markers[id][0];
10935 if (cssForId) {
10936 str += makeTextMarker(id) + cssForId;
10937 }
10938 }
10939 return str;
10940 };
10941
10942 var clone = function clone() {
10943 var namesClone = cloneNames(names);
10944 var markersClone = Object.create(null);
10945
10946 // eslint-disable-next-line guard-for-in
10947 for (var id in markers) {
10948 markersClone[id] = [markers[id][0]];
10949 }
10950
10951 return makeServerTag(namesClone, markersClone);
10952 };
10953
10954 var tag = {
10955 clone: clone,
10956 css: css,
10957 getIds: getIdsFromMarkersFactory(markers),
10958 hasNameForId: hasNameForId(names),
10959 insertMarker: insertMarker,
10960 insertRules: insertRules,
10961 removeRules: removeRules,
10962 sealed: false,
10963 styleTag: null,
10964 toElement: wrapAsElement(css, names),
10965 toHTML: wrapAsHtmlTag(css, names)
10966 };
10967
10968 return tag;
10969 };
10970
10971 var makeTag = function makeTag(target, tagEl, forceServer, insertBefore, getImportRuleTag) {
10972 if (IS_BROWSER && !forceServer) {
10973 var el = makeStyleTag(target, tagEl, insertBefore);
10974
10975 if (DISABLE_SPEEDY) {
10976 return makeBrowserTag(el, getImportRuleTag);
10977 } else {
10978 return makeSpeedyTag(el, getImportRuleTag);
10979 }
10980 }
10981
10982 return makeServerTag();
10983 };
10984
10985 var rehydrate = function rehydrate(tag, els, extracted) {
10986 /* add all extracted components to the new tag */
10987 for (var i = 0, len = extracted.length; i < len; i += 1) {
10988 var _extracted$i = extracted[i],
10989 componentId = _extracted$i.componentId,
10990 cssFromDOM = _extracted$i.cssFromDOM;
10991
10992 var cssRules = splitByRules(cssFromDOM);
10993 tag.insertRules(componentId, cssRules);
10994 }
10995
10996 /* remove old HTMLStyleElements, since they have been rehydrated */
10997 for (var _i = 0, _len = els.length; _i < _len; _i += 1) {
10998 var el = els[_i];
10999 if (el.parentNode) {
11000 el.parentNode.removeChild(el);
11001 }
11002 }
11003 };
11004
11005 //
11006
11007 var SPLIT_REGEX = /\s+/;
11008
11009 /* determine the maximum number of components before tags are sharded */
11010 var MAX_SIZE = void 0;
11011 if (IS_BROWSER) {
11012 /* in speedy mode we can keep a lot more rules in a sheet before a slowdown can be expected */
11013 MAX_SIZE = DISABLE_SPEEDY ? 40 : 1000;
11014 } else {
11015 /* for servers we do not need to shard at all */
11016 MAX_SIZE = -1;
11017 }
11018
11019 var sheetRunningId = 0;
11020 var master = void 0;
11021
11022 var StyleSheet = function () {
11023
11024 /* a map from ids to tags */
11025
11026 /* deferred rules for a given id */
11027
11028 /* this is used for not reinjecting rules via hasNameForId() */
11029
11030 /* when rules for an id are removed using remove() we have to ignore rehydratedNames for it */
11031
11032 /* a list of tags belonging to this StyleSheet */
11033
11034 /* a tag for import rules */
11035
11036 /* current capacity until a new tag must be created */
11037
11038 /* children (aka clones) of this StyleSheet inheriting all and future injections */
11039
11040 function StyleSheet() {
11041 var _this = this;
11042
11043 var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : IS_BROWSER ? document.head : null;
11044 var forceServer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
11045 classCallCheck(this, StyleSheet);
11046
11047 this.getImportRuleTag = function () {
11048 var importRuleTag = _this.importRuleTag;
11049
11050 if (importRuleTag !== undefined) {
11051 return importRuleTag;
11052 }
11053
11054 var firstTag = _this.tags[0];
11055 var insertBefore = true;
11056
11057 return _this.importRuleTag = makeTag(_this.target, firstTag ? firstTag.styleTag : null, _this.forceServer, insertBefore);
11058 };
11059
11060 sheetRunningId += 1;
11061 this.id = sheetRunningId;
11062 this.forceServer = forceServer;
11063 this.target = forceServer ? null : target;
11064 this.tagMap = {};
11065 this.deferred = {};
11066 this.rehydratedNames = {};
11067 this.ignoreRehydratedNames = {};
11068 this.tags = [];
11069 this.capacity = 1;
11070 this.clones = [];
11071 }
11072
11073 /* rehydrate all SSR'd style tags */
11074
11075
11076 StyleSheet.prototype.rehydrate = function rehydrate$$1() {
11077 if (!IS_BROWSER || this.forceServer) return this;
11078
11079 var els = [];
11080 var extracted = [];
11081 var isStreamed = false;
11082
11083 /* retrieve all of our SSR style elements from the DOM */
11084 var nodes = document.querySelectorAll('style[' + SC_ATTR + '][' + SC_VERSION_ATTR + '="' + "4.4.1" + '"]');
11085
11086 var nodesSize = nodes.length;
11087
11088 /* abort rehydration if no previous style tags were found */
11089 if (!nodesSize) return this;
11090
11091 for (var i = 0; i < nodesSize; i += 1) {
11092 var el = nodes[i];
11093
11094 /* check if style tag is a streamed tag */
11095 if (!isStreamed) isStreamed = !!el.getAttribute(SC_STREAM_ATTR);
11096
11097 /* retrieve all component names */
11098 var elNames = (el.getAttribute(SC_ATTR) || '').trim().split(SPLIT_REGEX);
11099 var elNamesSize = elNames.length;
11100 for (var j = 0, name; j < elNamesSize; j += 1) {
11101 name = elNames[j];
11102 /* add rehydrated name to sheet to avoid re-adding styles */
11103 this.rehydratedNames[name] = true;
11104 }
11105
11106 /* extract all components and their CSS */
11107 extracted.push.apply(extracted, extractComps(el.textContent));
11108
11109 /* store original HTMLStyleElement */
11110 els.push(el);
11111 }
11112
11113 /* abort rehydration if nothing was extracted */
11114 var extractedSize = extracted.length;
11115 if (!extractedSize) return this;
11116
11117 /* create a tag to be used for rehydration */
11118 var tag = this.makeTag(null);
11119
11120 rehydrate(tag, els, extracted);
11121
11122 /* reset capacity and adjust MAX_SIZE by the initial size of the rehydration */
11123 this.capacity = Math.max(1, MAX_SIZE - extractedSize);
11124 this.tags.push(tag);
11125
11126 /* retrieve all component ids */
11127 for (var _j = 0; _j < extractedSize; _j += 1) {
11128 this.tagMap[extracted[_j].componentId] = tag;
11129 }
11130
11131 return this;
11132 };
11133
11134 /* retrieve a "master" instance of StyleSheet which is typically used when no other is available
11135 * The master StyleSheet is targeted by createGlobalStyle, keyframes, and components outside of any
11136 * StyleSheetManager's context */
11137
11138
11139 /* reset the internal "master" instance */
11140 StyleSheet.reset = function reset() {
11141 var forceServer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
11142
11143 master = new StyleSheet(undefined, forceServer).rehydrate();
11144 };
11145
11146 /* adds "children" to the StyleSheet that inherit all of the parents' rules
11147 * while their own rules do not affect the parent */
11148
11149
11150 StyleSheet.prototype.clone = function clone() {
11151 var sheet = new StyleSheet(this.target, this.forceServer);
11152
11153 /* add to clone array */
11154 this.clones.push(sheet);
11155
11156 /* clone all tags */
11157 sheet.tags = this.tags.map(function (tag) {
11158 var ids = tag.getIds();
11159 var newTag = tag.clone();
11160
11161 /* reconstruct tagMap */
11162 for (var i = 0; i < ids.length; i += 1) {
11163 sheet.tagMap[ids[i]] = newTag;
11164 }
11165
11166 return newTag;
11167 });
11168
11169 /* clone other maps */
11170 sheet.rehydratedNames = _extends({}, this.rehydratedNames);
11171 sheet.deferred = _extends({}, this.deferred);
11172
11173 return sheet;
11174 };
11175
11176 /* force StyleSheet to create a new tag on the next injection */
11177
11178
11179 StyleSheet.prototype.sealAllTags = function sealAllTags() {
11180 this.capacity = 1;
11181
11182 this.tags.forEach(function (tag) {
11183 // eslint-disable-next-line no-param-reassign
11184 tag.sealed = true;
11185 });
11186 };
11187
11188 StyleSheet.prototype.makeTag = function makeTag$$1(tag) {
11189 var lastEl = tag ? tag.styleTag : null;
11190 var insertBefore = false;
11191
11192 return makeTag(this.target, lastEl, this.forceServer, insertBefore, this.getImportRuleTag);
11193 };
11194
11195 /* get a tag for a given componentId, assign the componentId to one, or shard */
11196 StyleSheet.prototype.getTagForId = function getTagForId(id) {
11197 /* simply return a tag, when the componentId was already assigned one */
11198 var prev = this.tagMap[id];
11199 if (prev !== undefined && !prev.sealed) {
11200 return prev;
11201 }
11202
11203 var tag = this.tags[this.tags.length - 1];
11204
11205 /* shard (create a new tag) if the tag is exhausted (See MAX_SIZE) */
11206 this.capacity -= 1;
11207
11208 if (this.capacity === 0) {
11209 this.capacity = MAX_SIZE;
11210 tag = this.makeTag(tag);
11211 this.tags.push(tag);
11212 }
11213
11214 return this.tagMap[id] = tag;
11215 };
11216
11217 /* mainly for createGlobalStyle to check for its id */
11218
11219
11220 StyleSheet.prototype.hasId = function hasId(id) {
11221 return this.tagMap[id] !== undefined;
11222 };
11223
11224 /* caching layer checking id+name to already have a corresponding tag and injected rules */
11225
11226
11227 StyleSheet.prototype.hasNameForId = function hasNameForId(id, name) {
11228 /* exception for rehydrated names which are checked separately */
11229 if (this.ignoreRehydratedNames[id] === undefined && this.rehydratedNames[name]) {
11230 return true;
11231 }
11232
11233 var tag = this.tagMap[id];
11234 return tag !== undefined && tag.hasNameForId(id, name);
11235 };
11236
11237 /* registers a componentId and registers it on its tag */
11238
11239
11240 StyleSheet.prototype.deferredInject = function deferredInject(id, cssRules) {
11241 /* don't inject when the id is already registered */
11242 if (this.tagMap[id] !== undefined) return;
11243
11244 var clones = this.clones;
11245
11246 for (var i = 0; i < clones.length; i += 1) {
11247 clones[i].deferredInject(id, cssRules);
11248 }
11249
11250 this.getTagForId(id).insertMarker(id);
11251 this.deferred[id] = cssRules;
11252 };
11253
11254 /* injects rules for a given id with a name that will need to be cached */
11255
11256
11257 StyleSheet.prototype.inject = function inject(id, cssRules, name) {
11258 var clones = this.clones;
11259
11260
11261 for (var i = 0; i < clones.length; i += 1) {
11262 clones[i].inject(id, cssRules, name);
11263 }
11264
11265 var tag = this.getTagForId(id);
11266
11267 /* add deferred rules for component */
11268 if (this.deferred[id] !== undefined) {
11269 // Combine passed cssRules with previously deferred CSS rules
11270 // NOTE: We cannot mutate the deferred array itself as all clones
11271 // do the same (see clones[i].inject)
11272 var rules = this.deferred[id].concat(cssRules);
11273 tag.insertRules(id, rules, name);
11274
11275 this.deferred[id] = undefined;
11276 } else {
11277 tag.insertRules(id, cssRules, name);
11278 }
11279 };
11280
11281 /* removes all rules for a given id, which doesn't remove its marker but resets it */
11282
11283
11284 StyleSheet.prototype.remove = function remove(id) {
11285 var tag = this.tagMap[id];
11286 if (tag === undefined) return;
11287
11288 var clones = this.clones;
11289
11290 for (var i = 0; i < clones.length; i += 1) {
11291 clones[i].remove(id);
11292 }
11293
11294 /* remove all rules from the tag */
11295 tag.removeRules(id);
11296
11297 /* ignore possible rehydrated names */
11298 this.ignoreRehydratedNames[id] = true;
11299
11300 /* delete possible deferred rules */
11301 this.deferred[id] = undefined;
11302 };
11303
11304 StyleSheet.prototype.toHTML = function toHTML() {
11305 return this.tags.map(function (tag) {
11306 return tag.toHTML();
11307 }).join('');
11308 };
11309
11310 StyleSheet.prototype.toReactElements = function toReactElements() {
11311 var id = this.id;
11312
11313
11314 return this.tags.map(function (tag, i) {
11315 var key = 'sc-' + id + '-' + i;
11316 return (0,react__WEBPACK_IMPORTED_MODULE_2__.cloneElement)(tag.toElement(), { key: key });
11317 });
11318 };
11319
11320 createClass(StyleSheet, null, [{
11321 key: 'master',
11322 get: function get$$1() {
11323 return master || (master = new StyleSheet().rehydrate());
11324 }
11325
11326 /* NOTE: This is just for backwards-compatibility with jest-styled-components */
11327
11328 }, {
11329 key: 'instance',
11330 get: function get$$1() {
11331 return StyleSheet.master;
11332 }
11333 }]);
11334 return StyleSheet;
11335 }();
11336
11337 //
11338
11339 var Keyframes = function () {
11340 function Keyframes(name, rules) {
11341 var _this = this;
11342
11343 classCallCheck(this, Keyframes);
11344
11345 this.inject = function (styleSheet) {
11346 if (!styleSheet.hasNameForId(_this.id, _this.name)) {
11347 styleSheet.inject(_this.id, _this.rules, _this.name);
11348 }
11349 };
11350
11351 this.toString = function () {
11352 throw new StyledComponentsError(12, String(_this.name));
11353 };
11354
11355 this.name = name;
11356 this.rules = rules;
11357
11358 this.id = 'sc-keyframes-' + name;
11359 }
11360
11361 Keyframes.prototype.getName = function getName() {
11362 return this.name;
11363 };
11364
11365 return Keyframes;
11366 }();
11367
11368 //
11369
11370 /**
11371 * inlined version of
11372 * https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/hyphenateStyleName.js
11373 */
11374
11375 var uppercasePattern = /([A-Z])/g;
11376 var msPattern = /^ms-/;
11377
11378 /**
11379 * Hyphenates a camelcased CSS property name, for example:
11380 *
11381 * > hyphenateStyleName('backgroundColor')
11382 * < "background-color"
11383 * > hyphenateStyleName('MozTransition')
11384 * < "-moz-transition"
11385 * > hyphenateStyleName('msTransition')
11386 * < "-ms-transition"
11387 *
11388 * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
11389 * is converted to `-ms-`.
11390 *
11391 * @param {string} string
11392 * @return {string}
11393 */
11394 function hyphenateStyleName(string) {
11395 return string.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
11396 }
11397
11398 //
11399
11400 // Taken from https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/shared/dangerousStyleValue.js
11401 function addUnitIfNeeded(name, value) {
11402 // https://github.com/amilajack/eslint-plugin-flowtype-errors/issues/133
11403 // $FlowFixMe
11404 if (value == null || typeof value === 'boolean' || value === '') {
11405 return '';
11406 }
11407
11408 if (typeof value === 'number' && value !== 0 && !(name in _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__["default"])) {
11409 return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
11410 }
11411
11412 return String(value).trim();
11413 }
11414
11415 //
11416
11417 /**
11418 * It's falsish not falsy because 0 is allowed.
11419 */
11420 var isFalsish = function isFalsish(chunk) {
11421 return chunk === undefined || chunk === null || chunk === false || chunk === '';
11422 };
11423
11424 var objToCssArray = function objToCssArray(obj, prevKey) {
11425 var rules = [];
11426 var keys = Object.keys(obj);
11427
11428 keys.forEach(function (key) {
11429 if (!isFalsish(obj[key])) {
11430 if (isPlainObject(obj[key])) {
11431 rules.push.apply(rules, objToCssArray(obj[key], key));
11432
11433 return rules;
11434 } else if (isFunction(obj[key])) {
11435 rules.push(hyphenateStyleName(key) + ':', obj[key], ';');
11436
11437 return rules;
11438 }
11439 rules.push(hyphenateStyleName(key) + ': ' + addUnitIfNeeded(key, obj[key]) + ';');
11440 }
11441 return rules;
11442 });
11443
11444 return prevKey ? [prevKey + ' {'].concat(rules, ['}']) : rules;
11445 };
11446
11447 function flatten(chunk, executionContext, styleSheet) {
11448 if (Array.isArray(chunk)) {
11449 var ruleSet = [];
11450
11451 for (var i = 0, len = chunk.length, result; i < len; i += 1) {
11452 result = flatten(chunk[i], executionContext, styleSheet);
11453
11454 if (result === null) continue;else if (Array.isArray(result)) ruleSet.push.apply(ruleSet, result);else ruleSet.push(result);
11455 }
11456
11457 return ruleSet;
11458 }
11459
11460 if (isFalsish(chunk)) {
11461 return null;
11462 }
11463
11464 /* Handle other components */
11465 if (isStyledComponent(chunk)) {
11466 return '.' + chunk.styledComponentId;
11467 }
11468
11469 /* Either execute or defer the function */
11470 if (isFunction(chunk)) {
11471 if (isStatelessFunction(chunk) && executionContext) {
11472 var _result = chunk(executionContext);
11473
11474 if ( true && (0,react_is__WEBPACK_IMPORTED_MODULE_4__.isElement)(_result)) {
11475 // eslint-disable-next-line no-console
11476 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.');
11477 }
11478
11479 return flatten(_result, executionContext, styleSheet);
11480 } else return chunk;
11481 }
11482
11483 if (chunk instanceof Keyframes) {
11484 if (styleSheet) {
11485 chunk.inject(styleSheet);
11486 return chunk.getName();
11487 } else return chunk;
11488 }
11489
11490 /* Handle objects */
11491 return isPlainObject(chunk) ? objToCssArray(chunk) : chunk.toString();
11492 }
11493
11494 //
11495
11496 function css(styles) {
11497 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
11498 interpolations[_key - 1] = arguments[_key];
11499 }
11500
11501 if (isFunction(styles) || isPlainObject(styles)) {
11502 // $FlowFixMe
11503 return flatten(interleave(EMPTY_ARRAY, [styles].concat(interpolations)));
11504 }
11505
11506 // $FlowFixMe
11507 return flatten(interleave(styles, interpolations));
11508 }
11509
11510 //
11511
11512 function constructWithOptions(componentConstructor, tag) {
11513 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT;
11514
11515 if (!(0,react_is__WEBPACK_IMPORTED_MODULE_4__.isValidElementType)(tag)) {
11516 throw new StyledComponentsError(1, String(tag));
11517 }
11518
11519 /* This is callable directly as a template function */
11520 // $FlowFixMe: Not typed to avoid destructuring arguments
11521 var templateFunction = function templateFunction() {
11522 return componentConstructor(tag, options, css.apply(undefined, arguments));
11523 };
11524
11525 /* If config methods are called, wrap up a new template function and merge options */
11526 templateFunction.withConfig = function (config) {
11527 return constructWithOptions(componentConstructor, tag, _extends({}, options, config));
11528 };
11529
11530 /* Modify/inject new props at runtime */
11531 templateFunction.attrs = function (attrs) {
11532 return constructWithOptions(componentConstructor, tag, _extends({}, options, {
11533 attrs: Array.prototype.concat(options.attrs, attrs).filter(Boolean)
11534 }));
11535 };
11536
11537 return templateFunction;
11538 }
11539
11540 //
11541 // Source: https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js
11542 function murmurhash(c) {
11543 for (var e = c.length | 0, a = e | 0, d = 0, b; e >= 4;) {
11544 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;
11545 }
11546 switch (e) {
11547 case 3:
11548 a ^= (c.charCodeAt(d + 2) & 255) << 16;
11549 case 2:
11550 a ^= (c.charCodeAt(d + 1) & 255) << 8;
11551 case 1:
11552 a ^= c.charCodeAt(d) & 255, a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
11553 }
11554 a ^= a >>> 13;
11555 a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
11556 return (a ^ a >>> 15) >>> 0;
11557 }
11558
11559 //
11560 /* eslint-disable no-bitwise */
11561
11562 /* This is the "capacity" of our alphabet i.e. 2x26 for all letters plus their capitalised
11563 * counterparts */
11564 var charsLength = 52;
11565
11566 /* start at 75 for 'a' until 'z' (25) and then start at 65 for capitalised letters */
11567 var getAlphabeticChar = function getAlphabeticChar(code) {
11568 return String.fromCharCode(code + (code > 25 ? 39 : 97));
11569 };
11570
11571 /* input a number, usually a hash and convert it to base-52 */
11572 function generateAlphabeticName(code) {
11573 var name = '';
11574 var x = void 0;
11575
11576 /* get a char and divide by alphabet-length */
11577 for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {
11578 name = getAlphabeticChar(x % charsLength) + name;
11579 }
11580
11581 return getAlphabeticChar(x % charsLength) + name;
11582 }
11583
11584 //
11585
11586 function hasFunctionObjectKey(obj) {
11587 // eslint-disable-next-line guard-for-in, no-restricted-syntax
11588 for (var key in obj) {
11589 if (isFunction(obj[key])) {
11590 return true;
11591 }
11592 }
11593
11594 return false;
11595 }
11596
11597 function isStaticRules(rules, attrs) {
11598 for (var i = 0; i < rules.length; i += 1) {
11599 var rule = rules[i];
11600
11601 // recursive case
11602 if (Array.isArray(rule) && !isStaticRules(rule, attrs)) {
11603 return false;
11604 } else if (isFunction(rule) && !isStyledComponent(rule)) {
11605 // functions are allowed to be static if they're just being
11606 // used to get the classname of a nested styled component
11607 return false;
11608 }
11609 }
11610
11611 if (attrs.some(function (x) {
11612 return isFunction(x) || hasFunctionObjectKey(x);
11613 })) return false;
11614
11615 return true;
11616 }
11617
11618 //
11619
11620 /* combines hashStr (murmurhash) and nameGenerator for convenience */
11621 var hasher = function hasher(str) {
11622 return generateAlphabeticName(murmurhash(str));
11623 };
11624
11625 /*
11626 ComponentStyle is all the CSS-specific stuff, not
11627 the React-specific stuff.
11628 */
11629
11630 var ComponentStyle = function () {
11631 function ComponentStyle(rules, attrs, componentId) {
11632 classCallCheck(this, ComponentStyle);
11633
11634 this.rules = rules;
11635 this.isStatic = false && 0;
11636 this.componentId = componentId;
11637
11638 if (!StyleSheet.master.hasId(componentId)) {
11639 StyleSheet.master.deferredInject(componentId, []);
11640 }
11641 }
11642
11643 /*
11644 * Flattens a rule set into valid CSS
11645 * Hashes it, wraps the whole chunk in a .hash1234 {}
11646 * Returns the hash to be injected on render()
11647 * */
11648
11649
11650 ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) {
11651 var isStatic = this.isStatic,
11652 componentId = this.componentId,
11653 lastClassName = this.lastClassName;
11654
11655 if (IS_BROWSER && isStatic && typeof lastClassName === 'string' && styleSheet.hasNameForId(componentId, lastClassName)) {
11656 return lastClassName;
11657 }
11658
11659 var flatCSS = flatten(this.rules, executionContext, styleSheet);
11660 var name = hasher(this.componentId + flatCSS.join(''));
11661 if (!styleSheet.hasNameForId(componentId, name)) {
11662 styleSheet.inject(this.componentId, stringifyRules(flatCSS, '.' + name, undefined, componentId), name);
11663 }
11664
11665 this.lastClassName = name;
11666 return name;
11667 };
11668
11669 ComponentStyle.generateName = function generateName(str) {
11670 return hasher(str);
11671 };
11672
11673 return ComponentStyle;
11674 }();
11675
11676 //
11677
11678 var LIMIT = 200;
11679
11680 var createWarnTooManyClasses = (function (displayName) {
11681 var generatedClasses = {};
11682 var warningSeen = false;
11683
11684 return function (className) {
11685 if (!warningSeen) {
11686 generatedClasses[className] = true;
11687 if (Object.keys(generatedClasses).length >= LIMIT) {
11688 // Unable to find latestRule in test environment.
11689 /* eslint-disable no-console, prefer-template */
11690 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 />');
11691 warningSeen = true;
11692 generatedClasses = {};
11693 }
11694 }
11695 };
11696 });
11697
11698 //
11699
11700 var determineTheme = (function (props, fallbackTheme) {
11701 var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT;
11702
11703 // Props should take precedence over ThemeProvider, which should take precedence over
11704 // defaultProps, but React automatically puts defaultProps on props.
11705
11706 /* eslint-disable react/prop-types, flowtype-errors/show-errors */
11707 var isDefaultTheme = defaultProps ? props.theme === defaultProps.theme : false;
11708 var theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme || defaultProps.theme;
11709 /* eslint-enable */
11710
11711 return theme;
11712 });
11713
11714 //
11715 var escapeRegex = /[[\].#*$><+~=|^:(),"'`-]+/g;
11716 var dashesAtEnds = /(^-|-$)/g;
11717
11718 /**
11719 * TODO: Explore using CSS.escape when it becomes more available
11720 * in evergreen browsers.
11721 */
11722 function escape(str) {
11723 return str
11724 // Replace all possible CSS selectors
11725 .replace(escapeRegex, '-')
11726
11727 // Remove extraneous hyphens at the start and end
11728 .replace(dashesAtEnds, '');
11729 }
11730
11731 //
11732
11733 function isTag(target) {
11734 return typeof target === 'string' && ( true ? target.charAt(0) === target.charAt(0).toLowerCase() : 0);
11735 }
11736
11737 //
11738
11739 function generateDisplayName(target) {
11740 // $FlowFixMe
11741 return isTag(target) ? 'styled.' + target : 'Styled(' + getComponentName(target) + ')';
11742 }
11743
11744 var _TYPE_STATICS;
11745
11746 var REACT_STATICS = {
11747 childContextTypes: true,
11748 contextTypes: true,
11749 defaultProps: true,
11750 displayName: true,
11751 getDerivedStateFromProps: true,
11752 propTypes: true,
11753 type: true
11754 };
11755
11756 var KNOWN_STATICS = {
11757 name: true,
11758 length: true,
11759 prototype: true,
11760 caller: true,
11761 callee: true,
11762 arguments: true,
11763 arity: true
11764 };
11765
11766 var TYPE_STATICS = (_TYPE_STATICS = {}, _TYPE_STATICS[react_is__WEBPACK_IMPORTED_MODULE_4__.ForwardRef] = {
11767 $$typeof: true,
11768 render: true
11769 }, _TYPE_STATICS);
11770
11771 var defineProperty$1 = Object.defineProperty,
11772 getOwnPropertyNames = Object.getOwnPropertyNames,
11773 _Object$getOwnPropert = Object.getOwnPropertySymbols,
11774 getOwnPropertySymbols = _Object$getOwnPropert === undefined ? function () {
11775 return [];
11776 } : _Object$getOwnPropert,
11777 getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor,
11778 getPrototypeOf = Object.getPrototypeOf,
11779 objectPrototype = Object.prototype;
11780 var arrayPrototype = Array.prototype;
11781
11782
11783 function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
11784 if (typeof sourceComponent !== 'string') {
11785 // don't hoist over string (html) components
11786
11787 var inheritedComponent = getPrototypeOf(sourceComponent);
11788
11789 if (inheritedComponent && inheritedComponent !== objectPrototype) {
11790 hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
11791 }
11792
11793 var keys = arrayPrototype.concat(getOwnPropertyNames(sourceComponent),
11794 // $FlowFixMe
11795 getOwnPropertySymbols(sourceComponent));
11796
11797 var targetStatics = TYPE_STATICS[targetComponent.$$typeof] || REACT_STATICS;
11798
11799 var sourceStatics = TYPE_STATICS[sourceComponent.$$typeof] || REACT_STATICS;
11800
11801 var i = keys.length;
11802 var descriptor = void 0;
11803 var key = void 0;
11804
11805 // eslint-disable-next-line no-plusplus
11806 while (i--) {
11807 key = keys[i];
11808
11809 if (
11810 // $FlowFixMe
11811 !KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) &&
11812 // $FlowFixMe
11813 !(targetStatics && targetStatics[key])) {
11814 descriptor = getOwnPropertyDescriptor(sourceComponent, key);
11815
11816 if (descriptor) {
11817 try {
11818 // Avoid failures from read-only properties
11819 defineProperty$1(targetComponent, key, descriptor);
11820 } catch (e) {
11821 /* fail silently */
11822 }
11823 }
11824 }
11825 }
11826
11827 return targetComponent;
11828 }
11829
11830 return targetComponent;
11831 }
11832
11833 //
11834 function isDerivedReactComponent(fn) {
11835 return !!(fn && fn.prototype && fn.prototype.isReactComponent);
11836 }
11837
11838 //
11839 // Helper to call a given function, only once
11840 var once = (function (cb) {
11841 var called = false;
11842
11843 return function () {
11844 if (!called) {
11845 called = true;
11846 cb.apply(undefined, arguments);
11847 }
11848 };
11849 });
11850
11851 //
11852
11853 var ThemeContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.createContext)();
11854
11855 var ThemeConsumer = ThemeContext.Consumer;
11856
11857 /**
11858 * Provide a theme to an entire react component tree via context
11859 */
11860
11861 var ThemeProvider = function (_Component) {
11862 inherits(ThemeProvider, _Component);
11863
11864 function ThemeProvider(props) {
11865 classCallCheck(this, ThemeProvider);
11866
11867 var _this = possibleConstructorReturn(this, _Component.call(this, props));
11868
11869 _this.getContext = (0,memoize_one__WEBPACK_IMPORTED_MODULE_7__["default"])(_this.getContext.bind(_this));
11870 _this.renderInner = _this.renderInner.bind(_this);
11871 return _this;
11872 }
11873
11874 ThemeProvider.prototype.render = function render() {
11875 if (!this.props.children) return null;
11876
11877 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
11878 ThemeContext.Consumer,
11879 null,
11880 this.renderInner
11881 );
11882 };
11883
11884 ThemeProvider.prototype.renderInner = function renderInner(outerTheme) {
11885 var context = this.getContext(this.props.theme, outerTheme);
11886
11887 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
11888 ThemeContext.Provider,
11889 { value: context },
11890 this.props.children
11891 );
11892 };
11893
11894 /**
11895 * Get the theme from the props, supporting both (outerTheme) => {}
11896 * as well as object notation
11897 */
11898
11899
11900 ThemeProvider.prototype.getTheme = function getTheme(theme, outerTheme) {
11901 if (isFunction(theme)) {
11902 var mergedTheme = theme(outerTheme);
11903
11904 if ( true && (mergedTheme === null || Array.isArray(mergedTheme) || (typeof mergedTheme === 'undefined' ? 'undefined' : _typeof(mergedTheme)) !== 'object')) {
11905 throw new StyledComponentsError(7);
11906 }
11907
11908 return mergedTheme;
11909 }
11910
11911 if (theme === null || Array.isArray(theme) || (typeof theme === 'undefined' ? 'undefined' : _typeof(theme)) !== 'object') {
11912 throw new StyledComponentsError(8);
11913 }
11914
11915 return _extends({}, outerTheme, theme);
11916 };
11917
11918 ThemeProvider.prototype.getContext = function getContext(theme, outerTheme) {
11919 return this.getTheme(theme, outerTheme);
11920 };
11921
11922 return ThemeProvider;
11923 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
11924
11925 //
11926
11927 var CLOSING_TAG_R = /^\s*<\/[a-z]/i;
11928
11929 var ServerStyleSheet = function () {
11930 function ServerStyleSheet() {
11931 classCallCheck(this, ServerStyleSheet);
11932
11933 /* The master sheet might be reset, so keep a reference here */
11934 this.masterSheet = StyleSheet.master;
11935 this.instance = this.masterSheet.clone();
11936 this.sealed = false;
11937 }
11938
11939 /**
11940 * Mark the ServerStyleSheet as being fully emitted and manually GC it from the
11941 * StyleSheet singleton.
11942 */
11943
11944
11945 ServerStyleSheet.prototype.seal = function seal() {
11946 if (!this.sealed) {
11947 /* Remove sealed StyleSheets from the master sheet */
11948 var index = this.masterSheet.clones.indexOf(this.instance);
11949 this.masterSheet.clones.splice(index, 1);
11950 this.sealed = true;
11951 }
11952 };
11953
11954 ServerStyleSheet.prototype.collectStyles = function collectStyles(children) {
11955 if (this.sealed) {
11956 throw new StyledComponentsError(2);
11957 }
11958
11959 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
11960 StyleSheetManager,
11961 { sheet: this.instance },
11962 children
11963 );
11964 };
11965
11966 ServerStyleSheet.prototype.getStyleTags = function getStyleTags() {
11967 this.seal();
11968 return this.instance.toHTML();
11969 };
11970
11971 ServerStyleSheet.prototype.getStyleElement = function getStyleElement() {
11972 this.seal();
11973 return this.instance.toReactElements();
11974 };
11975
11976 ServerStyleSheet.prototype.interleaveWithNodeStream = function interleaveWithNodeStream(readableStream) {
11977 var _this = this;
11978
11979 {
11980 throw new StyledComponentsError(3);
11981 }
11982
11983 /* the tag index keeps track of which tags have already been emitted */
11984 var instance = this.instance;
11985
11986 var instanceTagIndex = 0;
11987
11988 var streamAttr = SC_STREAM_ATTR + '="true"';
11989
11990 var transformer = new stream.Transform({
11991 transform: function appendStyleChunks(chunk, /* encoding */_, callback) {
11992 var tags = instance.tags;
11993
11994 var html = '';
11995
11996 /* retrieve html for each new style tag */
11997 for (; instanceTagIndex < tags.length; instanceTagIndex += 1) {
11998 var tag = tags[instanceTagIndex];
11999 html += tag.toHTML(streamAttr);
12000 }
12001
12002 /* force our StyleSheets to emit entirely new tags */
12003 instance.sealAllTags();
12004
12005 var renderedHtml = chunk.toString();
12006
12007 /* prepend style html to chunk, unless the start of the chunk is a closing tag in which case append right after that */
12008 if (CLOSING_TAG_R.test(renderedHtml)) {
12009 var endOfClosingTag = renderedHtml.indexOf('>');
12010
12011 this.push(renderedHtml.slice(0, endOfClosingTag + 1) + html + renderedHtml.slice(endOfClosingTag + 1));
12012 } else this.push(html + renderedHtml);
12013
12014 callback();
12015 }
12016 });
12017
12018 readableStream.on('end', function () {
12019 return _this.seal();
12020 });
12021
12022 readableStream.on('error', function (err) {
12023 _this.seal();
12024
12025 // forward the error to the transform stream
12026 transformer.emit('error', err);
12027 });
12028
12029 return readableStream.pipe(transformer);
12030 };
12031
12032 return ServerStyleSheet;
12033 }();
12034
12035 //
12036
12037 var StyleSheetContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.createContext)();
12038 var StyleSheetConsumer = StyleSheetContext.Consumer;
12039
12040 var StyleSheetManager = function (_Component) {
12041 inherits(StyleSheetManager, _Component);
12042
12043 function StyleSheetManager(props) {
12044 classCallCheck(this, StyleSheetManager);
12045
12046 var _this = possibleConstructorReturn(this, _Component.call(this, props));
12047
12048 _this.getContext = (0,memoize_one__WEBPACK_IMPORTED_MODULE_7__["default"])(_this.getContext);
12049 return _this;
12050 }
12051
12052 StyleSheetManager.prototype.getContext = function getContext(sheet, target) {
12053 if (sheet) {
12054 return sheet;
12055 } else if (target) {
12056 return new StyleSheet(target);
12057 } else {
12058 throw new StyledComponentsError(4);
12059 }
12060 };
12061
12062 StyleSheetManager.prototype.render = function render() {
12063 var _props = this.props,
12064 children = _props.children,
12065 sheet = _props.sheet,
12066 target = _props.target;
12067
12068
12069 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12070 StyleSheetContext.Provider,
12071 { value: this.getContext(sheet, target) },
12072 true ? react__WEBPACK_IMPORTED_MODULE_2___default().Children.only(children) : 0
12073 );
12074 };
12075
12076 return StyleSheetManager;
12077 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
12078 true ? StyleSheetManager.propTypes = {
12079 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)]),
12080
12081 target: prop_types__WEBPACK_IMPORTED_MODULE_8___default().shape({
12082 appendChild: (prop_types__WEBPACK_IMPORTED_MODULE_8___default().func.isRequired)
12083 })
12084 } : 0;
12085
12086 //
12087
12088 var identifiers = {};
12089
12090 /* We depend on components having unique IDs */
12091 function generateId(_ComponentStyle, _displayName, parentComponentId) {
12092 var displayName = typeof _displayName !== 'string' ? 'sc' : escape(_displayName);
12093
12094 /**
12095 * This ensures uniqueness if two components happen to share
12096 * the same displayName.
12097 */
12098 var nr = (identifiers[displayName] || 0) + 1;
12099 identifiers[displayName] = nr;
12100
12101 var componentId = displayName + '-' + _ComponentStyle.generateName(displayName + nr);
12102
12103 return parentComponentId ? parentComponentId + '-' + componentId : componentId;
12104 }
12105
12106 // $FlowFixMe
12107
12108 var StyledComponent = function (_Component) {
12109 inherits(StyledComponent, _Component);
12110
12111 function StyledComponent() {
12112 classCallCheck(this, StyledComponent);
12113
12114 var _this = possibleConstructorReturn(this, _Component.call(this));
12115
12116 _this.attrs = {};
12117
12118 _this.renderOuter = _this.renderOuter.bind(_this);
12119 _this.renderInner = _this.renderInner.bind(_this);
12120
12121 if (true) {
12122 _this.warnInnerRef = once(function (displayName) {
12123 return (
12124 // eslint-disable-next-line no-console
12125 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 + '".')
12126 );
12127 });
12128
12129 _this.warnAttrsFnObjectKeyDeprecated = once(function (key, displayName) {
12130 return (
12131 // eslint-disable-next-line no-console
12132 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)
12133 );
12134 });
12135
12136 _this.warnNonStyledComponentAttrsObjectKey = once(function (key, displayName) {
12137 return (
12138 // eslint-disable-next-line no-console
12139 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 }'))
12140 );
12141 });
12142 }
12143 return _this;
12144 }
12145
12146 StyledComponent.prototype.render = function render() {
12147 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12148 StyleSheetConsumer,
12149 null,
12150 this.renderOuter
12151 );
12152 };
12153
12154 StyledComponent.prototype.renderOuter = function renderOuter() {
12155 var styleSheet = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : StyleSheet.master;
12156
12157 this.styleSheet = styleSheet;
12158
12159 // No need to subscribe a static component to theme changes, it won't change anything
12160 if (this.props.forwardedComponent.componentStyle.isStatic) return this.renderInner();
12161
12162 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12163 ThemeConsumer,
12164 null,
12165 this.renderInner
12166 );
12167 };
12168
12169 StyledComponent.prototype.renderInner = function renderInner(theme) {
12170 var _props$forwardedCompo = this.props.forwardedComponent,
12171 componentStyle = _props$forwardedCompo.componentStyle,
12172 defaultProps = _props$forwardedCompo.defaultProps,
12173 displayName = _props$forwardedCompo.displayName,
12174 foldedComponentIds = _props$forwardedCompo.foldedComponentIds,
12175 styledComponentId = _props$forwardedCompo.styledComponentId,
12176 target = _props$forwardedCompo.target;
12177
12178
12179 var generatedClassName = void 0;
12180 if (componentStyle.isStatic) {
12181 generatedClassName = this.generateAndInjectStyles(EMPTY_OBJECT, this.props);
12182 } else {
12183 generatedClassName = this.generateAndInjectStyles(determineTheme(this.props, theme, defaultProps) || EMPTY_OBJECT, this.props);
12184 }
12185
12186 var elementToBeCreated = this.props.as || this.attrs.as || target;
12187 var isTargetTag = isTag(elementToBeCreated);
12188
12189 var propsForElement = {};
12190 var computedProps = _extends({}, this.props, this.attrs);
12191
12192 var key = void 0;
12193 // eslint-disable-next-line guard-for-in
12194 for (key in computedProps) {
12195 if ( true && key === 'innerRef' && isTargetTag) {
12196 this.warnInnerRef(displayName);
12197 }
12198
12199 if (key === 'forwardedComponent' || key === 'as') {
12200 continue;
12201 } 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)) {
12202 // Don't pass through non HTML tags through to HTML elements
12203 propsForElement[key] = computedProps[key];
12204 }
12205 }
12206
12207 if (this.props.style && this.attrs.style) {
12208 propsForElement.style = _extends({}, this.attrs.style, this.props.style);
12209 }
12210
12211 propsForElement.className = Array.prototype.concat(foldedComponentIds, styledComponentId, generatedClassName !== styledComponentId ? generatedClassName : null, this.props.className, this.attrs.className).filter(Boolean).join(' ');
12212
12213 return (0,react__WEBPACK_IMPORTED_MODULE_2__.createElement)(elementToBeCreated, propsForElement);
12214 };
12215
12216 StyledComponent.prototype.buildExecutionContext = function buildExecutionContext(theme, props, attrs) {
12217 var _this2 = this;
12218
12219 var context = _extends({}, props, { theme: theme });
12220
12221 if (!attrs.length) return context;
12222
12223 this.attrs = {};
12224
12225 attrs.forEach(function (attrDef) {
12226 var resolvedAttrDef = attrDef;
12227 var attrDefWasFn = false;
12228 var attr = void 0;
12229 var key = void 0;
12230
12231 if (isFunction(resolvedAttrDef)) {
12232 // $FlowFixMe
12233 resolvedAttrDef = resolvedAttrDef(context);
12234 attrDefWasFn = true;
12235 }
12236
12237 /* eslint-disable guard-for-in */
12238 // $FlowFixMe
12239 for (key in resolvedAttrDef) {
12240 attr = resolvedAttrDef[key];
12241
12242 if (!attrDefWasFn) {
12243 if (isFunction(attr) && !isDerivedReactComponent(attr) && !isStyledComponent(attr)) {
12244 if (true) {
12245 _this2.warnAttrsFnObjectKeyDeprecated(key, props.forwardedComponent.displayName);
12246 }
12247
12248 attr = attr(context);
12249
12250 if ( true && react__WEBPACK_IMPORTED_MODULE_2___default().isValidElement(attr)) {
12251 _this2.warnNonStyledComponentAttrsObjectKey(key, props.forwardedComponent.displayName);
12252 }
12253 }
12254 }
12255
12256 _this2.attrs[key] = attr;
12257 context[key] = attr;
12258 }
12259 /* eslint-enable */
12260 });
12261
12262 return context;
12263 };
12264
12265 StyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) {
12266 var _props$forwardedCompo2 = props.forwardedComponent,
12267 attrs = _props$forwardedCompo2.attrs,
12268 componentStyle = _props$forwardedCompo2.componentStyle,
12269 warnTooManyClasses = _props$forwardedCompo2.warnTooManyClasses;
12270
12271 // statically styled-components don't need to build an execution context object,
12272 // and shouldn't be increasing the number of class names
12273
12274 if (componentStyle.isStatic && !attrs.length) {
12275 return componentStyle.generateAndInjectStyles(EMPTY_OBJECT, this.styleSheet);
12276 }
12277
12278 var className = componentStyle.generateAndInjectStyles(this.buildExecutionContext(theme, props, attrs), this.styleSheet);
12279
12280 if ( true && warnTooManyClasses) warnTooManyClasses(className);
12281
12282 return className;
12283 };
12284
12285 return StyledComponent;
12286 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
12287
12288 function createStyledComponent(target, options, rules) {
12289 var isTargetStyledComp = isStyledComponent(target);
12290 var isClass = !isTag(target);
12291
12292 var _options$displayName = options.displayName,
12293 displayName = _options$displayName === undefined ? generateDisplayName(target) : _options$displayName,
12294 _options$componentId = options.componentId,
12295 componentId = _options$componentId === undefined ? generateId(ComponentStyle, options.displayName, options.parentComponentId) : _options$componentId,
12296 _options$ParentCompon = options.ParentComponent,
12297 ParentComponent = _options$ParentCompon === undefined ? StyledComponent : _options$ParentCompon,
12298 _options$attrs = options.attrs,
12299 attrs = _options$attrs === undefined ? EMPTY_ARRAY : _options$attrs;
12300
12301
12302 var styledComponentId = options.displayName && options.componentId ? escape(options.displayName) + '-' + options.componentId : options.componentId || componentId;
12303
12304 // fold the underlying StyledComponent attrs up (implicit extend)
12305 var finalAttrs =
12306 // $FlowFixMe
12307 isTargetStyledComp && target.attrs ? Array.prototype.concat(target.attrs, attrs).filter(Boolean) : attrs;
12308
12309 var componentStyle = new ComponentStyle(isTargetStyledComp ? // fold the underlying StyledComponent rules up (implicit extend)
12310 // $FlowFixMe
12311 target.componentStyle.rules.concat(rules) : rules, finalAttrs, styledComponentId);
12312
12313 /**
12314 * forwardRef creates a new interim component, which we'll take advantage of
12315 * instead of extending ParentComponent to create _another_ interim class
12316 */
12317 var WrappedStyledComponent = void 0;
12318 var forwardRef = function forwardRef(props, ref) {
12319 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ParentComponent, _extends({}, props, { forwardedComponent: WrappedStyledComponent, forwardedRef: ref }));
12320 };
12321 forwardRef.displayName = displayName;
12322 WrappedStyledComponent = react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(forwardRef);
12323 WrappedStyledComponent.displayName = displayName;
12324
12325 // $FlowFixMe
12326 WrappedStyledComponent.attrs = finalAttrs;
12327 // $FlowFixMe
12328 WrappedStyledComponent.componentStyle = componentStyle;
12329
12330 // $FlowFixMe
12331 WrappedStyledComponent.foldedComponentIds = isTargetStyledComp ? // $FlowFixMe
12332 Array.prototype.concat(target.foldedComponentIds, target.styledComponentId) : EMPTY_ARRAY;
12333
12334 // $FlowFixMe
12335 WrappedStyledComponent.styledComponentId = styledComponentId;
12336
12337 // fold the underlying StyledComponent target up since we folded the styles
12338 // $FlowFixMe
12339 WrappedStyledComponent.target = isTargetStyledComp ? target.target : target;
12340
12341 // $FlowFixMe
12342 WrappedStyledComponent.withComponent = function withComponent(tag) {
12343 var previousComponentId = options.componentId,
12344 optionsToCopy = objectWithoutProperties(options, ['componentId']);
12345
12346
12347 var newComponentId = previousComponentId && previousComponentId + '-' + (isTag(tag) ? tag : escape(getComponentName(tag)));
12348
12349 var newOptions = _extends({}, optionsToCopy, {
12350 attrs: finalAttrs,
12351 componentId: newComponentId,
12352 ParentComponent: ParentComponent
12353 });
12354
12355 return createStyledComponent(tag, newOptions, rules);
12356 };
12357
12358 // $FlowFixMe
12359 Object.defineProperty(WrappedStyledComponent, 'defaultProps', {
12360 get: function get$$1() {
12361 return this._foldedDefaultProps;
12362 },
12363 set: function set$$1(obj) {
12364 // $FlowFixMe
12365 this._foldedDefaultProps = isTargetStyledComp ? (0,merge_anything__WEBPACK_IMPORTED_MODULE_6__["default"])(target.defaultProps, obj) : obj;
12366 }
12367 });
12368
12369 if (true) {
12370 // $FlowFixMe
12371 WrappedStyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName);
12372 }
12373
12374 // $FlowFixMe
12375 WrappedStyledComponent.toString = function () {
12376 return '.' + WrappedStyledComponent.styledComponentId;
12377 };
12378
12379 if (isClass) {
12380 hoistNonReactStatics(WrappedStyledComponent, target, {
12381 // all SC-specific things should not be hoisted
12382 attrs: true,
12383 componentStyle: true,
12384 displayName: true,
12385 foldedComponentIds: true,
12386 styledComponentId: true,
12387 target: true,
12388 withComponent: true
12389 });
12390 }
12391
12392 return WrappedStyledComponent;
12393 }
12394
12395 //
12396 // Thanks to ReactDOMFactories for this handy list!
12397
12398 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',
12399
12400 // SVG
12401 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'marker', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
12402
12403 //
12404
12405 var styled = function styled(tag) {
12406 return constructWithOptions(createStyledComponent, tag);
12407 };
12408
12409 // Shorthands for all valid HTML Elements
12410 domElements.forEach(function (domElement) {
12411 styled[domElement] = styled(domElement);
12412 });
12413
12414 //
12415
12416 var GlobalStyle = function () {
12417 function GlobalStyle(rules, componentId) {
12418 classCallCheck(this, GlobalStyle);
12419
12420 this.rules = rules;
12421 this.componentId = componentId;
12422 this.isStatic = isStaticRules(rules, EMPTY_ARRAY);
12423
12424 if (!StyleSheet.master.hasId(componentId)) {
12425 StyleSheet.master.deferredInject(componentId, []);
12426 }
12427 }
12428
12429 GlobalStyle.prototype.createStyles = function createStyles(executionContext, styleSheet) {
12430 var flatCSS = flatten(this.rules, executionContext, styleSheet);
12431 var css = stringifyRules(flatCSS, '');
12432
12433 styleSheet.inject(this.componentId, css);
12434 };
12435
12436 GlobalStyle.prototype.removeStyles = function removeStyles(styleSheet) {
12437 var componentId = this.componentId;
12438
12439 if (styleSheet.hasId(componentId)) {
12440 styleSheet.remove(componentId);
12441 }
12442 };
12443
12444 // TODO: overwrite in-place instead of remove+create?
12445
12446
12447 GlobalStyle.prototype.renderStyles = function renderStyles(executionContext, styleSheet) {
12448 this.removeStyles(styleSheet);
12449 this.createStyles(executionContext, styleSheet);
12450 };
12451
12452 return GlobalStyle;
12453 }();
12454
12455 //
12456
12457 // place our cache into shared context so it'll persist between HMRs
12458 if (IS_BROWSER) {
12459 window.scCGSHMRCache = {};
12460 }
12461
12462 function createGlobalStyle(strings) {
12463 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12464 interpolations[_key - 1] = arguments[_key];
12465 }
12466
12467 var rules = css.apply(undefined, [strings].concat(interpolations));
12468 var id = 'sc-global-' + murmurhash(JSON.stringify(rules));
12469 var style = new GlobalStyle(rules, id);
12470
12471 var GlobalStyleComponent = function (_React$Component) {
12472 inherits(GlobalStyleComponent, _React$Component);
12473
12474 function GlobalStyleComponent(props) {
12475 classCallCheck(this, GlobalStyleComponent);
12476
12477 var _this = possibleConstructorReturn(this, _React$Component.call(this, props));
12478
12479 var _this$constructor = _this.constructor,
12480 globalStyle = _this$constructor.globalStyle,
12481 styledComponentId = _this$constructor.styledComponentId;
12482
12483
12484 if (IS_BROWSER) {
12485 window.scCGSHMRCache[styledComponentId] = (window.scCGSHMRCache[styledComponentId] || 0) + 1;
12486 }
12487
12488 /**
12489 * This fixes HMR compatibility. Don't ask me why, but this combination of
12490 * caching the closure variables via statics and then persisting the statics in
12491 * state works across HMR where no other combination did. ¯\_(ツ)_/¯
12492 */
12493 _this.state = {
12494 globalStyle: globalStyle,
12495 styledComponentId: styledComponentId
12496 };
12497 return _this;
12498 }
12499
12500 GlobalStyleComponent.prototype.componentWillUnmount = function componentWillUnmount() {
12501 if (window.scCGSHMRCache[this.state.styledComponentId]) {
12502 window.scCGSHMRCache[this.state.styledComponentId] -= 1;
12503 }
12504 /**
12505 * Depending on the order "render" is called this can cause the styles to be lost
12506 * until the next render pass of the remaining instance, which may
12507 * not be immediate.
12508 */
12509 if (window.scCGSHMRCache[this.state.styledComponentId] === 0) {
12510 this.state.globalStyle.removeStyles(this.styleSheet);
12511 }
12512 };
12513
12514 GlobalStyleComponent.prototype.render = function render() {
12515 var _this2 = this;
12516
12517 if ( true && react__WEBPACK_IMPORTED_MODULE_2___default().Children.count(this.props.children)) {
12518 // eslint-disable-next-line no-console
12519 console.warn('The global style component ' + this.state.styledComponentId + ' was given child JSX. createGlobalStyle does not render children.');
12520 }
12521
12522 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12523 StyleSheetConsumer,
12524 null,
12525 function (styleSheet) {
12526 _this2.styleSheet = styleSheet || StyleSheet.master;
12527
12528 var globalStyle = _this2.state.globalStyle;
12529
12530
12531 if (globalStyle.isStatic) {
12532 globalStyle.renderStyles(STATIC_EXECUTION_CONTEXT, _this2.styleSheet);
12533
12534 return null;
12535 } else {
12536 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12537 ThemeConsumer,
12538 null,
12539 function (theme) {
12540 // $FlowFixMe
12541 var defaultProps = _this2.constructor.defaultProps;
12542
12543
12544 var context = _extends({}, _this2.props);
12545
12546 if (typeof theme !== 'undefined') {
12547 context.theme = determineTheme(_this2.props, theme, defaultProps);
12548 }
12549
12550 globalStyle.renderStyles(context, _this2.styleSheet);
12551
12552 return null;
12553 }
12554 );
12555 }
12556 }
12557 );
12558 };
12559
12560 return GlobalStyleComponent;
12561 }((react__WEBPACK_IMPORTED_MODULE_2___default().Component));
12562
12563 GlobalStyleComponent.globalStyle = style;
12564 GlobalStyleComponent.styledComponentId = id;
12565
12566
12567 return GlobalStyleComponent;
12568 }
12569
12570 //
12571
12572 var replaceWhitespace = function replaceWhitespace(str) {
12573 return str.replace(/\s|\\n/g, '');
12574 };
12575
12576 function keyframes(strings) {
12577 /* Warning if you've used keyframes on React Native */
12578 if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
12579 // eslint-disable-next-line no-console
12580 console.warn('`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.');
12581 }
12582
12583 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12584 interpolations[_key - 1] = arguments[_key];
12585 }
12586
12587 var rules = css.apply(undefined, [strings].concat(interpolations));
12588
12589 var name = generateAlphabeticName(murmurhash(replaceWhitespace(JSON.stringify(rules))));
12590
12591 return new Keyframes(name, stringifyRules(rules, name, '@keyframes'));
12592 }
12593
12594 //
12595
12596 var withTheme = (function (Component$$1) {
12597 var WithTheme = react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(function (props, ref) {
12598 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12599 ThemeConsumer,
12600 null,
12601 function (theme) {
12602 // $FlowFixMe
12603 var defaultProps = Component$$1.defaultProps;
12604
12605 var themeProp = determineTheme(props, theme, defaultProps);
12606
12607 if ( true && themeProp === undefined) {
12608 // eslint-disable-next-line no-console
12609 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) + '"');
12610 }
12611
12612 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(Component$$1, _extends({}, props, { theme: themeProp, ref: ref }));
12613 }
12614 );
12615 });
12616
12617 hoistNonReactStatics(WithTheme, Component$$1);
12618
12619 WithTheme.displayName = 'WithTheme(' + getComponentName(Component$$1) + ')';
12620
12621 return WithTheme;
12622 });
12623
12624 //
12625
12626 /* eslint-disable */
12627 var __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS = {
12628 StyleSheet: StyleSheet
12629 };
12630
12631 //
12632
12633 /* Warning if you've imported this file on React Native */
12634 if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
12635 // eslint-disable-next-line no-console
12636 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');
12637 }
12638
12639 /* Warning if there are several instances of styled-components */
12640 if ( true && typeof window !== 'undefined' && typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Node.js') === -1 && navigator.userAgent.indexOf('jsdom') === -1) {
12641 window['__styled-components-init__'] = window['__styled-components-init__'] || 0;
12642
12643 if (window['__styled-components-init__'] === 1) {
12644 // eslint-disable-next-line no-console
12645 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.');
12646 }
12647
12648 window['__styled-components-init__'] += 1;
12649 }
12650
12651 //
12652
12653 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (styled);
12654
12655 //# sourceMappingURL=styled-components.browser.esm.js.map
12656
12657
12658 /***/ }),
12659
12660 /***/ "./node_modules/stylis-rule-sheet/index.js":
12661 /*!*************************************************!*\
12662 !*** ./node_modules/stylis-rule-sheet/index.js ***!
12663 \*************************************************/
12664 /***/ ((module) => {
12665
12666 (function (factory) {
12667 true ? (module['exports'] = factory()) :
12668 0
12669 }(function () {
12670
12671 'use strict'
12672
12673 return function (insertRule) {
12674 var delimiter = '/*|*/'
12675 var needle = delimiter+'}'
12676
12677 function toSheet (block) {
12678 if (block)
12679 try {
12680 insertRule(block + '}')
12681 } catch (e) {}
12682 }
12683
12684 return function ruleSheet (context, content, selectors, parents, line, column, length, ns, depth, at) {
12685 switch (context) {
12686 // property
12687 case 1:
12688 // @import
12689 if (depth === 0 && content.charCodeAt(0) === 64)
12690 return insertRule(content+';'), ''
12691 break
12692 // selector
12693 case 2:
12694 if (ns === 0)
12695 return content + delimiter
12696 break
12697 // at-rule
12698 case 3:
12699 switch (ns) {
12700 // @font-face, @page
12701 case 102:
12702 case 112:
12703 return insertRule(selectors[0]+content), ''
12704 default:
12705 return content + (at === 0 ? delimiter : '')
12706 }
12707 case -2:
12708 content.split(needle).forEach(toSheet)
12709 }
12710 }
12711 }
12712 }))
12713
12714
12715 /***/ }),
12716
12717 /***/ "./node_modules/stylis/stylis.min.js":
12718 /*!*******************************************!*\
12719 !*** ./node_modules/stylis/stylis.min.js ***!
12720 \*******************************************/
12721 /***/ ((module) => {
12722
12723 !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});
12724 //# sourceMappingURL=stylis.min.js.map
12725
12726 /***/ }),
12727
12728 /***/ "react":
12729 /*!************************!*\
12730 !*** external "React" ***!
12731 \************************/
12732 /***/ ((module) => {
12733
12734 "use strict";
12735 module.exports = window["React"];
12736
12737 /***/ }),
12738
12739 /***/ "jquery":
12740 /*!*************************!*\
12741 !*** external "jQuery" ***!
12742 \*************************/
12743 /***/ ((module) => {
12744
12745 "use strict";
12746 module.exports = window["jQuery"];
12747
12748 /***/ }),
12749
12750 /***/ "@wordpress/block-editor":
12751 /*!*************************************!*\
12752 !*** external ["wp","blockEditor"] ***!
12753 \*************************************/
12754 /***/ ((module) => {
12755
12756 "use strict";
12757 module.exports = window["wp"]["blockEditor"];
12758
12759 /***/ }),
12760
12761 /***/ "@wordpress/blocks":
12762 /*!********************************!*\
12763 !*** external ["wp","blocks"] ***!
12764 \********************************/
12765 /***/ ((module) => {
12766
12767 "use strict";
12768 module.exports = window["wp"]["blocks"];
12769
12770 /***/ }),
12771
12772 /***/ "@wordpress/components":
12773 /*!************************************!*\
12774 !*** external ["wp","components"] ***!
12775 \************************************/
12776 /***/ ((module) => {
12777
12778 "use strict";
12779 module.exports = window["wp"]["components"];
12780
12781 /***/ }),
12782
12783 /***/ "@wordpress/data":
12784 /*!******************************!*\
12785 !*** external ["wp","data"] ***!
12786 \******************************/
12787 /***/ ((module) => {
12788
12789 "use strict";
12790 module.exports = window["wp"]["data"];
12791
12792 /***/ }),
12793
12794 /***/ "@wordpress/edit-post":
12795 /*!**********************************!*\
12796 !*** external ["wp","editPost"] ***!
12797 \**********************************/
12798 /***/ ((module) => {
12799
12800 "use strict";
12801 module.exports = window["wp"]["editPost"];
12802
12803 /***/ }),
12804
12805 /***/ "@wordpress/element":
12806 /*!*********************************!*\
12807 !*** external ["wp","element"] ***!
12808 \*********************************/
12809 /***/ ((module) => {
12810
12811 "use strict";
12812 module.exports = window["wp"]["element"];
12813
12814 /***/ }),
12815
12816 /***/ "@wordpress/i18n":
12817 /*!******************************!*\
12818 !*** external ["wp","i18n"] ***!
12819 \******************************/
12820 /***/ ((module) => {
12821
12822 "use strict";
12823 module.exports = window["wp"]["i18n"];
12824
12825 /***/ }),
12826
12827 /***/ "@wordpress/plugins":
12828 /*!*********************************!*\
12829 !*** external ["wp","plugins"] ***!
12830 \*********************************/
12831 /***/ ((module) => {
12832
12833 "use strict";
12834 module.exports = window["wp"]["plugins"];
12835
12836 /***/ }),
12837
12838 /***/ "./node_modules/@linaria/react/dist/index.mjs":
12839 /*!****************************************************!*\
12840 !*** ./node_modules/@linaria/react/dist/index.mjs ***!
12841 \****************************************************/
12842 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12843
12844 "use strict";
12845 __webpack_require__.r(__webpack_exports__);
12846 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12847 /* harmony export */ "styled": () => (/* binding */ styled_default)
12848 /* harmony export */ });
12849 /* 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");
12850 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
12851 /* harmony import */ var _linaria_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @linaria/core */ "./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs");
12852 // src/styled.ts
12853
12854
12855
12856 var isCapital = (ch) => ch.toUpperCase() === ch;
12857 var filterKey = (keys) => (key) => keys.indexOf(key) === -1;
12858 var omit = (obj, keys) => {
12859 const res = {};
12860 Object.keys(obj).filter(filterKey(keys)).forEach((key) => {
12861 res[key] = obj[key];
12862 });
12863 return res;
12864 };
12865 function filterProps(asIs, props, omitKeys) {
12866 const filteredProps = omit(props, omitKeys);
12867 if (!asIs) {
12868 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"];
12869 Object.keys(filteredProps).forEach((key) => {
12870 if (!interopValidAttr.default(key)) {
12871 delete filteredProps[key];
12872 }
12873 });
12874 }
12875 return filteredProps;
12876 }
12877 var warnIfInvalid = (value, componentName) => {
12878 if (true) {
12879 if (typeof value === "string" || typeof value === "number" && isFinite(value)) {
12880 return;
12881 }
12882 const stringified = typeof value === "object" ? JSON.stringify(value) : String(value);
12883 console.warn(
12884 `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.`
12885 );
12886 }
12887 };
12888 function styled(tag) {
12889 return (options) => {
12890 if (true) {
12891 if (Array.isArray(options)) {
12892 throw new Error(
12893 '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'
12894 );
12895 }
12896 }
12897 const render = (props, ref) => {
12898 const { as: component = tag, class: className } = props;
12899 const shouldKeepProps = options.propsAsIs === void 0 ? !(typeof component === "string" && component.indexOf("-") === -1 && !isCapital(component[0])) : options.propsAsIs;
12900 const filteredProps = filterProps(shouldKeepProps, props, [
12901 "as",
12902 "class"
12903 ]);
12904 filteredProps.ref = ref;
12905 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);
12906 const { vars } = options;
12907 if (vars) {
12908 const style = {};
12909 for (const name in vars) {
12910 const variable = vars[name];
12911 const result = variable[0];
12912 const unit = variable[1] || "";
12913 const value = typeof result === "function" ? result(props) : result;
12914 warnIfInvalid(value, options.name);
12915 style[`--${name}`] = `${value}${unit}`;
12916 }
12917 const ownStyle = filteredProps.style || {};
12918 const keys = Object.keys(ownStyle);
12919 if (keys.length > 0) {
12920 keys.forEach((key) => {
12921 style[key] = ownStyle[key];
12922 });
12923 }
12924 filteredProps.style = style;
12925 }
12926 if (tag.__linaria && tag !== component) {
12927 filteredProps.as = component;
12928 return react__WEBPACK_IMPORTED_MODULE_1__.createElement(tag, filteredProps);
12929 }
12930 return react__WEBPACK_IMPORTED_MODULE_1__.createElement(component, filteredProps);
12931 };
12932 const Result = react__WEBPACK_IMPORTED_MODULE_1__.forwardRef ? react__WEBPACK_IMPORTED_MODULE_1__.forwardRef(render) : (props) => {
12933 const rest = omit(props, ["innerRef"]);
12934 return render(rest, props.innerRef);
12935 };
12936 Result.displayName = options.name;
12937 Result.__linaria = {
12938 className: options.class,
12939 extends: tag
12940 };
12941 return Result;
12942 };
12943 }
12944 var styled_default = true ? new Proxy(styled, {
12945 get(o, prop) {
12946 return o(prop);
12947 }
12948 }) : 0;
12949
12950 //# sourceMappingURL=index.mjs.map
12951
12952 /***/ }),
12953
12954 /***/ "./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs":
12955 /*!*******************************************************************************!*\
12956 !*** ./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs ***!
12957 \*******************************************************************************/
12958 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12959
12960 "use strict";
12961 __webpack_require__.r(__webpack_exports__);
12962 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12963 /* harmony export */ "css": () => (/* binding */ css_default),
12964 /* harmony export */ "cx": () => (/* binding */ cx_default)
12965 /* harmony export */ });
12966 // src/css.ts
12967 var css = () => {
12968 throw new Error(
12969 'Using the "css" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly.'
12970 );
12971 };
12972 var css_default = css;
12973
12974 // src/cx.ts
12975 var cx = function cx2() {
12976 const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
12977 const atomicClasses = {};
12978 const nonAtomicClasses = [];
12979 presentClassNames.forEach((arg) => {
12980 const individualClassNames = arg ? arg.split(" ") : [];
12981 individualClassNames.forEach((className) => {
12982 if (className.startsWith("atm_")) {
12983 const [, keyHash] = className.split("_");
12984 atomicClasses[keyHash] = className;
12985 } else {
12986 nonAtomicClasses.push(className);
12987 }
12988 });
12989 });
12990 const result = [];
12991 for (const keyHash in atomicClasses) {
12992 if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
12993 result.push(atomicClasses[keyHash]);
12994 }
12995 }
12996 result.push(...nonAtomicClasses);
12997 return result.join(" ");
12998 };
12999 var cx_default = cx;
13000
13001 //# sourceMappingURL=index.mjs.map
13002
13003 /***/ })
13004
13005 /******/ });
13006 /************************************************************************/
13007 /******/ // The module cache
13008 /******/ var __webpack_module_cache__ = {};
13009 /******/
13010 /******/ // The require function
13011 /******/ function __webpack_require__(moduleId) {
13012 /******/ // Check if module is in cache
13013 /******/ var cachedModule = __webpack_module_cache__[moduleId];
13014 /******/ if (cachedModule !== undefined) {
13015 /******/ return cachedModule.exports;
13016 /******/ }
13017 /******/ // Create a new module (and put it into the cache)
13018 /******/ var module = __webpack_module_cache__[moduleId] = {
13019 /******/ // no module.id needed
13020 /******/ // no module.loaded needed
13021 /******/ exports: {}
13022 /******/ };
13023 /******/
13024 /******/ // Execute the module function
13025 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
13026 /******/
13027 /******/ // Return the exports of the module
13028 /******/ return module.exports;
13029 /******/ }
13030 /******/
13031 /************************************************************************/
13032 /******/ /* webpack/runtime/compat get default export */
13033 /******/ (() => {
13034 /******/ // getDefaultExport function for compatibility with non-harmony modules
13035 /******/ __webpack_require__.n = (module) => {
13036 /******/ var getter = module && module.__esModule ?
13037 /******/ () => (module['default']) :
13038 /******/ () => (module);
13039 /******/ __webpack_require__.d(getter, { a: getter });
13040 /******/ return getter;
13041 /******/ };
13042 /******/ })();
13043 /******/
13044 /******/ /* webpack/runtime/define property getters */
13045 /******/ (() => {
13046 /******/ // define getter functions for harmony exports
13047 /******/ __webpack_require__.d = (exports, definition) => {
13048 /******/ for(var key in definition) {
13049 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
13050 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
13051 /******/ }
13052 /******/ }
13053 /******/ };
13054 /******/ })();
13055 /******/
13056 /******/ /* webpack/runtime/global */
13057 /******/ (() => {
13058 /******/ __webpack_require__.g = (function() {
13059 /******/ if (typeof globalThis === 'object') return globalThis;
13060 /******/ try {
13061 /******/ return this || new Function('return this')();
13062 /******/ } catch (e) {
13063 /******/ if (typeof window === 'object') return window;
13064 /******/ }
13065 /******/ })();
13066 /******/ })();
13067 /******/
13068 /******/ /* webpack/runtime/hasOwnProperty shorthand */
13069 /******/ (() => {
13070 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
13071 /******/ })();
13072 /******/
13073 /******/ /* webpack/runtime/make namespace object */
13074 /******/ (() => {
13075 /******/ // define __esModule on exports
13076 /******/ __webpack_require__.r = (exports) => {
13077 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
13078 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
13079 /******/ }
13080 /******/ Object.defineProperty(exports, '__esModule', { value: true });
13081 /******/ };
13082 /******/ })();
13083 /******/
13084 /******/ /* webpack/runtime/nonce */
13085 /******/ (() => {
13086 /******/ __webpack_require__.nc = undefined;
13087 /******/ })();
13088 /******/
13089 /************************************************************************/
13090 var __webpack_exports__ = {};
13091 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
13092 (() => {
13093 "use strict";
13094 /*!**************************************!*\
13095 !*** ./scripts/entries/gutenberg.ts ***!
13096 \**************************************/
13097 __webpack_require__.r(__webpack_exports__);
13098 /* harmony import */ var _gutenberg_FormBlock_registerFormBlock__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../gutenberg/FormBlock/registerFormBlock */ "./scripts/gutenberg/FormBlock/registerFormBlock.tsx");
13099 /* harmony import */ var _gutenberg_Sidebar_contentType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../gutenberg/Sidebar/contentType */ "./scripts/gutenberg/Sidebar/contentType.tsx");
13100 /* harmony import */ var _gutenberg_MeetingsBlock_registerMeetingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../gutenberg/MeetingsBlock/registerMeetingBlock */ "./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx");
13101 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
13102
13103
13104
13105
13106 (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]);
13107 })();
13108
13109 /******/ })()
13110 ;
13111 //# sourceMappingURL=gutenberg.js.map