File: /var/www/html/wp-content/plugins/wp-recipe-maker/templates/divi5/scripts/bundle.js
/*
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/module.scss":
/*!********************************************************************************!*\
!*** ./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/module.scss ***!
\********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack://wp-recipe-maker/./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/module.scss?");
/***/ }),
/***/ "./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/style.scss":
/*!*******************************************************************************!*\
!*** ./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/style.scss ***!
\*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack://wp-recipe-maker/./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/style.scss?");
/***/ }),
/***/ "./node_modules/react/cjs/react-jsx-runtime.development.js":
/*!*****************************************************************!*\
!*** ./node_modules/react/cjs/react-jsx-runtime.development.js ***!
\*****************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
eval("/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n'use strict';\n\nvar React = __webpack_require__(/*! react */ \"react\");\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n 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`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie. <div {...props} key=\"Hi\" />\n // or <div key=\"Hi\" {...props} /> ). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n // <div {...props} key=\"Hi\" />, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n\n\n//# sourceURL=webpack://wp-recipe-maker/./node_modules/react/cjs/react-jsx-runtime.development.js?");
/***/ }),
/***/ "./node_modules/react/jsx-runtime.js":
/*!*******************************************!*\
!*** ./node_modules/react/jsx-runtime.js ***!
\*******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ \"./node_modules/react/cjs/react-jsx-runtime.development.js\");\n}\n\n\n//# sourceURL=webpack://wp-recipe-maker/./node_modules/react/jsx-runtime.js?");
/***/ }),
/***/ "./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/edit.tsx":
/*!*****************************************************************************!*\
!*** ./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/edit.tsx ***!
\*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ WprmRecipeEdit: () => (/* binding */ WprmRecipeEdit)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _divi_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @divi/module */ \"@divi/module\");\n/* harmony import */ var _divi_module__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_divi_module__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./styles */ \"./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/styles.tsx\");\n/* harmony import */ var _module_classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./module-classnames */ \"./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/module-classnames.ts\");\n/* harmony import */ var _sidebar_controls__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./sidebar-controls */ \"./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/sidebar-controls.tsx\");\n/* harmony import */ var _utils_builder_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/builder-data */ \"./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/utils/builder-data.ts\");\n\n\n\n\n\n\n\n\nconst getDesktopValue = (recipe) => {\n var _a, _b, _c;\n return ((_c = (_b = (_a = recipe === null || recipe === void 0 ? void 0 : recipe.innerContent) === null || _a === void 0 ? void 0 : _a.desktop) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : '');\n};\nconst parseRecipeId = (value) => {\n if (!value) {\n return null;\n }\n const parsed = parseInt(value, 10);\n return Number.isInteger(parsed) && parsed > 0 ? parsed : null;\n};\nconst WprmRecipeEdit = ({ attrs, elements, id, name }) => {\n const builderDataRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)((0,_utils_builder_data__WEBPACK_IMPORTED_MODULE_7__.getBuilderData)());\n const [builderData, setBuilderData] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(builderDataRef.current);\n const [previewCache, setPreviewCache] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)({});\n const [previewRefreshKey, setPreviewRefreshKey] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0);\n const [loadingId, setLoadingId] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const [error, setError] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const recipeValue = getDesktopValue(attrs === null || attrs === void 0 ? void 0 : attrs.recipe);\n const recipeId = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(() => parseRecipeId(recipeValue), [recipeValue]);\n const cachedPreview = recipeId ? previewCache[recipeId] : null;\n // Fetch builder data on mount if not available\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {\n var _a;\n const hasData = builderData.nonce && ((_a = builderData.endpoints) === null || _a === void 0 ? void 0 : _a.preview);\n if (!hasData) {\n (0,_utils_builder_data__WEBPACK_IMPORTED_MODULE_7__.fetchBuilderData)().then((data) => {\n var _a;\n if (data && data.nonce && ((_a = data.endpoints) === null || _a === void 0 ? void 0 : _a.preview)) {\n builderDataRef.current = data;\n setBuilderData(data);\n }\n });\n }\n }, []); // Only run on mount\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {\n if (!recipeId || cachedPreview) {\n setLoadingId(null);\n return;\n }\n // Use the state version of builderData which will be updated when fetched\n const { endpoints, nonce } = builderData;\n if (!(endpoints === null || endpoints === void 0 ? void 0 : endpoints.preview) || !nonce) {\n setError((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Divi could not load the WP Recipe Maker preview data.', 'wp-recipe-maker'));\n return;\n }\n const controller = new AbortController();\n setLoadingId(recipeId);\n setError(null);\n const requestUrl = `${endpoints.preview.replace(/\\/$/, '')}/${recipeId}?t=${Date.now()}`;\n fetch(requestUrl, {\n method: 'POST',\n headers: {\n 'X-WP-Nonce': nonce,\n 'Content-Type': 'application/json',\n Accept: 'application/json',\n },\n credentials: 'same-origin',\n signal: controller.signal,\n })\n .then(async (response) => {\n var _a;\n const body = await response.json();\n if (!response.ok) {\n throw new Error((_a = body === null || body === void 0 ? void 0 : body.message) !== null && _a !== void 0 ? _a : 'Unknown error');\n }\n return body;\n })\n .then((html) => {\n setPreviewCache((current) => ({\n ...current,\n [recipeId]: html || '',\n }));\n })\n .catch((requestError) => {\n if (!controller.signal.aborted) {\n setError((requestError === null || requestError === void 0 ? void 0 : requestError.message)\n ? requestError.message\n : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Failed to load the recipe preview.', 'wp-recipe-maker'));\n }\n })\n .finally(() => {\n if (!controller.signal.aborted) {\n setLoadingId(null);\n }\n });\n return () => controller.abort();\n }, [recipeId, cachedPreview, builderData, previewRefreshKey]);\n const invalidatePreview = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((idToInvalidate) => {\n if (!idToInvalidate) {\n return;\n }\n setPreviewCache((current) => {\n const updated = { ...current };\n delete updated[idToInvalidate];\n return updated;\n });\n setPreviewRefreshKey((key) => key + 1);\n }, []);\n const renderStatus = () => {\n if (!recipeId) {\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"p\", { className: \"wprm-divi5-recipe__status\", children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Select a WP Recipe Maker recipe in the module settings to see the preview here.', 'wp-recipe-maker') }) }));\n }\n if (loadingId === recipeId) {\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"p\", { className: \"wprm-divi5-recipe__status\", children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.sprintf)(\n /* translators: %d is replaced with the recipe ID. */\n (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Loading WPRM Recipe #%d…', 'wp-recipe-maker'), recipeId) }));\n }\n if (error) {\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"p\", { className: \"wprm-divi5-recipe__status\", children: error }));\n }\n if (cachedPreview) {\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { className: \"wprm-divi5-recipe__preview\", dangerouslySetInnerHTML: { __html: cachedPreview } }));\n }\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"p\", { className: \"wprm-divi5-recipe__status\", children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Recipe preview not available yet. Try saving or reloading the builder.', 'wp-recipe-maker') }));\n };\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_divi_module__WEBPACK_IMPORTED_MODULE_3__.ModuleContainer, { attrs: attrs, elements: elements, id: id, name: name, classnamesFunction: _module_classnames__WEBPACK_IMPORTED_MODULE_5__.moduleClassnames, stylesComponent: _styles__WEBPACK_IMPORTED_MODULE_4__.ModuleStyles, children: [elements.styleComponents({\n attrName: 'module',\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sidebar_controls__WEBPACK_IMPORTED_MODULE_6__.SidebarControls, { id: id, onRecipeUpdated: invalidatePreview }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { className: \"wprm-divi5-recipe__inner\", children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { className: \"wprm-divi5-recipe__content\", children: renderStatus() }) })] }));\n};\n\n\n//# sourceURL=webpack://wp-recipe-maker/./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/edit.tsx?");
/***/ }),
/***/ "./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/index.ts":
/*!*****************************************************************************!*\
!*** ./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/index.ts ***!
\*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ wprmRecipeModule: () => (/* binding */ wprmRecipeModule)\n/* harmony export */ });\n/* harmony import */ var _module_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./module.json */ \"./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/module.json\");\n/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./edit */ \"./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/edit.tsx\");\n/* harmony import */ var _placeholder_content__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./placeholder-content */ \"./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/placeholder-content.ts\");\n/* harmony import */ var _conversion_outline_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./conversion-outline.json */ \"./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/conversion-outline.json\");\n/* harmony import */ var _module_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./module.scss */ \"./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/module.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./style.scss */ \"./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/style.scss\");\n\n\n\n\n\n\nconst wprmRecipeModule = {\n metadata: _module_json__WEBPACK_IMPORTED_MODULE_0__,\n placeholderContent: _placeholder_content__WEBPACK_IMPORTED_MODULE_2__.placeholderContent,\n conversionOutline: _conversion_outline_json__WEBPACK_IMPORTED_MODULE_3__,\n renderers: {\n edit: _edit__WEBPACK_IMPORTED_MODULE_1__.WprmRecipeEdit,\n },\n};\n\n\n//# sourceURL=webpack://wp-recipe-maker/./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/index.ts?");
/***/ }),
/***/ "./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/module-classnames.ts":
/*!*****************************************************************************************!*\
!*** ./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/module-classnames.ts ***!
\*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ moduleClassnames: () => (/* binding */ moduleClassnames)\n/* harmony export */ });\nconst moduleClassnames = () => undefined;\n\n\n//# sourceURL=webpack://wp-recipe-maker/./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/module-classnames.ts?");
/***/ }),
/***/ "./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/placeholder-content.ts":
/*!*******************************************************************************************!*\
!*** ./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/placeholder-content.ts ***!
\*******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ placeholderContent: () => (/* binding */ placeholderContent)\n/* harmony export */ });\nconst placeholderContent = {\n recipe: {\n innerContent: {\n desktop: {\n value: '',\n },\n },\n },\n};\n\n\n//# sourceURL=webpack://wp-recipe-maker/./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/placeholder-content.ts?");
/***/ }),
/***/ "./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/sidebar-controls.tsx":
/*!*****************************************************************************************!*\
!*** ./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/sidebar-controls.tsx ***!
\*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SidebarControls: () => (/* binding */ SidebarControls)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\nconst parseRecipeId = (value) => {\n if (!value) {\n return null;\n }\n const parsed = parseInt(value, 10);\n return Number.isInteger(parsed) && parsed > 0 ? parsed : null;\n};\nconst getSearchDocuments = () => {\n const docs = [];\n if (typeof window !== 'undefined' && window.parent && window.parent !== window) {\n try {\n const parentDoc = window.parent.document;\n if (parentDoc) {\n docs.push(parentDoc);\n }\n }\n catch (error) {\n // eslint-disable-next-line no-console\n console.warn('[WPRM Divi 5] Unable to access parent document.', error);\n }\n }\n if (typeof document !== 'undefined' && !docs.includes(document)) {\n docs.push(document);\n }\n return docs;\n};\nconst findRecipeFieldContainer = () => {\n const docs = getSearchDocuments();\n if (!docs.length) {\n return null;\n }\n // Expanded selectors list based on Divi 5 patterns\n const selectors = [\n '[data-attr-name=\"recipe.innerContent\"]',\n '[data-name=\"recipe.innerContent\"]',\n '[data-attr=\"recipe.innerContent\"]',\n '[attr-name=\"recipe.innerContent\"]',\n 'et-builder-field[attr-name=\"recipe.innerContent\"]',\n '[data-field-name=\"recipe.innerContent\"]',\n '.et-vb-field-text[id*=\"recipe-innerContent\"]',\n // Generic fallback for fields containing \"recipe\" in attributes\n 'div[class*=\"et-field\"][attr-name*=\"recipe\"]',\n ];\n for (const doc of docs) {\n for (const selector of selectors) {\n const element = doc.querySelector(selector);\n if (element) {\n return element;\n }\n }\n // Look for Shadow DOM hosts\n const shadowHosts = doc.querySelectorAll('*');\n for (const host of Array.from(shadowHosts)) {\n if (host.shadowRoot) {\n const shadowElement = host.shadowRoot.querySelector('[id*=\"recipe-innerContent\"]');\n if (shadowElement) {\n return host;\n }\n }\n }\n // Label text fallback\n const labelTexts = [\n (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Recipe ID (required)', 'wp-recipe-maker'),\n (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Recipe ID', 'wp-recipe-maker'),\n ];\n const labels = Array.from(doc.querySelectorAll('label'));\n for (const label of labels) {\n const matchesLabel = labelTexts.some((text) => { var _a; return (_a = label.textContent) === null || _a === void 0 ? void 0 : _a.trim().includes(text); });\n if (matchesLabel) {\n const fieldWrapper = label.closest('[data-attr-name]') ||\n label.closest('[data-name]') ||\n label.closest('[data-attr]') ||\n label.closest('[attr-name]') ||\n label.closest('et-builder-field') ||\n label.closest('.et-vb-field') ||\n label.closest('.et-field');\n if (fieldWrapper) {\n return fieldWrapper;\n }\n }\n }\n }\n return null;\n};\nconst findRecipeFieldInput = (container) => {\n var _a;\n if ('shadowRoot' in container && container.shadowRoot) {\n const shadowInput = (_a = container.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('#et-vb-field-input-text-recipe-innerContent, input');\n if (shadowInput) {\n return shadowInput;\n }\n }\n const input = container.querySelector('#et-vb-field-input-text-recipe-innerContent, input[name*=\"recipe\"], input[data-name*=\"recipe\"], input[type=\"text\"]');\n return input !== null && input !== void 0 ? input : null;\n};\nconst getAvailableModal = () => {\n if (typeof window === 'undefined') {\n return null;\n }\n const visited = new Set();\n const queue = [];\n const enqueue = (win) => {\n if (win && !visited.has(win)) {\n queue.push(win);\n }\n };\n enqueue(window);\n enqueue(window.parent);\n enqueue(window.top);\n while (queue.length) {\n const current = queue.shift();\n if (visited.has(current)) {\n continue;\n }\n visited.add(current);\n try {\n const modal = current.WPRM_Modal;\n if (modal === null || modal === void 0 ? void 0 : modal.open) {\n return modal;\n }\n }\n catch (error) {\n // Cross-origin access might fail\n }\n if (current.parent && current.parent !== current) {\n enqueue(current.parent);\n }\n if (current.top && current.top !== current) {\n enqueue(current.top);\n }\n }\n return null;\n};\nconst setNativeInputValue = (input, value) => {\n const descriptor = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, 'value');\n if (descriptor === null || descriptor === void 0 ? void 0 : descriptor.set) {\n descriptor.set.call(input, value);\n }\n else {\n input.value = value;\n }\n input.dispatchEvent(new Event('input', { bubbles: true }));\n input.dispatchEvent(new Event('change', { bubbles: true }));\n};\nconst getRecipeIdFromSelection = (selection) => {\n var _a, _b;\n if (typeof selection === 'string') {\n // Handle shortcodes like [wprm-recipe id=\"123\"]\n if (selection.includes('[wprm-recipe')) {\n const match = selection.match(/id=\"?(\\d+)\"?/);\n if (match && match[1]) {\n return parseInt(match[1], 10);\n }\n }\n const parsed = parseInt(selection, 10);\n return Number.isInteger(parsed) && parsed > 0 ? parsed : null;\n }\n if (typeof selection === 'number') {\n return selection > 0 ? selection : null;\n }\n if (typeof selection === 'object' && selection !== null) {\n const candidate = (_b = (_a = selection.id) !== null && _a !== void 0 ? _a : selection.value) !== null && _b !== void 0 ? _b : selection.recipe_id;\n if (typeof candidate === 'number') {\n return candidate > 0 ? candidate : null;\n }\n if (typeof candidate === 'string') {\n const parsed = parseInt(candidate, 10);\n return Number.isInteger(parsed) && parsed > 0 ? parsed : null;\n }\n }\n return null;\n};\nconst SidebarControls = ({ id, onRecipeUpdated }) => {\n const [container, setContainer] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const [selectionMessage, setSelectionMessage] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const [currentRecipeId, setCurrentRecipeId] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)('');\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {\n const check = () => {\n const found = findRecipeFieldContainer();\n if (!found) {\n if (container) {\n delete container.dataset.wprmButtonOwner;\n setContainer(null);\n if (container.__wprmInputCleanup) {\n container.__wprmInputCleanup();\n delete container.__wprmInputCleanup;\n }\n }\n setCurrentRecipeId('');\n return;\n }\n const owner = found.dataset.wprmButtonOwner;\n if (owner && owner !== id) {\n return;\n }\n const input = findRecipeFieldInput(found);\n const inputValue = (input === null || input === void 0 ? void 0 : input.value) || '';\n if (found !== container) {\n found.dataset.wprmButtonOwner = id;\n setContainer(found);\n setCurrentRecipeId(inputValue);\n if (input) {\n const handleInputChange = () => {\n setCurrentRecipeId(input.value || '');\n };\n input.addEventListener('input', handleInputChange);\n input.addEventListener('change', handleInputChange);\n found.__wprmInputCleanup = () => {\n input.removeEventListener('input', handleInputChange);\n input.removeEventListener('change', handleInputChange);\n };\n }\n }\n else if (input && input.value !== currentRecipeId) {\n setCurrentRecipeId(input.value || '');\n }\n };\n check();\n const interval = setInterval(check, 500);\n return () => {\n clearInterval(interval);\n if (container) {\n delete container.dataset.wprmButtonOwner;\n if (container.__wprmInputCleanup) {\n container.__wprmInputCleanup();\n delete container.__wprmInputCleanup;\n }\n }\n };\n }, [container, id, currentRecipeId]);\n const updateRecipeId = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((recipeId) => {\n if (!recipeId) {\n setSelectionMessage((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Please pick a recipe to continue.', 'wp-recipe-maker'));\n return;\n }\n if (container) {\n const input = findRecipeFieldInput(container);\n if (input) {\n setNativeInputValue(input, String(recipeId));\n setCurrentRecipeId(String(recipeId));\n setSelectionMessage('');\n onRecipeUpdated(recipeId);\n }\n else {\n setSelectionMessage((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.sprintf)(\n /* translators: %d is replaced with the selected recipe ID. */\n (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Copy recipe ID #%d into the field.', 'wp-recipe-maker'), recipeId));\n }\n }\n }, [container, onRecipeUpdated]);\n const handleRecipeSelection = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(() => {\n const modal = getAvailableModal();\n if (!(modal === null || modal === void 0 ? void 0 : modal.open)) {\n console.warn('[WPRM Divi 5] WPRM_Modal not found.');\n setSelectionMessage((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('The recipe modal is not available. Please try reloading.', 'wp-recipe-maker'));\n return;\n }\n modal.open('select', {\n title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Select a WP Recipe Maker recipe', 'wp-recipe-maker'),\n button: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Use this recipe', 'wp-recipe-maker'),\n fields: {\n recipe: {},\n },\n insertCallback: (fields) => {\n const selectedId = getRecipeIdFromSelection(fields === null || fields === void 0 ? void 0 : fields.recipe);\n updateRecipeId(selectedId);\n },\n });\n }, [updateRecipeId]);\n const handleCreateRecipe = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(() => {\n const modal = getAvailableModal();\n if (!(modal === null || modal === void 0 ? void 0 : modal.open)) {\n console.warn('[WPRM Divi 5] WPRM_Modal not found.');\n setSelectionMessage((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('The recipe modal is not available. Please try reloading.', 'wp-recipe-maker'));\n return;\n }\n modal.open('recipe', {\n saveCallback: (recipe) => {\n const selectedId = getRecipeIdFromSelection(recipe);\n updateRecipeId(selectedId);\n },\n });\n }, [updateRecipeId]);\n const handleEditRecipe = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(() => {\n const modal = getAvailableModal();\n if (!(modal === null || modal === void 0 ? void 0 : modal.open)) {\n console.warn('[WPRM Divi 5] WPRM_Modal not found.');\n setSelectionMessage((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('The recipe modal is not available. Please try reloading.', 'wp-recipe-maker'));\n return;\n }\n const recipeId = parseRecipeId(currentRecipeId);\n if (!recipeId) {\n setSelectionMessage((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Invalid recipe ID.', 'wp-recipe-maker'));\n return;\n }\n modal.open('recipe', {\n recipeId: recipeId,\n saveCallback: () => {\n setSelectionMessage('');\n if (container) {\n const input = findRecipeFieldInput(container);\n if (input) {\n const originalValue = input.value;\n setNativeInputValue(input, '');\n setCurrentRecipeId('');\n setTimeout(() => {\n setNativeInputValue(input, originalValue);\n setCurrentRecipeId(originalValue);\n onRecipeUpdated(recipeId);\n }, 50);\n }\n }\n },\n });\n }, [currentRecipeId, container, onRecipeUpdated]);\n const handleClearRecipe = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(() => {\n if (container) {\n const input = findRecipeFieldInput(container);\n if (input) {\n setNativeInputValue(input, '');\n setCurrentRecipeId('');\n setSelectionMessage('');\n onRecipeUpdated(null);\n }\n }\n }, [container, onRecipeUpdated]);\n if (!container) {\n return null;\n }\n const hasRecipeId = currentRecipeId.trim() !== '';\n return (0,react_dom__WEBPACK_IMPORTED_MODULE_2__.createPortal)((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", { className: \"wprm-divi5-sidebar-controls\", children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { style: { display: 'flex', flexDirection: 'column', gap: '6px' }, children: !hasRecipeId ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"button\", { type: \"button\", className: \"wprm-divi5-recipe__sidebar-button\", onClick: handleRecipeSelection, children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Search recipe', 'wp-recipe-maker') }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"button\", { type: \"button\", className: \"wprm-divi5-recipe__sidebar-button\", onClick: handleCreateRecipe, children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Create new Recipe', 'wp-recipe-maker') })] })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"button\", { type: \"button\", className: \"wprm-divi5-recipe__sidebar-button\", onClick: handleEditRecipe, children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Edit Recipe', 'wp-recipe-maker') }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"button\", { type: \"button\", className: \"wprm-divi5-recipe__sidebar-button\", onClick: handleClearRecipe, children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Clear Recipe', 'wp-recipe-maker') })] })) }), selectionMessage && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"p\", { className: \"wprm-divi5-recipe__sidebar-message\", style: { display: 'block' }, children: selectionMessage }))] }), container);\n};\n\n\n//# sourceURL=webpack://wp-recipe-maker/./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/sidebar-controls.tsx?");
/***/ }),
/***/ "./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/styles.tsx":
/*!*******************************************************************************!*\
!*** ./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/styles.tsx ***!
\*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ModuleStyles: () => (/* binding */ ModuleStyles)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var _divi_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @divi/module */ \"@divi/module\");\n/* harmony import */ var _divi_module__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_divi_module__WEBPACK_IMPORTED_MODULE_1__);\n\n\nconst ModuleStyles = ({ settings, mode, state, noStyleTag, elements, }) => ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_divi_module__WEBPACK_IMPORTED_MODULE_1__.StyleContainer, { mode: mode, state: state, noStyleTag: noStyleTag, children: elements.style({\n attrName: 'module',\n styleProps: {\n disabledOn: {\n disabledModuleVisibility: settings === null || settings === void 0 ? void 0 : settings.disabledModuleVisibility,\n },\n },\n }) }));\n\n\n//# sourceURL=webpack://wp-recipe-maker/./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/styles.tsx?");
/***/ }),
/***/ "./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/utils/builder-data.ts":
/*!******************************************************************************************!*\
!*** ./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/utils/builder-data.ts ***!
\******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ fetchBuilderData: () => (/* binding */ fetchBuilderData),\n/* harmony export */ getBuilderData: () => (/* binding */ getBuilderData)\n/* harmony export */ });\nconst getBuilderData = () => {\n if (typeof window !== 'undefined') {\n const data = window.WPRMDivi5Data;\n return data !== null && data !== void 0 ? data : {};\n }\n return {};\n};\nconst fetchBuilderData = async () => {\n var _a, _b, _c, _d, _e, _f;\n try {\n let restUrl = '/wp-json/';\n if (typeof window !== 'undefined') {\n if ((_b = (_a = window.wp) === null || _a === void 0 ? void 0 : _a.apiSettings) === null || _b === void 0 ? void 0 : _b.root) {\n restUrl = window.wp.apiSettings.root;\n }\n else if ((_c = window.wpApiSettings) === null || _c === void 0 ? void 0 : _c.root) {\n restUrl = window.wpApiSettings.root;\n }\n else {\n const apiRootMeta = document.querySelector('script[data-api-root]');\n if (apiRootMeta) {\n restUrl = apiRootMeta.dataset.apiRoot || restUrl;\n }\n }\n }\n if (!restUrl.endsWith('/')) {\n restUrl += '/';\n }\n const endpoint = `${restUrl}wp-recipe-maker/v1/utilities/divi5-builder-data`;\n const nonce = typeof window !== 'undefined'\n ? ((_e = (_d = window.wp) === null || _d === void 0 ? void 0 : _d.apiSettings) === null || _e === void 0 ? void 0 : _e.nonce) || ((_f = window.wpApiSettings) === null || _f === void 0 ? void 0 : _f.nonce) || null\n : null;\n const headers = {\n 'Content-Type': 'application/json',\n Accept: 'application/json',\n };\n if (nonce) {\n headers['X-WP-Nonce'] = nonce;\n }\n const response = await fetch(endpoint, {\n method: 'GET',\n headers,\n credentials: 'same-origin',\n });\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status} - ${response.statusText}`);\n }\n const data = await response.json();\n if (typeof window !== 'undefined') {\n window.WPRMDivi5Data = {\n ...window.WPRMDivi5Data,\n ...data,\n };\n }\n return data;\n }\n catch (error) {\n return {};\n }\n};\n\n\n//# sourceURL=webpack://wp-recipe-maker/./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/utils/builder-data.ts?");
/***/ }),
/***/ "./wp-recipe-maker/templates/divi5/src/index.ts":
/*!******************************************************!*\
!*** ./wp-recipe-maker/templates/divi5/src/index.ts ***!
\******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _divi_module_library__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @divi/module-library */ \"@divi/module-library\");\n/* harmony import */ var _divi_module_library__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_divi_module_library__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _components_wprm_recipe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/wprm-recipe */ \"./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/index.ts\");\n\n\n\n(0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__.addAction)('divi.moduleLibrary.registerModuleLibraryStore.after', 'wprmRecipeMaker', () => {\n (0,_divi_module_library__WEBPACK_IMPORTED_MODULE_1__.registerModule)(_components_wprm_recipe__WEBPACK_IMPORTED_MODULE_2__.wprmRecipeModule.metadata, {\n placeholderContent: _components_wprm_recipe__WEBPACK_IMPORTED_MODULE_2__.wprmRecipeModule.placeholderContent,\n renderers: _components_wprm_recipe__WEBPACK_IMPORTED_MODULE_2__.wprmRecipeModule.renderers,\n conversionOutline: _components_wprm_recipe__WEBPACK_IMPORTED_MODULE_2__.wprmRecipeModule.conversionOutline,\n });\n});\n\n\n//# sourceURL=webpack://wp-recipe-maker/./wp-recipe-maker/templates/divi5/src/index.ts?");
/***/ }),
/***/ "@divi/module":
/*!**********************************!*\
!*** external ["divi","module"] ***!
\**********************************/
/***/ ((module) => {
module.exports = divi.module;
/***/ }),
/***/ "@divi/module-library":
/*!*****************************************!*\
!*** external ["divi","moduleLibrary"] ***!
\*****************************************/
/***/ ((module) => {
module.exports = divi.moduleLibrary;
/***/ }),
/***/ "react":
/*!***********************************!*\
!*** external ["vendor","React"] ***!
\***********************************/
/***/ ((module) => {
module.exports = vendor.React;
/***/ }),
/***/ "react-dom":
/*!**************************************!*\
!*** external ["vendor","ReactDOM"] ***!
\**************************************/
/***/ ((module) => {
module.exports = vendor.ReactDOM;
/***/ }),
/***/ "@wordpress/hooks":
/*!****************************************!*\
!*** external ["vendor","wp","hooks"] ***!
\****************************************/
/***/ ((module) => {
module.exports = vendor.wp.hooks;
/***/ }),
/***/ "@wordpress/i18n":
/*!***************************************!*\
!*** external ["vendor","wp","i18n"] ***!
\***************************************/
/***/ ((module) => {
module.exports = vendor.wp.i18n;
/***/ }),
/***/ "./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/conversion-outline.json":
/*!********************************************************************************************!*\
!*** ./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/conversion-outline.json ***!
\********************************************************************************************/
/***/ ((module) => {
eval("module.exports = /*#__PURE__*/JSON.parse('{\"advanced\":{\"admin_label\":\"module.meta.adminLabel\",\"animation\":\"module.decoration.animation\",\"background\":\"module.decoration.background\",\"borders\":{\"default\":\"module.decoration.border\"},\"box_shadow\":{\"default\":\"module.decoration.boxShadow\"},\"disabled_on\":\"module.decoration.disabledOn\",\"filters\":{\"default\":\"module.decoration.filters\"},\"height\":\"module.decoration.sizing\",\"link_options\":\"module.advanced.link\",\"margin_padding\":\"module.decoration.spacing\",\"max_width\":\"module.decoration.sizing\",\"module\":\"module.advanced.htmlAttributes\",\"overflow\":\"module.decoration.overflow\",\"position_fields\":\"module.decoration.position\",\"scroll\":\"module.decoration.scroll\",\"sticky\":\"module.decoration.sticky\",\"text\":\"module.advanced.text\",\"text_shadow\":{\"default\":\"module.advanced.text.textShadow\"},\"transform\":\"module.decoration.transform\",\"transition\":\"module.decoration.transition\",\"z_index\":\"module.decoration.zIndex\"},\"css\":{\"main_element\":\"css.*.mainElement\"},\"module\":{\"recipe_id\":\"recipe.innerContent.*\"}}');\n\n//# sourceURL=webpack://wp-recipe-maker/./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/conversion-outline.json?");
/***/ }),
/***/ "./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/module.json":
/*!********************************************************************************!*\
!*** ./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/module.json ***!
\********************************************************************************/
/***/ ((module) => {
eval("module.exports = /*#__PURE__*/JSON.parse('{\"name\":\"wprm/recipe\",\"d4Shortcode\":\"divi_wprm_recipe\",\"title\":\"WPRM Recipe\",\"titles\":\"WPRM Recipe Modules\",\"moduleIcon\":\"divi/module-gallery\",\"moduleClassName\":\"wprm_recipe\",\"moduleOrderClassName\":\"wprm_recipe\",\"category\":\"module\",\"attributes\":{\"module\":{\"type\":\"object\",\"selector\":\"{{selector}}\",\"settings\":{\"meta\":{\"adminLabel\":{}},\"advanced\":{\"link\":{},\"text\":{},\"htmlAttributes\":{}},\"decoration\":{\"background\":{},\"sizing\":{},\"spacing\":{},\"border\":{},\"boxShadow\":{},\"filters\":{},\"transform\":{},\"animation\":{},\"overflow\":{},\"disabledOn\":{},\"transition\":{},\"position\":{},\"zIndex\":{},\"scroll\":{},\"sticky\":{}}}},\"recipe\":{\"type\":\"object\",\"default\":{\"innerContent\":{\"desktop\":{\"value\":\"\"}}},\"settings\":{\"innerContent\":{\"groupType\":\"group-item\",\"item\":{\"groupSlug\":\"contentRecipe\",\"priority\":10,\"render\":true,\"attrName\":\"recipe.innerContent\",\"label\":\"Recipe ID (required)\",\"description\":\"Enter the ID of the WP Recipe Maker recipe to display.\",\"features\":{\"sticky\":false,\"dynamicContent\":false},\"component\":{\"name\":\"divi/text\",\"type\":\"field\"}}}}}},\"customCssFields\":{},\"settings\":{\"content\":\"auto\",\"design\":\"auto\",\"advanced\":\"auto\",\"groups\":{\"contentRecipe\":{\"panel\":\"content\",\"priority\":10,\"groupName\":\"contentRecipe\",\"component\":{\"name\":\"divi/composite\",\"props\":{\"groupLabel\":\"Recipe\"}}}}}}');\n\n//# sourceURL=webpack://wp-recipe-maker/./wp-recipe-maker/templates/divi5/src/components/wprm-recipe/module.json?");
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/chunk loaded */
/******/ (() => {
/******/ var deferred = [];
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ var r = fn();
/******/ if (r !== undefined) result = r;
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
/******/ () => (module['default']) :
/******/ () => (module);
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ (() => {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ "bundle": 0,
/******/ "./vb-bundle": 0
/******/ };
/******/
/******/ // no chunk on demand loading
/******/
/******/ // no prefetching
/******/
/******/ // no preloaded
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var [chunkIds, moreModules, runtime] = data;
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) var result = runtime(__webpack_require__);
/******/ }
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ installedChunks[chunkId][0]();
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ return __webpack_require__.O(result);
/******/ }
/******/
/******/ var chunkLoadingGlobal = self["webpackChunkwp_recipe_maker"] = self["webpackChunkwp_recipe_maker"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["./vb-bundle"], () => (__webpack_require__("./wp-recipe-maker/templates/divi5/src/index.ts")))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;