UNPKG

@shopify/create-app

Version:

A CLI tool to create a new Shopify app.

1,091 lines (1,085 loc) • 1.91 MB
import { require_ansi_styles, require_lib, require_semver, require_source_map } from "./chunk-Z4EMJFGP.js"; import { require_has_flag } from "./chunk-UMUTXITN.js"; import { cwd, delimiter, dirname, joinPath, normalizePath, relativizePath, sniffForPath } from "./chunk-CFNYEDC6.js"; import { require_graceful_fs } from "./chunk-6NVYATES.js"; import { require_out } from "./chunk-CTFDRWUN.js"; import { __commonJS, __esm, __export, __require, __toCommonJS, __toESM, init_cjs_shims } from "./chunk-PKR7KJ6P.js"; // ../../node_modules/.pnpm/node-abort-controller@3.1.1/node_modules/node-abort-controller/index.js var require_node_abort_controller = __commonJS({ "../../node_modules/.pnpm/node-abort-controller@3.1.1/node_modules/node-abort-controller/index.js"(exports, module) { init_cjs_shims(); var { EventEmitter: EventEmitter4 } = __require("events"), AbortSignal2 = class { constructor() { this.eventEmitter = new EventEmitter4(), this.onabort = null, this.aborted = !1, this.reason = void 0; } toString() { return "[object AbortSignal]"; } get [Symbol.toStringTag]() { return "AbortSignal"; } removeEventListener(name, handler2) { this.eventEmitter.removeListener(name, handler2); } addEventListener(name, handler2) { this.eventEmitter.on(name, handler2); } dispatchEvent(type) { let event = { type, target: this }, handlerName = `on${type}`; typeof this[handlerName] == "function" && this[handlerName](event), this.eventEmitter.emit(type, event); } throwIfAborted() { if (this.aborted) throw this.reason; } static abort(reason) { let controller = new AbortController3(); return controller.abort(), controller.signal; } static timeout(time) { let controller = new AbortController3(); return setTimeout(() => controller.abort(new Error("TimeoutError")), time), controller.signal; } }, AbortController3 = class { constructor() { this.signal = new AbortSignal2(); } abort(reason) { this.signal.aborted || (this.signal.aborted = !0, reason ? this.signal.reason = reason : this.signal.reason = new Error("AbortError"), this.signal.dispatchEvent("abort")); } toString() { return "[object AbortController]"; } get [Symbol.toStringTag]() { return "AbortController"; } }; module.exports = { AbortController: AbortController3, AbortSignal: AbortSignal2 }; } }); // ../../node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react.production.js var require_react_production = __commonJS({ "../../node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react.production.js"(exports) { "use strict"; init_cjs_shims(); var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator; function getIteratorFn(maybeIterable) { return maybeIterable === null || typeof maybeIterable != "object" ? null : (maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"], typeof maybeIterable == "function" ? maybeIterable : null); } var ReactNoopUpdateQueue = { isMounted: function() { return !1; }, enqueueForceUpdate: function() { }, enqueueReplaceState: function() { }, enqueueSetState: function() { } }, assign = Object.assign, emptyObject = {}; function Component(props, context, updater) { this.props = props, this.context = context, this.refs = emptyObject, this.updater = updater || ReactNoopUpdateQueue; } Component.prototype.isReactComponent = {}; Component.prototype.setState = function(partialState, callback) { if (typeof partialState != "object" && typeof partialState != "function" && partialState != null) throw Error( "takes an object of state variables to update or a function which returns an object of state variables." ); this.updater.enqueueSetState(this, partialState, callback, "setState"); }; Component.prototype.forceUpdate = function(callback) { this.updater.enqueueForceUpdate(this, callback, "forceUpdate"); }; function ComponentDummy() { } ComponentDummy.prototype = Component.prototype; function PureComponent2(props, context, updater) { this.props = props, this.context = context, this.refs = emptyObject, this.updater = updater || ReactNoopUpdateQueue; } var pureComponentPrototype = PureComponent2.prototype = new ComponentDummy(); pureComponentPrototype.constructor = PureComponent2; assign(pureComponentPrototype, Component.prototype); pureComponentPrototype.isPureReactComponent = !0; var isArrayImpl = Array.isArray; function noop4() { } var ReactSharedInternals = { H: null, A: null, T: null, S: null }, hasOwnProperty = Object.prototype.hasOwnProperty; function ReactElement(type, key, props) { var refProp = props.ref; return { $$typeof: REACT_ELEMENT_TYPE, type, key, ref: refProp !== void 0 ? refProp : null, props }; } function cloneAndReplaceKey(oldElement, newKey) { return ReactElement(oldElement.type, newKey, oldElement.props); } function isValidElement(object) { return typeof object == "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } function escape3(key) { var escaperLookup = { "=": "=0", ":": "=2" }; return "$" + key.replace(/[=:]/g, function(match2) { return escaperLookup[match2]; }); } var userProvidedKeyEscapeRegex = /\/+/g; function getElementKey(element, index) { return typeof element == "object" && element !== null && element.key != null ? escape3("" + element.key) : index.toString(36); } function resolveThenable(thenable) { switch (thenable.status) { case "fulfilled": return thenable.value; case "rejected": throw thenable.reason; default: switch (typeof thenable.status == "string" ? thenable.then(noop4, noop4) : (thenable.status = "pending", thenable.then( function(fulfilledValue) { thenable.status === "pending" && (thenable.status = "fulfilled", thenable.value = fulfilledValue); }, function(error) { thenable.status === "pending" && (thenable.status = "rejected", thenable.reason = error); } )), thenable.status) { case "fulfilled": return thenable.value; case "rejected": throw thenable.reason; } } throw thenable; } function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { var type = typeof children; (type === "undefined" || type === "boolean") && (children = null); var invokeCallback = !1; if (children === null) invokeCallback = !0; else switch (type) { case "bigint": case "string": case "number": invokeCallback = !0; break; case "object": switch (children.$$typeof) { case REACT_ELEMENT_TYPE: case REACT_PORTAL_TYPE: invokeCallback = !0; break; case REACT_LAZY_TYPE: return invokeCallback = children._init, mapIntoArray( invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback ); } } if (invokeCallback) return callback = callback(children), invokeCallback = nameSoFar === "" ? "." + getElementKey(children, 0) : nameSoFar, isArrayImpl(callback) ? (escapedPrefix = "", invokeCallback != null && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) { return c; })) : callback != null && (isValidElement(callback) && (callback = cloneAndReplaceKey( callback, escapedPrefix + (callback.key == null || children && children.key === callback.key ? "" : ("" + callback.key).replace( userProvidedKeyEscapeRegex, "$&/" ) + "/") + invokeCallback )), array.push(callback)), 1; invokeCallback = 0; var nextNamePrefix = nameSoFar === "" ? "." : nameSoFar + ":"; if (isArrayImpl(children)) for (var i = 0; i < children.length; i++) nameSoFar = children[i], type = nextNamePrefix + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray( nameSoFar, array, escapedPrefix, type, callback ); else if (i = getIteratorFn(children), typeof i == "function") for (children = i.call(children), i = 0; !(nameSoFar = children.next()).done; ) nameSoFar = nameSoFar.value, type = nextNamePrefix + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray( nameSoFar, array, escapedPrefix, type, callback ); else if (type === "object") { if (typeof children.then == "function") return mapIntoArray( resolveThenable(children), array, escapedPrefix, nameSoFar, callback ); throw array = String(children), Error( "Objects are not valid as a React child (found: " + (array === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead." ); } return invokeCallback; } function mapChildren(children, func, context) { if (children == null) return children; var result = [], count = 0; return mapIntoArray(children, result, "", "", function(child) { return func.call(context, child, count++); }), result; } function lazyInitializer(payload) { if (payload._status === -1) { var ctor = payload._result; ctor = ctor(), ctor.then( function(moduleObject) { (payload._status === 0 || payload._status === -1) && (payload._status = 1, payload._result = moduleObject); }, function(error) { (payload._status === 0 || payload._status === -1) && (payload._status = 2, payload._result = error); } ), payload._status === -1 && (payload._status = 0, payload._result = ctor); } if (payload._status === 1) return payload._result.default; throw payload._result; } var reportGlobalError = typeof reportError == "function" ? reportError : function(error) { if (typeof window == "object" && typeof window.ErrorEvent == "function") { var event = new window.ErrorEvent("error", { bubbles: !0, cancelable: !0, message: typeof error == "object" && error !== null && typeof error.message == "string" ? String(error.message) : String(error), error }); if (!window.dispatchEvent(event)) return; } else if (typeof process == "object" && typeof process.emit == "function") { process.emit("uncaughtException", error); return; } console.error(error); }, Children = { map: mapChildren, forEach: function(children, forEachFunc, forEachContext) { mapChildren( children, function() { forEachFunc.apply(this, arguments); }, forEachContext ); }, count: function(children) { var n = 0; return mapChildren(children, function() { n++; }), n; }, toArray: function(children) { return mapChildren(children, function(child) { return child; }) || []; }, only: function(children) { if (!isValidElement(children)) throw Error( "React.Children.only expected to receive a single React element child." ); return children; } }; exports.Activity = REACT_ACTIVITY_TYPE; exports.Children = Children; exports.Component = Component; exports.Fragment = REACT_FRAGMENT_TYPE; exports.Profiler = REACT_PROFILER_TYPE; exports.PureComponent = PureComponent2; exports.StrictMode = REACT_STRICT_MODE_TYPE; exports.Suspense = REACT_SUSPENSE_TYPE; exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals; exports.__COMPILER_RUNTIME = { __proto__: null, c: function(size) { return ReactSharedInternals.H.useMemoCache(size); } }; exports.cache = function(fn) { return function() { return fn.apply(null, arguments); }; }; exports.cacheSignal = function() { return null; }; exports.cloneElement = function(element, config, children) { if (element == null) throw Error( "The argument must be a React element, but you passed " + element + "." ); var props = assign({}, element.props), key = element.key; if (config != null) for (propName in config.key !== void 0 && (key = "" + config.key), config) !hasOwnProperty.call(config, propName) || propName === "key" || propName === "__self" || propName === "__source" || propName === "ref" && config.ref === void 0 || (props[propName] = config[propName]); var propName = arguments.length - 2; if (propName === 1) props.children = children; else if (1 < propName) { for (var childArray = Array(propName), i = 0; i < propName; i++) childArray[i] = arguments[i + 2]; props.children = childArray; } return ReactElement(element.type, key, props); }; exports.createContext = function(defaultValue) { return defaultValue = { $$typeof: REACT_CONTEXT_TYPE, _currentValue: defaultValue, _currentValue2: defaultValue, _threadCount: 0, Provider: null, Consumer: null }, defaultValue.Provider = defaultValue, defaultValue.Consumer = { $$typeof: REACT_CONSUMER_TYPE, _context: defaultValue }, defaultValue; }; exports.createElement = function(type, config, children) { var propName, props = {}, key = null; if (config != null) for (propName in config.key !== void 0 && (key = "" + config.key), config) hasOwnProperty.call(config, propName) && propName !== "key" && propName !== "__self" && propName !== "__source" && (props[propName] = config[propName]); var childrenLength = arguments.length - 2; if (childrenLength === 1) props.children = children; else if (1 < childrenLength) { for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 2]; props.children = childArray; } if (type && type.defaultProps) for (propName in childrenLength = type.defaultProps, childrenLength) props[propName] === void 0 && (props[propName] = childrenLength[propName]); return ReactElement(type, key, props); }; exports.createRef = function() { return { current: null }; }; exports.forwardRef = function(render3) { return { $$typeof: REACT_FORWARD_REF_TYPE, render: render3 }; }; exports.isValidElement = isValidElement; exports.lazy = function(ctor) { return { $$typeof: REACT_LAZY_TYPE, _payload: { _status: -1, _result: ctor }, _init: lazyInitializer }; }; exports.memo = function(type, compare) { return { $$typeof: REACT_MEMO_TYPE, type, compare: compare === void 0 ? null : compare }; }; exports.startTransition = function(scope) { var prevTransition = ReactSharedInternals.T, currentTransition = {}; ReactSharedInternals.T = currentTransition; try { var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S; onStartTransitionFinish !== null && onStartTransitionFinish(currentTransition, returnValue), typeof returnValue == "object" && returnValue !== null && typeof returnValue.then == "function" && returnValue.then(noop4, reportGlobalError); } catch (error) { reportGlobalError(error); } finally { prevTransition !== null && currentTransition.types !== null && (prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition; } }; exports.unstable_useCacheRefresh = function() { return ReactSharedInternals.H.useCacheRefresh(); }; exports.use = function(usable) { return ReactSharedInternals.H.use(usable); }; exports.useActionState = function(action, initialState, permalink) { return ReactSharedInternals.H.useActionState(action, initialState, permalink); }; exports.useCallback = function(callback, deps) { return ReactSharedInternals.H.useCallback(callback, deps); }; exports.useContext = function(Context) { return ReactSharedInternals.H.useContext(Context); }; exports.useDebugValue = function() { }; exports.useDeferredValue = function(value, initialValue) { return ReactSharedInternals.H.useDeferredValue(value, initialValue); }; exports.useEffect = function(create2, deps) { return ReactSharedInternals.H.useEffect(create2, deps); }; exports.useEffectEvent = function(callback) { return ReactSharedInternals.H.useEffectEvent(callback); }; exports.useId = function() { return ReactSharedInternals.H.useId(); }; exports.useImperativeHandle = function(ref, create2, deps) { return ReactSharedInternals.H.useImperativeHandle(ref, create2, deps); }; exports.useInsertionEffect = function(create2, deps) { return ReactSharedInternals.H.useInsertionEffect(create2, deps); }; exports.useLayoutEffect = function(create2, deps) { return ReactSharedInternals.H.useLayoutEffect(create2, deps); }; exports.useMemo = function(create2, deps) { return ReactSharedInternals.H.useMemo(create2, deps); }; exports.useOptimistic = function(passthrough, reducer2) { return ReactSharedInternals.H.useOptimistic(passthrough, reducer2); }; exports.useReducer = function(reducer2, initialArg, init) { return ReactSharedInternals.H.useReducer(reducer2, initialArg, init); }; exports.useRef = function(initialValue) { return ReactSharedInternals.H.useRef(initialValue); }; exports.useState = function(initialState) { return ReactSharedInternals.H.useState(initialState); }; exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) { return ReactSharedInternals.H.useSyncExternalStore( subscribe, getSnapshot, getServerSnapshot ); }; exports.useTransition = function() { return ReactSharedInternals.H.useTransition(); }; exports.version = "19.2.4"; } }); // ../../node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react.development.js var require_react_development = __commonJS({ "../../node_modules/.pnpm/react@19.2.4/node_modules/react/cjs/react.development.js"(exports, module) { "use strict"; init_cjs_shims(); process.env.NODE_ENV !== "production" && (function() { function defineDeprecationWarning(methodName, info) { Object.defineProperty(Component.prototype, methodName, { get: function() { console.warn( "%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1] ); } }); } function getIteratorFn(maybeIterable) { return maybeIterable === null || typeof maybeIterable != "object" ? null : (maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"], typeof maybeIterable == "function" ? maybeIterable : null); } function warnNoop(publicInstance, callerName) { publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass"; var warningKey = publicInstance + "." + callerName; didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error( "Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, publicInstance ), didWarnStateUpdateForUnmountedComponent[warningKey] = !0); } function Component(props, context, updater) { this.props = props, this.context = context, this.refs = emptyObject, this.updater = updater || ReactNoopUpdateQueue; } function ComponentDummy() { } function PureComponent2(props, context, updater) { this.props = props, this.context = context, this.refs = emptyObject, this.updater = updater || ReactNoopUpdateQueue; } function noop4() { } function testStringCoercion(value) { return "" + value; } function checkKeyStringCoercion(value) { try { testStringCoercion(value); var JSCompiler_inline_result = !1; } catch { JSCompiler_inline_result = !0; } if (JSCompiler_inline_result) { JSCompiler_inline_result = console; var JSCompiler_temp_const = JSCompiler_inline_result.error, JSCompiler_inline_result$jscomp$0 = typeof Symbol == "function" && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; return JSCompiler_temp_const.call( JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0 ), testStringCoercion(value); } } function getComponentNameFromType(type) { if (type == null) return null; if (typeof type == "function") return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null; if (typeof type == "string") return type; switch (type) { case REACT_FRAGMENT_TYPE: return "Fragment"; case REACT_PROFILER_TYPE: return "Profiler"; case REACT_STRICT_MODE_TYPE: return "StrictMode"; case REACT_SUSPENSE_TYPE: return "Suspense"; case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList"; case REACT_ACTIVITY_TYPE: return "Activity"; } if (typeof type == "object") switch (typeof type.tag == "number" && console.error( "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." ), type.$$typeof) { case REACT_PORTAL_TYPE: return "Portal"; case REACT_CONTEXT_TYPE: return type.displayName || "Context"; case REACT_CONSUMER_TYPE: return (type._context.displayName || "Context") + ".Consumer"; case REACT_FORWARD_REF_TYPE: var innerType = type.render; return type = type.displayName, type || (type = innerType.displayName || innerType.name || "", type = type !== "" ? "ForwardRef(" + type + ")" : "ForwardRef"), type; case REACT_MEMO_TYPE: return innerType = type.displayName || null, innerType !== null ? innerType : getComponentNameFromType(type.type) || "Memo"; case REACT_LAZY_TYPE: innerType = type._payload, type = type._init; try { return getComponentNameFromType(type(innerType)); } catch { } } return null; } function getTaskName(type) { if (type === REACT_FRAGMENT_TYPE) return "<>"; if (typeof type == "object" && type !== null && type.$$typeof === REACT_LAZY_TYPE) return "<...>"; try { var name = getComponentNameFromType(type); return name ? "<" + name + ">" : "<...>"; } catch { return "<...>"; } } function getOwner() { var dispatcher = ReactSharedInternals.A; return dispatcher === null ? null : dispatcher.getOwner(); } function UnknownOwner() { return Error("react-stack-top-frame"); } function hasValidKey(config) { if (hasOwnProperty.call(config, "key")) { var getter = Object.getOwnPropertyDescriptor(config, "key").get; if (getter && getter.isReactWarning) return !1; } return config.key !== void 0; } function defineKeyPropWarningGetter(props, displayName) { function warnAboutAccessingKey() { specialPropKeyWarningShown || (specialPropKeyWarningShown = !0, console.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://react.dev/link/special-props)", displayName )); } warnAboutAccessingKey.isReactWarning = !0, Object.defineProperty(props, "key", { get: warnAboutAccessingKey, configurable: !0 }); } function elementRefGetterWithDeprecationWarning() { var componentName = getComponentNameFromType(this.type); return didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = !0, console.error( "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release." )), componentName = this.props.ref, componentName !== void 0 ? componentName : null; } function ReactElement(type, key, props, owner, debugStack, debugTask) { var refProp = props.ref; return type = { $$typeof: REACT_ELEMENT_TYPE, type, key, props, _owner: owner }, (refProp !== void 0 ? refProp : null) !== null ? Object.defineProperty(type, "ref", { enumerable: !1, get: elementRefGetterWithDeprecationWarning }) : Object.defineProperty(type, "ref", { enumerable: !1, value: null }), type._store = {}, Object.defineProperty(type._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: 0 }), Object.defineProperty(type, "_debugInfo", { configurable: !1, enumerable: !1, writable: !0, value: null }), Object.defineProperty(type, "_debugStack", { configurable: !1, enumerable: !1, writable: !0, value: debugStack }), Object.defineProperty(type, "_debugTask", { configurable: !1, enumerable: !1, writable: !0, value: debugTask }), Object.freeze && (Object.freeze(type.props), Object.freeze(type)), type; } function cloneAndReplaceKey(oldElement, newKey) { return newKey = ReactElement( oldElement.type, newKey, oldElement.props, oldElement._owner, oldElement._debugStack, oldElement._debugTask ), oldElement._store && (newKey._store.validated = oldElement._store.validated), newKey; } function validateChildKeys(node) { isValidElement(node) ? node._store && (node._store.validated = 1) : typeof node == "object" && node !== null && node.$$typeof === REACT_LAZY_TYPE && (node._payload.status === "fulfilled" ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1)); } function isValidElement(object) { return typeof object == "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } function escape3(key) { var escaperLookup = { "=": "=0", ":": "=2" }; return "$" + key.replace(/[=:]/g, function(match2) { return escaperLookup[match2]; }); } function getElementKey(element, index) { return typeof element == "object" && element !== null && element.key != null ? (checkKeyStringCoercion(element.key), escape3("" + element.key)) : index.toString(36); } function resolveThenable(thenable) { switch (thenable.status) { case "fulfilled": return thenable.value; case "rejected": throw thenable.reason; default: switch (typeof thenable.status == "string" ? thenable.then(noop4, noop4) : (thenable.status = "pending", thenable.then( function(fulfilledValue) { thenable.status === "pending" && (thenable.status = "fulfilled", thenable.value = fulfilledValue); }, function(error) { thenable.status === "pending" && (thenable.status = "rejected", thenable.reason = error); } )), thenable.status) { case "fulfilled": return thenable.value; case "rejected": throw thenable.reason; } } throw thenable; } function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { var type = typeof children; (type === "undefined" || type === "boolean") && (children = null); var invokeCallback = !1; if (children === null) invokeCallback = !0; else switch (type) { case "bigint": case "string": case "number": invokeCallback = !0; break; case "object": switch (children.$$typeof) { case REACT_ELEMENT_TYPE: case REACT_PORTAL_TYPE: invokeCallback = !0; break; case REACT_LAZY_TYPE: return invokeCallback = children._init, mapIntoArray( invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback ); } } if (invokeCallback) { invokeCallback = children, callback = callback(invokeCallback); var childKey = nameSoFar === "" ? "." + getElementKey(invokeCallback, 0) : nameSoFar; return isArrayImpl(callback) ? (escapedPrefix = "", childKey != null && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) { return c; })) : callback != null && (isValidElement(callback) && (callback.key != null && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey( callback, escapedPrefix + (callback.key == null || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace( userProvidedKeyEscapeRegex, "$&/" ) + "/") + childKey ), nameSoFar !== "" && invokeCallback != null && isValidElement(invokeCallback) && invokeCallback.key == null && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback)), 1; } if (invokeCallback = 0, childKey = nameSoFar === "" ? "." : nameSoFar + ":", isArrayImpl(children)) for (var i = 0; i < children.length; i++) nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray( nameSoFar, array, escapedPrefix, type, callback ); else if (i = getIteratorFn(children), typeof i == "function") for (i === children.entries && (didWarnAboutMaps || console.warn( "Using Maps as children is not supported. Use an array of keyed ReactElements instead." ), didWarnAboutMaps = !0), children = i.call(children), i = 0; !(nameSoFar = children.next()).done; ) nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray( nameSoFar, array, escapedPrefix, type, callback ); else if (type === "object") { if (typeof children.then == "function") return mapIntoArray( resolveThenable(children), array, escapedPrefix, nameSoFar, callback ); throw array = String(children), Error( "Objects are not valid as a React child (found: " + (array === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead." ); } return invokeCallback; } function mapChildren(children, func, context) { if (children == null) return children; var result = [], count = 0; return mapIntoArray(children, result, "", "", function(child) { return func.call(context, child, count++); }), result; } function lazyInitializer(payload) { if (payload._status === -1) { var ioInfo = payload._ioInfo; ioInfo != null && (ioInfo.start = ioInfo.end = performance.now()), ioInfo = payload._result; var thenable = ioInfo(); if (thenable.then( function(moduleObject) { if (payload._status === 0 || payload._status === -1) { payload._status = 1, payload._result = moduleObject; var _ioInfo = payload._ioInfo; _ioInfo != null && (_ioInfo.end = performance.now()), thenable.status === void 0 && (thenable.status = "fulfilled", thenable.value = moduleObject); } }, function(error) { if (payload._status === 0 || payload._status === -1) { payload._status = 2, payload._result = error; var _ioInfo2 = payload._ioInfo; _ioInfo2 != null && (_ioInfo2.end = performance.now()), thenable.status === void 0 && (thenable.status = "rejected", thenable.reason = error); } } ), ioInfo = payload._ioInfo, ioInfo != null) { ioInfo.value = thenable; var displayName = thenable.displayName; typeof displayName == "string" && (ioInfo.name = displayName); } payload._status === -1 && (payload._status = 0, payload._result = thenable); } if (payload._status === 1) return ioInfo = payload._result, ioInfo === void 0 && console.error( `lazy: Expected the result of a dynamic import() call. Instead received: %s Your code should look like: const MyComponent = lazy(() => import('./MyComponent')) Did you accidentally put curly braces around the import?`, ioInfo ), "default" in ioInfo || console.error( `lazy: Expected the result of a dynamic import() call. Instead received: %s Your code should look like: const MyComponent = lazy(() => import('./MyComponent'))`, ioInfo ), ioInfo.default; throw payload._result; } function resolveDispatcher() { var dispatcher = ReactSharedInternals.H; return dispatcher === null && console.error( `Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: 1. You might have mismatching versions of React and the renderer (such as React DOM) 2. You might be breaking the Rules of Hooks 3. You might have more than one copy of React in the same app See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.` ), dispatcher; } function releaseAsyncTransition() { ReactSharedInternals.asyncTransitions--; } function enqueueTask(task) { if (enqueueTaskImpl === null) try { var requireString = ("require" + Math.random()).slice(0, 7); enqueueTaskImpl = (module && module[requireString]).call( module, "timers" ).setImmediate; } catch { enqueueTaskImpl = function(callback) { didWarnAboutMessageChannel === !1 && (didWarnAboutMessageChannel = !0, typeof MessageChannel > "u" && console.error( "This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning." )); var channel = new MessageChannel(); channel.port1.onmessage = callback, channel.port2.postMessage(void 0); }; } return enqueueTaskImpl(task); } function aggregateErrors(errors) { return 1 < errors.length && typeof AggregateError == "function" ? new AggregateError(errors) : errors[0]; } function popActScope(prevActQueue, prevActScopeDepth) { prevActScopeDepth !== actScopeDepth - 1 && console.error( "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. " ), actScopeDepth = prevActScopeDepth; } function recursivelyFlushAsyncActWork(returnValue, resolve, reject) { var queue = ReactSharedInternals.actQueue; if (queue !== null) if (queue.length !== 0) try { flushActQueue(queue), enqueueTask(function() { return recursivelyFlushAsyncActWork(returnValue, resolve, reject); }); return; } catch (error) { ReactSharedInternals.thrownErrors.push(error); } else ReactSharedInternals.actQueue = null; 0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue); } function flushActQueue(queue) { if (!isFlushing) { isFlushing = !0; var i = 0; try { for (; i < queue.length; i++) { var callback = queue[i]; do { ReactSharedInternals.didUsePromise = !1; var continuation = callback(!1); if (continuation !== null) { if (ReactSharedInternals.didUsePromise) { queue[i] = callback, queue.splice(0, i); return; } callback = continuation; } else break; } while (!0); } queue.length = 0; } catch (error) { queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error); } finally { isFlushing = !1; } } } typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = { isMounted: function() { return !1; }, enqueueForceUpdate: function(publicInstance) { warnNoop(publicInstance, "forceUpdate"); }, enqueueReplaceState: function(publicInstance) { warnNoop(publicInstance, "replaceState"); }, enqueueSetState: function(publicInstance) { warnNoop(publicInstance, "setState"); } }, assign = Object.assign, emptyObject = {}; Object.freeze(emptyObject), Component.prototype.isReactComponent = {}, Component.prototype.setState = function(partialState, callback) { if (typeof partialState != "object" && typeof partialState != "function" && partialState != null) throw Error( "takes an object of state variables to update or a function which returns an object of state variables." ); this.updater.enqueueSetState(this, partialState, callback, "setState"); }, Component.prototype.forceUpdate = function(callback) { this.updater.enqueueForceUpdate(this, callback, "forceUpdate"); }; var deprecatedAPIs = { isMounted: [ "isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks." ], replaceState: [ "replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)." ] }; for (fnName in deprecatedAPIs) deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); ComponentDummy.prototype = Component.prototype, deprecatedAPIs = PureComponent2.prototype = new ComponentDummy(), deprecatedAPIs.constructor = PureComponent2, assign(deprecatedAPIs, Component.prototype), deprecatedAPIs.isPureReactComponent = !0; var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), ReactSharedInternals = { H: null, A: null, T: null, S: null, actQueue: null, asyncTransitions: 0, isBatchingLegacy: !1, didScheduleLegacyUpdate: !1, didUsePromise: !1, thrownErrors: [], getCurrentStack: null, recentlyCreatedOwnerStacks: 0 }, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() { return null; }; deprecatedAPIs = { react_stack_bottom_frame: function(callStackForError) { return callStackForError(); } }; var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime, didWarnAboutElementRef = {}, unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind( deprecatedAPIs, UnknownOwner )(), unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner)), didWarnAboutMaps = !1, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = typeof reportError == "function" ? reportError : function(error) { if (typeof window == "object" && typeof window.ErrorEvent == "function") { var event = new window.ErrorEvent("error", { bubbles: !0, cancelable: !0, message: typeof error == "object" && error !== null && typeof error.message == "string" ? String(error.message) : String(error), error }); if (!window.dispatchEvent(event)) return; } else if (typeof process == "object" && typeof process.emit == "function") { process.emit("uncaughtException", error); return; } console.error(error); }, didWarnAboutMessageChannel = !1, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = !1, isFlushing = !1, queueSeveralMicrotasks = typeof queueMicrotask == "function" ? function(callback) { queueMicrotask(function() { return queueMicrotask(callback); }); } : enqueueTask; deprecatedAPIs = Object.freeze({ __proto__: null, c: function(size) { return resolveDispatcher().useMemoCache(size); } }); var fnName = { map: mapChildren, forEach: function(children, forEachFunc, forEachContext) { mapChildren( children, function() { forEachFunc.apply(this, arguments); }, forEachContext ); }, count: function(children) { var n = 0; return mapChildren(children, function() { n++; }), n; }, toArray: function(children) { return mapChildren(children, function(child) { return child; }) || []; }, only: function(children) { if (!isValidElement(children)) throw Error( "React.Children.only expected to receive a single React element child." ); return children; } }; exports.Activity = REACT_ACTIVITY_TYPE, exports.Children = fnName, exports.Component = Component, exports.Fragment = REACT_FRAGMENT_TYPE, exports.Profiler = REACT_PROFILER_TYPE, exports.PureComponent = PureComponent2, exports.StrictMode = REACT_STRICT_MODE_TYPE, exports.Suspense = REACT_SUSPENSE_TYPE, exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals, exports.__COMPILER_RUNTIME = deprecatedAPIs, exports.act = function(callback) { var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth; actScopeDepth++; var queue = ReactSharedInternals.actQueue = prevActQueue !== null ? prevActQueue : [], didAwaitActCall = !1; try { var result = callback(); } catch (error) { ReactSharedInternals.thrownErrors.push(error); } if (0 < ReactSharedInternals.thrownErrors.length) throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback; if (result !== null && typeof result == "object" && typeof result.then == "function") { var thenable = result; return queueSeveralMicrotasks(function() { didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = !0, console.error( "You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);" )); }), { then: function(resolve, reject) { didAwaitActCall = !0, thenable.then( function(returnValue) { if (popActScope(prevActQueue, prevActScopeDepth), prevActScopeDepth === 0) { try { flushActQueue(queue), enqueueTask(function() { return recursivelyFlushAsyncActWork( returnValue, resolve, reject ); }); } catch (error$0) { ReactSharedInternals.thrownErrors.push(error$0); } if (0 < ReactSharedInternals.thrownErrors.length) { var _thrownError = aggregateErrors( ReactSharedInternals.thrownErrors ); ReactSharedInternals.thrownErrors.length = 0, reject(_thrownError); } } else resolve(returnValue); }, function(error) { popActScope(prevActQueue, prevActScopeDepth), 0 < ReactSharedInternals.thrownErrors.length && (error = aggregateErrors( ReactSharedInterna