| 1 |
/******/ (() => { // webpackBootstrap |
| 2 |
/******/ var __webpack_modules__ = ({ |
| 3 |
|
| 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: theme.spacing(10), |
| 841 |
backgroundColor: 'var(--e-one-palette-background-default)', |
| 842 |
zIndex: 10, |
| 843 |
paddingBlock: 2, |
| 844 |
paddingInline: 2, |
| 845 |
boxShadow: 'rgba(0, 0, 0, 0.15) 0 5px 10px 0', |
| 846 |
marginBottom: theme.spacing(1) |
| 847 |
}; |
| 848 |
} |
| 849 |
}, /*#__PURE__*/_react.default.createElement(_ui.Stack, { |
| 850 |
direction: "row", |
| 851 |
alignItems: "center", |
| 852 |
flexWrap: "wrap", |
| 853 |
gap: 1.5, |
| 854 |
sx: { |
| 855 |
flex: 1 |
| 856 |
} |
| 857 |
}, /*#__PURE__*/_react.default.createElement(StyledTextField, { |
| 858 |
color: "secondary", |
| 859 |
value: searchKeyword, |
| 860 |
size: "small", |
| 861 |
placeholder: (0, _i18n.__)('Search', 'elementor'), |
| 862 |
onChange: function onChange(e) { |
| 863 |
return onSearchChange(e.target.value); |
| 864 |
}, |
| 865 |
sx: function sx(theme) { |
| 866 |
return { |
| 867 |
minWidth: theme.spacing(14) |
| 868 |
}; |
| 869 |
} |
| 870 |
}), /*#__PURE__*/_react.default.createElement(StyledFormControl, { |
| 871 |
size: "small", |
| 872 |
sx: function sx(theme) { |
| 873 |
return { |
| 874 |
width: theme.spacing(20) |
| 875 |
}; |
| 876 |
}, |
| 877 |
color: "secondary" |
| 878 |
}, /*#__PURE__*/_react.default.createElement(_ui.Select, { |
| 879 |
placeholder: (0, _i18n.__)('Plugin', 'elementor'), |
| 880 |
value: filterByPlugin, |
| 881 |
onChange: function onChange(event) { |
| 882 |
return onPluginFilterChange(event.target.value); |
| 883 |
}, |
| 884 |
"data-id": "elementor-element-manager-select-filter-by-plugin", |
| 885 |
displayEmpty: true, |
| 886 |
renderValue: function renderValue(value) { |
| 887 |
if ('' === value) { |
| 888 |
return (0, _i18n.__)('All Plugins', 'elementor'); |
| 889 |
} |
| 890 |
var selectedPlugin = plugins.find(function (p) { |
| 891 |
return p.value === value; |
| 892 |
}); |
| 893 |
return selectedPlugin ? selectedPlugin.label : value; |
| 894 |
} |
| 895 |
}, /*#__PURE__*/_react.default.createElement(_ui.MenuItem, { |
| 896 |
value: "" |
| 897 |
}, (0, _i18n.__)('All Plugins', 'elementor')), plugins.map(function (plugin) { |
| 898 |
return /*#__PURE__*/_react.default.createElement(_ui.MenuItem, { |
| 899 |
key: plugin.value, |
| 900 |
value: plugin.value |
| 901 |
}, plugin.label); |
| 902 |
}))), /*#__PURE__*/_react.default.createElement(StyledFormControl, { |
| 903 |
size: "small", |
| 904 |
sx: function sx(theme) { |
| 905 |
return { |
| 906 |
width: theme.spacing(20) |
| 907 |
}; |
| 908 |
}, |
| 909 |
color: "secondary" |
| 910 |
}, /*#__PURE__*/_react.default.createElement(_ui.Select, { |
| 911 |
value: filterByStatus, |
| 912 |
onChange: function onChange(event) { |
| 913 |
return onStatusFilterChange(event.target.value); |
| 914 |
}, |
| 915 |
"data-id": "elementor-element-manager-select-filter-by-status", |
| 916 |
placeholder: (0, _i18n.__)('Status', 'elementor') |
| 917 |
}, /*#__PURE__*/_react.default.createElement(_ui.MenuItem, { |
| 918 |
value: "all" |
| 919 |
}, (0, _i18n.__)('All Statuses', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.MenuItem, { |
| 920 |
value: "active" |
| 921 |
}, (0, _i18n.__)('Active', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.MenuItem, { |
| 922 |
value: "inactive" |
| 923 |
}, (0, _i18n.__)('Inactive', 'elementor')))), /*#__PURE__*/_react.default.createElement(_ui.Divider, { |
| 924 |
orientation: "vertical", |
| 925 |
flexItem: true, |
| 926 |
sx: { |
| 927 |
height: FIELD_HEIGHT, |
| 928 |
marginBlock: 0, |
| 929 |
marginInline: 0.5, |
| 930 |
alignSelf: 'center', |
| 931 |
display: { |
| 932 |
xs: 'none', |
| 933 |
md: 'block' |
| 934 |
} |
| 935 |
} |
| 936 |
}), /*#__PURE__*/_react.default.createElement(StyledButton, { |
| 937 |
variant: "outlined", |
| 938 |
color: "secondary", |
| 939 |
size: "small", |
| 940 |
disabled: usageIsLoading, |
| 941 |
onClick: onScanUsage, |
| 942 |
"data-id": "e-id-elementor-element-manager-button-scan-element-usage", |
| 943 |
loading: usageIsLoading |
| 944 |
}, (0, _i18n.__)('Scan Element Usage', 'elementor')), /*#__PURE__*/_react.default.createElement(StyledButton, { |
| 945 |
variant: "outlined", |
| 946 |
color: "secondary", |
| 947 |
size: "small", |
| 948 |
onClick: onDeactivateUnused, |
| 949 |
disabled: null === usageData, |
| 950 |
"data-id": "e-id-elementor-element-manager-button-deactivate-unused-elements" |
| 951 |
}, (0, _i18n.__)('Deactivate Unused Elements', 'elementor')), /*#__PURE__*/_react.default.createElement(StyledButton, { |
| 952 |
variant: "outlined", |
| 953 |
color: "secondary", |
| 954 |
size: "small", |
| 955 |
disabled: !widgetsDisabledCount, |
| 956 |
onClick: onEnableAll, |
| 957 |
"data-id": "e-id-elementor-element-manager-button-enable-all" |
| 958 |
}, (0, _i18n.__)('Enable All', 'elementor'))), /*#__PURE__*/_react.default.createElement(StyledButton, { |
| 959 |
variant: "contained", |
| 960 |
size: "small", |
| 961 |
disabled: isSaving || !hasUnsavedChanges, |
| 962 |
onClick: onSaveChanges, |
| 963 |
"data-id": "e-id-elementor-element-manager-button-save-changes", |
| 964 |
loading: isSaving, |
| 965 |
sx: { |
| 966 |
alignSelf: 'flex-start' |
| 967 |
} |
| 968 |
}, (0, _i18n.__)('Save Changes', 'elementor'))); |
| 969 |
}; |
| 970 |
SearchFilters.propTypes = { |
| 971 |
searchKeyword: _propTypes.default.string.isRequired, |
| 972 |
onSearchChange: _propTypes.default.func.isRequired, |
| 973 |
filterByPlugin: _propTypes.default.string.isRequired, |
| 974 |
onPluginFilterChange: _propTypes.default.func.isRequired, |
| 975 |
filterByStatus: _propTypes.default.string.isRequired, |
| 976 |
onStatusFilterChange: _propTypes.default.func.isRequired, |
| 977 |
plugins: _propTypes.default.arrayOf(_propTypes.default.shape({ |
| 978 |
label: _propTypes.default.string.isRequired, |
| 979 |
value: _propTypes.default.string.isRequired |
| 980 |
})).isRequired, |
| 981 |
usageIsLoading: _propTypes.default.bool, |
| 982 |
usageData: _propTypes.default.object, |
| 983 |
widgetsDisabledCount: _propTypes.default.number.isRequired, |
| 984 |
onScanUsage: _propTypes.default.func.isRequired, |
| 985 |
onDeactivateUnused: _propTypes.default.func.isRequired, |
| 986 |
onEnableAll: _propTypes.default.func.isRequired, |
| 987 |
onSaveChanges: _propTypes.default.func.isRequired, |
| 988 |
isSaving: _propTypes.default.bool, |
| 989 |
hasUnsavedChanges: _propTypes.default.bool |
| 990 |
}; |
| 991 |
|
| 992 |
/***/ }), |
| 993 |
|
| 994 |
/***/ "../modules/element-manager/assets/js/app-editor-one/components/UsageTimesColumn.js": |
| 995 |
/*!******************************************************************************************!*\ |
| 996 |
!*** ../modules/element-manager/assets/js/app-editor-one/components/UsageTimesColumn.js ***! |
| 997 |
\******************************************************************************************/ |
| 998 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 999 |
|
| 1000 |
"use strict"; |
| 1001 |
|
| 1002 |
|
| 1003 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1004 |
Object.defineProperty(exports, "__esModule", ({ |
| 1005 |
value: true |
| 1006 |
})); |
| 1007 |
exports.UsageTimesColumn = void 0; |
| 1008 |
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 1009 |
var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 1010 |
var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 1011 |
var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 1012 |
var UsageTimesColumn = exports.UsageTimesColumn = function UsageTimesColumn(_ref) { |
| 1013 |
var widgetName = _ref.widgetName, |
| 1014 |
usageData = _ref.usageData, |
| 1015 |
isLoading = _ref.isLoading, |
| 1016 |
getWidgetUsage = _ref.getWidgetUsage, |
| 1017 |
onScanClick = _ref.onScanClick; |
| 1018 |
if (null !== usageData) { |
| 1019 |
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, getWidgetUsage(widgetName), " ", (0, _i18n.__)('times', 'elementor')); |
| 1020 |
} |
| 1021 |
if (isLoading) { |
| 1022 |
return /*#__PURE__*/_react.default.createElement(_ui.CircularProgress, { |
| 1023 |
color: "secondary", |
| 1024 |
size: 20 |
| 1025 |
}); |
| 1026 |
} |
| 1027 |
return /*#__PURE__*/_react.default.createElement(_ui.Button, { |
| 1028 |
onClick: onScanClick, |
| 1029 |
size: "small", |
| 1030 |
variant: "outlined", |
| 1031 |
color: "secondary", |
| 1032 |
className: "e-id-elementor-element-manager-button-show-usage", |
| 1033 |
sx: { |
| 1034 |
minWidth: function minWidth(theme) { |
| 1035 |
return theme.spacing(6); |
| 1036 |
}, |
| 1037 |
height: 26 |
| 1038 |
} |
| 1039 |
}, (0, _i18n.__)('Show', 'elementor')); |
| 1040 |
}; |
| 1041 |
UsageTimesColumn.propTypes = { |
| 1042 |
widgetName: _propTypes.default.string.isRequired, |
| 1043 |
usageData: _propTypes.default.object, |
| 1044 |
isLoading: _propTypes.default.bool, |
| 1045 |
getWidgetUsage: _propTypes.default.func.isRequired, |
| 1046 |
onScanClick: _propTypes.default.func.isRequired |
| 1047 |
}; |
| 1048 |
|
| 1049 |
/***/ }), |
| 1050 |
|
| 1051 |
/***/ "../modules/element-manager/assets/js/app-editor-one/components/WidgetsTable.js": |
| 1052 |
/*!**************************************************************************************!*\ |
| 1053 |
!*** ../modules/element-manager/assets/js/app-editor-one/components/WidgetsTable.js ***! |
| 1054 |
\**************************************************************************************/ |
| 1055 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1056 |
|
| 1057 |
"use strict"; |
| 1058 |
|
| 1059 |
|
| 1060 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1061 |
Object.defineProperty(exports, "__esModule", ({ |
| 1062 |
value: true |
| 1063 |
})); |
| 1064 |
exports.WidgetsTable = void 0; |
| 1065 |
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 1066 |
var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 1067 |
var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); |
| 1068 |
var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 1069 |
var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 1070 |
var _upgradeButton = __webpack_require__(/*! ../../upgrade-button */ "../modules/element-manager/assets/js/upgrade-button.js"); |
| 1071 |
var _RolePermissions = __webpack_require__(/*! ./RolePermissions */ "../modules/element-manager/assets/js/app-editor-one/components/RolePermissions.js"); |
| 1072 |
var _UsageTimesColumn = __webpack_require__(/*! ./UsageTimesColumn */ "../modules/element-manager/assets/js/app-editor-one/components/UsageTimesColumn.js"); |
| 1073 |
var StyledSwitch = (0, _ui.styled)(_ui.Switch)({ |
| 1074 |
'& .MuiSwitch-track': { |
| 1075 |
backgroundColor: 'rgba(0, 0, 0, 0.12);' |
| 1076 |
}, |
| 1077 |
'& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track': { |
| 1078 |
backgroundColor: '#000' |
| 1079 |
}, |
| 1080 |
'& .MuiSwitch-switchBase:not(.Mui-checked) .MuiSwitch-thumb': { |
| 1081 |
backgroundColor: '#D5D8DC' |
| 1082 |
}, |
| 1083 |
'& .MuiSwitch-switchBase.Mui-checked .MuiSwitch-thumb': { |
| 1084 |
backgroundColor: '#fff' |
| 1085 |
} |
| 1086 |
}); |
| 1087 |
var WidgetsTable = exports.WidgetsTable = function WidgetsTable(_ref) { |
| 1088 |
var widgets = _ref.widgets, |
| 1089 |
widgetsDisabled = _ref.widgetsDisabled, |
| 1090 |
widgetsRoleRestrictions = _ref.widgetsRoleRestrictions, |
| 1091 |
setWidgetsRoleRestrictions = _ref.setWidgetsRoleRestrictions, |
| 1092 |
roles = _ref.roles, |
| 1093 |
promotionWidgets = _ref.promotionWidgets, |
| 1094 |
promotionData = _ref.promotionData, |
| 1095 |
usageWidgets = _ref.usageWidgets, |
| 1096 |
getWidgetUsage = _ref.getWidgetUsage, |
| 1097 |
onScanUsage = _ref.onScanUsage, |
| 1098 |
onToggleWidget = _ref.onToggleWidget, |
| 1099 |
getSortingIndicatorClasses = _ref.getSortingIndicatorClasses, |
| 1100 |
onSortingClicked = _ref.onSortingClicked; |
| 1101 |
var managerPermissions = promotionData.manager_permissions; |
| 1102 |
var sortingClasses = getSortingIndicatorClasses('widget'); |
| 1103 |
var isWidgetSorted = sortingClasses.includes('sorted'); |
| 1104 |
var widgetSortDirection = sortingClasses.includes('asc') ? 'asc' : 'desc'; |
| 1105 |
var usageSortingClasses = getSortingIndicatorClasses('usage'); |
| 1106 |
var isUsageSorted = usageSortingClasses.includes('sorted'); |
| 1107 |
var usageSortDirection = usageSortingClasses.includes('asc') ? 'asc' : 'desc'; |
| 1108 |
if (!widgets.length) { |
| 1109 |
return /*#__PURE__*/_react.default.createElement(_ui.Typography, { |
| 1110 |
color: "text.secondary" |
| 1111 |
}, (0, _i18n.__)('No elements found.', 'elementor')); |
| 1112 |
} |
| 1113 |
return /*#__PURE__*/_react.default.createElement(_ui.TableContainer, { |
| 1114 |
component: _ui.Paper, |
| 1115 |
variant: "outlined" |
| 1116 |
}, /*#__PURE__*/_react.default.createElement(_ui.Table, { |
| 1117 |
size: "small" |
| 1118 |
}, /*#__PURE__*/_react.default.createElement(_ui.TableHead, null, /*#__PURE__*/_react.default.createElement(_ui.TableRow, null, /*#__PURE__*/_react.default.createElement(_ui.TableCell, { |
| 1119 |
sx: function sx(theme) { |
| 1120 |
return { |
| 1121 |
width: theme.spacing(25) |
| 1122 |
}; |
| 1123 |
} |
| 1124 |
}, /*#__PURE__*/_react.default.createElement(_ui.TableSortLabel, { |
| 1125 |
active: isWidgetSorted, |
| 1126 |
direction: isWidgetSorted ? widgetSortDirection : 'asc', |
| 1127 |
onClick: function onClick() { |
| 1128 |
return onSortingClicked('widget'); |
| 1129 |
}, |
| 1130 |
"data-id": "e-id-elementor-element-manager-button-sort-by-element" |
| 1131 |
}, (0, _i18n.__)('Element', 'elementor'))), /*#__PURE__*/_react.default.createElement(_ui.TableCell, { |
| 1132 |
sx: function sx(theme) { |
| 1133 |
return { |
| 1134 |
width: theme.spacing(10) |
| 1135 |
}; |
| 1136 |
} |
| 1137 |
}, (0, _i18n.__)('Status', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(_ui.TableSortLabel, { |
| 1138 |
active: isUsageSorted, |
| 1139 |
direction: isUsageSorted ? usageSortDirection : 'asc', |
| 1140 |
onClick: function onClick() { |
| 1141 |
return onSortingClicked('usage'); |
| 1142 |
}, |
| 1143 |
"data-id": "e-id-elementor-element-manager-button-sort-by-usage" |
| 1144 |
}, (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, { |
| 1145 |
direction: "row", |
| 1146 |
justifyContent: "flex-start", |
| 1147 |
alignItems: "center", |
| 1148 |
gap: 1 |
| 1149 |
}, /*#__PURE__*/_react.default.createElement(_ui.Box, null, (0, _i18n.__)('Permission', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_ui.Tooltip, { |
| 1150 |
placement: "top", |
| 1151 |
title: (0, _i18n.__)('Choose which users will have access to each widget.', 'elementor') |
| 1152 |
}, /*#__PURE__*/_react.default.createElement(_ui.IconButton, { |
| 1153 |
size: "small" |
| 1154 |
}, /*#__PURE__*/_react.default.createElement(_icons.HelpIcon, { |
| 1155 |
fontSize: "small" |
| 1156 |
})))), null === widgetsRoleRestrictions && /*#__PURE__*/_react.default.createElement(_ui.Box, { |
| 1157 |
sx: { |
| 1158 |
marginInlineStart: 1 |
| 1159 |
} |
| 1160 |
}, /*#__PURE__*/_react.default.createElement(_upgradeButton.UpgradeButton, { |
| 1161 |
href: promotionWidgets.length ? managerPermissions.pro.url : managerPermissions.advanced.url, |
| 1162 |
size: "small", |
| 1163 |
text: promotionWidgets.length ? managerPermissions.pro.text : managerPermissions.advanced.text, |
| 1164 |
className: "go-pro", |
| 1165 |
"data-id": "e-id-elementor-element-manager-button-upgrade-permissions" |
| 1166 |
})))))), /*#__PURE__*/_react.default.createElement(_ui.TableBody, null, widgets.map(function (widget) { |
| 1167 |
return /*#__PURE__*/_react.default.createElement(_ui.TableRow, { |
| 1168 |
key: widget.name, |
| 1169 |
"data-key-id": widget.name, |
| 1170 |
hover: true |
| 1171 |
}, /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(_ui.Box, { |
| 1172 |
sx: { |
| 1173 |
display: 'flex', |
| 1174 |
alignItems: 'center' |
| 1175 |
} |
| 1176 |
}, /*#__PURE__*/_react.default.createElement("i", { |
| 1177 |
style: { |
| 1178 |
marginInlineEnd: 8, |
| 1179 |
marginInlineStart: 0, |
| 1180 |
display: 'inline-block' |
| 1181 |
}, |
| 1182 |
className: widget.icon |
| 1183 |
}), widget.title)), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(StyledSwitch, { |
| 1184 |
color: "secondary", |
| 1185 |
checked: !widgetsDisabled.includes(widget.name), |
| 1186 |
onChange: function onChange(event, checked) { |
| 1187 |
return onToggleWidget(widget.name, checked); |
| 1188 |
}, |
| 1189 |
size: "small", |
| 1190 |
"data-id": "e-id-elementor-element-manager-toggle-".concat(widget.name) |
| 1191 |
})), /*#__PURE__*/_react.default.createElement(_ui.TableCell, null, /*#__PURE__*/_react.default.createElement(_UsageTimesColumn.UsageTimesColumn, { |
| 1192 |
widgetName: widget.name, |
| 1193 |
usageData: usageWidgets.data, |
| 1194 |
isLoading: usageWidgets.isLoading, |
| 1195 |
getWidgetUsage: getWidgetUsage, |
| 1196 |
onScanClick: onScanUsage |
| 1197 |
})), /*#__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, { |
| 1198 |
widgetName: widget.name, |
| 1199 |
roles: roles, |
| 1200 |
widgetsRoleRestrictions: widgetsRoleRestrictions, |
| 1201 |
setWidgetsRoleRestrictions: setWidgetsRoleRestrictions |
| 1202 |
}) : /*#__PURE__*/_react.default.createElement(_RolePermissions.EditButtonDisabled, null))); |
| 1203 |
})))); |
| 1204 |
}; |
| 1205 |
var widgetShape = _propTypes.default.shape({ |
| 1206 |
name: _propTypes.default.string.isRequired, |
| 1207 |
title: _propTypes.default.string.isRequired, |
| 1208 |
icon: _propTypes.default.string, |
| 1209 |
plugin: _propTypes.default.string |
| 1210 |
}); |
| 1211 |
WidgetsTable.propTypes = { |
| 1212 |
widgets: _propTypes.default.arrayOf(widgetShape).isRequired, |
| 1213 |
widgetsDisabled: _propTypes.default.arrayOf(_propTypes.default.string).isRequired, |
| 1214 |
widgetsRoleRestrictions: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.array]), |
| 1215 |
setWidgetsRoleRestrictions: _propTypes.default.func.isRequired, |
| 1216 |
roles: _propTypes.default.array.isRequired, |
| 1217 |
promotionWidgets: _propTypes.default.arrayOf(widgetShape).isRequired, |
| 1218 |
promotionData: _propTypes.default.shape({ |
| 1219 |
manager_permissions: _propTypes.default.shape({ |
| 1220 |
pro: _propTypes.default.shape({ |
| 1221 |
url: _propTypes.default.string, |
| 1222 |
text: _propTypes.default.string |
| 1223 |
}), |
| 1224 |
advanced: _propTypes.default.shape({ |
| 1225 |
url: _propTypes.default.string, |
| 1226 |
text: _propTypes.default.string |
| 1227 |
}) |
| 1228 |
}) |
| 1229 |
}).isRequired, |
| 1230 |
usageWidgets: _propTypes.default.shape({ |
| 1231 |
isLoading: _propTypes.default.bool, |
| 1232 |
data: _propTypes.default.object |
| 1233 |
}).isRequired, |
| 1234 |
getWidgetUsage: _propTypes.default.func.isRequired, |
| 1235 |
onScanUsage: _propTypes.default.func.isRequired, |
| 1236 |
onToggleWidget: _propTypes.default.func.isRequired, |
| 1237 |
getSortingIndicatorClasses: _propTypes.default.func.isRequired, |
| 1238 |
onSortingClicked: _propTypes.default.func.isRequired |
| 1239 |
}; |
| 1240 |
|
| 1241 |
/***/ }), |
| 1242 |
|
| 1243 |
/***/ "../modules/element-manager/assets/js/app-editor-one/components/index.js": |
| 1244 |
/*!*******************************************************************************!*\ |
| 1245 |
!*** ../modules/element-manager/assets/js/app-editor-one/components/index.js ***! |
| 1246 |
\*******************************************************************************/ |
| 1247 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1248 |
|
| 1249 |
"use strict"; |
| 1250 |
|
| 1251 |
|
| 1252 |
Object.defineProperty(exports, "__esModule", ({ |
| 1253 |
value: true |
| 1254 |
})); |
| 1255 |
Object.defineProperty(exports, "ConfirmDialog", ({ |
| 1256 |
enumerable: true, |
| 1257 |
get: function get() { |
| 1258 |
return _ConfirmDialog.ConfirmDialog; |
| 1259 |
} |
| 1260 |
})); |
| 1261 |
Object.defineProperty(exports, "EditButtonDisabled", ({ |
| 1262 |
enumerable: true, |
| 1263 |
get: function get() { |
| 1264 |
return _RolePermissions.EditButtonDisabled; |
| 1265 |
} |
| 1266 |
})); |
| 1267 |
Object.defineProperty(exports, "NoticeAlert", ({ |
| 1268 |
enumerable: true, |
| 1269 |
get: function get() { |
| 1270 |
return _NoticeAlert.NoticeAlert; |
| 1271 |
} |
| 1272 |
})); |
| 1273 |
Object.defineProperty(exports, "PromotionWidgetsTable", ({ |
| 1274 |
enumerable: true, |
| 1275 |
get: function get() { |
| 1276 |
return _PromotionWidgetsTable.PromotionWidgetsTable; |
| 1277 |
} |
| 1278 |
})); |
| 1279 |
Object.defineProperty(exports, "RolePermissions", ({ |
| 1280 |
enumerable: true, |
| 1281 |
get: function get() { |
| 1282 |
return _RolePermissions.RolePermissions; |
| 1283 |
} |
| 1284 |
})); |
| 1285 |
Object.defineProperty(exports, "SearchFilters", ({ |
| 1286 |
enumerable: true, |
| 1287 |
get: function get() { |
| 1288 |
return _SearchFilters.SearchFilters; |
| 1289 |
} |
| 1290 |
})); |
| 1291 |
Object.defineProperty(exports, "UsageTimesColumn", ({ |
| 1292 |
enumerable: true, |
| 1293 |
get: function get() { |
| 1294 |
return _UsageTimesColumn.UsageTimesColumn; |
| 1295 |
} |
| 1296 |
})); |
| 1297 |
Object.defineProperty(exports, "WidgetsTable", ({ |
| 1298 |
enumerable: true, |
| 1299 |
get: function get() { |
| 1300 |
return _WidgetsTable.WidgetsTable; |
| 1301 |
} |
| 1302 |
})); |
| 1303 |
var _UsageTimesColumn = __webpack_require__(/*! ./UsageTimesColumn */ "../modules/element-manager/assets/js/app-editor-one/components/UsageTimesColumn.js"); |
| 1304 |
var _NoticeAlert = __webpack_require__(/*! ./NoticeAlert */ "../modules/element-manager/assets/js/app-editor-one/components/NoticeAlert.js"); |
| 1305 |
var _ConfirmDialog = __webpack_require__(/*! ./ConfirmDialog */ "../modules/element-manager/assets/js/app-editor-one/components/ConfirmDialog.js"); |
| 1306 |
var _SearchFilters = __webpack_require__(/*! ./SearchFilters */ "../modules/element-manager/assets/js/app-editor-one/components/SearchFilters.js"); |
| 1307 |
var _WidgetsTable = __webpack_require__(/*! ./WidgetsTable */ "../modules/element-manager/assets/js/app-editor-one/components/WidgetsTable.js"); |
| 1308 |
var _PromotionWidgetsTable = __webpack_require__(/*! ./PromotionWidgetsTable */ "../modules/element-manager/assets/js/app-editor-one/components/PromotionWidgetsTable.js"); |
| 1309 |
var _RolePermissions = __webpack_require__(/*! ./RolePermissions */ "../modules/element-manager/assets/js/app-editor-one/components/RolePermissions.js"); |
| 1310 |
|
| 1311 |
/***/ }), |
| 1312 |
|
| 1313 |
/***/ "../modules/element-manager/assets/js/app-editor-one/hooks/index.js": |
| 1314 |
/*!**************************************************************************!*\ |
| 1315 |
!*** ../modules/element-manager/assets/js/app-editor-one/hooks/index.js ***! |
| 1316 |
\**************************************************************************/ |
| 1317 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1318 |
|
| 1319 |
"use strict"; |
| 1320 |
|
| 1321 |
|
| 1322 |
Object.defineProperty(exports, "__esModule", ({ |
| 1323 |
value: true |
| 1324 |
})); |
| 1325 |
Object.defineProperty(exports, "useElementManager", ({ |
| 1326 |
enumerable: true, |
| 1327 |
get: function get() { |
| 1328 |
return _useElementManager.useElementManager; |
| 1329 |
} |
| 1330 |
})); |
| 1331 |
Object.defineProperty(exports, "useWidgetFilters", ({ |
| 1332 |
enumerable: true, |
| 1333 |
get: function get() { |
| 1334 |
return _useWidgetFilters.useWidgetFilters; |
| 1335 |
} |
| 1336 |
})); |
| 1337 |
var _useElementManager = __webpack_require__(/*! ./useElementManager */ "../modules/element-manager/assets/js/app-editor-one/hooks/useElementManager.js"); |
| 1338 |
var _useWidgetFilters = __webpack_require__(/*! ./useWidgetFilters */ "../modules/element-manager/assets/js/app-editor-one/hooks/useWidgetFilters.js"); |
| 1339 |
|
| 1340 |
/***/ }), |
| 1341 |
|
| 1342 |
/***/ "../modules/element-manager/assets/js/app-editor-one/hooks/useElementManager.js": |
| 1343 |
/*!**************************************************************************************!*\ |
| 1344 |
!*** ../modules/element-manager/assets/js/app-editor-one/hooks/useElementManager.js ***! |
| 1345 |
\**************************************************************************************/ |
| 1346 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1347 |
|
| 1348 |
"use strict"; |
| 1349 |
|
| 1350 |
|
| 1351 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1352 |
Object.defineProperty(exports, "__esModule", ({ |
| 1353 |
value: true |
| 1354 |
})); |
| 1355 |
exports.useElementManager = void 0; |
| 1356 |
var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); |
| 1357 |
var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js")); |
| 1358 |
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 1359 |
var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); |
| 1360 |
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 1361 |
var _react = __webpack_require__(/*! react */ "react"); |
| 1362 |
var _api = __webpack_require__(/*! ../../api */ "../modules/element-manager/assets/js/api.js"); |
| 1363 |
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; } |
| 1364 |
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; } |
| 1365 |
var useElementManager = exports.useElementManager = function useElementManager() { |
| 1366 |
var isInitialMount = (0, _react.useRef)(true); |
| 1367 |
var _useState = (0, _react.useState)(true), |
| 1368 |
_useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| 1369 |
isLoading = _useState2[0], |
| 1370 |
setIsLoading = _useState2[1]; |
| 1371 |
var _useState3 = (0, _react.useState)([]), |
| 1372 |
_useState4 = (0, _slicedToArray2.default)(_useState3, 2), |
| 1373 |
widgets = _useState4[0], |
| 1374 |
setWidgets = _useState4[1]; |
| 1375 |
var _useState5 = (0, _react.useState)([]), |
| 1376 |
_useState6 = (0, _slicedToArray2.default)(_useState5, 2), |
| 1377 |
promotionWidgets = _useState6[0], |
| 1378 |
setPromotionWidgets = _useState6[1]; |
| 1379 |
var _useState7 = (0, _react.useState)([]), |
| 1380 |
_useState8 = (0, _slicedToArray2.default)(_useState7, 2), |
| 1381 |
plugins = _useState8[0], |
| 1382 |
setPlugins = _useState8[1]; |
| 1383 |
var _useState9 = (0, _react.useState)([]), |
| 1384 |
_useState0 = (0, _slicedToArray2.default)(_useState9, 2), |
| 1385 |
roles = _useState0[0], |
| 1386 |
setRoles = _useState0[1]; |
| 1387 |
var _useState1 = (0, _react.useState)([]), |
| 1388 |
_useState10 = (0, _slicedToArray2.default)(_useState1, 2), |
| 1389 |
widgetsDisabled = _useState10[0], |
| 1390 |
setWidgetsDisabled = _useState10[1]; |
| 1391 |
var _useState11 = (0, _react.useState)(null), |
| 1392 |
_useState12 = (0, _slicedToArray2.default)(_useState11, 2), |
| 1393 |
widgetsRoleRestrictions = _useState12[0], |
| 1394 |
setWidgetsRoleRestrictions = _useState12[1]; |
| 1395 |
var _useState13 = (0, _react.useState)([]), |
| 1396 |
_useState14 = (0, _slicedToArray2.default)(_useState13, 2), |
| 1397 |
promotionData = _useState14[0], |
| 1398 |
setPromotionData = _useState14[1]; |
| 1399 |
var _useState15 = (0, _react.useState)(null), |
| 1400 |
_useState16 = (0, _slicedToArray2.default)(_useState15, 2), |
| 1401 |
noticeData = _useState16[0], |
| 1402 |
setNoticeData = _useState16[1]; |
| 1403 |
var _useState17 = (0, _react.useState)({ |
| 1404 |
isLoading: false, |
| 1405 |
data: null |
| 1406 |
}), |
| 1407 |
_useState18 = (0, _slicedToArray2.default)(_useState17, 2), |
| 1408 |
usageWidgets = _useState18[0], |
| 1409 |
setUsageWidgets = _useState18[1]; |
| 1410 |
var _useState19 = (0, _react.useState)({ |
| 1411 |
isSaving: false, |
| 1412 |
isUnsavedChanges: false |
| 1413 |
}), |
| 1414 |
_useState20 = (0, _slicedToArray2.default)(_useState19, 2), |
| 1415 |
changeProgress = _useState20[0], |
| 1416 |
setChangeProgress = _useState20[1]; |
| 1417 |
var _useState21 = (0, _react.useState)(false), |
| 1418 |
_useState22 = (0, _slicedToArray2.default)(_useState21, 2), |
| 1419 |
isSnackbarOpen = _useState22[0], |
| 1420 |
setIsSnackbarOpen = _useState22[1]; |
| 1421 |
var getWidgetUsage = (0, _react.useCallback)(function (widgetName) { |
| 1422 |
if (!usageWidgets.data || !usageWidgets.data.hasOwnProperty(widgetName)) { |
| 1423 |
return 0; |
| 1424 |
} |
| 1425 |
return usageWidgets.data[widgetName]; |
| 1426 |
}, [usageWidgets.data]); |
| 1427 |
var scanUsageElements = (0, _react.useCallback)(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { |
| 1428 |
var data; |
| 1429 |
return _regenerator.default.wrap(function (_context) { |
| 1430 |
while (1) switch (_context.prev = _context.next) { |
| 1431 |
case 0: |
| 1432 |
setUsageWidgets(function (prev) { |
| 1433 |
return _objectSpread(_objectSpread({}, prev), {}, { |
| 1434 |
isLoading: true |
| 1435 |
}); |
| 1436 |
}); |
| 1437 |
_context.next = 1; |
| 1438 |
return (0, _api.getUsageWidgets)(); |
| 1439 |
case 1: |
| 1440 |
data = _context.sent; |
| 1441 |
setUsageWidgets({ |
| 1442 |
data: data, |
| 1443 |
isLoading: false |
| 1444 |
}); |
| 1445 |
return _context.abrupt("return", data); |
| 1446 |
case 2: |
| 1447 |
case "end": |
| 1448 |
return _context.stop(); |
| 1449 |
} |
| 1450 |
}, _callee); |
| 1451 |
})), []); |
| 1452 |
var saveChanges = (0, _react.useCallback)(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { |
| 1453 |
return _regenerator.default.wrap(function (_context2) { |
| 1454 |
while (1) switch (_context2.prev = _context2.next) { |
| 1455 |
case 0: |
| 1456 |
setChangeProgress(function (prev) { |
| 1457 |
return _objectSpread(_objectSpread({}, prev), {}, { |
| 1458 |
isSaving: true |
| 1459 |
}); |
| 1460 |
}); |
| 1461 |
_context2.next = 1; |
| 1462 |
return (0, _api.saveDisabledWidgets)(widgetsDisabled, widgetsRoleRestrictions); |
| 1463 |
case 1: |
| 1464 |
setChangeProgress({ |
| 1465 |
isSaving: false, |
| 1466 |
isUnsavedChanges: false |
| 1467 |
}); |
| 1468 |
setIsSnackbarOpen(true); |
| 1469 |
case 2: |
| 1470 |
case "end": |
| 1471 |
return _context2.stop(); |
| 1472 |
} |
| 1473 |
}, _callee2); |
| 1474 |
})), [widgetsDisabled, widgetsRoleRestrictions]); |
| 1475 |
var deactivateAllUnusedWidgets = (0, _react.useCallback)(function () { |
| 1476 |
if (!usageWidgets.data) { |
| 1477 |
return; |
| 1478 |
} |
| 1479 |
var widgetsToDeactivate = widgets.filter(function (widget) { |
| 1480 |
return !usageWidgets.data.hasOwnProperty(widget.name) || widgetsDisabled.includes(widget.name); |
| 1481 |
}); |
| 1482 |
setWidgetsDisabled(widgetsToDeactivate.map(function (widget) { |
| 1483 |
return widget.name; |
| 1484 |
})); |
| 1485 |
}, [widgets, usageWidgets.data, widgetsDisabled]); |
| 1486 |
var enableAllWidgets = (0, _react.useCallback)(function () { |
| 1487 |
setWidgetsDisabled([]); |
| 1488 |
}, []); |
| 1489 |
var toggleWidget = (0, _react.useCallback)(function (widgetName, isEnabled) { |
| 1490 |
if (isEnabled) { |
| 1491 |
setWidgetsDisabled(function (prev) { |
| 1492 |
return prev.filter(function (item) { |
| 1493 |
return item !== widgetName; |
| 1494 |
}); |
| 1495 |
}); |
| 1496 |
} else { |
| 1497 |
setWidgetsDisabled(function (prev) { |
| 1498 |
return [].concat((0, _toConsumableArray2.default)(prev), [widgetName]); |
| 1499 |
}); |
| 1500 |
} |
| 1501 |
}, []); |
| 1502 |
var dismissNotice = (0, _react.useCallback)(function () { |
| 1503 |
if (noticeData) { |
| 1504 |
(0, _api.markNoticeViewed)(noticeData.notice_id, noticeData.nonce); |
| 1505 |
setNoticeData(function (prev) { |
| 1506 |
return _objectSpread(_objectSpread({}, prev), {}, { |
| 1507 |
is_viewed: true |
| 1508 |
}); |
| 1509 |
}); |
| 1510 |
} |
| 1511 |
}, [noticeData]); |
| 1512 |
(0, _react.useEffect)(function () { |
| 1513 |
var loadData = /*#__PURE__*/function () { |
| 1514 |
var _ref3 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() { |
| 1515 |
var _appData$additional_d, _appData$additional_d2; |
| 1516 |
var appData, pluginsData; |
| 1517 |
return _regenerator.default.wrap(function (_context3) { |
| 1518 |
while (1) switch (_context3.prev = _context3.next) { |
| 1519 |
case 0: |
| 1520 |
_context3.next = 1; |
| 1521 |
return (0, _api.getAdminAppData)(); |
| 1522 |
case 1: |
| 1523 |
appData = _context3.sent; |
| 1524 |
setNoticeData(appData.notice_data); |
| 1525 |
setWidgetsDisabled(appData.disabled_elements); |
| 1526 |
setWidgets(appData.widgets); |
| 1527 |
setPromotionWidgets(appData.promotion_widgets); |
| 1528 |
setPromotionData(appData.promotion_data); |
| 1529 |
if ((_appData$additional_d = appData.additional_data) !== null && _appData$additional_d !== void 0 && _appData$additional_d.roles) { |
| 1530 |
setRoles(appData.additional_data.roles); |
| 1531 |
} |
| 1532 |
if ((_appData$additional_d2 = appData.additional_data) !== null && _appData$additional_d2 !== void 0 && _appData$additional_d2.role_restrictions) { |
| 1533 |
setWidgetsRoleRestrictions(appData.additional_data.role_restrictions); |
| 1534 |
} |
| 1535 |
pluginsData = appData.plugins.map(function (plugin) { |
| 1536 |
return { |
| 1537 |
label: plugin, |
| 1538 |
value: plugin |
| 1539 |
}; |
| 1540 |
}); |
| 1541 |
pluginsData.unshift({ |
| 1542 |
label: 'All Plugins', |
| 1543 |
value: '' |
| 1544 |
}); |
| 1545 |
setPlugins(pluginsData); |
| 1546 |
setIsLoading(false); |
| 1547 |
setChangeProgress(function (prev) { |
| 1548 |
return _objectSpread(_objectSpread({}, prev), {}, { |
| 1549 |
isUnsavedChanges: false |
| 1550 |
}); |
| 1551 |
}); |
| 1552 |
case 2: |
| 1553 |
case "end": |
| 1554 |
return _context3.stop(); |
| 1555 |
} |
| 1556 |
}, _callee3); |
| 1557 |
})); |
| 1558 |
return function loadData() { |
| 1559 |
return _ref3.apply(this, arguments); |
| 1560 |
}; |
| 1561 |
}(); |
| 1562 |
loadData(); |
| 1563 |
}, []); |
| 1564 |
(0, _react.useEffect)(function () { |
| 1565 |
if (isLoading) { |
| 1566 |
return; |
| 1567 |
} |
| 1568 |
if (isInitialMount.current) { |
| 1569 |
isInitialMount.current = false; |
| 1570 |
return; |
| 1571 |
} |
| 1572 |
setChangeProgress(function (prev) { |
| 1573 |
return _objectSpread(_objectSpread({}, prev), {}, { |
| 1574 |
isUnsavedChanges: true |
| 1575 |
}); |
| 1576 |
}); |
| 1577 |
}, [widgetsDisabled, widgetsRoleRestrictions, isLoading]); |
| 1578 |
(0, _react.useEffect)(function () { |
| 1579 |
var handleBeforeUnload = function handleBeforeUnload(event) { |
| 1580 |
event.preventDefault(); |
| 1581 |
event.returnValue = ''; |
| 1582 |
}; |
| 1583 |
if (changeProgress.isUnsavedChanges) { |
| 1584 |
window.addEventListener('beforeunload', handleBeforeUnload); |
| 1585 |
} else { |
| 1586 |
window.removeEventListener('beforeunload', handleBeforeUnload); |
| 1587 |
} |
| 1588 |
return function () { |
| 1589 |
window.removeEventListener('beforeunload', handleBeforeUnload); |
| 1590 |
}; |
| 1591 |
}, [changeProgress.isUnsavedChanges]); |
| 1592 |
return { |
| 1593 |
isLoading: isLoading, |
| 1594 |
widgets: widgets, |
| 1595 |
promotionWidgets: promotionWidgets, |
| 1596 |
plugins: plugins, |
| 1597 |
roles: roles, |
| 1598 |
widgetsDisabled: widgetsDisabled, |
| 1599 |
widgetsRoleRestrictions: widgetsRoleRestrictions, |
| 1600 |
setWidgetsRoleRestrictions: setWidgetsRoleRestrictions, |
| 1601 |
promotionData: promotionData, |
| 1602 |
noticeData: noticeData, |
| 1603 |
usageWidgets: usageWidgets, |
| 1604 |
changeProgress: changeProgress, |
| 1605 |
isSnackbarOpen: isSnackbarOpen, |
| 1606 |
setIsSnackbarOpen: setIsSnackbarOpen, |
| 1607 |
getWidgetUsage: getWidgetUsage, |
| 1608 |
scanUsageElements: scanUsageElements, |
| 1609 |
saveChanges: saveChanges, |
| 1610 |
deactivateAllUnusedWidgets: deactivateAllUnusedWidgets, |
| 1611 |
enableAllWidgets: enableAllWidgets, |
| 1612 |
toggleWidget: toggleWidget, |
| 1613 |
dismissNotice: dismissNotice |
| 1614 |
}; |
| 1615 |
}; |
| 1616 |
|
| 1617 |
/***/ }), |
| 1618 |
|
| 1619 |
/***/ "../modules/element-manager/assets/js/app-editor-one/hooks/useWidgetFilters.js": |
| 1620 |
/*!*************************************************************************************!*\ |
| 1621 |
!*** ../modules/element-manager/assets/js/app-editor-one/hooks/useWidgetFilters.js ***! |
| 1622 |
\*************************************************************************************/ |
| 1623 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1624 |
|
| 1625 |
"use strict"; |
| 1626 |
|
| 1627 |
|
| 1628 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1629 |
Object.defineProperty(exports, "__esModule", ({ |
| 1630 |
value: true |
| 1631 |
})); |
| 1632 |
exports.useWidgetFilters = void 0; |
| 1633 |
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 1634 |
var _react = __webpack_require__(/*! react */ "react"); |
| 1635 |
var useWidgetFilters = exports.useWidgetFilters = function useWidgetFilters(widgets, widgetsDisabled, getWidgetUsage) { |
| 1636 |
var _useState = (0, _react.useState)(''), |
| 1637 |
_useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| 1638 |
searchKeyword = _useState2[0], |
| 1639 |
setSearchKeyword = _useState2[1]; |
| 1640 |
var _useState3 = (0, _react.useState)('widget'), |
| 1641 |
_useState4 = (0, _slicedToArray2.default)(_useState3, 2), |
| 1642 |
sortingColumn = _useState4[0], |
| 1643 |
setSortingColumn = _useState4[1]; |
| 1644 |
var _useState5 = (0, _react.useState)('asc'), |
| 1645 |
_useState6 = (0, _slicedToArray2.default)(_useState5, 2), |
| 1646 |
sortingDirection = _useState6[0], |
| 1647 |
setSortingDirection = _useState6[1]; |
| 1648 |
var _useState7 = (0, _react.useState)(''), |
| 1649 |
_useState8 = (0, _slicedToArray2.default)(_useState7, 2), |
| 1650 |
filterByPlugin = _useState8[0], |
| 1651 |
setFilterByPlugin = _useState8[1]; |
| 1652 |
var _useState9 = (0, _react.useState)('all'), |
| 1653 |
_useState0 = (0, _slicedToArray2.default)(_useState9, 2), |
| 1654 |
filterByStatus = _useState0[0], |
| 1655 |
setFilterByStatus = _useState0[1]; |
| 1656 |
var sortedAndFilteredWidgets = (0, _react.useMemo)(function () { |
| 1657 |
var filteredWidgets = widgets.filter(function (widget) { |
| 1658 |
return widget.title.toLowerCase().includes(searchKeyword.toLowerCase()); |
| 1659 |
}); |
| 1660 |
if ('' !== filterByPlugin) { |
| 1661 |
filteredWidgets = filteredWidgets.filter(function (widget) { |
| 1662 |
return widget.plugin.toLowerCase() === filterByPlugin.toLowerCase(); |
| 1663 |
}); |
| 1664 |
} |
| 1665 |
if ('all' !== filterByStatus) { |
| 1666 |
filteredWidgets = filteredWidgets.filter(function (widget) { |
| 1667 |
if ('active' === filterByStatus) { |
| 1668 |
return !widgetsDisabled.includes(widget.name); |
| 1669 |
} |
| 1670 |
return widgetsDisabled.includes(widget.name); |
| 1671 |
}); |
| 1672 |
} |
| 1673 |
filteredWidgets.sort(function (a, b) { |
| 1674 |
var aValue; |
| 1675 |
var bValue; |
| 1676 |
if ('widget' === sortingColumn) { |
| 1677 |
aValue = a.title; |
| 1678 |
bValue = b.title; |
| 1679 |
} |
| 1680 |
if ('usage' === sortingColumn) { |
| 1681 |
aValue = getWidgetUsage(a.name); |
| 1682 |
bValue = getWidgetUsage(b.name); |
| 1683 |
} |
| 1684 |
if (aValue === bValue) { |
| 1685 |
return 0; |
| 1686 |
} |
| 1687 |
if ('asc' === sortingDirection) { |
| 1688 |
return aValue < bValue ? -1 : 1; |
| 1689 |
} |
| 1690 |
return aValue > bValue ? -1 : 1; |
| 1691 |
}); |
| 1692 |
return filteredWidgets; |
| 1693 |
}, [widgets, searchKeyword, sortingColumn, sortingDirection, filterByPlugin, filterByStatus, widgetsDisabled, getWidgetUsage]); |
| 1694 |
var getSortingIndicatorClasses = (0, _react.useCallback)(function (column) { |
| 1695 |
if (sortingColumn !== column) { |
| 1696 |
return ''; |
| 1697 |
} |
| 1698 |
return 'asc' === sortingDirection ? 'sorted asc' : 'sorted desc'; |
| 1699 |
}, [sortingColumn, sortingDirection]); |
| 1700 |
var onSortingClicked = (0, _react.useCallback)(function (column) { |
| 1701 |
if (sortingColumn === column) { |
| 1702 |
setSortingDirection(function (prev) { |
| 1703 |
return 'asc' === prev ? 'desc' : 'asc'; |
| 1704 |
}); |
| 1705 |
} else { |
| 1706 |
setSortingColumn(column); |
| 1707 |
setSortingDirection('asc'); |
| 1708 |
} |
| 1709 |
}, [sortingColumn]); |
| 1710 |
var setSortByUsage = (0, _react.useCallback)(function () { |
| 1711 |
setSortingColumn('usage'); |
| 1712 |
setSortingDirection('desc'); |
| 1713 |
}, []); |
| 1714 |
return { |
| 1715 |
searchKeyword: searchKeyword, |
| 1716 |
setSearchKeyword: setSearchKeyword, |
| 1717 |
filterByPlugin: filterByPlugin, |
| 1718 |
setFilterByPlugin: setFilterByPlugin, |
| 1719 |
filterByStatus: filterByStatus, |
| 1720 |
setFilterByStatus: setFilterByStatus, |
| 1721 |
sortedAndFilteredWidgets: sortedAndFilteredWidgets, |
| 1722 |
getSortingIndicatorClasses: getSortingIndicatorClasses, |
| 1723 |
onSortingClicked: onSortingClicked, |
| 1724 |
setSortByUsage: setSortByUsage |
| 1725 |
}; |
| 1726 |
}; |
| 1727 |
|
| 1728 |
/***/ }), |
| 1729 |
|
| 1730 |
/***/ "../modules/element-manager/assets/js/app-editor-one/index.js": |
| 1731 |
/*!********************************************************************!*\ |
| 1732 |
!*** ../modules/element-manager/assets/js/app-editor-one/index.js ***! |
| 1733 |
\********************************************************************/ |
| 1734 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1735 |
|
| 1736 |
"use strict"; |
| 1737 |
|
| 1738 |
|
| 1739 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1740 |
Object.defineProperty(exports, "__esModule", ({ |
| 1741 |
value: true |
| 1742 |
})); |
| 1743 |
exports.AppModern = void 0; |
| 1744 |
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 1745 |
var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 1746 |
var _App = __webpack_require__(/*! ./App */ "../modules/element-manager/assets/js/app-editor-one/App.js"); |
| 1747 |
var AppModern = exports.AppModern = function AppModern() { |
| 1748 |
var _elementorCommon$conf; |
| 1749 |
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'); |
| 1750 |
return /*#__PURE__*/_react.default.createElement(_ui.DirectionProvider, { |
| 1751 |
rtl: isRTL |
| 1752 |
}, /*#__PURE__*/_react.default.createElement(_ui.ThemeProvider, { |
| 1753 |
colorScheme: "light" |
| 1754 |
}, /*#__PURE__*/_react.default.createElement(_App.App, null))); |
| 1755 |
}; |
| 1756 |
|
| 1757 |
/***/ }), |
| 1758 |
|
| 1759 |
/***/ "../modules/element-manager/assets/js/upgrade-button.js": |
| 1760 |
/*!**************************************************************!*\ |
| 1761 |
!*** ../modules/element-manager/assets/js/upgrade-button.js ***! |
| 1762 |
\**************************************************************/ |
| 1763 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1764 |
|
| 1765 |
"use strict"; |
| 1766 |
|
| 1767 |
|
| 1768 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1769 |
Object.defineProperty(exports, "__esModule", ({ |
| 1770 |
value: true |
| 1771 |
})); |
| 1772 |
exports.UpgradeButton = void 0; |
| 1773 |
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 1774 |
var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js")); |
| 1775 |
var _components = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); |
| 1776 |
var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); |
| 1777 |
var UpgradeButton = exports.UpgradeButton = function UpgradeButton(props) { |
| 1778 |
var trackingClass = props.className || 'e-id-elementor-element-manager-button-upgrade'; |
| 1779 |
return /*#__PURE__*/_react.default.createElement(_components.Button, (0, _extends2.default)({}, props, { |
| 1780 |
variant: "primary", |
| 1781 |
target: "_blank", |
| 1782 |
rel: 'noreferrer', |
| 1783 |
style: { |
| 1784 |
background: 'var(--e-a-btn-bg-accent, #93003f)' |
| 1785 |
}, |
| 1786 |
className: trackingClass |
| 1787 |
})); |
| 1788 |
}; |
| 1789 |
UpgradeButton.propTypes = { |
| 1790 |
className: _propTypes.default.string |
| 1791 |
}; |
| 1792 |
|
| 1793 |
/***/ }), |
| 1794 |
|
| 1795 |
/***/ "../node_modules/@babel/runtime/helpers/OverloadYield.js": |
| 1796 |
/*!***************************************************************!*\ |
| 1797 |
!*** ../node_modules/@babel/runtime/helpers/OverloadYield.js ***! |
| 1798 |
\***************************************************************/ |
| 1799 |
/***/ ((module) => { |
| 1800 |
|
| 1801 |
function _OverloadYield(e, d) { |
| 1802 |
this.v = e, this.k = d; |
| 1803 |
} |
| 1804 |
module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1805 |
|
| 1806 |
/***/ }), |
| 1807 |
|
| 1808 |
/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": |
| 1809 |
/*!******************************************************************!*\ |
| 1810 |
!*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! |
| 1811 |
\******************************************************************/ |
| 1812 |
/***/ ((module) => { |
| 1813 |
|
| 1814 |
function _arrayLikeToArray(r, a) { |
| 1815 |
(null == a || a > r.length) && (a = r.length); |
| 1816 |
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; |
| 1817 |
return n; |
| 1818 |
} |
| 1819 |
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1820 |
|
| 1821 |
/***/ }), |
| 1822 |
|
| 1823 |
/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": |
| 1824 |
/*!****************************************************************!*\ |
| 1825 |
!*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! |
| 1826 |
\****************************************************************/ |
| 1827 |
/***/ ((module) => { |
| 1828 |
|
| 1829 |
function _arrayWithHoles(r) { |
| 1830 |
if (Array.isArray(r)) return r; |
| 1831 |
} |
| 1832 |
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1833 |
|
| 1834 |
/***/ }), |
| 1835 |
|
| 1836 |
/***/ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js": |
| 1837 |
/*!*******************************************************************!*\ |
| 1838 |
!*** ../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! |
| 1839 |
\*******************************************************************/ |
| 1840 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1841 |
|
| 1842 |
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); |
| 1843 |
function _arrayWithoutHoles(r) { |
| 1844 |
if (Array.isArray(r)) return arrayLikeToArray(r); |
| 1845 |
} |
| 1846 |
module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1847 |
|
| 1848 |
/***/ }), |
| 1849 |
|
| 1850 |
/***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js": |
| 1851 |
/*!******************************************************************!*\ |
| 1852 |
!*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***! |
| 1853 |
\******************************************************************/ |
| 1854 |
/***/ ((module) => { |
| 1855 |
|
| 1856 |
function asyncGeneratorStep(n, t, e, r, o, a, c) { |
| 1857 |
try { |
| 1858 |
var i = n[a](c), |
| 1859 |
u = i.value; |
| 1860 |
} catch (n) { |
| 1861 |
return void e(n); |
| 1862 |
} |
| 1863 |
i.done ? t(u) : Promise.resolve(u).then(r, o); |
| 1864 |
} |
| 1865 |
function _asyncToGenerator(n) { |
| 1866 |
return function () { |
| 1867 |
var t = this, |
| 1868 |
e = arguments; |
| 1869 |
return new Promise(function (r, o) { |
| 1870 |
var a = n.apply(t, e); |
| 1871 |
function _next(n) { |
| 1872 |
asyncGeneratorStep(a, r, o, _next, _throw, "next", n); |
| 1873 |
} |
| 1874 |
function _throw(n) { |
| 1875 |
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); |
| 1876 |
} |
| 1877 |
_next(void 0); |
| 1878 |
}); |
| 1879 |
}; |
| 1880 |
} |
| 1881 |
module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1882 |
|
| 1883 |
/***/ }), |
| 1884 |
|
| 1885 |
/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": |
| 1886 |
/*!****************************************************************!*\ |
| 1887 |
!*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! |
| 1888 |
\****************************************************************/ |
| 1889 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1890 |
|
| 1891 |
var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); |
| 1892 |
function _defineProperty(e, r, t) { |
| 1893 |
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { |
| 1894 |
value: t, |
| 1895 |
enumerable: !0, |
| 1896 |
configurable: !0, |
| 1897 |
writable: !0 |
| 1898 |
}) : e[r] = t, e; |
| 1899 |
} |
| 1900 |
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1901 |
|
| 1902 |
/***/ }), |
| 1903 |
|
| 1904 |
/***/ "../node_modules/@babel/runtime/helpers/extends.js": |
| 1905 |
/*!*********************************************************!*\ |
| 1906 |
!*** ../node_modules/@babel/runtime/helpers/extends.js ***! |
| 1907 |
\*********************************************************/ |
| 1908 |
/***/ ((module) => { |
| 1909 |
|
| 1910 |
function _extends() { |
| 1911 |
return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) { |
| 1912 |
for (var e = 1; e < arguments.length; e++) { |
| 1913 |
var t = arguments[e]; |
| 1914 |
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); |
| 1915 |
} |
| 1916 |
return n; |
| 1917 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends.apply(null, arguments); |
| 1918 |
} |
| 1919 |
module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1920 |
|
| 1921 |
/***/ }), |
| 1922 |
|
| 1923 |
/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": |
| 1924 |
/*!***********************************************************************!*\ |
| 1925 |
!*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! |
| 1926 |
\***********************************************************************/ |
| 1927 |
/***/ ((module) => { |
| 1928 |
|
| 1929 |
function _interopRequireDefault(e) { |
| 1930 |
return e && e.__esModule ? e : { |
| 1931 |
"default": e |
| 1932 |
}; |
| 1933 |
} |
| 1934 |
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1935 |
|
| 1936 |
/***/ }), |
| 1937 |
|
| 1938 |
/***/ "../node_modules/@babel/runtime/helpers/iterableToArray.js": |
| 1939 |
/*!*****************************************************************!*\ |
| 1940 |
!*** ../node_modules/@babel/runtime/helpers/iterableToArray.js ***! |
| 1941 |
\*****************************************************************/ |
| 1942 |
/***/ ((module) => { |
| 1943 |
|
| 1944 |
function _iterableToArray(r) { |
| 1945 |
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); |
| 1946 |
} |
| 1947 |
module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1948 |
|
| 1949 |
/***/ }), |
| 1950 |
|
| 1951 |
/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": |
| 1952 |
/*!**********************************************************************!*\ |
| 1953 |
!*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! |
| 1954 |
\**********************************************************************/ |
| 1955 |
/***/ ((module) => { |
| 1956 |
|
| 1957 |
function _iterableToArrayLimit(r, l) { |
| 1958 |
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; |
| 1959 |
if (null != t) { |
| 1960 |
var e, |
| 1961 |
n, |
| 1962 |
i, |
| 1963 |
u, |
| 1964 |
a = [], |
| 1965 |
f = !0, |
| 1966 |
o = !1; |
| 1967 |
try { |
| 1968 |
if (i = (t = t.call(r)).next, 0 === l) { |
| 1969 |
if (Object(t) !== t) return; |
| 1970 |
f = !1; |
| 1971 |
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); |
| 1972 |
} catch (r) { |
| 1973 |
o = !0, n = r; |
| 1974 |
} finally { |
| 1975 |
try { |
| 1976 |
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; |
| 1977 |
} finally { |
| 1978 |
if (o) throw n; |
| 1979 |
} |
| 1980 |
} |
| 1981 |
return a; |
| 1982 |
} |
| 1983 |
} |
| 1984 |
module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1985 |
|
| 1986 |
/***/ }), |
| 1987 |
|
| 1988 |
/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": |
| 1989 |
/*!*****************************************************************!*\ |
| 1990 |
!*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! |
| 1991 |
\*****************************************************************/ |
| 1992 |
/***/ ((module) => { |
| 1993 |
|
| 1994 |
function _nonIterableRest() { |
| 1995 |
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 1996 |
} |
| 1997 |
module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1998 |
|
| 1999 |
/***/ }), |
| 2000 |
|
| 2001 |
/***/ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js": |
| 2002 |
/*!*******************************************************************!*\ |
| 2003 |
!*** ../node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! |
| 2004 |
\*******************************************************************/ |
| 2005 |
/***/ ((module) => { |
| 2006 |
|
| 2007 |
function _nonIterableSpread() { |
| 2008 |
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 2009 |
} |
| 2010 |
module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2011 |
|
| 2012 |
/***/ }), |
| 2013 |
|
| 2014 |
/***/ "../node_modules/@babel/runtime/helpers/regenerator.js": |
| 2015 |
/*!*************************************************************!*\ |
| 2016 |
!*** ../node_modules/@babel/runtime/helpers/regenerator.js ***! |
| 2017 |
\*************************************************************/ |
| 2018 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2019 |
|
| 2020 |
var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); |
| 2021 |
function _regenerator() { |
| 2022 |
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ |
| 2023 |
var e, |
| 2024 |
t, |
| 2025 |
r = "function" == typeof Symbol ? Symbol : {}, |
| 2026 |
n = r.iterator || "@@iterator", |
| 2027 |
o = r.toStringTag || "@@toStringTag"; |
| 2028 |
function i(r, n, o, i) { |
| 2029 |
var c = n && n.prototype instanceof Generator ? n : Generator, |
| 2030 |
u = Object.create(c.prototype); |
| 2031 |
return regeneratorDefine(u, "_invoke", function (r, n, o) { |
| 2032 |
var i, |
| 2033 |
c, |
| 2034 |
u, |
| 2035 |
f = 0, |
| 2036 |
p = o || [], |
| 2037 |
y = !1, |
| 2038 |
G = { |
| 2039 |
p: 0, |
| 2040 |
n: 0, |
| 2041 |
v: e, |
| 2042 |
a: d, |
| 2043 |
f: d.bind(e, 4), |
| 2044 |
d: function d(t, r) { |
| 2045 |
return i = t, c = 0, u = e, G.n = r, a; |
| 2046 |
} |
| 2047 |
}; |
| 2048 |
function d(r, n) { |
| 2049 |
for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { |
| 2050 |
var o, |
| 2051 |
i = p[t], |
| 2052 |
d = G.p, |
| 2053 |
l = i[2]; |
| 2054 |
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)); |
| 2055 |
} |
| 2056 |
if (o || r > 1) return a; |
| 2057 |
throw y = !0, n; |
| 2058 |
} |
| 2059 |
return function (o, p, l) { |
| 2060 |
if (f > 1) throw TypeError("Generator is already running"); |
| 2061 |
for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { |
| 2062 |
i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); |
| 2063 |
try { |
| 2064 |
if (f = 2, i) { |
| 2065 |
if (c || (o = "next"), t = i[o]) { |
| 2066 |
if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); |
| 2067 |
if (!t.done) return t; |
| 2068 |
u = t.value, c < 2 && (c = 0); |
| 2069 |
} else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); |
| 2070 |
i = e; |
| 2071 |
} else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; |
| 2072 |
} catch (t) { |
| 2073 |
i = e, c = 1, u = t; |
| 2074 |
} finally { |
| 2075 |
f = 1; |
| 2076 |
} |
| 2077 |
} |
| 2078 |
return { |
| 2079 |
value: t, |
| 2080 |
done: y |
| 2081 |
}; |
| 2082 |
}; |
| 2083 |
}(r, o, i), !0), u; |
| 2084 |
} |
| 2085 |
var a = {}; |
| 2086 |
function Generator() {} |
| 2087 |
function GeneratorFunction() {} |
| 2088 |
function GeneratorFunctionPrototype() {} |
| 2089 |
t = Object.getPrototypeOf; |
| 2090 |
var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () { |
| 2091 |
return this; |
| 2092 |
}), t), |
| 2093 |
u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); |
| 2094 |
function f(e) { |
| 2095 |
return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; |
| 2096 |
} |
| 2097 |
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 () { |
| 2098 |
return this; |
| 2099 |
}), regeneratorDefine(u, "toString", function () { |
| 2100 |
return "[object Generator]"; |
| 2101 |
}), (module.exports = _regenerator = function _regenerator() { |
| 2102 |
return { |
| 2103 |
w: i, |
| 2104 |
m: f |
| 2105 |
}; |
| 2106 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports)(); |
| 2107 |
} |
| 2108 |
module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2109 |
|
| 2110 |
/***/ }), |
| 2111 |
|
| 2112 |
/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js": |
| 2113 |
/*!******************************************************************!*\ |
| 2114 |
!*** ../node_modules/@babel/runtime/helpers/regeneratorAsync.js ***! |
| 2115 |
\******************************************************************/ |
| 2116 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2117 |
|
| 2118 |
var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); |
| 2119 |
function _regeneratorAsync(n, e, r, t, o) { |
| 2120 |
var a = regeneratorAsyncGen(n, e, r, t, o); |
| 2121 |
return a.next().then(function (n) { |
| 2122 |
return n.done ? n.value : a.next(); |
| 2123 |
}); |
| 2124 |
} |
| 2125 |
module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2126 |
|
| 2127 |
/***/ }), |
| 2128 |
|
| 2129 |
/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js": |
| 2130 |
/*!*********************************************************************!*\ |
| 2131 |
!*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js ***! |
| 2132 |
\*********************************************************************/ |
| 2133 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2134 |
|
| 2135 |
var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); |
| 2136 |
var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); |
| 2137 |
function _regeneratorAsyncGen(r, e, t, o, n) { |
| 2138 |
return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); |
| 2139 |
} |
| 2140 |
module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2141 |
|
| 2142 |
/***/ }), |
| 2143 |
|
| 2144 |
/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js": |
| 2145 |
/*!**************************************************************************!*\ |
| 2146 |
!*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js ***! |
| 2147 |
\**************************************************************************/ |
| 2148 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2149 |
|
| 2150 |
var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); |
| 2151 |
var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); |
| 2152 |
function AsyncIterator(t, e) { |
| 2153 |
function n(r, o, i, f) { |
| 2154 |
try { |
| 2155 |
var c = t[r](o), |
| 2156 |
u = c.value; |
| 2157 |
return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) { |
| 2158 |
n("next", t, i, f); |
| 2159 |
}, function (t) { |
| 2160 |
n("throw", t, i, f); |
| 2161 |
}) : e.resolve(u).then(function (t) { |
| 2162 |
c.value = t, i(c); |
| 2163 |
}, function (t) { |
| 2164 |
return n("throw", t, i, f); |
| 2165 |
}); |
| 2166 |
} catch (t) { |
| 2167 |
f(t); |
| 2168 |
} |
| 2169 |
} |
| 2170 |
var r; |
| 2171 |
this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { |
| 2172 |
return this; |
| 2173 |
})), regeneratorDefine(this, "_invoke", function (t, o, i) { |
| 2174 |
function f() { |
| 2175 |
return new e(function (e, r) { |
| 2176 |
n(t, i, e, r); |
| 2177 |
}); |
| 2178 |
} |
| 2179 |
return r = r ? r.then(f, f) : f(); |
| 2180 |
}, !0); |
| 2181 |
} |
| 2182 |
module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2183 |
|
| 2184 |
/***/ }), |
| 2185 |
|
| 2186 |
/***/ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js": |
| 2187 |
/*!*******************************************************************!*\ |
| 2188 |
!*** ../node_modules/@babel/runtime/helpers/regeneratorDefine.js ***! |
| 2189 |
\*******************************************************************/ |
| 2190 |
/***/ ((module) => { |
| 2191 |
|
| 2192 |
function _regeneratorDefine(e, r, n, t) { |
| 2193 |
var i = Object.defineProperty; |
| 2194 |
try { |
| 2195 |
i({}, "", {}); |
| 2196 |
} catch (e) { |
| 2197 |
i = 0; |
| 2198 |
} |
| 2199 |
module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { |
| 2200 |
function o(r, n) { |
| 2201 |
_regeneratorDefine(e, r, function (e) { |
| 2202 |
return this._invoke(r, n, e); |
| 2203 |
}); |
| 2204 |
} |
| 2205 |
r ? i ? i(e, r, { |
| 2206 |
value: n, |
| 2207 |
enumerable: !t, |
| 2208 |
configurable: !t, |
| 2209 |
writable: !t |
| 2210 |
}) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); |
| 2211 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); |
| 2212 |
} |
| 2213 |
module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2214 |
|
| 2215 |
/***/ }), |
| 2216 |
|
| 2217 |
/***/ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js": |
| 2218 |
/*!*****************************************************************!*\ |
| 2219 |
!*** ../node_modules/@babel/runtime/helpers/regeneratorKeys.js ***! |
| 2220 |
\*****************************************************************/ |
| 2221 |
/***/ ((module) => { |
| 2222 |
|
| 2223 |
function _regeneratorKeys(e) { |
| 2224 |
var n = Object(e), |
| 2225 |
r = []; |
| 2226 |
for (var t in n) r.unshift(t); |
| 2227 |
return function e() { |
| 2228 |
for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; |
| 2229 |
return e.done = !0, e; |
| 2230 |
}; |
| 2231 |
} |
| 2232 |
module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2233 |
|
| 2234 |
/***/ }), |
| 2235 |
|
| 2236 |
/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js": |
| 2237 |
/*!********************************************************************!*\ |
| 2238 |
!*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! |
| 2239 |
\********************************************************************/ |
| 2240 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2241 |
|
| 2242 |
var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); |
| 2243 |
var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); |
| 2244 |
var regeneratorAsync = __webpack_require__(/*! ./regeneratorAsync.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js"); |
| 2245 |
var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); |
| 2246 |
var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); |
| 2247 |
var regeneratorKeys = __webpack_require__(/*! ./regeneratorKeys.js */ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js"); |
| 2248 |
var regeneratorValues = __webpack_require__(/*! ./regeneratorValues.js */ "../node_modules/@babel/runtime/helpers/regeneratorValues.js"); |
| 2249 |
function _regeneratorRuntime() { |
| 2250 |
"use strict"; |
| 2251 |
|
| 2252 |
var r = regenerator(), |
| 2253 |
e = r.m(_regeneratorRuntime), |
| 2254 |
t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; |
| 2255 |
function n(r) { |
| 2256 |
var e = "function" == typeof r && r.constructor; |
| 2257 |
return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); |
| 2258 |
} |
| 2259 |
var o = { |
| 2260 |
"throw": 1, |
| 2261 |
"return": 2, |
| 2262 |
"break": 3, |
| 2263 |
"continue": 3 |
| 2264 |
}; |
| 2265 |
function a(r) { |
| 2266 |
var e, t; |
| 2267 |
return function (n) { |
| 2268 |
e || (e = { |
| 2269 |
stop: function stop() { |
| 2270 |
return t(n.a, 2); |
| 2271 |
}, |
| 2272 |
"catch": function _catch() { |
| 2273 |
return n.v; |
| 2274 |
}, |
| 2275 |
abrupt: function abrupt(r, e) { |
| 2276 |
return t(n.a, o[r], e); |
| 2277 |
}, |
| 2278 |
delegateYield: function delegateYield(r, o, a) { |
| 2279 |
return e.resultName = o, t(n.d, regeneratorValues(r), a); |
| 2280 |
}, |
| 2281 |
finish: function finish(r) { |
| 2282 |
return t(n.f, r); |
| 2283 |
} |
| 2284 |
}, t = function t(r, _t, o) { |
| 2285 |
n.p = e.prev, n.n = e.next; |
| 2286 |
try { |
| 2287 |
return r(_t, o); |
| 2288 |
} finally { |
| 2289 |
e.next = n.n; |
| 2290 |
} |
| 2291 |
}), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; |
| 2292 |
try { |
| 2293 |
return r.call(this, e); |
| 2294 |
} finally { |
| 2295 |
n.p = e.prev, n.n = e.next; |
| 2296 |
} |
| 2297 |
}; |
| 2298 |
} |
| 2299 |
return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { |
| 2300 |
return { |
| 2301 |
wrap: function wrap(e, t, n, o) { |
| 2302 |
return r.w(a(e), t, n, o && o.reverse()); |
| 2303 |
}, |
| 2304 |
isGeneratorFunction: n, |
| 2305 |
mark: r.m, |
| 2306 |
awrap: function awrap(r, e) { |
| 2307 |
return new OverloadYield(r, e); |
| 2308 |
}, |
| 2309 |
AsyncIterator: regeneratorAsyncIterator, |
| 2310 |
async: function async(r, e, t, o, u) { |
| 2311 |
return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); |
| 2312 |
}, |
| 2313 |
keys: regeneratorKeys, |
| 2314 |
values: regeneratorValues |
| 2315 |
}; |
| 2316 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports)(); |
| 2317 |
} |
| 2318 |
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2319 |
|
| 2320 |
/***/ }), |
| 2321 |
|
| 2322 |
/***/ "../node_modules/@babel/runtime/helpers/regeneratorValues.js": |
| 2323 |
/*!*******************************************************************!*\ |
| 2324 |
!*** ../node_modules/@babel/runtime/helpers/regeneratorValues.js ***! |
| 2325 |
\*******************************************************************/ |
| 2326 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2327 |
|
| 2328 |
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 2329 |
function _regeneratorValues(e) { |
| 2330 |
if (null != e) { |
| 2331 |
var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], |
| 2332 |
r = 0; |
| 2333 |
if (t) return t.call(e); |
| 2334 |
if ("function" == typeof e.next) return e; |
| 2335 |
if (!isNaN(e.length)) return { |
| 2336 |
next: function next() { |
| 2337 |
return e && r >= e.length && (e = void 0), { |
| 2338 |
value: e && e[r++], |
| 2339 |
done: !e |
| 2340 |
}; |
| 2341 |
} |
| 2342 |
}; |
| 2343 |
} |
| 2344 |
throw new TypeError(_typeof(e) + " is not iterable"); |
| 2345 |
} |
| 2346 |
module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2347 |
|
| 2348 |
/***/ }), |
| 2349 |
|
| 2350 |
/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": |
| 2351 |
/*!***************************************************************!*\ |
| 2352 |
!*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! |
| 2353 |
\***************************************************************/ |
| 2354 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2355 |
|
| 2356 |
var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); |
| 2357 |
var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); |
| 2358 |
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); |
| 2359 |
var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); |
| 2360 |
function _slicedToArray(r, e) { |
| 2361 |
return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); |
| 2362 |
} |
| 2363 |
module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2364 |
|
| 2365 |
/***/ }), |
| 2366 |
|
| 2367 |
/***/ "../node_modules/@babel/runtime/helpers/toConsumableArray.js": |
| 2368 |
/*!*******************************************************************!*\ |
| 2369 |
!*** ../node_modules/@babel/runtime/helpers/toConsumableArray.js ***! |
| 2370 |
\*******************************************************************/ |
| 2371 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2372 |
|
| 2373 |
var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"); |
| 2374 |
var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "../node_modules/@babel/runtime/helpers/iterableToArray.js"); |
| 2375 |
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); |
| 2376 |
var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js"); |
| 2377 |
function _toConsumableArray(r) { |
| 2378 |
return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread(); |
| 2379 |
} |
| 2380 |
module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2381 |
|
| 2382 |
/***/ }), |
| 2383 |
|
| 2384 |
/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": |
| 2385 |
/*!*************************************************************!*\ |
| 2386 |
!*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! |
| 2387 |
\*************************************************************/ |
| 2388 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2389 |
|
| 2390 |
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 2391 |
function toPrimitive(t, r) { |
| 2392 |
if ("object" != _typeof(t) || !t) return t; |
| 2393 |
var e = t[Symbol.toPrimitive]; |
| 2394 |
if (void 0 !== e) { |
| 2395 |
var i = e.call(t, r || "default"); |
| 2396 |
if ("object" != _typeof(i)) return i; |
| 2397 |
throw new TypeError("@@toPrimitive must return a primitive value."); |
| 2398 |
} |
| 2399 |
return ("string" === r ? String : Number)(t); |
| 2400 |
} |
| 2401 |
module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2402 |
|
| 2403 |
/***/ }), |
| 2404 |
|
| 2405 |
/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": |
| 2406 |
/*!***************************************************************!*\ |
| 2407 |
!*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! |
| 2408 |
\***************************************************************/ |
| 2409 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2410 |
|
| 2411 |
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 2412 |
var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); |
| 2413 |
function toPropertyKey(t) { |
| 2414 |
var i = toPrimitive(t, "string"); |
| 2415 |
return "symbol" == _typeof(i) ? i : i + ""; |
| 2416 |
} |
| 2417 |
module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2418 |
|
| 2419 |
/***/ }), |
| 2420 |
|
| 2421 |
/***/ "../node_modules/@babel/runtime/helpers/typeof.js": |
| 2422 |
/*!********************************************************!*\ |
| 2423 |
!*** ../node_modules/@babel/runtime/helpers/typeof.js ***! |
| 2424 |
\********************************************************/ |
| 2425 |
/***/ ((module) => { |
| 2426 |
|
| 2427 |
function _typeof(o) { |
| 2428 |
"@babel/helpers - typeof"; |
| 2429 |
|
| 2430 |
return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { |
| 2431 |
return typeof o; |
| 2432 |
} : function (o) { |
| 2433 |
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; |
| 2434 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); |
| 2435 |
} |
| 2436 |
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2437 |
|
| 2438 |
/***/ }), |
| 2439 |
|
| 2440 |
/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": |
| 2441 |
/*!****************************************************************************!*\ |
| 2442 |
!*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! |
| 2443 |
\****************************************************************************/ |
| 2444 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2445 |
|
| 2446 |
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); |
| 2447 |
function _unsupportedIterableToArray(r, a) { |
| 2448 |
if (r) { |
| 2449 |
if ("string" == typeof r) return arrayLikeToArray(r, a); |
| 2450 |
var t = {}.toString.call(r).slice(8, -1); |
| 2451 |
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; |
| 2452 |
} |
| 2453 |
} |
| 2454 |
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2455 |
|
| 2456 |
/***/ }), |
| 2457 |
|
| 2458 |
/***/ "../node_modules/@babel/runtime/regenerator/index.js": |
| 2459 |
/*!***********************************************************!*\ |
| 2460 |
!*** ../node_modules/@babel/runtime/regenerator/index.js ***! |
| 2461 |
\***********************************************************/ |
| 2462 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2463 |
|
| 2464 |
// TODO(Babel 8): Remove this file. |
| 2465 |
|
| 2466 |
var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")(); |
| 2467 |
module.exports = runtime; |
| 2468 |
|
| 2469 |
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= |
| 2470 |
try { |
| 2471 |
regeneratorRuntime = runtime; |
| 2472 |
} catch (accidentalStrictMode) { |
| 2473 |
if (typeof globalThis === "object") { |
| 2474 |
globalThis.regeneratorRuntime = runtime; |
| 2475 |
} else { |
| 2476 |
Function("r", "regeneratorRuntime = r")(runtime); |
| 2477 |
} |
| 2478 |
} |
| 2479 |
|
| 2480 |
|
| 2481 |
/***/ }), |
| 2482 |
|
| 2483 |
/***/ "../node_modules/@wordpress/element/build-module/create-interpolate-element.js": |
| 2484 |
/*!*************************************************************************************!*\ |
| 2485 |
!*** ../node_modules/@wordpress/element/build-module/create-interpolate-element.js ***! |
| 2486 |
\*************************************************************************************/ |
| 2487 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 2488 |
|
| 2489 |
"use strict"; |
| 2490 |
__webpack_require__.r(__webpack_exports__); |
| 2491 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2492 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 2493 |
/* harmony export */ }); |
| 2494 |
/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./react */ "react"); |
| 2495 |
/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_react__WEBPACK_IMPORTED_MODULE_0__); |
| 2496 |
/** |
| 2497 |
* Internal dependencies |
| 2498 |
*/ |
| 2499 |
|
| 2500 |
|
| 2501 |
/** |
| 2502 |
* Object containing a React element. |
| 2503 |
* |
| 2504 |
* @typedef {import('react').ReactElement} Element |
| 2505 |
*/ |
| 2506 |
|
| 2507 |
let indoc, offset, output, stack; |
| 2508 |
|
| 2509 |
/** |
| 2510 |
* Matches tags in the localized string |
| 2511 |
* |
| 2512 |
* This is used for extracting the tag pattern groups for parsing the localized |
| 2513 |
* string and along with the map converting it to a react element. |
| 2514 |
* |
| 2515 |
* There are four references extracted using this tokenizer: |
| 2516 |
* |
| 2517 |
* match: Full match of the tag (i.e. <strong>, </strong>, <br/>) |
| 2518 |
* isClosing: The closing slash, if it exists. |
| 2519 |
* name: The name portion of the tag (strong, br) (if ) |
| 2520 |
* isSelfClosed: The slash on a self closing tag, if it exists. |
| 2521 |
* |
| 2522 |
* @type {RegExp} |
| 2523 |
*/ |
| 2524 |
const tokenizer = /<(\/)?(\w+)\s*(\/)?>/g; |
| 2525 |
|
| 2526 |
/** |
| 2527 |
* The stack frame tracking parse progress. |
| 2528 |
* |
| 2529 |
* @typedef Frame |
| 2530 |
* |
| 2531 |
* @property {Element} element A parent element which may still have |
| 2532 |
* @property {number} tokenStart Offset at which parent element first |
| 2533 |
* appears. |
| 2534 |
* @property {number} tokenLength Length of string marking start of parent |
| 2535 |
* element. |
| 2536 |
* @property {number} [prevOffset] Running offset at which parsing should |
| 2537 |
* continue. |
| 2538 |
* @property {number} [leadingTextStart] Offset at which last closing element |
| 2539 |
* finished, used for finding text between |
| 2540 |
* elements. |
| 2541 |
* @property {Element[]} children Children. |
| 2542 |
*/ |
| 2543 |
|
| 2544 |
/** |
| 2545 |
* Tracks recursive-descent parse state. |
| 2546 |
* |
| 2547 |
* This is a Stack frame holding parent elements until all children have been |
| 2548 |
* parsed. |
| 2549 |
* |
| 2550 |
* @private |
| 2551 |
* @param {Element} element A parent element which may still have |
| 2552 |
* nested children not yet parsed. |
| 2553 |
* @param {number} tokenStart Offset at which parent element first |
| 2554 |
* appears. |
| 2555 |
* @param {number} tokenLength Length of string marking start of parent |
| 2556 |
* element. |
| 2557 |
* @param {number} [prevOffset] Running offset at which parsing should |
| 2558 |
* continue. |
| 2559 |
* @param {number} [leadingTextStart] Offset at which last closing element |
| 2560 |
* finished, used for finding text between |
| 2561 |
* elements. |
| 2562 |
* |
| 2563 |
* @return {Frame} The stack frame tracking parse progress. |
| 2564 |
*/ |
| 2565 |
function createFrame(element, tokenStart, tokenLength, prevOffset, leadingTextStart) { |
| 2566 |
return { |
| 2567 |
element, |
| 2568 |
tokenStart, |
| 2569 |
tokenLength, |
| 2570 |
prevOffset, |
| 2571 |
leadingTextStart, |
| 2572 |
children: [] |
| 2573 |
}; |
| 2574 |
} |
| 2575 |
|
| 2576 |
/** |
| 2577 |
* This function creates an interpolated element from a passed in string with |
| 2578 |
* specific tags matching how the string should be converted to an element via |
| 2579 |
* the conversion map value. |
| 2580 |
* |
| 2581 |
* @example |
| 2582 |
* For example, for the given string: |
| 2583 |
* |
| 2584 |
* "This is a <span>string</span> with <a>a link</a> and a self-closing |
| 2585 |
* <CustomComponentB/> tag" |
| 2586 |
* |
| 2587 |
* You would have something like this as the conversionMap value: |
| 2588 |
* |
| 2589 |
* ```js |
| 2590 |
* { |
| 2591 |
* span: <span />, |
| 2592 |
* a: <a href={ 'https://github.com' } />, |
| 2593 |
* CustomComponentB: <CustomComponent />, |
| 2594 |
* } |
| 2595 |
* ``` |
| 2596 |
* |
| 2597 |
* @param {string} interpolatedString The interpolation string to be parsed. |
| 2598 |
* @param {Record<string, Element>} conversionMap The map used to convert the string to |
| 2599 |
* a react element. |
| 2600 |
* @throws {TypeError} |
| 2601 |
* @return {Element} A wp element. |
| 2602 |
*/ |
| 2603 |
const createInterpolateElement = (interpolatedString, conversionMap) => { |
| 2604 |
indoc = interpolatedString; |
| 2605 |
offset = 0; |
| 2606 |
output = []; |
| 2607 |
stack = []; |
| 2608 |
tokenizer.lastIndex = 0; |
| 2609 |
if (!isValidConversionMap(conversionMap)) { |
| 2610 |
throw new TypeError('The conversionMap provided is not valid. It must be an object with values that are React Elements'); |
| 2611 |
} |
| 2612 |
do { |
| 2613 |
// twiddle our thumbs |
| 2614 |
} while (proceed(conversionMap)); |
| 2615 |
return (0,_react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, ...output); |
| 2616 |
}; |
| 2617 |
|
| 2618 |
/** |
| 2619 |
* Validate conversion map. |
| 2620 |
* |
| 2621 |
* A map is considered valid if it's an object and every value in the object |
| 2622 |
* is a React Element |
| 2623 |
* |
| 2624 |
* @private |
| 2625 |
* |
| 2626 |
* @param {Object} conversionMap The map being validated. |
| 2627 |
* |
| 2628 |
* @return {boolean} True means the map is valid. |
| 2629 |
*/ |
| 2630 |
const isValidConversionMap = conversionMap => { |
| 2631 |
const isObject = typeof conversionMap === 'object'; |
| 2632 |
const values = isObject && Object.values(conversionMap); |
| 2633 |
return isObject && values.length && values.every(element => (0,_react__WEBPACK_IMPORTED_MODULE_0__.isValidElement)(element)); |
| 2634 |
}; |
| 2635 |
|
| 2636 |
/** |
| 2637 |
* This is the iterator over the matches in the string. |
| 2638 |
* |
| 2639 |
* @private |
| 2640 |
* |
| 2641 |
* @param {Object} conversionMap The conversion map for the string. |
| 2642 |
* |
| 2643 |
* @return {boolean} true for continuing to iterate, false for finished. |
| 2644 |
*/ |
| 2645 |
function proceed(conversionMap) { |
| 2646 |
const next = nextToken(); |
| 2647 |
const [tokenType, name, startOffset, tokenLength] = next; |
| 2648 |
const stackDepth = stack.length; |
| 2649 |
const leadingTextStart = startOffset > offset ? offset : null; |
| 2650 |
if (!conversionMap[name]) { |
| 2651 |
addText(); |
| 2652 |
return false; |
| 2653 |
} |
| 2654 |
switch (tokenType) { |
| 2655 |
case 'no-more-tokens': |
| 2656 |
if (stackDepth !== 0) { |
| 2657 |
const { |
| 2658 |
leadingTextStart: stackLeadingText, |
| 2659 |
tokenStart |
| 2660 |
} = stack.pop(); |
| 2661 |
output.push(indoc.substr(stackLeadingText, tokenStart)); |
| 2662 |
} |
| 2663 |
addText(); |
| 2664 |
return false; |
| 2665 |
case 'self-closed': |
| 2666 |
if (0 === stackDepth) { |
| 2667 |
if (null !== leadingTextStart) { |
| 2668 |
output.push(indoc.substr(leadingTextStart, startOffset - leadingTextStart)); |
| 2669 |
} |
| 2670 |
output.push(conversionMap[name]); |
| 2671 |
offset = startOffset + tokenLength; |
| 2672 |
return true; |
| 2673 |
} |
| 2674 |
|
| 2675 |
// Otherwise we found an inner element. |
| 2676 |
addChild(createFrame(conversionMap[name], startOffset, tokenLength)); |
| 2677 |
offset = startOffset + tokenLength; |
| 2678 |
return true; |
| 2679 |
case 'opener': |
| 2680 |
stack.push(createFrame(conversionMap[name], startOffset, tokenLength, startOffset + tokenLength, leadingTextStart)); |
| 2681 |
offset = startOffset + tokenLength; |
| 2682 |
return true; |
| 2683 |
case 'closer': |
| 2684 |
// If we're not nesting then this is easy - close the block. |
| 2685 |
if (1 === stackDepth) { |
| 2686 |
closeOuterElement(startOffset); |
| 2687 |
offset = startOffset + tokenLength; |
| 2688 |
return true; |
| 2689 |
} |
| 2690 |
|
| 2691 |
// Otherwise we're nested and we have to close out the current |
| 2692 |
// block and add it as a innerBlock to the parent. |
| 2693 |
const stackTop = stack.pop(); |
| 2694 |
const text = indoc.substr(stackTop.prevOffset, startOffset - stackTop.prevOffset); |
| 2695 |
stackTop.children.push(text); |
| 2696 |
stackTop.prevOffset = startOffset + tokenLength; |
| 2697 |
const frame = createFrame(stackTop.element, stackTop.tokenStart, stackTop.tokenLength, startOffset + tokenLength); |
| 2698 |
frame.children = stackTop.children; |
| 2699 |
addChild(frame); |
| 2700 |
offset = startOffset + tokenLength; |
| 2701 |
return true; |
| 2702 |
default: |
| 2703 |
addText(); |
| 2704 |
return false; |
| 2705 |
} |
| 2706 |
} |
| 2707 |
|
| 2708 |
/** |
| 2709 |
* Grabs the next token match in the string and returns it's details. |
| 2710 |
* |
| 2711 |
* @private |
| 2712 |
* |
| 2713 |
* @return {Array} An array of details for the token matched. |
| 2714 |
*/ |
| 2715 |
function nextToken() { |
| 2716 |
const matches = tokenizer.exec(indoc); |
| 2717 |
// We have no more tokens. |
| 2718 |
if (null === matches) { |
| 2719 |
return ['no-more-tokens']; |
| 2720 |
} |
| 2721 |
const startedAt = matches.index; |
| 2722 |
const [match, isClosing, name, isSelfClosed] = matches; |
| 2723 |
const length = match.length; |
| 2724 |
if (isSelfClosed) { |
| 2725 |
return ['self-closed', name, startedAt, length]; |
| 2726 |
} |
| 2727 |
if (isClosing) { |
| 2728 |
return ['closer', name, startedAt, length]; |
| 2729 |
} |
| 2730 |
return ['opener', name, startedAt, length]; |
| 2731 |
} |
| 2732 |
|
| 2733 |
/** |
| 2734 |
* Pushes text extracted from the indoc string to the output stack given the |
| 2735 |
* current rawLength value and offset (if rawLength is provided ) or the |
| 2736 |
* indoc.length and offset. |
| 2737 |
* |
| 2738 |
* @private |
| 2739 |
*/ |
| 2740 |
function addText() { |
| 2741 |
const length = indoc.length - offset; |
| 2742 |
if (0 === length) { |
| 2743 |
return; |
| 2744 |
} |
| 2745 |
output.push(indoc.substr(offset, length)); |
| 2746 |
} |
| 2747 |
|
| 2748 |
/** |
| 2749 |
* Pushes a child element to the associated parent element's children for the |
| 2750 |
* parent currently active in the stack. |
| 2751 |
* |
| 2752 |
* @private |
| 2753 |
* |
| 2754 |
* @param {Frame} frame The Frame containing the child element and it's |
| 2755 |
* token information. |
| 2756 |
*/ |
| 2757 |
function addChild(frame) { |
| 2758 |
const { |
| 2759 |
element, |
| 2760 |
tokenStart, |
| 2761 |
tokenLength, |
| 2762 |
prevOffset, |
| 2763 |
children |
| 2764 |
} = frame; |
| 2765 |
const parent = stack[stack.length - 1]; |
| 2766 |
const text = indoc.substr(parent.prevOffset, tokenStart - parent.prevOffset); |
| 2767 |
if (text) { |
| 2768 |
parent.children.push(text); |
| 2769 |
} |
| 2770 |
parent.children.push((0,_react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(element, null, ...children)); |
| 2771 |
parent.prevOffset = prevOffset ? prevOffset : tokenStart + tokenLength; |
| 2772 |
} |
| 2773 |
|
| 2774 |
/** |
| 2775 |
* This is called for closing tags. It creates the element currently active in |
| 2776 |
* the stack. |
| 2777 |
* |
| 2778 |
* @private |
| 2779 |
* |
| 2780 |
* @param {number} endOffset Offset at which the closing tag for the element |
| 2781 |
* begins in the string. If this is greater than the |
| 2782 |
* prevOffset attached to the element, then this |
| 2783 |
* helps capture any remaining nested text nodes in |
| 2784 |
* the element. |
| 2785 |
*/ |
| 2786 |
function closeOuterElement(endOffset) { |
| 2787 |
const { |
| 2788 |
element, |
| 2789 |
leadingTextStart, |
| 2790 |
prevOffset, |
| 2791 |
tokenStart, |
| 2792 |
children |
| 2793 |
} = stack.pop(); |
| 2794 |
const text = endOffset ? indoc.substr(prevOffset, endOffset - prevOffset) : indoc.substr(prevOffset); |
| 2795 |
if (text) { |
| 2796 |
children.push(text); |
| 2797 |
} |
| 2798 |
if (null !== leadingTextStart) { |
| 2799 |
output.push(indoc.substr(leadingTextStart, tokenStart - leadingTextStart)); |
| 2800 |
} |
| 2801 |
output.push((0,_react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(element, null, ...children)); |
| 2802 |
} |
| 2803 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createInterpolateElement); |
| 2804 |
//# sourceMappingURL=create-interpolate-element.js.map |
| 2805 |
|
| 2806 |
/***/ }), |
| 2807 |
|
| 2808 |
/***/ "../node_modules/@wordpress/element/build-module/index.js": |
| 2809 |
/*!****************************************************************!*\ |
| 2810 |
!*** ../node_modules/@wordpress/element/build-module/index.js ***! |
| 2811 |
\****************************************************************/ |
| 2812 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 2813 |
|
| 2814 |
"use strict"; |
| 2815 |
__webpack_require__.r(__webpack_exports__); |
| 2816 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2817 |
/* harmony export */ Children: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.Children), |
| 2818 |
/* harmony export */ Component: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.Component), |
| 2819 |
/* harmony export */ Fragment: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.Fragment), |
| 2820 |
/* harmony export */ Platform: () => (/* reexport safe */ _platform__WEBPACK_IMPORTED_MODULE_4__["default"]), |
| 2821 |
/* harmony export */ PureComponent: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.PureComponent), |
| 2822 |
/* harmony export */ RawHTML: () => (/* reexport safe */ _raw_html__WEBPACK_IMPORTED_MODULE_6__["default"]), |
| 2823 |
/* harmony export */ StrictMode: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.StrictMode), |
| 2824 |
/* harmony export */ Suspense: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.Suspense), |
| 2825 |
/* harmony export */ cloneElement: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.cloneElement), |
| 2826 |
/* harmony export */ concatChildren: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.concatChildren), |
| 2827 |
/* harmony export */ createContext: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.createContext), |
| 2828 |
/* harmony export */ createElement: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.createElement), |
| 2829 |
/* harmony export */ createInterpolateElement: () => (/* reexport safe */ _create_interpolate_element__WEBPACK_IMPORTED_MODULE_0__["default"]), |
| 2830 |
/* harmony export */ createPortal: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.createPortal), |
| 2831 |
/* harmony export */ createRef: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.createRef), |
| 2832 |
/* harmony export */ createRoot: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.createRoot), |
| 2833 |
/* harmony export */ findDOMNode: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.findDOMNode), |
| 2834 |
/* harmony export */ flushSync: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.flushSync), |
| 2835 |
/* harmony export */ forwardRef: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.forwardRef), |
| 2836 |
/* harmony export */ hydrate: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.hydrate), |
| 2837 |
/* harmony export */ hydrateRoot: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.hydrateRoot), |
| 2838 |
/* harmony export */ isEmptyElement: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_3__.isEmptyElement), |
| 2839 |
/* harmony export */ isValidElement: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.isValidElement), |
| 2840 |
/* harmony export */ lazy: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.lazy), |
| 2841 |
/* harmony export */ memo: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.memo), |
| 2842 |
/* harmony export */ render: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.render), |
| 2843 |
/* harmony export */ renderToString: () => (/* reexport safe */ _serialize__WEBPACK_IMPORTED_MODULE_5__["default"]), |
| 2844 |
/* harmony export */ startTransition: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.startTransition), |
| 2845 |
/* harmony export */ switchChildrenNodeName: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.switchChildrenNodeName), |
| 2846 |
/* harmony export */ unmountComponentAtNode: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.unmountComponentAtNode), |
| 2847 |
/* harmony export */ useCallback: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useCallback), |
| 2848 |
/* harmony export */ useContext: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useContext), |
| 2849 |
/* harmony export */ useDebugValue: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useDebugValue), |
| 2850 |
/* harmony export */ useDeferredValue: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useDeferredValue), |
| 2851 |
/* harmony export */ useEffect: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useEffect), |
| 2852 |
/* harmony export */ useId: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useId), |
| 2853 |
/* harmony export */ useImperativeHandle: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useImperativeHandle), |
| 2854 |
/* harmony export */ useInsertionEffect: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useInsertionEffect), |
| 2855 |
/* harmony export */ useLayoutEffect: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect), |
| 2856 |
/* harmony export */ useMemo: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useMemo), |
| 2857 |
/* harmony export */ useReducer: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useReducer), |
| 2858 |
/* harmony export */ useRef: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useRef), |
| 2859 |
/* harmony export */ useState: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useState), |
| 2860 |
/* harmony export */ useSyncExternalStore: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useSyncExternalStore), |
| 2861 |
/* harmony export */ useTransition: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useTransition) |
| 2862 |
/* harmony export */ }); |
| 2863 |
/* harmony import */ var _create_interpolate_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./create-interpolate-element */ "../node_modules/@wordpress/element/build-module/create-interpolate-element.js"); |
| 2864 |
/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./react */ "../node_modules/@wordpress/element/build-module/react.js"); |
| 2865 |
/* harmony import */ var _react_platform__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./react-platform */ "../node_modules/@wordpress/element/build-module/react-platform.js"); |
| 2866 |
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "../node_modules/@wordpress/element/build-module/utils.js"); |
| 2867 |
/* harmony import */ var _platform__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./platform */ "../node_modules/@wordpress/element/build-module/platform.js"); |
| 2868 |
/* harmony import */ var _serialize__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./serialize */ "../node_modules/@wordpress/element/build-module/serialize.js"); |
| 2869 |
/* harmony import */ var _raw_html__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./raw-html */ "../node_modules/@wordpress/element/build-module/raw-html.js"); |
| 2870 |
|
| 2871 |
|
| 2872 |
|
| 2873 |
|
| 2874 |
|
| 2875 |
|
| 2876 |
|
| 2877 |
//# sourceMappingURL=index.js.map |
| 2878 |
|
| 2879 |
/***/ }), |
| 2880 |
|
| 2881 |
/***/ "../node_modules/@wordpress/element/build-module/platform.js": |
| 2882 |
/*!*******************************************************************!*\ |
| 2883 |
!*** ../node_modules/@wordpress/element/build-module/platform.js ***! |
| 2884 |
\*******************************************************************/ |
| 2885 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 2886 |
|
| 2887 |
"use strict"; |
| 2888 |
__webpack_require__.r(__webpack_exports__); |
| 2889 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2890 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 2891 |
/* harmony export */ }); |
| 2892 |
/** |
| 2893 |
* Parts of this source were derived and modified from react-native-web, |
| 2894 |
* released under the MIT license. |
| 2895 |
* |
| 2896 |
* Copyright (c) 2016-present, Nicolas Gallagher. |
| 2897 |
* Copyright (c) 2015-present, Facebook, Inc. |
| 2898 |
* |
| 2899 |
*/ |
| 2900 |
const Platform = { |
| 2901 |
OS: 'web', |
| 2902 |
select: spec => 'web' in spec ? spec.web : spec.default, |
| 2903 |
isWeb: true |
| 2904 |
}; |
| 2905 |
/** |
| 2906 |
* Component used to detect the current Platform being used. |
| 2907 |
* Use Platform.OS === 'web' to detect if running on web enviroment. |
| 2908 |
* |
| 2909 |
* This is the same concept as the React Native implementation. |
| 2910 |
* |
| 2911 |
* @see https://reactnative.dev/docs/platform-specific-code#platform-module |
| 2912 |
* |
| 2913 |
* Here is an example of how to use the select method: |
| 2914 |
* @example |
| 2915 |
* ```js |
| 2916 |
* import { Platform } from '@wordpress/element'; |
| 2917 |
* |
| 2918 |
* const placeholderLabel = Platform.select( { |
| 2919 |
* native: __( 'Add media' ), |
| 2920 |
* web: __( 'Drag images, upload new ones or select files from your library.' ), |
| 2921 |
* } ); |
| 2922 |
* ``` |
| 2923 |
*/ |
| 2924 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Platform); |
| 2925 |
//# sourceMappingURL=platform.js.map |
| 2926 |
|
| 2927 |
/***/ }), |
| 2928 |
|
| 2929 |
/***/ "../node_modules/@wordpress/element/build-module/raw-html.js": |
| 2930 |
/*!*******************************************************************!*\ |
| 2931 |
!*** ../node_modules/@wordpress/element/build-module/raw-html.js ***! |
| 2932 |
\*******************************************************************/ |
| 2933 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 2934 |
|
| 2935 |
"use strict"; |
| 2936 |
__webpack_require__.r(__webpack_exports__); |
| 2937 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2938 |
/* harmony export */ "default": () => (/* binding */ RawHTML) |
| 2939 |
/* harmony export */ }); |
| 2940 |
/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./react */ "react"); |
| 2941 |
/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_react__WEBPACK_IMPORTED_MODULE_0__); |
| 2942 |
/** |
| 2943 |
* Internal dependencies |
| 2944 |
*/ |
| 2945 |
|
| 2946 |
|
| 2947 |
/** @typedef {{children: string} & import('react').ComponentPropsWithoutRef<'div'>} RawHTMLProps */ |
| 2948 |
|
| 2949 |
/** |
| 2950 |
* Component used as equivalent of Fragment with unescaped HTML, in cases where |
| 2951 |
* it is desirable to render dangerous HTML without needing a wrapper element. |
| 2952 |
* To preserve additional props, a `div` wrapper _will_ be created if any props |
| 2953 |
* aside from `children` are passed. |
| 2954 |
* |
| 2955 |
* @param {RawHTMLProps} props Children should be a string of HTML or an array |
| 2956 |
* of strings. Other props will be passed through |
| 2957 |
* to the div wrapper. |
| 2958 |
* |
| 2959 |
* @return {JSX.Element} Dangerously-rendering component. |
| 2960 |
*/ |
| 2961 |
function RawHTML({ |
| 2962 |
children, |
| 2963 |
...props |
| 2964 |
}) { |
| 2965 |
let rawHtml = ''; |
| 2966 |
|
| 2967 |
// Cast children as an array, and concatenate each element if it is a string. |
| 2968 |
_react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children).forEach(child => { |
| 2969 |
if (typeof child === 'string' && child.trim() !== '') { |
| 2970 |
rawHtml += child; |
| 2971 |
} |
| 2972 |
}); |
| 2973 |
|
| 2974 |
// The `div` wrapper will be stripped by the `renderElement` serializer in |
| 2975 |
// `./serialize.js` unless there are non-children props present. |
| 2976 |
return (0,_react__WEBPACK_IMPORTED_MODULE_0__.createElement)('div', { |
| 2977 |
dangerouslySetInnerHTML: { |
| 2978 |
__html: rawHtml |
| 2979 |
}, |
| 2980 |
...props |
| 2981 |
}); |
| 2982 |
} |
| 2983 |
//# sourceMappingURL=raw-html.js.map |
| 2984 |
|
| 2985 |
/***/ }), |
| 2986 |
|
| 2987 |
/***/ "../node_modules/@wordpress/element/build-module/react-platform.js": |
| 2988 |
/*!*************************************************************************!*\ |
| 2989 |
!*** ../node_modules/@wordpress/element/build-module/react-platform.js ***! |
| 2990 |
\*************************************************************************/ |
| 2991 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 2992 |
|
| 2993 |
"use strict"; |
| 2994 |
__webpack_require__.r(__webpack_exports__); |
| 2995 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2996 |
/* harmony export */ createPortal: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.createPortal), |
| 2997 |
/* harmony export */ createRoot: () => (/* reexport safe */ react_dom_client__WEBPACK_IMPORTED_MODULE_1__.createRoot), |
| 2998 |
/* harmony export */ findDOMNode: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.findDOMNode), |
| 2999 |
/* harmony export */ flushSync: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.flushSync), |
| 3000 |
/* harmony export */ hydrate: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.hydrate), |
| 3001 |
/* harmony export */ hydrateRoot: () => (/* reexport safe */ react_dom_client__WEBPACK_IMPORTED_MODULE_1__.hydrateRoot), |
| 3002 |
/* harmony export */ render: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.render), |
| 3003 |
/* harmony export */ unmountComponentAtNode: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.unmountComponentAtNode) |
| 3004 |
/* harmony export */ }); |
| 3005 |
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-dom */ "react-dom"); |
| 3006 |
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_0__); |
| 3007 |
/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js"); |
| 3008 |
/** |
| 3009 |
* External dependencies |
| 3010 |
*/ |
| 3011 |
|
| 3012 |
|
| 3013 |
|
| 3014 |
/** |
| 3015 |
* Creates a portal into which a component can be rendered. |
| 3016 |
* |
| 3017 |
* @see https://github.com/facebook/react/issues/10309#issuecomment-318433235 |
| 3018 |
* |
| 3019 |
* @param {import('react').ReactElement} child Any renderable child, such as an element, |
| 3020 |
* string, or fragment. |
| 3021 |
* @param {HTMLElement} container DOM node into which element should be rendered. |
| 3022 |
*/ |
| 3023 |
|
| 3024 |
|
| 3025 |
/** |
| 3026 |
* Finds the dom node of a React component. |
| 3027 |
* |
| 3028 |
* @param {import('react').ComponentType} component Component's instance. |
| 3029 |
*/ |
| 3030 |
|
| 3031 |
|
| 3032 |
/** |
| 3033 |
* Forces React to flush any updates inside the provided callback synchronously. |
| 3034 |
* |
| 3035 |
* @param {Function} callback Callback to run synchronously. |
| 3036 |
*/ |
| 3037 |
|
| 3038 |
|
| 3039 |
/** |
| 3040 |
* Renders a given element into the target DOM node. |
| 3041 |
* |
| 3042 |
* @deprecated since WordPress 6.2.0. Use `createRoot` instead. |
| 3043 |
* @see https://react.dev/reference/react-dom/render |
| 3044 |
*/ |
| 3045 |
|
| 3046 |
|
| 3047 |
/** |
| 3048 |
* Hydrates a given element into the target DOM node. |
| 3049 |
* |
| 3050 |
* @deprecated since WordPress 6.2.0. Use `hydrateRoot` instead. |
| 3051 |
* @see https://react.dev/reference/react-dom/hydrate |
| 3052 |
*/ |
| 3053 |
|
| 3054 |
|
| 3055 |
/** |
| 3056 |
* Creates a new React root for the target DOM node. |
| 3057 |
* |
| 3058 |
* @since 6.2.0 Introduced in WordPress core. |
| 3059 |
* @see https://react.dev/reference/react-dom/client/createRoot |
| 3060 |
*/ |
| 3061 |
|
| 3062 |
|
| 3063 |
/** |
| 3064 |
* Creates a new React root for the target DOM node and hydrates it with a pre-generated markup. |
| 3065 |
* |
| 3066 |
* @since 6.2.0 Introduced in WordPress core. |
| 3067 |
* @see https://react.dev/reference/react-dom/client/hydrateRoot |
| 3068 |
*/ |
| 3069 |
|
| 3070 |
|
| 3071 |
/** |
| 3072 |
* Removes any mounted element from the target DOM node. |
| 3073 |
* |
| 3074 |
* @deprecated since WordPress 6.2.0. Use `root.unmount()` instead. |
| 3075 |
* @see https://react.dev/reference/react-dom/unmountComponentAtNode |
| 3076 |
*/ |
| 3077 |
|
| 3078 |
//# sourceMappingURL=react-platform.js.map |
| 3079 |
|
| 3080 |
/***/ }), |
| 3081 |
|
| 3082 |
/***/ "../node_modules/@wordpress/element/build-module/react.js": |
| 3083 |
/*!****************************************************************!*\ |
| 3084 |
!*** ../node_modules/@wordpress/element/build-module/react.js ***! |
| 3085 |
\****************************************************************/ |
| 3086 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 3087 |
|
| 3088 |
"use strict"; |
| 3089 |
__webpack_require__.r(__webpack_exports__); |
| 3090 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3091 |
/* harmony export */ Children: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.Children), |
| 3092 |
/* harmony export */ Component: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.Component), |
| 3093 |
/* harmony export */ Fragment: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.Fragment), |
| 3094 |
/* harmony export */ PureComponent: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.PureComponent), |
| 3095 |
/* harmony export */ StrictMode: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.StrictMode), |
| 3096 |
/* harmony export */ Suspense: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.Suspense), |
| 3097 |
/* harmony export */ cloneElement: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.cloneElement), |
| 3098 |
/* harmony export */ concatChildren: () => (/* binding */ concatChildren), |
| 3099 |
/* harmony export */ createContext: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.createContext), |
| 3100 |
/* harmony export */ createElement: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.createElement), |
| 3101 |
/* harmony export */ createRef: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.createRef), |
| 3102 |
/* harmony export */ forwardRef: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.forwardRef), |
| 3103 |
/* harmony export */ isValidElement: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.isValidElement), |
| 3104 |
/* harmony export */ lazy: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.lazy), |
| 3105 |
/* harmony export */ memo: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.memo), |
| 3106 |
/* harmony export */ startTransition: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.startTransition), |
| 3107 |
/* harmony export */ switchChildrenNodeName: () => (/* binding */ switchChildrenNodeName), |
| 3108 |
/* harmony export */ useCallback: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useCallback), |
| 3109 |
/* harmony export */ useContext: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useContext), |
| 3110 |
/* harmony export */ useDebugValue: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useDebugValue), |
| 3111 |
/* harmony export */ useDeferredValue: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useDeferredValue), |
| 3112 |
/* harmony export */ useEffect: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useEffect), |
| 3113 |
/* harmony export */ useId: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useId), |
| 3114 |
/* harmony export */ useImperativeHandle: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle), |
| 3115 |
/* harmony export */ useInsertionEffect: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useInsertionEffect), |
| 3116 |
/* harmony export */ useLayoutEffect: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect), |
| 3117 |
/* harmony export */ useMemo: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useMemo), |
| 3118 |
/* harmony export */ useReducer: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useReducer), |
| 3119 |
/* harmony export */ useRef: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useRef), |
| 3120 |
/* harmony export */ useState: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useState), |
| 3121 |
/* harmony export */ useSyncExternalStore: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useSyncExternalStore), |
| 3122 |
/* harmony export */ useTransition: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useTransition) |
| 3123 |
/* harmony export */ }); |
| 3124 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); |
| 3125 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); |
| 3126 |
/** |
| 3127 |
* External dependencies |
| 3128 |
*/ |
| 3129 |
// eslint-disable-next-line @typescript-eslint/no-restricted-imports |
| 3130 |
|
| 3131 |
|
| 3132 |
/** |
| 3133 |
* Object containing a React element. |
| 3134 |
* |
| 3135 |
* @typedef {import('react').ReactElement} Element |
| 3136 |
*/ |
| 3137 |
|
| 3138 |
/** |
| 3139 |
* Object containing a React component. |
| 3140 |
* |
| 3141 |
* @typedef {import('react').ComponentType} ComponentType |
| 3142 |
*/ |
| 3143 |
|
| 3144 |
/** |
| 3145 |
* Object containing a React synthetic event. |
| 3146 |
* |
| 3147 |
* @typedef {import('react').SyntheticEvent} SyntheticEvent |
| 3148 |
*/ |
| 3149 |
|
| 3150 |
/** |
| 3151 |
* Object containing a React synthetic event. |
| 3152 |
* |
| 3153 |
* @template T |
| 3154 |
* @typedef {import('react').RefObject<T>} RefObject<T> |
| 3155 |
*/ |
| 3156 |
|
| 3157 |
/** |
| 3158 |
* Object that provides utilities for dealing with React children. |
| 3159 |
*/ |
| 3160 |
|
| 3161 |
|
| 3162 |
/** |
| 3163 |
* Creates a copy of an element with extended props. |
| 3164 |
* |
| 3165 |
* @param {Element} element Element |
| 3166 |
* @param {?Object} props Props to apply to cloned element |
| 3167 |
* |
| 3168 |
* @return {Element} Cloned element. |
| 3169 |
*/ |
| 3170 |
|
| 3171 |
|
| 3172 |
/** |
| 3173 |
* A base class to create WordPress Components (Refs, state and lifecycle hooks) |
| 3174 |
*/ |
| 3175 |
|
| 3176 |
|
| 3177 |
/** |
| 3178 |
* Creates a context object containing two components: a provider and consumer. |
| 3179 |
* |
| 3180 |
* @param {Object} defaultValue A default data stored in the context. |
| 3181 |
* |
| 3182 |
* @return {Object} Context object. |
| 3183 |
*/ |
| 3184 |
|
| 3185 |
|
| 3186 |
/** |
| 3187 |
* Returns a new element of given type. Type can be either a string tag name or |
| 3188 |
* another function which itself returns an element. |
| 3189 |
* |
| 3190 |
* @param {?(string|Function)} type Tag name or element creator |
| 3191 |
* @param {Object} props Element properties, either attribute |
| 3192 |
* set to apply to DOM node or values to |
| 3193 |
* pass through to element creator |
| 3194 |
* @param {...Element} children Descendant elements |
| 3195 |
* |
| 3196 |
* @return {Element} Element. |
| 3197 |
*/ |
| 3198 |
|
| 3199 |
|
| 3200 |
/** |
| 3201 |
* Returns an object tracking a reference to a rendered element via its |
| 3202 |
* `current` property as either a DOMElement or Element, dependent upon the |
| 3203 |
* type of element rendered with the ref attribute. |
| 3204 |
* |
| 3205 |
* @return {Object} Ref object. |
| 3206 |
*/ |
| 3207 |
|
| 3208 |
|
| 3209 |
/** |
| 3210 |
* Component enhancer used to enable passing a ref to its wrapped component. |
| 3211 |
* Pass a function argument which receives `props` and `ref` as its arguments, |
| 3212 |
* returning an element using the forwarded ref. The return value is a new |
| 3213 |
* component which forwards its ref. |
| 3214 |
* |
| 3215 |
* @param {Function} forwarder Function passed `props` and `ref`, expected to |
| 3216 |
* return an element. |
| 3217 |
* |
| 3218 |
* @return {Component} Enhanced component. |
| 3219 |
*/ |
| 3220 |
|
| 3221 |
|
| 3222 |
/** |
| 3223 |
* A component which renders its children without any wrapping element. |
| 3224 |
*/ |
| 3225 |
|
| 3226 |
|
| 3227 |
/** |
| 3228 |
* Checks if an object is a valid React Element. |
| 3229 |
* |
| 3230 |
* @param {Object} objectToCheck The object to be checked. |
| 3231 |
* |
| 3232 |
* @return {boolean} true if objectToTest is a valid React Element and false otherwise. |
| 3233 |
*/ |
| 3234 |
|
| 3235 |
|
| 3236 |
/** |
| 3237 |
* @see https://reactjs.org/docs/react-api.html#reactmemo |
| 3238 |
*/ |
| 3239 |
|
| 3240 |
|
| 3241 |
/** |
| 3242 |
* Component that activates additional checks and warnings for its descendants. |
| 3243 |
*/ |
| 3244 |
|
| 3245 |
|
| 3246 |
/** |
| 3247 |
* @see https://reactjs.org/docs/hooks-reference.html#usecallback |
| 3248 |
*/ |
| 3249 |
|
| 3250 |
|
| 3251 |
/** |
| 3252 |
* @see https://reactjs.org/docs/hooks-reference.html#usecontext |
| 3253 |
*/ |
| 3254 |
|
| 3255 |
|
| 3256 |
/** |
| 3257 |
* @see https://reactjs.org/docs/hooks-reference.html#usedebugvalue |
| 3258 |
*/ |
| 3259 |
|
| 3260 |
|
| 3261 |
/** |
| 3262 |
* @see https://reactjs.org/docs/hooks-reference.html#usedeferredvalue |
| 3263 |
*/ |
| 3264 |
|
| 3265 |
|
| 3266 |
/** |
| 3267 |
* @see https://reactjs.org/docs/hooks-reference.html#useeffect |
| 3268 |
*/ |
| 3269 |
|
| 3270 |
|
| 3271 |
/** |
| 3272 |
* @see https://reactjs.org/docs/hooks-reference.html#useid |
| 3273 |
*/ |
| 3274 |
|
| 3275 |
|
| 3276 |
/** |
| 3277 |
* @see https://reactjs.org/docs/hooks-reference.html#useimperativehandle |
| 3278 |
*/ |
| 3279 |
|
| 3280 |
|
| 3281 |
/** |
| 3282 |
* @see https://reactjs.org/docs/hooks-reference.html#useinsertioneffect |
| 3283 |
*/ |
| 3284 |
|
| 3285 |
|
| 3286 |
/** |
| 3287 |
* @see https://reactjs.org/docs/hooks-reference.html#uselayouteffect |
| 3288 |
*/ |
| 3289 |
|
| 3290 |
|
| 3291 |
/** |
| 3292 |
* @see https://reactjs.org/docs/hooks-reference.html#usememo |
| 3293 |
*/ |
| 3294 |
|
| 3295 |
|
| 3296 |
/** |
| 3297 |
* @see https://reactjs.org/docs/hooks-reference.html#usereducer |
| 3298 |
*/ |
| 3299 |
|
| 3300 |
|
| 3301 |
/** |
| 3302 |
* @see https://reactjs.org/docs/hooks-reference.html#useref |
| 3303 |
*/ |
| 3304 |
|
| 3305 |
|
| 3306 |
/** |
| 3307 |
* @see https://reactjs.org/docs/hooks-reference.html#usestate |
| 3308 |
*/ |
| 3309 |
|
| 3310 |
|
| 3311 |
/** |
| 3312 |
* @see https://reactjs.org/docs/hooks-reference.html#usesyncexternalstore |
| 3313 |
*/ |
| 3314 |
|
| 3315 |
|
| 3316 |
/** |
| 3317 |
* @see https://reactjs.org/docs/hooks-reference.html#usetransition |
| 3318 |
*/ |
| 3319 |
|
| 3320 |
|
| 3321 |
/** |
| 3322 |
* @see https://reactjs.org/docs/react-api.html#starttransition |
| 3323 |
*/ |
| 3324 |
|
| 3325 |
|
| 3326 |
/** |
| 3327 |
* @see https://reactjs.org/docs/react-api.html#reactlazy |
| 3328 |
*/ |
| 3329 |
|
| 3330 |
|
| 3331 |
/** |
| 3332 |
* @see https://reactjs.org/docs/react-api.html#reactsuspense |
| 3333 |
*/ |
| 3334 |
|
| 3335 |
|
| 3336 |
/** |
| 3337 |
* @see https://reactjs.org/docs/react-api.html#reactpurecomponent |
| 3338 |
*/ |
| 3339 |
|
| 3340 |
|
| 3341 |
/** |
| 3342 |
* Concatenate two or more React children objects. |
| 3343 |
* |
| 3344 |
* @param {...?Object} childrenArguments Array of children arguments (array of arrays/strings/objects) to concatenate. |
| 3345 |
* |
| 3346 |
* @return {Array} The concatenated value. |
| 3347 |
*/ |
| 3348 |
function concatChildren(...childrenArguments) { |
| 3349 |
return childrenArguments.reduce((accumulator, children, i) => { |
| 3350 |
react__WEBPACK_IMPORTED_MODULE_0__.Children.forEach(children, (child, j) => { |
| 3351 |
if (child && 'string' !== typeof child) { |
| 3352 |
child = (0,react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(child, { |
| 3353 |
key: [i, j].join() |
| 3354 |
}); |
| 3355 |
} |
| 3356 |
accumulator.push(child); |
| 3357 |
}); |
| 3358 |
return accumulator; |
| 3359 |
}, []); |
| 3360 |
} |
| 3361 |
|
| 3362 |
/** |
| 3363 |
* Switches the nodeName of all the elements in the children object. |
| 3364 |
* |
| 3365 |
* @param {?Object} children Children object. |
| 3366 |
* @param {string} nodeName Node name. |
| 3367 |
* |
| 3368 |
* @return {?Object} The updated children object. |
| 3369 |
*/ |
| 3370 |
function switchChildrenNodeName(children, nodeName) { |
| 3371 |
return children && react__WEBPACK_IMPORTED_MODULE_0__.Children.map(children, (elt, index) => { |
| 3372 |
if (typeof elt?.valueOf() === 'string') { |
| 3373 |
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(nodeName, { |
| 3374 |
key: index |
| 3375 |
}, elt); |
| 3376 |
} |
| 3377 |
const { |
| 3378 |
children: childrenProp, |
| 3379 |
...props |
| 3380 |
} = elt.props; |
| 3381 |
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(nodeName, { |
| 3382 |
key: index, |
| 3383 |
...props |
| 3384 |
}, childrenProp); |
| 3385 |
}); |
| 3386 |
} |
| 3387 |
//# sourceMappingURL=react.js.map |
| 3388 |
|
| 3389 |
/***/ }), |
| 3390 |
|
| 3391 |
/***/ "../node_modules/@wordpress/element/build-module/serialize.js": |
| 3392 |
/*!********************************************************************!*\ |
| 3393 |
!*** ../node_modules/@wordpress/element/build-module/serialize.js ***! |
| 3394 |
\********************************************************************/ |
| 3395 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 3396 |
|
| 3397 |
"use strict"; |
| 3398 |
__webpack_require__.r(__webpack_exports__); |
| 3399 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3400 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), |
| 3401 |
/* harmony export */ hasPrefix: () => (/* binding */ hasPrefix), |
| 3402 |
/* harmony export */ renderAttributes: () => (/* binding */ renderAttributes), |
| 3403 |
/* harmony export */ renderComponent: () => (/* binding */ renderComponent), |
| 3404 |
/* harmony export */ renderElement: () => (/* binding */ renderElement), |
| 3405 |
/* harmony export */ renderNativeComponent: () => (/* binding */ renderNativeComponent), |
| 3406 |
/* harmony export */ renderStyle: () => (/* binding */ renderStyle) |
| 3407 |
/* harmony export */ }); |
| 3408 |
/* 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"); |
| 3409 |
/* harmony import */ var change_case__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! change-case */ "../node_modules/param-case/dist.es2015/index.js"); |
| 3410 |
/* harmony import */ var _wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/escape-html */ "../node_modules/@wordpress/escape-html/build-module/index.js"); |
| 3411 |
/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./react */ "react"); |
| 3412 |
/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_react__WEBPACK_IMPORTED_MODULE_3__); |
| 3413 |
/* harmony import */ var _raw_html__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./raw-html */ "../node_modules/@wordpress/element/build-module/raw-html.js"); |
| 3414 |
/** |
| 3415 |
* Parts of this source were derived and modified from fast-react-render, |
| 3416 |
* released under the MIT license. |
| 3417 |
* |
| 3418 |
* https://github.com/alt-j/fast-react-render |
| 3419 |
* |
| 3420 |
* Copyright (c) 2016 Andrey Morozov |
| 3421 |
* |
| 3422 |
* Permission is hereby granted, free of charge, to any person obtaining a copy |
| 3423 |
* of this software and associated documentation files (the "Software"), to deal |
| 3424 |
* in the Software without restriction, including without limitation the rights |
| 3425 |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 3426 |
* copies of the Software, and to permit persons to whom the Software is |
| 3427 |
* furnished to do so, subject to the following conditions: |
| 3428 |
* |
| 3429 |
* The above copyright notice and this permission notice shall be included in |
| 3430 |
* all copies or substantial portions of the Software. |
| 3431 |
* |
| 3432 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 3433 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 3434 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 3435 |
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 3436 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 3437 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 3438 |
* THE SOFTWARE. |
| 3439 |
*/ |
| 3440 |
|
| 3441 |
/** |
| 3442 |
* External dependencies |
| 3443 |
*/ |
| 3444 |
|
| 3445 |
|
| 3446 |
|
| 3447 |
/** |
| 3448 |
* WordPress dependencies |
| 3449 |
*/ |
| 3450 |
|
| 3451 |
|
| 3452 |
/** |
| 3453 |
* Internal dependencies |
| 3454 |
*/ |
| 3455 |
|
| 3456 |
|
| 3457 |
|
| 3458 |
/** @typedef {import('react').ReactElement} ReactElement */ |
| 3459 |
|
| 3460 |
const { |
| 3461 |
Provider, |
| 3462 |
Consumer |
| 3463 |
} = (0,_react__WEBPACK_IMPORTED_MODULE_3__.createContext)(undefined); |
| 3464 |
const ForwardRef = (0,_react__WEBPACK_IMPORTED_MODULE_3__.forwardRef)(() => { |
| 3465 |
return null; |
| 3466 |
}); |
| 3467 |
|
| 3468 |
/** |
| 3469 |
* Valid attribute types. |
| 3470 |
* |
| 3471 |
* @type {Set<string>} |
| 3472 |
*/ |
| 3473 |
const ATTRIBUTES_TYPES = new Set(['string', 'boolean', 'number']); |
| 3474 |
|
| 3475 |
/** |
| 3476 |
* Element tags which can be self-closing. |
| 3477 |
* |
| 3478 |
* @type {Set<string>} |
| 3479 |
*/ |
| 3480 |
const SELF_CLOSING_TAGS = new Set(['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']); |
| 3481 |
|
| 3482 |
/** |
| 3483 |
* Boolean attributes are attributes whose presence as being assigned is |
| 3484 |
* meaningful, even if only empty. |
| 3485 |
* |
| 3486 |
* See: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attributes |
| 3487 |
* Extracted from: https://html.spec.whatwg.org/multipage/indices.html#attributes-3 |
| 3488 |
* |
| 3489 |
* Object.keys( [ ...document.querySelectorAll( '#attributes-1 > tbody > tr' ) ] |
| 3490 |
* .filter( ( tr ) => tr.lastChild.textContent.indexOf( 'Boolean attribute' ) !== -1 ) |
| 3491 |
* .reduce( ( result, tr ) => Object.assign( result, { |
| 3492 |
* [ tr.firstChild.textContent.trim() ]: true |
| 3493 |
* } ), {} ) ).sort(); |
| 3494 |
* |
| 3495 |
* @type {Set<string>} |
| 3496 |
*/ |
| 3497 |
const BOOLEAN_ATTRIBUTES = new Set(['allowfullscreen', 'allowpaymentrequest', 'allowusermedia', 'async', 'autofocus', 'autoplay', 'checked', 'controls', 'default', 'defer', 'disabled', 'download', 'formnovalidate', 'hidden', 'ismap', 'itemscope', 'loop', 'multiple', 'muted', 'nomodule', 'novalidate', 'open', 'playsinline', 'readonly', 'required', 'reversed', 'selected', 'typemustmatch']); |
| 3498 |
|
| 3499 |
/** |
| 3500 |
* Enumerated attributes are attributes which must be of a specific value form. |
| 3501 |
* Like boolean attributes, these are meaningful if specified, even if not of a |
| 3502 |
* valid enumerated value. |
| 3503 |
* |
| 3504 |
* See: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#enumerated-attribute |
| 3505 |
* Extracted from: https://html.spec.whatwg.org/multipage/indices.html#attributes-3 |
| 3506 |
* |
| 3507 |
* Object.keys( [ ...document.querySelectorAll( '#attributes-1 > tbody > tr' ) ] |
| 3508 |
* .filter( ( tr ) => /^("(.+?)";?\s*)+/.test( tr.lastChild.textContent.trim() ) ) |
| 3509 |
* .reduce( ( result, tr ) => Object.assign( result, { |
| 3510 |
* [ tr.firstChild.textContent.trim() ]: true |
| 3511 |
* } ), {} ) ).sort(); |
| 3512 |
* |
| 3513 |
* Some notable omissions: |
| 3514 |
* |
| 3515 |
* - `alt`: https://blog.whatwg.org/omit-alt |
| 3516 |
* |
| 3517 |
* @type {Set<string>} |
| 3518 |
*/ |
| 3519 |
const ENUMERATED_ATTRIBUTES = new Set(['autocapitalize', 'autocomplete', 'charset', 'contenteditable', 'crossorigin', 'decoding', 'dir', 'draggable', 'enctype', 'formenctype', 'formmethod', 'http-equiv', 'inputmode', 'kind', 'method', 'preload', 'scope', 'shape', 'spellcheck', 'translate', 'type', 'wrap']); |
| 3520 |
|
| 3521 |
/** |
| 3522 |
* Set of CSS style properties which support assignment of unitless numbers. |
| 3523 |
* Used in rendering of style properties, where `px` unit is assumed unless |
| 3524 |
* property is included in this set or value is zero. |
| 3525 |
* |
| 3526 |
* Generated via: |
| 3527 |
* |
| 3528 |
* Object.entries( document.createElement( 'div' ).style ) |
| 3529 |
* .filter( ( [ key ] ) => ( |
| 3530 |
* ! /^(webkit|ms|moz)/.test( key ) && |
| 3531 |
* ( e.style[ key ] = 10 ) && |
| 3532 |
* e.style[ key ] === '10' |
| 3533 |
* ) ) |
| 3534 |
* .map( ( [ key ] ) => key ) |
| 3535 |
* .sort(); |
| 3536 |
* |
| 3537 |
* @type {Set<string>} |
| 3538 |
*/ |
| 3539 |
const CSS_PROPERTIES_SUPPORTS_UNITLESS = new Set(['animation', 'animationIterationCount', 'baselineShift', 'borderImageOutset', 'borderImageSlice', 'borderImageWidth', 'columnCount', 'cx', 'cy', 'fillOpacity', 'flexGrow', 'flexShrink', 'floodOpacity', 'fontWeight', 'gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart', 'lineHeight', 'opacity', 'order', 'orphans', 'r', 'rx', 'ry', 'shapeImageThreshold', 'stopOpacity', 'strokeDasharray', 'strokeDashoffset', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth', 'tabSize', 'widows', 'x', 'y', 'zIndex', 'zoom']); |
| 3540 |
|
| 3541 |
/** |
| 3542 |
* Returns true if the specified string is prefixed by one of an array of |
| 3543 |
* possible prefixes. |
| 3544 |
* |
| 3545 |
* @param {string} string String to check. |
| 3546 |
* @param {string[]} prefixes Possible prefixes. |
| 3547 |
* |
| 3548 |
* @return {boolean} Whether string has prefix. |
| 3549 |
*/ |
| 3550 |
function hasPrefix(string, prefixes) { |
| 3551 |
return prefixes.some(prefix => string.indexOf(prefix) === 0); |
| 3552 |
} |
| 3553 |
|
| 3554 |
/** |
| 3555 |
* Returns true if the given prop name should be ignored in attributes |
| 3556 |
* serialization, or false otherwise. |
| 3557 |
* |
| 3558 |
* @param {string} attribute Attribute to check. |
| 3559 |
* |
| 3560 |
* @return {boolean} Whether attribute should be ignored. |
| 3561 |
*/ |
| 3562 |
function isInternalAttribute(attribute) { |
| 3563 |
return 'key' === attribute || 'children' === attribute; |
| 3564 |
} |
| 3565 |
|
| 3566 |
/** |
| 3567 |
* Returns the normal form of the element's attribute value for HTML. |
| 3568 |
* |
| 3569 |
* @param {string} attribute Attribute name. |
| 3570 |
* @param {*} value Non-normalized attribute value. |
| 3571 |
* |
| 3572 |
* @return {*} Normalized attribute value. |
| 3573 |
*/ |
| 3574 |
function getNormalAttributeValue(attribute, value) { |
| 3575 |
switch (attribute) { |
| 3576 |
case 'style': |
| 3577 |
return renderStyle(value); |
| 3578 |
} |
| 3579 |
return value; |
| 3580 |
} |
| 3581 |
/** |
| 3582 |
* This is a map of all SVG attributes that have dashes. Map(lower case prop => dashed lower case attribute). |
| 3583 |
* We need this to render e.g strokeWidth as stroke-width. |
| 3584 |
* |
| 3585 |
* List from: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute. |
| 3586 |
*/ |
| 3587 |
const SVG_ATTRIBUTE_WITH_DASHES_LIST = ['accentHeight', 'alignmentBaseline', 'arabicForm', 'baselineShift', 'capHeight', 'clipPath', 'clipRule', 'colorInterpolation', 'colorInterpolationFilters', 'colorProfile', 'colorRendering', 'dominantBaseline', 'enableBackground', 'fillOpacity', 'fillRule', 'floodColor', 'floodOpacity', 'fontFamily', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontWeight', 'glyphName', 'glyphOrientationHorizontal', 'glyphOrientationVertical', 'horizAdvX', 'horizOriginX', 'imageRendering', 'letterSpacing', 'lightingColor', 'markerEnd', 'markerMid', 'markerStart', 'overlinePosition', 'overlineThickness', 'paintOrder', 'panose1', 'pointerEvents', 'renderingIntent', 'shapeRendering', 'stopColor', 'stopOpacity', 'strikethroughPosition', 'strikethroughThickness', 'strokeDasharray', 'strokeDashoffset', 'strokeLinecap', 'strokeLinejoin', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth', 'textAnchor', 'textDecoration', 'textRendering', 'underlinePosition', 'underlineThickness', 'unicodeBidi', 'unicodeRange', 'unitsPerEm', 'vAlphabetic', 'vHanging', 'vIdeographic', 'vMathematical', 'vectorEffect', 'vertAdvY', 'vertOriginX', 'vertOriginY', 'wordSpacing', 'writingMode', 'xmlnsXlink', 'xHeight'].reduce((map, attribute) => { |
| 3588 |
// The keys are lower-cased for more robust lookup. |
| 3589 |
map[attribute.toLowerCase()] = attribute; |
| 3590 |
return map; |
| 3591 |
}, {}); |
| 3592 |
|
| 3593 |
/** |
| 3594 |
* This is a map of all case-sensitive SVG attributes. Map(lowercase key => proper case attribute). |
| 3595 |
* The keys are lower-cased for more robust lookup. |
| 3596 |
* Note that this list only contains attributes that contain at least one capital letter. |
| 3597 |
* Lowercase attributes don't need mapping, since we lowercase all attributes by default. |
| 3598 |
*/ |
| 3599 |
const CASE_SENSITIVE_SVG_ATTRIBUTES = ['allowReorder', 'attributeName', 'attributeType', 'autoReverse', 'baseFrequency', 'baseProfile', 'calcMode', 'clipPathUnits', 'contentScriptType', 'contentStyleType', 'diffuseConstant', 'edgeMode', 'externalResourcesRequired', 'filterRes', 'filterUnits', 'glyphRef', 'gradientTransform', 'gradientUnits', 'kernelMatrix', 'kernelUnitLength', 'keyPoints', 'keySplines', 'keyTimes', 'lengthAdjust', 'limitingConeAngle', 'markerHeight', 'markerUnits', 'markerWidth', 'maskContentUnits', 'maskUnits', 'numOctaves', 'pathLength', 'patternContentUnits', 'patternTransform', 'patternUnits', 'pointsAtX', 'pointsAtY', 'pointsAtZ', 'preserveAlpha', 'preserveAspectRatio', 'primitiveUnits', 'refX', 'refY', 'repeatCount', 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'specularConstant', 'specularExponent', 'spreadMethod', 'startOffset', 'stdDeviation', 'stitchTiles', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'surfaceScale', 'systemLanguage', 'tableValues', 'targetX', 'targetY', 'textLength', 'viewBox', 'viewTarget', 'xChannelSelector', 'yChannelSelector'].reduce((map, attribute) => { |
| 3600 |
// The keys are lower-cased for more robust lookup. |
| 3601 |
map[attribute.toLowerCase()] = attribute; |
| 3602 |
return map; |
| 3603 |
}, {}); |
| 3604 |
|
| 3605 |
/** |
| 3606 |
* This is a map of all SVG attributes that have colons. |
| 3607 |
* Keys are lower-cased and stripped of their colons for more robust lookup. |
| 3608 |
*/ |
| 3609 |
const SVG_ATTRIBUTES_WITH_COLONS = ['xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space', 'xmlns:xlink'].reduce((map, attribute) => { |
| 3610 |
map[attribute.replace(':', '').toLowerCase()] = attribute; |
| 3611 |
return map; |
| 3612 |
}, {}); |
| 3613 |
|
| 3614 |
/** |
| 3615 |
* Returns the normal form of the element's attribute name for HTML. |
| 3616 |
* |
| 3617 |
* @param {string} attribute Non-normalized attribute name. |
| 3618 |
* |
| 3619 |
* @return {string} Normalized attribute name. |
| 3620 |
*/ |
| 3621 |
function getNormalAttributeName(attribute) { |
| 3622 |
switch (attribute) { |
| 3623 |
case 'htmlFor': |
| 3624 |
return 'for'; |
| 3625 |
case 'className': |
| 3626 |
return 'class'; |
| 3627 |
} |
| 3628 |
const attributeLowerCase = attribute.toLowerCase(); |
| 3629 |
if (CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase]) { |
| 3630 |
return CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase]; |
| 3631 |
} else if (SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]) { |
| 3632 |
return (0,change_case__WEBPACK_IMPORTED_MODULE_1__.paramCase)(SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]); |
| 3633 |
} else if (SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase]) { |
| 3634 |
return SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase]; |
| 3635 |
} |
| 3636 |
return attributeLowerCase; |
| 3637 |
} |
| 3638 |
|
| 3639 |
/** |
| 3640 |
* Returns the normal form of the style property name for HTML. |
| 3641 |
* |
| 3642 |
* - Converts property names to kebab-case, e.g. 'backgroundColor' → 'background-color' |
| 3643 |
* - Leaves custom attributes alone, e.g. '--myBackgroundColor' → '--myBackgroundColor' |
| 3644 |
* - Converts vendor-prefixed property names to -kebab-case, e.g. 'MozTransform' → '-moz-transform' |
| 3645 |
* |
| 3646 |
* @param {string} property Property name. |
| 3647 |
* |
| 3648 |
* @return {string} Normalized property name. |
| 3649 |
*/ |
| 3650 |
function getNormalStylePropertyName(property) { |
| 3651 |
if (property.startsWith('--')) { |
| 3652 |
return property; |
| 3653 |
} |
| 3654 |
if (hasPrefix(property, ['ms', 'O', 'Moz', 'Webkit'])) { |
| 3655 |
return '-' + (0,change_case__WEBPACK_IMPORTED_MODULE_1__.paramCase)(property); |
| 3656 |
} |
| 3657 |
return (0,change_case__WEBPACK_IMPORTED_MODULE_1__.paramCase)(property); |
| 3658 |
} |
| 3659 |
|
| 3660 |
/** |
| 3661 |
* Returns the normal form of the style property value for HTML. Appends a |
| 3662 |
* default pixel unit if numeric, not a unitless property, and not zero. |
| 3663 |
* |
| 3664 |
* @param {string} property Property name. |
| 3665 |
* @param {*} value Non-normalized property value. |
| 3666 |
* |
| 3667 |
* @return {*} Normalized property value. |
| 3668 |
*/ |
| 3669 |
function getNormalStylePropertyValue(property, value) { |
| 3670 |
if (typeof value === 'number' && 0 !== value && !CSS_PROPERTIES_SUPPORTS_UNITLESS.has(property)) { |
| 3671 |
return value + 'px'; |
| 3672 |
} |
| 3673 |
return value; |
| 3674 |
} |
| 3675 |
|
| 3676 |
/** |
| 3677 |
* Serializes a React element to string. |
| 3678 |
* |
| 3679 |
* @param {import('react').ReactNode} element Element to serialize. |
| 3680 |
* @param {Object} [context] Context object. |
| 3681 |
* @param {Object} [legacyContext] Legacy context object. |
| 3682 |
* |
| 3683 |
* @return {string} Serialized element. |
| 3684 |
*/ |
| 3685 |
function renderElement(element, context, legacyContext = {}) { |
| 3686 |
if (null === element || undefined === element || false === element) { |
| 3687 |
return ''; |
| 3688 |
} |
| 3689 |
if (Array.isArray(element)) { |
| 3690 |
return renderChildren(element, context, legacyContext); |
| 3691 |
} |
| 3692 |
switch (typeof element) { |
| 3693 |
case 'string': |
| 3694 |
return (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__.escapeHTML)(element); |
| 3695 |
case 'number': |
| 3696 |
return element.toString(); |
| 3697 |
} |
| 3698 |
const { |
| 3699 |
type, |
| 3700 |
props |
| 3701 |
} = /** @type {{type?: any, props?: any}} */ |
| 3702 |
element; |
| 3703 |
switch (type) { |
| 3704 |
case _react__WEBPACK_IMPORTED_MODULE_3__.StrictMode: |
| 3705 |
case _react__WEBPACK_IMPORTED_MODULE_3__.Fragment: |
| 3706 |
return renderChildren(props.children, context, legacyContext); |
| 3707 |
case _raw_html__WEBPACK_IMPORTED_MODULE_4__["default"]: |
| 3708 |
const { |
| 3709 |
children, |
| 3710 |
...wrapperProps |
| 3711 |
} = props; |
| 3712 |
return renderNativeComponent(!Object.keys(wrapperProps).length ? null : 'div', { |
| 3713 |
...wrapperProps, |
| 3714 |
dangerouslySetInnerHTML: { |
| 3715 |
__html: children |
| 3716 |
} |
| 3717 |
}, context, legacyContext); |
| 3718 |
} |
| 3719 |
switch (typeof type) { |
| 3720 |
case 'string': |
| 3721 |
return renderNativeComponent(type, props, context, legacyContext); |
| 3722 |
case 'function': |
| 3723 |
if (type.prototype && typeof type.prototype.render === 'function') { |
| 3724 |
return renderComponent(type, props, context, legacyContext); |
| 3725 |
} |
| 3726 |
return renderElement(type(props, legacyContext), context, legacyContext); |
| 3727 |
} |
| 3728 |
switch (type && type.$$typeof) { |
| 3729 |
case Provider.$$typeof: |
| 3730 |
return renderChildren(props.children, props.value, legacyContext); |
| 3731 |
case Consumer.$$typeof: |
| 3732 |
return renderElement(props.children(context || type._currentValue), context, legacyContext); |
| 3733 |
case ForwardRef.$$typeof: |
| 3734 |
return renderElement(type.render(props), context, legacyContext); |
| 3735 |
} |
| 3736 |
return ''; |
| 3737 |
} |
| 3738 |
|
| 3739 |
/** |
| 3740 |
* Serializes a native component type to string. |
| 3741 |
* |
| 3742 |
* @param {?string} type Native component type to serialize, or null if |
| 3743 |
* rendering as fragment of children content. |
| 3744 |
* @param {Object} props Props object. |
| 3745 |
* @param {Object} [context] Context object. |
| 3746 |
* @param {Object} [legacyContext] Legacy context object. |
| 3747 |
* |
| 3748 |
* @return {string} Serialized element. |
| 3749 |
*/ |
| 3750 |
function renderNativeComponent(type, props, context, legacyContext = {}) { |
| 3751 |
let content = ''; |
| 3752 |
if (type === 'textarea' && props.hasOwnProperty('value')) { |
| 3753 |
// Textarea children can be assigned as value prop. If it is, render in |
| 3754 |
// place of children. Ensure to omit so it is not assigned as attribute |
| 3755 |
// as well. |
| 3756 |
content = renderChildren(props.value, context, legacyContext); |
| 3757 |
const { |
| 3758 |
value, |
| 3759 |
...restProps |
| 3760 |
} = props; |
| 3761 |
props = restProps; |
| 3762 |
} else if (props.dangerouslySetInnerHTML && typeof props.dangerouslySetInnerHTML.__html === 'string') { |
| 3763 |
// Dangerous content is left unescaped. |
| 3764 |
content = props.dangerouslySetInnerHTML.__html; |
| 3765 |
} else if (typeof props.children !== 'undefined') { |
| 3766 |
content = renderChildren(props.children, context, legacyContext); |
| 3767 |
} |
| 3768 |
if (!type) { |
| 3769 |
return content; |
| 3770 |
} |
| 3771 |
const attributes = renderAttributes(props); |
| 3772 |
if (SELF_CLOSING_TAGS.has(type)) { |
| 3773 |
return '<' + type + attributes + '/>'; |
| 3774 |
} |
| 3775 |
return '<' + type + attributes + '>' + content + '</' + type + '>'; |
| 3776 |
} |
| 3777 |
|
| 3778 |
/** @typedef {import('react').ComponentType} ComponentType */ |
| 3779 |
|
| 3780 |
/** |
| 3781 |
* Serializes a non-native component type to string. |
| 3782 |
* |
| 3783 |
* @param {ComponentType} Component Component type to serialize. |
| 3784 |
* @param {Object} props Props object. |
| 3785 |
* @param {Object} [context] Context object. |
| 3786 |
* @param {Object} [legacyContext] Legacy context object. |
| 3787 |
* |
| 3788 |
* @return {string} Serialized element |
| 3789 |
*/ |
| 3790 |
function renderComponent(Component, props, context, legacyContext = {}) { |
| 3791 |
const instance = new ( /** @type {import('react').ComponentClass} */ |
| 3792 |
Component)(props, legacyContext); |
| 3793 |
if (typeof |
| 3794 |
// Ignore reason: Current prettier reformats parens and mangles type assertion |
| 3795 |
// prettier-ignore |
| 3796 |
/** @type {{getChildContext?: () => unknown}} */ |
| 3797 |
instance.getChildContext === 'function') { |
| 3798 |
Object.assign(legacyContext, /** @type {{getChildContext?: () => unknown}} */instance.getChildContext()); |
| 3799 |
} |
| 3800 |
const html = renderElement(instance.render(), context, legacyContext); |
| 3801 |
return html; |
| 3802 |
} |
| 3803 |
|
| 3804 |
/** |
| 3805 |
* Serializes an array of children to string. |
| 3806 |
* |
| 3807 |
* @param {import('react').ReactNodeArray} children Children to serialize. |
| 3808 |
* @param {Object} [context] Context object. |
| 3809 |
* @param {Object} [legacyContext] Legacy context object. |
| 3810 |
* |
| 3811 |
* @return {string} Serialized children. |
| 3812 |
*/ |
| 3813 |
function renderChildren(children, context, legacyContext = {}) { |
| 3814 |
let result = ''; |
| 3815 |
children = Array.isArray(children) ? children : [children]; |
| 3816 |
for (let i = 0; i < children.length; i++) { |
| 3817 |
const child = children[i]; |
| 3818 |
result += renderElement(child, context, legacyContext); |
| 3819 |
} |
| 3820 |
return result; |
| 3821 |
} |
| 3822 |
|
| 3823 |
/** |
| 3824 |
* Renders a props object as a string of HTML attributes. |
| 3825 |
* |
| 3826 |
* @param {Object} props Props object. |
| 3827 |
* |
| 3828 |
* @return {string} Attributes string. |
| 3829 |
*/ |
| 3830 |
function renderAttributes(props) { |
| 3831 |
let result = ''; |
| 3832 |
for (const key in props) { |
| 3833 |
const attribute = getNormalAttributeName(key); |
| 3834 |
if (!(0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__.isValidAttributeName)(attribute)) { |
| 3835 |
continue; |
| 3836 |
} |
| 3837 |
let value = getNormalAttributeValue(key, props[key]); |
| 3838 |
|
| 3839 |
// If value is not of serializable type, skip. |
| 3840 |
if (!ATTRIBUTES_TYPES.has(typeof value)) { |
| 3841 |
continue; |
| 3842 |
} |
| 3843 |
|
| 3844 |
// Don't render internal attribute names. |
| 3845 |
if (isInternalAttribute(key)) { |
| 3846 |
continue; |
| 3847 |
} |
| 3848 |
const isBooleanAttribute = BOOLEAN_ATTRIBUTES.has(attribute); |
| 3849 |
|
| 3850 |
// Boolean attribute should be omitted outright if its value is false. |
| 3851 |
if (isBooleanAttribute && value === false) { |
| 3852 |
continue; |
| 3853 |
} |
| 3854 |
const isMeaningfulAttribute = isBooleanAttribute || hasPrefix(key, ['data-', 'aria-']) || ENUMERATED_ATTRIBUTES.has(attribute); |
| 3855 |
|
| 3856 |
// Only write boolean value as attribute if meaningful. |
| 3857 |
if (typeof value === 'boolean' && !isMeaningfulAttribute) { |
| 3858 |
continue; |
| 3859 |
} |
| 3860 |
result += ' ' + attribute; |
| 3861 |
|
| 3862 |
// Boolean attributes should write attribute name, but without value. |
| 3863 |
// Mere presence of attribute name is effective truthiness. |
| 3864 |
if (isBooleanAttribute) { |
| 3865 |
continue; |
| 3866 |
} |
| 3867 |
if (typeof value === 'string') { |
| 3868 |
value = (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__.escapeAttribute)(value); |
| 3869 |
} |
| 3870 |
result += '="' + value + '"'; |
| 3871 |
} |
| 3872 |
return result; |
| 3873 |
} |
| 3874 |
|
| 3875 |
/** |
| 3876 |
* Renders a style object as a string attribute value. |
| 3877 |
* |
| 3878 |
* @param {Object} style Style object. |
| 3879 |
* |
| 3880 |
* @return {string} Style attribute value. |
| 3881 |
*/ |
| 3882 |
function renderStyle(style) { |
| 3883 |
// Only generate from object, e.g. tolerate string value. |
| 3884 |
if (!(0,is_plain_object__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(style)) { |
| 3885 |
return style; |
| 3886 |
} |
| 3887 |
let result; |
| 3888 |
for (const property in style) { |
| 3889 |
const value = style[property]; |
| 3890 |
if (null === value || undefined === value) { |
| 3891 |
continue; |
| 3892 |
} |
| 3893 |
if (result) { |
| 3894 |
result += ';'; |
| 3895 |
} else { |
| 3896 |
result = ''; |
| 3897 |
} |
| 3898 |
const normalName = getNormalStylePropertyName(property); |
| 3899 |
const normalValue = getNormalStylePropertyValue(property, value); |
| 3900 |
result += normalName + ':' + normalValue; |
| 3901 |
} |
| 3902 |
return result; |
| 3903 |
} |
| 3904 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (renderElement); |
| 3905 |
//# sourceMappingURL=serialize.js.map |
| 3906 |
|
| 3907 |
/***/ }), |
| 3908 |
|
| 3909 |
/***/ "../node_modules/@wordpress/element/build-module/utils.js": |
| 3910 |
/*!****************************************************************!*\ |
| 3911 |
!*** ../node_modules/@wordpress/element/build-module/utils.js ***! |
| 3912 |
\****************************************************************/ |
| 3913 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 3914 |
|
| 3915 |
"use strict"; |
| 3916 |
__webpack_require__.r(__webpack_exports__); |
| 3917 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3918 |
/* harmony export */ isEmptyElement: () => (/* binding */ isEmptyElement) |
| 3919 |
/* harmony export */ }); |
| 3920 |
/** |
| 3921 |
* Checks if the provided WP element is empty. |
| 3922 |
* |
| 3923 |
* @param {*} element WP element to check. |
| 3924 |
* @return {boolean} True when an element is considered empty. |
| 3925 |
*/ |
| 3926 |
const isEmptyElement = element => { |
| 3927 |
if (typeof element === 'number') { |
| 3928 |
return false; |
| 3929 |
} |
| 3930 |
if (typeof element?.valueOf() === 'string' || Array.isArray(element)) { |
| 3931 |
return !element.length; |
| 3932 |
} |
| 3933 |
return !element; |
| 3934 |
}; |
| 3935 |
//# sourceMappingURL=utils.js.map |
| 3936 |
|
| 3937 |
/***/ }), |
| 3938 |
|
| 3939 |
/***/ "../node_modules/@wordpress/escape-html/build-module/escape-greater.js": |
| 3940 |
/*!*****************************************************************************!*\ |
| 3941 |
!*** ../node_modules/@wordpress/escape-html/build-module/escape-greater.js ***! |
| 3942 |
\*****************************************************************************/ |
| 3943 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 3944 |
|
| 3945 |
"use strict"; |
| 3946 |
__webpack_require__.r(__webpack_exports__); |
| 3947 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3948 |
/* harmony export */ "default": () => (/* binding */ __unstableEscapeGreaterThan) |
| 3949 |
/* harmony export */ }); |
| 3950 |
/** |
| 3951 |
* Returns a string with greater-than sign replaced. |
| 3952 |
* |
| 3953 |
* Note that if a resolution for Trac#45387 comes to fruition, it is no longer |
| 3954 |
* necessary for `__unstableEscapeGreaterThan` to exist. |
| 3955 |
* |
| 3956 |
* See: https://core.trac.wordpress.org/ticket/45387 |
| 3957 |
* |
| 3958 |
* @param {string} value Original string. |
| 3959 |
* |
| 3960 |
* @return {string} Escaped string. |
| 3961 |
*/ |
| 3962 |
function __unstableEscapeGreaterThan(value) { |
| 3963 |
return value.replace(/>/g, '>'); |
| 3964 |
} |
| 3965 |
//# sourceMappingURL=escape-greater.js.map |
| 3966 |
|
| 3967 |
/***/ }), |
| 3968 |
|
| 3969 |
/***/ "../node_modules/@wordpress/escape-html/build-module/index.js": |
| 3970 |
/*!********************************************************************!*\ |
| 3971 |
!*** ../node_modules/@wordpress/escape-html/build-module/index.js ***! |
| 3972 |
\********************************************************************/ |
| 3973 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 3974 |
|
| 3975 |
"use strict"; |
| 3976 |
__webpack_require__.r(__webpack_exports__); |
| 3977 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3978 |
/* harmony export */ escapeAmpersand: () => (/* binding */ escapeAmpersand), |
| 3979 |
/* harmony export */ escapeAttribute: () => (/* binding */ escapeAttribute), |
| 3980 |
/* harmony export */ escapeEditableHTML: () => (/* binding */ escapeEditableHTML), |
| 3981 |
/* harmony export */ escapeHTML: () => (/* binding */ escapeHTML), |
| 3982 |
/* harmony export */ escapeLessThan: () => (/* binding */ escapeLessThan), |
| 3983 |
/* harmony export */ escapeQuotationMark: () => (/* binding */ escapeQuotationMark), |
| 3984 |
/* harmony export */ isValidAttributeName: () => (/* binding */ isValidAttributeName) |
| 3985 |
/* harmony export */ }); |
| 3986 |
/* harmony import */ var _escape_greater__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./escape-greater */ "../node_modules/@wordpress/escape-html/build-module/escape-greater.js"); |
| 3987 |
/** |
| 3988 |
* Internal dependencies |
| 3989 |
*/ |
| 3990 |
|
| 3991 |
|
| 3992 |
/** |
| 3993 |
* Regular expression matching invalid attribute names. |
| 3994 |
* |
| 3995 |
* "Attribute names must consist of one or more characters other than controls, |
| 3996 |
* U+0020 SPACE, U+0022 ("), U+0027 ('), U+003E (>), U+002F (/), U+003D (=), |
| 3997 |
* and noncharacters." |
| 3998 |
* |
| 3999 |
* @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 |
| 4000 |
* |
| 4001 |
* @type {RegExp} |
| 4002 |
*/ |
| 4003 |
const REGEXP_INVALID_ATTRIBUTE_NAME = /[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/; |
| 4004 |
|
| 4005 |
/** |
| 4006 |
* Returns a string with ampersands escaped. Note that this is an imperfect |
| 4007 |
* implementation, where only ampersands which do not appear as a pattern of |
| 4008 |
* named, decimal, or hexadecimal character references are escaped. Invalid |
| 4009 |
* named references (i.e. ambiguous ampersand) are still permitted. |
| 4010 |
* |
| 4011 |
* @see https://w3c.github.io/html/syntax.html#character-references |
| 4012 |
* @see https://w3c.github.io/html/syntax.html#ambiguous-ampersand |
| 4013 |
* @see https://w3c.github.io/html/syntax.html#named-character-references |
| 4014 |
* |
| 4015 |
* @param {string} value Original string. |
| 4016 |
* |
| 4017 |
* @return {string} Escaped string. |
| 4018 |
*/ |
| 4019 |
function escapeAmpersand(value) { |
| 4020 |
return value.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi, '&'); |
| 4021 |
} |
| 4022 |
|
| 4023 |
/** |
| 4024 |
* Returns a string with quotation marks replaced. |
| 4025 |
* |
| 4026 |
* @param {string} value Original string. |
| 4027 |
* |
| 4028 |
* @return {string} Escaped string. |
| 4029 |
*/ |
| 4030 |
function escapeQuotationMark(value) { |
| 4031 |
return value.replace(/"/g, '"'); |
| 4032 |
} |
| 4033 |
|
| 4034 |
/** |
| 4035 |
* Returns a string with less-than sign replaced. |
| 4036 |
* |
| 4037 |
* @param {string} value Original string. |
| 4038 |
* |
| 4039 |
* @return {string} Escaped string. |
| 4040 |
*/ |
| 4041 |
function escapeLessThan(value) { |
| 4042 |
return value.replace(/</g, '<'); |
| 4043 |
} |
| 4044 |
|
| 4045 |
/** |
| 4046 |
* Returns an escaped attribute value. |
| 4047 |
* |
| 4048 |
* @see https://w3c.github.io/html/syntax.html#elements-attributes |
| 4049 |
* |
| 4050 |
* "[...] the text cannot contain an ambiguous ampersand [...] must not contain |
| 4051 |
* any literal U+0022 QUOTATION MARK characters (")" |
| 4052 |
* |
| 4053 |
* Note we also escape the greater than symbol, as this is used by wptexturize to |
| 4054 |
* split HTML strings. This is a WordPress specific fix |
| 4055 |
* |
| 4056 |
* Note that if a resolution for Trac#45387 comes to fruition, it is no longer |
| 4057 |
* necessary for `__unstableEscapeGreaterThan` to be used. |
| 4058 |
* |
| 4059 |
* See: https://core.trac.wordpress.org/ticket/45387 |
| 4060 |
* |
| 4061 |
* @param {string} value Attribute value. |
| 4062 |
* |
| 4063 |
* @return {string} Escaped attribute value. |
| 4064 |
*/ |
| 4065 |
function escapeAttribute(value) { |
| 4066 |
return (0,_escape_greater__WEBPACK_IMPORTED_MODULE_0__["default"])(escapeQuotationMark(escapeAmpersand(value))); |
| 4067 |
} |
| 4068 |
|
| 4069 |
/** |
| 4070 |
* Returns an escaped HTML element value. |
| 4071 |
* |
| 4072 |
* @see https://w3c.github.io/html/syntax.html#writing-html-documents-elements |
| 4073 |
* |
| 4074 |
* "the text must not contain the character U+003C LESS-THAN SIGN (<) or an |
| 4075 |
* ambiguous ampersand." |
| 4076 |
* |
| 4077 |
* @param {string} value Element value. |
| 4078 |
* |
| 4079 |
* @return {string} Escaped HTML element value. |
| 4080 |
*/ |
| 4081 |
function escapeHTML(value) { |
| 4082 |
return escapeLessThan(escapeAmpersand(value)); |
| 4083 |
} |
| 4084 |
|
| 4085 |
/** |
| 4086 |
* Returns an escaped Editable HTML element value. This is different from |
| 4087 |
* `escapeHTML`, because for editable HTML, ALL ampersands must be escaped in |
| 4088 |
* order to render the content correctly on the page. |
| 4089 |
* |
| 4090 |
* @param {string} value Element value. |
| 4091 |
* |
| 4092 |
* @return {string} Escaped HTML element value. |
| 4093 |
*/ |
| 4094 |
function escapeEditableHTML(value) { |
| 4095 |
return escapeLessThan(value.replace(/&/g, '&')); |
| 4096 |
} |
| 4097 |
|
| 4098 |
/** |
| 4099 |
* Returns true if the given attribute name is valid, or false otherwise. |
| 4100 |
* |
| 4101 |
* @param {string} name Attribute name to test. |
| 4102 |
* |
| 4103 |
* @return {boolean} Whether attribute is valid. |
| 4104 |
*/ |
| 4105 |
function isValidAttributeName(name) { |
| 4106 |
return !REGEXP_INVALID_ATTRIBUTE_NAME.test(name); |
| 4107 |
} |
| 4108 |
//# sourceMappingURL=index.js.map |
| 4109 |
|
| 4110 |
/***/ }), |
| 4111 |
|
| 4112 |
/***/ "../node_modules/dot-case/dist.es2015/index.js": |
| 4113 |
/*!*****************************************************!*\ |
| 4114 |
!*** ../node_modules/dot-case/dist.es2015/index.js ***! |
| 4115 |
\*****************************************************/ |
| 4116 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 4117 |
|
| 4118 |
"use strict"; |
| 4119 |
__webpack_require__.r(__webpack_exports__); |
| 4120 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4121 |
/* harmony export */ dotCase: () => (/* binding */ dotCase) |
| 4122 |
/* harmony export */ }); |
| 4123 |
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.mjs"); |
| 4124 |
/* harmony import */ var no_case__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! no-case */ "../node_modules/no-case/dist.es2015/index.js"); |
| 4125 |
|
| 4126 |
|
| 4127 |
function dotCase(input, options) { |
| 4128 |
if (options === void 0) { options = {}; } |
| 4129 |
return (0,no_case__WEBPACK_IMPORTED_MODULE_1__.noCase)(input, (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({ delimiter: "." }, options)); |
| 4130 |
} |
| 4131 |
//# sourceMappingURL=index.js.map |
| 4132 |
|
| 4133 |
/***/ }), |
| 4134 |
|
| 4135 |
/***/ "../node_modules/is-plain-object/dist/is-plain-object.mjs": |
| 4136 |
/*!****************************************************************!*\ |
| 4137 |
!*** ../node_modules/is-plain-object/dist/is-plain-object.mjs ***! |
| 4138 |
\****************************************************************/ |
| 4139 |
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { |
| 4140 |
|
| 4141 |
"use strict"; |
| 4142 |
__webpack_require__.r(__webpack_exports__); |
| 4143 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4144 |
/* harmony export */ isPlainObject: () => (/* binding */ isPlainObject) |
| 4145 |
/* harmony export */ }); |
| 4146 |
/*! |
| 4147 |
* is-plain-object <https://github.com/jonschlinkert/is-plain-object> |
| 4148 |
* |
| 4149 |
* Copyright (c) 2014-2017, Jon Schlinkert. |
| 4150 |
* Released under the MIT License. |
| 4151 |
*/ |
| 4152 |
|
| 4153 |
function isObject(o) { |
| 4154 |
return Object.prototype.toString.call(o) === '[object Object]'; |
| 4155 |
} |
| 4156 |
|
| 4157 |
function isPlainObject(o) { |
| 4158 |
var ctor,prot; |
| 4159 |
|
| 4160 |
if (isObject(o) === false) return false; |
| 4161 |
|
| 4162 |
// If has modified constructor |
| 4163 |
ctor = o.constructor; |
| 4164 |
if (ctor === undefined) return true; |
| 4165 |
|
| 4166 |
// If has modified prototype |
| 4167 |
prot = ctor.prototype; |
| 4168 |
if (isObject(prot) === false) return false; |
| 4169 |
|
| 4170 |
// If constructor does not have an Object-specific method |
| 4171 |
if (prot.hasOwnProperty('isPrototypeOf') === false) { |
| 4172 |
return false; |
| 4173 |
} |
| 4174 |
|
| 4175 |
// Most likely a plain Object |
| 4176 |
return true; |
| 4177 |
} |
| 4178 |
|
| 4179 |
|
| 4180 |
|
| 4181 |
|
| 4182 |
/***/ }), |
| 4183 |
|
| 4184 |
/***/ "../node_modules/lower-case/dist.es2015/index.js": |
| 4185 |
/*!*******************************************************!*\ |
| 4186 |
!*** ../node_modules/lower-case/dist.es2015/index.js ***! |
| 4187 |
\*******************************************************/ |
| 4188 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 4189 |
|
| 4190 |
"use strict"; |
| 4191 |
__webpack_require__.r(__webpack_exports__); |
| 4192 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4193 |
/* harmony export */ localeLowerCase: () => (/* binding */ localeLowerCase), |
| 4194 |
/* harmony export */ lowerCase: () => (/* binding */ lowerCase) |
| 4195 |
/* harmony export */ }); |
| 4196 |
/** |
| 4197 |
* Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt |
| 4198 |
*/ |
| 4199 |
var SUPPORTED_LOCALE = { |
| 4200 |
tr: { |
| 4201 |
regexp: /\u0130|\u0049|\u0049\u0307/g, |
| 4202 |
map: { |
| 4203 |
İ: "\u0069", |
| 4204 |
I: "\u0131", |
| 4205 |
İ: "\u0069", |
| 4206 |
}, |
| 4207 |
}, |
| 4208 |
az: { |
| 4209 |
regexp: /\u0130/g, |
| 4210 |
map: { |
| 4211 |
İ: "\u0069", |
| 4212 |
I: "\u0131", |
| 4213 |
İ: "\u0069", |
| 4214 |
}, |
| 4215 |
}, |
| 4216 |
lt: { |
| 4217 |
regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g, |
| 4218 |
map: { |
| 4219 |
I: "\u0069\u0307", |
| 4220 |
J: "\u006A\u0307", |
| 4221 |
Į: "\u012F\u0307", |
| 4222 |
Ì: "\u0069\u0307\u0300", |
| 4223 |
Í: "\u0069\u0307\u0301", |
| 4224 |
Ĩ: "\u0069\u0307\u0303", |
| 4225 |
}, |
| 4226 |
}, |
| 4227 |
}; |
| 4228 |
/** |
| 4229 |
* Localized lower case. |
| 4230 |
*/ |
| 4231 |
function localeLowerCase(str, locale) { |
| 4232 |
var lang = SUPPORTED_LOCALE[locale.toLowerCase()]; |
| 4233 |
if (lang) |
| 4234 |
return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; })); |
| 4235 |
return lowerCase(str); |
| 4236 |
} |
| 4237 |
/** |
| 4238 |
* Lower case as a function. |
| 4239 |
*/ |
| 4240 |
function lowerCase(str) { |
| 4241 |
return str.toLowerCase(); |
| 4242 |
} |
| 4243 |
//# sourceMappingURL=index.js.map |
| 4244 |
|
| 4245 |
/***/ }), |
| 4246 |
|
| 4247 |
/***/ "../node_modules/no-case/dist.es2015/index.js": |
| 4248 |
/*!****************************************************!*\ |
| 4249 |
!*** ../node_modules/no-case/dist.es2015/index.js ***! |
| 4250 |
\****************************************************/ |
| 4251 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 4252 |
|
| 4253 |
"use strict"; |
| 4254 |
__webpack_require__.r(__webpack_exports__); |
| 4255 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4256 |
/* harmony export */ noCase: () => (/* binding */ noCase) |
| 4257 |
/* harmony export */ }); |
| 4258 |
/* harmony import */ var lower_case__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lower-case */ "../node_modules/lower-case/dist.es2015/index.js"); |
| 4259 |
|
| 4260 |
// Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case"). |
| 4261 |
var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g]; |
| 4262 |
// Remove all non-word characters. |
| 4263 |
var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi; |
| 4264 |
/** |
| 4265 |
* Normalize the string into something other libraries can manipulate easier. |
| 4266 |
*/ |
| 4267 |
function noCase(input, options) { |
| 4268 |
if (options === void 0) { options = {}; } |
| 4269 |
var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lower_case__WEBPACK_IMPORTED_MODULE_0__.lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d; |
| 4270 |
var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0"); |
| 4271 |
var start = 0; |
| 4272 |
var end = result.length; |
| 4273 |
// Trim the delimiter from around the output string. |
| 4274 |
while (result.charAt(start) === "\0") |
| 4275 |
start++; |
| 4276 |
while (result.charAt(end - 1) === "\0") |
| 4277 |
end--; |
| 4278 |
// Transform each token independently. |
| 4279 |
return result.slice(start, end).split("\0").map(transform).join(delimiter); |
| 4280 |
} |
| 4281 |
/** |
| 4282 |
* Replace `re` in the input string with the replacement value. |
| 4283 |
*/ |
| 4284 |
function replace(input, re, value) { |
| 4285 |
if (re instanceof RegExp) |
| 4286 |
return input.replace(re, value); |
| 4287 |
return re.reduce(function (input, re) { return input.replace(re, value); }, input); |
| 4288 |
} |
| 4289 |
//# sourceMappingURL=index.js.map |
| 4290 |
|
| 4291 |
/***/ }), |
| 4292 |
|
| 4293 |
/***/ "../node_modules/object-assign/index.js": |
| 4294 |
/*!**********************************************!*\ |
| 4295 |
!*** ../node_modules/object-assign/index.js ***! |
| 4296 |
\**********************************************/ |
| 4297 |
/***/ ((module) => { |
| 4298 |
|
| 4299 |
"use strict"; |
| 4300 |
/* |
| 4301 |
object-assign |
| 4302 |
(c) Sindre Sorhus |
| 4303 |
@license MIT |
| 4304 |
*/ |
| 4305 |
|
| 4306 |
|
| 4307 |
/* eslint-disable no-unused-vars */ |
| 4308 |
var getOwnPropertySymbols = Object.getOwnPropertySymbols; |
| 4309 |
var hasOwnProperty = Object.prototype.hasOwnProperty; |
| 4310 |
var propIsEnumerable = Object.prototype.propertyIsEnumerable; |
| 4311 |
|
| 4312 |
function toObject(val) { |
| 4313 |
if (val === null || val === undefined) { |
| 4314 |
throw new TypeError('Object.assign cannot be called with null or undefined'); |
| 4315 |
} |
| 4316 |
|
| 4317 |
return Object(val); |
| 4318 |
} |
| 4319 |
|
| 4320 |
function shouldUseNative() { |
| 4321 |
try { |
| 4322 |
if (!Object.assign) { |
| 4323 |
return false; |
| 4324 |
} |
| 4325 |
|
| 4326 |
// Detect buggy property enumeration order in older V8 versions. |
| 4327 |
|
| 4328 |
// https://bugs.chromium.org/p/v8/issues/detail?id=4118 |
| 4329 |
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers |
| 4330 |
test1[5] = 'de'; |
| 4331 |
if (Object.getOwnPropertyNames(test1)[0] === '5') { |
| 4332 |
return false; |
| 4333 |
} |
| 4334 |
|
| 4335 |
// https://bugs.chromium.org/p/v8/issues/detail?id=3056 |
| 4336 |
var test2 = {}; |
| 4337 |
for (var i = 0; i < 10; i++) { |
| 4338 |
test2['_' + String.fromCharCode(i)] = i; |
| 4339 |
} |
| 4340 |
var order2 = Object.getOwnPropertyNames(test2).map(function (n) { |
| 4341 |
return test2[n]; |
| 4342 |
}); |
| 4343 |
if (order2.join('') !== '0123456789') { |
| 4344 |
return false; |
| 4345 |
} |
| 4346 |
|
| 4347 |
// https://bugs.chromium.org/p/v8/issues/detail?id=3056 |
| 4348 |
var test3 = {}; |
| 4349 |
'abcdefghijklmnopqrst'.split('').forEach(function (letter) { |
| 4350 |
test3[letter] = letter; |
| 4351 |
}); |
| 4352 |
if (Object.keys(Object.assign({}, test3)).join('') !== |
| 4353 |
'abcdefghijklmnopqrst') { |
| 4354 |
return false; |
| 4355 |
} |
| 4356 |
|
| 4357 |
return true; |
| 4358 |
} catch (err) { |
| 4359 |
// We don't expect any of the above to throw, but better to be safe. |
| 4360 |
return false; |
| 4361 |
} |
| 4362 |
} |
| 4363 |
|
| 4364 |
module.exports = shouldUseNative() ? Object.assign : function (target, source) { |
| 4365 |
var from; |
| 4366 |
var to = toObject(target); |
| 4367 |
var symbols; |
| 4368 |
|
| 4369 |
for (var s = 1; s < arguments.length; s++) { |
| 4370 |
from = Object(arguments[s]); |
| 4371 |
|
| 4372 |
for (var key in from) { |
| 4373 |
if (hasOwnProperty.call(from, key)) { |
| 4374 |
to[key] = from[key]; |
| 4375 |
} |
| 4376 |
} |
| 4377 |
|
| 4378 |
if (getOwnPropertySymbols) { |
| 4379 |
symbols = getOwnPropertySymbols(from); |
| 4380 |
for (var i = 0; i < symbols.length; i++) { |
| 4381 |
if (propIsEnumerable.call(from, symbols[i])) { |
| 4382 |
to[symbols[i]] = from[symbols[i]]; |
| 4383 |
} |
| 4384 |
} |
| 4385 |
} |
| 4386 |
} |
| 4387 |
|
| 4388 |
return to; |
| 4389 |
}; |
| 4390 |
|
| 4391 |
|
| 4392 |
/***/ }), |
| 4393 |
|
| 4394 |
/***/ "../node_modules/param-case/dist.es2015/index.js": |
| 4395 |
/*!*******************************************************!*\ |
| 4396 |
!*** ../node_modules/param-case/dist.es2015/index.js ***! |
| 4397 |
\*******************************************************/ |
| 4398 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 4399 |
|
| 4400 |
"use strict"; |
| 4401 |
__webpack_require__.r(__webpack_exports__); |
| 4402 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4403 |
/* harmony export */ paramCase: () => (/* binding */ paramCase) |
| 4404 |
/* harmony export */ }); |
| 4405 |
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.mjs"); |
| 4406 |
/* harmony import */ var dot_case__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dot-case */ "../node_modules/dot-case/dist.es2015/index.js"); |
| 4407 |
|
| 4408 |
|
| 4409 |
function paramCase(input, options) { |
| 4410 |
if (options === void 0) { options = {}; } |
| 4411 |
return (0,dot_case__WEBPACK_IMPORTED_MODULE_1__.dotCase)(input, (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({ delimiter: "-" }, options)); |
| 4412 |
} |
| 4413 |
//# sourceMappingURL=index.js.map |
| 4414 |
|
| 4415 |
/***/ }), |
| 4416 |
|
| 4417 |
/***/ "../node_modules/prop-types/checkPropTypes.js": |
| 4418 |
/*!****************************************************!*\ |
| 4419 |
!*** ../node_modules/prop-types/checkPropTypes.js ***! |
| 4420 |
\****************************************************/ |
| 4421 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 4422 |
|
| 4423 |
"use strict"; |
| 4424 |
/** |
| 4425 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 4426 |
* |
| 4427 |
* This source code is licensed under the MIT license found in the |
| 4428 |
* LICENSE file in the root directory of this source tree. |
| 4429 |
*/ |
| 4430 |
|
| 4431 |
|
| 4432 |
|
| 4433 |
var printWarning = function() {}; |
| 4434 |
|
| 4435 |
if (true) { |
| 4436 |
var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js"); |
| 4437 |
var loggedTypeFailures = {}; |
| 4438 |
var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js"); |
| 4439 |
|
| 4440 |
printWarning = function(text) { |
| 4441 |
var message = 'Warning: ' + text; |
| 4442 |
if (typeof console !== 'undefined') { |
| 4443 |
console.error(message); |
| 4444 |
} |
| 4445 |
try { |
| 4446 |
// --- Welcome to debugging React --- |
| 4447 |
// This error was thrown as a convenience so that you can use this stack |
| 4448 |
// to find the callsite that caused this warning to fire. |
| 4449 |
throw new Error(message); |
| 4450 |
} catch (x) { /**/ } |
| 4451 |
}; |
| 4452 |
} |
| 4453 |
|
| 4454 |
/** |
| 4455 |
* Assert that the values match with the type specs. |
| 4456 |
* Error messages are memorized and will only be shown once. |
| 4457 |
* |
| 4458 |
* @param {object} typeSpecs Map of name to a ReactPropType |
| 4459 |
* @param {object} values Runtime values that need to be type-checked |
| 4460 |
* @param {string} location e.g. "prop", "context", "child context" |
| 4461 |
* @param {string} componentName Name of the component for error messages. |
| 4462 |
* @param {?Function} getStack Returns the component stack. |
| 4463 |
* @private |
| 4464 |
*/ |
| 4465 |
function checkPropTypes(typeSpecs, values, location, componentName, getStack) { |
| 4466 |
if (true) { |
| 4467 |
for (var typeSpecName in typeSpecs) { |
| 4468 |
if (has(typeSpecs, typeSpecName)) { |
| 4469 |
var error; |
| 4470 |
// Prop type validation may throw. In case they do, we don't want to |
| 4471 |
// fail the render phase where it didn't fail before. So we log it. |
| 4472 |
// After these have been cleaned up, we'll let them throw. |
| 4473 |
try { |
| 4474 |
// This is intentionally an invariant that gets caught. It's the same |
| 4475 |
// behavior as without this statement except with a better message. |
| 4476 |
if (typeof typeSpecs[typeSpecName] !== 'function') { |
| 4477 |
var err = Error( |
| 4478 |
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + |
| 4479 |
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + |
| 4480 |
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.' |
| 4481 |
); |
| 4482 |
err.name = 'Invariant Violation'; |
| 4483 |
throw err; |
| 4484 |
} |
| 4485 |
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); |
| 4486 |
} catch (ex) { |
| 4487 |
error = ex; |
| 4488 |
} |
| 4489 |
if (error && !(error instanceof Error)) { |
| 4490 |
printWarning( |
| 4491 |
(componentName || 'React class') + ': type specification of ' + |
| 4492 |
location + ' `' + typeSpecName + '` is invalid; the type checker ' + |
| 4493 |
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + |
| 4494 |
'You may have forgotten to pass an argument to the type checker ' + |
| 4495 |
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + |
| 4496 |
'shape all require an argument).' |
| 4497 |
); |
| 4498 |
} |
| 4499 |
if (error instanceof Error && !(error.message in loggedTypeFailures)) { |
| 4500 |
// Only monitor this failure once because there tends to be a lot of the |
| 4501 |
// same error. |
| 4502 |
loggedTypeFailures[error.message] = true; |
| 4503 |
|
| 4504 |
var stack = getStack ? getStack() : ''; |
| 4505 |
|
| 4506 |
printWarning( |
| 4507 |
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '') |
| 4508 |
); |
| 4509 |
} |
| 4510 |
} |
| 4511 |
} |
| 4512 |
} |
| 4513 |
} |
| 4514 |
|
| 4515 |
/** |
| 4516 |
* Resets warning cache when testing. |
| 4517 |
* |
| 4518 |
* @private |
| 4519 |
*/ |
| 4520 |
checkPropTypes.resetWarningCache = function() { |
| 4521 |
if (true) { |
| 4522 |
loggedTypeFailures = {}; |
| 4523 |
} |
| 4524 |
} |
| 4525 |
|
| 4526 |
module.exports = checkPropTypes; |
| 4527 |
|
| 4528 |
|
| 4529 |
/***/ }), |
| 4530 |
|
| 4531 |
/***/ "../node_modules/prop-types/factoryWithTypeCheckers.js": |
| 4532 |
/*!*************************************************************!*\ |
| 4533 |
!*** ../node_modules/prop-types/factoryWithTypeCheckers.js ***! |
| 4534 |
\*************************************************************/ |
| 4535 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 4536 |
|
| 4537 |
"use strict"; |
| 4538 |
/** |
| 4539 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 4540 |
* |
| 4541 |
* This source code is licensed under the MIT license found in the |
| 4542 |
* LICENSE file in the root directory of this source tree. |
| 4543 |
*/ |
| 4544 |
|
| 4545 |
|
| 4546 |
|
| 4547 |
var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js"); |
| 4548 |
var assign = __webpack_require__(/*! object-assign */ "../node_modules/object-assign/index.js"); |
| 4549 |
|
| 4550 |
var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js"); |
| 4551 |
var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js"); |
| 4552 |
var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "../node_modules/prop-types/checkPropTypes.js"); |
| 4553 |
|
| 4554 |
var printWarning = function() {}; |
| 4555 |
|
| 4556 |
if (true) { |
| 4557 |
printWarning = function(text) { |
| 4558 |
var message = 'Warning: ' + text; |
| 4559 |
if (typeof console !== 'undefined') { |
| 4560 |
console.error(message); |
| 4561 |
} |
| 4562 |
try { |
| 4563 |
// --- Welcome to debugging React --- |
| 4564 |
// This error was thrown as a convenience so that you can use this stack |
| 4565 |
// to find the callsite that caused this warning to fire. |
| 4566 |
throw new Error(message); |
| 4567 |
} catch (x) {} |
| 4568 |
}; |
| 4569 |
} |
| 4570 |
|
| 4571 |
function emptyFunctionThatReturnsNull() { |
| 4572 |
return null; |
| 4573 |
} |
| 4574 |
|
| 4575 |
module.exports = function(isValidElement, throwOnDirectAccess) { |
| 4576 |
/* global Symbol */ |
| 4577 |
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; |
| 4578 |
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. |
| 4579 |
|
| 4580 |
/** |
| 4581 |
* Returns the iterator method function contained on the iterable object. |
| 4582 |
* |
| 4583 |
* Be sure to invoke the function with the iterable as context: |
| 4584 |
* |
| 4585 |
* var iteratorFn = getIteratorFn(myIterable); |
| 4586 |
* if (iteratorFn) { |
| 4587 |
* var iterator = iteratorFn.call(myIterable); |
| 4588 |
* ... |
| 4589 |
* } |
| 4590 |
* |
| 4591 |
* @param {?object} maybeIterable |
| 4592 |
* @return {?function} |
| 4593 |
*/ |
| 4594 |
function getIteratorFn(maybeIterable) { |
| 4595 |
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); |
| 4596 |
if (typeof iteratorFn === 'function') { |
| 4597 |
return iteratorFn; |
| 4598 |
} |
| 4599 |
} |
| 4600 |
|
| 4601 |
/** |
| 4602 |
* Collection of methods that allow declaration and validation of props that are |
| 4603 |
* supplied to React components. Example usage: |
| 4604 |
* |
| 4605 |
* var Props = require('ReactPropTypes'); |
| 4606 |
* var MyArticle = React.createClass({ |
| 4607 |
* propTypes: { |
| 4608 |
* // An optional string prop named "description". |
| 4609 |
* description: Props.string, |
| 4610 |
* |
| 4611 |
* // A required enum prop named "category". |
| 4612 |
* category: Props.oneOf(['News','Photos']).isRequired, |
| 4613 |
* |
| 4614 |
* // A prop named "dialog" that requires an instance of Dialog. |
| 4615 |
* dialog: Props.instanceOf(Dialog).isRequired |
| 4616 |
* }, |
| 4617 |
* render: function() { ... } |
| 4618 |
* }); |
| 4619 |
* |
| 4620 |
* A more formal specification of how these methods are used: |
| 4621 |
* |
| 4622 |
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) |
| 4623 |
* decl := ReactPropTypes.{type}(.isRequired)? |
| 4624 |
* |
| 4625 |
* Each and every declaration produces a function with the same signature. This |
| 4626 |
* allows the creation of custom validation functions. For example: |
| 4627 |
* |
| 4628 |
* var MyLink = React.createClass({ |
| 4629 |
* propTypes: { |
| 4630 |
* // An optional string or URI prop named "href". |
| 4631 |
* href: function(props, propName, componentName) { |
| 4632 |
* var propValue = props[propName]; |
| 4633 |
* if (propValue != null && typeof propValue !== 'string' && |
| 4634 |
* !(propValue instanceof URI)) { |
| 4635 |
* return new Error( |
| 4636 |
* 'Expected a string or an URI for ' + propName + ' in ' + |
| 4637 |
* componentName |
| 4638 |
* ); |
| 4639 |
* } |
| 4640 |
* } |
| 4641 |
* }, |
| 4642 |
* render: function() {...} |
| 4643 |
* }); |
| 4644 |
* |
| 4645 |
* @internal |
| 4646 |
*/ |
| 4647 |
|
| 4648 |
var ANONYMOUS = '<<anonymous>>'; |
| 4649 |
|
| 4650 |
// Important! |
| 4651 |
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`. |
| 4652 |
var ReactPropTypes = { |
| 4653 |
array: createPrimitiveTypeChecker('array'), |
| 4654 |
bigint: createPrimitiveTypeChecker('bigint'), |
| 4655 |
bool: createPrimitiveTypeChecker('boolean'), |
| 4656 |
func: createPrimitiveTypeChecker('function'), |
| 4657 |
number: createPrimitiveTypeChecker('number'), |
| 4658 |
object: createPrimitiveTypeChecker('object'), |
| 4659 |
string: createPrimitiveTypeChecker('string'), |
| 4660 |
symbol: createPrimitiveTypeChecker('symbol'), |
| 4661 |
|
| 4662 |
any: createAnyTypeChecker(), |
| 4663 |
arrayOf: createArrayOfTypeChecker, |
| 4664 |
element: createElementTypeChecker(), |
| 4665 |
elementType: createElementTypeTypeChecker(), |
| 4666 |
instanceOf: createInstanceTypeChecker, |
| 4667 |
node: createNodeChecker(), |
| 4668 |
objectOf: createObjectOfTypeChecker, |
| 4669 |
oneOf: createEnumTypeChecker, |
| 4670 |
oneOfType: createUnionTypeChecker, |
| 4671 |
shape: createShapeTypeChecker, |
| 4672 |
exact: createStrictShapeTypeChecker, |
| 4673 |
}; |
| 4674 |
|
| 4675 |
/** |
| 4676 |
* inlined Object.is polyfill to avoid requiring consumers ship their own |
| 4677 |
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is |
| 4678 |
*/ |
| 4679 |
/*eslint-disable no-self-compare*/ |
| 4680 |
function is(x, y) { |
| 4681 |
// SameValue algorithm |
| 4682 |
if (x === y) { |
| 4683 |
// Steps 1-5, 7-10 |
| 4684 |
// Steps 6.b-6.e: +0 != -0 |
| 4685 |
return x !== 0 || 1 / x === 1 / y; |
| 4686 |
} else { |
| 4687 |
// Step 6.a: NaN == NaN |
| 4688 |
return x !== x && y !== y; |
| 4689 |
} |
| 4690 |
} |
| 4691 |
/*eslint-enable no-self-compare*/ |
| 4692 |
|
| 4693 |
/** |
| 4694 |
* We use an Error-like object for backward compatibility as people may call |
| 4695 |
* PropTypes directly and inspect their output. However, we don't use real |
| 4696 |
* Errors anymore. We don't inspect their stack anyway, and creating them |
| 4697 |
* is prohibitively expensive if they are created too often, such as what |
| 4698 |
* happens in oneOfType() for any type before the one that matched. |
| 4699 |
*/ |
| 4700 |
function PropTypeError(message, data) { |
| 4701 |
this.message = message; |
| 4702 |
this.data = data && typeof data === 'object' ? data: {}; |
| 4703 |
this.stack = ''; |
| 4704 |
} |
| 4705 |
// Make `instanceof Error` still work for returned errors. |
| 4706 |
PropTypeError.prototype = Error.prototype; |
| 4707 |
|
| 4708 |
function createChainableTypeChecker(validate) { |
| 4709 |
if (true) { |
| 4710 |
var manualPropTypeCallCache = {}; |
| 4711 |
var manualPropTypeWarningCount = 0; |
| 4712 |
} |
| 4713 |
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { |
| 4714 |
componentName = componentName || ANONYMOUS; |
| 4715 |
propFullName = propFullName || propName; |
| 4716 |
|
| 4717 |
if (secret !== ReactPropTypesSecret) { |
| 4718 |
if (throwOnDirectAccess) { |
| 4719 |
// New behavior only for users of `prop-types` package |
| 4720 |
var err = new Error( |
| 4721 |
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + |
| 4722 |
'Use `PropTypes.checkPropTypes()` to call them. ' + |
| 4723 |
'Read more at http://fb.me/use-check-prop-types' |
| 4724 |
); |
| 4725 |
err.name = 'Invariant Violation'; |
| 4726 |
throw err; |
| 4727 |
} else if ( true && typeof console !== 'undefined') { |
| 4728 |
// Old behavior for people using React.PropTypes |
| 4729 |
var cacheKey = componentName + ':' + propName; |
| 4730 |
if ( |
| 4731 |
!manualPropTypeCallCache[cacheKey] && |
| 4732 |
// Avoid spamming the console because they are often not actionable except for lib authors |
| 4733 |
manualPropTypeWarningCount < 3 |
| 4734 |
) { |
| 4735 |
printWarning( |
| 4736 |
'You are manually calling a React.PropTypes validation ' + |
| 4737 |
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + |
| 4738 |
'and will throw in the standalone `prop-types` package. ' + |
| 4739 |
'You may be seeing this warning due to a third-party PropTypes ' + |
| 4740 |
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.' |
| 4741 |
); |
| 4742 |
manualPropTypeCallCache[cacheKey] = true; |
| 4743 |
manualPropTypeWarningCount++; |
| 4744 |
} |
| 4745 |
} |
| 4746 |
} |
| 4747 |
if (props[propName] == null) { |
| 4748 |
if (isRequired) { |
| 4749 |
if (props[propName] === null) { |
| 4750 |
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); |
| 4751 |
} |
| 4752 |
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); |
| 4753 |
} |
| 4754 |
return null; |
| 4755 |
} else { |
| 4756 |
return validate(props, propName, componentName, location, propFullName); |
| 4757 |
} |
| 4758 |
} |
| 4759 |
|
| 4760 |
var chainedCheckType = checkType.bind(null, false); |
| 4761 |
chainedCheckType.isRequired = checkType.bind(null, true); |
| 4762 |
|
| 4763 |
return chainedCheckType; |
| 4764 |
} |
| 4765 |
|
| 4766 |
function createPrimitiveTypeChecker(expectedType) { |
| 4767 |
function validate(props, propName, componentName, location, propFullName, secret) { |
| 4768 |
var propValue = props[propName]; |
| 4769 |
var propType = getPropType(propValue); |
| 4770 |
if (propType !== expectedType) { |
| 4771 |
// `propValue` being instance of, say, date/regexp, pass the 'object' |
| 4772 |
// check, but we can offer a more precise error message here rather than |
| 4773 |
// 'of type `object`'. |
| 4774 |
var preciseType = getPreciseType(propValue); |
| 4775 |
|
| 4776 |
return new PropTypeError( |
| 4777 |
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), |
| 4778 |
{expectedType: expectedType} |
| 4779 |
); |
| 4780 |
} |
| 4781 |
return null; |
| 4782 |
} |
| 4783 |
return createChainableTypeChecker(validate); |
| 4784 |
} |
| 4785 |
|
| 4786 |
function createAnyTypeChecker() { |
| 4787 |
return createChainableTypeChecker(emptyFunctionThatReturnsNull); |
| 4788 |
} |
| 4789 |
|
| 4790 |
function createArrayOfTypeChecker(typeChecker) { |
| 4791 |
function validate(props, propName, componentName, location, propFullName) { |
| 4792 |
if (typeof typeChecker !== 'function') { |
| 4793 |
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); |
| 4794 |
} |
| 4795 |
var propValue = props[propName]; |
| 4796 |
if (!Array.isArray(propValue)) { |
| 4797 |
var propType = getPropType(propValue); |
| 4798 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); |
| 4799 |
} |
| 4800 |
for (var i = 0; i < propValue.length; i++) { |
| 4801 |
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); |
| 4802 |
if (error instanceof Error) { |
| 4803 |
return error; |
| 4804 |
} |
| 4805 |
} |
| 4806 |
return null; |
| 4807 |
} |
| 4808 |
return createChainableTypeChecker(validate); |
| 4809 |
} |
| 4810 |
|
| 4811 |
function createElementTypeChecker() { |
| 4812 |
function validate(props, propName, componentName, location, propFullName) { |
| 4813 |
var propValue = props[propName]; |
| 4814 |
if (!isValidElement(propValue)) { |
| 4815 |
var propType = getPropType(propValue); |
| 4816 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); |
| 4817 |
} |
| 4818 |
return null; |
| 4819 |
} |
| 4820 |
return createChainableTypeChecker(validate); |
| 4821 |
} |
| 4822 |
|
| 4823 |
function createElementTypeTypeChecker() { |
| 4824 |
function validate(props, propName, componentName, location, propFullName) { |
| 4825 |
var propValue = props[propName]; |
| 4826 |
if (!ReactIs.isValidElementType(propValue)) { |
| 4827 |
var propType = getPropType(propValue); |
| 4828 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); |
| 4829 |
} |
| 4830 |
return null; |
| 4831 |
} |
| 4832 |
return createChainableTypeChecker(validate); |
| 4833 |
} |
| 4834 |
|
| 4835 |
function createInstanceTypeChecker(expectedClass) { |
| 4836 |
function validate(props, propName, componentName, location, propFullName) { |
| 4837 |
if (!(props[propName] instanceof expectedClass)) { |
| 4838 |
var expectedClassName = expectedClass.name || ANONYMOUS; |
| 4839 |
var actualClassName = getClassName(props[propName]); |
| 4840 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); |
| 4841 |
} |
| 4842 |
return null; |
| 4843 |
} |
| 4844 |
return createChainableTypeChecker(validate); |
| 4845 |
} |
| 4846 |
|
| 4847 |
function createEnumTypeChecker(expectedValues) { |
| 4848 |
if (!Array.isArray(expectedValues)) { |
| 4849 |
if (true) { |
| 4850 |
if (arguments.length > 1) { |
| 4851 |
printWarning( |
| 4852 |
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + |
| 4853 |
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).' |
| 4854 |
); |
| 4855 |
} else { |
| 4856 |
printWarning('Invalid argument supplied to oneOf, expected an array.'); |
| 4857 |
} |
| 4858 |
} |
| 4859 |
return emptyFunctionThatReturnsNull; |
| 4860 |
} |
| 4861 |
|
| 4862 |
function validate(props, propName, componentName, location, propFullName) { |
| 4863 |
var propValue = props[propName]; |
| 4864 |
for (var i = 0; i < expectedValues.length; i++) { |
| 4865 |
if (is(propValue, expectedValues[i])) { |
| 4866 |
return null; |
| 4867 |
} |
| 4868 |
} |
| 4869 |
|
| 4870 |
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { |
| 4871 |
var type = getPreciseType(value); |
| 4872 |
if (type === 'symbol') { |
| 4873 |
return String(value); |
| 4874 |
} |
| 4875 |
return value; |
| 4876 |
}); |
| 4877 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); |
| 4878 |
} |
| 4879 |
return createChainableTypeChecker(validate); |
| 4880 |
} |
| 4881 |
|
| 4882 |
function createObjectOfTypeChecker(typeChecker) { |
| 4883 |
function validate(props, propName, componentName, location, propFullName) { |
| 4884 |
if (typeof typeChecker !== 'function') { |
| 4885 |
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); |
| 4886 |
} |
| 4887 |
var propValue = props[propName]; |
| 4888 |
var propType = getPropType(propValue); |
| 4889 |
if (propType !== 'object') { |
| 4890 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); |
| 4891 |
} |
| 4892 |
for (var key in propValue) { |
| 4893 |
if (has(propValue, key)) { |
| 4894 |
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); |
| 4895 |
if (error instanceof Error) { |
| 4896 |
return error; |
| 4897 |
} |
| 4898 |
} |
| 4899 |
} |
| 4900 |
return null; |
| 4901 |
} |
| 4902 |
return createChainableTypeChecker(validate); |
| 4903 |
} |
| 4904 |
|
| 4905 |
function createUnionTypeChecker(arrayOfTypeCheckers) { |
| 4906 |
if (!Array.isArray(arrayOfTypeCheckers)) { |
| 4907 |
true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0; |
| 4908 |
return emptyFunctionThatReturnsNull; |
| 4909 |
} |
| 4910 |
|
| 4911 |
for (var i = 0; i < arrayOfTypeCheckers.length; i++) { |
| 4912 |
var checker = arrayOfTypeCheckers[i]; |
| 4913 |
if (typeof checker !== 'function') { |
| 4914 |
printWarning( |
| 4915 |
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + |
| 4916 |
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.' |
| 4917 |
); |
| 4918 |
return emptyFunctionThatReturnsNull; |
| 4919 |
} |
| 4920 |
} |
| 4921 |
|
| 4922 |
function validate(props, propName, componentName, location, propFullName) { |
| 4923 |
var expectedTypes = []; |
| 4924 |
for (var i = 0; i < arrayOfTypeCheckers.length; i++) { |
| 4925 |
var checker = arrayOfTypeCheckers[i]; |
| 4926 |
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret); |
| 4927 |
if (checkerResult == null) { |
| 4928 |
return null; |
| 4929 |
} |
| 4930 |
if (checkerResult.data && has(checkerResult.data, 'expectedType')) { |
| 4931 |
expectedTypes.push(checkerResult.data.expectedType); |
| 4932 |
} |
| 4933 |
} |
| 4934 |
var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': ''; |
| 4935 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.')); |
| 4936 |
} |
| 4937 |
return createChainableTypeChecker(validate); |
| 4938 |
} |
| 4939 |
|
| 4940 |
function createNodeChecker() { |
| 4941 |
function validate(props, propName, componentName, location, propFullName) { |
| 4942 |
if (!isNode(props[propName])) { |
| 4943 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); |
| 4944 |
} |
| 4945 |
return null; |
| 4946 |
} |
| 4947 |
return createChainableTypeChecker(validate); |
| 4948 |
} |
| 4949 |
|
| 4950 |
function invalidValidatorError(componentName, location, propFullName, key, type) { |
| 4951 |
return new PropTypeError( |
| 4952 |
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + |
| 4953 |
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.' |
| 4954 |
); |
| 4955 |
} |
| 4956 |
|
| 4957 |
function createShapeTypeChecker(shapeTypes) { |
| 4958 |
function validate(props, propName, componentName, location, propFullName) { |
| 4959 |
var propValue = props[propName]; |
| 4960 |
var propType = getPropType(propValue); |
| 4961 |
if (propType !== 'object') { |
| 4962 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); |
| 4963 |
} |
| 4964 |
for (var key in shapeTypes) { |
| 4965 |
var checker = shapeTypes[key]; |
| 4966 |
if (typeof checker !== 'function') { |
| 4967 |
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); |
| 4968 |
} |
| 4969 |
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); |
| 4970 |
if (error) { |
| 4971 |
return error; |
| 4972 |
} |
| 4973 |
} |
| 4974 |
return null; |
| 4975 |
} |
| 4976 |
return createChainableTypeChecker(validate); |
| 4977 |
} |
| 4978 |
|
| 4979 |
function createStrictShapeTypeChecker(shapeTypes) { |
| 4980 |
function validate(props, propName, componentName, location, propFullName) { |
| 4981 |
var propValue = props[propName]; |
| 4982 |
var propType = getPropType(propValue); |
| 4983 |
if (propType !== 'object') { |
| 4984 |
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); |
| 4985 |
} |
| 4986 |
// We need to check all keys in case some are required but missing from props. |
| 4987 |
var allKeys = assign({}, props[propName], shapeTypes); |
| 4988 |
for (var key in allKeys) { |
| 4989 |
var checker = shapeTypes[key]; |
| 4990 |
if (has(shapeTypes, key) && typeof checker !== 'function') { |
| 4991 |
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); |
| 4992 |
} |
| 4993 |
if (!checker) { |
| 4994 |
return new PropTypeError( |
| 4995 |
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + |
| 4996 |
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') + |
| 4997 |
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') |
| 4998 |
); |
| 4999 |
} |
| 5000 |
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); |
| 5001 |
if (error) { |
| 5002 |
return error; |
| 5003 |
} |
| 5004 |
} |
| 5005 |
return null; |
| 5006 |
} |
| 5007 |
|
| 5008 |
return createChainableTypeChecker(validate); |
| 5009 |
} |
| 5010 |
|
| 5011 |
function isNode(propValue) { |
| 5012 |
switch (typeof propValue) { |
| 5013 |
case 'number': |
| 5014 |
case 'string': |
| 5015 |
case 'undefined': |
| 5016 |
return true; |
| 5017 |
case 'boolean': |
| 5018 |
return !propValue; |
| 5019 |
case 'object': |
| 5020 |
if (Array.isArray(propValue)) { |
| 5021 |
return propValue.every(isNode); |
| 5022 |
} |
| 5023 |
if (propValue === null || isValidElement(propValue)) { |
| 5024 |
return true; |
| 5025 |
} |
| 5026 |
|
| 5027 |
var iteratorFn = getIteratorFn(propValue); |
| 5028 |
if (iteratorFn) { |
| 5029 |
var iterator = iteratorFn.call(propValue); |
| 5030 |
var step; |
| 5031 |
if (iteratorFn !== propValue.entries) { |
| 5032 |
while (!(step = iterator.next()).done) { |
| 5033 |
if (!isNode(step.value)) { |
| 5034 |
return false; |
| 5035 |
} |
| 5036 |
} |
| 5037 |
} else { |
| 5038 |
// Iterator will provide entry [k,v] tuples rather than values. |
| 5039 |
while (!(step = iterator.next()).done) { |
| 5040 |
var entry = step.value; |
| 5041 |
if (entry) { |
| 5042 |
if (!isNode(entry[1])) { |
| 5043 |
return false; |
| 5044 |
} |
| 5045 |
} |
| 5046 |
} |
| 5047 |
} |
| 5048 |
} else { |
| 5049 |
return false; |
| 5050 |
} |
| 5051 |
|
| 5052 |
return true; |
| 5053 |
default: |
| 5054 |
return false; |
| 5055 |
} |
| 5056 |
} |
| 5057 |
|
| 5058 |
function isSymbol(propType, propValue) { |
| 5059 |
// Native Symbol. |
| 5060 |
if (propType === 'symbol') { |
| 5061 |
return true; |
| 5062 |
} |
| 5063 |
|
| 5064 |
// falsy value can't be a Symbol |
| 5065 |
if (!propValue) { |
| 5066 |
return false; |
| 5067 |
} |
| 5068 |
|
| 5069 |
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' |
| 5070 |
if (propValue['@@toStringTag'] === 'Symbol') { |
| 5071 |
return true; |
| 5072 |
} |
| 5073 |
|
| 5074 |
// Fallback for non-spec compliant Symbols which are polyfilled. |
| 5075 |
if (typeof Symbol === 'function' && propValue instanceof Symbol) { |
| 5076 |
return true; |
| 5077 |
} |
| 5078 |
|
| 5079 |
return false; |
| 5080 |
} |
| 5081 |
|
| 5082 |
// Equivalent of `typeof` but with special handling for array and regexp. |
| 5083 |
function getPropType(propValue) { |
| 5084 |
var propType = typeof propValue; |
| 5085 |
if (Array.isArray(propValue)) { |
| 5086 |
return 'array'; |
| 5087 |
} |
| 5088 |
if (propValue instanceof RegExp) { |
| 5089 |
// Old webkits (at least until Android 4.0) return 'function' rather than |
| 5090 |
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/ |
| 5091 |
// passes PropTypes.object. |
| 5092 |
return 'object'; |
| 5093 |
} |
| 5094 |
if (isSymbol(propType, propValue)) { |
| 5095 |
return 'symbol'; |
| 5096 |
} |
| 5097 |
return propType; |
| 5098 |
} |
| 5099 |
|
| 5100 |
// This handles more types than `getPropType`. Only used for error messages. |
| 5101 |
// See `createPrimitiveTypeChecker`. |
| 5102 |
function getPreciseType(propValue) { |
| 5103 |
if (typeof propValue === 'undefined' || propValue === null) { |
| 5104 |
return '' + propValue; |
| 5105 |
} |
| 5106 |
var propType = getPropType(propValue); |
| 5107 |
if (propType === 'object') { |
| 5108 |
if (propValue instanceof Date) { |
| 5109 |
return 'date'; |
| 5110 |
} else if (propValue instanceof RegExp) { |
| 5111 |
return 'regexp'; |
| 5112 |
} |
| 5113 |
} |
| 5114 |
return propType; |
| 5115 |
} |
| 5116 |
|
| 5117 |
// Returns a string that is postfixed to a warning about an invalid type. |
| 5118 |
// For example, "undefined" or "of type array" |
| 5119 |
function getPostfixForTypeWarning(value) { |
| 5120 |
var type = getPreciseType(value); |
| 5121 |
switch (type) { |
| 5122 |
case 'array': |
| 5123 |
case 'object': |
| 5124 |
return 'an ' + type; |
| 5125 |
case 'boolean': |
| 5126 |
case 'date': |
| 5127 |
case 'regexp': |
| 5128 |
return 'a ' + type; |
| 5129 |
default: |
| 5130 |
return type; |
| 5131 |
} |
| 5132 |
} |
| 5133 |
|
| 5134 |
// Returns class name of the object, if any. |
| 5135 |
function getClassName(propValue) { |
| 5136 |
if (!propValue.constructor || !propValue.constructor.name) { |
| 5137 |
return ANONYMOUS; |
| 5138 |
} |
| 5139 |
return propValue.constructor.name; |
| 5140 |
} |
| 5141 |
|
| 5142 |
ReactPropTypes.checkPropTypes = checkPropTypes; |
| 5143 |
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; |
| 5144 |
ReactPropTypes.PropTypes = ReactPropTypes; |
| 5145 |
|
| 5146 |
return ReactPropTypes; |
| 5147 |
}; |
| 5148 |
|
| 5149 |
|
| 5150 |
/***/ }), |
| 5151 |
|
| 5152 |
/***/ "../node_modules/prop-types/index.js": |
| 5153 |
/*!*******************************************!*\ |
| 5154 |
!*** ../node_modules/prop-types/index.js ***! |
| 5155 |
\*******************************************/ |
| 5156 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 5157 |
|
| 5158 |
/** |
| 5159 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 5160 |
* |
| 5161 |
* This source code is licensed under the MIT license found in the |
| 5162 |
* LICENSE file in the root directory of this source tree. |
| 5163 |
*/ |
| 5164 |
|
| 5165 |
if (true) { |
| 5166 |
var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js"); |
| 5167 |
|
| 5168 |
// By explicitly using `prop-types` you are opting into new development behavior. |
| 5169 |
// http://fb.me/prop-types-in-prod |
| 5170 |
var throwOnDirectAccess = true; |
| 5171 |
module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess); |
| 5172 |
} else // removed by dead control flow |
| 5173 |
{} |
| 5174 |
|
| 5175 |
|
| 5176 |
/***/ }), |
| 5177 |
|
| 5178 |
/***/ "../node_modules/prop-types/lib/ReactPropTypesSecret.js": |
| 5179 |
/*!**************************************************************!*\ |
| 5180 |
!*** ../node_modules/prop-types/lib/ReactPropTypesSecret.js ***! |
| 5181 |
\**************************************************************/ |
| 5182 |
/***/ ((module) => { |
| 5183 |
|
| 5184 |
"use strict"; |
| 5185 |
/** |
| 5186 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 5187 |
* |
| 5188 |
* This source code is licensed under the MIT license found in the |
| 5189 |
* LICENSE file in the root directory of this source tree. |
| 5190 |
*/ |
| 5191 |
|
| 5192 |
|
| 5193 |
|
| 5194 |
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; |
| 5195 |
|
| 5196 |
module.exports = ReactPropTypesSecret; |
| 5197 |
|
| 5198 |
|
| 5199 |
/***/ }), |
| 5200 |
|
| 5201 |
/***/ "../node_modules/prop-types/lib/has.js": |
| 5202 |
/*!*********************************************!*\ |
| 5203 |
!*** ../node_modules/prop-types/lib/has.js ***! |
| 5204 |
\*********************************************/ |
| 5205 |
/***/ ((module) => { |
| 5206 |
|
| 5207 |
module.exports = Function.call.bind(Object.prototype.hasOwnProperty); |
| 5208 |
|
| 5209 |
|
| 5210 |
/***/ }), |
| 5211 |
|
| 5212 |
/***/ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js": |
| 5213 |
/*!************************************************************************************!*\ |
| 5214 |
!*** ../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js ***! |
| 5215 |
\************************************************************************************/ |
| 5216 |
/***/ ((__unused_webpack_module, exports) => { |
| 5217 |
|
| 5218 |
"use strict"; |
| 5219 |
/** @license React v16.13.1 |
| 5220 |
* react-is.development.js |
| 5221 |
* |
| 5222 |
* Copyright (c) Facebook, Inc. and its affiliates. |
| 5223 |
* |
| 5224 |
* This source code is licensed under the MIT license found in the |
| 5225 |
* LICENSE file in the root directory of this source tree. |
| 5226 |
*/ |
| 5227 |
|
| 5228 |
|
| 5229 |
|
| 5230 |
|
| 5231 |
|
| 5232 |
if (true) { |
| 5233 |
(function() { |
| 5234 |
'use strict'; |
| 5235 |
|
| 5236 |
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol |
| 5237 |
// nor polyfill, then a plain number is used for performance. |
| 5238 |
var hasSymbol = typeof Symbol === 'function' && Symbol.for; |
| 5239 |
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; |
| 5240 |
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; |
| 5241 |
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; |
| 5242 |
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; |
| 5243 |
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; |
| 5244 |
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; |
| 5245 |
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary |
| 5246 |
// (unstable) APIs that have been removed. Can we remove the symbols? |
| 5247 |
|
| 5248 |
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; |
| 5249 |
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; |
| 5250 |
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; |
| 5251 |
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; |
| 5252 |
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; |
| 5253 |
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; |
| 5254 |
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; |
| 5255 |
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; |
| 5256 |
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; |
| 5257 |
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; |
| 5258 |
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; |
| 5259 |
|
| 5260 |
function isValidElementType(type) { |
| 5261 |
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. |
| 5262 |
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); |
| 5263 |
} |
| 5264 |
|
| 5265 |
function typeOf(object) { |
| 5266 |
if (typeof object === 'object' && object !== null) { |
| 5267 |
var $$typeof = object.$$typeof; |
| 5268 |
|
| 5269 |
switch ($$typeof) { |
| 5270 |
case REACT_ELEMENT_TYPE: |
| 5271 |
var type = object.type; |
| 5272 |
|
| 5273 |
switch (type) { |
| 5274 |
case REACT_ASYNC_MODE_TYPE: |
| 5275 |
case REACT_CONCURRENT_MODE_TYPE: |
| 5276 |
case REACT_FRAGMENT_TYPE: |
| 5277 |
case REACT_PROFILER_TYPE: |
| 5278 |
case REACT_STRICT_MODE_TYPE: |
| 5279 |
case REACT_SUSPENSE_TYPE: |
| 5280 |
return type; |
| 5281 |
|
| 5282 |
default: |
| 5283 |
var $$typeofType = type && type.$$typeof; |
| 5284 |
|
| 5285 |
switch ($$typeofType) { |
| 5286 |
case REACT_CONTEXT_TYPE: |
| 5287 |
case REACT_FORWARD_REF_TYPE: |
| 5288 |
case REACT_LAZY_TYPE: |
| 5289 |
case REACT_MEMO_TYPE: |
| 5290 |
case REACT_PROVIDER_TYPE: |
| 5291 |
return $$typeofType; |
| 5292 |
|
| 5293 |
default: |
| 5294 |
return $$typeof; |
| 5295 |
} |
| 5296 |
|
| 5297 |
} |
| 5298 |
|
| 5299 |
case REACT_PORTAL_TYPE: |
| 5300 |
return $$typeof; |
| 5301 |
} |
| 5302 |
} |
| 5303 |
|
| 5304 |
return undefined; |
| 5305 |
} // AsyncMode is deprecated along with isAsyncMode |
| 5306 |
|
| 5307 |
var AsyncMode = REACT_ASYNC_MODE_TYPE; |
| 5308 |
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; |
| 5309 |
var ContextConsumer = REACT_CONTEXT_TYPE; |
| 5310 |
var ContextProvider = REACT_PROVIDER_TYPE; |
| 5311 |
var Element = REACT_ELEMENT_TYPE; |
| 5312 |
var ForwardRef = REACT_FORWARD_REF_TYPE; |
| 5313 |
var Fragment = REACT_FRAGMENT_TYPE; |
| 5314 |
var Lazy = REACT_LAZY_TYPE; |
| 5315 |
var Memo = REACT_MEMO_TYPE; |
| 5316 |
var Portal = REACT_PORTAL_TYPE; |
| 5317 |
var Profiler = REACT_PROFILER_TYPE; |
| 5318 |
var StrictMode = REACT_STRICT_MODE_TYPE; |
| 5319 |
var Suspense = REACT_SUSPENSE_TYPE; |
| 5320 |
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated |
| 5321 |
|
| 5322 |
function isAsyncMode(object) { |
| 5323 |
{ |
| 5324 |
if (!hasWarnedAboutDeprecatedIsAsyncMode) { |
| 5325 |
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint |
| 5326 |
|
| 5327 |
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.'); |
| 5328 |
} |
| 5329 |
} |
| 5330 |
|
| 5331 |
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; |
| 5332 |
} |
| 5333 |
function isConcurrentMode(object) { |
| 5334 |
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; |
| 5335 |
} |
| 5336 |
function isContextConsumer(object) { |
| 5337 |
return typeOf(object) === REACT_CONTEXT_TYPE; |
| 5338 |
} |
| 5339 |
function isContextProvider(object) { |
| 5340 |
return typeOf(object) === REACT_PROVIDER_TYPE; |
| 5341 |
} |
| 5342 |
function isElement(object) { |
| 5343 |
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; |
| 5344 |
} |
| 5345 |
function isForwardRef(object) { |
| 5346 |
return typeOf(object) === REACT_FORWARD_REF_TYPE; |
| 5347 |
} |
| 5348 |
function isFragment(object) { |
| 5349 |
return typeOf(object) === REACT_FRAGMENT_TYPE; |
| 5350 |
} |
| 5351 |
function isLazy(object) { |
| 5352 |
return typeOf(object) === REACT_LAZY_TYPE; |
| 5353 |
} |
| 5354 |
function isMemo(object) { |
| 5355 |
return typeOf(object) === REACT_MEMO_TYPE; |
| 5356 |
} |
| 5357 |
function isPortal(object) { |
| 5358 |
return typeOf(object) === REACT_PORTAL_TYPE; |
| 5359 |
} |
| 5360 |
function isProfiler(object) { |
| 5361 |
return typeOf(object) === REACT_PROFILER_TYPE; |
| 5362 |
} |
| 5363 |
function isStrictMode(object) { |
| 5364 |
return typeOf(object) === REACT_STRICT_MODE_TYPE; |
| 5365 |
} |
| 5366 |
function isSuspense(object) { |
| 5367 |
return typeOf(object) === REACT_SUSPENSE_TYPE; |
| 5368 |
} |
| 5369 |
|
| 5370 |
exports.AsyncMode = AsyncMode; |
| 5371 |
exports.ConcurrentMode = ConcurrentMode; |
| 5372 |
exports.ContextConsumer = ContextConsumer; |
| 5373 |
exports.ContextProvider = ContextProvider; |
| 5374 |
exports.Element = Element; |
| 5375 |
exports.ForwardRef = ForwardRef; |
| 5376 |
exports.Fragment = Fragment; |
| 5377 |
exports.Lazy = Lazy; |
| 5378 |
exports.Memo = Memo; |
| 5379 |
exports.Portal = Portal; |
| 5380 |
exports.Profiler = Profiler; |
| 5381 |
exports.StrictMode = StrictMode; |
| 5382 |
exports.Suspense = Suspense; |
| 5383 |
exports.isAsyncMode = isAsyncMode; |
| 5384 |
exports.isConcurrentMode = isConcurrentMode; |
| 5385 |
exports.isContextConsumer = isContextConsumer; |
| 5386 |
exports.isContextProvider = isContextProvider; |
| 5387 |
exports.isElement = isElement; |
| 5388 |
exports.isForwardRef = isForwardRef; |
| 5389 |
exports.isFragment = isFragment; |
| 5390 |
exports.isLazy = isLazy; |
| 5391 |
exports.isMemo = isMemo; |
| 5392 |
exports.isPortal = isPortal; |
| 5393 |
exports.isProfiler = isProfiler; |
| 5394 |
exports.isStrictMode = isStrictMode; |
| 5395 |
exports.isSuspense = isSuspense; |
| 5396 |
exports.isValidElementType = isValidElementType; |
| 5397 |
exports.typeOf = typeOf; |
| 5398 |
})(); |
| 5399 |
} |
| 5400 |
|
| 5401 |
|
| 5402 |
/***/ }), |
| 5403 |
|
| 5404 |
/***/ "../node_modules/prop-types/node_modules/react-is/index.js": |
| 5405 |
/*!*****************************************************************!*\ |
| 5406 |
!*** ../node_modules/prop-types/node_modules/react-is/index.js ***! |
| 5407 |
\*****************************************************************/ |
| 5408 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 5409 |
|
| 5410 |
"use strict"; |
| 5411 |
|
| 5412 |
|
| 5413 |
if (false) // removed by dead control flow |
| 5414 |
{} else { |
| 5415 |
module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js"); |
| 5416 |
} |
| 5417 |
|
| 5418 |
|
| 5419 |
/***/ }), |
| 5420 |
|
| 5421 |
/***/ "../node_modules/react-dom/client.js": |
| 5422 |
/*!*******************************************!*\ |
| 5423 |
!*** ../node_modules/react-dom/client.js ***! |
| 5424 |
\*******************************************/ |
| 5425 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 5426 |
|
| 5427 |
"use strict"; |
| 5428 |
|
| 5429 |
|
| 5430 |
var m = __webpack_require__(/*! react-dom */ "react-dom"); |
| 5431 |
if (false) // removed by dead control flow |
| 5432 |
{} else { |
| 5433 |
var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; |
| 5434 |
exports.createRoot = function(c, o) { |
| 5435 |
i.usingClientEntryPoint = true; |
| 5436 |
try { |
| 5437 |
return m.createRoot(c, o); |
| 5438 |
} finally { |
| 5439 |
i.usingClientEntryPoint = false; |
| 5440 |
} |
| 5441 |
}; |
| 5442 |
exports.hydrateRoot = function(c, h, o) { |
| 5443 |
i.usingClientEntryPoint = true; |
| 5444 |
try { |
| 5445 |
return m.hydrateRoot(c, h, o); |
| 5446 |
} finally { |
| 5447 |
i.usingClientEntryPoint = false; |
| 5448 |
} |
| 5449 |
}; |
| 5450 |
} |
| 5451 |
|
| 5452 |
|
| 5453 |
/***/ }), |
| 5454 |
|
| 5455 |
/***/ "../node_modules/tslib/tslib.es6.mjs": |
| 5456 |
/*!*******************************************!*\ |
| 5457 |
!*** ../node_modules/tslib/tslib.es6.mjs ***! |
| 5458 |
\*******************************************/ |
| 5459 |
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { |
| 5460 |
|
| 5461 |
"use strict"; |
| 5462 |
__webpack_require__.r(__webpack_exports__); |
| 5463 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 5464 |
/* harmony export */ __addDisposableResource: () => (/* binding */ __addDisposableResource), |
| 5465 |
/* harmony export */ __assign: () => (/* binding */ __assign), |
| 5466 |
/* harmony export */ __asyncDelegator: () => (/* binding */ __asyncDelegator), |
| 5467 |
/* harmony export */ __asyncGenerator: () => (/* binding */ __asyncGenerator), |
| 5468 |
/* harmony export */ __asyncValues: () => (/* binding */ __asyncValues), |
| 5469 |
/* harmony export */ __await: () => (/* binding */ __await), |
| 5470 |
/* harmony export */ __awaiter: () => (/* binding */ __awaiter), |
| 5471 |
/* harmony export */ __classPrivateFieldGet: () => (/* binding */ __classPrivateFieldGet), |
| 5472 |
/* harmony export */ __classPrivateFieldIn: () => (/* binding */ __classPrivateFieldIn), |
| 5473 |
/* harmony export */ __classPrivateFieldSet: () => (/* binding */ __classPrivateFieldSet), |
| 5474 |
/* harmony export */ __createBinding: () => (/* binding */ __createBinding), |
| 5475 |
/* harmony export */ __decorate: () => (/* binding */ __decorate), |
| 5476 |
/* harmony export */ __disposeResources: () => (/* binding */ __disposeResources), |
| 5477 |
/* harmony export */ __esDecorate: () => (/* binding */ __esDecorate), |
| 5478 |
/* harmony export */ __exportStar: () => (/* binding */ __exportStar), |
| 5479 |
/* harmony export */ __extends: () => (/* binding */ __extends), |
| 5480 |
/* harmony export */ __generator: () => (/* binding */ __generator), |
| 5481 |
/* harmony export */ __importDefault: () => (/* binding */ __importDefault), |
| 5482 |
/* harmony export */ __importStar: () => (/* binding */ __importStar), |
| 5483 |
/* harmony export */ __makeTemplateObject: () => (/* binding */ __makeTemplateObject), |
| 5484 |
/* harmony export */ __metadata: () => (/* binding */ __metadata), |
| 5485 |
/* harmony export */ __param: () => (/* binding */ __param), |
| 5486 |
/* harmony export */ __propKey: () => (/* binding */ __propKey), |
| 5487 |
/* harmony export */ __read: () => (/* binding */ __read), |
| 5488 |
/* harmony export */ __rest: () => (/* binding */ __rest), |
| 5489 |
/* harmony export */ __rewriteRelativeImportExtension: () => (/* binding */ __rewriteRelativeImportExtension), |
| 5490 |
/* harmony export */ __runInitializers: () => (/* binding */ __runInitializers), |
| 5491 |
/* harmony export */ __setFunctionName: () => (/* binding */ __setFunctionName), |
| 5492 |
/* harmony export */ __spread: () => (/* binding */ __spread), |
| 5493 |
/* harmony export */ __spreadArray: () => (/* binding */ __spreadArray), |
| 5494 |
/* harmony export */ __spreadArrays: () => (/* binding */ __spreadArrays), |
| 5495 |
/* harmony export */ __values: () => (/* binding */ __values), |
| 5496 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 5497 |
/* harmony export */ }); |
| 5498 |
/****************************************************************************** |
| 5499 |
Copyright (c) Microsoft Corporation. |
| 5500 |
|
| 5501 |
Permission to use, copy, modify, and/or distribute this software for any |
| 5502 |
purpose with or without fee is hereby granted. |
| 5503 |
|
| 5504 |
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH |
| 5505 |
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY |
| 5506 |
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, |
| 5507 |
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM |
| 5508 |
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR |
| 5509 |
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 5510 |
PERFORMANCE OF THIS SOFTWARE. |
| 5511 |
***************************************************************************** */ |
| 5512 |
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ |
| 5513 |
|
| 5514 |
var extendStatics = function(d, b) { |
| 5515 |
extendStatics = Object.setPrototypeOf || |
| 5516 |
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || |
| 5517 |
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; |
| 5518 |
return extendStatics(d, b); |
| 5519 |
}; |
| 5520 |
|
| 5521 |
function __extends(d, b) { |
| 5522 |
if (typeof b !== "function" && b !== null) |
| 5523 |
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); |
| 5524 |
extendStatics(d, b); |
| 5525 |
function __() { this.constructor = d; } |
| 5526 |
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); |
| 5527 |
} |
| 5528 |
|
| 5529 |
var __assign = function() { |
| 5530 |
__assign = Object.assign || function __assign(t) { |
| 5531 |
for (var s, i = 1, n = arguments.length; i < n; i++) { |
| 5532 |
s = arguments[i]; |
| 5533 |
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; |
| 5534 |
} |
| 5535 |
return t; |
| 5536 |
} |
| 5537 |
return __assign.apply(this, arguments); |
| 5538 |
} |
| 5539 |
|
| 5540 |
function __rest(s, e) { |
| 5541 |
var t = {}; |
| 5542 |
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) |
| 5543 |
t[p] = s[p]; |
| 5544 |
if (s != null && typeof Object.getOwnPropertySymbols === "function") |
| 5545 |
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { |
| 5546 |
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) |
| 5547 |
t[p[i]] = s[p[i]]; |
| 5548 |
} |
| 5549 |
return t; |
| 5550 |
} |
| 5551 |
|
| 5552 |
function __decorate(decorators, target, key, desc) { |
| 5553 |
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; |
| 5554 |
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); |
| 5555 |
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; |
| 5556 |
return c > 3 && r && Object.defineProperty(target, key, r), r; |
| 5557 |
} |
| 5558 |
|
| 5559 |
function __param(paramIndex, decorator) { |
| 5560 |
return function (target, key) { decorator(target, key, paramIndex); } |
| 5561 |
} |
| 5562 |
|
| 5563 |
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { |
| 5564 |
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } |
| 5565 |
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; |
| 5566 |
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; |
| 5567 |
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); |
| 5568 |
var _, done = false; |
| 5569 |
for (var i = decorators.length - 1; i >= 0; i--) { |
| 5570 |
var context = {}; |
| 5571 |
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; |
| 5572 |
for (var p in contextIn.access) context.access[p] = contextIn.access[p]; |
| 5573 |
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; |
| 5574 |
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); |
| 5575 |
if (kind === "accessor") { |
| 5576 |
if (result === void 0) continue; |
| 5577 |
if (result === null || typeof result !== "object") throw new TypeError("Object expected"); |
| 5578 |
if (_ = accept(result.get)) descriptor.get = _; |
| 5579 |
if (_ = accept(result.set)) descriptor.set = _; |
| 5580 |
if (_ = accept(result.init)) initializers.unshift(_); |
| 5581 |
} |
| 5582 |
else if (_ = accept(result)) { |
| 5583 |
if (kind === "field") initializers.unshift(_); |
| 5584 |
else descriptor[key] = _; |
| 5585 |
} |
| 5586 |
} |
| 5587 |
if (target) Object.defineProperty(target, contextIn.name, descriptor); |
| 5588 |
done = true; |
| 5589 |
}; |
| 5590 |
|
| 5591 |
function __runInitializers(thisArg, initializers, value) { |
| 5592 |
var useValue = arguments.length > 2; |
| 5593 |
for (var i = 0; i < initializers.length; i++) { |
| 5594 |
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); |
| 5595 |
} |
| 5596 |
return useValue ? value : void 0; |
| 5597 |
}; |
| 5598 |
|
| 5599 |
function __propKey(x) { |
| 5600 |
return typeof x === "symbol" ? x : "".concat(x); |
| 5601 |
}; |
| 5602 |
|
| 5603 |
function __setFunctionName(f, name, prefix) { |
| 5604 |
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; |
| 5605 |
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); |
| 5606 |
}; |
| 5607 |
|
| 5608 |
function __metadata(metadataKey, metadataValue) { |
| 5609 |
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); |
| 5610 |
} |
| 5611 |
|
| 5612 |
function __awaiter(thisArg, _arguments, P, generator) { |
| 5613 |
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |
| 5614 |
return new (P || (P = Promise))(function (resolve, reject) { |
| 5615 |
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |
| 5616 |
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } |
| 5617 |
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } |
| 5618 |
step((generator = generator.apply(thisArg, _arguments || [])).next()); |
| 5619 |
}); |
| 5620 |
} |
| 5621 |
|
| 5622 |
function __generator(thisArg, body) { |
| 5623 |
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); |
| 5624 |
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; |
| 5625 |
function verb(n) { return function (v) { return step([n, v]); }; } |
| 5626 |
function step(op) { |
| 5627 |
if (f) throw new TypeError("Generator is already executing."); |
| 5628 |
while (g && (g = 0, op[0] && (_ = 0)), _) try { |
| 5629 |
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; |
| 5630 |
if (y = 0, t) op = [op[0] & 2, t.value]; |
| 5631 |
switch (op[0]) { |
| 5632 |
case 0: case 1: t = op; break; |
| 5633 |
case 4: _.label++; return { value: op[1], done: false }; |
| 5634 |
case 5: _.label++; y = op[1]; op = [0]; continue; |
| 5635 |
case 7: op = _.ops.pop(); _.trys.pop(); continue; |
| 5636 |
default: |
| 5637 |
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } |
| 5638 |
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } |
| 5639 |
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } |
| 5640 |
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } |
| 5641 |
if (t[2]) _.ops.pop(); |
| 5642 |
_.trys.pop(); continue; |
| 5643 |
} |
| 5644 |
op = body.call(thisArg, _); |
| 5645 |
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } |
| 5646 |
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; |
| 5647 |
} |
| 5648 |
} |
| 5649 |
|
| 5650 |
var __createBinding = Object.create ? (function(o, m, k, k2) { |
| 5651 |
if (k2 === undefined) k2 = k; |
| 5652 |
var desc = Object.getOwnPropertyDescriptor(m, k); |
| 5653 |
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { |
| 5654 |
desc = { enumerable: true, get: function() { return m[k]; } }; |
| 5655 |
} |
| 5656 |
Object.defineProperty(o, k2, desc); |
| 5657 |
}) : (function(o, m, k, k2) { |
| 5658 |
if (k2 === undefined) k2 = k; |
| 5659 |
o[k2] = m[k]; |
| 5660 |
}); |
| 5661 |
|
| 5662 |
function __exportStar(m, o) { |
| 5663 |
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); |
| 5664 |
} |
| 5665 |
|
| 5666 |
function __values(o) { |
| 5667 |
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; |
| 5668 |
if (m) return m.call(o); |
| 5669 |
if (o && typeof o.length === "number") return { |
| 5670 |
next: function () { |
| 5671 |
if (o && i >= o.length) o = void 0; |
| 5672 |
return { value: o && o[i++], done: !o }; |
| 5673 |
} |
| 5674 |
}; |
| 5675 |
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); |
| 5676 |
} |
| 5677 |
|
| 5678 |
function __read(o, n) { |
| 5679 |
var m = typeof Symbol === "function" && o[Symbol.iterator]; |
| 5680 |
if (!m) return o; |
| 5681 |
var i = m.call(o), r, ar = [], e; |
| 5682 |
try { |
| 5683 |
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); |
| 5684 |
} |
| 5685 |
catch (error) { e = { error: error }; } |
| 5686 |
finally { |
| 5687 |
try { |
| 5688 |
if (r && !r.done && (m = i["return"])) m.call(i); |
| 5689 |
} |
| 5690 |
finally { if (e) throw e.error; } |
| 5691 |
} |
| 5692 |
return ar; |
| 5693 |
} |
| 5694 |
|
| 5695 |
/** @deprecated */ |
| 5696 |
function __spread() { |
| 5697 |
for (var ar = [], i = 0; i < arguments.length; i++) |
| 5698 |
ar = ar.concat(__read(arguments[i])); |
| 5699 |
return ar; |
| 5700 |
} |
| 5701 |
|
| 5702 |
/** @deprecated */ |
| 5703 |
function __spreadArrays() { |
| 5704 |
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; |
| 5705 |
for (var r = Array(s), k = 0, i = 0; i < il; i++) |
| 5706 |
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) |
| 5707 |
r[k] = a[j]; |
| 5708 |
return r; |
| 5709 |
} |
| 5710 |
|
| 5711 |
function __spreadArray(to, from, pack) { |
| 5712 |
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { |
| 5713 |
if (ar || !(i in from)) { |
| 5714 |
if (!ar) ar = Array.prototype.slice.call(from, 0, i); |
| 5715 |
ar[i] = from[i]; |
| 5716 |
} |
| 5717 |
} |
| 5718 |
return to.concat(ar || Array.prototype.slice.call(from)); |
| 5719 |
} |
| 5720 |
|
| 5721 |
function __await(v) { |
| 5722 |
return this instanceof __await ? (this.v = v, this) : new __await(v); |
| 5723 |
} |
| 5724 |
|
| 5725 |
function __asyncGenerator(thisArg, _arguments, generator) { |
| 5726 |
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |
| 5727 |
var g = generator.apply(thisArg, _arguments || []), i, q = []; |
| 5728 |
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; |
| 5729 |
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } |
| 5730 |
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } |
| 5731 |
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } |
| 5732 |
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } |
| 5733 |
function fulfill(value) { resume("next", value); } |
| 5734 |
function reject(value) { resume("throw", value); } |
| 5735 |
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } |
| 5736 |
} |
| 5737 |
|
| 5738 |
function __asyncDelegator(o) { |
| 5739 |
var i, p; |
| 5740 |
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; |
| 5741 |
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } |
| 5742 |
} |
| 5743 |
|
| 5744 |
function __asyncValues(o) { |
| 5745 |
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |
| 5746 |
var m = o[Symbol.asyncIterator], i; |
| 5747 |
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); |
| 5748 |
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } |
| 5749 |
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } |
| 5750 |
} |
| 5751 |
|
| 5752 |
function __makeTemplateObject(cooked, raw) { |
| 5753 |
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } |
| 5754 |
return cooked; |
| 5755 |
}; |
| 5756 |
|
| 5757 |
var __setModuleDefault = Object.create ? (function(o, v) { |
| 5758 |
Object.defineProperty(o, "default", { enumerable: true, value: v }); |
| 5759 |
}) : function(o, v) { |
| 5760 |
o["default"] = v; |
| 5761 |
}; |
| 5762 |
|
| 5763 |
var ownKeys = function(o) { |
| 5764 |
ownKeys = Object.getOwnPropertyNames || function (o) { |
| 5765 |
var ar = []; |
| 5766 |
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; |
| 5767 |
return ar; |
| 5768 |
}; |
| 5769 |
return ownKeys(o); |
| 5770 |
}; |
| 5771 |
|
| 5772 |
function __importStar(mod) { |
| 5773 |
if (mod && mod.__esModule) return mod; |
| 5774 |
var result = {}; |
| 5775 |
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); |
| 5776 |
__setModuleDefault(result, mod); |
| 5777 |
return result; |
| 5778 |
} |
| 5779 |
|
| 5780 |
function __importDefault(mod) { |
| 5781 |
return (mod && mod.__esModule) ? mod : { default: mod }; |
| 5782 |
} |
| 5783 |
|
| 5784 |
function __classPrivateFieldGet(receiver, state, kind, f) { |
| 5785 |
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); |
| 5786 |
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); |
| 5787 |
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); |
| 5788 |
} |
| 5789 |
|
| 5790 |
function __classPrivateFieldSet(receiver, state, value, kind, f) { |
| 5791 |
if (kind === "m") throw new TypeError("Private method is not writable"); |
| 5792 |
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); |
| 5793 |
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); |
| 5794 |
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; |
| 5795 |
} |
| 5796 |
|
| 5797 |
function __classPrivateFieldIn(state, receiver) { |
| 5798 |
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); |
| 5799 |
return typeof state === "function" ? receiver === state : state.has(receiver); |
| 5800 |
} |
| 5801 |
|
| 5802 |
function __addDisposableResource(env, value, async) { |
| 5803 |
if (value !== null && value !== void 0) { |
| 5804 |
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); |
| 5805 |
var dispose, inner; |
| 5806 |
if (async) { |
| 5807 |
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); |
| 5808 |
dispose = value[Symbol.asyncDispose]; |
| 5809 |
} |
| 5810 |
if (dispose === void 0) { |
| 5811 |
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); |
| 5812 |
dispose = value[Symbol.dispose]; |
| 5813 |
if (async) inner = dispose; |
| 5814 |
} |
| 5815 |
if (typeof dispose !== "function") throw new TypeError("Object not disposable."); |
| 5816 |
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; |
| 5817 |
env.stack.push({ value: value, dispose: dispose, async: async }); |
| 5818 |
} |
| 5819 |
else if (async) { |
| 5820 |
env.stack.push({ async: true }); |
| 5821 |
} |
| 5822 |
return value; |
| 5823 |
} |
| 5824 |
|
| 5825 |
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { |
| 5826 |
var e = new Error(message); |
| 5827 |
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; |
| 5828 |
}; |
| 5829 |
|
| 5830 |
function __disposeResources(env) { |
| 5831 |
function fail(e) { |
| 5832 |
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; |
| 5833 |
env.hasError = true; |
| 5834 |
} |
| 5835 |
var r, s = 0; |
| 5836 |
function next() { |
| 5837 |
while (r = env.stack.pop()) { |
| 5838 |
try { |
| 5839 |
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); |
| 5840 |
if (r.dispose) { |
| 5841 |
var result = r.dispose.call(r.value); |
| 5842 |
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); |
| 5843 |
} |
| 5844 |
else s |= 1; |
| 5845 |
} |
| 5846 |
catch (e) { |
| 5847 |
fail(e); |
| 5848 |
} |
| 5849 |
} |
| 5850 |
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); |
| 5851 |
if (env.hasError) throw env.error; |
| 5852 |
} |
| 5853 |
return next(); |
| 5854 |
} |
| 5855 |
|
| 5856 |
function __rewriteRelativeImportExtension(path, preserveJsx) { |
| 5857 |
if (typeof path === "string" && /^\.\.?\//.test(path)) { |
| 5858 |
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { |
| 5859 |
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); |
| 5860 |
}); |
| 5861 |
} |
| 5862 |
return path; |
| 5863 |
} |
| 5864 |
|
| 5865 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ |
| 5866 |
__extends, |
| 5867 |
__assign, |
| 5868 |
__rest, |
| 5869 |
__decorate, |
| 5870 |
__param, |
| 5871 |
__esDecorate, |
| 5872 |
__runInitializers, |
| 5873 |
__propKey, |
| 5874 |
__setFunctionName, |
| 5875 |
__metadata, |
| 5876 |
__awaiter, |
| 5877 |
__generator, |
| 5878 |
__createBinding, |
| 5879 |
__exportStar, |
| 5880 |
__values, |
| 5881 |
__read, |
| 5882 |
__spread, |
| 5883 |
__spreadArrays, |
| 5884 |
__spreadArray, |
| 5885 |
__await, |
| 5886 |
__asyncGenerator, |
| 5887 |
__asyncDelegator, |
| 5888 |
__asyncValues, |
| 5889 |
__makeTemplateObject, |
| 5890 |
__importStar, |
| 5891 |
__importDefault, |
| 5892 |
__classPrivateFieldGet, |
| 5893 |
__classPrivateFieldSet, |
| 5894 |
__classPrivateFieldIn, |
| 5895 |
__addDisposableResource, |
| 5896 |
__disposeResources, |
| 5897 |
__rewriteRelativeImportExtension, |
| 5898 |
}); |
| 5899 |
|
| 5900 |
|
| 5901 |
/***/ }), |
| 5902 |
|
| 5903 |
/***/ "@elementor/icons": |
| 5904 |
/*!************************************!*\ |
| 5905 |
!*** external "elementorV2.icons" ***! |
| 5906 |
\************************************/ |
| 5907 |
/***/ ((module) => { |
| 5908 |
|
| 5909 |
"use strict"; |
| 5910 |
module.exports = elementorV2.icons; |
| 5911 |
|
| 5912 |
/***/ }), |
| 5913 |
|
| 5914 |
/***/ "@elementor/ui": |
| 5915 |
/*!*********************************!*\ |
| 5916 |
!*** external "elementorV2.ui" ***! |
| 5917 |
\*********************************/ |
| 5918 |
/***/ ((module) => { |
| 5919 |
|
| 5920 |
"use strict"; |
| 5921 |
module.exports = elementorV2.ui; |
| 5922 |
|
| 5923 |
/***/ }), |
| 5924 |
|
| 5925 |
/***/ "@wordpress/components": |
| 5926 |
/*!********************************!*\ |
| 5927 |
!*** external "wp.components" ***! |
| 5928 |
\********************************/ |
| 5929 |
/***/ ((module) => { |
| 5930 |
|
| 5931 |
"use strict"; |
| 5932 |
module.exports = wp.components; |
| 5933 |
|
| 5934 |
/***/ }), |
| 5935 |
|
| 5936 |
/***/ "@wordpress/dom-ready": |
| 5937 |
/*!******************************!*\ |
| 5938 |
!*** external "wp.domReady" ***! |
| 5939 |
\******************************/ |
| 5940 |
/***/ ((module) => { |
| 5941 |
|
| 5942 |
"use strict"; |
| 5943 |
module.exports = wp.domReady; |
| 5944 |
|
| 5945 |
/***/ }), |
| 5946 |
|
| 5947 |
/***/ "@wordpress/i18n": |
| 5948 |
/*!**************************!*\ |
| 5949 |
!*** external "wp.i18n" ***! |
| 5950 |
\**************************/ |
| 5951 |
/***/ ((module) => { |
| 5952 |
|
| 5953 |
"use strict"; |
| 5954 |
module.exports = wp.i18n; |
| 5955 |
|
| 5956 |
/***/ }), |
| 5957 |
|
| 5958 |
/***/ "react": |
| 5959 |
/*!************************!*\ |
| 5960 |
!*** external "React" ***! |
| 5961 |
\************************/ |
| 5962 |
/***/ ((module) => { |
| 5963 |
|
| 5964 |
"use strict"; |
| 5965 |
module.exports = React; |
| 5966 |
|
| 5967 |
/***/ }), |
| 5968 |
|
| 5969 |
/***/ "react-dom": |
| 5970 |
/*!***************************!*\ |
| 5971 |
!*** external "ReactDOM" ***! |
| 5972 |
\***************************/ |
| 5973 |
/***/ ((module) => { |
| 5974 |
|
| 5975 |
"use strict"; |
| 5976 |
module.exports = ReactDOM; |
| 5977 |
|
| 5978 |
/***/ }) |
| 5979 |
|
| 5980 |
/******/ }); |
| 5981 |
/************************************************************************/ |
| 5982 |
/******/ // The module cache |
| 5983 |
/******/ var __webpack_module_cache__ = {}; |
| 5984 |
/******/ |
| 5985 |
/******/ // The require function |
| 5986 |
/******/ function __webpack_require__(moduleId) { |
| 5987 |
/******/ // Check if module is in cache |
| 5988 |
/******/ var cachedModule = __webpack_module_cache__[moduleId]; |
| 5989 |
/******/ if (cachedModule !== undefined) { |
| 5990 |
/******/ return cachedModule.exports; |
| 5991 |
/******/ } |
| 5992 |
/******/ // Create a new module (and put it into the cache) |
| 5993 |
/******/ var module = __webpack_module_cache__[moduleId] = { |
| 5994 |
/******/ // no module.id needed |
| 5995 |
/******/ // no module.loaded needed |
| 5996 |
/******/ exports: {} |
| 5997 |
/******/ }; |
| 5998 |
/******/ |
| 5999 |
/******/ // Execute the module function |
| 6000 |
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); |
| 6001 |
/******/ |
| 6002 |
/******/ // Return the exports of the module |
| 6003 |
/******/ return module.exports; |
| 6004 |
/******/ } |
| 6005 |
/******/ |
| 6006 |
/************************************************************************/ |
| 6007 |
/******/ /* webpack/runtime/compat get default export */ |
| 6008 |
/******/ (() => { |
| 6009 |
/******/ // getDefaultExport function for compatibility with non-harmony modules |
| 6010 |
/******/ __webpack_require__.n = (module) => { |
| 6011 |
/******/ var getter = module && module.__esModule ? |
| 6012 |
/******/ () => (module['default']) : |
| 6013 |
/******/ () => (module); |
| 6014 |
/******/ __webpack_require__.d(getter, { a: getter }); |
| 6015 |
/******/ return getter; |
| 6016 |
/******/ }; |
| 6017 |
/******/ })(); |
| 6018 |
/******/ |
| 6019 |
/******/ /* webpack/runtime/define property getters */ |
| 6020 |
/******/ (() => { |
| 6021 |
/******/ // define getter functions for harmony exports |
| 6022 |
/******/ __webpack_require__.d = (exports, definition) => { |
| 6023 |
/******/ for(var key in definition) { |
| 6024 |
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { |
| 6025 |
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); |
| 6026 |
/******/ } |
| 6027 |
/******/ } |
| 6028 |
/******/ }; |
| 6029 |
/******/ })(); |
| 6030 |
/******/ |
| 6031 |
/******/ /* webpack/runtime/hasOwnProperty shorthand */ |
| 6032 |
/******/ (() => { |
| 6033 |
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) |
| 6034 |
/******/ })(); |
| 6035 |
/******/ |
| 6036 |
/******/ /* webpack/runtime/make namespace object */ |
| 6037 |
/******/ (() => { |
| 6038 |
/******/ // define __esModule on exports |
| 6039 |
/******/ __webpack_require__.r = (exports) => { |
| 6040 |
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
| 6041 |
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
| 6042 |
/******/ } |
| 6043 |
/******/ Object.defineProperty(exports, '__esModule', { value: true }); |
| 6044 |
/******/ }; |
| 6045 |
/******/ })(); |
| 6046 |
/******/ |
| 6047 |
/************************************************************************/ |
| 6048 |
var __webpack_exports__ = {}; |
| 6049 |
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. |
| 6050 |
(() => { |
| 6051 |
"use strict"; |
| 6052 |
/*!*****************************************************!*\ |
| 6053 |
!*** ../modules/element-manager/assets/js/admin.js ***! |
| 6054 |
\*****************************************************/ |
| 6055 |
|
| 6056 |
|
| 6057 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 6058 |
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 6059 |
var _element = __webpack_require__(/*! @wordpress/element */ "../node_modules/@wordpress/element/build-module/index.js"); |
| 6060 |
var _domReady = _interopRequireDefault(__webpack_require__(/*! @wordpress/dom-ready */ "@wordpress/dom-ready")); |
| 6061 |
var _appEditorOne = __webpack_require__(/*! ./app-editor-one */ "../modules/element-manager/assets/js/app-editor-one/index.js"); |
| 6062 |
(0, _domReady.default)(function () { |
| 6063 |
var htmlOutput = document.getElementById('elementor-element-manager-wrap'); |
| 6064 |
if (!htmlOutput) { |
| 6065 |
return; |
| 6066 |
} |
| 6067 |
var root = (0, _element.createRoot)(htmlOutput); |
| 6068 |
root.render(/*#__PURE__*/_react.default.createElement(_appEditorOne.AppModern, null)); |
| 6069 |
}); |
| 6070 |
})(); |
| 6071 |
|
| 6072 |
/******/ })() |
| 6073 |
; |
| 6074 |
//# sourceMappingURL=element-manager-admin.js.map |