| 1 |
(function(react, _elementor_ui, _elementor_query, _wordpress_i18n, _elementor_icons) { |
| 2 |
|
| 3 |
//#region \0rolldown/runtime.js |
| 4 |
var __create = Object.create; |
| 5 |
var __defProp = Object.defineProperty; |
| 6 |
var __name = (target, value) => __defProp(target, "name", { |
| 7 |
value, |
| 8 |
configurable: true |
| 9 |
}); |
| 10 |
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; |
| 11 |
var __getOwnPropNames = Object.getOwnPropertyNames; |
| 12 |
var __getProtoOf = Object.getPrototypeOf; |
| 13 |
var __hasOwnProp = Object.prototype.hasOwnProperty; |
| 14 |
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports); |
| 15 |
var __copyProps = (to, from, except, desc) => { |
| 16 |
if (from && typeof from === "object" || typeof from === "function") { |
| 17 |
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { |
| 18 |
key = keys[i]; |
| 19 |
if (!__hasOwnProp.call(to, key) && key !== except) { |
| 20 |
__defProp(to, key, { |
| 21 |
get: ((k) => from[k]).bind(null, key), |
| 22 |
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable |
| 23 |
}); |
| 24 |
} |
| 25 |
} |
| 26 |
} |
| 27 |
return to; |
| 28 |
}; |
| 29 |
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { |
| 30 |
value: mod, |
| 31 |
enumerable: true |
| 32 |
}) : target, mod)); |
| 33 |
|
| 34 |
//#endregion |
| 35 |
react = __toESM(react); |
| 36 |
|
| 37 |
//#region node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js |
| 38 |
/** @license React v16.13.1 |
| 39 |
* react-is.development.js |
| 40 |
* |
| 41 |
* Copyright (c) Facebook, Inc. and its affiliates. |
| 42 |
* |
| 43 |
* This source code is licensed under the MIT license found in the |
| 44 |
* LICENSE file in the root directory of this source tree. |
| 45 |
*/ |
| 46 |
var require_react_is_development = /* @__PURE__ */ __commonJSMin(((exports) => { |
| 47 |
(function() { |
| 48 |
"use strict"; |
| 49 |
var hasSymbol = typeof Symbol === "function" && Symbol.for; |
| 50 |
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103; |
| 51 |
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106; |
| 52 |
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107; |
| 53 |
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108; |
| 54 |
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114; |
| 55 |
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109; |
| 56 |
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110; |
| 57 |
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111; |
| 58 |
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111; |
| 59 |
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112; |
| 60 |
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113; |
| 61 |
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120; |
| 62 |
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115; |
| 63 |
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116; |
| 64 |
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121; |
| 65 |
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117; |
| 66 |
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118; |
| 67 |
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119; |
| 68 |
function isValidElementType(type) { |
| 69 |
return typeof type === "string" || typeof type === "function" || 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); |
| 70 |
} |
| 71 |
function typeOf(object) { |
| 72 |
if (typeof object === "object" && object !== null) { |
| 73 |
var $$typeof = object.$$typeof; |
| 74 |
switch ($$typeof) { |
| 75 |
case REACT_ELEMENT_TYPE: |
| 76 |
var type = object.type; |
| 77 |
switch (type) { |
| 78 |
case REACT_ASYNC_MODE_TYPE: |
| 79 |
case REACT_CONCURRENT_MODE_TYPE: |
| 80 |
case REACT_FRAGMENT_TYPE: |
| 81 |
case REACT_PROFILER_TYPE: |
| 82 |
case REACT_STRICT_MODE_TYPE: |
| 83 |
case REACT_SUSPENSE_TYPE: return type; |
| 84 |
default: |
| 85 |
var $$typeofType = type && type.$$typeof; |
| 86 |
switch ($$typeofType) { |
| 87 |
case REACT_CONTEXT_TYPE: |
| 88 |
case REACT_FORWARD_REF_TYPE: |
| 89 |
case REACT_LAZY_TYPE: |
| 90 |
case REACT_MEMO_TYPE: |
| 91 |
case REACT_PROVIDER_TYPE: return $$typeofType; |
| 92 |
default: return $$typeof; |
| 93 |
} |
| 94 |
} |
| 95 |
case REACT_PORTAL_TYPE: return $$typeof; |
| 96 |
} |
| 97 |
} |
| 98 |
} |
| 99 |
var AsyncMode = REACT_ASYNC_MODE_TYPE; |
| 100 |
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; |
| 101 |
var ContextConsumer = REACT_CONTEXT_TYPE; |
| 102 |
var ContextProvider = REACT_PROVIDER_TYPE; |
| 103 |
var Element = REACT_ELEMENT_TYPE; |
| 104 |
var ForwardRef = REACT_FORWARD_REF_TYPE; |
| 105 |
var Fragment = REACT_FRAGMENT_TYPE; |
| 106 |
var Lazy = REACT_LAZY_TYPE; |
| 107 |
var Memo = REACT_MEMO_TYPE; |
| 108 |
var Portal = REACT_PORTAL_TYPE; |
| 109 |
var Profiler = REACT_PROFILER_TYPE; |
| 110 |
var StrictMode = REACT_STRICT_MODE_TYPE; |
| 111 |
var Suspense = REACT_SUSPENSE_TYPE; |
| 112 |
var hasWarnedAboutDeprecatedIsAsyncMode = false; |
| 113 |
function isAsyncMode(object) { |
| 114 |
if (!hasWarnedAboutDeprecatedIsAsyncMode) { |
| 115 |
hasWarnedAboutDeprecatedIsAsyncMode = true; |
| 116 |
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."); |
| 117 |
} |
| 118 |
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; |
| 119 |
} |
| 120 |
function isConcurrentMode(object) { |
| 121 |
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; |
| 122 |
} |
| 123 |
function isContextConsumer(object) { |
| 124 |
return typeOf(object) === REACT_CONTEXT_TYPE; |
| 125 |
} |
| 126 |
function isContextProvider(object) { |
| 127 |
return typeOf(object) === REACT_PROVIDER_TYPE; |
| 128 |
} |
| 129 |
function isElement(object) { |
| 130 |
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; |
| 131 |
} |
| 132 |
function isForwardRef(object) { |
| 133 |
return typeOf(object) === REACT_FORWARD_REF_TYPE; |
| 134 |
} |
| 135 |
function isFragment(object) { |
| 136 |
return typeOf(object) === REACT_FRAGMENT_TYPE; |
| 137 |
} |
| 138 |
function isLazy(object) { |
| 139 |
return typeOf(object) === REACT_LAZY_TYPE; |
| 140 |
} |
| 141 |
function isMemo(object) { |
| 142 |
return typeOf(object) === REACT_MEMO_TYPE; |
| 143 |
} |
| 144 |
function isPortal(object) { |
| 145 |
return typeOf(object) === REACT_PORTAL_TYPE; |
| 146 |
} |
| 147 |
function isProfiler(object) { |
| 148 |
return typeOf(object) === REACT_PROFILER_TYPE; |
| 149 |
} |
| 150 |
function isStrictMode(object) { |
| 151 |
return typeOf(object) === REACT_STRICT_MODE_TYPE; |
| 152 |
} |
| 153 |
function isSuspense(object) { |
| 154 |
return typeOf(object) === REACT_SUSPENSE_TYPE; |
| 155 |
} |
| 156 |
exports.AsyncMode = AsyncMode; |
| 157 |
exports.ConcurrentMode = ConcurrentMode; |
| 158 |
exports.ContextConsumer = ContextConsumer; |
| 159 |
exports.ContextProvider = ContextProvider; |
| 160 |
exports.Element = Element; |
| 161 |
exports.ForwardRef = ForwardRef; |
| 162 |
exports.Fragment = Fragment; |
| 163 |
exports.Lazy = Lazy; |
| 164 |
exports.Memo = Memo; |
| 165 |
exports.Portal = Portal; |
| 166 |
exports.Profiler = Profiler; |
| 167 |
exports.StrictMode = StrictMode; |
| 168 |
exports.Suspense = Suspense; |
| 169 |
exports.isAsyncMode = isAsyncMode; |
| 170 |
exports.isConcurrentMode = isConcurrentMode; |
| 171 |
exports.isContextConsumer = isContextConsumer; |
| 172 |
exports.isContextProvider = isContextProvider; |
| 173 |
exports.isElement = isElement; |
| 174 |
exports.isForwardRef = isForwardRef; |
| 175 |
exports.isFragment = isFragment; |
| 176 |
exports.isLazy = isLazy; |
| 177 |
exports.isMemo = isMemo; |
| 178 |
exports.isPortal = isPortal; |
| 179 |
exports.isProfiler = isProfiler; |
| 180 |
exports.isStrictMode = isStrictMode; |
| 181 |
exports.isSuspense = isSuspense; |
| 182 |
exports.isValidElementType = isValidElementType; |
| 183 |
exports.typeOf = typeOf; |
| 184 |
})(); |
| 185 |
})); |
| 186 |
|
| 187 |
//#endregion |
| 188 |
//#region node_modules/prop-types/node_modules/react-is/index.js |
| 189 |
var require_react_is = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 190 |
module.exports = require_react_is_development(); |
| 191 |
})); |
| 192 |
|
| 193 |
//#endregion |
| 194 |
//#region node_modules/object-assign/index.js |
| 195 |
/* |
| 196 |
object-assign |
| 197 |
(c) Sindre Sorhus |
| 198 |
@license MIT |
| 199 |
*/ |
| 200 |
var require_object_assign = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 201 |
var getOwnPropertySymbols = Object.getOwnPropertySymbols; |
| 202 |
var hasOwnProperty = Object.prototype.hasOwnProperty; |
| 203 |
var propIsEnumerable = Object.prototype.propertyIsEnumerable; |
| 204 |
function toObject(val) { |
| 205 |
if (val === null || val === void 0) throw new TypeError("Object.assign cannot be called with null or undefined"); |
| 206 |
return Object(val); |
| 207 |
} |
| 208 |
function shouldUseNative() { |
| 209 |
try { |
| 210 |
if (!Object.assign) return false; |
| 211 |
var test1 = /* @__PURE__ */ new String("abc"); |
| 212 |
test1[5] = "de"; |
| 213 |
if (Object.getOwnPropertyNames(test1)[0] === "5") return false; |
| 214 |
var test2 = {}; |
| 215 |
for (var i = 0; i < 10; i++) test2["_" + String.fromCharCode(i)] = i; |
| 216 |
if (Object.getOwnPropertyNames(test2).map(function(n) { |
| 217 |
return test2[n]; |
| 218 |
}).join("") !== "0123456789") return false; |
| 219 |
var test3 = {}; |
| 220 |
"abcdefghijklmnopqrst".split("").forEach(function(letter) { |
| 221 |
test3[letter] = letter; |
| 222 |
}); |
| 223 |
if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") return false; |
| 224 |
return true; |
| 225 |
} catch (err) { |
| 226 |
return false; |
| 227 |
} |
| 228 |
} |
| 229 |
module.exports = shouldUseNative() ? Object.assign : function(target, source) { |
| 230 |
var from; |
| 231 |
var to = toObject(target); |
| 232 |
var symbols; |
| 233 |
for (var s = 1; s < arguments.length; s++) { |
| 234 |
from = Object(arguments[s]); |
| 235 |
for (var key in from) if (hasOwnProperty.call(from, key)) to[key] = from[key]; |
| 236 |
if (getOwnPropertySymbols) { |
| 237 |
symbols = getOwnPropertySymbols(from); |
| 238 |
for (var i = 0; i < symbols.length; i++) if (propIsEnumerable.call(from, symbols[i])) to[symbols[i]] = from[symbols[i]]; |
| 239 |
} |
| 240 |
} |
| 241 |
return to; |
| 242 |
}; |
| 243 |
})); |
| 244 |
|
| 245 |
//#endregion |
| 246 |
//#region node_modules/prop-types/lib/ReactPropTypesSecret.js |
| 247 |
/** |
| 248 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 249 |
* |
| 250 |
* This source code is licensed under the MIT license found in the |
| 251 |
* LICENSE file in the root directory of this source tree. |
| 252 |
*/ |
| 253 |
var require_ReactPropTypesSecret = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 254 |
var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; |
| 255 |
module.exports = ReactPropTypesSecret; |
| 256 |
})); |
| 257 |
|
| 258 |
//#endregion |
| 259 |
//#region node_modules/prop-types/lib/has.js |
| 260 |
var require_has = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 261 |
module.exports = Function.call.bind(Object.prototype.hasOwnProperty); |
| 262 |
})); |
| 263 |
|
| 264 |
//#endregion |
| 265 |
//#region node_modules/prop-types/checkPropTypes.js |
| 266 |
/** |
| 267 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 268 |
* |
| 269 |
* This source code is licensed under the MIT license found in the |
| 270 |
* LICENSE file in the root directory of this source tree. |
| 271 |
*/ |
| 272 |
var require_checkPropTypes = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 273 |
var printWarning = function() {}; |
| 274 |
var ReactPropTypesSecret = require_ReactPropTypesSecret(); |
| 275 |
var loggedTypeFailures = {}; |
| 276 |
var has = require_has(); |
| 277 |
printWarning = function(text) { |
| 278 |
var message = "Warning: " + text; |
| 279 |
if (typeof console !== "undefined") console.error(message); |
| 280 |
try { |
| 281 |
throw new Error(message); |
| 282 |
} catch (x) {} |
| 283 |
}; |
| 284 |
/** |
| 285 |
* Assert that the values match with the type specs. |
| 286 |
* Error messages are memorized and will only be shown once. |
| 287 |
* |
| 288 |
* @param {object} typeSpecs Map of name to a ReactPropType |
| 289 |
* @param {object} values Runtime values that need to be type-checked |
| 290 |
* @param {string} location e.g. "prop", "context", "child context" |
| 291 |
* @param {string} componentName Name of the component for error messages. |
| 292 |
* @param {?Function} getStack Returns the component stack. |
| 293 |
* @private |
| 294 |
*/ |
| 295 |
function checkPropTypes(typeSpecs, values, location, componentName, getStack) { |
| 296 |
for (var typeSpecName in typeSpecs) if (has(typeSpecs, typeSpecName)) { |
| 297 |
var error; |
| 298 |
try { |
| 299 |
if (typeof typeSpecs[typeSpecName] !== "function") { |
| 300 |
var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); |
| 301 |
err.name = "Invariant Violation"; |
| 302 |
throw err; |
| 303 |
} |
| 304 |
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); |
| 305 |
} catch (ex) { |
| 306 |
error = ex; |
| 307 |
} |
| 308 |
if (error && !(error instanceof Error)) printWarning((componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."); |
| 309 |
if (error instanceof Error && !(error.message in loggedTypeFailures)) { |
| 310 |
loggedTypeFailures[error.message] = true; |
| 311 |
var stack = getStack ? getStack() : ""; |
| 312 |
printWarning("Failed " + location + " type: " + error.message + (stack != null ? stack : "")); |
| 313 |
} |
| 314 |
} |
| 315 |
} |
| 316 |
/** |
| 317 |
* Resets warning cache when testing. |
| 318 |
* |
| 319 |
* @private |
| 320 |
*/ |
| 321 |
checkPropTypes.resetWarningCache = function() { |
| 322 |
loggedTypeFailures = {}; |
| 323 |
}; |
| 324 |
module.exports = checkPropTypes; |
| 325 |
})); |
| 326 |
|
| 327 |
//#endregion |
| 328 |
//#region node_modules/prop-types/factoryWithTypeCheckers.js |
| 329 |
/** |
| 330 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 331 |
* |
| 332 |
* This source code is licensed under the MIT license found in the |
| 333 |
* LICENSE file in the root directory of this source tree. |
| 334 |
*/ |
| 335 |
var require_factoryWithTypeCheckers = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 336 |
var ReactIs = require_react_is(); |
| 337 |
var assign = require_object_assign(); |
| 338 |
var ReactPropTypesSecret = require_ReactPropTypesSecret(); |
| 339 |
var has = require_has(); |
| 340 |
var checkPropTypes = require_checkPropTypes(); |
| 341 |
var printWarning = function() {}; |
| 342 |
printWarning = function(text) { |
| 343 |
var message = "Warning: " + text; |
| 344 |
if (typeof console !== "undefined") console.error(message); |
| 345 |
try { |
| 346 |
throw new Error(message); |
| 347 |
} catch (x) {} |
| 348 |
}; |
| 349 |
function emptyFunctionThatReturnsNull() { |
| 350 |
return null; |
| 351 |
} |
| 352 |
module.exports = function(isValidElement, throwOnDirectAccess) { |
| 353 |
var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator; |
| 354 |
var FAUX_ITERATOR_SYMBOL = "@@iterator"; |
| 355 |
/** |
| 356 |
* Returns the iterator method function contained on the iterable object. |
| 357 |
* |
| 358 |
* Be sure to invoke the function with the iterable as context: |
| 359 |
* |
| 360 |
* var iteratorFn = getIteratorFn(myIterable); |
| 361 |
* if (iteratorFn) { |
| 362 |
* var iterator = iteratorFn.call(myIterable); |
| 363 |
* ... |
| 364 |
* } |
| 365 |
* |
| 366 |
* @param {?object} maybeIterable |
| 367 |
* @return {?function} |
| 368 |
*/ |
| 369 |
function getIteratorFn(maybeIterable) { |
| 370 |
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); |
| 371 |
if (typeof iteratorFn === "function") return iteratorFn; |
| 372 |
} |
| 373 |
/** |
| 374 |
* Collection of methods that allow declaration and validation of props that are |
| 375 |
* supplied to React components. Example usage: |
| 376 |
* |
| 377 |
* var Props = require('ReactPropTypes'); |
| 378 |
* var MyArticle = React.createClass({ |
| 379 |
* propTypes: { |
| 380 |
* // An optional string prop named "description". |
| 381 |
* description: Props.string, |
| 382 |
* |
| 383 |
* // A required enum prop named "category". |
| 384 |
* category: Props.oneOf(['News','Photos']).isRequired, |
| 385 |
* |
| 386 |
* // A prop named "dialog" that requires an instance of Dialog. |
| 387 |
* dialog: Props.instanceOf(Dialog).isRequired |
| 388 |
* }, |
| 389 |
* render: function() { ... } |
| 390 |
* }); |
| 391 |
* |
| 392 |
* A more formal specification of how these methods are used: |
| 393 |
* |
| 394 |
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) |
| 395 |
* decl := ReactPropTypes.{type}(.isRequired)? |
| 396 |
* |
| 397 |
* Each and every declaration produces a function with the same signature. This |
| 398 |
* allows the creation of custom validation functions. For example: |
| 399 |
* |
| 400 |
* var MyLink = React.createClass({ |
| 401 |
* propTypes: { |
| 402 |
* // An optional string or URI prop named "href". |
| 403 |
* href: function(props, propName, componentName) { |
| 404 |
* var propValue = props[propName]; |
| 405 |
* if (propValue != null && typeof propValue !== 'string' && |
| 406 |
* !(propValue instanceof URI)) { |
| 407 |
* return new Error( |
| 408 |
* 'Expected a string or an URI for ' + propName + ' in ' + |
| 409 |
* componentName |
| 410 |
* ); |
| 411 |
* } |
| 412 |
* } |
| 413 |
* }, |
| 414 |
* render: function() {...} |
| 415 |
* }); |
| 416 |
* |
| 417 |
* @internal |
| 418 |
*/ |
| 419 |
var ANONYMOUS = "<<anonymous>>"; |
| 420 |
var ReactPropTypes = { |
| 421 |
array: createPrimitiveTypeChecker("array"), |
| 422 |
bigint: createPrimitiveTypeChecker("bigint"), |
| 423 |
bool: createPrimitiveTypeChecker("boolean"), |
| 424 |
func: createPrimitiveTypeChecker("function"), |
| 425 |
number: createPrimitiveTypeChecker("number"), |
| 426 |
object: createPrimitiveTypeChecker("object"), |
| 427 |
string: createPrimitiveTypeChecker("string"), |
| 428 |
symbol: createPrimitiveTypeChecker("symbol"), |
| 429 |
any: createAnyTypeChecker(), |
| 430 |
arrayOf: createArrayOfTypeChecker, |
| 431 |
element: createElementTypeChecker(), |
| 432 |
elementType: createElementTypeTypeChecker(), |
| 433 |
instanceOf: createInstanceTypeChecker, |
| 434 |
node: createNodeChecker(), |
| 435 |
objectOf: createObjectOfTypeChecker, |
| 436 |
oneOf: createEnumTypeChecker, |
| 437 |
oneOfType: createUnionTypeChecker, |
| 438 |
shape: createShapeTypeChecker, |
| 439 |
exact: createStrictShapeTypeChecker |
| 440 |
}; |
| 441 |
/** |
| 442 |
* inlined Object.is polyfill to avoid requiring consumers ship their own |
| 443 |
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is |
| 444 |
*/ |
| 445 |
function is(x, y) { |
| 446 |
if (x === y) return x !== 0 || 1 / x === 1 / y; |
| 447 |
else return x !== x && y !== y; |
| 448 |
} |
| 449 |
/** |
| 450 |
* We use an Error-like object for backward compatibility as people may call |
| 451 |
* PropTypes directly and inspect their output. However, we don't use real |
| 452 |
* Errors anymore. We don't inspect their stack anyway, and creating them |
| 453 |
* is prohibitively expensive if they are created too often, such as what |
| 454 |
* happens in oneOfType() for any type before the one that matched. |
| 455 |
*/ |
| 456 |
function PropTypeError(message, data) { |
| 457 |
this.message = message; |
| 458 |
this.data = data && typeof data === "object" ? data : {}; |
| 459 |
this.stack = ""; |
| 460 |
} |
| 461 |
PropTypeError.prototype = Error.prototype; |
| 462 |
function createChainableTypeChecker(validate) { |
| 463 |
var manualPropTypeCallCache = {}; |
| 464 |
var manualPropTypeWarningCount = 0; |
| 465 |
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { |
| 466 |
componentName = componentName || ANONYMOUS; |
| 467 |
propFullName = propFullName || propName; |
| 468 |
if (secret !== ReactPropTypesSecret) { |
| 469 |
if (throwOnDirectAccess) { |
| 470 |
var err = /* @__PURE__ */ new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"); |
| 471 |
err.name = "Invariant Violation"; |
| 472 |
throw err; |
| 473 |
} else if (typeof console !== "undefined") { |
| 474 |
var cacheKey = componentName + ":" + propName; |
| 475 |
if (!manualPropTypeCallCache[cacheKey] && manualPropTypeWarningCount < 3) { |
| 476 |
printWarning("You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."); |
| 477 |
manualPropTypeCallCache[cacheKey] = true; |
| 478 |
manualPropTypeWarningCount++; |
| 479 |
} |
| 480 |
} |
| 481 |
} |
| 482 |
if (props[propName] == null) { |
| 483 |
if (isRequired) { |
| 484 |
if (props[propName] === null) return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`.")); |
| 485 |
return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`.")); |
| 486 |
} |
| 487 |
return null; |
| 488 |
} else return validate(props, propName, componentName, location, propFullName); |
| 489 |
} |
| 490 |
var chainedCheckType = checkType.bind(null, false); |
| 491 |
chainedCheckType.isRequired = checkType.bind(null, true); |
| 492 |
return chainedCheckType; |
| 493 |
} |
| 494 |
function createPrimitiveTypeChecker(expectedType) { |
| 495 |
function validate(props, propName, componentName, location, propFullName, secret) { |
| 496 |
var propValue = props[propName]; |
| 497 |
if (getPropType(propValue) !== expectedType) { |
| 498 |
var preciseType = getPreciseType(propValue); |
| 499 |
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."), { expectedType }); |
| 500 |
} |
| 501 |
return null; |
| 502 |
} |
| 503 |
return createChainableTypeChecker(validate); |
| 504 |
} |
| 505 |
function createAnyTypeChecker() { |
| 506 |
return createChainableTypeChecker(emptyFunctionThatReturnsNull); |
| 507 |
} |
| 508 |
function createArrayOfTypeChecker(typeChecker) { |
| 509 |
function validate(props, propName, componentName, location, propFullName) { |
| 510 |
if (typeof typeChecker !== "function") return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf."); |
| 511 |
var propValue = props[propName]; |
| 512 |
if (!Array.isArray(propValue)) { |
| 513 |
var propType = getPropType(propValue); |
| 514 |
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array.")); |
| 515 |
} |
| 516 |
for (var i = 0; i < propValue.length; i++) { |
| 517 |
var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret); |
| 518 |
if (error instanceof Error) return error; |
| 519 |
} |
| 520 |
return null; |
| 521 |
} |
| 522 |
return createChainableTypeChecker(validate); |
| 523 |
} |
| 524 |
function createElementTypeChecker() { |
| 525 |
function validate(props, propName, componentName, location, propFullName) { |
| 526 |
var propValue = props[propName]; |
| 527 |
if (!isValidElement(propValue)) { |
| 528 |
var propType = getPropType(propValue); |
| 529 |
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement.")); |
| 530 |
} |
| 531 |
return null; |
| 532 |
} |
| 533 |
return createChainableTypeChecker(validate); |
| 534 |
} |
| 535 |
function createElementTypeTypeChecker() { |
| 536 |
function validate(props, propName, componentName, location, propFullName) { |
| 537 |
var propValue = props[propName]; |
| 538 |
if (!ReactIs.isValidElementType(propValue)) { |
| 539 |
var propType = getPropType(propValue); |
| 540 |
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type.")); |
| 541 |
} |
| 542 |
return null; |
| 543 |
} |
| 544 |
return createChainableTypeChecker(validate); |
| 545 |
} |
| 546 |
function createInstanceTypeChecker(expectedClass) { |
| 547 |
function validate(props, propName, componentName, location, propFullName) { |
| 548 |
if (!(props[propName] instanceof expectedClass)) { |
| 549 |
var expectedClassName = expectedClass.name || ANONYMOUS; |
| 550 |
var actualClassName = getClassName(props[propName]); |
| 551 |
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`.")); |
| 552 |
} |
| 553 |
return null; |
| 554 |
} |
| 555 |
return createChainableTypeChecker(validate); |
| 556 |
} |
| 557 |
function createEnumTypeChecker(expectedValues) { |
| 558 |
if (!Array.isArray(expectedValues)) { |
| 559 |
if (arguments.length > 1) printWarning("Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."); |
| 560 |
else printWarning("Invalid argument supplied to oneOf, expected an array."); |
| 561 |
return emptyFunctionThatReturnsNull; |
| 562 |
} |
| 563 |
function validate(props, propName, componentName, location, propFullName) { |
| 564 |
var propValue = props[propName]; |
| 565 |
for (var i = 0; i < expectedValues.length; i++) if (is(propValue, expectedValues[i])) return null; |
| 566 |
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { |
| 567 |
if (getPreciseType(value) === "symbol") return String(value); |
| 568 |
return value; |
| 569 |
}); |
| 570 |
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + ".")); |
| 571 |
} |
| 572 |
return createChainableTypeChecker(validate); |
| 573 |
} |
| 574 |
function createObjectOfTypeChecker(typeChecker) { |
| 575 |
function validate(props, propName, componentName, location, propFullName) { |
| 576 |
if (typeof typeChecker !== "function") return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf."); |
| 577 |
var propValue = props[propName]; |
| 578 |
var propType = getPropType(propValue); |
| 579 |
if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object.")); |
| 580 |
for (var key in propValue) if (has(propValue, key)) { |
| 581 |
var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret); |
| 582 |
if (error instanceof Error) return error; |
| 583 |
} |
| 584 |
return null; |
| 585 |
} |
| 586 |
return createChainableTypeChecker(validate); |
| 587 |
} |
| 588 |
function createUnionTypeChecker(arrayOfTypeCheckers) { |
| 589 |
if (!Array.isArray(arrayOfTypeCheckers)) { |
| 590 |
printWarning("Invalid argument supplied to oneOfType, expected an instance of array."); |
| 591 |
return emptyFunctionThatReturnsNull; |
| 592 |
} |
| 593 |
for (var i = 0; i < arrayOfTypeCheckers.length; i++) { |
| 594 |
var checker = arrayOfTypeCheckers[i]; |
| 595 |
if (typeof checker !== "function") { |
| 596 |
printWarning("Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."); |
| 597 |
return emptyFunctionThatReturnsNull; |
| 598 |
} |
| 599 |
} |
| 600 |
function validate(props, propName, componentName, location, propFullName) { |
| 601 |
var expectedTypes = []; |
| 602 |
for (var i = 0; i < arrayOfTypeCheckers.length; i++) { |
| 603 |
var checker = arrayOfTypeCheckers[i]; |
| 604 |
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret); |
| 605 |
if (checkerResult == null) return null; |
| 606 |
if (checkerResult.data && has(checkerResult.data, "expectedType")) expectedTypes.push(checkerResult.data.expectedType); |
| 607 |
} |
| 608 |
var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : ""; |
| 609 |
return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + ".")); |
| 610 |
} |
| 611 |
return createChainableTypeChecker(validate); |
| 612 |
} |
| 613 |
function createNodeChecker() { |
| 614 |
function validate(props, propName, componentName, location, propFullName) { |
| 615 |
if (!isNode(props[propName])) return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode.")); |
| 616 |
return null; |
| 617 |
} |
| 618 |
return createChainableTypeChecker(validate); |
| 619 |
} |
| 620 |
function invalidValidatorError(componentName, location, propFullName, key, type) { |
| 621 |
return new PropTypeError((componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."); |
| 622 |
} |
| 623 |
function createShapeTypeChecker(shapeTypes) { |
| 624 |
function validate(props, propName, componentName, location, propFullName) { |
| 625 |
var propValue = props[propName]; |
| 626 |
var propType = getPropType(propValue); |
| 627 |
if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`.")); |
| 628 |
for (var key in shapeTypes) { |
| 629 |
var checker = shapeTypes[key]; |
| 630 |
if (typeof checker !== "function") return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); |
| 631 |
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret); |
| 632 |
if (error) return error; |
| 633 |
} |
| 634 |
return null; |
| 635 |
} |
| 636 |
return createChainableTypeChecker(validate); |
| 637 |
} |
| 638 |
function createStrictShapeTypeChecker(shapeTypes) { |
| 639 |
function validate(props, propName, componentName, location, propFullName) { |
| 640 |
var propValue = props[propName]; |
| 641 |
var propType = getPropType(propValue); |
| 642 |
if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`.")); |
| 643 |
for (var key in assign({}, props[propName], shapeTypes)) { |
| 644 |
var checker = shapeTypes[key]; |
| 645 |
if (has(shapeTypes, key) && typeof checker !== "function") return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); |
| 646 |
if (!checker) return new PropTypeError("Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")); |
| 647 |
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret); |
| 648 |
if (error) return error; |
| 649 |
} |
| 650 |
return null; |
| 651 |
} |
| 652 |
return createChainableTypeChecker(validate); |
| 653 |
} |
| 654 |
function isNode(propValue) { |
| 655 |
switch (typeof propValue) { |
| 656 |
case "number": |
| 657 |
case "string": |
| 658 |
case "undefined": return true; |
| 659 |
case "boolean": return !propValue; |
| 660 |
case "object": |
| 661 |
if (Array.isArray(propValue)) return propValue.every(isNode); |
| 662 |
if (propValue === null || isValidElement(propValue)) return true; |
| 663 |
var iteratorFn = getIteratorFn(propValue); |
| 664 |
if (iteratorFn) { |
| 665 |
var iterator = iteratorFn.call(propValue); |
| 666 |
var step; |
| 667 |
if (iteratorFn !== propValue.entries) { |
| 668 |
while (!(step = iterator.next()).done) if (!isNode(step.value)) return false; |
| 669 |
} else while (!(step = iterator.next()).done) { |
| 670 |
var entry = step.value; |
| 671 |
if (entry) { |
| 672 |
if (!isNode(entry[1])) return false; |
| 673 |
} |
| 674 |
} |
| 675 |
} else return false; |
| 676 |
return true; |
| 677 |
default: return false; |
| 678 |
} |
| 679 |
} |
| 680 |
function isSymbol(propType, propValue) { |
| 681 |
if (propType === "symbol") return true; |
| 682 |
if (!propValue) return false; |
| 683 |
if (propValue["@@toStringTag"] === "Symbol") return true; |
| 684 |
if (typeof Symbol === "function" && propValue instanceof Symbol) return true; |
| 685 |
return false; |
| 686 |
} |
| 687 |
function getPropType(propValue) { |
| 688 |
var propType = typeof propValue; |
| 689 |
if (Array.isArray(propValue)) return "array"; |
| 690 |
if (propValue instanceof RegExp) return "object"; |
| 691 |
if (isSymbol(propType, propValue)) return "symbol"; |
| 692 |
return propType; |
| 693 |
} |
| 694 |
function getPreciseType(propValue) { |
| 695 |
if (typeof propValue === "undefined" || propValue === null) return "" + propValue; |
| 696 |
var propType = getPropType(propValue); |
| 697 |
if (propType === "object") { |
| 698 |
if (propValue instanceof Date) return "date"; |
| 699 |
else if (propValue instanceof RegExp) return "regexp"; |
| 700 |
} |
| 701 |
return propType; |
| 702 |
} |
| 703 |
function getPostfixForTypeWarning(value) { |
| 704 |
var type = getPreciseType(value); |
| 705 |
switch (type) { |
| 706 |
case "array": |
| 707 |
case "object": return "an " + type; |
| 708 |
case "boolean": |
| 709 |
case "date": |
| 710 |
case "regexp": return "a " + type; |
| 711 |
default: return type; |
| 712 |
} |
| 713 |
} |
| 714 |
function getClassName(propValue) { |
| 715 |
if (!propValue.constructor || !propValue.constructor.name) return ANONYMOUS; |
| 716 |
return propValue.constructor.name; |
| 717 |
} |
| 718 |
ReactPropTypes.checkPropTypes = checkPropTypes; |
| 719 |
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; |
| 720 |
ReactPropTypes.PropTypes = ReactPropTypes; |
| 721 |
return ReactPropTypes; |
| 722 |
}; |
| 723 |
})); |
| 724 |
|
| 725 |
//#endregion |
| 726 |
//#region node_modules/prop-types/index.js |
| 727 |
var require_prop_types = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 728 |
var ReactIs = require_react_is(); |
| 729 |
var throwOnDirectAccess = true; |
| 730 |
module.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess); |
| 731 |
})); |
| 732 |
|
| 733 |
//#endregion |
| 734 |
//#region node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js |
| 735 |
var import_prop_types = /* @__PURE__ */ __toESM(require_prop_types()); |
| 736 |
function _arrayWithHoles(r) { |
| 737 |
if (Array.isArray(r)) return r; |
| 738 |
} |
| 739 |
|
| 740 |
//#endregion |
| 741 |
//#region node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js |
| 742 |
function _iterableToArrayLimit(r, l) { |
| 743 |
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; |
| 744 |
if (null != t) { |
| 745 |
var e; |
| 746 |
var n; |
| 747 |
var i; |
| 748 |
var u; |
| 749 |
var a = []; |
| 750 |
var f = !0; |
| 751 |
var o = !1; |
| 752 |
try { |
| 753 |
if (i = (t = t.call(r)).next, 0 === l) { |
| 754 |
if (Object(t) !== t) return; |
| 755 |
f = !1; |
| 756 |
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); |
| 757 |
} catch (r) { |
| 758 |
o = !0, n = r; |
| 759 |
} finally { |
| 760 |
try { |
| 761 |
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; |
| 762 |
} finally { |
| 763 |
if (o) throw n; |
| 764 |
} |
| 765 |
} |
| 766 |
return a; |
| 767 |
} |
| 768 |
} |
| 769 |
|
| 770 |
//#endregion |
| 771 |
//#region node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js |
| 772 |
function _arrayLikeToArray(r, a) { |
| 773 |
(null == a || a > r.length) && (a = r.length); |
| 774 |
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; |
| 775 |
return n; |
| 776 |
} |
| 777 |
|
| 778 |
//#endregion |
| 779 |
//#region node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js |
| 780 |
function _unsupportedIterableToArray(r, a) { |
| 781 |
if (r) { |
| 782 |
if ("string" == typeof r) return _arrayLikeToArray(r, a); |
| 783 |
var t = {}.toString.call(r).slice(8, -1); |
| 784 |
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; |
| 785 |
} |
| 786 |
} |
| 787 |
|
| 788 |
//#endregion |
| 789 |
//#region node_modules/@babel/runtime/helpers/esm/nonIterableRest.js |
| 790 |
function _nonIterableRest() { |
| 791 |
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 792 |
} |
| 793 |
|
| 794 |
//#endregion |
| 795 |
//#region node_modules/@babel/runtime/helpers/esm/slicedToArray.js |
| 796 |
function _slicedToArray(r, e) { |
| 797 |
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); |
| 798 |
} |
| 799 |
|
| 800 |
//#endregion |
| 801 |
//#region node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js |
| 802 |
function _arrayWithoutHoles(r) { |
| 803 |
if (Array.isArray(r)) return _arrayLikeToArray(r); |
| 804 |
} |
| 805 |
|
| 806 |
//#endregion |
| 807 |
//#region node_modules/@babel/runtime/helpers/esm/iterableToArray.js |
| 808 |
function _iterableToArray(r) { |
| 809 |
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); |
| 810 |
} |
| 811 |
|
| 812 |
//#endregion |
| 813 |
//#region node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js |
| 814 |
function _nonIterableSpread() { |
| 815 |
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 816 |
} |
| 817 |
|
| 818 |
//#endregion |
| 819 |
//#region node_modules/@babel/runtime/helpers/esm/toConsumableArray.js |
| 820 |
function _toConsumableArray(r) { |
| 821 |
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); |
| 822 |
} |
| 823 |
|
| 824 |
//#endregion |
| 825 |
//#region node_modules/@babel/runtime/helpers/esm/extends.js |
| 826 |
function _extends() { |
| 827 |
return _extends = Object.assign ? Object.assign.bind() : function(n) { |
| 828 |
for (var e = 1; e < arguments.length; e++) { |
| 829 |
var t = arguments[e]; |
| 830 |
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); |
| 831 |
} |
| 832 |
return n; |
| 833 |
}, _extends.apply(null, arguments); |
| 834 |
} |
| 835 |
|
| 836 |
//#endregion |
| 837 |
//#region modules/notifications/assets/js/icons/x-icon.js |
| 838 |
var XIcon = (0, react.forwardRef)(function(props, ref) { |
| 839 |
return /*#__PURE__*/ react.default.createElement(_elementor_ui.SvgIcon, _extends({ viewBox: "0 0 24 24" }, props, { ref }), /*#__PURE__*/ react.default.createElement("path", { |
| 840 |
fillRule: "evenodd", |
| 841 |
clipRule: "evenodd", |
| 842 |
d: "M18.5303 5.46967C18.8232 5.76256 18.8232 6.23744 18.5303 6.53033L6.53033 18.5303C6.23744 18.8232 5.76256 18.8232 5.46967 18.5303C5.17678 18.2374 5.17678 17.7626 5.46967 17.4697L17.4697 5.46967C17.7626 5.17678 18.2374 5.17678 18.5303 5.46967Z" |
| 843 |
}), /*#__PURE__*/ react.default.createElement("path", { |
| 844 |
fillRule: "evenodd", |
| 845 |
clipRule: "evenodd", |
| 846 |
d: "M5.46967 5.46967C5.76256 5.17678 6.23744 5.17678 6.53033 5.46967L18.5303 17.4697C18.8232 17.7626 18.8232 18.2374 18.5303 18.5303C18.2374 18.8232 17.7626 18.8232 17.4697 18.5303L5.46967 6.53033C5.17678 6.23744 5.17678 5.76256 5.46967 5.46967Z" |
| 847 |
})); |
| 848 |
}); |
| 849 |
|
| 850 |
//#endregion |
| 851 |
//#region modules/notifications/assets/js/components/whats-new-top-bar.js |
| 852 |
var WhatsNewTopBar = function WhatsNewTopBar(props) { |
| 853 |
var setIsOpen = props.setIsOpen; |
| 854 |
return /*#__PURE__*/ react.default.createElement(react.default.Fragment, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.AppBar, { |
| 855 |
elevation: 0, |
| 856 |
position: "sticky", |
| 857 |
sx: { backgroundColor: "background.default" } |
| 858 |
}, /*#__PURE__*/ react.default.createElement(_elementor_ui.Toolbar, { variant: "dense" }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { |
| 859 |
variant: "overline", |
| 860 |
sx: { flexGrow: 1 } |
| 861 |
}, (0, _wordpress_i18n.__)("What's New", "elementor")), /*#__PURE__*/ react.default.createElement(_elementor_ui.IconButton, { |
| 862 |
"aria-label": "close", |
| 863 |
size: "small", |
| 864 |
onClick: function onClick() { |
| 865 |
return setIsOpen(false); |
| 866 |
} |
| 867 |
}, /*#__PURE__*/ react.default.createElement(XIcon, null)))), /*#__PURE__*/ react.default.createElement(_elementor_ui.Divider, null)); |
| 868 |
}; |
| 869 |
WhatsNewTopBar.propTypes = { setIsOpen: import_prop_types.default.func.isRequired }; |
| 870 |
|
| 871 |
//#endregion |
| 872 |
//#region modules/notifications/assets/js/api/index.js |
| 873 |
var request = function request(endpoint) { |
| 874 |
var data = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; |
| 875 |
return new Promise(function(resolve, reject) { |
| 876 |
elementorCommon.ajax.addRequest(endpoint, { |
| 877 |
success: resolve, |
| 878 |
error: reject, |
| 879 |
data |
| 880 |
}); |
| 881 |
}); |
| 882 |
}; |
| 883 |
var getNotifications = function getNotifications() { |
| 884 |
return request("notifications_get"); |
| 885 |
}; |
| 886 |
|
| 887 |
//#endregion |
| 888 |
//#region node_modules/@babel/runtime/helpers/esm/typeof.js |
| 889 |
function _typeof(o) { |
| 890 |
"@babel/helpers - typeof"; |
| 891 |
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { |
| 892 |
return typeof o; |
| 893 |
} : function(o) { |
| 894 |
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; |
| 895 |
}, _typeof(o); |
| 896 |
} |
| 897 |
|
| 898 |
//#endregion |
| 899 |
//#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js |
| 900 |
function toPrimitive(t, r) { |
| 901 |
if ("object" != _typeof(t) || !t) return t; |
| 902 |
var e = t[Symbol.toPrimitive]; |
| 903 |
if (void 0 !== e) { |
| 904 |
var i = e.call(t, r || "default"); |
| 905 |
if ("object" != _typeof(i)) return i; |
| 906 |
throw new TypeError("@@toPrimitive must return a primitive value."); |
| 907 |
} |
| 908 |
return ("string" === r ? String : Number)(t); |
| 909 |
} |
| 910 |
|
| 911 |
//#endregion |
| 912 |
//#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js |
| 913 |
function toPropertyKey(t) { |
| 914 |
var i = toPrimitive(t, "string"); |
| 915 |
return "symbol" == _typeof(i) ? i : i + ""; |
| 916 |
} |
| 917 |
|
| 918 |
//#endregion |
| 919 |
//#region node_modules/@babel/runtime/helpers/esm/defineProperty.js |
| 920 |
function _defineProperty(e, r, t) { |
| 921 |
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { |
| 922 |
value: t, |
| 923 |
enumerable: !0, |
| 924 |
configurable: !0, |
| 925 |
writable: !0 |
| 926 |
}) : e[r] = t, e; |
| 927 |
} |
| 928 |
|
| 929 |
//#endregion |
| 930 |
//#region modules/notifications/assets/js/components/whats-new-item-topic-line.js |
| 931 |
var WhatsNewItemTopicLine = function WhatsNewItemTopicLine(_ref) { |
| 932 |
var topic = _ref.topic; |
| 933 |
var date = _ref.date; |
| 934 |
return /*#__PURE__*/ react.default.createElement(_elementor_ui.Stack, { |
| 935 |
direction: "row", |
| 936 |
divider: /*#__PURE__*/ react.default.createElement(_elementor_ui.Divider, { |
| 937 |
orientation: "vertical", |
| 938 |
flexItem: true |
| 939 |
}), |
| 940 |
spacing: 1, |
| 941 |
color: "text.tertiary", |
| 942 |
sx: { pb: 1 } |
| 943 |
}, topic && /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, null, topic), date && /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, null, date)); |
| 944 |
}; |
| 945 |
WhatsNewItemTopicLine.propTypes = { |
| 946 |
topic: import_prop_types.default.string, |
| 947 |
date: import_prop_types.default.string |
| 948 |
}; |
| 949 |
|
| 950 |
//#endregion |
| 951 |
//#region modules/notifications/assets/js/components/wrapper-with-link.js |
| 952 |
var WrapperWithLink = function WrapperWithLink(props) { |
| 953 |
var link = props.link; |
| 954 |
var children = props.children; |
| 955 |
if (!link) return children; |
| 956 |
return /*#__PURE__*/ react.default.createElement(_elementor_ui.Link, { |
| 957 |
href: link, |
| 958 |
target: "_blank", |
| 959 |
underline: "none", |
| 960 |
color: "inherit", |
| 961 |
sx: { "&:hover": { color: "inherit" } } |
| 962 |
}, children); |
| 963 |
}; |
| 964 |
WrapperWithLink.propTypes = { |
| 965 |
link: import_prop_types.default.string, |
| 966 |
children: import_prop_types.default.any.isRequired |
| 967 |
}; |
| 968 |
|
| 969 |
//#endregion |
| 970 |
//#region modules/notifications/assets/js/components/whats-new-item-thumbnail.js |
| 971 |
var WhatsNewItemThumbnail = function WhatsNewItemThumbnail(_ref) { |
| 972 |
var imageSrc = _ref.imageSrc; |
| 973 |
var title = _ref.title; |
| 974 |
var link = _ref.link; |
| 975 |
return /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { pb: 2 } }, /*#__PURE__*/ react.default.createElement(WrapperWithLink, { link }, /*#__PURE__*/ react.default.createElement("img", { |
| 976 |
src: imageSrc, |
| 977 |
alt: title || "", |
| 978 |
style: { maxWidth: "100%" } |
| 979 |
}))); |
| 980 |
}; |
| 981 |
WhatsNewItemThumbnail.propTypes = { |
| 982 |
imageSrc: import_prop_types.default.string.isRequired, |
| 983 |
title: import_prop_types.default.string, |
| 984 |
link: import_prop_types.default.string |
| 985 |
}; |
| 986 |
|
| 987 |
//#endregion |
| 988 |
//#region modules/notifications/assets/js/components/whats-new-item-media.js |
| 989 |
var WhatsNewItemMedia = function WhatsNewItemMedia(_ref) { |
| 990 |
var item = _ref.item; |
| 991 |
if (item.youtubeEmbedId) { |
| 992 |
var videoId = item.youtubeEmbedId.split("?")[0]; |
| 993 |
var src = "https://www.youtube.com/embed/".concat(videoId).concat(item.youtubeAutoplay ? "?autoplay=1&mute=1" : ""); |
| 994 |
var allow = "encrypted-media; picture-in-picture".concat(item.youtubeAutoplay ? "; autoplay" : ""); |
| 995 |
return /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { pb: 2 } }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { |
| 996 |
component: "iframe", |
| 997 |
src, |
| 998 |
title: item.title || "Video", |
| 999 |
allow, |
| 1000 |
allowFullScreen: true, |
| 1001 |
sx: { |
| 1002 |
aspectRatio: "16/9", |
| 1003 |
width: "100%", |
| 1004 |
display: "block", |
| 1005 |
border: "none" |
| 1006 |
} |
| 1007 |
})); |
| 1008 |
} |
| 1009 |
var mediaSrc = item.gifSrc || item.imageSrc; |
| 1010 |
if (!mediaSrc) return null; |
| 1011 |
return /*#__PURE__*/ react.default.createElement(WhatsNewItemThumbnail, { |
| 1012 |
imageSrc: mediaSrc, |
| 1013 |
link: item.link, |
| 1014 |
title: item.title |
| 1015 |
}); |
| 1016 |
}; |
| 1017 |
|
| 1018 |
//#endregion |
| 1019 |
//#region modules/notifications/assets/js/components/whats-new-item-chips.js |
| 1020 |
var WhatsNewItemChips = function WhatsNewItemChips(_ref) { |
| 1021 |
var chipPlan = _ref.chipPlan; |
| 1022 |
var chipTags = _ref.chipTags; |
| 1023 |
var itemIndex = _ref.itemIndex; |
| 1024 |
var chips = []; |
| 1025 |
if (chipPlan) chips.push({ |
| 1026 |
color: "promotion", |
| 1027 |
size: "small", |
| 1028 |
label: chipPlan |
| 1029 |
}); |
| 1030 |
if (chipTags) chipTags.forEach(function(chipTag) { |
| 1031 |
chips.push({ |
| 1032 |
variant: "outlined", |
| 1033 |
size: "small", |
| 1034 |
label: chipTag |
| 1035 |
}); |
| 1036 |
}); |
| 1037 |
if (!chips.length) return null; |
| 1038 |
return /*#__PURE__*/ react.default.createElement(_elementor_ui.Stack, { |
| 1039 |
direction: "row", |
| 1040 |
flexWrap: "wrap", |
| 1041 |
gap: 1, |
| 1042 |
sx: { pb: 1 } |
| 1043 |
}, chips.map(function(chip, chipIndex) { |
| 1044 |
return /*#__PURE__*/ react.default.createElement(_elementor_ui.Chip, _extends({ key: "chip-".concat(itemIndex).concat(chipIndex) }, chip)); |
| 1045 |
})); |
| 1046 |
}; |
| 1047 |
WhatsNewItemChips.propTypes = { |
| 1048 |
chipPlan: import_prop_types.default.string, |
| 1049 |
chipTags: import_prop_types.default.array, |
| 1050 |
itemIndex: import_prop_types.default.number.isRequired |
| 1051 |
}; |
| 1052 |
|
| 1053 |
//#endregion |
| 1054 |
//#region modules/notifications/assets/js/components/is-image-only.js |
| 1055 |
var isImageOnly = function isImageOnly(item) { |
| 1056 |
return !item.title && !item.description && (item.imageSrc || item.gifSrc || item.youtubeEmbedId); |
| 1057 |
}; |
| 1058 |
|
| 1059 |
//#endregion |
| 1060 |
//#region modules/notifications/assets/js/components/whats-new-item.js |
| 1061 |
function ownKeys(e, r) { |
| 1062 |
var t = Object.keys(e); |
| 1063 |
if (Object.getOwnPropertySymbols) { |
| 1064 |
var o = Object.getOwnPropertySymbols(e); |
| 1065 |
r && (o = o.filter(function(r) { |
| 1066 |
return Object.getOwnPropertyDescriptor(e, r).enumerable; |
| 1067 |
})), t.push.apply(t, o); |
| 1068 |
} |
| 1069 |
return t; |
| 1070 |
} |
| 1071 |
function _objectSpread(e) { |
| 1072 |
for (var r = 1; r < arguments.length; r++) { |
| 1073 |
var t = null != arguments[r] ? arguments[r] : {}; |
| 1074 |
r % 2 ? ownKeys(Object(t), !0).forEach(function(r) { |
| 1075 |
_defineProperty(e, r, t[r]); |
| 1076 |
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) { |
| 1077 |
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); |
| 1078 |
}); |
| 1079 |
} |
| 1080 |
return e; |
| 1081 |
} |
| 1082 |
var WhatsNewItem = function WhatsNewItem(_ref) { |
| 1083 |
var item = _ref.item; |
| 1084 |
var itemIndex = _ref.itemIndex; |
| 1085 |
var itemsLength = _ref.itemsLength; |
| 1086 |
var setIsOpen = _ref.setIsOpen; |
| 1087 |
var _ref$featured = _ref.featured; |
| 1088 |
var featured = _ref$featured === void 0 ? false : _ref$featured; |
| 1089 |
var hasMedia = item.imageSrc || item.gifSrc || item.youtubeEmbedId; |
| 1090 |
if (isImageOnly(item)) return /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { |
| 1091 |
key: itemIndex, |
| 1092 |
display: "flex", |
| 1093 |
flexDirection: "column", |
| 1094 |
sx: _objectSpread({ pt: 2 }, featured && { px: 1 }) |
| 1095 |
}, /*#__PURE__*/ react.default.createElement(WhatsNewItemMedia, { item }), itemIndex !== itemsLength - 1 && /*#__PURE__*/ react.default.createElement(_elementor_ui.Divider, { sx: { my: 1 } })); |
| 1096 |
return /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { |
| 1097 |
key: itemIndex, |
| 1098 |
display: "flex", |
| 1099 |
flexDirection: "column", |
| 1100 |
sx: _objectSpread({ pt: 2 }, featured && { px: 1 }) |
| 1101 |
}, (item.topic || item.date) && /*#__PURE__*/ react.default.createElement(WhatsNewItemTopicLine, { |
| 1102 |
topic: item.topic, |
| 1103 |
date: item.date |
| 1104 |
}), /*#__PURE__*/ react.default.createElement(WrapperWithLink, { link: item.link }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { |
| 1105 |
variant: featured ? "h6" : "subtitle1", |
| 1106 |
sx: { pb: 2 } |
| 1107 |
}, item.title)), /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { position: "relative" } }, /*#__PURE__*/ react.default.createElement(WhatsNewItemMedia, { item }), featured && item.chipPlan && hasMedia && /*#__PURE__*/ react.default.createElement(_elementor_ui.Chip, { |
| 1108 |
label: item.chipPlan, |
| 1109 |
color: "promotion", |
| 1110 |
size: "small", |
| 1111 |
sx: { |
| 1112 |
position: "absolute", |
| 1113 |
top: 8, |
| 1114 |
insetInlineStart: 8 |
| 1115 |
} |
| 1116 |
})), /*#__PURE__*/ react.default.createElement(WhatsNewItemChips, { |
| 1117 |
chipPlan: featured && hasMedia ? null : item.chipPlan, |
| 1118 |
chipTags: item.chipTags, |
| 1119 |
itemIndex |
| 1120 |
}), item.description && /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { |
| 1121 |
variant: "body2", |
| 1122 |
color: "text.secondary", |
| 1123 |
sx: { pb: 2 } |
| 1124 |
}, item.description, item.readMoreText && /*#__PURE__*/ react.default.createElement(react.default.Fragment, null, " ", /*#__PURE__*/ react.default.createElement(_elementor_ui.Link, { |
| 1125 |
href: item.link, |
| 1126 |
color: "info.main", |
| 1127 |
target: "_blank" |
| 1128 |
}, item.readMoreText))), item.cta && item.ctaLink && /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { pb: 2 } }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Button, { |
| 1129 |
href: item.ctaLink, |
| 1130 |
target: item.ctaLink.startsWith("#") ? "_self" : "_blank", |
| 1131 |
variant: "contained", |
| 1132 |
size: "small", |
| 1133 |
color: "promotion", |
| 1134 |
onClick: item.ctaLink.startsWith("#") ? function() { |
| 1135 |
return setIsOpen(false); |
| 1136 |
} : void 0 |
| 1137 |
}, item.cta)), itemIndex !== itemsLength - 1 && /*#__PURE__*/ react.default.createElement(_elementor_ui.Divider, { sx: { my: 1 } })); |
| 1138 |
}; |
| 1139 |
WhatsNewItem.propTypes = { |
| 1140 |
item: import_prop_types.default.object.isRequired, |
| 1141 |
itemIndex: import_prop_types.default.number.isRequired, |
| 1142 |
itemsLength: import_prop_types.default.number.isRequired, |
| 1143 |
setIsOpen: import_prop_types.default.func.isRequired, |
| 1144 |
featured: import_prop_types.default.bool |
| 1145 |
}; |
| 1146 |
|
| 1147 |
//#endregion |
| 1148 |
//#region modules/notifications/assets/js/components/whats-new-item-collapsed.js |
| 1149 |
var WhatsNewItemCollapsed = function WhatsNewItemCollapsed(_ref) { |
| 1150 |
var item = _ref.item; |
| 1151 |
var itemIndex = _ref.itemIndex; |
| 1152 |
var isNew = _ref.isNew; |
| 1153 |
var onSeen = _ref.onSeen; |
| 1154 |
var setIsOpen = _ref.setIsOpen; |
| 1155 |
var _useState2 = _slicedToArray((0, react.useState)(false), 2); |
| 1156 |
var expanded = _useState2[0]; |
| 1157 |
var setExpanded = _useState2[1]; |
| 1158 |
var handleToggle = function handleToggle() { |
| 1159 |
if (!expanded && isNew && onSeen) onSeen(item.id); |
| 1160 |
setExpanded(!expanded); |
| 1161 |
}; |
| 1162 |
return /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { |
| 1163 |
role: "button", |
| 1164 |
tabIndex: 0, |
| 1165 |
"aria-expanded": expanded, |
| 1166 |
onClick: handleToggle, |
| 1167 |
onKeyDown: function handleKeyDown(event) { |
| 1168 |
if ("Enter" === event.key || " " === event.key) { |
| 1169 |
event.preventDefault(); |
| 1170 |
handleToggle(); |
| 1171 |
} |
| 1172 |
}, |
| 1173 |
sx: { |
| 1174 |
position: "relative", |
| 1175 |
display: "flex", |
| 1176 |
alignItems: "flex-start", |
| 1177 |
gap: 1, |
| 1178 |
cursor: "pointer", |
| 1179 |
py: 2, |
| 1180 |
paddingInlineStart: 1 |
| 1181 |
} |
| 1182 |
}, /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { |
| 1183 |
component: "span", |
| 1184 |
sx: { |
| 1185 |
position: "absolute", |
| 1186 |
insetInlineStart: "-6px", |
| 1187 |
top: "23px", |
| 1188 |
width: 6, |
| 1189 |
height: 6, |
| 1190 |
borderRadius: "50%", |
| 1191 |
backgroundColor: "primary.main", |
| 1192 |
opacity: isNew ? 1 : 0, |
| 1193 |
transition: "opacity 0.2s ease", |
| 1194 |
pointerEvents: "none" |
| 1195 |
} |
| 1196 |
}), /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { |
| 1197 |
flex: 1, |
| 1198 |
minWidth: 0 |
| 1199 |
} }, item.topic && /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { |
| 1200 |
variant: "caption", |
| 1201 |
color: "text.tertiary", |
| 1202 |
display: "block" |
| 1203 |
}, item.topic), /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { |
| 1204 |
variant: "subtitle2", |
| 1205 |
noWrap: true |
| 1206 |
}, item.title), item.description && /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { |
| 1207 |
maxHeight: expanded ? 0 : "3em", |
| 1208 |
opacity: expanded ? 0 : 1, |
| 1209 |
overflow: "hidden", |
| 1210 |
transition: "max-height 0.2s ease, opacity 0.15s ease" |
| 1211 |
} }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { |
| 1212 |
variant: "caption", |
| 1213 |
color: "text.secondary", |
| 1214 |
sx: { |
| 1215 |
display: "-webkit-box", |
| 1216 |
WebkitLineClamp: 2, |
| 1217 |
WebkitBoxOrient: "vertical", |
| 1218 |
overflow: "hidden" |
| 1219 |
} |
| 1220 |
}, item.description))), /*#__PURE__*/ react.default.createElement(_elementor_icons.ChevronDownIcon, { sx: { |
| 1221 |
flexShrink: 0, |
| 1222 |
color: "secondary.main", |
| 1223 |
fontSize: "small", |
| 1224 |
mt: .25, |
| 1225 |
transform: expanded ? "rotate(180deg)" : "rotate(0deg)", |
| 1226 |
transition: "transform 0.2s" |
| 1227 |
} })), /*#__PURE__*/ react.default.createElement(_elementor_ui.Collapse, { in: expanded }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { |
| 1228 |
pb: 2, |
| 1229 |
paddingInlineStart: 1 |
| 1230 |
} }, /*#__PURE__*/ react.default.createElement(WhatsNewItemMedia, { item }), /*#__PURE__*/ react.default.createElement(WhatsNewItemChips, { |
| 1231 |
chipPlan: item.chipPlan, |
| 1232 |
chipTags: item.chipTags, |
| 1233 |
itemIndex |
| 1234 |
}), item.description && /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { |
| 1235 |
variant: "body2", |
| 1236 |
color: "text.secondary", |
| 1237 |
sx: { pb: 2 } |
| 1238 |
}, item.description, item.readMoreText && /*#__PURE__*/ react.default.createElement(react.default.Fragment, null, " ", /*#__PURE__*/ react.default.createElement(_elementor_ui.Link, { |
| 1239 |
href: item.link, |
| 1240 |
color: "info.main", |
| 1241 |
target: "_blank" |
| 1242 |
}, item.readMoreText))), item.cta && item.ctaLink && /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { pb: 2 } }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Button, { |
| 1243 |
href: item.ctaLink, |
| 1244 |
target: item.ctaLink.startsWith("#") ? "_self" : "_blank", |
| 1245 |
variant: "contained", |
| 1246 |
size: "small", |
| 1247 |
color: "promotion", |
| 1248 |
onClick: item.ctaLink.startsWith("#") ? function() { |
| 1249 |
return setIsOpen === null || setIsOpen === void 0 ? void 0 : setIsOpen(false); |
| 1250 |
} : void 0 |
| 1251 |
}, item.cta)))), /*#__PURE__*/ react.default.createElement(_elementor_ui.Divider, null)); |
| 1252 |
}; |
| 1253 |
WhatsNewItemCollapsed.propTypes = { |
| 1254 |
item: import_prop_types.default.object.isRequired, |
| 1255 |
itemIndex: import_prop_types.default.number.isRequired, |
| 1256 |
isNew: import_prop_types.default.bool, |
| 1257 |
onSeen: import_prop_types.default.func, |
| 1258 |
setIsOpen: import_prop_types.default.func |
| 1259 |
}; |
| 1260 |
|
| 1261 |
//#endregion |
| 1262 |
//#region modules/notifications/assets/js/components/whats-new-drawer-content.js |
| 1263 |
var WhatsNewDrawerContent = function WhatsNewDrawerContent(_ref) { |
| 1264 |
var _items$find$listLabel; |
| 1265 |
var _items$find; |
| 1266 |
var setIsOpen = _ref.setIsOpen; |
| 1267 |
var seenItemIds = _ref.seenItemIds; |
| 1268 |
var onSeen = _ref.onSeen; |
| 1269 |
var initialHasUnread = _ref.initialHasUnread; |
| 1270 |
var _useQuery = (0, _elementor_query.useQuery)({ |
| 1271 |
queryKey: ["e-notifications"], |
| 1272 |
queryFn: getNotifications |
| 1273 |
}); |
| 1274 |
var isPending = _useQuery.isPending; |
| 1275 |
var error = _useQuery.error; |
| 1276 |
var items = _useQuery.data; |
| 1277 |
var seenItemIdsRef = (0, react.useRef)(seenItemIds); |
| 1278 |
seenItemIdsRef.current = seenItemIds; |
| 1279 |
(0, react.useEffect)(function() { |
| 1280 |
if (!items) return; |
| 1281 |
(items.some(function(item) { |
| 1282 |
return item.featured; |
| 1283 |
}) ? items.filter(function(item) { |
| 1284 |
return item.featured; |
| 1285 |
}) : items).filter(function(item) { |
| 1286 |
return !seenItemIdsRef.current.has(item.id); |
| 1287 |
}).forEach(function(item) { |
| 1288 |
return onSeen(item.id); |
| 1289 |
}); |
| 1290 |
}, [items, onSeen]); |
| 1291 |
if (isPending) return /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.LinearProgress, { color: "secondary" })); |
| 1292 |
if (error) return /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, null, "An error has occurred: ", error); |
| 1293 |
var featuredItems = items.filter(function(item) { |
| 1294 |
return item.featured; |
| 1295 |
}); |
| 1296 |
var nonFeaturedItems = items.filter(function(item) { |
| 1297 |
return !item.featured && !isImageOnly(item); |
| 1298 |
}); |
| 1299 |
var listLabel = (_items$find$listLabel = (_items$find = items.find(function(item) { |
| 1300 |
return item.listLabel; |
| 1301 |
})) === null || _items$find === void 0 ? void 0 : _items$find.listLabel) !== null && _items$find$listLabel !== void 0 ? _items$find$listLabel : null; |
| 1302 |
return /*#__PURE__*/ react.default.createElement(react.default.Fragment, null, featuredItems.map(function(item, index) { |
| 1303 |
return /*#__PURE__*/ react.default.createElement(WhatsNewItem, { |
| 1304 |
key: item.id, |
| 1305 |
item, |
| 1306 |
itemIndex: index, |
| 1307 |
itemsLength: featuredItems.length, |
| 1308 |
setIsOpen, |
| 1309 |
featured: true |
| 1310 |
}); |
| 1311 |
}), featuredItems.length > 0 && nonFeaturedItems.length > 0 && /*#__PURE__*/ react.default.createElement(react.default.Fragment, null, listLabel ? /*#__PURE__*/ react.default.createElement(_elementor_ui.Divider, { sx: { my: 1.5 } }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { |
| 1312 |
variant: "caption", |
| 1313 |
color: "text.secondary", |
| 1314 |
sx: { |
| 1315 |
px: 1, |
| 1316 |
textTransform: "uppercase", |
| 1317 |
letterSpacing: "0.08em" |
| 1318 |
} |
| 1319 |
}, listLabel)) : /*#__PURE__*/ react.default.createElement(_elementor_ui.Divider, { sx: { my: 1.5 } }), nonFeaturedItems.map(function(item, index) { |
| 1320 |
return /*#__PURE__*/ react.default.createElement(WhatsNewItemCollapsed, { |
| 1321 |
key: item.id, |
| 1322 |
item, |
| 1323 |
itemIndex: index, |
| 1324 |
isNew: initialHasUnread && !seenItemIds.has(item.id), |
| 1325 |
onSeen, |
| 1326 |
setIsOpen |
| 1327 |
}); |
| 1328 |
})), 0 === featuredItems.length && nonFeaturedItems.map(function(item, itemIndex) { |
| 1329 |
return /*#__PURE__*/ react.default.createElement(WhatsNewItem, { |
| 1330 |
key: item.id, |
| 1331 |
item, |
| 1332 |
itemIndex, |
| 1333 |
itemsLength: nonFeaturedItems.length, |
| 1334 |
setIsOpen |
| 1335 |
}); |
| 1336 |
})); |
| 1337 |
}; |
| 1338 |
WhatsNewDrawerContent.propTypes = { |
| 1339 |
setIsOpen: import_prop_types.default.func.isRequired, |
| 1340 |
seenItemIds: import_prop_types.default.instanceOf(Set).isRequired, |
| 1341 |
onSeen: import_prop_types.default.func.isRequired, |
| 1342 |
initialHasUnread: import_prop_types.default.bool.isRequired |
| 1343 |
}; |
| 1344 |
|
| 1345 |
//#endregion |
| 1346 |
//#region modules/notifications/assets/js/components/whats-new.js |
| 1347 |
var _window$elementorNoti; |
| 1348 |
var _window$elementorNoti2; |
| 1349 |
var queryClient = new _elementor_query.QueryClient({ defaultOptions: { queries: { |
| 1350 |
refetchOnWindowFocus: false, |
| 1351 |
retry: false, |
| 1352 |
staleTime: 1e3 * 60 * 30 |
| 1353 |
} } }); |
| 1354 |
var initialHasUnread = ((_window$elementorNoti = (_window$elementorNoti2 = window.elementorNotifications) === null || _window$elementorNoti2 === void 0 ? void 0 : _window$elementorNoti2.unread_count) !== null && _window$elementorNoti !== void 0 ? _window$elementorNoti : 0) > 0; |
| 1355 |
var WhatsNew = function WhatsNew(props) { |
| 1356 |
var _window$elementor; |
| 1357 |
var _window$elementor$get; |
| 1358 |
var isOpen = props.isOpen; |
| 1359 |
var setIsOpen = props.setIsOpen; |
| 1360 |
var _props$setIsRead = props.setIsRead; |
| 1361 |
var setIsRead = _props$setIsRead === void 0 ? function() {} : _props$setIsRead; |
| 1362 |
var _props$anchorPosition = props.anchorPosition; |
| 1363 |
var anchorPosition = _props$anchorPosition === void 0 ? "right" : _props$anchorPosition; |
| 1364 |
var _useState2 = _slicedToArray((0, react.useState)(function() { |
| 1365 |
return /* @__PURE__ */ new Set(); |
| 1366 |
}), 2); |
| 1367 |
var seenItemIds = _useState2[0]; |
| 1368 |
var setSeenItemIds = _useState2[1]; |
| 1369 |
(0, react.useEffect)(function() { |
| 1370 |
if (!isOpen) return; |
| 1371 |
setIsRead(true); |
| 1372 |
}, [isOpen, setIsRead]); |
| 1373 |
var handleSeen = (0, react.useCallback)(function(itemId) { |
| 1374 |
setSeenItemIds(function(prev) { |
| 1375 |
if (prev.has(itemId)) return prev; |
| 1376 |
window.dispatchEvent(new CustomEvent("e-notification-item-seen")); |
| 1377 |
return new Set([].concat(_toConsumableArray(prev), [itemId])); |
| 1378 |
}); |
| 1379 |
}, []); |
| 1380 |
return /*#__PURE__*/ react.default.createElement(react.default.Fragment, null, /*#__PURE__*/ react.default.createElement(_elementor_query.QueryClientProvider, { client: queryClient }, /*#__PURE__*/ react.default.createElement(_elementor_ui.DirectionProvider, { rtl: elementorCommon.config.isRTL }, /*#__PURE__*/ react.default.createElement(_elementor_ui.ThemeProvider, { colorScheme: ((_window$elementor = window.elementor) === null || _window$elementor === void 0 || (_window$elementor$get = _window$elementor.getPreferences) === null || _window$elementor$get === void 0 ? void 0 : _window$elementor$get.call(_window$elementor, "ui_theme")) || "auto" }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Drawer, { |
| 1381 |
anchor: anchorPosition, |
| 1382 |
open: isOpen, |
| 1383 |
onClose: function onClose() { |
| 1384 |
return setIsOpen(false); |
| 1385 |
}, |
| 1386 |
BackdropProps: { invisible: true }, |
| 1387 |
ModalProps: { style: { zIndex: 999999 } } |
| 1388 |
}, /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { |
| 1389 |
sx: { |
| 1390 |
width: 360, |
| 1391 |
backgroundColor: "background.default" |
| 1392 |
}, |
| 1393 |
role: "presentation" |
| 1394 |
}, /*#__PURE__*/ react.default.createElement(WhatsNewTopBar, { setIsOpen }), /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { padding: "16px" } }, /*#__PURE__*/ react.default.createElement(WhatsNewDrawerContent, { |
| 1395 |
setIsOpen, |
| 1396 |
seenItemIds, |
| 1397 |
onSeen: handleSeen, |
| 1398 |
initialHasUnread |
| 1399 |
})))))))); |
| 1400 |
}; |
| 1401 |
WhatsNew.propTypes = { |
| 1402 |
isOpen: import_prop_types.default.bool.isRequired, |
| 1403 |
setIsOpen: import_prop_types.default.func.isRequired, |
| 1404 |
setIsRead: import_prop_types.default.func, |
| 1405 |
anchorPosition: import_prop_types.default.oneOf([ |
| 1406 |
"left", |
| 1407 |
"top", |
| 1408 |
"right", |
| 1409 |
"bottom" |
| 1410 |
]) |
| 1411 |
}; |
| 1412 |
|
| 1413 |
//#endregion |
| 1414 |
//#region modules/notifications/assets/js/components/bar-button-notification.js |
| 1415 |
var BarButtonNotification = function BarButtonNotification(_ref) { |
| 1416 |
var _window$elementorNoti; |
| 1417 |
var children = _ref.children; |
| 1418 |
var _useState2 = _slicedToArray((0, react.useState)(false), 2); |
| 1419 |
var isOpen = _useState2[0]; |
| 1420 |
var setIsOpen = _useState2[1]; |
| 1421 |
var _useState4 = _slicedToArray((0, react.useState)(parseInt((_window$elementorNoti = window.elementorNotifications) === null || _window$elementorNoti === void 0 ? void 0 : _window$elementorNoti.unread_count, 10) || 0), 2); |
| 1422 |
var unreadCount = _useState4[0]; |
| 1423 |
var setUnreadCount = _useState4[1]; |
| 1424 |
(0, react.useEffect)(function() { |
| 1425 |
var handler = function handler() { |
| 1426 |
return setUnreadCount(function(prev) { |
| 1427 |
return Math.max(0, prev - 1); |
| 1428 |
}); |
| 1429 |
}; |
| 1430 |
window.addEventListener("e-notification-item-seen", handler); |
| 1431 |
return function() { |
| 1432 |
return window.removeEventListener("e-notification-item-seen", handler); |
| 1433 |
}; |
| 1434 |
}, []); |
| 1435 |
return /*#__PURE__*/ react.default.createElement(react.default.Fragment, null, /*#__PURE__*/ react.default.createElement("button", { |
| 1436 |
className: "e-admin-top-bar__bar-button", |
| 1437 |
style: { |
| 1438 |
backgroundColor: "transparent", |
| 1439 |
border: "none" |
| 1440 |
}, |
| 1441 |
onClick: function handleOpen(event) { |
| 1442 |
event.preventDefault(); |
| 1443 |
setIsOpen(true); |
| 1444 |
} |
| 1445 |
}, /*#__PURE__*/ react.default.createElement(_elementor_ui.Badge, { |
| 1446 |
color: "primary", |
| 1447 |
badgeContent: unreadCount, |
| 1448 |
invisible: 0 === unreadCount, |
| 1449 |
sx: { mx: .5 } |
| 1450 |
}, /*#__PURE__*/ react.default.createElement("i", { className: "e-admin-top-bar__bar-button-icon eicon-speakerphone" })), /*#__PURE__*/ react.default.createElement("span", { className: "e-admin-top-bar__bar-button-title" }, children)), /*#__PURE__*/ react.default.createElement(WhatsNew, { |
| 1451 |
isOpen, |
| 1452 |
setIsOpen |
| 1453 |
})); |
| 1454 |
}; |
| 1455 |
BarButtonNotification.propTypes = { children: import_prop_types.default.node.isRequired }; |
| 1456 |
|
| 1457 |
//#endregion |
| 1458 |
//#region modules/notifications/assets/js/admin.js |
| 1459 |
window.elementorNotificationCenter = { BarButtonNotification }; |
| 1460 |
|
| 1461 |
//#endregion |
| 1462 |
})(React, elementorV2.ui, elementorV2.query, wp.i18n, elementorV2.icons); |
| 1463 |
//# sourceMappingURL=admin-notifications.js.map |