| @@ -1,2489 +1,8 @@ | ||
| 1 | +/*! elementor - v3.27.0 - 13-02-2025 */ | |
| 1 | 2 | /******/ (() => { // webpackBootstrap |
| 2 | 3 | /******/ var __webpack_modules__ = ({ |
| 3 | 4 | |
| 4 | -/***/ "../modules/element-manager/assets/js/api.js": | |
| 5 | -/*!***************************************************!*\ | |
| 6 | - !*** ../modules/element-manager/assets/js/api.js ***! | |
| 7 | - \***************************************************/ | |
| 8 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 9 | - | |
| 10 | -"use strict"; | |
| 11 | - | |
| 12 | - | |
| 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.saveDisabledWidgets = exports.markNoticeViewed = exports.getUsageWidgets = exports.getAdminAppData = void 0; | |
| 18 | -var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 19 | -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 20 | -var saveDisabledWidgets = exports.saveDisabledWidgets = /*#__PURE__*/function () { | |
| 21 | - var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(widgetsDisabled) { | |
| 22 | - var elementsRestriction, | |
| 23 | - bodyData, | |
| 24 | - _args = arguments, | |
| 25 | - _t; | |
| 26 | - return _regenerator.default.wrap(function (_context) { | |
| 27 | - while (1) switch (_context.prev = _context.next) { | |
| 28 | - case 0: | |
| 29 | - elementsRestriction = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}; | |
| 30 | - _context.prev = 1; | |
| 31 | - bodyData = { | |
| 32 | - action: 'elementor_element_manager_save_disabled_elements', | |
| 33 | - nonce: eElementManagerConfig.nonce, | |
| 34 | - widgets: JSON.stringify(widgetsDisabled) | |
| 35 | - }; | |
| 36 | - if (null !== elementsRestriction) { | |
| 37 | - bodyData.elements_restriction = JSON.stringify(elementsRestriction); | |
| 38 | - } | |
| 39 | - _context.next = 2; | |
| 40 | - return fetch(eElementManagerConfig.ajaxurl, { | |
| 41 | - method: 'POST', | |
| 42 | - headers: { | |
| 43 | - 'Content-Type': 'application/x-www-form-urlencoded' | |
| 44 | - }, | |
| 45 | - body: new URLSearchParams(bodyData) | |
| 46 | - }); | |
| 47 | - case 2: | |
| 48 | - _context.next = 4; | |
| 49 | - break; | |
| 50 | - case 3: | |
| 51 | - _context.prev = 3; | |
| 52 | - _t = _context["catch"](1); | |
| 53 | - console.error(_t); // eslint-disable-line no-console | |
| 54 | - case 4: | |
| 55 | - case "end": | |
| 56 | - return _context.stop(); | |
| 57 | - } | |
| 58 | - }, _callee, null, [[1, 3]]); | |
| 59 | - })); | |
| 60 | - return function saveDisabledWidgets(_x) { | |
| 61 | - return _ref.apply(this, arguments); | |
| 62 | - }; | |
| 63 | -}(); | |
| 64 | -var getAdminAppData = exports.getAdminAppData = /*#__PURE__*/function () { | |
| 65 | - var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { | |
| 66 | - var response, data, _t2; | |
| 67 | - return _regenerator.default.wrap(function (_context2) { | |
| 68 | - while (1) switch (_context2.prev = _context2.next) { | |
| 69 | - case 0: | |
| 70 | - _context2.prev = 0; | |
| 71 | - _context2.next = 1; | |
| 72 | - return fetch(eElementManagerConfig.ajaxurl, { | |
| 73 | - method: 'POST', | |
| 74 | - headers: { | |
| 75 | - 'Content-Type': 'application/x-www-form-urlencoded' | |
| 76 | - }, | |
| 77 | - body: new URLSearchParams({ | |
| 78 | - action: 'elementor_element_manager_get_admin_app_data', | |
| 79 | - nonce: eElementManagerConfig.nonce | |
| 80 | - }) | |
| 81 | - }); | |
| 82 | - case 1: | |
| 83 | - response = _context2.sent; | |
| 84 | - _context2.next = 2; | |
| 85 | - return response.json(); | |
| 86 | - case 2: | |
| 87 | - data = _context2.sent; | |
| 88 | - if (!data.success) { | |
| 89 | - _context2.next = 3; | |
| 90 | - break; | |
| 91 | - } | |
| 92 | - return _context2.abrupt("return", data.data); | |
| 93 | - case 3: | |
| 94 | - _context2.next = 5; | |
| 95 | - break; | |
| 96 | - case 4: | |
| 97 | - _context2.prev = 4; | |
| 98 | - _t2 = _context2["catch"](0); | |
| 99 | - console.error(_t2); // eslint-disable-line no-console | |
| 100 | - case 5: | |
| 101 | - case "end": | |
| 102 | - return _context2.stop(); | |
| 103 | - } | |
| 104 | - }, _callee2, null, [[0, 4]]); | |
| 105 | - })); | |
| 106 | - return function getAdminAppData() { | |
| 107 | - return _ref2.apply(this, arguments); | |
| 108 | - }; | |
| 109 | -}(); | |
| 110 | -var getUsageWidgets = exports.getUsageWidgets = /*#__PURE__*/function () { | |
| 111 | - var _ref3 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { | |
| 112 | - var response, data, _t3; | |
| 113 | - return _regenerator.default.wrap(function (_context3) { | |
| 114 | - while (1) switch (_context3.prev = _context3.next) { | |
| 115 | - case 0: | |
| 116 | - _context3.prev = 0; | |
| 117 | - _context3.next = 1; | |
| 118 | - return fetch(eElementManagerConfig.ajaxurl, { | |
| 119 | - method: 'POST', | |
| 120 | - headers: { | |
| 121 | - 'Content-Type': 'application/x-www-form-urlencoded' | |
| 122 | - }, | |
| 123 | - body: new URLSearchParams({ | |
| 124 | - action: 'elementor_element_manager_get_widgets_usage', | |
| 125 | - nonce: eElementManagerConfig.nonce | |
| 126 | - }) | |
| 127 | - }); | |
| 128 | - case 1: | |
| 129 | - response = _context3.sent; | |
| 130 | - _context3.next = 2; | |
| 131 | - return response.json(); | |
| 132 | - case 2: | |
| 133 | - data = _context3.sent; | |
| 134 | - if (!data.success) { | |
| 135 | - _context3.next = 3; | |
| 136 | - break; | |
| 137 | - } | |
| 138 | - return _context3.abrupt("return", data.data); | |
| 139 | - case 3: | |
| 140 | - _context3.next = 5; | |
| 141 | - break; | |
| 142 | - case 4: | |
| 143 | - _context3.prev = 4; | |
| 144 | - _t3 = _context3["catch"](0); | |
| 145 | - console.error(_t3); // eslint-disable-line no-console | |
| 146 | - case 5: | |
| 147 | - case "end": | |
| 148 | - return _context3.stop(); | |
| 149 | - } | |
| 150 | - }, _callee3, null, [[0, 4]]); | |
| 151 | - })); | |
| 152 | - return function getUsageWidgets() { | |
| 153 | - return _ref3.apply(this, arguments); | |
| 154 | - }; | |
| 155 | -}(); | |
| 156 | -var markNoticeViewed = exports.markNoticeViewed = /*#__PURE__*/function () { | |
| 157 | - var _ref4 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4(noticeId, nonce) { | |
| 158 | - var _t4; | |
| 159 | - return _regenerator.default.wrap(function (_context4) { | |
| 160 | - while (1) switch (_context4.prev = _context4.next) { | |
| 161 | - case 0: | |
| 162 | - _context4.prev = 0; | |
| 163 | - _context4.next = 1; | |
| 164 | - return fetch(eElementManagerConfig.ajaxurl, { | |
| 165 | - method: 'POST', | |
| 166 | - headers: { | |
| 167 | - 'Content-Type': 'application/x-www-form-urlencoded' | |
| 168 | - }, | |
| 169 | - body: new URLSearchParams({ | |
| 170 | - action: 'elementor_set_admin_notice_viewed', | |
| 171 | - notice_id: noticeId, | |
| 172 | - _wpnonce: nonce | |
| 173 | - }) | |
| 174 | - }); | |
| 175 | - case 1: | |
| 176 | - _context4.next = 3; | |
| 177 | - break; | |
| 178 | - case 2: | |
| 179 | - _context4.prev = 2; | |
| 180 | - _t4 = _context4["catch"](0); | |
| 181 | - console.error(_t4); // eslint-disable-line no-console | |
| 182 | - case 3: | |
| 183 | - case "end": | |
| 184 | - return _context4.stop(); | |
| 185 | - } | |
| 186 | - }, _callee4, null, [[0, 2]]); | |
| 187 | - })); | |
| 188 | - return function markNoticeViewed(_x2, _x3) { | |
| 189 | - return _ref4.apply(this, arguments); | |
| 190 | - }; | |
| 191 | -}(); | |
| 192 | - | |
| 193 | -/***/ }), | |
| 194 | - | |
| 195 | -/***/ "../modules/element-manager/assets/js/app-editor-one/App.js": | |
| 196 | -/*!******************************************************************!*\ | |
| 197 | - !*** ../modules/element-manager/assets/js/app-editor-one/App.js ***! | |
| 198 | - \******************************************************************/ | |
| 199 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 200 | - | |
| 201 | -"use strict"; | |
| 202 | - | |
| 203 | - | |
| 204 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 205 | -var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 206 | -Object.defineProperty(exports, "__esModule", ({ | |
| 207 | - value: true | |
| 208 | -})); | |
| 209 | -exports.App = void 0; | |
| 210 | -var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); | |
| 211 | -var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 212 | -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 213 | -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 214 | -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 215 | -var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 216 | -var _hooks = __webpack_require__(/*! ./hooks */ "../modules/element-manager/assets/js/app-editor-one/hooks/index.js"); | |
| 217 | -var _components = __webpack_require__(/*! ./components */ "../modules/element-manager/assets/js/app-editor-one/components/index.js"); | |
| 218 | -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); } | |
| 219 | -var App = exports.App = function App() { | |
| 220 | - var _useState = (0, _react.useState)(false), | |
| 221 | - _useState2 = (0, _slicedToArray2.default)(_useState, 2), | |
| 222 | - isConfirmDialogOpen = _useState2[0], | |
| 223 | - setIsConfirmDialogOpen = _useState2[1]; | |
| 224 | - var _useElementManager = (0, _hooks.useElementManager)(), | |
| 225 | - isLoading = _useElementManager.isLoading, | |
| 226 | - widgets = _useElementManager.widgets, | |
| 227 | - promotionWidgets = _useElementManager.promotionWidgets, | |
| 228 | - plugins = _useElementManager.plugins, | |
| 229 | - roles = _useElementManager.roles, | |
| 230 | - widgetsDisabled = _useElementManager.widgetsDisabled, | |
| 231 | - widgetsRoleRestrictions = _useElementManager.widgetsRoleRestrictions, | |
| 232 | - setWidgetsRoleRestrictions = _useElementManager.setWidgetsRoleRestrictions, | |
| 233 | - promotionData = _useElementManager.promotionData, | |
| 234 | - noticeData = _useElementManager.noticeData, | |
| 235 | - usageWidgets = _useElementManager.usageWidgets, | |
| 236 | - changeProgress = _useElementManager.changeProgress, | |
| 237 | - isSnackbarOpen = _useElementManager.isSnackbarOpen, | |
| 238 | - setIsSnackbarOpen = _useElementManager.setIsSnackbarOpen, | |
| 239 | - getWidgetUsage = _useElementManager.getWidgetUsage, | |
| 240 | - scanUsageElements = _useElementManager.scanUsageElements, | |
| 241 | - saveChanges = _useElementManager.saveChanges, | |
| 242 | - deactivateAllUnusedWidgets = _useElementManager.deactivateAllUnusedWidgets, | |
| 243 | - enableAllWidgets = _useElementManager.enableAllWidgets, | |
| 244 | - toggleWidget = _useElementManager.toggleWidget, | |
| 245 | - dismissNotice = _useElementManager.dismissNotice; | |
| 246 | - var _useWidgetFilters = (0, _hooks.useWidgetFilters)(widgets, widgetsDisabled, getWidgetUsage), | |
| 247 | - searchKeyword = _useWidgetFilters.searchKeyword, | |
| 248 | - setSearchKeyword = _useWidgetFilters.setSearchKeyword, | |
| 249 | - filterByPlugin = _useWidgetFilters.filterByPlugin, | |
| 250 | - setFilterByPlugin = _useWidgetFilters.setFilterByPlugin, | |
| 251 | - filterByStatus = _useWidgetFilters.filterByStatus, | |
| 252 | - setFilterByStatus = _useWidgetFilters.setFilterByStatus, | |
| 253 | - sortedAndFilteredWidgets = _useWidgetFilters.sortedAndFilteredWidgets, | |
| 254 | - getSortingIndicatorClasses = _useWidgetFilters.getSortingIndicatorClasses, | |
| 255 | - onSortingClicked = _useWidgetFilters.onSortingClicked, | |
| 256 | - setSortByUsage = _useWidgetFilters.setSortByUsage; | |
| 257 | - var handleScanUsage = (0, _react.useCallback)(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 258 | - return _regenerator.default.wrap(function (_context) { | |
| 259 | - while (1) switch (_context.prev = _context.next) { | |
| 260 | - case 0: | |
| 261 | - _context.next = 1; | |
| 262 | - return scanUsageElements(); | |
| 263 | - case 1: | |
| 264 | - setSortByUsage(); | |
| 265 | - case 2: | |
| 266 | - case "end": | |
| 267 | - return _context.stop(); | |
| 268 | - } | |
| 269 | - }, _callee); | |
| 270 | - })), [scanUsageElements, setSortByUsage]); | |
| 271 | - var handleSaveClick = (0, _react.useCallback)(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { | |
| 272 | - return _regenerator.default.wrap(function (_context2) { | |
| 273 | - while (1) switch (_context2.prev = _context2.next) { | |
| 274 | - case 0: | |
| 275 | - setIsConfirmDialogOpen(false); | |
| 276 | - _context2.next = 1; | |
| 277 | - return saveChanges(); | |
| 278 | - case 1: | |
| 279 | - case "end": | |
| 280 | - return _context2.stop(); | |
| 281 | - } | |
| 282 | - }, _callee2); | |
| 283 | - })), [saveChanges]); | |
| 284 | - if (isLoading) { | |
| 285 | - return /*#__PURE__*/_react.default.createElement(_ui.Stack, { | |
| 286 | - justifyContent: "center", | |
| 287 | - sx: { | |
| 288 | - margin: 12 | |
| 289 | - } | |
| 290 | - }, /*#__PURE__*/_react.default.createElement(_ui.CircularProgress, { | |
| 291 | - size: 80 | |
| 292 | - })); | |
| 293 | - } | |
| 294 | - return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 295 | - variant: "body2", | |
| 296 | - color: "text.secondary", | |
| 297 | - sx: { | |
| 298 | - marginBlockEnd: 2.5, | |
| 299 | - maxWidth: 800 | |
| 300 | - } | |
| 301 | - }, (0, _i18n.__)('Here\'s where you can fine-tune Elementor to your workflow. Disable elements you don\'t use for a cleaner interface, more focused creative experience, and improved performance.', 'elementor'), ' ', /*#__PURE__*/_react.default.createElement(_ui.Link, { | |
| 302 | - href: "https://go.elementor.com/wp-dash-element-manager/", | |
| 303 | - rel: "noreferrer", | |
| 304 | - target: "_blank", | |
| 305 | - color: "info.light" | |
| 306 | - }, (0, _i18n.__)('Learn More', 'elementor'))), noticeData && !noticeData.is_viewed && /*#__PURE__*/_react.default.createElement(_components.NoticeAlert, { | |
| 307 | - onDismiss: dismissNotice | |
| 308 | - }), /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_components.SearchFilters, { | |
| 309 | - searchKeyword: searchKeyword, | |
| 310 | - onSearchChange: setSearchKeyword, | |
| 311 | - filterByPlugin: filterByPlugin, | |
| 312 | - onPluginFilterChange: setFilterByPlugin, | |
| 313 | - filterByStatus: filterByStatus, | |
| 314 | - onStatusFilterChange: setFilterByStatus, | |
| 315 | - plugins: plugins, | |
| 316 | - usageIsLoading: usageWidgets.isLoading, | |
| 317 | - usageData: usageWidgets.data, | |
| 318 | - widgetsDisabledCount: widgetsDisabled.length, | |
| 319 | - onScanUsage: handleScanUsage, | |
| 320 | - onDeactivateUnused: deactivateAllUnusedWidgets, | |
| 321 | - onEnableAll: enableAllWidgets, | |
| 322 | - onSaveChanges: function onSaveChanges() { | |
| 323 | - return setIsConfirmDialogOpen(true); | |
| 324 | - }, | |
| 325 | - isSaving: changeProgress.isSaving, | |
| 326 | - hasUnsavedChanges: changeProgress.isUnsavedChanges | |
| 327 | - }), /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_components.WidgetsTable, { | |
| 328 | - widgets: sortedAndFilteredWidgets, | |
| 329 | - widgetsDisabled: widgetsDisabled, | |
| 330 | - widgetsRoleRestrictions: widgetsRoleRestrictions, | |
| 331 | - setWidgetsRoleRestrictions: setWidgetsRoleRestrictions, | |
| 332 | - roles: roles, | |
| 333 | - promotionWidgets: promotionWidgets, | |
| 334 | - promotionData: promotionData, | |
| 335 | - usageWidgets: usageWidgets, | |
| 336 | - getWidgetUsage: getWidgetUsage, | |
| 337 | - onScanUsage: handleScanUsage, | |
| 338 | - onToggleWidget: toggleWidget, | |
| 339 | - getSortingIndicatorClasses: getSortingIndicatorClasses, | |
| 340 | - onSortingClicked: onSortingClicked | |
| 341 | - })), /*#__PURE__*/_react.default.createElement(_components.PromotionWidgetsTable, { | |
| 342 | - widgets: promotionWidgets, | |
| 343 | - promotionData: promotionData | |
| 344 | - })), /*#__PURE__*/_react.default.createElement(_components.ConfirmDialog, { | |
| 345 | - isOpen: isConfirmDialogOpen, | |
| 346 | - onClose: function onClose() { | |
| 347 | - return setIsConfirmDialogOpen(false); | |
| 348 | - }, | |
| 349 | - onConfirm: handleSaveClick | |
| 350 | - }), /*#__PURE__*/_react.default.createElement(_ui.Snackbar, { | |
| 351 | - open: isSnackbarOpen, | |
| 352 | - autoHideDuration: 6000, | |
| 353 | - onClose: function onClose() { | |
| 354 | - return setIsSnackbarOpen(false); | |
| 355 | - }, | |
| 356 | - message: (0, _i18n.__)('We saved your changes.', 'elementor'), | |
| 357 | - anchorOrigin: { | |
| 358 | - vertical: 'bottom', | |
| 359 | - horizontal: 'center' | |
| 360 | - } | |
| 361 | - })); | |
| 362 | -}; | |
| 363 | - | |
| 364 | -/***/ }), | |
| 365 | - | |
| 366 | -/***/ "../modules/element-manager/assets/js/app-editor-one/components/ConfirmDialog.js": | |
| 367 | -/*!***************************************************************************************!*\ | |
| 368 | - !*** ../modules/element-manager/assets/js/app-editor-one/components/ConfirmDialog.js ***! | |
| 369 | - \***************************************************************************************/ | |
| 370 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 371 | - | |
| 372 | -"use strict"; | |
| 373 | - | |
| 374 | - | |
| 375 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 376 | -Object.defineProperty(exports, "__esModule", ({ | |
| 377 | - value: true | |
| 378 | -})); | |
| 379 | -exports.ConfirmDialog = void 0; | |
| 380 | -var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 381 | -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 382 | -var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 383 | -var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 384 | -var ConfirmDialog = exports.ConfirmDialog = function ConfirmDialog(_ref) { | |
| 385 | - var isOpen = _ref.isOpen, | |
| 386 | - onClose = _ref.onClose, | |
| 387 | - onConfirm = _ref.onConfirm; | |
| 388 | - return /*#__PURE__*/_react.default.createElement(_ui.Dialog, { | |
| 389 | - open: isOpen, | |
| 390 | - onClose: onClose, | |
| 391 | - maxWidth: "sm" | |
| 392 | - }, /*#__PURE__*/_react.default.createElement(_ui.DialogTitle, null, (0, _i18n.__)('Sure you want to save these changes?', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.DialogContent, null, /*#__PURE__*/_react.default.createElement(_ui.DialogContentText, null, (0, _i18n.__)('Turning widgets off will hide them from the editor panel, and can potentially affect your layout or front-end.', 'elementor'), /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 393 | - component: "span", | |
| 394 | - sx: { | |
| 395 | - display: 'block', | |
| 396 | - mt: 2.5 | |
| 397 | - } | |
| 398 | - }, (0, _i18n.__)('If you\'re adding widgets back in, enjoy them!', 'elementor')))), /*#__PURE__*/_react.default.createElement(_ui.DialogActions, null, /*#__PURE__*/_react.default.createElement(_ui.Stack, { | |
| 399 | - direction: "row", | |
| 400 | - gap: 2, | |
| 401 | - justifyContent: "flex-end" | |
| 402 | - }, /*#__PURE__*/_react.default.createElement(_ui.Button, { | |
| 403 | - variant: "outlined", | |
| 404 | - color: "secondary", | |
| 405 | - onClick: onClose, | |
| 406 | - className: "e-id-elementor-element-manager-modal-button-cancel" | |
| 407 | - }, (0, _i18n.__)('Cancel', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.Button, { | |
| 408 | - variant: "contained", | |
| 409 | - onClick: onConfirm, | |
| 410 | - className: "e-id-elementor-element-manager-modal-button-save" | |
| 411 | - }, (0, _i18n.__)('Save', 'elementor'))))); | |
| 412 | -}; | |
| 413 | -ConfirmDialog.propTypes = { | |
| 414 | - isOpen: _propTypes.default.bool.isRequired, | |
| 415 | - onClose: _propTypes.default.func.isRequired, | |
| 416 | - onConfirm: _propTypes.default.func.isRequired | |
| 417 | -}; | |
| 418 | - | |
| 419 | -/***/ }), | |
| 420 | - | |
| 421 | -/***/ "../modules/element-manager/assets/js/app-editor-one/components/NoticeAlert.js": | |
| 422 | -/*!*************************************************************************************!*\ | |
| 423 | - !*** ../modules/element-manager/assets/js/app-editor-one/components/NoticeAlert.js ***! | |
| 424 | - \*************************************************************************************/ | |
| 425 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 426 | - | |
| 427 | -"use strict"; | |
| 428 | - | |
| 429 | - | |
| 430 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 431 | -Object.defineProperty(exports, "__esModule", ({ | |
| 432 | - value: true | |
| 433 | -})); | |
| 434 | -exports.NoticeAlert = void 0; | |
| 435 | -var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 436 | -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 437 | -var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 438 | -var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 439 | -var NoticeAlert = exports.NoticeAlert = function NoticeAlert(_ref) { | |
| 440 | - var onDismiss = _ref.onDismiss; | |
| 441 | - return /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 442 | - sx: { | |
| 443 | - mb: 2 | |
| 444 | - } | |
| 445 | - }, /*#__PURE__*/_react.default.createElement(_ui.Alert, { | |
| 446 | - severity: "warning", | |
| 447 | - onClose: onDismiss | |
| 448 | - }, /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 449 | - component: "strong", | |
| 450 | - variant: "body2", | |
| 451 | - sx: { | |
| 452 | - fontWeight: 700 | |
| 453 | - } | |
| 454 | - }, (0, _i18n.__)('Before you continue:', 'elementor')), ' ', (0, _i18n.__)('Deactivating widgets here will remove them from both the Elementor Editor and your website, which can cause changes to your overall layout, design and what visitors see.', 'elementor'))); | |
| 455 | -}; | |
| 456 | -NoticeAlert.propTypes = { | |
| 457 | - onDismiss: _propTypes.default.func.isRequired | |
| 458 | -}; | |
| 459 | - | |
| 460 | -/***/ }), | |
| 461 | - | |
| 462 | -/***/ "../modules/element-manager/assets/js/app-editor-one/components/PromotionWidgetsTable.js": | |
| 463 | -/*!***********************************************************************************************!*\ | |
| 464 | - !*** ../modules/element-manager/assets/js/app-editor-one/components/PromotionWidgetsTable.js ***! | |
| 465 | - \***********************************************************************************************/ | |
| 466 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 467 | - | |
| 468 | -"use strict"; | |
| 469 | - | |
| 470 | - | |
| 471 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 472 | -Object.defineProperty(exports, "__esModule", ({ | |
| 473 | - value: true | |
| 474 | -})); | |
| 475 | -exports.PromotionWidgetsTable = void 0; | |
| 476 | -var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 477 | -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 478 | -var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); | |
| 479 | -var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 480 | -var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 481 | -var _upgradeButton = __webpack_require__(/*! ../../upgrade-button */ "../modules/element-manager/assets/js/upgrade-button.js"); | |
| 482 | -var _RolePermissions = __webpack_require__(/*! ./RolePermissions */ "../modules/element-manager/assets/js/app-editor-one/components/RolePermissions.js"); | |
| 483 | -var PromotionWidgetsTable = exports.PromotionWidgetsTable = function PromotionWidgetsTable(_ref) { | |
| 484 | - var widgets = _ref.widgets, | |
| 485 | - promotionData = _ref.promotionData; | |
| 486 | - var elementManager = promotionData.element_manager; | |
| 487 | - if (!widgets.length) { | |
| 488 | - return null; | |
| 489 | - } | |
| 490 | - return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 491 | - sx: { | |
| 492 | - mt: 5, | |
| 493 | - mb: 2.5 | |
| 494 | - } | |
| 495 | - }, /*#__PURE__*/_react.default.createElement(_ui.Stack, { | |
| 496 | - direction: "row", | |
| 497 | - justifyContent: "space-between", | |
| 498 | - alignItems: "center" | |
| 499 | - }, /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 500 | - variant: "h6", | |
| 501 | - component: "h3" | |
| 502 | - }, (0, _i18n.__)('Elementor Pro Elements', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 503 | - variant: "body2", | |
| 504 | - component: "p" | |
| 505 | - }, (0, _i18n.__)('Unleash the full power of Elementor\'s features and web creation tools.', 'elementor'))), /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_upgradeButton.UpgradeButton, { | |
| 506 | - href: elementManager.url, | |
| 507 | - text: elementManager.text, | |
| 508 | - className: "e-id-elementor-element-manager-button-upgrade-pro-elements" | |
| 509 | - })))), /*#__PURE__*/_react.default.createElement(_ui.TableContainer, { | |
| 510 | - component: _ui.Paper, | |
| 511 | - variant: "outlined" | |
| 512 | - }, /*#__PURE__*/_react.default.createElement(_ui.Table, { | |
| 513 | - size: "small" | |
| 514 | - }, /*#__PURE__*/_react.default.createElement(_ui.TableHead, null, /*#__PURE__*/_react.default.createElement(_ui.TableRow, null, /*#__PURE__*/_react.default.createElement(_ui.TableCell, { | |
| 515 | - sx: function sx(theme) { | |
| 516 | - return { | |
| 517 | - width: theme.spacing(25) | |
| 518 | - }; | |
| 519 | - } | |
| 520 | - }, (0, _i18n.__)('Element', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.TableCell, { | |
| 521 | - sx: function sx(theme) { | |
| 522 | - return { | |
| 523 | - width: theme.spacing(10) | |
| 524 | - }; | |
| 525 | - } | |
| 526 | - }, (0, _i18n.__)('Status', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, (0, _i18n.__)('Usage', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, (0, _i18n.__)('Plugin', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(_ui.Stack, { | |
| 527 | - direction: "row", | |
| 528 | - justifyContent: "flex-start", | |
| 529 | - alignItems: "center", | |
| 530 | - gap: 1 | |
| 531 | - }, /*#__PURE__*/_react.default.createElement(_ui.Box, null, (0, _i18n.__)('Permission', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_ui.Tooltip, { | |
| 532 | - placement: "top", | |
| 533 | - title: (0, _i18n.__)('Choose which role will have access to a specific widget.', 'elementor') | |
| 534 | - }, /*#__PURE__*/_react.default.createElement(_ui.IconButton, { | |
| 535 | - size: "small" | |
| 536 | - }, /*#__PURE__*/_react.default.createElement(_icons.HelpIcon, { | |
| 537 | - fontSize: "small" | |
| 538 | - })))))))), /*#__PURE__*/_react.default.createElement(_ui.TableBody, null, widgets.map(function (widget) { | |
| 539 | - return /*#__PURE__*/_react.default.createElement(_ui.TableRow, { | |
| 540 | - key: widget.name, | |
| 541 | - hover: true | |
| 542 | - }, /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 543 | - sx: { | |
| 544 | - display: 'flex', | |
| 545 | - alignItems: 'center' | |
| 546 | - } | |
| 547 | - }, /*#__PURE__*/_react.default.createElement("i", { | |
| 548 | - style: { | |
| 549 | - marginInlineEnd: 8 | |
| 550 | - }, | |
| 551 | - className: widget.icon | |
| 552 | - }), widget.title)), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(_ui.Switch, { | |
| 553 | - checked: false, | |
| 554 | - disabled: true, | |
| 555 | - size: "small", | |
| 556 | - "data-id": "e-id-elementor-element-manager-toggle-".concat(widget.name) | |
| 557 | - })), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, (0, _i18n.__)('Elementor Pro', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(_RolePermissions.EditButtonDisabled, { | |
| 558 | - widgetName: widget.name | |
| 559 | - }))); | |
| 560 | - }))))); | |
| 561 | -}; | |
| 562 | -PromotionWidgetsTable.propTypes = { | |
| 563 | - widgets: _propTypes.default.arrayOf(_propTypes.default.shape({ | |
| 564 | - name: _propTypes.default.string.isRequired, | |
| 565 | - title: _propTypes.default.string.isRequired, | |
| 566 | - icon: _propTypes.default.string | |
| 567 | - })).isRequired, | |
| 568 | - promotionData: _propTypes.default.shape({ | |
| 569 | - element_manager: _propTypes.default.shape({ | |
| 570 | - url: _propTypes.default.string, | |
| 571 | - text: _propTypes.default.string | |
| 572 | - }) | |
| 573 | - }).isRequired | |
| 574 | -}; | |
| 575 | - | |
| 576 | -/***/ }), | |
| 577 | - | |
| 578 | -/***/ "../modules/element-manager/assets/js/app-editor-one/components/RolePermissions.js": | |
| 579 | -/*!*****************************************************************************************!*\ | |
| 580 | - !*** ../modules/element-manager/assets/js/app-editor-one/components/RolePermissions.js ***! | |
| 581 | - \*****************************************************************************************/ | |
| 582 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 583 | - | |
| 584 | -"use strict"; | |
| 585 | - | |
| 586 | - | |
| 587 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 588 | -var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 589 | -Object.defineProperty(exports, "__esModule", ({ | |
| 590 | - value: true | |
| 591 | -})); | |
| 592 | -exports.RolePermissions = exports.EditButtonDisabled = void 0; | |
| 593 | -var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); | |
| 594 | -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 595 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 596 | -var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js")); | |
| 597 | -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 598 | -var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 599 | -var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 600 | -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); } | |
| 601 | -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; } | |
| 602 | -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; } | |
| 603 | -var toggleRoleRestrictions = function toggleRoleRestrictions(widgetName, roleId, widgetsRoleRestrictions, setWidgetsRoleRestrictions) { | |
| 604 | - var widgetRoleRestrictions = (0, _toConsumableArray2.default)(widgetsRoleRestrictions[widgetName] || []); | |
| 605 | - if (widgetRoleRestrictions.includes(roleId)) { | |
| 606 | - widgetRoleRestrictions.splice(widgetRoleRestrictions.indexOf(roleId), 1); | |
| 607 | - } else { | |
| 608 | - widgetRoleRestrictions.push(roleId); | |
| 609 | - } | |
| 610 | - setWidgetsRoleRestrictions(_objectSpread(_objectSpread({}, widgetsRoleRestrictions), {}, (0, _defineProperty2.default)({}, widgetName, widgetRoleRestrictions))); | |
| 611 | -}; | |
| 612 | -var RolesList = function RolesList(_ref) { | |
| 613 | - var roles = _ref.roles, | |
| 614 | - widgetRoleRestrictions = _ref.widgetRoleRestrictions; | |
| 615 | - var rolesEnabled = roles.filter(function (role) { | |
| 616 | - return !widgetRoleRestrictions.includes(role.id); | |
| 617 | - }); | |
| 618 | - if (!rolesEnabled.length) { | |
| 619 | - return /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 620 | - component: "span", | |
| 621 | - variant: "body2", | |
| 622 | - color: "text.primary" | |
| 623 | - }, "(", (0, _i18n.__)('Admin', 'elementor'), ")"); | |
| 624 | - } | |
| 625 | - if (rolesEnabled.length === roles.length) { | |
| 626 | - return /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 627 | - component: "span", | |
| 628 | - variant: "body2", | |
| 629 | - color: "text.primary" | |
| 630 | - }, "(", (0, _i18n.__)('All Roles', 'elementor'), ")"); | |
| 631 | - } | |
| 632 | - return /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 633 | - component: "span", | |
| 634 | - variant: "body2", | |
| 635 | - color: "text.primary" | |
| 636 | - }, "(", rolesEnabled.map(function (role) { | |
| 637 | - return role.name; | |
| 638 | - }).join(', '), ")"); | |
| 639 | -}; | |
| 640 | -RolesList.propTypes = { | |
| 641 | - roles: _propTypes.default.arrayOf(_propTypes.default.shape({ | |
| 642 | - id: _propTypes.default.string.isRequired, | |
| 643 | - name: _propTypes.default.string.isRequired | |
| 644 | - })).isRequired, | |
| 645 | - widgetRoleRestrictions: _propTypes.default.arrayOf(_propTypes.default.string).isRequired | |
| 646 | -}; | |
| 647 | -var RolePermissions = exports.RolePermissions = function RolePermissions(_ref2) { | |
| 648 | - var roles = _ref2.roles, | |
| 649 | - widgetName = _ref2.widgetName, | |
| 650 | - widgetsRoleRestrictions = _ref2.widgetsRoleRestrictions, | |
| 651 | - setWidgetsRoleRestrictions = _ref2.setWidgetsRoleRestrictions; | |
| 652 | - var _useState = (0, _react.useState)(null), | |
| 653 | - _useState2 = (0, _slicedToArray2.default)(_useState, 2), | |
| 654 | - anchorEl = _useState2[0], | |
| 655 | - setAnchorEl = _useState2[1]; | |
| 656 | - var isOpen = Boolean(anchorEl); | |
| 657 | - var widgetRoleRestrictions = widgetsRoleRestrictions[widgetName] || []; | |
| 658 | - var handleClick = (0, _react.useCallback)(function (event) { | |
| 659 | - setAnchorEl(event.currentTarget); | |
| 660 | - }, []); | |
| 661 | - var handleClose = (0, _react.useCallback)(function () { | |
| 662 | - setAnchorEl(null); | |
| 663 | - }, []); | |
| 664 | - var isAllChecked = roles.every(function (role) { | |
| 665 | - return !widgetRoleRestrictions.includes(role.id); | |
| 666 | - }); | |
| 667 | - var isIndeterminate = !isAllChecked && roles.some(function (role) { | |
| 668 | - return !widgetRoleRestrictions.includes(role.id); | |
| 669 | - }); | |
| 670 | - var handleAllChange = (0, _react.useCallback)(function (event) { | |
| 671 | - if (event.target.checked) { | |
| 672 | - setWidgetsRoleRestrictions(_objectSpread(_objectSpread({}, widgetsRoleRestrictions), {}, (0, _defineProperty2.default)({}, widgetName, []))); | |
| 673 | - } else { | |
| 674 | - setWidgetsRoleRestrictions(_objectSpread(_objectSpread({}, widgetsRoleRestrictions), {}, (0, _defineProperty2.default)({}, widgetName, roles.map(function (role) { | |
| 675 | - return role.id; | |
| 676 | - })))); | |
| 677 | - } | |
| 678 | - }, [widgetName, widgetsRoleRestrictions, setWidgetsRoleRestrictions, roles]); | |
| 679 | - return /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 680 | - sx: { | |
| 681 | - display: 'inline-flex', | |
| 682 | - alignItems: 'center', | |
| 683 | - gap: 0.5 | |
| 684 | - } | |
| 685 | - }, /*#__PURE__*/_react.default.createElement(_ui.Button, { | |
| 686 | - variant: "text", | |
| 687 | - color: "secondary", | |
| 688 | - size: "small", | |
| 689 | - onClick: handleClick, | |
| 690 | - "aria-expanded": isOpen, | |
| 691 | - "aria-haspopup": "true", | |
| 692 | - className: "e-id-elementor-element-manager-button-edit-permissions-".concat(widgetName) | |
| 693 | - }, (0, _i18n.__)('Edit', 'elementor')), /*#__PURE__*/_react.default.createElement(RolesList, { | |
| 694 | - roles: roles, | |
| 695 | - widgetRoleRestrictions: widgetRoleRestrictions | |
| 696 | - }), /*#__PURE__*/_react.default.createElement(_ui.Menu, { | |
| 697 | - anchorEl: anchorEl, | |
| 698 | - open: isOpen, | |
| 699 | - onClose: handleClose, | |
| 700 | - anchorOrigin: { | |
| 701 | - vertical: 'bottom', | |
| 702 | - horizontal: 'left' | |
| 703 | - }, | |
| 704 | - transformOrigin: { | |
| 705 | - vertical: 'top', | |
| 706 | - horizontal: 'left' | |
| 707 | - } | |
| 708 | - }, /*#__PURE__*/_react.default.createElement(_ui.MenuItem, { | |
| 709 | - sx: { | |
| 710 | - py: 0.5 | |
| 711 | - } | |
| 712 | - }, /*#__PURE__*/_react.default.createElement(_ui.FormControlLabel, { | |
| 713 | - control: /*#__PURE__*/_react.default.createElement(_ui.Checkbox, { | |
| 714 | - checked: isAllChecked, | |
| 715 | - indeterminate: isIndeterminate, | |
| 716 | - onChange: handleAllChange, | |
| 717 | - size: "small", | |
| 718 | - color: "secondary" | |
| 719 | - }), | |
| 720 | - label: (0, _i18n.__)('All', 'elementor') | |
| 721 | - })), roles.map(function (role) { | |
| 722 | - return /*#__PURE__*/_react.default.createElement(_ui.MenuItem, { | |
| 723 | - key: role.id, | |
| 724 | - sx: { | |
| 725 | - py: 0.5 | |
| 726 | - } | |
| 727 | - }, /*#__PURE__*/_react.default.createElement(_ui.FormControlLabel, { | |
| 728 | - control: /*#__PURE__*/_react.default.createElement(_ui.Checkbox, { | |
| 729 | - color: "secondary", | |
| 730 | - checked: !widgetRoleRestrictions.includes(role.id), | |
| 731 | - onChange: function onChange() { | |
| 732 | - toggleRoleRestrictions(widgetName, role.id, widgetsRoleRestrictions, setWidgetsRoleRestrictions); | |
| 733 | - }, | |
| 734 | - size: "small" | |
| 735 | - }), | |
| 736 | - label: role.name | |
| 737 | - })); | |
| 738 | - }))); | |
| 739 | -}; | |
| 740 | -RolePermissions.propTypes = { | |
| 741 | - roles: _propTypes.default.arrayOf(_propTypes.default.shape({ | |
| 742 | - id: _propTypes.default.string.isRequired, | |
| 743 | - name: _propTypes.default.string.isRequired | |
| 744 | - })).isRequired, | |
| 745 | - widgetName: _propTypes.default.string.isRequired, | |
| 746 | - widgetsRoleRestrictions: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.array]).isRequired, | |
| 747 | - setWidgetsRoleRestrictions: _propTypes.default.func.isRequired | |
| 748 | -}; | |
| 749 | -var EditButtonDisabled = exports.EditButtonDisabled = function EditButtonDisabled(_ref3) { | |
| 750 | - var _ref3$widgetName = _ref3.widgetName, | |
| 751 | - widgetName = _ref3$widgetName === void 0 ? 'unknown' : _ref3$widgetName; | |
| 752 | - return /*#__PURE__*/_react.default.createElement(_ui.Button, { | |
| 753 | - variant: "text", | |
| 754 | - color: "secondary", | |
| 755 | - size: "small", | |
| 756 | - disabled: true, | |
| 757 | - className: "e-id-elementor-element-manager-button-edit-permissions-".concat(widgetName) | |
| 758 | - }, (0, _i18n.__)('Edit', 'elementor')); | |
| 759 | -}; | |
| 760 | -EditButtonDisabled.propTypes = { | |
| 761 | - widgetName: _propTypes.default.string | |
| 762 | -}; | |
| 763 | - | |
| 764 | -/***/ }), | |
| 765 | - | |
| 766 | -/***/ "../modules/element-manager/assets/js/app-editor-one/components/SearchFilters.js": | |
| 767 | -/*!***************************************************************************************!*\ | |
| 768 | - !*** ../modules/element-manager/assets/js/app-editor-one/components/SearchFilters.js ***! | |
| 769 | - \***************************************************************************************/ | |
| 770 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 771 | - | |
| 772 | -"use strict"; | |
| 773 | - | |
| 774 | - | |
| 775 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 776 | -Object.defineProperty(exports, "__esModule", ({ | |
| 777 | - value: true | |
| 778 | -})); | |
| 779 | -exports.SearchFilters = void 0; | |
| 780 | -var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 781 | -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 782 | -var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 783 | -var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 784 | -var FIELD_HEIGHT = 28; | |
| 785 | -var FONT_SIZE = 12; | |
| 786 | -var ICON_SIZE = 16; | |
| 787 | -var StyledTextField = (0, _ui.styled)(_ui.TextField)({ | |
| 788 | - '& .MuiInputBase-root': { | |
| 789 | - height: FIELD_HEIGHT, | |
| 790 | - fontSize: FONT_SIZE | |
| 791 | - } | |
| 792 | -}); | |
| 793 | -var StyledFormControl = (0, _ui.styled)(_ui.FormControl)({ | |
| 794 | - '& .MuiInputBase-root': { | |
| 795 | - height: FIELD_HEIGHT, | |
| 796 | - fontSize: FONT_SIZE | |
| 797 | - }, | |
| 798 | - '& .MuiSelect-icon': { | |
| 799 | - width: ICON_SIZE, | |
| 800 | - height: ICON_SIZE, | |
| 801 | - top: 'calc(50% - 8px)' | |
| 802 | - } | |
| 803 | -}); | |
| 804 | -var StyledButton = (0, _ui.styled)(_ui.Button)({ | |
| 805 | - height: FIELD_HEIGHT, | |
| 806 | - fontSize: FONT_SIZE, | |
| 807 | - minWidth: 'auto', | |
| 808 | - whiteSpace: 'nowrap' | |
| 809 | -}); | |
| 810 | -var SearchFilters = exports.SearchFilters = function SearchFilters(_ref) { | |
| 811 | - var searchKeyword = _ref.searchKeyword, | |
| 812 | - onSearchChange = _ref.onSearchChange, | |
| 813 | - filterByPlugin = _ref.filterByPlugin, | |
| 814 | - onPluginFilterChange = _ref.onPluginFilterChange, | |
| 815 | - filterByStatus = _ref.filterByStatus, | |
| 816 | - onStatusFilterChange = _ref.onStatusFilterChange, | |
| 817 | - plugins = _ref.plugins, | |
| 818 | - usageIsLoading = _ref.usageIsLoading, | |
| 819 | - usageData = _ref.usageData, | |
| 820 | - widgetsDisabledCount = _ref.widgetsDisabledCount, | |
| 821 | - onScanUsage = _ref.onScanUsage, | |
| 822 | - onDeactivateUnused = _ref.onDeactivateUnused, | |
| 823 | - onEnableAll = _ref.onEnableAll, | |
| 824 | - onSaveChanges = _ref.onSaveChanges, | |
| 825 | - isSaving = _ref.isSaving, | |
| 826 | - hasUnsavedChanges = _ref.hasUnsavedChanges; | |
| 827 | - return /*#__PURE__*/_react.default.createElement(_ui.Stack, { | |
| 828 | - direction: { | |
| 829 | - xs: 'column', | |
| 830 | - sm: 'row' | |
| 831 | - }, | |
| 832 | - alignItems: { | |
| 833 | - xs: 'stretch', | |
| 834 | - sm: 'flex-start' | |
| 835 | - }, | |
| 836 | - gap: 1.5, | |
| 837 | - sx: function sx(theme) { | |
| 838 | - return { | |
| 839 | - position: 'sticky', | |
| 840 | - top: 0, | |
| 841 | - '@media screen and (max-width: 782px)': { | |
| 842 | - top: 'calc(var(--e-admin-bar-height, 0px) + var(--e-top-bar-header-height, 0px))' | |
| 843 | - }, | |
| 844 | - backgroundColor: 'var(--e-one-palette-background-default)', | |
| 845 | - zIndex: 10, | |
| 846 | - paddingBlock: 2, | |
| 847 | - paddingInline: 2, | |
| 848 | - boxShadow: 'rgba(0, 0, 0, 0.15) 0 5px 10px 0', | |
| 849 | - marginBottom: theme.spacing(1) | |
| 850 | - }; | |
| 851 | - } | |
| 852 | - }, /*#__PURE__*/_react.default.createElement(_ui.Stack, { | |
| 853 | - direction: "row", | |
| 854 | - alignItems: "center", | |
| 855 | - flexWrap: "wrap", | |
| 856 | - gap: 1.5, | |
| 857 | - sx: { | |
| 858 | - flex: 1 | |
| 859 | - } | |
| 860 | - }, /*#__PURE__*/_react.default.createElement(StyledTextField, { | |
| 861 | - color: "secondary", | |
| 862 | - value: searchKeyword, | |
| 863 | - size: "small", | |
| 864 | - placeholder: (0, _i18n.__)('Search', 'elementor'), | |
| 865 | - onChange: function onChange(e) { | |
| 866 | - return onSearchChange(e.target.value); | |
| 867 | - }, | |
| 868 | - sx: function sx(theme) { | |
| 869 | - return { | |
| 870 | - minWidth: theme.spacing(14) | |
| 871 | - }; | |
| 872 | - } | |
| 873 | - }), /*#__PURE__*/_react.default.createElement(StyledFormControl, { | |
| 874 | - size: "small", | |
| 875 | - sx: function sx(theme) { | |
| 876 | - return { | |
| 877 | - width: theme.spacing(20) | |
| 878 | - }; | |
| 879 | - }, | |
| 880 | - color: "secondary" | |
| 881 | - }, /*#__PURE__*/_react.default.createElement(_ui.Select, { | |
| 882 | - placeholder: (0, _i18n.__)('Plugin', 'elementor'), | |
| 883 | - value: filterByPlugin, | |
| 884 | - onChange: function onChange(event) { | |
| 885 | - return onPluginFilterChange(event.target.value); | |
| 886 | - }, | |
| 887 | - "data-id": "elementor-element-manager-select-filter-by-plugin", | |
| 888 | - displayEmpty: true, | |
| 889 | - renderValue: function renderValue(value) { | |
| 890 | - if ('' === value) { | |
| 891 | - return (0, _i18n.__)('All Plugins', 'elementor'); | |
| 892 | - } | |
| 893 | - var selectedPlugin = plugins.find(function (p) { | |
| 894 | - return p.value === value; | |
| 895 | - }); | |
| 896 | - return selectedPlugin ? selectedPlugin.label : value; | |
| 897 | - } | |
| 898 | - }, /*#__PURE__*/_react.default.createElement(_ui.MenuItem, { | |
| 899 | - value: "" | |
| 900 | - }, (0, _i18n.__)('All Plugins', 'elementor')), plugins.map(function (plugin) { | |
| 901 | - return /*#__PURE__*/_react.default.createElement(_ui.MenuItem, { | |
| 902 | - key: plugin.value, | |
| 903 | - value: plugin.value | |
| 904 | - }, plugin.label); | |
| 905 | - }))), /*#__PURE__*/_react.default.createElement(StyledFormControl, { | |
| 906 | - size: "small", | |
| 907 | - sx: function sx(theme) { | |
| 908 | - return { | |
| 909 | - width: theme.spacing(20) | |
| 910 | - }; | |
| 911 | - }, | |
| 912 | - color: "secondary" | |
| 913 | - }, /*#__PURE__*/_react.default.createElement(_ui.Select, { | |
| 914 | - value: filterByStatus, | |
| 915 | - onChange: function onChange(event) { | |
| 916 | - return onStatusFilterChange(event.target.value); | |
| 917 | - }, | |
| 918 | - "data-id": "elementor-element-manager-select-filter-by-status", | |
| 919 | - placeholder: (0, _i18n.__)('Status', 'elementor') | |
| 920 | - }, /*#__PURE__*/_react.default.createElement(_ui.MenuItem, { | |
| 921 | - value: "all" | |
| 922 | - }, (0, _i18n.__)('All Statuses', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.MenuItem, { | |
| 923 | - value: "active" | |
| 924 | - }, (0, _i18n.__)('Active', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.MenuItem, { | |
| 925 | - value: "inactive" | |
| 926 | - }, (0, _i18n.__)('Inactive', 'elementor')))), /*#__PURE__*/_react.default.createElement(_ui.Divider, { | |
| 927 | - orientation: "vertical", | |
| 928 | - flexItem: true, | |
| 929 | - sx: { | |
| 930 | - height: FIELD_HEIGHT, | |
| 931 | - marginBlock: 0, | |
| 932 | - marginInline: 0.5, | |
| 933 | - alignSelf: 'center', | |
| 934 | - display: { | |
| 935 | - xs: 'none', | |
| 936 | - md: 'block' | |
| 937 | - } | |
| 938 | - } | |
| 939 | - }), /*#__PURE__*/_react.default.createElement(StyledButton, { | |
| 940 | - variant: "outlined", | |
| 941 | - color: "secondary", | |
| 942 | - size: "small", | |
| 943 | - disabled: usageIsLoading, | |
| 944 | - onClick: onScanUsage, | |
| 945 | - "data-id": "e-id-elementor-element-manager-button-scan-element-usage", | |
| 946 | - loading: usageIsLoading | |
| 947 | - }, (0, _i18n.__)('Scan Element Usage', 'elementor')), /*#__PURE__*/_react.default.createElement(StyledButton, { | |
| 948 | - variant: "outlined", | |
| 949 | - color: "secondary", | |
| 950 | - size: "small", | |
| 951 | - onClick: onDeactivateUnused, | |
| 952 | - disabled: null === usageData, | |
| 953 | - "data-id": "e-id-elementor-element-manager-button-deactivate-unused-elements" | |
| 954 | - }, (0, _i18n.__)('Deactivate Unused Elements', 'elementor')), /*#__PURE__*/_react.default.createElement(StyledButton, { | |
| 955 | - variant: "outlined", | |
| 956 | - color: "secondary", | |
| 957 | - size: "small", | |
| 958 | - disabled: !widgetsDisabledCount, | |
| 959 | - onClick: onEnableAll, | |
| 960 | - "data-id": "e-id-elementor-element-manager-button-enable-all" | |
| 961 | - }, (0, _i18n.__)('Enable All', 'elementor'))), /*#__PURE__*/_react.default.createElement(StyledButton, { | |
| 962 | - variant: "contained", | |
| 963 | - size: "small", | |
| 964 | - disabled: isSaving || !hasUnsavedChanges, | |
| 965 | - onClick: onSaveChanges, | |
| 966 | - "data-id": "e-id-elementor-element-manager-button-save-changes", | |
| 967 | - loading: isSaving, | |
| 968 | - sx: { | |
| 969 | - alignSelf: 'flex-start' | |
| 970 | - } | |
| 971 | - }, (0, _i18n.__)('Save Changes', 'elementor'))); | |
| 972 | -}; | |
| 973 | -SearchFilters.propTypes = { | |
| 974 | - searchKeyword: _propTypes.default.string.isRequired, | |
| 975 | - onSearchChange: _propTypes.default.func.isRequired, | |
| 976 | - filterByPlugin: _propTypes.default.string.isRequired, | |
| 977 | - onPluginFilterChange: _propTypes.default.func.isRequired, | |
| 978 | - filterByStatus: _propTypes.default.string.isRequired, | |
| 979 | - onStatusFilterChange: _propTypes.default.func.isRequired, | |
| 980 | - plugins: _propTypes.default.arrayOf(_propTypes.default.shape({ | |
| 981 | - label: _propTypes.default.string.isRequired, | |
| 982 | - value: _propTypes.default.string.isRequired | |
| 983 | - })).isRequired, | |
| 984 | - usageIsLoading: _propTypes.default.bool, | |
| 985 | - usageData: _propTypes.default.object, | |
| 986 | - widgetsDisabledCount: _propTypes.default.number.isRequired, | |
| 987 | - onScanUsage: _propTypes.default.func.isRequired, | |
| 988 | - onDeactivateUnused: _propTypes.default.func.isRequired, | |
| 989 | - onEnableAll: _propTypes.default.func.isRequired, | |
| 990 | - onSaveChanges: _propTypes.default.func.isRequired, | |
| 991 | - isSaving: _propTypes.default.bool, | |
| 992 | - hasUnsavedChanges: _propTypes.default.bool | |
| 993 | -}; | |
| 994 | - | |
| 995 | -/***/ }), | |
| 996 | - | |
| 997 | -/***/ "../modules/element-manager/assets/js/app-editor-one/components/UsageTimesColumn.js": | |
| 998 | -/*!******************************************************************************************!*\ | |
| 999 | - !*** ../modules/element-manager/assets/js/app-editor-one/components/UsageTimesColumn.js ***! | |
| 1000 | - \******************************************************************************************/ | |
| 1001 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1002 | - | |
| 1003 | -"use strict"; | |
| 1004 | - | |
| 1005 | - | |
| 1006 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1007 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1008 | - value: true | |
| 1009 | -})); | |
| 1010 | -exports.UsageTimesColumn = void 0; | |
| 1011 | -var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 1012 | -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 1013 | -var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 1014 | -var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 1015 | -var UsageTimesColumn = exports.UsageTimesColumn = function UsageTimesColumn(_ref) { | |
| 1016 | - var widgetName = _ref.widgetName, | |
| 1017 | - usageData = _ref.usageData, | |
| 1018 | - isLoading = _ref.isLoading, | |
| 1019 | - getWidgetUsage = _ref.getWidgetUsage, | |
| 1020 | - onScanClick = _ref.onScanClick; | |
| 1021 | - if (null !== usageData) { | |
| 1022 | - return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, getWidgetUsage(widgetName), " ", (0, _i18n.__)('times', 'elementor')); | |
| 1023 | - } | |
| 1024 | - if (isLoading) { | |
| 1025 | - return /*#__PURE__*/_react.default.createElement(_ui.CircularProgress, { | |
| 1026 | - color: "secondary", | |
| 1027 | - size: 20 | |
| 1028 | - }); | |
| 1029 | - } | |
| 1030 | - return /*#__PURE__*/_react.default.createElement(_ui.Button, { | |
| 1031 | - onClick: onScanClick, | |
| 1032 | - size: "small", | |
| 1033 | - variant: "outlined", | |
| 1034 | - color: "secondary", | |
| 1035 | - className: "e-id-elementor-element-manager-button-show-usage", | |
| 1036 | - sx: { | |
| 1037 | - minWidth: function minWidth(theme) { | |
| 1038 | - return theme.spacing(6); | |
| 1039 | - }, | |
| 1040 | - height: 26 | |
| 1041 | - } | |
| 1042 | - }, (0, _i18n.__)('Show', 'elementor')); | |
| 1043 | -}; | |
| 1044 | -UsageTimesColumn.propTypes = { | |
| 1045 | - widgetName: _propTypes.default.string.isRequired, | |
| 1046 | - usageData: _propTypes.default.object, | |
| 1047 | - isLoading: _propTypes.default.bool, | |
| 1048 | - getWidgetUsage: _propTypes.default.func.isRequired, | |
| 1049 | - onScanClick: _propTypes.default.func.isRequired | |
| 1050 | -}; | |
| 1051 | - | |
| 1052 | -/***/ }), | |
| 1053 | - | |
| 1054 | -/***/ "../modules/element-manager/assets/js/app-editor-one/components/WidgetsTable.js": | |
| 1055 | -/*!**************************************************************************************!*\ | |
| 1056 | - !*** ../modules/element-manager/assets/js/app-editor-one/components/WidgetsTable.js ***! | |
| 1057 | - \**************************************************************************************/ | |
| 1058 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1059 | - | |
| 1060 | -"use strict"; | |
| 1061 | - | |
| 1062 | - | |
| 1063 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1064 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1065 | - value: true | |
| 1066 | -})); | |
| 1067 | -exports.WidgetsTable = void 0; | |
| 1068 | -var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 1069 | -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 1070 | -var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); | |
| 1071 | -var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 1072 | -var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 1073 | -var _upgradeButton = __webpack_require__(/*! ../../upgrade-button */ "../modules/element-manager/assets/js/upgrade-button.js"); | |
| 1074 | -var _RolePermissions = __webpack_require__(/*! ./RolePermissions */ "../modules/element-manager/assets/js/app-editor-one/components/RolePermissions.js"); | |
| 1075 | -var _UsageTimesColumn = __webpack_require__(/*! ./UsageTimesColumn */ "../modules/element-manager/assets/js/app-editor-one/components/UsageTimesColumn.js"); | |
| 1076 | -var StyledSwitch = (0, _ui.styled)(_ui.Switch)({ | |
| 1077 | - '& .MuiSwitch-track': { | |
| 1078 | - backgroundColor: 'rgba(0, 0, 0, 0.12);' | |
| 1079 | - }, | |
| 1080 | - '& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track': { | |
| 1081 | - backgroundColor: '#000' | |
| 1082 | - }, | |
| 1083 | - '& .MuiSwitch-switchBase:not(.Mui-checked) .MuiSwitch-thumb': { | |
| 1084 | - backgroundColor: '#D5D8DC' | |
| 1085 | - }, | |
| 1086 | - '& .MuiSwitch-switchBase.Mui-checked .MuiSwitch-thumb': { | |
| 1087 | - backgroundColor: '#fff' | |
| 1088 | - } | |
| 1089 | -}); | |
| 1090 | -var WidgetsTable = exports.WidgetsTable = function WidgetsTable(_ref) { | |
| 1091 | - var widgets = _ref.widgets, | |
| 1092 | - widgetsDisabled = _ref.widgetsDisabled, | |
| 1093 | - widgetsRoleRestrictions = _ref.widgetsRoleRestrictions, | |
| 1094 | - setWidgetsRoleRestrictions = _ref.setWidgetsRoleRestrictions, | |
| 1095 | - roles = _ref.roles, | |
| 1096 | - promotionWidgets = _ref.promotionWidgets, | |
| 1097 | - promotionData = _ref.promotionData, | |
| 1098 | - usageWidgets = _ref.usageWidgets, | |
| 1099 | - getWidgetUsage = _ref.getWidgetUsage, | |
| 1100 | - onScanUsage = _ref.onScanUsage, | |
| 1101 | - onToggleWidget = _ref.onToggleWidget, | |
| 1102 | - getSortingIndicatorClasses = _ref.getSortingIndicatorClasses, | |
| 1103 | - onSortingClicked = _ref.onSortingClicked; | |
| 1104 | - var managerPermissions = promotionData.manager_permissions; | |
| 1105 | - var sortingClasses = getSortingIndicatorClasses('widget'); | |
| 1106 | - var isWidgetSorted = sortingClasses.includes('sorted'); | |
| 1107 | - var widgetSortDirection = sortingClasses.includes('asc') ? 'asc' : 'desc'; | |
| 1108 | - var usageSortingClasses = getSortingIndicatorClasses('usage'); | |
| 1109 | - var isUsageSorted = usageSortingClasses.includes('sorted'); | |
| 1110 | - var usageSortDirection = usageSortingClasses.includes('asc') ? 'asc' : 'desc'; | |
| 1111 | - if (!widgets.length) { | |
| 1112 | - return /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 1113 | - color: "text.secondary" | |
| 1114 | - }, (0, _i18n.__)('No elements found.', 'elementor')); | |
| 1115 | - } | |
| 1116 | - return /*#__PURE__*/_react.default.createElement(_ui.TableContainer, { | |
| 1117 | - component: _ui.Paper, | |
| 1118 | - variant: "outlined" | |
| 1119 | - }, /*#__PURE__*/_react.default.createElement(_ui.Table, { | |
| 1120 | - size: "small" | |
| 1121 | - }, /*#__PURE__*/_react.default.createElement(_ui.TableHead, null, /*#__PURE__*/_react.default.createElement(_ui.TableRow, null, /*#__PURE__*/_react.default.createElement(_ui.TableCell, { | |
| 1122 | - sx: function sx(theme) { | |
| 1123 | - return { | |
| 1124 | - width: theme.spacing(25) | |
| 1125 | - }; | |
| 1126 | - } | |
| 1127 | - }, /*#__PURE__*/_react.default.createElement(_ui.TableSortLabel, { | |
| 1128 | - active: isWidgetSorted, | |
| 1129 | - direction: isWidgetSorted ? widgetSortDirection : 'asc', | |
| 1130 | - onClick: function onClick() { | |
| 1131 | - return onSortingClicked('widget'); | |
| 1132 | - }, | |
| 1133 | - "data-id": "e-id-elementor-element-manager-button-sort-by-element" | |
| 1134 | - }, (0, _i18n.__)('Element', 'elementor'))), /*#__PURE__*/_react.default.createElement(_ui.TableCell, { | |
| 1135 | - sx: function sx(theme) { | |
| 1136 | - return { | |
| 1137 | - width: theme.spacing(10) | |
| 1138 | - }; | |
| 1139 | - } | |
| 1140 | - }, (0, _i18n.__)('Status', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(_ui.TableSortLabel, { | |
| 1141 | - active: isUsageSorted, | |
| 1142 | - direction: isUsageSorted ? usageSortDirection : 'asc', | |
| 1143 | - onClick: function onClick() { | |
| 1144 | - return onSortingClicked('usage'); | |
| 1145 | - }, | |
| 1146 | - "data-id": "e-id-elementor-element-manager-button-sort-by-usage" | |
| 1147 | - }, (0, _i18n.__)('Usage', 'elementor'))), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, (0, _i18n.__)('Plugin', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(_ui.Stack, { | |
| 1148 | - direction: "row", | |
| 1149 | - justifyContent: "flex-start", | |
| 1150 | - alignItems: "center", | |
| 1151 | - gap: 1 | |
| 1152 | - }, /*#__PURE__*/_react.default.createElement(_ui.Box, null, (0, _i18n.__)('Permission', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_ui.Tooltip, { | |
| 1153 | - placement: "top", | |
| 1154 | - title: (0, _i18n.__)('Choose which users will have access to each widget.', 'elementor') | |
| 1155 | - }, /*#__PURE__*/_react.default.createElement(_ui.IconButton, { | |
| 1156 | - size: "small" | |
| 1157 | - }, /*#__PURE__*/_react.default.createElement(_icons.HelpIcon, { | |
| 1158 | - fontSize: "small" | |
| 1159 | - })))), null === widgetsRoleRestrictions && /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 1160 | - sx: { | |
| 1161 | - marginInlineStart: 1 | |
| 1162 | - } | |
| 1163 | - }, /*#__PURE__*/_react.default.createElement(_upgradeButton.UpgradeButton, { | |
| 1164 | - href: promotionWidgets.length ? managerPermissions.pro.url : managerPermissions.advanced.url, | |
| 1165 | - size: "small", | |
| 1166 | - text: promotionWidgets.length ? managerPermissions.pro.text : managerPermissions.advanced.text, | |
| 1167 | - className: "go-pro", | |
| 1168 | - "data-id": "e-id-elementor-element-manager-button-upgrade-permissions" | |
| 1169 | - })))))), /*#__PURE__*/_react.default.createElement(_ui.TableBody, null, widgets.map(function (widget) { | |
| 1170 | - return /*#__PURE__*/_react.default.createElement(_ui.TableRow, { | |
| 1171 | - key: widget.name, | |
| 1172 | - "data-key-id": widget.name, | |
| 1173 | - hover: true | |
| 1174 | - }, /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 1175 | - sx: { | |
| 1176 | - display: 'flex', | |
| 1177 | - alignItems: 'center' | |
| 1178 | - } | |
| 1179 | - }, /*#__PURE__*/_react.default.createElement("i", { | |
| 1180 | - style: { | |
| 1181 | - marginInlineEnd: 8, | |
| 1182 | - marginInlineStart: 0, | |
| 1183 | - display: 'inline-block' | |
| 1184 | - }, | |
| 1185 | - className: widget.icon | |
| 1186 | - }), widget.title)), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(StyledSwitch, { | |
| 1187 | - color: "secondary", | |
| 1188 | - checked: !widgetsDisabled.includes(widget.name), | |
| 1189 | - onChange: function onChange(event, checked) { | |
| 1190 | - return onToggleWidget(widget.name, checked); | |
| 1191 | - }, | |
| 1192 | - size: "small", | |
| 1193 | - "data-id": "e-id-elementor-element-manager-toggle-".concat(widget.name) | |
| 1194 | - })), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(_UsageTimesColumn.UsageTimesColumn, { | |
| 1195 | - widgetName: widget.name, | |
| 1196 | - usageData: usageWidgets.data, | |
| 1197 | - isLoading: usageWidgets.isLoading, | |
| 1198 | - getWidgetUsage: getWidgetUsage, | |
| 1199 | - onScanClick: onScanUsage | |
| 1200 | - })), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, widget.plugin), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, null !== widgetsRoleRestrictions && !widgetsDisabled.includes(widget.name) ? /*#__PURE__*/_react.default.createElement(_RolePermissions.RolePermissions, { | |
| 1201 | - widgetName: widget.name, | |
| 1202 | - roles: roles, | |
| 1203 | - widgetsRoleRestrictions: widgetsRoleRestrictions, | |
| 1204 | - setWidgetsRoleRestrictions: setWidgetsRoleRestrictions | |
| 1205 | - }) : /*#__PURE__*/_react.default.createElement(_RolePermissions.EditButtonDisabled, null))); | |
| 1206 | - })))); | |
| 1207 | -}; | |
| 1208 | -var widgetShape = _propTypes.default.shape({ | |
| 1209 | - name: _propTypes.default.string.isRequired, | |
| 1210 | - title: _propTypes.default.string.isRequired, | |
| 1211 | - icon: _propTypes.default.string, | |
| 1212 | - plugin: _propTypes.default.string | |
| 1213 | -}); | |
| 1214 | -WidgetsTable.propTypes = { | |
| 1215 | - widgets: _propTypes.default.arrayOf(widgetShape).isRequired, | |
| 1216 | - widgetsDisabled: _propTypes.default.arrayOf(_propTypes.default.string).isRequired, | |
| 1217 | - widgetsRoleRestrictions: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.array]), | |
| 1218 | - setWidgetsRoleRestrictions: _propTypes.default.func.isRequired, | |
| 1219 | - roles: _propTypes.default.array.isRequired, | |
| 1220 | - promotionWidgets: _propTypes.default.arrayOf(widgetShape).isRequired, | |
| 1221 | - promotionData: _propTypes.default.shape({ | |
| 1222 | - manager_permissions: _propTypes.default.shape({ | |
| 1223 | - pro: _propTypes.default.shape({ | |
| 1224 | - url: _propTypes.default.string, | |
| 1225 | - text: _propTypes.default.string | |
| 1226 | - }), | |
| 1227 | - advanced: _propTypes.default.shape({ | |
| 1228 | - url: _propTypes.default.string, | |
| 1229 | - text: _propTypes.default.string | |
| 1230 | - }) | |
| 1231 | - }) | |
| 1232 | - }).isRequired, | |
| 1233 | - usageWidgets: _propTypes.default.shape({ | |
| 1234 | - isLoading: _propTypes.default.bool, | |
| 1235 | - data: _propTypes.default.object | |
| 1236 | - }).isRequired, | |
| 1237 | - getWidgetUsage: _propTypes.default.func.isRequired, | |
| 1238 | - onScanUsage: _propTypes.default.func.isRequired, | |
| 1239 | - onToggleWidget: _propTypes.default.func.isRequired, | |
| 1240 | - getSortingIndicatorClasses: _propTypes.default.func.isRequired, | |
| 1241 | - onSortingClicked: _propTypes.default.func.isRequired | |
| 1242 | -}; | |
| 1243 | - | |
| 1244 | -/***/ }), | |
| 1245 | - | |
| 1246 | -/***/ "../modules/element-manager/assets/js/app-editor-one/components/index.js": | |
| 1247 | -/*!*******************************************************************************!*\ | |
| 1248 | - !*** ../modules/element-manager/assets/js/app-editor-one/components/index.js ***! | |
| 1249 | - \*******************************************************************************/ | |
| 1250 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1251 | - | |
| 1252 | -"use strict"; | |
| 1253 | - | |
| 1254 | - | |
| 1255 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1256 | - value: true | |
| 1257 | -})); | |
| 1258 | -Object.defineProperty(exports, "ConfirmDialog", ({ | |
| 1259 | - enumerable: true, | |
| 1260 | - get: function get() { | |
| 1261 | - return _ConfirmDialog.ConfirmDialog; | |
| 1262 | - } | |
| 1263 | -})); | |
| 1264 | -Object.defineProperty(exports, "EditButtonDisabled", ({ | |
| 1265 | - enumerable: true, | |
| 1266 | - get: function get() { | |
| 1267 | - return _RolePermissions.EditButtonDisabled; | |
| 1268 | - } | |
| 1269 | -})); | |
| 1270 | -Object.defineProperty(exports, "NoticeAlert", ({ | |
| 1271 | - enumerable: true, | |
| 1272 | - get: function get() { | |
| 1273 | - return _NoticeAlert.NoticeAlert; | |
| 1274 | - } | |
| 1275 | -})); | |
| 1276 | -Object.defineProperty(exports, "PromotionWidgetsTable", ({ | |
| 1277 | - enumerable: true, | |
| 1278 | - get: function get() { | |
| 1279 | - return _PromotionWidgetsTable.PromotionWidgetsTable; | |
| 1280 | - } | |
| 1281 | -})); | |
| 1282 | -Object.defineProperty(exports, "RolePermissions", ({ | |
| 1283 | - enumerable: true, | |
| 1284 | - get: function get() { | |
| 1285 | - return _RolePermissions.RolePermissions; | |
| 1286 | - } | |
| 1287 | -})); | |
| 1288 | -Object.defineProperty(exports, "SearchFilters", ({ | |
| 1289 | - enumerable: true, | |
| 1290 | - get: function get() { | |
| 1291 | - return _SearchFilters.SearchFilters; | |
| 1292 | - } | |
| 1293 | -})); | |
| 1294 | -Object.defineProperty(exports, "UsageTimesColumn", ({ | |
| 1295 | - enumerable: true, | |
| 1296 | - get: function get() { | |
| 1297 | - return _UsageTimesColumn.UsageTimesColumn; | |
| 1298 | - } | |
| 1299 | -})); | |
| 1300 | -Object.defineProperty(exports, "WidgetsTable", ({ | |
| 1301 | - enumerable: true, | |
| 1302 | - get: function get() { | |
| 1303 | - return _WidgetsTable.WidgetsTable; | |
| 1304 | - } | |
| 1305 | -})); | |
| 1306 | -var _UsageTimesColumn = __webpack_require__(/*! ./UsageTimesColumn */ "../modules/element-manager/assets/js/app-editor-one/components/UsageTimesColumn.js"); | |
| 1307 | -var _NoticeAlert = __webpack_require__(/*! ./NoticeAlert */ "../modules/element-manager/assets/js/app-editor-one/components/NoticeAlert.js"); | |
| 1308 | -var _ConfirmDialog = __webpack_require__(/*! ./ConfirmDialog */ "../modules/element-manager/assets/js/app-editor-one/components/ConfirmDialog.js"); | |
| 1309 | -var _SearchFilters = __webpack_require__(/*! ./SearchFilters */ "../modules/element-manager/assets/js/app-editor-one/components/SearchFilters.js"); | |
| 1310 | -var _WidgetsTable = __webpack_require__(/*! ./WidgetsTable */ "../modules/element-manager/assets/js/app-editor-one/components/WidgetsTable.js"); | |
| 1311 | -var _PromotionWidgetsTable = __webpack_require__(/*! ./PromotionWidgetsTable */ "../modules/element-manager/assets/js/app-editor-one/components/PromotionWidgetsTable.js"); | |
| 1312 | -var _RolePermissions = __webpack_require__(/*! ./RolePermissions */ "../modules/element-manager/assets/js/app-editor-one/components/RolePermissions.js"); | |
| 1313 | - | |
| 1314 | -/***/ }), | |
| 1315 | - | |
| 1316 | -/***/ "../modules/element-manager/assets/js/app-editor-one/hooks/index.js": | |
| 1317 | -/*!**************************************************************************!*\ | |
| 1318 | - !*** ../modules/element-manager/assets/js/app-editor-one/hooks/index.js ***! | |
| 1319 | - \**************************************************************************/ | |
| 1320 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1321 | - | |
| 1322 | -"use strict"; | |
| 1323 | - | |
| 1324 | - | |
| 1325 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1326 | - value: true | |
| 1327 | -})); | |
| 1328 | -Object.defineProperty(exports, "useElementManager", ({ | |
| 1329 | - enumerable: true, | |
| 1330 | - get: function get() { | |
| 1331 | - return _useElementManager.useElementManager; | |
| 1332 | - } | |
| 1333 | -})); | |
| 1334 | -Object.defineProperty(exports, "useWidgetFilters", ({ | |
| 1335 | - enumerable: true, | |
| 1336 | - get: function get() { | |
| 1337 | - return _useWidgetFilters.useWidgetFilters; | |
| 1338 | - } | |
| 1339 | -})); | |
| 1340 | -var _useElementManager = __webpack_require__(/*! ./useElementManager */ "../modules/element-manager/assets/js/app-editor-one/hooks/useElementManager.js"); | |
| 1341 | -var _useWidgetFilters = __webpack_require__(/*! ./useWidgetFilters */ "../modules/element-manager/assets/js/app-editor-one/hooks/useWidgetFilters.js"); | |
| 1342 | - | |
| 1343 | -/***/ }), | |
| 1344 | - | |
| 1345 | -/***/ "../modules/element-manager/assets/js/app-editor-one/hooks/useElementManager.js": | |
| 1346 | -/*!**************************************************************************************!*\ | |
| 1347 | - !*** ../modules/element-manager/assets/js/app-editor-one/hooks/useElementManager.js ***! | |
| 1348 | - \**************************************************************************************/ | |
| 1349 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1350 | - | |
| 1351 | -"use strict"; | |
| 1352 | - | |
| 1353 | - | |
| 1354 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1355 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1356 | - value: true | |
| 1357 | -})); | |
| 1358 | -exports.useElementManager = void 0; | |
| 1359 | -var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 1360 | -var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js")); | |
| 1361 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 1362 | -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 1363 | -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 1364 | -var _react = __webpack_require__(/*! react */ "react"); | |
| 1365 | -var _api = __webpack_require__(/*! ../../api */ "../modules/element-manager/assets/js/api.js"); | |
| 1366 | -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; } | |
| 1367 | -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; } | |
| 1368 | -var useElementManager = exports.useElementManager = function useElementManager() { | |
| 1369 | - var isInitialMount = (0, _react.useRef)(true); | |
| 1370 | - var _useState = (0, _react.useState)(true), | |
| 1371 | - _useState2 = (0, _slicedToArray2.default)(_useState, 2), | |
| 1372 | - isLoading = _useState2[0], | |
| 1373 | - setIsLoading = _useState2[1]; | |
| 1374 | - var _useState3 = (0, _react.useState)([]), | |
| 1375 | - _useState4 = (0, _slicedToArray2.default)(_useState3, 2), | |
| 1376 | - widgets = _useState4[0], | |
| 1377 | - setWidgets = _useState4[1]; | |
| 1378 | - var _useState5 = (0, _react.useState)([]), | |
| 1379 | - _useState6 = (0, _slicedToArray2.default)(_useState5, 2), | |
| 1380 | - promotionWidgets = _useState6[0], | |
| 1381 | - setPromotionWidgets = _useState6[1]; | |
| 1382 | - var _useState7 = (0, _react.useState)([]), | |
| 1383 | - _useState8 = (0, _slicedToArray2.default)(_useState7, 2), | |
| 1384 | - plugins = _useState8[0], | |
| 1385 | - setPlugins = _useState8[1]; | |
| 1386 | - var _useState9 = (0, _react.useState)([]), | |
| 1387 | - _useState0 = (0, _slicedToArray2.default)(_useState9, 2), | |
| 1388 | - roles = _useState0[0], | |
| 1389 | - setRoles = _useState0[1]; | |
| 1390 | - var _useState1 = (0, _react.useState)([]), | |
| 1391 | - _useState10 = (0, _slicedToArray2.default)(_useState1, 2), | |
| 1392 | - widgetsDisabled = _useState10[0], | |
| 1393 | - setWidgetsDisabled = _useState10[1]; | |
| 1394 | - var _useState11 = (0, _react.useState)(null), | |
| 1395 | - _useState12 = (0, _slicedToArray2.default)(_useState11, 2), | |
| 1396 | - widgetsRoleRestrictions = _useState12[0], | |
| 1397 | - setWidgetsRoleRestrictions = _useState12[1]; | |
| 1398 | - var _useState13 = (0, _react.useState)([]), | |
| 1399 | - _useState14 = (0, _slicedToArray2.default)(_useState13, 2), | |
| 1400 | - promotionData = _useState14[0], | |
| 1401 | - setPromotionData = _useState14[1]; | |
| 1402 | - var _useState15 = (0, _react.useState)(null), | |
| 1403 | - _useState16 = (0, _slicedToArray2.default)(_useState15, 2), | |
| 1404 | - noticeData = _useState16[0], | |
| 1405 | - setNoticeData = _useState16[1]; | |
| 1406 | - var _useState17 = (0, _react.useState)({ | |
| 1407 | - isLoading: false, | |
| 1408 | - data: null | |
| 1409 | - }), | |
| 1410 | - _useState18 = (0, _slicedToArray2.default)(_useState17, 2), | |
| 1411 | - usageWidgets = _useState18[0], | |
| 1412 | - setUsageWidgets = _useState18[1]; | |
| 1413 | - var _useState19 = (0, _react.useState)({ | |
| 1414 | - isSaving: false, | |
| 1415 | - isUnsavedChanges: false | |
| 1416 | - }), | |
| 1417 | - _useState20 = (0, _slicedToArray2.default)(_useState19, 2), | |
| 1418 | - changeProgress = _useState20[0], | |
| 1419 | - setChangeProgress = _useState20[1]; | |
| 1420 | - var _useState21 = (0, _react.useState)(false), | |
| 1421 | - _useState22 = (0, _slicedToArray2.default)(_useState21, 2), | |
| 1422 | - isSnackbarOpen = _useState22[0], | |
| 1423 | - setIsSnackbarOpen = _useState22[1]; | |
| 1424 | - var getWidgetUsage = (0, _react.useCallback)(function (widgetName) { | |
| 1425 | - if (!usageWidgets.data || !usageWidgets.data.hasOwnProperty(widgetName)) { | |
| 1426 | - return 0; | |
| 1427 | - } | |
| 1428 | - return usageWidgets.data[widgetName]; | |
| 1429 | - }, [usageWidgets.data]); | |
| 1430 | - var scanUsageElements = (0, _react.useCallback)(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 1431 | - var data; | |
| 1432 | - return _regenerator.default.wrap(function (_context) { | |
| 1433 | - while (1) switch (_context.prev = _context.next) { | |
| 1434 | - case 0: | |
| 1435 | - setUsageWidgets(function (prev) { | |
| 1436 | - return _objectSpread(_objectSpread({}, prev), {}, { | |
| 1437 | - isLoading: true | |
| 1438 | - }); | |
| 1439 | - }); | |
| 1440 | - _context.next = 1; | |
| 1441 | - return (0, _api.getUsageWidgets)(); | |
| 1442 | - case 1: | |
| 1443 | - data = _context.sent; | |
| 1444 | - setUsageWidgets({ | |
| 1445 | - data: data, | |
| 1446 | - isLoading: false | |
| 1447 | - }); | |
| 1448 | - return _context.abrupt("return", data); | |
| 1449 | - case 2: | |
| 1450 | - case "end": | |
| 1451 | - return _context.stop(); | |
| 1452 | - } | |
| 1453 | - }, _callee); | |
| 1454 | - })), []); | |
| 1455 | - var saveChanges = (0, _react.useCallback)(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { | |
| 1456 | - return _regenerator.default.wrap(function (_context2) { | |
| 1457 | - while (1) switch (_context2.prev = _context2.next) { | |
| 1458 | - case 0: | |
| 1459 | - setChangeProgress(function (prev) { | |
| 1460 | - return _objectSpread(_objectSpread({}, prev), {}, { | |
| 1461 | - isSaving: true | |
| 1462 | - }); | |
| 1463 | - }); | |
| 1464 | - _context2.next = 1; | |
| 1465 | - return (0, _api.saveDisabledWidgets)(widgetsDisabled, widgetsRoleRestrictions); | |
| 1466 | - case 1: | |
| 1467 | - setChangeProgress({ | |
| 1468 | - isSaving: false, | |
| 1469 | - isUnsavedChanges: false | |
| 1470 | - }); | |
| 1471 | - setIsSnackbarOpen(true); | |
| 1472 | - case 2: | |
| 1473 | - case "end": | |
| 1474 | - return _context2.stop(); | |
| 1475 | - } | |
| 1476 | - }, _callee2); | |
| 1477 | - })), [widgetsDisabled, widgetsRoleRestrictions]); | |
| 1478 | - var deactivateAllUnusedWidgets = (0, _react.useCallback)(function () { | |
| 1479 | - if (!usageWidgets.data) { | |
| 1480 | - return; | |
| 1481 | - } | |
| 1482 | - var widgetsToDeactivate = widgets.filter(function (widget) { | |
| 1483 | - return !usageWidgets.data.hasOwnProperty(widget.name) || widgetsDisabled.includes(widget.name); | |
| 1484 | - }); | |
| 1485 | - setWidgetsDisabled(widgetsToDeactivate.map(function (widget) { | |
| 1486 | - return widget.name; | |
| 1487 | - })); | |
| 1488 | - }, [widgets, usageWidgets.data, widgetsDisabled]); | |
| 1489 | - var enableAllWidgets = (0, _react.useCallback)(function () { | |
| 1490 | - setWidgetsDisabled([]); | |
| 1491 | - }, []); | |
| 1492 | - var toggleWidget = (0, _react.useCallback)(function (widgetName, isEnabled) { | |
| 1493 | - if (isEnabled) { | |
| 1494 | - setWidgetsDisabled(function (prev) { | |
| 1495 | - return prev.filter(function (item) { | |
| 1496 | - return item !== widgetName; | |
| 1497 | - }); | |
| 1498 | - }); | |
| 1499 | - } else { | |
| 1500 | - setWidgetsDisabled(function (prev) { | |
| 1501 | - return [].concat((0, _toConsumableArray2.default)(prev), [widgetName]); | |
| 1502 | - }); | |
| 1503 | - } | |
| 1504 | - }, []); | |
| 1505 | - var dismissNotice = (0, _react.useCallback)(function () { | |
| 1506 | - if (noticeData) { | |
| 1507 | - (0, _api.markNoticeViewed)(noticeData.notice_id, noticeData.nonce); | |
| 1508 | - setNoticeData(function (prev) { | |
| 1509 | - return _objectSpread(_objectSpread({}, prev), {}, { | |
| 1510 | - is_viewed: true | |
| 1511 | - }); | |
| 1512 | - }); | |
| 1513 | - } | |
| 1514 | - }, [noticeData]); | |
| 1515 | - (0, _react.useEffect)(function () { | |
| 1516 | - var loadData = /*#__PURE__*/function () { | |
| 1517 | - var _ref3 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { | |
| 1518 | - var _appData$additional_d, _appData$additional_d2; | |
| 1519 | - var appData, pluginsData; | |
| 1520 | - return _regenerator.default.wrap(function (_context3) { | |
| 1521 | - while (1) switch (_context3.prev = _context3.next) { | |
| 1522 | - case 0: | |
| 1523 | - _context3.next = 1; | |
| 1524 | - return (0, _api.getAdminAppData)(); | |
| 1525 | - case 1: | |
| 1526 | - appData = _context3.sent; | |
| 1527 | - setNoticeData(appData.notice_data); | |
| 1528 | - setWidgetsDisabled(appData.disabled_elements); | |
| 1529 | - setWidgets(appData.widgets); | |
| 1530 | - setPromotionWidgets(appData.promotion_widgets); | |
| 1531 | - setPromotionData(appData.promotion_data); | |
| 1532 | - if ((_appData$additional_d = appData.additional_data) !== null && _appData$additional_d !== void 0 && _appData$additional_d.roles) { | |
| 1533 | - setRoles(appData.additional_data.roles); | |
| 1534 | - } | |
| 1535 | - if ((_appData$additional_d2 = appData.additional_data) !== null && _appData$additional_d2 !== void 0 && _appData$additional_d2.role_restrictions) { | |
| 1536 | - setWidgetsRoleRestrictions(appData.additional_data.role_restrictions); | |
| 1537 | - } | |
| 1538 | - pluginsData = appData.plugins.map(function (plugin) { | |
| 1539 | - return { | |
| 1540 | - label: plugin, | |
| 1541 | - value: plugin | |
| 1542 | - }; | |
| 1543 | - }); | |
| 1544 | - pluginsData.unshift({ | |
| 1545 | - label: 'All Plugins', | |
| 1546 | - value: '' | |
| 1547 | - }); | |
| 1548 | - setPlugins(pluginsData); | |
| 1549 | - setIsLoading(false); | |
| 1550 | - setChangeProgress(function (prev) { | |
| 1551 | - return _objectSpread(_objectSpread({}, prev), {}, { | |
| 1552 | - isUnsavedChanges: false | |
| 1553 | - }); | |
| 1554 | - }); | |
| 1555 | - case 2: | |
| 1556 | - case "end": | |
| 1557 | - return _context3.stop(); | |
| 1558 | - } | |
| 1559 | - }, _callee3); | |
| 1560 | - })); | |
| 1561 | - return function loadData() { | |
| 1562 | - return _ref3.apply(this, arguments); | |
| 1563 | - }; | |
| 1564 | - }(); | |
| 1565 | - loadData(); | |
| 1566 | - }, []); | |
| 1567 | - (0, _react.useEffect)(function () { | |
| 1568 | - if (isLoading) { | |
| 1569 | - return; | |
| 1570 | - } | |
| 1571 | - if (isInitialMount.current) { | |
| 1572 | - isInitialMount.current = false; | |
| 1573 | - return; | |
| 1574 | - } | |
| 1575 | - setChangeProgress(function (prev) { | |
| 1576 | - return _objectSpread(_objectSpread({}, prev), {}, { | |
| 1577 | - isUnsavedChanges: true | |
| 1578 | - }); | |
| 1579 | - }); | |
| 1580 | - }, [widgetsDisabled, widgetsRoleRestrictions, isLoading]); | |
| 1581 | - (0, _react.useEffect)(function () { | |
| 1582 | - var handleBeforeUnload = function handleBeforeUnload(event) { | |
| 1583 | - event.preventDefault(); | |
| 1584 | - event.returnValue = ''; | |
| 1585 | - }; | |
| 1586 | - if (changeProgress.isUnsavedChanges) { | |
| 1587 | - window.addEventListener('beforeunload', handleBeforeUnload); | |
| 1588 | - } else { | |
| 1589 | - window.removeEventListener('beforeunload', handleBeforeUnload); | |
| 1590 | - } | |
| 1591 | - return function () { | |
| 1592 | - window.removeEventListener('beforeunload', handleBeforeUnload); | |
| 1593 | - }; | |
| 1594 | - }, [changeProgress.isUnsavedChanges]); | |
| 1595 | - return { | |
| 1596 | - isLoading: isLoading, | |
| 1597 | - widgets: widgets, | |
| 1598 | - promotionWidgets: promotionWidgets, | |
| 1599 | - plugins: plugins, | |
| 1600 | - roles: roles, | |
| 1601 | - widgetsDisabled: widgetsDisabled, | |
| 1602 | - widgetsRoleRestrictions: widgetsRoleRestrictions, | |
| 1603 | - setWidgetsRoleRestrictions: setWidgetsRoleRestrictions, | |
| 1604 | - promotionData: promotionData, | |
| 1605 | - noticeData: noticeData, | |
| 1606 | - usageWidgets: usageWidgets, | |
| 1607 | - changeProgress: changeProgress, | |
| 1608 | - isSnackbarOpen: isSnackbarOpen, | |
| 1609 | - setIsSnackbarOpen: setIsSnackbarOpen, | |
| 1610 | - getWidgetUsage: getWidgetUsage, | |
| 1611 | - scanUsageElements: scanUsageElements, | |
| 1612 | - saveChanges: saveChanges, | |
| 1613 | - deactivateAllUnusedWidgets: deactivateAllUnusedWidgets, | |
| 1614 | - enableAllWidgets: enableAllWidgets, | |
| 1615 | - toggleWidget: toggleWidget, | |
| 1616 | - dismissNotice: dismissNotice | |
| 1617 | - }; | |
| 1618 | -}; | |
| 1619 | - | |
| 1620 | -/***/ }), | |
| 1621 | - | |
| 1622 | -/***/ "../modules/element-manager/assets/js/app-editor-one/hooks/useWidgetFilters.js": | |
| 1623 | -/*!*************************************************************************************!*\ | |
| 1624 | - !*** ../modules/element-manager/assets/js/app-editor-one/hooks/useWidgetFilters.js ***! | |
| 1625 | - \*************************************************************************************/ | |
| 1626 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1627 | - | |
| 1628 | -"use strict"; | |
| 1629 | - | |
| 1630 | - | |
| 1631 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1632 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1633 | - value: true | |
| 1634 | -})); | |
| 1635 | -exports.useWidgetFilters = void 0; | |
| 1636 | -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 1637 | -var _react = __webpack_require__(/*! react */ "react"); | |
| 1638 | -var useWidgetFilters = exports.useWidgetFilters = function useWidgetFilters(widgets, widgetsDisabled, getWidgetUsage) { | |
| 1639 | - var _useState = (0, _react.useState)(''), | |
| 1640 | - _useState2 = (0, _slicedToArray2.default)(_useState, 2), | |
| 1641 | - searchKeyword = _useState2[0], | |
| 1642 | - setSearchKeyword = _useState2[1]; | |
| 1643 | - var _useState3 = (0, _react.useState)('widget'), | |
| 1644 | - _useState4 = (0, _slicedToArray2.default)(_useState3, 2), | |
| 1645 | - sortingColumn = _useState4[0], | |
| 1646 | - setSortingColumn = _useState4[1]; | |
| 1647 | - var _useState5 = (0, _react.useState)('asc'), | |
| 1648 | - _useState6 = (0, _slicedToArray2.default)(_useState5, 2), | |
| 1649 | - sortingDirection = _useState6[0], | |
| 1650 | - setSortingDirection = _useState6[1]; | |
| 1651 | - var _useState7 = (0, _react.useState)(''), | |
| 1652 | - _useState8 = (0, _slicedToArray2.default)(_useState7, 2), | |
| 1653 | - filterByPlugin = _useState8[0], | |
| 1654 | - setFilterByPlugin = _useState8[1]; | |
| 1655 | - var _useState9 = (0, _react.useState)('all'), | |
| 1656 | - _useState0 = (0, _slicedToArray2.default)(_useState9, 2), | |
| 1657 | - filterByStatus = _useState0[0], | |
| 1658 | - setFilterByStatus = _useState0[1]; | |
| 1659 | - var sortedAndFilteredWidgets = (0, _react.useMemo)(function () { | |
| 1660 | - var filteredWidgets = widgets.filter(function (widget) { | |
| 1661 | - return widget.title.toLowerCase().includes(searchKeyword.toLowerCase()); | |
| 1662 | - }); | |
| 1663 | - if ('' !== filterByPlugin) { | |
| 1664 | - filteredWidgets = filteredWidgets.filter(function (widget) { | |
| 1665 | - return widget.plugin.toLowerCase() === filterByPlugin.toLowerCase(); | |
| 1666 | - }); | |
| 1667 | - } | |
| 1668 | - if ('all' !== filterByStatus) { | |
| 1669 | - filteredWidgets = filteredWidgets.filter(function (widget) { | |
| 1670 | - if ('active' === filterByStatus) { | |
| 1671 | - return !widgetsDisabled.includes(widget.name); | |
| 1672 | - } | |
| 1673 | - return widgetsDisabled.includes(widget.name); | |
| 1674 | - }); | |
| 1675 | - } | |
| 1676 | - filteredWidgets.sort(function (a, b) { | |
| 1677 | - var aValue; | |
| 1678 | - var bValue; | |
| 1679 | - if ('widget' === sortingColumn) { | |
| 1680 | - aValue = a.title; | |
| 1681 | - bValue = b.title; | |
| 1682 | - } | |
| 1683 | - if ('usage' === sortingColumn) { | |
| 1684 | - aValue = getWidgetUsage(a.name); | |
| 1685 | - bValue = getWidgetUsage(b.name); | |
| 1686 | - } | |
| 1687 | - if (aValue === bValue) { | |
| 1688 | - return 0; | |
| 1689 | - } | |
| 1690 | - if ('asc' === sortingDirection) { | |
| 1691 | - return aValue < bValue ? -1 : 1; | |
| 1692 | - } | |
| 1693 | - return aValue > bValue ? -1 : 1; | |
| 1694 | - }); | |
| 1695 | - return filteredWidgets; | |
| 1696 | - }, [widgets, searchKeyword, sortingColumn, sortingDirection, filterByPlugin, filterByStatus, widgetsDisabled, getWidgetUsage]); | |
| 1697 | - var getSortingIndicatorClasses = (0, _react.useCallback)(function (column) { | |
| 1698 | - if (sortingColumn !== column) { | |
| 1699 | - return ''; | |
| 1700 | - } | |
| 1701 | - return 'asc' === sortingDirection ? 'sorted asc' : 'sorted desc'; | |
| 1702 | - }, [sortingColumn, sortingDirection]); | |
| 1703 | - var onSortingClicked = (0, _react.useCallback)(function (column) { | |
| 1704 | - if (sortingColumn === column) { | |
| 1705 | - setSortingDirection(function (prev) { | |
| 1706 | - return 'asc' === prev ? 'desc' : 'asc'; | |
| 1707 | - }); | |
| 1708 | - } else { | |
| 1709 | - setSortingColumn(column); | |
| 1710 | - setSortingDirection('asc'); | |
| 1711 | - } | |
| 1712 | - }, [sortingColumn]); | |
| 1713 | - var setSortByUsage = (0, _react.useCallback)(function () { | |
| 1714 | - setSortingColumn('usage'); | |
| 1715 | - setSortingDirection('desc'); | |
| 1716 | - }, []); | |
| 1717 | - return { | |
| 1718 | - searchKeyword: searchKeyword, | |
| 1719 | - setSearchKeyword: setSearchKeyword, | |
| 1720 | - filterByPlugin: filterByPlugin, | |
| 1721 | - setFilterByPlugin: setFilterByPlugin, | |
| 1722 | - filterByStatus: filterByStatus, | |
| 1723 | - setFilterByStatus: setFilterByStatus, | |
| 1724 | - sortedAndFilteredWidgets: sortedAndFilteredWidgets, | |
| 1725 | - getSortingIndicatorClasses: getSortingIndicatorClasses, | |
| 1726 | - onSortingClicked: onSortingClicked, | |
| 1727 | - setSortByUsage: setSortByUsage | |
| 1728 | - }; | |
| 1729 | -}; | |
| 1730 | - | |
| 1731 | -/***/ }), | |
| 1732 | - | |
| 1733 | -/***/ "../modules/element-manager/assets/js/app-editor-one/index.js": | |
| 1734 | -/*!********************************************************************!*\ | |
| 1735 | - !*** ../modules/element-manager/assets/js/app-editor-one/index.js ***! | |
| 1736 | - \********************************************************************/ | |
| 1737 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1738 | - | |
| 1739 | -"use strict"; | |
| 1740 | - | |
| 1741 | - | |
| 1742 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1743 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1744 | - value: true | |
| 1745 | -})); | |
| 1746 | -exports.AppModern = void 0; | |
| 1747 | -var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 1748 | -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 1749 | -var _App = __webpack_require__(/*! ./App */ "../modules/element-manager/assets/js/app-editor-one/App.js"); | |
| 1750 | -var AppModern = exports.AppModern = function AppModern() { | |
| 1751 | - var _elementorCommon$conf; | |
| 1752 | - var isRTL = typeof elementorCommon !== 'undefined' && (_elementorCommon$conf = elementorCommon.config) !== null && _elementorCommon$conf !== void 0 && _elementorCommon$conf.isRTL ? elementorCommon.config.isRTL : 'rtl' === document.documentElement.dir || document.body.classList.contains('rtl'); | |
| 1753 | - return /*#__PURE__*/_react.default.createElement(_ui.DirectionProvider, { | |
| 1754 | - rtl: isRTL | |
| 1755 | - }, /*#__PURE__*/_react.default.createElement(_ui.ThemeProvider, { | |
| 1756 | - colorScheme: "light" | |
| 1757 | - }, /*#__PURE__*/_react.default.createElement(_App.App, null))); | |
| 1758 | -}; | |
| 1759 | - | |
| 1760 | -/***/ }), | |
| 1761 | - | |
| 1762 | -/***/ "../modules/element-manager/assets/js/upgrade-button.js": | |
| 1763 | -/*!**************************************************************!*\ | |
| 1764 | - !*** ../modules/element-manager/assets/js/upgrade-button.js ***! | |
| 1765 | - \**************************************************************/ | |
| 1766 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1767 | - | |
| 1768 | -"use strict"; | |
| 1769 | - | |
| 1770 | - | |
| 1771 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1772 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1773 | - value: true | |
| 1774 | -})); | |
| 1775 | -exports.UpgradeButton = void 0; | |
| 1776 | -var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 1777 | -var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js")); | |
| 1778 | -var _components = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); | |
| 1779 | -var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 1780 | -var UpgradeButton = exports.UpgradeButton = function UpgradeButton(props) { | |
| 1781 | - var trackingClass = props.className || 'e-id-elementor-element-manager-button-upgrade'; | |
| 1782 | - return /*#__PURE__*/_react.default.createElement(_components.Button, (0, _extends2.default)({}, props, { | |
| 1783 | - variant: "primary", | |
| 1784 | - target: "_blank", | |
| 1785 | - rel: 'noreferrer', | |
| 1786 | - style: { | |
| 1787 | - background: 'var(--e-a-btn-bg-accent, #93003f)' | |
| 1788 | - }, | |
| 1789 | - className: trackingClass | |
| 1790 | - })); | |
| 1791 | -}; | |
| 1792 | -UpgradeButton.propTypes = { | |
| 1793 | - className: _propTypes.default.string | |
| 1794 | -}; | |
| 1795 | - | |
| 1796 | -/***/ }), | |
| 1797 | - | |
| 1798 | -/***/ "../node_modules/@babel/runtime/helpers/OverloadYield.js": | |
| 1799 | -/*!***************************************************************!*\ | |
| 1800 | - !*** ../node_modules/@babel/runtime/helpers/OverloadYield.js ***! | |
| 1801 | - \***************************************************************/ | |
| 1802 | -/***/ ((module) => { | |
| 1803 | - | |
| 1804 | -function _OverloadYield(e, d) { | |
| 1805 | - this.v = e, this.k = d; | |
| 1806 | -} | |
| 1807 | -module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1808 | - | |
| 1809 | -/***/ }), | |
| 1810 | - | |
| 1811 | -/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": | |
| 1812 | -/*!******************************************************************!*\ | |
| 1813 | - !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! | |
| 1814 | - \******************************************************************/ | |
| 1815 | -/***/ ((module) => { | |
| 1816 | - | |
| 1817 | -function _arrayLikeToArray(r, a) { | |
| 1818 | - (null == a || a > r.length) && (a = r.length); | |
| 1819 | - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 1820 | - return n; | |
| 1821 | -} | |
| 1822 | -module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1823 | - | |
| 1824 | -/***/ }), | |
| 1825 | - | |
| 1826 | -/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": | |
| 1827 | -/*!****************************************************************!*\ | |
| 1828 | - !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! | |
| 1829 | - \****************************************************************/ | |
| 1830 | -/***/ ((module) => { | |
| 1831 | - | |
| 1832 | -function _arrayWithHoles(r) { | |
| 1833 | - if (Array.isArray(r)) return r; | |
| 1834 | -} | |
| 1835 | -module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1836 | - | |
| 1837 | -/***/ }), | |
| 1838 | - | |
| 1839 | -/***/ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js": | |
| 1840 | -/*!*******************************************************************!*\ | |
| 1841 | - !*** ../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! | |
| 1842 | - \*******************************************************************/ | |
| 1843 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1844 | - | |
| 1845 | -var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 1846 | -function _arrayWithoutHoles(r) { | |
| 1847 | - if (Array.isArray(r)) return arrayLikeToArray(r); | |
| 1848 | -} | |
| 1849 | -module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1850 | - | |
| 1851 | -/***/ }), | |
| 1852 | - | |
| 1853 | -/***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js": | |
| 1854 | -/*!******************************************************************!*\ | |
| 1855 | - !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***! | |
| 1856 | - \******************************************************************/ | |
| 1857 | -/***/ ((module) => { | |
| 1858 | - | |
| 1859 | -function asyncGeneratorStep(n, t, e, r, o, a, c) { | |
| 1860 | - try { | |
| 1861 | - var i = n[a](c), | |
| 1862 | - u = i.value; | |
| 1863 | - } catch (n) { | |
| 1864 | - return void e(n); | |
| 1865 | - } | |
| 1866 | - i.done ? t(u) : Promise.resolve(u).then(r, o); | |
| 1867 | -} | |
| 1868 | -function _asyncToGenerator(n) { | |
| 1869 | - return function () { | |
| 1870 | - var t = this, | |
| 1871 | - e = arguments; | |
| 1872 | - return new Promise(function (r, o) { | |
| 1873 | - var a = n.apply(t, e); | |
| 1874 | - function _next(n) { | |
| 1875 | - asyncGeneratorStep(a, r, o, _next, _throw, "next", n); | |
| 1876 | - } | |
| 1877 | - function _throw(n) { | |
| 1878 | - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); | |
| 1879 | - } | |
| 1880 | - _next(void 0); | |
| 1881 | - }); | |
| 1882 | - }; | |
| 1883 | -} | |
| 1884 | -module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1885 | - | |
| 1886 | -/***/ }), | |
| 1887 | - | |
| 1888 | -/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": | |
| 1889 | -/*!****************************************************************!*\ | |
| 1890 | - !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! | |
| 1891 | - \****************************************************************/ | |
| 1892 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1893 | - | |
| 1894 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 1895 | -function _defineProperty(e, r, t) { | |
| 1896 | - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 1897 | - value: t, | |
| 1898 | - enumerable: !0, | |
| 1899 | - configurable: !0, | |
| 1900 | - writable: !0 | |
| 1901 | - }) : e[r] = t, e; | |
| 1902 | -} | |
| 1903 | -module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1904 | - | |
| 1905 | -/***/ }), | |
| 1906 | - | |
| 1907 | -/***/ "../node_modules/@babel/runtime/helpers/extends.js": | |
| 1908 | -/*!*********************************************************!*\ | |
| 1909 | - !*** ../node_modules/@babel/runtime/helpers/extends.js ***! | |
| 1910 | - \*********************************************************/ | |
| 1911 | -/***/ ((module) => { | |
| 1912 | - | |
| 1913 | -function _extends() { | |
| 1914 | - return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) { | |
| 1915 | - for (var e = 1; e < arguments.length; e++) { | |
| 1916 | - var t = arguments[e]; | |
| 1917 | - for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); | |
| 1918 | - } | |
| 1919 | - return n; | |
| 1920 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends.apply(null, arguments); | |
| 1921 | -} | |
| 1922 | -module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1923 | - | |
| 1924 | -/***/ }), | |
| 1925 | - | |
| 1926 | -/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 1927 | -/*!***********************************************************************!*\ | |
| 1928 | - !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 1929 | - \***********************************************************************/ | |
| 1930 | -/***/ ((module) => { | |
| 1931 | - | |
| 1932 | -function _interopRequireDefault(e) { | |
| 1933 | - return e && e.__esModule ? e : { | |
| 1934 | - "default": e | |
| 1935 | - }; | |
| 1936 | -} | |
| 1937 | -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1938 | - | |
| 1939 | -/***/ }), | |
| 1940 | - | |
| 1941 | -/***/ "../node_modules/@babel/runtime/helpers/iterableToArray.js": | |
| 1942 | -/*!*****************************************************************!*\ | |
| 1943 | - !*** ../node_modules/@babel/runtime/helpers/iterableToArray.js ***! | |
| 1944 | - \*****************************************************************/ | |
| 1945 | -/***/ ((module) => { | |
| 1946 | - | |
| 1947 | -function _iterableToArray(r) { | |
| 1948 | - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); | |
| 1949 | -} | |
| 1950 | -module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1951 | - | |
| 1952 | -/***/ }), | |
| 1953 | - | |
| 1954 | -/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": | |
| 1955 | -/*!**********************************************************************!*\ | |
| 1956 | - !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! | |
| 1957 | - \**********************************************************************/ | |
| 1958 | -/***/ ((module) => { | |
| 1959 | - | |
| 1960 | -function _iterableToArrayLimit(r, l) { | |
| 1961 | - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 1962 | - if (null != t) { | |
| 1963 | - var e, | |
| 1964 | - n, | |
| 1965 | - i, | |
| 1966 | - u, | |
| 1967 | - a = [], | |
| 1968 | - f = !0, | |
| 1969 | - o = !1; | |
| 1970 | - try { | |
| 1971 | - if (i = (t = t.call(r)).next, 0 === l) { | |
| 1972 | - if (Object(t) !== t) return; | |
| 1973 | - f = !1; | |
| 1974 | - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 1975 | - } catch (r) { | |
| 1976 | - o = !0, n = r; | |
| 1977 | - } finally { | |
| 1978 | - try { | |
| 1979 | - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 1980 | - } finally { | |
| 1981 | - if (o) throw n; | |
| 1982 | - } | |
| 1983 | - } | |
| 1984 | - return a; | |
| 1985 | - } | |
| 1986 | -} | |
| 1987 | -module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1988 | - | |
| 1989 | -/***/ }), | |
| 1990 | - | |
| 1991 | -/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": | |
| 1992 | -/*!*****************************************************************!*\ | |
| 1993 | - !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! | |
| 1994 | - \*****************************************************************/ | |
| 1995 | -/***/ ((module) => { | |
| 1996 | - | |
| 1997 | -function _nonIterableRest() { | |
| 1998 | - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 1999 | -} | |
| 2000 | -module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2001 | - | |
| 2002 | -/***/ }), | |
| 2003 | - | |
| 2004 | -/***/ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js": | |
| 2005 | -/*!*******************************************************************!*\ | |
| 2006 | - !*** ../node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! | |
| 2007 | - \*******************************************************************/ | |
| 2008 | -/***/ ((module) => { | |
| 2009 | - | |
| 2010 | -function _nonIterableSpread() { | |
| 2011 | - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 2012 | -} | |
| 2013 | -module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2014 | - | |
| 2015 | -/***/ }), | |
| 2016 | - | |
| 2017 | -/***/ "../node_modules/@babel/runtime/helpers/regenerator.js": | |
| 2018 | -/*!*************************************************************!*\ | |
| 2019 | - !*** ../node_modules/@babel/runtime/helpers/regenerator.js ***! | |
| 2020 | - \*************************************************************/ | |
| 2021 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2022 | - | |
| 2023 | -var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); | |
| 2024 | -function _regenerator() { | |
| 2025 | - /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ | |
| 2026 | - var e, | |
| 2027 | - t, | |
| 2028 | - r = "function" == typeof Symbol ? Symbol : {}, | |
| 2029 | - n = r.iterator || "@@iterator", | |
| 2030 | - o = r.toStringTag || "@@toStringTag"; | |
| 2031 | - function i(r, n, o, i) { | |
| 2032 | - var c = n && n.prototype instanceof Generator ? n : Generator, | |
| 2033 | - u = Object.create(c.prototype); | |
| 2034 | - return regeneratorDefine(u, "_invoke", function (r, n, o) { | |
| 2035 | - var i, | |
| 2036 | - c, | |
| 2037 | - u, | |
| 2038 | - f = 0, | |
| 2039 | - p = o || [], | |
| 2040 | - y = !1, | |
| 2041 | - G = { | |
| 2042 | - p: 0, | |
| 2043 | - n: 0, | |
| 2044 | - v: e, | |
| 2045 | - a: d, | |
| 2046 | - f: d.bind(e, 4), | |
| 2047 | - d: function d(t, r) { | |
| 2048 | - return i = t, c = 0, u = e, G.n = r, a; | |
| 2049 | - } | |
| 2050 | - }; | |
| 2051 | - function d(r, n) { | |
| 2052 | - for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { | |
| 2053 | - var o, | |
| 2054 | - i = p[t], | |
| 2055 | - d = G.p, | |
| 2056 | - l = i[2]; | |
| 2057 | - 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)); | |
| 2058 | - } | |
| 2059 | - if (o || r > 1) return a; | |
| 2060 | - throw y = !0, n; | |
| 2061 | - } | |
| 2062 | - return function (o, p, l) { | |
| 2063 | - if (f > 1) throw TypeError("Generator is already running"); | |
| 2064 | - for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { | |
| 2065 | - i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); | |
| 2066 | - try { | |
| 2067 | - if (f = 2, i) { | |
| 2068 | - if (c || (o = "next"), t = i[o]) { | |
| 2069 | - if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); | |
| 2070 | - if (!t.done) return t; | |
| 2071 | - u = t.value, c < 2 && (c = 0); | |
| 2072 | - } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); | |
| 2073 | - i = e; | |
| 2074 | - } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; | |
| 2075 | - } catch (t) { | |
| 2076 | - i = e, c = 1, u = t; | |
| 2077 | - } finally { | |
| 2078 | - f = 1; | |
| 2079 | - } | |
| 2080 | - } | |
| 2081 | - return { | |
| 2082 | - value: t, | |
| 2083 | - done: y | |
| 2084 | - }; | |
| 2085 | - }; | |
| 2086 | - }(r, o, i), !0), u; | |
| 2087 | - } | |
| 2088 | - var a = {}; | |
| 2089 | - function Generator() {} | |
| 2090 | - function GeneratorFunction() {} | |
| 2091 | - function GeneratorFunctionPrototype() {} | |
| 2092 | - t = Object.getPrototypeOf; | |
| 2093 | - var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () { | |
| 2094 | - return this; | |
| 2095 | - }), t), | |
| 2096 | - u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); | |
| 2097 | - function f(e) { | |
| 2098 | - return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; | |
| 2099 | - } | |
| 2100 | - 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 () { | |
| 2101 | - return this; | |
| 2102 | - }), regeneratorDefine(u, "toString", function () { | |
| 2103 | - return "[object Generator]"; | |
| 2104 | - }), (module.exports = _regenerator = function _regenerator() { | |
| 2105 | - return { | |
| 2106 | - w: i, | |
| 2107 | - m: f | |
| 2108 | - }; | |
| 2109 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 2110 | -} | |
| 2111 | -module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2112 | - | |
| 2113 | -/***/ }), | |
| 2114 | - | |
| 2115 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js": | |
| 2116 | -/*!******************************************************************!*\ | |
| 2117 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsync.js ***! | |
| 2118 | - \******************************************************************/ | |
| 2119 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2120 | - | |
| 2121 | -var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); | |
| 2122 | -function _regeneratorAsync(n, e, r, t, o) { | |
| 2123 | - var a = regeneratorAsyncGen(n, e, r, t, o); | |
| 2124 | - return a.next().then(function (n) { | |
| 2125 | - return n.done ? n.value : a.next(); | |
| 2126 | - }); | |
| 2127 | -} | |
| 2128 | -module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2129 | - | |
| 2130 | -/***/ }), | |
| 2131 | - | |
| 2132 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js": | |
| 2133 | -/*!*********************************************************************!*\ | |
| 2134 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js ***! | |
| 2135 | - \*********************************************************************/ | |
| 2136 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2137 | - | |
| 2138 | -var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); | |
| 2139 | -var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); | |
| 2140 | -function _regeneratorAsyncGen(r, e, t, o, n) { | |
| 2141 | - return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); | |
| 2142 | -} | |
| 2143 | -module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2144 | - | |
| 2145 | -/***/ }), | |
| 2146 | - | |
| 2147 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js": | |
| 2148 | -/*!**************************************************************************!*\ | |
| 2149 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js ***! | |
| 2150 | - \**************************************************************************/ | |
| 2151 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2152 | - | |
| 2153 | -var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); | |
| 2154 | -var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); | |
| 2155 | -function AsyncIterator(t, e) { | |
| 2156 | - function n(r, o, i, f) { | |
| 2157 | - try { | |
| 2158 | - var c = t[r](o), | |
| 2159 | - u = c.value; | |
| 2160 | - return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) { | |
| 2161 | - n("next", t, i, f); | |
| 2162 | - }, function (t) { | |
| 2163 | - n("throw", t, i, f); | |
| 2164 | - }) : e.resolve(u).then(function (t) { | |
| 2165 | - c.value = t, i(c); | |
| 2166 | - }, function (t) { | |
| 2167 | - return n("throw", t, i, f); | |
| 2168 | - }); | |
| 2169 | - } catch (t) { | |
| 2170 | - f(t); | |
| 2171 | - } | |
| 2172 | - } | |
| 2173 | - var r; | |
| 2174 | - this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { | |
| 2175 | - return this; | |
| 2176 | - })), regeneratorDefine(this, "_invoke", function (t, o, i) { | |
| 2177 | - function f() { | |
| 2178 | - return new e(function (e, r) { | |
| 2179 | - n(t, i, e, r); | |
| 2180 | - }); | |
| 2181 | - } | |
| 2182 | - return r = r ? r.then(f, f) : f(); | |
| 2183 | - }, !0); | |
| 2184 | -} | |
| 2185 | -module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2186 | - | |
| 2187 | -/***/ }), | |
| 2188 | - | |
| 2189 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js": | |
| 2190 | -/*!*******************************************************************!*\ | |
| 2191 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorDefine.js ***! | |
| 2192 | - \*******************************************************************/ | |
| 2193 | -/***/ ((module) => { | |
| 2194 | - | |
| 2195 | -function _regeneratorDefine(e, r, n, t) { | |
| 2196 | - var i = Object.defineProperty; | |
| 2197 | - try { | |
| 2198 | - i({}, "", {}); | |
| 2199 | - } catch (e) { | |
| 2200 | - i = 0; | |
| 2201 | - } | |
| 2202 | - module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { | |
| 2203 | - function o(r, n) { | |
| 2204 | - _regeneratorDefine(e, r, function (e) { | |
| 2205 | - return this._invoke(r, n, e); | |
| 2206 | - }); | |
| 2207 | - } | |
| 2208 | - r ? i ? i(e, r, { | |
| 2209 | - value: n, | |
| 2210 | - enumerable: !t, | |
| 2211 | - configurable: !t, | |
| 2212 | - writable: !t | |
| 2213 | - }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); | |
| 2214 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); | |
| 2215 | -} | |
| 2216 | -module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2217 | - | |
| 2218 | -/***/ }), | |
| 2219 | - | |
| 2220 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js": | |
| 2221 | -/*!*****************************************************************!*\ | |
| 2222 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorKeys.js ***! | |
| 2223 | - \*****************************************************************/ | |
| 2224 | -/***/ ((module) => { | |
| 2225 | - | |
| 2226 | -function _regeneratorKeys(e) { | |
| 2227 | - var n = Object(e), | |
| 2228 | - r = []; | |
| 2229 | - for (var t in n) r.unshift(t); | |
| 2230 | - return function e() { | |
| 2231 | - for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; | |
| 2232 | - return e.done = !0, e; | |
| 2233 | - }; | |
| 2234 | -} | |
| 2235 | -module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2236 | - | |
| 2237 | -/***/ }), | |
| 2238 | - | |
| 2239 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js": | |
| 2240 | -/*!********************************************************************!*\ | |
| 2241 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! | |
| 2242 | - \********************************************************************/ | |
| 2243 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2244 | - | |
| 2245 | -var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); | |
| 2246 | -var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); | |
| 2247 | -var regeneratorAsync = __webpack_require__(/*! ./regeneratorAsync.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js"); | |
| 2248 | -var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); | |
| 2249 | -var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); | |
| 2250 | -var regeneratorKeys = __webpack_require__(/*! ./regeneratorKeys.js */ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js"); | |
| 2251 | -var regeneratorValues = __webpack_require__(/*! ./regeneratorValues.js */ "../node_modules/@babel/runtime/helpers/regeneratorValues.js"); | |
| 2252 | -function _regeneratorRuntime() { | |
| 2253 | - "use strict"; | |
| 2254 | - | |
| 2255 | - var r = regenerator(), | |
| 2256 | - e = r.m(_regeneratorRuntime), | |
| 2257 | - t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; | |
| 2258 | - function n(r) { | |
| 2259 | - var e = "function" == typeof r && r.constructor; | |
| 2260 | - return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); | |
| 2261 | - } | |
| 2262 | - var o = { | |
| 2263 | - "throw": 1, | |
| 2264 | - "return": 2, | |
| 2265 | - "break": 3, | |
| 2266 | - "continue": 3 | |
| 2267 | - }; | |
| 2268 | - function a(r) { | |
| 2269 | - var e, t; | |
| 2270 | - return function (n) { | |
| 2271 | - e || (e = { | |
| 2272 | - stop: function stop() { | |
| 2273 | - return t(n.a, 2); | |
| 2274 | - }, | |
| 2275 | - "catch": function _catch() { | |
| 2276 | - return n.v; | |
| 2277 | - }, | |
| 2278 | - abrupt: function abrupt(r, e) { | |
| 2279 | - return t(n.a, o[r], e); | |
| 2280 | - }, | |
| 2281 | - delegateYield: function delegateYield(r, o, a) { | |
| 2282 | - return e.resultName = o, t(n.d, regeneratorValues(r), a); | |
| 2283 | - }, | |
| 2284 | - finish: function finish(r) { | |
| 2285 | - return t(n.f, r); | |
| 2286 | - } | |
| 2287 | - }, t = function t(r, _t, o) { | |
| 2288 | - n.p = e.prev, n.n = e.next; | |
| 2289 | - try { | |
| 2290 | - return r(_t, o); | |
| 2291 | - } finally { | |
| 2292 | - e.next = n.n; | |
| 2293 | - } | |
| 2294 | - }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; | |
| 2295 | - try { | |
| 2296 | - return r.call(this, e); | |
| 2297 | - } finally { | |
| 2298 | - n.p = e.prev, n.n = e.next; | |
| 2299 | - } | |
| 2300 | - }; | |
| 2301 | - } | |
| 2302 | - return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 2303 | - return { | |
| 2304 | - wrap: function wrap(e, t, n, o) { | |
| 2305 | - return r.w(a(e), t, n, o && o.reverse()); | |
| 2306 | - }, | |
| 2307 | - isGeneratorFunction: n, | |
| 2308 | - mark: r.m, | |
| 2309 | - awrap: function awrap(r, e) { | |
| 2310 | - return new OverloadYield(r, e); | |
| 2311 | - }, | |
| 2312 | - AsyncIterator: regeneratorAsyncIterator, | |
| 2313 | - async: function async(r, e, t, o, u) { | |
| 2314 | - return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); | |
| 2315 | - }, | |
| 2316 | - keys: regeneratorKeys, | |
| 2317 | - values: regeneratorValues | |
| 2318 | - }; | |
| 2319 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 2320 | -} | |
| 2321 | -module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2322 | - | |
| 2323 | -/***/ }), | |
| 2324 | - | |
| 2325 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorValues.js": | |
| 2326 | -/*!*******************************************************************!*\ | |
| 2327 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorValues.js ***! | |
| 2328 | - \*******************************************************************/ | |
| 2329 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2330 | - | |
| 2331 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 2332 | -function _regeneratorValues(e) { | |
| 2333 | - if (null != e) { | |
| 2334 | - var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], | |
| 2335 | - r = 0; | |
| 2336 | - if (t) return t.call(e); | |
| 2337 | - if ("function" == typeof e.next) return e; | |
| 2338 | - if (!isNaN(e.length)) return { | |
| 2339 | - next: function next() { | |
| 2340 | - return e && r >= e.length && (e = void 0), { | |
| 2341 | - value: e && e[r++], | |
| 2342 | - done: !e | |
| 2343 | - }; | |
| 2344 | - } | |
| 2345 | - }; | |
| 2346 | - } | |
| 2347 | - throw new TypeError(_typeof(e) + " is not iterable"); | |
| 2348 | -} | |
| 2349 | -module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2350 | - | |
| 2351 | -/***/ }), | |
| 2352 | - | |
| 2353 | -/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": | |
| 2354 | -/*!***************************************************************!*\ | |
| 2355 | - !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! | |
| 2356 | - \***************************************************************/ | |
| 2357 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2358 | - | |
| 2359 | -var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); | |
| 2360 | -var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); | |
| 2361 | -var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 2362 | -var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); | |
| 2363 | -function _slicedToArray(r, e) { | |
| 2364 | - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); | |
| 2365 | -} | |
| 2366 | -module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2367 | - | |
| 2368 | -/***/ }), | |
| 2369 | - | |
| 2370 | -/***/ "../node_modules/@babel/runtime/helpers/toConsumableArray.js": | |
| 2371 | -/*!*******************************************************************!*\ | |
| 2372 | - !*** ../node_modules/@babel/runtime/helpers/toConsumableArray.js ***! | |
| 2373 | - \*******************************************************************/ | |
| 2374 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2375 | - | |
| 2376 | -var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"); | |
| 2377 | -var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "../node_modules/@babel/runtime/helpers/iterableToArray.js"); | |
| 2378 | -var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 2379 | -var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js"); | |
| 2380 | -function _toConsumableArray(r) { | |
| 2381 | - return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread(); | |
| 2382 | -} | |
| 2383 | -module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2384 | - | |
| 2385 | -/***/ }), | |
| 2386 | - | |
| 2387 | -/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 2388 | -/*!*************************************************************!*\ | |
| 2389 | - !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 2390 | - \*************************************************************/ | |
| 2391 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2392 | - | |
| 2393 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 2394 | -function toPrimitive(t, r) { | |
| 2395 | - if ("object" != _typeof(t) || !t) return t; | |
| 2396 | - var e = t[Symbol.toPrimitive]; | |
| 2397 | - if (void 0 !== e) { | |
| 2398 | - var i = e.call(t, r || "default"); | |
| 2399 | - if ("object" != _typeof(i)) return i; | |
| 2400 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 2401 | - } | |
| 2402 | - return ("string" === r ? String : Number)(t); | |
| 2403 | -} | |
| 2404 | -module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2405 | - | |
| 2406 | -/***/ }), | |
| 2407 | - | |
| 2408 | -/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 2409 | -/*!***************************************************************!*\ | |
| 2410 | - !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 2411 | - \***************************************************************/ | |
| 2412 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2413 | - | |
| 2414 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 2415 | -var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 2416 | -function toPropertyKey(t) { | |
| 2417 | - var i = toPrimitive(t, "string"); | |
| 2418 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 2419 | -} | |
| 2420 | -module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2421 | - | |
| 2422 | -/***/ }), | |
| 2423 | - | |
| 2424 | -/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 2425 | -/*!********************************************************!*\ | |
| 2426 | - !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 2427 | - \********************************************************/ | |
| 2428 | -/***/ ((module) => { | |
| 2429 | - | |
| 2430 | -function _typeof(o) { | |
| 2431 | - "@babel/helpers - typeof"; | |
| 2432 | - | |
| 2433 | - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 2434 | - return typeof o; | |
| 2435 | - } : function (o) { | |
| 2436 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 2437 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 2438 | -} | |
| 2439 | -module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2440 | - | |
| 2441 | -/***/ }), | |
| 2442 | - | |
| 2443 | -/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": | |
| 2444 | -/*!****************************************************************************!*\ | |
| 2445 | - !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! | |
| 2446 | - \****************************************************************************/ | |
| 2447 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2448 | - | |
| 2449 | -var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 2450 | -function _unsupportedIterableToArray(r, a) { | |
| 2451 | - if (r) { | |
| 2452 | - if ("string" == typeof r) return arrayLikeToArray(r, a); | |
| 2453 | - var t = {}.toString.call(r).slice(8, -1); | |
| 2454 | - 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; | |
| 2455 | - } | |
| 2456 | -} | |
| 2457 | -module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2458 | - | |
| 2459 | -/***/ }), | |
| 2460 | - | |
| 2461 | -/***/ "../node_modules/@babel/runtime/regenerator/index.js": | |
| 2462 | -/*!***********************************************************!*\ | |
| 2463 | - !*** ../node_modules/@babel/runtime/regenerator/index.js ***! | |
| 2464 | - \***********************************************************/ | |
| 2465 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2466 | - | |
| 2467 | -// TODO(Babel 8): Remove this file. | |
| 2468 | - | |
| 2469 | -var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")(); | |
| 2470 | -module.exports = runtime; | |
| 2471 | - | |
| 2472 | -// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= | |
| 2473 | -try { | |
| 2474 | - regeneratorRuntime = runtime; | |
| 2475 | -} catch (accidentalStrictMode) { | |
| 2476 | - if (typeof globalThis === "object") { | |
| 2477 | - globalThis.regeneratorRuntime = runtime; | |
| 2478 | - } else { | |
| 2479 | - Function("r", "regeneratorRuntime = r")(runtime); | |
| 2480 | - } | |
| 2481 | -} | |
| 2482 | - | |
| 2483 | - | |
| 2484 | -/***/ }), | |
| 2485 | - | |
| 2486 | 5 | /***/ "../node_modules/@wordpress/element/build-module/create-interpolate-element.js": |
| 2487 | 6 | /*!*************************************************************************************!*\ |
| 2488 | 7 | !*** ../node_modules/@wordpress/element/build-module/create-interpolate-element.js ***! |
| 2489 | 8 | \*************************************************************************************/ |
| @@ -3408,12 +927,12 @@ | ||
| 3408 | 927 | /* harmony export */ renderNativeComponent: () => (/* binding */ renderNativeComponent), |
| 3409 | 928 | /* harmony export */ renderStyle: () => (/* binding */ renderStyle) |
| 3410 | 929 | /* harmony export */ }); |
| 3411 | 930 | /* harmony import */ var is_plain_object__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-plain-object */ "../node_modules/is-plain-object/dist/is-plain-object.mjs"); |
| 3412 | -/* harmony import */ var change_case__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! change-case */ "../node_modules/param-case/dist.es2015/index.js"); | |
| 3413 | -/* harmony import */ var _wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/escape-html */ "../node_modules/@wordpress/escape-html/build-module/index.js"); | |
| 3414 | -/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./react */ "react"); | |
| 3415 | -/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_react__WEBPACK_IMPORTED_MODULE_3__); | |
| 931 | +/* harmony import */ var change_case__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! change-case */ "../node_modules/param-case/dist.es2015/index.js"); | |
| 932 | +/* harmony import */ var _wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/escape-html */ "../node_modules/@wordpress/escape-html/build-module/index.js"); | |
| 933 | +/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./react */ "react"); | |
| 934 | +/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_react__WEBPACK_IMPORTED_MODULE_1__); | |
| 3416 | 935 | /* harmony import */ var _raw_html__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./raw-html */ "../node_modules/@wordpress/element/build-module/raw-html.js"); |
| 3417 | 936 | /** |
| 3418 | 937 | * Parts of this source were derived and modified from fast-react-render, |
| 3419 | 938 | * released under the MIT license. |
| @@ -3462,10 +981,10 @@ | ||
| 3462 | 981 | |
| 3463 | 982 | const { |
| 3464 | 983 | Provider, |
| 3465 | 984 | Consumer |
| 3466 | -} = (0,_react__WEBPACK_IMPORTED_MODULE_3__.createContext)(undefined); | |
| 3467 | -const ForwardRef = (0,_react__WEBPACK_IMPORTED_MODULE_3__.forwardRef)(() => { | |
| 985 | +} = (0,_react__WEBPACK_IMPORTED_MODULE_1__.createContext)(undefined); | |
| 986 | +const ForwardRef = (0,_react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(() => { | |
| 3468 | 987 | return null; |
| 3469 | 988 | }); |
| 3470 | 989 | |
| 3471 | 990 | /** |
| @@ -3631,9 +1150,9 @@ | ||
| 3631 | 1150 | const attributeLowerCase = attribute.toLowerCase(); |
| 3632 | 1151 | if (CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase]) { |
| 3633 | 1152 | return CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase]; |
| 3634 | 1153 | } else if (SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]) { |
| 3635 | - return (0,change_case__WEBPACK_IMPORTED_MODULE_1__.paramCase)(SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]); | |
| 1154 | + return (0,change_case__WEBPACK_IMPORTED_MODULE_2__.paramCase)(SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]); | |
| 3636 | 1155 | } else if (SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase]) { |
| 3637 | 1156 | return SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase]; |
| 3638 | 1157 | } |
| 3639 | 1158 | return attributeLowerCase; |
| @@ -3654,11 +1173,11 @@ | ||
| 3654 | 1173 | if (property.startsWith('--')) { |
| 3655 | 1174 | return property; |
| 3656 | 1175 | } |
| 3657 | 1176 | if (hasPrefix(property, ['ms', 'O', 'Moz', 'Webkit'])) { |
| 3658 | - return '-' + (0,change_case__WEBPACK_IMPORTED_MODULE_1__.paramCase)(property); | |
| 1177 | + return '-' + (0,change_case__WEBPACK_IMPORTED_MODULE_2__.paramCase)(property); | |
| 3659 | 1178 | } |
| 3660 | - return (0,change_case__WEBPACK_IMPORTED_MODULE_1__.paramCase)(property); | |
| 1179 | + return (0,change_case__WEBPACK_IMPORTED_MODULE_2__.paramCase)(property); | |
| 3661 | 1180 | } |
| 3662 | 1181 | |
| 3663 | 1182 | /** |
| 3664 | 1183 | * Returns the normal form of the style property value for HTML. Appends a |
| @@ -3693,9 +1212,9 @@ | ||
| 3693 | 1212 | return renderChildren(element, context, legacyContext); |
| 3694 | 1213 | } |
| 3695 | 1214 | switch (typeof element) { |
| 3696 | 1215 | case 'string': |
| 3697 | - return (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__.escapeHTML)(element); | |
| 1216 | + return (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.escapeHTML)(element); | |
| 3698 | 1217 | case 'number': |
| 3699 | 1218 | return element.toString(); |
| 3700 | 1219 | } |
| 3701 | 1220 | const { |
| @@ -3703,10 +1222,10 @@ | ||
| 3703 | 1222 | props |
| 3704 | 1223 | } = /** @type {{type?: any, props?: any}} */ |
| 3705 | 1224 | element; |
| 3706 | 1225 | switch (type) { |
| 3707 | - case _react__WEBPACK_IMPORTED_MODULE_3__.StrictMode: | |
| 3708 | - case _react__WEBPACK_IMPORTED_MODULE_3__.Fragment: | |
| 1226 | + case _react__WEBPACK_IMPORTED_MODULE_1__.StrictMode: | |
| 1227 | + case _react__WEBPACK_IMPORTED_MODULE_1__.Fragment: | |
| 3709 | 1228 | return renderChildren(props.children, context, legacyContext); |
| 3710 | 1229 | case _raw_html__WEBPACK_IMPORTED_MODULE_4__["default"]: |
| 3711 | 1230 | const { |
| 3712 | 1231 | children, |
| @@ -3833,9 +1352,9 @@ | ||
| 3833 | 1352 | function renderAttributes(props) { |
| 3834 | 1353 | let result = ''; |
| 3835 | 1354 | for (const key in props) { |
| 3836 | 1355 | const attribute = getNormalAttributeName(key); |
| 3837 | - if (!(0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__.isValidAttributeName)(attribute)) { | |
| 1356 | + if (!(0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.isValidAttributeName)(attribute)) { | |
| 3838 | 1357 | continue; |
| 3839 | 1358 | } |
| 3840 | 1359 | let value = getNormalAttributeValue(key, props[key]); |
| 3841 | 1360 | |
| @@ -3867,9 +1386,9 @@ | ||
| 3867 | 1386 | if (isBooleanAttribute) { |
| 3868 | 1387 | continue; |
| 3869 | 1388 | } |
| 3870 | 1389 | if (typeof value === 'string') { |
| 3871 | - value = (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__.escapeAttribute)(value); | |
| 1390 | + value = (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.escapeAttribute)(value); | |
| 3872 | 1391 | } |
| 3873 | 1392 | result += '="' + value + '"'; |
| 3874 | 1393 | } |
| 3875 | 1394 | return result; |
| @@ -4111,78 +1630,997 @@ | ||
| 4111 | 1630 | //# sourceMappingURL=index.js.map |
| 4112 | 1631 | |
| 4113 | 1632 | /***/ }), |
| 4114 | 1633 | |
| 4115 | -/***/ "../node_modules/dot-case/dist.es2015/index.js": | |
| 4116 | -/*!*****************************************************!*\ | |
| 4117 | - !*** ../node_modules/dot-case/dist.es2015/index.js ***! | |
| 4118 | - \*****************************************************/ | |
| 4119 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 1634 | +/***/ "../modules/element-manager/assets/js/api.js": | |
| 1635 | +/*!***************************************************!*\ | |
| 1636 | + !*** ../modules/element-manager/assets/js/api.js ***! | |
| 1637 | + \***************************************************/ | |
| 1638 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 4120 | 1639 | |
| 4121 | 1640 | "use strict"; |
| 4122 | -__webpack_require__.r(__webpack_exports__); | |
| 4123 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 4124 | -/* harmony export */ dotCase: () => (/* binding */ dotCase) | |
| 4125 | -/* harmony export */ }); | |
| 4126 | -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.mjs"); | |
| 4127 | -/* harmony import */ var no_case__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! no-case */ "../node_modules/no-case/dist.es2015/index.js"); | |
| 4128 | 1641 | |
| 4129 | 1642 | |
| 4130 | -function dotCase(input, options) { | |
| 4131 | - if (options === void 0) { options = {}; } | |
| 4132 | - return (0,no_case__WEBPACK_IMPORTED_MODULE_1__.noCase)(input, (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({ delimiter: "." }, options)); | |
| 4133 | -} | |
| 4134 | -//# sourceMappingURL=index.js.map | |
| 1643 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1644 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1645 | + value: true | |
| 1646 | +})); | |
| 1647 | +exports.saveDisabledWidgets = exports.markNoticeViewed = exports.getUsageWidgets = exports.getAdminAppData = void 0; | |
| 1648 | +var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 1649 | +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 1650 | +var saveDisabledWidgets = exports.saveDisabledWidgets = /*#__PURE__*/function () { | |
| 1651 | + var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(widgetsDisabled) { | |
| 1652 | + var elementsRestriction, | |
| 1653 | + bodyData, | |
| 1654 | + _args = arguments; | |
| 1655 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 1656 | + while (1) switch (_context.prev = _context.next) { | |
| 1657 | + case 0: | |
| 1658 | + elementsRestriction = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}; | |
| 1659 | + _context.prev = 1; | |
| 1660 | + bodyData = { | |
| 1661 | + action: 'elementor_element_manager_save_disabled_elements', | |
| 1662 | + nonce: eElementManagerConfig.nonce, | |
| 1663 | + widgets: JSON.stringify(widgetsDisabled) | |
| 1664 | + }; | |
| 1665 | + if (null !== elementsRestriction) { | |
| 1666 | + bodyData.elements_restriction = JSON.stringify(elementsRestriction); | |
| 1667 | + } | |
| 1668 | + _context.next = 6; | |
| 1669 | + return fetch(eElementManagerConfig.ajaxurl, { | |
| 1670 | + method: 'POST', | |
| 1671 | + headers: { | |
| 1672 | + 'Content-Type': 'application/x-www-form-urlencoded' | |
| 1673 | + }, | |
| 1674 | + body: new URLSearchParams(bodyData) | |
| 1675 | + }); | |
| 1676 | + case 6: | |
| 1677 | + _context.next = 11; | |
| 1678 | + break; | |
| 1679 | + case 8: | |
| 1680 | + _context.prev = 8; | |
| 1681 | + _context.t0 = _context["catch"](1); | |
| 1682 | + console.error(_context.t0); // eslint-disable-line no-console | |
| 1683 | + case 11: | |
| 1684 | + case "end": | |
| 1685 | + return _context.stop(); | |
| 1686 | + } | |
| 1687 | + }, _callee, null, [[1, 8]]); | |
| 1688 | + })); | |
| 1689 | + return function saveDisabledWidgets(_x) { | |
| 1690 | + return _ref.apply(this, arguments); | |
| 1691 | + }; | |
| 1692 | +}(); | |
| 1693 | +var getAdminAppData = exports.getAdminAppData = /*#__PURE__*/function () { | |
| 1694 | + var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { | |
| 1695 | + var response, data; | |
| 1696 | + return _regenerator.default.wrap(function _callee2$(_context2) { | |
| 1697 | + while (1) switch (_context2.prev = _context2.next) { | |
| 1698 | + case 0: | |
| 1699 | + _context2.prev = 0; | |
| 1700 | + _context2.next = 3; | |
| 1701 | + return fetch(eElementManagerConfig.ajaxurl, { | |
| 1702 | + method: 'POST', | |
| 1703 | + headers: { | |
| 1704 | + 'Content-Type': 'application/x-www-form-urlencoded' | |
| 1705 | + }, | |
| 1706 | + body: new URLSearchParams({ | |
| 1707 | + action: 'elementor_element_manager_get_admin_app_data', | |
| 1708 | + nonce: eElementManagerConfig.nonce | |
| 1709 | + }) | |
| 1710 | + }); | |
| 1711 | + case 3: | |
| 1712 | + response = _context2.sent; | |
| 1713 | + _context2.next = 6; | |
| 1714 | + return response.json(); | |
| 1715 | + case 6: | |
| 1716 | + data = _context2.sent; | |
| 1717 | + if (!data.success) { | |
| 1718 | + _context2.next = 9; | |
| 1719 | + break; | |
| 1720 | + } | |
| 1721 | + return _context2.abrupt("return", data.data); | |
| 1722 | + case 9: | |
| 1723 | + _context2.next = 14; | |
| 1724 | + break; | |
| 1725 | + case 11: | |
| 1726 | + _context2.prev = 11; | |
| 1727 | + _context2.t0 = _context2["catch"](0); | |
| 1728 | + console.error(_context2.t0); // eslint-disable-line no-console | |
| 1729 | + case 14: | |
| 1730 | + case "end": | |
| 1731 | + return _context2.stop(); | |
| 1732 | + } | |
| 1733 | + }, _callee2, null, [[0, 11]]); | |
| 1734 | + })); | |
| 1735 | + return function getAdminAppData() { | |
| 1736 | + return _ref2.apply(this, arguments); | |
| 1737 | + }; | |
| 1738 | +}(); | |
| 1739 | +var getUsageWidgets = exports.getUsageWidgets = /*#__PURE__*/function () { | |
| 1740 | + var _ref3 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { | |
| 1741 | + var response, data; | |
| 1742 | + return _regenerator.default.wrap(function _callee3$(_context3) { | |
| 1743 | + while (1) switch (_context3.prev = _context3.next) { | |
| 1744 | + case 0: | |
| 1745 | + _context3.prev = 0; | |
| 1746 | + _context3.next = 3; | |
| 1747 | + return fetch(eElementManagerConfig.ajaxurl, { | |
| 1748 | + method: 'POST', | |
| 1749 | + headers: { | |
| 1750 | + 'Content-Type': 'application/x-www-form-urlencoded' | |
| 1751 | + }, | |
| 1752 | + body: new URLSearchParams({ | |
| 1753 | + action: 'elementor_element_manager_get_widgets_usage', | |
| 1754 | + nonce: eElementManagerConfig.nonce | |
| 1755 | + }) | |
| 1756 | + }); | |
| 1757 | + case 3: | |
| 1758 | + response = _context3.sent; | |
| 1759 | + _context3.next = 6; | |
| 1760 | + return response.json(); | |
| 1761 | + case 6: | |
| 1762 | + data = _context3.sent; | |
| 1763 | + if (!data.success) { | |
| 1764 | + _context3.next = 9; | |
| 1765 | + break; | |
| 1766 | + } | |
| 1767 | + return _context3.abrupt("return", data.data); | |
| 1768 | + case 9: | |
| 1769 | + _context3.next = 14; | |
| 1770 | + break; | |
| 1771 | + case 11: | |
| 1772 | + _context3.prev = 11; | |
| 1773 | + _context3.t0 = _context3["catch"](0); | |
| 1774 | + console.error(_context3.t0); // eslint-disable-line no-console | |
| 1775 | + case 14: | |
| 1776 | + case "end": | |
| 1777 | + return _context3.stop(); | |
| 1778 | + } | |
| 1779 | + }, _callee3, null, [[0, 11]]); | |
| 1780 | + })); | |
| 1781 | + return function getUsageWidgets() { | |
| 1782 | + return _ref3.apply(this, arguments); | |
| 1783 | + }; | |
| 1784 | +}(); | |
| 1785 | +var markNoticeViewed = exports.markNoticeViewed = /*#__PURE__*/function () { | |
| 1786 | + var _ref4 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4(noticeId) { | |
| 1787 | + var response, data; | |
| 1788 | + return _regenerator.default.wrap(function _callee4$(_context4) { | |
| 1789 | + while (1) switch (_context4.prev = _context4.next) { | |
| 1790 | + case 0: | |
| 1791 | + _context4.prev = 0; | |
| 1792 | + _context4.next = 3; | |
| 1793 | + return fetch(eElementManagerConfig.ajaxurl, { | |
| 1794 | + method: 'POST', | |
| 1795 | + headers: { | |
| 1796 | + 'Content-Type': 'application/x-www-form-urlencoded' | |
| 1797 | + }, | |
| 1798 | + body: new URLSearchParams({ | |
| 1799 | + action: 'elementor_set_admin_notice_viewed', | |
| 1800 | + notice_id: noticeId | |
| 1801 | + }) | |
| 1802 | + }); | |
| 1803 | + case 3: | |
| 1804 | + response = _context4.sent; | |
| 1805 | + _context4.next = 6; | |
| 1806 | + return response.json(); | |
| 1807 | + case 6: | |
| 1808 | + data = _context4.sent; | |
| 1809 | + if (!data.success) { | |
| 1810 | + _context4.next = 9; | |
| 1811 | + break; | |
| 1812 | + } | |
| 1813 | + return _context4.abrupt("return", data.data); | |
| 1814 | + case 9: | |
| 1815 | + _context4.next = 14; | |
| 1816 | + break; | |
| 1817 | + case 11: | |
| 1818 | + _context4.prev = 11; | |
| 1819 | + _context4.t0 = _context4["catch"](0); | |
| 1820 | + console.error(_context4.t0); // eslint-disable-line no-console | |
| 1821 | + case 14: | |
| 1822 | + case "end": | |
| 1823 | + return _context4.stop(); | |
| 1824 | + } | |
| 1825 | + }, _callee4, null, [[0, 11]]); | |
| 1826 | + })); | |
| 1827 | + return function markNoticeViewed(_x2) { | |
| 1828 | + return _ref4.apply(this, arguments); | |
| 1829 | + }; | |
| 1830 | +}(); | |
| 4135 | 1831 | |
| 4136 | 1832 | /***/ }), |
| 4137 | 1833 | |
| 4138 | -/***/ "../node_modules/is-plain-object/dist/is-plain-object.mjs": | |
| 1834 | +/***/ "../modules/element-manager/assets/js/app.js": | |
| 1835 | +/*!***************************************************!*\ | |
| 1836 | + !*** ../modules/element-manager/assets/js/app.js ***! | |
| 1837 | + \***************************************************/ | |
| 1838 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1839 | + | |
| 1840 | +"use strict"; | |
| 1841 | + | |
| 1842 | + | |
| 1843 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1844 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1845 | + value: true | |
| 1846 | +})); | |
| 1847 | +exports.App = void 0; | |
| 1848 | +var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 1849 | +var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 1850 | +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js")); | |
| 1851 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 1852 | +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 1853 | +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 1854 | +var _element = __webpack_require__(/*! @wordpress/element */ "../node_modules/@wordpress/element/build-module/index.js"); | |
| 1855 | +var _components = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); | |
| 1856 | +var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 1857 | +var _upgradeButton = __webpack_require__(/*! ./upgrade-button */ "../modules/element-manager/assets/js/upgrade-button.js"); | |
| 1858 | +var _api = __webpack_require__(/*! ./api */ "../modules/element-manager/assets/js/api.js"); | |
| 1859 | +var _rolePermissions = __webpack_require__(/*! ./role-permissions */ "../modules/element-manager/assets/js/role-permissions.js"); | |
| 1860 | +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; } | |
| 1861 | +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; } /* eslint-disable react/prop-types */ | |
| 1862 | +var App = exports.App = function App() { | |
| 1863 | + var _useState = (0, _element.useState)(true), | |
| 1864 | + _useState2 = (0, _slicedToArray2.default)(_useState, 2), | |
| 1865 | + isLoading = _useState2[0], | |
| 1866 | + setIsLoading = _useState2[1]; | |
| 1867 | + var _useState3 = (0, _element.useState)(''), | |
| 1868 | + _useState4 = (0, _slicedToArray2.default)(_useState3, 2), | |
| 1869 | + searchKeyword = _useState4[0], | |
| 1870 | + setSearchKeyword = _useState4[1]; | |
| 1871 | + var _useState5 = (0, _element.useState)([]), | |
| 1872 | + _useState6 = (0, _slicedToArray2.default)(_useState5, 2), | |
| 1873 | + widgets = _useState6[0], | |
| 1874 | + setWidgets = _useState6[1]; | |
| 1875 | + var _useState7 = (0, _element.useState)([]), | |
| 1876 | + _useState8 = (0, _slicedToArray2.default)(_useState7, 2), | |
| 1877 | + promotionWidgets = _useState8[0], | |
| 1878 | + setPromotionWidgets = _useState8[1]; | |
| 1879 | + var _useState9 = (0, _element.useState)([]), | |
| 1880 | + _useState10 = (0, _slicedToArray2.default)(_useState9, 2), | |
| 1881 | + plugins = _useState10[0], | |
| 1882 | + setPlugins = _useState10[1]; | |
| 1883 | + var _useState11 = (0, _element.useState)([]), | |
| 1884 | + _useState12 = (0, _slicedToArray2.default)(_useState11, 2), | |
| 1885 | + roles = _useState12[0], | |
| 1886 | + setRoles = _useState12[1]; | |
| 1887 | + var _useState13 = (0, _element.useState)({ | |
| 1888 | + isLoading: false, | |
| 1889 | + data: null | |
| 1890 | + }), | |
| 1891 | + _useState14 = (0, _slicedToArray2.default)(_useState13, 2), | |
| 1892 | + usageWidgets = _useState14[0], | |
| 1893 | + setUsageWidgets = _useState14[1]; | |
| 1894 | + var _useState15 = (0, _element.useState)([]), | |
| 1895 | + _useState16 = (0, _slicedToArray2.default)(_useState15, 2), | |
| 1896 | + widgetsDisabled = _useState16[0], | |
| 1897 | + setWidgetsDisabled = _useState16[1]; | |
| 1898 | + var _useState17 = (0, _element.useState)('widget'), | |
| 1899 | + _useState18 = (0, _slicedToArray2.default)(_useState17, 2), | |
| 1900 | + sortingColumn = _useState18[0], | |
| 1901 | + setSortingColumn = _useState18[1]; | |
| 1902 | + var _useState19 = (0, _element.useState)('asc'), | |
| 1903 | + _useState20 = (0, _slicedToArray2.default)(_useState19, 2), | |
| 1904 | + sortingDirection = _useState20[0], | |
| 1905 | + setSortingDirection = _useState20[1]; | |
| 1906 | + var _useState21 = (0, _element.useState)(''), | |
| 1907 | + _useState22 = (0, _slicedToArray2.default)(_useState21, 2), | |
| 1908 | + filterByPlugin = _useState22[0], | |
| 1909 | + setFilterByPlugin = _useState22[1]; | |
| 1910 | + var _useState23 = (0, _element.useState)('all'), | |
| 1911 | + _useState24 = (0, _slicedToArray2.default)(_useState23, 2), | |
| 1912 | + filterByStatus = _useState24[0], | |
| 1913 | + setFilterByStatus = _useState24[1]; | |
| 1914 | + var _useState25 = (0, _element.useState)({ | |
| 1915 | + isSaving: false, | |
| 1916 | + isUnsavedChanges: false | |
| 1917 | + }), | |
| 1918 | + _useState26 = (0, _slicedToArray2.default)(_useState25, 2), | |
| 1919 | + changeProgress = _useState26[0], | |
| 1920 | + setChangeProgress = _useState26[1]; | |
| 1921 | + var _useState27 = (0, _element.useState)(false), | |
| 1922 | + _useState28 = (0, _slicedToArray2.default)(_useState27, 2), | |
| 1923 | + isConfirmDialogOpen = _useState28[0], | |
| 1924 | + setIsConfirmDialogOpen = _useState28[1]; | |
| 1925 | + var _useState29 = (0, _element.useState)(false), | |
| 1926 | + _useState30 = (0, _slicedToArray2.default)(_useState29, 2), | |
| 1927 | + isSnackbarOpen = _useState30[0], | |
| 1928 | + setIsSnackbarOpen = _useState30[1]; | |
| 1929 | + var _useState31 = (0, _element.useState)(null), | |
| 1930 | + _useState32 = (0, _slicedToArray2.default)(_useState31, 2), | |
| 1931 | + noticeData = _useState32[0], | |
| 1932 | + setNoticeData = _useState32[1]; | |
| 1933 | + var _useState33 = (0, _element.useState)(null), | |
| 1934 | + _useState34 = (0, _slicedToArray2.default)(_useState33, 2), | |
| 1935 | + widgetsRoleRestrictions = _useState34[0], | |
| 1936 | + setWidgetsRoleRestrictions = _useState34[1]; | |
| 1937 | + var _useState35 = (0, _element.useState)([]), | |
| 1938 | + _useState36 = (0, _slicedToArray2.default)(_useState35, 2), | |
| 1939 | + promotionData = _useState36[0], | |
| 1940 | + setPromotionData = _useState36[1]; | |
| 1941 | + var managerPermissions = promotionData.manager_permissions, | |
| 1942 | + elementManager = promotionData.element_manager; | |
| 1943 | + var getWidgetUsage = function getWidgetUsage(widgetName) { | |
| 1944 | + if (!usageWidgets.data || !usageWidgets.data.hasOwnProperty(widgetName)) { | |
| 1945 | + return 0; | |
| 1946 | + } | |
| 1947 | + return usageWidgets.data[widgetName]; | |
| 1948 | + }; | |
| 1949 | + var sortedAndFilteredWidgets = (0, _element.useMemo)(function () { | |
| 1950 | + var filteredWidgets = widgets.filter(function (widget) { | |
| 1951 | + return widget.title.toLowerCase().includes(searchKeyword.toLowerCase()); | |
| 1952 | + }); | |
| 1953 | + if ('' !== filterByPlugin) { | |
| 1954 | + filteredWidgets = filteredWidgets.filter(function (widget) { | |
| 1955 | + return widget.plugin.toLowerCase() === filterByPlugin.toLowerCase(); | |
| 1956 | + }); | |
| 1957 | + } | |
| 1958 | + if ('all' !== filterByStatus) { | |
| 1959 | + filteredWidgets = filteredWidgets.filter(function (widget) { | |
| 1960 | + if ('active' === filterByStatus) { | |
| 1961 | + return !widgetsDisabled.includes(widget.name); | |
| 1962 | + } | |
| 1963 | + return widgetsDisabled.includes(widget.name); | |
| 1964 | + }); | |
| 1965 | + } | |
| 1966 | + filteredWidgets.sort(function (a, b) { | |
| 1967 | + var aValue; | |
| 1968 | + var bValue; | |
| 1969 | + if ('widget' === sortingColumn) { | |
| 1970 | + aValue = a.title; | |
| 1971 | + bValue = b.title; | |
| 1972 | + } | |
| 1973 | + if ('usage' === sortingColumn) { | |
| 1974 | + aValue = getWidgetUsage(a.name); | |
| 1975 | + bValue = getWidgetUsage(b.name); | |
| 1976 | + } | |
| 1977 | + if (aValue === bValue) { | |
| 1978 | + return 0; | |
| 1979 | + } | |
| 1980 | + if ('asc' === sortingDirection) { | |
| 1981 | + return aValue < bValue ? -1 : 1; | |
| 1982 | + } | |
| 1983 | + return aValue > bValue ? -1 : 1; | |
| 1984 | + }); | |
| 1985 | + return filteredWidgets; | |
| 1986 | + }, [widgets, searchKeyword, sortingColumn, sortingDirection, filterByPlugin, usageWidgets, filterByStatus, widgetsDisabled]); | |
| 1987 | + var getSortingIndicatorClasses = function getSortingIndicatorClasses(column) { | |
| 1988 | + if (sortingColumn !== column) { | |
| 1989 | + return ''; | |
| 1990 | + } | |
| 1991 | + if ('asc' === sortingDirection) { | |
| 1992 | + return 'sorted asc'; | |
| 1993 | + } | |
| 1994 | + return 'sorted desc'; | |
| 1995 | + }; | |
| 1996 | + var onSortingClicked = function onSortingClicked(column) { | |
| 1997 | + if (sortingColumn === column) { | |
| 1998 | + if ('asc' === sortingDirection) { | |
| 1999 | + setSortingDirection('desc'); | |
| 2000 | + } else { | |
| 2001 | + setSortingDirection('asc'); | |
| 2002 | + } | |
| 2003 | + } else { | |
| 2004 | + setSortingColumn(column); | |
| 2005 | + setSortingDirection('asc'); | |
| 2006 | + } | |
| 2007 | + }; | |
| 2008 | + var onSaveClicked = /*#__PURE__*/function () { | |
| 2009 | + var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 2010 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 2011 | + while (1) switch (_context.prev = _context.next) { | |
| 2012 | + case 0: | |
| 2013 | + setIsConfirmDialogOpen(false); | |
| 2014 | + setChangeProgress(_objectSpread(_objectSpread({}, changeProgress), {}, { | |
| 2015 | + isSaving: true | |
| 2016 | + })); | |
| 2017 | + _context.next = 4; | |
| 2018 | + return (0, _api.saveDisabledWidgets)(widgetsDisabled, widgetsRoleRestrictions); | |
| 2019 | + case 4: | |
| 2020 | + setChangeProgress(_objectSpread(_objectSpread({}, changeProgress), {}, { | |
| 2021 | + isSaving: false, | |
| 2022 | + isUnsavedChanges: false | |
| 2023 | + })); | |
| 2024 | + setIsSnackbarOpen(true); | |
| 2025 | + case 6: | |
| 2026 | + case "end": | |
| 2027 | + return _context.stop(); | |
| 2028 | + } | |
| 2029 | + }, _callee); | |
| 2030 | + })); | |
| 2031 | + return function onSaveClicked() { | |
| 2032 | + return _ref.apply(this, arguments); | |
| 2033 | + }; | |
| 2034 | + }(); | |
| 2035 | + var deactivateAllUnusedWidgets = function deactivateAllUnusedWidgets() { | |
| 2036 | + var widgetsToDeactivate = widgets.filter(function (widget) { | |
| 2037 | + return !usageWidgets.data.hasOwnProperty(widget.name) || widgetsDisabled.includes(widget.name); | |
| 2038 | + }); | |
| 2039 | + setWidgetsDisabled(widgetsToDeactivate.map(function (widget) { | |
| 2040 | + return widget.name; | |
| 2041 | + })); | |
| 2042 | + }; | |
| 2043 | + var enableAllWidgets = function enableAllWidgets() { | |
| 2044 | + setWidgetsDisabled([]); | |
| 2045 | + }; | |
| 2046 | + var onScanUsageElementsClicked = /*#__PURE__*/function () { | |
| 2047 | + var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { | |
| 2048 | + var data; | |
| 2049 | + return _regenerator.default.wrap(function _callee2$(_context2) { | |
| 2050 | + while (1) switch (_context2.prev = _context2.next) { | |
| 2051 | + case 0: | |
| 2052 | + setUsageWidgets(_objectSpread(_objectSpread({}, usageWidgets), {}, { | |
| 2053 | + isLoading: true | |
| 2054 | + })); | |
| 2055 | + _context2.next = 3; | |
| 2056 | + return (0, _api.getUsageWidgets)(); | |
| 2057 | + case 3: | |
| 2058 | + data = _context2.sent; | |
| 2059 | + setUsageWidgets({ | |
| 2060 | + data: data, | |
| 2061 | + isLoading: false | |
| 2062 | + }); | |
| 2063 | + setSortingColumn('usage'); | |
| 2064 | + setSortingDirection('desc'); | |
| 2065 | + case 7: | |
| 2066 | + case "end": | |
| 2067 | + return _context2.stop(); | |
| 2068 | + } | |
| 2069 | + }, _callee2); | |
| 2070 | + })); | |
| 2071 | + return function onScanUsageElementsClicked() { | |
| 2072 | + return _ref2.apply(this, arguments); | |
| 2073 | + }; | |
| 2074 | + }(); | |
| 2075 | + var UsageTimesColumn = function UsageTimesColumn(_ref3) { | |
| 2076 | + var widgetName = _ref3.widgetName; | |
| 2077 | + if (null !== usageWidgets.data) { | |
| 2078 | + return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, getWidgetUsage(widgetName), " ", (0, _i18n.__)('times', 'elementor')); | |
| 2079 | + } | |
| 2080 | + if (usageWidgets.isLoading) { | |
| 2081 | + return /*#__PURE__*/_react.default.createElement(_components.Spinner, null); | |
| 2082 | + } | |
| 2083 | + return /*#__PURE__*/_react.default.createElement(_components.Button, { | |
| 2084 | + onClick: onScanUsageElementsClicked, | |
| 2085 | + size: 'small', | |
| 2086 | + variant: 'secondary' | |
| 2087 | + }, (0, _i18n.__)('Show', 'elementor')); | |
| 2088 | + }; | |
| 2089 | + (0, _element.useEffect)(function () { | |
| 2090 | + var onLoading = /*#__PURE__*/function () { | |
| 2091 | + var _ref4 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { | |
| 2092 | + var _appData$additional_d, _appData$additional_d2; | |
| 2093 | + var appData, pluginsData; | |
| 2094 | + return _regenerator.default.wrap(function _callee3$(_context3) { | |
| 2095 | + while (1) switch (_context3.prev = _context3.next) { | |
| 2096 | + case 0: | |
| 2097 | + _context3.next = 2; | |
| 2098 | + return (0, _api.getAdminAppData)(); | |
| 2099 | + case 2: | |
| 2100 | + appData = _context3.sent; | |
| 2101 | + setNoticeData(appData.notice_data); | |
| 2102 | + setWidgetsDisabled(appData.disabled_elements); | |
| 2103 | + setWidgets(appData.widgets); | |
| 2104 | + setPromotionWidgets(appData.promotion_widgets); | |
| 2105 | + setPromotionData(appData.promotion_data); | |
| 2106 | + if ((_appData$additional_d = appData.additional_data) !== null && _appData$additional_d !== void 0 && _appData$additional_d.roles) { | |
| 2107 | + setRoles(appData.additional_data.roles); | |
| 2108 | + } | |
| 2109 | + if ((_appData$additional_d2 = appData.additional_data) !== null && _appData$additional_d2 !== void 0 && _appData$additional_d2.role_restrictions) { | |
| 2110 | + setWidgetsRoleRestrictions(appData.additional_data.role_restrictions); | |
| 2111 | + } | |
| 2112 | + pluginsData = appData.plugins.map(function (plugin) { | |
| 2113 | + return { | |
| 2114 | + label: plugin, | |
| 2115 | + value: plugin | |
| 2116 | + }; | |
| 2117 | + }); | |
| 2118 | + pluginsData.unshift({ | |
| 2119 | + label: (0, _i18n.__)('All Plugins', 'elementor'), | |
| 2120 | + value: '' | |
| 2121 | + }); | |
| 2122 | + setPlugins(pluginsData); | |
| 2123 | + setIsLoading(false); | |
| 2124 | + case 14: | |
| 2125 | + case "end": | |
| 2126 | + return _context3.stop(); | |
| 2127 | + } | |
| 2128 | + }, _callee3); | |
| 2129 | + })); | |
| 2130 | + return function onLoading() { | |
| 2131 | + return _ref4.apply(this, arguments); | |
| 2132 | + }; | |
| 2133 | + }(); | |
| 2134 | + onLoading(); | |
| 2135 | + }, []); | |
| 2136 | + (0, _element.useEffect)(function () { | |
| 2137 | + if (isLoading) { | |
| 2138 | + return; | |
| 2139 | + } | |
| 2140 | + setChangeProgress(_objectSpread(_objectSpread({}, changeProgress), {}, { | |
| 2141 | + isUnsavedChanges: true | |
| 2142 | + })); | |
| 2143 | + }, [widgetsDisabled, widgetsRoleRestrictions]); | |
| 2144 | + (0, _element.useEffect)(function () { | |
| 2145 | + var handleBeforeUnload = function handleBeforeUnload(event) { | |
| 2146 | + event.preventDefault(); | |
| 2147 | + event.returnValue = ''; | |
| 2148 | + }; | |
| 2149 | + if (changeProgress.isUnsavedChanges) { | |
| 2150 | + window.addEventListener('beforeunload', handleBeforeUnload); | |
| 2151 | + } else { | |
| 2152 | + window.removeEventListener('beforeunload', handleBeforeUnload); | |
| 2153 | + } | |
| 2154 | + return function () { | |
| 2155 | + window.removeEventListener('beforeunload', handleBeforeUnload); | |
| 2156 | + }; | |
| 2157 | + }, [changeProgress.isUnsavedChanges]); | |
| 2158 | + if (isLoading) { | |
| 2159 | + return /*#__PURE__*/_react.default.createElement(_components.Flex, { | |
| 2160 | + justify: 'center', | |
| 2161 | + style: { | |
| 2162 | + margin: '100px' | |
| 2163 | + } | |
| 2164 | + }, /*#__PURE__*/_react.default.createElement(_components.Spinner, { | |
| 2165 | + style: { | |
| 2166 | + height: 'calc(4px * 20)', | |
| 2167 | + width: 'calc(4px * 20)' | |
| 2168 | + } | |
| 2169 | + })); | |
| 2170 | + } | |
| 2171 | + return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("p", { | |
| 2172 | + style: { | |
| 2173 | + marginBottom: '20px', | |
| 2174 | + maxWidth: '800px' | |
| 2175 | + } | |
| 2176 | + }, (0, _i18n.__)('Here\'s where you can fine-tune Elementor to your workflow. Disable elements you don\'t use for a cleaner interface, more focused creative experience, and improved performance.', 'elementor'), ' ', /*#__PURE__*/_react.default.createElement("a", { | |
| 2177 | + href: "https://go.elementor.com/wp-dash-element-manager/", | |
| 2178 | + rel: 'noreferrer', | |
| 2179 | + target: '_blank' | |
| 2180 | + }, (0, _i18n.__)('Learn More', 'elementor'))), !noticeData.is_viewed && /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_components.Notice, { | |
| 2181 | + onRemove: function onRemove() { | |
| 2182 | + (0, _api.markNoticeViewed)(noticeData.notice_id); | |
| 2183 | + setNoticeData(_objectSpread(_objectSpread({}, noticeData), {}, { | |
| 2184 | + is_viewed: true | |
| 2185 | + })); | |
| 2186 | + }, | |
| 2187 | + status: "warning" | |
| 2188 | + }, /*#__PURE__*/_react.default.createElement("strong", null, (0, _i18n.__)('Before you continue:', 'elementor')), " ", (0, _i18n.__)('Deactivating widgets here will remove them from both the Elementor Editor and your website, which can cause changes to your overall layout, design and what visitors see.', 'elementor'))), /*#__PURE__*/_react.default.createElement(_components.Panel, null, /*#__PURE__*/_react.default.createElement(_components.PanelBody, null, /*#__PURE__*/_react.default.createElement(_components.Flex, { | |
| 2189 | + style: { | |
| 2190 | + position: 'sticky', | |
| 2191 | + top: '32px', | |
| 2192 | + background: 'rgb(255, 255, 255)', | |
| 2193 | + zIndex: 10, | |
| 2194 | + padding: '20px 16px', | |
| 2195 | + boxShadow: 'rgba(0, 0, 0, 0.15) 0 5px 10px 0', | |
| 2196 | + margin: '-16px -16px 24px' | |
| 2197 | + } | |
| 2198 | + }, /*#__PURE__*/_react.default.createElement(_components.FlexItem, null, /*#__PURE__*/_react.default.createElement(_components.Flex, { | |
| 2199 | + align: 'center' | |
| 2200 | + }, /*#__PURE__*/_react.default.createElement(_components.SearchControl, { | |
| 2201 | + label: (0, _i18n.__)('Search widgets', 'elementor'), | |
| 2202 | + value: searchKeyword, | |
| 2203 | + size: 'compact', | |
| 2204 | + style: { | |
| 2205 | + height: '40px', | |
| 2206 | + border: '1px solid rgba(30, 30, 30, 0.5)', | |
| 2207 | + background: 'transparent' | |
| 2208 | + }, | |
| 2209 | + __nextHasNoMarginBottom: true, | |
| 2210 | + onChange: setSearchKeyword | |
| 2211 | + }), /*#__PURE__*/_react.default.createElement(_components.FlexItem, { | |
| 2212 | + style: { | |
| 2213 | + maxWidth: '130px' | |
| 2214 | + } | |
| 2215 | + }, /*#__PURE__*/_react.default.createElement(_components.SelectControl, { | |
| 2216 | + onChange: setFilterByPlugin, | |
| 2217 | + size: '__unstable-large', | |
| 2218 | + __nextHasNoMarginBottom: true, | |
| 2219 | + options: plugins | |
| 2220 | + })), /*#__PURE__*/_react.default.createElement(_components.FlexItem, { | |
| 2221 | + style: { | |
| 2222 | + maxWidth: '130px' | |
| 2223 | + } | |
| 2224 | + }, /*#__PURE__*/_react.default.createElement(_components.SelectControl, { | |
| 2225 | + onChange: setFilterByStatus, | |
| 2226 | + size: '__unstable-large', | |
| 2227 | + __nextHasNoMarginBottom: true, | |
| 2228 | + options: [{ | |
| 2229 | + label: (0, _i18n.__)('All Statuses', 'elementor'), | |
| 2230 | + value: 'all' | |
| 2231 | + }, { | |
| 2232 | + label: (0, _i18n.__)('Active', 'elementor'), | |
| 2233 | + value: 'active' | |
| 2234 | + }, { | |
| 2235 | + label: (0, _i18n.__)('Inactive', 'elementor'), | |
| 2236 | + value: 'inactive' | |
| 2237 | + }] | |
| 2238 | + })), /*#__PURE__*/_react.default.createElement("hr", { | |
| 2239 | + style: { | |
| 2240 | + height: '30px', | |
| 2241 | + margin: '0 5px', | |
| 2242 | + borderWidth: '0 1px 0 0', | |
| 2243 | + borderStyle: 'solid', | |
| 2244 | + borderColor: 'rgba(30, 30, 30, 0.5)' | |
| 2245 | + } | |
| 2246 | + }), /*#__PURE__*/_react.default.createElement(_components.ButtonGroup, null, /*#__PURE__*/_react.default.createElement(_components.Button, { | |
| 2247 | + variant: 'secondary', | |
| 2248 | + style: { | |
| 2249 | + marginInlineEnd: '10px' | |
| 2250 | + }, | |
| 2251 | + disabled: usageWidgets.isLoading, | |
| 2252 | + isBusy: usageWidgets.isLoading, | |
| 2253 | + onClick: onScanUsageElementsClicked | |
| 2254 | + }, (0, _i18n.__)('Scan Element Usage', 'elementor')), /*#__PURE__*/_react.default.createElement(_components.Button, { | |
| 2255 | + variant: 'secondary', | |
| 2256 | + style: { | |
| 2257 | + marginInlineEnd: '10px' | |
| 2258 | + }, | |
| 2259 | + onClick: deactivateAllUnusedWidgets, | |
| 2260 | + disabled: null === usageWidgets.data | |
| 2261 | + }, (0, _i18n.__)('Deactivate Unused Elements', 'elementor')), /*#__PURE__*/_react.default.createElement(_components.Button, { | |
| 2262 | + variant: 'secondary', | |
| 2263 | + disabled: !widgetsDisabled.length, | |
| 2264 | + style: { | |
| 2265 | + marginInlineEnd: '10px' | |
| 2266 | + }, | |
| 2267 | + onClick: enableAllWidgets | |
| 2268 | + }, (0, _i18n.__)('Enable All', 'elementor'))))), /*#__PURE__*/_react.default.createElement(_components.FlexItem, null, /*#__PURE__*/_react.default.createElement(_components.Button, { | |
| 2269 | + variant: "primary", | |
| 2270 | + disabled: changeProgress.isSaving || !changeProgress.isUnsavedChanges, | |
| 2271 | + isBusy: changeProgress.isSaving, | |
| 2272 | + onClick: function onClick() { | |
| 2273 | + setIsConfirmDialogOpen(true); | |
| 2274 | + } | |
| 2275 | + }, (0, _i18n.__)('Save Changes', 'elementor')))), /*#__PURE__*/_react.default.createElement(_components.PanelRow, null, !sortedAndFilteredWidgets.length ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (0, _i18n.__)('No elements found.', 'elementor')) : /*#__PURE__*/_react.default.createElement("table", { | |
| 2276 | + className: 'wp-list-table widefat fixed striped table-view-list' | |
| 2277 | + }, /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", { | |
| 2278 | + className: "manage-column sortable ".concat(getSortingIndicatorClasses('widget')) | |
| 2279 | + }, /*#__PURE__*/_react.default.createElement(_components.Button, { | |
| 2280 | + href: '#', | |
| 2281 | + onClick: function onClick(event) { | |
| 2282 | + event.preventDefault(); | |
| 2283 | + onSortingClicked('widget'); | |
| 2284 | + } | |
| 2285 | + }, /*#__PURE__*/_react.default.createElement("span", null, (0, _i18n.__)('Element', 'elementor')), /*#__PURE__*/_react.default.createElement("span", { | |
| 2286 | + className: "sorting-indicators" | |
| 2287 | + }, /*#__PURE__*/_react.default.createElement("span", { | |
| 2288 | + className: "sorting-indicator asc", | |
| 2289 | + "aria-hidden": "true" | |
| 2290 | + }), /*#__PURE__*/_react.default.createElement("span", { | |
| 2291 | + className: "sorting-indicator desc", | |
| 2292 | + "aria-hidden": "true" | |
| 2293 | + })))), /*#__PURE__*/_react.default.createElement("th", null, (0, _i18n.__)('Status', 'elementor')), /*#__PURE__*/_react.default.createElement("th", { | |
| 2294 | + className: "manage-column sortable ".concat(getSortingIndicatorClasses('usage')) | |
| 2295 | + }, /*#__PURE__*/_react.default.createElement(_components.Button, { | |
| 2296 | + href: '#', | |
| 2297 | + onClick: function onClick(event) { | |
| 2298 | + event.preventDefault(); | |
| 2299 | + onSortingClicked('usage'); | |
| 2300 | + } | |
| 2301 | + }, /*#__PURE__*/_react.default.createElement("span", null, (0, _i18n.__)('Usage', 'elementor')), /*#__PURE__*/_react.default.createElement("span", { | |
| 2302 | + className: "sorting-indicators" | |
| 2303 | + }, /*#__PURE__*/_react.default.createElement("span", { | |
| 2304 | + className: "sorting-indicator asc", | |
| 2305 | + "aria-hidden": "true" | |
| 2306 | + }), /*#__PURE__*/_react.default.createElement("span", { | |
| 2307 | + className: "sorting-indicator desc", | |
| 2308 | + "aria-hidden": "true" | |
| 2309 | + })))), /*#__PURE__*/_react.default.createElement("th", null, (0, _i18n.__)('Plugin', 'elementor')), /*#__PURE__*/_react.default.createElement("th", null, /*#__PURE__*/_react.default.createElement(_components.Flex, { | |
| 2310 | + justify: 'flex-start', | |
| 2311 | + gap: 0 | |
| 2312 | + }, /*#__PURE__*/_react.default.createElement(_components.FlexItem, null, (0, _i18n.__)('Permission', 'elementor')), /*#__PURE__*/_react.default.createElement(_components.FlexItem, null, /*#__PURE__*/_react.default.createElement(_components.Tooltip, { | |
| 2313 | + placement: 'top', | |
| 2314 | + delay: 100, | |
| 2315 | + text: (0, _i18n.__)('Choose which users will have access to each widget.', 'elementor') | |
| 2316 | + }, /*#__PURE__*/_react.default.createElement(_components.Button, { | |
| 2317 | + icon: 'info-outline', | |
| 2318 | + iconSize: 16 | |
| 2319 | + }))), null === widgetsRoleRestrictions && /*#__PURE__*/_react.default.createElement(_components.FlexItem, { | |
| 2320 | + style: { | |
| 2321 | + marginInlineStart: '10px' | |
| 2322 | + } | |
| 2323 | + }, /*#__PURE__*/_react.default.createElement(_upgradeButton.UpgradeButton, { | |
| 2324 | + href: promotionWidgets.length ? managerPermissions.pro.url : managerPermissions.advanced.url, | |
| 2325 | + size: 'small', | |
| 2326 | + text: promotionWidgets.length ? managerPermissions.pro.text : managerPermissions.advanced.text | |
| 2327 | + })))))), /*#__PURE__*/_react.default.createElement("tbody", null, sortedAndFilteredWidgets.map(function (widget) { | |
| 2328 | + return /*#__PURE__*/_react.default.createElement("tr", { | |
| 2329 | + key: widget.name, | |
| 2330 | + "data-key-id": widget.name | |
| 2331 | + }, /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("i", { | |
| 2332 | + style: { | |
| 2333 | + marginInlineEnd: '5px', | |
| 2334 | + marginInlineStart: '0', | |
| 2335 | + display: 'inline-block' | |
| 2336 | + }, | |
| 2337 | + className: "".concat(widget.icon) | |
| 2338 | + }), " ", widget.title), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement(_components.ToggleControl, { | |
| 2339 | + checked: !widgetsDisabled.includes(widget.name), | |
| 2340 | + __nextHasNoMarginBottom: true, | |
| 2341 | + onChange: function onChange() { | |
| 2342 | + if (widgetsDisabled.includes(widget.name)) { | |
| 2343 | + setWidgetsDisabled(widgetsDisabled.filter(function (item) { | |
| 2344 | + return item !== widget.name; | |
| 2345 | + })); | |
| 2346 | + } else { | |
| 2347 | + setWidgetsDisabled([].concat((0, _toConsumableArray2.default)(widgetsDisabled), [widget.name])); | |
| 2348 | + } | |
| 2349 | + } | |
| 2350 | + })), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement(UsageTimesColumn, { | |
| 2351 | + widgetName: widget.name | |
| 2352 | + })), /*#__PURE__*/_react.default.createElement("td", null, widget.plugin), /*#__PURE__*/_react.default.createElement("td", null, null !== widgetsRoleRestrictions && !widgetsDisabled.includes(widget.name) ? /*#__PURE__*/_react.default.createElement(_rolePermissions.RolePermissions, { | |
| 2353 | + widgetName: widget.name, | |
| 2354 | + roles: roles, | |
| 2355 | + widgetsRoleRestrictions: widgetsRoleRestrictions, | |
| 2356 | + setWidgetsRoleRestrictions: setWidgetsRoleRestrictions | |
| 2357 | + }) : /*#__PURE__*/_react.default.createElement(_rolePermissions.EditButtonDisabled, null))); | |
| 2358 | + })))), promotionWidgets.length > 0 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_components.PanelRow, null, /*#__PURE__*/_react.default.createElement(_components.Flex, { | |
| 2359 | + style: { | |
| 2360 | + marginTop: '40px', | |
| 2361 | + marginBottom: '20px' | |
| 2362 | + } | |
| 2363 | + }, /*#__PURE__*/_react.default.createElement(_components.FlexItem, null, /*#__PURE__*/_react.default.createElement("h3", null, (0, _i18n.__)('Elementor Pro Elements', 'elementor')), /*#__PURE__*/_react.default.createElement("p", null, (0, _i18n.__)('Unleash the full power of Elementor\'s features and web creation tools.', 'elementor'))), /*#__PURE__*/_react.default.createElement(_components.FlexItem, null, /*#__PURE__*/_react.default.createElement(_upgradeButton.UpgradeButton, { | |
| 2364 | + href: elementManager.url, | |
| 2365 | + text: elementManager.text | |
| 2366 | + })))), /*#__PURE__*/_react.default.createElement(_components.PanelRow, null, /*#__PURE__*/_react.default.createElement("table", { | |
| 2367 | + className: 'wp-list-table widefat fixed striped table-view-list' | |
| 2368 | + }, /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", { | |
| 2369 | + className: "manage-column" | |
| 2370 | + }, /*#__PURE__*/_react.default.createElement("span", null, (0, _i18n.__)('Element', 'elementor'))), /*#__PURE__*/_react.default.createElement("th", null, (0, _i18n.__)('Status', 'elementor')), /*#__PURE__*/_react.default.createElement("th", null, (0, _i18n.__)('Usage', 'elementor')), /*#__PURE__*/_react.default.createElement("th", null, (0, _i18n.__)('Plugin', 'elementor')), /*#__PURE__*/_react.default.createElement("th", null, /*#__PURE__*/_react.default.createElement(_components.Flex, { | |
| 2371 | + justify: 'flex-start' | |
| 2372 | + }, /*#__PURE__*/_react.default.createElement(_components.FlexItem, null, (0, _i18n.__)('Permission', 'elementor')), /*#__PURE__*/_react.default.createElement(_components.FlexItem, null, /*#__PURE__*/_react.default.createElement(_components.Tooltip, { | |
| 2373 | + placement: 'top', | |
| 2374 | + delay: 100, | |
| 2375 | + text: (0, _i18n.__)('Choose which role will have access to a specific widget.', 'elementor') | |
| 2376 | + }, /*#__PURE__*/_react.default.createElement(_components.Button, { | |
| 2377 | + icon: 'info-outline' | |
| 2378 | + }))))))), /*#__PURE__*/_react.default.createElement("tbody", null, promotionWidgets.map(function (widget) { | |
| 2379 | + return /*#__PURE__*/_react.default.createElement("tr", { | |
| 2380 | + key: widget.name | |
| 2381 | + }, /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("i", { | |
| 2382 | + style: { | |
| 2383 | + marginInlineEnd: '5px' | |
| 2384 | + }, | |
| 2385 | + className: "".concat(widget.icon) | |
| 2386 | + }), " ", widget.title), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement(_components.ToggleControl, { | |
| 2387 | + __nextHasNoMarginBottom: true, | |
| 2388 | + checked: false, | |
| 2389 | + disabled: true | |
| 2390 | + })), /*#__PURE__*/_react.default.createElement("td", null), /*#__PURE__*/_react.default.createElement("td", null, (0, _i18n.__)('Elementor Pro', 'elementor')), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement(_rolePermissions.EditButtonDisabled, null))); | |
| 2391 | + }))))))), isConfirmDialogOpen && /*#__PURE__*/_react.default.createElement(_components.Modal, { | |
| 2392 | + title: (0, _i18n.__)('Sure you want to save these changes?', 'elementor'), | |
| 2393 | + size: 'small', | |
| 2394 | + isDismissible: false, | |
| 2395 | + onRequestClose: function onRequestClose() { | |
| 2396 | + setIsConfirmDialogOpen(false); | |
| 2397 | + } | |
| 2398 | + }, /*#__PURE__*/_react.default.createElement("p", { | |
| 2399 | + style: { | |
| 2400 | + maxWidth: '400px', | |
| 2401 | + marginBlockEnd: '30px', | |
| 2402 | + marginBlockStart: '0' | |
| 2403 | + } | |
| 2404 | + }, (0, _i18n.__)('Turning widgets off will hide them from the editor panel, and can potentially affect your layout or front-end.', 'elementor'), /*#__PURE__*/_react.default.createElement("span", { | |
| 2405 | + style: { | |
| 2406 | + display: 'block', | |
| 2407 | + marginTop: '20px' | |
| 2408 | + } | |
| 2409 | + }, (0, _i18n.__)('If you’re adding widgets back in, enjoy them!', 'elementor'))), /*#__PURE__*/_react.default.createElement(_components.ButtonGroup, { | |
| 2410 | + style: { | |
| 2411 | + display: 'flex', | |
| 2412 | + justifyContent: 'flex-end', | |
| 2413 | + gap: '30px' | |
| 2414 | + } | |
| 2415 | + }, /*#__PURE__*/_react.default.createElement(_components.Button, { | |
| 2416 | + variant: 'link', | |
| 2417 | + onClick: function onClick() { | |
| 2418 | + setIsConfirmDialogOpen(false); | |
| 2419 | + } | |
| 2420 | + }, (0, _i18n.__)('Cancel', 'elementor')), /*#__PURE__*/_react.default.createElement(_components.Button, { | |
| 2421 | + variant: 'primary', | |
| 2422 | + onClick: onSaveClicked | |
| 2423 | + }, (0, _i18n.__)('Save', 'elementor')))), /*#__PURE__*/_react.default.createElement("div", { | |
| 2424 | + style: { | |
| 2425 | + position: 'fixed', | |
| 2426 | + bottom: '40px', | |
| 2427 | + left: '50%', | |
| 2428 | + transform: 'translateX(-50%)', | |
| 2429 | + display: isSnackbarOpen ? 'block' : 'none' | |
| 2430 | + } | |
| 2431 | + }, /*#__PURE__*/_react.default.createElement(_components.Snackbar, { | |
| 2432 | + isDismissible: true, | |
| 2433 | + status: 'success', | |
| 2434 | + onRemove: function onRemove() { | |
| 2435 | + return setIsSnackbarOpen(false); | |
| 2436 | + } | |
| 2437 | + }, (0, _i18n.__)('We saved your changes.', 'elementor')))); | |
| 2438 | +}; | |
| 2439 | + | |
| 2440 | +/***/ }), | |
| 2441 | + | |
| 2442 | +/***/ "../modules/element-manager/assets/js/role-permissions.js": | |
| 4139 | 2443 | /*!****************************************************************!*\ |
| 4140 | - !*** ../node_modules/is-plain-object/dist/is-plain-object.mjs ***! | |
| 2444 | + !*** ../modules/element-manager/assets/js/role-permissions.js ***! | |
| 4141 | 2445 | \****************************************************************/ |
| 4142 | -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 2446 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 4143 | 2447 | |
| 4144 | 2448 | "use strict"; |
| 4145 | -__webpack_require__.r(__webpack_exports__); | |
| 4146 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 4147 | -/* harmony export */ isPlainObject: () => (/* binding */ isPlainObject) | |
| 4148 | -/* harmony export */ }); | |
| 4149 | -/*! | |
| 4150 | - * is-plain-object <https://github.com/jonschlinkert/is-plain-object> | |
| 4151 | - * | |
| 4152 | - * Copyright (c) 2014-2017, Jon Schlinkert. | |
| 4153 | - * Released under the MIT License. | |
| 4154 | - */ | |
| 4155 | 2449 | |
| 4156 | -function isObject(o) { | |
| 4157 | - return Object.prototype.toString.call(o) === '[object Object]'; | |
| 4158 | -} | |
| 4159 | 2450 | |
| 4160 | -function isPlainObject(o) { | |
| 4161 | - var ctor,prot; | |
| 2451 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2452 | +Object.defineProperty(exports, "__esModule", ({ | |
| 2453 | + value: true | |
| 2454 | +})); | |
| 2455 | +exports.RolePermissions = exports.EditButtonDisabled = void 0; | |
| 2456 | +var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 2457 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 2458 | +var _components = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); | |
| 2459 | +var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 2460 | +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; } | |
| 2461 | +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; } /* eslint-disable react/prop-types */ | |
| 2462 | +var toggleRoleRestrictions = function toggleRoleRestrictions(widgetName, roleId, widgetsRoleRestrictions, setWidgetsRoleRestrictions) { | |
| 2463 | + var widgetRoleRestrictions = widgetsRoleRestrictions[widgetName] || []; | |
| 2464 | + if (widgetRoleRestrictions.includes(roleId)) { | |
| 2465 | + widgetRoleRestrictions.splice(widgetRoleRestrictions.indexOf(roleId), 1); | |
| 2466 | + } else { | |
| 2467 | + widgetRoleRestrictions.push(roleId); | |
| 2468 | + } | |
| 4162 | 2469 | |
| 4163 | - if (isObject(o) === false) return false; | |
| 2470 | + // TODO: Remove the object from the state if it's empty | |
| 2471 | + setWidgetsRoleRestrictions(_objectSpread(_objectSpread({}, widgetsRoleRestrictions), {}, (0, _defineProperty2.default)({}, widgetName, widgetRoleRestrictions))); | |
| 2472 | +}; | |
| 2473 | +var RolesList = function RolesList(props) { | |
| 2474 | + var roles = props.roles, | |
| 2475 | + widgetRoleRestrictions = props.widgetRoleRestrictions; | |
| 2476 | + var rolesEnables = roles.filter(function (role) { | |
| 2477 | + return !widgetRoleRestrictions.includes(role.id); | |
| 2478 | + }); | |
| 2479 | + if (!rolesEnables.length) { | |
| 2480 | + return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "(", (0, _i18n.__)('Admin', 'elementor'), ")"); | |
| 2481 | + } | |
| 2482 | + if (rolesEnables.length === roles.length) { | |
| 2483 | + return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "(", (0, _i18n.__)('All Roles', 'elementor'), ")"); | |
| 2484 | + } | |
| 2485 | + return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "(", rolesEnables.map(function (role) { | |
| 2486 | + return role.name; | |
| 2487 | + }).join(', '), ")"); | |
| 2488 | +}; | |
| 2489 | +var RolePermissions = exports.RolePermissions = function RolePermissions(props) { | |
| 2490 | + var roles = props.roles, | |
| 2491 | + widgetName = props.widgetName, | |
| 2492 | + widgetsRoleRestrictions = props.widgetsRoleRestrictions, | |
| 2493 | + setWidgetsRoleRestrictions = props.setWidgetsRoleRestrictions; | |
| 2494 | + var widgetRoleRestrictions = widgetsRoleRestrictions[widgetName] || []; | |
| 2495 | + return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_components.Dropdown, { | |
| 2496 | + className: 'my-container-class-name', | |
| 2497 | + contentClassName: 'my-dropdown-content-classname', | |
| 2498 | + popoverProps: { | |
| 2499 | + placement: 'bottom-start' | |
| 2500 | + }, | |
| 2501 | + renderToggle: function renderToggle(_ref) { | |
| 2502 | + var isOpen = _ref.isOpen, | |
| 2503 | + onToggle = _ref.onToggle; | |
| 2504 | + return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_components.Button, { | |
| 2505 | + variant: 'link', | |
| 2506 | + onClick: onToggle, | |
| 2507 | + "aria-expanded": isOpen, | |
| 2508 | + style: { | |
| 2509 | + textDecoration: 'none' | |
| 2510 | + } | |
| 2511 | + }, (0, _i18n.__)('Edit', 'elementor')), ' ', /*#__PURE__*/_react.default.createElement("span", { | |
| 2512 | + style: { | |
| 2513 | + color: 'var(--e-a-color-txt-muted)' | |
| 2514 | + } | |
| 2515 | + }, /*#__PURE__*/_react.default.createElement(RolesList, { | |
| 2516 | + roles: roles, | |
| 2517 | + widgetRoleRestrictions: widgetRoleRestrictions | |
| 2518 | + }))); | |
| 2519 | + }, | |
| 2520 | + renderContent: function renderContent() { | |
| 2521 | + var isAllChecked = roles.every(function (role) { | |
| 2522 | + return !widgetRoleRestrictions.includes(role.id); | |
| 2523 | + }); | |
| 2524 | + var isIndeterminate = !isAllChecked && roles.some(function (role) { | |
| 2525 | + return !widgetRoleRestrictions.includes(role.id); | |
| 2526 | + }); | |
| 2527 | + return /*#__PURE__*/_react.default.createElement("div", { | |
| 2528 | + style: { | |
| 2529 | + minWidth: '150px', | |
| 2530 | + paddingInline: '10px', | |
| 2531 | + paddingBlockStart: '10px' | |
| 2532 | + } | |
| 2533 | + }, /*#__PURE__*/_react.default.createElement(_components.CheckboxControl, { | |
| 2534 | + checked: isAllChecked, | |
| 2535 | + indeterminate: isIndeterminate, | |
| 2536 | + label: 'All', | |
| 2537 | + onChange: function onChange(value) { | |
| 2538 | + if (value) { | |
| 2539 | + setWidgetsRoleRestrictions(_objectSpread(_objectSpread({}, widgetsRoleRestrictions), {}, (0, _defineProperty2.default)({}, widgetName, []))); | |
| 2540 | + } else { | |
| 2541 | + setWidgetsRoleRestrictions(_objectSpread(_objectSpread({}, widgetsRoleRestrictions), {}, (0, _defineProperty2.default)({}, widgetName, roles.map(function (role) { | |
| 2542 | + return role.id; | |
| 2543 | + })))); | |
| 2544 | + } | |
| 2545 | + } | |
| 2546 | + }), roles.map(function (role) { | |
| 2547 | + return /*#__PURE__*/_react.default.createElement("div", { | |
| 2548 | + key: role.id | |
| 2549 | + }, /*#__PURE__*/_react.default.createElement(_components.CheckboxControl, { | |
| 2550 | + checked: !widgetRoleRestrictions.includes(role.id), | |
| 2551 | + label: role.name, | |
| 2552 | + onChange: function onChange() { | |
| 2553 | + toggleRoleRestrictions(widgetName, role.id, widgetsRoleRestrictions, setWidgetsRoleRestrictions); | |
| 2554 | + } | |
| 2555 | + })); | |
| 2556 | + })); | |
| 2557 | + } | |
| 2558 | + })); | |
| 2559 | +}; | |
| 2560 | +var EditButtonDisabled = exports.EditButtonDisabled = function EditButtonDisabled() { | |
| 2561 | + return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_components.Button, { | |
| 2562 | + variant: "link", | |
| 2563 | + disabled: true, | |
| 2564 | + style: { | |
| 2565 | + textDecoration: 'none' | |
| 2566 | + } | |
| 2567 | + }, (0, _i18n.__)('Edit', 'elementor'))); | |
| 2568 | +}; | |
| 4164 | 2569 | |
| 4165 | - // If has modified constructor | |
| 4166 | - ctor = o.constructor; | |
| 4167 | - if (ctor === undefined) return true; | |
| 2570 | +/***/ }), | |
| 4168 | 2571 | |
| 4169 | - // If has modified prototype | |
| 4170 | - prot = ctor.prototype; | |
| 4171 | - if (isObject(prot) === false) return false; | |
| 2572 | +/***/ "../modules/element-manager/assets/js/upgrade-button.js": | |
| 2573 | +/*!**************************************************************!*\ | |
| 2574 | + !*** ../modules/element-manager/assets/js/upgrade-button.js ***! | |
| 2575 | + \**************************************************************/ | |
| 2576 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 4172 | 2577 | |
| 4173 | - // If constructor does not have an Object-specific method | |
| 4174 | - if (prot.hasOwnProperty('isPrototypeOf') === false) { | |
| 4175 | - return false; | |
| 4176 | - } | |
| 2578 | +"use strict"; | |
| 4177 | 2579 | |
| 4178 | - // Most likely a plain Object | |
| 4179 | - return true; | |
| 4180 | -} | |
| 4181 | 2580 | |
| 2581 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2582 | +Object.defineProperty(exports, "__esModule", ({ | |
| 2583 | + value: true | |
| 2584 | +})); | |
| 2585 | +exports.UpgradeButton = void 0; | |
| 2586 | +var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 2587 | +var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js")); | |
| 2588 | +var _components = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); | |
| 2589 | +var UpgradeButton = exports.UpgradeButton = function UpgradeButton(props) { | |
| 2590 | + return /*#__PURE__*/_react.default.createElement(_components.Button, (0, _extends2.default)({}, props, { | |
| 2591 | + variant: "primary", | |
| 2592 | + target: "_blank", | |
| 2593 | + rel: 'noreferrer', | |
| 2594 | + style: { | |
| 2595 | + background: 'var(--e-a-btn-bg-accent, #93003f)' | |
| 2596 | + } | |
| 2597 | + })); | |
| 2598 | +}; | |
| 4182 | 2599 | |
| 2600 | +/***/ }), | |
| 4183 | 2601 | |
| 2602 | +/***/ "../node_modules/dot-case/dist.es2015/index.js": | |
| 2603 | +/*!*****************************************************!*\ | |
| 2604 | + !*** ../node_modules/dot-case/dist.es2015/index.js ***! | |
| 2605 | + \*****************************************************/ | |
| 2606 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 4184 | 2607 | |
| 2608 | +"use strict"; | |
| 2609 | +__webpack_require__.r(__webpack_exports__); | |
| 2610 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2611 | +/* harmony export */ dotCase: () => (/* binding */ dotCase) | |
| 2612 | +/* harmony export */ }); | |
| 2613 | +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.mjs"); | |
| 2614 | +/* harmony import */ var no_case__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! no-case */ "../node_modules/no-case/dist.es2015/index.js"); | |
| 2615 | + | |
| 2616 | + | |
| 2617 | +function dotCase(input, options) { | |
| 2618 | + if (options === void 0) { options = {}; } | |
| 2619 | + return (0,no_case__WEBPACK_IMPORTED_MODULE_0__.noCase)(input, (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({ delimiter: "." }, options)); | |
| 2620 | +} | |
| 2621 | +//# sourceMappingURL=index.js.map | |
| 2622 | + | |
| 4185 | 2623 | /***/ }), |
| 4186 | 2624 | |
| 4187 | 2625 | /***/ "../node_modules/lower-case/dist.es2015/index.js": |
| 4188 | 2626 | /*!*******************************************************!*\ |
| @@ -4292,1168 +2730,818 @@ | ||
| 4292 | 2730 | //# sourceMappingURL=index.js.map |
| 4293 | 2731 | |
| 4294 | 2732 | /***/ }), |
| 4295 | 2733 | |
| 4296 | -/***/ "../node_modules/object-assign/index.js": | |
| 4297 | -/*!**********************************************!*\ | |
| 4298 | - !*** ../node_modules/object-assign/index.js ***! | |
| 4299 | - \**********************************************/ | |
| 4300 | -/***/ ((module) => { | |
| 2734 | +/***/ "../node_modules/param-case/dist.es2015/index.js": | |
| 2735 | +/*!*******************************************************!*\ | |
| 2736 | + !*** ../node_modules/param-case/dist.es2015/index.js ***! | |
| 2737 | + \*******************************************************/ | |
| 2738 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 4301 | 2739 | |
| 4302 | 2740 | "use strict"; |
| 4303 | -/* | |
| 4304 | -object-assign | |
| 4305 | -(c) Sindre Sorhus | |
| 4306 | -@license MIT | |
| 4307 | -*/ | |
| 2741 | +__webpack_require__.r(__webpack_exports__); | |
| 2742 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 2743 | +/* harmony export */ paramCase: () => (/* binding */ paramCase) | |
| 2744 | +/* harmony export */ }); | |
| 2745 | +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.mjs"); | |
| 2746 | +/* harmony import */ var dot_case__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dot-case */ "../node_modules/dot-case/dist.es2015/index.js"); | |
| 4308 | 2747 | |
| 4309 | 2748 | |
| 4310 | -/* eslint-disable no-unused-vars */ | |
| 4311 | -var getOwnPropertySymbols = Object.getOwnPropertySymbols; | |
| 4312 | -var hasOwnProperty = Object.prototype.hasOwnProperty; | |
| 4313 | -var propIsEnumerable = Object.prototype.propertyIsEnumerable; | |
| 4314 | - | |
| 4315 | -function toObject(val) { | |
| 4316 | - if (val === null || val === undefined) { | |
| 4317 | - throw new TypeError('Object.assign cannot be called with null or undefined'); | |
| 4318 | - } | |
| 4319 | - | |
| 4320 | - return Object(val); | |
| 2749 | +function paramCase(input, options) { | |
| 2750 | + if (options === void 0) { options = {}; } | |
| 2751 | + return (0,dot_case__WEBPACK_IMPORTED_MODULE_0__.dotCase)(input, (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({ delimiter: "-" }, options)); | |
| 4321 | 2752 | } |
| 2753 | +//# sourceMappingURL=index.js.map | |
| 4322 | 2754 | |
| 4323 | -function shouldUseNative() { | |
| 4324 | - try { | |
| 4325 | - if (!Object.assign) { | |
| 4326 | - return false; | |
| 4327 | - } | |
| 2755 | +/***/ }), | |
| 4328 | 2756 | |
| 4329 | - // Detect buggy property enumeration order in older V8 versions. | |
| 2757 | +/***/ "../node_modules/react-dom/client.js": | |
| 2758 | +/*!*******************************************!*\ | |
| 2759 | + !*** ../node_modules/react-dom/client.js ***! | |
| 2760 | + \*******************************************/ | |
| 2761 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 4330 | 2762 | |
| 4331 | - // https://bugs.chromium.org/p/v8/issues/detail?id=4118 | |
| 4332 | - var test1 = new String('abc'); // eslint-disable-line no-new-wrappers | |
| 4333 | - test1[5] = 'de'; | |
| 4334 | - if (Object.getOwnPropertyNames(test1)[0] === '5') { | |
| 4335 | - return false; | |
| 4336 | - } | |
| 2763 | +"use strict"; | |
| 4337 | 2764 | |
| 4338 | - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 | |
| 4339 | - var test2 = {}; | |
| 4340 | - for (var i = 0; i < 10; i++) { | |
| 4341 | - test2['_' + String.fromCharCode(i)] = i; | |
| 4342 | - } | |
| 4343 | - var order2 = Object.getOwnPropertyNames(test2).map(function (n) { | |
| 4344 | - return test2[n]; | |
| 4345 | - }); | |
| 4346 | - if (order2.join('') !== '0123456789') { | |
| 4347 | - return false; | |
| 4348 | - } | |
| 4349 | 2765 | |
| 4350 | - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 | |
| 4351 | - var test3 = {}; | |
| 4352 | - 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { | |
| 4353 | - test3[letter] = letter; | |
| 4354 | - }); | |
| 4355 | - if (Object.keys(Object.assign({}, test3)).join('') !== | |
| 4356 | - 'abcdefghijklmnopqrst') { | |
| 4357 | - return false; | |
| 4358 | - } | |
| 2766 | +var m = __webpack_require__(/*! react-dom */ "react-dom"); | |
| 2767 | +if (false) {} else { | |
| 2768 | + var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | |
| 2769 | + exports.createRoot = function(c, o) { | |
| 2770 | + i.usingClientEntryPoint = true; | |
| 2771 | + try { | |
| 2772 | + return m.createRoot(c, o); | |
| 2773 | + } finally { | |
| 2774 | + i.usingClientEntryPoint = false; | |
| 2775 | + } | |
| 2776 | + }; | |
| 2777 | + exports.hydrateRoot = function(c, h, o) { | |
| 2778 | + i.usingClientEntryPoint = true; | |
| 2779 | + try { | |
| 2780 | + return m.hydrateRoot(c, h, o); | |
| 2781 | + } finally { | |
| 2782 | + i.usingClientEntryPoint = false; | |
| 2783 | + } | |
| 2784 | + }; | |
| 2785 | +} | |
| 4359 | 2786 | |
| 4360 | - return true; | |
| 4361 | - } catch (err) { | |
| 4362 | - // We don't expect any of the above to throw, but better to be safe. | |
| 4363 | - return false; | |
| 4364 | - } | |
| 4365 | -} | |
| 4366 | 2787 | |
| 4367 | -module.exports = shouldUseNative() ? Object.assign : function (target, source) { | |
| 4368 | - var from; | |
| 4369 | - var to = toObject(target); | |
| 4370 | - var symbols; | |
| 2788 | +/***/ }), | |
| 4371 | 2789 | |
| 4372 | - for (var s = 1; s < arguments.length; s++) { | |
| 4373 | - from = Object(arguments[s]); | |
| 2790 | +/***/ "react": | |
| 2791 | +/*!************************!*\ | |
| 2792 | + !*** external "React" ***! | |
| 2793 | + \************************/ | |
| 2794 | +/***/ ((module) => { | |
| 4374 | 2795 | |
| 4375 | - for (var key in from) { | |
| 4376 | - if (hasOwnProperty.call(from, key)) { | |
| 4377 | - to[key] = from[key]; | |
| 4378 | - } | |
| 4379 | - } | |
| 2796 | +"use strict"; | |
| 2797 | +module.exports = React; | |
| 4380 | 2798 | |
| 4381 | - if (getOwnPropertySymbols) { | |
| 4382 | - symbols = getOwnPropertySymbols(from); | |
| 4383 | - for (var i = 0; i < symbols.length; i++) { | |
| 4384 | - if (propIsEnumerable.call(from, symbols[i])) { | |
| 4385 | - to[symbols[i]] = from[symbols[i]]; | |
| 4386 | - } | |
| 4387 | - } | |
| 4388 | - } | |
| 4389 | - } | |
| 2799 | +/***/ }), | |
| 4390 | 2800 | |
| 4391 | - return to; | |
| 4392 | -}; | |
| 2801 | +/***/ "react-dom": | |
| 2802 | +/*!***************************!*\ | |
| 2803 | + !*** external "ReactDOM" ***! | |
| 2804 | + \***************************/ | |
| 2805 | +/***/ ((module) => { | |
| 4393 | 2806 | |
| 2807 | +"use strict"; | |
| 2808 | +module.exports = ReactDOM; | |
| 4394 | 2809 | |
| 4395 | 2810 | /***/ }), |
| 4396 | 2811 | |
| 4397 | -/***/ "../node_modules/param-case/dist.es2015/index.js": | |
| 4398 | -/*!*******************************************************!*\ | |
| 4399 | - !*** ../node_modules/param-case/dist.es2015/index.js ***! | |
| 4400 | - \*******************************************************/ | |
| 4401 | -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 2812 | +/***/ "@wordpress/components": | |
| 2813 | +/*!********************************!*\ | |
| 2814 | + !*** external "wp.components" ***! | |
| 2815 | + \********************************/ | |
| 2816 | +/***/ ((module) => { | |
| 4402 | 2817 | |
| 4403 | 2818 | "use strict"; |
| 4404 | -__webpack_require__.r(__webpack_exports__); | |
| 4405 | -/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 4406 | -/* harmony export */ paramCase: () => (/* binding */ paramCase) | |
| 4407 | -/* harmony export */ }); | |
| 4408 | -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.mjs"); | |
| 4409 | -/* harmony import */ var dot_case__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dot-case */ "../node_modules/dot-case/dist.es2015/index.js"); | |
| 2819 | +module.exports = wp.components; | |
| 4410 | 2820 | |
| 2821 | +/***/ }), | |
| 4411 | 2822 | |
| 4412 | -function paramCase(input, options) { | |
| 4413 | - if (options === void 0) { options = {}; } | |
| 4414 | - return (0,dot_case__WEBPACK_IMPORTED_MODULE_1__.dotCase)(input, (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({ delimiter: "-" }, options)); | |
| 4415 | -} | |
| 4416 | -//# sourceMappingURL=index.js.map | |
| 2823 | +/***/ "@wordpress/dom-ready": | |
| 2824 | +/*!******************************!*\ | |
| 2825 | + !*** external "wp.domReady" ***! | |
| 2826 | + \******************************/ | |
| 2827 | +/***/ ((module) => { | |
| 4417 | 2828 | |
| 2829 | +"use strict"; | |
| 2830 | +module.exports = wp.domReady; | |
| 2831 | + | |
| 4418 | 2832 | /***/ }), |
| 4419 | 2833 | |
| 4420 | -/***/ "../node_modules/prop-types/checkPropTypes.js": | |
| 4421 | -/*!****************************************************!*\ | |
| 4422 | - !*** ../node_modules/prop-types/checkPropTypes.js ***! | |
| 4423 | - \****************************************************/ | |
| 4424 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2834 | +/***/ "@wordpress/i18n": | |
| 2835 | +/*!**************************!*\ | |
| 2836 | + !*** external "wp.i18n" ***! | |
| 2837 | + \**************************/ | |
| 2838 | +/***/ ((module) => { | |
| 4425 | 2839 | |
| 4426 | 2840 | "use strict"; |
| 4427 | -/** | |
| 4428 | - * Copyright (c) 2013-present, Facebook, Inc. | |
| 4429 | - * | |
| 4430 | - * This source code is licensed under the MIT license found in the | |
| 4431 | - * LICENSE file in the root directory of this source tree. | |
| 4432 | - */ | |
| 2841 | +module.exports = wp.i18n; | |
| 4433 | 2842 | |
| 2843 | +/***/ }), | |
| 4434 | 2844 | |
| 2845 | +/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": | |
| 2846 | +/*!******************************************************************!*\ | |
| 2847 | + !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! | |
| 2848 | + \******************************************************************/ | |
| 2849 | +/***/ ((module) => { | |
| 4435 | 2850 | |
| 4436 | -var printWarning = function() {}; | |
| 2851 | +function _arrayLikeToArray(r, a) { | |
| 2852 | + (null == a || a > r.length) && (a = r.length); | |
| 2853 | + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 2854 | + return n; | |
| 2855 | +} | |
| 2856 | +module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4437 | 2857 | |
| 4438 | -if (true) { | |
| 4439 | - var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js"); | |
| 4440 | - var loggedTypeFailures = {}; | |
| 4441 | - var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js"); | |
| 2858 | +/***/ }), | |
| 4442 | 2859 | |
| 4443 | - printWarning = function(text) { | |
| 4444 | - var message = 'Warning: ' + text; | |
| 4445 | - if (typeof console !== 'undefined') { | |
| 4446 | - console.error(message); | |
| 4447 | - } | |
| 4448 | - try { | |
| 4449 | - // --- Welcome to debugging React --- | |
| 4450 | - // This error was thrown as a convenience so that you can use this stack | |
| 4451 | - // to find the callsite that caused this warning to fire. | |
| 4452 | - throw new Error(message); | |
| 4453 | - } catch (x) { /**/ } | |
| 4454 | - }; | |
| 2860 | +/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": | |
| 2861 | +/*!****************************************************************!*\ | |
| 2862 | + !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! | |
| 2863 | + \****************************************************************/ | |
| 2864 | +/***/ ((module) => { | |
| 2865 | + | |
| 2866 | +function _arrayWithHoles(r) { | |
| 2867 | + if (Array.isArray(r)) return r; | |
| 4455 | 2868 | } |
| 2869 | +module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4456 | 2870 | |
| 4457 | -/** | |
| 4458 | - * Assert that the values match with the type specs. | |
| 4459 | - * Error messages are memorized and will only be shown once. | |
| 4460 | - * | |
| 4461 | - * @param {object} typeSpecs Map of name to a ReactPropType | |
| 4462 | - * @param {object} values Runtime values that need to be type-checked | |
| 4463 | - * @param {string} location e.g. "prop", "context", "child context" | |
| 4464 | - * @param {string} componentName Name of the component for error messages. | |
| 4465 | - * @param {?Function} getStack Returns the component stack. | |
| 4466 | - * @private | |
| 4467 | - */ | |
| 4468 | -function checkPropTypes(typeSpecs, values, location, componentName, getStack) { | |
| 4469 | - if (true) { | |
| 4470 | - for (var typeSpecName in typeSpecs) { | |
| 4471 | - if (has(typeSpecs, typeSpecName)) { | |
| 4472 | - var error; | |
| 4473 | - // Prop type validation may throw. In case they do, we don't want to | |
| 4474 | - // fail the render phase where it didn't fail before. So we log it. | |
| 4475 | - // After these have been cleaned up, we'll let them throw. | |
| 4476 | - try { | |
| 4477 | - // This is intentionally an invariant that gets caught. It's the same | |
| 4478 | - // behavior as without this statement except with a better message. | |
| 4479 | - if (typeof typeSpecs[typeSpecName] !== 'function') { | |
| 4480 | - var err = Error( | |
| 4481 | - (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + | |
| 4482 | - 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + | |
| 4483 | - 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.' | |
| 4484 | - ); | |
| 4485 | - err.name = 'Invariant Violation'; | |
| 4486 | - throw err; | |
| 4487 | - } | |
| 4488 | - error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); | |
| 4489 | - } catch (ex) { | |
| 4490 | - error = ex; | |
| 4491 | - } | |
| 4492 | - if (error && !(error instanceof Error)) { | |
| 4493 | - printWarning( | |
| 4494 | - (componentName || 'React class') + ': type specification of ' + | |
| 4495 | - location + ' `' + typeSpecName + '` is invalid; the type checker ' + | |
| 4496 | - 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + | |
| 4497 | - 'You may have forgotten to pass an argument to the type checker ' + | |
| 4498 | - 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + | |
| 4499 | - 'shape all require an argument).' | |
| 4500 | - ); | |
| 4501 | - } | |
| 4502 | - if (error instanceof Error && !(error.message in loggedTypeFailures)) { | |
| 4503 | - // Only monitor this failure once because there tends to be a lot of the | |
| 4504 | - // same error. | |
| 4505 | - loggedTypeFailures[error.message] = true; | |
| 2871 | +/***/ }), | |
| 4506 | 2872 | |
| 4507 | - var stack = getStack ? getStack() : ''; | |
| 2873 | +/***/ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js": | |
| 2874 | +/*!*******************************************************************!*\ | |
| 2875 | + !*** ../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! | |
| 2876 | + \*******************************************************************/ | |
| 2877 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4508 | 2878 | |
| 4509 | - printWarning( | |
| 4510 | - 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '') | |
| 4511 | - ); | |
| 4512 | - } | |
| 4513 | - } | |
| 4514 | - } | |
| 4515 | - } | |
| 2879 | +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 2880 | +function _arrayWithoutHoles(r) { | |
| 2881 | + if (Array.isArray(r)) return arrayLikeToArray(r); | |
| 4516 | 2882 | } |
| 2883 | +module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4517 | 2884 | |
| 4518 | -/** | |
| 4519 | - * Resets warning cache when testing. | |
| 4520 | - * | |
| 4521 | - * @private | |
| 4522 | - */ | |
| 4523 | -checkPropTypes.resetWarningCache = function() { | |
| 4524 | - if (true) { | |
| 4525 | - loggedTypeFailures = {}; | |
| 2885 | +/***/ }), | |
| 2886 | + | |
| 2887 | +/***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js": | |
| 2888 | +/*!******************************************************************!*\ | |
| 2889 | + !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***! | |
| 2890 | + \******************************************************************/ | |
| 2891 | +/***/ ((module) => { | |
| 2892 | + | |
| 2893 | +function asyncGeneratorStep(n, t, e, r, o, a, c) { | |
| 2894 | + try { | |
| 2895 | + var i = n[a](c), | |
| 2896 | + u = i.value; | |
| 2897 | + } catch (n) { | |
| 2898 | + return void e(n); | |
| 4526 | 2899 | } |
| 2900 | + i.done ? t(u) : Promise.resolve(u).then(r, o); | |
| 4527 | 2901 | } |
| 2902 | +function _asyncToGenerator(n) { | |
| 2903 | + return function () { | |
| 2904 | + var t = this, | |
| 2905 | + e = arguments; | |
| 2906 | + return new Promise(function (r, o) { | |
| 2907 | + var a = n.apply(t, e); | |
| 2908 | + function _next(n) { | |
| 2909 | + asyncGeneratorStep(a, r, o, _next, _throw, "next", n); | |
| 2910 | + } | |
| 2911 | + function _throw(n) { | |
| 2912 | + asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); | |
| 2913 | + } | |
| 2914 | + _next(void 0); | |
| 2915 | + }); | |
| 2916 | + }; | |
| 2917 | +} | |
| 2918 | +module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4528 | 2919 | |
| 4529 | -module.exports = checkPropTypes; | |
| 4530 | - | |
| 4531 | - | |
| 4532 | 2920 | /***/ }), |
| 4533 | 2921 | |
| 4534 | -/***/ "../node_modules/prop-types/factoryWithTypeCheckers.js": | |
| 4535 | -/*!*************************************************************!*\ | |
| 4536 | - !*** ../node_modules/prop-types/factoryWithTypeCheckers.js ***! | |
| 4537 | - \*************************************************************/ | |
| 2922 | +/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": | |
| 2923 | +/*!****************************************************************!*\ | |
| 2924 | + !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! | |
| 2925 | + \****************************************************************/ | |
| 4538 | 2926 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 4539 | 2927 | |
| 4540 | -"use strict"; | |
| 4541 | -/** | |
| 4542 | - * Copyright (c) 2013-present, Facebook, Inc. | |
| 4543 | - * | |
| 4544 | - * This source code is licensed under the MIT license found in the | |
| 4545 | - * LICENSE file in the root directory of this source tree. | |
| 4546 | - */ | |
| 2928 | +var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 2929 | +function _defineProperty(e, r, t) { | |
| 2930 | + return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 2931 | + value: t, | |
| 2932 | + enumerable: !0, | |
| 2933 | + configurable: !0, | |
| 2934 | + writable: !0 | |
| 2935 | + }) : e[r] = t, e; | |
| 2936 | +} | |
| 2937 | +module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4547 | 2938 | |
| 2939 | +/***/ }), | |
| 4548 | 2940 | |
| 2941 | +/***/ "../node_modules/@babel/runtime/helpers/extends.js": | |
| 2942 | +/*!*********************************************************!*\ | |
| 2943 | + !*** ../node_modules/@babel/runtime/helpers/extends.js ***! | |
| 2944 | + \*********************************************************/ | |
| 2945 | +/***/ ((module) => { | |
| 4549 | 2946 | |
| 4550 | -var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js"); | |
| 4551 | -var assign = __webpack_require__(/*! object-assign */ "../node_modules/object-assign/index.js"); | |
| 2947 | +function _extends() { | |
| 2948 | + return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) { | |
| 2949 | + for (var e = 1; e < arguments.length; e++) { | |
| 2950 | + var t = arguments[e]; | |
| 2951 | + for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); | |
| 2952 | + } | |
| 2953 | + return n; | |
| 2954 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends.apply(null, arguments); | |
| 2955 | +} | |
| 2956 | +module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4552 | 2957 | |
| 4553 | -var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js"); | |
| 4554 | -var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js"); | |
| 4555 | -var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "../node_modules/prop-types/checkPropTypes.js"); | |
| 2958 | +/***/ }), | |
| 4556 | 2959 | |
| 4557 | -var printWarning = function() {}; | |
| 2960 | +/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 2961 | +/*!***********************************************************************!*\ | |
| 2962 | + !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 2963 | + \***********************************************************************/ | |
| 2964 | +/***/ ((module) => { | |
| 4558 | 2965 | |
| 4559 | -if (true) { | |
| 4560 | - printWarning = function(text) { | |
| 4561 | - var message = 'Warning: ' + text; | |
| 4562 | - if (typeof console !== 'undefined') { | |
| 4563 | - console.error(message); | |
| 4564 | - } | |
| 4565 | - try { | |
| 4566 | - // --- Welcome to debugging React --- | |
| 4567 | - // This error was thrown as a convenience so that you can use this stack | |
| 4568 | - // to find the callsite that caused this warning to fire. | |
| 4569 | - throw new Error(message); | |
| 4570 | - } catch (x) {} | |
| 2966 | +function _interopRequireDefault(e) { | |
| 2967 | + return e && e.__esModule ? e : { | |
| 2968 | + "default": e | |
| 4571 | 2969 | }; |
| 4572 | 2970 | } |
| 2971 | +module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4573 | 2972 | |
| 4574 | -function emptyFunctionThatReturnsNull() { | |
| 4575 | - return null; | |
| 4576 | -} | |
| 2973 | +/***/ }), | |
| 4577 | 2974 | |
| 4578 | -module.exports = function(isValidElement, throwOnDirectAccess) { | |
| 4579 | - /* global Symbol */ | |
| 4580 | - var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; | |
| 4581 | - var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. | |
| 2975 | +/***/ "../node_modules/@babel/runtime/helpers/iterableToArray.js": | |
| 2976 | +/*!*****************************************************************!*\ | |
| 2977 | + !*** ../node_modules/@babel/runtime/helpers/iterableToArray.js ***! | |
| 2978 | + \*****************************************************************/ | |
| 2979 | +/***/ ((module) => { | |
| 4582 | 2980 | |
| 4583 | - /** | |
| 4584 | - * Returns the iterator method function contained on the iterable object. | |
| 4585 | - * | |
| 4586 | - * Be sure to invoke the function with the iterable as context: | |
| 4587 | - * | |
| 4588 | - * var iteratorFn = getIteratorFn(myIterable); | |
| 4589 | - * if (iteratorFn) { | |
| 4590 | - * var iterator = iteratorFn.call(myIterable); | |
| 4591 | - * ... | |
| 4592 | - * } | |
| 4593 | - * | |
| 4594 | - * @param {?object} maybeIterable | |
| 4595 | - * @return {?function} | |
| 4596 | - */ | |
| 4597 | - function getIteratorFn(maybeIterable) { | |
| 4598 | - var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); | |
| 4599 | - if (typeof iteratorFn === 'function') { | |
| 4600 | - return iteratorFn; | |
| 4601 | - } | |
| 4602 | - } | |
| 2981 | +function _iterableToArray(r) { | |
| 2982 | + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); | |
| 2983 | +} | |
| 2984 | +module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4603 | 2985 | |
| 4604 | - /** | |
| 4605 | - * Collection of methods that allow declaration and validation of props that are | |
| 4606 | - * supplied to React components. Example usage: | |
| 4607 | - * | |
| 4608 | - * var Props = require('ReactPropTypes'); | |
| 4609 | - * var MyArticle = React.createClass({ | |
| 4610 | - * propTypes: { | |
| 4611 | - * // An optional string prop named "description". | |
| 4612 | - * description: Props.string, | |
| 4613 | - * | |
| 4614 | - * // A required enum prop named "category". | |
| 4615 | - * category: Props.oneOf(['News','Photos']).isRequired, | |
| 4616 | - * | |
| 4617 | - * // A prop named "dialog" that requires an instance of Dialog. | |
| 4618 | - * dialog: Props.instanceOf(Dialog).isRequired | |
| 4619 | - * }, | |
| 4620 | - * render: function() { ... } | |
| 4621 | - * }); | |
| 4622 | - * | |
| 4623 | - * A more formal specification of how these methods are used: | |
| 4624 | - * | |
| 4625 | - * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) | |
| 4626 | - * decl := ReactPropTypes.{type}(.isRequired)? | |
| 4627 | - * | |
| 4628 | - * Each and every declaration produces a function with the same signature. This | |
| 4629 | - * allows the creation of custom validation functions. For example: | |
| 4630 | - * | |
| 4631 | - * var MyLink = React.createClass({ | |
| 4632 | - * propTypes: { | |
| 4633 | - * // An optional string or URI prop named "href". | |
| 4634 | - * href: function(props, propName, componentName) { | |
| 4635 | - * var propValue = props[propName]; | |
| 4636 | - * if (propValue != null && typeof propValue !== 'string' && | |
| 4637 | - * !(propValue instanceof URI)) { | |
| 4638 | - * return new Error( | |
| 4639 | - * 'Expected a string or an URI for ' + propName + ' in ' + | |
| 4640 | - * componentName | |
| 4641 | - * ); | |
| 4642 | - * } | |
| 4643 | - * } | |
| 4644 | - * }, | |
| 4645 | - * render: function() {...} | |
| 4646 | - * }); | |
| 4647 | - * | |
| 4648 | - * @internal | |
| 4649 | - */ | |
| 2986 | +/***/ }), | |
| 4650 | 2987 | |
| 4651 | - var ANONYMOUS = '<<anonymous>>'; | |
| 2988 | +/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": | |
| 2989 | +/*!**********************************************************************!*\ | |
| 2990 | + !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! | |
| 2991 | + \**********************************************************************/ | |
| 2992 | +/***/ ((module) => { | |
| 4652 | 2993 | |
| 4653 | - // Important! | |
| 4654 | - // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. | |
| 4655 | - var ReactPropTypes = { | |
| 4656 | - array: createPrimitiveTypeChecker('array'), | |
| 4657 | - bigint: createPrimitiveTypeChecker('bigint'), | |
| 4658 | - bool: createPrimitiveTypeChecker('boolean'), | |
| 4659 | - func: createPrimitiveTypeChecker('function'), | |
| 4660 | - number: createPrimitiveTypeChecker('number'), | |
| 4661 | - object: createPrimitiveTypeChecker('object'), | |
| 4662 | - string: createPrimitiveTypeChecker('string'), | |
| 4663 | - symbol: createPrimitiveTypeChecker('symbol'), | |
| 4664 | - | |
| 4665 | - any: createAnyTypeChecker(), | |
| 4666 | - arrayOf: createArrayOfTypeChecker, | |
| 4667 | - element: createElementTypeChecker(), | |
| 4668 | - elementType: createElementTypeTypeChecker(), | |
| 4669 | - instanceOf: createInstanceTypeChecker, | |
| 4670 | - node: createNodeChecker(), | |
| 4671 | - objectOf: createObjectOfTypeChecker, | |
| 4672 | - oneOf: createEnumTypeChecker, | |
| 4673 | - oneOfType: createUnionTypeChecker, | |
| 4674 | - shape: createShapeTypeChecker, | |
| 4675 | - exact: createStrictShapeTypeChecker, | |
| 4676 | - }; | |
| 4677 | - | |
| 4678 | - /** | |
| 4679 | - * inlined Object.is polyfill to avoid requiring consumers ship their own | |
| 4680 | - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is | |
| 4681 | - */ | |
| 4682 | - /*eslint-disable no-self-compare*/ | |
| 4683 | - function is(x, y) { | |
| 4684 | - // SameValue algorithm | |
| 4685 | - if (x === y) { | |
| 4686 | - // Steps 1-5, 7-10 | |
| 4687 | - // Steps 6.b-6.e: +0 != -0 | |
| 4688 | - return x !== 0 || 1 / x === 1 / y; | |
| 4689 | - } else { | |
| 4690 | - // Step 6.a: NaN == NaN | |
| 4691 | - return x !== x && y !== y; | |
| 2994 | +function _iterableToArrayLimit(r, l) { | |
| 2995 | + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 2996 | + if (null != t) { | |
| 2997 | + var e, | |
| 2998 | + n, | |
| 2999 | + i, | |
| 3000 | + u, | |
| 3001 | + a = [], | |
| 3002 | + f = !0, | |
| 3003 | + o = !1; | |
| 3004 | + try { | |
| 3005 | + if (i = (t = t.call(r)).next, 0 === l) { | |
| 3006 | + if (Object(t) !== t) return; | |
| 3007 | + f = !1; | |
| 3008 | + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 3009 | + } catch (r) { | |
| 3010 | + o = !0, n = r; | |
| 3011 | + } finally { | |
| 3012 | + try { | |
| 3013 | + if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 3014 | + } finally { | |
| 3015 | + if (o) throw n; | |
| 3016 | + } | |
| 4692 | 3017 | } |
| 3018 | + return a; | |
| 4693 | 3019 | } |
| 4694 | - /*eslint-enable no-self-compare*/ | |
| 3020 | +} | |
| 3021 | +module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4695 | 3022 | |
| 4696 | - /** | |
| 4697 | - * We use an Error-like object for backward compatibility as people may call | |
| 4698 | - * PropTypes directly and inspect their output. However, we don't use real | |
| 4699 | - * Errors anymore. We don't inspect their stack anyway, and creating them | |
| 4700 | - * is prohibitively expensive if they are created too often, such as what | |
| 4701 | - * happens in oneOfType() for any type before the one that matched. | |
| 4702 | - */ | |
| 4703 | - function PropTypeError(message, data) { | |
| 4704 | - this.message = message; | |
| 4705 | - this.data = data && typeof data === 'object' ? data: {}; | |
| 4706 | - this.stack = ''; | |
| 4707 | - } | |
| 4708 | - // Make `instanceof Error` still work for returned errors. | |
| 4709 | - PropTypeError.prototype = Error.prototype; | |
| 3023 | +/***/ }), | |
| 4710 | 3024 | |
| 4711 | - function createChainableTypeChecker(validate) { | |
| 4712 | - if (true) { | |
| 4713 | - var manualPropTypeCallCache = {}; | |
| 4714 | - var manualPropTypeWarningCount = 0; | |
| 4715 | - } | |
| 4716 | - function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { | |
| 4717 | - componentName = componentName || ANONYMOUS; | |
| 4718 | - propFullName = propFullName || propName; | |
| 3025 | +/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": | |
| 3026 | +/*!*****************************************************************!*\ | |
| 3027 | + !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! | |
| 3028 | + \*****************************************************************/ | |
| 3029 | +/***/ ((module) => { | |
| 4719 | 3030 | |
| 4720 | - if (secret !== ReactPropTypesSecret) { | |
| 4721 | - if (throwOnDirectAccess) { | |
| 4722 | - // New behavior only for users of `prop-types` package | |
| 4723 | - var err = new Error( | |
| 4724 | - 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + | |
| 4725 | - 'Use `PropTypes.checkPropTypes()` to call them. ' + | |
| 4726 | - 'Read more at http://fb.me/use-check-prop-types' | |
| 4727 | - ); | |
| 4728 | - err.name = 'Invariant Violation'; | |
| 4729 | - throw err; | |
| 4730 | - } else if ( true && typeof console !== 'undefined') { | |
| 4731 | - // Old behavior for people using React.PropTypes | |
| 4732 | - var cacheKey = componentName + ':' + propName; | |
| 4733 | - if ( | |
| 4734 | - !manualPropTypeCallCache[cacheKey] && | |
| 4735 | - // Avoid spamming the console because they are often not actionable except for lib authors | |
| 4736 | - manualPropTypeWarningCount < 3 | |
| 4737 | - ) { | |
| 4738 | - printWarning( | |
| 4739 | - 'You are manually calling a React.PropTypes validation ' + | |
| 4740 | - 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + | |
| 4741 | - 'and will throw in the standalone `prop-types` package. ' + | |
| 4742 | - 'You may be seeing this warning due to a third-party PropTypes ' + | |
| 4743 | - 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.' | |
| 4744 | - ); | |
| 4745 | - manualPropTypeCallCache[cacheKey] = true; | |
| 4746 | - manualPropTypeWarningCount++; | |
| 4747 | - } | |
| 4748 | - } | |
| 4749 | - } | |
| 4750 | - if (props[propName] == null) { | |
| 4751 | - if (isRequired) { | |
| 4752 | - if (props[propName] === null) { | |
| 4753 | - return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); | |
| 4754 | - } | |
| 4755 | - return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); | |
| 4756 | - } | |
| 4757 | - return null; | |
| 4758 | - } else { | |
| 4759 | - return validate(props, propName, componentName, location, propFullName); | |
| 4760 | - } | |
| 4761 | - } | |
| 3031 | +function _nonIterableRest() { | |
| 3032 | + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 3033 | +} | |
| 3034 | +module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4762 | 3035 | |
| 4763 | - var chainedCheckType = checkType.bind(null, false); | |
| 4764 | - chainedCheckType.isRequired = checkType.bind(null, true); | |
| 3036 | +/***/ }), | |
| 4765 | 3037 | |
| 4766 | - return chainedCheckType; | |
| 4767 | - } | |
| 3038 | +/***/ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js": | |
| 3039 | +/*!*******************************************************************!*\ | |
| 3040 | + !*** ../node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! | |
| 3041 | + \*******************************************************************/ | |
| 3042 | +/***/ ((module) => { | |
| 4768 | 3043 | |
| 4769 | - function createPrimitiveTypeChecker(expectedType) { | |
| 4770 | - function validate(props, propName, componentName, location, propFullName, secret) { | |
| 4771 | - var propValue = props[propName]; | |
| 4772 | - var propType = getPropType(propValue); | |
| 4773 | - if (propType !== expectedType) { | |
| 4774 | - // `propValue` being instance of, say, date/regexp, pass the 'object' | |
| 4775 | - // check, but we can offer a more precise error message here rather than | |
| 4776 | - // 'of type `object`'. | |
| 4777 | - var preciseType = getPreciseType(propValue); | |
| 3044 | +function _nonIterableSpread() { | |
| 3045 | + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 3046 | +} | |
| 3047 | +module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4778 | 3048 | |
| 4779 | - return new PropTypeError( | |
| 4780 | - 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), | |
| 4781 | - {expectedType: expectedType} | |
| 4782 | - ); | |
| 4783 | - } | |
| 4784 | - return null; | |
| 4785 | - } | |
| 4786 | - return createChainableTypeChecker(validate); | |
| 4787 | - } | |
| 3049 | +/***/ }), | |
| 4788 | 3050 | |
| 4789 | - function createAnyTypeChecker() { | |
| 4790 | - return createChainableTypeChecker(emptyFunctionThatReturnsNull); | |
| 3051 | +/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js": | |
| 3052 | +/*!********************************************************************!*\ | |
| 3053 | + !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! | |
| 3054 | + \********************************************************************/ | |
| 3055 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3056 | + | |
| 3057 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 3058 | +function _regeneratorRuntime() { | |
| 3059 | + "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ | |
| 3060 | + module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 3061 | + return e; | |
| 3062 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3063 | + var t, | |
| 3064 | + e = {}, | |
| 3065 | + r = Object.prototype, | |
| 3066 | + n = r.hasOwnProperty, | |
| 3067 | + o = Object.defineProperty || function (t, e, r) { | |
| 3068 | + t[e] = r.value; | |
| 3069 | + }, | |
| 3070 | + i = "function" == typeof Symbol ? Symbol : {}, | |
| 3071 | + a = i.iterator || "@@iterator", | |
| 3072 | + c = i.asyncIterator || "@@asyncIterator", | |
| 3073 | + u = i.toStringTag || "@@toStringTag"; | |
| 3074 | + function define(t, e, r) { | |
| 3075 | + return Object.defineProperty(t, e, { | |
| 3076 | + value: r, | |
| 3077 | + enumerable: !0, | |
| 3078 | + configurable: !0, | |
| 3079 | + writable: !0 | |
| 3080 | + }), t[e]; | |
| 4791 | 3081 | } |
| 4792 | - | |
| 4793 | - function createArrayOfTypeChecker(typeChecker) { | |
| 4794 | - function validate(props, propName, componentName, location, propFullName) { | |
| 4795 | - if (typeof typeChecker !== 'function') { | |
| 4796 | - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); | |
| 4797 | - } | |
| 4798 | - var propValue = props[propName]; | |
| 4799 | - if (!Array.isArray(propValue)) { | |
| 4800 | - var propType = getPropType(propValue); | |
| 4801 | - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); | |
| 4802 | - } | |
| 4803 | - for (var i = 0; i < propValue.length; i++) { | |
| 4804 | - var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); | |
| 4805 | - if (error instanceof Error) { | |
| 4806 | - return error; | |
| 4807 | - } | |
| 4808 | - } | |
| 4809 | - return null; | |
| 4810 | - } | |
| 4811 | - return createChainableTypeChecker(validate); | |
| 3082 | + try { | |
| 3083 | + define({}, ""); | |
| 3084 | + } catch (t) { | |
| 3085 | + define = function define(t, e, r) { | |
| 3086 | + return t[e] = r; | |
| 3087 | + }; | |
| 4812 | 3088 | } |
| 4813 | - | |
| 4814 | - function createElementTypeChecker() { | |
| 4815 | - function validate(props, propName, componentName, location, propFullName) { | |
| 4816 | - var propValue = props[propName]; | |
| 4817 | - if (!isValidElement(propValue)) { | |
| 4818 | - var propType = getPropType(propValue); | |
| 4819 | - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); | |
| 4820 | - } | |
| 4821 | - return null; | |
| 4822 | - } | |
| 4823 | - return createChainableTypeChecker(validate); | |
| 3089 | + function wrap(t, e, r, n) { | |
| 3090 | + var i = e && e.prototype instanceof Generator ? e : Generator, | |
| 3091 | + a = Object.create(i.prototype), | |
| 3092 | + c = new Context(n || []); | |
| 3093 | + return o(a, "_invoke", { | |
| 3094 | + value: makeInvokeMethod(t, r, c) | |
| 3095 | + }), a; | |
| 4824 | 3096 | } |
| 4825 | - | |
| 4826 | - function createElementTypeTypeChecker() { | |
| 4827 | - function validate(props, propName, componentName, location, propFullName) { | |
| 4828 | - var propValue = props[propName]; | |
| 4829 | - if (!ReactIs.isValidElementType(propValue)) { | |
| 4830 | - var propType = getPropType(propValue); | |
| 4831 | - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); | |
| 4832 | - } | |
| 4833 | - return null; | |
| 3097 | + function tryCatch(t, e, r) { | |
| 3098 | + try { | |
| 3099 | + return { | |
| 3100 | + type: "normal", | |
| 3101 | + arg: t.call(e, r) | |
| 3102 | + }; | |
| 3103 | + } catch (t) { | |
| 3104 | + return { | |
| 3105 | + type: "throw", | |
| 3106 | + arg: t | |
| 3107 | + }; | |
| 4834 | 3108 | } |
| 4835 | - return createChainableTypeChecker(validate); | |
| 4836 | 3109 | } |
| 4837 | - | |
| 4838 | - function createInstanceTypeChecker(expectedClass) { | |
| 4839 | - function validate(props, propName, componentName, location, propFullName) { | |
| 4840 | - if (!(props[propName] instanceof expectedClass)) { | |
| 4841 | - var expectedClassName = expectedClass.name || ANONYMOUS; | |
| 4842 | - var actualClassName = getClassName(props[propName]); | |
| 4843 | - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); | |
| 4844 | - } | |
| 4845 | - return null; | |
| 4846 | - } | |
| 4847 | - return createChainableTypeChecker(validate); | |
| 3110 | + e.wrap = wrap; | |
| 3111 | + var h = "suspendedStart", | |
| 3112 | + l = "suspendedYield", | |
| 3113 | + f = "executing", | |
| 3114 | + s = "completed", | |
| 3115 | + y = {}; | |
| 3116 | + function Generator() {} | |
| 3117 | + function GeneratorFunction() {} | |
| 3118 | + function GeneratorFunctionPrototype() {} | |
| 3119 | + var p = {}; | |
| 3120 | + define(p, a, function () { | |
| 3121 | + return this; | |
| 3122 | + }); | |
| 3123 | + var d = Object.getPrototypeOf, | |
| 3124 | + v = d && d(d(values([]))); | |
| 3125 | + v && v !== r && n.call(v, a) && (p = v); | |
| 3126 | + var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); | |
| 3127 | + function defineIteratorMethods(t) { | |
| 3128 | + ["next", "throw", "return"].forEach(function (e) { | |
| 3129 | + define(t, e, function (t) { | |
| 3130 | + return this._invoke(e, t); | |
| 3131 | + }); | |
| 3132 | + }); | |
| 4848 | 3133 | } |
| 4849 | - | |
| 4850 | - function createEnumTypeChecker(expectedValues) { | |
| 4851 | - if (!Array.isArray(expectedValues)) { | |
| 4852 | - if (true) { | |
| 4853 | - if (arguments.length > 1) { | |
| 4854 | - printWarning( | |
| 4855 | - 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + | |
| 4856 | - 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).' | |
| 4857 | - ); | |
| 4858 | - } else { | |
| 4859 | - printWarning('Invalid argument supplied to oneOf, expected an array.'); | |
| 4860 | - } | |
| 3134 | + function AsyncIterator(t, e) { | |
| 3135 | + function invoke(r, o, i, a) { | |
| 3136 | + var c = tryCatch(t[r], t, o); | |
| 3137 | + if ("throw" !== c.type) { | |
| 3138 | + var u = c.arg, | |
| 3139 | + h = u.value; | |
| 3140 | + return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { | |
| 3141 | + invoke("next", t, i, a); | |
| 3142 | + }, function (t) { | |
| 3143 | + invoke("throw", t, i, a); | |
| 3144 | + }) : e.resolve(h).then(function (t) { | |
| 3145 | + u.value = t, i(u); | |
| 3146 | + }, function (t) { | |
| 3147 | + return invoke("throw", t, i, a); | |
| 3148 | + }); | |
| 4861 | 3149 | } |
| 4862 | - return emptyFunctionThatReturnsNull; | |
| 3150 | + a(c.arg); | |
| 4863 | 3151 | } |
| 4864 | - | |
| 4865 | - function validate(props, propName, componentName, location, propFullName) { | |
| 4866 | - var propValue = props[propName]; | |
| 4867 | - for (var i = 0; i < expectedValues.length; i++) { | |
| 4868 | - if (is(propValue, expectedValues[i])) { | |
| 4869 | - return null; | |
| 3152 | + var r; | |
| 3153 | + o(this, "_invoke", { | |
| 3154 | + value: function value(t, n) { | |
| 3155 | + function callInvokeWithMethodAndArg() { | |
| 3156 | + return new e(function (e, r) { | |
| 3157 | + invoke(t, n, e, r); | |
| 3158 | + }); | |
| 4870 | 3159 | } |
| 3160 | + return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); | |
| 4871 | 3161 | } |
| 4872 | - | |
| 4873 | - var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { | |
| 4874 | - var type = getPreciseType(value); | |
| 4875 | - if (type === 'symbol') { | |
| 4876 | - return String(value); | |
| 4877 | - } | |
| 4878 | - return value; | |
| 4879 | - }); | |
| 4880 | - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); | |
| 4881 | - } | |
| 4882 | - return createChainableTypeChecker(validate); | |
| 3162 | + }); | |
| 4883 | 3163 | } |
| 4884 | - | |
| 4885 | - function createObjectOfTypeChecker(typeChecker) { | |
| 4886 | - function validate(props, propName, componentName, location, propFullName) { | |
| 4887 | - if (typeof typeChecker !== 'function') { | |
| 4888 | - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); | |
| 3164 | + function makeInvokeMethod(e, r, n) { | |
| 3165 | + var o = h; | |
| 3166 | + return function (i, a) { | |
| 3167 | + if (o === f) throw Error("Generator is already running"); | |
| 3168 | + if (o === s) { | |
| 3169 | + if ("throw" === i) throw a; | |
| 3170 | + return { | |
| 3171 | + value: t, | |
| 3172 | + done: !0 | |
| 3173 | + }; | |
| 4889 | 3174 | } |
| 4890 | - var propValue = props[propName]; | |
| 4891 | - var propType = getPropType(propValue); | |
| 4892 | - if (propType !== 'object') { | |
| 4893 | - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); | |
| 4894 | - } | |
| 4895 | - for (var key in propValue) { | |
| 4896 | - if (has(propValue, key)) { | |
| 4897 | - var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); | |
| 4898 | - if (error instanceof Error) { | |
| 4899 | - return error; | |
| 3175 | + for (n.method = i, n.arg = a;;) { | |
| 3176 | + var c = n.delegate; | |
| 3177 | + if (c) { | |
| 3178 | + var u = maybeInvokeDelegate(c, n); | |
| 3179 | + if (u) { | |
| 3180 | + if (u === y) continue; | |
| 3181 | + return u; | |
| 4900 | 3182 | } |
| 4901 | 3183 | } |
| 3184 | + if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { | |
| 3185 | + if (o === h) throw o = s, n.arg; | |
| 3186 | + n.dispatchException(n.arg); | |
| 3187 | + } else "return" === n.method && n.abrupt("return", n.arg); | |
| 3188 | + o = f; | |
| 3189 | + var p = tryCatch(e, r, n); | |
| 3190 | + if ("normal" === p.type) { | |
| 3191 | + if (o = n.done ? s : l, p.arg === y) continue; | |
| 3192 | + return { | |
| 3193 | + value: p.arg, | |
| 3194 | + done: n.done | |
| 3195 | + }; | |
| 3196 | + } | |
| 3197 | + "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); | |
| 4902 | 3198 | } |
| 4903 | - return null; | |
| 4904 | - } | |
| 4905 | - return createChainableTypeChecker(validate); | |
| 3199 | + }; | |
| 4906 | 3200 | } |
| 4907 | - | |
| 4908 | - function createUnionTypeChecker(arrayOfTypeCheckers) { | |
| 4909 | - if (!Array.isArray(arrayOfTypeCheckers)) { | |
| 4910 | - true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0; | |
| 4911 | - return emptyFunctionThatReturnsNull; | |
| 4912 | - } | |
| 4913 | - | |
| 4914 | - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { | |
| 4915 | - var checker = arrayOfTypeCheckers[i]; | |
| 4916 | - if (typeof checker !== 'function') { | |
| 4917 | - printWarning( | |
| 4918 | - 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + | |
| 4919 | - 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.' | |
| 4920 | - ); | |
| 4921 | - return emptyFunctionThatReturnsNull; | |
| 4922 | - } | |
| 4923 | - } | |
| 4924 | - | |
| 4925 | - function validate(props, propName, componentName, location, propFullName) { | |
| 4926 | - var expectedTypes = []; | |
| 4927 | - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { | |
| 4928 | - var checker = arrayOfTypeCheckers[i]; | |
| 4929 | - var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret); | |
| 4930 | - if (checkerResult == null) { | |
| 4931 | - return null; | |
| 4932 | - } | |
| 4933 | - if (checkerResult.data && has(checkerResult.data, 'expectedType')) { | |
| 4934 | - expectedTypes.push(checkerResult.data.expectedType); | |
| 4935 | - } | |
| 4936 | - } | |
| 4937 | - var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': ''; | |
| 4938 | - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.')); | |
| 4939 | - } | |
| 4940 | - return createChainableTypeChecker(validate); | |
| 3201 | + function maybeInvokeDelegate(e, r) { | |
| 3202 | + var n = r.method, | |
| 3203 | + o = e.iterator[n]; | |
| 3204 | + 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; | |
| 3205 | + var i = tryCatch(o, e.iterator, r.arg); | |
| 3206 | + if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; | |
| 3207 | + var a = i.arg; | |
| 3208 | + 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); | |
| 4941 | 3209 | } |
| 4942 | - | |
| 4943 | - function createNodeChecker() { | |
| 4944 | - function validate(props, propName, componentName, location, propFullName) { | |
| 4945 | - if (!isNode(props[propName])) { | |
| 4946 | - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); | |
| 4947 | - } | |
| 4948 | - return null; | |
| 4949 | - } | |
| 4950 | - return createChainableTypeChecker(validate); | |
| 3210 | + function pushTryEntry(t) { | |
| 3211 | + var e = { | |
| 3212 | + tryLoc: t[0] | |
| 3213 | + }; | |
| 3214 | + 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); | |
| 4951 | 3215 | } |
| 4952 | - | |
| 4953 | - function invalidValidatorError(componentName, location, propFullName, key, type) { | |
| 4954 | - return new PropTypeError( | |
| 4955 | - (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + | |
| 4956 | - 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.' | |
| 4957 | - ); | |
| 3216 | + function resetTryEntry(t) { | |
| 3217 | + var e = t.completion || {}; | |
| 3218 | + e.type = "normal", delete e.arg, t.completion = e; | |
| 4958 | 3219 | } |
| 4959 | - | |
| 4960 | - function createShapeTypeChecker(shapeTypes) { | |
| 4961 | - function validate(props, propName, componentName, location, propFullName) { | |
| 4962 | - var propValue = props[propName]; | |
| 4963 | - var propType = getPropType(propValue); | |
| 4964 | - if (propType !== 'object') { | |
| 4965 | - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); | |
| 3220 | + function Context(t) { | |
| 3221 | + this.tryEntries = [{ | |
| 3222 | + tryLoc: "root" | |
| 3223 | + }], t.forEach(pushTryEntry, this), this.reset(!0); | |
| 3224 | + } | |
| 3225 | + function values(e) { | |
| 3226 | + if (e || "" === e) { | |
| 3227 | + var r = e[a]; | |
| 3228 | + if (r) return r.call(e); | |
| 3229 | + if ("function" == typeof e.next) return e; | |
| 3230 | + if (!isNaN(e.length)) { | |
| 3231 | + var o = -1, | |
| 3232 | + i = function next() { | |
| 3233 | + for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; | |
| 3234 | + return next.value = t, next.done = !0, next; | |
| 3235 | + }; | |
| 3236 | + return i.next = i; | |
| 4966 | 3237 | } |
| 4967 | - for (var key in shapeTypes) { | |
| 4968 | - var checker = shapeTypes[key]; | |
| 4969 | - if (typeof checker !== 'function') { | |
| 4970 | - return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); | |
| 4971 | - } | |
| 4972 | - var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); | |
| 4973 | - if (error) { | |
| 4974 | - return error; | |
| 4975 | - } | |
| 4976 | - } | |
| 4977 | - return null; | |
| 4978 | 3238 | } |
| 4979 | - return createChainableTypeChecker(validate); | |
| 3239 | + throw new TypeError(_typeof(e) + " is not iterable"); | |
| 4980 | 3240 | } |
| 4981 | - | |
| 4982 | - function createStrictShapeTypeChecker(shapeTypes) { | |
| 4983 | - function validate(props, propName, componentName, location, propFullName) { | |
| 4984 | - var propValue = props[propName]; | |
| 4985 | - var propType = getPropType(propValue); | |
| 4986 | - if (propType !== 'object') { | |
| 4987 | - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); | |
| 3241 | + return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { | |
| 3242 | + value: GeneratorFunctionPrototype, | |
| 3243 | + configurable: !0 | |
| 3244 | + }), o(GeneratorFunctionPrototype, "constructor", { | |
| 3245 | + value: GeneratorFunction, | |
| 3246 | + configurable: !0 | |
| 3247 | + }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { | |
| 3248 | + var e = "function" == typeof t && t.constructor; | |
| 3249 | + return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); | |
| 3250 | + }, e.mark = function (t) { | |
| 3251 | + return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; | |
| 3252 | + }, e.awrap = function (t) { | |
| 3253 | + return { | |
| 3254 | + __await: t | |
| 3255 | + }; | |
| 3256 | + }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { | |
| 3257 | + return this; | |
| 3258 | + }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { | |
| 3259 | + void 0 === i && (i = Promise); | |
| 3260 | + var a = new AsyncIterator(wrap(t, r, n, o), i); | |
| 3261 | + return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { | |
| 3262 | + return t.done ? t.value : a.next(); | |
| 3263 | + }); | |
| 3264 | + }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { | |
| 3265 | + return this; | |
| 3266 | + }), define(g, "toString", function () { | |
| 3267 | + return "[object Generator]"; | |
| 3268 | + }), e.keys = function (t) { | |
| 3269 | + var e = Object(t), | |
| 3270 | + r = []; | |
| 3271 | + for (var n in e) r.push(n); | |
| 3272 | + return r.reverse(), function next() { | |
| 3273 | + for (; r.length;) { | |
| 3274 | + var t = r.pop(); | |
| 3275 | + if (t in e) return next.value = t, next.done = !1, next; | |
| 4988 | 3276 | } |
| 4989 | - // We need to check all keys in case some are required but missing from props. | |
| 4990 | - var allKeys = assign({}, props[propName], shapeTypes); | |
| 4991 | - for (var key in allKeys) { | |
| 4992 | - var checker = shapeTypes[key]; | |
| 4993 | - if (has(shapeTypes, key) && typeof checker !== 'function') { | |
| 4994 | - return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); | |
| 3277 | + return next.done = !0, next; | |
| 3278 | + }; | |
| 3279 | + }, e.values = values, Context.prototype = { | |
| 3280 | + constructor: Context, | |
| 3281 | + reset: function reset(e) { | |
| 3282 | + 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); | |
| 3283 | + }, | |
| 3284 | + stop: function stop() { | |
| 3285 | + this.done = !0; | |
| 3286 | + var t = this.tryEntries[0].completion; | |
| 3287 | + if ("throw" === t.type) throw t.arg; | |
| 3288 | + return this.rval; | |
| 3289 | + }, | |
| 3290 | + dispatchException: function dispatchException(e) { | |
| 3291 | + if (this.done) throw e; | |
| 3292 | + var r = this; | |
| 3293 | + function handle(n, o) { | |
| 3294 | + return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; | |
| 3295 | + } | |
| 3296 | + for (var o = this.tryEntries.length - 1; o >= 0; --o) { | |
| 3297 | + var i = this.tryEntries[o], | |
| 3298 | + a = i.completion; | |
| 3299 | + if ("root" === i.tryLoc) return handle("end"); | |
| 3300 | + if (i.tryLoc <= this.prev) { | |
| 3301 | + var c = n.call(i, "catchLoc"), | |
| 3302 | + u = n.call(i, "finallyLoc"); | |
| 3303 | + if (c && u) { | |
| 3304 | + if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); | |
| 3305 | + if (this.prev < i.finallyLoc) return handle(i.finallyLoc); | |
| 3306 | + } else if (c) { | |
| 3307 | + if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); | |
| 3308 | + } else { | |
| 3309 | + if (!u) throw Error("try statement without catch or finally"); | |
| 3310 | + if (this.prev < i.finallyLoc) return handle(i.finallyLoc); | |
| 3311 | + } | |
| 4995 | 3312 | } |
| 4996 | - if (!checker) { | |
| 4997 | - return new PropTypeError( | |
| 4998 | - 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + | |
| 4999 | - '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + | |
| 5000 | - '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') | |
| 5001 | - ); | |
| 3313 | + } | |
| 3314 | + }, | |
| 3315 | + abrupt: function abrupt(t, e) { | |
| 3316 | + for (var r = this.tryEntries.length - 1; r >= 0; --r) { | |
| 3317 | + var o = this.tryEntries[r]; | |
| 3318 | + if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { | |
| 3319 | + var i = o; | |
| 3320 | + break; | |
| 5002 | 3321 | } |
| 5003 | - var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); | |
| 5004 | - if (error) { | |
| 5005 | - return error; | |
| 5006 | - } | |
| 5007 | 3322 | } |
| 5008 | - return null; | |
| 5009 | - } | |
| 5010 | - | |
| 5011 | - return createChainableTypeChecker(validate); | |
| 5012 | - } | |
| 5013 | - | |
| 5014 | - function isNode(propValue) { | |
| 5015 | - switch (typeof propValue) { | |
| 5016 | - case 'number': | |
| 5017 | - case 'string': | |
| 5018 | - case 'undefined': | |
| 5019 | - return true; | |
| 5020 | - case 'boolean': | |
| 5021 | - return !propValue; | |
| 5022 | - case 'object': | |
| 5023 | - if (Array.isArray(propValue)) { | |
| 5024 | - return propValue.every(isNode); | |
| 5025 | - } | |
| 5026 | - if (propValue === null || isValidElement(propValue)) { | |
| 5027 | - return true; | |
| 5028 | - } | |
| 5029 | - | |
| 5030 | - var iteratorFn = getIteratorFn(propValue); | |
| 5031 | - if (iteratorFn) { | |
| 5032 | - var iterator = iteratorFn.call(propValue); | |
| 5033 | - var step; | |
| 5034 | - if (iteratorFn !== propValue.entries) { | |
| 5035 | - while (!(step = iterator.next()).done) { | |
| 5036 | - if (!isNode(step.value)) { | |
| 5037 | - return false; | |
| 5038 | - } | |
| 5039 | - } | |
| 5040 | - } else { | |
| 5041 | - // Iterator will provide entry [k,v] tuples rather than values. | |
| 5042 | - while (!(step = iterator.next()).done) { | |
| 5043 | - var entry = step.value; | |
| 5044 | - if (entry) { | |
| 5045 | - if (!isNode(entry[1])) { | |
| 5046 | - return false; | |
| 5047 | - } | |
| 5048 | - } | |
| 5049 | - } | |
| 3323 | + i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); | |
| 3324 | + var a = i ? i.completion : {}; | |
| 3325 | + return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); | |
| 3326 | + }, | |
| 3327 | + complete: function complete(t, e) { | |
| 3328 | + if ("throw" === t.type) throw t.arg; | |
| 3329 | + 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; | |
| 3330 | + }, | |
| 3331 | + finish: function finish(t) { | |
| 3332 | + for (var e = this.tryEntries.length - 1; e >= 0; --e) { | |
| 3333 | + var r = this.tryEntries[e]; | |
| 3334 | + if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; | |
| 3335 | + } | |
| 3336 | + }, | |
| 3337 | + "catch": function _catch(t) { | |
| 3338 | + for (var e = this.tryEntries.length - 1; e >= 0; --e) { | |
| 3339 | + var r = this.tryEntries[e]; | |
| 3340 | + if (r.tryLoc === t) { | |
| 3341 | + var n = r.completion; | |
| 3342 | + if ("throw" === n.type) { | |
| 3343 | + var o = n.arg; | |
| 3344 | + resetTryEntry(r); | |
| 5050 | 3345 | } |
| 5051 | - } else { | |
| 5052 | - return false; | |
| 3346 | + return o; | |
| 5053 | 3347 | } |
| 5054 | - | |
| 5055 | - return true; | |
| 5056 | - default: | |
| 5057 | - return false; | |
| 5058 | - } | |
| 5059 | - } | |
| 5060 | - | |
| 5061 | - function isSymbol(propType, propValue) { | |
| 5062 | - // Native Symbol. | |
| 5063 | - if (propType === 'symbol') { | |
| 5064 | - return true; | |
| 5065 | - } | |
| 5066 | - | |
| 5067 | - // falsy value can't be a Symbol | |
| 5068 | - if (!propValue) { | |
| 5069 | - return false; | |
| 5070 | - } | |
| 5071 | - | |
| 5072 | - // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' | |
| 5073 | - if (propValue['@@toStringTag'] === 'Symbol') { | |
| 5074 | - return true; | |
| 5075 | - } | |
| 5076 | - | |
| 5077 | - // Fallback for non-spec compliant Symbols which are polyfilled. | |
| 5078 | - if (typeof Symbol === 'function' && propValue instanceof Symbol) { | |
| 5079 | - return true; | |
| 5080 | - } | |
| 5081 | - | |
| 5082 | - return false; | |
| 5083 | - } | |
| 5084 | - | |
| 5085 | - // Equivalent of `typeof` but with special handling for array and regexp. | |
| 5086 | - function getPropType(propValue) { | |
| 5087 | - var propType = typeof propValue; | |
| 5088 | - if (Array.isArray(propValue)) { | |
| 5089 | - return 'array'; | |
| 5090 | - } | |
| 5091 | - if (propValue instanceof RegExp) { | |
| 5092 | - // Old webkits (at least until Android 4.0) return 'function' rather than | |
| 5093 | - // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ | |
| 5094 | - // passes PropTypes.object. | |
| 5095 | - return 'object'; | |
| 5096 | - } | |
| 5097 | - if (isSymbol(propType, propValue)) { | |
| 5098 | - return 'symbol'; | |
| 5099 | - } | |
| 5100 | - return propType; | |
| 5101 | - } | |
| 5102 | - | |
| 5103 | - // This handles more types than `getPropType`. Only used for error messages. | |
| 5104 | - // See `createPrimitiveTypeChecker`. | |
| 5105 | - function getPreciseType(propValue) { | |
| 5106 | - if (typeof propValue === 'undefined' || propValue === null) { | |
| 5107 | - return '' + propValue; | |
| 5108 | - } | |
| 5109 | - var propType = getPropType(propValue); | |
| 5110 | - if (propType === 'object') { | |
| 5111 | - if (propValue instanceof Date) { | |
| 5112 | - return 'date'; | |
| 5113 | - } else if (propValue instanceof RegExp) { | |
| 5114 | - return 'regexp'; | |
| 5115 | 3348 | } |
| 3349 | + throw Error("illegal catch attempt"); | |
| 3350 | + }, | |
| 3351 | + delegateYield: function delegateYield(e, r, n) { | |
| 3352 | + return this.delegate = { | |
| 3353 | + iterator: values(e), | |
| 3354 | + resultName: r, | |
| 3355 | + nextLoc: n | |
| 3356 | + }, "next" === this.method && (this.arg = t), y; | |
| 5116 | 3357 | } |
| 5117 | - return propType; | |
| 5118 | - } | |
| 3358 | + }, e; | |
| 3359 | +} | |
| 3360 | +module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5119 | 3361 | |
| 5120 | - // Returns a string that is postfixed to a warning about an invalid type. | |
| 5121 | - // For example, "undefined" or "of type array" | |
| 5122 | - function getPostfixForTypeWarning(value) { | |
| 5123 | - var type = getPreciseType(value); | |
| 5124 | - switch (type) { | |
| 5125 | - case 'array': | |
| 5126 | - case 'object': | |
| 5127 | - return 'an ' + type; | |
| 5128 | - case 'boolean': | |
| 5129 | - case 'date': | |
| 5130 | - case 'regexp': | |
| 5131 | - return 'a ' + type; | |
| 5132 | - default: | |
| 5133 | - return type; | |
| 5134 | - } | |
| 5135 | - } | |
| 3362 | +/***/ }), | |
| 5136 | 3363 | |
| 5137 | - // Returns class name of the object, if any. | |
| 5138 | - function getClassName(propValue) { | |
| 5139 | - if (!propValue.constructor || !propValue.constructor.name) { | |
| 5140 | - return ANONYMOUS; | |
| 5141 | - } | |
| 5142 | - return propValue.constructor.name; | |
| 5143 | - } | |
| 3364 | +/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": | |
| 3365 | +/*!***************************************************************!*\ | |
| 3366 | + !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! | |
| 3367 | + \***************************************************************/ | |
| 3368 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5144 | 3369 | |
| 5145 | - ReactPropTypes.checkPropTypes = checkPropTypes; | |
| 5146 | - ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; | |
| 5147 | - ReactPropTypes.PropTypes = ReactPropTypes; | |
| 3370 | +var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); | |
| 3371 | +var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); | |
| 3372 | +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 3373 | +var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); | |
| 3374 | +function _slicedToArray(r, e) { | |
| 3375 | + return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); | |
| 3376 | +} | |
| 3377 | +module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5148 | 3378 | |
| 5149 | - return ReactPropTypes; | |
| 5150 | -}; | |
| 5151 | - | |
| 5152 | - | |
| 5153 | 3379 | /***/ }), |
| 5154 | 3380 | |
| 5155 | -/***/ "../node_modules/prop-types/index.js": | |
| 5156 | -/*!*******************************************!*\ | |
| 5157 | - !*** ../node_modules/prop-types/index.js ***! | |
| 5158 | - \*******************************************/ | |
| 3381 | +/***/ "../node_modules/@babel/runtime/helpers/toConsumableArray.js": | |
| 3382 | +/*!*******************************************************************!*\ | |
| 3383 | + !*** ../node_modules/@babel/runtime/helpers/toConsumableArray.js ***! | |
| 3384 | + \*******************************************************************/ | |
| 5159 | 3385 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 5160 | 3386 | |
| 5161 | -/** | |
| 5162 | - * Copyright (c) 2013-present, Facebook, Inc. | |
| 5163 | - * | |
| 5164 | - * This source code is licensed under the MIT license found in the | |
| 5165 | - * LICENSE file in the root directory of this source tree. | |
| 5166 | - */ | |
| 3387 | +var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"); | |
| 3388 | +var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "../node_modules/@babel/runtime/helpers/iterableToArray.js"); | |
| 3389 | +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 3390 | +var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js"); | |
| 3391 | +function _toConsumableArray(r) { | |
| 3392 | + return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread(); | |
| 3393 | +} | |
| 3394 | +module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5167 | 3395 | |
| 5168 | -if (true) { | |
| 5169 | - var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js"); | |
| 3396 | +/***/ }), | |
| 5170 | 3397 | |
| 5171 | - // By explicitly using `prop-types` you are opting into new development behavior. | |
| 5172 | - // http://fb.me/prop-types-in-prod | |
| 5173 | - var throwOnDirectAccess = true; | |
| 5174 | - module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess); | |
| 5175 | -} else // removed by dead control flow | |
| 5176 | -{} | |
| 3398 | +/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 3399 | +/*!*************************************************************!*\ | |
| 3400 | + !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 3401 | + \*************************************************************/ | |
| 3402 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5177 | 3403 | |
| 3404 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 3405 | +function toPrimitive(t, r) { | |
| 3406 | + if ("object" != _typeof(t) || !t) return t; | |
| 3407 | + var e = t[Symbol.toPrimitive]; | |
| 3408 | + if (void 0 !== e) { | |
| 3409 | + var i = e.call(t, r || "default"); | |
| 3410 | + if ("object" != _typeof(i)) return i; | |
| 3411 | + throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 3412 | + } | |
| 3413 | + return ("string" === r ? String : Number)(t); | |
| 3414 | +} | |
| 3415 | +module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5178 | 3416 | |
| 5179 | 3417 | /***/ }), |
| 5180 | 3418 | |
| 5181 | -/***/ "../node_modules/prop-types/lib/ReactPropTypesSecret.js": | |
| 5182 | -/*!**************************************************************!*\ | |
| 5183 | - !*** ../node_modules/prop-types/lib/ReactPropTypesSecret.js ***! | |
| 5184 | - \**************************************************************/ | |
| 5185 | -/***/ ((module) => { | |
| 3419 | +/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 3420 | +/*!***************************************************************!*\ | |
| 3421 | + !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 3422 | + \***************************************************************/ | |
| 3423 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5186 | 3424 | |
| 5187 | -"use strict"; | |
| 5188 | -/** | |
| 5189 | - * Copyright (c) 2013-present, Facebook, Inc. | |
| 5190 | - * | |
| 5191 | - * This source code is licensed under the MIT license found in the | |
| 5192 | - * LICENSE file in the root directory of this source tree. | |
| 5193 | - */ | |
| 3425 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 3426 | +var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 3427 | +function toPropertyKey(t) { | |
| 3428 | + var i = toPrimitive(t, "string"); | |
| 3429 | + return "symbol" == _typeof(i) ? i : i + ""; | |
| 3430 | +} | |
| 3431 | +module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5194 | 3432 | |
| 5195 | - | |
| 5196 | - | |
| 5197 | -var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; | |
| 5198 | - | |
| 5199 | -module.exports = ReactPropTypesSecret; | |
| 5200 | - | |
| 5201 | - | |
| 5202 | 3433 | /***/ }), |
| 5203 | 3434 | |
| 5204 | -/***/ "../node_modules/prop-types/lib/has.js": | |
| 5205 | -/*!*********************************************!*\ | |
| 5206 | - !*** ../node_modules/prop-types/lib/has.js ***! | |
| 5207 | - \*********************************************/ | |
| 3435 | +/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 3436 | +/*!********************************************************!*\ | |
| 3437 | + !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 3438 | + \********************************************************/ | |
| 5208 | 3439 | /***/ ((module) => { |
| 5209 | 3440 | |
| 5210 | -module.exports = Function.call.bind(Object.prototype.hasOwnProperty); | |
| 3441 | +function _typeof(o) { | |
| 3442 | + "@babel/helpers - typeof"; | |
| 5211 | 3443 | |
| 3444 | + return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 3445 | + return typeof o; | |
| 3446 | + } : function (o) { | |
| 3447 | + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 3448 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 3449 | +} | |
| 3450 | +module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5212 | 3451 | |
| 5213 | 3452 | /***/ }), |
| 5214 | 3453 | |
| 5215 | -/***/ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js": | |
| 5216 | -/*!************************************************************************************!*\ | |
| 5217 | - !*** ../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js ***! | |
| 5218 | - \************************************************************************************/ | |
| 5219 | -/***/ ((__unused_webpack_module, exports) => { | |
| 3454 | +/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": | |
| 3455 | +/*!****************************************************************************!*\ | |
| 3456 | + !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! | |
| 3457 | + \****************************************************************************/ | |
| 3458 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5220 | 3459 | |
| 5221 | -"use strict"; | |
| 5222 | -/** @license React v16.13.1 | |
| 5223 | - * react-is.development.js | |
| 5224 | - * | |
| 5225 | - * Copyright (c) Facebook, Inc. and its affiliates. | |
| 5226 | - * | |
| 5227 | - * This source code is licensed under the MIT license found in the | |
| 5228 | - * LICENSE file in the root directory of this source tree. | |
| 5229 | - */ | |
| 5230 | - | |
| 5231 | - | |
| 5232 | - | |
| 5233 | - | |
| 5234 | - | |
| 5235 | -if (true) { | |
| 5236 | - (function() { | |
| 5237 | -'use strict'; | |
| 5238 | - | |
| 5239 | -// The Symbol used to tag the ReactElement-like types. If there is no native Symbol | |
| 5240 | -// nor polyfill, then a plain number is used for performance. | |
| 5241 | -var hasSymbol = typeof Symbol === 'function' && Symbol.for; | |
| 5242 | -var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; | |
| 5243 | -var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; | |
| 5244 | -var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; | |
| 5245 | -var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; | |
| 5246 | -var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; | |
| 5247 | -var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; | |
| 5248 | -var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary | |
| 5249 | -// (unstable) APIs that have been removed. Can we remove the symbols? | |
| 5250 | - | |
| 5251 | -var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; | |
| 5252 | -var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; | |
| 5253 | -var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; | |
| 5254 | -var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; | |
| 5255 | -var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; | |
| 5256 | -var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; | |
| 5257 | -var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; | |
| 5258 | -var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; | |
| 5259 | -var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; | |
| 5260 | -var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; | |
| 5261 | -var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; | |
| 5262 | - | |
| 5263 | -function isValidElementType(type) { | |
| 5264 | - return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. | |
| 5265 | - 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); | |
| 3460 | +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 3461 | +function _unsupportedIterableToArray(r, a) { | |
| 3462 | + if (r) { | |
| 3463 | + if ("string" == typeof r) return arrayLikeToArray(r, a); | |
| 3464 | + var t = {}.toString.call(r).slice(8, -1); | |
| 3465 | + 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; | |
| 3466 | + } | |
| 5266 | 3467 | } |
| 3468 | +module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5267 | 3469 | |
| 5268 | -function typeOf(object) { | |
| 5269 | - if (typeof object === 'object' && object !== null) { | |
| 5270 | - var $$typeof = object.$$typeof; | |
| 3470 | +/***/ }), | |
| 5271 | 3471 | |
| 5272 | - switch ($$typeof) { | |
| 5273 | - case REACT_ELEMENT_TYPE: | |
| 5274 | - var type = object.type; | |
| 3472 | +/***/ "../node_modules/@babel/runtime/regenerator/index.js": | |
| 3473 | +/*!***********************************************************!*\ | |
| 3474 | + !*** ../node_modules/@babel/runtime/regenerator/index.js ***! | |
| 3475 | + \***********************************************************/ | |
| 3476 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5275 | 3477 | |
| 5276 | - switch (type) { | |
| 5277 | - case REACT_ASYNC_MODE_TYPE: | |
| 5278 | - case REACT_CONCURRENT_MODE_TYPE: | |
| 5279 | - case REACT_FRAGMENT_TYPE: | |
| 5280 | - case REACT_PROFILER_TYPE: | |
| 5281 | - case REACT_STRICT_MODE_TYPE: | |
| 5282 | - case REACT_SUSPENSE_TYPE: | |
| 5283 | - return type; | |
| 3478 | +// TODO(Babel 8): Remove this file. | |
| 5284 | 3479 | |
| 5285 | - default: | |
| 5286 | - var $$typeofType = type && type.$$typeof; | |
| 3480 | +var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")(); | |
| 3481 | +module.exports = runtime; | |
| 5287 | 3482 | |
| 5288 | - switch ($$typeofType) { | |
| 5289 | - case REACT_CONTEXT_TYPE: | |
| 5290 | - case REACT_FORWARD_REF_TYPE: | |
| 5291 | - case REACT_LAZY_TYPE: | |
| 5292 | - case REACT_MEMO_TYPE: | |
| 5293 | - case REACT_PROVIDER_TYPE: | |
| 5294 | - return $$typeofType; | |
| 5295 | - | |
| 5296 | - default: | |
| 5297 | - return $$typeof; | |
| 5298 | - } | |
| 5299 | - | |
| 5300 | - } | |
| 5301 | - | |
| 5302 | - case REACT_PORTAL_TYPE: | |
| 5303 | - return $$typeof; | |
| 5304 | - } | |
| 3483 | +// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= | |
| 3484 | +try { | |
| 3485 | + regeneratorRuntime = runtime; | |
| 3486 | +} catch (accidentalStrictMode) { | |
| 3487 | + if (typeof globalThis === "object") { | |
| 3488 | + globalThis.regeneratorRuntime = runtime; | |
| 3489 | + } else { | |
| 3490 | + Function("r", "regeneratorRuntime = r")(runtime); | |
| 5305 | 3491 | } |
| 5306 | - | |
| 5307 | - return undefined; | |
| 5308 | -} // AsyncMode is deprecated along with isAsyncMode | |
| 5309 | - | |
| 5310 | -var AsyncMode = REACT_ASYNC_MODE_TYPE; | |
| 5311 | -var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; | |
| 5312 | -var ContextConsumer = REACT_CONTEXT_TYPE; | |
| 5313 | -var ContextProvider = REACT_PROVIDER_TYPE; | |
| 5314 | -var Element = REACT_ELEMENT_TYPE; | |
| 5315 | -var ForwardRef = REACT_FORWARD_REF_TYPE; | |
| 5316 | -var Fragment = REACT_FRAGMENT_TYPE; | |
| 5317 | -var Lazy = REACT_LAZY_TYPE; | |
| 5318 | -var Memo = REACT_MEMO_TYPE; | |
| 5319 | -var Portal = REACT_PORTAL_TYPE; | |
| 5320 | -var Profiler = REACT_PROFILER_TYPE; | |
| 5321 | -var StrictMode = REACT_STRICT_MODE_TYPE; | |
| 5322 | -var Suspense = REACT_SUSPENSE_TYPE; | |
| 5323 | -var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated | |
| 5324 | - | |
| 5325 | -function isAsyncMode(object) { | |
| 5326 | - { | |
| 5327 | - if (!hasWarnedAboutDeprecatedIsAsyncMode) { | |
| 5328 | - hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint | |
| 5329 | - | |
| 5330 | - 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.'); | |
| 5331 | - } | |
| 5332 | - } | |
| 5333 | - | |
| 5334 | - return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; | |
| 5335 | 3492 | } |
| 5336 | -function isConcurrentMode(object) { | |
| 5337 | - return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; | |
| 5338 | -} | |
| 5339 | -function isContextConsumer(object) { | |
| 5340 | - return typeOf(object) === REACT_CONTEXT_TYPE; | |
| 5341 | -} | |
| 5342 | -function isContextProvider(object) { | |
| 5343 | - return typeOf(object) === REACT_PROVIDER_TYPE; | |
| 5344 | -} | |
| 5345 | -function isElement(object) { | |
| 5346 | - return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | |
| 5347 | -} | |
| 5348 | -function isForwardRef(object) { | |
| 5349 | - return typeOf(object) === REACT_FORWARD_REF_TYPE; | |
| 5350 | -} | |
| 5351 | -function isFragment(object) { | |
| 5352 | - return typeOf(object) === REACT_FRAGMENT_TYPE; | |
| 5353 | -} | |
| 5354 | -function isLazy(object) { | |
| 5355 | - return typeOf(object) === REACT_LAZY_TYPE; | |
| 5356 | -} | |
| 5357 | -function isMemo(object) { | |
| 5358 | - return typeOf(object) === REACT_MEMO_TYPE; | |
| 5359 | -} | |
| 5360 | -function isPortal(object) { | |
| 5361 | - return typeOf(object) === REACT_PORTAL_TYPE; | |
| 5362 | -} | |
| 5363 | -function isProfiler(object) { | |
| 5364 | - return typeOf(object) === REACT_PROFILER_TYPE; | |
| 5365 | -} | |
| 5366 | -function isStrictMode(object) { | |
| 5367 | - return typeOf(object) === REACT_STRICT_MODE_TYPE; | |
| 5368 | -} | |
| 5369 | -function isSuspense(object) { | |
| 5370 | - return typeOf(object) === REACT_SUSPENSE_TYPE; | |
| 5371 | -} | |
| 5372 | 3493 | |
| 5373 | -exports.AsyncMode = AsyncMode; | |
| 5374 | -exports.ConcurrentMode = ConcurrentMode; | |
| 5375 | -exports.ContextConsumer = ContextConsumer; | |
| 5376 | -exports.ContextProvider = ContextProvider; | |
| 5377 | -exports.Element = Element; | |
| 5378 | -exports.ForwardRef = ForwardRef; | |
| 5379 | -exports.Fragment = Fragment; | |
| 5380 | -exports.Lazy = Lazy; | |
| 5381 | -exports.Memo = Memo; | |
| 5382 | -exports.Portal = Portal; | |
| 5383 | -exports.Profiler = Profiler; | |
| 5384 | -exports.StrictMode = StrictMode; | |
| 5385 | -exports.Suspense = Suspense; | |
| 5386 | -exports.isAsyncMode = isAsyncMode; | |
| 5387 | -exports.isConcurrentMode = isConcurrentMode; | |
| 5388 | -exports.isContextConsumer = isContextConsumer; | |
| 5389 | -exports.isContextProvider = isContextProvider; | |
| 5390 | -exports.isElement = isElement; | |
| 5391 | -exports.isForwardRef = isForwardRef; | |
| 5392 | -exports.isFragment = isFragment; | |
| 5393 | -exports.isLazy = isLazy; | |
| 5394 | -exports.isMemo = isMemo; | |
| 5395 | -exports.isPortal = isPortal; | |
| 5396 | -exports.isProfiler = isProfiler; | |
| 5397 | -exports.isStrictMode = isStrictMode; | |
| 5398 | -exports.isSuspense = isSuspense; | |
| 5399 | -exports.isValidElementType = isValidElementType; | |
| 5400 | -exports.typeOf = typeOf; | |
| 5401 | - })(); | |
| 5402 | -} | |
| 5403 | 3494 | |
| 5404 | - | |
| 5405 | 3495 | /***/ }), |
| 5406 | 3496 | |
| 5407 | -/***/ "../node_modules/prop-types/node_modules/react-is/index.js": | |
| 5408 | -/*!*****************************************************************!*\ | |
| 5409 | - !*** ../node_modules/prop-types/node_modules/react-is/index.js ***! | |
| 5410 | - \*****************************************************************/ | |
| 5411 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3497 | +/***/ "../node_modules/is-plain-object/dist/is-plain-object.mjs": | |
| 3498 | +/*!****************************************************************!*\ | |
| 3499 | + !*** ../node_modules/is-plain-object/dist/is-plain-object.mjs ***! | |
| 3500 | + \****************************************************************/ | |
| 3501 | +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 5412 | 3502 | |
| 5413 | 3503 | "use strict"; |
| 3504 | +__webpack_require__.r(__webpack_exports__); | |
| 3505 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3506 | +/* harmony export */ isPlainObject: () => (/* binding */ isPlainObject) | |
| 3507 | +/* harmony export */ }); | |
| 3508 | +/*! | |
| 3509 | + * is-plain-object <https://github.com/jonschlinkert/is-plain-object> | |
| 3510 | + * | |
| 3511 | + * Copyright (c) 2014-2017, Jon Schlinkert. | |
| 3512 | + * Released under the MIT License. | |
| 3513 | + */ | |
| 5414 | 3514 | |
| 5415 | - | |
| 5416 | -if (false) // removed by dead control flow | |
| 5417 | -{} else { | |
| 5418 | - module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js"); | |
| 3515 | +function isObject(o) { | |
| 3516 | + return Object.prototype.toString.call(o) === '[object Object]'; | |
| 5419 | 3517 | } |
| 5420 | 3518 | |
| 3519 | +function isPlainObject(o) { | |
| 3520 | + var ctor,prot; | |
| 5421 | 3521 | |
| 5422 | -/***/ }), | |
| 3522 | + if (isObject(o) === false) return false; | |
| 5423 | 3523 | |
| 5424 | -/***/ "../node_modules/react-dom/client.js": | |
| 5425 | -/*!*******************************************!*\ | |
| 5426 | - !*** ../node_modules/react-dom/client.js ***! | |
| 5427 | - \*******************************************/ | |
| 5428 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 3524 | + // If has modified constructor | |
| 3525 | + ctor = o.constructor; | |
| 3526 | + if (ctor === undefined) return true; | |
| 5429 | 3527 | |
| 5430 | -"use strict"; | |
| 3528 | + // If has modified prototype | |
| 3529 | + prot = ctor.prototype; | |
| 3530 | + if (isObject(prot) === false) return false; | |
| 5431 | 3531 | |
| 3532 | + // If constructor does not have an Object-specific method | |
| 3533 | + if (prot.hasOwnProperty('isPrototypeOf') === false) { | |
| 3534 | + return false; | |
| 3535 | + } | |
| 5432 | 3536 | |
| 5433 | -var m = __webpack_require__(/*! react-dom */ "react-dom"); | |
| 5434 | -if (false) // removed by dead control flow | |
| 5435 | -{} else { | |
| 5436 | - var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | |
| 5437 | - exports.createRoot = function(c, o) { | |
| 5438 | - i.usingClientEntryPoint = true; | |
| 5439 | - try { | |
| 5440 | - return m.createRoot(c, o); | |
| 5441 | - } finally { | |
| 5442 | - i.usingClientEntryPoint = false; | |
| 5443 | - } | |
| 5444 | - }; | |
| 5445 | - exports.hydrateRoot = function(c, h, o) { | |
| 5446 | - i.usingClientEntryPoint = true; | |
| 5447 | - try { | |
| 5448 | - return m.hydrateRoot(c, h, o); | |
| 5449 | - } finally { | |
| 5450 | - i.usingClientEntryPoint = false; | |
| 5451 | - } | |
| 5452 | - }; | |
| 3537 | + // Most likely a plain Object | |
| 3538 | + return true; | |
| 5453 | 3539 | } |
| 5454 | 3540 | |
| 5455 | 3541 | |
| 3542 | + | |
| 3543 | + | |
| 5456 | 3544 | /***/ }), |
| 5457 | 3545 | |
| 5458 | 3546 | /***/ "../node_modules/tslib/tslib.es6.mjs": |
| 5459 | 3547 | /*!*******************************************!*\ |
| @@ -5900,85 +3988,8 @@ | ||
| 5900 | 3988 | __rewriteRelativeImportExtension, |
| 5901 | 3989 | }); |
| 5902 | 3990 | |
| 5903 | 3991 | |
| 5904 | -/***/ }), | |
| 5905 | - | |
| 5906 | -/***/ "@elementor/icons": | |
| 5907 | -/*!************************************!*\ | |
| 5908 | - !*** external "elementorV2.icons" ***! | |
| 5909 | - \************************************/ | |
| 5910 | -/***/ ((module) => { | |
| 5911 | - | |
| 5912 | -"use strict"; | |
| 5913 | -module.exports = elementorV2.icons; | |
| 5914 | - | |
| 5915 | -/***/ }), | |
| 5916 | - | |
| 5917 | -/***/ "@elementor/ui": | |
| 5918 | -/*!*********************************!*\ | |
| 5919 | - !*** external "elementorV2.ui" ***! | |
| 5920 | - \*********************************/ | |
| 5921 | -/***/ ((module) => { | |
| 5922 | - | |
| 5923 | -"use strict"; | |
| 5924 | -module.exports = elementorV2.ui; | |
| 5925 | - | |
| 5926 | -/***/ }), | |
| 5927 | - | |
| 5928 | -/***/ "@wordpress/components": | |
| 5929 | -/*!********************************!*\ | |
| 5930 | - !*** external "wp.components" ***! | |
| 5931 | - \********************************/ | |
| 5932 | -/***/ ((module) => { | |
| 5933 | - | |
| 5934 | -"use strict"; | |
| 5935 | -module.exports = wp.components; | |
| 5936 | - | |
| 5937 | -/***/ }), | |
| 5938 | - | |
| 5939 | -/***/ "@wordpress/dom-ready": | |
| 5940 | -/*!******************************!*\ | |
| 5941 | - !*** external "wp.domReady" ***! | |
| 5942 | - \******************************/ | |
| 5943 | -/***/ ((module) => { | |
| 5944 | - | |
| 5945 | -"use strict"; | |
| 5946 | -module.exports = wp.domReady; | |
| 5947 | - | |
| 5948 | -/***/ }), | |
| 5949 | - | |
| 5950 | -/***/ "@wordpress/i18n": | |
| 5951 | -/*!**************************!*\ | |
| 5952 | - !*** external "wp.i18n" ***! | |
| 5953 | - \**************************/ | |
| 5954 | -/***/ ((module) => { | |
| 5955 | - | |
| 5956 | -"use strict"; | |
| 5957 | -module.exports = wp.i18n; | |
| 5958 | - | |
| 5959 | -/***/ }), | |
| 5960 | - | |
| 5961 | -/***/ "react": | |
| 5962 | -/*!************************!*\ | |
| 5963 | - !*** external "React" ***! | |
| 5964 | - \************************/ | |
| 5965 | -/***/ ((module) => { | |
| 5966 | - | |
| 5967 | -"use strict"; | |
| 5968 | -module.exports = React; | |
| 5969 | - | |
| 5970 | -/***/ }), | |
| 5971 | - | |
| 5972 | -/***/ "react-dom": | |
| 5973 | -/*!***************************!*\ | |
| 5974 | - !*** external "ReactDOM" ***! | |
| 5975 | - \***************************/ | |
| 5976 | -/***/ ((module) => { | |
| 5977 | - | |
| 5978 | -"use strict"; | |
| 5979 | -module.exports = ReactDOM; | |
| 5980 | - | |
| 5981 | 3992 | /***/ }) |
| 5982 | 3993 | |
| 5983 | 3994 | /******/ }); |
| 5984 | 3995 | /************************************************************************/ |
| @@ -6060,16 +4071,14 @@ | ||
| 6060 | 4071 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 6061 | 4072 | var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 6062 | 4073 | var _element = __webpack_require__(/*! @wordpress/element */ "../node_modules/@wordpress/element/build-module/index.js"); |
| 6063 | 4074 | var _domReady = _interopRequireDefault(__webpack_require__(/*! @wordpress/dom-ready */ "@wordpress/dom-ready")); |
| 6064 | -var _appEditorOne = __webpack_require__(/*! ./app-editor-one */ "../modules/element-manager/assets/js/app-editor-one/index.js"); | |
| 4075 | +var _app = __webpack_require__(/*! ./app */ "../modules/element-manager/assets/js/app.js"); | |
| 6065 | 4076 | (0, _domReady.default)(function () { |
| 6066 | 4077 | var htmlOutput = document.getElementById('elementor-element-manager-wrap'); |
| 6067 | - if (!htmlOutput) { | |
| 6068 | - return; | |
| 4078 | + if (htmlOutput) { | |
| 4079 | + (0, _element.render)(/*#__PURE__*/_react.default.createElement(_app.App, null), htmlOutput); | |
| 6069 | 4080 | } |
| 6070 | - var root = (0, _element.createRoot)(htmlOutput); | |
| 6071 | - root.render(/*#__PURE__*/_react.default.createElement(_appEditorOne.AppModern, null)); | |
| 6072 | 4081 | }); |
| 6073 | 4082 | })(); |
| 6074 | 4083 | |
| 6075 | 4084 | /******/ })() |