| @@ -1,489 +1,691 @@ | ||
| 1 | +/*! elementor - v3.23.0 - 08-07-2024 */ | |
| 1 | 2 | /******/ (() => { // webpackBootstrap |
| 2 | 3 | /******/ var __webpack_modules__ = ({ |
| 3 | 4 | |
| 4 | -/***/ "../assets/dev/js/editor/utils/editor-one-events.js": | |
| 5 | -/*!**********************************************************!*\ | |
| 6 | - !*** ../assets/dev/js/editor/utils/editor-one-events.js ***! | |
| 7 | - \**********************************************************/ | |
| 8 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 5 | +/***/ "../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js": | |
| 6 | +/*!********************************************************************************!*\ | |
| 7 | + !*** ../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js ***! | |
| 8 | + \********************************************************************************/ | |
| 9 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 9 | 10 | |
| 10 | 11 | "use strict"; |
| 12 | +__webpack_require__.r(__webpack_exports__); | |
| 13 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 14 | +/* harmony export */ "default": () => (/* binding */ isPropValid) | |
| 15 | +/* harmony export */ }); | |
| 16 | +/* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ "../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js"); | |
| 11 | 17 | |
| 12 | 18 | |
| 13 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 14 | -Object.defineProperty(exports, "__esModule", ({ | |
| 15 | - value: true | |
| 16 | -})); | |
| 17 | -exports["default"] = exports.createDebouncedWidgetPanelSearch = exports.createDebouncedFinderSearch = exports.EditorOneEventManager = void 0; | |
| 18 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 19 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 20 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 21 | -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 22 | -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 23 | -var EditorOneEventManager = exports.EditorOneEventManager = /*#__PURE__*/function () { | |
| 24 | - function EditorOneEventManager() { | |
| 25 | - (0, _classCallCheck2.default)(this, EditorOneEventManager); | |
| 26 | - } | |
| 27 | - return (0, _createClass2.default)(EditorOneEventManager, null, [{ | |
| 28 | - key: "getEventsManager", | |
| 29 | - value: function getEventsManager() { | |
| 30 | - var _elementorCommon; | |
| 31 | - return (_elementorCommon = elementorCommon) === null || _elementorCommon === void 0 ? void 0 : _elementorCommon.eventsManager; | |
| 32 | - } | |
| 33 | - }, { | |
| 34 | - key: "getConfig", | |
| 35 | - value: function getConfig() { | |
| 36 | - var _this$getEventsManage; | |
| 37 | - return (_this$getEventsManage = this.getEventsManager()) === null || _this$getEventsManage === void 0 ? void 0 : _this$getEventsManage.config; | |
| 38 | - } | |
| 39 | - }, { | |
| 40 | - key: "canSendEvents", | |
| 41 | - value: function canSendEvents() { | |
| 42 | - var _elementorCommon2; | |
| 43 | - return ((_elementorCommon2 = elementorCommon) === null || _elementorCommon2 === void 0 || (_elementorCommon2 = _elementorCommon2.config) === null || _elementorCommon2 === void 0 || (_elementorCommon2 = _elementorCommon2.editor_events) === null || _elementorCommon2 === void 0 ? void 0 : _elementorCommon2.can_send_events) || false; | |
| 44 | - } | |
| 45 | - }, { | |
| 46 | - key: "isEventsManagerAvailable", | |
| 47 | - value: function isEventsManagerAvailable() { | |
| 48 | - var eventsManager = this.getEventsManager(); | |
| 49 | - return eventsManager && 'function' === typeof eventsManager.dispatchEvent; | |
| 50 | - } | |
| 51 | - }, { | |
| 52 | - key: "dispatchEvent", | |
| 53 | - value: function dispatchEvent(eventName, payload) { | |
| 54 | - try { | |
| 55 | - if (!this.isEventsManagerAvailable() || !this.canSendEvents()) { | |
| 56 | - return false; | |
| 19 | +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 | |
| 20 | + | |
| 21 | +var isPropValid = /* #__PURE__ */(0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prop) { | |
| 22 | + return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 | |
| 23 | + /* o */ | |
| 24 | + && prop.charCodeAt(1) === 110 | |
| 25 | + /* n */ | |
| 26 | + && prop.charCodeAt(2) < 91; | |
| 27 | +} | |
| 28 | +/* Z+1 */ | |
| 29 | +); | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | +/***/ }), | |
| 35 | + | |
| 36 | +/***/ "../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js": | |
| 37 | +/*!********************************************************************!*\ | |
| 38 | + !*** ../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js ***! | |
| 39 | + \********************************************************************/ | |
| 40 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 41 | + | |
| 42 | +"use strict"; | |
| 43 | +__webpack_require__.r(__webpack_exports__); | |
| 44 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 45 | +/* harmony export */ "default": () => (/* binding */ memoize) | |
| 46 | +/* harmony export */ }); | |
| 47 | +function memoize(fn) { | |
| 48 | + var cache = Object.create(null); | |
| 49 | + return function (arg) { | |
| 50 | + if (cache[arg] === undefined) cache[arg] = fn(arg); | |
| 51 | + return cache[arg]; | |
| 52 | + }; | |
| 53 | +} | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | +/***/ }), | |
| 59 | + | |
| 60 | +/***/ "../node_modules/@emotion/stylis/dist/stylis.browser.esm.js": | |
| 61 | +/*!******************************************************************!*\ | |
| 62 | + !*** ../node_modules/@emotion/stylis/dist/stylis.browser.esm.js ***! | |
| 63 | + \******************************************************************/ | |
| 64 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 65 | + | |
| 66 | +"use strict"; | |
| 67 | +__webpack_require__.r(__webpack_exports__); | |
| 68 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 69 | +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) | |
| 70 | +/* harmony export */ }); | |
| 71 | +function stylis_min (W) { | |
| 72 | + function M(d, c, e, h, a) { | |
| 73 | + for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) { | |
| 74 | + g = e.charCodeAt(l); | |
| 75 | + l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++); | |
| 76 | + | |
| 77 | + if (0 === b + n + v + m) { | |
| 78 | + if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) { | |
| 79 | + switch (g) { | |
| 80 | + case 32: | |
| 81 | + case 9: | |
| 82 | + case 59: | |
| 83 | + case 13: | |
| 84 | + case 10: | |
| 85 | + break; | |
| 86 | + | |
| 87 | + default: | |
| 88 | + f += e.charAt(l); | |
| 89 | + } | |
| 90 | + | |
| 91 | + g = 59; | |
| 57 | 92 | } |
| 58 | - this.getEventsManager().dispatchEvent(eventName, payload); | |
| 59 | - return true; | |
| 60 | - } catch (error) { | |
| 61 | - return false; | |
| 93 | + | |
| 94 | + switch (g) { | |
| 95 | + case 123: | |
| 96 | + f = f.trim(); | |
| 97 | + q = f.charCodeAt(0); | |
| 98 | + k = 1; | |
| 99 | + | |
| 100 | + for (t = ++l; l < B;) { | |
| 101 | + switch (g = e.charCodeAt(l)) { | |
| 102 | + case 123: | |
| 103 | + k++; | |
| 104 | + break; | |
| 105 | + | |
| 106 | + case 125: | |
| 107 | + k--; | |
| 108 | + break; | |
| 109 | + | |
| 110 | + case 47: | |
| 111 | + switch (g = e.charCodeAt(l + 1)) { | |
| 112 | + case 42: | |
| 113 | + case 47: | |
| 114 | + a: { | |
| 115 | + for (u = l + 1; u < J; ++u) { | |
| 116 | + switch (e.charCodeAt(u)) { | |
| 117 | + case 47: | |
| 118 | + if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) { | |
| 119 | + l = u + 1; | |
| 120 | + break a; | |
| 121 | + } | |
| 122 | + | |
| 123 | + break; | |
| 124 | + | |
| 125 | + case 10: | |
| 126 | + if (47 === g) { | |
| 127 | + l = u + 1; | |
| 128 | + break a; | |
| 129 | + } | |
| 130 | + | |
| 131 | + } | |
| 132 | + } | |
| 133 | + | |
| 134 | + l = u; | |
| 135 | + } | |
| 136 | + | |
| 137 | + } | |
| 138 | + | |
| 139 | + break; | |
| 140 | + | |
| 141 | + case 91: | |
| 142 | + g++; | |
| 143 | + | |
| 144 | + case 40: | |
| 145 | + g++; | |
| 146 | + | |
| 147 | + case 34: | |
| 148 | + case 39: | |
| 149 | + for (; l++ < J && e.charCodeAt(l) !== g;) { | |
| 150 | + } | |
| 151 | + | |
| 152 | + } | |
| 153 | + | |
| 154 | + if (0 === k) break; | |
| 155 | + l++; | |
| 156 | + } | |
| 157 | + | |
| 158 | + k = e.substring(t, l); | |
| 159 | + 0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0)); | |
| 160 | + | |
| 161 | + switch (q) { | |
| 162 | + case 64: | |
| 163 | + 0 < r && (f = f.replace(N, '')); | |
| 164 | + g = f.charCodeAt(1); | |
| 165 | + | |
| 166 | + switch (g) { | |
| 167 | + case 100: | |
| 168 | + case 109: | |
| 169 | + case 115: | |
| 170 | + case 45: | |
| 171 | + r = c; | |
| 172 | + break; | |
| 173 | + | |
| 174 | + default: | |
| 175 | + r = O; | |
| 176 | + } | |
| 177 | + | |
| 178 | + k = M(c, r, k, g, a + 1); | |
| 179 | + t = k.length; | |
| 180 | + 0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = '')); | |
| 181 | + if (0 < t) switch (g) { | |
| 182 | + case 115: | |
| 183 | + f = f.replace(da, ea); | |
| 184 | + | |
| 185 | + case 100: | |
| 186 | + case 109: | |
| 187 | + case 45: | |
| 188 | + k = f + '{' + k + '}'; | |
| 189 | + break; | |
| 190 | + | |
| 191 | + case 107: | |
| 192 | + f = f.replace(fa, '$1 $2'); | |
| 193 | + k = f + '{' + k + '}'; | |
| 194 | + k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k; | |
| 195 | + break; | |
| 196 | + | |
| 197 | + default: | |
| 198 | + k = f + k, 112 === h && (k = (p += k, '')); | |
| 199 | + } else k = ''; | |
| 200 | + break; | |
| 201 | + | |
| 202 | + default: | |
| 203 | + k = M(c, X(c, f, I), k, h, a + 1); | |
| 204 | + } | |
| 205 | + | |
| 206 | + F += k; | |
| 207 | + k = I = r = u = q = 0; | |
| 208 | + f = ''; | |
| 209 | + g = e.charCodeAt(++l); | |
| 210 | + break; | |
| 211 | + | |
| 212 | + case 125: | |
| 213 | + case 59: | |
| 214 | + f = (0 < r ? f.replace(N, '') : f).trim(); | |
| 215 | + if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\x00\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) { | |
| 216 | + case 0: | |
| 217 | + break; | |
| 218 | + | |
| 219 | + case 64: | |
| 220 | + if (105 === g || 99 === g) { | |
| 221 | + G += f + e.charAt(l); | |
| 222 | + break; | |
| 223 | + } | |
| 224 | + | |
| 225 | + default: | |
| 226 | + 58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2))); | |
| 227 | + } | |
| 228 | + I = r = u = q = 0; | |
| 229 | + f = ''; | |
| 230 | + g = e.charCodeAt(++l); | |
| 231 | + } | |
| 62 | 232 | } |
| 63 | - } | |
| 64 | - }, { | |
| 65 | - key: "toLowerSnake", | |
| 66 | - value: function toLowerSnake(value) { | |
| 67 | - if (!value || 'string' !== typeof value) { | |
| 68 | - return value; | |
| 233 | + | |
| 234 | + switch (g) { | |
| 235 | + case 13: | |
| 236 | + case 10: | |
| 237 | + 47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\x00'); | |
| 238 | + 0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h); | |
| 239 | + z = 1; | |
| 240 | + D++; | |
| 241 | + break; | |
| 242 | + | |
| 243 | + case 59: | |
| 244 | + case 125: | |
| 245 | + if (0 === b + n + v + m) { | |
| 246 | + z++; | |
| 247 | + break; | |
| 248 | + } | |
| 249 | + | |
| 250 | + default: | |
| 251 | + z++; | |
| 252 | + y = e.charAt(l); | |
| 253 | + | |
| 254 | + switch (g) { | |
| 255 | + case 9: | |
| 256 | + case 32: | |
| 257 | + if (0 === n + m + b) switch (x) { | |
| 258 | + case 44: | |
| 259 | + case 58: | |
| 260 | + case 9: | |
| 261 | + case 32: | |
| 262 | + y = ''; | |
| 263 | + break; | |
| 264 | + | |
| 265 | + default: | |
| 266 | + 32 !== g && (y = ' '); | |
| 267 | + } | |
| 268 | + break; | |
| 269 | + | |
| 270 | + case 0: | |
| 271 | + y = '\\0'; | |
| 272 | + break; | |
| 273 | + | |
| 274 | + case 12: | |
| 275 | + y = '\\f'; | |
| 276 | + break; | |
| 277 | + | |
| 278 | + case 11: | |
| 279 | + y = '\\v'; | |
| 280 | + break; | |
| 281 | + | |
| 282 | + case 38: | |
| 283 | + 0 === n + b + m && (r = I = 1, y = '\f' + y); | |
| 284 | + break; | |
| 285 | + | |
| 286 | + case 108: | |
| 287 | + if (0 === n + b + m + E && 0 < u) switch (l - u) { | |
| 288 | + case 2: | |
| 289 | + 112 === x && 58 === e.charCodeAt(l - 3) && (E = x); | |
| 290 | + | |
| 291 | + case 8: | |
| 292 | + 111 === K && (E = K); | |
| 293 | + } | |
| 294 | + break; | |
| 295 | + | |
| 296 | + case 58: | |
| 297 | + 0 === n + b + m && (u = l); | |
| 298 | + break; | |
| 299 | + | |
| 300 | + case 44: | |
| 301 | + 0 === b + v + n + m && (r = 1, y += '\r'); | |
| 302 | + break; | |
| 303 | + | |
| 304 | + case 34: | |
| 305 | + case 39: | |
| 306 | + 0 === b && (n = n === g ? 0 : 0 === n ? g : n); | |
| 307 | + break; | |
| 308 | + | |
| 309 | + case 91: | |
| 310 | + 0 === n + b + v && m++; | |
| 311 | + break; | |
| 312 | + | |
| 313 | + case 93: | |
| 314 | + 0 === n + b + v && m--; | |
| 315 | + break; | |
| 316 | + | |
| 317 | + case 41: | |
| 318 | + 0 === n + b + m && v--; | |
| 319 | + break; | |
| 320 | + | |
| 321 | + case 40: | |
| 322 | + if (0 === n + b + m) { | |
| 323 | + if (0 === q) switch (2 * x + 3 * K) { | |
| 324 | + case 533: | |
| 325 | + break; | |
| 326 | + | |
| 327 | + default: | |
| 328 | + q = 1; | |
| 329 | + } | |
| 330 | + v++; | |
| 331 | + } | |
| 332 | + | |
| 333 | + break; | |
| 334 | + | |
| 335 | + case 64: | |
| 336 | + 0 === b + v + n + m + u + k && (k = 1); | |
| 337 | + break; | |
| 338 | + | |
| 339 | + case 42: | |
| 340 | + case 47: | |
| 341 | + if (!(0 < n + m + v)) switch (b) { | |
| 342 | + case 0: | |
| 343 | + switch (2 * g + 3 * e.charCodeAt(l + 1)) { | |
| 344 | + case 235: | |
| 345 | + b = 47; | |
| 346 | + break; | |
| 347 | + | |
| 348 | + case 220: | |
| 349 | + t = l, b = 42; | |
| 350 | + } | |
| 351 | + | |
| 352 | + break; | |
| 353 | + | |
| 354 | + case 42: | |
| 355 | + 47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0); | |
| 356 | + } | |
| 357 | + } | |
| 358 | + | |
| 359 | + 0 === b && (f += y); | |
| 69 | 360 | } |
| 70 | - return value.replace(/\s+/g, '_').toLowerCase(); | |
| 361 | + | |
| 362 | + K = x; | |
| 363 | + x = g; | |
| 364 | + l++; | |
| 71 | 365 | } |
| 72 | - }, { | |
| 73 | - key: "decodeHtmlEntities", | |
| 74 | - value: function decodeHtmlEntities(text) { | |
| 75 | - if (!text || 'string' !== typeof text) { | |
| 76 | - return text; | |
| 366 | + | |
| 367 | + t = p.length; | |
| 368 | + | |
| 369 | + if (0 < t) { | |
| 370 | + r = c; | |
| 371 | + if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F; | |
| 372 | + p = r.join(',') + '{' + p + '}'; | |
| 373 | + | |
| 374 | + if (0 !== w * E) { | |
| 375 | + 2 !== w || L(p, 2) || (E = 0); | |
| 376 | + | |
| 377 | + switch (E) { | |
| 378 | + case 111: | |
| 379 | + p = p.replace(ha, ':-moz-$1') + p; | |
| 380 | + break; | |
| 381 | + | |
| 382 | + case 112: | |
| 383 | + p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p; | |
| 384 | + } | |
| 385 | + | |
| 386 | + E = 0; | |
| 77 | 387 | } |
| 78 | - var doc = new DOMParser().parseFromString(text, 'text/html'); | |
| 79 | - return doc.body.textContent || text; | |
| 80 | 388 | } |
| 81 | - }, { | |
| 82 | - key: "isInEditorContext", | |
| 83 | - value: function isInEditorContext() { | |
| 84 | - var _window$elementor; | |
| 85 | - return 'undefined' !== typeof window.elementor && !!((_window$elementor = window.elementor) !== null && _window$elementor !== void 0 && _window$elementor.documents); | |
| 389 | + | |
| 390 | + return G + p + F; | |
| 391 | + } | |
| 392 | + | |
| 393 | + function X(d, c, e) { | |
| 394 | + var h = c.trim().split(ia); | |
| 395 | + c = h; | |
| 396 | + var a = h.length, | |
| 397 | + m = d.length; | |
| 398 | + | |
| 399 | + switch (m) { | |
| 400 | + case 0: | |
| 401 | + case 1: | |
| 402 | + var b = 0; | |
| 403 | + | |
| 404 | + for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) { | |
| 405 | + c[b] = Z(d, c[b], e).trim(); | |
| 406 | + } | |
| 407 | + | |
| 408 | + break; | |
| 409 | + | |
| 410 | + default: | |
| 411 | + var v = b = 0; | |
| 412 | + | |
| 413 | + for (c = []; b < a; ++b) { | |
| 414 | + for (var n = 0; n < m; ++n) { | |
| 415 | + c[v++] = Z(d[n] + ' ', h[b], e).trim(); | |
| 416 | + } | |
| 417 | + } | |
| 418 | + | |
| 86 | 419 | } |
| 87 | - }, { | |
| 88 | - key: "getFinderContext", | |
| 89 | - value: function getFinderContext() { | |
| 90 | - var _config$appTypes, _config$appTypes2, _config$locations, _config$locations2; | |
| 91 | - var config = this.getConfig(); | |
| 92 | - var isEditor = this.isInEditorContext(); | |
| 93 | - return { | |
| 94 | - windowName: isEditor ? config === null || config === void 0 || (_config$appTypes = config.appTypes) === null || _config$appTypes === void 0 ? void 0 : _config$appTypes.editor : config === null || config === void 0 || (_config$appTypes2 = config.appTypes) === null || _config$appTypes2 === void 0 ? void 0 : _config$appTypes2.wpAdmin, | |
| 95 | - targetLocation: this.toLowerSnake(isEditor ? config === null || config === void 0 || (_config$locations = config.locations) === null || _config$locations === void 0 ? void 0 : _config$locations.topBar : config === null || config === void 0 || (_config$locations2 = config.locations) === null || _config$locations2 === void 0 ? void 0 : _config$locations2.sidebar) | |
| 96 | - }; | |
| 420 | + | |
| 421 | + return c; | |
| 422 | + } | |
| 423 | + | |
| 424 | + function Z(d, c, e) { | |
| 425 | + var h = c.charCodeAt(0); | |
| 426 | + 33 > h && (h = (c = c.trim()).charCodeAt(0)); | |
| 427 | + | |
| 428 | + switch (h) { | |
| 429 | + case 38: | |
| 430 | + return c.replace(F, '$1' + d.trim()); | |
| 431 | + | |
| 432 | + case 58: | |
| 433 | + return d.trim() + c.replace(F, '$1' + d.trim()); | |
| 434 | + | |
| 435 | + default: | |
| 436 | + if (0 < 1 * e && 0 < c.indexOf('\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim()); | |
| 97 | 437 | } |
| 98 | - }, { | |
| 99 | - key: "createBasePayload", | |
| 100 | - value: function createBasePayload() { | |
| 101 | - var _config$appTypes$edit, _config$appTypes3, _config$appTypes$edit2, _config$appTypes4; | |
| 102 | - var overrides = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 103 | - var config = this.getConfig(); | |
| 104 | - return _objectSpread({ | |
| 105 | - app_type: (_config$appTypes$edit = config === null || config === void 0 || (_config$appTypes3 = config.appTypes) === null || _config$appTypes3 === void 0 ? void 0 : _config$appTypes3.editor) !== null && _config$appTypes$edit !== void 0 ? _config$appTypes$edit : 'editor', | |
| 106 | - window_name: (_config$appTypes$edit2 = config === null || config === void 0 || (_config$appTypes4 = config.appTypes) === null || _config$appTypes4 === void 0 ? void 0 : _config$appTypes4.editor) !== null && _config$appTypes$edit2 !== void 0 ? _config$appTypes$edit2 : 'editor' | |
| 107 | - }, overrides); | |
| 438 | + | |
| 439 | + return d + c; | |
| 440 | + } | |
| 441 | + | |
| 442 | + function P(d, c, e, h) { | |
| 443 | + var a = d + ';', | |
| 444 | + m = 2 * c + 3 * e + 4 * h; | |
| 445 | + | |
| 446 | + if (944 === m) { | |
| 447 | + d = a.indexOf(':', 9) + 1; | |
| 448 | + var b = a.substring(d, a.length - 1).trim(); | |
| 449 | + b = a.substring(0, d).trim() + b + ';'; | |
| 450 | + return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b; | |
| 108 | 451 | } |
| 109 | - }, { | |
| 110 | - key: "sendTopBarPublishDropdown", | |
| 111 | - value: function sendTopBarPublishDropdown(targetName) { | |
| 112 | - var _config$names, _config$triggers, _config$targetTypes, _config$interactionRe, _config$locations3, _config$secondaryLoca, _config$targetTypes2; | |
| 113 | - var config = this.getConfig(); | |
| 114 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names = config.names) === null || _config$names === void 0 || (_config$names = _config$names.editorOne) === null || _config$names === void 0 ? void 0 : _config$names.topBarPublishDropdown, this.createBasePayload({ | |
| 115 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers = config.triggers) === null || _config$triggers === void 0 ? void 0 : _config$triggers.click), | |
| 116 | - target_type: config === null || config === void 0 || (_config$targetTypes = config.targetTypes) === null || _config$targetTypes === void 0 ? void 0 : _config$targetTypes.dropdownItem, | |
| 117 | - target_name: targetName, | |
| 118 | - interaction_result: config === null || config === void 0 || (_config$interactionRe = config.interactionResults) === null || _config$interactionRe === void 0 ? void 0 : _config$interactionRe.actionSelected, | |
| 119 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations3 = config.locations) === null || _config$locations3 === void 0 ? void 0 : _config$locations3.topBar), | |
| 120 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca = config.secondaryLocations) === null || _config$secondaryLoca === void 0 ? void 0 : _config$secondaryLoca.publishDropdown), | |
| 121 | - location_l2: config === null || config === void 0 || (_config$targetTypes2 = config.targetTypes) === null || _config$targetTypes2 === void 0 ? void 0 : _config$targetTypes2.dropdownItem, | |
| 122 | - interaction_description: 'User selected an action from the publish dropdown' | |
| 123 | - })); | |
| 124 | - } | |
| 125 | - }, { | |
| 126 | - key: "sendTopBarPageList", | |
| 127 | - value: function sendTopBarPageList(targetName) { | |
| 128 | - var _config$names2, _config$triggers2, _config$targetTypes3, _config$interactionRe2, _config$interactionRe3, _config$locations4, _config$secondaryLoca2, _config$targetTypes4; | |
| 129 | - var isCreate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; | |
| 130 | - var config = this.getConfig(); | |
| 131 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names2 = config.names) === null || _config$names2 === void 0 || (_config$names2 = _config$names2.editorOne) === null || _config$names2 === void 0 ? void 0 : _config$names2.topBarPageList, this.createBasePayload({ | |
| 132 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers2 = config.triggers) === null || _config$triggers2 === void 0 ? void 0 : _config$triggers2.click), | |
| 133 | - target_type: config === null || config === void 0 || (_config$targetTypes3 = config.targetTypes) === null || _config$targetTypes3 === void 0 ? void 0 : _config$targetTypes3.dropdownItem, | |
| 134 | - target_name: targetName, | |
| 135 | - interaction_result: isCreate ? config === null || config === void 0 || (_config$interactionRe2 = config.interactionResults) === null || _config$interactionRe2 === void 0 ? void 0 : _config$interactionRe2.create : config === null || config === void 0 || (_config$interactionRe3 = config.interactionResults) === null || _config$interactionRe3 === void 0 ? void 0 : _config$interactionRe3.navigate, | |
| 136 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations4 = config.locations) === null || _config$locations4 === void 0 ? void 0 : _config$locations4.topBar), | |
| 137 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca2 = config.secondaryLocations) === null || _config$secondaryLoca2 === void 0 ? void 0 : _config$secondaryLoca2.pageListDropdown), | |
| 138 | - location_l2: config === null || config === void 0 || (_config$targetTypes4 = config.targetTypes) === null || _config$targetTypes4 === void 0 ? void 0 : _config$targetTypes4.dropdownItem, | |
| 139 | - interaction_description: 'User selected an action from the page list dropdown' | |
| 140 | - })); | |
| 141 | - } | |
| 142 | - }, { | |
| 143 | - key: "sendSiteSettingsSession", | |
| 144 | - value: function sendSiteSettingsSession(_ref) { | |
| 145 | - var _config$names3, _config$triggers3, _config$interactionRe4, _config$locations5, _config$secondaryLoca3; | |
| 146 | - var targetType = _ref.targetType, | |
| 147 | - _ref$visitedItems = _ref.visitedItems, | |
| 148 | - visitedItems = _ref$visitedItems === void 0 ? [] : _ref$visitedItems, | |
| 149 | - _ref$savedItems = _ref.savedItems, | |
| 150 | - savedItems = _ref$savedItems === void 0 ? [] : _ref$savedItems, | |
| 151 | - state = _ref.state; | |
| 152 | - var config = this.getConfig(); | |
| 153 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names3 = config.names) === null || _config$names3 === void 0 || (_config$names3 = _config$names3.editorOne) === null || _config$names3 === void 0 ? void 0 : _config$names3.siteSettingsSession, this.createBasePayload({ | |
| 154 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers3 = config.triggers) === null || _config$triggers3 === void 0 ? void 0 : _config$triggers3.click), | |
| 155 | - target_type: targetType, | |
| 156 | - target_name: 'site_settings', | |
| 157 | - interaction_result: config === null || config === void 0 || (_config$interactionRe4 = config.interactionResults) === null || _config$interactionRe4 === void 0 ? void 0 : _config$interactionRe4.sessionEnd, | |
| 158 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations5 = config.locations) === null || _config$locations5 === void 0 ? void 0 : _config$locations5.leftPanel), | |
| 159 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca3 = config.secondaryLocations) === null || _config$secondaryLoca3 === void 0 ? void 0 : _config$secondaryLoca3.siteSettings), | |
| 160 | - interaction_description: 'Records areas visited as part of the site setting session', | |
| 161 | - metadata: { | |
| 162 | - visited_items: visitedItems, | |
| 163 | - saved_items: savedItems | |
| 164 | - }, | |
| 165 | - state: state | |
| 166 | - })); | |
| 167 | - } | |
| 168 | - }, { | |
| 169 | - key: "sendELibraryNav", | |
| 170 | - value: function sendELibraryNav(tabName) { | |
| 171 | - var _config$names4, _config$triggers4, _config$targetTypes5, _config$interactionRe5, _config$locations6, _config$secondaryLoca4; | |
| 172 | - var config = this.getConfig(); | |
| 173 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names4 = config.names) === null || _config$names4 === void 0 || (_config$names4 = _config$names4.editorOne) === null || _config$names4 === void 0 ? void 0 : _config$names4.eLibraryNav, this.createBasePayload({ | |
| 174 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers4 = config.triggers) === null || _config$triggers4 === void 0 ? void 0 : _config$triggers4.tabSelect), | |
| 175 | - target_type: config === null || config === void 0 || (_config$targetTypes5 = config.targetTypes) === null || _config$targetTypes5 === void 0 ? void 0 : _config$targetTypes5.tab, | |
| 176 | - target_name: this.toLowerSnake(tabName), | |
| 177 | - interaction_result: config === null || config === void 0 || (_config$interactionRe5 = config.interactionResults) === null || _config$interactionRe5 === void 0 ? void 0 : _config$interactionRe5.tabChanged, | |
| 178 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations6 = config.locations) === null || _config$locations6 === void 0 ? void 0 : _config$locations6.elementorLibrary), | |
| 179 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca4 = config.secondaryLocations) === null || _config$secondaryLoca4 === void 0 ? void 0 : _config$secondaryLoca4.libraryTabs), | |
| 180 | - interaction_description: 'User navigates within elementor library' | |
| 181 | - })); | |
| 182 | - } | |
| 183 | - }, { | |
| 184 | - key: "sendELibraryInsert", | |
| 185 | - value: function sendELibraryInsert(_ref2) { | |
| 186 | - var _config$triggers5, _config$targetTypes6, _config$interactionRe6, _config$locations7, _config$secondaryLoca5, _config$names5; | |
| 187 | - var assetId = _ref2.assetId, | |
| 188 | - assetName = _ref2.assetName, | |
| 189 | - libraryType = _ref2.libraryType, | |
| 190 | - _ref2$proRequired = _ref2.proRequired, | |
| 191 | - proRequired = _ref2$proRequired === void 0 ? false : _ref2$proRequired; | |
| 192 | - var config = this.getConfig(); | |
| 193 | - var payload = this.createBasePayload({ | |
| 194 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers5 = config.triggers) === null || _config$triggers5 === void 0 ? void 0 : _config$triggers5.insert), | |
| 195 | - target_type: config === null || config === void 0 || (_config$targetTypes6 = config.targetTypes) === null || _config$targetTypes6 === void 0 ? void 0 : _config$targetTypes6.button, | |
| 196 | - target_name: String(assetId), | |
| 197 | - interaction_result: config === null || config === void 0 || (_config$interactionRe6 = config.interactionResults) === null || _config$interactionRe6 === void 0 ? void 0 : _config$interactionRe6.assetInserted, | |
| 198 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations7 = config.locations) === null || _config$locations7 === void 0 ? void 0 : _config$locations7.elementorLibrary), | |
| 199 | - location_l1: this.toLowerSnake(libraryType), | |
| 200 | - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca5 = config.secondaryLocations) === null || _config$secondaryLoca5 === void 0 ? void 0 : _config$secondaryLoca5.assetCard), | |
| 201 | - interaction_description: 'User inserts block/pages from elementor library', | |
| 202 | - metadata: { | |
| 203 | - template_id: String(assetId), | |
| 204 | - template_name: this.decodeHtmlEntities(assetName) || '' | |
| 452 | + | |
| 453 | + if (0 === w || 2 === w && !L(a, 1)) return a; | |
| 454 | + | |
| 455 | + switch (m) { | |
| 456 | + case 1015: | |
| 457 | + return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a; | |
| 458 | + | |
| 459 | + case 951: | |
| 460 | + return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a; | |
| 461 | + | |
| 462 | + case 963: | |
| 463 | + return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a; | |
| 464 | + | |
| 465 | + case 1009: | |
| 466 | + if (100 !== a.charCodeAt(4)) break; | |
| 467 | + | |
| 468 | + case 969: | |
| 469 | + case 942: | |
| 470 | + return '-webkit-' + a + a; | |
| 471 | + | |
| 472 | + case 978: | |
| 473 | + return '-webkit-' + a + '-moz-' + a + a; | |
| 474 | + | |
| 475 | + case 1019: | |
| 476 | + case 983: | |
| 477 | + return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a; | |
| 478 | + | |
| 479 | + case 883: | |
| 480 | + if (45 === a.charCodeAt(8)) return '-webkit-' + a + a; | |
| 481 | + if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a; | |
| 482 | + break; | |
| 483 | + | |
| 484 | + case 932: | |
| 485 | + if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) { | |
| 486 | + case 103: | |
| 487 | + return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a; | |
| 488 | + | |
| 489 | + case 115: | |
| 490 | + return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a; | |
| 491 | + | |
| 492 | + case 98: | |
| 493 | + return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a; | |
| 205 | 494 | } |
| 206 | - }); | |
| 207 | - if (proRequired) { | |
| 208 | - payload.state = 'pro_plan_required'; | |
| 209 | - } | |
| 210 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names5 = config.names) === null || _config$names5 === void 0 || (_config$names5 = _config$names5.editorOne) === null || _config$names5 === void 0 ? void 0 : _config$names5.eLibraryInsert, payload); | |
| 211 | - } | |
| 212 | - }, { | |
| 213 | - key: "sendELibraryFavorite", | |
| 214 | - value: function sendELibraryFavorite(_ref3) { | |
| 215 | - var _config$triggers6, _config$targetTypes7, _config$interactionRe7, _config$locations8, _config$secondaryLoca6, _config$names6; | |
| 216 | - var assetId = _ref3.assetId, | |
| 217 | - assetName = _ref3.assetName, | |
| 218 | - libraryType = _ref3.libraryType, | |
| 219 | - isFavorite = _ref3.isFavorite, | |
| 220 | - _ref3$proRequired = _ref3.proRequired, | |
| 221 | - proRequired = _ref3$proRequired === void 0 ? false : _ref3$proRequired; | |
| 222 | - var config = this.getConfig(); | |
| 223 | - var payload = this.createBasePayload({ | |
| 224 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers6 = config.triggers) === null || _config$triggers6 === void 0 ? void 0 : _config$triggers6.click), | |
| 225 | - target_type: config === null || config === void 0 || (_config$targetTypes7 = config.targetTypes) === null || _config$targetTypes7 === void 0 ? void 0 : _config$targetTypes7.toggle, | |
| 226 | - target_name: String(assetId), | |
| 227 | - interaction_result: config === null || config === void 0 || (_config$interactionRe7 = config.interactionResults) === null || _config$interactionRe7 === void 0 ? void 0 : _config$interactionRe7.assetFavorite, | |
| 228 | - target_value: Boolean(isFavorite), | |
| 229 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations8 = config.locations) === null || _config$locations8 === void 0 ? void 0 : _config$locations8.elementorLibrary), | |
| 230 | - location_l1: this.toLowerSnake(libraryType), | |
| 231 | - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca6 = config.secondaryLocations) === null || _config$secondaryLoca6 === void 0 ? void 0 : _config$secondaryLoca6.assetCard), | |
| 232 | - interaction_description: 'User favorite block/pages from elementor library', | |
| 233 | - metadata: { | |
| 234 | - template_id: String(assetId), | |
| 235 | - template_name: this.decodeHtmlEntities(assetName) || '' | |
| 495 | + return '-webkit-' + a + '-ms-' + a + a; | |
| 496 | + | |
| 497 | + case 964: | |
| 498 | + return '-webkit-' + a + '-ms-flex-' + a + a; | |
| 499 | + | |
| 500 | + case 1023: | |
| 501 | + if (99 !== a.charCodeAt(8)) break; | |
| 502 | + b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify'); | |
| 503 | + return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a; | |
| 504 | + | |
| 505 | + case 1005: | |
| 506 | + return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a; | |
| 507 | + | |
| 508 | + case 1e3: | |
| 509 | + b = a.substring(13).trim(); | |
| 510 | + c = b.indexOf('-') + 1; | |
| 511 | + | |
| 512 | + switch (b.charCodeAt(0) + b.charCodeAt(c)) { | |
| 513 | + case 226: | |
| 514 | + b = a.replace(G, 'tb'); | |
| 515 | + break; | |
| 516 | + | |
| 517 | + case 232: | |
| 518 | + b = a.replace(G, 'tb-rl'); | |
| 519 | + break; | |
| 520 | + | |
| 521 | + case 220: | |
| 522 | + b = a.replace(G, 'lr'); | |
| 523 | + break; | |
| 524 | + | |
| 525 | + default: | |
| 526 | + return a; | |
| 236 | 527 | } |
| 237 | - }); | |
| 238 | - if (proRequired) { | |
| 239 | - payload.state = 'pro_plan_required'; | |
| 240 | - } | |
| 241 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names6 = config.names) === null || _config$names6 === void 0 || (_config$names6 = _config$names6.editorOne) === null || _config$names6 === void 0 ? void 0 : _config$names6.eLibraryFavorite, payload); | |
| 242 | - } | |
| 243 | - }, { | |
| 244 | - key: "sendELibraryGenerateAi", | |
| 245 | - value: function sendELibraryGenerateAi(_ref4) { | |
| 246 | - var _config$names7, _config$triggers7, _config$targetTypes8, _config$interactionRe8, _config$locations9, _config$secondaryLoca7; | |
| 247 | - var assetId = _ref4.assetId, | |
| 248 | - assetName = _ref4.assetName, | |
| 249 | - libraryType = _ref4.libraryType; | |
| 250 | - var config = this.getConfig(); | |
| 251 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names7 = config.names) === null || _config$names7 === void 0 || (_config$names7 = _config$names7.editorOne) === null || _config$names7 === void 0 ? void 0 : _config$names7.eLibraryGenerateAi, this.createBasePayload({ | |
| 252 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers7 = config.triggers) === null || _config$triggers7 === void 0 ? void 0 : _config$triggers7.click), | |
| 253 | - target_type: config === null || config === void 0 || (_config$targetTypes8 = config.targetTypes) === null || _config$targetTypes8 === void 0 ? void 0 : _config$targetTypes8.button, | |
| 254 | - target_name: String(assetId), | |
| 255 | - interaction_result: config === null || config === void 0 || (_config$interactionRe8 = config.interactionResults) === null || _config$interactionRe8 === void 0 ? void 0 : _config$interactionRe8.aiGenerate, | |
| 256 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations9 = config.locations) === null || _config$locations9 === void 0 ? void 0 : _config$locations9.elementorLibrary), | |
| 257 | - location_l1: this.toLowerSnake(libraryType), | |
| 258 | - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca7 = config.secondaryLocations) === null || _config$secondaryLoca7 === void 0 ? void 0 : _config$secondaryLoca7.assetCard), | |
| 259 | - interaction_description: 'User generated block/page based on a library asset', | |
| 260 | - metadata: { | |
| 261 | - template_id: String(assetId), | |
| 262 | - template_name: this.decodeHtmlEntities(assetName) || '' | |
| 528 | + | |
| 529 | + return '-webkit-' + a + '-ms-' + b + a; | |
| 530 | + | |
| 531 | + case 1017: | |
| 532 | + if (-1 === a.indexOf('sticky', 9)) break; | |
| 533 | + | |
| 534 | + case 975: | |
| 535 | + c = (a = d).length - 10; | |
| 536 | + b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim(); | |
| 537 | + | |
| 538 | + switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) { | |
| 539 | + case 203: | |
| 540 | + if (111 > b.charCodeAt(8)) break; | |
| 541 | + | |
| 542 | + case 115: | |
| 543 | + a = a.replace(b, '-webkit-' + b) + ';' + a; | |
| 544 | + break; | |
| 545 | + | |
| 546 | + case 207: | |
| 547 | + case 102: | |
| 548 | + a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a; | |
| 263 | 549 | } |
| 264 | - })); | |
| 265 | - } | |
| 266 | - }, { | |
| 267 | - key: "sendFinderSearchInput", | |
| 268 | - value: function sendFinderSearchInput(_ref5) { | |
| 269 | - var _config$triggers8, _config$targetTypes9, _config$interactionRe9, _config$interactionRe0, _config$secondaryLoca8, _config$names8; | |
| 270 | - var resultsCount = _ref5.resultsCount, | |
| 271 | - _ref5$searchTerm = _ref5.searchTerm, | |
| 272 | - searchTerm = _ref5$searchTerm === void 0 ? null : _ref5$searchTerm; | |
| 273 | - var config = this.getConfig(); | |
| 274 | - var hasResults = resultsCount > 0; | |
| 275 | - var finderContext = this.getFinderContext(); | |
| 276 | - var payload = this.createBasePayload({ | |
| 277 | - window_name: finderContext.windowName, | |
| 278 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers8 = config.triggers) === null || _config$triggers8 === void 0 ? void 0 : _config$triggers8.typing), | |
| 279 | - target_type: config === null || config === void 0 || (_config$targetTypes9 = config.targetTypes) === null || _config$targetTypes9 === void 0 ? void 0 : _config$targetTypes9.searchInput, | |
| 280 | - target_name: 'finder', | |
| 281 | - interaction_result: hasResults ? config === null || config === void 0 || (_config$interactionRe9 = config.interactionResults) === null || _config$interactionRe9 === void 0 ? void 0 : _config$interactionRe9.resultsUpdated : config === null || config === void 0 || (_config$interactionRe0 = config.interactionResults) === null || _config$interactionRe0 === void 0 ? void 0 : _config$interactionRe0.noResults, | |
| 282 | - target_location: finderContext.targetLocation, | |
| 283 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca8 = config.secondaryLocations) === null || _config$secondaryLoca8 === void 0 ? void 0 : _config$secondaryLoca8.finder), | |
| 284 | - interaction_description: 'Finder search input, follows debounce behavior', | |
| 285 | - metadata: { | |
| 286 | - results_count: resultsCount | |
| 550 | + | |
| 551 | + return a + ';'; | |
| 552 | + | |
| 553 | + case 938: | |
| 554 | + if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) { | |
| 555 | + case 105: | |
| 556 | + return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a; | |
| 557 | + | |
| 558 | + case 115: | |
| 559 | + return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a; | |
| 560 | + | |
| 561 | + default: | |
| 562 | + return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a; | |
| 287 | 563 | } |
| 288 | - }); | |
| 289 | - if (!hasResults && searchTerm) { | |
| 290 | - payload.metadata.search_term = searchTerm; | |
| 291 | - } | |
| 292 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names8 = config.names) === null || _config$names8 === void 0 || (_config$names8 = _config$names8.editorOne) === null || _config$names8 === void 0 ? void 0 : _config$names8.finderSearchInput, payload); | |
| 564 | + break; | |
| 565 | + | |
| 566 | + case 973: | |
| 567 | + case 989: | |
| 568 | + if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break; | |
| 569 | + | |
| 570 | + case 931: | |
| 571 | + case 953: | |
| 572 | + if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a; | |
| 573 | + break; | |
| 574 | + | |
| 575 | + case 962: | |
| 576 | + if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a; | |
| 293 | 577 | } |
| 294 | - }, { | |
| 295 | - key: "sendFinderResultSelect", | |
| 296 | - value: function sendFinderResultSelect(choice) { | |
| 297 | - var _config$names9, _config$triggers9, _config$targetTypes0, _config$interactionRe1, _config$secondaryLoca9, _config$secondaryLoca0; | |
| 298 | - var config = this.getConfig(); | |
| 299 | - var finderContext = this.getFinderContext(); | |
| 300 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names9 = config.names) === null || _config$names9 === void 0 || (_config$names9 = _config$names9.editorOne) === null || _config$names9 === void 0 ? void 0 : _config$names9.finderResultSelect, this.createBasePayload({ | |
| 301 | - window_name: finderContext.windowName, | |
| 302 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers9 = config.triggers) === null || _config$triggers9 === void 0 ? void 0 : _config$triggers9.click), | |
| 303 | - target_type: config === null || config === void 0 || (_config$targetTypes0 = config.targetTypes) === null || _config$targetTypes0 === void 0 ? void 0 : _config$targetTypes0.searchResult, | |
| 304 | - target_name: choice, | |
| 305 | - interaction_result: config === null || config === void 0 || (_config$interactionRe1 = config.interactionResults) === null || _config$interactionRe1 === void 0 ? void 0 : _config$interactionRe1.selected, | |
| 306 | - target_location: finderContext.targetLocation, | |
| 307 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca9 = config.secondaryLocations) === null || _config$secondaryLoca9 === void 0 ? void 0 : _config$secondaryLoca9.finder), | |
| 308 | - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca0 = config.secondaryLocations) === null || _config$secondaryLoca0 === void 0 ? void 0 : _config$secondaryLoca0.finderResults), | |
| 309 | - interaction_description: 'Finder search results was selected' | |
| 310 | - })); | |
| 311 | - } | |
| 312 | - }, { | |
| 313 | - key: "sendCanvasEmptyBoxAction", | |
| 314 | - value: function sendCanvasEmptyBoxAction(_ref6) { | |
| 315 | - var _config$triggers0, _config$targetTypes1, _config$interactionRe10, _config$locations0, _config$secondaryLoca1, _config$names0; | |
| 316 | - var targetName = _ref6.targetName, | |
| 317 | - _ref6$metadata = _ref6.metadata, | |
| 318 | - metadata = _ref6$metadata === void 0 ? {} : _ref6$metadata, | |
| 319 | - _ref6$containerCreate = _ref6.containerCreated, | |
| 320 | - containerCreated = _ref6$containerCreate === void 0 ? null : _ref6$containerCreate; | |
| 321 | - var config = this.getConfig(); | |
| 322 | - var payload = this.createBasePayload({ | |
| 323 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers0 = config.triggers) === null || _config$triggers0 === void 0 ? void 0 : _config$triggers0.click), | |
| 324 | - target_type: config === null || config === void 0 || (_config$targetTypes1 = config.targetTypes) === null || _config$targetTypes1 === void 0 ? void 0 : _config$targetTypes1.buttons, | |
| 325 | - target_name: targetName, | |
| 326 | - interaction_result: config === null || config === void 0 || (_config$interactionRe10 = config.interactionResults) === null || _config$interactionRe10 === void 0 ? void 0 : _config$interactionRe10.selected, | |
| 327 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations0 = config.locations) === null || _config$locations0 === void 0 ? void 0 : _config$locations0.canvas), | |
| 328 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca1 = config.secondaryLocations) === null || _config$secondaryLoca1 === void 0 ? void 0 : _config$secondaryLoca1.emptyBox), | |
| 329 | - interaction_description: 'Empty box on canvas actions' | |
| 330 | - }); | |
| 331 | - if (Object.keys(metadata).length > 0) { | |
| 332 | - payload.metadata = metadata; | |
| 578 | + | |
| 579 | + return a; | |
| 580 | + } | |
| 581 | + | |
| 582 | + function L(d, c) { | |
| 583 | + var e = d.indexOf(1 === c ? ':' : '{'), | |
| 584 | + h = d.substring(0, 3 !== c ? e : 10); | |
| 585 | + e = d.substring(e + 1, d.length - 1); | |
| 586 | + return R(2 !== c ? h : h.replace(na, '$1'), e, c); | |
| 587 | + } | |
| 588 | + | |
| 589 | + function ea(d, c) { | |
| 590 | + var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2)); | |
| 591 | + return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')'; | |
| 592 | + } | |
| 593 | + | |
| 594 | + function H(d, c, e, h, a, m, b, v, n, q) { | |
| 595 | + for (var g = 0, x = c, w; g < A; ++g) { | |
| 596 | + switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) { | |
| 597 | + case void 0: | |
| 598 | + case !1: | |
| 599 | + case !0: | |
| 600 | + case null: | |
| 601 | + break; | |
| 602 | + | |
| 603 | + default: | |
| 604 | + x = w; | |
| 333 | 605 | } |
| 334 | - if (containerCreated !== null) { | |
| 335 | - payload.state = containerCreated; | |
| 336 | - } | |
| 337 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names0 = config.names) === null || _config$names0 === void 0 || (_config$names0 = _config$names0.editorOne) === null || _config$names0 === void 0 ? void 0 : _config$names0.canvasEmptyBoxAction, payload); | |
| 338 | 606 | } |
| 339 | - }, { | |
| 340 | - key: "sendWidgetPanelSearch", | |
| 341 | - value: function sendWidgetPanelSearch(_ref7) { | |
| 342 | - var _config$triggers1, _config$targetTypes10, _config$interactionRe11, _config$interactionRe12, _config$locations1, _config$locations10, _config$secondaryLoca10, _config$names1; | |
| 343 | - var resultsCount = _ref7.resultsCount, | |
| 344 | - _ref7$userInput = _ref7.userInput, | |
| 345 | - userInput = _ref7$userInput === void 0 ? null : _ref7$userInput; | |
| 346 | - var config = this.getConfig(); | |
| 347 | - var hasResults = resultsCount > 0; | |
| 348 | - var payload = this.createBasePayload({ | |
| 349 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers1 = config.triggers) === null || _config$triggers1 === void 0 ? void 0 : _config$triggers1.typing), | |
| 350 | - target_type: config === null || config === void 0 || (_config$targetTypes10 = config.targetTypes) === null || _config$targetTypes10 === void 0 ? void 0 : _config$targetTypes10.searchWidget, | |
| 351 | - target_name: 'search_widget', | |
| 352 | - interaction_result: hasResults ? config === null || config === void 0 || (_config$interactionRe11 = config.interactionResults) === null || _config$interactionRe11 === void 0 ? void 0 : _config$interactionRe11.resultsUpdated : config === null || config === void 0 || (_config$interactionRe12 = config.interactionResults) === null || _config$interactionRe12 === void 0 ? void 0 : _config$interactionRe12.noResults, | |
| 353 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations1 = config.locations) === null || _config$locations1 === void 0 ? void 0 : _config$locations1.leftPanel), | |
| 354 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$locations10 = config.locations) === null || _config$locations10 === void 0 ? void 0 : _config$locations10.widgetPanel), | |
| 355 | - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca10 = config.secondaryLocations) === null || _config$secondaryLoca10 === void 0 ? void 0 : _config$secondaryLoca10.searchBar), | |
| 356 | - interaction_description: 'Widget search input, follows debounce behavior' | |
| 357 | - }); | |
| 358 | - if (!hasResults && userInput) { | |
| 359 | - payload.metadata = { | |
| 360 | - user_input: userInput | |
| 361 | - }; | |
| 362 | - } | |
| 363 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names1 = config.names) === null || _config$names1 === void 0 || (_config$names1 = _config$names1.editorOne) === null || _config$names1 === void 0 ? void 0 : _config$names1.widgetPanelSearch, payload); | |
| 607 | + | |
| 608 | + if (x !== c) return x; | |
| 609 | + } | |
| 610 | + | |
| 611 | + function T(d) { | |
| 612 | + switch (d) { | |
| 613 | + case void 0: | |
| 614 | + case null: | |
| 615 | + A = S.length = 0; | |
| 616 | + break; | |
| 617 | + | |
| 618 | + default: | |
| 619 | + if ('function' === typeof d) S[A++] = d;else if ('object' === typeof d) for (var c = 0, e = d.length; c < e; ++c) { | |
| 620 | + T(d[c]); | |
| 621 | + } else Y = !!d | 0; | |
| 364 | 622 | } |
| 365 | - }, { | |
| 366 | - key: "createWpDashPayload", | |
| 367 | - value: function createWpDashPayload() { | |
| 368 | - var _config$appTypes$wpDa, _config$appTypes5, _config$locations11; | |
| 369 | - var overrides = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 370 | - var config = this.getConfig(); | |
| 371 | - return this.createBasePayload(_objectSpread({ | |
| 372 | - window_name: (_config$appTypes$wpDa = config === null || config === void 0 || (_config$appTypes5 = config.appTypes) === null || _config$appTypes5 === void 0 ? void 0 : _config$appTypes5.wpDash) !== null && _config$appTypes$wpDa !== void 0 ? _config$appTypes$wpDa : 'wpdash', | |
| 373 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations11 = config.locations) === null || _config$locations11 === void 0 ? void 0 : _config$locations11.wpDashAdmin), | |
| 374 | - location_l2: '' | |
| 375 | - }, overrides)); | |
| 623 | + | |
| 624 | + return T; | |
| 625 | + } | |
| 626 | + | |
| 627 | + function U(d) { | |
| 628 | + d = d.prefix; | |
| 629 | + void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0); | |
| 630 | + return U; | |
| 631 | + } | |
| 632 | + | |
| 633 | + function B(d, c) { | |
| 634 | + var e = d; | |
| 635 | + 33 > e.charCodeAt(0) && (e = e.trim()); | |
| 636 | + V = e; | |
| 637 | + e = [V]; | |
| 638 | + | |
| 639 | + if (0 < A) { | |
| 640 | + var h = H(-1, c, e, e, D, z, 0, 0, 0, 0); | |
| 641 | + void 0 !== h && 'string' === typeof h && (c = h); | |
| 376 | 642 | } |
| 377 | - }, { | |
| 378 | - key: "sendWpDashElementorMenuClick", | |
| 379 | - value: function sendWpDashElementorMenuClick() { | |
| 380 | - var _config$names10, _config$triggers10, _config$targetTypes11, _config$interactionRe13, _config$secondaryLoca11; | |
| 381 | - var config = this.getConfig(); | |
| 382 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names10 = config.names) === null || _config$names10 === void 0 || (_config$names10 = _config$names10.editorOne) === null || _config$names10 === void 0 ? void 0 : _config$names10.wpDashElementorMenuClick, this.createWpDashPayload({ | |
| 383 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers10 = config.triggers) === null || _config$triggers10 === void 0 ? void 0 : _config$triggers10.click), | |
| 384 | - target_type: config === null || config === void 0 || (_config$targetTypes11 = config.targetTypes) === null || _config$targetTypes11 === void 0 ? void 0 : _config$targetTypes11.wpDashAdminMenuItem, | |
| 385 | - target_name: 'elementor_menu_item', | |
| 386 | - interaction_result: config === null || config === void 0 || (_config$interactionRe13 = config.interactionResults) === null || _config$interactionRe13 === void 0 ? void 0 : _config$interactionRe13.elementorSideMenuOpened, | |
| 387 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca11 = config.secondaryLocations) === null || _config$secondaryLoca11 === void 0 ? void 0 : _config$secondaryLoca11.wpDashElementorCoreMenu), | |
| 388 | - interaction_description: 'core_user_clicked_elementor_menu_item' | |
| 389 | - })); | |
| 390 | - } | |
| 391 | - }, { | |
| 392 | - key: "sendWpDashEditorSubMenuHover", | |
| 393 | - value: function sendWpDashEditorSubMenuHover() { | |
| 394 | - var _config$names11, _config$triggers11, _config$targetTypes12, _config$interactionRe14, _config$secondaryLoca12; | |
| 395 | - var config = this.getConfig(); | |
| 396 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names11 = config.names) === null || _config$names11 === void 0 || (_config$names11 = _config$names11.editorOne) === null || _config$names11 === void 0 ? void 0 : _config$names11.wpDashEditorSubMenuHover, this.createWpDashPayload({ | |
| 397 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers11 = config.triggers) === null || _config$triggers11 === void 0 ? void 0 : _config$triggers11.hover), | |
| 398 | - target_type: config === null || config === void 0 || (_config$targetTypes12 = config.targetTypes) === null || _config$targetTypes12 === void 0 ? void 0 : _config$targetTypes12.wpDashEditorMenu, | |
| 399 | - target_name: 'wpdash_editor_sub_menu', | |
| 400 | - interaction_result: config === null || config === void 0 || (_config$interactionRe14 = config.interactionResults) === null || _config$interactionRe14 === void 0 ? void 0 : _config$interactionRe14.editorSubMenuOpened, | |
| 401 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca12 = config.secondaryLocations) === null || _config$secondaryLoca12 === void 0 ? void 0 : _config$secondaryLoca12.wpDashElementorCoreSubMenu), | |
| 402 | - interaction_description: 'core_user_hovered_sub_menu' | |
| 403 | - })); | |
| 404 | - } | |
| 405 | - }, { | |
| 406 | - key: "sendWpDashThemeBuilderClick", | |
| 407 | - value: function sendWpDashThemeBuilderClick() { | |
| 408 | - var _config$names12, _config$triggers12, _config$targetTypes13, _config$interactionRe15, _config$secondaryLoca13; | |
| 409 | - var config = this.getConfig(); | |
| 410 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names12 = config.names) === null || _config$names12 === void 0 || (_config$names12 = _config$names12.editorOne) === null || _config$names12 === void 0 ? void 0 : _config$names12.wpDashThemeBuilderClick, this.createWpDashPayload({ | |
| 411 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers12 = config.triggers) === null || _config$triggers12 === void 0 ? void 0 : _config$triggers12.click), | |
| 412 | - target_type: config === null || config === void 0 || (_config$targetTypes13 = config.targetTypes) === null || _config$targetTypes13 === void 0 ? void 0 : _config$targetTypes13.wpDashSubMenuItem, | |
| 413 | - target_name: 'theme_builder_menu_item', | |
| 414 | - interaction_result: config === null || config === void 0 || (_config$interactionRe15 = config.interactionResults) === null || _config$interactionRe15 === void 0 ? void 0 : _config$interactionRe15.themeBuilderPromotionWindow, | |
| 415 | - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca13 = config.secondaryLocations) === null || _config$secondaryLoca13 === void 0 ? void 0 : _config$secondaryLoca13.wpDashThemeBuilder), | |
| 416 | - interaction_description: 'core_user_clicked_theme_builder_menu_item' | |
| 417 | - })); | |
| 418 | - } | |
| 419 | - }, { | |
| 420 | - key: "sendSidebarMenuItemClicked", | |
| 421 | - value: function sendSidebarMenuItemClicked(_ref8) { | |
| 422 | - var eventId = _ref8.eventId, | |
| 423 | - groupEventId = _ref8.groupEventId; | |
| 424 | - try { | |
| 425 | - var _config$windowNames, _config$triggers13, _config$targetTypes14, _config$interactionRe16, _config$locations12, _config$names13; | |
| 426 | - var config = this.getConfig(); | |
| 427 | - var payload = this.createBasePayload({ | |
| 428 | - window_name: config === null || config === void 0 || (_config$windowNames = config.windowNames) === null || _config$windowNames === void 0 ? void 0 : _config$windowNames.sidebarMenu, | |
| 429 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers13 = config.triggers) === null || _config$triggers13 === void 0 ? void 0 : _config$triggers13.click), | |
| 430 | - target_type: config === null || config === void 0 || (_config$targetTypes14 = config.targetTypes) === null || _config$targetTypes14 === void 0 ? void 0 : _config$targetTypes14.link, | |
| 431 | - target_name: eventId, | |
| 432 | - interaction_result: config === null || config === void 0 || (_config$interactionRe16 = config.interactionResults) === null || _config$interactionRe16 === void 0 ? void 0 : _config$interactionRe16.pageOpened, | |
| 433 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations12 = config.locations) === null || _config$locations12 === void 0 ? void 0 : _config$locations12.sidebar) | |
| 434 | - }); | |
| 435 | - if (groupEventId) { | |
| 436 | - payload.location_l1 = groupEventId; | |
| 437 | - } | |
| 438 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names13 = config.names) === null || _config$names13 === void 0 || (_config$names13 = _config$names13.editorOne) === null || _config$names13 === void 0 ? void 0 : _config$names13.sidebarMenuItemClicked, payload); | |
| 439 | - } catch (error) { | |
| 440 | - return false; | |
| 441 | - } | |
| 442 | - } | |
| 443 | - }, { | |
| 444 | - key: "sendSidebarMenuGroupToggled", | |
| 445 | - value: function sendSidebarMenuGroupToggled(_ref9) { | |
| 446 | - var eventId = _ref9.eventId, | |
| 447 | - isExpanded = _ref9.isExpanded; | |
| 448 | - try { | |
| 449 | - var _config$interactionRe17, _config$interactionRe18, _config$names14, _config$windowNames2, _config$triggers14, _config$targetTypes15, _config$locations13; | |
| 450 | - var config = this.getConfig(); | |
| 451 | - var interactionResult = isExpanded ? config === null || config === void 0 || (_config$interactionRe17 = config.interactionResults) === null || _config$interactionRe17 === void 0 ? void 0 : _config$interactionRe17.expanded : config === null || config === void 0 || (_config$interactionRe18 = config.interactionResults) === null || _config$interactionRe18 === void 0 ? void 0 : _config$interactionRe18.collapsed; | |
| 452 | - return this.dispatchEvent(config === null || config === void 0 || (_config$names14 = config.names) === null || _config$names14 === void 0 || (_config$names14 = _config$names14.editorOne) === null || _config$names14 === void 0 ? void 0 : _config$names14.sidebarMenuGroupToggled, this.createBasePayload({ | |
| 453 | - window_name: config === null || config === void 0 || (_config$windowNames2 = config.windowNames) === null || _config$windowNames2 === void 0 ? void 0 : _config$windowNames2.sidebarMenu, | |
| 454 | - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers14 = config.triggers) === null || _config$triggers14 === void 0 ? void 0 : _config$triggers14.click), | |
| 455 | - target_type: config === null || config === void 0 || (_config$targetTypes15 = config.targetTypes) === null || _config$targetTypes15 === void 0 ? void 0 : _config$targetTypes15.toggle, | |
| 456 | - target_name: eventId, | |
| 457 | - interaction_result: interactionResult, | |
| 458 | - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations13 = config.locations) === null || _config$locations13 === void 0 ? void 0 : _config$locations13.sidebar) | |
| 459 | - })); | |
| 460 | - } catch (error) { | |
| 461 | - return false; | |
| 462 | - } | |
| 463 | - } | |
| 464 | - }]); | |
| 465 | -}(); | |
| 466 | -var createDebouncedFinderSearch = exports.createDebouncedFinderSearch = function createDebouncedFinderSearch() { | |
| 467 | - var delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 300; | |
| 468 | - return _.debounce(function (resultsCount, searchTerm) { | |
| 469 | - EditorOneEventManager.sendFinderSearchInput({ | |
| 470 | - resultsCount: resultsCount, | |
| 471 | - searchTerm: searchTerm | |
| 472 | - }); | |
| 473 | - }, delay); | |
| 474 | -}; | |
| 475 | -var createDebouncedWidgetPanelSearch = exports.createDebouncedWidgetPanelSearch = function createDebouncedWidgetPanelSearch() { | |
| 476 | - var delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 2000; | |
| 477 | - return _.debounce(function (resultsCount, userInput) { | |
| 478 | - EditorOneEventManager.sendWidgetPanelSearch({ | |
| 479 | - resultsCount: resultsCount, | |
| 480 | - userInput: userInput | |
| 481 | - }); | |
| 482 | - }, delay); | |
| 483 | -}; | |
| 484 | -var _default = exports["default"] = EditorOneEventManager; | |
| 485 | 643 | |
| 644 | + var a = M(O, e, c, 0, 0); | |
| 645 | + 0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h)); | |
| 646 | + V = ''; | |
| 647 | + E = 0; | |
| 648 | + z = D = 1; | |
| 649 | + return a; | |
| 650 | + } | |
| 651 | + | |
| 652 | + var ca = /^\0+/g, | |
| 653 | + N = /[\0\r\f]/g, | |
| 654 | + aa = /: */g, | |
| 655 | + ka = /zoo|gra/, | |
| 656 | + ma = /([,: ])(transform)/g, | |
| 657 | + ia = /,\r+?/g, | |
| 658 | + F = /([\t\r\n ])*\f?&/g, | |
| 659 | + fa = /@(k\w+)\s*(\S*)\s*/, | |
| 660 | + Q = /::(place)/g, | |
| 661 | + ha = /:(read-only)/g, | |
| 662 | + G = /[svh]\w+-[tblr]{2}/, | |
| 663 | + da = /\(\s*(.*)\s*\)/g, | |
| 664 | + oa = /([\s\S]*?);/g, | |
| 665 | + ba = /-self|flex-/g, | |
| 666 | + na = /[^]*?(:[rp][el]a[\w-]+)[^]*/, | |
| 667 | + la = /stretch|:\s*\w+\-(?:conte|avail)/, | |
| 668 | + ja = /([^-])(image-set\()/, | |
| 669 | + z = 1, | |
| 670 | + D = 1, | |
| 671 | + E = 0, | |
| 672 | + w = 1, | |
| 673 | + O = [], | |
| 674 | + S = [], | |
| 675 | + A = 0, | |
| 676 | + R = null, | |
| 677 | + Y = 0, | |
| 678 | + V = ''; | |
| 679 | + B.use = T; | |
| 680 | + B.set = U; | |
| 681 | + void 0 !== W && U(W); | |
| 682 | + return B; | |
| 683 | +} | |
| 684 | + | |
| 685 | +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stylis_min); | |
| 686 | + | |
| 687 | + | |
| 486 | 688 | /***/ }), |
| 487 | 689 | |
| 488 | 690 | /***/ "../assets/dev/js/utils/react.js": |
| 489 | 691 | /*!***************************************!*\ |
| @@ -501,9 +703,10 @@ | ||
| 501 | 703 | exports["default"] = void 0; |
| 502 | 704 | var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 503 | 705 | var ReactDOM = _interopRequireWildcard(__webpack_require__(/*! react-dom */ "react-dom")); |
| 504 | 706 | var _client = __webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js"); |
| 505 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 707 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 708 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 506 | 709 | /** |
| 507 | 710 | * Support conditional rendering of a React App to the DOM, based on the React version. |
| 508 | 711 | * We use `createRoot` when available, but fallback to `ReactDOM.render` for older versions. |
| 509 | 712 | * |
| @@ -531,11 +734,12 @@ | ||
| 531 | 734 | return { |
| 532 | 735 | unmount: unmountFunction |
| 533 | 736 | }; |
| 534 | 737 | } |
| 535 | -var _default = exports["default"] = { | |
| 738 | +var _default = { | |
| 536 | 739 | render: render |
| 537 | 740 | }; |
| 741 | +exports["default"] = _default; | |
| 538 | 742 | |
| 539 | 743 | /***/ }), |
| 540 | 744 | |
| 541 | 745 | /***/ "../modules/ai/assets/js/editor/ai-layout-behavior.js": |
| @@ -553,19 +757,21 @@ | ||
| 553 | 757 | })); |
| 554 | 758 | exports["default"] = void 0; |
| 555 | 759 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 556 | 760 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 761 | +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js")); | |
| 762 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 557 | 763 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 558 | 764 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 559 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 560 | 765 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 561 | 766 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 562 | 767 | var _editorIntegration = __webpack_require__(/*! ./utils/editor-integration */ "../modules/ai/assets/js/editor/utils/editor-integration.js"); |
| 563 | 768 | var _config = __webpack_require__(/*! ./pages/form-layout/context/config */ "../modules/ai/assets/js/editor/pages/form-layout/context/config.js"); |
| 564 | -var _editorOneEvents = __webpack_require__(/*! elementor-editor-utils/editor-one-events */ "../assets/dev/js/editor/utils/editor-one-events.js"); | |
| 565 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 566 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 567 | -var AiLayoutBehavior = exports["default"] = /*#__PURE__*/function (_Marionette$Behavior) { | |
| 769 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 770 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 771 | +var AiLayoutBehavior = /*#__PURE__*/function (_Marionette$Behavior) { | |
| 772 | + (0, _inherits2.default)(AiLayoutBehavior, _Marionette$Behavior); | |
| 773 | + var _super = _createSuper(AiLayoutBehavior); | |
| 568 | 774 | function AiLayoutBehavior() { |
| 569 | 775 | var _this; |
| 570 | 776 | (0, _classCallCheck2.default)(this, AiLayoutBehavior); |
| 571 | 777 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| @@ -570,14 +776,13 @@ | ||
| 570 | 776 | (0, _classCallCheck2.default)(this, AiLayoutBehavior); |
| 571 | 777 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| 572 | 778 | args[_key] = arguments[_key]; |
| 573 | 779 | } |
| 574 | - _this = _callSuper(this, AiLayoutBehavior, [].concat(args)); | |
| 575 | - (0, _defineProperty2.default)(_this, "previewContainer", null); | |
| 780 | + _this = _super.call.apply(_super, [this].concat(args)); | |
| 781 | + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "previewContainer", null); | |
| 576 | 782 | return _this; |
| 577 | 783 | } |
| 578 | - (0, _inherits2.default)(AiLayoutBehavior, _Marionette$Behavior); | |
| 579 | - return (0, _createClass2.default)(AiLayoutBehavior, [{ | |
| 784 | + (0, _createClass2.default)(AiLayoutBehavior, [{ | |
| 580 | 785 | key: "ui", |
| 581 | 786 | value: function ui() { |
| 582 | 787 | return { |
| 583 | 788 | aiButton: '.e-ai-layout-button', |
| @@ -594,11 +799,8 @@ | ||
| 594 | 799 | }, { |
| 595 | 800 | key: "onAiButtonClick", |
| 596 | 801 | value: function onAiButtonClick(e) { |
| 597 | 802 | e.stopPropagation(); |
| 598 | - _editorOneEvents.EditorOneEventManager.sendCanvasEmptyBoxAction({ | |
| 599 | - targetName: 'generate_with_ai' | |
| 600 | - }); | |
| 601 | 803 | window.elementorAiCurrentContext = this.getOption('context'); |
| 602 | 804 | (0, _editorIntegration.renderLayoutApp)({ |
| 603 | 805 | parentContainer: elementor.getPreviewContainer(), |
| 604 | 806 | mode: _config.MODE_LAYOUT, |
| @@ -630,19 +832,20 @@ | ||
| 630 | 832 | } |
| 631 | 833 | }, { |
| 632 | 834 | key: "onRender", |
| 633 | 835 | value: function onRender() { |
| 634 | - var $button = jQuery('<button>', { | |
| 635 | - type: 'button', | |
| 836 | + var $button = jQuery('<div>', { | |
| 636 | 837 | class: 'e-ai-layout-button elementor-add-section-area-button e-button-primary', |
| 637 | 838 | title: (0, _i18n.__)('Build with AI', 'elementor'), |
| 638 | - 'aria-label': (0, _i18n.__)('Build with AI', 'elementor') | |
| 839 | + role: 'button' | |
| 639 | 840 | }); |
| 640 | - $button.html("\n\t\t\t<div class=\"e-ai-layout-button--sparkle\"></div>\n\t\t\t<div class=\"e-ai-layout-button--sparkle\"></div>\n\t\t\t<div class=\"e-ai-layout-button--sparkle\"></div>\n\t\t\t<div class=\"e-ai-layout-button--sparkle\"></div>\n\t\t\t<div class=\"e-ai-layout-button--sparkle\"></div>\n\t\t\t<div class=\"e-ai-layout-button--sparkle\"></div>\n\t\t\t<div class=\"e-ai-layout-button--sparkle\"></div>\n\t\t\t<i class=\"eicon-ai\" aria-hidden=\"true\"></i>\n\t\t"); | |
| 841 | + $button.html("\n\t\t\t<div class=\"e-ai-layout-button--sparkle\"></div>\n\t\t\t<div class=\"e-ai-layout-button--sparkle\"></div>\n\t\t\t<div class=\"e-ai-layout-button--sparkle\"></div>\n\t\t\t<div class=\"e-ai-layout-button--sparkle\"></div>\n\t\t\t<div class=\"e-ai-layout-button--sparkle\"></div>\n\t\t\t<div class=\"e-ai-layout-button--sparkle\"></div>\n\t\t\t<div class=\"e-ai-layout-button--sparkle\"></div>\n\t\t\t<i class=\"eicon-ai\"></i>\n\t\t"); | |
| 641 | 842 | this.ui.addTemplateButton.after($button); |
| 642 | 843 | } |
| 643 | 844 | }]); |
| 845 | + return AiLayoutBehavior; | |
| 644 | 846 | }(Marionette.Behavior); |
| 847 | +exports["default"] = AiLayoutBehavior; | |
| 645 | 848 | |
| 646 | 849 | /***/ }), |
| 647 | 850 | |
| 648 | 851 | /***/ "../modules/ai/assets/js/editor/api/index.js": |
| @@ -657,29 +860,25 @@ | ||
| 657 | 860 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 658 | 861 | Object.defineProperty(exports, "__esModule", ({ |
| 659 | 862 | value: true |
| 660 | 863 | })); |
| 661 | -exports.uploadImage = exports.toggleFavoriteHistoryItem = exports.setStatusFeedback = exports.setGetStarted = exports.getUserInformation = exports.getTextToImageGeneration = exports.getRemoteFrontendConfig = exports.getRemoteConfig = exports.getProductImageUnification = exports.getLayoutPromptEnhanced = exports.getImageToImageUpscale = exports.getImageToImageReplaceBackground = exports.getImageToImageRemoveText = exports.getImageToImageRemoveBackground = exports.getImageToImageOutPainting = exports.getImageToImageMaskGeneration = exports.getImageToImageMaskCleanup = exports.getImageToImageIsolateObjects = exports.getImageToImageGeneration = exports.getImagePromptEnhanced = exports.getHistory = exports.getFeaturedImage = exports.getExcerpt = exports.getEditText = exports.getCustomCode = exports.getCustomCSS = exports.getCompletionText = exports.getAnimation = exports.generateLayout = exports.deleteHistoryItem = void 0; | |
| 864 | +exports.uploadImage = exports.toggleFavoriteHistoryItem = exports.setStatusFeedback = exports.setGetStarted = exports.getUserInformation = exports.getTextToImageGeneration = exports.getRemoteConfig = exports.getLayoutPromptEnhanced = exports.getImageToImageUpscale = exports.getImageToImageReplaceBackground = exports.getImageToImageRemoveText = exports.getImageToImageRemoveBackground = exports.getImageToImageOutPainting = exports.getImageToImageMaskGeneration = exports.getImageToImageGeneration = exports.getImagePromptEnhanced = exports.getHistory = exports.getFeaturedImage = exports.getExcerpt = exports.getEditText = exports.getCustomCode = exports.getCustomCSS = exports.getCompletionText = exports.generateLayout = exports.deleteHistoryItem = void 0; | |
| 662 | 865 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 663 | -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 664 | -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 866 | +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; } | |
| 867 | +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) { (0, _defineProperty2.default)(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; } | |
| 665 | 868 | var request = function request(endpoint) { |
| 666 | 869 | var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; |
| 667 | 870 | var immediately = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; |
| 668 | 871 | var signal = arguments.length > 3 ? arguments[3] : undefined; |
| 669 | 872 | if (Object.keys(data).length) { |
| 670 | - if (window.elementorAiCurrentContext) { | |
| 671 | - data.context = window.elementorAiCurrentContext; | |
| 672 | - } else { | |
| 673 | - data.context = window.elementorWpAiCurrentContext; | |
| 674 | - } | |
| 873 | + data.context = window.elementorAiCurrentContext; | |
| 675 | 874 | } |
| 875 | + data.editor_session_id = window.EDITOR_SESSION_ID; | |
| 676 | 876 | return new Promise(function (resolve, reject) { |
| 677 | 877 | var ajaxData = elementorCommon.ajax.addRequest(endpoint, { |
| 678 | 878 | success: resolve, |
| 679 | 879 | error: reject, |
| 680 | - data: data, | |
| 681 | - unique_id: data.unique_id | |
| 880 | + data: data | |
| 682 | 881 | }, immediately); |
| 683 | 882 | if (signal && ajaxData.jqXhr) { |
| 684 | 883 | signal.addEventListener('abort', ajaxData.jqXhr.abort); |
| 685 | 884 | } |
| @@ -684,128 +883,119 @@ | ||
| 684 | 883 | signal.addEventListener('abort', ajaxData.jqXhr.abort); |
| 685 | 884 | } |
| 686 | 885 | }); |
| 687 | 886 | }; |
| 688 | -var getUserInformation = exports.getUserInformation = function getUserInformation(immediately) { | |
| 887 | +var getUserInformation = function getUserInformation(immediately) { | |
| 689 | 888 | return request('ai_get_user_information', undefined, immediately); |
| 690 | 889 | }; |
| 691 | -var getRemoteConfig = exports.getRemoteConfig = function getRemoteConfig() { | |
| 890 | +exports.getUserInformation = getUserInformation; | |
| 891 | +var getRemoteConfig = function getRemoteConfig() { | |
| 692 | 892 | return request('ai_get_remote_config'); |
| 693 | 893 | }; |
| 694 | -var getRemoteFrontendConfig = exports.getRemoteFrontendConfig = function getRemoteFrontendConfig(payload, immediately) { | |
| 695 | - return request('ai_get_remote_frontend_config', { | |
| 696 | - payload: payload | |
| 697 | - }, immediately); | |
| 698 | -}; | |
| 699 | -var getCompletionText = exports.getCompletionText = function getCompletionText(payload) { | |
| 894 | +exports.getRemoteConfig = getRemoteConfig; | |
| 895 | +var getCompletionText = function getCompletionText(payload) { | |
| 700 | 896 | return request('ai_get_completion_text', { |
| 701 | 897 | payload: payload |
| 702 | 898 | }); |
| 703 | 899 | }; |
| 704 | -var getExcerpt = exports.getExcerpt = function getExcerpt(payload) { | |
| 900 | +exports.getCompletionText = getCompletionText; | |
| 901 | +var getExcerpt = function getExcerpt(payload) { | |
| 705 | 902 | return request('ai_get_excerpt', { |
| 706 | 903 | payload: payload |
| 707 | 904 | }); |
| 708 | 905 | }; |
| 709 | -var getFeaturedImage = exports.getFeaturedImage = function getFeaturedImage(payload) { | |
| 906 | +exports.getExcerpt = getExcerpt; | |
| 907 | +var getFeaturedImage = function getFeaturedImage(payload) { | |
| 710 | 908 | return request('ai_get_featured_image', { |
| 711 | 909 | payload: payload |
| 712 | 910 | }); |
| 713 | 911 | }; |
| 714 | -var getEditText = exports.getEditText = function getEditText(payload) { | |
| 912 | +exports.getFeaturedImage = getFeaturedImage; | |
| 913 | +var getEditText = function getEditText(payload) { | |
| 715 | 914 | return request('ai_get_edit_text', { |
| 716 | 915 | payload: payload |
| 717 | 916 | }); |
| 718 | 917 | }; |
| 719 | -var getCustomCode = exports.getCustomCode = function getCustomCode(payload) { | |
| 918 | +exports.getEditText = getEditText; | |
| 919 | +var getCustomCode = function getCustomCode(payload) { | |
| 720 | 920 | return request('ai_get_custom_code', { |
| 721 | 921 | payload: payload |
| 722 | 922 | }); |
| 723 | 923 | }; |
| 724 | -var getCustomCSS = exports.getCustomCSS = function getCustomCSS(payload) { | |
| 924 | +exports.getCustomCode = getCustomCode; | |
| 925 | +var getCustomCSS = function getCustomCSS(payload) { | |
| 725 | 926 | return request('ai_get_custom_css', { |
| 726 | 927 | payload: payload |
| 727 | 928 | }); |
| 728 | 929 | }; |
| 729 | -var setGetStarted = exports.setGetStarted = function setGetStarted() { | |
| 930 | +exports.getCustomCSS = getCustomCSS; | |
| 931 | +var setGetStarted = function setGetStarted() { | |
| 730 | 932 | return request('ai_set_get_started'); |
| 731 | 933 | }; |
| 732 | -var setStatusFeedback = exports.setStatusFeedback = function setStatusFeedback(responseId) { | |
| 934 | +exports.setGetStarted = setGetStarted; | |
| 935 | +var setStatusFeedback = function setStatusFeedback(responseId) { | |
| 733 | 936 | return request('ai_set_status_feedback', { |
| 734 | 937 | response_id: responseId |
| 735 | - }, true); | |
| 938 | + }); | |
| 736 | 939 | }; |
| 737 | -var getTextToImageGeneration = exports.getTextToImageGeneration = function getTextToImageGeneration(payload) { | |
| 940 | +exports.setStatusFeedback = setStatusFeedback; | |
| 941 | +var getTextToImageGeneration = function getTextToImageGeneration(payload) { | |
| 738 | 942 | return request('ai_get_text_to_image', { |
| 739 | 943 | payload: payload |
| 740 | 944 | }); |
| 741 | 945 | }; |
| 742 | -var getImageToImageGeneration = exports.getImageToImageGeneration = function getImageToImageGeneration(payload) { | |
| 946 | +exports.getTextToImageGeneration = getTextToImageGeneration; | |
| 947 | +var getImageToImageGeneration = function getImageToImageGeneration(payload) { | |
| 743 | 948 | return request('ai_get_image_to_image', { |
| 744 | 949 | payload: payload |
| 745 | 950 | }); |
| 746 | 951 | }; |
| 747 | -var getImageToImageMaskCleanup = exports.getImageToImageMaskCleanup = function getImageToImageMaskCleanup(payload) { | |
| 748 | - return request('ai_get_image_to_image_mask_cleanup', { | |
| 749 | - payload: payload | |
| 750 | - }); | |
| 751 | -}; | |
| 752 | -var getImageToImageMaskGeneration = exports.getImageToImageMaskGeneration = function getImageToImageMaskGeneration(payload) { | |
| 952 | +exports.getImageToImageGeneration = getImageToImageGeneration; | |
| 953 | +var getImageToImageMaskGeneration = function getImageToImageMaskGeneration(payload) { | |
| 753 | 954 | return request('ai_get_image_to_image_mask', { |
| 754 | 955 | payload: payload |
| 755 | 956 | }); |
| 756 | 957 | }; |
| 757 | -var getImageToImageOutPainting = exports.getImageToImageOutPainting = function getImageToImageOutPainting(payload) { | |
| 958 | +exports.getImageToImageMaskGeneration = getImageToImageMaskGeneration; | |
| 959 | +var getImageToImageOutPainting = function getImageToImageOutPainting(payload) { | |
| 758 | 960 | return request('ai_get_image_to_image_outpainting', { |
| 759 | 961 | payload: payload |
| 760 | 962 | }); |
| 761 | 963 | }; |
| 762 | -var getImageToImageUpscale = exports.getImageToImageUpscale = function getImageToImageUpscale(payload) { | |
| 964 | +exports.getImageToImageOutPainting = getImageToImageOutPainting; | |
| 965 | +var getImageToImageUpscale = function getImageToImageUpscale(payload) { | |
| 763 | 966 | return request('ai_get_image_to_image_upscale', { |
| 764 | 967 | payload: payload |
| 765 | 968 | }); |
| 766 | 969 | }; |
| 767 | -var getImageToImageRemoveBackground = exports.getImageToImageRemoveBackground = function getImageToImageRemoveBackground(payload) { | |
| 970 | +exports.getImageToImageUpscale = getImageToImageUpscale; | |
| 971 | +var getImageToImageRemoveBackground = function getImageToImageRemoveBackground(payload) { | |
| 768 | 972 | return request('ai_get_image_to_image_remove_background', { |
| 769 | 973 | payload: payload |
| 770 | 974 | }); |
| 771 | 975 | }; |
| 772 | -var getImageToImageIsolateObjects = exports.getImageToImageIsolateObjects = function getImageToImageIsolateObjects(payload) { | |
| 773 | - return request('ai_get_image_to_image_isolate_objects', { | |
| 774 | - payload: payload | |
| 775 | - }); | |
| 776 | -}; | |
| 777 | -var getImageToImageReplaceBackground = exports.getImageToImageReplaceBackground = function getImageToImageReplaceBackground(payload) { | |
| 976 | +exports.getImageToImageRemoveBackground = getImageToImageRemoveBackground; | |
| 977 | +var getImageToImageReplaceBackground = function getImageToImageReplaceBackground(payload) { | |
| 778 | 978 | return request('ai_get_image_to_image_replace_background', { |
| 779 | 979 | payload: payload |
| 780 | 980 | }); |
| 781 | 981 | }; |
| 782 | -var getImageToImageRemoveText = exports.getImageToImageRemoveText = function getImageToImageRemoveText(image) { | |
| 982 | +exports.getImageToImageReplaceBackground = getImageToImageReplaceBackground; | |
| 983 | +var getImageToImageRemoveText = function getImageToImageRemoveText(image) { | |
| 783 | 984 | return request('ai_get_image_to_image_remove_text', { |
| 784 | 985 | image: image |
| 785 | 986 | }); |
| 786 | 987 | }; |
| 787 | -var getImagePromptEnhanced = exports.getImagePromptEnhanced = function getImagePromptEnhanced(prompt) { | |
| 988 | +exports.getImageToImageRemoveText = getImageToImageRemoveText; | |
| 989 | +var getImagePromptEnhanced = function getImagePromptEnhanced(prompt) { | |
| 788 | 990 | return request('ai_get_image_prompt_enhancer', { |
| 789 | 991 | prompt: prompt |
| 790 | 992 | }); |
| 791 | 993 | }; |
| 792 | -var getProductImageUnification = exports.getProductImageUnification = function getProductImageUnification(payload, immediately) { | |
| 793 | - return request('ai_get_product_image_unification', { | |
| 794 | - payload: payload | |
| 795 | - }, immediately); | |
| 994 | +exports.getImagePromptEnhanced = getImagePromptEnhanced; | |
| 995 | +var uploadImage = function uploadImage(image) { | |
| 996 | + return request('ai_upload_image', _objectSpread({}, image)); | |
| 796 | 997 | }; |
| 797 | -var getAnimation = exports.getAnimation = function getAnimation(payload) { | |
| 798 | - return request('ai_get_animation', { | |
| 799 | - payload: payload | |
| 800 | - }); | |
| 801 | -}; | |
| 802 | -var uploadImage = exports.uploadImage = function uploadImage(image) { | |
| 803 | - return request('ai_upload_image', _objectSpread(_objectSpread({}, image), {}, { | |
| 804 | - editor_post_id: image.image.editor_post_id, | |
| 805 | - unique_id: image.image.unique_id | |
| 806 | - })); | |
| 807 | -}; | |
| 808 | 998 | |
| 809 | 999 | /** |
| 810 | 1000 | * @typedef {Object} AttachmentPropType - See ./types/attachment.js |
| 811 | 1001 | * @typedef {Object} requestBody |
| @@ -818,18 +1008,21 @@ | ||
| 818 | 1008 | /** |
| 819 | 1009 | * @param {requestBody} requestBody |
| 820 | 1010 | * @param {AbortSignal} [signal] |
| 821 | 1011 | */ |
| 822 | -var generateLayout = exports.generateLayout = function generateLayout(requestBody, signal) { | |
| 1012 | +exports.uploadImage = uploadImage; | |
| 1013 | +var generateLayout = function generateLayout(requestBody, signal) { | |
| 823 | 1014 | return request('ai_generate_layout', requestBody, true, signal); |
| 824 | 1015 | }; |
| 825 | -var getLayoutPromptEnhanced = exports.getLayoutPromptEnhanced = function getLayoutPromptEnhanced(prompt, enhanceType) { | |
| 1016 | +exports.generateLayout = generateLayout; | |
| 1017 | +var getLayoutPromptEnhanced = function getLayoutPromptEnhanced(prompt, enhanceType) { | |
| 826 | 1018 | return request('ai_get_layout_prompt_enhancer', { |
| 827 | 1019 | prompt: prompt, |
| 828 | 1020 | enhance_type: enhanceType |
| 829 | 1021 | }); |
| 830 | 1022 | }; |
| 831 | -var getHistory = exports.getHistory = function getHistory(type, page, limit) { | |
| 1023 | +exports.getLayoutPromptEnhanced = getLayoutPromptEnhanced; | |
| 1024 | +var getHistory = function getHistory(type, page, limit) { | |
| 832 | 1025 | return request('ai_get_history', { |
| 833 | 1026 | type: type, |
| 834 | 1027 | page: page, |
| 835 | 1028 | limit: limit |
| @@ -834,18 +1027,21 @@ | ||
| 834 | 1027 | page: page, |
| 835 | 1028 | limit: limit |
| 836 | 1029 | }); |
| 837 | 1030 | }; |
| 838 | -var deleteHistoryItem = exports.deleteHistoryItem = function deleteHistoryItem(id) { | |
| 1031 | +exports.getHistory = getHistory; | |
| 1032 | +var deleteHistoryItem = function deleteHistoryItem(id) { | |
| 839 | 1033 | return request('ai_delete_history_item', { |
| 840 | 1034 | id: id |
| 841 | 1035 | }); |
| 842 | 1036 | }; |
| 843 | -var toggleFavoriteHistoryItem = exports.toggleFavoriteHistoryItem = function toggleFavoriteHistoryItem(id) { | |
| 1037 | +exports.deleteHistoryItem = deleteHistoryItem; | |
| 1038 | +var toggleFavoriteHistoryItem = function toggleFavoriteHistoryItem(id) { | |
| 844 | 1039 | return request('ai_toggle_favorite_history_item', { |
| 845 | 1040 | id: id |
| 846 | 1041 | }); |
| 847 | 1042 | }; |
| 1043 | +exports.toggleFavoriteHistoryItem = toggleFavoriteHistoryItem; | |
| 848 | 1044 | |
| 849 | 1045 | /***/ }), |
| 850 | 1046 | |
| 851 | 1047 | /***/ "../modules/ai/assets/js/editor/components/alert-dialog.js": |
| @@ -867,10 +1063,11 @@ | ||
| 867 | 1063 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 868 | 1064 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 869 | 1065 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 870 | 1066 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 871 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 872 | -var AlertDialog = exports.AlertDialog = function AlertDialog(props) { | |
| 1067 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 1068 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 1069 | +var AlertDialog = function AlertDialog(props) { | |
| 873 | 1070 | var _useState = (0, _react.useState)(true), |
| 874 | 1071 | _useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| 875 | 1072 | isShown = _useState2[0], |
| 876 | 1073 | setIsShown = _useState2[1]; |
| @@ -899,12 +1096,13 @@ | ||
| 899 | 1096 | color: "primary", |
| 900 | 1097 | onClick: function onClick() { |
| 901 | 1098 | var _props$onClose; |
| 902 | 1099 | setIsShown(false); |
| 903 | - (_props$onClose = props.onClose) === null || _props$onClose === void 0 || _props$onClose.call(props); | |
| 1100 | + (_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props); | |
| 904 | 1101 | } |
| 905 | 1102 | }, (0, _i18n.__)('Close', 'elementor'))))); |
| 906 | 1103 | }; |
| 1104 | +exports.AlertDialog = AlertDialog; | |
| 907 | 1105 | AlertDialog.propTypes = { |
| 908 | 1106 | message: _propTypes.default.string.isRequired, |
| 909 | 1107 | onClose: _propTypes.default.func |
| 910 | 1108 | }; |
| @@ -950,11 +1148,8 @@ | ||
| 950 | 1148 | } |
| 951 | 1149 | }; |
| 952 | 1150 | }); |
| 953 | 1151 | var DialogHeader = function DialogHeader(props) { |
| 954 | - var hideAiBetaLogo = props.hideAiBetaLogo, | |
| 955 | - onClose = props.onClose, | |
| 956 | - children = props.children; | |
| 957 | 1152 | return /*#__PURE__*/_react.default.createElement(_ui.AppBar, { |
| 958 | 1153 | sx: { |
| 959 | 1154 | fontWeight: 'normal' |
| 960 | 1155 | }, |
| @@ -961,9 +1156,9 @@ | ||
| 961 | 1156 | color: "transparent", |
| 962 | 1157 | position: "relative" |
| 963 | 1158 | }, /*#__PURE__*/_react.default.createElement(_ui.Toolbar, { |
| 964 | 1159 | variant: "dense" |
| 965 | - }, !hideAiBetaLogo && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(StyledElementorLogo, { | |
| 1160 | + }, /*#__PURE__*/_react.default.createElement(StyledElementorLogo, { | |
| 966 | 1161 | sx: { |
| 967 | 1162 | mr: 1 |
| 968 | 1163 | } |
| 969 | 1164 | }), /*#__PURE__*/_react.default.createElement(_ui.Typography, { |
| @@ -979,19 +1174,19 @@ | ||
| 979 | 1174 | size: "small", |
| 980 | 1175 | sx: { |
| 981 | 1176 | ml: 1 |
| 982 | 1177 | } |
| 983 | - })), /*#__PURE__*/_react.default.createElement(_ui.Stack, { | |
| 1178 | + }), /*#__PURE__*/_react.default.createElement(_ui.Stack, { | |
| 984 | 1179 | direction: "row", |
| 985 | 1180 | spacing: 1, |
| 986 | 1181 | alignItems: "center", |
| 987 | 1182 | sx: { |
| 988 | - ml: hideAiBetaLogo ? 0 : 'auto' | |
| 1183 | + ml: 'auto' | |
| 989 | 1184 | } |
| 990 | - }, children, /*#__PURE__*/_react.default.createElement(_ui.IconButton, { | |
| 1185 | + }, props.children, /*#__PURE__*/_react.default.createElement(_ui.IconButton, { | |
| 991 | 1186 | size: "small", |
| 992 | 1187 | "aria-label": "close", |
| 993 | - onClick: onClose, | |
| 1188 | + onClick: props.onClose, | |
| 994 | 1189 | sx: { |
| 995 | 1190 | '&.MuiButtonBase-root': { |
| 996 | 1191 | mr: -1 |
| 997 | 1192 | } |
| @@ -999,12 +1194,12 @@ | ||
| 999 | 1194 | }, /*#__PURE__*/_react.default.createElement(_icons.XIcon, null))))); |
| 1000 | 1195 | }; |
| 1001 | 1196 | DialogHeader.propTypes = { |
| 1002 | 1197 | onClose: _propTypes.default.func.isRequired, |
| 1003 | - hideAiBetaLogo: _propTypes.default.bool, | |
| 1004 | 1198 | children: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.node), _propTypes.default.node]) |
| 1005 | 1199 | }; |
| 1006 | -var _default = exports["default"] = DialogHeader; | |
| 1200 | +var _default = DialogHeader; | |
| 1201 | +exports["default"] = _default; | |
| 1007 | 1202 | |
| 1008 | 1203 | /***/ }), |
| 1009 | 1204 | |
| 1010 | 1205 | /***/ "../modules/ai/assets/js/editor/components/loader.js": |
| @@ -1027,10 +1222,10 @@ | ||
| 1027 | 1222 | var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "../node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); |
| 1028 | 1223 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 1029 | 1224 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 1030 | 1225 | var _excluded = ["sx", "BoxProps"]; |
| 1031 | -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 1032 | -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 1226 | +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; } | |
| 1227 | +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) { (0, _defineProperty2.default)(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; } | |
| 1033 | 1228 | var Loader = function Loader(_ref) { |
| 1034 | 1229 | var _ref$sx = _ref.sx, |
| 1035 | 1230 | sx = _ref$sx === void 0 ? {} : _ref$sx, |
| 1036 | 1231 | _ref$BoxProps = _ref.BoxProps, |
| @@ -1058,9 +1253,10 @@ | ||
| 1058 | 1253 | Loader.propTypes = { |
| 1059 | 1254 | sx: _propTypes.default.object, |
| 1060 | 1255 | BoxProps: _propTypes.default.object |
| 1061 | 1256 | }; |
| 1062 | -var _default = exports["default"] = Loader; | |
| 1257 | +var _default = Loader; | |
| 1258 | +exports["default"] = _default; | |
| 1063 | 1259 | |
| 1064 | 1260 | /***/ }), |
| 1065 | 1261 | |
| 1066 | 1262 | /***/ "../modules/ai/assets/js/editor/components/prompt-dialog.js": |
| @@ -1085,11 +1281,12 @@ | ||
| 1085 | 1281 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 1086 | 1282 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 1087 | 1283 | var _reactDraggable = _interopRequireDefault(__webpack_require__(/*! react-draggable */ "../node_modules/react-draggable/build/cjs/cjs.js")); |
| 1088 | 1284 | var _dialogHeader = _interopRequireDefault(__webpack_require__(/*! ./dialog-header */ "../modules/ai/assets/js/editor/components/dialog-header.js")); |
| 1089 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 1090 | -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 1091 | -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 1285 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 1286 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 1287 | +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; } | |
| 1288 | +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) { (0, _defineProperty2.default)(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; } | |
| 1092 | 1289 | var DraggablePaper = function DraggablePaper(props) { |
| 1093 | 1290 | var _useState = (0, _react.useState)({ |
| 1094 | 1291 | x: 0, |
| 1095 | 1292 | y: 0 |
| @@ -1168,9 +1365,10 @@ | ||
| 1168 | 1365 | maxWidth: _propTypes.default.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]) |
| 1169 | 1366 | }; |
| 1170 | 1367 | PromptDialog.Header = _dialogHeader.default; |
| 1171 | 1368 | PromptDialog.Content = _ui.DialogContent; |
| 1172 | -var _default = exports["default"] = PromptDialog; | |
| 1369 | +var _default = PromptDialog; | |
| 1370 | +exports["default"] = _default; | |
| 1173 | 1371 | |
| 1174 | 1372 | /***/ }), |
| 1175 | 1373 | |
| 1176 | 1374 | /***/ "../modules/ai/assets/js/editor/components/prompt-error-message.js": |
| @@ -1297,18 +1495,8 @@ | ||
| 1297 | 1495 | }, |
| 1298 | 1496 | file_too_large: { |
| 1299 | 1497 | text: /*#__PURE__*/_react.default.createElement(_ui.AlertTitle, null, (0, _i18n.__)('The file is too large.', 'elementor')), |
| 1300 | 1498 | description: (0, _i18n.__)('Please upload a file that is less than 4MB.', 'elementor') |
| 1301 | - }, | |
| 1302 | - image_resolution_maximum_exceeded: { | |
| 1303 | - text: /*#__PURE__*/_react.default.createElement(_ui.AlertTitle, null, (0, _i18n.__)('The image resolution exceeds the maximum allowed size.', 'elementor')), | |
| 1304 | - description: (0, _i18n.__)('Please upload a file with dimensions less than 2048x2048 pixels.', 'elementor') | |
| 1305 | - }, | |
| 1306 | - external_service_unavailable: { | |
| 1307 | - text: /*#__PURE__*/_react.default.createElement(_ui.AlertTitle, null, (0, _i18n.__)('Temporary external service issue', 'elementor')), | |
| 1308 | - description: (0, _i18n.__)('It seems that one of our partner services is temporarily unavailable. Please try again in a few minutes.', 'elementor'), | |
| 1309 | - buttonText: (0, _i18n.__)('Try Again', 'elementor'), | |
| 1310 | - buttonAction: onRetry | |
| 1311 | 1499 | } |
| 1312 | 1500 | }; |
| 1313 | 1501 | return messages[errMsg] || messages.default; |
| 1314 | 1502 | } |
| @@ -1332,9 +1520,10 @@ | ||
| 1332 | 1520 | error: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]), |
| 1333 | 1521 | onRetry: _propTypes.default.func, |
| 1334 | 1522 | actionPosition: _propTypes.default.oneOf(['default', 'bottom']) |
| 1335 | 1523 | }; |
| 1336 | -var _default = exports["default"] = PromptErrorMessage; | |
| 1524 | +var _default = PromptErrorMessage; | |
| 1525 | +exports["default"] = _default; | |
| 1337 | 1526 | |
| 1338 | 1527 | /***/ }), |
| 1339 | 1528 | |
| 1340 | 1529 | /***/ "../modules/ai/assets/js/editor/components/prompt-library-link.js": |
| @@ -1367,9 +1556,10 @@ | ||
| 1367 | 1556 | }; |
| 1368 | 1557 | PromptLibraryLink.propTypes = { |
| 1369 | 1558 | libraryLink: _propTypes.default.string |
| 1370 | 1559 | }; |
| 1371 | -var _default = exports["default"] = PromptLibraryLink; | |
| 1560 | +var _default = PromptLibraryLink; | |
| 1561 | +exports["default"] = _default; | |
| 1372 | 1562 | |
| 1373 | 1563 | /***/ }), |
| 1374 | 1564 | |
| 1375 | 1565 | /***/ "../modules/ai/assets/js/editor/components/upgrade-chip.js": |
| @@ -1392,9 +1582,10 @@ | ||
| 1392 | 1582 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 1393 | 1583 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 1394 | 1584 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 1395 | 1585 | var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); |
| 1396 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 1586 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 1587 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 1397 | 1588 | var popoverId = 'e-ai-upgrade-popover'; |
| 1398 | 1589 | var StyledContent = (0, _ui.styled)(_ui.Paper)(function (_ref) { |
| 1399 | 1590 | var theme = _ref.theme; |
| 1400 | 1591 | return { |
| @@ -1492,9 +1683,9 @@ | ||
| 1492 | 1683 | }), /*#__PURE__*/_react.default.createElement(_ui.Popper, { |
| 1493 | 1684 | open: isPopoverOpen, |
| 1494 | 1685 | anchorEl: anchorEl.current, |
| 1495 | 1686 | sx: { |
| 1496 | - zIndex: '170001', | |
| 1687 | + zIndex: '9999', | |
| 1497 | 1688 | maxWidth: 300 |
| 1498 | 1689 | }, |
| 1499 | 1690 | modifiers: [{ |
| 1500 | 1691 | name: 'arrow', |
| @@ -1539,9 +1730,10 @@ | ||
| 1539 | 1730 | } |
| 1540 | 1731 | } |
| 1541 | 1732 | }, actionLabel)))); |
| 1542 | 1733 | }; |
| 1543 | -var _default = exports["default"] = UpgradeChip; | |
| 1734 | +var _default = UpgradeChip; | |
| 1735 | +exports["default"] = _default; | |
| 1544 | 1736 | UpgradeChip.propTypes = { |
| 1545 | 1737 | hasSubscription: _propTypes.default.bool, |
| 1546 | 1738 | usagePercentage: _propTypes.default.number |
| 1547 | 1739 | }; |
| @@ -1568,11 +1760,11 @@ | ||
| 1568 | 1760 | var _bulbIcon = _interopRequireDefault(__webpack_require__(/*! ../icons/bulb-icon */ "../modules/ai/assets/js/editor/icons/bulb-icon.js")); |
| 1569 | 1761 | var _useIntroduction2 = _interopRequireDefault(__webpack_require__(/*! ../hooks/use-introduction */ "../modules/ai/assets/js/editor/hooks/use-introduction.js")); |
| 1570 | 1762 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 1571 | 1763 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 1572 | -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 1573 | -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 1574 | -var VoicePromotionAlert = exports.VoicePromotionAlert = function VoicePromotionAlert(props) { | |
| 1764 | +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; } | |
| 1765 | +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) { (0, _defineProperty2.default)(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; } | |
| 1766 | +var VoicePromotionAlert = function VoicePromotionAlert(props) { | |
| 1575 | 1767 | var _useIntroduction = (0, _useIntroduction2.default)(props.introductionKey), |
| 1576 | 1768 | isViewed = _useIntroduction.isViewed, |
| 1577 | 1769 | markAsViewed = _useIntroduction.markAsViewed; |
| 1578 | 1770 | if (isViewed) { |
| @@ -1603,13 +1795,15 @@ | ||
| 1603 | 1795 | color: "info.main", |
| 1604 | 1796 | href: "#" |
| 1605 | 1797 | }, (0, _i18n.__)('Let’s do it', 'elementor')))); |
| 1606 | 1798 | }; |
| 1799 | +exports.VoicePromotionAlert = VoicePromotionAlert; | |
| 1607 | 1800 | VoicePromotionAlert.propTypes = { |
| 1608 | 1801 | sx: _propTypes.default.object, |
| 1609 | 1802 | introductionKey: _propTypes.default.string |
| 1610 | 1803 | }; |
| 1611 | -var _default = exports["default"] = VoicePromotionAlert; | |
| 1804 | +var _default = VoicePromotionAlert; | |
| 1805 | +exports["default"] = _default; | |
| 1612 | 1806 | |
| 1613 | 1807 | /***/ }), |
| 1614 | 1808 | |
| 1615 | 1809 | /***/ "../modules/ai/assets/js/editor/components/wizard-dialog.js": |
| @@ -1633,10 +1827,10 @@ | ||
| 1633 | 1827 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 1634 | 1828 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 1635 | 1829 | var _dialogHeader = _interopRequireDefault(__webpack_require__(/*! ./dialog-header */ "../modules/ai/assets/js/editor/components/dialog-header.js")); |
| 1636 | 1830 | var _excluded = ["sx"]; |
| 1637 | -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 1638 | -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 1831 | +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; } | |
| 1832 | +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) { (0, _defineProperty2.default)(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; } | |
| 1639 | 1833 | var WizardDialog = function WizardDialog(props) { |
| 1640 | 1834 | return /*#__PURE__*/_react.default.createElement(_ui.Dialog, { |
| 1641 | 1835 | open: true, |
| 1642 | 1836 | onClose: props.onClose, |
| @@ -1673,9 +1867,10 @@ | ||
| 1673 | 1867 | sx: _propTypes.default.object |
| 1674 | 1868 | }; |
| 1675 | 1869 | WizardDialog.Header = _dialogHeader.default; |
| 1676 | 1870 | WizardDialog.Content = WizardDialogContent; |
| 1677 | -var _default = exports["default"] = WizardDialog; | |
| 1871 | +var _default = WizardDialog; | |
| 1872 | +exports["default"] = _default; | |
| 1678 | 1873 | |
| 1679 | 1874 | /***/ }), |
| 1680 | 1875 | |
| 1681 | 1876 | /***/ "../modules/ai/assets/js/editor/context/requests-ids.js": |
| @@ -1697,11 +1892,13 @@ | ||
| 1697 | 1892 | exports.useRequestIds = exports.getUniqueId = void 0; |
| 1698 | 1893 | var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 1699 | 1894 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 1700 | 1895 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 1701 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 1896 | +var _window$ElementorAiCo; | |
| 1897 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 1898 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 1702 | 1899 | var Context = (0, _react.createContext)({}); |
| 1703 | -var useRequestIds = exports.useRequestIds = function useRequestIds() { | |
| 1900 | +var useRequestIds = function useRequestIds() { | |
| 1704 | 1901 | var context = (0, _react.useContext)(Context); |
| 1705 | 1902 | if (!context) { |
| 1706 | 1903 | throw new Error('useRequestIds must be used within a RequestIdsProvider'); |
| 1707 | 1904 | } |
| @@ -1706,12 +1903,14 @@ | ||
| 1706 | 1903 | throw new Error('useRequestIds must be used within a RequestIdsProvider'); |
| 1707 | 1904 | } |
| 1708 | 1905 | return context; |
| 1709 | 1906 | }; |
| 1710 | -var getUniqueId = exports.getUniqueId = function getUniqueId(prefix) { | |
| 1907 | +exports.useRequestIds = useRequestIds; | |
| 1908 | +var getUniqueId = function getUniqueId(prefix) { | |
| 1711 | 1909 | return prefix + '-' + Math.random().toString(16).substr(2, 7); |
| 1712 | 1910 | }; |
| 1713 | -window.EDITOR_SESSION_ID = window.EDITOR_SESSION_ID || getUniqueId('editor-session'); | |
| 1911 | +exports.getUniqueId = getUniqueId; | |
| 1912 | +window.EDITOR_SESSION_ID = window.EDITOR_SESSION_ID || ((_window$ElementorAiCo = window.ElementorAiConfig) === null || _window$ElementorAiCo === void 0 ? void 0 : _window$ElementorAiCo.client_session_id) || getUniqueId('editor-session'); | |
| 1714 | 1913 | function generateIds(template) { |
| 1715 | 1914 | var _template$elements; |
| 1716 | 1915 | template.id = getUniqueId().toString(); |
| 1717 | 1916 | if ((_template$elements = template.elements) !== null && _template$elements !== void 0 && _template$elements.length) { |
| @@ -1720,9 +1919,9 @@ | ||
| 1720 | 1919 | }); |
| 1721 | 1920 | } |
| 1722 | 1921 | return template; |
| 1723 | 1922 | } |
| 1724 | -var RequestIdsProvider = exports.RequestIdsProvider = function RequestIdsProvider(props) { | |
| 1923 | +var RequestIdsProvider = function RequestIdsProvider(props) { | |
| 1725 | 1924 | var editorSessionId = (0, _react.useRef)(window.EDITOR_SESSION_ID); |
| 1726 | 1925 | var sessionId = (0, _react.useRef)(''); |
| 1727 | 1926 | var generateId = (0, _react.useRef)(''); |
| 1728 | 1927 | var batchId = (0, _react.useRef)(''); |
| @@ -1761,12 +1960,14 @@ | ||
| 1761 | 1960 | updateUsagePercentage: updateUsagePercentage |
| 1762 | 1961 | } |
| 1763 | 1962 | }, props.children); |
| 1764 | 1963 | }; |
| 1964 | +exports.RequestIdsProvider = RequestIdsProvider; | |
| 1765 | 1965 | RequestIdsProvider.propTypes = { |
| 1766 | 1966 | children: _propTypes.default.node.isRequired |
| 1767 | 1967 | }; |
| 1768 | -var _default = exports["default"] = Context; | |
| 1968 | +var _default = Context; | |
| 1969 | +exports["default"] = _default; | |
| 1769 | 1970 | |
| 1770 | 1971 | /***/ }), |
| 1771 | 1972 | |
| 1772 | 1973 | /***/ "../modules/ai/assets/js/editor/hooks/use-introduction.js": |
| @@ -1785,10 +1986,10 @@ | ||
| 1785 | 1986 | exports["default"] = useIntroduction; |
| 1786 | 1987 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 1787 | 1988 | var _react = __webpack_require__(/*! react */ "react"); |
| 1788 | 1989 | function useIntroduction(key) { |
| 1789 | - var _window$elementor$con, _window$elementorAdmi, _globalConfig$introdu; | |
| 1790 | - var globalConfig = window.elementor ? (_window$elementor$con = window.elementor.config) === null || _window$elementor$con === void 0 ? void 0 : _window$elementor$con.user : (_window$elementorAdmi = window.elementorAdmin) === null || _window$elementorAdmi === void 0 || (_window$elementorAdmi = _window$elementorAdmi.config) === null || _window$elementorAdmi === void 0 ? void 0 : _window$elementorAdmi.user; | |
| 1990 | + var _window$elementor$con, _window$elementorAdmi, _window$elementorAdmi2, _globalConfig$introdu; | |
| 1991 | + var globalConfig = window.elementor ? (_window$elementor$con = window.elementor.config) === null || _window$elementor$con === void 0 ? void 0 : _window$elementor$con.user : (_window$elementorAdmi = window.elementorAdmin) === null || _window$elementorAdmi === void 0 ? void 0 : (_window$elementorAdmi2 = _window$elementorAdmi.config) === null || _window$elementorAdmi2 === void 0 ? void 0 : _window$elementorAdmi2.user; | |
| 1791 | 1992 | var _useState = (0, _react.useState)(!!(globalConfig !== null && globalConfig !== void 0 && (_globalConfig$introdu = globalConfig.introduction) !== null && _globalConfig$introdu !== void 0 && _globalConfig$introdu[key])), |
| 1792 | 1993 | _useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| 1793 | 1994 | isViewed = _useState2[0], |
| 1794 | 1995 | setIsViewed = _useState2[1]; |
| @@ -1873,9 +2074,10 @@ | ||
| 1873 | 2074 | isEnhancing: isEnhancing, |
| 1874 | 2075 | enhancedPrompt: enhancedData === null || enhancedData === void 0 ? void 0 : enhancedData.result |
| 1875 | 2076 | }; |
| 1876 | 2077 | }; |
| 1877 | -var _default = exports["default"] = usePromptEnhancer; | |
| 2078 | +var _default = usePromptEnhancer; | |
| 2079 | +exports["default"] = _default; | |
| 1878 | 2080 | |
| 1879 | 2081 | /***/ }), |
| 1880 | 2082 | |
| 1881 | 2083 | /***/ "../modules/ai/assets/js/editor/hooks/use-prompt.js": |
| @@ -1900,10 +2102,10 @@ | ||
| 1900 | 2102 | var _react = __webpack_require__(/*! react */ "react"); |
| 1901 | 2103 | var _api = __webpack_require__(/*! ../api */ "../modules/ai/assets/js/editor/api/index.js"); |
| 1902 | 2104 | var _requestsIds = __webpack_require__(/*! ../context/requests-ids */ "../modules/ai/assets/js/editor/context/requests-ids.js"); |
| 1903 | 2105 | var _excluded = ["text", "response_id", "usage", "images"]; |
| 1904 | -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 1905 | -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 2106 | +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; } | |
| 2107 | +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) { (0, _defineProperty2.default)(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; } | |
| 1906 | 2108 | var normalizeResponse = function normalizeResponse(_ref) { |
| 1907 | 2109 | var text = _ref.text, |
| 1908 | 2110 | responseId = _ref.response_id, |
| 1909 | 2111 | usage = _ref.usage, |
| @@ -1939,25 +2141,8 @@ | ||
| 1939 | 2141 | setData = _useState6[1]; |
| 1940 | 2142 | var _useRequestIds = (0, _requestsIds.useRequestIds)(), |
| 1941 | 2143 | updateUsagePercentage = _useRequestIds.updateUsagePercentage, |
| 1942 | 2144 | usagePercentage = _useRequestIds.usagePercentage; |
| 1943 | - var send = (0, _react.useRef)(/*#__PURE__*/function () { | |
| 1944 | - var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(payload) { | |
| 1945 | - return _regenerator.default.wrap(function (_context) { | |
| 1946 | - while (1) switch (_context.prev = _context.next) { | |
| 1947 | - case 0: | |
| 1948 | - return _context.abrupt("return", payload); | |
| 1949 | - case 1: | |
| 1950 | - case "end": | |
| 1951 | - return _context.stop(); | |
| 1952 | - } | |
| 1953 | - }, _callee); | |
| 1954 | - })); | |
| 1955 | - return function (_x) { | |
| 1956 | - return _ref2.apply(this, arguments); | |
| 1957 | - }; | |
| 1958 | - }()); | |
| 1959 | - var sendUsageData = (0, _react.useRef)(function () {}); | |
| 1960 | 2145 | (0, _react.useEffect)(function () { |
| 1961 | 2146 | var newUsageValue = data === null || data === void 0 ? void 0 : data.usagePercentage; |
| 1962 | 2147 | if (newUsageValue && newUsageValue !== usagePercentage) { |
| 1963 | 2148 | updateUsagePercentage(newUsageValue); |
| @@ -1968,14 +2153,14 @@ | ||
| 1968 | 2153 | editorSessionId = _useRequestIds2.editorSessionId, |
| 1969 | 2154 | sessionId = _useRequestIds2.sessionId, |
| 1970 | 2155 | generateId = _useRequestIds2.generateId, |
| 1971 | 2156 | batchId = _useRequestIds2.batchId; |
| 1972 | - send.current = (0, _react.useCallback)(/*#__PURE__*/function () { | |
| 1973 | - var _ref3 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2(payload) { | |
| 1974 | - return _regenerator.default.wrap(function (_context2) { | |
| 1975 | - while (1) switch (_context2.prev = _context2.next) { | |
| 2157 | + var send = /*#__PURE__*/function () { | |
| 2158 | + var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(payload) { | |
| 2159 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 2160 | + while (1) switch (_context.prev = _context.next) { | |
| 1976 | 2161 | case 0: |
| 1977 | - return _context2.abrupt("return", new Promise(function (resolve, reject) { | |
| 2162 | + return _context.abrupt("return", new Promise(function (resolve, reject) { | |
| 1978 | 2163 | setError(''); |
| 1979 | 2164 | setIsLoading(true); |
| 1980 | 2165 | var requestId = setRequest(); |
| 1981 | 2166 | var requestIds = { |
| @@ -2001,23 +2186,23 @@ | ||
| 2001 | 2186 | }); |
| 2002 | 2187 | })); |
| 2003 | 2188 | case 1: |
| 2004 | 2189 | case "end": |
| 2005 | - return _context2.stop(); | |
| 2190 | + return _context.stop(); | |
| 2006 | 2191 | } |
| 2007 | - }, _callee2); | |
| 2192 | + }, _callee); | |
| 2008 | 2193 | })); |
| 2009 | - return function (_x2) { | |
| 2010 | - return _ref3.apply(this, arguments); | |
| 2194 | + return function send(_x) { | |
| 2195 | + return _ref2.apply(this, arguments); | |
| 2011 | 2196 | }; |
| 2012 | - }(), [batchId, editorSessionId, fetchData, generateId, sessionId, setRequest]); | |
| 2013 | - sendUsageData.current = (0, _react.useCallback)(function () { | |
| 2197 | + }(); | |
| 2198 | + var sendUsageData = function sendUsageData() { | |
| 2014 | 2199 | var usageData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : data; |
| 2015 | 2200 | return usageData.responseId && (0, _api.setStatusFeedback)(usageData.responseId); |
| 2016 | - }, [data]); | |
| 2201 | + }; | |
| 2017 | 2202 | var reset = function reset() { |
| 2018 | - setData(function (_ref4) { | |
| 2019 | - var credits = _ref4.credits; | |
| 2203 | + setData(function (_ref3) { | |
| 2204 | + var credits = _ref3.credits; | |
| 2020 | 2205 | return { |
| 2021 | 2206 | credits: credits, |
| 2022 | 2207 | result: '', |
| 2023 | 2208 | responseId: '' |
| @@ -2040,13 +2225,14 @@ | ||
| 2040 | 2225 | error: error, |
| 2041 | 2226 | data: data, |
| 2042 | 2227 | setResult: setResult, |
| 2043 | 2228 | reset: reset, |
| 2044 | - send: send.current, | |
| 2045 | - sendUsageData: sendUsageData.current | |
| 2229 | + send: send, | |
| 2230 | + sendUsageData: sendUsageData | |
| 2046 | 2231 | }; |
| 2047 | 2232 | }; |
| 2048 | -var _default = exports["default"] = usePrompt; | |
| 2233 | +var _default = usePrompt; | |
| 2234 | +exports["default"] = _default; | |
| 2049 | 2235 | |
| 2050 | 2236 | /***/ }), |
| 2051 | 2237 | |
| 2052 | 2238 | /***/ "../modules/ai/assets/js/editor/hooks/use-timeout.js": |
| @@ -2064,9 +2250,9 @@ | ||
| 2064 | 2250 | })); |
| 2065 | 2251 | exports.useTimeout = void 0; |
| 2066 | 2252 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 2067 | 2253 | var _react = __webpack_require__(/*! react */ "react"); |
| 2068 | -var useTimeout = exports.useTimeout = function useTimeout(delay) { | |
| 2254 | +var useTimeout = function useTimeout(delay) { | |
| 2069 | 2255 | var _useState = (0, _react.useState)(false), |
| 2070 | 2256 | _useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| 2071 | 2257 | isTimeout = _useState2[0], |
| 2072 | 2258 | setIsTimeout = _useState2[1]; |
| @@ -2084,8 +2270,9 @@ | ||
| 2084 | 2270 | }; |
| 2085 | 2271 | }, [delay]); |
| 2086 | 2272 | return [isTimeout, turnOffTimeout]; |
| 2087 | 2273 | }; |
| 2274 | +exports.useTimeout = useTimeout; | |
| 2088 | 2275 | |
| 2089 | 2276 | /***/ }), |
| 2090 | 2277 | |
| 2091 | 2278 | /***/ "../modules/ai/assets/js/editor/hooks/use-user-info.js": |
| @@ -2108,10 +2295,10 @@ | ||
| 2108 | 2295 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 2109 | 2296 | var _react = __webpack_require__(/*! react */ "react"); |
| 2110 | 2297 | var _api = __webpack_require__(/*! ../api */ "../modules/ai/assets/js/editor/api/index.js"); |
| 2111 | 2298 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 2112 | -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 2113 | -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 2299 | +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; } | |
| 2300 | +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) { (0, _defineProperty2.default)(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; } | |
| 2114 | 2301 | var useUserInfo = function useUserInfo() { |
| 2115 | 2302 | var immediately = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; |
| 2116 | 2303 | var _useState = (0, _react.useState)(false), |
| 2117 | 2304 | _useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| @@ -2134,19 +2321,19 @@ | ||
| 2134 | 2321 | _useState6 = (0, _slicedToArray2.default)(_useState5, 2), |
| 2135 | 2322 | userInfo = _useState6[0], |
| 2136 | 2323 | setUserInfo = _useState6[1]; |
| 2137 | 2324 | var credits = userInfo.usage.quota - userInfo.usage.usedQuota; |
| 2138 | - var usagePercentage = userInfo.usage.quota ? userInfo.usage.usedQuota / userInfo.usage.quota * 100 : 0; | |
| 2325 | + var usagePercentage = userInfo.usage.usedQuota / userInfo.usage.quota * 100; | |
| 2139 | 2326 | var fetchData = /*#__PURE__*/function () { |
| 2140 | - var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 2327 | + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 2141 | 2328 | var userInfoResult; |
| 2142 | - return _regenerator.default.wrap(function (_context) { | |
| 2329 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 2143 | 2330 | while (1) switch (_context.prev = _context.next) { |
| 2144 | 2331 | case 0: |
| 2145 | 2332 | setIsLoading(true); |
| 2146 | - _context.next = 1; | |
| 2333 | + _context.next = 3; | |
| 2147 | 2334 | return (0, _api.getUserInformation)(immediately); |
| 2148 | - case 1: | |
| 2335 | + case 3: | |
| 2149 | 2336 | userInfoResult = _context.sent; |
| 2150 | 2337 | setUserInfo(function (prevState) { |
| 2151 | 2338 | return _objectSpread(_objectSpread({}, prevState), userInfoResult); |
| 2152 | 2339 | }); |
| @@ -2151,9 +2338,9 @@ | ||
| 2151 | 2338 | return _objectSpread(_objectSpread({}, prevState), userInfoResult); |
| 2152 | 2339 | }); |
| 2153 | 2340 | setIsLoaded(true); |
| 2154 | 2341 | setIsLoading(false); |
| 2155 | - case 2: | |
| 2342 | + case 7: | |
| 2156 | 2343 | case "end": |
| 2157 | 2344 | return _context.stop(); |
| 2158 | 2345 | } |
| 2159 | 2346 | }, _callee); |
| @@ -2180,9 +2367,10 @@ | ||
| 2180 | 2367 | }; |
| 2181 | 2368 | useUserInfo.propTypes = { |
| 2182 | 2369 | immediately: _propTypes.default.bool |
| 2183 | 2370 | }; |
| 2184 | -var _default = exports["default"] = useUserInfo; | |
| 2371 | +var _default = useUserInfo; | |
| 2372 | +exports["default"] = _default; | |
| 2185 | 2373 | |
| 2186 | 2374 | /***/ }), |
| 2187 | 2375 | |
| 2188 | 2376 | /***/ "../modules/ai/assets/js/editor/icons/arrow-left-icon.js": |
| @@ -2212,9 +2400,10 @@ | ||
| 2212 | 2400 | clipRule: "evenodd", |
| 2213 | 2401 | d: "M9.53033 7.46967C9.82322 7.76256 9.82322 8.23744 9.53033 8.53033L6.81066 11.25H19C19.4142 11.25 19.75 11.5858 19.75 12C19.75 12.4142 19.4142 12.75 19 12.75H6.81066L9.53033 15.4697C9.82322 15.7626 9.82322 16.2374 9.53033 16.5303C9.23744 16.8232 8.76256 16.8232 8.46967 16.5303L4.46967 12.5303C4.17678 12.2374 4.17678 11.7626 4.46967 11.4697L8.46967 7.46967C8.76256 7.17678 9.23744 7.17678 9.53033 7.46967Z" |
| 2214 | 2402 | })); |
| 2215 | 2403 | }); |
| 2216 | -var _default = exports["default"] = ArrowLeftIcon; | |
| 2404 | +var _default = ArrowLeftIcon; | |
| 2405 | +exports["default"] = _default; | |
| 2217 | 2406 | |
| 2218 | 2407 | /***/ }), |
| 2219 | 2408 | |
| 2220 | 2409 | /***/ "../modules/ai/assets/js/editor/icons/bulb-icon.js": |
| @@ -2270,9 +2459,10 @@ | ||
| 2270 | 2459 | height: "22", |
| 2271 | 2460 | fill: "white" |
| 2272 | 2461 | }))))); |
| 2273 | 2462 | }); |
| 2274 | -var _default = exports["default"] = BulbIcon; | |
| 2463 | +var _default = BulbIcon; | |
| 2464 | +exports["default"] = _default; | |
| 2275 | 2465 | |
| 2276 | 2466 | /***/ }), |
| 2277 | 2467 | |
| 2278 | 2468 | /***/ "../modules/ai/assets/js/editor/icons/copy-page-icon.js": |
| @@ -2302,9 +2492,10 @@ | ||
| 2302 | 2492 | clipRule: "evenodd", |
| 2303 | 2493 | d: "M16.6667 0.208496C17.0534 0.208496 17.4244 0.362142 17.6979 0.635632C17.9714 0.909123 18.125 1.28006 18.125 1.66683V11.6668C18.125 12.0536 17.9714 12.4245 17.6979 12.698C17.4244 12.9715 17.0534 13.1252 16.6667 13.1252H14.7917V16.6668C14.7917 17.0536 14.638 17.4245 14.3645 17.698C14.091 17.9715 13.7201 18.1252 13.3333 18.1252H3.33333C2.94656 18.1252 2.57563 17.9715 2.30214 17.698C2.02865 17.4245 1.875 17.0536 1.875 16.6668V6.66683C1.875 6.28005 2.02865 5.90912 2.30214 5.63563C2.57563 5.36214 2.94656 5.2085 3.33333 5.2085H5.20833V1.66683C5.20833 1.28005 5.36198 0.909122 5.63547 0.635632C5.90896 0.362142 6.27989 0.208496 6.66667 0.208496H16.6667ZM6.66667 1.4585C6.61141 1.4585 6.55842 1.48045 6.51935 1.51952C6.48028 1.55859 6.45833 1.61158 6.45833 1.66683V3.54183H8.54167V1.4585H6.66667ZM3.125 9.79183V16.6668C3.125 16.7221 3.14695 16.7751 3.18602 16.8141C3.22509 16.8532 3.27808 16.8752 3.33333 16.8752H13.3333C13.3886 16.8752 13.4416 16.8532 13.4806 16.8141C13.5197 16.7751 13.5417 16.7221 13.5417 16.6668V13.1252H6.66667C6.27989 13.1252 5.90896 12.9715 5.63547 12.698C5.36198 12.4245 5.20833 12.0536 5.20833 11.6668V9.79183H3.125ZM5.20833 8.54183H3.125V6.66683C3.125 6.61158 3.14695 6.55859 3.18602 6.51952C3.22509 6.48045 3.27808 6.4585 3.33333 6.4585H5.20833V8.54183ZM6.45833 11.6668C6.45833 11.7221 6.48028 11.7751 6.51935 11.8141C6.55842 11.8532 6.61141 11.8752 6.66667 11.8752H16.6667C16.7219 11.8752 16.7749 11.8532 16.814 11.8141C16.853 11.7751 16.875 11.7221 16.875 11.6668V4.79183H6.45833V11.6668ZM9.79167 1.4585V3.54183H16.875V1.66683C16.875 1.61157 16.853 1.55858 16.814 1.51952C16.7749 1.48045 16.7219 1.4585 16.6667 1.4585H9.79167Z" |
| 2304 | 2494 | })); |
| 2305 | 2495 | }); |
| 2306 | -var _default = exports["default"] = CopyPageIcon; | |
| 2496 | +var _default = CopyPageIcon; | |
| 2497 | +exports["default"] = _default; | |
| 2307 | 2498 | |
| 2308 | 2499 | /***/ }), |
| 2309 | 2500 | |
| 2310 | 2501 | /***/ "../modules/ai/assets/js/editor/icons/edit-icon.js": |
| @@ -2338,9 +2529,10 @@ | ||
| 2338 | 2529 | clipRule: "evenodd", |
| 2339 | 2530 | d: "M12.9697 5.96967C13.2626 5.67677 13.7374 5.67677 14.0303 5.96967L18.0303 9.96967C18.3232 10.2626 18.3232 10.7374 18.0303 11.0303C17.7374 11.3232 17.2626 11.3232 16.9697 11.0303L12.9697 7.03033C12.6768 6.73743 12.6768 6.26256 12.9697 5.96967Z" |
| 2340 | 2531 | })); |
| 2341 | 2532 | }); |
| 2342 | -var _default = exports["default"] = EditIcon; | |
| 2533 | +var _default = EditIcon; | |
| 2534 | +exports["default"] = _default; | |
| 2343 | 2535 | |
| 2344 | 2536 | /***/ }), |
| 2345 | 2537 | |
| 2346 | 2538 | /***/ "../modules/ai/assets/js/editor/icons/expand-diagonal-icon.js": |
| @@ -2370,9 +2562,10 @@ | ||
| 2370 | 2562 | clipRule: "evenodd", |
| 2371 | 2563 | d: "M4 3.25H8C8.41421 3.25 8.75 3.58579 8.75 4C8.75 4.41421 8.41421 4.75 8 4.75H5.81066L10.5303 9.46967C10.8232 9.76256 10.8232 10.2374 10.5303 10.5303C10.2374 10.8232 9.76256 10.8232 9.46967 10.5303L4.75 5.81066V8C4.75 8.41421 4.41421 8.75 4 8.75C3.58579 8.75 3.25 8.41421 3.25 8V4C3.25 3.58579 3.58579 3.25 4 3.25ZM13.4697 13.4697C13.7626 13.1768 14.2374 13.1768 14.5303 13.4697L19.25 18.1893V16C19.25 15.5858 19.5858 15.25 20 15.25C20.4142 15.25 20.75 15.5858 20.75 16V20C20.75 20.4142 20.4142 20.75 20 20.75H16C15.5858 20.75 15.25 20.4142 15.25 20C15.25 19.5858 15.5858 19.25 16 19.25H18.1893L13.4697 14.5303C13.1768 14.2374 13.1768 13.7626 13.4697 13.4697Z" |
| 2372 | 2564 | })); |
| 2373 | 2565 | }); |
| 2374 | -var _default = exports["default"] = ExpandDiagonalIcon; | |
| 2566 | +var _default = ExpandDiagonalIcon; | |
| 2567 | +exports["default"] = _default; | |
| 2375 | 2568 | |
| 2376 | 2569 | /***/ }), |
| 2377 | 2570 | |
| 2378 | 2571 | /***/ "../modules/ai/assets/js/editor/icons/lock-icon.js": |
| @@ -2408,9 +2601,10 @@ | ||
| 2408 | 2601 | }), /*#__PURE__*/_react.default.createElement("path", { |
| 2409 | 2602 | d: "M6 12H19V20H6V12Z" |
| 2410 | 2603 | })); |
| 2411 | 2604 | }); |
| 2412 | -var _default = exports["default"] = LockIcon; | |
| 2605 | +var _default = LockIcon; | |
| 2606 | +exports["default"] = _default; | |
| 2413 | 2607 | |
| 2414 | 2608 | /***/ }), |
| 2415 | 2609 | |
| 2416 | 2610 | /***/ "../modules/ai/assets/js/editor/icons/minimize-diagonal-icon.js": |
| @@ -2440,9 +2634,10 @@ | ||
| 2440 | 2634 | clipRule: "evenodd", |
| 2441 | 2635 | d: "M3.46967 3.46967C3.76256 3.17678 4.23744 3.17678 4.53033 3.46967L9.25 8.18934V6C9.25 5.58579 9.58579 5.25 10 5.25C10.4142 5.25 10.75 5.58579 10.75 6V10C10.75 10.4142 10.4142 10.75 10 10.75H6C5.58579 10.75 5.25 10.4142 5.25 10C5.25 9.58579 5.58579 9.25 6 9.25H8.18934L3.46967 4.53033C3.17678 4.23744 3.17678 3.76256 3.46967 3.46967ZM14 13.25H18C18.4142 13.25 18.75 13.5858 18.75 14C18.75 14.4142 18.4142 14.75 18 14.75H15.8107L20.5303 19.4697C20.8232 19.7626 20.8232 20.2374 20.5303 20.5303C20.2374 20.8232 19.7626 20.8232 19.4697 20.5303L14.75 15.8107V18C14.75 18.4142 14.4142 18.75 14 18.75C13.5858 18.75 13.25 18.4142 13.25 18V14C13.25 13.5858 13.5858 13.25 14 13.25Z" |
| 2442 | 2636 | })); |
| 2443 | 2637 | }); |
| 2444 | -var _default = exports["default"] = MinimizeDiagonalIcon; | |
| 2638 | +var _default = MinimizeDiagonalIcon; | |
| 2639 | +exports["default"] = _default; | |
| 2445 | 2640 | |
| 2446 | 2641 | /***/ }), |
| 2447 | 2642 | |
| 2448 | 2643 | /***/ "../modules/ai/assets/js/editor/icons/plus-circle-icon.js": |
| @@ -2470,9 +2665,10 @@ | ||
| 2470 | 2665 | }), /*#__PURE__*/_react.default.createElement("path", { |
| 2471 | 2666 | d: "M12 2.69231C6.8595 2.69231 2.69231 6.8595 2.69231 12C2.69231 17.1405 6.8595 21.3077 12 21.3077C17.1405 21.3077 21.3077 17.1405 21.3077 12C21.3077 6.8595 17.1405 2.69231 12 2.69231ZM1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12ZM12 7.76923C12.4673 7.76923 12.8462 8.14807 12.8462 8.61538V11.1538H15.3846C15.8519 11.1538 16.2308 11.5327 16.2308 12C16.2308 12.4673 15.8519 12.8462 15.3846 12.8462H12.8462V15.3846C12.8462 15.8519 12.4673 16.2308 12 16.2308C11.5327 16.2308 11.1538 15.8519 11.1538 15.3846V12.8462H8.61538C8.14807 12.8462 7.76923 12.4673 7.76923 12C7.76923 11.5327 8.14807 11.1538 8.61538 11.1538H11.1538V8.61538C11.1538 8.14807 11.5327 7.76923 12 7.76923Z" |
| 2472 | 2667 | })); |
| 2473 | 2668 | }); |
| 2474 | -var _default = exports["default"] = PlusCircleIcon; | |
| 2669 | +var _default = PlusCircleIcon; | |
| 2670 | +exports["default"] = _default; | |
| 2475 | 2671 | |
| 2476 | 2672 | /***/ }), |
| 2477 | 2673 | |
| 2478 | 2674 | /***/ "../modules/ai/assets/js/editor/icons/refresh-icon.js": |
| @@ -2506,9 +2702,10 @@ | ||
| 2506 | 2702 | clipRule: "evenodd", |
| 2507 | 2703 | d: "M3.89686 12.2571C4.30713 12.2001 4.68594 12.4864 4.74295 12.8967C4.96487 14.4936 5.70565 15.9731 6.85119 17.1075C7.99673 18.242 9.48347 18.9683 11.0824 19.1746C12.6813 19.3809 14.3037 19.0558 15.6997 18.2493C16.7566 17.6387 17.6393 16.7779 18.2748 15.75H16.0001C15.5859 15.75 15.2501 15.4142 15.2501 15C15.2501 14.5857 15.5859 14.25 16.0001 14.25H19.4833C19.4947 14.2497 19.5061 14.2497 19.5175 14.25H20.0001C20.4143 14.25 20.7501 14.5857 20.7501 15V19C20.7501 19.4142 20.4143 19.75 20.0001 19.75C19.5859 19.75 19.2501 19.4142 19.2501 19V16.993C18.5166 18.0307 17.5636 18.9048 16.4501 19.5481C14.7692 20.5192 12.8157 20.9107 10.8904 20.6622C8.9652 20.4138 7.17504 19.5393 5.79572 18.1734C4.4164 16.8074 3.52443 15.0259 3.25723 13.1032C3.20022 12.6929 3.48658 12.3141 3.89686 12.2571Z" |
| 2508 | 2704 | })); |
| 2509 | 2705 | }); |
| 2510 | -var _default = exports["default"] = RefreshIcon; | |
| 2706 | +var _default = RefreshIcon; | |
| 2707 | +exports["default"] = _default; | |
| 2511 | 2708 | |
| 2512 | 2709 | /***/ }), |
| 2513 | 2710 | |
| 2514 | 2711 | /***/ "../modules/ai/assets/js/editor/icons/wand-icon.js": |
| @@ -2546,9 +2743,10 @@ | ||
| 2546 | 2743 | clipRule: "evenodd", |
| 2547 | 2744 | d: "M19.75 13C19.75 12.5858 19.4142 12.25 19 12.25C18.5858 12.25 18.25 12.5858 18.25 13C18.25 13.3315 18.1183 13.6495 17.8839 13.8839C17.6495 14.1183 17.3315 14.25 17 14.25C16.5858 14.25 16.25 14.5858 16.25 15C16.25 15.4142 16.5858 15.75 17 15.75C17.3315 15.75 17.6495 15.8817 17.8839 16.1161C18.1183 16.3505 18.25 16.6685 18.25 17C18.25 17.4142 18.5858 17.75 19 17.75C19.4142 17.75 19.75 17.4142 19.75 17C19.75 16.6685 19.8817 16.3505 20.1161 16.1161C20.3505 15.8817 20.6685 15.75 21 15.75C21.4142 15.75 21.75 15.4142 21.75 15C21.75 14.5858 21.4142 14.25 21 14.25C20.6685 14.25 20.3505 14.1183 20.1161 13.8839C19.8817 13.6495 19.75 13.3315 19.75 13ZM18.9445 14.9445C18.9633 14.9258 18.9818 14.9067 19 14.8875C19.0182 14.9067 19.0367 14.9258 19.0555 14.9445C19.0742 14.9633 19.0933 14.9818 19.1125 15C19.0933 15.0182 19.0742 15.0367 19.0555 15.0555C19.0367 15.0742 19.0182 15.0933 19 15.1125C18.9818 15.0933 18.9633 15.0742 18.9445 15.0555C18.9258 15.0367 18.9067 15.0182 18.8875 15C18.9067 14.9818 18.9258 14.9633 18.9445 14.9445Z" |
| 2548 | 2745 | })); |
| 2549 | 2746 | }); |
| 2550 | -var _default = exports["default"] = WandIcon; | |
| 2747 | +var _default = WandIcon; | |
| 2748 | +exports["default"] = _default; | |
| 2551 | 2749 | |
| 2552 | 2750 | /***/ }), |
| 2553 | 2751 | |
| 2554 | 2752 | /***/ "../modules/ai/assets/js/editor/icons/website-icon.js": |
| @@ -2578,9 +2776,10 @@ | ||
| 2578 | 2776 | clipRule: "evenodd", |
| 2579 | 2777 | d: "M4.16707 3.95837C4.11182 3.95837 4.05883 3.98032 4.01976 4.01939C3.98069 4.05846 3.95874 4.11145 3.95874 4.16671V6.04171H6.04207V3.95837H4.16707ZM4.16707 2.70837C3.7803 2.70837 3.40937 2.86202 3.13588 3.13551C2.86239 3.409 2.70874 3.77993 2.70874 4.16671V15.8334C2.70874 16.2201 2.86239 16.5911 3.13588 16.8646C3.40937 17.1381 3.7803 17.2917 4.16707 17.2917H15.8337C16.2205 17.2917 16.5914 17.1381 16.8649 16.8646C17.1384 16.5911 17.2921 16.2201 17.2921 15.8334V4.16671C17.2921 3.77993 17.1384 3.409 16.8649 3.13551C16.5914 2.86202 16.2205 2.70837 15.8337 2.70837H4.16707ZM7.29207 3.95837V6.04171H16.0421V4.16671C16.0421 4.11145 16.0201 4.05846 15.9811 4.01939C15.942 3.98032 15.889 3.95837 15.8337 3.95837H7.29207ZM16.0421 7.29171H3.95874V15.8334C3.95874 15.8886 3.98069 15.9416 4.01976 15.9807C4.05883 16.0198 4.11182 16.0417 4.16707 16.0417H15.8337C15.889 16.0417 15.942 16.0198 15.9811 15.9807C16.0201 15.9416 16.0421 15.8886 16.0421 15.8334V7.29171Z" |
| 2580 | 2778 | })); |
| 2581 | 2779 | }); |
| 2582 | -var _default = exports["default"] = WebsiteIcon; | |
| 2780 | +var _default = WebsiteIcon; | |
| 2781 | +exports["default"] = _default; | |
| 2583 | 2782 | |
| 2584 | 2783 | /***/ }), |
| 2585 | 2784 | |
| 2586 | 2785 | /***/ "../modules/ai/assets/js/editor/icons/x-circle-icon.js": |
| @@ -2608,9 +2807,10 @@ | ||
| 2608 | 2807 | }), /*#__PURE__*/_react.default.createElement("path", { |
| 2609 | 2808 | d: "M12 2.69231C6.8595 2.69231 2.69231 6.8595 2.69231 12C2.69231 17.1405 6.8595 21.3077 12 21.3077C17.1405 21.3077 21.3077 17.1405 21.3077 12C21.3077 6.8595 17.1405 2.69231 12 2.69231ZM1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12ZM9.14527 9.14527C9.47571 8.81483 10.0115 8.81483 10.3419 9.14527L12 10.8034L13.6581 9.14527C13.9885 8.81483 14.5243 8.81483 14.8547 9.14527C15.1852 9.47571 15.1852 10.0115 14.8547 10.3419L13.1966 12L14.8547 13.6581C15.1852 13.9885 15.1852 14.5243 14.8547 14.8547C14.5243 15.1852 13.9885 15.1852 13.6581 14.8547L12 13.1966L10.3419 14.8547C10.0115 15.1852 9.47571 15.1852 9.14527 14.8547C8.81483 14.5243 8.81483 13.9885 9.14527 13.6581L10.8034 12L9.14527 10.3419C8.81483 10.0115 8.81483 9.47571 9.14527 9.14527Z" |
| 2610 | 2809 | })); |
| 2611 | 2810 | }); |
| 2612 | -var _default = exports["default"] = XCircleIcon; | |
| 2811 | +var _default = XCircleIcon; | |
| 2812 | +exports["default"] = _default; | |
| 2613 | 2813 | |
| 2614 | 2814 | /***/ }), |
| 2615 | 2815 | |
| 2616 | 2816 | /***/ "../modules/ai/assets/js/editor/integration/library/apply-template-for-ai-behavior.js": |
| @@ -2631,10 +2831,8 @@ | ||
| 2631 | 2831 | __ = _require3.__; |
| 2632 | 2832 | var _require4 = __webpack_require__(/*! ../../pages/form-layout/components/attachments */ "../modules/ai/assets/js/editor/pages/form-layout/components/attachments.js"), |
| 2633 | 2833 | ATTACHMENT_TYPE_JSON = _require4.ATTACHMENT_TYPE_JSON, |
| 2634 | 2834 | ELEMENTOR_LIBRARY_SOURCE = _require4.ELEMENTOR_LIBRARY_SOURCE; |
| 2635 | -var _require5 = __webpack_require__(/*! elementor-editor-utils/editor-one-events */ "../assets/dev/js/editor/utils/editor-one-events.js"), | |
| 2636 | - EditorOneEventManager = _require5.EditorOneEventManager; | |
| 2637 | 2835 | var ApplyTemplateForAiBehavior; |
| 2638 | 2836 | ApplyTemplateForAiBehavior = Marionette.Behavior.extend({ |
| 2639 | 2837 | ui: { |
| 2640 | 2838 | applyButton: '.elementor-template-library-template-apply-ai', |
| @@ -2643,23 +2841,15 @@ | ||
| 2643 | 2841 | events: { |
| 2644 | 2842 | 'click @ui.applyButton': 'onApplyButtonClick', |
| 2645 | 2843 | 'click @ui.generateVariation': 'onGenerateVariationClick' |
| 2646 | 2844 | }, |
| 2647 | - trackAiGenerate: function trackAiGenerate(model) { | |
| 2648 | - EditorOneEventManager.sendELibraryGenerateAi({ | |
| 2649 | - assetId: model.get('template_id'), | |
| 2650 | - assetName: model.get('title'), | |
| 2651 | - libraryType: model.get('type') || model.get('source') | |
| 2652 | - }); | |
| 2653 | - }, | |
| 2654 | 2845 | onGenerateVariationClick: function onGenerateVariationClick() { |
| 2655 | - var _libraryComponent$man; | |
| 2846 | + var _libraryComponent$man, _libraryComponent$man2; | |
| 2656 | 2847 | var args = { |
| 2657 | 2848 | model: this.view.model |
| 2658 | 2849 | }; |
| 2659 | - this.trackAiGenerate(this.view.model); | |
| 2660 | 2850 | var libraryComponent = $e.components.get('library'); |
| 2661 | - var at = (_libraryComponent$man = libraryComponent.manager.modalConfig) === null || _libraryComponent$man === void 0 || (_libraryComponent$man = _libraryComponent$man.importOptions) === null || _libraryComponent$man === void 0 ? void 0 : _libraryComponent$man.at; | |
| 2851 | + var at = (_libraryComponent$man = libraryComponent.manager.modalConfig) === null || _libraryComponent$man === void 0 ? void 0 : (_libraryComponent$man2 = _libraryComponent$man.importOptions) === null || _libraryComponent$man2 === void 0 ? void 0 : _libraryComponent$man2.at; | |
| 2662 | 2852 | libraryComponent.downloadTemplate(args, function (data) { |
| 2663 | 2853 | var model = args.model; |
| 2664 | 2854 | var attachment = { |
| 2665 | 2855 | type: ATTACHMENT_TYPE_JSON, |
| @@ -2688,20 +2878,10 @@ | ||
| 2688 | 2878 | onApplyButtonClick: function onApplyButtonClick() { |
| 2689 | 2879 | var args = { |
| 2690 | 2880 | model: this.view.model |
| 2691 | 2881 | }; |
| 2692 | - this.trackAiGenerate(this.view.model); | |
| 2693 | 2882 | this.ui.applyButton.addClass('elementor-disabled'); |
| 2694 | - var activeSource = args.model.get('source'); | |
| 2695 | - | |
| 2696 | - /** | |
| 2697 | - * Filter template source. | |
| 2698 | - * | |
| 2699 | - * @param bool isRemote - If `true` the source is a remote source. | |
| 2700 | - * @param string activeSource - The current template source. | |
| 2701 | - */ | |
| 2702 | - var isRemote = elementor.hooks.applyFilters('templates/source/is-remote', 'remote' === activeSource, activeSource); | |
| 2703 | - if (isRemote && !elementor.config.library_connect.is_connected) { | |
| 2883 | + if ('remote' === args.model.get('source') && !elementor.config.library_connect.is_connected) { | |
| 2704 | 2884 | $e.route('library/connect', args); |
| 2705 | 2885 | return; |
| 2706 | 2886 | } |
| 2707 | 2887 | $e.run('library/generate-ai-variation', args); |
| @@ -2739,9 +2919,10 @@ | ||
| 2739 | 2919 | children: _propTypes.default.node, |
| 2740 | 2920 | isRTL: _propTypes.default.bool, |
| 2741 | 2921 | colorScheme: _propTypes.default.oneOf(['auto', 'light', 'dark']) |
| 2742 | 2922 | }; |
| 2743 | -var _default = exports["default"] = LayoutAppWrapper; | |
| 2923 | +var _default = LayoutAppWrapper; | |
| 2924 | +exports["default"] = _default; | |
| 2744 | 2925 | |
| 2745 | 2926 | /***/ }), |
| 2746 | 2927 | |
| 2747 | 2928 | /***/ "../modules/ai/assets/js/editor/layout-app.js": |
| @@ -2795,9 +2976,10 @@ | ||
| 2795 | 2976 | onGenerate: _propTypes.default.func.isRequired, |
| 2796 | 2977 | currentContext: _propTypes.default.object, |
| 2797 | 2978 | hasPro: _propTypes.default.bool |
| 2798 | 2979 | }; |
| 2799 | -var _default = exports["default"] = LayoutApp; | |
| 2980 | +var _default = LayoutApp; | |
| 2981 | +exports["default"] = _default; | |
| 2800 | 2982 | |
| 2801 | 2983 | /***/ }), |
| 2802 | 2984 | |
| 2803 | 2985 | /***/ "../modules/ai/assets/js/editor/layout-content.js": |
| @@ -2828,9 +3010,10 @@ | ||
| 2828 | 3010 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 2829 | 3011 | var _attachment = __webpack_require__(/*! ./types/attachment */ "../modules/ai/assets/js/editor/types/attachment.js"); |
| 2830 | 3012 | var _config = __webpack_require__(/*! ./pages/form-layout/context/config */ "../modules/ai/assets/js/editor/pages/form-layout/context/config.js"); |
| 2831 | 3013 | var _requestsIds = __webpack_require__(/*! ./context/requests-ids */ "../modules/ai/assets/js/editor/context/requests-ids.js"); |
| 2832 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 3014 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 3015 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 2833 | 3016 | var LayoutContent = function LayoutContent(props) { |
| 2834 | 3017 | var _useUserInfo = (0, _useUserInfo2.default)(), |
| 2835 | 3018 | isLoading = _useUserInfo.isLoading, |
| 2836 | 3019 | isConnected = _useUserInfo.isConnected, |
| @@ -2849,13 +3032,13 @@ | ||
| 2849 | 3032 | _useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| 2850 | 3033 | isInitUsageDone = _useState2[0], |
| 2851 | 3034 | setIsInitUsageDone = _useState2[1]; |
| 2852 | 3035 | (0, _react.useEffect)(function () { |
| 2853 | - if (!isInitUsageDone && !isLoading && (initialUsagePercentage || 0 === initialUsagePercentage)) { | |
| 3036 | + if (!isInitUsageDone && (initialUsagePercentage || 0 === initialUsagePercentage)) { | |
| 2854 | 3037 | updateUsagePercentage(initialUsagePercentage); |
| 2855 | 3038 | setIsInitUsageDone(true); |
| 2856 | 3039 | } |
| 2857 | - }, [isLoading, initialUsagePercentage, isInitUsageDone, updateUsagePercentage]); | |
| 3040 | + }, [initialUsagePercentage, isInitUsageDone, updateUsagePercentage]); | |
| 2858 | 3041 | if (isLoading || !isInitUsageDone) { |
| 2859 | 3042 | return /*#__PURE__*/_react.default.createElement(_layoutDialog.default, { |
| 2860 | 3043 | onClose: onClose |
| 2861 | 3044 | }, /*#__PURE__*/_react.default.createElement(_layoutDialog.default.Header, { |
| @@ -2909,9 +3092,10 @@ | ||
| 2909 | 3092 | }; |
| 2910 | 3093 | LayoutContent.propTypes = { |
| 2911 | 3094 | attachments: _propTypes.default.arrayOf(_attachment.AttachmentPropType) |
| 2912 | 3095 | }; |
| 2913 | -var _default = exports["default"] = LayoutContent; | |
| 3096 | +var _default = LayoutContent; | |
| 3097 | +exports["default"] = _default; | |
| 2914 | 3098 | |
| 2915 | 3099 | /***/ }), |
| 2916 | 3100 | |
| 2917 | 3101 | /***/ "../modules/ai/assets/js/editor/pages/connect/index.js": |
| @@ -2933,9 +3117,10 @@ | ||
| 2933 | 3117 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 2934 | 3118 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 2935 | 3119 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 2936 | 3120 | var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); |
| 2937 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 3121 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 3122 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 2938 | 3123 | var Connect = function Connect(_ref) { |
| 2939 | 3124 | var connectUrl = _ref.connectUrl, |
| 2940 | 3125 | onSuccess = _ref.onSuccess; |
| 2941 | 3126 | var approveButtonRef = (0, _react.useRef)(); |
| @@ -2974,9 +3159,9 @@ | ||
| 2974 | 3159 | sx: { |
| 2975 | 3160 | maxWidth: 520, |
| 2976 | 3161 | textAlign: 'center' |
| 2977 | 3162 | } |
| 2978 | - }, " ", (0, _i18n.__)('By clicking "Connect", I approve the ', 'elementor'), /*#__PURE__*/_react.default.createElement(_ui.Link, { | |
| 3163 | + }, (0, _i18n.__)('By clicking "Connect", I approve the ', 'elementor'), /*#__PURE__*/_react.default.createElement(_ui.Link, { | |
| 2979 | 3164 | href: "https://go.elementor.com/ai-terms/", |
| 2980 | 3165 | target: "_blank", |
| 2981 | 3166 | color: "info.main" |
| 2982 | 3167 | }, (0, _i18n.__)('Terms of Service', 'elementor')), ' & ', /*#__PURE__*/_react.default.createElement(_ui.Link, { |
| @@ -2998,9 +3183,10 @@ | ||
| 2998 | 3183 | Connect.propTypes = { |
| 2999 | 3184 | connectUrl: _propTypes.default.string.isRequired, |
| 3000 | 3185 | onSuccess: _propTypes.default.func.isRequired |
| 3001 | 3186 | }; |
| 3002 | -var _default = exports["default"] = Connect; | |
| 3187 | +var _default = Connect; | |
| 3188 | +exports["default"] = _default; | |
| 3003 | 3189 | |
| 3004 | 3190 | /***/ }), |
| 3005 | 3191 | |
| 3006 | 3192 | /***/ "../modules/ai/assets/js/editor/pages/form-layout/components/attachments.js": |
| @@ -3027,14 +3213,20 @@ | ||
| 3027 | 3213 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 3028 | 3214 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 3029 | 3215 | var _attachment = __webpack_require__(/*! ../../../types/attachment */ "../modules/ai/assets/js/editor/types/attachment.js"); |
| 3030 | 3216 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 3031 | -var ATTACHMENT_TYPE_JSON = exports.ATTACHMENT_TYPE_JSON = 'json'; | |
| 3032 | -var ATTACHMENT_TYPE_URL = exports.ATTACHMENT_TYPE_URL = 'url'; | |
| 3033 | -var MENU_TYPE_LIBRARY = exports.MENU_TYPE_LIBRARY = 'library'; | |
| 3034 | -var USER_VARIATION_SOURCE = exports.USER_VARIATION_SOURCE = 'user-variation'; | |
| 3035 | -var ELEMENTOR_LIBRARY_SOURCE = exports.ELEMENTOR_LIBRARY_SOURCE = 'elementor-library'; | |
| 3036 | -var USER_URL_SOURCE = exports.USER_URL_SOURCE = 'user-url'; | |
| 3217 | +var ATTACHMENT_TYPE_JSON = 'json'; | |
| 3218 | +exports.ATTACHMENT_TYPE_JSON = ATTACHMENT_TYPE_JSON; | |
| 3219 | +var ATTACHMENT_TYPE_URL = 'url'; | |
| 3220 | +exports.ATTACHMENT_TYPE_URL = ATTACHMENT_TYPE_URL; | |
| 3221 | +var MENU_TYPE_LIBRARY = 'library'; | |
| 3222 | +exports.MENU_TYPE_LIBRARY = MENU_TYPE_LIBRARY; | |
| 3223 | +var USER_VARIATION_SOURCE = 'user-variation'; | |
| 3224 | +exports.USER_VARIATION_SOURCE = USER_VARIATION_SOURCE; | |
| 3225 | +var ELEMENTOR_LIBRARY_SOURCE = 'elementor-library'; | |
| 3226 | +exports.ELEMENTOR_LIBRARY_SOURCE = ELEMENTOR_LIBRARY_SOURCE; | |
| 3227 | +var USER_URL_SOURCE = 'user-url'; | |
| 3228 | +exports.USER_URL_SOURCE = USER_URL_SOURCE; | |
| 3037 | 3229 | var Attachments = function Attachments(props) { |
| 3038 | 3230 | if (!props.attachments.length) { |
| 3039 | 3231 | return /*#__PURE__*/_react.default.createElement(_menu.Menu, { |
| 3040 | 3232 | disabled: props.disabled, |
| @@ -3073,9 +3265,10 @@ | ||
| 3073 | 3265 | onAttach: _propTypes.default.func.isRequired, |
| 3074 | 3266 | onDetach: _propTypes.default.func, |
| 3075 | 3267 | disabled: _propTypes.default.bool |
| 3076 | 3268 | }; |
| 3077 | -var _default = exports["default"] = Attachments; | |
| 3269 | +var _default = Attachments; | |
| 3270 | +exports["default"] = _default; | |
| 3078 | 3271 | |
| 3079 | 3272 | /***/ }), |
| 3080 | 3273 | |
| 3081 | 3274 | /***/ "../modules/ai/assets/js/editor/pages/form-layout/components/attachments/attach-dialog.js": |
| @@ -3096,9 +3289,9 @@ | ||
| 3096 | 3289 | var _urlDialog = __webpack_require__(/*! ./url-dialog */ "../modules/ai/assets/js/editor/pages/form-layout/components/attachments/url-dialog.js"); |
| 3097 | 3290 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 3098 | 3291 | var _libraryDialog = __webpack_require__(/*! ./library-dialog */ "../modules/ai/assets/js/editor/pages/form-layout/components/attachments/library-dialog.js"); |
| 3099 | 3292 | var _attachments = __webpack_require__(/*! ../attachments */ "../modules/ai/assets/js/editor/pages/form-layout/components/attachments.js"); |
| 3100 | -var AttachDialog = exports.AttachDialog = function AttachDialog(props) { | |
| 3293 | +var AttachDialog = function AttachDialog(props) { | |
| 3101 | 3294 | var type = props.type; |
| 3102 | 3295 | var url = props.url; |
| 3103 | 3296 | switch (type) { |
| 3104 | 3297 | case _attachments.ATTACHMENT_TYPE_URL: |
| @@ -3114,8 +3307,9 @@ | ||
| 3114 | 3307 | }); |
| 3115 | 3308 | } |
| 3116 | 3309 | return null; |
| 3117 | 3310 | }; |
| 3311 | +exports.AttachDialog = AttachDialog; | |
| 3118 | 3312 | AttachDialog.propTypes = { |
| 3119 | 3313 | type: _propTypes.default.string, |
| 3120 | 3314 | onAttach: _propTypes.default.func, |
| 3121 | 3315 | onClose: _propTypes.default.func, |
| @@ -3120,9 +3314,10 @@ | ||
| 3120 | 3314 | onAttach: _propTypes.default.func, |
| 3121 | 3315 | onClose: _propTypes.default.func, |
| 3122 | 3316 | url: _propTypes.default.string |
| 3123 | 3317 | }; |
| 3124 | -var _default = exports["default"] = AttachDialog; | |
| 3318 | +var _default = AttachDialog; | |
| 3319 | +exports["default"] = _default; | |
| 3125 | 3320 | |
| 3126 | 3321 | /***/ }), |
| 3127 | 3322 | |
| 3128 | 3323 | /***/ "../modules/ai/assets/js/editor/pages/form-layout/components/attachments/library-dialog.js": |
| @@ -3141,9 +3336,9 @@ | ||
| 3141 | 3336 | exports.LibraryDialog = void 0; |
| 3142 | 3337 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 3143 | 3338 | var _react = __webpack_require__(/*! react */ "react"); |
| 3144 | 3339 | var _attachments = __webpack_require__(/*! ../attachments */ "../modules/ai/assets/js/editor/pages/form-layout/components/attachments.js"); |
| 3145 | -var LibraryDialog = exports.LibraryDialog = function LibraryDialog(props) { | |
| 3340 | +var LibraryDialog = function LibraryDialog(props) { | |
| 3146 | 3341 | var isApplyingTemplate = (0, _react.useRef)(false); |
| 3147 | 3342 | (0, _react.useEffect)(function () { |
| 3148 | 3343 | var onLibraryHide = function onLibraryHide() { |
| 3149 | 3344 | if (isApplyingTemplate.current) { |
| @@ -3192,8 +3387,9 @@ | ||
| 3192 | 3387 | }); |
| 3193 | 3388 | isApplyingTemplate.current = false; |
| 3194 | 3389 | return null; |
| 3195 | 3390 | }; |
| 3391 | +exports.LibraryDialog = LibraryDialog; | |
| 3196 | 3392 | LibraryDialog.propTypes = { |
| 3197 | 3393 | onAttach: _propTypes.default.func.isRequired, |
| 3198 | 3394 | onClose: _propTypes.default.func.isRequired |
| 3199 | 3395 | }; |
| @@ -3222,10 +3418,11 @@ | ||
| 3222 | 3418 | var _plusCircleIcon = _interopRequireDefault(__webpack_require__(/*! ../../../../icons/plus-circle-icon */ "../modules/ai/assets/js/editor/icons/plus-circle-icon.js")); |
| 3223 | 3419 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 3224 | 3420 | var _attachDialog = __webpack_require__(/*! ./attach-dialog */ "../modules/ai/assets/js/editor/pages/form-layout/components/attachments/attach-dialog.js"); |
| 3225 | 3421 | var _useIntroduction2 = _interopRequireDefault(__webpack_require__(/*! ../../../../hooks/use-introduction */ "../modules/ai/assets/js/editor/hooks/use-introduction.js")); |
| 3226 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 3227 | -var Menu = exports.Menu = function Menu(props) { | |
| 3422 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 3423 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 3424 | +var Menu = function Menu(props) { | |
| 3228 | 3425 | var _useState = (0, _react.useState)(false), |
| 3229 | 3426 | _useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| 3230 | 3427 | isOpen = _useState2[0], |
| 3231 | 3428 | setIsOpen = _useState2[1]; |
| @@ -3302,8 +3499,9 @@ | ||
| 3302 | 3499 | setSelectedType(null); |
| 3303 | 3500 | } |
| 3304 | 3501 | })); |
| 3305 | 3502 | }; |
| 3503 | +exports.Menu = Menu; | |
| 3306 | 3504 | Menu.propTypes = { |
| 3307 | 3505 | items: _propTypes.default.arrayOf(_propTypes.default.shape({ |
| 3308 | 3506 | title: _propTypes.default.string.isRequired, |
| 3309 | 3507 | type: _propTypes.default.string.isRequired, |
| @@ -3332,9 +3530,9 @@ | ||
| 3332 | 3530 | var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 3333 | 3531 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 3334 | 3532 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 3335 | 3533 | var _useIntroduction2 = _interopRequireDefault(__webpack_require__(/*! ../../../../hooks/use-introduction */ "../modules/ai/assets/js/editor/hooks/use-introduction.js")); |
| 3336 | -var PromptPowerNotice = exports.PromptPowerNotice = function PromptPowerNotice() { | |
| 3534 | +var PromptPowerNotice = function PromptPowerNotice() { | |
| 3337 | 3535 | var _useIntroduction = (0, _useIntroduction2.default)('e-ai-builder-attachments-power'), |
| 3338 | 3536 | isViewed = _useIntroduction.isViewed, |
| 3339 | 3537 | markAsViewed = _useIntroduction.markAsViewed; |
| 3340 | 3538 | if (isViewed) { |
| @@ -3361,8 +3559,9 @@ | ||
| 3361 | 3559 | variant: "body2", |
| 3362 | 3560 | display: "inline-block" |
| 3363 | 3561 | }, (0, _i18n.__)('Craft your prompt to affect content, images and/or colors - whichever you decide.', 'elementor')))); |
| 3364 | 3562 | }; |
| 3563 | +exports.PromptPowerNotice = PromptPowerNotice; | |
| 3365 | 3564 | |
| 3366 | 3565 | /***/ }), |
| 3367 | 3566 | |
| 3368 | 3567 | /***/ "../modules/ai/assets/js/editor/pages/form-layout/components/attachments/thumbnail-json.js": |
| @@ -3383,9 +3582,9 @@ | ||
| 3383 | 3582 | var _thumbnail = __webpack_require__(/*! ./thumbnail */ "../modules/ai/assets/js/editor/pages/form-layout/components/attachments/thumbnail.js"); |
| 3384 | 3583 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 3385 | 3584 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 3386 | 3585 | var _attachment = __webpack_require__(/*! ../../../../types/attachment */ "../modules/ai/assets/js/editor/types/attachment.js"); |
| 3387 | -var ThumbnailJson = exports.ThumbnailJson = function ThumbnailJson(props) { | |
| 3586 | +var ThumbnailJson = function ThumbnailJson(props) { | |
| 3388 | 3587 | var _props$attachments; |
| 3389 | 3588 | var attachment = (_props$attachments = props.attachments) === null || _props$attachments === void 0 ? void 0 : _props$attachments.find(function (item) { |
| 3390 | 3589 | return 'json' === item.type; |
| 3391 | 3590 | }); |
| @@ -3404,13 +3603,15 @@ | ||
| 3404 | 3603 | html: attachment.previewHTML, |
| 3405 | 3604 | disabled: props.disabled |
| 3406 | 3605 | }); |
| 3407 | 3606 | }; |
| 3607 | +exports.ThumbnailJson = ThumbnailJson; | |
| 3408 | 3608 | ThumbnailJson.propTypes = { |
| 3409 | 3609 | attachments: _propTypes.default.arrayOf(_attachment.AttachmentPropType).isRequired, |
| 3410 | 3610 | disabled: _propTypes.default.bool |
| 3411 | 3611 | }; |
| 3412 | -var _default = exports["default"] = ThumbnailJson; | |
| 3612 | +var _default = ThumbnailJson; | |
| 3613 | +exports["default"] = _default; | |
| 3413 | 3614 | |
| 3414 | 3615 | /***/ }), |
| 3415 | 3616 | |
| 3416 | 3617 | /***/ "../modules/ai/assets/js/editor/pages/form-layout/components/attachments/thumbnail-url.js": |
| @@ -3433,9 +3634,9 @@ | ||
| 3433 | 3634 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 3434 | 3635 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 3435 | 3636 | var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); |
| 3436 | 3637 | var _attachment = __webpack_require__(/*! ../../../../types/attachment */ "../modules/ai/assets/js/editor/types/attachment.js"); |
| 3437 | -var ThumbnailUrl = exports.ThumbnailUrl = function ThumbnailUrl(props) { | |
| 3638 | +var ThumbnailUrl = function ThumbnailUrl(props) { | |
| 3438 | 3639 | var _props$attachments; |
| 3439 | 3640 | var attachment = (_props$attachments = props.attachments) === null || _props$attachments === void 0 ? void 0 : _props$attachments.find(function (item) { |
| 3440 | 3641 | return 'url' === item.type; |
| 3441 | 3642 | }); |
| @@ -3489,14 +3690,16 @@ | ||
| 3489 | 3690 | disabled: props.disabled, |
| 3490 | 3691 | html: attachment.previewHTML |
| 3491 | 3692 | })); |
| 3492 | 3693 | }; |
| 3694 | +exports.ThumbnailUrl = ThumbnailUrl; | |
| 3493 | 3695 | ThumbnailUrl.propTypes = { |
| 3494 | 3696 | attachments: _propTypes.default.arrayOf(_attachment.AttachmentPropType).isRequired, |
| 3495 | 3697 | disabled: _propTypes.default.bool, |
| 3496 | 3698 | onDetach: _propTypes.default.func |
| 3497 | 3699 | }; |
| 3498 | -var _default = exports["default"] = ThumbnailUrl; | |
| 3700 | +var _default = ThumbnailUrl; | |
| 3701 | +exports["default"] = _default; | |
| 3499 | 3702 | |
| 3500 | 3703 | /***/ }), |
| 3501 | 3704 | |
| 3502 | 3705 | /***/ "../modules/ai/assets/js/editor/pages/form-layout/components/attachments/thumbnail.js": |
| @@ -3517,15 +3720,17 @@ | ||
| 3517 | 3720 | var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/taggedTemplateLiteral */ "../node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js")); |
| 3518 | 3721 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 3519 | 3722 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 3520 | 3723 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 3724 | +var _styledComponents = _interopRequireDefault(__webpack_require__(/*! styled-components */ "../node_modules/styled-components/dist/styled-components.browser.esm.js")); | |
| 3521 | 3725 | var _templateObject; |
| 3522 | -var THUMBNAIL_SIZE = exports.THUMBNAIL_SIZE = 64; | |
| 3523 | -var StyledBody = (0, _ui.styled)('body')(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\thtml, body {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\toverflow: hidden;\n\t}\n\n\tbody > * {\n\t\twidth: 100% !important;\n\t}\n\n\tbody > img {\n\t\theight: 100%;\n\t\tobject-fit: cover;\n\t}\n\n\tbody:has(> img) {\n\t\theight: ", "px\n\t}\n"])), THUMBNAIL_SIZE); | |
| 3524 | -var Thumbnail = exports.Thumbnail = function Thumbnail(props) { | |
| 3525 | - var _props$html$match, _props$html$match2; | |
| 3526 | - var dataWidth = (_props$html$match = props.html.match('data-width="(?<width>\\d+)"')) === null || _props$html$match === void 0 || (_props$html$match = _props$html$match.groups) === null || _props$html$match === void 0 ? void 0 : _props$html$match.width; | |
| 3527 | - var dataHeight = (_props$html$match2 = props.html.match('data-height="(?<height>\\d+)"')) === null || _props$html$match2 === void 0 || (_props$html$match2 = _props$html$match2.groups) === null || _props$html$match2 === void 0 ? void 0 : _props$html$match2.height; | |
| 3726 | +var THUMBNAIL_SIZE = 64; | |
| 3727 | +exports.THUMBNAIL_SIZE = THUMBNAIL_SIZE; | |
| 3728 | +var StyledBody = _styledComponents.default.body(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\thtml, body {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\toverflow: hidden;\n\t}\n\n\tbody > * {\n\t\twidth: 100% !important;\n\t}\n\n\tbody > img {\n\t\theight: 100%;\n\t\tobject-fit: cover;\n\t}\n\n\tbody:has(> img) {\n\t\theight: ", "px\n\t}\n"])), THUMBNAIL_SIZE); | |
| 3729 | +var Thumbnail = function Thumbnail(props) { | |
| 3730 | + var _props$html$match, _props$html$match$gro, _props$html$match2, _props$html$match2$gr; | |
| 3731 | + var dataWidth = (_props$html$match = props.html.match('data-width="(?<width>\\d+)"')) === null || _props$html$match === void 0 ? void 0 : (_props$html$match$gro = _props$html$match.groups) === null || _props$html$match$gro === void 0 ? void 0 : _props$html$match$gro.width; | |
| 3732 | + var dataHeight = (_props$html$match2 = props.html.match('data-height="(?<height>\\d+)"')) === null || _props$html$match2 === void 0 ? void 0 : (_props$html$match2$gr = _props$html$match2.groups) === null || _props$html$match2$gr === void 0 ? void 0 : _props$html$match2$gr.height; | |
| 3528 | 3733 | var width = dataWidth ? parseInt(dataWidth) : THUMBNAIL_SIZE; |
| 3529 | 3734 | var height = dataHeight ? parseInt(dataHeight) : THUMBNAIL_SIZE; |
| 3530 | 3735 | var scaleFactor = Math.min(height, width); |
| 3531 | 3736 | var scale = THUMBNAIL_SIZE / scaleFactor; |
| @@ -3560,8 +3765,9 @@ | ||
| 3560 | 3765 | transformOrigin: "".concat(left, "px ").concat(top, "px") |
| 3561 | 3766 | } |
| 3562 | 3767 | })); |
| 3563 | 3768 | }; |
| 3769 | +exports.Thumbnail = Thumbnail; | |
| 3564 | 3770 | Thumbnail.propTypes = { |
| 3565 | 3771 | html: _propTypes.default.string.isRequired, |
| 3566 | 3772 | disabled: _propTypes.default.bool |
| 3567 | 3773 | }; |
| @@ -3587,8 +3793,9 @@ | ||
| 3587 | 3793 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 3588 | 3794 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 3589 | 3795 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 3590 | 3796 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 3797 | +var _useAttachUrlService2 = __webpack_require__(/*! ../../hooks/use-attach-url-service */ "../modules/ai/assets/js/editor/pages/form-layout/hooks/use-attach-url-service.js"); | |
| 3591 | 3798 | var _alertDialog = __webpack_require__(/*! ../../../../components/alert-dialog */ "../modules/ai/assets/js/editor/components/alert-dialog.js"); |
| 3592 | 3799 | var _useTimeout3 = __webpack_require__(/*! ../../../../hooks/use-timeout */ "../modules/ai/assets/js/editor/hooks/use-timeout.js"); |
| 3593 | 3800 | var _attachments = __webpack_require__(/*! ../attachments */ "../modules/ai/assets/js/editor/pages/form-layout/components/attachments.js"); |
| 3594 | 3801 | var _remoteConfig = __webpack_require__(/*! ../../context/remote-config */ "../modules/ai/assets/js/editor/pages/form-layout/context/remote-config.js"); |
| @@ -3593,49 +3800,44 @@ | ||
| 3593 | 3800 | var _attachments = __webpack_require__(/*! ../attachments */ "../modules/ai/assets/js/editor/pages/form-layout/components/attachments.js"); |
| 3594 | 3801 | var _remoteConfig = __webpack_require__(/*! ../../context/remote-config */ "../modules/ai/assets/js/editor/pages/form-layout/context/remote-config.js"); |
| 3595 | 3802 | var _useUserInfo2 = _interopRequireDefault(__webpack_require__(/*! ../../../../hooks/use-user-info */ "../modules/ai/assets/js/editor/hooks/use-user-info.js")); |
| 3596 | 3803 | var _requestsIds = __webpack_require__(/*! ../../../../context/requests-ids */ "../modules/ai/assets/js/editor/context/requests-ids.js"); |
| 3597 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 3598 | -var UrlDialog = exports.UrlDialog = function UrlDialog(props) { | |
| 3804 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 3805 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 3806 | +var UrlDialog = function UrlDialog(props) { | |
| 3807 | + var iframeRef = (0, _react.useRef)(null); | |
| 3808 | + var _useAttachUrlService = (0, _useAttachUrlService2.useAttachUrlService)({ | |
| 3809 | + targetUrl: props.url | |
| 3810 | + }), | |
| 3811 | + iframeSource = _useAttachUrlService.iframeSource; | |
| 3812 | + var iframeOrigin = iframeSource ? new URL(iframeSource).origin : ''; | |
| 3599 | 3813 | var _useTimeout = (0, _useTimeout3.useTimeout)(10000), |
| 3600 | 3814 | _useTimeout2 = (0, _slicedToArray2.default)(_useTimeout, 2), |
| 3601 | 3815 | isTimeout = _useTimeout2[0], |
| 3602 | 3816 | turnOffTimeout = _useTimeout2[1]; |
| 3603 | 3817 | var _useUserInfo = (0, _useUserInfo2.default)(), |
| 3604 | - isLoading = _useUserInfo.isLoading, | |
| 3818 | + isConnected = _useUserInfo.isConnected, | |
| 3819 | + hasSubscription = _useUserInfo.hasSubscription, | |
| 3820 | + credits = _useUserInfo.credits, | |
| 3605 | 3821 | initialUsagePercentage = _useUserInfo.usagePercentage; |
| 3822 | + var _useRemoteConfig = (0, _remoteConfig.useRemoteConfig)(), | |
| 3823 | + isLoaded = _useRemoteConfig.isLoaded, | |
| 3824 | + isError = _useRemoteConfig.isError, | |
| 3825 | + remoteConfig = _useRemoteConfig.remoteConfig; | |
| 3606 | 3826 | var _useRequestIds = (0, _requestsIds.useRequestIds)(), |
| 3607 | - updateUsagePercentage = _useRequestIds.updateUsagePercentage; | |
| 3827 | + updateUsagePercentage = _useRequestIds.updateUsagePercentage, | |
| 3828 | + usagePercentage = _useRequestIds.usagePercentage; | |
| 3608 | 3829 | var _useState = (0, _react.useState)(false), |
| 3609 | 3830 | _useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| 3610 | 3831 | isInitUsageDone = _useState2[0], |
| 3611 | 3832 | setIsInitUsageDone = _useState2[1]; |
| 3612 | - var _useRemoteConfig = (0, _remoteConfig.useRemoteConfig)(), | |
| 3613 | - remoteConfig = _useRemoteConfig.remoteConfig; | |
| 3614 | - var builderUrl = remoteConfig[_remoteConfig.CONFIG_KEYS.WEB_BASED_BUILDER_URL]; | |
| 3615 | - var urlObject = builderUrl ? new URL(builderUrl) : {}; | |
| 3616 | - var iframeOrigin = urlObject.origin; | |
| 3617 | - var isOpen = (0, _react.useRef)(false); | |
| 3618 | 3833 | (0, _react.useEffect)(function () { |
| 3619 | - if (!isInitUsageDone && !isLoading && (initialUsagePercentage || 0 === initialUsagePercentage)) { | |
| 3834 | + if (!isInitUsageDone && (initialUsagePercentage || 0 === initialUsagePercentage)) { | |
| 3620 | 3835 | updateUsagePercentage(initialUsagePercentage); |
| 3621 | 3836 | setIsInitUsageDone(true); |
| 3622 | 3837 | } |
| 3623 | - }, [isLoading, initialUsagePercentage, isInitUsageDone, updateUsagePercentage]); | |
| 3838 | + }, [initialUsagePercentage, isInitUsageDone, updateUsagePercentage]); | |
| 3624 | 3839 | (0, _react.useEffect)(function () { |
| 3625 | - if (!isOpen.current) { | |
| 3626 | - try { | |
| 3627 | - window.$e.run('ai-integration/open-choose-element', { | |
| 3628 | - url: props.url | |
| 3629 | - }); | |
| 3630 | - isOpen.current = true; | |
| 3631 | - } catch (error) { | |
| 3632 | - // eslint-disable-next-line no-console | |
| 3633 | - console.error(error); | |
| 3634 | - } | |
| 3635 | - } | |
| 3636 | - }, [isOpen.current]); | |
| 3637 | - (0, _react.useEffect)(function () { | |
| 3638 | 3840 | var onMessage = function onMessage(event) { |
| 3639 | 3841 | if (event.origin !== iframeOrigin) { |
| 3640 | 3842 | return; |
| 3641 | 3843 | } |
| @@ -3644,14 +3846,12 @@ | ||
| 3644 | 3846 | html = _event$data.html, |
| 3645 | 3847 | url = _event$data.url; |
| 3646 | 3848 | switch (type) { |
| 3647 | 3849 | case 'element-selector/close': |
| 3648 | - isOpen.current = false; | |
| 3649 | 3850 | props.onClose(); |
| 3650 | 3851 | break; |
| 3651 | 3852 | case 'element-selector/loaded': |
| 3652 | 3853 | turnOffTimeout(); |
| 3653 | - isOpen.current = true; | |
| 3654 | 3854 | break; |
| 3655 | 3855 | case 'element-selector/attach': |
| 3656 | 3856 | props.onAttach([{ |
| 3657 | 3857 | type: 'url', |
| @@ -3656,9 +3856,9 @@ | ||
| 3656 | 3856 | props.onAttach([{ |
| 3657 | 3857 | type: 'url', |
| 3658 | 3858 | previewHTML: html, |
| 3659 | 3859 | content: html, |
| 3660 | - label: url ? new URL(url).href : '', | |
| 3860 | + label: url ? new URL(url).host : '', | |
| 3661 | 3861 | source: _attachments.USER_URL_SOURCE |
| 3662 | 3862 | }]); |
| 3663 | 3863 | break; |
| 3664 | 3864 | } |
| @@ -3666,22 +3866,83 @@ | ||
| 3666 | 3866 | window.addEventListener('message', onMessage); |
| 3667 | 3867 | return function () { |
| 3668 | 3868 | window.removeEventListener('message', onMessage); |
| 3669 | 3869 | }; |
| 3670 | - }, [iframeOrigin, props, turnOffTimeout]); | |
| 3671 | - return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !isOpen.current && !isTimeout && /*#__PURE__*/_react.default.createElement(_ui.Dialog, { | |
| 3870 | + }, [iframeOrigin, iframeSource, props, turnOffTimeout]); | |
| 3871 | + if (!iframeSource) { | |
| 3872 | + return /*#__PURE__*/_react.default.createElement(_alertDialog.AlertDialog, { | |
| 3873 | + message: (0, _i18n.__)('The app is not available. Please try again later.', 'elementor'), | |
| 3874 | + onClose: props.onClose | |
| 3875 | + }); | |
| 3876 | + } | |
| 3877 | + if (!isLoaded || isError) { | |
| 3878 | + return null; | |
| 3879 | + } | |
| 3880 | + return /*#__PURE__*/_react.default.createElement(_ui.Dialog, { | |
| 3672 | 3881 | open: true, |
| 3673 | - maxWidth: "lg" | |
| 3674 | - }, /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 3882 | + fullScreen: true, | |
| 3883 | + hideBackdrop: true, | |
| 3884 | + maxWidth: "md", | |
| 3675 | 3885 | sx: { |
| 3676 | - textAlign: 'center', | |
| 3677 | - padding: 3 | |
| 3886 | + '& .MuiPaper-root': { | |
| 3887 | + backgroundColor: 'transparent' | |
| 3888 | + } | |
| 3678 | 3889 | } |
| 3679 | - }, (0, _i18n.__)('Loading...', 'elementor'))), isTimeout && /*#__PURE__*/_react.default.createElement(_alertDialog.AlertDialog, { | |
| 3680 | - message: (0, _i18n.__)('The app is not responding. Please try again later. (#408)', 'elementor'), | |
| 3890 | + }, /*#__PURE__*/_react.default.createElement(_ui.DialogContent, { | |
| 3891 | + sx: { | |
| 3892 | + padding: 0 | |
| 3893 | + } | |
| 3894 | + }, isTimeout && /*#__PURE__*/_react.default.createElement(_alertDialog.AlertDialog, { | |
| 3895 | + message: (0, _i18n.__)('The app is not responding. Please try again later.', 'elementor'), | |
| 3681 | 3896 | onClose: props.onClose |
| 3682 | - })); | |
| 3897 | + }), !isTimeout && /*#__PURE__*/_react.default.createElement("iframe", { | |
| 3898 | + ref: iframeRef, | |
| 3899 | + title: (0, _i18n.__)('URL as a reference', 'elementor'), | |
| 3900 | + src: iframeSource, | |
| 3901 | + onLoad: function onLoad() { | |
| 3902 | + var _window$elementorAppC = window.elementorAppConfig['kit-library'], | |
| 3903 | + accessLevel = _window$elementorAppC.access_level, | |
| 3904 | + accessTier = _window$elementorAppC.access_tier, | |
| 3905 | + isPro = _window$elementorAppC.is_pro; | |
| 3906 | + iframeRef.current.contentWindow.postMessage({ | |
| 3907 | + type: 'referrer/info', | |
| 3908 | + info: { | |
| 3909 | + page: { | |
| 3910 | + url: window.location.href | |
| 3911 | + }, | |
| 3912 | + authToken: remoteConfig[_remoteConfig.CONFIG_KEYS.AUTH_TOKEN] || '', | |
| 3913 | + products: { | |
| 3914 | + core: { | |
| 3915 | + version: window.elementor.config.version | |
| 3916 | + }, | |
| 3917 | + pro: { | |
| 3918 | + isPro: isPro, | |
| 3919 | + accessLevel: accessLevel, | |
| 3920 | + accessTier: accessTier | |
| 3921 | + }, | |
| 3922 | + ai: { | |
| 3923 | + isConnected: isConnected, | |
| 3924 | + hasSubscription: hasSubscription, | |
| 3925 | + credits: credits, | |
| 3926 | + usagePercentage: usagePercentage | |
| 3927 | + } | |
| 3928 | + }, | |
| 3929 | + user: { | |
| 3930 | + isAdmin: window.elementor.config.user.is_administrator | |
| 3931 | + } | |
| 3932 | + } | |
| 3933 | + }, iframeOrigin); | |
| 3934 | + }, | |
| 3935 | + style: { | |
| 3936 | + border: 'none', | |
| 3937 | + overflow: 'scroll', | |
| 3938 | + width: '100%', | |
| 3939 | + height: '100%', | |
| 3940 | + backgroundColor: 'rgba(255,255,255,0.6)' | |
| 3941 | + } | |
| 3942 | + }))); | |
| 3683 | 3943 | }; |
| 3944 | +exports.UrlDialog = UrlDialog; | |
| 3684 | 3945 | UrlDialog.propTypes = { |
| 3685 | 3946 | onAttach: _propTypes.default.func.isRequired, |
| 3686 | 3947 | onClose: _propTypes.default.func.isRequired, |
| 3687 | 3948 | url: _propTypes.default.string |
| @@ -3714,11 +3975,12 @@ | ||
| 3714 | 3975 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 3715 | 3976 | var _promptDialog = _interopRequireDefault(__webpack_require__(/*! ../../../components/prompt-dialog */ "../modules/ai/assets/js/editor/components/prompt-dialog.js")); |
| 3716 | 3977 | var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); |
| 3717 | 3978 | var _excluded = ["sx", "PaperProps"]; |
| 3718 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 3719 | -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 3720 | -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 3979 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 3980 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 3981 | +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; } | |
| 3982 | +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) { (0, _defineProperty2.default)(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; } | |
| 3721 | 3983 | var StyledDialog = (0, _ui.styled)(_promptDialog.default)(function () { |
| 3722 | 3984 | return { |
| 3723 | 3985 | '& .MuiDialog-container': { |
| 3724 | 3986 | marginTop: 0, |
| @@ -3726,9 +3988,9 @@ | ||
| 3726 | 3988 | paddingBottom: '16vh' |
| 3727 | 3989 | }, |
| 3728 | 3990 | '& .MuiPaper-root': { |
| 3729 | 3991 | margin: 0, |
| 3730 | - maxHeight: '80vh' | |
| 3992 | + maxHeight: '55vh' | |
| 3731 | 3993 | } |
| 3732 | 3994 | }; |
| 3733 | 3995 | }); |
| 3734 | 3996 | var DialogHeader = function DialogHeader(_ref) { |
| @@ -3838,9 +4100,10 @@ | ||
| 3838 | 4100 | PaperProps: _propTypes.default.object |
| 3839 | 4101 | }; |
| 3840 | 4102 | LayoutDialog.Header = DialogHeader; |
| 3841 | 4103 | LayoutDialog.Content = StyledDialogContent; |
| 3842 | -var _default = exports["default"] = LayoutDialog; | |
| 4104 | +var _default = LayoutDialog; | |
| 4105 | +exports["default"] = _default; | |
| 3843 | 4106 | |
| 3844 | 4107 | /***/ }), |
| 3845 | 4108 | |
| 3846 | 4109 | /***/ "../modules/ai/assets/js/editor/pages/form-layout/components/pro-template-indicator.js": |
| @@ -3862,9 +4125,10 @@ | ||
| 3862 | 4125 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 3863 | 4126 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 3864 | 4127 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 3865 | 4128 | var _lockIcon = _interopRequireDefault(__webpack_require__(/*! ../../../icons/lock-icon */ "../modules/ai/assets/js/editor/icons/lock-icon.js")); |
| 3866 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 4129 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 4130 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 3867 | 4131 | var popoverId = 'e-pro-upgrade-popover'; |
| 3868 | 4132 | var StyledContent = (0, _ui.styled)(_ui.Paper)(function (_ref) { |
| 3869 | 4133 | var theme = _ref.theme; |
| 3870 | 4134 | return { |
| @@ -3898,9 +4162,9 @@ | ||
| 3898 | 4162 | backgroundImage: 'linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05))' |
| 3899 | 4163 | } |
| 3900 | 4164 | }; |
| 3901 | 4165 | }); |
| 3902 | -var ProTemplateIndicator = exports.ProTemplateIndicator = function ProTemplateIndicator() { | |
| 4166 | +var ProTemplateIndicator = function ProTemplateIndicator() { | |
| 3903 | 4167 | var actionUrl = 'https://go.elementor.com/go-pro-ai/'; |
| 3904 | 4168 | var actionLabel = (0, _i18n.__)('Go Pro', 'elementor'); |
| 3905 | 4169 | var _useState = (0, _react.useState)(false), |
| 3906 | 4170 | _useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| @@ -3984,11 +4248,86 @@ | ||
| 3984 | 4248 | alignSelf: 'flex-end' |
| 3985 | 4249 | } |
| 3986 | 4250 | }, actionLabel))))); |
| 3987 | 4251 | }; |
| 4252 | +exports.ProTemplateIndicator = ProTemplateIndicator; | |
| 3988 | 4253 | |
| 3989 | 4254 | /***/ }), |
| 3990 | 4255 | |
| 4256 | +/***/ "../modules/ai/assets/js/editor/pages/form-layout/components/pro-widgets-notice.js": | |
| 4257 | +/*!*****************************************************************************************!*\ | |
| 4258 | + !*** ../modules/ai/assets/js/editor/pages/form-layout/components/pro-widgets-notice.js ***! | |
| 4259 | + \*****************************************************************************************/ | |
| 4260 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 4261 | + | |
| 4262 | +"use strict"; | |
| 4263 | + | |
| 4264 | + | |
| 4265 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 4266 | +Object.defineProperty(exports, "__esModule", ({ | |
| 4267 | + value: true | |
| 4268 | +})); | |
| 4269 | +exports.ProWidgetsNotice = void 0; | |
| 4270 | +var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 4271 | +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 4272 | +var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 4273 | +var _lockIcon = _interopRequireDefault(__webpack_require__(/*! ../../../icons/lock-icon */ "../modules/ai/assets/js/editor/icons/lock-icon.js")); | |
| 4274 | +var _useIntroduction2 = _interopRequireDefault(__webpack_require__(/*! ../../../hooks/use-introduction */ "../modules/ai/assets/js/editor/hooks/use-introduction.js")); | |
| 4275 | +var ProWidgetsNotice = function ProWidgetsNotice() { | |
| 4276 | + var _useIntroduction = (0, _useIntroduction2.default)('e-ai-builder-pro-widget'), | |
| 4277 | + isViewed = _useIntroduction.isViewed, | |
| 4278 | + markAsViewed = _useIntroduction.markAsViewed; | |
| 4279 | + if (isViewed) { | |
| 4280 | + return null; | |
| 4281 | + } | |
| 4282 | + return /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 4283 | + sx: { | |
| 4284 | + pt: 2, | |
| 4285 | + px: 2, | |
| 4286 | + pb: 0 | |
| 4287 | + } | |
| 4288 | + }, /*#__PURE__*/_react.default.createElement(_ui.Alert, { | |
| 4289 | + severity: "info", | |
| 4290 | + variant: "filled", | |
| 4291 | + color: "promotion", | |
| 4292 | + onClose: function onClose() { | |
| 4293 | + return markAsViewed(); | |
| 4294 | + }, | |
| 4295 | + icon: /*#__PURE__*/_react.default.createElement(_lockIcon.default, null), | |
| 4296 | + sx: { | |
| 4297 | + '& .MuiAlert-message': { | |
| 4298 | + width: '100%' | |
| 4299 | + } | |
| 4300 | + } | |
| 4301 | + }, /*#__PURE__*/_react.default.createElement(_ui.Stack, { | |
| 4302 | + flexDirection: "row", | |
| 4303 | + alignItems: "baseline", | |
| 4304 | + justifyContent: "space-between" | |
| 4305 | + }, /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 4306 | + variant: "body2", | |
| 4307 | + component: "span", | |
| 4308 | + sx: { | |
| 4309 | + paddingInlineEnd: 0.5 | |
| 4310 | + } | |
| 4311 | + }, /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 4312 | + variant: "subtitle2", | |
| 4313 | + component: "span", | |
| 4314 | + sx: { | |
| 4315 | + paddingInlineEnd: 1 | |
| 4316 | + } | |
| 4317 | + }, (0, _i18n.__)('Upgrade your plan for best results.', 'elementor')), (0, _i18n.__)('You won’t be able to use layouts with Elementor Pro widgets until you do.', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.Button, { | |
| 4318 | + variant: "outlined", | |
| 4319 | + size: "small", | |
| 4320 | + onClick: function onClick() { | |
| 4321 | + return window.open('https://go.elementor.com/upgrade-pro/', '_blank'); | |
| 4322 | + }, | |
| 4323 | + color: "inherit" | |
| 4324 | + }, (0, _i18n.__)('Go Pro', 'elementor'))))); | |
| 4325 | +}; | |
| 4326 | +exports.ProWidgetsNotice = ProWidgetsNotice; | |
| 4327 | + | |
| 4328 | +/***/ }), | |
| 4329 | + | |
| 3991 | 4330 | /***/ "../modules/ai/assets/js/editor/pages/form-layout/components/prompt-autocomplete.js": |
| 3992 | 4331 | /*!******************************************************************************************!*\ |
| 3993 | 4332 | !*** ../modules/ai/assets/js/editor/pages/form-layout/components/prompt-autocomplete.js ***! |
| 3994 | 4333 | \******************************************************************************************/ |
| @@ -4013,11 +4352,12 @@ | ||
| 4013 | 4352 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 4014 | 4353 | var _promptLibraryLink = _interopRequireDefault(__webpack_require__(/*! ../../../components/prompt-library-link */ "../modules/ai/assets/js/editor/components/prompt-library-link.js")); |
| 4015 | 4354 | var _config = __webpack_require__(/*! ../context/config */ "../modules/ai/assets/js/editor/pages/form-layout/context/config.js"); |
| 4016 | 4355 | var _excluded = ["onSubmit"]; |
| 4017 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 4018 | -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 4019 | -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 4356 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 4357 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 4358 | +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; } | |
| 4359 | +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) { (0, _defineProperty2.default)(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; } | |
| 4020 | 4360 | var TextInput = (0, _react.forwardRef)(function (props, ref) { |
| 4021 | 4361 | return /*#__PURE__*/_react.default.createElement(_ui.TextField |
| 4022 | 4362 | // eslint-disable-next-line jsx-a11y/no-autofocus |
| 4023 | 4363 | , (0, _extends2.default)({ |
| @@ -4120,9 +4460,10 @@ | ||
| 4120 | 4460 | PromptAutocomplete.propTypes = { |
| 4121 | 4461 | onSubmit: _propTypes.default.func.isRequired |
| 4122 | 4462 | }; |
| 4123 | 4463 | PromptAutocomplete.TextInput = TextInput; |
| 4124 | -var _default = exports["default"] = PromptAutocomplete; | |
| 4464 | +var _default = PromptAutocomplete; | |
| 4465 | +exports["default"] = _default; | |
| 4125 | 4466 | |
| 4126 | 4467 | /***/ }), |
| 4127 | 4468 | |
| 4128 | 4469 | /***/ "../modules/ai/assets/js/editor/pages/form-layout/components/prompt-form.js": |
| @@ -4156,52 +4497,35 @@ | ||
| 4156 | 4497 | var _attachments = _interopRequireDefault(__webpack_require__(/*! ./attachments */ "../modules/ai/assets/js/editor/pages/form-layout/components/attachments.js")); |
| 4157 | 4498 | var _config = __webpack_require__(/*! ../context/config */ "../modules/ai/assets/js/editor/pages/form-layout/context/config.js"); |
| 4158 | 4499 | var _attachment = __webpack_require__(/*! ../../../types/attachment */ "../modules/ai/assets/js/editor/types/attachment.js"); |
| 4159 | 4500 | var _excluded = ["tooltip"]; |
| 4160 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 4161 | -var PROMPT_SUGGESTIONS = Object.freeze([ | |
| 4162 | -// Translators: [Topic] is a placeholder for the user - please translate it as well | |
| 4163 | -{ | |
| 4501 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 4502 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 4503 | +var PROMPT_SUGGESTIONS = Object.freeze([{ | |
| 4164 | 4504 | text: (0, _i18n.__)('Hero section on [topic] with heading, text, buttons on the right, and an image on the left', 'elementor.com') |
| 4165 | -}, | |
| 4166 | -// Translators: [Topic] is a placeholder for the user - please translate it as well | |
| 4167 | -{ | |
| 4505 | +}, { | |
| 4168 | 4506 | text: (0, _i18n.__)('About Us section on [topic] with heading, text, and big image below', 'elementor.com') |
| 4169 | 4507 | }, { |
| 4170 | 4508 | text: (0, _i18n.__)('Team section with four image boxes showcasing team members', 'elementor.com') |
| 4171 | -}, | |
| 4172 | -// Translators: [Topic] is a placeholder for the user - please translate it as well | |
| 4173 | -{ | |
| 4509 | +}, { | |
| 4174 | 4510 | text: (0, _i18n.__)('FAQ section with a toggle widget showcasing FAQs about [topic]', 'elementor.com') |
| 4175 | 4511 | }, { |
| 4176 | 4512 | text: (0, _i18n.__)('Gallery section with a carousel displaying three images at once', 'elementor.com') |
| 4177 | -}, | |
| 4178 | -// Translators: [Topic] is a placeholder for the user - please translate it as well | |
| 4179 | -{ | |
| 4513 | +}, { | |
| 4180 | 4514 | text: (0, _i18n.__)('Contact section with a form for [topic]', 'elementor.com') |
| 4181 | 4515 | }, { |
| 4182 | 4516 | text: (0, _i18n.__)('Client section featuring companies\' logos', 'elementor.com') |
| 4183 | -}, | |
| 4184 | -// Translators: [Topic] is a placeholder for the user - please translate it as well | |
| 4185 | -{ | |
| 4517 | +}, { | |
| 4186 | 4518 | text: (0, _i18n.__)('Testimonial section with testimonials, each featuring a star rating and an image', 'elementor.com') |
| 4187 | -}, | |
| 4188 | -// Translators: [Topic] is a placeholder for the user - please translate it as well | |
| 4189 | -{ | |
| 4519 | +}, { | |
| 4190 | 4520 | text: (0, _i18n.__)('Service section about [topic], showcasing four services with buttons', 'elementor.com') |
| 4191 | -}, | |
| 4192 | -// Translators: [Topic] is a placeholder for the user - please translate it as well | |
| 4193 | -{ | |
| 4521 | +}, { | |
| 4194 | 4522 | text: (0, _i18n.__)('Stats section with counters displaying data about [topic]', 'elementor.com') |
| 4195 | 4523 | }, { |
| 4196 | 4524 | text: (0, _i18n.__)('Quote section with colored background, featuring a centered quote', 'elementor.com') |
| 4197 | -}, | |
| 4198 | -// Translators: [Topic] is a placeholder for the user - please translate it as well | |
| 4199 | -{ | |
| 4525 | +}, { | |
| 4200 | 4526 | text: (0, _i18n.__)('Pricing section for [topic] with a pricing list', 'elementor.com') |
| 4201 | -}, | |
| 4202 | -// Translators: [Topic] is a placeholder for the user - please translate it as well | |
| 4203 | -{ | |
| 4527 | +}, { | |
| 4204 | 4528 | text: (0, _i18n.__)('Subscribe section featuring a simple email form, inviting users to stay informed on [topic]', 'elementor.com') |
| 4205 | 4529 | }]); |
| 4206 | 4530 | var IconButtonWithTooltip = function IconButtonWithTooltip(_ref) { |
| 4207 | 4531 | var tooltip = _ref.tooltip, |
| @@ -4354,9 +4678,10 @@ | ||
| 4354 | 4678 | onEdit: _propTypes.default.func.isRequired, |
| 4355 | 4679 | attachments: _propTypes.default.arrayOf(_attachment.AttachmentPropType), |
| 4356 | 4680 | shouldResetPrompt: _propTypes.default.bool |
| 4357 | 4681 | }; |
| 4358 | -var _default = exports["default"] = PromptForm; | |
| 4682 | +var _default = PromptForm; | |
| 4683 | +exports["default"] = _default; | |
| 4359 | 4684 | |
| 4360 | 4685 | /***/ }), |
| 4361 | 4686 | |
| 4362 | 4687 | /***/ "../modules/ai/assets/js/editor/pages/form-layout/components/screenshot-container.js": |
| @@ -4404,9 +4729,10 @@ | ||
| 4404 | 4729 | outlineColor: theme.palette.text.primary |
| 4405 | 4730 | } |
| 4406 | 4731 | }; |
| 4407 | 4732 | }); |
| 4408 | -var _default = exports["default"] = ScreenshotContainer; | |
| 4733 | +var _default = ScreenshotContainer; | |
| 4734 | +exports["default"] = _default; | |
| 4409 | 4735 | |
| 4410 | 4736 | /***/ }), |
| 4411 | 4737 | |
| 4412 | 4738 | /***/ "../modules/ai/assets/js/editor/pages/form-layout/components/screenshot-unavailable.js": |
| @@ -4428,10 +4754,10 @@ | ||
| 4428 | 4754 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 4429 | 4755 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 4430 | 4756 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 4431 | 4757 | var _screenshotContainer = _interopRequireDefault(__webpack_require__(/*! ./screenshot-container */ "../modules/ai/assets/js/editor/pages/form-layout/components/screenshot-container.js")); |
| 4432 | -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 4433 | -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 4758 | +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; } | |
| 4759 | +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) { (0, _defineProperty2.default)(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; } | |
| 4434 | 4760 | function ScreenshotUnavailable(props) { |
| 4435 | 4761 | return /*#__PURE__*/_react.default.createElement(_screenshotContainer.default, (0, _extends2.default)({}, props, { |
| 4436 | 4762 | sx: _objectSpread(_objectSpread({}, props.sx || {}), {}, { |
| 4437 | 4763 | display: 'flex', |
| @@ -4473,10 +4799,10 @@ | ||
| 4473 | 4799 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 4474 | 4800 | var _screenshotContainer = _interopRequireDefault(__webpack_require__(/*! ./screenshot-container */ "../modules/ai/assets/js/editor/pages/form-layout/components/screenshot-container.js")); |
| 4475 | 4801 | var _screenshotUnavailable = _interopRequireDefault(__webpack_require__(/*! ./screenshot-unavailable */ "../modules/ai/assets/js/editor/pages/form-layout/components/screenshot-unavailable.js")); |
| 4476 | 4802 | var _templateBadge = _interopRequireDefault(__webpack_require__(/*! ./template-badge */ "../modules/ai/assets/js/editor/pages/form-layout/components/template-badge.js")); |
| 4477 | -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 4478 | -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 4803 | +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; } | |
| 4804 | +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) { (0, _defineProperty2.default)(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; } | |
| 4479 | 4805 | var SCREENSHOT_HEIGHT = '138px'; |
| 4480 | 4806 | var Screenshot = function Screenshot(_ref) { |
| 4481 | 4807 | var url = _ref.url, |
| 4482 | 4808 | type = _ref.type, |
| @@ -4539,9 +4865,10 @@ | ||
| 4539 | 4865 | type: _propTypes.default.string, |
| 4540 | 4866 | sx: _propTypes.default.object, |
| 4541 | 4867 | outlineOffset: _propTypes.default.string |
| 4542 | 4868 | }; |
| 4543 | -var _default = exports["default"] = Screenshot; | |
| 4869 | +var _default = Screenshot; | |
| 4870 | +exports["default"] = _default; | |
| 4544 | 4871 | |
| 4545 | 4872 | /***/ }), |
| 4546 | 4873 | |
| 4547 | 4874 | /***/ "../modules/ai/assets/js/editor/pages/form-layout/components/template-badge.js": |
| @@ -4569,9 +4896,10 @@ | ||
| 4569 | 4896 | return /*#__PURE__*/_react.default.createElement(_proTemplateIndicator.ProTemplateIndicator, null); |
| 4570 | 4897 | } |
| 4571 | 4898 | return null; |
| 4572 | 4899 | }; |
| 4573 | -var _default = exports["default"] = TemplateBadge; | |
| 4900 | +var _default = TemplateBadge; | |
| 4901 | +exports["default"] = _default; | |
| 4574 | 4902 | TemplateBadge.propTypes = { |
| 4575 | 4903 | type: _propTypes.default.string |
| 4576 | 4904 | }; |
| 4577 | 4905 | |
| @@ -4625,9 +4953,10 @@ | ||
| 4625 | 4953 | text: _propTypes.default.string, |
| 4626 | 4954 | onCancel: _propTypes.default.func, |
| 4627 | 4955 | onClose: _propTypes.default.func |
| 4628 | 4956 | }; |
| 4629 | -var _default = exports["default"] = UnsavedChangesAlert; | |
| 4957 | +var _default = UnsavedChangesAlert; | |
| 4958 | +exports["default"] = _default; | |
| 4630 | 4959 | |
| 4631 | 4960 | /***/ }), |
| 4632 | 4961 | |
| 4633 | 4962 | /***/ "../modules/ai/assets/js/editor/pages/form-layout/context/config.js": |
| @@ -4645,16 +4974,20 @@ | ||
| 4645 | 4974 | })); |
| 4646 | 4975 | exports.useConfig = exports["default"] = exports.MODE_VARIATION = exports.MODE_LAYOUT = exports.LAYOUT_APP_MODES = exports.ConfigProvider = void 0; |
| 4647 | 4976 | var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 4648 | 4977 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 4649 | -var MODE_LAYOUT = exports.MODE_LAYOUT = 'layout'; | |
| 4650 | -var MODE_VARIATION = exports.MODE_VARIATION = 'variation'; | |
| 4651 | -var LAYOUT_APP_MODES = exports.LAYOUT_APP_MODES = [MODE_LAYOUT, MODE_VARIATION]; | |
| 4978 | +var MODE_LAYOUT = 'layout'; | |
| 4979 | +exports.MODE_LAYOUT = MODE_LAYOUT; | |
| 4980 | +var MODE_VARIATION = 'variation'; | |
| 4981 | +exports.MODE_VARIATION = MODE_VARIATION; | |
| 4982 | +var LAYOUT_APP_MODES = [MODE_LAYOUT, MODE_VARIATION]; | |
| 4983 | +exports.LAYOUT_APP_MODES = LAYOUT_APP_MODES; | |
| 4652 | 4984 | var ConfigContext = _react.default.createContext({}); |
| 4653 | -var useConfig = exports.useConfig = function useConfig() { | |
| 4985 | +var useConfig = function useConfig() { | |
| 4654 | 4986 | return _react.default.useContext(ConfigContext); |
| 4655 | 4987 | }; |
| 4656 | -var ConfigProvider = exports.ConfigProvider = function ConfigProvider(props) { | |
| 4988 | +exports.useConfig = useConfig; | |
| 4989 | +var ConfigProvider = function ConfigProvider(props) { | |
| 4657 | 4990 | return /*#__PURE__*/_react.default.createElement(ConfigContext.Provider, { |
| 4658 | 4991 | value: { |
| 4659 | 4992 | mode: props.mode, |
| 4660 | 4993 | attachmentsTypes: props.attachmentsTypes, |
| @@ -4668,8 +5001,9 @@ | ||
| 4668 | 5001 | hasPro: props.hasPro |
| 4669 | 5002 | } |
| 4670 | 5003 | }, props.children); |
| 4671 | 5004 | }; |
| 5005 | +exports.ConfigProvider = ConfigProvider; | |
| 4672 | 5006 | ConfigProvider.propTypes = { |
| 4673 | 5007 | mode: _propTypes.default.oneOf(LAYOUT_APP_MODES).isRequired, |
| 4674 | 5008 | children: _propTypes.default.node.isRequired, |
| 4675 | 5009 | attachmentsTypes: _propTypes.default.object.isRequired, |
| @@ -4681,9 +5015,10 @@ | ||
| 4681 | 5015 | onGenerate: _propTypes.default.func.isRequired, |
| 4682 | 5016 | currentContext: _propTypes.default.object, |
| 4683 | 5017 | hasPro: _propTypes.default.bool |
| 4684 | 5018 | }; |
| 4685 | -var _default = exports["default"] = ConfigContext; | |
| 5019 | +var _default = ConfigContext; | |
| 5020 | +exports["default"] = _default; | |
| 4686 | 5021 | |
| 4687 | 5022 | /***/ }), |
| 4688 | 5023 | |
| 4689 | 5024 | /***/ "../modules/ai/assets/js/editor/pages/form-layout/context/remote-config.js": |
| @@ -4706,18 +5041,21 @@ | ||
| 4706 | 5041 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 4707 | 5042 | var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 4708 | 5043 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 4709 | 5044 | var _api = __webpack_require__(/*! ../../../api */ "../modules/ai/assets/js/editor/api/index.js"); |
| 4710 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); } | |
| 5045 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 5046 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 4711 | 5047 | var RemoteConfigContext = _react.default.createContext({}); |
| 4712 | -var useRemoteConfig = exports.useRemoteConfig = function useRemoteConfig() { | |
| 5048 | +var useRemoteConfig = function useRemoteConfig() { | |
| 4713 | 5049 | return _react.default.useContext(RemoteConfigContext); |
| 4714 | 5050 | }; |
| 4715 | -var CONFIG_KEYS = exports.CONFIG_KEYS = { | |
| 5051 | +exports.useRemoteConfig = useRemoteConfig; | |
| 5052 | +var CONFIG_KEYS = { | |
| 4716 | 5053 | WEB_BASED_BUILDER_URL: 'webBasedBuilderUrl', |
| 4717 | 5054 | AUTH_TOKEN: 'jwt' |
| 4718 | 5055 | }; |
| 4719 | -var RemoteConfigProvider = exports.RemoteConfigProvider = function RemoteConfigProvider(props) { | |
| 5056 | +exports.CONFIG_KEYS = CONFIG_KEYS; | |
| 5057 | +var RemoteConfigProvider = function RemoteConfigProvider(props) { | |
| 4720 | 5058 | var _useState = (0, _react.useState)(false), |
| 4721 | 5059 | _useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| 4722 | 5060 | isLoading = _useState2[0], |
| 4723 | 5061 | setIsLoading = _useState2[1]; |
| @@ -4733,54 +5071,47 @@ | ||
| 4733 | 5071 | _useState8 = (0, _slicedToArray2.default)(_useState7, 2), |
| 4734 | 5072 | remoteConfig = _useState8[0], |
| 4735 | 5073 | setRemoteConfig = _useState8[1]; |
| 4736 | 5074 | var fetchData = /*#__PURE__*/function () { |
| 4737 | - var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 4738 | - var result, _t; | |
| 4739 | - return _regenerator.default.wrap(function (_context) { | |
| 5075 | + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 5076 | + var result; | |
| 5077 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 4740 | 5078 | while (1) switch (_context.prev = _context.next) { |
| 4741 | 5079 | case 0: |
| 4742 | 5080 | setIsLoading(true); |
| 4743 | - setIsError(false); | |
| 4744 | 5081 | _context.prev = 1; |
| 4745 | - _context.next = 2; | |
| 5082 | + _context.next = 4; | |
| 4746 | 5083 | return (0, _api.getRemoteConfig)().finally(function () { |
| 4747 | 5084 | setIsLoaded(true); |
| 4748 | 5085 | setIsLoading(false); |
| 4749 | 5086 | }); |
| 4750 | - case 2: | |
| 5087 | + case 4: | |
| 4751 | 5088 | result = _context.sent; |
| 4752 | 5089 | if (result.config) { |
| 4753 | - _context.next = 3; | |
| 5090 | + _context.next = 7; | |
| 4754 | 5091 | break; |
| 4755 | 5092 | } |
| 4756 | 5093 | throw new Error('Invalid remote config'); |
| 4757 | - case 3: | |
| 5094 | + case 7: | |
| 4758 | 5095 | setRemoteConfig(result.config); |
| 4759 | - _context.next = 5; | |
| 5096 | + _context.next = 15; | |
| 4760 | 5097 | break; |
| 4761 | - case 4: | |
| 4762 | - _context.prev = 4; | |
| 4763 | - _t = _context["catch"](1); | |
| 5098 | + case 10: | |
| 5099 | + _context.prev = 10; | |
| 5100 | + _context.t0 = _context["catch"](1); | |
| 4764 | 5101 | setIsError(true); |
| 4765 | 5102 | setIsLoaded(true); |
| 4766 | 5103 | setIsLoading(false); |
| 4767 | - case 5: | |
| 5104 | + case 15: | |
| 4768 | 5105 | case "end": |
| 4769 | 5106 | return _context.stop(); |
| 4770 | 5107 | } |
| 4771 | - }, _callee, null, [[1, 4]]); | |
| 5108 | + }, _callee, null, [[1, 10]]); | |
| 4772 | 5109 | })); |
| 4773 | 5110 | return function fetchData() { |
| 4774 | 5111 | return _ref.apply(this, arguments); |
| 4775 | 5112 | }; |
| 4776 | 5113 | }(); |
| 4777 | - (0, _react.useEffect)(function () { | |
| 4778 | - window.addEventListener('elementor/connect/success', fetchData); | |
| 4779 | - return function () { | |
| 4780 | - window.removeEventListener('elementor/connect/success', fetchData); | |
| 4781 | - }; | |
| 4782 | - }, []); | |
| 4783 | 5114 | if (!isLoaded && !isLoading) { |
| 4784 | 5115 | fetchData(); |
| 4785 | 5116 | } |
| 4786 | 5117 | return /*#__PURE__*/_react.default.createElement(RemoteConfigContext.Provider, { |
| @@ -4791,8 +5122,9 @@ | ||
| 4791 | 5122 | remoteConfig: remoteConfig |
| 4792 | 5123 | } |
| 4793 | 5124 | }, props.children); |
| 4794 | 5125 | }; |
| 5126 | +exports.RemoteConfigProvider = RemoteConfigProvider; | |
| 4795 | 5127 | RemoteConfigProvider.propTypes = { |
| 4796 | 5128 | children: _propTypes.default.node.isRequired, |
| 4797 | 5129 | onError: _propTypes.default.func.isRequired |
| 4798 | 5130 | }; |
| @@ -4798,8 +5130,61 @@ | ||
| 4798 | 5130 | }; |
| 4799 | 5131 | |
| 4800 | 5132 | /***/ }), |
| 4801 | 5133 | |
| 5134 | +/***/ "../modules/ai/assets/js/editor/pages/form-layout/hooks/use-attach-url-service.js": | |
| 5135 | +/*!****************************************************************************************!*\ | |
| 5136 | + !*** ../modules/ai/assets/js/editor/pages/form-layout/hooks/use-attach-url-service.js ***! | |
| 5137 | + \****************************************************************************************/ | |
| 5138 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 5139 | + | |
| 5140 | +"use strict"; | |
| 5141 | + | |
| 5142 | + | |
| 5143 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 5144 | +Object.defineProperty(exports, "__esModule", ({ | |
| 5145 | + value: true | |
| 5146 | +})); | |
| 5147 | +exports.useAttachUrlService = void 0; | |
| 5148 | +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 5149 | +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 5150 | +var _react = __webpack_require__(/*! react */ "react"); | |
| 5151 | +var _remoteConfig = __webpack_require__(/*! ../context/remote-config */ "../modules/ai/assets/js/editor/pages/form-layout/context/remote-config.js"); | |
| 5152 | +var useAttachUrlService = function useAttachUrlService(args) { | |
| 5153 | + var _window$elementorComm, _window$elementorComm2; | |
| 5154 | + var _useState = (0, _react.useState)(args.targetUrl), | |
| 5155 | + _useState2 = (0, _slicedToArray2.default)(_useState, 2), | |
| 5156 | + currentUrl = _useState2[0], | |
| 5157 | + setCurrentUrl = _useState2[1]; | |
| 5158 | + var theme = (0, _ui.useTheme)(); | |
| 5159 | + var _useRemoteConfig = (0, _remoteConfig.useRemoteConfig)(), | |
| 5160 | + isLoaded = _useRemoteConfig.isLoaded, | |
| 5161 | + isError = _useRemoteConfig.isError, | |
| 5162 | + remoteConfig = _useRemoteConfig.remoteConfig; | |
| 5163 | + if (!isLoaded || isError || !remoteConfig[_remoteConfig.CONFIG_KEYS.WEB_BASED_BUILDER_URL]) { | |
| 5164 | + return { | |
| 5165 | + iframeSource: '', | |
| 5166 | + currentUrl: currentUrl, | |
| 5167 | + setCurrentUrl: setCurrentUrl | |
| 5168 | + }; | |
| 5169 | + } | |
| 5170 | + var urlObject = new URL(remoteConfig[_remoteConfig.CONFIG_KEYS.WEB_BASED_BUILDER_URL]); | |
| 5171 | + urlObject.searchParams.append('colorScheme', theme.palette.mode); | |
| 5172 | + urlObject.searchParams.append('isRTL', 'rtl' === theme.direction ? 'true' : 'false'); | |
| 5173 | + urlObject.searchParams.append('version', (_window$elementorComm = window.elementorCommon) === null || _window$elementorComm === void 0 ? void 0 : (_window$elementorComm2 = _window$elementorComm.config) === null || _window$elementorComm2 === void 0 ? void 0 : _window$elementorComm2.version); | |
| 5174 | + if (currentUrl) { | |
| 5175 | + urlObject.searchParams.append('url', currentUrl); | |
| 5176 | + } | |
| 5177 | + return { | |
| 5178 | + iframeSource: urlObject.toString(), | |
| 5179 | + currentUrl: currentUrl, | |
| 5180 | + setCurrentUrl: setCurrentUrl | |
| 5181 | + }; | |
| 5182 | +}; | |
| 5183 | +exports.useAttachUrlService = useAttachUrlService; | |
| 5184 | + | |
| 5185 | +/***/ }), | |
| 5186 | + | |
| 4802 | 5187 | /***/ "../modules/ai/assets/js/editor/pages/form-layout/hooks/use-layout-prompt.js": |
| 4803 | 5188 | /*!***********************************************************************************!*\ |
| 4804 | 5189 | !*** ../modules/ai/assets/js/editor/pages/form-layout/hooks/use-layout-prompt.js ***! |
| 4805 | 5190 | \***********************************************************************************/ |
| @@ -4820,9 +5205,10 @@ | ||
| 4820 | 5205 | requestBody.variationType = type; |
| 4821 | 5206 | return (0, _api.generateLayout)(requestBody, signal); |
| 4822 | 5207 | }, initialValue); |
| 4823 | 5208 | }; |
| 4824 | -var _default = exports["default"] = useLayoutPrompt; | |
| 5209 | +var _default = useLayoutPrompt; | |
| 5210 | +exports["default"] = _default; | |
| 4825 | 5211 | |
| 4826 | 5212 | /***/ }), |
| 4827 | 5213 | |
| 4828 | 5214 | /***/ "../modules/ai/assets/js/editor/pages/form-layout/hooks/use-screenshot.js": |
| @@ -4857,17 +5243,17 @@ | ||
| 4857 | 5243 | var layoutData = (0, _useLayoutPrompt.default)(type, null); |
| 4858 | 5244 | var generate = function generate(requestBody, signal) { |
| 4859 | 5245 | setIsLoading(true); |
| 4860 | 5246 | setError(ERROR_INITIAL_VALUE); |
| 4861 | - return layoutData.send(requestBody, signal).then(/*#__PURE__*/function () { | |
| 4862 | - var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(data) { | |
| 5247 | + return layoutData.send(requestBody, signal).then( /*#__PURE__*/function () { | |
| 5248 | + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(data) { | |
| 4863 | 5249 | var createdScreenshot; |
| 4864 | - return _regenerator.default.wrap(function (_context) { | |
| 5250 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 4865 | 5251 | while (1) switch (_context.prev = _context.next) { |
| 4866 | 5252 | case 0: |
| 4867 | - _context.next = 1; | |
| 5253 | + _context.next = 2; | |
| 4868 | 5254 | return onData(data.result); |
| 4869 | - case 1: | |
| 5255 | + case 2: | |
| 4870 | 5256 | createdScreenshot = _context.sent; |
| 4871 | 5257 | createdScreenshot.sendUsageData = function () { |
| 4872 | 5258 | return layoutData.sendUsageData(data); |
| 4873 | 5259 | }; |
| @@ -4873,9 +5259,9 @@ | ||
| 4873 | 5259 | }; |
| 4874 | 5260 | createdScreenshot.baseTemplateId = data.baseTemplateId; |
| 4875 | 5261 | createdScreenshot.type = data.type; |
| 4876 | 5262 | return _context.abrupt("return", createdScreenshot); |
| 4877 | - case 2: | |
| 5263 | + case 7: | |
| 4878 | 5264 | case "end": |
| 4879 | 5265 | return _context.stop(); |
| 4880 | 5266 | } |
| 4881 | 5267 | }, _callee); |
| @@ -4895,9 +5281,10 @@ | ||
| 4895 | 5281 | error: error, |
| 4896 | 5282 | isLoading: isLoading |
| 4897 | 5283 | }; |
| 4898 | 5284 | }; |
| 4899 | -var _default = exports["default"] = useScreenshot; | |
| 5285 | +var _default = useScreenshot; | |
| 5286 | +exports["default"] = _default; | |
| 4900 | 5287 | |
| 4901 | 5288 | /***/ }), |
| 4902 | 5289 | |
| 4903 | 5290 | /***/ "../modules/ai/assets/js/editor/pages/form-layout/hooks/use-screenshots.js": |
| @@ -4964,11 +5351,11 @@ | ||
| 4964 | 5351 | var _abortController$curr; |
| 4965 | 5352 | return (_abortController$curr = abortController.current) === null || _abortController$curr === void 0 ? void 0 : _abortController$curr.abort(); |
| 4966 | 5353 | }; |
| 4967 | 5354 | var createScreenshots = /*#__PURE__*/function () { |
| 4968 | - var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(prompt, attachments) { | |
| 5355 | + var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(prompt, attachments) { | |
| 4969 | 5356 | var onGenerate, onError, promises, results, isAllFailed; |
| 4970 | - return _regenerator.default.wrap(function (_context) { | |
| 5357 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 4971 | 5358 | while (1) switch (_context.prev = _context.next) { |
| 4972 | 5359 | case 0: |
| 4973 | 5360 | abortController.current = new AbortController(); |
| 4974 | 5361 | onGenerate = function onGenerate(screenshot) { |
| @@ -5022,11 +5409,11 @@ | ||
| 5022 | 5409 | }) |
| 5023 | 5410 | }; |
| 5024 | 5411 | return generate(requestBody, abortController.current.signal).then(onGenerate).catch(onError); |
| 5025 | 5412 | }); |
| 5026 | - _context.next = 1; | |
| 5413 | + _context.next = 6; | |
| 5027 | 5414 | return Promise.all(promises); |
| 5028 | - case 1: | |
| 5415 | + case 6: | |
| 5029 | 5416 | results = _context.sent; |
| 5030 | 5417 | isAllFailed = results.every(function (value) { |
| 5031 | 5418 | return false === value; |
| 5032 | 5419 | }); |
| @@ -5036,9 +5423,9 @@ | ||
| 5036 | 5423 | updatedData.splice(screenshotsGroupCount * -1); |
| 5037 | 5424 | return updatedData; |
| 5038 | 5425 | }); |
| 5039 | 5426 | } |
| 5040 | - case 2: | |
| 5427 | + case 9: | |
| 5041 | 5428 | case "end": |
| 5042 | 5429 | return _context.stop(); |
| 5043 | 5430 | } |
| 5044 | 5431 | }, _callee); |
| @@ -5068,9 +5455,10 @@ | ||
| 5068 | 5455 | error: error, |
| 5069 | 5456 | abort: abort |
| 5070 | 5457 | }; |
| 5071 | 5458 | }; |
| 5072 | -var _default = exports["default"] = useScreenshots; | |
| 5459 | +var _default = useScreenshots; | |
| 5460 | +exports["default"] = _default; | |
| 5073 | 5461 | |
| 5074 | 5462 | /***/ }), |
| 5075 | 5463 | |
| 5076 | 5464 | /***/ "../modules/ai/assets/js/editor/pages/form-layout/hooks/use-slider.js": |
| @@ -5088,10 +5476,12 @@ | ||
| 5088 | 5476 | })); |
| 5089 | 5477 | exports["default"] = exports.SCREENSHOTS_PER_PAGE = exports.MAX_PAGES = void 0; |
| 5090 | 5478 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 5091 | 5479 | var _react = __webpack_require__(/*! react */ "react"); |
| 5092 | -var SCREENSHOTS_PER_PAGE = exports.SCREENSHOTS_PER_PAGE = 3; | |
| 5093 | -var MAX_PAGES = exports.MAX_PAGES = 5; | |
| 5480 | +var SCREENSHOTS_PER_PAGE = 3; | |
| 5481 | +exports.SCREENSHOTS_PER_PAGE = SCREENSHOTS_PER_PAGE; | |
| 5482 | +var MAX_PAGES = 5; | |
| 5483 | +exports.MAX_PAGES = MAX_PAGES; | |
| 5094 | 5484 | var useSlider = function useSlider() { |
| 5095 | 5485 | var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, |
| 5096 | 5486 | _ref$slidesCount = _ref.slidesCount, |
| 5097 | 5487 | slidesCount = _ref$slidesCount === void 0 ? 0 : _ref$slidesCount, |
| @@ -5122,9 +5512,10 @@ | ||
| 5122 | 5512 | offsetXPercentage: offsetXPercentage, |
| 5123 | 5513 | slideWidthPercentage: slideWidthPercentage |
| 5124 | 5514 | }; |
| 5125 | 5515 | }; |
| 5126 | -var _default = exports["default"] = useSlider; | |
| 5516 | +var _default = useSlider; | |
| 5517 | +exports["default"] = _default; | |
| 5127 | 5518 | |
| 5128 | 5519 | /***/ }), |
| 5129 | 5520 | |
| 5130 | 5521 | /***/ "../modules/ai/assets/js/editor/pages/form-layout/index.js": |
| @@ -5162,14 +5553,16 @@ | ||
| 5162 | 5553 | var _expandDiagonalIcon = _interopRequireDefault(__webpack_require__(/*! ../../icons/expand-diagonal-icon */ "../modules/ai/assets/js/editor/icons/expand-diagonal-icon.js")); |
| 5163 | 5554 | var _config = __webpack_require__(/*! ./context/config */ "../modules/ai/assets/js/editor/pages/form-layout/context/config.js"); |
| 5164 | 5555 | var _attachment = __webpack_require__(/*! ../../types/attachment */ "../modules/ai/assets/js/editor/types/attachment.js"); |
| 5165 | 5556 | var _promptPowerNotice = __webpack_require__(/*! ./components/attachments/prompt-power-notice */ "../modules/ai/assets/js/editor/pages/form-layout/components/attachments/prompt-power-notice.js"); |
| 5557 | +var _proWidgetsNotice = __webpack_require__(/*! ./components/pro-widgets-notice */ "../modules/ai/assets/js/editor/pages/form-layout/components/pro-widgets-notice.js"); | |
| 5166 | 5558 | var _attachments = __webpack_require__(/*! ./components/attachments */ "../modules/ai/assets/js/editor/pages/form-layout/components/attachments.js"); |
| 5167 | 5559 | var _attachDialog = _interopRequireDefault(__webpack_require__(/*! ./components/attachments/attach-dialog */ "../modules/ai/assets/js/editor/pages/form-layout/components/attachments/attach-dialog.js")); |
| 5168 | 5560 | var _isURL = _interopRequireDefault(__webpack_require__(/*! validator/lib/isURL */ "../node_modules/validator/lib/isURL.js")); |
| 5169 | 5561 | var _voicePromotionAlert = __webpack_require__(/*! ../../components/voice-promotion-alert */ "../modules/ai/assets/js/editor/components/voice-promotion-alert.js"); |
| 5170 | 5562 | var _excluded = ["children"]; |
| 5171 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 5563 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 5564 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 5172 | 5565 | var DirectionalMinimizeDiagonalIcon = (0, _ui.withDirection)(_minimizeDiagonalIcon.default); |
| 5173 | 5566 | var DirectionalExpandDiagonalIcon = (0, _ui.withDirection)(_expandDiagonalIcon.default); |
| 5174 | 5567 | |
| 5175 | 5568 | /** |
| @@ -5214,9 +5607,10 @@ | ||
| 5214 | 5607 | onData = _useConfig.onData, |
| 5215 | 5608 | onInsert = _useConfig.onInsert, |
| 5216 | 5609 | onSelect = _useConfig.onSelect, |
| 5217 | 5610 | onClose = _useConfig.onClose, |
| 5218 | - onGenerate = _useConfig.onGenerate; | |
| 5611 | + onGenerate = _useConfig.onGenerate, | |
| 5612 | + hasPro = _useConfig.hasPro; | |
| 5219 | 5613 | var _useScreenshots = (0, _useScreenshots2.default)({ |
| 5220 | 5614 | onData: onData |
| 5221 | 5615 | }), |
| 5222 | 5616 | screenshots = _useScreenshots.screenshots, |
| @@ -5252,15 +5646,15 @@ | ||
| 5252 | 5646 | _useState8 = (0, _slicedToArray2.default)(_useState7, 2), |
| 5253 | 5647 | attachments = _useState8[0], |
| 5254 | 5648 | setAttachments = _useState8[1]; |
| 5255 | 5649 | var _useState9 = (0, _react.useState)(false), |
| 5256 | - _useState0 = (0, _slicedToArray2.default)(_useState9, 2), | |
| 5257 | - shouldRenderWebApp = _useState0[0], | |
| 5258 | - setShouldRenderWebApp = _useState0[1]; | |
| 5259 | - var _useState1 = (0, _react.useState)(false), | |
| 5260 | - _useState10 = (0, _slicedToArray2.default)(_useState1, 2), | |
| 5261 | - isMinimized = _useState10[0], | |
| 5262 | - setIsMinimized = _useState10[1]; | |
| 5650 | + _useState10 = (0, _slicedToArray2.default)(_useState9, 2), | |
| 5651 | + shouldRenderWebApp = _useState10[0], | |
| 5652 | + setShouldRenderWebApp = _useState10[1]; | |
| 5653 | + var _useState11 = (0, _react.useState)(false), | |
| 5654 | + _useState12 = (0, _slicedToArray2.default)(_useState11, 2), | |
| 5655 | + isMinimized = _useState12[0], | |
| 5656 | + setIsMinimized = _useState12[1]; | |
| 5263 | 5657 | var lastRun = (0, _react.useRef)(function () {}); |
| 5264 | 5658 | var promptInputRef = (0, _react.useRef)(null); |
| 5265 | 5659 | var selectedTemplate = (_screenshots$selected = screenshots[selectedScreenshotIndex]) === null || _screenshots$selected === void 0 ? void 0 : _screenshots$selected.template; |
| 5266 | 5660 | var dialogContentChildren = DialogContentProps.children, |
| @@ -5268,8 +5662,11 @@ | ||
| 5268 | 5662 | |
| 5269 | 5663 | // When there are no screenshots the prompt field should be editable. |
| 5270 | 5664 | var shouldFallbackToEditPrompt = !!(error && 0 === screenshots.length); |
| 5271 | 5665 | var isPromptFormActive = isPromptEditable || shouldFallbackToEditPrompt; |
| 5666 | + var mayContainProWidgets = 0 === attachments.length || attachments.some(function (attachment) { | |
| 5667 | + return _attachments.ATTACHMENT_TYPE_URL === attachment.type; | |
| 5668 | + }); | |
| 5272 | 5669 | var abortAndClose = function abortAndClose() { |
| 5273 | 5670 | abort(); |
| 5274 | 5671 | onClose(); |
| 5275 | 5672 | }; |
| @@ -5385,9 +5782,9 @@ | ||
| 5385 | 5782 | pt: 2, |
| 5386 | 5783 | px: 2, |
| 5387 | 5784 | pb: 0 |
| 5388 | 5785 | } |
| 5389 | - }, dialogContentChildren), attachments.length > 0 && /*#__PURE__*/_react.default.createElement(_promptPowerNotice.PromptPowerNotice, null), error && /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 5786 | + }, dialogContentChildren), mayContainProWidgets && !hasPro && /*#__PURE__*/_react.default.createElement(_proWidgetsNotice.ProWidgetsNotice, null), attachments.length > 0 && /*#__PURE__*/_react.default.createElement(_promptPowerNotice.PromptPowerNotice, null), error && /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 5390 | 5787 | sx: { |
| 5391 | 5788 | pt: 2, |
| 5392 | 5789 | px: 2, |
| 5393 | 5790 | pb: 0 |
| @@ -5507,9 +5904,10 @@ | ||
| 5507 | 5904 | DialogHeaderProps: _propTypes.default.object, |
| 5508 | 5905 | DialogContentProps: _propTypes.default.object, |
| 5509 | 5906 | attachments: _propTypes.default.arrayOf(_attachment.AttachmentPropType) |
| 5510 | 5907 | }; |
| 5511 | -var _default = exports["default"] = FormLayout; | |
| 5908 | +var _default = FormLayout; | |
| 5909 | +exports["default"] = _default; | |
| 5512 | 5910 | |
| 5513 | 5911 | /***/ }), |
| 5514 | 5912 | |
| 5515 | 5913 | /***/ "../modules/ai/assets/js/editor/pages/form-media/components/enhance-button.js": |
| @@ -5558,9 +5956,10 @@ | ||
| 5558 | 5956 | EnhanceButton.propTypes = { |
| 5559 | 5957 | disabled: _propTypes.default.bool, |
| 5560 | 5958 | isLoading: _propTypes.default.bool |
| 5561 | 5959 | }; |
| 5562 | -var _default = exports["default"] = EnhanceButton; | |
| 5960 | +var _default = EnhanceButton; | |
| 5961 | +exports["default"] = _default; | |
| 5563 | 5962 | |
| 5564 | 5963 | /***/ }), |
| 5565 | 5964 | |
| 5566 | 5965 | /***/ "../modules/ai/assets/js/editor/pages/form-media/components/generate-submit.js": |
| @@ -5592,9 +5991,10 @@ | ||
| 5592 | 5991 | }; |
| 5593 | 5992 | GenerateSubmit.propTypes = { |
| 5594 | 5993 | children: _propTypes.default.node |
| 5595 | 5994 | }; |
| 5596 | -var _default = exports["default"] = GenerateSubmit; | |
| 5995 | +var _default = GenerateSubmit; | |
| 5996 | +exports["default"] = _default; | |
| 5597 | 5997 | |
| 5598 | 5998 | /***/ }), |
| 5599 | 5999 | |
| 5600 | 6000 | /***/ "../modules/ai/assets/js/editor/pages/get-started/index.js": |
| @@ -5620,9 +6020,10 @@ | ||
| 5620 | 6020 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 5621 | 6021 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 5622 | 6022 | var _api = __webpack_require__(/*! ../../api */ "../modules/ai/assets/js/editor/api/index.js"); |
| 5623 | 6023 | var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); |
| 5624 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 6024 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 6025 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 5625 | 6026 | var GetStarted = function GetStarted(_ref) { |
| 5626 | 6027 | var onSuccess = _ref.onSuccess; |
| 5627 | 6028 | var _useState = (0, _react.useState)(false), |
| 5628 | 6029 | _useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| @@ -5628,17 +6029,17 @@ | ||
| 5628 | 6029 | _useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| 5629 | 6030 | isTermsChecked = _useState2[0], |
| 5630 | 6031 | setIsTermsChecked = _useState2[1]; |
| 5631 | 6032 | var onGetStartedClick = /*#__PURE__*/function () { |
| 5632 | - var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 5633 | - return _regenerator.default.wrap(function (_context) { | |
| 6033 | + var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 6034 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 5634 | 6035 | while (1) switch (_context.prev = _context.next) { |
| 5635 | 6036 | case 0: |
| 5636 | - _context.next = 1; | |
| 6037 | + _context.next = 2; | |
| 5637 | 6038 | return (0, _api.setGetStarted)(); |
| 5638 | - case 1: | |
| 6039 | + case 2: | |
| 5639 | 6040 | onSuccess(); |
| 5640 | - case 2: | |
| 6041 | + case 3: | |
| 5641 | 6042 | case "end": |
| 5642 | 6043 | return _context.stop(); |
| 5643 | 6044 | } |
| 5644 | 6045 | }, _callee); |
| @@ -5682,9 +6083,9 @@ | ||
| 5682 | 6083 | maxWidth: 520 |
| 5683 | 6084 | }, |
| 5684 | 6085 | component: "label", |
| 5685 | 6086 | htmlFor: "e-ai-terms-approval" |
| 5686 | - }, " ", (0, _i18n.__)('I approve the ', 'elementor'), /*#__PURE__*/_react.default.createElement(_ui.Link, { | |
| 6087 | + }, (0, _i18n.__)('I approve the ', 'elementor'), /*#__PURE__*/_react.default.createElement(_ui.Link, { | |
| 5687 | 6088 | href: "https://go.elementor.com/ai-terms/", |
| 5688 | 6089 | target: "_blank", |
| 5689 | 6090 | color: "info.main" |
| 5690 | 6091 | }, (0, _i18n.__)('Terms of Service', 'elementor')), ' & ', /*#__PURE__*/_react.default.createElement(_ui.Link, { |
| @@ -5705,9 +6106,10 @@ | ||
| 5705 | 6106 | }; |
| 5706 | 6107 | GetStarted.propTypes = { |
| 5707 | 6108 | onSuccess: _propTypes.default.func.isRequired |
| 5708 | 6109 | }; |
| 5709 | -var _default = exports["default"] = GetStarted; | |
| 6110 | +var _default = GetStarted; | |
| 6111 | +exports["default"] = _default; | |
| 5710 | 6112 | |
| 5711 | 6113 | /***/ }), |
| 5712 | 6114 | |
| 5713 | 6115 | /***/ "../modules/ai/assets/js/editor/types/attachment.js": |
| @@ -5724,9 +6126,9 @@ | ||
| 5724 | 6126 | value: true |
| 5725 | 6127 | })); |
| 5726 | 6128 | exports.AttachmentsTypesPropType = exports.AttachmentPropType = void 0; |
| 5727 | 6129 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 5728 | -var AttachmentPropType = exports.AttachmentPropType = _propTypes.default.shape({ | |
| 6130 | +var AttachmentPropType = _propTypes.default.shape({ | |
| 5729 | 6131 | type: _propTypes.default.string, |
| 5730 | 6132 | previewHTML: _propTypes.default.string, |
| 5731 | 6133 | content: _propTypes.default.string, |
| 5732 | 6134 | label: _propTypes.default.string, |
| @@ -5731,9 +6133,10 @@ | ||
| 5731 | 6133 | content: _propTypes.default.string, |
| 5732 | 6134 | label: _propTypes.default.string, |
| 5733 | 6135 | source: _propTypes.default.string |
| 5734 | 6136 | }); |
| 5735 | -var AttachmentsTypesPropType = exports.AttachmentsTypesPropType = _propTypes.default.shape({ | |
| 6137 | +exports.AttachmentPropType = AttachmentPropType; | |
| 6138 | +var AttachmentsTypesPropType = _propTypes.default.shape({ | |
| 5736 | 6139 | type: _propTypes.default.shape({ |
| 5737 | 6140 | promptPlaceholder: _propTypes.default.string, |
| 5738 | 6141 | promptSuggestions: _propTypes.default.arrayOf(_propTypes.default.shape({ |
| 5739 | 6142 | text: _propTypes.default.string.isRequired |
| @@ -5740,8 +6143,9 @@ | ||
| 5740 | 6143 | })), |
| 5741 | 6144 | previewGenerator: _propTypes.default.func |
| 5742 | 6145 | }) |
| 5743 | 6146 | }); |
| 6147 | +exports.AttachmentsTypesPropType = AttachmentsTypesPropType; | |
| 5744 | 6148 | |
| 5745 | 6149 | /***/ }), |
| 5746 | 6150 | |
| 5747 | 6151 | /***/ "../modules/ai/assets/js/editor/utils/editor-integration.js": |
| @@ -5768,25 +6172,27 @@ | ||
| 5768 | 6172 | var _history = __webpack_require__(/*! ./history */ "../modules/ai/assets/js/editor/utils/history.js"); |
| 5769 | 6173 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 5770 | 6174 | var _layoutAppWrapper = _interopRequireDefault(__webpack_require__(/*! ../layout-app-wrapper */ "../modules/ai/assets/js/editor/layout-app-wrapper.js")); |
| 5771 | 6175 | var _requestsIds = __webpack_require__(/*! ../context/requests-ids */ "../modules/ai/assets/js/editor/context/requests-ids.js"); |
| 5772 | -var closePanel = exports.closePanel = function closePanel() { | |
| 6176 | +var closePanel = function closePanel() { | |
| 5773 | 6177 | $e.run('panel/close'); |
| 5774 | 6178 | $e.components.get('panel').blockUserInteractions(); |
| 5775 | 6179 | }; |
| 5776 | -var openPanel = exports.openPanel = function openPanel() { | |
| 6180 | +exports.closePanel = closePanel; | |
| 6181 | +var openPanel = function openPanel() { | |
| 5777 | 6182 | $e.run('panel/open'); |
| 5778 | 6183 | $e.components.get('panel').unblockUserInteractions(); |
| 5779 | 6184 | }; |
| 5780 | -var onConnect = exports.onConnect = function onConnect(data) { | |
| 6185 | +exports.openPanel = openPanel; | |
| 6186 | +var onConnect = function onConnect(data) { | |
| 5781 | 6187 | elementorCommon.config.library_connect.is_connected = true; |
| 5782 | 6188 | elementorCommon.config.library_connect.current_access_level = data.kits_access_level || data.access_level || 0; |
| 5783 | 6189 | elementorCommon.config.library_connect.current_access_tier = data.access_tier; |
| 5784 | - elementorCommon.config.library_connect.plan_type = data.plan_type; | |
| 5785 | 6190 | }; |
| 5786 | -var getUiConfig = exports.getUiConfig = function getUiConfig() { | |
| 6191 | +exports.onConnect = onConnect; | |
| 6192 | +var getUiConfig = function getUiConfig() { | |
| 5787 | 6193 | var _elementor, _elementor$getPrefere; |
| 5788 | - var colorScheme = ((_elementor = elementor) === null || _elementor === void 0 || (_elementor$getPrefere = _elementor.getPreferences) === null || _elementor$getPrefere === void 0 ? void 0 : _elementor$getPrefere.call(_elementor, 'ui_theme')) || 'auto'; | |
| 6194 | + var colorScheme = ((_elementor = elementor) === null || _elementor === void 0 ? void 0 : (_elementor$getPrefere = _elementor.getPreferences) === null || _elementor$getPrefere === void 0 ? void 0 : _elementor$getPrefere.call(_elementor, 'ui_theme')) || 'auto'; | |
| 5789 | 6195 | var isRTL = elementorCommon.config.isRTL; |
| 5790 | 6196 | return { |
| 5791 | 6197 | colorScheme: colorScheme, |
| 5792 | 6198 | isRTL: isRTL |
| @@ -5791,9 +6197,10 @@ | ||
| 5791 | 6197 | colorScheme: colorScheme, |
| 5792 | 6198 | isRTL: isRTL |
| 5793 | 6199 | }; |
| 5794 | 6200 | }; |
| 5795 | -var VARIATIONS_PROMPTS = exports.VARIATIONS_PROMPTS = [{ | |
| 6201 | +exports.getUiConfig = getUiConfig; | |
| 6202 | +var VARIATIONS_PROMPTS = [{ | |
| 5796 | 6203 | text: (0, _i18n.__)('Minimalist design with bold typography about', 'elementor') |
| 5797 | 6204 | }, { |
| 5798 | 6205 | text: (0, _i18n.__)('Elegant style with serif fonts discussing', 'elementor') |
| 5799 | 6206 | }, { |
| @@ -5810,9 +6217,10 @@ | ||
| 5810 | 6217 | text: (0, _i18n.__)('Tech-inspired style with modern fonts about', 'elementor') |
| 5811 | 6218 | }, { |
| 5812 | 6219 | text: (0, _i18n.__)('Warm hues with comforting visuals about', 'elementor') |
| 5813 | 6220 | }]; |
| 5814 | -var WEB_BASED_PROMPTS = exports.WEB_BASED_PROMPTS = [{ | |
| 6221 | +exports.VARIATIONS_PROMPTS = VARIATIONS_PROMPTS; | |
| 6222 | +var WEB_BASED_PROMPTS = [{ | |
| 5815 | 6223 | text: (0, _i18n.__)('Change the content to be about [topic]', 'elementor') |
| 5816 | 6224 | }, { |
| 5817 | 6225 | text: (0, _i18n.__)('Generate lorem ipsum placeholder text for all paragraphs', 'elementor') |
| 5818 | 6226 | }, { |
| @@ -5823,10 +6231,11 @@ | ||
| 5823 | 6231 | text: (0, _i18n.__)('Alter the content to provide helpful tips related to [topic]', 'elementor') |
| 5824 | 6232 | }, { |
| 5825 | 6233 | text: (0, _i18n.__)('Adjust the content to include FAQs and answers for common inquiries about [topic]', 'elementor') |
| 5826 | 6234 | }]; |
| 6235 | +exports.WEB_BASED_PROMPTS = WEB_BASED_PROMPTS; | |
| 5827 | 6236 | var PROMPT_PLACEHOLDER = (0, _i18n.__)("Press '/' for suggestions or describe the changes you want to apply (optional)...", 'elementor'); |
| 5828 | -var renderLayoutApp = exports.renderLayoutApp = function renderLayoutApp() { | |
| 6237 | +var renderLayoutApp = function renderLayoutApp() { | |
| 5829 | 6238 | var _options$onRenderApp; |
| 5830 | 6239 | var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { |
| 5831 | 6240 | parentContainer: null, |
| 5832 | 6241 | mode: '', |
| @@ -5848,9 +6257,9 @@ | ||
| 5848 | 6257 | isRTL = _getUiConfig.isRTL; |
| 5849 | 6258 | var rootElement = document.createElement('div'); |
| 5850 | 6259 | document.body.append(rootElement); |
| 5851 | 6260 | var bodyStyle = window.elementorFrontend.elements.$window[0].getComputedStyle(window.elementorFrontend.elements.$body[0]); |
| 5852 | - var _ReactUtils$render = _react2.default.render(/*#__PURE__*/_react.default.createElement(_layoutAppWrapper.default, { | |
| 6261 | + var _ReactUtils$render = _react2.default.render( /*#__PURE__*/_react.default.createElement(_layoutAppWrapper.default, { | |
| 5853 | 6262 | isRTL: isRTL, |
| 5854 | 6263 | colorScheme: colorScheme |
| 5855 | 6264 | }, /*#__PURE__*/_react.default.createElement(_layoutApp.default, { |
| 5856 | 6265 | mode: options.mode, |
| @@ -5864,19 +6273,19 @@ | ||
| 5864 | 6273 | json: { |
| 5865 | 6274 | promptSuggestions: VARIATIONS_PROMPTS, |
| 5866 | 6275 | promptPlaceholder: PROMPT_PLACEHOLDER, |
| 5867 | 6276 | previewGenerator: function () { |
| 5868 | - var _previewGenerator = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(json) { | |
| 6277 | + var _previewGenerator = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(json) { | |
| 5869 | 6278 | var screenshot; |
| 5870 | - return _regenerator.default.wrap(function (_context) { | |
| 6279 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 5871 | 6280 | while (1) switch (_context.prev = _context.next) { |
| 5872 | 6281 | case 0: |
| 5873 | - _context.next = 1; | |
| 6282 | + _context.next = 2; | |
| 5874 | 6283 | return (0, _screenshot.takeScreenshot)(json); |
| 5875 | - case 1: | |
| 6284 | + case 2: | |
| 5876 | 6285 | screenshot = _context.sent; |
| 5877 | 6286 | return _context.abrupt("return", "<img src=\"".concat(screenshot, "\" />")); |
| 5878 | - case 2: | |
| 6287 | + case 4: | |
| 5879 | 6288 | case "end": |
| 5880 | 6289 | return _context.stop(); |
| 5881 | 6290 | } |
| 5882 | 6291 | }, _callee); |
| @@ -5895,9 +6304,9 @@ | ||
| 5895 | 6304 | attachments: options.attachments || [], |
| 5896 | 6305 | onClose: function onClose() { |
| 5897 | 6306 | var _options$onClose; |
| 5898 | 6307 | previewContainer.destroy(); |
| 5899 | - (_options$onClose = options.onClose) === null || _options$onClose === void 0 || _options$onClose.call(options); | |
| 6308 | + (_options$onClose = options.onClose) === null || _options$onClose === void 0 ? void 0 : _options$onClose.call(options); | |
| 5900 | 6309 | unmount(); |
| 5901 | 6310 | rootElement.remove(); |
| 5902 | 6311 | openPanel(); |
| 5903 | 6312 | }, |
| @@ -5903,27 +6312,27 @@ | ||
| 5903 | 6312 | }, |
| 5904 | 6313 | onConnect: onConnect, |
| 5905 | 6314 | onGenerate: function onGenerate() { |
| 5906 | 6315 | var _options$onGenerate; |
| 5907 | - (_options$onGenerate = options.onGenerate) === null || _options$onGenerate === void 0 || _options$onGenerate.call(options, { | |
| 6316 | + (_options$onGenerate = options.onGenerate) === null || _options$onGenerate === void 0 ? void 0 : _options$onGenerate.call(options, { | |
| 5908 | 6317 | previewContainer: previewContainer |
| 5909 | 6318 | }); |
| 5910 | 6319 | }, |
| 5911 | - onData: (/*#__PURE__*/function () { | |
| 5912 | - var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2(template) { | |
| 6320 | + onData: /*#__PURE__*/function () { | |
| 6321 | + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(template) { | |
| 5913 | 6322 | var screenshot; |
| 5914 | - return _regenerator.default.wrap(function (_context2) { | |
| 6323 | + return _regenerator.default.wrap(function _callee2$(_context2) { | |
| 5915 | 6324 | while (1) switch (_context2.prev = _context2.next) { |
| 5916 | 6325 | case 0: |
| 5917 | - _context2.next = 1; | |
| 6326 | + _context2.next = 2; | |
| 5918 | 6327 | return (0, _screenshot.takeScreenshot)(template); |
| 5919 | - case 1: | |
| 6328 | + case 2: | |
| 5920 | 6329 | screenshot = _context2.sent; |
| 5921 | 6330 | return _context2.abrupt("return", { |
| 5922 | 6331 | screenshot: screenshot, |
| 5923 | 6332 | template: template |
| 5924 | 6333 | }); |
| 5925 | - case 2: | |
| 6334 | + case 4: | |
| 5926 | 6335 | case "end": |
| 5927 | 6336 | return _context2.stop(); |
| 5928 | 6337 | } |
| 5929 | 6338 | }, _callee2); |
| @@ -5930,12 +6339,12 @@ | ||
| 5930 | 6339 | })); |
| 5931 | 6340 | return function (_x2) { |
| 5932 | 6341 | return _ref.apply(this, arguments); |
| 5933 | 6342 | }; |
| 5934 | - }()), | |
| 6343 | + }(), | |
| 5935 | 6344 | onSelect: function onSelect(template) { |
| 5936 | 6345 | var _options$onSelect; |
| 5937 | - (_options$onSelect = options.onSelect) === null || _options$onSelect === void 0 || _options$onSelect.call(options); | |
| 6346 | + (_options$onSelect = options.onSelect) === null || _options$onSelect === void 0 ? void 0 : _options$onSelect.call(options); | |
| 5938 | 6347 | previewContainer.setContent(template); |
| 5939 | 6348 | }, |
| 5940 | 6349 | onInsert: options.onInsert, |
| 5941 | 6350 | hasPro: elementor.helpers.hasPro() |
| @@ -5940,13 +6349,14 @@ | ||
| 5940 | 6349 | onInsert: options.onInsert, |
| 5941 | 6350 | hasPro: elementor.helpers.hasPro() |
| 5942 | 6351 | })), rootElement), |
| 5943 | 6352 | unmount = _ReactUtils$render.unmount; |
| 5944 | - (_options$onRenderApp = options.onRenderApp) === null || _options$onRenderApp === void 0 || _options$onRenderApp.call(options, { | |
| 6353 | + (_options$onRenderApp = options.onRenderApp) === null || _options$onRenderApp === void 0 ? void 0 : _options$onRenderApp.call(options, { | |
| 5945 | 6354 | previewContainer: previewContainer |
| 5946 | 6355 | }); |
| 5947 | 6356 | }; |
| 5948 | -var importToEditor = exports.importToEditor = function importToEditor(_ref2) { | |
| 6357 | +exports.renderLayoutApp = renderLayoutApp; | |
| 6358 | +var importToEditor = function importToEditor(_ref2) { | |
| 5949 | 6359 | var parentContainer = _ref2.parentContainer, |
| 5950 | 6360 | at = _ref2.at, |
| 5951 | 6361 | template = _ref2.template, |
| 5952 | 6362 | historyTitle = _ref2.historyTitle, |
| @@ -5970,8 +6380,9 @@ | ||
| 5970 | 6380 | } |
| 5971 | 6381 | }); |
| 5972 | 6382 | endHistoryLog(); |
| 5973 | 6383 | }; |
| 6384 | +exports.importToEditor = importToEditor; | |
| 5974 | 6385 | |
| 5975 | 6386 | /***/ }), |
| 5976 | 6387 | |
| 5977 | 6388 | /***/ "../modules/ai/assets/js/editor/utils/history.js": |
| @@ -6031,10 +6442,10 @@ | ||
| 6031 | 6442 | exports.createPreviewContainer = createPreviewContainer; |
| 6032 | 6443 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 6033 | 6444 | var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js")); |
| 6034 | 6445 | var _history = __webpack_require__(/*! ./history */ "../modules/ai/assets/js/editor/utils/history.js"); |
| 6035 | -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 6036 | -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 6446 | +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; } | |
| 6447 | +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) { (0, _defineProperty2.default)(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; } | |
| 6037 | 6448 | /** |
| 6038 | 6449 | * @typedef {import('elementor/assets/dev/js/editor/container/container')} Container |
| 6039 | 6450 | */ |
| 6040 | 6451 | |
| @@ -6168,20 +6579,20 @@ | ||
| 6168 | 6579 | var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); |
| 6169 | 6580 | var _htmlToImage = __webpack_require__(/*! html-to-image */ "../node_modules/html-to-image/es/index.js"); |
| 6170 | 6581 | var _history = __webpack_require__(/*! ./history */ "../modules/ai/assets/js/editor/utils/history.js"); |
| 6171 | 6582 | var _requestsIds = __webpack_require__(/*! ../context/requests-ids */ "../modules/ai/assets/js/editor/context/requests-ids.js"); |
| 6172 | -var takeScreenshot = exports.takeScreenshot = /*#__PURE__*/function () { | |
| 6173 | - var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(template) { | |
| 6174 | - var hiddenWrapper, container, screenshot, _t; | |
| 6175 | - return _regenerator.default.wrap(function (_context) { | |
| 6583 | +var takeScreenshot = /*#__PURE__*/function () { | |
| 6584 | + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(template) { | |
| 6585 | + var hiddenWrapper, container, screenshot; | |
| 6586 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 6176 | 6587 | while (1) switch (_context.prev = _context.next) { |
| 6177 | 6588 | case 0: |
| 6178 | 6589 | if (template) { |
| 6179 | - _context.next = 1; | |
| 6590 | + _context.next = 2; | |
| 6180 | 6591 | break; |
| 6181 | 6592 | } |
| 6182 | 6593 | return _context.abrupt("return", ''); |
| 6183 | - case 1: | |
| 6594 | + case 2: | |
| 6184 | 6595 | // Disable history so the Editor won't show our hidden container as a user action. |
| 6185 | 6596 | (0, _history.toggleHistory)(false); |
| 6186 | 6597 | hiddenWrapper = createHiddenWrapper(); |
| 6187 | 6598 | container = createContainer(template); |
| @@ -6188,47 +6599,48 @@ | ||
| 6188 | 6599 | wrapContainer(container, hiddenWrapper); |
| 6189 | 6600 | elementor.getPreviewView().$childViewContainer[0].appendChild(hiddenWrapper); |
| 6190 | 6601 | |
| 6191 | 6602 | // Wait for the container to render. |
| 6192 | - _context.next = 2; | |
| 6603 | + _context.next = 9; | |
| 6193 | 6604 | return waitForContainer(container.id); |
| 6194 | - case 2: | |
| 6605 | + case 9: | |
| 6195 | 6606 | if (!template.elements.length) { |
| 6196 | - _context.next = 3; | |
| 6607 | + _context.next = 12; | |
| 6197 | 6608 | break; |
| 6198 | 6609 | } |
| 6199 | - _context.next = 3; | |
| 6610 | + _context.next = 12; | |
| 6200 | 6611 | return Promise.all(template.elements.map(function (child) { |
| 6201 | 6612 | return waitForContainer(child.id); |
| 6202 | 6613 | })); |
| 6203 | - case 3: | |
| 6204 | - _context.prev = 3; | |
| 6205 | - _context.next = 4; | |
| 6614 | + case 12: | |
| 6615 | + _context.prev = 12; | |
| 6616 | + _context.next = 15; | |
| 6206 | 6617 | return screenshotNode(container.view.$el[0]); |
| 6207 | - case 4: | |
| 6618 | + case 15: | |
| 6208 | 6619 | screenshot = _context.sent; |
| 6209 | - _context.next = 6; | |
| 6620 | + _context.next = 21; | |
| 6210 | 6621 | break; |
| 6211 | - case 5: | |
| 6212 | - _context.prev = 5; | |
| 6213 | - _t = _context["catch"](3); | |
| 6622 | + case 18: | |
| 6623 | + _context.prev = 18; | |
| 6624 | + _context.t0 = _context["catch"](12); | |
| 6214 | 6625 | // Return an empty image url if the screenshot failed. |
| 6215 | 6626 | screenshot = ''; |
| 6216 | - case 6: | |
| 6627 | + case 21: | |
| 6217 | 6628 | deleteContainer(container); |
| 6218 | 6629 | hiddenWrapper.remove(); |
| 6219 | 6630 | (0, _history.toggleHistory)(true); |
| 6220 | 6631 | return _context.abrupt("return", screenshot); |
| 6221 | - case 7: | |
| 6632 | + case 25: | |
| 6222 | 6633 | case "end": |
| 6223 | 6634 | return _context.stop(); |
| 6224 | 6635 | } |
| 6225 | - }, _callee, null, [[3, 5]]); | |
| 6636 | + }, _callee, null, [[12, 18]]); | |
| 6226 | 6637 | })); |
| 6227 | 6638 | return function takeScreenshot(_x) { |
| 6228 | 6639 | return _ref.apply(this, arguments); |
| 6229 | 6640 | }; |
| 6230 | 6641 | }(); |
| 6642 | +exports.takeScreenshot = takeScreenshot; | |
| 6231 | 6643 | function screenshotNode(node) { |
| 6232 | 6644 | return toWebp(node, { |
| 6233 | 6645 | quality: 0.01, |
| 6234 | 6646 | // Transparent 1x1 pixel. |
| @@ -6238,23 +6650,23 @@ | ||
| 6238 | 6650 | function toWebp(_x2) { |
| 6239 | 6651 | return _toWebp.apply(this, arguments); |
| 6240 | 6652 | } |
| 6241 | 6653 | function _toWebp() { |
| 6242 | - _toWebp = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3(node) { | |
| 6654 | + _toWebp = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(node) { | |
| 6243 | 6655 | var _options$quality; |
| 6244 | 6656 | var options, |
| 6245 | 6657 | canvas, |
| 6246 | 6658 | _args3 = arguments; |
| 6247 | - return _regenerator.default.wrap(function (_context3) { | |
| 6659 | + return _regenerator.default.wrap(function _callee3$(_context3) { | |
| 6248 | 6660 | while (1) switch (_context3.prev = _context3.next) { |
| 6249 | 6661 | case 0: |
| 6250 | 6662 | options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {}; |
| 6251 | - _context3.next = 1; | |
| 6663 | + _context3.next = 3; | |
| 6252 | 6664 | return (0, _htmlToImage.toCanvas)(node, options); |
| 6253 | - case 1: | |
| 6665 | + case 3: | |
| 6254 | 6666 | canvas = _context3.sent; |
| 6255 | 6667 | return _context3.abrupt("return", canvas.toDataURL('image/webp', (_options$quality = options.quality) !== null && _options$quality !== void 0 ? _options$quality : 1)); |
| 6256 | - case 2: | |
| 6668 | + case 5: | |
| 6257 | 6669 | case "end": |
| 6258 | 6670 | return _context3.stop(); |
| 6259 | 6671 | } |
| 6260 | 6672 | }, _callee3); |
| @@ -6290,23 +6702,23 @@ | ||
| 6290 | 6702 | var timeout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5000; |
| 6291 | 6703 | var timeoutPromise = sleep(timeout); |
| 6292 | 6704 | var waitPromise = new Promise(function (resolve) { |
| 6293 | 6705 | elementorFrontend.hooks.addAction('frontend/element_ready/global', /*#__PURE__*/function () { |
| 6294 | - var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2($element) { | |
| 6706 | + var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2($element) { | |
| 6295 | 6707 | var images; |
| 6296 | - return _regenerator.default.wrap(function (_context2) { | |
| 6708 | + return _regenerator.default.wrap(function _callee2$(_context2) { | |
| 6297 | 6709 | while (1) switch (_context2.prev = _context2.next) { |
| 6298 | 6710 | case 0: |
| 6299 | 6711 | if (!($element.data('id') === id)) { |
| 6300 | - _context2.next = 2; | |
| 6712 | + _context2.next = 5; | |
| 6301 | 6713 | break; |
| 6302 | 6714 | } |
| 6303 | 6715 | images = (0, _toConsumableArray2.default)($element[0].querySelectorAll('img')); // Wait for all images to load. |
| 6304 | - _context2.next = 1; | |
| 6716 | + _context2.next = 4; | |
| 6305 | 6717 | return Promise.all(images.map(waitForImage)); |
| 6306 | - case 1: | |
| 6718 | + case 4: | |
| 6307 | 6719 | resolve(); |
| 6308 | - case 2: | |
| 6720 | + case 5: | |
| 6309 | 6721 | case "end": |
| 6310 | 6722 | return _context2.stop(); |
| 6311 | 6723 | } |
| 6312 | 6724 | }, _callee2); |
| @@ -6343,868 +6755,341 @@ | ||
| 6343 | 6755 | } |
| 6344 | 6756 | |
| 6345 | 6757 | /***/ }), |
| 6346 | 6758 | |
| 6347 | -/***/ "../node_modules/@babel/runtime/helpers/OverloadYield.js": | |
| 6348 | -/*!***************************************************************!*\ | |
| 6349 | - !*** ../node_modules/@babel/runtime/helpers/OverloadYield.js ***! | |
| 6350 | - \***************************************************************/ | |
| 6351 | -/***/ ((module) => { | |
| 6759 | +/***/ "../node_modules/clsx/dist/clsx.m.js": | |
| 6760 | +/*!*******************************************!*\ | |
| 6761 | + !*** ../node_modules/clsx/dist/clsx.m.js ***! | |
| 6762 | + \*******************************************/ | |
| 6763 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 6352 | 6764 | |
| 6353 | -function _OverloadYield(e, d) { | |
| 6354 | - this.v = e, this.k = d; | |
| 6355 | -} | |
| 6356 | -module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6765 | +"use strict"; | |
| 6766 | +__webpack_require__.r(__webpack_exports__); | |
| 6767 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 6768 | +/* harmony export */ clsx: () => (/* binding */ clsx), | |
| 6769 | +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) | |
| 6770 | +/* harmony export */ }); | |
| 6771 | +function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clsx); | |
| 6357 | 6772 | |
| 6358 | 6773 | /***/ }), |
| 6359 | 6774 | |
| 6360 | -/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": | |
| 6361 | -/*!******************************************************************!*\ | |
| 6362 | - !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! | |
| 6363 | - \******************************************************************/ | |
| 6364 | -/***/ ((module) => { | |
| 6775 | +/***/ "../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js": | |
| 6776 | +/*!***********************************************************************************!*\ | |
| 6777 | + !*** ../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js ***! | |
| 6778 | + \***********************************************************************************/ | |
| 6779 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6365 | 6780 | |
| 6366 | -function _arrayLikeToArray(r, a) { | |
| 6367 | - (null == a || a > r.length) && (a = r.length); | |
| 6368 | - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 6369 | - return n; | |
| 6370 | -} | |
| 6371 | -module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6781 | +"use strict"; | |
| 6372 | 6782 | |
| 6373 | -/***/ }), | |
| 6374 | 6783 | |
| 6375 | -/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": | |
| 6376 | -/*!****************************************************************!*\ | |
| 6377 | - !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! | |
| 6378 | - \****************************************************************/ | |
| 6379 | -/***/ ((module) => { | |
| 6784 | +var reactIs = __webpack_require__(/*! react-is */ "../node_modules/hoist-non-react-statics/node_modules/react-is/index.js"); | |
| 6380 | 6785 | |
| 6381 | -function _arrayWithHoles(r) { | |
| 6382 | - if (Array.isArray(r)) return r; | |
| 6383 | -} | |
| 6384 | -module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6786 | +/** | |
| 6787 | + * Copyright 2015, Yahoo! Inc. | |
| 6788 | + * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. | |
| 6789 | + */ | |
| 6790 | +var REACT_STATICS = { | |
| 6791 | + childContextTypes: true, | |
| 6792 | + contextType: true, | |
| 6793 | + contextTypes: true, | |
| 6794 | + defaultProps: true, | |
| 6795 | + displayName: true, | |
| 6796 | + getDefaultProps: true, | |
| 6797 | + getDerivedStateFromError: true, | |
| 6798 | + getDerivedStateFromProps: true, | |
| 6799 | + mixins: true, | |
| 6800 | + propTypes: true, | |
| 6801 | + type: true | |
| 6802 | +}; | |
| 6803 | +var KNOWN_STATICS = { | |
| 6804 | + name: true, | |
| 6805 | + length: true, | |
| 6806 | + prototype: true, | |
| 6807 | + caller: true, | |
| 6808 | + callee: true, | |
| 6809 | + arguments: true, | |
| 6810 | + arity: true | |
| 6811 | +}; | |
| 6812 | +var FORWARD_REF_STATICS = { | |
| 6813 | + '$$typeof': true, | |
| 6814 | + render: true, | |
| 6815 | + defaultProps: true, | |
| 6816 | + displayName: true, | |
| 6817 | + propTypes: true | |
| 6818 | +}; | |
| 6819 | +var MEMO_STATICS = { | |
| 6820 | + '$$typeof': true, | |
| 6821 | + compare: true, | |
| 6822 | + defaultProps: true, | |
| 6823 | + displayName: true, | |
| 6824 | + propTypes: true, | |
| 6825 | + type: true | |
| 6826 | +}; | |
| 6827 | +var TYPE_STATICS = {}; | |
| 6828 | +TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS; | |
| 6829 | +TYPE_STATICS[reactIs.Memo] = MEMO_STATICS; | |
| 6385 | 6830 | |
| 6386 | -/***/ }), | |
| 6831 | +function getStatics(component) { | |
| 6832 | + // React v16.11 and below | |
| 6833 | + if (reactIs.isMemo(component)) { | |
| 6834 | + return MEMO_STATICS; | |
| 6835 | + } // React v16.12 and above | |
| 6387 | 6836 | |
| 6388 | -/***/ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js": | |
| 6389 | -/*!*******************************************************************!*\ | |
| 6390 | - !*** ../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! | |
| 6391 | - \*******************************************************************/ | |
| 6392 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6393 | 6837 | |
| 6394 | -var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 6395 | -function _arrayWithoutHoles(r) { | |
| 6396 | - if (Array.isArray(r)) return arrayLikeToArray(r); | |
| 6838 | + return TYPE_STATICS[component['$$typeof']] || REACT_STATICS; | |
| 6397 | 6839 | } |
| 6398 | -module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6399 | 6840 | |
| 6400 | -/***/ }), | |
| 6841 | +var defineProperty = Object.defineProperty; | |
| 6842 | +var getOwnPropertyNames = Object.getOwnPropertyNames; | |
| 6843 | +var getOwnPropertySymbols = Object.getOwnPropertySymbols; | |
| 6844 | +var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; | |
| 6845 | +var getPrototypeOf = Object.getPrototypeOf; | |
| 6846 | +var objectPrototype = Object.prototype; | |
| 6847 | +function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { | |
| 6848 | + if (typeof sourceComponent !== 'string') { | |
| 6849 | + // don't hoist over string (html) components | |
| 6850 | + if (objectPrototype) { | |
| 6851 | + var inheritedComponent = getPrototypeOf(sourceComponent); | |
| 6401 | 6852 | |
| 6402 | -/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": | |
| 6403 | -/*!***********************************************************************!*\ | |
| 6404 | - !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! | |
| 6405 | - \***********************************************************************/ | |
| 6406 | -/***/ ((module) => { | |
| 6407 | - | |
| 6408 | -function _assertThisInitialized(e) { | |
| 6409 | - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 6410 | - return e; | |
| 6411 | -} | |
| 6412 | -module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6413 | - | |
| 6414 | -/***/ }), | |
| 6415 | - | |
| 6416 | -/***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js": | |
| 6417 | -/*!******************************************************************!*\ | |
| 6418 | - !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***! | |
| 6419 | - \******************************************************************/ | |
| 6420 | -/***/ ((module) => { | |
| 6421 | - | |
| 6422 | -function asyncGeneratorStep(n, t, e, r, o, a, c) { | |
| 6423 | - try { | |
| 6424 | - var i = n[a](c), | |
| 6425 | - u = i.value; | |
| 6426 | - } catch (n) { | |
| 6427 | - return void e(n); | |
| 6428 | - } | |
| 6429 | - i.done ? t(u) : Promise.resolve(u).then(r, o); | |
| 6430 | -} | |
| 6431 | -function _asyncToGenerator(n) { | |
| 6432 | - return function () { | |
| 6433 | - var t = this, | |
| 6434 | - e = arguments; | |
| 6435 | - return new Promise(function (r, o) { | |
| 6436 | - var a = n.apply(t, e); | |
| 6437 | - function _next(n) { | |
| 6438 | - asyncGeneratorStep(a, r, o, _next, _throw, "next", n); | |
| 6853 | + if (inheritedComponent && inheritedComponent !== objectPrototype) { | |
| 6854 | + hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); | |
| 6439 | 6855 | } |
| 6440 | - function _throw(n) { | |
| 6441 | - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); | |
| 6442 | - } | |
| 6443 | - _next(void 0); | |
| 6444 | - }); | |
| 6445 | - }; | |
| 6446 | -} | |
| 6447 | -module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6856 | + } | |
| 6448 | 6857 | |
| 6449 | -/***/ }), | |
| 6858 | + var keys = getOwnPropertyNames(sourceComponent); | |
| 6450 | 6859 | |
| 6451 | -/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": | |
| 6452 | -/*!****************************************************************!*\ | |
| 6453 | - !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! | |
| 6454 | - \****************************************************************/ | |
| 6455 | -/***/ ((module) => { | |
| 6860 | + if (getOwnPropertySymbols) { | |
| 6861 | + keys = keys.concat(getOwnPropertySymbols(sourceComponent)); | |
| 6862 | + } | |
| 6456 | 6863 | |
| 6457 | -function _classCallCheck(a, n) { | |
| 6458 | - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 6459 | -} | |
| 6460 | -module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6864 | + var targetStatics = getStatics(targetComponent); | |
| 6865 | + var sourceStatics = getStatics(sourceComponent); | |
| 6461 | 6866 | |
| 6462 | -/***/ }), | |
| 6867 | + for (var i = 0; i < keys.length; ++i) { | |
| 6868 | + var key = keys[i]; | |
| 6463 | 6869 | |
| 6464 | -/***/ "../node_modules/@babel/runtime/helpers/createClass.js": | |
| 6465 | -/*!*************************************************************!*\ | |
| 6466 | - !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! | |
| 6467 | - \*************************************************************/ | |
| 6468 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6870 | + if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) { | |
| 6871 | + var descriptor = getOwnPropertyDescriptor(sourceComponent, key); | |
| 6469 | 6872 | |
| 6470 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 6471 | -function _defineProperties(e, r) { | |
| 6472 | - for (var t = 0; t < r.length; t++) { | |
| 6473 | - var o = r[t]; | |
| 6474 | - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 6873 | + try { | |
| 6874 | + // Avoid failures from read-only properties | |
| 6875 | + defineProperty(targetComponent, key, descriptor); | |
| 6876 | + } catch (e) {} | |
| 6877 | + } | |
| 6878 | + } | |
| 6475 | 6879 | } |
| 6476 | -} | |
| 6477 | -function _createClass(e, r, t) { | |
| 6478 | - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { | |
| 6479 | - writable: !1 | |
| 6480 | - }), e; | |
| 6481 | -} | |
| 6482 | -module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6483 | 6880 | |
| 6484 | -/***/ }), | |
| 6485 | - | |
| 6486 | -/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": | |
| 6487 | -/*!****************************************************************!*\ | |
| 6488 | - !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! | |
| 6489 | - \****************************************************************/ | |
| 6490 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6491 | - | |
| 6492 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 6493 | -function _defineProperty(e, r, t) { | |
| 6494 | - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 6495 | - value: t, | |
| 6496 | - enumerable: !0, | |
| 6497 | - configurable: !0, | |
| 6498 | - writable: !0 | |
| 6499 | - }) : e[r] = t, e; | |
| 6881 | + return targetComponent; | |
| 6500 | 6882 | } |
| 6501 | -module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6502 | 6883 | |
| 6503 | -/***/ }), | |
| 6884 | +module.exports = hoistNonReactStatics; | |
| 6504 | 6885 | |
| 6505 | -/***/ "../node_modules/@babel/runtime/helpers/extends.js": | |
| 6506 | -/*!*********************************************************!*\ | |
| 6507 | - !*** ../node_modules/@babel/runtime/helpers/extends.js ***! | |
| 6508 | - \*********************************************************/ | |
| 6509 | -/***/ ((module) => { | |
| 6510 | 6886 | |
| 6511 | -function _extends() { | |
| 6512 | - return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) { | |
| 6513 | - for (var e = 1; e < arguments.length; e++) { | |
| 6514 | - var t = arguments[e]; | |
| 6515 | - for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); | |
| 6516 | - } | |
| 6517 | - return n; | |
| 6518 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends.apply(null, arguments); | |
| 6519 | -} | |
| 6520 | -module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6521 | - | |
| 6522 | 6887 | /***/ }), |
| 6523 | 6888 | |
| 6524 | -/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": | |
| 6525 | -/*!****************************************************************!*\ | |
| 6526 | - !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! | |
| 6527 | - \****************************************************************/ | |
| 6528 | -/***/ ((module) => { | |
| 6889 | +/***/ "../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js": | |
| 6890 | +/*!*************************************************************************************************!*\ | |
| 6891 | + !*** ../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js ***! | |
| 6892 | + \*************************************************************************************************/ | |
| 6893 | +/***/ ((__unused_webpack_module, exports) => { | |
| 6529 | 6894 | |
| 6530 | -function _getPrototypeOf(t) { | |
| 6531 | - return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { | |
| 6532 | - return t.__proto__ || Object.getPrototypeOf(t); | |
| 6533 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); | |
| 6534 | -} | |
| 6535 | -module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6895 | +"use strict"; | |
| 6896 | +/** @license React v16.13.1 | |
| 6897 | + * react-is.development.js | |
| 6898 | + * | |
| 6899 | + * Copyright (c) Facebook, Inc. and its affiliates. | |
| 6900 | + * | |
| 6901 | + * This source code is licensed under the MIT license found in the | |
| 6902 | + * LICENSE file in the root directory of this source tree. | |
| 6903 | + */ | |
| 6536 | 6904 | |
| 6537 | -/***/ }), | |
| 6538 | 6905 | |
| 6539 | -/***/ "../node_modules/@babel/runtime/helpers/inherits.js": | |
| 6540 | -/*!**********************************************************!*\ | |
| 6541 | - !*** ../node_modules/@babel/runtime/helpers/inherits.js ***! | |
| 6542 | - \**********************************************************/ | |
| 6543 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6544 | 6906 | |
| 6545 | -var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 6546 | -function _inherits(t, e) { | |
| 6547 | - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 6548 | - t.prototype = Object.create(e && e.prototype, { | |
| 6549 | - constructor: { | |
| 6550 | - value: t, | |
| 6551 | - writable: !0, | |
| 6552 | - configurable: !0 | |
| 6553 | - } | |
| 6554 | - }), Object.defineProperty(t, "prototype", { | |
| 6555 | - writable: !1 | |
| 6556 | - }), e && setPrototypeOf(t, e); | |
| 6557 | -} | |
| 6558 | -module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6559 | 6907 | |
| 6560 | -/***/ }), | |
| 6561 | 6908 | |
| 6562 | -/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 6563 | -/*!***********************************************************************!*\ | |
| 6564 | - !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 6565 | - \***********************************************************************/ | |
| 6566 | -/***/ ((module) => { | |
| 6909 | +if (true) { | |
| 6910 | + (function() { | |
| 6911 | +'use strict'; | |
| 6567 | 6912 | |
| 6568 | -function _interopRequireDefault(e) { | |
| 6569 | - return e && e.__esModule ? e : { | |
| 6570 | - "default": e | |
| 6571 | - }; | |
| 6572 | -} | |
| 6573 | -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6913 | +// The Symbol used to tag the ReactElement-like types. If there is no native Symbol | |
| 6914 | +// nor polyfill, then a plain number is used for performance. | |
| 6915 | +var hasSymbol = typeof Symbol === 'function' && Symbol.for; | |
| 6916 | +var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; | |
| 6917 | +var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; | |
| 6918 | +var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; | |
| 6919 | +var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; | |
| 6920 | +var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; | |
| 6921 | +var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; | |
| 6922 | +var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary | |
| 6923 | +// (unstable) APIs that have been removed. Can we remove the symbols? | |
| 6574 | 6924 | |
| 6575 | -/***/ }), | |
| 6925 | +var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; | |
| 6926 | +var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; | |
| 6927 | +var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; | |
| 6928 | +var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; | |
| 6929 | +var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; | |
| 6930 | +var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; | |
| 6931 | +var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; | |
| 6932 | +var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; | |
| 6933 | +var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; | |
| 6934 | +var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; | |
| 6935 | +var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; | |
| 6576 | 6936 | |
| 6577 | -/***/ "../node_modules/@babel/runtime/helpers/iterableToArray.js": | |
| 6578 | -/*!*****************************************************************!*\ | |
| 6579 | - !*** ../node_modules/@babel/runtime/helpers/iterableToArray.js ***! | |
| 6580 | - \*****************************************************************/ | |
| 6581 | -/***/ ((module) => { | |
| 6582 | - | |
| 6583 | -function _iterableToArray(r) { | |
| 6584 | - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); | |
| 6937 | +function isValidElementType(type) { | |
| 6938 | + return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. | |
| 6939 | + 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); | |
| 6585 | 6940 | } |
| 6586 | -module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6587 | 6941 | |
| 6588 | -/***/ }), | |
| 6942 | +function typeOf(object) { | |
| 6943 | + if (typeof object === 'object' && object !== null) { | |
| 6944 | + var $$typeof = object.$$typeof; | |
| 6589 | 6945 | |
| 6590 | -/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": | |
| 6591 | -/*!**********************************************************************!*\ | |
| 6592 | - !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! | |
| 6593 | - \**********************************************************************/ | |
| 6594 | -/***/ ((module) => { | |
| 6946 | + switch ($$typeof) { | |
| 6947 | + case REACT_ELEMENT_TYPE: | |
| 6948 | + var type = object.type; | |
| 6595 | 6949 | |
| 6596 | -function _iterableToArrayLimit(r, l) { | |
| 6597 | - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 6598 | - if (null != t) { | |
| 6599 | - var e, | |
| 6600 | - n, | |
| 6601 | - i, | |
| 6602 | - u, | |
| 6603 | - a = [], | |
| 6604 | - f = !0, | |
| 6605 | - o = !1; | |
| 6606 | - try { | |
| 6607 | - if (i = (t = t.call(r)).next, 0 === l) { | |
| 6608 | - if (Object(t) !== t) return; | |
| 6609 | - f = !1; | |
| 6610 | - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 6611 | - } catch (r) { | |
| 6612 | - o = !0, n = r; | |
| 6613 | - } finally { | |
| 6614 | - try { | |
| 6615 | - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 6616 | - } finally { | |
| 6617 | - if (o) throw n; | |
| 6618 | - } | |
| 6619 | - } | |
| 6620 | - return a; | |
| 6621 | - } | |
| 6622 | -} | |
| 6623 | -module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6950 | + switch (type) { | |
| 6951 | + case REACT_ASYNC_MODE_TYPE: | |
| 6952 | + case REACT_CONCURRENT_MODE_TYPE: | |
| 6953 | + case REACT_FRAGMENT_TYPE: | |
| 6954 | + case REACT_PROFILER_TYPE: | |
| 6955 | + case REACT_STRICT_MODE_TYPE: | |
| 6956 | + case REACT_SUSPENSE_TYPE: | |
| 6957 | + return type; | |
| 6624 | 6958 | |
| 6625 | -/***/ }), | |
| 6959 | + default: | |
| 6960 | + var $$typeofType = type && type.$$typeof; | |
| 6626 | 6961 | |
| 6627 | -/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": | |
| 6628 | -/*!*****************************************************************!*\ | |
| 6629 | - !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! | |
| 6630 | - \*****************************************************************/ | |
| 6631 | -/***/ ((module) => { | |
| 6962 | + switch ($$typeofType) { | |
| 6963 | + case REACT_CONTEXT_TYPE: | |
| 6964 | + case REACT_FORWARD_REF_TYPE: | |
| 6965 | + case REACT_LAZY_TYPE: | |
| 6966 | + case REACT_MEMO_TYPE: | |
| 6967 | + case REACT_PROVIDER_TYPE: | |
| 6968 | + return $$typeofType; | |
| 6632 | 6969 | |
| 6633 | -function _nonIterableRest() { | |
| 6634 | - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 6635 | -} | |
| 6636 | -module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6970 | + default: | |
| 6971 | + return $$typeof; | |
| 6972 | + } | |
| 6637 | 6973 | |
| 6638 | -/***/ }), | |
| 6974 | + } | |
| 6639 | 6975 | |
| 6640 | -/***/ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js": | |
| 6641 | -/*!*******************************************************************!*\ | |
| 6642 | - !*** ../node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! | |
| 6643 | - \*******************************************************************/ | |
| 6644 | -/***/ ((module) => { | |
| 6645 | - | |
| 6646 | -function _nonIterableSpread() { | |
| 6647 | - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 6648 | -} | |
| 6649 | -module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6650 | - | |
| 6651 | -/***/ }), | |
| 6652 | - | |
| 6653 | -/***/ "../node_modules/@babel/runtime/helpers/objectWithoutProperties.js": | |
| 6654 | -/*!*************************************************************************!*\ | |
| 6655 | - !*** ../node_modules/@babel/runtime/helpers/objectWithoutProperties.js ***! | |
| 6656 | - \*************************************************************************/ | |
| 6657 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6658 | - | |
| 6659 | -var objectWithoutPropertiesLoose = __webpack_require__(/*! ./objectWithoutPropertiesLoose.js */ "../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js"); | |
| 6660 | -function _objectWithoutProperties(e, t) { | |
| 6661 | - if (null == e) return {}; | |
| 6662 | - var o, | |
| 6663 | - r, | |
| 6664 | - i = objectWithoutPropertiesLoose(e, t); | |
| 6665 | - if (Object.getOwnPropertySymbols) { | |
| 6666 | - var n = Object.getOwnPropertySymbols(e); | |
| 6667 | - for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); | |
| 6976 | + case REACT_PORTAL_TYPE: | |
| 6977 | + return $$typeof; | |
| 6978 | + } | |
| 6668 | 6979 | } |
| 6669 | - return i; | |
| 6670 | -} | |
| 6671 | -module.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6672 | 6980 | |
| 6673 | -/***/ }), | |
| 6981 | + return undefined; | |
| 6982 | +} // AsyncMode is deprecated along with isAsyncMode | |
| 6674 | 6983 | |
| 6675 | -/***/ "../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js": | |
| 6676 | -/*!******************************************************************************!*\ | |
| 6677 | - !*** ../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js ***! | |
| 6678 | - \******************************************************************************/ | |
| 6679 | -/***/ ((module) => { | |
| 6984 | +var AsyncMode = REACT_ASYNC_MODE_TYPE; | |
| 6985 | +var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; | |
| 6986 | +var ContextConsumer = REACT_CONTEXT_TYPE; | |
| 6987 | +var ContextProvider = REACT_PROVIDER_TYPE; | |
| 6988 | +var Element = REACT_ELEMENT_TYPE; | |
| 6989 | +var ForwardRef = REACT_FORWARD_REF_TYPE; | |
| 6990 | +var Fragment = REACT_FRAGMENT_TYPE; | |
| 6991 | +var Lazy = REACT_LAZY_TYPE; | |
| 6992 | +var Memo = REACT_MEMO_TYPE; | |
| 6993 | +var Portal = REACT_PORTAL_TYPE; | |
| 6994 | +var Profiler = REACT_PROFILER_TYPE; | |
| 6995 | +var StrictMode = REACT_STRICT_MODE_TYPE; | |
| 6996 | +var Suspense = REACT_SUSPENSE_TYPE; | |
| 6997 | +var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated | |
| 6680 | 6998 | |
| 6681 | -function _objectWithoutPropertiesLoose(r, e) { | |
| 6682 | - if (null == r) return {}; | |
| 6683 | - var t = {}; | |
| 6684 | - for (var n in r) if ({}.hasOwnProperty.call(r, n)) { | |
| 6685 | - if (-1 !== e.indexOf(n)) continue; | |
| 6686 | - t[n] = r[n]; | |
| 6687 | - } | |
| 6688 | - return t; | |
| 6689 | -} | |
| 6690 | -module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6999 | +function isAsyncMode(object) { | |
| 7000 | + { | |
| 7001 | + if (!hasWarnedAboutDeprecatedIsAsyncMode) { | |
| 7002 | + hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint | |
| 6691 | 7003 | |
| 6692 | -/***/ }), | |
| 6693 | - | |
| 6694 | -/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": | |
| 6695 | -/*!***************************************************************************!*\ | |
| 6696 | - !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! | |
| 6697 | - \***************************************************************************/ | |
| 6698 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6699 | - | |
| 6700 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 6701 | -var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); | |
| 6702 | -function _possibleConstructorReturn(t, e) { | |
| 6703 | - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 6704 | - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 6705 | - return assertThisInitialized(t); | |
| 6706 | -} | |
| 6707 | -module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6708 | - | |
| 6709 | -/***/ }), | |
| 6710 | - | |
| 6711 | -/***/ "../node_modules/@babel/runtime/helpers/regenerator.js": | |
| 6712 | -/*!*************************************************************!*\ | |
| 6713 | - !*** ../node_modules/@babel/runtime/helpers/regenerator.js ***! | |
| 6714 | - \*************************************************************/ | |
| 6715 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6716 | - | |
| 6717 | -var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); | |
| 6718 | -function _regenerator() { | |
| 6719 | - /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ | |
| 6720 | - var e, | |
| 6721 | - t, | |
| 6722 | - r = "function" == typeof Symbol ? Symbol : {}, | |
| 6723 | - n = r.iterator || "@@iterator", | |
| 6724 | - o = r.toStringTag || "@@toStringTag"; | |
| 6725 | - function i(r, n, o, i) { | |
| 6726 | - var c = n && n.prototype instanceof Generator ? n : Generator, | |
| 6727 | - u = Object.create(c.prototype); | |
| 6728 | - return regeneratorDefine(u, "_invoke", function (r, n, o) { | |
| 6729 | - var i, | |
| 6730 | - c, | |
| 6731 | - u, | |
| 6732 | - f = 0, | |
| 6733 | - p = o || [], | |
| 6734 | - y = !1, | |
| 6735 | - G = { | |
| 6736 | - p: 0, | |
| 6737 | - n: 0, | |
| 6738 | - v: e, | |
| 6739 | - a: d, | |
| 6740 | - f: d.bind(e, 4), | |
| 6741 | - d: function d(t, r) { | |
| 6742 | - return i = t, c = 0, u = e, G.n = r, a; | |
| 6743 | - } | |
| 6744 | - }; | |
| 6745 | - function d(r, n) { | |
| 6746 | - for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { | |
| 6747 | - var o, | |
| 6748 | - i = p[t], | |
| 6749 | - d = G.p, | |
| 6750 | - l = i[2]; | |
| 6751 | - r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); | |
| 6752 | - } | |
| 6753 | - if (o || r > 1) return a; | |
| 6754 | - throw y = !0, n; | |
| 6755 | - } | |
| 6756 | - return function (o, p, l) { | |
| 6757 | - if (f > 1) throw TypeError("Generator is already running"); | |
| 6758 | - for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { | |
| 6759 | - i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); | |
| 6760 | - try { | |
| 6761 | - if (f = 2, i) { | |
| 6762 | - if (c || (o = "next"), t = i[o]) { | |
| 6763 | - if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); | |
| 6764 | - if (!t.done) return t; | |
| 6765 | - u = t.value, c < 2 && (c = 0); | |
| 6766 | - } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); | |
| 6767 | - i = e; | |
| 6768 | - } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; | |
| 6769 | - } catch (t) { | |
| 6770 | - i = e, c = 1, u = t; | |
| 6771 | - } finally { | |
| 6772 | - f = 1; | |
| 6773 | - } | |
| 6774 | - } | |
| 6775 | - return { | |
| 6776 | - value: t, | |
| 6777 | - done: y | |
| 6778 | - }; | |
| 6779 | - }; | |
| 6780 | - }(r, o, i), !0), u; | |
| 7004 | + 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.'); | |
| 7005 | + } | |
| 6781 | 7006 | } |
| 6782 | - var a = {}; | |
| 6783 | - function Generator() {} | |
| 6784 | - function GeneratorFunction() {} | |
| 6785 | - function GeneratorFunctionPrototype() {} | |
| 6786 | - t = Object.getPrototypeOf; | |
| 6787 | - var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () { | |
| 6788 | - return this; | |
| 6789 | - }), t), | |
| 6790 | - u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); | |
| 6791 | - function f(e) { | |
| 6792 | - return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; | |
| 6793 | - } | |
| 6794 | - return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function () { | |
| 6795 | - return this; | |
| 6796 | - }), regeneratorDefine(u, "toString", function () { | |
| 6797 | - return "[object Generator]"; | |
| 6798 | - }), (module.exports = _regenerator = function _regenerator() { | |
| 6799 | - return { | |
| 6800 | - w: i, | |
| 6801 | - m: f | |
| 6802 | - }; | |
| 6803 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 6804 | -} | |
| 6805 | -module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6806 | 7007 | |
| 6807 | -/***/ }), | |
| 6808 | - | |
| 6809 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js": | |
| 6810 | -/*!******************************************************************!*\ | |
| 6811 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsync.js ***! | |
| 6812 | - \******************************************************************/ | |
| 6813 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6814 | - | |
| 6815 | -var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); | |
| 6816 | -function _regeneratorAsync(n, e, r, t, o) { | |
| 6817 | - var a = regeneratorAsyncGen(n, e, r, t, o); | |
| 6818 | - return a.next().then(function (n) { | |
| 6819 | - return n.done ? n.value : a.next(); | |
| 6820 | - }); | |
| 7008 | + return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; | |
| 6821 | 7009 | } |
| 6822 | -module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6823 | - | |
| 6824 | -/***/ }), | |
| 6825 | - | |
| 6826 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js": | |
| 6827 | -/*!*********************************************************************!*\ | |
| 6828 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js ***! | |
| 6829 | - \*********************************************************************/ | |
| 6830 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6831 | - | |
| 6832 | -var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); | |
| 6833 | -var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); | |
| 6834 | -function _regeneratorAsyncGen(r, e, t, o, n) { | |
| 6835 | - return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); | |
| 7010 | +function isConcurrentMode(object) { | |
| 7011 | + return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; | |
| 6836 | 7012 | } |
| 6837 | -module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6838 | - | |
| 6839 | -/***/ }), | |
| 6840 | - | |
| 6841 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js": | |
| 6842 | -/*!**************************************************************************!*\ | |
| 6843 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js ***! | |
| 6844 | - \**************************************************************************/ | |
| 6845 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6846 | - | |
| 6847 | -var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); | |
| 6848 | -var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); | |
| 6849 | -function AsyncIterator(t, e) { | |
| 6850 | - function n(r, o, i, f) { | |
| 6851 | - try { | |
| 6852 | - var c = t[r](o), | |
| 6853 | - u = c.value; | |
| 6854 | - return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) { | |
| 6855 | - n("next", t, i, f); | |
| 6856 | - }, function (t) { | |
| 6857 | - n("throw", t, i, f); | |
| 6858 | - }) : e.resolve(u).then(function (t) { | |
| 6859 | - c.value = t, i(c); | |
| 6860 | - }, function (t) { | |
| 6861 | - return n("throw", t, i, f); | |
| 6862 | - }); | |
| 6863 | - } catch (t) { | |
| 6864 | - f(t); | |
| 6865 | - } | |
| 6866 | - } | |
| 6867 | - var r; | |
| 6868 | - this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { | |
| 6869 | - return this; | |
| 6870 | - })), regeneratorDefine(this, "_invoke", function (t, o, i) { | |
| 6871 | - function f() { | |
| 6872 | - return new e(function (e, r) { | |
| 6873 | - n(t, i, e, r); | |
| 6874 | - }); | |
| 6875 | - } | |
| 6876 | - return r = r ? r.then(f, f) : f(); | |
| 6877 | - }, !0); | |
| 7013 | +function isContextConsumer(object) { | |
| 7014 | + return typeOf(object) === REACT_CONTEXT_TYPE; | |
| 6878 | 7015 | } |
| 6879 | -module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6880 | - | |
| 6881 | -/***/ }), | |
| 6882 | - | |
| 6883 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js": | |
| 6884 | -/*!*******************************************************************!*\ | |
| 6885 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorDefine.js ***! | |
| 6886 | - \*******************************************************************/ | |
| 6887 | -/***/ ((module) => { | |
| 6888 | - | |
| 6889 | -function _regeneratorDefine(e, r, n, t) { | |
| 6890 | - var i = Object.defineProperty; | |
| 6891 | - try { | |
| 6892 | - i({}, "", {}); | |
| 6893 | - } catch (e) { | |
| 6894 | - i = 0; | |
| 6895 | - } | |
| 6896 | - module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { | |
| 6897 | - function o(r, n) { | |
| 6898 | - _regeneratorDefine(e, r, function (e) { | |
| 6899 | - return this._invoke(r, n, e); | |
| 6900 | - }); | |
| 6901 | - } | |
| 6902 | - r ? i ? i(e, r, { | |
| 6903 | - value: n, | |
| 6904 | - enumerable: !t, | |
| 6905 | - configurable: !t, | |
| 6906 | - writable: !t | |
| 6907 | - }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); | |
| 6908 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); | |
| 7016 | +function isContextProvider(object) { | |
| 7017 | + return typeOf(object) === REACT_PROVIDER_TYPE; | |
| 6909 | 7018 | } |
| 6910 | -module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6911 | - | |
| 6912 | -/***/ }), | |
| 6913 | - | |
| 6914 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js": | |
| 6915 | -/*!*****************************************************************!*\ | |
| 6916 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorKeys.js ***! | |
| 6917 | - \*****************************************************************/ | |
| 6918 | -/***/ ((module) => { | |
| 6919 | - | |
| 6920 | -function _regeneratorKeys(e) { | |
| 6921 | - var n = Object(e), | |
| 6922 | - r = []; | |
| 6923 | - for (var t in n) r.unshift(t); | |
| 6924 | - return function e() { | |
| 6925 | - for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; | |
| 6926 | - return e.done = !0, e; | |
| 6927 | - }; | |
| 7019 | +function isElement(object) { | |
| 7020 | + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | |
| 6928 | 7021 | } |
| 6929 | -module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6930 | - | |
| 6931 | -/***/ }), | |
| 6932 | - | |
| 6933 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js": | |
| 6934 | -/*!********************************************************************!*\ | |
| 6935 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! | |
| 6936 | - \********************************************************************/ | |
| 6937 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6938 | - | |
| 6939 | -var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); | |
| 6940 | -var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); | |
| 6941 | -var regeneratorAsync = __webpack_require__(/*! ./regeneratorAsync.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js"); | |
| 6942 | -var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); | |
| 6943 | -var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); | |
| 6944 | -var regeneratorKeys = __webpack_require__(/*! ./regeneratorKeys.js */ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js"); | |
| 6945 | -var regeneratorValues = __webpack_require__(/*! ./regeneratorValues.js */ "../node_modules/@babel/runtime/helpers/regeneratorValues.js"); | |
| 6946 | -function _regeneratorRuntime() { | |
| 6947 | - "use strict"; | |
| 6948 | - | |
| 6949 | - var r = regenerator(), | |
| 6950 | - e = r.m(_regeneratorRuntime), | |
| 6951 | - t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; | |
| 6952 | - function n(r) { | |
| 6953 | - var e = "function" == typeof r && r.constructor; | |
| 6954 | - return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); | |
| 6955 | - } | |
| 6956 | - var o = { | |
| 6957 | - "throw": 1, | |
| 6958 | - "return": 2, | |
| 6959 | - "break": 3, | |
| 6960 | - "continue": 3 | |
| 6961 | - }; | |
| 6962 | - function a(r) { | |
| 6963 | - var e, t; | |
| 6964 | - return function (n) { | |
| 6965 | - e || (e = { | |
| 6966 | - stop: function stop() { | |
| 6967 | - return t(n.a, 2); | |
| 6968 | - }, | |
| 6969 | - "catch": function _catch() { | |
| 6970 | - return n.v; | |
| 6971 | - }, | |
| 6972 | - abrupt: function abrupt(r, e) { | |
| 6973 | - return t(n.a, o[r], e); | |
| 6974 | - }, | |
| 6975 | - delegateYield: function delegateYield(r, o, a) { | |
| 6976 | - return e.resultName = o, t(n.d, regeneratorValues(r), a); | |
| 6977 | - }, | |
| 6978 | - finish: function finish(r) { | |
| 6979 | - return t(n.f, r); | |
| 6980 | - } | |
| 6981 | - }, t = function t(r, _t, o) { | |
| 6982 | - n.p = e.prev, n.n = e.next; | |
| 6983 | - try { | |
| 6984 | - return r(_t, o); | |
| 6985 | - } finally { | |
| 6986 | - e.next = n.n; | |
| 6987 | - } | |
| 6988 | - }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; | |
| 6989 | - try { | |
| 6990 | - return r.call(this, e); | |
| 6991 | - } finally { | |
| 6992 | - n.p = e.prev, n.n = e.next; | |
| 6993 | - } | |
| 6994 | - }; | |
| 6995 | - } | |
| 6996 | - return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 6997 | - return { | |
| 6998 | - wrap: function wrap(e, t, n, o) { | |
| 6999 | - return r.w(a(e), t, n, o && o.reverse()); | |
| 7000 | - }, | |
| 7001 | - isGeneratorFunction: n, | |
| 7002 | - mark: r.m, | |
| 7003 | - awrap: function awrap(r, e) { | |
| 7004 | - return new OverloadYield(r, e); | |
| 7005 | - }, | |
| 7006 | - AsyncIterator: regeneratorAsyncIterator, | |
| 7007 | - async: function async(r, e, t, o, u) { | |
| 7008 | - return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); | |
| 7009 | - }, | |
| 7010 | - keys: regeneratorKeys, | |
| 7011 | - values: regeneratorValues | |
| 7012 | - }; | |
| 7013 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 7022 | +function isForwardRef(object) { | |
| 7023 | + return typeOf(object) === REACT_FORWARD_REF_TYPE; | |
| 7014 | 7024 | } |
| 7015 | -module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 7016 | - | |
| 7017 | -/***/ }), | |
| 7018 | - | |
| 7019 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorValues.js": | |
| 7020 | -/*!*******************************************************************!*\ | |
| 7021 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorValues.js ***! | |
| 7022 | - \*******************************************************************/ | |
| 7023 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 7024 | - | |
| 7025 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 7026 | -function _regeneratorValues(e) { | |
| 7027 | - if (null != e) { | |
| 7028 | - var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], | |
| 7029 | - r = 0; | |
| 7030 | - if (t) return t.call(e); | |
| 7031 | - if ("function" == typeof e.next) return e; | |
| 7032 | - if (!isNaN(e.length)) return { | |
| 7033 | - next: function next() { | |
| 7034 | - return e && r >= e.length && (e = void 0), { | |
| 7035 | - value: e && e[r++], | |
| 7036 | - done: !e | |
| 7037 | - }; | |
| 7038 | - } | |
| 7039 | - }; | |
| 7040 | - } | |
| 7041 | - throw new TypeError(_typeof(e) + " is not iterable"); | |
| 7025 | +function isFragment(object) { | |
| 7026 | + return typeOf(object) === REACT_FRAGMENT_TYPE; | |
| 7042 | 7027 | } |
| 7043 | -module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 7044 | - | |
| 7045 | -/***/ }), | |
| 7046 | - | |
| 7047 | -/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": | |
| 7048 | -/*!****************************************************************!*\ | |
| 7049 | - !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! | |
| 7050 | - \****************************************************************/ | |
| 7051 | -/***/ ((module) => { | |
| 7052 | - | |
| 7053 | -function _setPrototypeOf(t, e) { | |
| 7054 | - return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { | |
| 7055 | - return t.__proto__ = e, t; | |
| 7056 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); | |
| 7028 | +function isLazy(object) { | |
| 7029 | + return typeOf(object) === REACT_LAZY_TYPE; | |
| 7057 | 7030 | } |
| 7058 | -module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 7059 | - | |
| 7060 | -/***/ }), | |
| 7061 | - | |
| 7062 | -/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": | |
| 7063 | -/*!***************************************************************!*\ | |
| 7064 | - !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! | |
| 7065 | - \***************************************************************/ | |
| 7066 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 7067 | - | |
| 7068 | -var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); | |
| 7069 | -var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); | |
| 7070 | -var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 7071 | -var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); | |
| 7072 | -function _slicedToArray(r, e) { | |
| 7073 | - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); | |
| 7031 | +function isMemo(object) { | |
| 7032 | + return typeOf(object) === REACT_MEMO_TYPE; | |
| 7074 | 7033 | } |
| 7075 | -module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 7076 | - | |
| 7077 | -/***/ }), | |
| 7078 | - | |
| 7079 | -/***/ "../node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js": | |
| 7080 | -/*!***********************************************************************!*\ | |
| 7081 | - !*** ../node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js ***! | |
| 7082 | - \***********************************************************************/ | |
| 7083 | -/***/ ((module) => { | |
| 7084 | - | |
| 7085 | -function _taggedTemplateLiteral(e, t) { | |
| 7086 | - return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { | |
| 7087 | - raw: { | |
| 7088 | - value: Object.freeze(t) | |
| 7089 | - } | |
| 7090 | - })); | |
| 7034 | +function isPortal(object) { | |
| 7035 | + return typeOf(object) === REACT_PORTAL_TYPE; | |
| 7091 | 7036 | } |
| 7092 | -module.exports = _taggedTemplateLiteral, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 7093 | - | |
| 7094 | -/***/ }), | |
| 7095 | - | |
| 7096 | -/***/ "../node_modules/@babel/runtime/helpers/toConsumableArray.js": | |
| 7097 | -/*!*******************************************************************!*\ | |
| 7098 | - !*** ../node_modules/@babel/runtime/helpers/toConsumableArray.js ***! | |
| 7099 | - \*******************************************************************/ | |
| 7100 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 7101 | - | |
| 7102 | -var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"); | |
| 7103 | -var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "../node_modules/@babel/runtime/helpers/iterableToArray.js"); | |
| 7104 | -var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 7105 | -var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js"); | |
| 7106 | -function _toConsumableArray(r) { | |
| 7107 | - return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread(); | |
| 7037 | +function isProfiler(object) { | |
| 7038 | + return typeOf(object) === REACT_PROFILER_TYPE; | |
| 7108 | 7039 | } |
| 7109 | -module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 7110 | - | |
| 7111 | -/***/ }), | |
| 7112 | - | |
| 7113 | -/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 7114 | -/*!*************************************************************!*\ | |
| 7115 | - !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 7116 | - \*************************************************************/ | |
| 7117 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 7118 | - | |
| 7119 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 7120 | -function toPrimitive(t, r) { | |
| 7121 | - if ("object" != _typeof(t) || !t) return t; | |
| 7122 | - var e = t[Symbol.toPrimitive]; | |
| 7123 | - if (void 0 !== e) { | |
| 7124 | - var i = e.call(t, r || "default"); | |
| 7125 | - if ("object" != _typeof(i)) return i; | |
| 7126 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 7127 | - } | |
| 7128 | - return ("string" === r ? String : Number)(t); | |
| 7040 | +function isStrictMode(object) { | |
| 7041 | + return typeOf(object) === REACT_STRICT_MODE_TYPE; | |
| 7129 | 7042 | } |
| 7130 | -module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 7131 | - | |
| 7132 | -/***/ }), | |
| 7133 | - | |
| 7134 | -/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 7135 | -/*!***************************************************************!*\ | |
| 7136 | - !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 7137 | - \***************************************************************/ | |
| 7138 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 7139 | - | |
| 7140 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 7141 | -var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 7142 | -function toPropertyKey(t) { | |
| 7143 | - var i = toPrimitive(t, "string"); | |
| 7144 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 7043 | +function isSuspense(object) { | |
| 7044 | + return typeOf(object) === REACT_SUSPENSE_TYPE; | |
| 7145 | 7045 | } |
| 7146 | -module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 7147 | 7046 | |
| 7148 | -/***/ }), | |
| 7149 | - | |
| 7150 | -/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 7151 | -/*!********************************************************!*\ | |
| 7152 | - !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 7153 | - \********************************************************/ | |
| 7154 | -/***/ ((module) => { | |
| 7155 | - | |
| 7156 | -function _typeof(o) { | |
| 7157 | - "@babel/helpers - typeof"; | |
| 7158 | - | |
| 7159 | - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 7160 | - return typeof o; | |
| 7161 | - } : function (o) { | |
| 7162 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 7163 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 7047 | +exports.AsyncMode = AsyncMode; | |
| 7048 | +exports.ConcurrentMode = ConcurrentMode; | |
| 7049 | +exports.ContextConsumer = ContextConsumer; | |
| 7050 | +exports.ContextProvider = ContextProvider; | |
| 7051 | +exports.Element = Element; | |
| 7052 | +exports.ForwardRef = ForwardRef; | |
| 7053 | +exports.Fragment = Fragment; | |
| 7054 | +exports.Lazy = Lazy; | |
| 7055 | +exports.Memo = Memo; | |
| 7056 | +exports.Portal = Portal; | |
| 7057 | +exports.Profiler = Profiler; | |
| 7058 | +exports.StrictMode = StrictMode; | |
| 7059 | +exports.Suspense = Suspense; | |
| 7060 | +exports.isAsyncMode = isAsyncMode; | |
| 7061 | +exports.isConcurrentMode = isConcurrentMode; | |
| 7062 | +exports.isContextConsumer = isContextConsumer; | |
| 7063 | +exports.isContextProvider = isContextProvider; | |
| 7064 | +exports.isElement = isElement; | |
| 7065 | +exports.isForwardRef = isForwardRef; | |
| 7066 | +exports.isFragment = isFragment; | |
| 7067 | +exports.isLazy = isLazy; | |
| 7068 | +exports.isMemo = isMemo; | |
| 7069 | +exports.isPortal = isPortal; | |
| 7070 | +exports.isProfiler = isProfiler; | |
| 7071 | +exports.isStrictMode = isStrictMode; | |
| 7072 | +exports.isSuspense = isSuspense; | |
| 7073 | +exports.isValidElementType = isValidElementType; | |
| 7074 | +exports.typeOf = typeOf; | |
| 7075 | + })(); | |
| 7164 | 7076 | } |
| 7165 | -module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 7166 | 7077 | |
| 7167 | -/***/ }), | |
| 7168 | 7078 | |
| 7169 | -/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": | |
| 7170 | -/*!****************************************************************************!*\ | |
| 7171 | - !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! | |
| 7172 | - \****************************************************************************/ | |
| 7173 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 7174 | - | |
| 7175 | -var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 7176 | -function _unsupportedIterableToArray(r, a) { | |
| 7177 | - if (r) { | |
| 7178 | - if ("string" == typeof r) return arrayLikeToArray(r, a); | |
| 7179 | - var t = {}.toString.call(r).slice(8, -1); | |
| 7180 | - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0; | |
| 7181 | - } | |
| 7182 | -} | |
| 7183 | -module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 7184 | - | |
| 7185 | 7079 | /***/ }), |
| 7186 | 7080 | |
| 7187 | -/***/ "../node_modules/@babel/runtime/regenerator/index.js": | |
| 7188 | -/*!***********************************************************!*\ | |
| 7189 | - !*** ../node_modules/@babel/runtime/regenerator/index.js ***! | |
| 7190 | - \***********************************************************/ | |
| 7081 | +/***/ "../node_modules/hoist-non-react-statics/node_modules/react-is/index.js": | |
| 7082 | +/*!******************************************************************************!*\ | |
| 7083 | + !*** ../node_modules/hoist-non-react-statics/node_modules/react-is/index.js ***! | |
| 7084 | + \******************************************************************************/ | |
| 7191 | 7085 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 7192 | 7086 | |
| 7193 | -// TODO(Babel 8): Remove this file. | |
| 7087 | +"use strict"; | |
| 7194 | 7088 | |
| 7195 | -var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")(); | |
| 7196 | -module.exports = runtime; | |
| 7197 | 7089 | |
| 7198 | -// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= | |
| 7199 | -try { | |
| 7200 | - regeneratorRuntime = runtime; | |
| 7201 | -} catch (accidentalStrictMode) { | |
| 7202 | - if (typeof globalThis === "object") { | |
| 7203 | - globalThis.regeneratorRuntime = runtime; | |
| 7204 | - } else { | |
| 7205 | - Function("r", "regeneratorRuntime = r")(runtime); | |
| 7206 | - } | |
| 7090 | +if (false) {} else { | |
| 7091 | + module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js"); | |
| 7207 | 7092 | } |
| 7208 | 7093 | |
| 7209 | 7094 | |
| 7210 | 7095 | /***/ }), |
| @@ -7283,13 +7168,13 @@ | ||
| 7283 | 7168 | const contentType = (0,_mimes__WEBPACK_IMPORTED_MODULE_2__.getMimeType)(poster); |
| 7284 | 7169 | const dataURL = await (0,_dataurl__WEBPACK_IMPORTED_MODULE_3__.resourceToDataURL)(poster, contentType, options); |
| 7285 | 7170 | return (0,_util__WEBPACK_IMPORTED_MODULE_1__.createImage)(dataURL); |
| 7286 | 7171 | } |
| 7287 | -async function cloneIFrameElement(iframe, options) { | |
| 7172 | +async function cloneIFrameElement(iframe) { | |
| 7288 | 7173 | var _a; |
| 7289 | 7174 | try { |
| 7290 | 7175 | if ((_a = iframe === null || iframe === void 0 ? void 0 : iframe.contentDocument) === null || _a === void 0 ? void 0 : _a.body) { |
| 7291 | - return (await cloneNode(iframe.contentDocument.body, options, true)); | |
| 7176 | + return (await cloneNode(iframe.contentDocument.body, {}, true)); | |
| 7292 | 7177 | } |
| 7293 | 7178 | } |
| 7294 | 7179 | catch (_b) { |
| 7295 | 7180 | // Failed to clone iframe |
| @@ -7303,19 +7188,15 @@ | ||
| 7303 | 7188 | if ((0,_util__WEBPACK_IMPORTED_MODULE_1__.isInstanceOfElement)(node, HTMLVideoElement)) { |
| 7304 | 7189 | return cloneVideoElement(node, options); |
| 7305 | 7190 | } |
| 7306 | 7191 | if ((0,_util__WEBPACK_IMPORTED_MODULE_1__.isInstanceOfElement)(node, HTMLIFrameElement)) { |
| 7307 | - return cloneIFrameElement(node, options); | |
| 7192 | + return cloneIFrameElement(node); | |
| 7308 | 7193 | } |
| 7309 | - return node.cloneNode(isSVGElement(node)); | |
| 7194 | + return node.cloneNode(false); | |
| 7310 | 7195 | } |
| 7311 | 7196 | const isSlotElement = (node) => node.tagName != null && node.tagName.toUpperCase() === 'SLOT'; |
| 7312 | -const isSVGElement = (node) => node.tagName != null && node.tagName.toUpperCase() === 'SVG'; | |
| 7313 | 7197 | async function cloneChildren(nativeNode, clonedNode, options) { |
| 7314 | 7198 | var _a, _b; |
| 7315 | - if (isSVGElement(clonedNode)) { | |
| 7316 | - return clonedNode; | |
| 7317 | - } | |
| 7318 | 7199 | let children = []; |
| 7319 | 7200 | if (isSlotElement(nativeNode) && nativeNode.assignedNodes) { |
| 7320 | 7201 | children = (0,_util__WEBPACK_IMPORTED_MODULE_1__.toArray)(nativeNode.assignedNodes()); |
| 7321 | 7202 | } |
| @@ -7338,9 +7219,9 @@ | ||
| 7338 | 7219 | } |
| 7339 | 7220 | }), Promise.resolve()); |
| 7340 | 7221 | return clonedNode; |
| 7341 | 7222 | } |
| 7342 | -function cloneCSSStyle(nativeNode, clonedNode, options) { | |
| 7223 | +function cloneCSSStyle(nativeNode, clonedNode) { | |
| 7343 | 7224 | const targetStyle = clonedNode.style; |
| 7344 | 7225 | if (!targetStyle) { |
| 7345 | 7226 | return; |
| 7346 | 7227 | } |
| @@ -7349,9 +7230,9 @@ | ||
| 7349 | 7230 | targetStyle.cssText = sourceStyle.cssText; |
| 7350 | 7231 | targetStyle.transformOrigin = sourceStyle.transformOrigin; |
| 7351 | 7232 | } |
| 7352 | 7233 | else { |
| 7353 | - (0,_util__WEBPACK_IMPORTED_MODULE_1__.getStyleProperties)(options).forEach((name) => { | |
| 7234 | + (0,_util__WEBPACK_IMPORTED_MODULE_1__.toArray)(sourceStyle).forEach((name) => { | |
| 7354 | 7235 | let value = sourceStyle.getPropertyValue(name); |
| 7355 | 7236 | if (name === 'font-size' && value.endsWith('px')) { |
| 7356 | 7237 | const reducedFont = Math.floor(parseFloat(value.substring(0, value.length - 2))) - 0.1; |
| 7357 | 7238 | value = `${reducedFont}px`; |
| @@ -7384,12 +7265,12 @@ | ||
| 7384 | 7265 | selectedOption.setAttribute('selected', ''); |
| 7385 | 7266 | } |
| 7386 | 7267 | } |
| 7387 | 7268 | } |
| 7388 | -function decorate(nativeNode, clonedNode, options) { | |
| 7269 | +function decorate(nativeNode, clonedNode) { | |
| 7389 | 7270 | if ((0,_util__WEBPACK_IMPORTED_MODULE_1__.isInstanceOfElement)(clonedNode, Element)) { |
| 7390 | - cloneCSSStyle(nativeNode, clonedNode, options); | |
| 7391 | - (0,_clone_pseudos__WEBPACK_IMPORTED_MODULE_0__.clonePseudoElements)(nativeNode, clonedNode, options); | |
| 7271 | + cloneCSSStyle(nativeNode, clonedNode); | |
| 7272 | + (0,_clone_pseudos__WEBPACK_IMPORTED_MODULE_0__.clonePseudoElements)(nativeNode, clonedNode); | |
| 7392 | 7273 | cloneInputValue(nativeNode, clonedNode); |
| 7393 | 7274 | cloneSelectValue(nativeNode, clonedNode); |
| 7394 | 7275 | } |
| 7395 | 7276 | return clonedNode; |
| @@ -7437,9 +7318,9 @@ | ||
| 7437 | 7318 | } |
| 7438 | 7319 | return Promise.resolve(node) |
| 7439 | 7320 | .then((clonedNode) => cloneSingleNode(clonedNode, options)) |
| 7440 | 7321 | .then((clonedNode) => cloneChildren(node, clonedNode, options)) |
| 7441 | - .then((clonedNode) => decorate(node, clonedNode, options)) | |
| 7322 | + .then((clonedNode) => decorate(node, clonedNode)) | |
| 7442 | 7323 | .then((clonedNode) => ensureSVGSymbols(clonedNode, options)); |
| 7443 | 7324 | } |
| 7444 | 7325 | //# sourceMappingURL=clone-node.js.map |
| 7445 | 7326 | |
| @@ -7461,10 +7342,10 @@ | ||
| 7461 | 7342 | function formatCSSText(style) { |
| 7462 | 7343 | const content = style.getPropertyValue('content'); |
| 7463 | 7344 | return `${style.cssText} content: '${content.replace(/'|"/g, '')}';`; |
| 7464 | 7345 | } |
| 7465 | -function formatCSSProperties(style, options) { | |
| 7466 | - return (0,_util__WEBPACK_IMPORTED_MODULE_0__.getStyleProperties)(options) | |
| 7346 | +function formatCSSProperties(style) { | |
| 7347 | + return (0,_util__WEBPACK_IMPORTED_MODULE_0__.toArray)(style) | |
| 7467 | 7348 | .map((name) => { |
| 7468 | 7349 | const value = style.getPropertyValue(name); |
| 7469 | 7350 | const priority = style.getPropertyPriority(name); |
| 7470 | 7351 | return `${name}: ${value}${priority ? ' !important' : ''};`; |
| @@ -7470,16 +7351,16 @@ | ||
| 7470 | 7351 | return `${name}: ${value}${priority ? ' !important' : ''};`; |
| 7471 | 7352 | }) |
| 7472 | 7353 | .join(' '); |
| 7473 | 7354 | } |
| 7474 | -function getPseudoElementStyle(className, pseudo, style, options) { | |
| 7355 | +function getPseudoElementStyle(className, pseudo, style) { | |
| 7475 | 7356 | const selector = `.${className}:${pseudo}`; |
| 7476 | 7357 | const cssText = style.cssText |
| 7477 | 7358 | ? formatCSSText(style) |
| 7478 | - : formatCSSProperties(style, options); | |
| 7359 | + : formatCSSProperties(style); | |
| 7479 | 7360 | return document.createTextNode(`${selector}{${cssText}}`); |
| 7480 | 7361 | } |
| 7481 | -function clonePseudoElement(nativeNode, clonedNode, pseudo, options) { | |
| 7362 | +function clonePseudoElement(nativeNode, clonedNode, pseudo) { | |
| 7482 | 7363 | const style = window.getComputedStyle(nativeNode, pseudo); |
| 7483 | 7364 | const content = style.getPropertyValue('content'); |
| 7484 | 7365 | if (content === '' || content === 'none') { |
| 7485 | 7366 | return; |
| @@ -7491,14 +7372,14 @@ | ||
| 7491 | 7372 | catch (err) { |
| 7492 | 7373 | return; |
| 7493 | 7374 | } |
| 7494 | 7375 | const styleElement = document.createElement('style'); |
| 7495 | - styleElement.appendChild(getPseudoElementStyle(className, pseudo, style, options)); | |
| 7376 | + styleElement.appendChild(getPseudoElementStyle(className, pseudo, style)); | |
| 7496 | 7377 | clonedNode.appendChild(styleElement); |
| 7497 | 7378 | } |
| 7498 | -function clonePseudoElements(nativeNode, clonedNode, options) { | |
| 7499 | - clonePseudoElement(nativeNode, clonedNode, ':before', options); | |
| 7500 | - clonePseudoElement(nativeNode, clonedNode, ':after', options); | |
| 7379 | +function clonePseudoElements(nativeNode, clonedNode) { | |
| 7380 | + clonePseudoElement(nativeNode, clonedNode, ':before'); | |
| 7381 | + clonePseudoElement(nativeNode, clonedNode, ':after'); | |
| 7501 | 7382 | } |
| 7502 | 7383 | //# sourceMappingURL=clone-pseudos.js.map |
| 7503 | 7384 | |
| 7504 | 7385 | /***/ }), |
| @@ -7625,15 +7506,14 @@ | ||
| 7625 | 7506 | } |
| 7626 | 7507 | return false; |
| 7627 | 7508 | } |
| 7628 | 7509 | async function embedBackground(clonedNode, options) { |
| 7629 | - ; | |
| 7630 | - (await embedProp('background', clonedNode, options)) || | |
| 7631 | - (await embedProp('background-image', clonedNode, options)); | |
| 7632 | - (await embedProp('mask', clonedNode, options)) || | |
| 7633 | - (await embedProp('-webkit-mask', clonedNode, options)) || | |
| 7634 | - (await embedProp('mask-image', clonedNode, options)) || | |
| 7635 | - (await embedProp('-webkit-mask-image', clonedNode, options)); | |
| 7510 | + if (!(await embedProp('background', clonedNode, options))) { | |
| 7511 | + await embedProp('background-image', clonedNode, options); | |
| 7512 | + } | |
| 7513 | + if (!(await embedProp('mask', clonedNode, options))) { | |
| 7514 | + await embedProp('mask-image', clonedNode, options); | |
| 7515 | + } | |
| 7636 | 7516 | } |
| 7637 | 7517 | async function embedImageNode(clonedNode, options) { |
| 7638 | 7518 | const isImageElement = (0,_util__WEBPACK_IMPORTED_MODULE_1__.isInstanceOfElement)(clonedNode, HTMLImageElement); |
| 7639 | 7519 | if (!(isImageElement && !(0,_dataurl__WEBPACK_IMPORTED_MODULE_2__.isDataUrl)(clonedNode.src)) && |
| @@ -7644,18 +7524,9 @@ | ||
| 7644 | 7524 | const url = isImageElement ? clonedNode.src : clonedNode.href.baseVal; |
| 7645 | 7525 | const dataURL = await (0,_dataurl__WEBPACK_IMPORTED_MODULE_2__.resourceToDataURL)(url, (0,_mimes__WEBPACK_IMPORTED_MODULE_3__.getMimeType)(url), options); |
| 7646 | 7526 | await new Promise((resolve, reject) => { |
| 7647 | 7527 | clonedNode.onload = resolve; |
| 7648 | - clonedNode.onerror = options.onImageErrorHandler | |
| 7649 | - ? (...attributes) => { | |
| 7650 | - try { | |
| 7651 | - resolve(options.onImageErrorHandler(...attributes)); | |
| 7652 | - } | |
| 7653 | - catch (error) { | |
| 7654 | - reject(error); | |
| 7655 | - } | |
| 7656 | - } | |
| 7657 | - : reject; | |
| 7528 | + clonedNode.onerror = reject; | |
| 7658 | 7529 | const image = clonedNode; |
| 7659 | 7530 | if (image.decode) { |
| 7660 | 7531 | image.decode = resolve; |
| 7661 | 7532 | } |
| @@ -7901,9 +7772,9 @@ | ||
| 7901 | 7772 | if (sheet.href != null) { |
| 7902 | 7773 | deferreds.push(fetchCSS(sheet.href) |
| 7903 | 7774 | .then((metadata) => embedFonts(metadata, options)) |
| 7904 | 7775 | .then((cssText) => parseCSS(cssText).forEach((rule) => { |
| 7905 | - inline.insertRule(rule, inline.cssRules.length); | |
| 7776 | + inline.insertRule(rule, sheet.cssRules.length); | |
| 7906 | 7777 | })) |
| 7907 | 7778 | .catch((err) => { |
| 7908 | 7779 | console.error('Error loading remote stylesheet', err); |
| 7909 | 7780 | })); |
| @@ -7941,36 +7812,12 @@ | ||
| 7941 | 7812 | const styleSheets = (0,_util__WEBPACK_IMPORTED_MODULE_0__.toArray)(node.ownerDocument.styleSheets); |
| 7942 | 7813 | const cssRules = await getCSSRules(styleSheets, options); |
| 7943 | 7814 | return getWebFontRules(cssRules); |
| 7944 | 7815 | } |
| 7945 | -function normalizeFontFamily(font) { | |
| 7946 | - return font.trim().replace(/["']/g, ''); | |
| 7947 | -} | |
| 7948 | -function getUsedFonts(node) { | |
| 7949 | - const fonts = new Set(); | |
| 7950 | - function traverse(node) { | |
| 7951 | - const fontFamily = node.style.fontFamily || getComputedStyle(node).fontFamily; | |
| 7952 | - fontFamily.split(',').forEach((font) => { | |
| 7953 | - fonts.add(normalizeFontFamily(font)); | |
| 7954 | - }); | |
| 7955 | - Array.from(node.children).forEach((child) => { | |
| 7956 | - if (child instanceof HTMLElement) { | |
| 7957 | - traverse(child); | |
| 7958 | - } | |
| 7959 | - }); | |
| 7960 | - } | |
| 7961 | - traverse(node); | |
| 7962 | - return fonts; | |
| 7963 | -} | |
| 7964 | 7816 | async function getWebFontCSS(node, options) { |
| 7965 | 7817 | const rules = await parseWebFontRules(node, options); |
| 7966 | - const usedFonts = getUsedFonts(node); | |
| 7967 | - const cssTexts = await Promise.all(rules | |
| 7968 | - .filter((rule) => usedFonts.has(normalizeFontFamily(rule.style.fontFamily))) | |
| 7969 | - .map((rule) => { | |
| 7970 | - const baseUrl = rule.parentStyleSheet | |
| 7971 | - ? rule.parentStyleSheet.href | |
| 7972 | - : null; | |
| 7818 | + const cssTexts = await Promise.all(rules.map((rule) => { | |
| 7819 | + const baseUrl = rule.parentStyleSheet ? rule.parentStyleSheet.href : null; | |
| 7973 | 7820 | return (0,_embed_resources__WEBPACK_IMPORTED_MODULE_2__.embedResources)(rule.cssText, baseUrl, options); |
| 7974 | 7821 | })); |
| 7975 | 7822 | return cssTexts.join('\n'); |
| 7976 | 7823 | } |
| @@ -8133,9 +7980,8 @@ | ||
| 8133 | 7980 | /* harmony export */ createImage: () => (/* binding */ createImage), |
| 8134 | 7981 | /* harmony export */ delay: () => (/* binding */ delay), |
| 8135 | 7982 | /* harmony export */ getImageSize: () => (/* binding */ getImageSize), |
| 8136 | 7983 | /* harmony export */ getPixelRatio: () => (/* binding */ getPixelRatio), |
| 8137 | -/* harmony export */ getStyleProperties: () => (/* binding */ getStyleProperties), | |
| 8138 | 7984 | /* harmony export */ isInstanceOfElement: () => (/* binding */ isInstanceOfElement), |
| 8139 | 7985 | /* harmony export */ nodeToDataURL: () => (/* binding */ nodeToDataURL), |
| 8140 | 7986 | /* harmony export */ resolveUrl: () => (/* binding */ resolveUrl), |
| 8141 | 7987 | /* harmony export */ svgToDataURL: () => (/* binding */ svgToDataURL), |
| @@ -8190,20 +8036,8 @@ | ||
| 8190 | 8036 | arr.push(arrayLike[i]); |
| 8191 | 8037 | } |
| 8192 | 8038 | return arr; |
| 8193 | 8039 | } |
| 8194 | -let styleProps = null; | |
| 8195 | -function getStyleProperties(options = {}) { | |
| 8196 | - if (styleProps) { | |
| 8197 | - return styleProps; | |
| 8198 | - } | |
| 8199 | - if (options.includeStyleProperties) { | |
| 8200 | - styleProps = options.includeStyleProperties; | |
| 8201 | - return styleProps; | |
| 8202 | - } | |
| 8203 | - styleProps = toArray(window.getComputedStyle(document.documentElement)); | |
| 8204 | - return styleProps; | |
| 8205 | -} | |
| 8206 | 8040 | function px(node, styleProperty) { |
| 8207 | 8041 | const win = node.ownerDocument.defaultView || window; |
| 8208 | 8042 | const val = win.getComputedStyle(node).getPropertyValue(styleProperty); |
| 8209 | 8043 | return val ? parseFloat(val.replace('px', '')) : 0; |
| @@ -8291,13 +8125,10 @@ | ||
| 8291 | 8125 | } |
| 8292 | 8126 | function createImage(url) { |
| 8293 | 8127 | return new Promise((resolve, reject) => { |
| 8294 | 8128 | const img = new Image(); |
| 8295 | - img.onload = () => { | |
| 8296 | - img.decode().then(() => { | |
| 8297 | - requestAnimationFrame(() => resolve(img)); | |
| 8298 | - }); | |
| 8299 | - }; | |
| 8129 | + img.decode = () => resolve(img); | |
| 8130 | + img.onload = () => resolve(img); | |
| 8300 | 8131 | img.onerror = reject; |
| 8301 | 8132 | img.crossOrigin = 'anonymous'; |
| 8302 | 8133 | img.decoding = 'async'; |
| 8303 | 8134 | img.src = url; |
| @@ -9193,10 +9024,9 @@ | ||
| 9193 | 9024 | // By explicitly using `prop-types` you are opting into new development behavior. |
| 9194 | 9025 | // http://fb.me/prop-types-in-prod |
| 9195 | 9026 | var throwOnDirectAccess = true; |
| 9196 | 9027 | module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess); |
| 9197 | -} else // removed by dead control flow | |
| 9198 | -{} | |
| 9028 | +} else {} | |
| 9199 | 9029 | |
| 9200 | 9030 | |
| 9201 | 9031 | /***/ }), |
| 9202 | 9032 | |
| @@ -9434,10 +9264,9 @@ | ||
| 9434 | 9264 | |
| 9435 | 9265 | "use strict"; |
| 9436 | 9266 | |
| 9437 | 9267 | |
| 9438 | -if (false) // removed by dead control flow | |
| 9439 | -{} else { | |
| 9268 | +if (false) {} else { | |
| 9440 | 9269 | module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js"); |
| 9441 | 9270 | } |
| 9442 | 9271 | |
| 9443 | 9272 | |
| @@ -9452,10 +9281,9 @@ | ||
| 9452 | 9281 | "use strict"; |
| 9453 | 9282 | |
| 9454 | 9283 | |
| 9455 | 9284 | var m = __webpack_require__(/*! react-dom */ "react-dom"); |
| 9456 | -if (false) // removed by dead control flow | |
| 9457 | -{} else { | |
| 9285 | +if (false) {} else { | |
| 9458 | 9286 | var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; |
| 9459 | 9287 | exports.createRoot = function(c, o) { |
| 9460 | 9288 | i.usingClientEntryPoint = true; |
| 9461 | 9289 | try { |
| @@ -9485,175 +9313,198 @@ | ||
| 9485 | 9313 | |
| 9486 | 9314 | "use strict"; |
| 9487 | 9315 | |
| 9488 | 9316 | |
| 9317 | +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } | |
| 9318 | + | |
| 9489 | 9319 | Object.defineProperty(exports, "__esModule", ({ |
| 9490 | 9320 | value: true |
| 9491 | 9321 | })); |
| 9492 | 9322 | Object.defineProperty(exports, "DraggableCore", ({ |
| 9493 | 9323 | enumerable: true, |
| 9494 | - get: function () { | |
| 9324 | + get: function get() { | |
| 9495 | 9325 | return _DraggableCore.default; |
| 9496 | 9326 | } |
| 9497 | 9327 | })); |
| 9498 | 9328 | exports["default"] = void 0; |
| 9329 | + | |
| 9499 | 9330 | var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 9331 | + | |
| 9500 | 9332 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 9333 | + | |
| 9501 | 9334 | var _reactDom = _interopRequireDefault(__webpack_require__(/*! react-dom */ "react-dom")); |
| 9502 | -var _clsx = __webpack_require__(/*! clsx */ "../node_modules/react-draggable/node_modules/clsx/dist/clsx.js"); | |
| 9335 | + | |
| 9336 | +var _clsx2 = _interopRequireDefault(__webpack_require__(/*! clsx */ "../node_modules/clsx/dist/clsx.m.js")); | |
| 9337 | + | |
| 9503 | 9338 | var _domFns = __webpack_require__(/*! ./utils/domFns */ "../node_modules/react-draggable/build/cjs/utils/domFns.js"); |
| 9339 | + | |
| 9504 | 9340 | var _positionFns = __webpack_require__(/*! ./utils/positionFns */ "../node_modules/react-draggable/build/cjs/utils/positionFns.js"); |
| 9341 | + | |
| 9505 | 9342 | var _shims = __webpack_require__(/*! ./utils/shims */ "../node_modules/react-draggable/build/cjs/utils/shims.js"); |
| 9343 | + | |
| 9506 | 9344 | var _DraggableCore = _interopRequireDefault(__webpack_require__(/*! ./DraggableCore */ "../node_modules/react-draggable/build/cjs/DraggableCore.js")); |
| 9345 | + | |
| 9507 | 9346 | var _log = _interopRequireDefault(__webpack_require__(/*! ./utils/log */ "../node_modules/react-draggable/build/cjs/utils/log.js")); |
| 9508 | -function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } | |
| 9509 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } | |
| 9510 | -function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | |
| 9511 | -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } | |
| 9512 | -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } | |
| 9513 | -function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*:: import type {ControlPosition, PositionOffsetControlPosition, DraggableCoreProps, DraggableCoreDefaultProps} from './DraggableCore';*/ | |
| 9514 | -/*:: import type {Bounds, DraggableEventHandler} from './utils/types';*/ | |
| 9515 | -/*:: import type {Element as ReactElement} from 'react';*/ | |
| 9516 | -/*:: type DraggableState = { | |
| 9517 | - dragging: boolean, | |
| 9518 | - dragged: boolean, | |
| 9519 | - x: number, y: number, | |
| 9520 | - slackX: number, slackY: number, | |
| 9521 | - isElementSVG: boolean, | |
| 9522 | - prevPropsPosition: ?ControlPosition, | |
| 9523 | -};*/ | |
| 9524 | -/*:: export type DraggableDefaultProps = { | |
| 9525 | - ...DraggableCoreDefaultProps, | |
| 9526 | - axis: 'both' | 'x' | 'y' | 'none', | |
| 9527 | - bounds: Bounds | string | false, | |
| 9528 | - defaultClassName: string, | |
| 9529 | - defaultClassNameDragging: string, | |
| 9530 | - defaultClassNameDragged: string, | |
| 9531 | - defaultPosition: ControlPosition, | |
| 9532 | - scale: number, | |
| 9533 | -};*/ | |
| 9534 | -/*:: export type DraggableProps = { | |
| 9535 | - ...DraggableCoreProps, | |
| 9536 | - ...DraggableDefaultProps, | |
| 9537 | - positionOffset: PositionOffsetControlPosition, | |
| 9538 | - position: ControlPosition, | |
| 9539 | -};*/ | |
| 9347 | + | |
| 9348 | +var _excluded = ["axis", "bounds", "children", "defaultPosition", "defaultClassName", "defaultClassNameDragging", "defaultClassNameDragged", "position", "positionOffset", "scale"]; | |
| 9349 | + | |
| 9350 | +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
| 9351 | + | |
| 9352 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 9353 | + | |
| 9354 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 9355 | + | |
| 9356 | +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | |
| 9357 | + | |
| 9358 | +function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | |
| 9359 | + | |
| 9360 | +function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | |
| 9361 | + | |
| 9362 | +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; } | |
| 9363 | + | |
| 9364 | +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; } | |
| 9365 | + | |
| 9366 | +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } | |
| 9367 | + | |
| 9368 | +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."); } | |
| 9369 | + | |
| 9370 | +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); } | |
| 9371 | + | |
| 9372 | +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; } | |
| 9373 | + | |
| 9374 | +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; } | |
| 9375 | + | |
| 9376 | +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } | |
| 9377 | + | |
| 9378 | +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
| 9379 | + | |
| 9380 | +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | |
| 9381 | + | |
| 9382 | +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } | |
| 9383 | + | |
| 9384 | +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } | |
| 9385 | + | |
| 9386 | +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | |
| 9387 | + | |
| 9388 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | |
| 9389 | + | |
| 9390 | +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } | |
| 9391 | + | |
| 9392 | +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | |
| 9393 | + | |
| 9394 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 9395 | + | |
| 9396 | +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | |
| 9397 | + | |
| 9398 | +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; } | |
| 9399 | + | |
| 9540 | 9400 | // |
| 9541 | 9401 | // Define <Draggable> |
| 9542 | 9402 | // |
| 9543 | -class Draggable extends React.Component /*:: <DraggableProps, DraggableState>*/{ | |
| 9544 | - // React 16.3+ | |
| 9545 | - // Arity (props, state) | |
| 9546 | - static getDerivedStateFromProps(_ref /*:: */, _ref2 /*:: */) /*: ?Partial<DraggableState>*/{ | |
| 9547 | - let { | |
| 9548 | - position | |
| 9549 | - } /*: DraggableProps*/ = _ref /*: DraggableProps*/; | |
| 9550 | - let { | |
| 9551 | - prevPropsPosition | |
| 9552 | - } /*: DraggableState*/ = _ref2 /*: DraggableState*/; | |
| 9553 | - // Set x/y if a new position is provided in props that is different than the previous. | |
| 9554 | - if (position && (!prevPropsPosition || position.x !== prevPropsPosition.x || position.y !== prevPropsPosition.y)) { | |
| 9555 | - (0, _log.default)('Draggable: getDerivedStateFromProps %j', { | |
| 9556 | - position, | |
| 9557 | - prevPropsPosition | |
| 9558 | - }); | |
| 9559 | - return { | |
| 9560 | - x: position.x, | |
| 9561 | - y: position.y, | |
| 9562 | - prevPropsPosition: { | |
| 9563 | - ...position | |
| 9564 | - } | |
| 9565 | - }; | |
| 9566 | - } | |
| 9567 | - return null; | |
| 9568 | - } | |
| 9569 | - constructor(props /*: DraggableProps*/) { | |
| 9570 | - super(props); | |
| 9571 | - _defineProperty(this, "onDragStart", (e, coreData) => { | |
| 9572 | - (0, _log.default)('Draggable: onDragStart: %j', coreData); | |
| 9403 | +var Draggable = /*#__PURE__*/function (_React$Component) { | |
| 9404 | + _inherits(Draggable, _React$Component); | |
| 9573 | 9405 | |
| 9574 | - // Short-circuit if user's callback killed it. | |
| 9575 | - const shouldStart = this.props.onStart(e, (0, _positionFns.createDraggableData)(this, coreData)); | |
| 9576 | - // Kills start event on core as well, so move handlers are never bound. | |
| 9406 | + var _super = _createSuper(Draggable); | |
| 9407 | + | |
| 9408 | + function Draggable(props | |
| 9409 | + /*: DraggableProps*/ | |
| 9410 | + ) { | |
| 9411 | + var _this; | |
| 9412 | + | |
| 9413 | + _classCallCheck(this, Draggable); | |
| 9414 | + | |
| 9415 | + _this = _super.call(this, props); | |
| 9416 | + | |
| 9417 | + _defineProperty(_assertThisInitialized(_this), "onDragStart", function (e, coreData) { | |
| 9418 | + (0, _log.default)('Draggable: onDragStart: %j', coreData); // Short-circuit if user's callback killed it. | |
| 9419 | + | |
| 9420 | + var shouldStart = _this.props.onStart(e, (0, _positionFns.createDraggableData)(_assertThisInitialized(_this), coreData)); // Kills start event on core as well, so move handlers are never bound. | |
| 9421 | + | |
| 9422 | + | |
| 9577 | 9423 | if (shouldStart === false) return false; |
| 9578 | - this.setState({ | |
| 9424 | + | |
| 9425 | + _this.setState({ | |
| 9579 | 9426 | dragging: true, |
| 9580 | 9427 | dragged: true |
| 9581 | 9428 | }); |
| 9582 | 9429 | }); |
| 9583 | - _defineProperty(this, "onDrag", (e, coreData) => { | |
| 9584 | - if (!this.state.dragging) return false; | |
| 9430 | + | |
| 9431 | + _defineProperty(_assertThisInitialized(_this), "onDrag", function (e, coreData) { | |
| 9432 | + if (!_this.state.dragging) return false; | |
| 9585 | 9433 | (0, _log.default)('Draggable: onDrag: %j', coreData); |
| 9586 | - const uiData = (0, _positionFns.createDraggableData)(this, coreData); | |
| 9587 | - const newState = { | |
| 9434 | + var uiData = (0, _positionFns.createDraggableData)(_assertThisInitialized(_this), coreData); | |
| 9435 | + var newState | |
| 9436 | + /*: $Shape<DraggableState>*/ | |
| 9437 | + = { | |
| 9588 | 9438 | x: uiData.x, |
| 9589 | - y: uiData.y, | |
| 9590 | - slackX: 0, | |
| 9591 | - slackY: 0 | |
| 9592 | - }; | |
| 9439 | + y: uiData.y | |
| 9440 | + }; // Keep within bounds. | |
| 9593 | 9441 | |
| 9594 | - // Keep within bounds. | |
| 9595 | - if (this.props.bounds) { | |
| 9442 | + if (_this.props.bounds) { | |
| 9596 | 9443 | // Save original x and y. |
| 9597 | - const { | |
| 9598 | - x, | |
| 9599 | - y | |
| 9600 | - } = newState; | |
| 9601 | - | |
| 9602 | - // Add slack to the values used to calculate bound position. This will ensure that if | |
| 9444 | + var x = newState.x, | |
| 9445 | + y = newState.y; // Add slack to the values used to calculate bound position. This will ensure that if | |
| 9603 | 9446 | // we start removing slack, the element won't react to it right away until it's been |
| 9604 | 9447 | // completely removed. |
| 9605 | - newState.x += this.state.slackX; | |
| 9606 | - newState.y += this.state.slackY; | |
| 9607 | 9448 | |
| 9608 | - // Get bound position. This will ceil/floor the x and y within the boundaries. | |
| 9609 | - const [newStateX, newStateY] = (0, _positionFns.getBoundPosition)(this, newState.x, newState.y); | |
| 9449 | + newState.x += _this.state.slackX; | |
| 9450 | + newState.y += _this.state.slackY; // Get bound position. This will ceil/floor the x and y within the boundaries. | |
| 9451 | + | |
| 9452 | + var _getBoundPosition = (0, _positionFns.getBoundPosition)(_assertThisInitialized(_this), newState.x, newState.y), | |
| 9453 | + _getBoundPosition2 = _slicedToArray(_getBoundPosition, 2), | |
| 9454 | + newStateX = _getBoundPosition2[0], | |
| 9455 | + newStateY = _getBoundPosition2[1]; | |
| 9456 | + | |
| 9610 | 9457 | newState.x = newStateX; |
| 9611 | - newState.y = newStateY; | |
| 9458 | + newState.y = newStateY; // Recalculate slack by noting how much was shaved by the boundPosition handler. | |
| 9612 | 9459 | |
| 9613 | - // Recalculate slack by noting how much was shaved by the boundPosition handler. | |
| 9614 | - newState.slackX = this.state.slackX + (x - newState.x); | |
| 9615 | - newState.slackY = this.state.slackY + (y - newState.y); | |
| 9460 | + newState.slackX = _this.state.slackX + (x - newState.x); | |
| 9461 | + newState.slackY = _this.state.slackY + (y - newState.y); // Update the event we fire to reflect what really happened after bounds took effect. | |
| 9616 | 9462 | |
| 9617 | - // Update the event we fire to reflect what really happened after bounds took effect. | |
| 9618 | 9463 | uiData.x = newState.x; |
| 9619 | 9464 | uiData.y = newState.y; |
| 9620 | - uiData.deltaX = newState.x - this.state.x; | |
| 9621 | - uiData.deltaY = newState.y - this.state.y; | |
| 9622 | - } | |
| 9465 | + uiData.deltaX = newState.x - _this.state.x; | |
| 9466 | + uiData.deltaY = newState.y - _this.state.y; | |
| 9467 | + } // Short-circuit if user's callback killed it. | |
| 9623 | 9468 | |
| 9624 | - // Short-circuit if user's callback killed it. | |
| 9625 | - const shouldUpdate = this.props.onDrag(e, uiData); | |
| 9469 | + | |
| 9470 | + var shouldUpdate = _this.props.onDrag(e, uiData); | |
| 9471 | + | |
| 9626 | 9472 | if (shouldUpdate === false) return false; |
| 9627 | - this.setState(newState); | |
| 9473 | + | |
| 9474 | + _this.setState(newState); | |
| 9628 | 9475 | }); |
| 9629 | - _defineProperty(this, "onDragStop", (e, coreData) => { | |
| 9630 | - if (!this.state.dragging) return false; | |
| 9631 | 9476 | |
| 9632 | - // Short-circuit if user's callback killed it. | |
| 9633 | - const shouldContinue = this.props.onStop(e, (0, _positionFns.createDraggableData)(this, coreData)); | |
| 9477 | + _defineProperty(_assertThisInitialized(_this), "onDragStop", function (e, coreData) { | |
| 9478 | + if (!_this.state.dragging) return false; // Short-circuit if user's callback killed it. | |
| 9479 | + | |
| 9480 | + var shouldContinue = _this.props.onStop(e, (0, _positionFns.createDraggableData)(_assertThisInitialized(_this), coreData)); | |
| 9481 | + | |
| 9634 | 9482 | if (shouldContinue === false) return false; |
| 9635 | 9483 | (0, _log.default)('Draggable: onDragStop: %j', coreData); |
| 9636 | - const newState /*: Partial<DraggableState>*/ = { | |
| 9484 | + var newState | |
| 9485 | + /*: $Shape<DraggableState>*/ | |
| 9486 | + = { | |
| 9637 | 9487 | dragging: false, |
| 9638 | 9488 | slackX: 0, |
| 9639 | 9489 | slackY: 0 |
| 9640 | - }; | |
| 9490 | + }; // If this is a controlled component, the result of this operation will be to | |
| 9491 | + // revert back to the old position. We expect a handler on `onDragStop`, at the least. | |
| 9641 | 9492 | |
| 9642 | - // If this is a controlled component, the result of this operation will be to | |
| 9643 | - // revert back to the old position. We expect a handler on `onDragStop`, at the least. | |
| 9644 | - const controlled = Boolean(this.props.position); | |
| 9493 | + var controlled = Boolean(_this.props.position); | |
| 9494 | + | |
| 9645 | 9495 | if (controlled) { |
| 9646 | - const { | |
| 9647 | - x, | |
| 9648 | - y | |
| 9649 | - } = this.props.position; | |
| 9496 | + var _this$props$position = _this.props.position, | |
| 9497 | + x = _this$props$position.x, | |
| 9498 | + y = _this$props$position.y; | |
| 9650 | 9499 | newState.x = x; |
| 9651 | 9500 | newState.y = y; |
| 9652 | 9501 | } |
| 9653 | - this.setState(newState); | |
| 9502 | + | |
| 9503 | + _this.setState(newState); | |
| 9654 | 9504 | }); |
| 9655 | - this.state = { | |
| 9505 | + | |
| 9506 | + _this.state = { | |
| 9656 | 9507 | // Whether or not we are currently dragging. |
| 9657 | 9508 | dragging: false, |
| 9658 | 9509 | // Whether or not we have been dragged before. |
| 9659 | 9510 | dragged: false, |
| @@ -9659,11 +9510,9 @@ | ||
| 9659 | 9510 | dragged: false, |
| 9660 | 9511 | // Current transform x and y. |
| 9661 | 9512 | x: props.position ? props.position.x : props.defaultPosition.x, |
| 9662 | 9513 | y: props.position ? props.position.y : props.defaultPosition.y, |
| 9663 | - prevPropsPosition: { | |
| 9664 | - ...props.position | |
| 9665 | - }, | |
| 9514 | + prevPropsPosition: _objectSpread({}, props.position), | |
| 9666 | 9515 | // Used for compensating for out-of-bounds drags |
| 9667 | 9516 | slackX: 0, |
| 9668 | 9517 | slackY: 0, |
| 9669 | 9518 | // Can only determine if SVG after mounting |
| @@ -9668,100 +9517,137 @@ | ||
| 9668 | 9517 | slackY: 0, |
| 9669 | 9518 | // Can only determine if SVG after mounting |
| 9670 | 9519 | isElementSVG: false |
| 9671 | 9520 | }; |
| 9521 | + | |
| 9672 | 9522 | if (props.position && !(props.onDrag || props.onStop)) { |
| 9673 | 9523 | // eslint-disable-next-line no-console |
| 9674 | 9524 | console.warn('A `position` was applied to this <Draggable>, without drag handlers. This will make this ' + 'component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the ' + '`position` of this element.'); |
| 9675 | 9525 | } |
| 9526 | + | |
| 9527 | + return _this; | |
| 9676 | 9528 | } |
| 9677 | - componentDidMount() { | |
| 9678 | - // Check to see if the element passed is an instanceof SVGElement | |
| 9679 | - if (typeof window.SVGElement !== 'undefined' && this.findDOMNode() instanceof window.SVGElement) { | |
| 9680 | - this.setState({ | |
| 9681 | - isElementSVG: true | |
| 9682 | - }); | |
| 9529 | + | |
| 9530 | + _createClass(Draggable, [{ | |
| 9531 | + key: "componentDidMount", | |
| 9532 | + value: function componentDidMount() { | |
| 9533 | + // Check to see if the element passed is an instanceof SVGElement | |
| 9534 | + if (typeof window.SVGElement !== 'undefined' && this.findDOMNode() instanceof window.SVGElement) { | |
| 9535 | + this.setState({ | |
| 9536 | + isElementSVG: true | |
| 9537 | + }); | |
| 9538 | + } | |
| 9683 | 9539 | } |
| 9684 | - } | |
| 9685 | - componentWillUnmount() { | |
| 9686 | - if (this.state.dragging) { | |
| 9540 | + }, { | |
| 9541 | + key: "componentWillUnmount", | |
| 9542 | + value: function componentWillUnmount() { | |
| 9687 | 9543 | this.setState({ |
| 9688 | 9544 | dragging: false |
| 9689 | 9545 | }); // prevents invariant if unmounted while dragging |
| 9546 | + } // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find | |
| 9547 | + // the underlying DOM node ourselves. See the README for more information. | |
| 9548 | + | |
| 9549 | + }, { | |
| 9550 | + key: "findDOMNode", | |
| 9551 | + value: function findDOMNode() | |
| 9552 | + /*: ?HTMLElement*/ | |
| 9553 | + { | |
| 9554 | + var _this$props$nodeRef$c, _this$props, _this$props$nodeRef; | |
| 9555 | + | |
| 9556 | + return (_this$props$nodeRef$c = (_this$props = this.props) === null || _this$props === void 0 ? void 0 : (_this$props$nodeRef = _this$props.nodeRef) === null || _this$props$nodeRef === void 0 ? void 0 : _this$props$nodeRef.current) !== null && _this$props$nodeRef$c !== void 0 ? _this$props$nodeRef$c : _reactDom.default.findDOMNode(this); | |
| 9690 | 9557 | } |
| 9691 | - } | |
| 9558 | + }, { | |
| 9559 | + key: "render", | |
| 9560 | + value: function render() | |
| 9561 | + /*: ReactElement<any>*/ | |
| 9562 | + { | |
| 9563 | + var _clsx; | |
| 9692 | 9564 | |
| 9693 | - // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find | |
| 9694 | - // the underlying DOM node ourselves. See the README for more information. | |
| 9695 | - findDOMNode() /*: ?HTMLElement*/{ | |
| 9696 | - return this.props?.nodeRef?.current ?? _reactDom.default.findDOMNode(this); | |
| 9697 | - } | |
| 9698 | - render() /*: ReactElement<any>*/{ | |
| 9699 | - const { | |
| 9700 | - axis, | |
| 9701 | - bounds, | |
| 9702 | - children, | |
| 9703 | - defaultPosition, | |
| 9704 | - defaultClassName, | |
| 9705 | - defaultClassNameDragging, | |
| 9706 | - defaultClassNameDragged, | |
| 9707 | - position, | |
| 9708 | - positionOffset, | |
| 9709 | - scale, | |
| 9710 | - ...draggableCoreProps | |
| 9711 | - } = this.props; | |
| 9712 | - let style = {}; | |
| 9713 | - let svgTransform = null; | |
| 9565 | + var _this$props2 = this.props, | |
| 9566 | + axis = _this$props2.axis, | |
| 9567 | + bounds = _this$props2.bounds, | |
| 9568 | + children = _this$props2.children, | |
| 9569 | + defaultPosition = _this$props2.defaultPosition, | |
| 9570 | + defaultClassName = _this$props2.defaultClassName, | |
| 9571 | + defaultClassNameDragging = _this$props2.defaultClassNameDragging, | |
| 9572 | + defaultClassNameDragged = _this$props2.defaultClassNameDragged, | |
| 9573 | + position = _this$props2.position, | |
| 9574 | + positionOffset = _this$props2.positionOffset, | |
| 9575 | + scale = _this$props2.scale, | |
| 9576 | + draggableCoreProps = _objectWithoutProperties(_this$props2, _excluded); | |
| 9714 | 9577 | |
| 9715 | - // If this is controlled, we don't want to move it - unless it's dragging. | |
| 9716 | - const controlled = Boolean(position); | |
| 9717 | - const draggable = !controlled || this.state.dragging; | |
| 9718 | - const validPosition = position || defaultPosition; | |
| 9719 | - const transformOpts = { | |
| 9720 | - // Set left if horizontal drag is enabled | |
| 9721 | - x: (0, _positionFns.canDragX)(this) && draggable ? this.state.x : validPosition.x, | |
| 9722 | - // Set top if vertical drag is enabled | |
| 9723 | - y: (0, _positionFns.canDragY)(this) && draggable ? this.state.y : validPosition.y | |
| 9724 | - }; | |
| 9578 | + var style = {}; | |
| 9579 | + var svgTransform = null; // If this is controlled, we don't want to move it - unless it's dragging. | |
| 9725 | 9580 | |
| 9726 | - // If this element was SVG, we use the `transform` attribute. | |
| 9727 | - if (this.state.isElementSVG) { | |
| 9728 | - svgTransform = (0, _domFns.createSVGTransform)(transformOpts, positionOffset); | |
| 9729 | - } else { | |
| 9730 | - // Add a CSS transform to move the element around. This allows us to move the element around | |
| 9731 | - // without worrying about whether or not it is relatively or absolutely positioned. | |
| 9732 | - // If the item you are dragging already has a transform set, wrap it in a <span> so <Draggable> | |
| 9733 | - // has a clean slate. | |
| 9734 | - style = (0, _domFns.createCSSTransform)(transformOpts, positionOffset); | |
| 9581 | + var controlled = Boolean(position); | |
| 9582 | + var draggable = !controlled || this.state.dragging; | |
| 9583 | + var validPosition = position || defaultPosition; | |
| 9584 | + var transformOpts = { | |
| 9585 | + // Set left if horizontal drag is enabled | |
| 9586 | + x: (0, _positionFns.canDragX)(this) && draggable ? this.state.x : validPosition.x, | |
| 9587 | + // Set top if vertical drag is enabled | |
| 9588 | + y: (0, _positionFns.canDragY)(this) && draggable ? this.state.y : validPosition.y | |
| 9589 | + }; // If this element was SVG, we use the `transform` attribute. | |
| 9590 | + | |
| 9591 | + if (this.state.isElementSVG) { | |
| 9592 | + svgTransform = (0, _domFns.createSVGTransform)(transformOpts, positionOffset); | |
| 9593 | + } else { | |
| 9594 | + // Add a CSS transform to move the element around. This allows us to move the element around | |
| 9595 | + // without worrying about whether or not it is relatively or absolutely positioned. | |
| 9596 | + // If the item you are dragging already has a transform set, wrap it in a <span> so <Draggable> | |
| 9597 | + // has a clean slate. | |
| 9598 | + style = (0, _domFns.createCSSTransform)(transformOpts, positionOffset); | |
| 9599 | + } // Mark with class while dragging | |
| 9600 | + | |
| 9601 | + | |
| 9602 | + var className = (0, _clsx2.default)(children.props.className || '', defaultClassName, (_clsx = {}, _defineProperty(_clsx, defaultClassNameDragging, this.state.dragging), _defineProperty(_clsx, defaultClassNameDragged, this.state.dragged), _clsx)); // Reuse the child provided | |
| 9603 | + // This makes it flexible to use whatever element is wanted (div, ul, etc) | |
| 9604 | + | |
| 9605 | + return /*#__PURE__*/React.createElement(_DraggableCore.default, _extends({}, draggableCoreProps, { | |
| 9606 | + onStart: this.onDragStart, | |
| 9607 | + onDrag: this.onDrag, | |
| 9608 | + onStop: this.onDragStop | |
| 9609 | + }), /*#__PURE__*/React.cloneElement(React.Children.only(children), { | |
| 9610 | + className: className, | |
| 9611 | + style: _objectSpread(_objectSpread({}, children.props.style), style), | |
| 9612 | + transform: svgTransform | |
| 9613 | + })); | |
| 9735 | 9614 | } |
| 9615 | + }], [{ | |
| 9616 | + key: "getDerivedStateFromProps", | |
| 9617 | + value: // React 16.3+ | |
| 9618 | + // Arity (props, state) | |
| 9619 | + function getDerivedStateFromProps(_ref, _ref2) | |
| 9620 | + /*: ?$Shape<DraggableState>*/ | |
| 9621 | + { | |
| 9622 | + var position = _ref.position; | |
| 9623 | + var prevPropsPosition = _ref2.prevPropsPosition; | |
| 9736 | 9624 | |
| 9737 | - // Mark with class while dragging | |
| 9738 | - const className = (0, _clsx.clsx)(children.props.className || '', defaultClassName, { | |
| 9739 | - [defaultClassNameDragging]: this.state.dragging, | |
| 9740 | - [defaultClassNameDragged]: this.state.dragged | |
| 9741 | - }); | |
| 9625 | + // Set x/y if a new position is provided in props that is different than the previous. | |
| 9626 | + if (position && (!prevPropsPosition || position.x !== prevPropsPosition.x || position.y !== prevPropsPosition.y)) { | |
| 9627 | + (0, _log.default)('Draggable: getDerivedStateFromProps %j', { | |
| 9628 | + position: position, | |
| 9629 | + prevPropsPosition: prevPropsPosition | |
| 9630 | + }); | |
| 9631 | + return { | |
| 9632 | + x: position.x, | |
| 9633 | + y: position.y, | |
| 9634 | + prevPropsPosition: _objectSpread({}, position) | |
| 9635 | + }; | |
| 9636 | + } | |
| 9742 | 9637 | |
| 9743 | - // Reuse the child provided | |
| 9744 | - // This makes it flexible to use whatever element is wanted (div, ul, etc) | |
| 9745 | - return /*#__PURE__*/React.createElement(_DraggableCore.default, _extends({}, draggableCoreProps, { | |
| 9746 | - onStart: this.onDragStart, | |
| 9747 | - onDrag: this.onDrag, | |
| 9748 | - onStop: this.onDragStop | |
| 9749 | - }), /*#__PURE__*/React.cloneElement(React.Children.only(children), { | |
| 9750 | - className: className, | |
| 9751 | - style: { | |
| 9752 | - ...children.props.style, | |
| 9753 | - ...style | |
| 9754 | - }, | |
| 9755 | - transform: svgTransform | |
| 9756 | - })); | |
| 9757 | - } | |
| 9758 | -} | |
| 9638 | + return null; | |
| 9639 | + } | |
| 9640 | + }]); | |
| 9641 | + | |
| 9642 | + return Draggable; | |
| 9643 | +}(React.Component); | |
| 9644 | + | |
| 9759 | 9645 | exports["default"] = Draggable; |
| 9646 | + | |
| 9760 | 9647 | _defineProperty(Draggable, "displayName", 'Draggable'); |
| 9761 | -_defineProperty(Draggable, "propTypes", { | |
| 9762 | - // Accepts all props <DraggableCore> accepts. | |
| 9763 | - ..._DraggableCore.default.propTypes, | |
| 9648 | + | |
| 9649 | +_defineProperty(Draggable, "propTypes", _objectSpread(_objectSpread({}, _DraggableCore.default.propTypes), {}, { | |
| 9764 | 9650 | /** |
| 9765 | 9651 | * `axis` determines which axis the draggable can move. |
| 9766 | 9652 | * |
| 9767 | 9653 | * Note that all callbacks will still return data as normal. This only |
| @@ -9774,8 +9660,9 @@ | ||
| 9774 | 9660 | * |
| 9775 | 9661 | * Defaults to 'both'. |
| 9776 | 9662 | */ |
| 9777 | 9663 | axis: _propTypes.default.oneOf(['both', 'x', 'y', 'none']), |
| 9664 | + | |
| 9778 | 9665 | /** |
| 9779 | 9666 | * `bounds` determines the range of movement available to the element. |
| 9780 | 9667 | * Available values are: |
| 9781 | 9668 | * |
| @@ -9809,8 +9696,9 @@ | ||
| 9809 | 9696 | }), _propTypes.default.string, _propTypes.default.oneOf([false])]), |
| 9810 | 9697 | defaultClassName: _propTypes.default.string, |
| 9811 | 9698 | defaultClassNameDragging: _propTypes.default.string, |
| 9812 | 9699 | defaultClassNameDragged: _propTypes.default.string, |
| 9700 | + | |
| 9813 | 9701 | /** |
| 9814 | 9702 | * `defaultPosition` specifies the x and y that the dragged item should start at |
| 9815 | 9703 | * |
| 9816 | 9704 | * Example: |
| @@ -9834,8 +9722,9 @@ | ||
| 9834 | 9722 | positionOffset: _propTypes.default.shape({ |
| 9835 | 9723 | x: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]), |
| 9836 | 9724 | y: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]) |
| 9837 | 9725 | }), |
| 9726 | + | |
| 9838 | 9727 | /** |
| 9839 | 9728 | * `position`, if present, defines the current position of the element. |
| 9840 | 9729 | * |
| 9841 | 9730 | * This is similar to how form elements in React work - if no `position` is supplied, the component |
| @@ -9858,8 +9747,9 @@ | ||
| 9858 | 9747 | position: _propTypes.default.shape({ |
| 9859 | 9748 | x: _propTypes.default.number, |
| 9860 | 9749 | y: _propTypes.default.number |
| 9861 | 9750 | }), |
| 9751 | + | |
| 9862 | 9752 | /** |
| 9863 | 9753 | * These properties should be defined on the child, not here. |
| 9864 | 9754 | */ |
| 9865 | 9755 | className: _shims.dontSetMe, |
| @@ -9864,11 +9754,11 @@ | ||
| 9864 | 9754 | */ |
| 9865 | 9755 | className: _shims.dontSetMe, |
| 9866 | 9756 | style: _shims.dontSetMe, |
| 9867 | 9757 | transform: _shims.dontSetMe |
| 9868 | -}); | |
| 9869 | -_defineProperty(Draggable, "defaultProps", { | |
| 9870 | - ..._DraggableCore.default.defaultProps, | |
| 9758 | +})); | |
| 9759 | + | |
| 9760 | +_defineProperty(Draggable, "defaultProps", _objectSpread(_objectSpread({}, _DraggableCore.default.defaultProps), {}, { | |
| 9871 | 9761 | axis: 'both', |
| 9872 | 9762 | bounds: false, |
| 9873 | 9763 | defaultClassName: 'react-draggable', |
| 9874 | 9764 | defaultClassNameDragging: 'react-draggable-dragging', |
| @@ -9877,9 +9767,9 @@ | ||
| 9877 | 9767 | x: 0, |
| 9878 | 9768 | y: 0 |
| 9879 | 9769 | }, |
| 9880 | 9770 | scale: 1 |
| 9881 | -}); | |
| 9771 | +})); | |
| 9882 | 9772 | |
| 9883 | 9773 | /***/ }), |
| 9884 | 9774 | |
| 9885 | 9775 | /***/ "../node_modules/react-draggable/build/cjs/DraggableCore.js": |
| @@ -9890,28 +9780,71 @@ | ||
| 9890 | 9780 | |
| 9891 | 9781 | "use strict"; |
| 9892 | 9782 | |
| 9893 | 9783 | |
| 9784 | +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } | |
| 9785 | + | |
| 9894 | 9786 | Object.defineProperty(exports, "__esModule", ({ |
| 9895 | 9787 | value: true |
| 9896 | 9788 | })); |
| 9897 | 9789 | exports["default"] = void 0; |
| 9790 | + | |
| 9898 | 9791 | var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 9792 | + | |
| 9899 | 9793 | var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 9794 | + | |
| 9900 | 9795 | var _reactDom = _interopRequireDefault(__webpack_require__(/*! react-dom */ "react-dom")); |
| 9796 | + | |
| 9901 | 9797 | var _domFns = __webpack_require__(/*! ./utils/domFns */ "../node_modules/react-draggable/build/cjs/utils/domFns.js"); |
| 9798 | + | |
| 9902 | 9799 | var _positionFns = __webpack_require__(/*! ./utils/positionFns */ "../node_modules/react-draggable/build/cjs/utils/positionFns.js"); |
| 9800 | + | |
| 9903 | 9801 | var _shims = __webpack_require__(/*! ./utils/shims */ "../node_modules/react-draggable/build/cjs/utils/shims.js"); |
| 9802 | + | |
| 9904 | 9803 | var _log = _interopRequireDefault(__webpack_require__(/*! ./utils/log */ "../node_modules/react-draggable/build/cjs/utils/log.js")); |
| 9905 | -function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } | |
| 9906 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } | |
| 9907 | -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } | |
| 9908 | -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } | |
| 9909 | -function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } | |
| 9910 | -/*:: import type {EventHandler, MouseTouchEvent} from './utils/types';*/ | |
| 9911 | -/*:: import type {Element as ReactElement} from 'react';*/ | |
| 9804 | + | |
| 9805 | +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
| 9806 | + | |
| 9807 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 9808 | + | |
| 9809 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 9810 | + | |
| 9811 | +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } | |
| 9812 | + | |
| 9813 | +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."); } | |
| 9814 | + | |
| 9815 | +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); } | |
| 9816 | + | |
| 9817 | +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; } | |
| 9818 | + | |
| 9819 | +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; } | |
| 9820 | + | |
| 9821 | +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } | |
| 9822 | + | |
| 9823 | +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
| 9824 | + | |
| 9825 | +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | |
| 9826 | + | |
| 9827 | +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } | |
| 9828 | + | |
| 9829 | +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } | |
| 9830 | + | |
| 9831 | +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | |
| 9832 | + | |
| 9833 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | |
| 9834 | + | |
| 9835 | +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } | |
| 9836 | + | |
| 9837 | +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | |
| 9838 | + | |
| 9839 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 9840 | + | |
| 9841 | +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | |
| 9842 | + | |
| 9843 | +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; } | |
| 9844 | + | |
| 9912 | 9845 | // Simple abstraction for dragging events names. |
| 9913 | -const eventsFor = { | |
| 9846 | +var eventsFor = { | |
| 9914 | 9847 | touch: { |
| 9915 | 9848 | start: 'touchstart', |
| 9916 | 9849 | move: 'touchmove', |
| 9917 | 9850 | stop: 'touchend' |
| @@ -9920,12 +9853,18 @@ | ||
| 9920 | 9853 | start: 'mousedown', |
| 9921 | 9854 | move: 'mousemove', |
| 9922 | 9855 | stop: 'mouseup' |
| 9923 | 9856 | } |
| 9924 | -}; | |
| 9857 | +}; // Default to mouse events. | |
| 9925 | 9858 | |
| 9926 | -// Default to mouse events. | |
| 9927 | -let dragEventFor = eventsFor.mouse; | |
| 9859 | +var dragEventFor = eventsFor.mouse; | |
| 9860 | +/*:: type DraggableCoreState = { | |
| 9861 | + dragging: boolean, | |
| 9862 | + lastX: number, | |
| 9863 | + lastY: number, | |
| 9864 | + touchIdentifier: ?number | |
| 9865 | +};*/ | |
| 9866 | + | |
| 9928 | 9867 | /*:: export type DraggableData = { |
| 9929 | 9868 | node: HTMLElement, |
| 9930 | 9869 | x: number, y: number, |
| 9931 | 9870 | deltaX: number, deltaY: number, |
| @@ -9930,14 +9869,17 @@ | ||
| 9930 | 9869 | x: number, y: number, |
| 9931 | 9870 | deltaX: number, deltaY: number, |
| 9932 | 9871 | lastX: number, lastY: number, |
| 9933 | 9872 | };*/ |
| 9873 | + | |
| 9934 | 9874 | /*:: export type DraggableEventHandler = (e: MouseEvent, data: DraggableData) => void | false;*/ |
| 9875 | + | |
| 9935 | 9876 | /*:: export type ControlPosition = {x: number, y: number};*/ |
| 9877 | + | |
| 9936 | 9878 | /*:: export type PositionOffsetControlPosition = {x: number|string, y: number|string};*/ |
| 9879 | + | |
| 9937 | 9880 | /*:: export type DraggableCoreDefaultProps = { |
| 9938 | 9881 | allowAnyClick: boolean, |
| 9939 | - allowMobileScroll: boolean, | |
| 9940 | 9882 | disabled: boolean, |
| 9941 | 9883 | enableUserSelectHack: boolean, |
| 9942 | 9884 | onStart: DraggableEventHandler, |
| 9943 | 9885 | onDrag: DraggableEventHandler, |
| @@ -9944,8 +9886,9 @@ | ||
| 9944 | 9886 | onStop: DraggableEventHandler, |
| 9945 | 9887 | onMouseDown: (e: MouseEvent) => void, |
| 9946 | 9888 | scale: number, |
| 9947 | 9889 | };*/ |
| 9890 | + | |
| 9948 | 9891 | /*:: export type DraggableCoreProps = { |
| 9949 | 9892 | ...DraggableCoreDefaultProps, |
| 9950 | 9893 | cancel: string, |
| 9951 | 9894 | children: ReactElement<any>, |
| @@ -9953,8 +9896,9 @@ | ||
| 9953 | 9896 | grid: [number, number], |
| 9954 | 9897 | handle: string, |
| 9955 | 9898 | nodeRef?: ?React.ElementRef<any>, |
| 9956 | 9899 | };*/ |
| 9900 | + | |
| 9957 | 9901 | // |
| 9958 | 9902 | // Define <DraggableCore>. |
| 9959 | 9903 | // |
| 9960 | 9904 | // <DraggableCore> is for advanced usage of <Draggable>. It maintains minimal internal state so it can |
| @@ -9959,235 +9903,300 @@ | ||
| 9959 | 9903 | // |
| 9960 | 9904 | // <DraggableCore> is for advanced usage of <Draggable>. It maintains minimal internal state so it can |
| 9961 | 9905 | // work well with libraries that require more control over the element. |
| 9962 | 9906 | // |
| 9907 | +var DraggableCore = /*#__PURE__*/function (_React$Component) { | |
| 9908 | + _inherits(DraggableCore, _React$Component); | |
| 9963 | 9909 | |
| 9964 | -class DraggableCore extends React.Component /*:: <DraggableCoreProps>*/{ | |
| 9965 | - constructor() { | |
| 9966 | - super(...arguments); | |
| 9967 | - _defineProperty(this, "dragging", false); | |
| 9968 | - // Used while dragging to determine deltas. | |
| 9969 | - _defineProperty(this, "lastX", NaN); | |
| 9970 | - _defineProperty(this, "lastY", NaN); | |
| 9971 | - _defineProperty(this, "touchIdentifier", null); | |
| 9972 | - _defineProperty(this, "mounted", false); | |
| 9973 | - _defineProperty(this, "handleDragStart", e => { | |
| 9910 | + var _super = _createSuper(DraggableCore); | |
| 9911 | + | |
| 9912 | + function DraggableCore() { | |
| 9913 | + var _this; | |
| 9914 | + | |
| 9915 | + _classCallCheck(this, DraggableCore); | |
| 9916 | + | |
| 9917 | + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | |
| 9918 | + args[_key] = arguments[_key]; | |
| 9919 | + } | |
| 9920 | + | |
| 9921 | + _this = _super.call.apply(_super, [this].concat(args)); | |
| 9922 | + | |
| 9923 | + _defineProperty(_assertThisInitialized(_this), "state", { | |
| 9924 | + dragging: false, | |
| 9925 | + // Used while dragging to determine deltas. | |
| 9926 | + lastX: NaN, | |
| 9927 | + lastY: NaN, | |
| 9928 | + touchIdentifier: null | |
| 9929 | + }); | |
| 9930 | + | |
| 9931 | + _defineProperty(_assertThisInitialized(_this), "mounted", false); | |
| 9932 | + | |
| 9933 | + _defineProperty(_assertThisInitialized(_this), "handleDragStart", function (e) { | |
| 9974 | 9934 | // Make it possible to attach event handlers on top of this one. |
| 9975 | - this.props.onMouseDown(e); | |
| 9935 | + _this.props.onMouseDown(e); // Only accept left-clicks. | |
| 9976 | 9936 | |
| 9977 | - // Only accept left-clicks. | |
| 9978 | - if (!this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false; | |
| 9979 | 9937 | |
| 9980 | - // Get nodes. Be sure to grab relative document (could be iframed) | |
| 9981 | - const thisNode = this.findDOMNode(); | |
| 9938 | + if (!_this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false; // Get nodes. Be sure to grab relative document (could be iframed) | |
| 9939 | + | |
| 9940 | + var thisNode = _this.findDOMNode(); | |
| 9941 | + | |
| 9982 | 9942 | if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) { |
| 9983 | 9943 | throw new Error('<DraggableCore> not mounted on DragStart!'); |
| 9984 | 9944 | } |
| 9985 | - const { | |
| 9986 | - ownerDocument | |
| 9987 | - } = thisNode; | |
| 9988 | 9945 | |
| 9989 | - // Short circuit if handle or cancel prop was provided and selector doesn't match. | |
| 9990 | - if (this.props.disabled || !(e.target instanceof ownerDocument.defaultView.Node) || this.props.handle && !(0, _domFns.matchesSelectorAndParentsTo)(e.target, this.props.handle, thisNode) || this.props.cancel && (0, _domFns.matchesSelectorAndParentsTo)(e.target, this.props.cancel, thisNode)) { | |
| 9946 | + var ownerDocument = thisNode.ownerDocument; // Short circuit if handle or cancel prop was provided and selector doesn't match. | |
| 9947 | + | |
| 9948 | + if (_this.props.disabled || !(e.target instanceof ownerDocument.defaultView.Node) || _this.props.handle && !(0, _domFns.matchesSelectorAndParentsTo)(e.target, _this.props.handle, thisNode) || _this.props.cancel && (0, _domFns.matchesSelectorAndParentsTo)(e.target, _this.props.cancel, thisNode)) { | |
| 9991 | 9949 | return; |
| 9992 | - } | |
| 9950 | + } // Prevent scrolling on mobile devices, like ipad/iphone. | |
| 9951 | + // Important that this is after handle/cancel. | |
| 9993 | 9952 | |
| 9994 | - // Prevent scrolling on mobile devices, like ipad/iphone. | |
| 9995 | - // Important that this is after handle/cancel. | |
| 9996 | - if (e.type === 'touchstart' && !this.props.allowMobileScroll) e.preventDefault(); | |
| 9997 | 9953 | |
| 9998 | - // Set touch identifier in component state if this is a touch event. This allows us to | |
| 9954 | + if (e.type === 'touchstart') e.preventDefault(); // Set touch identifier in component state if this is a touch event. This allows us to | |
| 9999 | 9955 | // distinguish between individual touches on multitouch screens by identifying which |
| 10000 | 9956 | // touchpoint was set to this element. |
| 10001 | - const touchIdentifier = (0, _domFns.getTouchIdentifier)(e); | |
| 10002 | - this.touchIdentifier = touchIdentifier; | |
| 10003 | 9957 | |
| 10004 | - // Get the current drag point from the event. This is used as the offset. | |
| 10005 | - const position = (0, _positionFns.getControlPosition)(e, touchIdentifier, this); | |
| 9958 | + var touchIdentifier = (0, _domFns.getTouchIdentifier)(e); | |
| 9959 | + | |
| 9960 | + _this.setState({ | |
| 9961 | + touchIdentifier: touchIdentifier | |
| 9962 | + }); // Get the current drag point from the event. This is used as the offset. | |
| 9963 | + | |
| 9964 | + | |
| 9965 | + var position = (0, _positionFns.getControlPosition)(e, touchIdentifier, _assertThisInitialized(_this)); | |
| 10006 | 9966 | if (position == null) return; // not possible but satisfies flow |
| 10007 | - const { | |
| 10008 | - x, | |
| 10009 | - y | |
| 10010 | - } = position; | |
| 10011 | 9967 | |
| 10012 | - // Create an event object with all the data parents need to make a decision here. | |
| 10013 | - const coreEvent = (0, _positionFns.createCoreData)(this, x, y); | |
| 10014 | - (0, _log.default)('DraggableCore: handleDragStart: %j', coreEvent); | |
| 9968 | + var x = position.x, | |
| 9969 | + y = position.y; // Create an event object with all the data parents need to make a decision here. | |
| 10015 | 9970 | |
| 10016 | - // Call event handler. If it returns explicit false, cancel. | |
| 10017 | - (0, _log.default)('calling', this.props.onStart); | |
| 10018 | - const shouldUpdate = this.props.onStart(e, coreEvent); | |
| 10019 | - if (shouldUpdate === false || this.mounted === false) return; | |
| 9971 | + var coreEvent = (0, _positionFns.createCoreData)(_assertThisInitialized(_this), x, y); | |
| 9972 | + (0, _log.default)('DraggableCore: handleDragStart: %j', coreEvent); // Call event handler. If it returns explicit false, cancel. | |
| 10020 | 9973 | |
| 10021 | - // Add a style to the body to disable user-select. This prevents text from | |
| 9974 | + (0, _log.default)('calling', _this.props.onStart); | |
| 9975 | + | |
| 9976 | + var shouldUpdate = _this.props.onStart(e, coreEvent); | |
| 9977 | + | |
| 9978 | + if (shouldUpdate === false || _this.mounted === false) return; // Add a style to the body to disable user-select. This prevents text from | |
| 10022 | 9979 | // being selected all over the page. |
| 10023 | - if (this.props.enableUserSelectHack) (0, _domFns.addUserSelectStyles)(ownerDocument); | |
| 10024 | 9980 | |
| 10025 | - // Initiate dragging. Set the current x and y as offsets | |
| 9981 | + if (_this.props.enableUserSelectHack) (0, _domFns.addUserSelectStyles)(ownerDocument); // Initiate dragging. Set the current x and y as offsets | |
| 10026 | 9982 | // so we know how much we've moved during the drag. This allows us |
| 10027 | 9983 | // to drag elements around even if they have been moved, without issue. |
| 10028 | - this.dragging = true; | |
| 10029 | - this.lastX = x; | |
| 10030 | - this.lastY = y; | |
| 10031 | 9984 | |
| 10032 | - // Add events to the document directly so we catch when the user's mouse/touch moves outside of | |
| 9985 | + _this.setState({ | |
| 9986 | + dragging: true, | |
| 9987 | + lastX: x, | |
| 9988 | + lastY: y | |
| 9989 | + }); // Add events to the document directly so we catch when the user's mouse/touch moves outside of | |
| 10033 | 9990 | // this element. We use different events depending on whether or not we have detected that this |
| 10034 | 9991 | // is a touch-capable device. |
| 10035 | - (0, _domFns.addEvent)(ownerDocument, dragEventFor.move, this.handleDrag); | |
| 10036 | - (0, _domFns.addEvent)(ownerDocument, dragEventFor.stop, this.handleDragStop); | |
| 9992 | + | |
| 9993 | + | |
| 9994 | + (0, _domFns.addEvent)(ownerDocument, dragEventFor.move, _this.handleDrag); | |
| 9995 | + (0, _domFns.addEvent)(ownerDocument, dragEventFor.stop, _this.handleDragStop); | |
| 10037 | 9996 | }); |
| 10038 | - _defineProperty(this, "handleDrag", e => { | |
| 9997 | + | |
| 9998 | + _defineProperty(_assertThisInitialized(_this), "handleDrag", function (e) { | |
| 10039 | 9999 | // Get the current drag point from the event. This is used as the offset. |
| 10040 | - const position = (0, _positionFns.getControlPosition)(e, this.touchIdentifier, this); | |
| 10000 | + var position = (0, _positionFns.getControlPosition)(e, _this.state.touchIdentifier, _assertThisInitialized(_this)); | |
| 10041 | 10001 | if (position == null) return; |
| 10042 | - let { | |
| 10043 | - x, | |
| 10044 | - y | |
| 10045 | - } = position; | |
| 10002 | + var x = position.x, | |
| 10003 | + y = position.y; // Snap to grid if prop has been provided | |
| 10046 | 10004 | |
| 10047 | - // Snap to grid if prop has been provided | |
| 10048 | - if (Array.isArray(this.props.grid)) { | |
| 10049 | - let deltaX = x - this.lastX, | |
| 10050 | - deltaY = y - this.lastY; | |
| 10051 | - [deltaX, deltaY] = (0, _positionFns.snapToGrid)(this.props.grid, deltaX, deltaY); | |
| 10005 | + if (Array.isArray(_this.props.grid)) { | |
| 10006 | + var deltaX = x - _this.state.lastX, | |
| 10007 | + deltaY = y - _this.state.lastY; | |
| 10008 | + | |
| 10009 | + var _snapToGrid = (0, _positionFns.snapToGrid)(_this.props.grid, deltaX, deltaY); | |
| 10010 | + | |
| 10011 | + var _snapToGrid2 = _slicedToArray(_snapToGrid, 2); | |
| 10012 | + | |
| 10013 | + deltaX = _snapToGrid2[0]; | |
| 10014 | + deltaY = _snapToGrid2[1]; | |
| 10052 | 10015 | if (!deltaX && !deltaY) return; // skip useless drag |
| 10053 | - x = this.lastX + deltaX, y = this.lastY + deltaY; | |
| 10016 | + | |
| 10017 | + x = _this.state.lastX + deltaX, y = _this.state.lastY + deltaY; | |
| 10054 | 10018 | } |
| 10055 | - const coreEvent = (0, _positionFns.createCoreData)(this, x, y); | |
| 10056 | - (0, _log.default)('DraggableCore: handleDrag: %j', coreEvent); | |
| 10057 | 10019 | |
| 10058 | - // Call event handler. If it returns explicit false, trigger end. | |
| 10059 | - const shouldUpdate = this.props.onDrag(e, coreEvent); | |
| 10060 | - if (shouldUpdate === false || this.mounted === false) { | |
| 10020 | + var coreEvent = (0, _positionFns.createCoreData)(_assertThisInitialized(_this), x, y); | |
| 10021 | + (0, _log.default)('DraggableCore: handleDrag: %j', coreEvent); // Call event handler. If it returns explicit false, trigger end. | |
| 10022 | + | |
| 10023 | + var shouldUpdate = _this.props.onDrag(e, coreEvent); | |
| 10024 | + | |
| 10025 | + if (shouldUpdate === false || _this.mounted === false) { | |
| 10061 | 10026 | try { |
| 10062 | 10027 | // $FlowIgnore |
| 10063 | - this.handleDragStop(new MouseEvent('mouseup')); | |
| 10028 | + _this.handleDragStop(new MouseEvent('mouseup')); | |
| 10064 | 10029 | } catch (err) { |
| 10065 | 10030 | // Old browsers |
| 10066 | - const event = ((document.createEvent('MouseEvents') /*: any*/) /*: MouseTouchEvent*/); | |
| 10067 | - // I see why this insanity was deprecated | |
| 10031 | + var event = ((document.createEvent('MouseEvents') | |
| 10032 | + /*: any*/ | |
| 10033 | + ) | |
| 10034 | + /*: MouseTouchEvent*/ | |
| 10035 | + ); // I see why this insanity was deprecated | |
| 10068 | 10036 | // $FlowIgnore |
| 10037 | + | |
| 10069 | 10038 | event.initMouseEvent('mouseup', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); |
| 10070 | - this.handleDragStop(event); | |
| 10039 | + | |
| 10040 | + _this.handleDragStop(event); | |
| 10071 | 10041 | } |
| 10042 | + | |
| 10072 | 10043 | return; |
| 10073 | 10044 | } |
| 10074 | - this.lastX = x; | |
| 10075 | - this.lastY = y; | |
| 10045 | + | |
| 10046 | + _this.setState({ | |
| 10047 | + lastX: x, | |
| 10048 | + lastY: y | |
| 10049 | + }); | |
| 10076 | 10050 | }); |
| 10077 | - _defineProperty(this, "handleDragStop", e => { | |
| 10078 | - if (!this.dragging) return; | |
| 10079 | - const position = (0, _positionFns.getControlPosition)(e, this.touchIdentifier, this); | |
| 10051 | + | |
| 10052 | + _defineProperty(_assertThisInitialized(_this), "handleDragStop", function (e) { | |
| 10053 | + if (!_this.state.dragging) return; | |
| 10054 | + var position = (0, _positionFns.getControlPosition)(e, _this.state.touchIdentifier, _assertThisInitialized(_this)); | |
| 10080 | 10055 | if (position == null) return; |
| 10081 | - let { | |
| 10082 | - x, | |
| 10083 | - y | |
| 10084 | - } = position; | |
| 10056 | + var x = position.x, | |
| 10057 | + y = position.y; // Snap to grid if prop has been provided | |
| 10085 | 10058 | |
| 10086 | - // Snap to grid if prop has been provided | |
| 10087 | - if (Array.isArray(this.props.grid)) { | |
| 10088 | - let deltaX = x - this.lastX || 0; | |
| 10089 | - let deltaY = y - this.lastY || 0; | |
| 10090 | - [deltaX, deltaY] = (0, _positionFns.snapToGrid)(this.props.grid, deltaX, deltaY); | |
| 10091 | - x = this.lastX + deltaX, y = this.lastY + deltaY; | |
| 10059 | + if (Array.isArray(_this.props.grid)) { | |
| 10060 | + var deltaX = x - _this.state.lastX || 0; | |
| 10061 | + var deltaY = y - _this.state.lastY || 0; | |
| 10062 | + | |
| 10063 | + var _snapToGrid3 = (0, _positionFns.snapToGrid)(_this.props.grid, deltaX, deltaY); | |
| 10064 | + | |
| 10065 | + var _snapToGrid4 = _slicedToArray(_snapToGrid3, 2); | |
| 10066 | + | |
| 10067 | + deltaX = _snapToGrid4[0]; | |
| 10068 | + deltaY = _snapToGrid4[1]; | |
| 10069 | + x = _this.state.lastX + deltaX, y = _this.state.lastY + deltaY; | |
| 10092 | 10070 | } |
| 10093 | - const coreEvent = (0, _positionFns.createCoreData)(this, x, y); | |
| 10094 | 10071 | |
| 10095 | - // Call event handler | |
| 10096 | - const shouldContinue = this.props.onStop(e, coreEvent); | |
| 10097 | - if (shouldContinue === false || this.mounted === false) return false; | |
| 10098 | - const thisNode = this.findDOMNode(); | |
| 10072 | + var coreEvent = (0, _positionFns.createCoreData)(_assertThisInitialized(_this), x, y); // Call event handler | |
| 10073 | + | |
| 10074 | + var shouldContinue = _this.props.onStop(e, coreEvent); | |
| 10075 | + | |
| 10076 | + if (shouldContinue === false || _this.mounted === false) return false; | |
| 10077 | + | |
| 10078 | + var thisNode = _this.findDOMNode(); | |
| 10079 | + | |
| 10099 | 10080 | if (thisNode) { |
| 10100 | 10081 | // Remove user-select hack |
| 10101 | - if (this.props.enableUserSelectHack) (0, _domFns.scheduleRemoveUserSelectStyles)(thisNode.ownerDocument); | |
| 10082 | + if (_this.props.enableUserSelectHack) (0, _domFns.removeUserSelectStyles)(thisNode.ownerDocument); | |
| 10102 | 10083 | } |
| 10103 | - (0, _log.default)('DraggableCore: handleDragStop: %j', coreEvent); | |
| 10104 | 10084 | |
| 10105 | - // Reset the el. | |
| 10106 | - this.dragging = false; | |
| 10107 | - this.lastX = NaN; | |
| 10108 | - this.lastY = NaN; | |
| 10085 | + (0, _log.default)('DraggableCore: handleDragStop: %j', coreEvent); // Reset the el. | |
| 10086 | + | |
| 10087 | + _this.setState({ | |
| 10088 | + dragging: false, | |
| 10089 | + lastX: NaN, | |
| 10090 | + lastY: NaN | |
| 10091 | + }); | |
| 10092 | + | |
| 10109 | 10093 | if (thisNode) { |
| 10110 | 10094 | // Remove event handlers |
| 10111 | 10095 | (0, _log.default)('DraggableCore: Removing handlers'); |
| 10112 | - (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.move, this.handleDrag); | |
| 10113 | - (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.stop, this.handleDragStop); | |
| 10096 | + (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.move, _this.handleDrag); | |
| 10097 | + (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.stop, _this.handleDragStop); | |
| 10114 | 10098 | } |
| 10115 | 10099 | }); |
| 10116 | - _defineProperty(this, "onMouseDown", e => { | |
| 10100 | + | |
| 10101 | + _defineProperty(_assertThisInitialized(_this), "onMouseDown", function (e) { | |
| 10117 | 10102 | dragEventFor = eventsFor.mouse; // on touchscreen laptops we could switch back to mouse |
| 10118 | 10103 | |
| 10119 | - return this.handleDragStart(e); | |
| 10104 | + return _this.handleDragStart(e); | |
| 10120 | 10105 | }); |
| 10121 | - _defineProperty(this, "onMouseUp", e => { | |
| 10106 | + | |
| 10107 | + _defineProperty(_assertThisInitialized(_this), "onMouseUp", function (e) { | |
| 10122 | 10108 | dragEventFor = eventsFor.mouse; |
| 10123 | - return this.handleDragStop(e); | |
| 10109 | + return _this.handleDragStop(e); | |
| 10124 | 10110 | }); |
| 10125 | - // Same as onMouseDown (start drag), but now consider this a touch device. | |
| 10126 | - _defineProperty(this, "onTouchStart", e => { | |
| 10111 | + | |
| 10112 | + _defineProperty(_assertThisInitialized(_this), "onTouchStart", function (e) { | |
| 10127 | 10113 | // We're on a touch device now, so change the event handlers |
| 10128 | 10114 | dragEventFor = eventsFor.touch; |
| 10129 | - return this.handleDragStart(e); | |
| 10115 | + return _this.handleDragStart(e); | |
| 10130 | 10116 | }); |
| 10131 | - _defineProperty(this, "onTouchEnd", e => { | |
| 10117 | + | |
| 10118 | + _defineProperty(_assertThisInitialized(_this), "onTouchEnd", function (e) { | |
| 10132 | 10119 | // We're on a touch device now, so change the event handlers |
| 10133 | 10120 | dragEventFor = eventsFor.touch; |
| 10134 | - return this.handleDragStop(e); | |
| 10121 | + return _this.handleDragStop(e); | |
| 10135 | 10122 | }); |
| 10123 | + | |
| 10124 | + return _this; | |
| 10136 | 10125 | } |
| 10137 | - componentDidMount() { | |
| 10138 | - this.mounted = true; | |
| 10139 | - // Touch handlers must be added with {passive: false} to be cancelable. | |
| 10140 | - // https://developers.google.com/web/updates/2017/01/scrolling-intervention | |
| 10141 | - const thisNode = this.findDOMNode(); | |
| 10142 | - if (thisNode) { | |
| 10143 | - (0, _domFns.addEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, { | |
| 10144 | - passive: false | |
| 10145 | - }); | |
| 10126 | + | |
| 10127 | + _createClass(DraggableCore, [{ | |
| 10128 | + key: "componentDidMount", | |
| 10129 | + value: function componentDidMount() { | |
| 10130 | + this.mounted = true; // Touch handlers must be added with {passive: false} to be cancelable. | |
| 10131 | + // https://developers.google.com/web/updates/2017/01/scrolling-intervention | |
| 10132 | + | |
| 10133 | + var thisNode = this.findDOMNode(); | |
| 10134 | + | |
| 10135 | + if (thisNode) { | |
| 10136 | + (0, _domFns.addEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, { | |
| 10137 | + passive: false | |
| 10138 | + }); | |
| 10139 | + } | |
| 10146 | 10140 | } |
| 10147 | - } | |
| 10148 | - componentWillUnmount() { | |
| 10149 | - this.mounted = false; | |
| 10150 | - // Remove any leftover event handlers. Remove both touch and mouse handlers in case | |
| 10151 | - // some browser quirk caused a touch event to fire during a mouse move, or vice versa. | |
| 10152 | - const thisNode = this.findDOMNode(); | |
| 10153 | - if (thisNode) { | |
| 10154 | - const { | |
| 10155 | - ownerDocument | |
| 10156 | - } = thisNode; | |
| 10157 | - (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.move, this.handleDrag); | |
| 10158 | - (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.move, this.handleDrag); | |
| 10159 | - (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.stop, this.handleDragStop); | |
| 10160 | - (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.stop, this.handleDragStop); | |
| 10161 | - (0, _domFns.removeEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, { | |
| 10162 | - passive: false | |
| 10141 | + }, { | |
| 10142 | + key: "componentWillUnmount", | |
| 10143 | + value: function componentWillUnmount() { | |
| 10144 | + this.mounted = false; // Remove any leftover event handlers. Remove both touch and mouse handlers in case | |
| 10145 | + // some browser quirk caused a touch event to fire during a mouse move, or vice versa. | |
| 10146 | + | |
| 10147 | + var thisNode = this.findDOMNode(); | |
| 10148 | + | |
| 10149 | + if (thisNode) { | |
| 10150 | + var ownerDocument = thisNode.ownerDocument; | |
| 10151 | + (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.move, this.handleDrag); | |
| 10152 | + (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.move, this.handleDrag); | |
| 10153 | + (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.stop, this.handleDragStop); | |
| 10154 | + (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.stop, this.handleDragStop); | |
| 10155 | + (0, _domFns.removeEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, { | |
| 10156 | + passive: false | |
| 10157 | + }); | |
| 10158 | + if (this.props.enableUserSelectHack) (0, _domFns.removeUserSelectStyles)(ownerDocument); | |
| 10159 | + } | |
| 10160 | + } // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find | |
| 10161 | + // the underlying DOM node ourselves. See the README for more information. | |
| 10162 | + | |
| 10163 | + }, { | |
| 10164 | + key: "findDOMNode", | |
| 10165 | + value: function findDOMNode() | |
| 10166 | + /*: ?HTMLElement*/ | |
| 10167 | + { | |
| 10168 | + var _this$props, _this$props2, _this$props2$nodeRef; | |
| 10169 | + | |
| 10170 | + return (_this$props = this.props) !== null && _this$props !== void 0 && _this$props.nodeRef ? (_this$props2 = this.props) === null || _this$props2 === void 0 ? void 0 : (_this$props2$nodeRef = _this$props2.nodeRef) === null || _this$props2$nodeRef === void 0 ? void 0 : _this$props2$nodeRef.current : _reactDom.default.findDOMNode(this); | |
| 10171 | + } | |
| 10172 | + }, { | |
| 10173 | + key: "render", | |
| 10174 | + value: function render() | |
| 10175 | + /*: React.Element<any>*/ | |
| 10176 | + { | |
| 10177 | + // Reuse the child provided | |
| 10178 | + // This makes it flexible to use whatever element is wanted (div, ul, etc) | |
| 10179 | + return /*#__PURE__*/React.cloneElement(React.Children.only(this.props.children), { | |
| 10180 | + // Note: mouseMove handler is attached to document so it will still function | |
| 10181 | + // when the user drags quickly and leaves the bounds of the element. | |
| 10182 | + onMouseDown: this.onMouseDown, | |
| 10183 | + onMouseUp: this.onMouseUp, | |
| 10184 | + // onTouchStart is added on `componentDidMount` so they can be added with | |
| 10185 | + // {passive: false}, which allows it to cancel. See | |
| 10186 | + // https://developers.google.com/web/updates/2017/01/scrolling-intervention | |
| 10187 | + onTouchEnd: this.onTouchEnd | |
| 10163 | 10188 | }); |
| 10164 | - if (this.props.enableUserSelectHack) (0, _domFns.scheduleRemoveUserSelectStyles)(ownerDocument); | |
| 10165 | 10189 | } |
| 10166 | - } | |
| 10190 | + }]); | |
| 10167 | 10191 | |
| 10168 | - // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find | |
| 10169 | - // the underlying DOM node ourselves. See the README for more information. | |
| 10170 | - findDOMNode() /*: ?HTMLElement*/{ | |
| 10171 | - return this.props?.nodeRef ? this.props?.nodeRef?.current : _reactDom.default.findDOMNode(this); | |
| 10172 | - } | |
| 10173 | - render() /*: React.Element<any>*/{ | |
| 10174 | - // Reuse the child provided | |
| 10175 | - // This makes it flexible to use whatever element is wanted (div, ul, etc) | |
| 10176 | - return /*#__PURE__*/React.cloneElement(React.Children.only(this.props.children), { | |
| 10177 | - // Note: mouseMove handler is attached to document so it will still function | |
| 10178 | - // when the user drags quickly and leaves the bounds of the element. | |
| 10179 | - onMouseDown: this.onMouseDown, | |
| 10180 | - onMouseUp: this.onMouseUp, | |
| 10181 | - // onTouchStart is added on `componentDidMount` so they can be added with | |
| 10182 | - // {passive: false}, which allows it to cancel. See | |
| 10183 | - // https://developers.google.com/web/updates/2017/01/scrolling-intervention | |
| 10184 | - onTouchEnd: this.onTouchEnd | |
| 10185 | - }); | |
| 10186 | - } | |
| 10187 | -} | |
| 10192 | + return DraggableCore; | |
| 10193 | +}(React.Component); | |
| 10194 | + | |
| 10188 | 10195 | exports["default"] = DraggableCore; |
| 10196 | + | |
| 10189 | 10197 | _defineProperty(DraggableCore, "displayName", 'DraggableCore'); |
| 10198 | + | |
| 10190 | 10199 | _defineProperty(DraggableCore, "propTypes", { |
| 10191 | 10200 | /** |
| 10192 | 10201 | * `allowAnyClick` allows dragging using any mouse button. |
| 10193 | 10202 | * By default, we only accept the left button. |
| @@ -10194,22 +10203,15 @@ | ||
| 10194 | 10203 | * |
| 10195 | 10204 | * Defaults to `false`. |
| 10196 | 10205 | */ |
| 10197 | 10206 | allowAnyClick: _propTypes.default.bool, |
| 10207 | + | |
| 10198 | 10208 | /** |
| 10199 | - * `allowMobileScroll` turns off cancellation of the 'touchstart' event | |
| 10200 | - * on mobile devices. Only enable this if you are having trouble with click | |
| 10201 | - * events. Prefer using 'handle' / 'cancel' instead. | |
| 10202 | - * | |
| 10203 | - * Defaults to `false`. | |
| 10204 | - */ | |
| 10205 | - allowMobileScroll: _propTypes.default.bool, | |
| 10206 | - children: _propTypes.default.node.isRequired, | |
| 10207 | - /** | |
| 10208 | 10209 | * `disabled`, if true, stops the <Draggable> from dragging. All handlers, |
| 10209 | 10210 | * with the exception of `onMouseDown`, will not fire. |
| 10210 | 10211 | */ |
| 10211 | 10212 | disabled: _propTypes.default.bool, |
| 10213 | + | |
| 10212 | 10214 | /** |
| 10213 | 10215 | * By default, we add 'user-select:none' attributes to the document body |
| 10214 | 10216 | * to prevent ugly text selection during drag. If this is causing problems |
| 10215 | 10217 | * for your app, set this to `false`. |
| @@ -10214,21 +10216,28 @@ | ||
| 10214 | 10216 | * to prevent ugly text selection during drag. If this is causing problems |
| 10215 | 10217 | * for your app, set this to `false`. |
| 10216 | 10218 | */ |
| 10217 | 10219 | enableUserSelectHack: _propTypes.default.bool, |
| 10220 | + | |
| 10218 | 10221 | /** |
| 10219 | 10222 | * `offsetParent`, if set, uses the passed DOM node to compute drag offsets |
| 10220 | 10223 | * instead of using the parent node. |
| 10221 | 10224 | */ |
| 10222 | - offsetParent: function (props /*: DraggableCoreProps*/, propName /*: $Keys<DraggableCoreProps>*/) { | |
| 10225 | + offsetParent: function offsetParent(props | |
| 10226 | + /*: DraggableCoreProps*/ | |
| 10227 | + , propName | |
| 10228 | + /*: $Keys<DraggableCoreProps>*/ | |
| 10229 | + ) { | |
| 10223 | 10230 | if (props[propName] && props[propName].nodeType !== 1) { |
| 10224 | 10231 | throw new Error('Draggable\'s offsetParent must be a DOM Node.'); |
| 10225 | 10232 | } |
| 10226 | 10233 | }, |
| 10234 | + | |
| 10227 | 10235 | /** |
| 10228 | 10236 | * `grid` specifies the x and y that dragging should snap to. |
| 10229 | 10237 | */ |
| 10230 | 10238 | grid: _propTypes.default.arrayOf(_propTypes.default.number), |
| 10239 | + | |
| 10231 | 10240 | /** |
| 10232 | 10241 | * `handle` specifies a selector to be used as the handle that initiates drag. |
| 10233 | 10242 | * |
| 10234 | 10243 | * Example: |
| @@ -10248,8 +10257,9 @@ | ||
| 10248 | 10257 | * }); |
| 10249 | 10258 | * ``` |
| 10250 | 10259 | */ |
| 10251 | 10260 | handle: _propTypes.default.string, |
| 10261 | + | |
| 10252 | 10262 | /** |
| 10253 | 10263 | * `cancel` specifies a selector to be used to prevent drag initialization. |
| 10254 | 10264 | * |
| 10255 | 10265 | * Example: |
| @@ -10269,8 +10279,9 @@ | ||
| 10269 | 10279 | * }); |
| 10270 | 10280 | * ``` |
| 10271 | 10281 | */ |
| 10272 | 10282 | cancel: _propTypes.default.string, |
| 10283 | + | |
| 10273 | 10284 | /* If running in React Strict mode, ReactDOM.findDOMNode() is deprecated. |
| 10274 | 10285 | * Unfortunately, in order for <Draggable> to work properly, we need raw access |
| 10275 | 10286 | * to the underlying DOM node. If you want to avoid the warning, pass a `nodeRef` |
| 10276 | 10287 | * as in this example: |
| @@ -10287,32 +10298,38 @@ | ||
| 10287 | 10298 | * This can be used for arbitrarily nested components, so long as the ref ends up |
| 10288 | 10299 | * pointing to the actual child DOM node and not a custom component. |
| 10289 | 10300 | */ |
| 10290 | 10301 | nodeRef: _propTypes.default.object, |
| 10302 | + | |
| 10291 | 10303 | /** |
| 10292 | 10304 | * Called when dragging starts. |
| 10293 | 10305 | * If this function returns the boolean false, dragging will be canceled. |
| 10294 | 10306 | */ |
| 10295 | 10307 | onStart: _propTypes.default.func, |
| 10308 | + | |
| 10296 | 10309 | /** |
| 10297 | 10310 | * Called while dragging. |
| 10298 | 10311 | * If this function returns the boolean false, dragging will be canceled. |
| 10299 | 10312 | */ |
| 10300 | 10313 | onDrag: _propTypes.default.func, |
| 10314 | + | |
| 10301 | 10315 | /** |
| 10302 | 10316 | * Called when dragging stops. |
| 10303 | 10317 | * If this function returns the boolean false, the drag will remain active. |
| 10304 | 10318 | */ |
| 10305 | 10319 | onStop: _propTypes.default.func, |
| 10320 | + | |
| 10306 | 10321 | /** |
| 10307 | 10322 | * A workaround option which can be passed if onMouseDown needs to be accessed, |
| 10308 | 10323 | * since it'll always be blocked (as there is internal use of onMouseDown) |
| 10309 | 10324 | */ |
| 10310 | 10325 | onMouseDown: _propTypes.default.func, |
| 10326 | + | |
| 10311 | 10327 | /** |
| 10312 | 10328 | * `scale`, if set, applies scaling while dragging an element |
| 10313 | 10329 | */ |
| 10314 | 10330 | scale: _propTypes.default.number, |
| 10331 | + | |
| 10315 | 10332 | /** |
| 10316 | 10333 | * These properties should be defined on the child, not here. |
| 10317 | 10334 | */ |
| 10318 | 10335 | className: _shims.dontSetMe, |
| @@ -10318,18 +10335,18 @@ | ||
| 10318 | 10335 | className: _shims.dontSetMe, |
| 10319 | 10336 | style: _shims.dontSetMe, |
| 10320 | 10337 | transform: _shims.dontSetMe |
| 10321 | 10338 | }); |
| 10339 | + | |
| 10322 | 10340 | _defineProperty(DraggableCore, "defaultProps", { |
| 10323 | 10341 | allowAnyClick: false, |
| 10324 | 10342 | // by default only accept left click |
| 10325 | - allowMobileScroll: false, | |
| 10326 | 10343 | disabled: false, |
| 10327 | 10344 | enableUserSelectHack: true, |
| 10328 | - onStart: function () {}, | |
| 10329 | - onDrag: function () {}, | |
| 10330 | - onStop: function () {}, | |
| 10331 | - onMouseDown: function () {}, | |
| 10345 | + onStart: function onStart() {}, | |
| 10346 | + onDrag: function onDrag() {}, | |
| 10347 | + onStop: function onStop() {}, | |
| 10348 | + onMouseDown: function onMouseDown() {}, | |
| 10332 | 10349 | scale: 1 |
| 10333 | 10350 | }); |
| 10334 | 10351 | |
| 10335 | 10352 | /***/ }), |
| @@ -10342,16 +10359,15 @@ | ||
| 10342 | 10359 | |
| 10343 | 10360 | "use strict"; |
| 10344 | 10361 | |
| 10345 | 10362 | |
| 10346 | -const { | |
| 10347 | - default: Draggable, | |
| 10348 | - DraggableCore | |
| 10349 | -} = __webpack_require__(/*! ./Draggable */ "../node_modules/react-draggable/build/cjs/Draggable.js"); | |
| 10350 | - | |
| 10351 | -// Previous versions of this lib exported <Draggable> as the root export. As to no-// them, or TypeScript, we export *both* as the root and as 'default'. | |
| 10363 | +var _require = __webpack_require__(/*! ./Draggable */ "../node_modules/react-draggable/build/cjs/Draggable.js"), | |
| 10364 | + Draggable = _require.default, | |
| 10365 | + DraggableCore = _require.DraggableCore; // Previous versions of this lib exported <Draggable> as the root export. As to no-// them, or TypeScript, we export *both* as the root and as 'default'. | |
| 10352 | 10366 | // See https://github.com/mzabriskie/react-draggable/pull/254 |
| 10353 | 10367 | // and https://github.com/mzabriskie/react-draggable/issues/266 |
| 10368 | + | |
| 10369 | + | |
| 10354 | 10370 | module.exports = Draggable; |
| 10355 | 10371 | module.exports["default"] = Draggable; |
| 10356 | 10372 | module.exports.DraggableCore = DraggableCore; |
| 10357 | 10373 | |
| @@ -10365,8 +10381,10 @@ | ||
| 10365 | 10381 | |
| 10366 | 10382 | "use strict"; |
| 10367 | 10383 | |
| 10368 | 10384 | |
| 10385 | +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } | |
| 10386 | + | |
| 10369 | 10387 | Object.defineProperty(exports, "__esModule", ({ |
| 10370 | 10388 | value: true |
| 10371 | 10389 | })); |
| 10372 | 10390 | exports.addClassName = addClassName; |
| @@ -10385,48 +10403,86 @@ | ||
| 10385 | 10403 | exports.outerHeight = outerHeight; |
| 10386 | 10404 | exports.outerWidth = outerWidth; |
| 10387 | 10405 | exports.removeClassName = removeClassName; |
| 10388 | 10406 | exports.removeEvent = removeEvent; |
| 10389 | -exports.scheduleRemoveUserSelectStyles = scheduleRemoveUserSelectStyles; | |
| 10407 | +exports.removeUserSelectStyles = removeUserSelectStyles; | |
| 10408 | + | |
| 10390 | 10409 | var _shims = __webpack_require__(/*! ./shims */ "../node_modules/react-draggable/build/cjs/utils/shims.js"); |
| 10410 | + | |
| 10391 | 10411 | var _getPrefix = _interopRequireWildcard(__webpack_require__(/*! ./getPrefix */ "../node_modules/react-draggable/build/cjs/utils/getPrefix.js")); |
| 10392 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } | |
| 10393 | -/*:: import type {ControlPosition, PositionOffsetControlPosition, MouseTouchEvent} from './types';*/ | |
| 10394 | -let matchesSelectorFunc = ''; | |
| 10395 | -function matchesSelector(el /*: Node*/, selector /*: string*/) /*: boolean*/{ | |
| 10412 | + | |
| 10413 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 10414 | + | |
| 10415 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 10416 | + | |
| 10417 | +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; } | |
| 10418 | + | |
| 10419 | +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; } | |
| 10420 | + | |
| 10421 | +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; } | |
| 10422 | + | |
| 10423 | +var matchesSelectorFunc = ''; | |
| 10424 | + | |
| 10425 | +function matchesSelector(el | |
| 10426 | +/*: Node*/ | |
| 10427 | +, selector | |
| 10428 | +/*: string*/ | |
| 10429 | +) | |
| 10430 | +/*: boolean*/ | |
| 10431 | +{ | |
| 10396 | 10432 | if (!matchesSelectorFunc) { |
| 10397 | 10433 | matchesSelectorFunc = (0, _shims.findInArray)(['matches', 'webkitMatchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector'], function (method) { |
| 10398 | 10434 | // $FlowIgnore: Doesn't think elements are indexable |
| 10399 | 10435 | return (0, _shims.isFunction)(el[method]); |
| 10400 | 10436 | }); |
| 10401 | - } | |
| 10437 | + } // Might not be found entirely (not an Element?) - in that case, bail | |
| 10438 | + // $FlowIgnore: Doesn't think elements are indexable | |
| 10402 | 10439 | |
| 10403 | - // Might not be found entirely (not an Element?) - in that case, bail | |
| 10404 | - // $FlowIgnore: Doesn't think elements are indexable | |
| 10405 | - if (!(0, _shims.isFunction)(el[matchesSelectorFunc])) return false; | |
| 10406 | 10440 | |
| 10407 | - // $FlowIgnore: Doesn't think elements are indexable | |
| 10441 | + if (!(0, _shims.isFunction)(el[matchesSelectorFunc])) return false; // $FlowIgnore: Doesn't think elements are indexable | |
| 10442 | + | |
| 10408 | 10443 | return el[matchesSelectorFunc](selector); |
| 10409 | -} | |
| 10444 | +} // Works up the tree to the draggable itself attempting to match selector. | |
| 10410 | 10445 | |
| 10411 | -// Works up the tree to the draggable itself attempting to match selector. | |
| 10412 | -function matchesSelectorAndParentsTo(el /*: Node*/, selector /*: string*/, baseNode /*: Node*/) /*: boolean*/{ | |
| 10413 | - let node = el; | |
| 10446 | + | |
| 10447 | +function matchesSelectorAndParentsTo(el | |
| 10448 | +/*: Node*/ | |
| 10449 | +, selector | |
| 10450 | +/*: string*/ | |
| 10451 | +, baseNode | |
| 10452 | +/*: Node*/ | |
| 10453 | +) | |
| 10454 | +/*: boolean*/ | |
| 10455 | +{ | |
| 10456 | + var node = el; | |
| 10457 | + | |
| 10414 | 10458 | do { |
| 10415 | 10459 | if (matchesSelector(node, selector)) return true; |
| 10416 | 10460 | if (node === baseNode) return false; |
| 10417 | - // $FlowIgnore[incompatible-type] | |
| 10418 | 10461 | node = node.parentNode; |
| 10419 | 10462 | } while (node); |
| 10463 | + | |
| 10420 | 10464 | return false; |
| 10421 | 10465 | } |
| 10422 | -function addEvent(el /*: ?Node*/, event /*: string*/, handler /*: Function*/, inputOptions /*: Object*/) /*: void*/{ | |
| 10466 | + | |
| 10467 | +function addEvent(el | |
| 10468 | +/*: ?Node*/ | |
| 10469 | +, event | |
| 10470 | +/*: string*/ | |
| 10471 | +, handler | |
| 10472 | +/*: Function*/ | |
| 10473 | +, inputOptions | |
| 10474 | +/*: Object*/ | |
| 10475 | +) | |
| 10476 | +/*: void*/ | |
| 10477 | +{ | |
| 10423 | 10478 | if (!el) return; |
| 10424 | - const options = { | |
| 10425 | - capture: true, | |
| 10426 | - ...inputOptions | |
| 10427 | - }; | |
| 10428 | - // $FlowIgnore[method-unbinding] | |
| 10479 | + | |
| 10480 | + var options = _objectSpread({ | |
| 10481 | + capture: true | |
| 10482 | + }, inputOptions); // $FlowIgnore[method-unbinding] | |
| 10483 | + | |
| 10484 | + | |
| 10429 | 10485 | if (el.addEventListener) { |
| 10430 | 10486 | el.addEventListener(event, handler, options); |
| 10431 | 10487 | } else if (el.attachEvent) { |
| 10432 | 10488 | el.attachEvent('on' + event, handler); |
| @@ -10434,15 +10490,27 @@ | ||
| 10434 | 10490 | // $FlowIgnore: Doesn't think elements are indexable |
| 10435 | 10491 | el['on' + event] = handler; |
| 10436 | 10492 | } |
| 10437 | 10493 | } |
| 10438 | -function removeEvent(el /*: ?Node*/, event /*: string*/, handler /*: Function*/, inputOptions /*: Object*/) /*: void*/{ | |
| 10494 | + | |
| 10495 | +function removeEvent(el | |
| 10496 | +/*: ?Node*/ | |
| 10497 | +, event | |
| 10498 | +/*: string*/ | |
| 10499 | +, handler | |
| 10500 | +/*: Function*/ | |
| 10501 | +, inputOptions | |
| 10502 | +/*: Object*/ | |
| 10503 | +) | |
| 10504 | +/*: void*/ | |
| 10505 | +{ | |
| 10439 | 10506 | if (!el) return; |
| 10440 | - const options = { | |
| 10441 | - capture: true, | |
| 10442 | - ...inputOptions | |
| 10443 | - }; | |
| 10444 | - // $FlowIgnore[method-unbinding] | |
| 10507 | + | |
| 10508 | + var options = _objectSpread({ | |
| 10509 | + capture: true | |
| 10510 | + }, inputOptions); // $FlowIgnore[method-unbinding] | |
| 10511 | + | |
| 10512 | + | |
| 10445 | 10513 | if (el.removeEventListener) { |
| 10446 | 10514 | el.removeEventListener(event, handler, options); |
| 10447 | 10515 | } else if (el.detachEvent) { |
| 10448 | 10516 | el.detachEvent('on' + event, handler); |
| @@ -10450,36 +10518,56 @@ | ||
| 10450 | 10518 | // $FlowIgnore: Doesn't think elements are indexable |
| 10451 | 10519 | el['on' + event] = null; |
| 10452 | 10520 | } |
| 10453 | 10521 | } |
| 10454 | -function outerHeight(node /*: HTMLElement*/) /*: number*/{ | |
| 10522 | + | |
| 10523 | +function outerHeight(node | |
| 10524 | +/*: HTMLElement*/ | |
| 10525 | +) | |
| 10526 | +/*: number*/ | |
| 10527 | +{ | |
| 10455 | 10528 | // This is deliberately excluding margin for our calculations, since we are using |
| 10456 | 10529 | // offsetTop which is including margin. See getBoundPosition |
| 10457 | - let height = node.clientHeight; | |
| 10458 | - const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node); | |
| 10530 | + var height = node.clientHeight; | |
| 10531 | + var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node); | |
| 10459 | 10532 | height += (0, _shims.int)(computedStyle.borderTopWidth); |
| 10460 | 10533 | height += (0, _shims.int)(computedStyle.borderBottomWidth); |
| 10461 | 10534 | return height; |
| 10462 | 10535 | } |
| 10463 | -function outerWidth(node /*: HTMLElement*/) /*: number*/{ | |
| 10536 | + | |
| 10537 | +function outerWidth(node | |
| 10538 | +/*: HTMLElement*/ | |
| 10539 | +) | |
| 10540 | +/*: number*/ | |
| 10541 | +{ | |
| 10464 | 10542 | // This is deliberately excluding margin for our calculations, since we are using |
| 10465 | 10543 | // offsetLeft which is including margin. See getBoundPosition |
| 10466 | - let width = node.clientWidth; | |
| 10467 | - const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node); | |
| 10544 | + var width = node.clientWidth; | |
| 10545 | + var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node); | |
| 10468 | 10546 | width += (0, _shims.int)(computedStyle.borderLeftWidth); |
| 10469 | 10547 | width += (0, _shims.int)(computedStyle.borderRightWidth); |
| 10470 | 10548 | return width; |
| 10471 | 10549 | } |
| 10472 | -function innerHeight(node /*: HTMLElement*/) /*: number*/{ | |
| 10473 | - let height = node.clientHeight; | |
| 10474 | - const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node); | |
| 10550 | + | |
| 10551 | +function innerHeight(node | |
| 10552 | +/*: HTMLElement*/ | |
| 10553 | +) | |
| 10554 | +/*: number*/ | |
| 10555 | +{ | |
| 10556 | + var height = node.clientHeight; | |
| 10557 | + var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node); | |
| 10475 | 10558 | height -= (0, _shims.int)(computedStyle.paddingTop); |
| 10476 | 10559 | height -= (0, _shims.int)(computedStyle.paddingBottom); |
| 10477 | 10560 | return height; |
| 10478 | 10561 | } |
| 10479 | -function innerWidth(node /*: HTMLElement*/) /*: number*/{ | |
| 10480 | - let width = node.clientWidth; | |
| 10481 | - const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node); | |
| 10562 | + | |
| 10563 | +function innerWidth(node | |
| 10564 | +/*: HTMLElement*/ | |
| 10565 | +) | |
| 10566 | +/*: number*/ | |
| 10567 | +{ | |
| 10568 | + var width = node.clientWidth; | |
| 10569 | + var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node); | |
| 10482 | 10570 | width -= (0, _shims.int)(computedStyle.paddingLeft); |
| 10483 | 10571 | width -= (0, _shims.int)(computedStyle.paddingRight); |
| 10484 | 10572 | return width; |
| 10485 | 10573 | } |
| @@ -10485,61 +10573,108 @@ | ||
| 10485 | 10573 | } |
| 10486 | 10574 | /*:: interface EventWithOffset { |
| 10487 | 10575 | clientX: number, clientY: number |
| 10488 | 10576 | }*/ |
| 10577 | + | |
| 10578 | + | |
| 10489 | 10579 | // Get from offsetParent |
| 10490 | -function offsetXYFromParent(evt /*: EventWithOffset*/, offsetParent /*: HTMLElement*/, scale /*: number*/) /*: ControlPosition*/{ | |
| 10491 | - const isBody = offsetParent === offsetParent.ownerDocument.body; | |
| 10492 | - const offsetParentRect = isBody ? { | |
| 10580 | +function offsetXYFromParent(evt | |
| 10581 | +/*: EventWithOffset*/ | |
| 10582 | +, offsetParent | |
| 10583 | +/*: HTMLElement*/ | |
| 10584 | +, scale | |
| 10585 | +/*: number*/ | |
| 10586 | +) | |
| 10587 | +/*: ControlPosition*/ | |
| 10588 | +{ | |
| 10589 | + var isBody = offsetParent === offsetParent.ownerDocument.body; | |
| 10590 | + var offsetParentRect = isBody ? { | |
| 10493 | 10591 | left: 0, |
| 10494 | 10592 | top: 0 |
| 10495 | 10593 | } : offsetParent.getBoundingClientRect(); |
| 10496 | - const x = (evt.clientX + offsetParent.scrollLeft - offsetParentRect.left) / scale; | |
| 10497 | - const y = (evt.clientY + offsetParent.scrollTop - offsetParentRect.top) / scale; | |
| 10594 | + var x = (evt.clientX + offsetParent.scrollLeft - offsetParentRect.left) / scale; | |
| 10595 | + var y = (evt.clientY + offsetParent.scrollTop - offsetParentRect.top) / scale; | |
| 10498 | 10596 | return { |
| 10499 | - x, | |
| 10500 | - y | |
| 10597 | + x: x, | |
| 10598 | + y: y | |
| 10501 | 10599 | }; |
| 10502 | 10600 | } |
| 10503 | -function createCSSTransform(controlPos /*: ControlPosition*/, positionOffset /*: PositionOffsetControlPosition*/) /*: Object*/{ | |
| 10504 | - const translation = getTranslation(controlPos, positionOffset, 'px'); | |
| 10505 | - return { | |
| 10506 | - [(0, _getPrefix.browserPrefixToKey)('transform', _getPrefix.default)]: translation | |
| 10507 | - }; | |
| 10601 | + | |
| 10602 | +function createCSSTransform(controlPos | |
| 10603 | +/*: ControlPosition*/ | |
| 10604 | +, positionOffset | |
| 10605 | +/*: PositionOffsetControlPosition*/ | |
| 10606 | +) | |
| 10607 | +/*: Object*/ | |
| 10608 | +{ | |
| 10609 | + var translation = getTranslation(controlPos, positionOffset, 'px'); | |
| 10610 | + return _defineProperty({}, (0, _getPrefix.browserPrefixToKey)('transform', _getPrefix.default), translation); | |
| 10508 | 10611 | } |
| 10509 | -function createSVGTransform(controlPos /*: ControlPosition*/, positionOffset /*: PositionOffsetControlPosition*/) /*: string*/{ | |
| 10510 | - const translation = getTranslation(controlPos, positionOffset, ''); | |
| 10612 | + | |
| 10613 | +function createSVGTransform(controlPos | |
| 10614 | +/*: ControlPosition*/ | |
| 10615 | +, positionOffset | |
| 10616 | +/*: PositionOffsetControlPosition*/ | |
| 10617 | +) | |
| 10618 | +/*: string*/ | |
| 10619 | +{ | |
| 10620 | + var translation = getTranslation(controlPos, positionOffset, ''); | |
| 10511 | 10621 | return translation; |
| 10512 | 10622 | } |
| 10513 | -function getTranslation(_ref /*:: */, positionOffset /*: PositionOffsetControlPosition*/, unitSuffix /*: string*/) /*: string*/{ | |
| 10514 | - let { | |
| 10515 | - x, | |
| 10516 | - y | |
| 10517 | - } /*: ControlPosition*/ = _ref /*: ControlPosition*/; | |
| 10518 | - let translation = `translate(${x}${unitSuffix},${y}${unitSuffix})`; | |
| 10623 | + | |
| 10624 | +function getTranslation(_ref2, positionOffset | |
| 10625 | +/*: PositionOffsetControlPosition*/ | |
| 10626 | +, unitSuffix | |
| 10627 | +/*: string*/ | |
| 10628 | +) | |
| 10629 | +/*: string*/ | |
| 10630 | +{ | |
| 10631 | + var x = _ref2.x, | |
| 10632 | + y = _ref2.y; | |
| 10633 | + var translation = "translate(".concat(x).concat(unitSuffix, ",").concat(y).concat(unitSuffix, ")"); | |
| 10634 | + | |
| 10519 | 10635 | if (positionOffset) { |
| 10520 | - const defaultX = `${typeof positionOffset.x === 'string' ? positionOffset.x : positionOffset.x + unitSuffix}`; | |
| 10521 | - const defaultY = `${typeof positionOffset.y === 'string' ? positionOffset.y : positionOffset.y + unitSuffix}`; | |
| 10522 | - translation = `translate(${defaultX}, ${defaultY})` + translation; | |
| 10636 | + var defaultX = "".concat(typeof positionOffset.x === 'string' ? positionOffset.x : positionOffset.x + unitSuffix); | |
| 10637 | + var defaultY = "".concat(typeof positionOffset.y === 'string' ? positionOffset.y : positionOffset.y + unitSuffix); | |
| 10638 | + translation = "translate(".concat(defaultX, ", ").concat(defaultY, ")") + translation; | |
| 10523 | 10639 | } |
| 10640 | + | |
| 10524 | 10641 | return translation; |
| 10525 | 10642 | } |
| 10526 | -function getTouch(e /*: MouseTouchEvent*/, identifier /*: number*/) /*: ?{clientX: number, clientY: number}*/{ | |
| 10527 | - return e.targetTouches && (0, _shims.findInArray)(e.targetTouches, t => identifier === t.identifier) || e.changedTouches && (0, _shims.findInArray)(e.changedTouches, t => identifier === t.identifier); | |
| 10643 | + | |
| 10644 | +function getTouch(e | |
| 10645 | +/*: MouseTouchEvent*/ | |
| 10646 | +, identifier | |
| 10647 | +/*: number*/ | |
| 10648 | +) | |
| 10649 | +/*: ?{clientX: number, clientY: number}*/ | |
| 10650 | +{ | |
| 10651 | + return e.targetTouches && (0, _shims.findInArray)(e.targetTouches, function (t) { | |
| 10652 | + return identifier === t.identifier; | |
| 10653 | + }) || e.changedTouches && (0, _shims.findInArray)(e.changedTouches, function (t) { | |
| 10654 | + return identifier === t.identifier; | |
| 10655 | + }); | |
| 10528 | 10656 | } |
| 10529 | -function getTouchIdentifier(e /*: MouseTouchEvent*/) /*: ?number*/{ | |
| 10657 | + | |
| 10658 | +function getTouchIdentifier(e | |
| 10659 | +/*: MouseTouchEvent*/ | |
| 10660 | +) | |
| 10661 | +/*: ?number*/ | |
| 10662 | +{ | |
| 10530 | 10663 | if (e.targetTouches && e.targetTouches[0]) return e.targetTouches[0].identifier; |
| 10531 | 10664 | if (e.changedTouches && e.changedTouches[0]) return e.changedTouches[0].identifier; |
| 10532 | -} | |
| 10533 | - | |
| 10534 | -// User-select Hacks: | |
| 10665 | +} // User-select Hacks: | |
| 10535 | 10666 | // |
| 10536 | 10667 | // Useful for preventing blue highlights all over everything when dragging. |
| 10668 | +// Note we're passing `document` b/c we could be iframed | |
| 10537 | 10669 | |
| 10538 | -// Note we're passing `document` b/c we could be iframed | |
| 10539 | -function addUserSelectStyles(doc /*: ?Document*/) { | |
| 10670 | + | |
| 10671 | +function addUserSelectStyles(doc | |
| 10672 | +/*: ?Document*/ | |
| 10673 | +) { | |
| 10540 | 10674 | if (!doc) return; |
| 10541 | - let styleEl = doc.getElementById('react-draggable-style-el'); | |
| 10675 | + var styleEl = doc.getElementById('react-draggable-style-el'); | |
| 10676 | + | |
| 10542 | 10677 | if (!styleEl) { |
| 10543 | 10678 | styleEl = doc.createElement('style'); |
| 10544 | 10679 | styleEl.type = 'text/css'; |
| 10545 | 10680 | styleEl.id = 'react-draggable-style-el'; |
| @@ -10546,25 +10681,20 @@ | ||
| 10546 | 10681 | styleEl.innerHTML = '.react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n'; |
| 10547 | 10682 | styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {all: inherit;}\n'; |
| 10548 | 10683 | doc.getElementsByTagName('head')[0].appendChild(styleEl); |
| 10549 | 10684 | } |
| 10685 | + | |
| 10550 | 10686 | if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection'); |
| 10551 | 10687 | } |
| 10552 | -function scheduleRemoveUserSelectStyles(doc /*: ?Document*/) { | |
| 10553 | - // Prevent a possible "forced reflow" | |
| 10554 | - if (window.requestAnimationFrame) { | |
| 10555 | - window.requestAnimationFrame(() => { | |
| 10556 | - removeUserSelectStyles(doc); | |
| 10557 | - }); | |
| 10558 | - } else { | |
| 10559 | - removeUserSelectStyles(doc); | |
| 10560 | - } | |
| 10561 | -} | |
| 10562 | -function removeUserSelectStyles(doc /*: ?Document*/) { | |
| 10688 | + | |
| 10689 | +function removeUserSelectStyles(doc | |
| 10690 | +/*: ?Document*/ | |
| 10691 | +) { | |
| 10563 | 10692 | if (!doc) return; |
| 10693 | + | |
| 10564 | 10694 | try { |
| 10565 | - if (doc.body) removeClassName(doc.body, 'react-draggable-transparent-selection'); | |
| 10566 | - // $FlowIgnore: IE | |
| 10695 | + if (doc.body) removeClassName(doc.body, 'react-draggable-transparent-selection'); // $FlowIgnore: IE | |
| 10696 | + | |
| 10567 | 10697 | if (doc.selection) { |
| 10568 | 10698 | // $FlowIgnore: IE |
| 10569 | 10699 | doc.selection.empty(); |
| 10570 | 10700 | } else { |
| @@ -10569,31 +10699,41 @@ | ||
| 10569 | 10699 | doc.selection.empty(); |
| 10570 | 10700 | } else { |
| 10571 | 10701 | // Remove selection caused by scroll, unless it's a focused input |
| 10572 | 10702 | // (we use doc.defaultView in case we're in an iframe) |
| 10573 | - const selection = (doc.defaultView || window).getSelection(); | |
| 10703 | + var selection = (doc.defaultView || window).getSelection(); | |
| 10704 | + | |
| 10574 | 10705 | if (selection && selection.type !== 'Caret') { |
| 10575 | 10706 | selection.removeAllRanges(); |
| 10576 | 10707 | } |
| 10577 | 10708 | } |
| 10578 | - } catch (e) { | |
| 10579 | - // probably IE | |
| 10709 | + } catch (e) {// probably IE | |
| 10580 | 10710 | } |
| 10581 | 10711 | } |
| 10582 | -function addClassName(el /*: HTMLElement*/, className /*: string*/) { | |
| 10712 | + | |
| 10713 | +function addClassName(el | |
| 10714 | +/*: HTMLElement*/ | |
| 10715 | +, className | |
| 10716 | +/*: string*/ | |
| 10717 | +) { | |
| 10583 | 10718 | if (el.classList) { |
| 10584 | 10719 | el.classList.add(className); |
| 10585 | 10720 | } else { |
| 10586 | - if (!el.className.match(new RegExp(`(?:^|\\s)${className}(?!\\S)`))) { | |
| 10587 | - el.className += ` ${className}`; | |
| 10721 | + if (!el.className.match(new RegExp("(?:^|\\s)".concat(className, "(?!\\S)")))) { | |
| 10722 | + el.className += " ".concat(className); | |
| 10588 | 10723 | } |
| 10589 | 10724 | } |
| 10590 | 10725 | } |
| 10591 | -function removeClassName(el /*: HTMLElement*/, className /*: string*/) { | |
| 10726 | + | |
| 10727 | +function removeClassName(el | |
| 10728 | +/*: HTMLElement*/ | |
| 10729 | +, className | |
| 10730 | +/*: string*/ | |
| 10731 | +) { | |
| 10592 | 10732 | if (el.classList) { |
| 10593 | 10733 | el.classList.remove(className); |
| 10594 | 10734 | } else { |
| 10595 | - el.className = el.className.replace(new RegExp(`(?:^|\\s)${className}(?!\\S)`, 'g'), ''); | |
| 10735 | + el.className = el.className.replace(new RegExp("(?:^|\\s)".concat(className, "(?!\\S)"), 'g'), ''); | |
| 10596 | 10736 | } |
| 10597 | 10737 | } |
| 10598 | 10738 | |
| 10599 | 10739 | /***/ }), |
| @@ -10613,35 +10753,63 @@ | ||
| 10613 | 10753 | exports.browserPrefixToKey = browserPrefixToKey; |
| 10614 | 10754 | exports.browserPrefixToStyle = browserPrefixToStyle; |
| 10615 | 10755 | exports["default"] = void 0; |
| 10616 | 10756 | exports.getPrefix = getPrefix; |
| 10617 | -const prefixes = ['Moz', 'Webkit', 'O', 'ms']; | |
| 10618 | -function getPrefix() /*: string*/{ | |
| 10619 | - let prop /*: string*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'transform'; | |
| 10757 | +var prefixes = ['Moz', 'Webkit', 'O', 'ms']; | |
| 10758 | + | |
| 10759 | +function getPrefix() | |
| 10760 | +/*: string*/ | |
| 10761 | +{ | |
| 10762 | + var _window$document, _window$document$docu; | |
| 10763 | + | |
| 10764 | + var prop | |
| 10765 | + /*: string*/ | |
| 10766 | + = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'transform'; | |
| 10620 | 10767 | // Ensure we're running in an environment where there is actually a global |
| 10621 | 10768 | // `window` obj |
| 10622 | - if (typeof window === 'undefined') return ''; | |
| 10769 | + if (typeof window === 'undefined') return ''; // If we're in a pseudo-browser server-side environment, this access | |
| 10770 | + // path may not exist, so bail out if it doesn't. | |
| 10623 | 10771 | |
| 10624 | - // If we're in a pseudo-browser server-side environment, this access | |
| 10625 | - // path may not exist, so bail out if it doesn't. | |
| 10626 | - const style = window.document?.documentElement?.style; | |
| 10772 | + var style = (_window$document = window.document) === null || _window$document === void 0 ? void 0 : (_window$document$docu = _window$document.documentElement) === null || _window$document$docu === void 0 ? void 0 : _window$document$docu.style; | |
| 10627 | 10773 | if (!style) return ''; |
| 10628 | 10774 | if (prop in style) return ''; |
| 10629 | - for (let i = 0; i < prefixes.length; i++) { | |
| 10775 | + | |
| 10776 | + for (var i = 0; i < prefixes.length; i++) { | |
| 10630 | 10777 | if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i]; |
| 10631 | 10778 | } |
| 10779 | + | |
| 10632 | 10780 | return ''; |
| 10633 | 10781 | } |
| 10634 | -function browserPrefixToKey(prop /*: string*/, prefix /*: string*/) /*: string*/{ | |
| 10635 | - return prefix ? `${prefix}${kebabToTitleCase(prop)}` : prop; | |
| 10782 | + | |
| 10783 | +function browserPrefixToKey(prop | |
| 10784 | +/*: string*/ | |
| 10785 | +, prefix | |
| 10786 | +/*: string*/ | |
| 10787 | +) | |
| 10788 | +/*: string*/ | |
| 10789 | +{ | |
| 10790 | + return prefix ? "".concat(prefix).concat(kebabToTitleCase(prop)) : prop; | |
| 10636 | 10791 | } |
| 10637 | -function browserPrefixToStyle(prop /*: string*/, prefix /*: string*/) /*: string*/{ | |
| 10638 | - return prefix ? `-${prefix.toLowerCase()}-${prop}` : prop; | |
| 10792 | + | |
| 10793 | +function browserPrefixToStyle(prop | |
| 10794 | +/*: string*/ | |
| 10795 | +, prefix | |
| 10796 | +/*: string*/ | |
| 10797 | +) | |
| 10798 | +/*: string*/ | |
| 10799 | +{ | |
| 10800 | + return prefix ? "-".concat(prefix.toLowerCase(), "-").concat(prop) : prop; | |
| 10639 | 10801 | } |
| 10640 | -function kebabToTitleCase(str /*: string*/) /*: string*/{ | |
| 10641 | - let out = ''; | |
| 10642 | - let shouldCapitalize = true; | |
| 10643 | - for (let i = 0; i < str.length; i++) { | |
| 10802 | + | |
| 10803 | +function kebabToTitleCase(str | |
| 10804 | +/*: string*/ | |
| 10805 | +) | |
| 10806 | +/*: string*/ | |
| 10807 | +{ | |
| 10808 | + var out = ''; | |
| 10809 | + var shouldCapitalize = true; | |
| 10810 | + | |
| 10811 | + for (var i = 0; i < str.length; i++) { | |
| 10644 | 10812 | if (shouldCapitalize) { |
| 10645 | 10813 | out += str[i].toUpperCase(); |
| 10646 | 10814 | shouldCapitalize = false; |
| 10647 | 10815 | } else if (str[i] === '-') { |
| @@ -10649,16 +10817,21 @@ | ||
| 10649 | 10817 | } else { |
| 10650 | 10818 | out += str[i]; |
| 10651 | 10819 | } |
| 10652 | 10820 | } |
| 10821 | + | |
| 10653 | 10822 | return out; |
| 10654 | -} | |
| 10655 | - | |
| 10656 | -// Default export is the prefix itself, like 'Moz', 'Webkit', etc | |
| 10823 | +} // Default export is the prefix itself, like 'Moz', 'Webkit', etc | |
| 10657 | 10824 | // Note that you may have to re-test for certain things; for instance, Chrome 50 |
| 10658 | 10825 | // can handle unprefixed `transform`, but not unprefixed `user-select` |
| 10659 | -var _default = exports["default"] = (getPrefix() /*: string*/); | |
| 10660 | 10826 | |
| 10827 | + | |
| 10828 | +var _default = (getPrefix() | |
| 10829 | +/*: string*/ | |
| 10830 | +); | |
| 10831 | + | |
| 10832 | +exports["default"] = _default; | |
| 10833 | + | |
| 10661 | 10834 | /***/ }), |
| 10662 | 10835 | |
| 10663 | 10836 | /***/ "../node_modules/react-draggable/build/cjs/utils/log.js": |
| 10664 | 10837 | /*!**************************************************************!*\ |
| @@ -10672,12 +10845,14 @@ | ||
| 10672 | 10845 | Object.defineProperty(exports, "__esModule", ({ |
| 10673 | 10846 | value: true |
| 10674 | 10847 | })); |
| 10675 | 10848 | exports["default"] = log; |
| 10849 | + | |
| 10676 | 10850 | /*eslint no-console:0*/ |
| 10677 | 10851 | function log() { |
| 10678 | - if (false) // removed by dead control flow | |
| 10679 | -{} | |
| 10852 | + var _console; | |
| 10853 | + | |
| 10854 | + if (false) {} | |
| 10680 | 10855 | } |
| 10681 | 10856 | |
| 10682 | 10857 | /***/ }), |
| 10683 | 10858 | |
| @@ -10699,46 +10874,51 @@ | ||
| 10699 | 10874 | exports.createDraggableData = createDraggableData; |
| 10700 | 10875 | exports.getBoundPosition = getBoundPosition; |
| 10701 | 10876 | exports.getControlPosition = getControlPosition; |
| 10702 | 10877 | exports.snapToGrid = snapToGrid; |
| 10878 | + | |
| 10703 | 10879 | var _shims = __webpack_require__(/*! ./shims */ "../node_modules/react-draggable/build/cjs/utils/shims.js"); |
| 10880 | + | |
| 10704 | 10881 | var _domFns = __webpack_require__(/*! ./domFns */ "../node_modules/react-draggable/build/cjs/utils/domFns.js"); |
| 10705 | -/*:: import type Draggable from '../Draggable';*/ | |
| 10706 | -/*:: import type {Bounds, ControlPosition, DraggableData, MouseTouchEvent} from './types';*/ | |
| 10707 | -/*:: import type DraggableCore from '../DraggableCore';*/ | |
| 10708 | -function getBoundPosition(draggable /*: Draggable*/, x /*: number*/, y /*: number*/) /*: [number, number]*/{ | |
| 10882 | + | |
| 10883 | +function getBoundPosition(draggable | |
| 10884 | +/*: Draggable*/ | |
| 10885 | +, x | |
| 10886 | +/*: number*/ | |
| 10887 | +, y | |
| 10888 | +/*: number*/ | |
| 10889 | +) | |
| 10890 | +/*: [number, number]*/ | |
| 10891 | +{ | |
| 10709 | 10892 | // If no bounds, short-circuit and move on |
| 10710 | - if (!draggable.props.bounds) return [x, y]; | |
| 10893 | + if (!draggable.props.bounds) return [x, y]; // Clone new bounds | |
| 10711 | 10894 | |
| 10712 | - // Clone new bounds | |
| 10713 | - let { | |
| 10714 | - bounds | |
| 10715 | - } = draggable.props; | |
| 10895 | + var bounds = draggable.props.bounds; | |
| 10716 | 10896 | bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds); |
| 10717 | - const node = findDOMNode(draggable); | |
| 10897 | + var node = findDOMNode(draggable); | |
| 10898 | + | |
| 10718 | 10899 | if (typeof bounds === 'string') { |
| 10719 | - const { | |
| 10720 | - ownerDocument | |
| 10721 | - } = node; | |
| 10722 | - const ownerWindow = ownerDocument.defaultView; | |
| 10723 | - let boundNode; | |
| 10900 | + var ownerDocument = node.ownerDocument; | |
| 10901 | + var ownerWindow = ownerDocument.defaultView; | |
| 10902 | + var boundNode; | |
| 10903 | + | |
| 10724 | 10904 | if (bounds === 'parent') { |
| 10725 | 10905 | boundNode = node.parentNode; |
| 10726 | 10906 | } else { |
| 10727 | - // Flow assigns the wrong return type (Node) for getRootNode(), | |
| 10728 | - // so we cast it to one of the correct types (Element). | |
| 10729 | - // The others are Document and ShadowRoot. | |
| 10730 | - // All three implement querySelector() so it's safe to call. | |
| 10731 | - const rootNode = ((node.getRootNode() /*: any*/) /*: Element*/); | |
| 10732 | - boundNode = rootNode.querySelector(bounds); | |
| 10907 | + boundNode = ownerDocument.querySelector(bounds); | |
| 10733 | 10908 | } |
| 10909 | + | |
| 10734 | 10910 | if (!(boundNode instanceof ownerWindow.HTMLElement)) { |
| 10735 | 10911 | throw new Error('Bounds selector "' + bounds + '" could not find an element.'); |
| 10736 | 10912 | } |
| 10737 | - const boundNodeEl /*: HTMLElement*/ = boundNode; // for Flow, can't seem to refine correctly | |
| 10738 | - const nodeStyle = ownerWindow.getComputedStyle(node); | |
| 10739 | - const boundNodeStyle = ownerWindow.getComputedStyle(boundNodeEl); | |
| 10740 | - // Compute bounds. This is a pain with padding and offsets but this gets it exactly right. | |
| 10913 | + | |
| 10914 | + var boundNodeEl | |
| 10915 | + /*: HTMLElement*/ | |
| 10916 | + = boundNode; // for Flow, can't seem to refine correctly | |
| 10917 | + | |
| 10918 | + var nodeStyle = ownerWindow.getComputedStyle(node); | |
| 10919 | + var boundNodeStyle = ownerWindow.getComputedStyle(boundNodeEl); // Compute bounds. This is a pain with padding and offsets but this gets it exactly right. | |
| 10920 | + | |
| 10741 | 10921 | bounds = { |
| 10742 | 10922 | left: -node.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingLeft) + (0, _shims.int)(nodeStyle.marginLeft), |
| 10743 | 10923 | top: -node.offsetTop + (0, _shims.int)(boundNodeStyle.paddingTop) + (0, _shims.int)(nodeStyle.marginTop), |
| 10744 | 10924 | right: (0, _domFns.innerWidth)(boundNodeEl) - (0, _domFns.outerWidth)(node) - node.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingRight) - (0, _shims.int)(nodeStyle.marginRight), |
| @@ -10743,73 +10923,116 @@ | ||
| 10743 | 10923 | top: -node.offsetTop + (0, _shims.int)(boundNodeStyle.paddingTop) + (0, _shims.int)(nodeStyle.marginTop), |
| 10744 | 10924 | right: (0, _domFns.innerWidth)(boundNodeEl) - (0, _domFns.outerWidth)(node) - node.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingRight) - (0, _shims.int)(nodeStyle.marginRight), |
| 10745 | 10925 | bottom: (0, _domFns.innerHeight)(boundNodeEl) - (0, _domFns.outerHeight)(node) - node.offsetTop + (0, _shims.int)(boundNodeStyle.paddingBottom) - (0, _shims.int)(nodeStyle.marginBottom) |
| 10746 | 10926 | }; |
| 10747 | - } | |
| 10927 | + } // Keep x and y below right and bottom limits... | |
| 10748 | 10928 | |
| 10749 | - // Keep x and y below right and bottom limits... | |
| 10929 | + | |
| 10750 | 10930 | if ((0, _shims.isNum)(bounds.right)) x = Math.min(x, bounds.right); |
| 10751 | - if ((0, _shims.isNum)(bounds.bottom)) y = Math.min(y, bounds.bottom); | |
| 10931 | + if ((0, _shims.isNum)(bounds.bottom)) y = Math.min(y, bounds.bottom); // But above left and top limits. | |
| 10752 | 10932 | |
| 10753 | - // But above left and top limits. | |
| 10754 | 10933 | if ((0, _shims.isNum)(bounds.left)) x = Math.max(x, bounds.left); |
| 10755 | 10934 | if ((0, _shims.isNum)(bounds.top)) y = Math.max(y, bounds.top); |
| 10756 | 10935 | return [x, y]; |
| 10757 | 10936 | } |
| 10758 | -function snapToGrid(grid /*: [number, number]*/, pendingX /*: number*/, pendingY /*: number*/) /*: [number, number]*/{ | |
| 10759 | - const x = Math.round(pendingX / grid[0]) * grid[0]; | |
| 10760 | - const y = Math.round(pendingY / grid[1]) * grid[1]; | |
| 10937 | + | |
| 10938 | +function snapToGrid(grid | |
| 10939 | +/*: [number, number]*/ | |
| 10940 | +, pendingX | |
| 10941 | +/*: number*/ | |
| 10942 | +, pendingY | |
| 10943 | +/*: number*/ | |
| 10944 | +) | |
| 10945 | +/*: [number, number]*/ | |
| 10946 | +{ | |
| 10947 | + var x = Math.round(pendingX / grid[0]) * grid[0]; | |
| 10948 | + var y = Math.round(pendingY / grid[1]) * grid[1]; | |
| 10761 | 10949 | return [x, y]; |
| 10762 | 10950 | } |
| 10763 | -function canDragX(draggable /*: Draggable*/) /*: boolean*/{ | |
| 10951 | + | |
| 10952 | +function canDragX(draggable | |
| 10953 | +/*: Draggable*/ | |
| 10954 | +) | |
| 10955 | +/*: boolean*/ | |
| 10956 | +{ | |
| 10764 | 10957 | return draggable.props.axis === 'both' || draggable.props.axis === 'x'; |
| 10765 | 10958 | } |
| 10766 | -function canDragY(draggable /*: Draggable*/) /*: boolean*/{ | |
| 10959 | + | |
| 10960 | +function canDragY(draggable | |
| 10961 | +/*: Draggable*/ | |
| 10962 | +) | |
| 10963 | +/*: boolean*/ | |
| 10964 | +{ | |
| 10767 | 10965 | return draggable.props.axis === 'both' || draggable.props.axis === 'y'; |
| 10768 | -} | |
| 10966 | +} // Get {x, y} positions from event. | |
| 10769 | 10967 | |
| 10770 | -// Get {x, y} positions from event. | |
| 10771 | -function getControlPosition(e /*: MouseTouchEvent*/, touchIdentifier /*: ?number*/, draggableCore /*: DraggableCore*/) /*: ?ControlPosition*/{ | |
| 10772 | - const touchObj = typeof touchIdentifier === 'number' ? (0, _domFns.getTouch)(e, touchIdentifier) : null; | |
| 10968 | + | |
| 10969 | +function getControlPosition(e | |
| 10970 | +/*: MouseTouchEvent*/ | |
| 10971 | +, touchIdentifier | |
| 10972 | +/*: ?number*/ | |
| 10973 | +, draggableCore | |
| 10974 | +/*: DraggableCore*/ | |
| 10975 | +) | |
| 10976 | +/*: ?ControlPosition*/ | |
| 10977 | +{ | |
| 10978 | + var touchObj = typeof touchIdentifier === 'number' ? (0, _domFns.getTouch)(e, touchIdentifier) : null; | |
| 10773 | 10979 | if (typeof touchIdentifier === 'number' && !touchObj) return null; // not the right touch |
| 10774 | - const node = findDOMNode(draggableCore); | |
| 10775 | - // User can provide an offsetParent if desired. | |
| 10776 | - const offsetParent = draggableCore.props.offsetParent || node.offsetParent || node.ownerDocument.body; | |
| 10980 | + | |
| 10981 | + var node = findDOMNode(draggableCore); // User can provide an offsetParent if desired. | |
| 10982 | + | |
| 10983 | + var offsetParent = draggableCore.props.offsetParent || node.offsetParent || node.ownerDocument.body; | |
| 10777 | 10984 | return (0, _domFns.offsetXYFromParent)(touchObj || e, offsetParent, draggableCore.props.scale); |
| 10778 | -} | |
| 10985 | +} // Create an data object exposed by <DraggableCore>'s events | |
| 10779 | 10986 | |
| 10780 | -// Create an data object exposed by <DraggableCore>'s events | |
| 10781 | -function createCoreData(draggable /*: DraggableCore*/, x /*: number*/, y /*: number*/) /*: DraggableData*/{ | |
| 10782 | - const isStart = !(0, _shims.isNum)(draggable.lastX); | |
| 10783 | - const node = findDOMNode(draggable); | |
| 10987 | + | |
| 10988 | +function createCoreData(draggable | |
| 10989 | +/*: DraggableCore*/ | |
| 10990 | +, x | |
| 10991 | +/*: number*/ | |
| 10992 | +, y | |
| 10993 | +/*: number*/ | |
| 10994 | +) | |
| 10995 | +/*: DraggableData*/ | |
| 10996 | +{ | |
| 10997 | + var state = draggable.state; | |
| 10998 | + var isStart = !(0, _shims.isNum)(state.lastX); | |
| 10999 | + var node = findDOMNode(draggable); | |
| 11000 | + | |
| 10784 | 11001 | if (isStart) { |
| 10785 | 11002 | // If this is our first move, use the x and y as last coords. |
| 10786 | 11003 | return { |
| 10787 | - node, | |
| 11004 | + node: node, | |
| 10788 | 11005 | deltaX: 0, |
| 10789 | 11006 | deltaY: 0, |
| 10790 | 11007 | lastX: x, |
| 10791 | 11008 | lastY: y, |
| 10792 | - x, | |
| 10793 | - y | |
| 11009 | + x: x, | |
| 11010 | + y: y | |
| 10794 | 11011 | }; |
| 10795 | 11012 | } else { |
| 10796 | 11013 | // Otherwise calculate proper values. |
| 10797 | 11014 | return { |
| 10798 | - node, | |
| 10799 | - deltaX: x - draggable.lastX, | |
| 10800 | - deltaY: y - draggable.lastY, | |
| 10801 | - lastX: draggable.lastX, | |
| 10802 | - lastY: draggable.lastY, | |
| 10803 | - x, | |
| 10804 | - y | |
| 11015 | + node: node, | |
| 11016 | + deltaX: x - state.lastX, | |
| 11017 | + deltaY: y - state.lastY, | |
| 11018 | + lastX: state.lastX, | |
| 11019 | + lastY: state.lastY, | |
| 11020 | + x: x, | |
| 11021 | + y: y | |
| 10805 | 11022 | }; |
| 10806 | 11023 | } |
| 10807 | -} | |
| 11024 | +} // Create an data exposed by <Draggable>'s events | |
| 10808 | 11025 | |
| 10809 | -// Create an data exposed by <Draggable>'s events | |
| 10810 | -function createDraggableData(draggable /*: Draggable*/, coreData /*: DraggableData*/) /*: DraggableData*/{ | |
| 10811 | - const scale = draggable.props.scale; | |
| 11026 | + | |
| 11027 | +function createDraggableData(draggable | |
| 11028 | +/*: Draggable*/ | |
| 11029 | +, coreData | |
| 11030 | +/*: DraggableData*/ | |
| 11031 | +) | |
| 11032 | +/*: DraggableData*/ | |
| 11033 | +{ | |
| 11034 | + var scale = draggable.props.scale; | |
| 10812 | 11035 | return { |
| 10813 | 11036 | node: coreData.node, |
| 10814 | 11037 | x: draggable.state.x + coreData.deltaX / scale, |
| 10815 | 11038 | y: draggable.state.y + coreData.deltaY / scale, |
| @@ -10817,12 +11040,16 @@ | ||
| 10817 | 11040 | deltaY: coreData.deltaY / scale, |
| 10818 | 11041 | lastX: draggable.state.x, |
| 10819 | 11042 | lastY: draggable.state.y |
| 10820 | 11043 | }; |
| 10821 | -} | |
| 11044 | +} // A lot faster than stringify/parse | |
| 10822 | 11045 | |
| 10823 | -// A lot faster than stringify/parse | |
| 10824 | -function cloneBounds(bounds /*: Bounds*/) /*: Bounds*/{ | |
| 11046 | + | |
| 11047 | +function cloneBounds(bounds | |
| 11048 | +/*: Bounds*/ | |
| 11049 | +) | |
| 11050 | +/*: Bounds*/ | |
| 11051 | +{ | |
| 10825 | 11052 | return { |
| 10826 | 11053 | left: bounds.left, |
| 10827 | 11054 | top: bounds.top, |
| 10828 | 11055 | right: bounds.right, |
| @@ -10828,14 +11055,21 @@ | ||
| 10828 | 11055 | right: bounds.right, |
| 10829 | 11056 | bottom: bounds.bottom |
| 10830 | 11057 | }; |
| 10831 | 11058 | } |
| 10832 | -function findDOMNode(draggable /*: Draggable | DraggableCore*/) /*: HTMLElement*/{ | |
| 10833 | - const node = draggable.findDOMNode(); | |
| 11059 | + | |
| 11060 | +function findDOMNode(draggable | |
| 11061 | +/*: Draggable | DraggableCore*/ | |
| 11062 | +) | |
| 11063 | +/*: HTMLElement*/ | |
| 11064 | +{ | |
| 11065 | + var node = draggable.findDOMNode(); | |
| 11066 | + | |
| 10834 | 11067 | if (!node) { |
| 10835 | 11068 | throw new Error('<DraggableCore>: Unmounted during event!'); |
| 10836 | - } | |
| 10837 | - // $FlowIgnore we can't assert on HTMLElement due to tests... FIXME | |
| 11069 | + } // $FlowIgnore we can't assert on HTMLElement due to tests... FIXME | |
| 11070 | + | |
| 11071 | + | |
| 10838 | 11072 | return node; |
| 10839 | 11073 | } |
| 10840 | 11074 | |
| 10841 | 11075 | /***/ }), |
| @@ -10856,42 +11090,474 @@ | ||
| 10856 | 11090 | exports.findInArray = findInArray; |
| 10857 | 11091 | exports.int = int; |
| 10858 | 11092 | exports.isFunction = isFunction; |
| 10859 | 11093 | exports.isNum = isNum; |
| 11094 | + | |
| 10860 | 11095 | // @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc |
| 10861 | -function findInArray(array /*: Array<any> | TouchList*/, callback /*: Function*/) /*: any*/{ | |
| 10862 | - for (let i = 0, length = array.length; i < length; i++) { | |
| 11096 | +function findInArray(array | |
| 11097 | +/*: Array<any> | TouchList*/ | |
| 11098 | +, callback | |
| 11099 | +/*: Function*/ | |
| 11100 | +) | |
| 11101 | +/*: any*/ | |
| 11102 | +{ | |
| 11103 | + for (var i = 0, length = array.length; i < length; i++) { | |
| 10863 | 11104 | if (callback.apply(callback, [array[i], i, array])) return array[i]; |
| 10864 | 11105 | } |
| 10865 | 11106 | } |
| 10866 | -function isFunction(func /*: any*/) /*: boolean %checks*/{ | |
| 11107 | + | |
| 11108 | +function isFunction(func | |
| 11109 | +/*: any*/ | |
| 11110 | +) | |
| 11111 | +/*: boolean %checks*/ | |
| 11112 | +{ | |
| 10867 | 11113 | // $FlowIgnore[method-unbinding] |
| 10868 | 11114 | return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]'; |
| 10869 | 11115 | } |
| 10870 | -function isNum(num /*: any*/) /*: boolean %checks*/{ | |
| 11116 | + | |
| 11117 | +function isNum(num | |
| 11118 | +/*: any*/ | |
| 11119 | +) | |
| 11120 | +/*: boolean %checks*/ | |
| 11121 | +{ | |
| 10871 | 11122 | return typeof num === 'number' && !isNaN(num); |
| 10872 | 11123 | } |
| 10873 | -function int(a /*: string*/) /*: number*/{ | |
| 11124 | + | |
| 11125 | +function int(a | |
| 11126 | +/*: string*/ | |
| 11127 | +) | |
| 11128 | +/*: number*/ | |
| 11129 | +{ | |
| 10874 | 11130 | return parseInt(a, 10); |
| 10875 | 11131 | } |
| 10876 | -function dontSetMe(props /*: Object*/, propName /*: string*/, componentName /*: string*/) /*: ?Error*/{ | |
| 11132 | + | |
| 11133 | +function dontSetMe(props | |
| 11134 | +/*: Object*/ | |
| 11135 | +, propName | |
| 11136 | +/*: string*/ | |
| 11137 | +, componentName | |
| 11138 | +/*: string*/ | |
| 11139 | +) | |
| 11140 | +/*: ?Error*/ | |
| 11141 | +{ | |
| 10877 | 11142 | if (props[propName]) { |
| 10878 | - return new Error(`Invalid prop ${propName} passed to ${componentName} - do not set this, set it on the child.`); | |
| 11143 | + return new Error("Invalid prop ".concat(propName, " passed to ").concat(componentName, " - do not set this, set it on the child.")); | |
| 10879 | 11144 | } |
| 10880 | 11145 | } |
| 10881 | 11146 | |
| 10882 | 11147 | /***/ }), |
| 10883 | 11148 | |
| 10884 | -/***/ "../node_modules/react-draggable/node_modules/clsx/dist/clsx.js": | |
| 10885 | -/*!**********************************************************************!*\ | |
| 10886 | - !*** ../node_modules/react-draggable/node_modules/clsx/dist/clsx.js ***! | |
| 10887 | - \**********************************************************************/ | |
| 11149 | +/***/ "../node_modules/react-is/cjs/react-is.development.js": | |
| 11150 | +/*!************************************************************!*\ | |
| 11151 | + !*** ../node_modules/react-is/cjs/react-is.development.js ***! | |
| 11152 | + \************************************************************/ | |
| 11153 | +/***/ ((__unused_webpack_module, exports) => { | |
| 11154 | + | |
| 11155 | +"use strict"; | |
| 11156 | +/** | |
| 11157 | + * @license React | |
| 11158 | + * react-is.development.js | |
| 11159 | + * | |
| 11160 | + * Copyright (c) Facebook, Inc. and its affiliates. | |
| 11161 | + * | |
| 11162 | + * This source code is licensed under the MIT license found in the | |
| 11163 | + * LICENSE file in the root directory of this source tree. | |
| 11164 | + */ | |
| 11165 | + | |
| 11166 | + | |
| 11167 | + | |
| 11168 | +if (true) { | |
| 11169 | + (function() { | |
| 11170 | +'use strict'; | |
| 11171 | + | |
| 11172 | +// ATTENTION | |
| 11173 | +// When adding new symbols to this file, | |
| 11174 | +// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' | |
| 11175 | +// The Symbol used to tag the ReactElement-like types. | |
| 11176 | +var REACT_ELEMENT_TYPE = Symbol.for('react.element'); | |
| 11177 | +var REACT_PORTAL_TYPE = Symbol.for('react.portal'); | |
| 11178 | +var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'); | |
| 11179 | +var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode'); | |
| 11180 | +var REACT_PROFILER_TYPE = Symbol.for('react.profiler'); | |
| 11181 | +var REACT_PROVIDER_TYPE = Symbol.for('react.provider'); | |
| 11182 | +var REACT_CONTEXT_TYPE = Symbol.for('react.context'); | |
| 11183 | +var REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context'); | |
| 11184 | +var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref'); | |
| 11185 | +var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense'); | |
| 11186 | +var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list'); | |
| 11187 | +var REACT_MEMO_TYPE = Symbol.for('react.memo'); | |
| 11188 | +var REACT_LAZY_TYPE = Symbol.for('react.lazy'); | |
| 11189 | +var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen'); | |
| 11190 | + | |
| 11191 | +// ----------------------------------------------------------------------------- | |
| 11192 | + | |
| 11193 | +var enableScopeAPI = false; // Experimental Create Event Handle API. | |
| 11194 | +var enableCacheElement = false; | |
| 11195 | +var enableTransitionTracing = false; // No known bugs, but needs performance testing | |
| 11196 | + | |
| 11197 | +var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber | |
| 11198 | +// stuff. Intended to enable React core members to more easily debug scheduling | |
| 11199 | +// issues in DEV builds. | |
| 11200 | + | |
| 11201 | +var enableDebugTracing = false; // Track which Fiber(s) schedule render work. | |
| 11202 | + | |
| 11203 | +var REACT_MODULE_REFERENCE; | |
| 11204 | + | |
| 11205 | +{ | |
| 11206 | + REACT_MODULE_REFERENCE = Symbol.for('react.module.reference'); | |
| 11207 | +} | |
| 11208 | + | |
| 11209 | +function isValidElementType(type) { | |
| 11210 | + if (typeof type === 'string' || typeof type === 'function') { | |
| 11211 | + return true; | |
| 11212 | + } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill). | |
| 11213 | + | |
| 11214 | + | |
| 11215 | + if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) { | |
| 11216 | + return true; | |
| 11217 | + } | |
| 11218 | + | |
| 11219 | + if (typeof type === 'object' && type !== null) { | |
| 11220 | + 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 || // This needs to include all possible module reference object | |
| 11221 | + // types supported by any Flight configuration anywhere since | |
| 11222 | + // we don't know which Flight build this will end up being used | |
| 11223 | + // with. | |
| 11224 | + type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) { | |
| 11225 | + return true; | |
| 11226 | + } | |
| 11227 | + } | |
| 11228 | + | |
| 11229 | + return false; | |
| 11230 | +} | |
| 11231 | + | |
| 11232 | +function typeOf(object) { | |
| 11233 | + if (typeof object === 'object' && object !== null) { | |
| 11234 | + var $$typeof = object.$$typeof; | |
| 11235 | + | |
| 11236 | + switch ($$typeof) { | |
| 11237 | + case REACT_ELEMENT_TYPE: | |
| 11238 | + var type = object.type; | |
| 11239 | + | |
| 11240 | + switch (type) { | |
| 11241 | + case REACT_FRAGMENT_TYPE: | |
| 11242 | + case REACT_PROFILER_TYPE: | |
| 11243 | + case REACT_STRICT_MODE_TYPE: | |
| 11244 | + case REACT_SUSPENSE_TYPE: | |
| 11245 | + case REACT_SUSPENSE_LIST_TYPE: | |
| 11246 | + return type; | |
| 11247 | + | |
| 11248 | + default: | |
| 11249 | + var $$typeofType = type && type.$$typeof; | |
| 11250 | + | |
| 11251 | + switch ($$typeofType) { | |
| 11252 | + case REACT_SERVER_CONTEXT_TYPE: | |
| 11253 | + case REACT_CONTEXT_TYPE: | |
| 11254 | + case REACT_FORWARD_REF_TYPE: | |
| 11255 | + case REACT_LAZY_TYPE: | |
| 11256 | + case REACT_MEMO_TYPE: | |
| 11257 | + case REACT_PROVIDER_TYPE: | |
| 11258 | + return $$typeofType; | |
| 11259 | + | |
| 11260 | + default: | |
| 11261 | + return $$typeof; | |
| 11262 | + } | |
| 11263 | + | |
| 11264 | + } | |
| 11265 | + | |
| 11266 | + case REACT_PORTAL_TYPE: | |
| 11267 | + return $$typeof; | |
| 11268 | + } | |
| 11269 | + } | |
| 11270 | + | |
| 11271 | + return undefined; | |
| 11272 | +} | |
| 11273 | +var ContextConsumer = REACT_CONTEXT_TYPE; | |
| 11274 | +var ContextProvider = REACT_PROVIDER_TYPE; | |
| 11275 | +var Element = REACT_ELEMENT_TYPE; | |
| 11276 | +var ForwardRef = REACT_FORWARD_REF_TYPE; | |
| 11277 | +var Fragment = REACT_FRAGMENT_TYPE; | |
| 11278 | +var Lazy = REACT_LAZY_TYPE; | |
| 11279 | +var Memo = REACT_MEMO_TYPE; | |
| 11280 | +var Portal = REACT_PORTAL_TYPE; | |
| 11281 | +var Profiler = REACT_PROFILER_TYPE; | |
| 11282 | +var StrictMode = REACT_STRICT_MODE_TYPE; | |
| 11283 | +var Suspense = REACT_SUSPENSE_TYPE; | |
| 11284 | +var SuspenseList = REACT_SUSPENSE_LIST_TYPE; | |
| 11285 | +var hasWarnedAboutDeprecatedIsAsyncMode = false; | |
| 11286 | +var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated | |
| 11287 | + | |
| 11288 | +function isAsyncMode(object) { | |
| 11289 | + { | |
| 11290 | + if (!hasWarnedAboutDeprecatedIsAsyncMode) { | |
| 11291 | + hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint | |
| 11292 | + | |
| 11293 | + console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.'); | |
| 11294 | + } | |
| 11295 | + } | |
| 11296 | + | |
| 11297 | + return false; | |
| 11298 | +} | |
| 11299 | +function isConcurrentMode(object) { | |
| 11300 | + { | |
| 11301 | + if (!hasWarnedAboutDeprecatedIsConcurrentMode) { | |
| 11302 | + hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint | |
| 11303 | + | |
| 11304 | + console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.'); | |
| 11305 | + } | |
| 11306 | + } | |
| 11307 | + | |
| 11308 | + return false; | |
| 11309 | +} | |
| 11310 | +function isContextConsumer(object) { | |
| 11311 | + return typeOf(object) === REACT_CONTEXT_TYPE; | |
| 11312 | +} | |
| 11313 | +function isContextProvider(object) { | |
| 11314 | + return typeOf(object) === REACT_PROVIDER_TYPE; | |
| 11315 | +} | |
| 11316 | +function isElement(object) { | |
| 11317 | + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | |
| 11318 | +} | |
| 11319 | +function isForwardRef(object) { | |
| 11320 | + return typeOf(object) === REACT_FORWARD_REF_TYPE; | |
| 11321 | +} | |
| 11322 | +function isFragment(object) { | |
| 11323 | + return typeOf(object) === REACT_FRAGMENT_TYPE; | |
| 11324 | +} | |
| 11325 | +function isLazy(object) { | |
| 11326 | + return typeOf(object) === REACT_LAZY_TYPE; | |
| 11327 | +} | |
| 11328 | +function isMemo(object) { | |
| 11329 | + return typeOf(object) === REACT_MEMO_TYPE; | |
| 11330 | +} | |
| 11331 | +function isPortal(object) { | |
| 11332 | + return typeOf(object) === REACT_PORTAL_TYPE; | |
| 11333 | +} | |
| 11334 | +function isProfiler(object) { | |
| 11335 | + return typeOf(object) === REACT_PROFILER_TYPE; | |
| 11336 | +} | |
| 11337 | +function isStrictMode(object) { | |
| 11338 | + return typeOf(object) === REACT_STRICT_MODE_TYPE; | |
| 11339 | +} | |
| 11340 | +function isSuspense(object) { | |
| 11341 | + return typeOf(object) === REACT_SUSPENSE_TYPE; | |
| 11342 | +} | |
| 11343 | +function isSuspenseList(object) { | |
| 11344 | + return typeOf(object) === REACT_SUSPENSE_LIST_TYPE; | |
| 11345 | +} | |
| 11346 | + | |
| 11347 | +exports.ContextConsumer = ContextConsumer; | |
| 11348 | +exports.ContextProvider = ContextProvider; | |
| 11349 | +exports.Element = Element; | |
| 11350 | +exports.ForwardRef = ForwardRef; | |
| 11351 | +exports.Fragment = Fragment; | |
| 11352 | +exports.Lazy = Lazy; | |
| 11353 | +exports.Memo = Memo; | |
| 11354 | +exports.Portal = Portal; | |
| 11355 | +exports.Profiler = Profiler; | |
| 11356 | +exports.StrictMode = StrictMode; | |
| 11357 | +exports.Suspense = Suspense; | |
| 11358 | +exports.SuspenseList = SuspenseList; | |
| 11359 | +exports.isAsyncMode = isAsyncMode; | |
| 11360 | +exports.isConcurrentMode = isConcurrentMode; | |
| 11361 | +exports.isContextConsumer = isContextConsumer; | |
| 11362 | +exports.isContextProvider = isContextProvider; | |
| 11363 | +exports.isElement = isElement; | |
| 11364 | +exports.isForwardRef = isForwardRef; | |
| 11365 | +exports.isFragment = isFragment; | |
| 11366 | +exports.isLazy = isLazy; | |
| 11367 | +exports.isMemo = isMemo; | |
| 11368 | +exports.isPortal = isPortal; | |
| 11369 | +exports.isProfiler = isProfiler; | |
| 11370 | +exports.isStrictMode = isStrictMode; | |
| 11371 | +exports.isSuspense = isSuspense; | |
| 11372 | +exports.isSuspenseList = isSuspenseList; | |
| 11373 | +exports.isValidElementType = isValidElementType; | |
| 11374 | +exports.typeOf = typeOf; | |
| 11375 | + })(); | |
| 11376 | +} | |
| 11377 | + | |
| 11378 | + | |
| 11379 | +/***/ }), | |
| 11380 | + | |
| 11381 | +/***/ "../node_modules/react-is/index.js": | |
| 11382 | +/*!*****************************************!*\ | |
| 11383 | + !*** ../node_modules/react-is/index.js ***! | |
| 11384 | + \*****************************************/ | |
| 11385 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 11386 | + | |
| 11387 | +"use strict"; | |
| 11388 | + | |
| 11389 | + | |
| 11390 | +if (false) {} else { | |
| 11391 | + module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/react-is/cjs/react-is.development.js"); | |
| 11392 | +} | |
| 11393 | + | |
| 11394 | + | |
| 11395 | +/***/ }), | |
| 11396 | + | |
| 11397 | +/***/ "../node_modules/shallowequal/index.js": | |
| 11398 | +/*!*********************************************!*\ | |
| 11399 | + !*** ../node_modules/shallowequal/index.js ***! | |
| 11400 | + \*********************************************/ | |
| 10888 | 11401 | /***/ ((module) => { |
| 10889 | 11402 | |
| 10890 | -function r(e){var o,t,f="";if("string"==typeof e||"number"==typeof e)f+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(o=0;o<n;o++)e[o]&&(t=r(e[o]))&&(f&&(f+=" "),f+=t)}else for(t in e)e[t]&&(f&&(f+=" "),f+=t);return f}function e(){for(var e,o,t=0,f="",n=arguments.length;t<n;t++)(e=arguments[t])&&(o=r(e))&&(f&&(f+=" "),f+=o);return f}module.exports=e,module.exports.clsx=e; | |
| 11403 | +// | |
| 10891 | 11404 | |
| 11405 | +module.exports = function shallowEqual(objA, objB, compare, compareContext) { | |
| 11406 | + var ret = compare ? compare.call(compareContext, objA, objB) : void 0; | |
| 11407 | + | |
| 11408 | + if (ret !== void 0) { | |
| 11409 | + return !!ret; | |
| 11410 | + } | |
| 11411 | + | |
| 11412 | + if (objA === objB) { | |
| 11413 | + return true; | |
| 11414 | + } | |
| 11415 | + | |
| 11416 | + if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) { | |
| 11417 | + return false; | |
| 11418 | + } | |
| 11419 | + | |
| 11420 | + var keysA = Object.keys(objA); | |
| 11421 | + var keysB = Object.keys(objB); | |
| 11422 | + | |
| 11423 | + if (keysA.length !== keysB.length) { | |
| 11424 | + return false; | |
| 11425 | + } | |
| 11426 | + | |
| 11427 | + var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); | |
| 11428 | + | |
| 11429 | + // Test for A's keys different from B. | |
| 11430 | + for (var idx = 0; idx < keysA.length; idx++) { | |
| 11431 | + var key = keysA[idx]; | |
| 11432 | + | |
| 11433 | + if (!bHasOwnProperty(key)) { | |
| 11434 | + return false; | |
| 11435 | + } | |
| 11436 | + | |
| 11437 | + var valueA = objA[key]; | |
| 11438 | + var valueB = objB[key]; | |
| 11439 | + | |
| 11440 | + ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0; | |
| 11441 | + | |
| 11442 | + if (ret === false || (ret === void 0 && valueA !== valueB)) { | |
| 11443 | + return false; | |
| 11444 | + } | |
| 11445 | + } | |
| 11446 | + | |
| 11447 | + return true; | |
| 11448 | +}; | |
| 11449 | + | |
| 11450 | + | |
| 10892 | 11451 | /***/ }), |
| 10893 | 11452 | |
| 11453 | +/***/ "../node_modules/styled-components/dist/styled-components.browser.esm.js": | |
| 11454 | +/*!*******************************************************************************!*\ | |
| 11455 | + !*** ../node_modules/styled-components/dist/styled-components.browser.esm.js ***! | |
| 11456 | + \*******************************************************************************/ | |
| 11457 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 11458 | + | |
| 11459 | +"use strict"; | |
| 11460 | +__webpack_require__.r(__webpack_exports__); | |
| 11461 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 11462 | +/* harmony export */ ServerStyleSheet: () => (/* binding */ Ue), | |
| 11463 | +/* harmony export */ StyleSheetConsumer: () => (/* binding */ ue), | |
| 11464 | +/* harmony export */ StyleSheetContext: () => (/* binding */ ce), | |
| 11465 | +/* harmony export */ StyleSheetManager: () => (/* binding */ me), | |
| 11466 | +/* harmony export */ ThemeConsumer: () => (/* binding */ Ge), | |
| 11467 | +/* harmony export */ ThemeContext: () => (/* binding */ Me), | |
| 11468 | +/* harmony export */ ThemeProvider: () => (/* binding */ Le), | |
| 11469 | +/* harmony export */ __PRIVATE__: () => (/* binding */ Ze), | |
| 11470 | +/* harmony export */ createGlobalStyle: () => (/* binding */ $e), | |
| 11471 | +/* harmony export */ css: () => (/* binding */ Ae), | |
| 11472 | +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), | |
| 11473 | +/* harmony export */ isStyledComponent: () => (/* binding */ _), | |
| 11474 | +/* harmony export */ keyframes: () => (/* binding */ We), | |
| 11475 | +/* harmony export */ useTheme: () => (/* binding */ Xe), | |
| 11476 | +/* harmony export */ version: () => (/* binding */ A), | |
| 11477 | +/* harmony export */ withTheme: () => (/* binding */ Je) | |
| 11478 | +/* harmony export */ }); | |
| 11479 | +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-is */ "../node_modules/react-is/index.js"); | |
| 11480 | +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); | |
| 11481 | +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); | |
| 11482 | +/* harmony import */ var shallowequal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! shallowequal */ "../node_modules/shallowequal/index.js"); | |
| 11483 | +/* harmony import */ var shallowequal__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(shallowequal__WEBPACK_IMPORTED_MODULE_2__); | |
| 11484 | +/* harmony import */ var _emotion_stylis__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/stylis */ "../node_modules/@emotion/stylis/dist/stylis.browser.esm.js"); | |
| 11485 | +/* harmony import */ var _emotion_unitless__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @emotion/unitless */ "../node_modules/styled-components/node_modules/@emotion/unitless/dist/unitless.browser.esm.js"); | |
| 11486 | +/* harmony import */ var _emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @emotion/is-prop-valid */ "../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js"); | |
| 11487 | +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! hoist-non-react-statics */ "../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"); | |
| 11488 | +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_6__); | |
| 11489 | +function y(){return(y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var v=function(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n},g=function(t){return null!==t&&"object"==typeof t&&"[object Object]"===(t.toString?t.toString():Object.prototype.toString.call(t))&&!(0,react_is__WEBPACK_IMPORTED_MODULE_0__.typeOf)(t)},S=Object.freeze([]),w=Object.freeze({});function E(e){return"function"==typeof e}function b(e){return true&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function _(e){return e&&"string"==typeof e.styledComponentId}var N="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",A="5.3.11",C="undefined"!=typeof window&&"HTMLElement"in window,I=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&(void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!=="development")),P={},O= true?{1:"Cannot create styled-component for component: %s.\n\n",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",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",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",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",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",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",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",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",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",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\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n"}:0;function R(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n<r;n+=1)t.push(n<0||arguments.length<=n?void 0:arguments[n]);return t.forEach((function(t){e=e.replace(/%[a-z]/,t)})),e}function D(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw false?0:new Error(R.apply(void 0,[O[e]].concat(n)).trim())}var j=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&D(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0}for(var i=this.indexOfGroup(e+1),a=0,c=t.length;a<c;a++)this.tag.insertRule(i,t[a])&&(this.groupSizes[e]++,i++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+=this.tag.getRule(s)+"/*!sc*/\n";return t},e}(),T=new Map,x=new Map,k=1,V=function(e){if(T.has(e))return T.get(e);for(;x.has(k);)k++;var t=k++;return true&&((0|t)<0||t>1<<30)&&D(16,""+t),T.set(e,t),x.set(t,e),t},B=function(e){return x.get(e)},z=function(e,t){t>=k&&(k=t+1),T.set(e,t),x.set(t,e)},M="style["+N+'][data-styled-version="5.3.11"]',G=new RegExp("^"+N+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),L=function(e,t,n){for(var r,o=n.split(","),s=0,i=o.length;s<i;s++)(r=o[s])&&e.registerName(t,r)},F=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],o=0,s=n.length;o<s;o++){var i=n[o].trim();if(i){var a=i.match(G);if(a){var c=0|parseInt(a[1],10),u=a[2];0!==c&&(z(u,c),L(e,u,a[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(i)}}},Y=function(){return true?__webpack_require__.nc:0},q=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(N))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(N,"active"),r.setAttribute("data-styled-version","5.3.11");var i=Y();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},H=function(){function e(e){var t=this.element=q(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}D(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),$=function(){function e(e){var t=this.element=q(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),W=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),U=C,J={isServer:!C,useCSSOMInjection:!I},X=function(){function e(e,t,n){void 0===e&&(e=w),void 0===t&&(t={}),this.options=y({},J,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&C&&U&&(U=!1,function(e){for(var t=document.querySelectorAll(M),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(N)&&(F(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return V(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(y({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,o=t.target,e=n?new W(o):r?new H(o):new $(o),new j(e)));var e,t,n,r,o},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(V(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(V(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(V(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=0;o<n;o++){var s=B(o);if(void 0!==s){var i=e.names.get(s),a=t.getGroup(o);if(i&&a&&i.size){var c=N+".g"+o+'[id="'+s+'"]',u="";void 0!==i&&i.forEach((function(e){e.length>0&&(u+=e+",")})),r+=""+a+c+'{content:"'+u+'"}/*!sc*/\n'}}}return r}(this)},e}(),Z=/(a)(d)/gi,K=function(e){return String.fromCharCode(e+(e>25?39:97))};function Q(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=K(t%52)+n;return(K(t%52)+n).replace(Z,"$1-$2")}var ee=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},te=function(e){return ee(5381,e)};function ne(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(E(n)&&!_(n))return!1}return!0}var re=te("5.3.11"),oe=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic= false&&0,this.componentId=t,this.baseHash=ee(re,t),this.baseStyle=n,X.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var s=_e(this.rules,e,t,n).join(""),i=Q(ee(this.baseHash,s)>>>0);if(!t.hasNameForId(r,i)){var a=n(s,"."+i,void 0,r);t.insertRules(r,i,a)}o.push(i),this.staticRulesId=i}else{for(var c=this.rules.length,u=ee(this.baseHash,n.hash),l="",d=0;d<c;d++){var h=this.rules[d];if("string"==typeof h)l+=h, true&&(u=ee(u,h+d));else if(h){var p=_e(h,e,t,n),f=Array.isArray(p)?p.join(""):p;u=ee(u,f+d),l+=f}}if(l){var m=Q(u>>>0);if(!t.hasNameForId(r,m)){var y=n(l,"."+m,void 0,r);t.insertRules(r,m,y)}o.push(m)}}return o.join(" ")},e}(),se=/^\s*\/\/.*$/gm,ie=[":","[",".","#"];function ae(e){var t,n,r,o,s=void 0===e?w:e,i=s.options,a=void 0===i?w:i,c=s.plugins,u=void 0===c?S:c,l=new _emotion_stylis__WEBPACK_IMPORTED_MODULE_3__["default"](a),d=[],p=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,s,i,a,c,u,l,d){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===u)return r+"/*|*/";break;case 3:switch(u){case 102:case 112:return e(o[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){d.push(e)})),f=function(e,r,s){return 0===r&&-1!==ie.indexOf(s[n.length])||s.match(o)?e:"."+t};function m(e,s,i,a){void 0===a&&(a="&");var c=e.replace(se,""),u=s&&i?i+" "+s+" { "+c+" }":c;return t=a,n=s,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),l(i||!s?"":s,u)}return l.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,f))},p,function(e){if(-2===e){var t=d;return d=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||D(15),ee(e,t.name)}),5381).toString():"",m}var ce=react__WEBPACK_IMPORTED_MODULE_1___default().createContext(),ue=ce.Consumer,le=react__WEBPACK_IMPORTED_MODULE_1___default().createContext(),de=(le.Consumer,new X),he=ae();function pe(){return (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(ce)||de}function fe(){return (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(le)||he}function me(e){var t=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(e.stylisPlugins),n=t[0],s=t[1],c=pe(),u=(0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)((function(){var t=c;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=(0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)((function(){return ae({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)((function(){shallowequal__WEBPACK_IMPORTED_MODULE_2___default()(n,e.stylisPlugins)||s(e.stylisPlugins)}),[e.stylisPlugins]),react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ce.Provider,{value:u},react__WEBPACK_IMPORTED_MODULE_1___default().createElement(le.Provider,{value:l}, true?react__WEBPACK_IMPORTED_MODULE_1___default().Children.only(e.children):0))}var ye=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=he);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return D(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=he),this.name+e.hash},e}(),ve=/([A-Z])/,ge=/([A-Z])/g,Se=/^ms-/,we=function(e){return"-"+e.toLowerCase()};function Ee(e){return ve.test(e)?e.replace(ge,we).replace(Se,"-ms-"):e}var be=function(e){return null==e||!1===e||""===e};function _e(e,n,r,o){if(Array.isArray(e)){for(var s,i=[],a=0,c=e.length;a<c;a+=1)""!==(s=_e(e[a],n,r,o))&&(Array.isArray(s)?i.push.apply(i,s):i.push(s));return i}if(be(e))return"";if(_(e))return"."+e.styledComponentId;if(E(e)){if("function"!=typeof(l=e)||l.prototype&&l.prototype.isReactComponent||!n)return e;var u=e(n);return true&&(0,react_is__WEBPACK_IMPORTED_MODULE_0__.isElement)(u)&&console.warn(b(e)+" 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."),_e(u,n,r,o)}var l;return e instanceof ye?r?(e.inject(r,o),e.getName(o)):e:g(e)?function e(t,n){var r,o,s=[];for(var i in t)t.hasOwnProperty(i)&&!be(t[i])&&(Array.isArray(t[i])&&t[i].isCss||E(t[i])?s.push(Ee(i)+":",t[i],";"):g(t[i])?s.push.apply(s,e(t[i],i)):s.push(Ee(i)+": "+(r=i,null==(o=t[i])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||r in _emotion_unitless__WEBPACK_IMPORTED_MODULE_4__["default"]||r.startsWith("--")?String(o).trim():o+"px")+";"));return n?[n+" {"].concat(s,["}"]):s}(e):e.toString()}var Ne=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function Ae(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return E(e)||g(e)?Ne(_e(v(S,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:Ne(_e(v(e,n)))}var Ce=/invalid hook call/i,Ie=new Set,Pe=function(e,t){if(true){var n="The component "+e+(t?' with the id of "'+t+'"':"")+" has been created dynamically.\nYou may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",r=console.error;try{var o=!0;console.error=function(e){if(Ce.test(e))o=!1,Ie.delete(n);else{for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];r.apply(void 0,[e].concat(s))}},(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(),o&&!Ie.has(n)&&(console.warn(n),Ie.add(n))}catch(e){Ce.test(e.message)&&Ie.delete(n)}finally{console.error=r}}},Oe=function(e,t,n){return void 0===n&&(n=w),e.theme!==n.theme&&e.theme||t||n.theme},Re=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,De=/(^-|-$)/g;function je(e){return e.replace(Re,"-").replace(De,"")}var Te=function(e){return Q(te(e)>>>0)};function xe(e){return"string"==typeof e&&( false||e.charAt(0)===e.charAt(0).toLowerCase())}var ke=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Ve=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Be(e,t,n){var r=e[n];ke(t)&&ke(r)?ze(r,t):e[n]=t}function ze(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,s=n;o<s.length;o++){var i=s[o];if(ke(i))for(var a in i)Ve(a)&&Be(e,i[a],a)}return e}var Me=react__WEBPACK_IMPORTED_MODULE_1___default().createContext(),Ge=Me.Consumer;function Le(e){var t=(0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(Me),n=(0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)((function(){return function(e,t){if(!e)return D(14);if(E(e)){var n=e(t);return false||null!==n&&!Array.isArray(n)&&"object"==typeof n?n:D(7)}return Array.isArray(e)||"object"!=typeof e?D(8):t?y({},t,{},e):e}(e.theme,t)}),[e.theme,t]);return e.children?react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Me.Provider,{value:n},e.children):null}var Fe={};function Ye(e,t,n){var o=_(e),i=!xe(e),a=t.attrs,c=void 0===a?S:a,l=t.componentId,d=void 0===l?function(e,t){var n="string"!=typeof e?"sc":je(e);Fe[n]=(Fe[n]||0)+1;var r=n+"-"+Te("5.3.11"+n+Fe[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):l,h=t.displayName,p=void 0===h?function(e){return xe(e)?"styled."+e:"Styled("+b(e)+")"}(e):h,v=t.displayName&&t.componentId?je(t.displayName)+"-"+t.componentId:t.componentId||d,g=o&&e.attrs?Array.prototype.concat(e.attrs,c).filter(Boolean):c,N=t.shouldForwardProp;o&&e.shouldForwardProp&&(N=t.shouldForwardProp?function(n,r,o){return e.shouldForwardProp(n,r,o)&&t.shouldForwardProp(n,r,o)}:e.shouldForwardProp);var A,C=new oe(n,v,o?e.componentStyle:void 0),I=C.isStatic&&0===c.length,P=function(e,t){return function(e,t,n,r){var o=e.attrs,i=e.componentStyle,a=e.defaultProps,c=e.foldedComponentIds,l=e.shouldForwardProp,d=e.styledComponentId,h=e.target,p=function(e,t,n){void 0===e&&(e=w);var r=y({},t,{theme:e}),o={};return n.forEach((function(e){var t,n,s,i=e;for(t in E(i)&&(i=i(r)),i)r[t]=o[t]="className"===t?(n=o[t],s=i[t],n&&s?n+" "+s:n||s):i[t]})),[r,o]}(Oe(t,(0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(Me),a)||w,t,o),m=p[0],v=p[1],g=function(e,t,n,r){var o=pe(),s=fe(),i=t?e.generateAndInjectStyles(w,o,s):e.generateAndInjectStyles(n,o,s);return true&&!t&&r&&r(i),i}(i,r,m, true?e.warnTooManyClasses:0),S=n,b=v.$as||t.$as||v.as||t.as||h,_=xe(b),N=v!==t?y({},t,{},v):t,A={};for(var C in N)"$"!==C[0]&&"as"!==C&&("forwardedAs"===C?A.as=N[C]:(l?l(C,_emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_5__["default"],b):!_||(0,_emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_5__["default"])(C))&&(A[C]=N[C]));return t.style&&v.style!==t.style&&(A.style=y({},t.style,{},v.style)),A.className=Array.prototype.concat(c,d,g!==d?g:null,t.className,v.className).filter(Boolean).join(" "),A.ref=S,(0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(b,A)}(A,e,t,I)};return P.displayName=p,(A=react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(P)).attrs=g,A.componentStyle=C,A.displayName=p,A.shouldForwardProp=N,A.foldedComponentIds=o?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):S,A.styledComponentId=v,A.target=o?e.target:e,A.withComponent=function(e){var r=t.componentId,o=function(e,t){if(null==e)return{};var n,r,o={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["componentId"]),s=r&&r+"-"+(xe(e)?e:je(b(e)));return Ye(e,y({},o,{attrs:g,componentId:s}),n)},Object.defineProperty(A,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=o?ze({},e.defaultProps,t):t}}), true&&(Pe(p,v),A.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'+t+'"':"";console.warn("Over 200 classes were generated for component "+e+s+".\nConsider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=!0,n={}}}}(p,v)),Object.defineProperty(A,"toString",{value:function(){return"."+A.styledComponentId}}),i&&hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_6___default()(A,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),A}var qe=function(e){return function e(t,r,o){if(void 0===o&&(o=w),!(0,react_is__WEBPACK_IMPORTED_MODULE_0__.isValidElementType)(r))return D(1,String(r));var s=function(){return t(r,o,Ae.apply(void 0,arguments))};return s.withConfig=function(n){return e(t,r,y({},o,{},n))},s.attrs=function(n){return e(t,r,y({},o,{attrs:Array.prototype.concat(o.attrs,n).filter(Boolean)}))},s}(Ye,e)};["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","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){qe[e]=qe(e)}));var He=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=ne(e),X.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var o=r(_e(this.rules,t,n,r).join(""),""),s=this.componentId+e;n.insertRules(s,s,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&X.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function $e(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var i=Ae.apply(void 0,[e].concat(n)),a="sc-global-"+Te(JSON.stringify(i)),u=new He(i,a);function d(e){var t=pe(),n=fe(),o=(0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(Me),d=(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(t.allocateGSInstance(a)).current;return true&&react__WEBPACK_IMPORTED_MODULE_1___default().Children.count(e.children)&&console.warn("The global style component "+a+" was given child JSX. createGlobalStyle does not render children."), true&&i.some((function(e){return"string"==typeof e&&-1!==e.indexOf("@import")}))&&console.warn("Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app."),t.server&&h(d,e,t,o,n),(0,react__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect)((function(){if(!t.server)return h(d,e,t,o,n),function(){return u.removeStyles(d,t)}}),[d,e,t,o,n]),null}function h(e,t,n,r,o){if(u.isStatic)u.renderStyles(e,P,n,o);else{var s=y({},t,{theme:Oe(t,r,d.defaultProps)});u.renderStyles(e,s,n,o)}}return true&&Pe(a),react__WEBPACK_IMPORTED_MODULE_1___default().memo(d)}function We(e){ true&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Ae.apply(void 0,[e].concat(n)).join(""),s=Te(o);return new ye(s,o)}var Ue=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=Y();return"<style "+[n&&'nonce="'+n+'"',N+'="true"','data-styled-version="5.3.11"'].filter(Boolean).join(" ")+">"+t+"</style>"},this.getStyleTags=function(){return e.sealed?D(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return D(2);var n=((t={})[N]="",t["data-styled-version"]="5.3.11",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),o=Y();return o&&(n.nonce=o),[react__WEBPACK_IMPORTED_MODULE_1___default().createElement("style",y({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new X({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?D(2):react__WEBPACK_IMPORTED_MODULE_1___default().createElement(me,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return D(3)},e}(),Je=function(e){var t=react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef((function(t,n){var o=(0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(Me),i=e.defaultProps,a=Oe(t,o,i);return true&&void 0===a&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'+b(e)+'"'),react__WEBPACK_IMPORTED_MODULE_1___default().createElement(e,y({},t,{theme:a,ref:n}))}));return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_6___default()(t,e),t.displayName="WithTheme("+b(e)+")",t},Xe=function(){return (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(Me)},Ze={StyleSheet:X,masterSheet:de}; true&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native"), true&&"undefined"!=typeof window&&(window["__styled-components-init__"]=window["__styled-components-init__"]||0,1===window["__styled-components-init__"]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window["__styled-components-init__"]+=1);/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (qe); | |
| 11490 | +//# sourceMappingURL=styled-components.browser.esm.js.map | |
| 11491 | + | |
| 11492 | + | |
| 11493 | +/***/ }), | |
| 11494 | + | |
| 11495 | +/***/ "../node_modules/styled-components/node_modules/@emotion/unitless/dist/unitless.browser.esm.js": | |
| 11496 | +/*!*****************************************************************************************************!*\ | |
| 11497 | + !*** ../node_modules/styled-components/node_modules/@emotion/unitless/dist/unitless.browser.esm.js ***! | |
| 11498 | + \*****************************************************************************************************/ | |
| 11499 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 11500 | + | |
| 11501 | +"use strict"; | |
| 11502 | +__webpack_require__.r(__webpack_exports__); | |
| 11503 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 11504 | +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) | |
| 11505 | +/* harmony export */ }); | |
| 11506 | +var unitlessKeys = { | |
| 11507 | + animationIterationCount: 1, | |
| 11508 | + borderImageOutset: 1, | |
| 11509 | + borderImageSlice: 1, | |
| 11510 | + borderImageWidth: 1, | |
| 11511 | + boxFlex: 1, | |
| 11512 | + boxFlexGroup: 1, | |
| 11513 | + boxOrdinalGroup: 1, | |
| 11514 | + columnCount: 1, | |
| 11515 | + columns: 1, | |
| 11516 | + flex: 1, | |
| 11517 | + flexGrow: 1, | |
| 11518 | + flexPositive: 1, | |
| 11519 | + flexShrink: 1, | |
| 11520 | + flexNegative: 1, | |
| 11521 | + flexOrder: 1, | |
| 11522 | + gridRow: 1, | |
| 11523 | + gridRowEnd: 1, | |
| 11524 | + gridRowSpan: 1, | |
| 11525 | + gridRowStart: 1, | |
| 11526 | + gridColumn: 1, | |
| 11527 | + gridColumnEnd: 1, | |
| 11528 | + gridColumnSpan: 1, | |
| 11529 | + gridColumnStart: 1, | |
| 11530 | + msGridRow: 1, | |
| 11531 | + msGridRowSpan: 1, | |
| 11532 | + msGridColumn: 1, | |
| 11533 | + msGridColumnSpan: 1, | |
| 11534 | + fontWeight: 1, | |
| 11535 | + lineHeight: 1, | |
| 11536 | + opacity: 1, | |
| 11537 | + order: 1, | |
| 11538 | + orphans: 1, | |
| 11539 | + tabSize: 1, | |
| 11540 | + widows: 1, | |
| 11541 | + zIndex: 1, | |
| 11542 | + zoom: 1, | |
| 11543 | + WebkitLineClamp: 1, | |
| 11544 | + // SVG-related properties | |
| 11545 | + fillOpacity: 1, | |
| 11546 | + floodOpacity: 1, | |
| 11547 | + stopOpacity: 1, | |
| 11548 | + strokeDasharray: 1, | |
| 11549 | + strokeDashoffset: 1, | |
| 11550 | + strokeMiterlimit: 1, | |
| 11551 | + strokeOpacity: 1, | |
| 11552 | + strokeWidth: 1 | |
| 11553 | +}; | |
| 11554 | + | |
| 11555 | +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (unitlessKeys); | |
| 11556 | + | |
| 11557 | + | |
| 11558 | +/***/ }), | |
| 11559 | + | |
| 10894 | 11560 | /***/ "../node_modules/validator/lib/isFQDN.js": |
| 10895 | 11561 | /*!***********************************************!*\ |
| 10896 | 11562 | !*** ../node_modules/validator/lib/isFQDN.js ***! |
| 10897 | 11563 | \***********************************************/ |
| @@ -10903,11 +11569,15 @@ | ||
| 10903 | 11569 | Object.defineProperty(exports, "__esModule", ({ |
| 10904 | 11570 | value: true |
| 10905 | 11571 | })); |
| 10906 | 11572 | exports["default"] = isFQDN; |
| 11573 | + | |
| 10907 | 11574 | var _assertString = _interopRequireDefault(__webpack_require__(/*! ./util/assertString */ "../node_modules/validator/lib/util/assertString.js")); |
| 11575 | + | |
| 10908 | 11576 | var _merge = _interopRequireDefault(__webpack_require__(/*! ./util/merge */ "../node_modules/validator/lib/util/merge.js")); |
| 10909 | -function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } | |
| 11577 | + | |
| 11578 | +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
| 11579 | + | |
| 10910 | 11580 | var default_fqdn_options = { |
| 10911 | 11581 | require_tld: true, |
| 10912 | 11582 | allow_underscores: false, |
| 10913 | 11583 | allow_trailing_dot: false, |
| @@ -10914,65 +11584,75 @@ | ||
| 10914 | 11584 | allow_numeric_tld: false, |
| 10915 | 11585 | allow_wildcard: false, |
| 10916 | 11586 | ignore_max_length: false |
| 10917 | 11587 | }; |
| 11588 | + | |
| 10918 | 11589 | function isFQDN(str, options) { |
| 10919 | 11590 | (0, _assertString.default)(str); |
| 10920 | 11591 | options = (0, _merge.default)(options, default_fqdn_options); |
| 11592 | + /* Remove the optional trailing dot before checking validity */ | |
| 10921 | 11593 | |
| 10922 | - /* Remove the optional trailing dot before checking validity */ | |
| 10923 | 11594 | if (options.allow_trailing_dot && str[str.length - 1] === '.') { |
| 10924 | 11595 | str = str.substring(0, str.length - 1); |
| 10925 | 11596 | } |
| 11597 | + /* Remove the optional wildcard before checking validity */ | |
| 10926 | 11598 | |
| 10927 | - /* Remove the optional wildcard before checking validity */ | |
| 11599 | + | |
| 10928 | 11600 | if (options.allow_wildcard === true && str.indexOf('*.') === 0) { |
| 10929 | 11601 | str = str.substring(2); |
| 10930 | 11602 | } |
| 11603 | + | |
| 10931 | 11604 | var parts = str.split('.'); |
| 10932 | 11605 | var tld = parts[parts.length - 1]; |
| 11606 | + | |
| 10933 | 11607 | if (options.require_tld) { |
| 10934 | 11608 | // disallow fqdns without tld |
| 10935 | 11609 | if (parts.length < 2) { |
| 10936 | 11610 | return false; |
| 10937 | 11611 | } |
| 11612 | + | |
| 10938 | 11613 | if (!options.allow_numeric_tld && !/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) { |
| 10939 | 11614 | return false; |
| 10940 | - } | |
| 11615 | + } // disallow spaces | |
| 10941 | 11616 | |
| 10942 | - // disallow spaces | |
| 11617 | + | |
| 10943 | 11618 | if (/\s/.test(tld)) { |
| 10944 | 11619 | return false; |
| 10945 | 11620 | } |
| 10946 | - } | |
| 11621 | + } // reject numeric TLDs | |
| 10947 | 11622 | |
| 10948 | - // reject numeric TLDs | |
| 11623 | + | |
| 10949 | 11624 | if (!options.allow_numeric_tld && /^\d+$/.test(tld)) { |
| 10950 | 11625 | return false; |
| 10951 | 11626 | } |
| 11627 | + | |
| 10952 | 11628 | return parts.every(function (part) { |
| 10953 | 11629 | if (part.length > 63 && !options.ignore_max_length) { |
| 10954 | 11630 | return false; |
| 10955 | 11631 | } |
| 11632 | + | |
| 10956 | 11633 | if (!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(part)) { |
| 10957 | 11634 | return false; |
| 10958 | - } | |
| 11635 | + } // disallow full-width chars | |
| 10959 | 11636 | |
| 10960 | - // disallow full-width chars | |
| 11637 | + | |
| 10961 | 11638 | if (/[\uff01-\uff5e]/.test(part)) { |
| 10962 | 11639 | return false; |
| 10963 | - } | |
| 11640 | + } // disallow parts starting or ending with hyphen | |
| 10964 | 11641 | |
| 10965 | - // disallow parts starting or ending with hyphen | |
| 11642 | + | |
| 10966 | 11643 | if (/^-|-$/.test(part)) { |
| 10967 | 11644 | return false; |
| 10968 | 11645 | } |
| 11646 | + | |
| 10969 | 11647 | if (!options.allow_underscores && /_/.test(part)) { |
| 10970 | 11648 | return false; |
| 10971 | 11649 | } |
| 11650 | + | |
| 10972 | 11651 | return true; |
| 10973 | 11652 | }); |
| 10974 | 11653 | } |
| 11654 | + | |
| 10975 | 11655 | module.exports = exports.default; |
| 10976 | 11656 | module.exports["default"] = exports.default; |
| 10977 | 11657 | |
| 10978 | 11658 | /***/ }), |
| @@ -10989,11 +11669,13 @@ | ||
| 10989 | 11669 | Object.defineProperty(exports, "__esModule", ({ |
| 10990 | 11670 | value: true |
| 10991 | 11671 | })); |
| 10992 | 11672 | exports["default"] = isIP; |
| 11673 | + | |
| 10993 | 11674 | var _assertString = _interopRequireDefault(__webpack_require__(/*! ./util/assertString */ "../node_modules/validator/lib/util/assertString.js")); |
| 10994 | -function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } | |
| 10995 | -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } | |
| 11675 | + | |
| 11676 | +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
| 11677 | + | |
| 10996 | 11678 | /** |
| 10997 | 11679 | 11.3. Examples |
| 10998 | 11680 | |
| 10999 | 11681 | The following addresses |
| @@ -11025,31 +11707,30 @@ | ||
| 11025 | 11707 | var IPv4SegmentFormat = '(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'; |
| 11026 | 11708 | var IPv4AddressFormat = "(".concat(IPv4SegmentFormat, "[.]){3}").concat(IPv4SegmentFormat); |
| 11027 | 11709 | var IPv4AddressRegExp = new RegExp("^".concat(IPv4AddressFormat, "$")); |
| 11028 | 11710 | var IPv6SegmentFormat = '(?:[0-9a-fA-F]{1,4})'; |
| 11029 | -var IPv6AddressRegExp = new RegExp('^(' + "(?:".concat(IPv6SegmentFormat, ":){7}(?:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){6}(?:").concat(IPv4AddressFormat, "|:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){5}(?::").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,2}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){4}(?:(:").concat(IPv6SegmentFormat, "){0,1}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,3}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){3}(?:(:").concat(IPv6SegmentFormat, "){0,2}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,4}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){2}(?:(:").concat(IPv6SegmentFormat, "){0,3}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,5}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){1}(?:(:").concat(IPv6SegmentFormat, "){0,4}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,6}|:)|") + "(?::((?::".concat(IPv6SegmentFormat, "){0,5}:").concat(IPv4AddressFormat, "|(?::").concat(IPv6SegmentFormat, "){1,7}|:))") + ')(%[0-9a-zA-Z.]{1,})?$'); | |
| 11030 | -function isIP(ipAddress) { | |
| 11031 | - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | |
| 11032 | - (0, _assertString.default)(ipAddress); | |
| 11711 | +var IPv6AddressRegExp = new RegExp('^(' + "(?:".concat(IPv6SegmentFormat, ":){7}(?:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){6}(?:").concat(IPv4AddressFormat, "|:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){5}(?::").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,2}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){4}(?:(:").concat(IPv6SegmentFormat, "){0,1}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,3}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){3}(?:(:").concat(IPv6SegmentFormat, "){0,2}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,4}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){2}(?:(:").concat(IPv6SegmentFormat, "){0,3}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,5}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){1}(?:(:").concat(IPv6SegmentFormat, "){0,4}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,6}|:)|") + "(?::((?::".concat(IPv6SegmentFormat, "){0,5}:").concat(IPv4AddressFormat, "|(?::").concat(IPv6SegmentFormat, "){1,7}|:))") + ')(%[0-9a-zA-Z-.:]{1,})?$'); | |
| 11033 | 11712 | |
| 11034 | - // accessing 'arguments' for backwards compatibility: isIP(ipAddress [, version]) | |
| 11035 | - // eslint-disable-next-line prefer-rest-params | |
| 11036 | - var version = (_typeof(options) === 'object' ? options.version : arguments[1]) || ''; | |
| 11713 | +function isIP(str) { | |
| 11714 | + var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; | |
| 11715 | + (0, _assertString.default)(str); | |
| 11716 | + version = String(version); | |
| 11717 | + | |
| 11037 | 11718 | if (!version) { |
| 11038 | - return isIP(ipAddress, { | |
| 11039 | - version: 4 | |
| 11040 | - }) || isIP(ipAddress, { | |
| 11041 | - version: 6 | |
| 11042 | - }); | |
| 11719 | + return isIP(str, 4) || isIP(str, 6); | |
| 11043 | 11720 | } |
| 11044 | - if (version.toString() === '4') { | |
| 11045 | - return IPv4AddressRegExp.test(ipAddress); | |
| 11721 | + | |
| 11722 | + if (version === '4') { | |
| 11723 | + return IPv4AddressRegExp.test(str); | |
| 11046 | 11724 | } |
| 11047 | - if (version.toString() === '6') { | |
| 11048 | - return IPv6AddressRegExp.test(ipAddress); | |
| 11725 | + | |
| 11726 | + if (version === '6') { | |
| 11727 | + return IPv6AddressRegExp.test(str); | |
| 11049 | 11728 | } |
| 11729 | + | |
| 11050 | 11730 | return false; |
| 11051 | 11731 | } |
| 11732 | + | |
| 11052 | 11733 | module.exports = exports.default; |
| 11053 | 11734 | module.exports["default"] = exports.default; |
| 11054 | 11735 | |
| 11055 | 11736 | /***/ }), |
| @@ -11066,49 +11747,43 @@ | ||
| 11066 | 11747 | Object.defineProperty(exports, "__esModule", ({ |
| 11067 | 11748 | value: true |
| 11068 | 11749 | })); |
| 11069 | 11750 | exports["default"] = isURL; |
| 11751 | + | |
| 11070 | 11752 | var _assertString = _interopRequireDefault(__webpack_require__(/*! ./util/assertString */ "../node_modules/validator/lib/util/assertString.js")); |
| 11071 | -var _checkHost = _interopRequireDefault(__webpack_require__(/*! ./util/checkHost */ "../node_modules/validator/lib/util/checkHost.js")); | |
| 11072 | -var _includesString = _interopRequireDefault(__webpack_require__(/*! ./util/includesString */ "../node_modules/validator/lib/util/includesString.js")); | |
| 11753 | + | |
| 11073 | 11754 | var _isFQDN = _interopRequireDefault(__webpack_require__(/*! ./isFQDN */ "../node_modules/validator/lib/isFQDN.js")); |
| 11755 | + | |
| 11074 | 11756 | var _isIP = _interopRequireDefault(__webpack_require__(/*! ./isIP */ "../node_modules/validator/lib/isIP.js")); |
| 11757 | + | |
| 11075 | 11758 | var _merge = _interopRequireDefault(__webpack_require__(/*! ./util/merge */ "../node_modules/validator/lib/util/merge.js")); |
| 11076 | -function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } | |
| 11077 | -function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } | |
| 11759 | + | |
| 11760 | +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
| 11761 | + | |
| 11762 | +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } | |
| 11763 | + | |
| 11078 | 11764 | 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."); } |
| 11079 | -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } | |
| 11080 | -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } | |
| 11081 | -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } | |
| 11082 | -function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } | |
| 11765 | + | |
| 11766 | +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); } | |
| 11767 | + | |
| 11768 | +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; } | |
| 11769 | + | |
| 11770 | +function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_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; } | |
| 11771 | + | |
| 11772 | +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } | |
| 11773 | + | |
| 11083 | 11774 | /* |
| 11084 | 11775 | options for isURL method |
| 11085 | 11776 | |
| 11086 | -protocols - valid protocols can be modified with this option. | |
| 11087 | -require_tld - If set to false isURL will not check if the URL's host includes a top-level domain. | |
| 11088 | -require_protocol - if set to true isURL will return false if protocol is not present in the URL. | |
| 11089 | -require_host - if set to false isURL will not check if host is present in the URL. | |
| 11090 | -require_port - if set to true isURL will check if port is present in the URL. | |
| 11091 | -require_valid_protocol - isURL will check if the URL's protocol is present in the protocols option. | |
| 11092 | -allow_underscores - if set to true, the validator will allow underscores in the URL. | |
| 11093 | -host_whitelist - if set to an array of strings or regexp, and the domain matches none of the strings | |
| 11094 | - defined in it, the validation fails. | |
| 11095 | -host_blacklist - if set to an array of strings or regexp, and the domain matches any of the strings | |
| 11096 | - defined in it, the validation fails. | |
| 11097 | -allow_trailing_dot - if set to true, the validator will allow the domain to end with | |
| 11098 | - a `.` character. | |
| 11099 | -allow_protocol_relative_urls - if set to true protocol relative URLs will be allowed. | |
| 11100 | -allow_fragments - if set to false isURL will return false if fragments are present. | |
| 11101 | -allow_query_components - if set to false isURL will return false if query components are present. | |
| 11102 | -disallow_auth - if set to true, the validator will fail if the URL contains an authentication | |
| 11103 | - component, e.g. `http://username:[email protected]` | |
| 11104 | -validate_length - if set to false isURL will skip string length validation. `max_allowed_length` | |
| 11105 | - will be ignored if this is set as `false`. | |
| 11106 | -max_allowed_length - if set, isURL will not allow URLs longer than the specified value (default is | |
| 11107 | - 2084 that IE maximum URL length). | |
| 11777 | +require_protocol - if set as true isURL will return false if protocol is not present in the URL | |
| 11778 | +require_valid_protocol - isURL will check if the URL's protocol is present in the protocols option | |
| 11779 | +protocols - valid protocols can be modified with this option | |
| 11780 | +require_host - if set as false isURL will not check if host is present in the URL | |
| 11781 | +require_port - if set as true isURL will check if port is present in the URL | |
| 11782 | +allow_protocol_relative_urls - if set as true protocol relative URLs will be allowed | |
| 11783 | +validate_length - if set as false isURL will skip string length validation (IE maximum is 2083) | |
| 11108 | 11784 | |
| 11109 | 11785 | */ |
| 11110 | - | |
| 11111 | 11786 | var default_url_options = { |
| 11112 | 11787 | protocols: ['http', 'https', 'ftp'], |
| 11113 | 11788 | require_tld: true, |
| 11114 | 11789 | require_protocol: false, |
| @@ -11119,156 +11794,121 @@ | ||
| 11119 | 11794 | allow_trailing_dot: false, |
| 11120 | 11795 | allow_protocol_relative_urls: false, |
| 11121 | 11796 | allow_fragments: true, |
| 11122 | 11797 | allow_query_components: true, |
| 11123 | - validate_length: true, | |
| 11124 | - max_allowed_length: 2084 | |
| 11798 | + validate_length: true | |
| 11125 | 11799 | }; |
| 11126 | 11800 | var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/; |
| 11801 | + | |
| 11802 | +function isRegExp(obj) { | |
| 11803 | + return Object.prototype.toString.call(obj) === '[object RegExp]'; | |
| 11804 | +} | |
| 11805 | + | |
| 11806 | +function checkHost(host, matches) { | |
| 11807 | + for (var i = 0; i < matches.length; i++) { | |
| 11808 | + var match = matches[i]; | |
| 11809 | + | |
| 11810 | + if (host === match || isRegExp(match) && match.test(host)) { | |
| 11811 | + return true; | |
| 11812 | + } | |
| 11813 | + } | |
| 11814 | + | |
| 11815 | + return false; | |
| 11816 | +} | |
| 11817 | + | |
| 11127 | 11818 | function isURL(url, options) { |
| 11128 | 11819 | (0, _assertString.default)(url); |
| 11820 | + | |
| 11129 | 11821 | if (!url || /[\s<>]/.test(url)) { |
| 11130 | 11822 | return false; |
| 11131 | 11823 | } |
| 11824 | + | |
| 11132 | 11825 | if (url.indexOf('mailto:') === 0) { |
| 11133 | 11826 | return false; |
| 11134 | 11827 | } |
| 11828 | + | |
| 11135 | 11829 | options = (0, _merge.default)(options, default_url_options); |
| 11136 | - if (options.validate_length && url.length > options.max_allowed_length) { | |
| 11830 | + | |
| 11831 | + if (options.validate_length && url.length >= 2083) { | |
| 11137 | 11832 | return false; |
| 11138 | 11833 | } |
| 11139 | - if (!options.allow_fragments && (0, _includesString.default)(url, '#')) { | |
| 11834 | + | |
| 11835 | + if (!options.allow_fragments && url.includes('#')) { | |
| 11140 | 11836 | return false; |
| 11141 | 11837 | } |
| 11142 | - if (!options.allow_query_components && ((0, _includesString.default)(url, '?') || (0, _includesString.default)(url, '&'))) { | |
| 11838 | + | |
| 11839 | + if (!options.allow_query_components && (url.includes('?') || url.includes('&'))) { | |
| 11143 | 11840 | return false; |
| 11144 | 11841 | } |
| 11842 | + | |
| 11145 | 11843 | var protocol, auth, host, hostname, port, port_str, split, ipv6; |
| 11146 | 11844 | split = url.split('#'); |
| 11147 | 11845 | url = split.shift(); |
| 11148 | 11846 | split = url.split('?'); |
| 11149 | 11847 | url = split.shift(); |
| 11848 | + split = url.split('://'); | |
| 11150 | 11849 | |
| 11151 | - // Replaced the 'split("://")' logic with a regex to match the protocol. | |
| 11152 | - // This correctly identifies schemes like `javascript:` which don't use `//`. | |
| 11153 | - // However, we need to be careful not to confuse authentication credentials (user:password@host) | |
| 11154 | - // with protocols. A colon before an @ symbol might be part of auth, not a protocol separator. | |
| 11155 | - var protocol_match = url.match(/^([a-z][a-z0-9+\-.]*):/i); | |
| 11156 | - var had_explicit_protocol = false; | |
| 11157 | - var cleanUpProtocol = function cleanUpProtocol(potential_protocol) { | |
| 11158 | - had_explicit_protocol = true; | |
| 11159 | - protocol = potential_protocol.toLowerCase(); | |
| 11850 | + if (split.length > 1) { | |
| 11851 | + protocol = split.shift().toLowerCase(); | |
| 11852 | + | |
| 11160 | 11853 | if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) { |
| 11161 | - // The identified protocol is not in the allowed list. | |
| 11162 | 11854 | return false; |
| 11163 | 11855 | } |
| 11164 | - | |
| 11165 | - // Remove the protocol from the URL string. | |
| 11166 | - return url.substring(protocol_match[0].length); | |
| 11167 | - }; | |
| 11168 | - if (protocol_match) { | |
| 11169 | - var potential_protocol = protocol_match[1]; | |
| 11170 | - var after_colon = url.substring(protocol_match[0].length); | |
| 11171 | - | |
| 11172 | - // Check if what follows looks like authentication credentials (user:password@host) | |
| 11173 | - // rather than a protocol. This happens when: | |
| 11174 | - // 1. There's no `//` after the colon (protocols like `http://` have this) | |
| 11175 | - // 2. There's an `@` symbol before any `/` | |
| 11176 | - // 3. The part before `@` contains only valid auth characters (alphanumeric, -, _, ., %, :) | |
| 11177 | - var starts_with_slashes = after_colon.slice(0, 2) === '//'; | |
| 11178 | - if (!starts_with_slashes) { | |
| 11179 | - var first_slash_position = after_colon.indexOf('/'); | |
| 11180 | - var before_slash = first_slash_position === -1 ? after_colon : after_colon.substring(0, first_slash_position); | |
| 11181 | - var at_position = before_slash.indexOf('@'); | |
| 11182 | - if (at_position !== -1) { | |
| 11183 | - var before_at = before_slash.substring(0, at_position); | |
| 11184 | - var valid_auth_regex = /^[a-zA-Z0-9\-_.%:]*$/; | |
| 11185 | - var is_valid_auth = valid_auth_regex.test(before_at); | |
| 11186 | - if (is_valid_auth) { | |
| 11187 | - // This looks like authentication (e.g., user:password@host), not a protocol | |
| 11188 | - if (options.require_protocol) { | |
| 11189 | - return false; | |
| 11190 | - } | |
| 11191 | - | |
| 11192 | - // Don't consume the colon; let the auth parsing handle it later | |
| 11193 | - } else { | |
| 11194 | - // This looks like a malicious protocol (e.g., javascript:alert();@host) | |
| 11195 | - url = cleanUpProtocol(potential_protocol); | |
| 11196 | - if (url === false) { | |
| 11197 | - return false; | |
| 11198 | - } | |
| 11199 | - } | |
| 11200 | - } else { | |
| 11201 | - // No @ symbol found. Check if this could be a port number instead of a protocol. | |
| 11202 | - // If what's after the colon is numeric (or starts with a digit and contains only | |
| 11203 | - // valid port characters until a path separator), it's likely hostname:port, not a protocol. | |
| 11204 | - var looks_like_port = /^[0-9]/.test(after_colon); | |
| 11205 | - if (looks_like_port) { | |
| 11206 | - // This looks like hostname:port, not a protocol | |
| 11207 | - if (options.require_protocol) { | |
| 11208 | - return false; | |
| 11209 | - } | |
| 11210 | - // Don't consume anything; let it be parsed as hostname:port | |
| 11211 | - } else { | |
| 11212 | - // This is definitely a protocol | |
| 11213 | - url = cleanUpProtocol(potential_protocol); | |
| 11214 | - if (url === false) { | |
| 11215 | - return false; | |
| 11216 | - } | |
| 11217 | - } | |
| 11218 | - } | |
| 11219 | - } else { | |
| 11220 | - // Starts with '//', this is definitely a protocol like http:// | |
| 11221 | - url = cleanUpProtocol(potential_protocol); | |
| 11222 | - if (url === false) { | |
| 11223 | - return false; | |
| 11224 | - } | |
| 11225 | - } | |
| 11226 | 11856 | } else if (options.require_protocol) { |
| 11227 | 11857 | return false; |
| 11228 | - } | |
| 11229 | - | |
| 11230 | - // Handle leading '//' only as protocol-relative when there was NO explicit protocol. | |
| 11231 | - // If there was an explicit protocol, '//' is the normal separator | |
| 11232 | - // and should be stripped unconditionally. | |
| 11233 | - if (url.slice(0, 2) === '//') { | |
| 11234 | - if (!had_explicit_protocol && !options.allow_protocol_relative_urls) { | |
| 11858 | + } else if (url.slice(0, 2) === '//') { | |
| 11859 | + if (!options.allow_protocol_relative_urls) { | |
| 11235 | 11860 | return false; |
| 11236 | 11861 | } |
| 11237 | - url = url.slice(2); | |
| 11862 | + | |
| 11863 | + split[0] = url.slice(2); | |
| 11238 | 11864 | } |
| 11865 | + | |
| 11866 | + url = split.join('://'); | |
| 11867 | + | |
| 11239 | 11868 | if (url === '') { |
| 11240 | 11869 | return false; |
| 11241 | 11870 | } |
| 11871 | + | |
| 11242 | 11872 | split = url.split('/'); |
| 11243 | 11873 | url = split.shift(); |
| 11874 | + | |
| 11244 | 11875 | if (url === '' && !options.require_host) { |
| 11245 | 11876 | return true; |
| 11246 | 11877 | } |
| 11878 | + | |
| 11247 | 11879 | split = url.split('@'); |
| 11880 | + | |
| 11248 | 11881 | if (split.length > 1) { |
| 11249 | 11882 | if (options.disallow_auth) { |
| 11250 | 11883 | return false; |
| 11251 | 11884 | } |
| 11885 | + | |
| 11252 | 11886 | if (split[0] === '') { |
| 11253 | 11887 | return false; |
| 11254 | 11888 | } |
| 11889 | + | |
| 11255 | 11890 | auth = split.shift(); |
| 11891 | + | |
| 11256 | 11892 | if (auth.indexOf(':') >= 0 && auth.split(':').length > 2) { |
| 11257 | 11893 | return false; |
| 11258 | 11894 | } |
| 11895 | + | |
| 11259 | 11896 | var _auth$split = auth.split(':'), |
| 11260 | - _auth$split2 = _slicedToArray(_auth$split, 2), | |
| 11261 | - user = _auth$split2[0], | |
| 11262 | - password = _auth$split2[1]; | |
| 11897 | + _auth$split2 = _slicedToArray(_auth$split, 2), | |
| 11898 | + user = _auth$split2[0], | |
| 11899 | + password = _auth$split2[1]; | |
| 11900 | + | |
| 11263 | 11901 | if (user === '' && password === '') { |
| 11264 | 11902 | return false; |
| 11265 | 11903 | } |
| 11266 | 11904 | } |
| 11905 | + | |
| 11267 | 11906 | hostname = split.join('@'); |
| 11268 | 11907 | port_str = null; |
| 11269 | 11908 | ipv6 = null; |
| 11270 | 11909 | var ipv6_match = hostname.match(wrapped_ipv6); |
| 11910 | + | |
| 11271 | 11911 | if (ipv6_match) { |
| 11272 | 11912 | host = ''; |
| 11273 | 11913 | ipv6 = ipv6_match[1]; |
| 11274 | 11914 | port_str = ipv6_match[2] || null; |
| @@ -11274,14 +11914,17 @@ | ||
| 11274 | 11914 | port_str = ipv6_match[2] || null; |
| 11275 | 11915 | } else { |
| 11276 | 11916 | split = hostname.split(':'); |
| 11277 | 11917 | host = split.shift(); |
| 11918 | + | |
| 11278 | 11919 | if (split.length) { |
| 11279 | 11920 | port_str = split.join(':'); |
| 11280 | 11921 | } |
| 11281 | 11922 | } |
| 11923 | + | |
| 11282 | 11924 | if (port_str !== null && port_str.length > 0) { |
| 11283 | 11925 | port = parseInt(port_str, 10); |
| 11926 | + | |
| 11284 | 11927 | if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) { |
| 11285 | 11928 | return false; |
| 11286 | 11929 | } |
| 11287 | 11930 | } else if (options.require_port) { |
| @@ -11286,23 +11929,30 @@ | ||
| 11286 | 11929 | } |
| 11287 | 11930 | } else if (options.require_port) { |
| 11288 | 11931 | return false; |
| 11289 | 11932 | } |
| 11933 | + | |
| 11290 | 11934 | if (options.host_whitelist) { |
| 11291 | - return (0, _checkHost.default)(host, options.host_whitelist); | |
| 11935 | + return checkHost(host, options.host_whitelist); | |
| 11292 | 11936 | } |
| 11937 | + | |
| 11293 | 11938 | if (host === '' && !options.require_host) { |
| 11294 | 11939 | return true; |
| 11295 | 11940 | } |
| 11941 | + | |
| 11296 | 11942 | if (!(0, _isIP.default)(host) && !(0, _isFQDN.default)(host, options) && (!ipv6 || !(0, _isIP.default)(ipv6, 6))) { |
| 11297 | 11943 | return false; |
| 11298 | 11944 | } |
| 11945 | + | |
| 11299 | 11946 | host = host || ipv6; |
| 11300 | - if (options.host_blacklist && (0, _checkHost.default)(host, options.host_blacklist)) { | |
| 11947 | + | |
| 11948 | + if (options.host_blacklist && checkHost(host, options.host_blacklist)) { | |
| 11301 | 11949 | return false; |
| 11302 | 11950 | } |
| 11951 | + | |
| 11303 | 11952 | return true; |
| 11304 | 11953 | } |
| 11954 | + | |
| 11305 | 11955 | module.exports = exports.default; |
| 11306 | 11956 | module.exports["default"] = exports.default; |
| 11307 | 11957 | |
| 11308 | 11958 | /***/ }), |
| @@ -11319,64 +11969,22 @@ | ||
| 11319 | 11969 | Object.defineProperty(exports, "__esModule", ({ |
| 11320 | 11970 | value: true |
| 11321 | 11971 | })); |
| 11322 | 11972 | exports["default"] = assertString; |
| 11323 | -function assertString(input) { | |
| 11324 | - if (input === undefined || input === null) throw new TypeError("Expected a string but received a ".concat(input)); | |
| 11325 | - if (input.constructor.name !== 'String') throw new TypeError("Expected a string but received a ".concat(input.constructor.name)); | |
| 11326 | -} | |
| 11327 | -module.exports = exports.default; | |
| 11328 | -module.exports["default"] = exports.default; | |
| 11329 | 11973 | |
| 11330 | -/***/ }), | |
| 11974 | +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | |
| 11331 | 11975 | |
| 11332 | -/***/ "../node_modules/validator/lib/util/checkHost.js": | |
| 11333 | -/*!*******************************************************!*\ | |
| 11334 | - !*** ../node_modules/validator/lib/util/checkHost.js ***! | |
| 11335 | - \*******************************************************/ | |
| 11336 | -/***/ ((module, exports) => { | |
| 11976 | +function assertString(input) { | |
| 11977 | + var isString = typeof input === 'string' || input instanceof String; | |
| 11337 | 11978 | |
| 11338 | -"use strict"; | |
| 11979 | + if (!isString) { | |
| 11980 | + var invalidType = _typeof(input); | |
| 11339 | 11981 | |
| 11340 | - | |
| 11341 | -Object.defineProperty(exports, "__esModule", ({ | |
| 11342 | - value: true | |
| 11343 | -})); | |
| 11344 | -exports["default"] = checkHost; | |
| 11345 | -function isRegExp(obj) { | |
| 11346 | - return Object.prototype.toString.call(obj) === '[object RegExp]'; | |
| 11347 | -} | |
| 11348 | -function checkHost(host, matches) { | |
| 11349 | - for (var i = 0; i < matches.length; i++) { | |
| 11350 | - var match = matches[i]; | |
| 11351 | - if (host === match || isRegExp(match) && match.test(host)) { | |
| 11352 | - return true; | |
| 11353 | - } | |
| 11982 | + if (input === null) invalidType = 'null';else if (invalidType === 'object') invalidType = input.constructor.name; | |
| 11983 | + throw new TypeError("Expected a string but received a ".concat(invalidType)); | |
| 11354 | 11984 | } |
| 11355 | - return false; | |
| 11356 | 11985 | } |
| 11357 | -module.exports = exports.default; | |
| 11358 | -module.exports["default"] = exports.default; | |
| 11359 | 11986 | |
| 11360 | -/***/ }), | |
| 11361 | - | |
| 11362 | -/***/ "../node_modules/validator/lib/util/includesString.js": | |
| 11363 | -/*!************************************************************!*\ | |
| 11364 | - !*** ../node_modules/validator/lib/util/includesString.js ***! | |
| 11365 | - \************************************************************/ | |
| 11366 | -/***/ ((module, exports) => { | |
| 11367 | - | |
| 11368 | -"use strict"; | |
| 11369 | - | |
| 11370 | - | |
| 11371 | -Object.defineProperty(exports, "__esModule", ({ | |
| 11372 | - value: true | |
| 11373 | -})); | |
| 11374 | -exports["default"] = void 0; | |
| 11375 | -var includes = function includes(str, val) { | |
| 11376 | - return str.indexOf(val) !== -1; | |
| 11377 | -}; | |
| 11378 | -var _default = exports["default"] = includes; | |
| 11379 | 11987 | module.exports = exports.default; |
| 11380 | 11988 | module.exports["default"] = exports.default; |
| 11381 | 11989 | |
| 11382 | 11990 | /***/ }), |
| @@ -11393,23 +12001,49 @@ | ||
| 11393 | 12001 | Object.defineProperty(exports, "__esModule", ({ |
| 11394 | 12002 | value: true |
| 11395 | 12003 | })); |
| 11396 | 12004 | exports["default"] = merge; |
| 12005 | + | |
| 11397 | 12006 | function merge() { |
| 11398 | 12007 | var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 11399 | 12008 | var defaults = arguments.length > 1 ? arguments[1] : undefined; |
| 12009 | + | |
| 11400 | 12010 | for (var key in defaults) { |
| 11401 | 12011 | if (typeof obj[key] === 'undefined') { |
| 11402 | 12012 | obj[key] = defaults[key]; |
| 11403 | 12013 | } |
| 11404 | 12014 | } |
| 12015 | + | |
| 11405 | 12016 | return obj; |
| 11406 | 12017 | } |
| 12018 | + | |
| 11407 | 12019 | module.exports = exports.default; |
| 11408 | 12020 | module.exports["default"] = exports.default; |
| 11409 | 12021 | |
| 11410 | 12022 | /***/ }), |
| 11411 | 12023 | |
| 12024 | +/***/ "react": | |
| 12025 | +/*!************************!*\ | |
| 12026 | + !*** external "React" ***! | |
| 12027 | + \************************/ | |
| 12028 | +/***/ ((module) => { | |
| 12029 | + | |
| 12030 | +"use strict"; | |
| 12031 | +module.exports = React; | |
| 12032 | + | |
| 12033 | +/***/ }), | |
| 12034 | + | |
| 12035 | +/***/ "react-dom": | |
| 12036 | +/*!***************************!*\ | |
| 12037 | + !*** external "ReactDOM" ***! | |
| 12038 | + \***************************/ | |
| 12039 | +/***/ ((module) => { | |
| 12040 | + | |
| 12041 | +"use strict"; | |
| 12042 | +module.exports = ReactDOM; | |
| 12043 | + | |
| 12044 | +/***/ }), | |
| 12045 | + | |
| 11412 | 12046 | /***/ "@elementor/icons": |
| 11413 | 12047 | /*!************************************!*\ |
| 11414 | 12048 | !*** external "elementorV2.icons" ***! |
| 11415 | 12049 | \************************************/ |
| @@ -11441,28 +12075,882 @@ | ||
| 11441 | 12075 | module.exports = wp.i18n; |
| 11442 | 12076 | |
| 11443 | 12077 | /***/ }), |
| 11444 | 12078 | |
| 11445 | -/***/ "react": | |
| 11446 | -/*!************************!*\ | |
| 11447 | - !*** external "React" ***! | |
| 11448 | - \************************/ | |
| 12079 | +/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": | |
| 12080 | +/*!******************************************************************!*\ | |
| 12081 | + !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! | |
| 12082 | + \******************************************************************/ | |
| 11449 | 12083 | /***/ ((module) => { |
| 11450 | 12084 | |
| 11451 | -"use strict"; | |
| 11452 | -module.exports = React; | |
| 12085 | +function _arrayLikeToArray(arr, len) { | |
| 12086 | + if (len == null || len > arr.length) len = arr.length; | |
| 12087 | + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; | |
| 12088 | + return arr2; | |
| 12089 | +} | |
| 12090 | +module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 11453 | 12091 | |
| 11454 | 12092 | /***/ }), |
| 11455 | 12093 | |
| 11456 | -/***/ "react-dom": | |
| 11457 | -/*!***************************!*\ | |
| 11458 | - !*** external "ReactDOM" ***! | |
| 11459 | - \***************************/ | |
| 12094 | +/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": | |
| 12095 | +/*!****************************************************************!*\ | |
| 12096 | + !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! | |
| 12097 | + \****************************************************************/ | |
| 11460 | 12098 | /***/ ((module) => { |
| 11461 | 12099 | |
| 11462 | -"use strict"; | |
| 11463 | -module.exports = ReactDOM; | |
| 12100 | +function _arrayWithHoles(arr) { | |
| 12101 | + if (Array.isArray(arr)) return arr; | |
| 12102 | +} | |
| 12103 | +module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 11464 | 12104 | |
| 12105 | +/***/ }), | |
| 12106 | + | |
| 12107 | +/***/ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js": | |
| 12108 | +/*!*******************************************************************!*\ | |
| 12109 | + !*** ../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! | |
| 12110 | + \*******************************************************************/ | |
| 12111 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 12112 | + | |
| 12113 | +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 12114 | +function _arrayWithoutHoles(arr) { | |
| 12115 | + if (Array.isArray(arr)) return arrayLikeToArray(arr); | |
| 12116 | +} | |
| 12117 | +module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12118 | + | |
| 12119 | +/***/ }), | |
| 12120 | + | |
| 12121 | +/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": | |
| 12122 | +/*!***********************************************************************!*\ | |
| 12123 | + !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! | |
| 12124 | + \***********************************************************************/ | |
| 12125 | +/***/ ((module) => { | |
| 12126 | + | |
| 12127 | +function _assertThisInitialized(self) { | |
| 12128 | + if (self === void 0) { | |
| 12129 | + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 12130 | + } | |
| 12131 | + return self; | |
| 12132 | +} | |
| 12133 | +module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12134 | + | |
| 12135 | +/***/ }), | |
| 12136 | + | |
| 12137 | +/***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js": | |
| 12138 | +/*!******************************************************************!*\ | |
| 12139 | + !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***! | |
| 12140 | + \******************************************************************/ | |
| 12141 | +/***/ ((module) => { | |
| 12142 | + | |
| 12143 | +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { | |
| 12144 | + try { | |
| 12145 | + var info = gen[key](arg); | |
| 12146 | + var value = info.value; | |
| 12147 | + } catch (error) { | |
| 12148 | + reject(error); | |
| 12149 | + return; | |
| 12150 | + } | |
| 12151 | + if (info.done) { | |
| 12152 | + resolve(value); | |
| 12153 | + } else { | |
| 12154 | + Promise.resolve(value).then(_next, _throw); | |
| 12155 | + } | |
| 12156 | +} | |
| 12157 | +function _asyncToGenerator(fn) { | |
| 12158 | + return function () { | |
| 12159 | + var self = this, | |
| 12160 | + args = arguments; | |
| 12161 | + return new Promise(function (resolve, reject) { | |
| 12162 | + var gen = fn.apply(self, args); | |
| 12163 | + function _next(value) { | |
| 12164 | + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); | |
| 12165 | + } | |
| 12166 | + function _throw(err) { | |
| 12167 | + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); | |
| 12168 | + } | |
| 12169 | + _next(undefined); | |
| 12170 | + }); | |
| 12171 | + }; | |
| 12172 | +} | |
| 12173 | +module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12174 | + | |
| 12175 | +/***/ }), | |
| 12176 | + | |
| 12177 | +/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": | |
| 12178 | +/*!****************************************************************!*\ | |
| 12179 | + !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! | |
| 12180 | + \****************************************************************/ | |
| 12181 | +/***/ ((module) => { | |
| 12182 | + | |
| 12183 | +function _classCallCheck(instance, Constructor) { | |
| 12184 | + if (!(instance instanceof Constructor)) { | |
| 12185 | + throw new TypeError("Cannot call a class as a function"); | |
| 12186 | + } | |
| 12187 | +} | |
| 12188 | +module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12189 | + | |
| 12190 | +/***/ }), | |
| 12191 | + | |
| 12192 | +/***/ "../node_modules/@babel/runtime/helpers/createClass.js": | |
| 12193 | +/*!*************************************************************!*\ | |
| 12194 | + !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! | |
| 12195 | + \*************************************************************/ | |
| 12196 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 12197 | + | |
| 12198 | +var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 12199 | +function _defineProperties(target, props) { | |
| 12200 | + for (var i = 0; i < props.length; i++) { | |
| 12201 | + var descriptor = props[i]; | |
| 12202 | + descriptor.enumerable = descriptor.enumerable || false; | |
| 12203 | + descriptor.configurable = true; | |
| 12204 | + if ("value" in descriptor) descriptor.writable = true; | |
| 12205 | + Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor); | |
| 12206 | + } | |
| 12207 | +} | |
| 12208 | +function _createClass(Constructor, protoProps, staticProps) { | |
| 12209 | + if (protoProps) _defineProperties(Constructor.prototype, protoProps); | |
| 12210 | + if (staticProps) _defineProperties(Constructor, staticProps); | |
| 12211 | + Object.defineProperty(Constructor, "prototype", { | |
| 12212 | + writable: false | |
| 12213 | + }); | |
| 12214 | + return Constructor; | |
| 12215 | +} | |
| 12216 | +module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12217 | + | |
| 12218 | +/***/ }), | |
| 12219 | + | |
| 12220 | +/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": | |
| 12221 | +/*!****************************************************************!*\ | |
| 12222 | + !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! | |
| 12223 | + \****************************************************************/ | |
| 12224 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 12225 | + | |
| 12226 | +var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 12227 | +function _defineProperty(obj, key, value) { | |
| 12228 | + key = toPropertyKey(key); | |
| 12229 | + if (key in obj) { | |
| 12230 | + Object.defineProperty(obj, key, { | |
| 12231 | + value: value, | |
| 12232 | + enumerable: true, | |
| 12233 | + configurable: true, | |
| 12234 | + writable: true | |
| 12235 | + }); | |
| 12236 | + } else { | |
| 12237 | + obj[key] = value; | |
| 12238 | + } | |
| 12239 | + return obj; | |
| 12240 | +} | |
| 12241 | +module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12242 | + | |
| 12243 | +/***/ }), | |
| 12244 | + | |
| 12245 | +/***/ "../node_modules/@babel/runtime/helpers/extends.js": | |
| 12246 | +/*!*********************************************************!*\ | |
| 12247 | + !*** ../node_modules/@babel/runtime/helpers/extends.js ***! | |
| 12248 | + \*********************************************************/ | |
| 12249 | +/***/ ((module) => { | |
| 12250 | + | |
| 12251 | +function _extends() { | |
| 12252 | + module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) { | |
| 12253 | + for (var i = 1; i < arguments.length; i++) { | |
| 12254 | + var source = arguments[i]; | |
| 12255 | + for (var key in source) { | |
| 12256 | + if (Object.prototype.hasOwnProperty.call(source, key)) { | |
| 12257 | + target[key] = source[key]; | |
| 12258 | + } | |
| 12259 | + } | |
| 12260 | + } | |
| 12261 | + return target; | |
| 12262 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12263 | + return _extends.apply(this, arguments); | |
| 12264 | +} | |
| 12265 | +module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12266 | + | |
| 12267 | +/***/ }), | |
| 12268 | + | |
| 12269 | +/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": | |
| 12270 | +/*!****************************************************************!*\ | |
| 12271 | + !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! | |
| 12272 | + \****************************************************************/ | |
| 12273 | +/***/ ((module) => { | |
| 12274 | + | |
| 12275 | +function _getPrototypeOf(o) { | |
| 12276 | + module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { | |
| 12277 | + return o.__proto__ || Object.getPrototypeOf(o); | |
| 12278 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12279 | + return _getPrototypeOf(o); | |
| 12280 | +} | |
| 12281 | +module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12282 | + | |
| 12283 | +/***/ }), | |
| 12284 | + | |
| 12285 | +/***/ "../node_modules/@babel/runtime/helpers/inherits.js": | |
| 12286 | +/*!**********************************************************!*\ | |
| 12287 | + !*** ../node_modules/@babel/runtime/helpers/inherits.js ***! | |
| 12288 | + \**********************************************************/ | |
| 12289 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 12290 | + | |
| 12291 | +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 12292 | +function _inherits(subClass, superClass) { | |
| 12293 | + if (typeof superClass !== "function" && superClass !== null) { | |
| 12294 | + throw new TypeError("Super expression must either be null or a function"); | |
| 12295 | + } | |
| 12296 | + subClass.prototype = Object.create(superClass && superClass.prototype, { | |
| 12297 | + constructor: { | |
| 12298 | + value: subClass, | |
| 12299 | + writable: true, | |
| 12300 | + configurable: true | |
| 12301 | + } | |
| 12302 | + }); | |
| 12303 | + Object.defineProperty(subClass, "prototype", { | |
| 12304 | + writable: false | |
| 12305 | + }); | |
| 12306 | + if (superClass) setPrototypeOf(subClass, superClass); | |
| 12307 | +} | |
| 12308 | +module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12309 | + | |
| 12310 | +/***/ }), | |
| 12311 | + | |
| 12312 | +/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 12313 | +/*!***********************************************************************!*\ | |
| 12314 | + !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 12315 | + \***********************************************************************/ | |
| 12316 | +/***/ ((module) => { | |
| 12317 | + | |
| 12318 | +function _interopRequireDefault(obj) { | |
| 12319 | + return obj && obj.__esModule ? obj : { | |
| 12320 | + "default": obj | |
| 12321 | + }; | |
| 12322 | +} | |
| 12323 | +module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12324 | + | |
| 12325 | +/***/ }), | |
| 12326 | + | |
| 12327 | +/***/ "../node_modules/@babel/runtime/helpers/iterableToArray.js": | |
| 12328 | +/*!*****************************************************************!*\ | |
| 12329 | + !*** ../node_modules/@babel/runtime/helpers/iterableToArray.js ***! | |
| 12330 | + \*****************************************************************/ | |
| 12331 | +/***/ ((module) => { | |
| 12332 | + | |
| 12333 | +function _iterableToArray(iter) { | |
| 12334 | + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); | |
| 12335 | +} | |
| 12336 | +module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12337 | + | |
| 12338 | +/***/ }), | |
| 12339 | + | |
| 12340 | +/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": | |
| 12341 | +/*!**********************************************************************!*\ | |
| 12342 | + !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! | |
| 12343 | + \**********************************************************************/ | |
| 12344 | +/***/ ((module) => { | |
| 12345 | + | |
| 12346 | +function _iterableToArrayLimit(r, l) { | |
| 12347 | + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 12348 | + if (null != t) { | |
| 12349 | + var e, | |
| 12350 | + n, | |
| 12351 | + i, | |
| 12352 | + u, | |
| 12353 | + a = [], | |
| 12354 | + f = !0, | |
| 12355 | + o = !1; | |
| 12356 | + try { | |
| 12357 | + if (i = (t = t.call(r)).next, 0 === l) { | |
| 12358 | + if (Object(t) !== t) return; | |
| 12359 | + f = !1; | |
| 12360 | + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 12361 | + } catch (r) { | |
| 12362 | + o = !0, n = r; | |
| 12363 | + } finally { | |
| 12364 | + try { | |
| 12365 | + if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 12366 | + } finally { | |
| 12367 | + if (o) throw n; | |
| 12368 | + } | |
| 12369 | + } | |
| 12370 | + return a; | |
| 12371 | + } | |
| 12372 | +} | |
| 12373 | +module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12374 | + | |
| 12375 | +/***/ }), | |
| 12376 | + | |
| 12377 | +/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": | |
| 12378 | +/*!*****************************************************************!*\ | |
| 12379 | + !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! | |
| 12380 | + \*****************************************************************/ | |
| 12381 | +/***/ ((module) => { | |
| 12382 | + | |
| 12383 | +function _nonIterableRest() { | |
| 12384 | + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 12385 | +} | |
| 12386 | +module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12387 | + | |
| 12388 | +/***/ }), | |
| 12389 | + | |
| 12390 | +/***/ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js": | |
| 12391 | +/*!*******************************************************************!*\ | |
| 12392 | + !*** ../node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! | |
| 12393 | + \*******************************************************************/ | |
| 12394 | +/***/ ((module) => { | |
| 12395 | + | |
| 12396 | +function _nonIterableSpread() { | |
| 12397 | + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 12398 | +} | |
| 12399 | +module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12400 | + | |
| 12401 | +/***/ }), | |
| 12402 | + | |
| 12403 | +/***/ "../node_modules/@babel/runtime/helpers/objectWithoutProperties.js": | |
| 12404 | +/*!*************************************************************************!*\ | |
| 12405 | + !*** ../node_modules/@babel/runtime/helpers/objectWithoutProperties.js ***! | |
| 12406 | + \*************************************************************************/ | |
| 12407 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 12408 | + | |
| 12409 | +var objectWithoutPropertiesLoose = __webpack_require__(/*! ./objectWithoutPropertiesLoose.js */ "../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js"); | |
| 12410 | +function _objectWithoutProperties(source, excluded) { | |
| 12411 | + if (source == null) return {}; | |
| 12412 | + var target = objectWithoutPropertiesLoose(source, excluded); | |
| 12413 | + var key, i; | |
| 12414 | + if (Object.getOwnPropertySymbols) { | |
| 12415 | + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); | |
| 12416 | + for (i = 0; i < sourceSymbolKeys.length; i++) { | |
| 12417 | + key = sourceSymbolKeys[i]; | |
| 12418 | + if (excluded.indexOf(key) >= 0) continue; | |
| 12419 | + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; | |
| 12420 | + target[key] = source[key]; | |
| 12421 | + } | |
| 12422 | + } | |
| 12423 | + return target; | |
| 12424 | +} | |
| 12425 | +module.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12426 | + | |
| 12427 | +/***/ }), | |
| 12428 | + | |
| 12429 | +/***/ "../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js": | |
| 12430 | +/*!******************************************************************************!*\ | |
| 12431 | + !*** ../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js ***! | |
| 12432 | + \******************************************************************************/ | |
| 12433 | +/***/ ((module) => { | |
| 12434 | + | |
| 12435 | +function _objectWithoutPropertiesLoose(source, excluded) { | |
| 12436 | + if (source == null) return {}; | |
| 12437 | + var target = {}; | |
| 12438 | + var sourceKeys = Object.keys(source); | |
| 12439 | + var key, i; | |
| 12440 | + for (i = 0; i < sourceKeys.length; i++) { | |
| 12441 | + key = sourceKeys[i]; | |
| 12442 | + if (excluded.indexOf(key) >= 0) continue; | |
| 12443 | + target[key] = source[key]; | |
| 12444 | + } | |
| 12445 | + return target; | |
| 12446 | +} | |
| 12447 | +module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12448 | + | |
| 12449 | +/***/ }), | |
| 12450 | + | |
| 12451 | +/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": | |
| 12452 | +/*!***************************************************************************!*\ | |
| 12453 | + !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! | |
| 12454 | + \***************************************************************************/ | |
| 12455 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 12456 | + | |
| 12457 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 12458 | +var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); | |
| 12459 | +function _possibleConstructorReturn(self, call) { | |
| 12460 | + if (call && (_typeof(call) === "object" || typeof call === "function")) { | |
| 12461 | + return call; | |
| 12462 | + } else if (call !== void 0) { | |
| 12463 | + throw new TypeError("Derived constructors may only return object or undefined"); | |
| 12464 | + } | |
| 12465 | + return assertThisInitialized(self); | |
| 12466 | +} | |
| 12467 | +module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12468 | + | |
| 12469 | +/***/ }), | |
| 12470 | + | |
| 12471 | +/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js": | |
| 12472 | +/*!********************************************************************!*\ | |
| 12473 | + !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! | |
| 12474 | + \********************************************************************/ | |
| 12475 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 12476 | + | |
| 12477 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 12478 | +function _regeneratorRuntime() { | |
| 12479 | + "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ | |
| 12480 | + module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 12481 | + return e; | |
| 12482 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12483 | + var t, | |
| 12484 | + e = {}, | |
| 12485 | + r = Object.prototype, | |
| 12486 | + n = r.hasOwnProperty, | |
| 12487 | + o = Object.defineProperty || function (t, e, r) { | |
| 12488 | + t[e] = r.value; | |
| 12489 | + }, | |
| 12490 | + i = "function" == typeof Symbol ? Symbol : {}, | |
| 12491 | + a = i.iterator || "@@iterator", | |
| 12492 | + c = i.asyncIterator || "@@asyncIterator", | |
| 12493 | + u = i.toStringTag || "@@toStringTag"; | |
| 12494 | + function define(t, e, r) { | |
| 12495 | + return Object.defineProperty(t, e, { | |
| 12496 | + value: r, | |
| 12497 | + enumerable: !0, | |
| 12498 | + configurable: !0, | |
| 12499 | + writable: !0 | |
| 12500 | + }), t[e]; | |
| 12501 | + } | |
| 12502 | + try { | |
| 12503 | + define({}, ""); | |
| 12504 | + } catch (t) { | |
| 12505 | + define = function define(t, e, r) { | |
| 12506 | + return t[e] = r; | |
| 12507 | + }; | |
| 12508 | + } | |
| 12509 | + function wrap(t, e, r, n) { | |
| 12510 | + var i = e && e.prototype instanceof Generator ? e : Generator, | |
| 12511 | + a = Object.create(i.prototype), | |
| 12512 | + c = new Context(n || []); | |
| 12513 | + return o(a, "_invoke", { | |
| 12514 | + value: makeInvokeMethod(t, r, c) | |
| 12515 | + }), a; | |
| 12516 | + } | |
| 12517 | + function tryCatch(t, e, r) { | |
| 12518 | + try { | |
| 12519 | + return { | |
| 12520 | + type: "normal", | |
| 12521 | + arg: t.call(e, r) | |
| 12522 | + }; | |
| 12523 | + } catch (t) { | |
| 12524 | + return { | |
| 12525 | + type: "throw", | |
| 12526 | + arg: t | |
| 12527 | + }; | |
| 12528 | + } | |
| 12529 | + } | |
| 12530 | + e.wrap = wrap; | |
| 12531 | + var h = "suspendedStart", | |
| 12532 | + l = "suspendedYield", | |
| 12533 | + f = "executing", | |
| 12534 | + s = "completed", | |
| 12535 | + y = {}; | |
| 12536 | + function Generator() {} | |
| 12537 | + function GeneratorFunction() {} | |
| 12538 | + function GeneratorFunctionPrototype() {} | |
| 12539 | + var p = {}; | |
| 12540 | + define(p, a, function () { | |
| 12541 | + return this; | |
| 12542 | + }); | |
| 12543 | + var d = Object.getPrototypeOf, | |
| 12544 | + v = d && d(d(values([]))); | |
| 12545 | + v && v !== r && n.call(v, a) && (p = v); | |
| 12546 | + var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); | |
| 12547 | + function defineIteratorMethods(t) { | |
| 12548 | + ["next", "throw", "return"].forEach(function (e) { | |
| 12549 | + define(t, e, function (t) { | |
| 12550 | + return this._invoke(e, t); | |
| 12551 | + }); | |
| 12552 | + }); | |
| 12553 | + } | |
| 12554 | + function AsyncIterator(t, e) { | |
| 12555 | + function invoke(r, o, i, a) { | |
| 12556 | + var c = tryCatch(t[r], t, o); | |
| 12557 | + if ("throw" !== c.type) { | |
| 12558 | + var u = c.arg, | |
| 12559 | + h = u.value; | |
| 12560 | + return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { | |
| 12561 | + invoke("next", t, i, a); | |
| 12562 | + }, function (t) { | |
| 12563 | + invoke("throw", t, i, a); | |
| 12564 | + }) : e.resolve(h).then(function (t) { | |
| 12565 | + u.value = t, i(u); | |
| 12566 | + }, function (t) { | |
| 12567 | + return invoke("throw", t, i, a); | |
| 12568 | + }); | |
| 12569 | + } | |
| 12570 | + a(c.arg); | |
| 12571 | + } | |
| 12572 | + var r; | |
| 12573 | + o(this, "_invoke", { | |
| 12574 | + value: function value(t, n) { | |
| 12575 | + function callInvokeWithMethodAndArg() { | |
| 12576 | + return new e(function (e, r) { | |
| 12577 | + invoke(t, n, e, r); | |
| 12578 | + }); | |
| 12579 | + } | |
| 12580 | + return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); | |
| 12581 | + } | |
| 12582 | + }); | |
| 12583 | + } | |
| 12584 | + function makeInvokeMethod(e, r, n) { | |
| 12585 | + var o = h; | |
| 12586 | + return function (i, a) { | |
| 12587 | + if (o === f) throw new Error("Generator is already running"); | |
| 12588 | + if (o === s) { | |
| 12589 | + if ("throw" === i) throw a; | |
| 12590 | + return { | |
| 12591 | + value: t, | |
| 12592 | + done: !0 | |
| 12593 | + }; | |
| 12594 | + } | |
| 12595 | + for (n.method = i, n.arg = a;;) { | |
| 12596 | + var c = n.delegate; | |
| 12597 | + if (c) { | |
| 12598 | + var u = maybeInvokeDelegate(c, n); | |
| 12599 | + if (u) { | |
| 12600 | + if (u === y) continue; | |
| 12601 | + return u; | |
| 12602 | + } | |
| 12603 | + } | |
| 12604 | + if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { | |
| 12605 | + if (o === h) throw o = s, n.arg; | |
| 12606 | + n.dispatchException(n.arg); | |
| 12607 | + } else "return" === n.method && n.abrupt("return", n.arg); | |
| 12608 | + o = f; | |
| 12609 | + var p = tryCatch(e, r, n); | |
| 12610 | + if ("normal" === p.type) { | |
| 12611 | + if (o = n.done ? s : l, p.arg === y) continue; | |
| 12612 | + return { | |
| 12613 | + value: p.arg, | |
| 12614 | + done: n.done | |
| 12615 | + }; | |
| 12616 | + } | |
| 12617 | + "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); | |
| 12618 | + } | |
| 12619 | + }; | |
| 12620 | + } | |
| 12621 | + function maybeInvokeDelegate(e, r) { | |
| 12622 | + var n = r.method, | |
| 12623 | + o = e.iterator[n]; | |
| 12624 | + if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; | |
| 12625 | + var i = tryCatch(o, e.iterator, r.arg); | |
| 12626 | + if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; | |
| 12627 | + var a = i.arg; | |
| 12628 | + return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); | |
| 12629 | + } | |
| 12630 | + function pushTryEntry(t) { | |
| 12631 | + var e = { | |
| 12632 | + tryLoc: t[0] | |
| 12633 | + }; | |
| 12634 | + 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); | |
| 12635 | + } | |
| 12636 | + function resetTryEntry(t) { | |
| 12637 | + var e = t.completion || {}; | |
| 12638 | + e.type = "normal", delete e.arg, t.completion = e; | |
| 12639 | + } | |
| 12640 | + function Context(t) { | |
| 12641 | + this.tryEntries = [{ | |
| 12642 | + tryLoc: "root" | |
| 12643 | + }], t.forEach(pushTryEntry, this), this.reset(!0); | |
| 12644 | + } | |
| 12645 | + function values(e) { | |
| 12646 | + if (e || "" === e) { | |
| 12647 | + var r = e[a]; | |
| 12648 | + if (r) return r.call(e); | |
| 12649 | + if ("function" == typeof e.next) return e; | |
| 12650 | + if (!isNaN(e.length)) { | |
| 12651 | + var o = -1, | |
| 12652 | + i = function next() { | |
| 12653 | + for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; | |
| 12654 | + return next.value = t, next.done = !0, next; | |
| 12655 | + }; | |
| 12656 | + return i.next = i; | |
| 12657 | + } | |
| 12658 | + } | |
| 12659 | + throw new TypeError(_typeof(e) + " is not iterable"); | |
| 12660 | + } | |
| 12661 | + return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { | |
| 12662 | + value: GeneratorFunctionPrototype, | |
| 12663 | + configurable: !0 | |
| 12664 | + }), o(GeneratorFunctionPrototype, "constructor", { | |
| 12665 | + value: GeneratorFunction, | |
| 12666 | + configurable: !0 | |
| 12667 | + }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { | |
| 12668 | + var e = "function" == typeof t && t.constructor; | |
| 12669 | + return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); | |
| 12670 | + }, e.mark = function (t) { | |
| 12671 | + return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; | |
| 12672 | + }, e.awrap = function (t) { | |
| 12673 | + return { | |
| 12674 | + __await: t | |
| 12675 | + }; | |
| 12676 | + }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { | |
| 12677 | + return this; | |
| 12678 | + }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { | |
| 12679 | + void 0 === i && (i = Promise); | |
| 12680 | + var a = new AsyncIterator(wrap(t, r, n, o), i); | |
| 12681 | + return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { | |
| 12682 | + return t.done ? t.value : a.next(); | |
| 12683 | + }); | |
| 12684 | + }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { | |
| 12685 | + return this; | |
| 12686 | + }), define(g, "toString", function () { | |
| 12687 | + return "[object Generator]"; | |
| 12688 | + }), e.keys = function (t) { | |
| 12689 | + var e = Object(t), | |
| 12690 | + r = []; | |
| 12691 | + for (var n in e) r.push(n); | |
| 12692 | + return r.reverse(), function next() { | |
| 12693 | + for (; r.length;) { | |
| 12694 | + var t = r.pop(); | |
| 12695 | + if (t in e) return next.value = t, next.done = !1, next; | |
| 12696 | + } | |
| 12697 | + return next.done = !0, next; | |
| 12698 | + }; | |
| 12699 | + }, e.values = values, Context.prototype = { | |
| 12700 | + constructor: Context, | |
| 12701 | + reset: function reset(e) { | |
| 12702 | + if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); | |
| 12703 | + }, | |
| 12704 | + stop: function stop() { | |
| 12705 | + this.done = !0; | |
| 12706 | + var t = this.tryEntries[0].completion; | |
| 12707 | + if ("throw" === t.type) throw t.arg; | |
| 12708 | + return this.rval; | |
| 12709 | + }, | |
| 12710 | + dispatchException: function dispatchException(e) { | |
| 12711 | + if (this.done) throw e; | |
| 12712 | + var r = this; | |
| 12713 | + function handle(n, o) { | |
| 12714 | + return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; | |
| 12715 | + } | |
| 12716 | + for (var o = this.tryEntries.length - 1; o >= 0; --o) { | |
| 12717 | + var i = this.tryEntries[o], | |
| 12718 | + a = i.completion; | |
| 12719 | + if ("root" === i.tryLoc) return handle("end"); | |
| 12720 | + if (i.tryLoc <= this.prev) { | |
| 12721 | + var c = n.call(i, "catchLoc"), | |
| 12722 | + u = n.call(i, "finallyLoc"); | |
| 12723 | + if (c && u) { | |
| 12724 | + if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); | |
| 12725 | + if (this.prev < i.finallyLoc) return handle(i.finallyLoc); | |
| 12726 | + } else if (c) { | |
| 12727 | + if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); | |
| 12728 | + } else { | |
| 12729 | + if (!u) throw new Error("try statement without catch or finally"); | |
| 12730 | + if (this.prev < i.finallyLoc) return handle(i.finallyLoc); | |
| 12731 | + } | |
| 12732 | + } | |
| 12733 | + } | |
| 12734 | + }, | |
| 12735 | + abrupt: function abrupt(t, e) { | |
| 12736 | + for (var r = this.tryEntries.length - 1; r >= 0; --r) { | |
| 12737 | + var o = this.tryEntries[r]; | |
| 12738 | + if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { | |
| 12739 | + var i = o; | |
| 12740 | + break; | |
| 12741 | + } | |
| 12742 | + } | |
| 12743 | + i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); | |
| 12744 | + var a = i ? i.completion : {}; | |
| 12745 | + return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); | |
| 12746 | + }, | |
| 12747 | + complete: function complete(t, e) { | |
| 12748 | + if ("throw" === t.type) throw t.arg; | |
| 12749 | + return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; | |
| 12750 | + }, | |
| 12751 | + finish: function finish(t) { | |
| 12752 | + for (var e = this.tryEntries.length - 1; e >= 0; --e) { | |
| 12753 | + var r = this.tryEntries[e]; | |
| 12754 | + if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; | |
| 12755 | + } | |
| 12756 | + }, | |
| 12757 | + "catch": function _catch(t) { | |
| 12758 | + for (var e = this.tryEntries.length - 1; e >= 0; --e) { | |
| 12759 | + var r = this.tryEntries[e]; | |
| 12760 | + if (r.tryLoc === t) { | |
| 12761 | + var n = r.completion; | |
| 12762 | + if ("throw" === n.type) { | |
| 12763 | + var o = n.arg; | |
| 12764 | + resetTryEntry(r); | |
| 12765 | + } | |
| 12766 | + return o; | |
| 12767 | + } | |
| 12768 | + } | |
| 12769 | + throw new Error("illegal catch attempt"); | |
| 12770 | + }, | |
| 12771 | + delegateYield: function delegateYield(e, r, n) { | |
| 12772 | + return this.delegate = { | |
| 12773 | + iterator: values(e), | |
| 12774 | + resultName: r, | |
| 12775 | + nextLoc: n | |
| 12776 | + }, "next" === this.method && (this.arg = t), y; | |
| 12777 | + } | |
| 12778 | + }, e; | |
| 12779 | +} | |
| 12780 | +module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12781 | + | |
| 12782 | +/***/ }), | |
| 12783 | + | |
| 12784 | +/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": | |
| 12785 | +/*!****************************************************************!*\ | |
| 12786 | + !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! | |
| 12787 | + \****************************************************************/ | |
| 12788 | +/***/ ((module) => { | |
| 12789 | + | |
| 12790 | +function _setPrototypeOf(o, p) { | |
| 12791 | + module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { | |
| 12792 | + o.__proto__ = p; | |
| 12793 | + return o; | |
| 12794 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12795 | + return _setPrototypeOf(o, p); | |
| 12796 | +} | |
| 12797 | +module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12798 | + | |
| 12799 | +/***/ }), | |
| 12800 | + | |
| 12801 | +/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": | |
| 12802 | +/*!***************************************************************!*\ | |
| 12803 | + !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! | |
| 12804 | + \***************************************************************/ | |
| 12805 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 12806 | + | |
| 12807 | +var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); | |
| 12808 | +var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); | |
| 12809 | +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 12810 | +var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); | |
| 12811 | +function _slicedToArray(arr, i) { | |
| 12812 | + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); | |
| 12813 | +} | |
| 12814 | +module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12815 | + | |
| 12816 | +/***/ }), | |
| 12817 | + | |
| 12818 | +/***/ "../node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js": | |
| 12819 | +/*!***********************************************************************!*\ | |
| 12820 | + !*** ../node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js ***! | |
| 12821 | + \***********************************************************************/ | |
| 12822 | +/***/ ((module) => { | |
| 12823 | + | |
| 12824 | +function _taggedTemplateLiteral(strings, raw) { | |
| 12825 | + if (!raw) { | |
| 12826 | + raw = strings.slice(0); | |
| 12827 | + } | |
| 12828 | + return Object.freeze(Object.defineProperties(strings, { | |
| 12829 | + raw: { | |
| 12830 | + value: Object.freeze(raw) | |
| 12831 | + } | |
| 12832 | + })); | |
| 12833 | +} | |
| 12834 | +module.exports = _taggedTemplateLiteral, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12835 | + | |
| 12836 | +/***/ }), | |
| 12837 | + | |
| 12838 | +/***/ "../node_modules/@babel/runtime/helpers/toConsumableArray.js": | |
| 12839 | +/*!*******************************************************************!*\ | |
| 12840 | + !*** ../node_modules/@babel/runtime/helpers/toConsumableArray.js ***! | |
| 12841 | + \*******************************************************************/ | |
| 12842 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 12843 | + | |
| 12844 | +var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"); | |
| 12845 | +var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "../node_modules/@babel/runtime/helpers/iterableToArray.js"); | |
| 12846 | +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 12847 | +var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js"); | |
| 12848 | +function _toConsumableArray(arr) { | |
| 12849 | + return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread(); | |
| 12850 | +} | |
| 12851 | +module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12852 | + | |
| 12853 | +/***/ }), | |
| 12854 | + | |
| 12855 | +/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 12856 | +/*!*************************************************************!*\ | |
| 12857 | + !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 12858 | + \*************************************************************/ | |
| 12859 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 12860 | + | |
| 12861 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 12862 | +function toPrimitive(t, r) { | |
| 12863 | + if ("object" != _typeof(t) || !t) return t; | |
| 12864 | + var e = t[Symbol.toPrimitive]; | |
| 12865 | + if (void 0 !== e) { | |
| 12866 | + var i = e.call(t, r || "default"); | |
| 12867 | + if ("object" != _typeof(i)) return i; | |
| 12868 | + throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 12869 | + } | |
| 12870 | + return ("string" === r ? String : Number)(t); | |
| 12871 | +} | |
| 12872 | +module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12873 | + | |
| 12874 | +/***/ }), | |
| 12875 | + | |
| 12876 | +/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 12877 | +/*!***************************************************************!*\ | |
| 12878 | + !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 12879 | + \***************************************************************/ | |
| 12880 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 12881 | + | |
| 12882 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 12883 | +var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 12884 | +function toPropertyKey(t) { | |
| 12885 | + var i = toPrimitive(t, "string"); | |
| 12886 | + return "symbol" == _typeof(i) ? i : String(i); | |
| 12887 | +} | |
| 12888 | +module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12889 | + | |
| 12890 | +/***/ }), | |
| 12891 | + | |
| 12892 | +/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 12893 | +/*!********************************************************!*\ | |
| 12894 | + !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 12895 | + \********************************************************/ | |
| 12896 | +/***/ ((module) => { | |
| 12897 | + | |
| 12898 | +function _typeof(o) { | |
| 12899 | + "@babel/helpers - typeof"; | |
| 12900 | + | |
| 12901 | + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 12902 | + return typeof o; | |
| 12903 | + } : function (o) { | |
| 12904 | + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 12905 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o); | |
| 12906 | +} | |
| 12907 | +module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12908 | + | |
| 12909 | +/***/ }), | |
| 12910 | + | |
| 12911 | +/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": | |
| 12912 | +/*!****************************************************************************!*\ | |
| 12913 | + !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! | |
| 12914 | + \****************************************************************************/ | |
| 12915 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 12916 | + | |
| 12917 | +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 12918 | +function _unsupportedIterableToArray(o, minLen) { | |
| 12919 | + if (!o) return; | |
| 12920 | + if (typeof o === "string") return arrayLikeToArray(o, minLen); | |
| 12921 | + var n = Object.prototype.toString.call(o).slice(8, -1); | |
| 12922 | + if (n === "Object" && o.constructor) n = o.constructor.name; | |
| 12923 | + if (n === "Map" || n === "Set") return Array.from(o); | |
| 12924 | + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); | |
| 12925 | +} | |
| 12926 | +module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 12927 | + | |
| 12928 | +/***/ }), | |
| 12929 | + | |
| 12930 | +/***/ "../node_modules/@babel/runtime/regenerator/index.js": | |
| 12931 | +/*!***********************************************************!*\ | |
| 12932 | + !*** ../node_modules/@babel/runtime/regenerator/index.js ***! | |
| 12933 | + \***********************************************************/ | |
| 12934 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 12935 | + | |
| 12936 | +// TODO(Babel 8): Remove this file. | |
| 12937 | + | |
| 12938 | +var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")(); | |
| 12939 | +module.exports = runtime; | |
| 12940 | + | |
| 12941 | +// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= | |
| 12942 | +try { | |
| 12943 | + regeneratorRuntime = runtime; | |
| 12944 | +} catch (accidentalStrictMode) { | |
| 12945 | + if (typeof globalThis === "object") { | |
| 12946 | + globalThis.regeneratorRuntime = runtime; | |
| 12947 | + } else { | |
| 12948 | + Function("r", "regeneratorRuntime = r")(runtime); | |
| 12949 | + } | |
| 12950 | +} | |
| 12951 | + | |
| 12952 | + | |
| 11465 | 12953 | /***/ }) |
| 11466 | 12954 | |
| 11467 | 12955 | /******/ }); |
| 11468 | 12956 | /************************************************************************/ |
| @@ -11490,8 +12978,20 @@ | ||
| 11490 | 12978 | /******/ return module.exports; |
| 11491 | 12979 | /******/ } |
| 11492 | 12980 | /******/ |
| 11493 | 12981 | /************************************************************************/ |
| 12982 | +/******/ /* webpack/runtime/compat get default export */ | |
| 12983 | +/******/ (() => { | |
| 12984 | +/******/ // getDefaultExport function for compatibility with non-harmony modules | |
| 12985 | +/******/ __webpack_require__.n = (module) => { | |
| 12986 | +/******/ var getter = module && module.__esModule ? | |
| 12987 | +/******/ () => (module['default']) : | |
| 12988 | +/******/ () => (module); | |
| 12989 | +/******/ __webpack_require__.d(getter, { a: getter }); | |
| 12990 | +/******/ return getter; | |
| 12991 | +/******/ }; | |
| 12992 | +/******/ })(); | |
| 12993 | +/******/ | |
| 11494 | 12994 | /******/ /* webpack/runtime/define property getters */ |
| 11495 | 12995 | /******/ (() => { |
| 11496 | 12996 | /******/ // define getter functions for harmony exports |
| 11497 | 12997 | /******/ __webpack_require__.d = (exports, definition) => { |
| @@ -11518,11 +13018,16 @@ | ||
| 11518 | 13018 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); |
| 11519 | 13019 | /******/ }; |
| 11520 | 13020 | /******/ })(); |
| 11521 | 13021 | /******/ |
| 13022 | +/******/ /* webpack/runtime/nonce */ | |
| 13023 | +/******/ (() => { | |
| 13024 | +/******/ __webpack_require__.nc = undefined; | |
| 13025 | +/******/ })(); | |
| 13026 | +/******/ | |
| 11522 | 13027 | /************************************************************************/ |
| 11523 | 13028 | var __webpack_exports__ = {}; |
| 11524 | -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. | |
| 13029 | +// This entry need to be wrapped in an IIFE because it need to be in strict mode. | |
| 11525 | 13030 | (() => { |
| 11526 | 13031 | "use strict"; |
| 11527 | 13032 | var exports = __webpack_exports__; |
| 11528 | 13033 | /*!*******************************************************!*\ |
| @@ -11538,11 +13043,12 @@ | ||
| 11538 | 13043 | var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); |
| 11539 | 13044 | var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); |
| 11540 | 13045 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 11541 | 13046 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 13047 | +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js")); | |
| 13048 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 11542 | 13049 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 11543 | 13050 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 11544 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 11545 | 13051 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 11546 | 13052 | var _aiLayoutBehavior = _interopRequireDefault(__webpack_require__(/*! ./ai-layout-behavior */ "../modules/ai/assets/js/editor/ai-layout-behavior.js")); |
| 11547 | 13053 | var _editorIntegration = __webpack_require__(/*! ./utils/editor-integration */ "../modules/ai/assets/js/editor/utils/editor-integration.js"); |
| 11548 | 13054 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| @@ -11548,12 +13054,15 @@ | ||
| 11548 | 13054 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 11549 | 13055 | var _config = __webpack_require__(/*! ./pages/form-layout/context/config */ "../modules/ai/assets/js/editor/pages/form-layout/context/config.js"); |
| 11550 | 13056 | var _applyTemplateForAiBehavior = _interopRequireDefault(__webpack_require__(/*! ./integration/library/apply-template-for-ai-behavior */ "../modules/ai/assets/js/editor/integration/library/apply-template-for-ai-behavior.js")); |
| 11551 | 13057 | var _attachments = __webpack_require__(/*! ./pages/form-layout/components/attachments */ "../modules/ai/assets/js/editor/pages/form-layout/components/attachments.js"); |
| 11552 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 11553 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 11554 | -var AI_ATTACHMENT = exports.AI_ATTACHMENT = 'ai-attachment'; | |
| 11555 | -var Module = exports["default"] = /*#__PURE__*/function (_elementorModules$edi) { | |
| 13058 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 13059 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 13060 | +var AI_ATTACHMENT = 'ai-attachment'; | |
| 13061 | +exports.AI_ATTACHMENT = AI_ATTACHMENT; | |
| 13062 | +var Module = /*#__PURE__*/function (_elementorModules$edi) { | |
| 13063 | + (0, _inherits2.default)(Module, _elementorModules$edi); | |
| 13064 | + var _super = _createSuper(Module); | |
| 11556 | 13065 | function Module() { |
| 11557 | 13066 | var _this; |
| 11558 | 13067 | (0, _classCallCheck2.default)(this, Module); |
| 11559 | 13068 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| @@ -11558,10 +13067,11 @@ | ||
| 11558 | 13067 | (0, _classCallCheck2.default)(this, Module); |
| 11559 | 13068 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| 11560 | 13069 | args[_key] = arguments[_key]; |
| 11561 | 13070 | } |
| 11562 | - _this = _callSuper(this, Module, [].concat(args)); | |
| 11563 | - (0, _defineProperty2.default)(_this, "registerVariationsContextMenu", function (groups, currentElement) { | |
| 13071 | + _this = _super.call.apply(_super, [this].concat(args)); | |
| 13072 | + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "registerVariationsContextMenu", function (groups, currentElement) { | |
| 13073 | + var _ElementorAiConfig, _ElementorAiConfig$us; | |
| 11564 | 13074 | var saveGroup = groups.find(function (group) { |
| 11565 | 13075 | return 'save' === group.name; |
| 11566 | 13076 | }); |
| 11567 | 13077 | if (!saveGroup) { |
| @@ -11574,11 +13084,11 @@ | ||
| 11574 | 13084 | return 0 !== currentElement.getContainer().children.length; |
| 11575 | 13085 | }, |
| 11576 | 13086 | title: (0, _i18n.__)('Generate variations with AI', 'elementor'), |
| 11577 | 13087 | callback: function () { |
| 11578 | - var _callback = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 13088 | + var _callback = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 11579 | 13089 | var container, json, attachments; |
| 11580 | - return _regenerator.default.wrap(function (_context) { | |
| 13090 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 11581 | 13091 | while (1) switch (_context.prev = _context.next) { |
| 11582 | 13092 | case 0: |
| 11583 | 13093 | container = currentElement.getContainer(); |
| 11584 | 13094 | json = container.model.toJSON({ |
| @@ -11611,9 +13121,9 @@ | ||
| 11611 | 13121 | replace: true |
| 11612 | 13122 | }); |
| 11613 | 13123 | } |
| 11614 | 13124 | }); |
| 11615 | - case 1: | |
| 13125 | + case 4: | |
| 11616 | 13126 | case "end": |
| 11617 | 13127 | return _context.stop(); |
| 11618 | 13128 | } |
| 11619 | 13129 | }, _callee); |
| @@ -11623,8 +13133,12 @@ | ||
| 11623 | 13133 | } |
| 11624 | 13134 | return callback; |
| 11625 | 13135 | }() |
| 11626 | 13136 | }; |
| 13137 | + if (!((_ElementorAiConfig = ElementorAiConfig) !== null && _ElementorAiConfig !== void 0 && (_ElementorAiConfig$us = _ElementorAiConfig.usage) !== null && _ElementorAiConfig$us !== void 0 && _ElementorAiConfig$us.hasAiSubscription)) { | |
| 13138 | + var svg = "\n\t\t\t<svg viewBox=\"0 0 24 24\">\n\t\t\t\t<path d=\"M12 5.25C12.2508 5.25 12.485 5.37533 12.6241 5.58397L16.1703 10.9033L20.5315 7.41435C20.7777\n\t\t\t\t7.21743 21.1207 7.19544 21.39 7.35933C21.6592 7.52321 21.7973 7.83798 21.7355 8.14709L19.7355\n\t\t\t\t18.1471C19.6654 18.4977 19.3576 18.75 19 18.75H5.00004C4.64253 18.75 4.33472 18.4977 4.26461\n\t\t\t\t18.1471L2.2646 8.14709C2.20278 7.83798 2.34084 7.52321 2.61012 7.35933C2.8794 7.19544 3.22241\n\t\t\t\t7.21743 3.46856 7.41435L7.82977 10.9033L11.376 5.58397C11.5151 5.37533 11.7493 5.25 12 5.25ZM12\n\t\t\t\t7.35208L8.62408 12.416C8.50748 12.5909 8.32282 12.7089 8.1151 12.7411C7.90738 12.7734 7.69566\n\t\t\t\t12.717 7.53152 12.5857L4.13926 9.87185L5.61489 17.25H18.3852L19.8608 9.87185L16.4686 12.5857C16.3044\n\t\t\t\t12.717 16.0927 12.7734 15.885 12.7411C15.6773 12.7089 15.4926 12.5909 15.376 12.416L12 7.35208Z\">\n\t\t\t\t</path>\n \t\t</svg>"; | |
| 13139 | + contextMenu.shortcut = "<div class=\"elementor-context-menu-list__item__ai-badge\">".concat(svg, "</div>"); | |
| 13140 | + } | |
| 11627 | 13141 | |
| 11628 | 13142 | // Add on top of save group actions |
| 11629 | 13143 | saveGroup.actions.unshift(contextMenu); |
| 11630 | 13144 | return groups; |
| @@ -11630,10 +13144,9 @@ | ||
| 11630 | 13144 | return groups; |
| 11631 | 13145 | }); |
| 11632 | 13146 | return _this; |
| 11633 | 13147 | } |
| 11634 | - (0, _inherits2.default)(Module, _elementorModules$edi); | |
| 11635 | - return (0, _createClass2.default)(Module, [{ | |
| 13148 | + (0, _createClass2.default)(Module, [{ | |
| 11636 | 13149 | key: "onElementorInit", |
| 11637 | 13150 | value: function onElementorInit() { |
| 11638 | 13151 | var _this2 = this; |
| 11639 | 13152 | elementor.hooks.addFilter('views/add-section/behaviors', this.registerAiLayoutBehavior); |
| @@ -11698,9 +13211,11 @@ | ||
| 11698 | 13211 | } |
| 11699 | 13212 | return viewId; |
| 11700 | 13213 | } |
| 11701 | 13214 | }]); |
| 13215 | + return Module; | |
| 11702 | 13216 | }(elementorModules.editor.utils.Module); |
| 13217 | +exports["default"] = Module; | |
| 11703 | 13218 | new Module(); |
| 11704 | 13219 | })(); |
| 11705 | 13220 | |
| 11706 | 13221 | /******/ })() |