// ==UserScript== // @name 网盘批量分享工具(支持蓝奏云,115网盘,123网盘,百度网盘,夸克网盘,阿里云盘,天翼网盘,迅雷网盘,中国移动网盘,UC网盘) // @namespace dreamlove // @version 3.0.0 // @author superBiuBiu // @description 网盘文件批量分享,目前支持蓝奏云,115网盘,123网盘,百度网盘,夸克网盘,阿里云盘,天翼网盘,迅雷网盘,中国移动网盘,UC网盘~ // @iconURL https://www.google.com/s2/favicons?domain=dreamlove.top // @supportURL https://github.com/superBiuBiuMan/sharelink/ // @match https://pan.xunlei.com/** // @match https://drive.uc.cn/** // @match https://pan.baidu.com/disk/main* // @match https://pan.baidu.com/disk/synchronization* // @match https://cloud.189.cn/** // @match https://pan.quark.cn/** // @match https://www.aliyundrive.com/** // @match https://www.alipan.com/** // @match https://yun.139.com/** // @match https://115.com/** // @match https://lanzou.com/u // @match https://www.lanzou.com/u // @match https://www.lanzou.com/account.php // @match https://up.woozooo.com/u // @match https://up.woozooo.com/mydisk.php // @match https://pc.woozooo.com/u // @match https://pc.woozooo.com/mydisk.php // @match https://lanzou.com/** // @match https://www.lanzou.com/** // @match https://pan.lanzou.com/** // @require https://cdnjs.cloudflare.com/ajax/libs/react/18.3.1/umd/react.production.min.js // @require https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.3.1/umd/react-dom.production.min.js // @require https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.mini.min.js // @connect webapi.115.com // @connect drive-pc.quark.cn // @connect api-pan.xunlei.com // @connect api.aliyundrive.com // @connect pc-api.uc.cn // @grant GM_addStyle // @grant GM_xmlhttpRequest // @grant unsafeWindow // @run-at document-body // @downloadURL none // ==/UserScript== (e=>{if(typeof GM_addStyle=="function"){GM_addStyle(e);return}const t=document.createElement("style");t.textContent=e,document.head.append(t)})(' @charset "UTF-8";*,:before,:after{box-sizing:border-box;border-color:currentColor;border-style:solid;border-width:0}#app{width:100%;height:100%}html{box-sizing:border-box;width:100%;height:100%;line-height:1.5;-moz-tab-size:4;tab-size:4;text-size-adjust:100%}body{width:100%;height:100%;margin:0;font-family:Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,\u5FAE\u8F6F\u96C5\u9ED1,Arial,sans-serif;line-height:inherit;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-collapse:collapse;border-color:inherit}button,input,optgroup,select,textarea{padding:0;margin:0;font-family:inherit;font-size:100%;line-height:inherit;color:inherit}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px}::-webkit-file-upload-button{font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{padding:0;margin:0}legend{padding:0}ol,ul,menu{padding:0;margin:0;list-style:none}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,video{max-width:100%;height:auto}[hidden]{display:none}.dark{color-scheme:dark}label{font-weight:700}*,*:before,*:after{box-sizing:inherit}a:focus,a:active{outline:none}a,a:focus,a:hover{color:inherit;text-decoration:none;cursor:pointer}div:focus{outline:none}.clearfix:after{display:block;height:0;clear:both;font-size:0;visibility:hidden;content:" "} '); (function (React, ReactDOM__default, XLSX) { 'use strict'; function _interopNamespaceDefault(e) { const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } }); if (e) { for (const k in e) { if (k !== 'default') { const d = Object.getOwnPropertyDescriptor(e, k); Object.defineProperty(n, k, d.get ? d : { enumerable: true, get: () => e[k] }); } } } n.default = e; return Object.freeze(n); } const React__namespace = /*#__PURE__*/_interopNamespaceDefault(React); const ReactDOM__default__namespace = /*#__PURE__*/_interopNamespaceDefault(ReactDOM__default); const XLSX__namespace = /*#__PURE__*/_interopNamespaceDefault(XLSX); var __defProp = Object.defineProperty; var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value; var __publicField = (obj, key2, value) => __defNormalProp(obj, typeof key2 !== "symbol" ? key2 + "" : key2, value); var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; function getDefaultExportFromCjs(x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x; } var jsxRuntime = { exports: {} }; var reactJsxRuntime_production_min = {}; /** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var hasRequiredReactJsxRuntime_production_min; function requireReactJsxRuntime_production_min() { if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min; hasRequiredReactJsxRuntime_production_min = 1; var f = React, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true }; function q(c, a, g) { var b, d = {}, e = null, h = null; void 0 !== g && (e = "" + g); void 0 !== a.key && (e = "" + a.key); void 0 !== a.ref && (h = a.ref); for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]); if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]); return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current }; } reactJsxRuntime_production_min.Fragment = l; reactJsxRuntime_production_min.jsx = q; reactJsxRuntime_production_min.jsxs = q; return reactJsxRuntime_production_min; } var hasRequiredJsxRuntime; function requireJsxRuntime() { if (hasRequiredJsxRuntime) return jsxRuntime.exports; hasRequiredJsxRuntime = 1; { jsxRuntime.exports = requireReactJsxRuntime_production_min(); } return jsxRuntime.exports; } var jsxRuntimeExports = requireJsxRuntime(); var client = {}; var hasRequiredClient; function requireClient() { if (hasRequiredClient) return client; hasRequiredClient = 1; var m = ReactDOM__default; { client.createRoot = m.createRoot; client.hydrateRoot = m.hydrateRoot; } return client; } var clientExports = requireClient(); const ReactDOM = /* @__PURE__ */ getDefaultExportFromCjs(clientExports); const BaseCloudInfo = React.createContext({ name: "1", type: "2" }); const useBaseCloudInfo = () => { return React.useContext(BaseCloudInfo); }; function r(e) { var t, f, n = ""; if ("string" == typeof e || "number" == typeof e) n += e; else if ("object" == typeof e) if (Array.isArray(e)) { var o = e.length; for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f); } else for (f in e) e[f] && (n && (n += " "), n += f); return n; } function clsx() { for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t); return n; } function resolveProps(defaultProps2, props) { const output = { ...props }; for (const key2 in defaultProps2) { if (Object.prototype.hasOwnProperty.call(defaultProps2, key2)) { const propName = key2; if (propName === "components" || propName === "slots") { output[propName] = { ...defaultProps2[propName], ...output[propName] }; } else if (propName === "componentsProps" || propName === "slotProps") { const defaultSlotProps = defaultProps2[propName]; const slotProps = props[propName]; if (!slotProps) { output[propName] = defaultSlotProps || {}; } else if (!defaultSlotProps) { output[propName] = slotProps; } else { output[propName] = { ...slotProps }; for (const slotKey in defaultSlotProps) { if (Object.prototype.hasOwnProperty.call(defaultSlotProps, slotKey)) { const slotPropName = slotKey; output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]); } } } } else if (output[propName] === void 0) { output[propName] = defaultProps2[propName]; } } } return output; } function composeClasses(slots, getUtilityClass, classes = void 0) { const output = {}; for (const slotName in slots) { const slot = slots[slotName]; let buffer = ""; let start2 = true; for (let i = 0; i < slot.length; i += 1) { const value = slot[i]; if (value) { buffer += (start2 === true ? "" : " ") + getUtilityClass(value); start2 = false; if (classes && classes[value]) { buffer += " " + classes[value]; } } } output[slotName] = buffer; } return output; } function formatMuiErrorMessage(code, ...args) { const url = new URL(`https://mui.com/production-error/?code=${code}`); args.forEach((arg2) => url.searchParams.append("args[]", arg2)); return `Minified MUI error #${code}; visit ${url} for the full message.`; } function clamp(val, min2 = Number.MIN_SAFE_INTEGER, max2 = Number.MAX_SAFE_INTEGER) { return Math.max(min2, Math.min(val, max2)); } function clampWrapper(value, min2 = 0, max2 = 1) { return clamp(value, min2, max2); } function hexToRgb(color2) { color2 = color2.slice(1); const re = new RegExp(`.{1,${color2.length >= 6 ? 2 : 1}}`, "g"); let colors = color2.match(re); if (colors && colors[0].length === 1) { colors = colors.map((n) => n + n); } return colors ? `rgb${colors.length === 4 ? "a" : ""}(${colors.map((n, index) => { return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1e3) / 1e3; }).join(", ")})` : ""; } function decomposeColor(color2) { if (color2.type) { return color2; } if (color2.charAt(0) === "#") { return decomposeColor(hexToRgb(color2)); } const marker = color2.indexOf("("); const type = color2.substring(0, marker); if (!["rgb", "rgba", "hsl", "hsla", "color"].includes(type)) { throw new Error(formatMuiErrorMessage(9, color2)); } let values2 = color2.substring(marker + 1, color2.length - 1); let colorSpace; if (type === "color") { values2 = values2.split(" "); colorSpace = values2.shift(); if (values2.length === 4 && values2[3].charAt(0) === "/") { values2[3] = values2[3].slice(1); } if (!["srgb", "display-p3", "a98-rgb", "prophoto-rgb", "rec-2020"].includes(colorSpace)) { throw new Error(formatMuiErrorMessage(10, colorSpace)); } } else { values2 = values2.split(","); } values2 = values2.map((value) => parseFloat(value)); return { type, values: values2, colorSpace }; } const colorChannel = (color2) => { const decomposedColor = decomposeColor(color2); return decomposedColor.values.slice(0, 3).map((val, idx) => decomposedColor.type.includes("hsl") && idx !== 0 ? `${val}%` : val).join(" "); }; const private_safeColorChannel = (color2, warning) => { try { return colorChannel(color2); } catch (error) { return color2; } }; function recomposeColor(color2) { const { type, colorSpace } = color2; let { values: values2 } = color2; if (type.includes("rgb")) { values2 = values2.map((n, i) => i < 3 ? parseInt(n, 10) : n); } else if (type.includes("hsl")) { values2[1] = `${values2[1]}%`; values2[2] = `${values2[2]}%`; } if (type.includes("color")) { values2 = `${colorSpace} ${values2.join(" ")}`; } else { values2 = `${values2.join(", ")}`; } return `${type}(${values2})`; } function hslToRgb(color2) { color2 = decomposeColor(color2); const { values: values2 } = color2; const h = values2[0]; const s = values2[1] / 100; const l = values2[2] / 100; const a = s * Math.min(l, 1 - l); const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1); let type = "rgb"; const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)]; if (color2.type === "hsla") { type += "a"; rgb.push(values2[3]); } return recomposeColor({ type, values: rgb }); } function getLuminance(color2) { color2 = decomposeColor(color2); let rgb = color2.type === "hsl" || color2.type === "hsla" ? decomposeColor(hslToRgb(color2)).values : color2.values; rgb = rgb.map((val) => { if (color2.type !== "color") { val /= 255; } return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4; }); return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3)); } function getContrastRatio(foreground, background) { const lumA = getLuminance(foreground); const lumB = getLuminance(background); return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05); } function alpha(color2, value) { color2 = decomposeColor(color2); value = clampWrapper(value); if (color2.type === "rgb" || color2.type === "hsl") { color2.type += "a"; } if (color2.type === "color") { color2.values[3] = `/${value}`; } else { color2.values[3] = value; } return recomposeColor(color2); } function private_safeAlpha(color2, value, warning) { try { return alpha(color2, value); } catch (error) { return color2; } } function darken(color2, coefficient) { color2 = decomposeColor(color2); coefficient = clampWrapper(coefficient); if (color2.type.includes("hsl")) { color2.values[2] *= 1 - coefficient; } else if (color2.type.includes("rgb") || color2.type.includes("color")) { for (let i = 0; i < 3; i += 1) { color2.values[i] *= 1 - coefficient; } } return recomposeColor(color2); } function private_safeDarken(color2, coefficient, warning) { try { return darken(color2, coefficient); } catch (error) { return color2; } } function lighten(color2, coefficient) { color2 = decomposeColor(color2); coefficient = clampWrapper(coefficient); if (color2.type.includes("hsl")) { color2.values[2] += (100 - color2.values[2]) * coefficient; } else if (color2.type.includes("rgb")) { for (let i = 0; i < 3; i += 1) { color2.values[i] += (255 - color2.values[i]) * coefficient; } } else if (color2.type.includes("color")) { for (let i = 0; i < 3; i += 1) { color2.values[i] += (1 - color2.values[i]) * coefficient; } } return recomposeColor(color2); } function private_safeLighten(color2, coefficient, warning) { try { return lighten(color2, coefficient); } catch (error) { return color2; } } function emphasize(color2, coefficient = 0.15) { return getLuminance(color2) > 0.5 ? darken(color2, coefficient) : lighten(color2, coefficient); } function private_safeEmphasize(color2, coefficient, warning) { try { return emphasize(color2, coefficient); } catch (error) { return color2; } } var reactIs$1 = { exports: {} }; var reactIs_production = {}; /** * @license React * react-is.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var hasRequiredReactIs_production; function requireReactIs_production() { if (hasRequiredReactIs_production) return reactIs_production; hasRequiredReactIs_production = 1; var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"); var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"); function typeOf2(object) { if ("object" === typeof object && null !== object) { var $$typeof = object.$$typeof; switch ($$typeof) { case REACT_ELEMENT_TYPE: switch (object = object.type, object) { case REACT_FRAGMENT_TYPE: case REACT_PROFILER_TYPE: case REACT_STRICT_MODE_TYPE: case REACT_SUSPENSE_TYPE: case REACT_SUSPENSE_LIST_TYPE: case REACT_VIEW_TRANSITION_TYPE: return object; default: switch (object = object && object.$$typeof, object) { case REACT_CONTEXT_TYPE: case REACT_FORWARD_REF_TYPE: case REACT_LAZY_TYPE: case REACT_MEMO_TYPE: return object; case REACT_CONSUMER_TYPE: return object; default: return $$typeof; } } case REACT_PORTAL_TYPE: return $$typeof; } } } reactIs_production.ContextConsumer = REACT_CONSUMER_TYPE; reactIs_production.ContextProvider = REACT_CONTEXT_TYPE; reactIs_production.Element = REACT_ELEMENT_TYPE; reactIs_production.ForwardRef = REACT_FORWARD_REF_TYPE; reactIs_production.Fragment = REACT_FRAGMENT_TYPE; reactIs_production.Lazy = REACT_LAZY_TYPE; reactIs_production.Memo = REACT_MEMO_TYPE; reactIs_production.Portal = REACT_PORTAL_TYPE; reactIs_production.Profiler = REACT_PROFILER_TYPE; reactIs_production.StrictMode = REACT_STRICT_MODE_TYPE; reactIs_production.Suspense = REACT_SUSPENSE_TYPE; reactIs_production.SuspenseList = REACT_SUSPENSE_LIST_TYPE; reactIs_production.isContextConsumer = function(object) { return typeOf2(object) === REACT_CONSUMER_TYPE; }; reactIs_production.isContextProvider = function(object) { return typeOf2(object) === REACT_CONTEXT_TYPE; }; reactIs_production.isElement = function(object) { return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE; }; reactIs_production.isForwardRef = function(object) { return typeOf2(object) === REACT_FORWARD_REF_TYPE; }; reactIs_production.isFragment = function(object) { return typeOf2(object) === REACT_FRAGMENT_TYPE; }; reactIs_production.isLazy = function(object) { return typeOf2(object) === REACT_LAZY_TYPE; }; reactIs_production.isMemo = function(object) { return typeOf2(object) === REACT_MEMO_TYPE; }; reactIs_production.isPortal = function(object) { return typeOf2(object) === REACT_PORTAL_TYPE; }; reactIs_production.isProfiler = function(object) { return typeOf2(object) === REACT_PROFILER_TYPE; }; reactIs_production.isStrictMode = function(object) { return typeOf2(object) === REACT_STRICT_MODE_TYPE; }; reactIs_production.isSuspense = function(object) { return typeOf2(object) === REACT_SUSPENSE_TYPE; }; reactIs_production.isSuspenseList = function(object) { return typeOf2(object) === REACT_SUSPENSE_LIST_TYPE; }; reactIs_production.isValidElementType = function(type) { return "string" === typeof type || "function" === typeof type || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || "object" === typeof type && null !== type && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type.getModuleId) ? true : false; }; reactIs_production.typeOf = typeOf2; return reactIs_production; } var hasRequiredReactIs$1; function requireReactIs$1() { if (hasRequiredReactIs$1) return reactIs$1.exports; hasRequiredReactIs$1 = 1; { reactIs$1.exports = /* @__PURE__ */ requireReactIs_production(); } return reactIs$1.exports; } var reactIsExports = /* @__PURE__ */ requireReactIs$1(); function isPlainObject$1(item) { if (typeof item !== "object" || item === null) { return false; } const prototype = Object.getPrototypeOf(item); return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item); } function deepClone$1(source) { if (/* @__PURE__ */ React__namespace.isValidElement(source) || reactIsExports.isValidElementType(source) || !isPlainObject$1(source)) { return source; } const output = {}; Object.keys(source).forEach((key2) => { output[key2] = deepClone$1(source[key2]); }); return output; } function deepmerge(target, source, options = { clone: true }) { const output = options.clone ? { ...target } : target; if (isPlainObject$1(target) && isPlainObject$1(source)) { Object.keys(source).forEach((key2) => { if (/* @__PURE__ */ React__namespace.isValidElement(source[key2]) || reactIsExports.isValidElementType(source[key2])) { output[key2] = source[key2]; } else if (isPlainObject$1(source[key2]) && // Avoid prototype pollution Object.prototype.hasOwnProperty.call(target, key2) && isPlainObject$1(target[key2])) { output[key2] = deepmerge(target[key2], source[key2], options); } else if (options.clone) { output[key2] = isPlainObject$1(source[key2]) ? deepClone$1(source[key2]) : source[key2]; } else { output[key2] = source[key2]; } }); } return output; } function capitalize(string) { if (typeof string !== "string") { throw new Error(formatMuiErrorMessage(7)); } return string.charAt(0).toUpperCase() + string.slice(1); } function createChainedFunction(...funcs) { return funcs.reduce((acc, func) => { if (func == null) { return acc; } return function chainedFunction(...args) { acc.apply(this, args); func.apply(this, args); }; }, () => { }); } function debounce$1(func, wait = 166) { let timeout; function debounced(...args) { const later = () => { func.apply(this, args); }; clearTimeout(timeout); timeout = setTimeout(later, wait); } debounced.clear = () => { clearTimeout(timeout); }; return debounced; } function isMuiElement(element, muiNames) { var _a, _b, _c; return /* @__PURE__ */ React__namespace.isValidElement(element) && muiNames.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45 // eslint-disable-next-line no-underscore-dangle element.type.muiName ?? ((_c = (_b = (_a = element.type) == null ? void 0 : _a._payload) == null ? void 0 : _b.value) == null ? void 0 : _c.muiName) ) !== -1; } function ownerDocument(node2) { return node2 && node2.ownerDocument || document; } function ownerWindow(node2) { const doc = ownerDocument(node2); return doc.defaultView || window; } function setRef(ref, value) { if (typeof ref === "function") { ref(value); } else if (ref) { ref.current = value; } } const useEnhancedEffect = typeof window !== "undefined" ? React__namespace.useLayoutEffect : React__namespace.useEffect; let globalId = 0; function useGlobalId(idOverride) { const [defaultId, setDefaultId] = React__namespace.useState(idOverride); const id = idOverride || defaultId; React__namespace.useEffect(() => { if (defaultId == null) { globalId += 1; setDefaultId(`mui-${globalId}`); } }, [defaultId]); return id; } const safeReact = { ...React__namespace }; const maybeReactUseId = safeReact.useId; function useId(idOverride) { if (maybeReactUseId !== void 0) { const reactId = maybeReactUseId(); return idOverride ?? reactId; } return useGlobalId(idOverride); } function useControlled({ controlled, default: defaultProp, name, state = "value" }) { const { current: isControlled } = React__namespace.useRef(controlled !== void 0); const [valueState, setValue] = React__namespace.useState(defaultProp); const value = isControlled ? controlled : valueState; const setValueIfUncontrolled = React__namespace.useCallback((newValue) => { if (!isControlled) { setValue(newValue); } }, []); return [value, setValueIfUncontrolled]; } function useEventCallback(fn2) { const ref = React__namespace.useRef(fn2); useEnhancedEffect(() => { ref.current = fn2; }); return React__namespace.useRef((...args) => ( // @ts-expect-error hide `this` (0, ref.current)(...args) )).current; } function useForkRef(...refs) { const cleanupRef = React__namespace.useRef(void 0); const refEffect = React__namespace.useCallback((instance) => { const cleanups = refs.map((ref) => { if (ref == null) { return null; } if (typeof ref === "function") { const refCallback = ref; const refCleanup = refCallback(instance); return typeof refCleanup === "function" ? refCleanup : () => { refCallback(null); }; } ref.current = instance; return () => { ref.current = null; }; }); return () => { cleanups.forEach((refCleanup) => refCleanup == null ? void 0 : refCleanup()); }; }, refs); return React__namespace.useMemo(() => { if (refs.every((ref) => ref == null)) { return null; } return (value) => { if (cleanupRef.current) { cleanupRef.current(); cleanupRef.current = void 0; } if (value != null) { cleanupRef.current = refEffect(value); } }; }, refs); } const UNINITIALIZED = {}; function useLazyRef(init, initArg) { const ref = React__namespace.useRef(UNINITIALIZED); if (ref.current === UNINITIALIZED) { ref.current = init(initArg); } return ref; } const EMPTY = []; function useOnMount(fn2) { React__namespace.useEffect(fn2, EMPTY); } class Timeout { constructor() { __publicField(this, "currentId", null); __publicField(this, "clear", () => { if (this.currentId !== null) { clearTimeout(this.currentId); this.currentId = null; } }); __publicField(this, "disposeEffect", () => { return this.clear; }); } static create() { return new Timeout(); } /** * Executes `fn` after `delay`, clearing any previously scheduled call. */ start(delay, fn2) { this.clear(); this.currentId = setTimeout(() => { this.currentId = null; fn2(); }, delay); } } function useTimeout() { const timeout = useLazyRef(Timeout.create).current; useOnMount(timeout.disposeEffect); return timeout; } function isFocusVisible(element) { try { return element.matches(":focus-visible"); } catch (error) { } return false; } function getScrollbarSize(win = window) { const documentWidth = win.document.documentElement.clientWidth; return win.innerWidth - documentWidth; } const usePreviousProps = (value) => { const ref = React__namespace.useRef({}); React__namespace.useEffect(() => { ref.current = value; }); return ref.current; }; const defaultGenerator = (componentName) => componentName; const createClassNameGenerator = () => { let generate = defaultGenerator; return { configure(generator) { generate = generator; }, generate(componentName) { return generate(componentName); }, reset() { generate = defaultGenerator; } }; }; const ClassNameGenerator = createClassNameGenerator(); const globalStateClasses = { active: "active", checked: "checked", completed: "completed", disabled: "disabled", error: "error", expanded: "expanded", focused: "focused", focusVisible: "focusVisible", open: "open", readOnly: "readOnly", required: "required", selected: "selected" }; function generateUtilityClass(componentName, slot, globalStatePrefix = "Mui") { const globalStateClass = globalStateClasses[slot]; return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`; } function generateUtilityClasses(componentName, slots, globalStatePrefix = "Mui") { const result = {}; slots.forEach((slot) => { result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix); }); return result; } function isHostComponent$1(element) { return typeof element === "string"; } function appendOwnerState(elementType, otherProps, ownerState) { if (elementType === void 0 || isHostComponent$1(elementType)) { return otherProps; } return { ...otherProps, ownerState: { ...otherProps.ownerState, ...ownerState } }; } function extractEventHandlers(object, excludeKeys = []) { if (object === void 0) { return {}; } const result = {}; Object.keys(object).filter((prop) => prop.match(/^on[A-Z]/) && typeof object[prop] === "function" && !excludeKeys.includes(prop)).forEach((prop) => { result[prop] = object[prop]; }); return result; } function omitEventHandlers(object) { if (object === void 0) { return {}; } const result = {}; Object.keys(object).filter((prop) => !(prop.match(/^on[A-Z]/) && typeof object[prop] === "function")).forEach((prop) => { result[prop] = object[prop]; }); return result; } function mergeSlotProps$1(parameters) { const { getSlotProps, additionalProps, externalSlotProps, externalForwardedProps, className } = parameters; if (!getSlotProps) { const joinedClasses2 = clsx(additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className); const mergedStyle2 = { ...additionalProps == null ? void 0 : additionalProps.style, ...externalForwardedProps == null ? void 0 : externalForwardedProps.style, ...externalSlotProps == null ? void 0 : externalSlotProps.style }; const props2 = { ...additionalProps, ...externalForwardedProps, ...externalSlotProps }; if (joinedClasses2.length > 0) { props2.className = joinedClasses2; } if (Object.keys(mergedStyle2).length > 0) { props2.style = mergedStyle2; } return { props: props2, internalRef: void 0 }; } const eventHandlers = extractEventHandlers({ ...externalForwardedProps, ...externalSlotProps }); const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps); const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps); const internalSlotProps = getSlotProps(eventHandlers); const joinedClasses = clsx(internalSlotProps == null ? void 0 : internalSlotProps.className, additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className); const mergedStyle = { ...internalSlotProps == null ? void 0 : internalSlotProps.style, ...additionalProps == null ? void 0 : additionalProps.style, ...externalForwardedProps == null ? void 0 : externalForwardedProps.style, ...externalSlotProps == null ? void 0 : externalSlotProps.style }; const props = { ...internalSlotProps, ...additionalProps, ...otherPropsWithoutEventHandlers, ...componentsPropsWithoutEventHandlers }; if (joinedClasses.length > 0) { props.className = joinedClasses; } if (Object.keys(mergedStyle).length > 0) { props.style = mergedStyle; } return { props, internalRef: internalSlotProps.ref }; } function resolveComponentProps(componentProps, ownerState, slotState) { if (typeof componentProps === "function") { return componentProps(ownerState, slotState); } return componentProps; } function useSlotProps(parameters) { var _a; const { elementType, externalSlotProps, ownerState, skipResolvingSlotProps = false, ...other } = parameters; const resolvedComponentsProps = skipResolvingSlotProps ? {} : resolveComponentProps(externalSlotProps, ownerState); const { props: mergedProps, internalRef } = mergeSlotProps$1({ ...other, externalSlotProps: resolvedComponentsProps }); const ref = useForkRef(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, (_a = parameters.additionalProps) == null ? void 0 : _a.ref); const props = appendOwnerState(elementType, { ...mergedProps, ref }, ownerState); return props; } function getReactElementRef(element) { var _a; if (parseInt(React__namespace.version, 10) >= 19) { return ((_a = element == null ? void 0 : element.props) == null ? void 0 : _a.ref) || null; } return (element == null ? void 0 : element.ref) || null; } function merge(acc, item) { if (!item) { return acc; } return deepmerge(acc, item, { clone: false // No need to clone deep, it's way faster. }); } function sortContainerQueries(theme, css2) { if (!theme.containerQueries) { return css2; } const sorted = Object.keys(css2).filter((key2) => key2.startsWith("@container")).sort((a, b) => { var _a, _b; const regex = /min-width:\s*([0-9.]+)/; return +(((_a = a.match(regex)) == null ? void 0 : _a[1]) || 0) - +(((_b = b.match(regex)) == null ? void 0 : _b[1]) || 0); }); if (!sorted.length) { return css2; } return sorted.reduce((acc, key2) => { const value = css2[key2]; delete acc[key2]; acc[key2] = value; return acc; }, { ...css2 }); } function isCqShorthand(breakpointKeys, value) { return value === "@" || value.startsWith("@") && (breakpointKeys.some((key2) => value.startsWith(`@${key2}`)) || !!value.match(/^@\d/)); } function getContainerQuery(theme, shorthand) { const matches = shorthand.match(/^@([^/]+)?\/?(.+)?$/); if (!matches) { return null; } const [, containerQuery, containerName] = matches; const value = Number.isNaN(+containerQuery) ? containerQuery || 0 : +containerQuery; return theme.containerQueries(containerName).up(value); } function cssContainerQueries(themeInput) { const toContainerQuery = (mediaQuery, name) => mediaQuery.replace("@media", name ? `@container ${name}` : "@container"); function attachCq(node22, name) { node22.up = (...args) => toContainerQuery(themeInput.breakpoints.up(...args), name); node22.down = (...args) => toContainerQuery(themeInput.breakpoints.down(...args), name); node22.between = (...args) => toContainerQuery(themeInput.breakpoints.between(...args), name); node22.only = (...args) => toContainerQuery(themeInput.breakpoints.only(...args), name); node22.not = (...args) => { const result = toContainerQuery(themeInput.breakpoints.not(...args), name); if (result.includes("not all and")) { return result.replace("not all and ", "").replace("min-width:", "width<").replace("max-width:", "width>").replace("and", "or"); } return result; }; } const node2 = {}; const containerQueries = (name) => { attachCq(node2, name); return node2; }; attachCq(containerQueries); return { ...themeInput, containerQueries }; } const values$1 = { xs: 0, // phone sm: 600, // tablet md: 900, // small laptop lg: 1200, // desktop xl: 1536 // large screen }; const defaultBreakpoints = { // Sorted ASC by size. That's important. // It can't be configured as it's used statically for propTypes. keys: ["xs", "sm", "md", "lg", "xl"], up: (key2) => `@media (min-width:${values$1[key2]}px)` }; const defaultContainerQueries = { containerQueries: (containerName) => ({ up: (key2) => { let result = typeof key2 === "number" ? key2 : values$1[key2] || key2; if (typeof result === "number") { result = `${result}px`; } return containerName ? `@container ${containerName} (min-width:${result})` : `@container (min-width:${result})`; } }) }; function handleBreakpoints(props, propValue, styleFromPropValue) { const theme = props.theme || {}; if (Array.isArray(propValue)) { const themeBreakpoints = theme.breakpoints || defaultBreakpoints; return propValue.reduce((acc, item, index) => { acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]); return acc; }, {}); } if (typeof propValue === "object") { const themeBreakpoints = theme.breakpoints || defaultBreakpoints; return Object.keys(propValue).reduce((acc, breakpoint) => { if (isCqShorthand(themeBreakpoints.keys, breakpoint)) { const containerKey = getContainerQuery(theme.containerQueries ? theme : defaultContainerQueries, breakpoint); if (containerKey) { acc[containerKey] = styleFromPropValue(propValue[breakpoint], breakpoint); } } else if (Object.keys(themeBreakpoints.values || values$1).includes(breakpoint)) { const mediaKey = themeBreakpoints.up(breakpoint); acc[mediaKey] = styleFromPropValue(propValue[breakpoint], breakpoint); } else { const cssKey = breakpoint; acc[cssKey] = propValue[cssKey]; } return acc; }, {}); } const output = styleFromPropValue(propValue); return output; } function createEmptyBreakpointObject(breakpointsInput = {}) { var _a; const breakpointsInOrder = (_a = breakpointsInput.keys) == null ? void 0 : _a.reduce((acc, key2) => { const breakpointStyleKey = breakpointsInput.up(key2); acc[breakpointStyleKey] = {}; return acc; }, {}); return breakpointsInOrder || {}; } function removeUnusedBreakpoints(breakpointKeys, style2) { return breakpointKeys.reduce((acc, key2) => { const breakpointOutput = acc[key2]; const isBreakpointUnused = !breakpointOutput || Object.keys(breakpointOutput).length === 0; if (isBreakpointUnused) { delete acc[key2]; } return acc; }, style2); } function getPath(obj, path, checkVars = true) { if (!path || typeof path !== "string") { return null; } if (obj && obj.vars && checkVars) { const val = `vars.${path}`.split(".").reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj); if (val != null) { return val; } } return path.split(".").reduce((acc, item) => { if (acc && acc[item] != null) { return acc[item]; } return null; }, obj); } function getStyleValue$1(themeMapping, transform, propValueFinal, userValue = propValueFinal) { let value; if (typeof themeMapping === "function") { value = themeMapping(propValueFinal); } else if (Array.isArray(themeMapping)) { value = themeMapping[propValueFinal] || userValue; } else { value = getPath(themeMapping, propValueFinal) || userValue; } if (transform) { value = transform(value, userValue, themeMapping); } return value; } function style$1(options) { const { prop, cssProperty = options.prop, themeKey, transform } = options; const fn2 = (props) => { if (props[prop] == null) { return null; } const propValue = props[prop]; const theme = props.theme; const themeMapping = getPath(theme, themeKey) || {}; const styleFromPropValue = (propValueFinal) => { let value = getStyleValue$1(themeMapping, transform, propValueFinal); if (propValueFinal === value && typeof propValueFinal === "string") { value = getStyleValue$1(themeMapping, transform, `${prop}${propValueFinal === "default" ? "" : capitalize(propValueFinal)}`, propValueFinal); } if (cssProperty === false) { return value; } return { [cssProperty]: value }; }; return handleBreakpoints(props, propValue, styleFromPropValue); }; fn2.propTypes = {}; fn2.filterProps = [prop]; return fn2; } function memoize$1(fn2) { const cache = {}; return (arg2) => { if (cache[arg2] === void 0) { cache[arg2] = fn2(arg2); } return cache[arg2]; }; } const properties = { m: "margin", p: "padding" }; const directions = { t: "Top", r: "Right", b: "Bottom", l: "Left", x: ["Left", "Right"], y: ["Top", "Bottom"] }; const aliases = { marginX: "mx", marginY: "my", paddingX: "px", paddingY: "py" }; const getCssProperties = memoize$1((prop) => { if (prop.length > 2) { if (aliases[prop]) { prop = aliases[prop]; } else { return [prop]; } } const [a, b] = prop.split(""); const property = properties[a]; const direction = directions[b] || ""; return Array.isArray(direction) ? direction.map((dir) => property + dir) : [property + direction]; }); const marginKeys = ["m", "mt", "mr", "mb", "ml", "mx", "my", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginX", "marginY", "marginInline", "marginInlineStart", "marginInlineEnd", "marginBlock", "marginBlockStart", "marginBlockEnd"]; const paddingKeys = ["p", "pt", "pr", "pb", "pl", "px", "py", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "paddingX", "paddingY", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "paddingBlock", "paddingBlockStart", "paddingBlockEnd"]; [...marginKeys, ...paddingKeys]; function createUnaryUnit(theme, themeKey, defaultValue, propName) { const themeSpacing = getPath(theme, themeKey, true) ?? defaultValue; if (typeof themeSpacing === "number" || typeof themeSpacing === "string") { return (val) => { if (typeof val === "string") { return val; } if (typeof themeSpacing === "string") { if (themeSpacing.startsWith("var(") && val === 0) { return 0; } if (themeSpacing.startsWith("var(") && val === 1) { return themeSpacing; } return `calc(${val} * ${themeSpacing})`; } return themeSpacing * val; }; } if (Array.isArray(themeSpacing)) { return (val) => { if (typeof val === "string") { return val; } const abs2 = Math.abs(val); const transformed = themeSpacing[abs2]; if (val >= 0) { return transformed; } if (typeof transformed === "number") { return -transformed; } if (typeof transformed === "string" && transformed.startsWith("var(")) { return `calc(-1 * ${transformed})`; } return `-${transformed}`; }; } if (typeof themeSpacing === "function") { return themeSpacing; } return () => void 0; } function createUnarySpacing(theme) { return createUnaryUnit(theme, "spacing", 8); } function getValue(transformer, propValue) { if (typeof propValue === "string" || propValue == null) { return propValue; } return transformer(propValue); } function getStyleFromPropValue(cssProperties, transformer) { return (propValue) => cssProperties.reduce((acc, cssProperty) => { acc[cssProperty] = getValue(transformer, propValue); return acc; }, {}); } function resolveCssProperty(props, keys, prop, transformer) { if (!keys.includes(prop)) { return null; } const cssProperties = getCssProperties(prop); const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer); const propValue = props[prop]; return handleBreakpoints(props, propValue, styleFromPropValue); } function style(props, keys) { const transformer = createUnarySpacing(props.theme); return Object.keys(props).map((prop) => resolveCssProperty(props, keys, prop, transformer)).reduce(merge, {}); } function margin(props) { return style(props, marginKeys); } margin.propTypes = {}; margin.filterProps = marginKeys; function padding(props) { return style(props, paddingKeys); } padding.propTypes = {}; padding.filterProps = paddingKeys; function compose(...styles2) { const handlers = styles2.reduce((acc, style2) => { style2.filterProps.forEach((prop) => { acc[prop] = style2; }); return acc; }, {}); const fn2 = (props) => { return Object.keys(props).reduce((acc, prop) => { if (handlers[prop]) { return merge(acc, handlers[prop](props)); } return acc; }, {}); }; fn2.propTypes = {}; fn2.filterProps = styles2.reduce((acc, style2) => acc.concat(style2.filterProps), []); return fn2; } function borderTransform(value) { if (typeof value !== "number") { return value; } return `${value}px solid`; } function createBorderStyle(prop, transform) { return style$1({ prop, themeKey: "borders", transform }); } const border = createBorderStyle("border", borderTransform); const borderTop = createBorderStyle("borderTop", borderTransform); const borderRight = createBorderStyle("borderRight", borderTransform); const borderBottom = createBorderStyle("borderBottom", borderTransform); const borderLeft = createBorderStyle("borderLeft", borderTransform); const borderColor = createBorderStyle("borderColor"); const borderTopColor = createBorderStyle("borderTopColor"); const borderRightColor = createBorderStyle("borderRightColor"); const borderBottomColor = createBorderStyle("borderBottomColor"); const borderLeftColor = createBorderStyle("borderLeftColor"); const outline = createBorderStyle("outline", borderTransform); const outlineColor = createBorderStyle("outlineColor"); const borderRadius = (props) => { if (props.borderRadius !== void 0 && props.borderRadius !== null) { const transformer = createUnaryUnit(props.theme, "shape.borderRadius", 4); const styleFromPropValue = (propValue) => ({ borderRadius: getValue(transformer, propValue) }); return handleBreakpoints(props, props.borderRadius, styleFromPropValue); } return null; }; borderRadius.propTypes = {}; borderRadius.filterProps = ["borderRadius"]; compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius, outline, outlineColor); const gap = (props) => { if (props.gap !== void 0 && props.gap !== null) { const transformer = createUnaryUnit(props.theme, "spacing", 8); const styleFromPropValue = (propValue) => ({ gap: getValue(transformer, propValue) }); return handleBreakpoints(props, props.gap, styleFromPropValue); } return null; }; gap.propTypes = {}; gap.filterProps = ["gap"]; const columnGap = (props) => { if (props.columnGap !== void 0 && props.columnGap !== null) { const transformer = createUnaryUnit(props.theme, "spacing", 8); const styleFromPropValue = (propValue) => ({ columnGap: getValue(transformer, propValue) }); return handleBreakpoints(props, props.columnGap, styleFromPropValue); } return null; }; columnGap.propTypes = {}; columnGap.filterProps = ["columnGap"]; const rowGap = (props) => { if (props.rowGap !== void 0 && props.rowGap !== null) { const transformer = createUnaryUnit(props.theme, "spacing", 8); const styleFromPropValue = (propValue) => ({ rowGap: getValue(transformer, propValue) }); return handleBreakpoints(props, props.rowGap, styleFromPropValue); } return null; }; rowGap.propTypes = {}; rowGap.filterProps = ["rowGap"]; const gridColumn = style$1({ prop: "gridColumn" }); const gridRow = style$1({ prop: "gridRow" }); const gridAutoFlow = style$1({ prop: "gridAutoFlow" }); const gridAutoColumns = style$1({ prop: "gridAutoColumns" }); const gridAutoRows = style$1({ prop: "gridAutoRows" }); const gridTemplateColumns = style$1({ prop: "gridTemplateColumns" }); const gridTemplateRows = style$1({ prop: "gridTemplateRows" }); const gridTemplateAreas = style$1({ prop: "gridTemplateAreas" }); const gridArea = style$1({ prop: "gridArea" }); compose(gap, columnGap, rowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea); function paletteTransform(value, userValue) { if (userValue === "grey") { return userValue; } return value; } const color = style$1({ prop: "color", themeKey: "palette", transform: paletteTransform }); const bgcolor = style$1({ prop: "bgcolor", cssProperty: "backgroundColor", themeKey: "palette", transform: paletteTransform }); const backgroundColor = style$1({ prop: "backgroundColor", themeKey: "palette", transform: paletteTransform }); compose(color, bgcolor, backgroundColor); function sizingTransform(value) { return value <= 1 && value !== 0 ? `${value * 100}%` : value; } const width = style$1({ prop: "width", transform: sizingTransform }); const maxWidth = (props) => { if (props.maxWidth !== void 0 && props.maxWidth !== null) { const styleFromPropValue = (propValue) => { var _a, _b, _c, _d, _e; const breakpoint = ((_c = (_b = (_a = props.theme) == null ? void 0 : _a.breakpoints) == null ? void 0 : _b.values) == null ? void 0 : _c[propValue]) || values$1[propValue]; if (!breakpoint) { return { maxWidth: sizingTransform(propValue) }; } if (((_e = (_d = props.theme) == null ? void 0 : _d.breakpoints) == null ? void 0 : _e.unit) !== "px") { return { maxWidth: `${breakpoint}${props.theme.breakpoints.unit}` }; } return { maxWidth: breakpoint }; }; return handleBreakpoints(props, props.maxWidth, styleFromPropValue); } return null; }; maxWidth.filterProps = ["maxWidth"]; const minWidth = style$1({ prop: "minWidth", transform: sizingTransform }); const height = style$1({ prop: "height", transform: sizingTransform }); const maxHeight = style$1({ prop: "maxHeight", transform: sizingTransform }); const minHeight = style$1({ prop: "minHeight", transform: sizingTransform }); style$1({ prop: "size", cssProperty: "width", transform: sizingTransform }); style$1({ prop: "size", cssProperty: "height", transform: sizingTransform }); const boxSizing = style$1({ prop: "boxSizing" }); compose(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing); const defaultSxConfig = { // borders border: { themeKey: "borders", transform: borderTransform }, borderTop: { themeKey: "borders", transform: borderTransform }, borderRight: { themeKey: "borders", transform: borderTransform }, borderBottom: { themeKey: "borders", transform: borderTransform }, borderLeft: { themeKey: "borders", transform: borderTransform }, borderColor: { themeKey: "palette" }, borderTopColor: { themeKey: "palette" }, borderRightColor: { themeKey: "palette" }, borderBottomColor: { themeKey: "palette" }, borderLeftColor: { themeKey: "palette" }, outline: { themeKey: "borders", transform: borderTransform }, outlineColor: { themeKey: "palette" }, borderRadius: { themeKey: "shape.borderRadius", style: borderRadius }, // palette color: { themeKey: "palette", transform: paletteTransform }, bgcolor: { themeKey: "palette", cssProperty: "backgroundColor", transform: paletteTransform }, backgroundColor: { themeKey: "palette", transform: paletteTransform }, // spacing p: { style: padding }, pt: { style: padding }, pr: { style: padding }, pb: { style: padding }, pl: { style: padding }, px: { style: padding }, py: { style: padding }, padding: { style: padding }, paddingTop: { style: padding }, paddingRight: { style: padding }, paddingBottom: { style: padding }, paddingLeft: { style: padding }, paddingX: { style: padding }, paddingY: { style: padding }, paddingInline: { style: padding }, paddingInlineStart: { style: padding }, paddingInlineEnd: { style: padding }, paddingBlock: { style: padding }, paddingBlockStart: { style: padding }, paddingBlockEnd: { style: padding }, m: { style: margin }, mt: { style: margin }, mr: { style: margin }, mb: { style: margin }, ml: { style: margin }, mx: { style: margin }, my: { style: margin }, margin: { style: margin }, marginTop: { style: margin }, marginRight: { style: margin }, marginBottom: { style: margin }, marginLeft: { style: margin }, marginX: { style: margin }, marginY: { style: margin }, marginInline: { style: margin }, marginInlineStart: { style: margin }, marginInlineEnd: { style: margin }, marginBlock: { style: margin }, marginBlockStart: { style: margin }, marginBlockEnd: { style: margin }, // display displayPrint: { cssProperty: false, transform: (value) => ({ "@media print": { display: value } }) }, display: {}, overflow: {}, textOverflow: {}, visibility: {}, whiteSpace: {}, // flexbox flexBasis: {}, flexDirection: {}, flexWrap: {}, justifyContent: {}, alignItems: {}, alignContent: {}, order: {}, flex: {}, flexGrow: {}, flexShrink: {}, alignSelf: {}, justifyItems: {}, justifySelf: {}, // grid gap: { style: gap }, rowGap: { style: rowGap }, columnGap: { style: columnGap }, gridColumn: {}, gridRow: {}, gridAutoFlow: {}, gridAutoColumns: {}, gridAutoRows: {}, gridTemplateColumns: {}, gridTemplateRows: {}, gridTemplateAreas: {}, gridArea: {}, // positions position: {}, zIndex: { themeKey: "zIndex" }, top: {}, right: {}, bottom: {}, left: {}, // shadows boxShadow: { themeKey: "shadows" }, // sizing width: { transform: sizingTransform }, maxWidth: { style: maxWidth }, minWidth: { transform: sizingTransform }, height: { transform: sizingTransform }, maxHeight: { transform: sizingTransform }, minHeight: { transform: sizingTransform }, boxSizing: {}, // typography font: { themeKey: "font" }, fontFamily: { themeKey: "typography" }, fontSize: { themeKey: "typography" }, fontStyle: { themeKey: "typography" }, fontWeight: { themeKey: "typography" }, letterSpacing: {}, textTransform: {}, lineHeight: {}, textAlign: {}, typography: { cssProperty: false, themeKey: "typography" } }; function objectsHaveSameKeys(...objects) { const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []); const union = new Set(allKeys); return objects.every((object) => union.size === Object.keys(object).length); } function callIfFn(maybeFn, arg2) { return typeof maybeFn === "function" ? maybeFn(arg2) : maybeFn; } function unstable_createStyleFunctionSx() { function getThemeValue(prop, val, theme, config2) { const props = { [prop]: val, theme }; const options = config2[prop]; if (!options) { return { [prop]: val }; } const { cssProperty = prop, themeKey, transform, style: style2 } = options; if (val == null) { return null; } if (themeKey === "typography" && val === "inherit") { return { [prop]: val }; } const themeMapping = getPath(theme, themeKey) || {}; if (style2) { return style2(props); } const styleFromPropValue = (propValueFinal) => { let value = getStyleValue$1(themeMapping, transform, propValueFinal); if (propValueFinal === value && typeof propValueFinal === "string") { value = getStyleValue$1(themeMapping, transform, `${prop}${propValueFinal === "default" ? "" : capitalize(propValueFinal)}`, propValueFinal); } if (cssProperty === false) { return value; } return { [cssProperty]: value }; }; return handleBreakpoints(props, val, styleFromPropValue); } function styleFunctionSx2(props) { const { sx, theme = {} } = props || {}; if (!sx) { return null; } const config2 = theme.unstable_sxConfig ?? defaultSxConfig; function traverse(sxInput) { let sxObject = sxInput; if (typeof sxInput === "function") { sxObject = sxInput(theme); } else if (typeof sxInput !== "object") { return sxInput; } if (!sxObject) { return null; } const emptyBreakpoints = createEmptyBreakpointObject(theme.breakpoints); const breakpointsKeys = Object.keys(emptyBreakpoints); let css2 = emptyBreakpoints; Object.keys(sxObject).forEach((styleKey) => { const value = callIfFn(sxObject[styleKey], theme); if (value !== null && value !== void 0) { if (typeof value === "object") { if (config2[styleKey]) { css2 = merge(css2, getThemeValue(styleKey, value, theme, config2)); } else { const breakpointsValues = handleBreakpoints({ theme }, value, (x) => ({ [styleKey]: x })); if (objectsHaveSameKeys(breakpointsValues, value)) { css2[styleKey] = styleFunctionSx2({ sx: value, theme }); } else { css2 = merge(css2, breakpointsValues); } } } else { css2 = merge(css2, getThemeValue(styleKey, value, theme, config2)); } } }); return sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css2)); } return Array.isArray(sx) ? sx.map(traverse) : traverse(sx); } return styleFunctionSx2; } const styleFunctionSx = unstable_createStyleFunctionSx(); styleFunctionSx.filterProps = ["sx"]; const splitProps = (props) => { var _a; const result = { systemProps: {}, otherProps: {} }; const config2 = ((_a = props == null ? void 0 : props.theme) == null ? void 0 : _a.unstable_sxConfig) ?? defaultSxConfig; Object.keys(props).forEach((prop) => { if (config2[prop]) { result.systemProps[prop] = props[prop]; } else { result.otherProps[prop] = props[prop]; } }); return result; }; function extendSxProp$1(props) { const { sx: inSx, ...other } = props; const { systemProps, otherProps } = splitProps(other); let finalSx; if (Array.isArray(inSx)) { finalSx = [systemProps, ...inSx]; } else if (typeof inSx === "function") { finalSx = (...args) => { const result = inSx(...args); if (!isPlainObject$1(result)) { return systemProps; } return { ...systemProps, ...result }; }; } else { finalSx = { ...systemProps, ...inSx }; } return { ...otherProps, sx: finalSx }; } function _extends() { return _extends = Object.assign ? Object.assign.bind() : function(n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n[r2] = t[r2]); } return n; }, _extends.apply(null, arguments); } function sheetForTag(tag) { if (tag.sheet) { return tag.sheet; } for (var i = 0; i < document.styleSheets.length; i++) { if (document.styleSheets[i].ownerNode === tag) { return document.styleSheets[i]; } } return void 0; } function createStyleElement(options) { var tag = document.createElement("style"); tag.setAttribute("data-emotion", options.key); if (options.nonce !== void 0) { tag.setAttribute("nonce", options.nonce); } tag.appendChild(document.createTextNode("")); tag.setAttribute("data-s", ""); return tag; } var StyleSheet = /* @__PURE__ */ function() { function StyleSheet2(options) { var _this = this; this._insertTag = function(tag) { var before; if (_this.tags.length === 0) { if (_this.insertionPoint) { before = _this.insertionPoint.nextSibling; } else if (_this.prepend) { before = _this.container.firstChild; } else { before = _this.before; } } else { before = _this.tags[_this.tags.length - 1].nextSibling; } _this.container.insertBefore(tag, before); _this.tags.push(tag); }; this.isSpeedy = options.speedy === void 0 ? true : options.speedy; this.tags = []; this.ctr = 0; this.nonce = options.nonce; this.key = options.key; this.container = options.container; this.prepend = options.prepend; this.insertionPoint = options.insertionPoint; this.before = null; } var _proto = StyleSheet2.prototype; _proto.hydrate = function hydrate(nodes) { nodes.forEach(this._insertTag); }; _proto.insert = function insert(rule) { if (this.ctr % (this.isSpeedy ? 65e3 : 1) === 0) { this._insertTag(createStyleElement(this)); } var tag = this.tags[this.tags.length - 1]; if (this.isSpeedy) { var sheet = sheetForTag(tag); try { sheet.insertRule(rule, sheet.cssRules.length); } catch (e) { } } else { tag.appendChild(document.createTextNode(rule)); } this.ctr++; }; _proto.flush = function flush() { this.tags.forEach(function(tag) { var _tag$parentNode; return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag); }); this.tags = []; this.ctr = 0; }; return StyleSheet2; }(); var MS = "-ms-"; var MOZ = "-moz-"; var WEBKIT = "-webkit-"; var COMMENT = "comm"; var RULESET = "rule"; var DECLARATION = "decl"; var IMPORT = "@import"; var KEYFRAMES = "@keyframes"; var LAYER = "@layer"; var abs = Math.abs; var from = String.fromCharCode; var assign = Object.assign; function hash$2(value, length2) { return charat(value, 0) ^ 45 ? (((length2 << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0; } function trim(value) { return value.trim(); } function match(value, pattern) { return (value = pattern.exec(value)) ? value[0] : value; } function replace(value, pattern, replacement) { return value.replace(pattern, replacement); } function indexof(value, search) { return value.indexOf(search); } function charat(value, index) { return value.charCodeAt(index) | 0; } function substr(value, begin, end2) { return value.slice(begin, end2); } function strlen(value) { return value.length; } function sizeof(value) { return value.length; } function append(value, array) { return array.push(value), value; } function combine(array, callback) { return array.map(callback).join(""); } var line = 1; var column = 1; var length = 0; var position = 0; var character = 0; var characters = ""; function node(value, root, parent, type, props, children, length2) { return { value, root, parent, type, props, children, line, column, length: length2, return: "" }; } function copy$1(root, props) { return assign(node("", null, null, "", null, null, 0), root, { length: -root.length }, props); } function char() { return character; } function prev() { character = position > 0 ? charat(characters, --position) : 0; if (column--, character === 10) column = 1, line--; return character; } function next() { character = position < length ? charat(characters, position++) : 0; if (column++, character === 10) column = 1, line++; return character; } function peek() { return charat(characters, position); } function caret() { return position; } function slice(begin, end2) { return substr(characters, begin, end2); } function token(type) { switch (type) { // \0 \t \n \r \s whitespace token case 0: case 9: case 10: case 13: case 32: return 5; // ! + , / > @ ~ isolate token case 33: case 43: case 44: case 47: case 62: case 64: case 126: // ; { } breakpoint token case 59: case 123: case 125: return 4; // : accompanied token case 58: return 3; // " ' ( [ opening delimit token case 34: case 39: case 40: case 91: return 2; // ) ] closing delimit token case 41: case 93: return 1; } return 0; } function alloc(value) { return line = column = 1, length = strlen(characters = value), position = 0, []; } function dealloc(value) { return characters = "", value; } function delimit(type) { return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type))); } function whitespace(type) { while (character = peek()) if (character < 33) next(); else break; return token(type) > 2 || token(character) > 3 ? "" : " "; } function escaping(index, count2) { while (--count2 && next()) if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97) break; return slice(index, caret() + (count2 < 6 && peek() == 32 && next() == 32)); } function delimiter(type) { while (next()) switch (character) { // ] ) " ' case type: return position; // " ' case 34: case 39: if (type !== 34 && type !== 39) delimiter(character); break; // ( case 40: if (type === 41) delimiter(type); break; // \ case 92: next(); break; } return position; } function commenter(type, index) { while (next()) if (type + character === 47 + 10) break; else if (type + character === 42 + 42 && peek() === 47) break; return "/*" + slice(index, position - 1) + "*" + from(type === 47 ? type : next()); } function identifier(index) { while (!token(peek())) next(); return slice(index, position); } function compile(value) { return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value)); } function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) { var index = 0; var offset2 = 0; var length2 = pseudo; var atrule = 0; var property = 0; var previous = 0; var variable = 1; var scanning = 1; var ampersand = 1; var character2 = 0; var type = ""; var props = rules; var children = rulesets; var reference2 = rule; var characters2 = type; while (scanning) switch (previous = character2, character2 = next()) { // ( case 40: if (previous != 108 && charat(characters2, length2 - 1) == 58) { if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f") != -1) ampersand = -1; break; } // " ' [ case 34: case 39: case 91: characters2 += delimit(character2); break; // \t \n \r \s case 9: case 10: case 13: case 32: characters2 += whitespace(previous); break; // \ case 92: characters2 += escaping(caret() - 1, 7); continue; // / case 47: switch (peek()) { case 42: case 47: append(comment(commenter(next(), caret()), root, parent), declarations); break; default: characters2 += "/"; } break; // { case 123 * variable: points[index++] = strlen(characters2) * ampersand; // } ; \0 case 125 * variable: case 59: case 0: switch (character2) { // \0 } case 0: case 125: scanning = 0; // ; case 59 + offset2: if (ampersand == -1) characters2 = replace(characters2, /\f/g, ""); if (property > 0 && strlen(characters2) - length2) append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2), declarations); break; // @ ; case 59: characters2 += ";"; // { rule/at-rule default: append(reference2 = ruleset(characters2, root, parent, index, offset2, rules, points, type, props = [], children = [], length2), rulesets); if (character2 === 123) if (offset2 === 0) parse(characters2, root, reference2, reference2, props, rulesets, length2, points, children); else switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) { // d l m s case 100: case 108: case 109: case 115: parse(value, reference2, reference2, rule && append(ruleset(value, reference2, reference2, 0, 0, rules, points, type, rules, props = [], length2), children), rules, children, length2, points, rule ? props : children); break; default: parse(characters2, reference2, reference2, reference2, [""], children, 0, points, children); } } index = offset2 = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo; break; // : case 58: length2 = 1 + strlen(characters2), property = previous; default: if (variable < 1) { if (character2 == 123) --variable; else if (character2 == 125 && variable++ == 0 && prev() == 125) continue; } switch (characters2 += from(character2), character2 * variable) { // & case 38: ampersand = offset2 > 0 ? 1 : (characters2 += "\f", -1); break; // , case 44: points[index++] = (strlen(characters2) - 1) * ampersand, ampersand = 1; break; // @ case 64: if (peek() === 45) characters2 += delimit(next()); atrule = peek(), offset2 = length2 = strlen(type = characters2 += identifier(caret())), character2++; break; // - case 45: if (previous === 45 && strlen(characters2) == 2) variable = 0; } } return rulesets; } function ruleset(value, root, parent, index, offset2, rules, points, type, props, children, length2) { var post = offset2 - 1; var rule = offset2 === 0 ? rules : [""]; var size = sizeof(rule); for (var i = 0, j = 0, k = 0; i < index; ++i) for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x) if (z = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x]))) props[k++] = z; return node(value, root, parent, offset2 === 0 ? RULESET : type, props, children, length2); } function comment(value, root, parent) { return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0); } function declaration(value, root, parent, length2) { return node(value, root, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2); } function serialize(children, callback) { var output = ""; var length2 = sizeof(children); for (var i = 0; i < length2; i++) output += callback(children[i], i, children, callback) || ""; return output; } function stringify(element, index, children, callback) { switch (element.type) { case LAYER: if (element.children.length) break; case IMPORT: case DECLARATION: return element.return = element.return || element.value; case COMMENT: return ""; case KEYFRAMES: return element.return = element.value + "{" + serialize(element.children, callback) + "}"; case RULESET: element.value = element.props.join(","); } return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : ""; } function middleware(collection) { var length2 = sizeof(collection); return function(element, index, children, callback) { var output = ""; for (var i = 0; i < length2; i++) output += collection[i](element, index, children, callback) || ""; return output; }; } function rulesheet(callback) { return function(element) { if (!element.root) { if (element = element.return) callback(element); } }; } function memoize(fn2) { var cache = /* @__PURE__ */ Object.create(null); return function(arg2) { if (cache[arg2] === void 0) cache[arg2] = fn2(arg2); return cache[arg2]; }; } var identifierWithPointTracking = function identifierWithPointTracking2(begin, points, index) { var previous = 0; var character2 = 0; while (true) { previous = character2; character2 = peek(); if (previous === 38 && character2 === 12) { points[index] = 1; } if (token(character2)) { break; } next(); } return slice(begin, position); }; var toRules = function toRules2(parsed, points) { var index = -1; var character2 = 44; do { switch (token(character2)) { case 0: if (character2 === 38 && peek() === 12) { points[index] = 1; } parsed[index] += identifierWithPointTracking(position - 1, points, index); break; case 2: parsed[index] += delimit(character2); break; case 4: if (character2 === 44) { parsed[++index] = peek() === 58 ? "&\f" : ""; points[index] = parsed[index].length; break; } // fallthrough default: parsed[index] += from(character2); } } while (character2 = next()); return parsed; }; var getRules = function getRules2(value, points) { return dealloc(toRules(alloc(value), points)); }; var fixedElements = /* @__PURE__ */ new WeakMap(); var compat = function compat2(element) { if (element.type !== "rule" || !element.parent || // positive .length indicates that this rule contains pseudo // negative .length indicates that this rule has been already prefixed element.length < 1) { return; } var value = element.value; var parent = element.parent; var isImplicitRule = element.column === parent.column && element.line === parent.line; while (parent.type !== "rule") { parent = parent.parent; if (!parent) return; } if (element.props.length === 1 && value.charCodeAt(0) !== 58 && !fixedElements.get(parent)) { return; } if (isImplicitRule) { return; } fixedElements.set(element, true); var points = []; var rules = getRules(value, points); var parentRules = parent.props; for (var i = 0, k = 0; i < rules.length; i++) { for (var j = 0; j < parentRules.length; j++, k++) { element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i]; } } }; var removeLabel = function removeLabel2(element) { if (element.type === "decl") { var value = element.value; if ( // charcode for l value.charCodeAt(0) === 108 && // charcode for b value.charCodeAt(2) === 98 ) { element["return"] = ""; element.value = ""; } } }; function prefix(value, length2) { switch (hash$2(value, length2)) { // color-adjust case 5103: return WEBKIT + "print-" + value + value; // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function) case 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break case 5572: case 6356: case 5844: case 3191: case 6645: case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite, case 6391: case 5879: case 5623: case 6135: case 4599: case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width) case 4215: case 6389: case 5109: case 5365: case 5621: case 3829: return WEBKIT + value + value; // appearance, user-select, transform, hyphens, text-size-adjust case 5349: case 4246: case 4810: case 6968: case 2756: return WEBKIT + value + MOZ + value + MS + value + value; // flex, flex-direction case 6828: case 4268: return WEBKIT + value + MS + value + value; // order case 6165: return WEBKIT + value + MS + "flex-" + value + value; // align-items case 5187: return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + "box-$1$2" + MS + "flex-$1$2") + value; // align-self case 5443: return WEBKIT + value + MS + "flex-item-" + replace(value, /flex-|-self/, "") + value; // align-content case 4675: return WEBKIT + value + MS + "flex-line-pack" + replace(value, /align-content|flex-|-self/, "") + value; // flex-shrink case 5548: return WEBKIT + value + MS + replace(value, "shrink", "negative") + value; // flex-basis case 5292: return WEBKIT + value + MS + replace(value, "basis", "preferred-size") + value; // flex-grow case 6060: return WEBKIT + "box-" + replace(value, "-grow", "") + WEBKIT + value + MS + replace(value, "grow", "positive") + value; // transition case 4554: return WEBKIT + replace(value, /([^-])(transform)/g, "$1" + WEBKIT + "$2") + value; // cursor case 6187: return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + "$1"), /(image-set)/, WEBKIT + "$1"), value, "") + value; // background, background-image case 5495: case 3959: return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1"); // justify-content case 4968: return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + WEBKIT + value + value; // (margin|padding)-inline-(start|end) case 4095: case 3583: case 4068: case 2532: return replace(value, /(.+)-inline(.+)/, WEBKIT + "$1$2") + value; // (min|max)?(width|height|inline-size|block-size) case 8116: case 7059: case 5753: case 5535: case 5445: case 5701: case 4933: case 4677: case 5533: case 5789: case 5021: case 4765: if (strlen(value) - 1 - length2 > 6) switch (charat(value, length2 + 1)) { // (m)ax-content, (m)in-content case 109: if (charat(value, length2 + 4) !== 45) break; // (f)ill-available, (f)it-content case 102: return replace(value, /(.+:)(.+)-([^]+)/, "$1" + WEBKIT + "$2-$3$1" + MOZ + (charat(value, length2 + 3) == 108 ? "$3" : "$2-$3")) + value; // (s)tretch case 115: return ~indexof(value, "stretch") ? prefix(replace(value, "stretch", "fill-available"), length2) + value : value; } break; // position: sticky case 4949: if (charat(value, length2 + 1) !== 115) break; // display: (flex|inline-flex) case 6444: switch (charat(value, strlen(value) - 3 - (~indexof(value, "!important") && 10))) { // stic(k)y case 107: return replace(value, ":", ":" + WEBKIT) + value; // (inline-)?fl(e)x case 101: return replace(value, /(.+:)([^;!]+)(;|!.+)?/, "$1" + WEBKIT + (charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + WEBKIT + "$2$3$1" + MS + "$2box$3") + value; } break; // writing-mode case 5936: switch (charat(value, length2 + 11)) { // vertical-l(r) case 114: return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value; // vertical-r(l) case 108: return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value; // horizontal(-)tb case 45: return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value; } return WEBKIT + value + MS + value + value; } return value; } var prefixer = function prefixer2(element, index, children, callback) { if (element.length > -1) { if (!element["return"]) switch (element.type) { case DECLARATION: element["return"] = prefix(element.value, element.length); break; case KEYFRAMES: return serialize([copy$1(element, { value: replace(element.value, "@", "@" + WEBKIT) })], callback); case RULESET: if (element.length) return combine(element.props, function(value) { switch (match(value, /(::plac\w+|:read-\w+)/)) { // :read-(only|write) case ":read-only": case ":read-write": return serialize([copy$1(element, { props: [replace(value, /:(read-\w+)/, ":" + MOZ + "$1")] })], callback); // :placeholder case "::placeholder": return serialize([copy$1(element, { props: [replace(value, /:(plac\w+)/, ":" + WEBKIT + "input-$1")] }), copy$1(element, { props: [replace(value, /:(plac\w+)/, ":" + MOZ + "$1")] }), copy$1(element, { props: [replace(value, /:(plac\w+)/, MS + "input-$1")] })], callback); } return ""; }); } } }; var defaultStylisPlugins = [prefixer]; var createCache = function createCache2(options) { var key2 = options.key; if (key2 === "css") { var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); Array.prototype.forEach.call(ssrStyles, function(node2) { var dataEmotionAttribute = node2.getAttribute("data-emotion"); if (dataEmotionAttribute.indexOf(" ") === -1) { return; } document.head.appendChild(node2); node2.setAttribute("data-s", ""); }); } var stylisPlugins = options.stylisPlugins || defaultStylisPlugins; var inserted = {}; var container; var nodesToHydrate = []; { container = options.container || document.head; Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which // means that the style elements we're looking at are only Emotion 11 server-rendered style elements document.querySelectorAll('style[data-emotion^="' + key2 + ' "]'), function(node2) { var attrib = node2.getAttribute("data-emotion").split(" "); for (var i = 1; i < attrib.length; i++) { inserted[attrib[i]] = true; } nodesToHydrate.push(node2); } ); } var _insert; var omnipresentPlugins = [compat, removeLabel]; { var currentSheet; var finalizingPlugins = [stringify, rulesheet(function(rule) { currentSheet.insert(rule); })]; var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins)); var stylis = function stylis2(styles2) { return serialize(compile(styles2), serializer); }; _insert = function insert(selector, serialized, sheet, shouldCache) { currentSheet = sheet; stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles); if (shouldCache) { cache.inserted[serialized.name] = true; } }; } var cache = { key: key2, sheet: new StyleSheet({ key: key2, container, nonce: options.nonce, speedy: options.speedy, prepend: options.prepend, insertionPoint: options.insertionPoint }), nonce: options.nonce, inserted, registered: {}, insert: _insert }; cache.sheet.hydrate(nodesToHydrate); return cache; }; var reactIs = { exports: {} }; var reactIs_production_min = {}; /** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var hasRequiredReactIs_production_min; function requireReactIs_production_min() { if (hasRequiredReactIs_production_min) return reactIs_production_min; hasRequiredReactIs_production_min = 1; var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r2 = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119; function z(a) { if ("object" === typeof a && null !== a) { var u = a.$$typeof; switch (u) { case c: switch (a = a.type, a) { case l: case m: case e: case g: case f: case p: return a; default: switch (a = a && a.$$typeof, a) { case k: case n: case t: case r2: case h: return a; default: return u; } } case d: return u; } } } function A(a) { return z(a) === m; } reactIs_production_min.AsyncMode = l; reactIs_production_min.ConcurrentMode = m; reactIs_production_min.ContextConsumer = k; reactIs_production_min.ContextProvider = h; reactIs_production_min.Element = c; reactIs_production_min.ForwardRef = n; reactIs_production_min.Fragment = e; reactIs_production_min.Lazy = t; reactIs_production_min.Memo = r2; reactIs_production_min.Portal = d; reactIs_production_min.Profiler = g; reactIs_production_min.StrictMode = f; reactIs_production_min.Suspense = p; reactIs_production_min.isAsyncMode = function(a) { return A(a) || z(a) === l; }; reactIs_production_min.isConcurrentMode = A; reactIs_production_min.isContextConsumer = function(a) { return z(a) === k; }; reactIs_production_min.isContextProvider = function(a) { return z(a) === h; }; reactIs_production_min.isElement = function(a) { return "object" === typeof a && null !== a && a.$$typeof === c; }; reactIs_production_min.isForwardRef = function(a) { return z(a) === n; }; reactIs_production_min.isFragment = function(a) { return z(a) === e; }; reactIs_production_min.isLazy = function(a) { return z(a) === t; }; reactIs_production_min.isMemo = function(a) { return z(a) === r2; }; reactIs_production_min.isPortal = function(a) { return z(a) === d; }; reactIs_production_min.isProfiler = function(a) { return z(a) === g; }; reactIs_production_min.isStrictMode = function(a) { return z(a) === f; }; reactIs_production_min.isSuspense = function(a) { return z(a) === p; }; reactIs_production_min.isValidElementType = function(a) { return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r2 || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v); }; reactIs_production_min.typeOf = z; return reactIs_production_min; } var hasRequiredReactIs; function requireReactIs() { if (hasRequiredReactIs) return reactIs.exports; hasRequiredReactIs = 1; { reactIs.exports = requireReactIs_production_min(); } return reactIs.exports; } var hoistNonReactStatics_cjs; var hasRequiredHoistNonReactStatics_cjs; function requireHoistNonReactStatics_cjs() { if (hasRequiredHoistNonReactStatics_cjs) return hoistNonReactStatics_cjs; hasRequiredHoistNonReactStatics_cjs = 1; var reactIs2 = requireReactIs(); var REACT_STATICS = { childContextTypes: true, contextType: true, contextTypes: true, defaultProps: true, displayName: true, getDefaultProps: true, getDerivedStateFromError: true, getDerivedStateFromProps: true, mixins: true, propTypes: true, type: true }; var KNOWN_STATICS = { name: true, length: true, prototype: true, caller: true, callee: true, arguments: true, arity: true }; var FORWARD_REF_STATICS = { "$$typeof": true, render: true, defaultProps: true, displayName: true, propTypes: true }; var MEMO_STATICS = { "$$typeof": true, compare: true, defaultProps: true, displayName: true, propTypes: true, type: true }; var TYPE_STATICS = {}; TYPE_STATICS[reactIs2.ForwardRef] = FORWARD_REF_STATICS; TYPE_STATICS[reactIs2.Memo] = MEMO_STATICS; function getStatics(component) { if (reactIs2.isMemo(component)) { return MEMO_STATICS; } return TYPE_STATICS[component["$$typeof"]] || REACT_STATICS; } var defineProperty = Object.defineProperty; var getOwnPropertyNames = Object.getOwnPropertyNames; var getOwnPropertySymbols = Object.getOwnPropertySymbols; var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var getPrototypeOf = Object.getPrototypeOf; var objectPrototype = Object.prototype; function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { if (typeof sourceComponent !== "string") { if (objectPrototype) { var inheritedComponent = getPrototypeOf(sourceComponent); if (inheritedComponent && inheritedComponent !== objectPrototype) { hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); } } var keys = getOwnPropertyNames(sourceComponent); if (getOwnPropertySymbols) { keys = keys.concat(getOwnPropertySymbols(sourceComponent)); } var targetStatics = getStatics(targetComponent); var sourceStatics = getStatics(sourceComponent); for (var i = 0; i < keys.length; ++i) { var key2 = keys[i]; if (!KNOWN_STATICS[key2] && !(blacklist && blacklist[key2]) && !(sourceStatics && sourceStatics[key2]) && !(targetStatics && targetStatics[key2])) { var descriptor = getOwnPropertyDescriptor(sourceComponent, key2); try { defineProperty(targetComponent, key2, descriptor); } catch (e) { } } } } return targetComponent; } hoistNonReactStatics_cjs = hoistNonReactStatics; return hoistNonReactStatics_cjs; } requireHoistNonReactStatics_cjs(); var isBrowser = true; function getRegisteredStyles(registered, registeredStyles, classNames) { var rawClassName = ""; classNames.split(" ").forEach(function(className) { if (registered[className] !== void 0) { registeredStyles.push(registered[className] + ";"); } else if (className) { rawClassName += className + " "; } }); return rawClassName; } var registerStyles = function registerStyles2(cache, serialized, isStringTag2) { var className = cache.key + "-" + serialized.name; if ( // we only need to add the styles to the registered cache if the // class name could be used further down // the tree but if it's a string tag, we know it won't // so we don't have to add it to registered cache. // this improves memory usage since we can avoid storing the whole style string (isStringTag2 === false || // we need to always store it if we're in compat mode and // in node since emotion-server relies on whether a style is in // the registered cache to know whether a style is global or not // also, note that this check will be dead code eliminated in the browser isBrowser === false) && cache.registered[className] === void 0 ) { cache.registered[className] = serialized.styles; } }; var insertStyles = function insertStyles2(cache, serialized, isStringTag2) { registerStyles(cache, serialized, isStringTag2); var className = cache.key + "-" + serialized.name; if (cache.inserted[serialized.name] === void 0) { var current = serialized; do { cache.insert(serialized === current ? "." + className : "", current, cache.sheet, true); current = current.next; } while (current !== void 0); } }; function murmur2(str) { var h = 0; var k, i = 0, len2 = str.length; for (; len2 >= 4; ++i, len2 -= 4) { k = str.charCodeAt(i) & 255 | (str.charCodeAt(++i) & 255) << 8 | (str.charCodeAt(++i) & 255) << 16 | (str.charCodeAt(++i) & 255) << 24; k = /* Math.imul(k, m): */ (k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16); k ^= /* k >>> r: */ k >>> 24; h = /* Math.imul(k, m): */ (k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */ (h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16); } switch (len2) { case 3: h ^= (str.charCodeAt(i + 2) & 255) << 16; case 2: h ^= (str.charCodeAt(i + 1) & 255) << 8; case 1: h ^= str.charCodeAt(i) & 255; h = /* Math.imul(h, m): */ (h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16); } h ^= h >>> 13; h = /* Math.imul(h, m): */ (h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16); return ((h ^ h >>> 15) >>> 0).toString(36); } var unitlessKeys = { animationIterationCount: 1, aspectRatio: 1, borderImageOutset: 1, borderImageSlice: 1, borderImageWidth: 1, boxFlex: 1, boxFlexGroup: 1, boxOrdinalGroup: 1, columnCount: 1, columns: 1, flex: 1, flexGrow: 1, flexPositive: 1, flexShrink: 1, flexNegative: 1, flexOrder: 1, gridRow: 1, gridRowEnd: 1, gridRowSpan: 1, gridRowStart: 1, gridColumn: 1, gridColumnEnd: 1, gridColumnSpan: 1, gridColumnStart: 1, msGridRow: 1, msGridRowSpan: 1, msGridColumn: 1, msGridColumnSpan: 1, fontWeight: 1, lineHeight: 1, opacity: 1, order: 1, orphans: 1, scale: 1, tabSize: 1, widows: 1, zIndex: 1, zoom: 1, WebkitLineClamp: 1, // SVG-related properties fillOpacity: 1, floodOpacity: 1, stopOpacity: 1, strokeDasharray: 1, strokeDashoffset: 1, strokeMiterlimit: 1, strokeOpacity: 1, strokeWidth: 1 }; var hyphenateRegex = /[A-Z]|^ms/g; var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g; var isCustomProperty = function isCustomProperty2(property) { return property.charCodeAt(1) === 45; }; var isProcessableValue = function isProcessableValue2(value) { return value != null && typeof value !== "boolean"; }; var processStyleName = /* @__PURE__ */ memoize(function(styleName) { return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, "-$&").toLowerCase(); }); var processStyleValue = function processStyleValue2(key2, value) { switch (key2) { case "animation": case "animationName": { if (typeof value === "string") { return value.replace(animationRegex, function(match2, p1, p2) { cursor = { name: p1, styles: p2, next: cursor }; return p1; }); } } } if (unitlessKeys[key2] !== 1 && !isCustomProperty(key2) && typeof value === "number" && value !== 0) { return value + "px"; } return value; }; function handleInterpolation(mergedProps, registered, interpolation) { if (interpolation == null) { return ""; } var componentSelector = interpolation; if (componentSelector.__emotion_styles !== void 0) { return componentSelector; } switch (typeof interpolation) { case "boolean": { return ""; } case "object": { var keyframes2 = interpolation; if (keyframes2.anim === 1) { cursor = { name: keyframes2.name, styles: keyframes2.styles, next: cursor }; return keyframes2.name; } var serializedStyles = interpolation; if (serializedStyles.styles !== void 0) { var next2 = serializedStyles.next; if (next2 !== void 0) { while (next2 !== void 0) { cursor = { name: next2.name, styles: next2.styles, next: cursor }; next2 = next2.next; } } var styles2 = serializedStyles.styles + ";"; return styles2; } return createStringFromObject(mergedProps, registered, interpolation); } case "function": { if (mergedProps !== void 0) { var previousCursor = cursor; var result = interpolation(mergedProps); cursor = previousCursor; return handleInterpolation(mergedProps, registered, result); } break; } } var asString = interpolation; if (registered == null) { return asString; } var cached = registered[asString]; return cached !== void 0 ? cached : asString; } function createStringFromObject(mergedProps, registered, obj) { var string = ""; if (Array.isArray(obj)) { for (var i = 0; i < obj.length; i++) { string += handleInterpolation(mergedProps, registered, obj[i]) + ";"; } } else { for (var key2 in obj) { var value = obj[key2]; if (typeof value !== "object") { var asString = value; if (registered != null && registered[asString] !== void 0) { string += key2 + "{" + registered[asString] + "}"; } else if (isProcessableValue(asString)) { string += processStyleName(key2) + ":" + processStyleValue(key2, asString) + ";"; } } else { if (Array.isArray(value) && typeof value[0] === "string" && (registered == null || registered[value[0]] === void 0)) { for (var _i = 0; _i < value.length; _i++) { if (isProcessableValue(value[_i])) { string += processStyleName(key2) + ":" + processStyleValue(key2, value[_i]) + ";"; } } } else { var interpolated = handleInterpolation(mergedProps, registered, value); switch (key2) { case "animation": case "animationName": { string += processStyleName(key2) + ":" + interpolated + ";"; break; } default: { string += key2 + "{" + interpolated + "}"; } } } } } } return string; } var labelPattern = /label:\s*([^\s;{]+)\s*(;|$)/g; var cursor; function serializeStyles(args, registered, mergedProps) { if (args.length === 1 && typeof args[0] === "object" && args[0] !== null && args[0].styles !== void 0) { return args[0]; } var stringMode = true; var styles2 = ""; cursor = void 0; var strings = args[0]; if (strings == null || strings.raw === void 0) { stringMode = false; styles2 += handleInterpolation(mergedProps, registered, strings); } else { var asTemplateStringsArr = strings; styles2 += asTemplateStringsArr[0]; } for (var i = 1; i < args.length; i++) { styles2 += handleInterpolation(mergedProps, registered, args[i]); if (stringMode) { var templateStringsArr = strings; styles2 += templateStringsArr[i]; } } labelPattern.lastIndex = 0; var identifierName = ""; var match2; while ((match2 = labelPattern.exec(styles2)) !== null) { identifierName += "-" + match2[1]; } var name = murmur2(styles2) + identifierName; return { name, styles: styles2, next: cursor }; } var syncFallback = function syncFallback2(create) { return create(); }; var useInsertionEffect = React__namespace["useInsertionEffect"] ? React__namespace["useInsertionEffect"] : false; var useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback; var useInsertionEffectWithLayoutFallback = useInsertionEffect || React__namespace.useLayoutEffect; var EmotionCacheContext = /* @__PURE__ */ React__namespace.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case // because this module is primarily intended for the browser and node // but it's also required in react native and similar environments sometimes // and we could have a special build just for that // but this is much easier and the native packages // might use a different theme context in the future anyway typeof HTMLElement !== "undefined" ? /* @__PURE__ */ createCache({ key: "css" }) : null ); var CacheProvider = EmotionCacheContext.Provider; var withEmotionCache = function withEmotionCache2(func) { return /* @__PURE__ */ React.forwardRef(function(props, ref) { var cache = React.useContext(EmotionCacheContext); return func(props, cache, ref); }); }; var ThemeContext$1 = /* @__PURE__ */ React__namespace.createContext({}); var hasOwn = {}.hasOwnProperty; var typePropName = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__"; var createEmotionProps = function createEmotionProps2(type, props) { var newProps = {}; for (var _key in props) { if (hasOwn.call(props, _key)) { newProps[_key] = props[_key]; } } newProps[typePropName] = type; return newProps; }; var Insertion$1 = function Insertion(_ref) { var cache = _ref.cache, serialized = _ref.serialized, isStringTag2 = _ref.isStringTag; registerStyles(cache, serialized, isStringTag2); useInsertionEffectAlwaysWithSyncFallback(function() { return insertStyles(cache, serialized, isStringTag2); }); return null; }; var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) { var cssProp = props.css; if (typeof cssProp === "string" && cache.registered[cssProp] !== void 0) { cssProp = cache.registered[cssProp]; } var WrappedComponent = props[typePropName]; var registeredStyles = [cssProp]; var className = ""; if (typeof props.className === "string") { className = getRegisteredStyles(cache.registered, registeredStyles, props.className); } else if (props.className != null) { className = props.className + " "; } var serialized = serializeStyles(registeredStyles, void 0, React__namespace.useContext(ThemeContext$1)); className += cache.key + "-" + serialized.name; var newProps = {}; for (var _key2 in props) { if (hasOwn.call(props, _key2) && _key2 !== "css" && _key2 !== typePropName && true) { newProps[_key2] = props[_key2]; } } newProps.className = className; if (ref) { newProps.ref = ref; } return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(Insertion$1, { cache, serialized, isStringTag: typeof WrappedComponent === "string" }), /* @__PURE__ */ React__namespace.createElement(WrappedComponent, newProps)); }); var Emotion$1 = Emotion; var jsx = function jsx2(type, props) { var args = arguments; if (props == null || !hasOwn.call(props, "css")) { return React__namespace.createElement.apply(void 0, args); } var argsLength = args.length; var createElementArgArray = new Array(argsLength); createElementArgArray[0] = Emotion$1; createElementArgArray[1] = createEmotionProps(type, props); for (var i = 2; i < argsLength; i++) { createElementArgArray[i] = args[i]; } return React__namespace.createElement.apply(null, createElementArgArray); }; (function(_jsx) { var JSX; /* @__PURE__ */ (function(_JSX) { })(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {}))); })(jsx || (jsx = {})); var Global = /* @__PURE__ */ withEmotionCache(function(props, cache) { var styles2 = props.styles; var serialized = serializeStyles([styles2], void 0, React__namespace.useContext(ThemeContext$1)); var sheetRef = React__namespace.useRef(); useInsertionEffectWithLayoutFallback(function() { var key2 = cache.key + "-global"; var sheet = new cache.sheet.constructor({ key: key2, nonce: cache.sheet.nonce, container: cache.sheet.container, speedy: cache.sheet.isSpeedy }); var rehydrating = false; var node2 = document.querySelector('style[data-emotion="' + key2 + " " + serialized.name + '"]'); if (cache.sheet.tags.length) { sheet.before = cache.sheet.tags[0]; } if (node2 !== null) { rehydrating = true; node2.setAttribute("data-emotion", key2); sheet.hydrate([node2]); } sheetRef.current = [sheet, rehydrating]; return function() { sheet.flush(); }; }, [cache]); useInsertionEffectWithLayoutFallback(function() { var sheetRefCurrent = sheetRef.current; var sheet = sheetRefCurrent[0], rehydrating = sheetRefCurrent[1]; if (rehydrating) { sheetRefCurrent[1] = false; return; } if (serialized.next !== void 0) { insertStyles(cache, serialized.next, true); } if (sheet.tags.length) { var element = sheet.tags[sheet.tags.length - 1].nextElementSibling; sheet.before = element; sheet.flush(); } cache.insert("", serialized, sheet, false); }, [cache, serialized.name]); return null; }); function css() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return serializeStyles(args); } function keyframes() { var insertable = css.apply(void 0, arguments); var name = "animation-" + insertable.name; return { name, styles: "@keyframes " + name + "{" + insertable.styles + "}", anim: 1, toString: function toString() { return "_EMO_" + this.name + "_" + this.styles + "_EMO_"; } }; } var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; var isPropValid = /* @__PURE__ */ memoize( function(prop) { return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91; } /* Z+1 */ ); var testOmitPropsOnStringTag = isPropValid; var testOmitPropsOnComponent = function testOmitPropsOnComponent2(key2) { return key2 !== "theme"; }; var getDefaultShouldForwardProp = function getDefaultShouldForwardProp2(tag) { return typeof tag === "string" && // 96 is one less than the char code // for "a" so this is checking that // it's a lowercase character tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent; }; var composeShouldForwardProps = function composeShouldForwardProps2(tag, options, isReal) { var shouldForwardProp2; if (options) { var optionsShouldForwardProp = options.shouldForwardProp; shouldForwardProp2 = tag.__emotion_forwardProp && optionsShouldForwardProp ? function(propName) { return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName); } : optionsShouldForwardProp; } if (typeof shouldForwardProp2 !== "function" && isReal) { shouldForwardProp2 = tag.__emotion_forwardProp; } return shouldForwardProp2; }; var Insertion2 = function Insertion3(_ref) { var cache = _ref.cache, serialized = _ref.serialized, isStringTag2 = _ref.isStringTag; registerStyles(cache, serialized, isStringTag2); useInsertionEffectAlwaysWithSyncFallback(function() { return insertStyles(cache, serialized, isStringTag2); }); return null; }; var createStyled$1 = function createStyled(tag, options) { var isReal = tag.__emotion_real === tag; var baseTag = isReal && tag.__emotion_base || tag; var identifierName; var targetClassName; if (options !== void 0) { identifierName = options.label; targetClassName = options.target; } var shouldForwardProp2 = composeShouldForwardProps(tag, options, isReal); var defaultShouldForwardProp = shouldForwardProp2 || getDefaultShouldForwardProp(baseTag); var shouldUseAs = !defaultShouldForwardProp("as"); return function() { var args = arguments; var styles2 = isReal && tag.__emotion_styles !== void 0 ? tag.__emotion_styles.slice(0) : []; if (identifierName !== void 0) { styles2.push("label:" + identifierName + ";"); } if (args[0] == null || args[0].raw === void 0) { styles2.push.apply(styles2, args); } else { var templateStringsArr = args[0]; styles2.push(templateStringsArr[0]); var len2 = args.length; var i = 1; for (; i < len2; i++) { styles2.push(args[i], templateStringsArr[i]); } } var Styled = withEmotionCache(function(props, cache, ref) { var FinalTag = shouldUseAs && props.as || baseTag; var className = ""; var classInterpolations = []; var mergedProps = props; if (props.theme == null) { mergedProps = {}; for (var key2 in props) { mergedProps[key2] = props[key2]; } mergedProps.theme = React__namespace.useContext(ThemeContext$1); } if (typeof props.className === "string") { className = getRegisteredStyles(cache.registered, classInterpolations, props.className); } else if (props.className != null) { className = props.className + " "; } var serialized = serializeStyles(styles2.concat(classInterpolations), cache.registered, mergedProps); className += cache.key + "-" + serialized.name; if (targetClassName !== void 0) { className += " " + targetClassName; } var finalShouldForwardProp = shouldUseAs && shouldForwardProp2 === void 0 ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp; var newProps = {}; for (var _key in props) { if (shouldUseAs && _key === "as") continue; if (finalShouldForwardProp(_key)) { newProps[_key] = props[_key]; } } newProps.className = className; if (ref) { newProps.ref = ref; } return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(Insertion2, { cache, serialized, isStringTag: typeof FinalTag === "string" }), /* @__PURE__ */ React__namespace.createElement(FinalTag, newProps)); }); Styled.displayName = identifierName !== void 0 ? identifierName : "Styled(" + (typeof baseTag === "string" ? baseTag : baseTag.displayName || baseTag.name || "Component") + ")"; Styled.defaultProps = tag.defaultProps; Styled.__emotion_real = Styled; Styled.__emotion_base = baseTag; Styled.__emotion_styles = styles2; Styled.__emotion_forwardProp = shouldForwardProp2; Object.defineProperty(Styled, "toString", { value: function value() { return "." + targetClassName; } }); Styled.withComponent = function(nextTag, nextOptions) { var newStyled2 = createStyled(nextTag, _extends({}, options, nextOptions, { shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true) })); return newStyled2.apply(void 0, styles2); }; return Styled; }; }; var tags = [ "a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "marquee", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "u", "ul", "var", "video", "wbr", // SVG "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan" ]; var newStyled = createStyled$1.bind(null); tags.forEach(function(tagName) { newStyled[tagName] = newStyled(tagName); }); function isEmpty$2(obj) { return obj === void 0 || obj === null || Object.keys(obj).length === 0; } function GlobalStyles$2(props) { const { styles: styles2, defaultTheme: defaultTheme2 = {} } = props; const globalStyles = typeof styles2 === "function" ? (themeInput) => styles2(isEmpty$2(themeInput) ? defaultTheme2 : themeInput) : styles2; return /* @__PURE__ */ jsxRuntimeExports.jsx(Global, { styles: globalStyles }); } function styled$1(tag, options) { const stylesFactory = newStyled(tag, options); return stylesFactory; } function internal_mutateStyles(tag, processor) { if (Array.isArray(tag.__emotion_styles)) { tag.__emotion_styles = processor(tag.__emotion_styles); } } const wrapper = []; function internal_serializeStyles(styles2) { wrapper[0] = styles2; return serializeStyles(wrapper); } const sortBreakpointsValues = (values2) => { const breakpointsAsArray = Object.keys(values2).map((key2) => ({ key: key2, val: values2[key2] })) || []; breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val); return breakpointsAsArray.reduce((acc, obj) => { return { ...acc, [obj.key]: obj.val }; }, {}); }; function createBreakpoints(breakpoints) { const { // The breakpoint **start** at this value. // For instance with the first breakpoint xs: [xs, sm). values: values2 = { xs: 0, // phone sm: 600, // tablet md: 900, // small laptop lg: 1200, // desktop xl: 1536 // large screen }, unit = "px", step = 5, ...other } = breakpoints; const sortedValues = sortBreakpointsValues(values2); const keys = Object.keys(sortedValues); function up(key2) { const value = typeof values2[key2] === "number" ? values2[key2] : key2; return `@media (min-width:${value}${unit})`; } function down(key2) { const value = typeof values2[key2] === "number" ? values2[key2] : key2; return `@media (max-width:${value - step / 100}${unit})`; } function between(start2, end2) { const endIndex = keys.indexOf(end2); return `@media (min-width:${typeof values2[start2] === "number" ? values2[start2] : start2}${unit}) and (max-width:${(endIndex !== -1 && typeof values2[keys[endIndex]] === "number" ? values2[keys[endIndex]] : end2) - step / 100}${unit})`; } function only(key2) { if (keys.indexOf(key2) + 1 < keys.length) { return between(key2, keys[keys.indexOf(key2) + 1]); } return up(key2); } function not(key2) { const keyIndex = keys.indexOf(key2); if (keyIndex === 0) { return up(keys[1]); } if (keyIndex === keys.length - 1) { return down(keys[keyIndex]); } return between(key2, keys[keys.indexOf(key2) + 1]).replace("@media", "@media not all and"); } return { keys, values: sortedValues, up, down, between, only, not, unit, ...other }; } const shape = { borderRadius: 4 }; function createSpacing(spacingInput = 8, transform = createUnarySpacing({ spacing: spacingInput })) { if (spacingInput.mui) { return spacingInput; } const spacing = (...argsInput) => { const args = argsInput.length === 0 ? [1] : argsInput; return args.map((argument) => { const output = transform(argument); return typeof output === "number" ? `${output}px` : output; }).join(" "); }; spacing.mui = true; return spacing; } function applyStyles$2(key2, styles2) { var _a; const theme = this; if (theme.vars) { if (!((_a = theme.colorSchemes) == null ? void 0 : _a[key2]) || typeof theme.getColorSchemeSelector !== "function") { return {}; } let selector = theme.getColorSchemeSelector(key2); if (selector === "&") { return styles2; } if (selector.includes("data-") || selector.includes(".")) { selector = `*:where(${selector.replace(/\s*&$/, "")}) &`; } return { [selector]: styles2 }; } if (theme.palette.mode === key2) { return styles2; } return {}; } function createTheme$1(options = {}, ...args) { const { breakpoints: breakpointsInput = {}, palette: paletteInput = {}, spacing: spacingInput, shape: shapeInput = {}, ...other } = options; const breakpoints = createBreakpoints(breakpointsInput); const spacing = createSpacing(spacingInput); let muiTheme = deepmerge({ breakpoints, direction: "ltr", components: {}, // Inject component definitions. palette: { mode: "light", ...paletteInput }, spacing, shape: { ...shape, ...shapeInput } }, other); muiTheme = cssContainerQueries(muiTheme); muiTheme.applyStyles = applyStyles$2; muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme); muiTheme.unstable_sxConfig = { ...defaultSxConfig, ...other == null ? void 0 : other.unstable_sxConfig }; muiTheme.unstable_sx = function sx(props) { return styleFunctionSx({ sx: props, theme: this }); }; return muiTheme; } function isObjectEmpty$2(obj) { return Object.keys(obj).length === 0; } function useTheme$3(defaultTheme2 = null) { const contextTheme = React__namespace.useContext(ThemeContext$1); return !contextTheme || isObjectEmpty$2(contextTheme) ? defaultTheme2 : contextTheme; } const systemDefaultTheme$1 = createTheme$1(); function useTheme$2(defaultTheme2 = systemDefaultTheme$1) { return useTheme$3(defaultTheme2); } function GlobalStyles$1({ styles: styles2, themeId, defaultTheme: defaultTheme2 = {} }) { const upperTheme = useTheme$2(defaultTheme2); const globalStyles = typeof styles2 === "function" ? styles2(themeId ? upperTheme[themeId] || upperTheme : upperTheme) : styles2; return /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalStyles$2, { styles: globalStyles }); } function createBox(options = {}) { const { themeId, defaultTheme: defaultTheme2, defaultClassName = "MuiBox-root", generateClassName } = options; const BoxRoot = styled$1("div", { shouldForwardProp: (prop) => prop !== "theme" && prop !== "sx" && prop !== "as" })(styleFunctionSx); const Box2 = /* @__PURE__ */ React__namespace.forwardRef(function Box3(inProps, ref) { const theme = useTheme$2(defaultTheme2); const { className, component = "div", ...other } = extendSxProp$1(inProps); return /* @__PURE__ */ jsxRuntimeExports.jsx(BoxRoot, { as: component, ref, className: clsx(className, generateClassName ? generateClassName(defaultClassName) : defaultClassName), theme: themeId ? theme[themeId] || theme : theme, ...other }); }); return Box2; } function preprocessStyles(input) { const { variants, ...style2 } = input; const result = { variants, style: internal_serializeStyles(style2), isProcessed: true }; if (result.style === style2) { return result; } if (variants) { variants.forEach((variant) => { if (typeof variant.style !== "function") { variant.style = internal_serializeStyles(variant.style); } }); } return result; } const systemDefaultTheme = createTheme$1(); function shouldForwardProp(prop) { return prop !== "ownerState" && prop !== "theme" && prop !== "sx" && prop !== "as"; } function defaultOverridesResolver(slot) { if (!slot) { return null; } return (_props, styles2) => styles2[slot]; } function attachTheme(props, themeId, defaultTheme2) { props.theme = isObjectEmpty$1(props.theme) ? defaultTheme2 : props.theme[themeId] || props.theme; } function processStyle(props, style2) { const resolvedStyle = typeof style2 === "function" ? style2(props) : style2; if (Array.isArray(resolvedStyle)) { return resolvedStyle.flatMap((subStyle) => processStyle(props, subStyle)); } if (Array.isArray(resolvedStyle == null ? void 0 : resolvedStyle.variants)) { let rootStyle; if (resolvedStyle.isProcessed) { rootStyle = resolvedStyle.style; } else { const { variants, ...otherStyles } = resolvedStyle; rootStyle = otherStyles; } return processStyleVariants(props, resolvedStyle.variants, [rootStyle]); } if (resolvedStyle == null ? void 0 : resolvedStyle.isProcessed) { return resolvedStyle.style; } return resolvedStyle; } function processStyleVariants(props, variants, results = []) { var _a; let mergedState; variantLoop: for (let i = 0; i < variants.length; i += 1) { const variant = variants[i]; if (typeof variant.props === "function") { mergedState ?? (mergedState = { ...props, ...props.ownerState, ownerState: props.ownerState }); if (!variant.props(mergedState)) { continue; } } else { for (const key2 in variant.props) { if (props[key2] !== variant.props[key2] && ((_a = props.ownerState) == null ? void 0 : _a[key2]) !== variant.props[key2]) { continue variantLoop; } } } if (typeof variant.style === "function") { mergedState ?? (mergedState = { ...props, ...props.ownerState, ownerState: props.ownerState }); results.push(variant.style(mergedState)); } else { results.push(variant.style); } } return results; } function createStyled2(input = {}) { const { themeId, defaultTheme: defaultTheme2 = systemDefaultTheme, rootShouldForwardProp: rootShouldForwardProp2 = shouldForwardProp, slotShouldForwardProp: slotShouldForwardProp2 = shouldForwardProp } = input; function styleAttachTheme(props) { attachTheme(props, themeId, defaultTheme2); } const styled2 = (tag, inputOptions = {}) => { internal_mutateStyles(tag, (styles2) => styles2.filter((style2) => style2 !== styleFunctionSx)); const { name: componentName, slot: componentSlot, skipVariantsResolver: inputSkipVariantsResolver, skipSx: inputSkipSx, // TODO v6: remove `lowercaseFirstLetter()` in the next major release // For more details: https://github.com/mui/material-ui/pull/37908 overridesResolver: overridesResolver2 = defaultOverridesResolver(lowercaseFirstLetter(componentSlot)), ...options } = inputOptions; const skipVariantsResolver = inputSkipVariantsResolver !== void 0 ? inputSkipVariantsResolver : ( // TODO v6: remove `Root` in the next major release // For more details: https://github.com/mui/material-ui/pull/37908 componentSlot && componentSlot !== "Root" && componentSlot !== "root" || false ); const skipSx = inputSkipSx || false; let shouldForwardPropOption = shouldForwardProp; if (componentSlot === "Root" || componentSlot === "root") { shouldForwardPropOption = rootShouldForwardProp2; } else if (componentSlot) { shouldForwardPropOption = slotShouldForwardProp2; } else if (isStringTag(tag)) { shouldForwardPropOption = void 0; } const defaultStyledResolver = styled$1(tag, { shouldForwardProp: shouldForwardPropOption, label: generateStyledLabel(), ...options }); const transformStyle = (style2) => { if (typeof style2 === "function" && style2.__emotion_real !== style2) { return function styleFunctionProcessor(props) { return processStyle(props, style2); }; } if (isPlainObject$1(style2)) { const serialized = preprocessStyles(style2); if (!serialized.variants) { return serialized.style; } return function styleObjectProcessor(props) { return processStyle(props, serialized); }; } return style2; }; const muiStyledResolver = (...expressionsInput) => { const expressionsHead = []; const expressionsBody = expressionsInput.map(transformStyle); const expressionsTail = []; expressionsHead.push(styleAttachTheme); if (componentName && overridesResolver2) { expressionsTail.push(function styleThemeOverrides(props) { var _a, _b; const theme = props.theme; const styleOverrides = (_b = (_a = theme.components) == null ? void 0 : _a[componentName]) == null ? void 0 : _b.styleOverrides; if (!styleOverrides) { return null; } const resolvedStyleOverrides = {}; for (const slotKey in styleOverrides) { resolvedStyleOverrides[slotKey] = processStyle(props, styleOverrides[slotKey]); } return overridesResolver2(props, resolvedStyleOverrides); }); } if (componentName && !skipVariantsResolver) { expressionsTail.push(function styleThemeVariants(props) { var _a, _b; const theme = props.theme; const themeVariants = (_b = (_a = theme == null ? void 0 : theme.components) == null ? void 0 : _a[componentName]) == null ? void 0 : _b.variants; if (!themeVariants) { return null; } return processStyleVariants(props, themeVariants); }); } if (!skipSx) { expressionsTail.push(styleFunctionSx); } if (Array.isArray(expressionsBody[0])) { const inputStrings = expressionsBody.shift(); const placeholdersHead = new Array(expressionsHead.length).fill(""); const placeholdersTail = new Array(expressionsTail.length).fill(""); let outputStrings; { outputStrings = [...placeholdersHead, ...inputStrings, ...placeholdersTail]; outputStrings.raw = [...placeholdersHead, ...inputStrings.raw, ...placeholdersTail]; } expressionsHead.unshift(outputStrings); } const expressions = [...expressionsHead, ...expressionsBody, ...expressionsTail]; const Component = defaultStyledResolver(...expressions); if (tag.muiName) { Component.muiName = tag.muiName; } return Component; }; if (defaultStyledResolver.withConfig) { muiStyledResolver.withConfig = defaultStyledResolver.withConfig; } return muiStyledResolver; }; return styled2; } function generateStyledLabel(componentName, componentSlot) { let label; return label; } function isObjectEmpty$1(object) { for (const _ in object) { return false; } return true; } function isStringTag(tag) { return typeof tag === "string" && // 96 is one less than the char code // for "a" so this is checking that // it's a lowercase character tag.charCodeAt(0) > 96; } function lowercaseFirstLetter(string) { if (!string) { return string; } return string.charAt(0).toLowerCase() + string.slice(1); } const ThemeContext = /* @__PURE__ */ React__namespace.createContext(null); function useTheme$1() { const theme = React__namespace.useContext(ThemeContext); return theme; } const hasSymbol = typeof Symbol === "function" && Symbol.for; const nested = hasSymbol ? Symbol.for("mui.nested") : "__THEME_NESTED__"; function mergeOuterLocalTheme(outerTheme, localTheme) { if (typeof localTheme === "function") { const mergedTheme = localTheme(outerTheme); return mergedTheme; } return { ...outerTheme, ...localTheme }; } function ThemeProvider$2(props) { const { children, theme: localTheme } = props; const outerTheme = useTheme$1(); const theme = React__namespace.useMemo(() => { const output = outerTheme === null ? { ...localTheme } : mergeOuterLocalTheme(outerTheme, localTheme); if (output != null) { output[nested] = outerTheme !== null; } return output; }, [localTheme, outerTheme]); return /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeContext.Provider, { value: theme, children }); } const RtlContext = /* @__PURE__ */ React__namespace.createContext(); function RtlProvider({ value, ...props }) { return /* @__PURE__ */ jsxRuntimeExports.jsx(RtlContext.Provider, { value: value ?? true, ...props }); } const useRtl = () => { const value = React__namespace.useContext(RtlContext); return value ?? false; }; const PropsContext = /* @__PURE__ */ React__namespace.createContext(void 0); function DefaultPropsProvider({ value, children }) { return /* @__PURE__ */ jsxRuntimeExports.jsx(PropsContext.Provider, { value, children }); } function getThemeProps(params) { const { theme, name, props } = params; if (!theme || !theme.components || !theme.components[name]) { return props; } const config2 = theme.components[name]; if (config2.defaultProps) { return resolveProps(config2.defaultProps, props); } if (!config2.styleOverrides && !config2.variants) { return resolveProps(config2, props); } return props; } function useDefaultProps$1({ props, name }) { const ctx = React__namespace.useContext(PropsContext); return getThemeProps({ props, name, theme: { components: ctx } }); } const EMPTY_THEME = {}; function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) { return React__namespace.useMemo(() => { const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme; if (typeof localTheme === "function") { const mergedTheme = localTheme(resolvedTheme); const result = themeId ? { ...upperTheme, [themeId]: mergedTheme } : mergedTheme; if (isPrivate) { return () => result; } return result; } return themeId ? { ...upperTheme, [themeId]: localTheme } : { ...upperTheme, ...localTheme }; }, [themeId, upperTheme, localTheme, isPrivate]); } function ThemeProvider$1(props) { const { children, theme: localTheme, themeId } = props; const upperTheme = useTheme$3(EMPTY_THEME); const upperPrivateTheme = useTheme$1() || EMPTY_THEME; const engineTheme = useThemeScoping(themeId, upperTheme, localTheme); const privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true); const rtlValue = (themeId ? engineTheme[themeId] : engineTheme).direction === "rtl"; return /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider$2, { theme: privateTheme, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeContext$1.Provider, { value: engineTheme, children: /* @__PURE__ */ jsxRuntimeExports.jsx(RtlProvider, { value: rtlValue, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DefaultPropsProvider, { value: themeId ? engineTheme[themeId].components : engineTheme.components, children }) }) }) }); } const arg = { theme: void 0 }; function unstable_memoTheme(styleFn) { let lastValue; let lastTheme; return function styleMemoized(props) { let value = lastValue; if (value === void 0 || props.theme !== lastTheme) { arg.theme = props.theme; value = preprocessStyles(styleFn(arg)); lastValue = value; lastTheme = props.theme; } return value; }; } const DEFAULT_MODE_STORAGE_KEY = "mode"; const DEFAULT_COLOR_SCHEME_STORAGE_KEY = "color-scheme"; const DEFAULT_ATTRIBUTE = "data-color-scheme"; function InitColorSchemeScript(options) { const { defaultMode = "system", defaultLightColorScheme = "light", defaultDarkColorScheme = "dark", modeStorageKey = DEFAULT_MODE_STORAGE_KEY, colorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY, attribute: initialAttribute = DEFAULT_ATTRIBUTE, colorSchemeNode = "document.documentElement", nonce } = options || {}; let setter = ""; let attribute = initialAttribute; if (initialAttribute === "class") { attribute = ".%s"; } if (initialAttribute === "data") { attribute = "[data-%s]"; } if (attribute.startsWith(".")) { const selector = attribute.substring(1); setter += `${colorSchemeNode}.classList.remove('${selector}'.replace('%s', light), '${selector}'.replace('%s', dark)); ${colorSchemeNode}.classList.add('${selector}'.replace('%s', colorScheme));`; } const matches = attribute.match(/\[([^\]]+)\]/); if (matches) { const [attr, value] = matches[1].split("="); if (!value) { setter += `${colorSchemeNode}.removeAttribute('${attr}'.replace('%s', light)); ${colorSchemeNode}.removeAttribute('${attr}'.replace('%s', dark));`; } setter += ` ${colorSchemeNode}.setAttribute('${attr}'.replace('%s', colorScheme), ${value ? `${value}.replace('%s', colorScheme)` : '""'});`; } else { setter += `${colorSchemeNode}.setAttribute('${attribute}', colorScheme);`; } return /* @__PURE__ */ jsxRuntimeExports.jsx("script", { suppressHydrationWarning: true, nonce: typeof window === "undefined" ? nonce : "", dangerouslySetInnerHTML: { __html: `(function() { try { let colorScheme = ''; const mode = localStorage.getItem('${modeStorageKey}') || '${defaultMode}'; const dark = localStorage.getItem('${colorSchemeStorageKey}-dark') || '${defaultDarkColorScheme}'; const light = localStorage.getItem('${colorSchemeStorageKey}-light') || '${defaultLightColorScheme}'; if (mode === 'system') { // handle system mode const mql = window.matchMedia('(prefers-color-scheme: dark)'); if (mql.matches) { colorScheme = dark } else { colorScheme = light } } if (mode === 'light') { colorScheme = light; } if (mode === 'dark') { colorScheme = dark; } if (colorScheme) { ${setter} } } catch(e){}})();` } }, "mui-color-scheme-init"); } function noop$4() { } const localStorageManager = ({ key: key2, storageWindow }) => { if (!storageWindow && typeof window !== "undefined") { storageWindow = window; } return { get(defaultValue) { if (typeof window === "undefined") { return void 0; } if (!storageWindow) { return defaultValue; } let value; try { value = storageWindow.localStorage.getItem(key2); } catch { } return value || defaultValue; }, set: (value) => { if (storageWindow) { try { storageWindow.localStorage.setItem(key2, value); } catch { } } }, subscribe: (handler) => { if (!storageWindow) { return noop$4; } const listener = (event) => { const value = event.newValue; if (event.key === key2) { handler(value); } }; storageWindow.addEventListener("storage", listener); return () => { storageWindow.removeEventListener("storage", listener); }; } }; }; function noop$3() { } function getSystemMode(mode) { if (typeof window !== "undefined" && typeof window.matchMedia === "function" && mode === "system") { const mql = window.matchMedia("(prefers-color-scheme: dark)"); if (mql.matches) { return "dark"; } return "light"; } return void 0; } function processState(state, callback) { if (state.mode === "light" || state.mode === "system" && state.systemMode === "light") { return callback("light"); } if (state.mode === "dark" || state.mode === "system" && state.systemMode === "dark") { return callback("dark"); } return void 0; } function getColorScheme(state) { return processState(state, (mode) => { if (mode === "light") { return state.lightColorScheme; } if (mode === "dark") { return state.darkColorScheme; } return void 0; }); } function useCurrentColorScheme(options) { const { defaultMode = "light", defaultLightColorScheme, defaultDarkColorScheme, supportedColorSchemes = [], modeStorageKey = DEFAULT_MODE_STORAGE_KEY, colorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY, storageWindow = typeof window === "undefined" ? void 0 : window, storageManager = localStorageManager, noSsr = false } = options; const joinedColorSchemes = supportedColorSchemes.join(","); const isMultiSchemes = supportedColorSchemes.length > 1; const modeStorage = React__namespace.useMemo(() => storageManager == null ? void 0 : storageManager({ key: modeStorageKey, storageWindow }), [storageManager, modeStorageKey, storageWindow]); const lightStorage = React__namespace.useMemo(() => storageManager == null ? void 0 : storageManager({ key: `${colorSchemeStorageKey}-light`, storageWindow }), [storageManager, colorSchemeStorageKey, storageWindow]); const darkStorage = React__namespace.useMemo(() => storageManager == null ? void 0 : storageManager({ key: `${colorSchemeStorageKey}-dark`, storageWindow }), [storageManager, colorSchemeStorageKey, storageWindow]); const [state, setState] = React__namespace.useState(() => { const initialMode = (modeStorage == null ? void 0 : modeStorage.get(defaultMode)) || defaultMode; const lightColorScheme = (lightStorage == null ? void 0 : lightStorage.get(defaultLightColorScheme)) || defaultLightColorScheme; const darkColorScheme = (darkStorage == null ? void 0 : darkStorage.get(defaultDarkColorScheme)) || defaultDarkColorScheme; return { mode: initialMode, systemMode: getSystemMode(initialMode), lightColorScheme, darkColorScheme }; }); const [isClient, setIsClient] = React__namespace.useState(noSsr || !isMultiSchemes); React__namespace.useEffect(() => { setIsClient(true); }, []); const colorScheme = getColorScheme(state); const setMode = React__namespace.useCallback((mode) => { setState((currentState) => { if (mode === currentState.mode) { return currentState; } const newMode = mode ?? defaultMode; modeStorage == null ? void 0 : modeStorage.set(newMode); return { ...currentState, mode: newMode, systemMode: getSystemMode(newMode) }; }); }, [modeStorage, defaultMode]); const setColorScheme = React__namespace.useCallback((value) => { if (!value) { setState((currentState) => { lightStorage == null ? void 0 : lightStorage.set(defaultLightColorScheme); darkStorage == null ? void 0 : darkStorage.set(defaultDarkColorScheme); return { ...currentState, lightColorScheme: defaultLightColorScheme, darkColorScheme: defaultDarkColorScheme }; }); } else if (typeof value === "string") { if (value && !joinedColorSchemes.includes(value)) { console.error(`\`${value}\` does not exist in \`theme.colorSchemes\`.`); } else { setState((currentState) => { const newState = { ...currentState }; processState(currentState, (mode) => { if (mode === "light") { lightStorage == null ? void 0 : lightStorage.set(value); newState.lightColorScheme = value; } if (mode === "dark") { darkStorage == null ? void 0 : darkStorage.set(value); newState.darkColorScheme = value; } }); return newState; }); } } else { setState((currentState) => { const newState = { ...currentState }; const newLightColorScheme = value.light === null ? defaultLightColorScheme : value.light; const newDarkColorScheme = value.dark === null ? defaultDarkColorScheme : value.dark; if (newLightColorScheme) { if (!joinedColorSchemes.includes(newLightColorScheme)) { console.error(`\`${newLightColorScheme}\` does not exist in \`theme.colorSchemes\`.`); } else { newState.lightColorScheme = newLightColorScheme; lightStorage == null ? void 0 : lightStorage.set(newLightColorScheme); } } if (newDarkColorScheme) { if (!joinedColorSchemes.includes(newDarkColorScheme)) { console.error(`\`${newDarkColorScheme}\` does not exist in \`theme.colorSchemes\`.`); } else { newState.darkColorScheme = newDarkColorScheme; darkStorage == null ? void 0 : darkStorage.set(newDarkColorScheme); } } return newState; }); } }, [joinedColorSchemes, lightStorage, darkStorage, defaultLightColorScheme, defaultDarkColorScheme]); const handleMediaQuery = React__namespace.useCallback((event) => { if (state.mode === "system") { setState((currentState) => { const systemMode = (event == null ? void 0 : event.matches) ? "dark" : "light"; if (currentState.systemMode === systemMode) { return currentState; } return { ...currentState, systemMode }; }); } }, [state.mode]); const mediaListener = React__namespace.useRef(handleMediaQuery); mediaListener.current = handleMediaQuery; React__namespace.useEffect(() => { if (typeof window.matchMedia !== "function" || !isMultiSchemes) { return void 0; } const handler = (...args) => mediaListener.current(...args); const media = window.matchMedia("(prefers-color-scheme: dark)"); media.addListener(handler); handler(media); return () => { media.removeListener(handler); }; }, [isMultiSchemes]); React__namespace.useEffect(() => { if (isMultiSchemes) { const unsubscribeMode = (modeStorage == null ? void 0 : modeStorage.subscribe((value) => { if (!value || ["light", "dark", "system"].includes(value)) { setMode(value || defaultMode); } })) || noop$3; const unsubscribeLight = (lightStorage == null ? void 0 : lightStorage.subscribe((value) => { if (!value || joinedColorSchemes.match(value)) { setColorScheme({ light: value }); } })) || noop$3; const unsubscribeDark = (darkStorage == null ? void 0 : darkStorage.subscribe((value) => { if (!value || joinedColorSchemes.match(value)) { setColorScheme({ dark: value }); } })) || noop$3; return () => { unsubscribeMode(); unsubscribeLight(); unsubscribeDark(); }; } return void 0; }, [setColorScheme, setMode, joinedColorSchemes, defaultMode, storageWindow, isMultiSchemes, modeStorage, lightStorage, darkStorage]); return { ...state, mode: isClient ? state.mode : void 0, systemMode: isClient ? state.systemMode : void 0, colorScheme: isClient ? colorScheme : void 0, setMode, setColorScheme }; } const DISABLE_CSS_TRANSITION = "*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}"; function createCssVarsProvider(options) { const { themeId, /** * This `theme` object needs to follow a certain structure to * be used correctly by the finel `CssVarsProvider`. It should have a * `colorSchemes` key with the light and dark (and any other) palette. * It should also ideally have a vars object created using `prepareCssVars`. */ theme: defaultTheme2 = {}, modeStorageKey: defaultModeStorageKey = DEFAULT_MODE_STORAGE_KEY, colorSchemeStorageKey: defaultColorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY, disableTransitionOnChange: designSystemTransitionOnChange = false, defaultColorScheme, resolveTheme } = options; const defaultContext = { allColorSchemes: [], colorScheme: void 0, darkColorScheme: void 0, lightColorScheme: void 0, mode: void 0, setColorScheme: () => { }, setMode: () => { }, systemMode: void 0 }; const ColorSchemeContext = /* @__PURE__ */ React__namespace.createContext(void 0); const useColorScheme = () => React__namespace.useContext(ColorSchemeContext) || defaultContext; const defaultColorSchemes = {}; const defaultComponents = {}; function CssVarsProvider2(props) { var _a, _b, _c, _d; const { children, theme: themeProp, modeStorageKey = defaultModeStorageKey, colorSchemeStorageKey = defaultColorSchemeStorageKey, disableTransitionOnChange = designSystemTransitionOnChange, storageManager, storageWindow = typeof window === "undefined" ? void 0 : window, documentNode = typeof document === "undefined" ? void 0 : document, colorSchemeNode = typeof document === "undefined" ? void 0 : document.documentElement, disableNestedContext = false, disableStyleSheetGeneration = false, defaultMode: initialMode = "system", forceThemeRerender = false, noSsr } = props; const hasMounted = React__namespace.useRef(false); const upperTheme = useTheme$1(); const ctx = React__namespace.useContext(ColorSchemeContext); const nested2 = !!ctx && !disableNestedContext; const initialTheme = React__namespace.useMemo(() => { if (themeProp) { return themeProp; } return typeof defaultTheme2 === "function" ? defaultTheme2() : defaultTheme2; }, [themeProp]); const scopedTheme = initialTheme[themeId]; const restThemeProp = scopedTheme || initialTheme; const { colorSchemes = defaultColorSchemes, components = defaultComponents, cssVarPrefix } = restThemeProp; const joinedColorSchemes = Object.keys(colorSchemes).filter((k) => !!colorSchemes[k]).join(","); const allColorSchemes = React__namespace.useMemo(() => joinedColorSchemes.split(","), [joinedColorSchemes]); const defaultLightColorScheme2 = typeof defaultColorScheme === "string" ? defaultColorScheme : defaultColorScheme.light; const defaultDarkColorScheme2 = typeof defaultColorScheme === "string" ? defaultColorScheme : defaultColorScheme.dark; const defaultMode = colorSchemes[defaultLightColorScheme2] && colorSchemes[defaultDarkColorScheme2] ? initialMode : ((_b = (_a = colorSchemes[restThemeProp.defaultColorScheme]) == null ? void 0 : _a.palette) == null ? void 0 : _b.mode) || ((_c = restThemeProp.palette) == null ? void 0 : _c.mode); const { mode: stateMode, setMode, systemMode, lightColorScheme, darkColorScheme, colorScheme: stateColorScheme, setColorScheme } = useCurrentColorScheme({ supportedColorSchemes: allColorSchemes, defaultLightColorScheme: defaultLightColorScheme2, defaultDarkColorScheme: defaultDarkColorScheme2, modeStorageKey, colorSchemeStorageKey, defaultMode, storageManager, storageWindow, noSsr }); let mode = stateMode; let colorScheme = stateColorScheme; if (nested2) { mode = ctx.mode; colorScheme = ctx.colorScheme; } let calculatedColorScheme = colorScheme || restThemeProp.defaultColorScheme; if (restThemeProp.vars && !forceThemeRerender) { calculatedColorScheme = restThemeProp.defaultColorScheme; } const memoTheme2 = React__namespace.useMemo(() => { var _a2; const themeVars = ((_a2 = restThemeProp.generateThemeVars) == null ? void 0 : _a2.call(restThemeProp)) || restThemeProp.vars; const theme = { ...restThemeProp, components, colorSchemes, cssVarPrefix, vars: themeVars }; if (typeof theme.generateSpacing === "function") { theme.spacing = theme.generateSpacing(); } if (calculatedColorScheme) { const scheme = colorSchemes[calculatedColorScheme]; if (scheme && typeof scheme === "object") { Object.keys(scheme).forEach((schemeKey) => { if (scheme[schemeKey] && typeof scheme[schemeKey] === "object") { theme[schemeKey] = { ...theme[schemeKey], ...scheme[schemeKey] }; } else { theme[schemeKey] = scheme[schemeKey]; } }); } } return resolveTheme ? resolveTheme(theme) : theme; }, [restThemeProp, calculatedColorScheme, components, colorSchemes, cssVarPrefix]); const colorSchemeSelector = restThemeProp.colorSchemeSelector; useEnhancedEffect(() => { if (colorScheme && colorSchemeNode && colorSchemeSelector && colorSchemeSelector !== "media") { const selector = colorSchemeSelector; let rule = colorSchemeSelector; if (selector === "class") { rule = `.%s`; } if (selector === "data") { rule = `[data-%s]`; } if ((selector == null ? void 0 : selector.startsWith("data-")) && !selector.includes("%s")) { rule = `[${selector}="%s"]`; } if (rule.startsWith(".")) { colorSchemeNode.classList.remove(...allColorSchemes.map((scheme) => rule.substring(1).replace("%s", scheme))); colorSchemeNode.classList.add(rule.substring(1).replace("%s", colorScheme)); } else { const matches = rule.replace("%s", colorScheme).match(/\[([^\]]+)\]/); if (matches) { const [attr, value] = matches[1].split("="); if (!value) { allColorSchemes.forEach((scheme) => { colorSchemeNode.removeAttribute(attr.replace(colorScheme, scheme)); }); } colorSchemeNode.setAttribute(attr, value ? value.replace(/"|'/g, "") : ""); } else { colorSchemeNode.setAttribute(rule, colorScheme); } } } }, [colorScheme, colorSchemeSelector, colorSchemeNode, allColorSchemes]); React__namespace.useEffect(() => { let timer2; if (disableTransitionOnChange && hasMounted.current && documentNode) { const css2 = documentNode.createElement("style"); css2.appendChild(documentNode.createTextNode(DISABLE_CSS_TRANSITION)); documentNode.head.appendChild(css2); (() => window.getComputedStyle(documentNode.body))(); timer2 = setTimeout(() => { documentNode.head.removeChild(css2); }, 1); } return () => { clearTimeout(timer2); }; }, [colorScheme, disableTransitionOnChange, documentNode]); React__namespace.useEffect(() => { hasMounted.current = true; return () => { hasMounted.current = false; }; }, []); const contextValue = React__namespace.useMemo(() => ({ allColorSchemes, colorScheme, darkColorScheme, lightColorScheme, mode, setColorScheme, setMode, systemMode }), [allColorSchemes, colorScheme, darkColorScheme, lightColorScheme, mode, setColorScheme, setMode, systemMode, memoTheme2.colorSchemeSelector]); let shouldGenerateStyleSheet = true; if (disableStyleSheetGeneration || restThemeProp.cssVariables === false || nested2 && (upperTheme == null ? void 0 : upperTheme.cssVarPrefix) === cssVarPrefix) { shouldGenerateStyleSheet = false; } const element = /* @__PURE__ */ jsxRuntimeExports.jsxs(React__namespace.Fragment, { children: [/* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider$1, { themeId: scopedTheme ? themeId : void 0, theme: memoTheme2, children }), shouldGenerateStyleSheet && /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalStyles$2, { styles: ((_d = memoTheme2.generateStyleSheets) == null ? void 0 : _d.call(memoTheme2)) || [] })] }); if (nested2) { return element; } return /* @__PURE__ */ jsxRuntimeExports.jsx(ColorSchemeContext.Provider, { value: contextValue, children: element }); } const defaultLightColorScheme = typeof defaultColorScheme === "string" ? defaultColorScheme : defaultColorScheme.light; const defaultDarkColorScheme = typeof defaultColorScheme === "string" ? defaultColorScheme : defaultColorScheme.dark; const getInitColorSchemeScript = (params) => InitColorSchemeScript({ colorSchemeStorageKey: defaultColorSchemeStorageKey, defaultLightColorScheme, defaultDarkColorScheme, modeStorageKey: defaultModeStorageKey, ...params }); return { CssVarsProvider: CssVarsProvider2, useColorScheme, getInitColorSchemeScript }; } function createGetCssVar$1(prefix2 = "") { function appendVar(...vars) { if (!vars.length) { return ""; } const value = vars[0]; if (typeof value === "string" && !value.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)) { return `, var(--${prefix2 ? `${prefix2}-` : ""}${value}${appendVar(...vars.slice(1))})`; } return `, ${value}`; } const getCssVar = (field, ...fallbacks) => { return `var(--${prefix2 ? `${prefix2}-` : ""}${field}${appendVar(...fallbacks)})`; }; return getCssVar; } const assignNestedKeys = (obj, keys, value, arrayKeys = []) => { let temp = obj; keys.forEach((k, index) => { if (index === keys.length - 1) { if (Array.isArray(temp)) { temp[Number(k)] = value; } else if (temp && typeof temp === "object") { temp[k] = value; } } else if (temp && typeof temp === "object") { if (!temp[k]) { temp[k] = arrayKeys.includes(k) ? [] : {}; } temp = temp[k]; } }); }; const walkObjectDeep = (obj, callback, shouldSkipPaths) => { function recurse(object, parentKeys = [], arrayKeys = []) { Object.entries(object).forEach(([key2, value]) => { if (!shouldSkipPaths || shouldSkipPaths && !shouldSkipPaths([...parentKeys, key2])) { if (value !== void 0 && value !== null) { if (typeof value === "object" && Object.keys(value).length > 0) { recurse(value, [...parentKeys, key2], Array.isArray(value) ? [...arrayKeys, key2] : arrayKeys); } else { callback([...parentKeys, key2], value, arrayKeys); } } } }); } recurse(obj); }; const getCssValue = (keys, value) => { if (typeof value === "number") { if (["lineHeight", "fontWeight", "opacity", "zIndex"].some((prop) => keys.includes(prop))) { return value; } const lastKey = keys[keys.length - 1]; if (lastKey.toLowerCase().includes("opacity")) { return value; } return `${value}px`; } return value; }; function cssVarsParser(theme, options) { const { prefix: prefix2, shouldSkipGeneratingVar: shouldSkipGeneratingVar2 } = options || {}; const css2 = {}; const vars = {}; const varsWithDefaults = {}; walkObjectDeep( theme, (keys, value, arrayKeys) => { if (typeof value === "string" || typeof value === "number") { if (!shouldSkipGeneratingVar2 || !shouldSkipGeneratingVar2(keys, value)) { const cssVar = `--${prefix2 ? `${prefix2}-` : ""}${keys.join("-")}`; const resolvedValue = getCssValue(keys, value); Object.assign(css2, { [cssVar]: resolvedValue }); assignNestedKeys(vars, keys, `var(${cssVar})`, arrayKeys); assignNestedKeys(varsWithDefaults, keys, `var(${cssVar}, ${resolvedValue})`, arrayKeys); } } }, (keys) => keys[0] === "vars" // skip 'vars/*' paths ); return { css: css2, vars, varsWithDefaults }; } function prepareCssVars(theme, parserConfig = {}) { const { getSelector = defaultGetSelector2, disableCssColorScheme, colorSchemeSelector: selector } = parserConfig; const { colorSchemes = {}, components, defaultColorScheme = "light", ...otherTheme } = theme; const { vars: rootVars, css: rootCss, varsWithDefaults: rootVarsWithDefaults } = cssVarsParser(otherTheme, parserConfig); let themeVars = rootVarsWithDefaults; const colorSchemesMap = {}; const { [defaultColorScheme]: defaultScheme, ...otherColorSchemes } = colorSchemes; Object.entries(otherColorSchemes || {}).forEach(([key2, scheme]) => { const { vars, css: css2, varsWithDefaults } = cssVarsParser(scheme, parserConfig); themeVars = deepmerge(themeVars, varsWithDefaults); colorSchemesMap[key2] = { css: css2, vars }; }); if (defaultScheme) { const { css: css2, vars, varsWithDefaults } = cssVarsParser(defaultScheme, parserConfig); themeVars = deepmerge(themeVars, varsWithDefaults); colorSchemesMap[defaultColorScheme] = { css: css2, vars }; } function defaultGetSelector2(colorScheme, cssObject) { var _a, _b; let rule = selector; if (selector === "class") { rule = ".%s"; } if (selector === "data") { rule = "[data-%s]"; } if ((selector == null ? void 0 : selector.startsWith("data-")) && !selector.includes("%s")) { rule = `[${selector}="%s"]`; } if (colorScheme) { if (rule === "media") { if (theme.defaultColorScheme === colorScheme) { return ":root"; } const mode = ((_b = (_a = colorSchemes[colorScheme]) == null ? void 0 : _a.palette) == null ? void 0 : _b.mode) || colorScheme; return { [`@media (prefers-color-scheme: ${mode})`]: { ":root": cssObject } }; } if (rule) { if (theme.defaultColorScheme === colorScheme) { return `:root, ${rule.replace("%s", String(colorScheme))}`; } return rule.replace("%s", String(colorScheme)); } } return ":root"; } const generateThemeVars = () => { let vars = { ...rootVars }; Object.entries(colorSchemesMap).forEach(([, { vars: schemeVars }]) => { vars = deepmerge(vars, schemeVars); }); return vars; }; const generateStyleSheets = () => { var _a, _b; const stylesheets = []; const colorScheme = theme.defaultColorScheme || "light"; function insertStyleSheet(key2, css2) { if (Object.keys(css2).length) { stylesheets.push(typeof key2 === "string" ? { [key2]: { ...css2 } } : key2); } } insertStyleSheet(getSelector(void 0, { ...rootCss }), rootCss); const { [colorScheme]: defaultSchemeVal, ...other } = colorSchemesMap; if (defaultSchemeVal) { const { css: css2 } = defaultSchemeVal; const cssColorSheme = (_b = (_a = colorSchemes[colorScheme]) == null ? void 0 : _a.palette) == null ? void 0 : _b.mode; const finalCss = !disableCssColorScheme && cssColorSheme ? { colorScheme: cssColorSheme, ...css2 } : { ...css2 }; insertStyleSheet(getSelector(colorScheme, { ...finalCss }), finalCss); } Object.entries(other).forEach(([key2, { css: css2 }]) => { var _a2, _b2; const cssColorSheme = (_b2 = (_a2 = colorSchemes[key2]) == null ? void 0 : _a2.palette) == null ? void 0 : _b2.mode; const finalCss = !disableCssColorScheme && cssColorSheme ? { colorScheme: cssColorSheme, ...css2 } : { ...css2 }; insertStyleSheet(getSelector(key2, { ...finalCss }), finalCss); }); return stylesheets; }; return { vars: themeVars, generateThemeVars, generateStyleSheets }; } function createGetColorSchemeSelector(selector) { return function getColorSchemeSelector(colorScheme) { if (selector === "media") { return `@media (prefers-color-scheme: ${colorScheme})`; } if (selector) { if (selector.startsWith("data-") && !selector.includes("%s")) { return `[${selector}="${colorScheme}"] &`; } if (selector === "class") { return `.${colorScheme} &`; } if (selector === "data") { return `[data-${colorScheme}] &`; } return `${selector.replace("%s", colorScheme)} &`; } return "&"; }; } const common = { black: "#000", white: "#fff" }; const grey = { 50: "#fafafa", 100: "#f5f5f5", 200: "#eeeeee", 300: "#e0e0e0", 400: "#bdbdbd", 500: "#9e9e9e", 600: "#757575", 700: "#616161", 800: "#424242", 900: "#212121", A100: "#f5f5f5", A200: "#eeeeee", A400: "#bdbdbd", A700: "#616161" }; const purple = { 50: "#f3e5f5", 200: "#ce93d8", 300: "#ba68c8", 400: "#ab47bc", 500: "#9c27b0", 700: "#7b1fa2" }; const red = { 300: "#e57373", 400: "#ef5350", 500: "#f44336", 700: "#d32f2f", 800: "#c62828" }; const orange = { 300: "#ffb74d", 400: "#ffa726", 500: "#ff9800", 700: "#f57c00", 900: "#e65100" }; const blue = { 50: "#e3f2fd", 200: "#90caf9", 400: "#42a5f5", 700: "#1976d2", 800: "#1565c0" }; const lightBlue = { 300: "#4fc3f7", 400: "#29b6f6", 500: "#03a9f4", 700: "#0288d1", 900: "#01579b" }; const green = { 300: "#81c784", 400: "#66bb6a", 500: "#4caf50", 700: "#388e3c", 800: "#2e7d32", 900: "#1b5e20" }; function getLight() { return { // The colors used to style the text. text: { // The most important text. primary: "rgba(0, 0, 0, 0.87)", // Secondary text. secondary: "rgba(0, 0, 0, 0.6)", // Disabled text have even lower visual prominence. disabled: "rgba(0, 0, 0, 0.38)" }, // The color used to divide different elements. divider: "rgba(0, 0, 0, 0.12)", // The background colors used to style the surfaces. // Consistency between these values is important. background: { paper: common.white, default: common.white }, // The colors used to style the action elements. action: { // The color of an active action like an icon button. active: "rgba(0, 0, 0, 0.54)", // The color of an hovered action. hover: "rgba(0, 0, 0, 0.04)", hoverOpacity: 0.04, // The color of a selected action. selected: "rgba(0, 0, 0, 0.08)", selectedOpacity: 0.08, // The color of a disabled action. disabled: "rgba(0, 0, 0, 0.26)", // The background color of a disabled action. disabledBackground: "rgba(0, 0, 0, 0.12)", disabledOpacity: 0.38, focus: "rgba(0, 0, 0, 0.12)", focusOpacity: 0.12, activatedOpacity: 0.12 } }; } const light = getLight(); function getDark() { return { text: { primary: common.white, secondary: "rgba(255, 255, 255, 0.7)", disabled: "rgba(255, 255, 255, 0.5)", icon: "rgba(255, 255, 255, 0.5)" }, divider: "rgba(255, 255, 255, 0.12)", background: { paper: "#121212", default: "#121212" }, action: { active: common.white, hover: "rgba(255, 255, 255, 0.08)", hoverOpacity: 0.08, selected: "rgba(255, 255, 255, 0.16)", selectedOpacity: 0.16, disabled: "rgba(255, 255, 255, 0.3)", disabledBackground: "rgba(255, 255, 255, 0.12)", disabledOpacity: 0.38, focus: "rgba(255, 255, 255, 0.12)", focusOpacity: 0.12, activatedOpacity: 0.24 } }; } const dark = getDark(); function addLightOrDark(intent, direction, shade, tonalOffset) { const tonalOffsetLight = tonalOffset.light || tonalOffset; const tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5; if (!intent[direction]) { if (intent.hasOwnProperty(shade)) { intent[direction] = intent[shade]; } else if (direction === "light") { intent.light = lighten(intent.main, tonalOffsetLight); } else if (direction === "dark") { intent.dark = darken(intent.main, tonalOffsetDark); } } } function getDefaultPrimary(mode = "light") { if (mode === "dark") { return { main: blue[200], light: blue[50], dark: blue[400] }; } return { main: blue[700], light: blue[400], dark: blue[800] }; } function getDefaultSecondary(mode = "light") { if (mode === "dark") { return { main: purple[200], light: purple[50], dark: purple[400] }; } return { main: purple[500], light: purple[300], dark: purple[700] }; } function getDefaultError(mode = "light") { if (mode === "dark") { return { main: red[500], light: red[300], dark: red[700] }; } return { main: red[700], light: red[400], dark: red[800] }; } function getDefaultInfo(mode = "light") { if (mode === "dark") { return { main: lightBlue[400], light: lightBlue[300], dark: lightBlue[700] }; } return { main: lightBlue[700], light: lightBlue[500], dark: lightBlue[900] }; } function getDefaultSuccess(mode = "light") { if (mode === "dark") { return { main: green[400], light: green[300], dark: green[700] }; } return { main: green[800], light: green[500], dark: green[900] }; } function getDefaultWarning(mode = "light") { if (mode === "dark") { return { main: orange[400], light: orange[300], dark: orange[700] }; } return { main: "#ed6c02", // closest to orange[800] that pass 3:1. light: orange[500], dark: orange[900] }; } function createPalette(palette) { const { mode = "light", contrastThreshold = 3, tonalOffset = 0.2, ...other } = palette; const primary = palette.primary || getDefaultPrimary(mode); const secondary = palette.secondary || getDefaultSecondary(mode); const error = palette.error || getDefaultError(mode); const info2 = palette.info || getDefaultInfo(mode); const success = palette.success || getDefaultSuccess(mode); const warning = palette.warning || getDefaultWarning(mode); function getContrastText(background) { const contrastText = getContrastRatio(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary; return contrastText; } const augmentColor = ({ color: color2, name, mainShade = 500, lightShade = 300, darkShade = 700 }) => { color2 = { ...color2 }; if (!color2.main && color2[mainShade]) { color2.main = color2[mainShade]; } if (!color2.hasOwnProperty("main")) { throw new Error(formatMuiErrorMessage(11, name ? ` (${name})` : "", mainShade)); } if (typeof color2.main !== "string") { throw new Error(formatMuiErrorMessage(12, name ? ` (${name})` : "", JSON.stringify(color2.main))); } addLightOrDark(color2, "light", lightShade, tonalOffset); addLightOrDark(color2, "dark", darkShade, tonalOffset); if (!color2.contrastText) { color2.contrastText = getContrastText(color2.main); } return color2; }; let modeHydrated; if (mode === "light") { modeHydrated = getLight(); } else if (mode === "dark") { modeHydrated = getDark(); } const paletteOutput = deepmerge({ // A collection of common colors. common: { ...common }, // prevent mutable object. // The palette mode, can be light or dark. mode, // The colors used to represent primary interface elements for a user. primary: augmentColor({ color: primary, name: "primary" }), // The colors used to represent secondary interface elements for a user. secondary: augmentColor({ color: secondary, name: "secondary", mainShade: "A400", lightShade: "A200", darkShade: "A700" }), // The colors used to represent interface elements that the user should be made aware of. error: augmentColor({ color: error, name: "error" }), // The colors used to represent potentially dangerous actions or important messages. warning: augmentColor({ color: warning, name: "warning" }), // The colors used to present information to the user that is neutral and not necessarily important. info: augmentColor({ color: info2, name: "info" }), // The colors used to indicate the successful completion of an action that user triggered. success: augmentColor({ color: success, name: "success" }), // The grey colors. grey, // Used by `getContrastText()` to maximize the contrast between // the background and the text. contrastThreshold, // Takes a background color and returns the text color that maximizes the contrast. getContrastText, // Generate a rich color object. augmentColor, // Used by the functions below to shift a color's luminance by approximately // two indexes within its tonal palette. // E.g., shift from Red 500 to Red 300 or Red 700. tonalOffset, // The light and dark mode object. ...modeHydrated }, other); return paletteOutput; } function prepareTypographyVars(typography) { const vars = {}; const entries = Object.entries(typography); entries.forEach((entry) => { const [key2, value] = entry; if (typeof value === "object") { vars[key2] = `${value.fontStyle ? `${value.fontStyle} ` : ""}${value.fontVariant ? `${value.fontVariant} ` : ""}${value.fontWeight ? `${value.fontWeight} ` : ""}${value.fontStretch ? `${value.fontStretch} ` : ""}${value.fontSize || ""}${value.lineHeight ? `/${value.lineHeight} ` : ""}${value.fontFamily || ""}`; } }); return vars; } function createMixins(breakpoints, mixins) { return { toolbar: { minHeight: 56, [breakpoints.up("xs")]: { "@media (orientation: landscape)": { minHeight: 48 } }, [breakpoints.up("sm")]: { minHeight: 64 } }, ...mixins }; } function round$2(value) { return Math.round(value * 1e5) / 1e5; } const caseAllCaps = { textTransform: "uppercase" }; const defaultFontFamily = '"Roboto", "Helvetica", "Arial", sans-serif'; function createTypography(palette, typography) { const { fontFamily = defaultFontFamily, // The default font size of the Material Specification. fontSize = 14, // px fontWeightLight = 300, fontWeightRegular = 400, fontWeightMedium = 500, fontWeightBold = 700, // Tell MUI what's the font-size on the html element. // 16px is the default font-size used by browsers. htmlFontSize = 16, // Apply the CSS properties to all the variants. allVariants, pxToRem: pxToRem2, ...other } = typeof typography === "function" ? typography(palette) : typography; const coef = fontSize / 14; const pxToRem = pxToRem2 || ((size) => `${size / htmlFontSize * coef}rem`); const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => ({ fontFamily, fontWeight, fontSize: pxToRem(size), // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/ lineHeight, // The letter spacing was designed for the Roboto font-family. Using the same letter-spacing // across font-families can cause issues with the kerning. ...fontFamily === defaultFontFamily ? { letterSpacing: `${round$2(letterSpacing / size)}em` } : {}, ...casing, ...allVariants }); const variants = { h1: buildVariant(fontWeightLight, 96, 1.167, -1.5), h2: buildVariant(fontWeightLight, 60, 1.2, -0.5), h3: buildVariant(fontWeightRegular, 48, 1.167, 0), h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25), h5: buildVariant(fontWeightRegular, 24, 1.334, 0), h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15), subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15), subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1), body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15), body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15), button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps), caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4), overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps), // TODO v6: Remove handling of 'inherit' variant from the theme as it is already handled in Material UI's Typography component. Also, remember to remove the associated types. inherit: { fontFamily: "inherit", fontWeight: "inherit", fontSize: "inherit", lineHeight: "inherit", letterSpacing: "inherit" } }; return deepmerge({ htmlFontSize, pxToRem, fontFamily, fontSize, fontWeightLight, fontWeightRegular, fontWeightMedium, fontWeightBold, ...variants }, other, { clone: false // No need to clone deep }); } const shadowKeyUmbraOpacity = 0.2; const shadowKeyPenumbraOpacity = 0.14; const shadowAmbientShadowOpacity = 0.12; function createShadow(...px) { return [`${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`, `${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`, `${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(","); } const shadows = ["none", createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)]; const easing = { // This is the most common easing curve. easeInOut: "cubic-bezier(0.4, 0, 0.2, 1)", // Objects enter the screen at full velocity from off-screen and // slowly decelerate to a resting point. easeOut: "cubic-bezier(0.0, 0, 0.2, 1)", // Objects leave the screen at full velocity. They do not decelerate when off-screen. easeIn: "cubic-bezier(0.4, 0, 1, 1)", // The sharp curve is used by objects that may return to the screen at any time. sharp: "cubic-bezier(0.4, 0, 0.6, 1)" }; const duration = { shortest: 150, shorter: 200, short: 250, // most basic recommended timing standard: 300, // this is to be used in complex animations complex: 375, // recommended when something is entering screen enteringScreen: 225, // recommended when something is leaving screen leavingScreen: 195 }; function formatMs(milliseconds) { return `${Math.round(milliseconds)}ms`; } function getAutoHeightDuration(height2) { if (!height2) { return 0; } const constant = height2 / 36; return Math.min(Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10), 3e3); } function createTransitions(inputTransitions) { const mergedEasing = { ...easing, ...inputTransitions.easing }; const mergedDuration = { ...duration, ...inputTransitions.duration }; const create = (props = ["all"], options = {}) => { const { duration: durationOption = mergedDuration.standard, easing: easingOption = mergedEasing.easeInOut, delay = 0, ...other } = options; return (Array.isArray(props) ? props : [props]).map((animatedProp) => `${animatedProp} ${typeof durationOption === "string" ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === "string" ? delay : formatMs(delay)}`).join(","); }; return { getAutoHeightDuration, create, ...inputTransitions, easing: mergedEasing, duration: mergedDuration }; } const zIndex = { mobileStepper: 1e3, fab: 1050, speedDial: 1050, appBar: 1100, drawer: 1200, modal: 1300, snackbar: 1400, tooltip: 1500 }; function isSerializable(val) { return isPlainObject$1(val) || typeof val === "undefined" || typeof val === "string" || typeof val === "boolean" || typeof val === "number" || Array.isArray(val); } function stringifyTheme(baseTheme = {}) { const serializableTheme = { ...baseTheme }; function serializeTheme(object) { const array = Object.entries(object); for (let index = 0; index < array.length; index++) { const [key2, value] = array[index]; if (!isSerializable(value) || key2.startsWith("unstable_")) { delete object[key2]; } else if (isPlainObject$1(value)) { object[key2] = { ...value }; serializeTheme(object[key2]); } } } serializeTheme(serializableTheme); return `import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles'; const theme = ${JSON.stringify(serializableTheme, null, 2)}; theme.breakpoints = createBreakpoints(theme.breakpoints || {}); theme.transitions = createTransitions(theme.transitions || {}); export default theme;`; } function createThemeNoVars(options = {}, ...args) { const { breakpoints: breakpointsInput, mixins: mixinsInput = {}, spacing: spacingInput, palette: paletteInput = {}, transitions: transitionsInput = {}, typography: typographyInput = {}, shape: shapeInput, ...other } = options; if (options.vars && // The error should throw only for the root theme creation because user is not allowed to use a custom node `vars`. // `generateThemeVars` is the closest identifier for checking that the `options` is a result of `createTheme` with CSS variables so that user can create new theme for nested ThemeProvider. options.generateThemeVars === void 0) { throw new Error(formatMuiErrorMessage(20)); } const palette = createPalette(paletteInput); const systemTheme = createTheme$1(options); let muiTheme = deepmerge(systemTheme, { mixins: createMixins(systemTheme.breakpoints, mixinsInput), palette, // Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol. shadows: shadows.slice(), typography: createTypography(palette, typographyInput), transitions: createTransitions(transitionsInput), zIndex: { ...zIndex } }); muiTheme = deepmerge(muiTheme, other); muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme); muiTheme.unstable_sxConfig = { ...defaultSxConfig, ...other == null ? void 0 : other.unstable_sxConfig }; muiTheme.unstable_sx = function sx(props) { return styleFunctionSx({ sx: props, theme: this }); }; muiTheme.toRuntimeSource = stringifyTheme; return muiTheme; } function getOverlayAlpha(elevation) { let alphaValue; if (elevation < 1) { alphaValue = 5.11916 * elevation ** 2; } else { alphaValue = 4.5 * Math.log(elevation + 1) + 2; } return Math.round(alphaValue * 10) / 1e3; } const defaultDarkOverlays = [...Array(25)].map((_, index) => { if (index === 0) { return "none"; } const overlay = getOverlayAlpha(index); return `linear-gradient(rgba(255 255 255 / ${overlay}), rgba(255 255 255 / ${overlay}))`; }); function getOpacity(mode) { return { inputPlaceholder: mode === "dark" ? 0.5 : 0.42, inputUnderline: mode === "dark" ? 0.7 : 0.42, switchTrackDisabled: mode === "dark" ? 0.2 : 0.12, switchTrack: mode === "dark" ? 0.3 : 0.38 }; } function getOverlays(mode) { return mode === "dark" ? defaultDarkOverlays : []; } function createColorScheme(options) { const { palette: paletteInput = { mode: "light" }, // need to cast to avoid module augmentation test opacity, overlays, ...rest } = options; const palette = createPalette(paletteInput); return { palette, opacity: { ...getOpacity(palette.mode), ...opacity }, overlays: overlays || getOverlays(palette.mode), ...rest }; } function shouldSkipGeneratingVar(keys) { var _a; return !!keys[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) || // ends with sxConfig keys[0] === "palette" && !!((_a = keys[1]) == null ? void 0 : _a.match(/(mode|contrastThreshold|tonalOffset)/)); } const excludeVariablesFromRoot = (cssVarPrefix) => [...[...Array(25)].map((_, index) => `--${cssVarPrefix ? `${cssVarPrefix}-` : ""}overlays-${index}`), `--${cssVarPrefix ? `${cssVarPrefix}-` : ""}palette-AppBar-darkBg`, `--${cssVarPrefix ? `${cssVarPrefix}-` : ""}palette-AppBar-darkColor`]; const defaultGetSelector = (theme) => (colorScheme, css2) => { const root = theme.rootSelector || ":root"; const selector = theme.colorSchemeSelector; let rule = selector; if (selector === "class") { rule = ".%s"; } if (selector === "data") { rule = "[data-%s]"; } if ((selector == null ? void 0 : selector.startsWith("data-")) && !selector.includes("%s")) { rule = `[${selector}="%s"]`; } if (theme.defaultColorScheme === colorScheme) { if (colorScheme === "dark") { const excludedVariables = {}; excludeVariablesFromRoot(theme.cssVarPrefix).forEach((cssVar) => { excludedVariables[cssVar] = css2[cssVar]; delete css2[cssVar]; }); if (rule === "media") { return { [root]: css2, [`@media (prefers-color-scheme: dark)`]: { [root]: excludedVariables } }; } if (rule) { return { [rule.replace("%s", colorScheme)]: excludedVariables, [`${root}, ${rule.replace("%s", colorScheme)}`]: css2 }; } return { [root]: { ...css2, ...excludedVariables } }; } if (rule && rule !== "media") { return `${root}, ${rule.replace("%s", String(colorScheme))}`; } } else if (colorScheme) { if (rule === "media") { return { [`@media (prefers-color-scheme: ${String(colorScheme)})`]: { [root]: css2 } }; } if (rule) { return rule.replace("%s", String(colorScheme)); } } return root; }; function assignNode(obj, keys) { keys.forEach((k) => { if (!obj[k]) { obj[k] = {}; } }); } function setColor(obj, key2, defaultValue) { if (!obj[key2] && defaultValue) { obj[key2] = defaultValue; } } function toRgb(color2) { if (typeof color2 !== "string" || !color2.startsWith("hsl")) { return color2; } return hslToRgb(color2); } function setColorChannel(obj, key2) { if (!(`${key2}Channel` in obj)) { obj[`${key2}Channel`] = private_safeColorChannel(toRgb(obj[key2])); } } function getSpacingVal(spacingInput) { if (typeof spacingInput === "number") { return `${spacingInput}px`; } if (typeof spacingInput === "string" || typeof spacingInput === "function" || Array.isArray(spacingInput)) { return spacingInput; } return "8px"; } const silent = (fn2) => { try { return fn2(); } catch (error) { } return void 0; }; const createGetCssVar = (cssVarPrefix = "mui") => createGetCssVar$1(cssVarPrefix); function attachColorScheme$1(colorSchemes, scheme, restTheme, colorScheme) { if (!scheme) { return void 0; } scheme = scheme === true ? {} : scheme; const mode = colorScheme === "dark" ? "dark" : "light"; if (!restTheme) { colorSchemes[colorScheme] = createColorScheme({ ...scheme, palette: { mode, ...scheme == null ? void 0 : scheme.palette } }); return void 0; } const { palette, ...muiTheme } = createThemeNoVars({ ...restTheme, palette: { mode, ...scheme == null ? void 0 : scheme.palette } }); colorSchemes[colorScheme] = { ...scheme, palette, opacity: { ...getOpacity(mode), ...scheme == null ? void 0 : scheme.opacity }, overlays: (scheme == null ? void 0 : scheme.overlays) || getOverlays(mode) }; return muiTheme; } function createThemeWithVars(options = {}, ...args) { const { colorSchemes: colorSchemesInput = { light: true }, defaultColorScheme: defaultColorSchemeInput, disableCssColorScheme = false, cssVarPrefix = "mui", shouldSkipGeneratingVar: shouldSkipGeneratingVar$1 = shouldSkipGeneratingVar, colorSchemeSelector: selector = colorSchemesInput.light && colorSchemesInput.dark ? "media" : void 0, rootSelector = ":root", ...input } = options; const firstColorScheme = Object.keys(colorSchemesInput)[0]; const defaultColorScheme = defaultColorSchemeInput || (colorSchemesInput.light && firstColorScheme !== "light" ? "light" : firstColorScheme); const getCssVar = createGetCssVar(cssVarPrefix); const { [defaultColorScheme]: defaultSchemeInput, light: builtInLight, dark: builtInDark, ...customColorSchemes } = colorSchemesInput; const colorSchemes = { ...customColorSchemes }; let defaultScheme = defaultSchemeInput; if (defaultColorScheme === "dark" && !("dark" in colorSchemesInput) || defaultColorScheme === "light" && !("light" in colorSchemesInput)) { defaultScheme = true; } if (!defaultScheme) { throw new Error(formatMuiErrorMessage(21, defaultColorScheme)); } const muiTheme = attachColorScheme$1(colorSchemes, defaultScheme, input, defaultColorScheme); if (builtInLight && !colorSchemes.light) { attachColorScheme$1(colorSchemes, builtInLight, void 0, "light"); } if (builtInDark && !colorSchemes.dark) { attachColorScheme$1(colorSchemes, builtInDark, void 0, "dark"); } let theme = { defaultColorScheme, ...muiTheme, cssVarPrefix, colorSchemeSelector: selector, rootSelector, getCssVar, colorSchemes, font: { ...prepareTypographyVars(muiTheme.typography), ...muiTheme.font }, spacing: getSpacingVal(input.spacing) }; Object.keys(theme.colorSchemes).forEach((key2) => { const palette = theme.colorSchemes[key2].palette; const setCssVarColor = (cssVar) => { const tokens = cssVar.split("-"); const color2 = tokens[1]; const colorToken = tokens[2]; return getCssVar(cssVar, palette[color2][colorToken]); }; if (palette.mode === "light") { setColor(palette.common, "background", "#fff"); setColor(palette.common, "onBackground", "#000"); } if (palette.mode === "dark") { setColor(palette.common, "background", "#000"); setColor(palette.common, "onBackground", "#fff"); } assignNode(palette, ["Alert", "AppBar", "Avatar", "Button", "Chip", "FilledInput", "LinearProgress", "Skeleton", "Slider", "SnackbarContent", "SpeedDialAction", "StepConnector", "StepContent", "Switch", "TableCell", "Tooltip"]); if (palette.mode === "light") { setColor(palette.Alert, "errorColor", private_safeDarken(palette.error.light, 0.6)); setColor(palette.Alert, "infoColor", private_safeDarken(palette.info.light, 0.6)); setColor(palette.Alert, "successColor", private_safeDarken(palette.success.light, 0.6)); setColor(palette.Alert, "warningColor", private_safeDarken(palette.warning.light, 0.6)); setColor(palette.Alert, "errorFilledBg", setCssVarColor("palette-error-main")); setColor(palette.Alert, "infoFilledBg", setCssVarColor("palette-info-main")); setColor(palette.Alert, "successFilledBg", setCssVarColor("palette-success-main")); setColor(palette.Alert, "warningFilledBg", setCssVarColor("palette-warning-main")); setColor(palette.Alert, "errorFilledColor", silent(() => palette.getContrastText(palette.error.main))); setColor(palette.Alert, "infoFilledColor", silent(() => palette.getContrastText(palette.info.main))); setColor(palette.Alert, "successFilledColor", silent(() => palette.getContrastText(palette.success.main))); setColor(palette.Alert, "warningFilledColor", silent(() => palette.getContrastText(palette.warning.main))); setColor(palette.Alert, "errorStandardBg", private_safeLighten(palette.error.light, 0.9)); setColor(palette.Alert, "infoStandardBg", private_safeLighten(palette.info.light, 0.9)); setColor(palette.Alert, "successStandardBg", private_safeLighten(palette.success.light, 0.9)); setColor(palette.Alert, "warningStandardBg", private_safeLighten(palette.warning.light, 0.9)); setColor(palette.Alert, "errorIconColor", setCssVarColor("palette-error-main")); setColor(palette.Alert, "infoIconColor", setCssVarColor("palette-info-main")); setColor(palette.Alert, "successIconColor", setCssVarColor("palette-success-main")); setColor(palette.Alert, "warningIconColor", setCssVarColor("palette-warning-main")); setColor(palette.AppBar, "defaultBg", setCssVarColor("palette-grey-100")); setColor(palette.Avatar, "defaultBg", setCssVarColor("palette-grey-400")); setColor(palette.Button, "inheritContainedBg", setCssVarColor("palette-grey-300")); setColor(palette.Button, "inheritContainedHoverBg", setCssVarColor("palette-grey-A100")); setColor(palette.Chip, "defaultBorder", setCssVarColor("palette-grey-400")); setColor(palette.Chip, "defaultAvatarColor", setCssVarColor("palette-grey-700")); setColor(palette.Chip, "defaultIconColor", setCssVarColor("palette-grey-700")); setColor(palette.FilledInput, "bg", "rgba(0, 0, 0, 0.06)"); setColor(palette.FilledInput, "hoverBg", "rgba(0, 0, 0, 0.09)"); setColor(palette.FilledInput, "disabledBg", "rgba(0, 0, 0, 0.12)"); setColor(palette.LinearProgress, "primaryBg", private_safeLighten(palette.primary.main, 0.62)); setColor(palette.LinearProgress, "secondaryBg", private_safeLighten(palette.secondary.main, 0.62)); setColor(palette.LinearProgress, "errorBg", private_safeLighten(palette.error.main, 0.62)); setColor(palette.LinearProgress, "infoBg", private_safeLighten(palette.info.main, 0.62)); setColor(palette.LinearProgress, "successBg", private_safeLighten(palette.success.main, 0.62)); setColor(palette.LinearProgress, "warningBg", private_safeLighten(palette.warning.main, 0.62)); setColor(palette.Skeleton, "bg", `rgba(${setCssVarColor("palette-text-primaryChannel")} / 0.11)`); setColor(palette.Slider, "primaryTrack", private_safeLighten(palette.primary.main, 0.62)); setColor(palette.Slider, "secondaryTrack", private_safeLighten(palette.secondary.main, 0.62)); setColor(palette.Slider, "errorTrack", private_safeLighten(palette.error.main, 0.62)); setColor(palette.Slider, "infoTrack", private_safeLighten(palette.info.main, 0.62)); setColor(palette.Slider, "successTrack", private_safeLighten(palette.success.main, 0.62)); setColor(palette.Slider, "warningTrack", private_safeLighten(palette.warning.main, 0.62)); const snackbarContentBackground = private_safeEmphasize(palette.background.default, 0.8); setColor(palette.SnackbarContent, "bg", snackbarContentBackground); setColor(palette.SnackbarContent, "color", silent(() => palette.getContrastText(snackbarContentBackground))); setColor(palette.SpeedDialAction, "fabHoverBg", private_safeEmphasize(palette.background.paper, 0.15)); setColor(palette.StepConnector, "border", setCssVarColor("palette-grey-400")); setColor(palette.StepContent, "border", setCssVarColor("palette-grey-400")); setColor(palette.Switch, "defaultColor", setCssVarColor("palette-common-white")); setColor(palette.Switch, "defaultDisabledColor", setCssVarColor("palette-grey-100")); setColor(palette.Switch, "primaryDisabledColor", private_safeLighten(palette.primary.main, 0.62)); setColor(palette.Switch, "secondaryDisabledColor", private_safeLighten(palette.secondary.main, 0.62)); setColor(palette.Switch, "errorDisabledColor", private_safeLighten(palette.error.main, 0.62)); setColor(palette.Switch, "infoDisabledColor", private_safeLighten(palette.info.main, 0.62)); setColor(palette.Switch, "successDisabledColor", private_safeLighten(palette.success.main, 0.62)); setColor(palette.Switch, "warningDisabledColor", private_safeLighten(palette.warning.main, 0.62)); setColor(palette.TableCell, "border", private_safeLighten(private_safeAlpha(palette.divider, 1), 0.88)); setColor(palette.Tooltip, "bg", private_safeAlpha(palette.grey[700], 0.92)); } if (palette.mode === "dark") { setColor(palette.Alert, "errorColor", private_safeLighten(palette.error.light, 0.6)); setColor(palette.Alert, "infoColor", private_safeLighten(palette.info.light, 0.6)); setColor(palette.Alert, "successColor", private_safeLighten(palette.success.light, 0.6)); setColor(palette.Alert, "warningColor", private_safeLighten(palette.warning.light, 0.6)); setColor(palette.Alert, "errorFilledBg", setCssVarColor("palette-error-dark")); setColor(palette.Alert, "infoFilledBg", setCssVarColor("palette-info-dark")); setColor(palette.Alert, "successFilledBg", setCssVarColor("palette-success-dark")); setColor(palette.Alert, "warningFilledBg", setCssVarColor("palette-warning-dark")); setColor(palette.Alert, "errorFilledColor", silent(() => palette.getContrastText(palette.error.dark))); setColor(palette.Alert, "infoFilledColor", silent(() => palette.getContrastText(palette.info.dark))); setColor(palette.Alert, "successFilledColor", silent(() => palette.getContrastText(palette.success.dark))); setColor(palette.Alert, "warningFilledColor", silent(() => palette.getContrastText(palette.warning.dark))); setColor(palette.Alert, "errorStandardBg", private_safeDarken(palette.error.light, 0.9)); setColor(palette.Alert, "infoStandardBg", private_safeDarken(palette.info.light, 0.9)); setColor(palette.Alert, "successStandardBg", private_safeDarken(palette.success.light, 0.9)); setColor(palette.Alert, "warningStandardBg", private_safeDarken(palette.warning.light, 0.9)); setColor(palette.Alert, "errorIconColor", setCssVarColor("palette-error-main")); setColor(palette.Alert, "infoIconColor", setCssVarColor("palette-info-main")); setColor(palette.Alert, "successIconColor", setCssVarColor("palette-success-main")); setColor(palette.Alert, "warningIconColor", setCssVarColor("palette-warning-main")); setColor(palette.AppBar, "defaultBg", setCssVarColor("palette-grey-900")); setColor(palette.AppBar, "darkBg", setCssVarColor("palette-background-paper")); setColor(palette.AppBar, "darkColor", setCssVarColor("palette-text-primary")); setColor(palette.Avatar, "defaultBg", setCssVarColor("palette-grey-600")); setColor(palette.Button, "inheritContainedBg", setCssVarColor("palette-grey-800")); setColor(palette.Button, "inheritContainedHoverBg", setCssVarColor("palette-grey-700")); setColor(palette.Chip, "defaultBorder", setCssVarColor("palette-grey-700")); setColor(palette.Chip, "defaultAvatarColor", setCssVarColor("palette-grey-300")); setColor(palette.Chip, "defaultIconColor", setCssVarColor("palette-grey-300")); setColor(palette.FilledInput, "bg", "rgba(255, 255, 255, 0.09)"); setColor(palette.FilledInput, "hoverBg", "rgba(255, 255, 255, 0.13)"); setColor(palette.FilledInput, "disabledBg", "rgba(255, 255, 255, 0.12)"); setColor(palette.LinearProgress, "primaryBg", private_safeDarken(palette.primary.main, 0.5)); setColor(palette.LinearProgress, "secondaryBg", private_safeDarken(palette.secondary.main, 0.5)); setColor(palette.LinearProgress, "errorBg", private_safeDarken(palette.error.main, 0.5)); setColor(palette.LinearProgress, "infoBg", private_safeDarken(palette.info.main, 0.5)); setColor(palette.LinearProgress, "successBg", private_safeDarken(palette.success.main, 0.5)); setColor(palette.LinearProgress, "warningBg", private_safeDarken(palette.warning.main, 0.5)); setColor(palette.Skeleton, "bg", `rgba(${setCssVarColor("palette-text-primaryChannel")} / 0.13)`); setColor(palette.Slider, "primaryTrack", private_safeDarken(palette.primary.main, 0.5)); setColor(palette.Slider, "secondaryTrack", private_safeDarken(palette.secondary.main, 0.5)); setColor(palette.Slider, "errorTrack", private_safeDarken(palette.error.main, 0.5)); setColor(palette.Slider, "infoTrack", private_safeDarken(palette.info.main, 0.5)); setColor(palette.Slider, "successTrack", private_safeDarken(palette.success.main, 0.5)); setColor(palette.Slider, "warningTrack", private_safeDarken(palette.warning.main, 0.5)); const snackbarContentBackground = private_safeEmphasize(palette.background.default, 0.98); setColor(palette.SnackbarContent, "bg", snackbarContentBackground); setColor(palette.SnackbarContent, "color", silent(() => palette.getContrastText(snackbarContentBackground))); setColor(palette.SpeedDialAction, "fabHoverBg", private_safeEmphasize(palette.background.paper, 0.15)); setColor(palette.StepConnector, "border", setCssVarColor("palette-grey-600")); setColor(palette.StepContent, "border", setCssVarColor("palette-grey-600")); setColor(palette.Switch, "defaultColor", setCssVarColor("palette-grey-300")); setColor(palette.Switch, "defaultDisabledColor", setCssVarColor("palette-grey-600")); setColor(palette.Switch, "primaryDisabledColor", private_safeDarken(palette.primary.main, 0.55)); setColor(palette.Switch, "secondaryDisabledColor", private_safeDarken(palette.secondary.main, 0.55)); setColor(palette.Switch, "errorDisabledColor", private_safeDarken(palette.error.main, 0.55)); setColor(palette.Switch, "infoDisabledColor", private_safeDarken(palette.info.main, 0.55)); setColor(palette.Switch, "successDisabledColor", private_safeDarken(palette.success.main, 0.55)); setColor(palette.Switch, "warningDisabledColor", private_safeDarken(palette.warning.main, 0.55)); setColor(palette.TableCell, "border", private_safeDarken(private_safeAlpha(palette.divider, 1), 0.68)); setColor(palette.Tooltip, "bg", private_safeAlpha(palette.grey[700], 0.92)); } setColorChannel(palette.background, "default"); setColorChannel(palette.background, "paper"); setColorChannel(palette.common, "background"); setColorChannel(palette.common, "onBackground"); setColorChannel(palette, "divider"); Object.keys(palette).forEach((color2) => { const colors = palette[color2]; if (color2 !== "tonalOffset" && colors && typeof colors === "object") { if (colors.main) { setColor(palette[color2], "mainChannel", private_safeColorChannel(toRgb(colors.main))); } if (colors.light) { setColor(palette[color2], "lightChannel", private_safeColorChannel(toRgb(colors.light))); } if (colors.dark) { setColor(palette[color2], "darkChannel", private_safeColorChannel(toRgb(colors.dark))); } if (colors.contrastText) { setColor(palette[color2], "contrastTextChannel", private_safeColorChannel(toRgb(colors.contrastText))); } if (color2 === "text") { setColorChannel(palette[color2], "primary"); setColorChannel(palette[color2], "secondary"); } if (color2 === "action") { if (colors.active) { setColorChannel(palette[color2], "active"); } if (colors.selected) { setColorChannel(palette[color2], "selected"); } } } }); }); theme = args.reduce((acc, argument) => deepmerge(acc, argument), theme); const parserConfig = { prefix: cssVarPrefix, disableCssColorScheme, shouldSkipGeneratingVar: shouldSkipGeneratingVar$1, getSelector: defaultGetSelector(theme) }; const { vars, generateThemeVars, generateStyleSheets } = prepareCssVars(theme, parserConfig); theme.vars = vars; Object.entries(theme.colorSchemes[theme.defaultColorScheme]).forEach(([key2, value]) => { theme[key2] = value; }); theme.generateThemeVars = generateThemeVars; theme.generateStyleSheets = generateStyleSheets; theme.generateSpacing = function generateSpacing() { return createSpacing(input.spacing, createUnarySpacing(this)); }; theme.getColorSchemeSelector = createGetColorSchemeSelector(selector); theme.spacing = theme.generateSpacing(); theme.shouldSkipGeneratingVar = shouldSkipGeneratingVar$1; theme.unstable_sxConfig = { ...defaultSxConfig, ...input == null ? void 0 : input.unstable_sxConfig }; theme.unstable_sx = function sx(props) { return styleFunctionSx({ sx: props, theme: this }); }; theme.toRuntimeSource = stringifyTheme; return theme; } function attachColorScheme(theme, scheme, colorScheme) { if (!theme.colorSchemes) { return void 0; } if (colorScheme) { theme.colorSchemes[scheme] = { ...colorScheme !== true && colorScheme, palette: createPalette({ ...colorScheme === true ? {} : colorScheme.palette, mode: scheme }) // cast type to skip module augmentation test }; } } function createTheme(options = {}, ...args) { const { palette, cssVariables = false, colorSchemes: initialColorSchemes = !palette ? { light: true } : void 0, defaultColorScheme: initialDefaultColorScheme = palette == null ? void 0 : palette.mode, ...rest } = options; const defaultColorSchemeInput = initialDefaultColorScheme || "light"; const defaultScheme = initialColorSchemes == null ? void 0 : initialColorSchemes[defaultColorSchemeInput]; const colorSchemesInput = { ...initialColorSchemes, ...palette ? { [defaultColorSchemeInput]: { ...typeof defaultScheme !== "boolean" && defaultScheme, palette } } : void 0 }; if (cssVariables === false) { if (!("colorSchemes" in options)) { return createThemeNoVars(options, ...args); } let paletteOptions = palette; if (!("palette" in options)) { if (colorSchemesInput[defaultColorSchemeInput]) { if (colorSchemesInput[defaultColorSchemeInput] !== true) { paletteOptions = colorSchemesInput[defaultColorSchemeInput].palette; } else if (defaultColorSchemeInput === "dark") { paletteOptions = { mode: "dark" }; } } } const theme = createThemeNoVars({ ...options, palette: paletteOptions }, ...args); theme.defaultColorScheme = defaultColorSchemeInput; theme.colorSchemes = colorSchemesInput; if (theme.palette.mode === "light") { theme.colorSchemes.light = { ...colorSchemesInput.light !== true && colorSchemesInput.light, palette: theme.palette }; attachColorScheme(theme, "dark", colorSchemesInput.dark); } if (theme.palette.mode === "dark") { theme.colorSchemes.dark = { ...colorSchemesInput.dark !== true && colorSchemesInput.dark, palette: theme.palette }; attachColorScheme(theme, "light", colorSchemesInput.light); } return theme; } if (!palette && !("light" in colorSchemesInput) && defaultColorSchemeInput === "light") { colorSchemesInput.light = true; } return createThemeWithVars({ ...rest, colorSchemes: colorSchemesInput, defaultColorScheme: defaultColorSchemeInput, ...typeof cssVariables !== "boolean" && cssVariables }, ...args); } const defaultTheme$1 = createTheme(); const THEME_ID = "$$material"; function useTheme() { const theme = useTheme$2(defaultTheme$1); return theme[THEME_ID] || theme; } function GlobalStyles(props) { return /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalStyles$1, { ...props, defaultTheme: defaultTheme$1, themeId: THEME_ID }); } function slotShouldForwardProp(prop) { return prop !== "ownerState" && prop !== "theme" && prop !== "sx" && prop !== "as"; } const rootShouldForwardProp = (prop) => slotShouldForwardProp(prop) && prop !== "classes"; const styled = createStyled2({ themeId: THEME_ID, defaultTheme: defaultTheme$1, rootShouldForwardProp }); function globalCss(styles2) { return function GlobalStylesWrapper(props) { return ( // Pigment CSS `globalCss` support callback with theme inside an object but `GlobalStyles` support theme as a callback value. /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalStyles, { styles: typeof styles2 === "function" ? (theme) => styles2({ theme, ...props }) : styles2 }) ); }; } function internal_createExtendSxProp() { return extendSxProp$1; } const memoTheme = unstable_memoTheme; function useDefaultProps(params) { return useDefaultProps$1(params); } function getSvgIconUtilityClass(slot) { return generateUtilityClass("MuiSvgIcon", slot); } generateUtilityClasses("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]); const useUtilityClasses$H = (ownerState) => { const { color: color2, fontSize, classes } = ownerState; const slots = { root: ["root", color2 !== "inherit" && `color${capitalize(color2)}`, `fontSize${capitalize(fontSize)}`] }; return composeClasses(slots, getSvgIconUtilityClass, classes); }; const SvgIconRoot = styled("svg", { name: "MuiSvgIcon", slot: "Root", overridesResolver: (props, styles2) => { const { ownerState } = props; return [styles2.root, ownerState.color !== "inherit" && styles2[`color${capitalize(ownerState.color)}`], styles2[`fontSize${capitalize(ownerState.fontSize)}`]]; } })(memoTheme(({ theme }) => { var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n; return { userSelect: "none", width: "1em", height: "1em", display: "inline-block", flexShrink: 0, transition: (_d = (_a = theme.transitions) == null ? void 0 : _a.create) == null ? void 0 : _d.call(_a, "fill", { duration: (_c = (_b = (theme.vars ?? theme).transitions) == null ? void 0 : _b.duration) == null ? void 0 : _c.shorter }), variants: [ { props: (props) => !props.hasSvgAsChild, style: { // the will define the property that has `currentColor` // for example heroicons uses fill="none" and stroke="currentColor" fill: "currentColor" } }, { props: { fontSize: "inherit" }, style: { fontSize: "inherit" } }, { props: { fontSize: "small" }, style: { fontSize: ((_f = (_e = theme.typography) == null ? void 0 : _e.pxToRem) == null ? void 0 : _f.call(_e, 20)) || "1.25rem" } }, { props: { fontSize: "medium" }, style: { fontSize: ((_h = (_g = theme.typography) == null ? void 0 : _g.pxToRem) == null ? void 0 : _h.call(_g, 24)) || "1.5rem" } }, { props: { fontSize: "large" }, style: { fontSize: ((_j = (_i = theme.typography) == null ? void 0 : _i.pxToRem) == null ? void 0 : _j.call(_i, 35)) || "2.1875rem" } }, // TODO v5 deprecate color prop, v6 remove for sx ...Object.entries((theme.vars ?? theme).palette).filter(([, value]) => value && value.main).map(([color2]) => { var _a2, _b2; return { props: { color: color2 }, style: { color: (_b2 = (_a2 = (theme.vars ?? theme).palette) == null ? void 0 : _a2[color2]) == null ? void 0 : _b2.main } }; }), { props: { color: "action" }, style: { color: (_l = (_k = (theme.vars ?? theme).palette) == null ? void 0 : _k.action) == null ? void 0 : _l.active } }, { props: { color: "disabled" }, style: { color: (_n = (_m = (theme.vars ?? theme).palette) == null ? void 0 : _m.action) == null ? void 0 : _n.disabled } }, { props: { color: "inherit" }, style: { color: void 0 } } ] }; })); const SvgIcon = /* @__PURE__ */ React__namespace.forwardRef(function SvgIcon2(inProps, ref) { const props = useDefaultProps({ props: inProps, name: "MuiSvgIcon" }); const { children, className, color: color2 = "inherit", component = "svg", fontSize = "medium", htmlColor, inheritViewBox = false, titleAccess, viewBox = "0 0 24 24", ...other } = props; const hasSvgAsChild = /* @__PURE__ */ React__namespace.isValidElement(children) && children.type === "svg"; const ownerState = { ...props, color: color2, component, fontSize, instanceFontSize: inProps.fontSize, inheritViewBox, viewBox, hasSvgAsChild }; const more = {}; if (!inheritViewBox) { more.viewBox = viewBox; } const classes = useUtilityClasses$H(ownerState); return /* @__PURE__ */ jsxRuntimeExports.jsxs(SvgIconRoot, { as: component, className: clsx(classes.root, className), focusable: "false", color: htmlColor, "aria-hidden": titleAccess ? void 0 : true, role: titleAccess ? "img" : void 0, ref, ...more, ...other, ...hasSvgAsChild && children.props, ownerState, children: [hasSvgAsChild ? children.props.children : children, titleAccess ? /* @__PURE__ */ jsxRuntimeExports.jsx("title", { children: titleAccess }) : null] }); }); SvgIcon.muiName = "SvgIcon"; function createSvgIcon(path, displayName) { function Component(props, ref) { return /* @__PURE__ */ jsxRuntimeExports.jsx(SvgIcon, { "data-testid": void 0, ref, ...props, children: path }); } Component.muiName = SvgIcon.muiName; return /* @__PURE__ */ React__namespace.memo(/* @__PURE__ */ React__namespace.forwardRef(Component)); } function isEventHandler(key2, value) { const thirdCharCode = key2.charCodeAt(2); return key2[0] === "o" && key2[1] === "n" && thirdCharCode >= 65 && thirdCharCode <= 90 && typeof value === "function"; } function mergeSlotProps(externalSlotProps, defaultSlotProps) { if (!externalSlotProps) { return defaultSlotProps; } function extractHandlers(externalSlotPropsValue, defaultSlotPropsValue) { const handlers2 = {}; Object.keys(defaultSlotPropsValue).forEach((key2) => { if (isEventHandler(key2, defaultSlotPropsValue[key2]) && typeof externalSlotPropsValue[key2] === "function") { handlers2[key2] = (...args) => { externalSlotPropsValue[key2](...args); defaultSlotPropsValue[key2](...args); }; } }); return handlers2; } if (typeof externalSlotProps === "function" || typeof defaultSlotProps === "function") { return (ownerState) => { const defaultSlotPropsValue = typeof defaultSlotProps === "function" ? defaultSlotProps(ownerState) : defaultSlotProps; const externalSlotPropsValue = typeof externalSlotProps === "function" ? externalSlotProps({ ...ownerState, ...defaultSlotPropsValue }) : externalSlotProps; const className2 = clsx(ownerState == null ? void 0 : ownerState.className, defaultSlotPropsValue == null ? void 0 : defaultSlotPropsValue.className, externalSlotPropsValue == null ? void 0 : externalSlotPropsValue.className); const handlers2 = extractHandlers(externalSlotPropsValue, defaultSlotPropsValue); return { ...defaultSlotPropsValue, ...externalSlotPropsValue, ...handlers2, ...!!className2 && { className: className2 }, ...(defaultSlotPropsValue == null ? void 0 : defaultSlotPropsValue.style) && (externalSlotPropsValue == null ? void 0 : externalSlotPropsValue.style) && { style: { ...defaultSlotPropsValue.style, ...externalSlotPropsValue.style } }, ...(defaultSlotPropsValue == null ? void 0 : defaultSlotPropsValue.sx) && (externalSlotPropsValue == null ? void 0 : externalSlotPropsValue.sx) && { sx: [...Array.isArray(defaultSlotPropsValue.sx) ? defaultSlotPropsValue.sx : [defaultSlotPropsValue.sx], ...Array.isArray(externalSlotPropsValue.sx) ? externalSlotPropsValue.sx : [externalSlotPropsValue.sx]] } }; }; } const typedDefaultSlotProps = defaultSlotProps; const handlers = extractHandlers(externalSlotProps, typedDefaultSlotProps); const className = clsx(typedDefaultSlotProps == null ? void 0 : typedDefaultSlotProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className); return { ...defaultSlotProps, ...externalSlotProps, ...handlers, ...!!className && { className }, ...(typedDefaultSlotProps == null ? void 0 : typedDefaultSlotProps.style) && (externalSlotProps == null ? void 0 : externalSlotProps.style) && { style: { ...typedDefaultSlotProps.style, ...externalSlotProps.style } }, ...(typedDefaultSlotProps == null ? void 0 : typedDefaultSlotProps.sx) && (externalSlotProps == null ? void 0 : externalSlotProps.sx) && { sx: [...Array.isArray(typedDefaultSlotProps.sx) ? typedDefaultSlotProps.sx : [typedDefaultSlotProps.sx], ...Array.isArray(externalSlotProps.sx) ? externalSlotProps.sx : [externalSlotProps.sx]] } }; } class LazyRipple { constructor() { __publicField(this, "mountEffect", () => { if (this.shouldMount && !this.didMount) { if (this.ref.current !== null) { this.didMount = true; this.mounted.resolve(); } } }); this.ref = { current: null }; this.mounted = null; this.didMount = false; this.shouldMount = false; this.setShouldMount = null; } /** React ref to the ripple instance */ /** If the ripple component should be mounted */ /** Promise that resolves when the ripple component is mounted */ /** If the ripple component has been mounted */ /** React state hook setter */ static create() { return new LazyRipple(); } static use() { const ripple = useLazyRef(LazyRipple.create).current; const [shouldMount, setShouldMount] = React__namespace.useState(false); ripple.shouldMount = shouldMount; ripple.setShouldMount = setShouldMount; React__namespace.useEffect(ripple.mountEffect, [shouldMount]); return ripple; } mount() { if (!this.mounted) { this.mounted = createControlledPromise(); this.shouldMount = true; this.setShouldMount(this.shouldMount); } return this.mounted; } /* Ripple API */ start(...args) { this.mount().then(() => { var _a; return (_a = this.ref.current) == null ? void 0 : _a.start(...args); }); } stop(...args) { this.mount().then(() => { var _a; return (_a = this.ref.current) == null ? void 0 : _a.stop(...args); }); } pulsate(...args) { this.mount().then(() => { var _a; return (_a = this.ref.current) == null ? void 0 : _a.pulsate(...args); }); } } function useLazyRipple() { return LazyRipple.use(); } function createControlledPromise() { let resolve; let reject; const p = new Promise((resolveFn, rejectFn) => { resolve = resolveFn; reject = rejectFn; }); p.resolve = resolve; p.reject = reject; return p; } function _objectWithoutPropertiesLoose(r2, e) { if (null == r2) return {}; var t = {}; for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r2[n]; } return t; } function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) { return t2.__proto__ = e2, t2; }, _setPrototypeOf(t, e); } function _inheritsLoose(t, o) { t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o); } const config = { disabled: false }; const TransitionGroupContext = React.createContext(null); var forceReflow = function forceReflow2(node2) { return node2.scrollTop; }; var UNMOUNTED = "unmounted"; var EXITED = "exited"; var ENTERING = "entering"; var ENTERED = "entered"; var EXITING = "exiting"; var Transition = /* @__PURE__ */ function(_React$Component) { _inheritsLoose(Transition2, _React$Component); function Transition2(props, context) { var _this; _this = _React$Component.call(this, props, context) || this; var parentGroup = context; var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear; var initialStatus; _this.appearStatus = null; if (props.in) { if (appear) { initialStatus = EXITED; _this.appearStatus = ENTERING; } else { initialStatus = ENTERED; } } else { if (props.unmountOnExit || props.mountOnEnter) { initialStatus = UNMOUNTED; } else { initialStatus = EXITED; } } _this.state = { status: initialStatus }; _this.nextCallback = null; return _this; } Transition2.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) { var nextIn = _ref.in; if (nextIn && prevState.status === UNMOUNTED) { return { status: EXITED }; } return null; }; var _proto = Transition2.prototype; _proto.componentDidMount = function componentDidMount() { this.updateStatus(true, this.appearStatus); }; _proto.componentDidUpdate = function componentDidUpdate(prevProps) { var nextStatus = null; if (prevProps !== this.props) { var status = this.state.status; if (this.props.in) { if (status !== ENTERING && status !== ENTERED) { nextStatus = ENTERING; } } else { if (status === ENTERING || status === ENTERED) { nextStatus = EXITING; } } } this.updateStatus(false, nextStatus); }; _proto.componentWillUnmount = function componentWillUnmount() { this.cancelNextCallback(); }; _proto.getTimeouts = function getTimeouts() { var timeout2 = this.props.timeout; var exit, enter, appear; exit = enter = appear = timeout2; if (timeout2 != null && typeof timeout2 !== "number") { exit = timeout2.exit; enter = timeout2.enter; appear = timeout2.appear !== void 0 ? timeout2.appear : enter; } return { exit, enter, appear }; }; _proto.updateStatus = function updateStatus(mounting, nextStatus) { if (mounting === void 0) { mounting = false; } if (nextStatus !== null) { this.cancelNextCallback(); if (nextStatus === ENTERING) { if (this.props.unmountOnExit || this.props.mountOnEnter) { var node2 = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM__default.findDOMNode(this); if (node2) forceReflow(node2); } this.performEnter(mounting); } else { this.performExit(); } } else if (this.props.unmountOnExit && this.state.status === EXITED) { this.setState({ status: UNMOUNTED }); } }; _proto.performEnter = function performEnter(mounting) { var _this2 = this; var enter = this.props.enter; var appearing = this.context ? this.context.isMounting : mounting; var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM__default.findDOMNode(this), appearing], maybeNode = _ref2[0], maybeAppearing = _ref2[1]; var timeouts = this.getTimeouts(); var enterTimeout = appearing ? timeouts.appear : timeouts.enter; if (!mounting && !enter || config.disabled) { this.safeSetState({ status: ENTERED }, function() { _this2.props.onEntered(maybeNode); }); return; } this.props.onEnter(maybeNode, maybeAppearing); this.safeSetState({ status: ENTERING }, function() { _this2.props.onEntering(maybeNode, maybeAppearing); _this2.onTransitionEnd(enterTimeout, function() { _this2.safeSetState({ status: ENTERED }, function() { _this2.props.onEntered(maybeNode, maybeAppearing); }); }); }); }; _proto.performExit = function performExit() { var _this3 = this; var exit = this.props.exit; var timeouts = this.getTimeouts(); var maybeNode = this.props.nodeRef ? void 0 : ReactDOM__default.findDOMNode(this); if (!exit || config.disabled) { this.safeSetState({ status: EXITED }, function() { _this3.props.onExited(maybeNode); }); return; } this.props.onExit(maybeNode); this.safeSetState({ status: EXITING }, function() { _this3.props.onExiting(maybeNode); _this3.onTransitionEnd(timeouts.exit, function() { _this3.safeSetState({ status: EXITED }, function() { _this3.props.onExited(maybeNode); }); }); }); }; _proto.cancelNextCallback = function cancelNextCallback() { if (this.nextCallback !== null) { this.nextCallback.cancel(); this.nextCallback = null; } }; _proto.safeSetState = function safeSetState(nextState, callback) { callback = this.setNextCallback(callback); this.setState(nextState, callback); }; _proto.setNextCallback = function setNextCallback(callback) { var _this4 = this; var active = true; this.nextCallback = function(event) { if (active) { active = false; _this4.nextCallback = null; callback(event); } }; this.nextCallback.cancel = function() { active = false; }; return this.nextCallback; }; _proto.onTransitionEnd = function onTransitionEnd(timeout2, handler) { this.setNextCallback(handler); var node2 = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM__default.findDOMNode(this); var doesNotHaveTimeoutOrListener = timeout2 == null && !this.props.addEndListener; if (!node2 || doesNotHaveTimeoutOrListener) { setTimeout(this.nextCallback, 0); return; } if (this.props.addEndListener) { var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node2, this.nextCallback], maybeNode = _ref3[0], maybeNextCallback = _ref3[1]; this.props.addEndListener(maybeNode, maybeNextCallback); } if (timeout2 != null) { setTimeout(this.nextCallback, timeout2); } }; _proto.render = function render() { var status = this.state.status; if (status === UNMOUNTED) { return null; } var _this$props = this.props, children = _this$props.children; _this$props.in; _this$props.mountOnEnter; _this$props.unmountOnExit; _this$props.appear; _this$props.enter; _this$props.exit; _this$props.timeout; _this$props.addEndListener; _this$props.onEnter; _this$props.onEntering; _this$props.onEntered; _this$props.onExit; _this$props.onExiting; _this$props.onExited; _this$props.nodeRef; var childProps = _objectWithoutPropertiesLoose(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]); return ( // allows for nested Transitions /* @__PURE__ */ React.createElement(TransitionGroupContext.Provider, { value: null }, typeof children === "function" ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps)) ); }; return Transition2; }(React.Component); Transition.contextType = TransitionGroupContext; Transition.propTypes = {}; function noop$2() { } Transition.defaultProps = { in: false, mountOnEnter: false, unmountOnExit: false, appear: false, enter: true, exit: true, onEnter: noop$2, onEntering: noop$2, onEntered: noop$2, onExit: noop$2, onExiting: noop$2, onExited: noop$2 }; Transition.UNMOUNTED = UNMOUNTED; Transition.EXITED = EXITED; Transition.ENTERING = ENTERING; Transition.ENTERED = ENTERED; Transition.EXITING = EXITING; function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } function getChildMapping(children, mapFn) { var mapper = function mapper2(child) { return mapFn && React.isValidElement(child) ? mapFn(child) : child; }; var result = /* @__PURE__ */ Object.create(null); if (children) React.Children.map(children, function(c) { return c; }).forEach(function(child) { result[child.key] = mapper(child); }); return result; } function mergeChildMappings(prev2, next2) { prev2 = prev2 || {}; next2 = next2 || {}; function getValueForKey(key2) { return key2 in next2 ? next2[key2] : prev2[key2]; } var nextKeysPending = /* @__PURE__ */ Object.create(null); var pendingKeys = []; for (var prevKey in prev2) { if (prevKey in next2) { if (pendingKeys.length) { nextKeysPending[prevKey] = pendingKeys; pendingKeys = []; } } else { pendingKeys.push(prevKey); } } var i; var childMapping = {}; for (var nextKey in next2) { if (nextKeysPending[nextKey]) { for (i = 0; i < nextKeysPending[nextKey].length; i++) { var pendingNextKey = nextKeysPending[nextKey][i]; childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey); } } childMapping[nextKey] = getValueForKey(nextKey); } for (i = 0; i < pendingKeys.length; i++) { childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]); } return childMapping; } function getProp(child, prop, props) { return props[prop] != null ? props[prop] : child.props[prop]; } function getInitialChildMapping(props, onExited) { return getChildMapping(props.children, function(child) { return React.cloneElement(child, { onExited: onExited.bind(null, child), in: true, appear: getProp(child, "appear", props), enter: getProp(child, "enter", props), exit: getProp(child, "exit", props) }); }); } function getNextChildMapping(nextProps, prevChildMapping, onExited) { var nextChildMapping = getChildMapping(nextProps.children); var children = mergeChildMappings(prevChildMapping, nextChildMapping); Object.keys(children).forEach(function(key2) { var child = children[key2]; if (!React.isValidElement(child)) return; var hasPrev = key2 in prevChildMapping; var hasNext = key2 in nextChildMapping; var prevChild = prevChildMapping[key2]; var isLeaving = React.isValidElement(prevChild) && !prevChild.props.in; if (hasNext && (!hasPrev || isLeaving)) { children[key2] = React.cloneElement(child, { onExited: onExited.bind(null, child), in: true, exit: getProp(child, "exit", nextProps), enter: getProp(child, "enter", nextProps) }); } else if (!hasNext && hasPrev && !isLeaving) { children[key2] = React.cloneElement(child, { in: false }); } else if (hasNext && hasPrev && React.isValidElement(prevChild)) { children[key2] = React.cloneElement(child, { onExited: onExited.bind(null, child), in: prevChild.props.in, exit: getProp(child, "exit", nextProps), enter: getProp(child, "enter", nextProps) }); } }); return children; } var values = Object.values || function(obj) { return Object.keys(obj).map(function(k) { return obj[k]; }); }; var defaultProps = { component: "div", childFactory: function childFactory(child) { return child; } }; var TransitionGroup = /* @__PURE__ */ function(_React$Component) { _inheritsLoose(TransitionGroup2, _React$Component); function TransitionGroup2(props, context) { var _this; _this = _React$Component.call(this, props, context) || this; var handleExited = _this.handleExited.bind(_assertThisInitialized(_this)); _this.state = { contextValue: { isMounting: true }, handleExited, firstRender: true }; return _this; } var _proto = TransitionGroup2.prototype; _proto.componentDidMount = function componentDidMount() { this.mounted = true; this.setState({ contextValue: { isMounting: false } }); }; _proto.componentWillUnmount = function componentWillUnmount() { this.mounted = false; }; TransitionGroup2.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) { var prevChildMapping = _ref.children, handleExited = _ref.handleExited, firstRender = _ref.firstRender; return { children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited), firstRender: false }; }; _proto.handleExited = function handleExited(child, node2) { var currentChildMapping = getChildMapping(this.props.children); if (child.key in currentChildMapping) return; if (child.props.onExited) { child.props.onExited(node2); } if (this.mounted) { this.setState(function(state) { var children = _extends({}, state.children); delete children[child.key]; return { children }; }); } }; _proto.render = function render() { var _this$props = this.props, Component = _this$props.component, childFactory2 = _this$props.childFactory, props = _objectWithoutPropertiesLoose(_this$props, ["component", "childFactory"]); var contextValue = this.state.contextValue; var children = values(this.state.children).map(childFactory2); delete props.appear; delete props.enter; delete props.exit; if (Component === null) { return /* @__PURE__ */ React.createElement(TransitionGroupContext.Provider, { value: contextValue }, children); } return /* @__PURE__ */ React.createElement(TransitionGroupContext.Provider, { value: contextValue }, /* @__PURE__ */ React.createElement(Component, props, children)); }; return TransitionGroup2; }(React.Component); TransitionGroup.propTypes = {}; TransitionGroup.defaultProps = defaultProps; function Ripple(props) { const { className, classes, pulsate = false, rippleX, rippleY, rippleSize, in: inProp, onExited, timeout } = props; const [leaving, setLeaving] = React__namespace.useState(false); const rippleClassName = clsx(className, classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate); const rippleStyles = { width: rippleSize, height: rippleSize, top: -(rippleSize / 2) + rippleY, left: -(rippleSize / 2) + rippleX }; const childClassName = clsx(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate); if (!inProp && !leaving) { setLeaving(true); } React__namespace.useEffect(() => { if (!inProp && onExited != null) { const timeoutId = setTimeout(onExited, timeout); return () => { clearTimeout(timeoutId); }; } return void 0; }, [onExited, inProp, timeout]); return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: rippleClassName, style: rippleStyles, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: childClassName }) }); } const touchRippleClasses = generateUtilityClasses("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsate", "child", "childLeaving", "childPulsate"]); const DURATION = 550; const DELAY_RIPPLE = 80; const enterKeyframe = keyframes` 0% { transform: scale(0); opacity: 0.1; } 100% { transform: scale(1); opacity: 0.3; } `; const exitKeyframe = keyframes` 0% { opacity: 1; } 100% { opacity: 0; } `; const pulsateKeyframe = keyframes` 0% { transform: scale(1); } 50% { transform: scale(0.92); } 100% { transform: scale(1); } `; const TouchRippleRoot = styled("span", { name: "MuiTouchRipple", slot: "Root" })({ overflow: "hidden", pointerEvents: "none", position: "absolute", zIndex: 0, top: 0, right: 0, bottom: 0, left: 0, borderRadius: "inherit" }); const TouchRippleRipple = styled(Ripple, { name: "MuiTouchRipple", slot: "Ripple" })` opacity: 0; position: absolute; &.${touchRippleClasses.rippleVisible} { opacity: 0.3; transform: scale(1); animation-name: ${enterKeyframe}; animation-duration: ${DURATION}ms; animation-timing-function: ${({ theme }) => theme.transitions.easing.easeInOut}; } &.${touchRippleClasses.ripplePulsate} { animation-duration: ${({ theme }) => theme.transitions.duration.shorter}ms; } & .${touchRippleClasses.child} { opacity: 1; display: block; width: 100%; height: 100%; border-radius: 50%; background-color: currentColor; } & .${touchRippleClasses.childLeaving} { opacity: 0; animation-name: ${exitKeyframe}; animation-duration: ${DURATION}ms; animation-timing-function: ${({ theme }) => theme.transitions.easing.easeInOut}; } & .${touchRippleClasses.childPulsate} { position: absolute; /* @noflip */ left: 0px; top: 0; animation-name: ${pulsateKeyframe}; animation-duration: 2500ms; animation-timing-function: ${({ theme }) => theme.transitions.easing.easeInOut}; animation-iteration-count: infinite; animation-delay: 200ms; } `; const TouchRipple = /* @__PURE__ */ React__namespace.forwardRef(function TouchRipple2(inProps, ref) { const props = useDefaultProps({ props: inProps, name: "MuiTouchRipple" }); const { center: centerProp = false, classes = {}, className, ...other } = props; const [ripples, setRipples] = React__namespace.useState([]); const nextKey = React__namespace.useRef(0); const rippleCallback = React__namespace.useRef(null); React__namespace.useEffect(() => { if (rippleCallback.current) { rippleCallback.current(); rippleCallback.current = null; } }, [ripples]); const ignoringMouseDown = React__namespace.useRef(false); const startTimer = useTimeout(); const startTimerCommit = React__namespace.useRef(null); const container = React__namespace.useRef(null); const startCommit = React__namespace.useCallback((params) => { const { pulsate: pulsate2, rippleX, rippleY, rippleSize, cb } = params; setRipples((oldRipples) => [...oldRipples, /* @__PURE__ */ jsxRuntimeExports.jsx(TouchRippleRipple, { classes: { ripple: clsx(classes.ripple, touchRippleClasses.ripple), rippleVisible: clsx(classes.rippleVisible, touchRippleClasses.rippleVisible), ripplePulsate: clsx(classes.ripplePulsate, touchRippleClasses.ripplePulsate), child: clsx(classes.child, touchRippleClasses.child), childLeaving: clsx(classes.childLeaving, touchRippleClasses.childLeaving), childPulsate: clsx(classes.childPulsate, touchRippleClasses.childPulsate) }, timeout: DURATION, pulsate: pulsate2, rippleX, rippleY, rippleSize }, nextKey.current)]); nextKey.current += 1; rippleCallback.current = cb; }, [classes]); const start2 = React__namespace.useCallback((event = {}, options = {}, cb = () => { }) => { const { pulsate: pulsate2 = false, center = centerProp || options.pulsate, fakeElement = false // For test purposes } = options; if ((event == null ? void 0 : event.type) === "mousedown" && ignoringMouseDown.current) { ignoringMouseDown.current = false; return; } if ((event == null ? void 0 : event.type) === "touchstart") { ignoringMouseDown.current = true; } const element = fakeElement ? null : container.current; const rect = element ? element.getBoundingClientRect() : { width: 0, height: 0, left: 0, top: 0 }; let rippleX; let rippleY; let rippleSize; if (center || event === void 0 || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) { rippleX = Math.round(rect.width / 2); rippleY = Math.round(rect.height / 2); } else { const { clientX, clientY } = event.touches && event.touches.length > 0 ? event.touches[0] : event; rippleX = Math.round(clientX - rect.left); rippleY = Math.round(clientY - rect.top); } if (center) { rippleSize = Math.sqrt((2 * rect.width ** 2 + rect.height ** 2) / 3); if (rippleSize % 2 === 0) { rippleSize += 1; } } else { const sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2; const sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2; rippleSize = Math.sqrt(sizeX ** 2 + sizeY ** 2); } if (event == null ? void 0 : event.touches) { if (startTimerCommit.current === null) { startTimerCommit.current = () => { startCommit({ pulsate: pulsate2, rippleX, rippleY, rippleSize, cb }); }; startTimer.start(DELAY_RIPPLE, () => { if (startTimerCommit.current) { startTimerCommit.current(); startTimerCommit.current = null; } }); } } else { startCommit({ pulsate: pulsate2, rippleX, rippleY, rippleSize, cb }); } }, [centerProp, startCommit, startTimer]); const pulsate = React__namespace.useCallback(() => { start2({}, { pulsate: true }); }, [start2]); const stop = React__namespace.useCallback((event, cb) => { startTimer.clear(); if ((event == null ? void 0 : event.type) === "touchend" && startTimerCommit.current) { startTimerCommit.current(); startTimerCommit.current = null; startTimer.start(0, () => { stop(event, cb); }); return; } startTimerCommit.current = null; setRipples((oldRipples) => { if (oldRipples.length > 0) { return oldRipples.slice(1); } return oldRipples; }); rippleCallback.current = cb; }, [startTimer]); React__namespace.useImperativeHandle(ref, () => ({ pulsate, start: start2, stop }), [pulsate, start2, stop]); return /* @__PURE__ */ jsxRuntimeExports.jsx(TouchRippleRoot, { className: clsx(touchRippleClasses.root, classes.root, className), ref: container, ...other, children: /* @__PURE__ */ jsxRuntimeExports.jsx(TransitionGroup, { component: null, exit: true, children: ripples }) }); }); function getButtonBaseUtilityClass(slot) { return generateUtilityClass("MuiButtonBase", slot); } const buttonBaseClasses = generateUtilityClasses("MuiButtonBase", ["root", "disabled", "focusVisible"]); const useUtilityClasses$G = (ownerState) => { const { disabled, focusVisible, focusVisibleClassName, classes } = ownerState; const slots = { root: ["root", disabled && "disabled", focusVisible && "focusVisible"] }; const composedClasses = composeClasses(slots, getButtonBaseUtilityClass, classes); if (focusVisible && focusVisibleClassName) { composedClasses.root += ` ${focusVisibleClassName}`; } return composedClasses; }; const ButtonBaseRoot = styled("button", { name: "MuiButtonBase", slot: "Root", overridesResolver: (props, styles2) => styles2.root })({ display: "inline-flex", alignItems: "center", justifyContent: "center", position: "relative", boxSizing: "border-box", WebkitTapHighlightColor: "transparent", backgroundColor: "transparent", // Reset default value // We disable the focus ring for mouse, touch and keyboard users. outline: 0, border: 0, margin: 0, // Remove the margin in Safari borderRadius: 0, padding: 0, // Remove the padding in Firefox cursor: "pointer", userSelect: "none", verticalAlign: "middle", MozAppearance: "none", // Reset WebkitAppearance: "none", // Reset textDecoration: "none", // So we take precedent over the style of a native element. color: "inherit", "&::-moz-focus-inner": { borderStyle: "none" // Remove Firefox dotted outline. }, [`&.${buttonBaseClasses.disabled}`]: { pointerEvents: "none", // Disable link interactions cursor: "default" }, "@media print": { colorAdjust: "exact" } }); const ButtonBase = /* @__PURE__ */ React__namespace.forwardRef(function ButtonBase2(inProps, ref) { const props = useDefaultProps({ props: inProps, name: "MuiButtonBase" }); const { action, centerRipple = false, children, className, component = "button", disabled = false, disableRipple = false, disableTouchRipple = false, focusRipple = false, focusVisibleClassName, LinkComponent = "a", onBlur, onClick, onContextMenu, onDragLeave, onFocus, onFocusVisible, onKeyDown, onKeyUp, onMouseDown, onMouseLeave, onMouseUp, onTouchEnd, onTouchMove, onTouchStart, tabIndex = 0, TouchRippleProps, touchRippleRef, type, ...other } = props; const buttonRef = React__namespace.useRef(null); const ripple = useLazyRipple(); const handleRippleRef = useForkRef(ripple.ref, touchRippleRef); const [focusVisible, setFocusVisible] = React__namespace.useState(false); if (disabled && focusVisible) { setFocusVisible(false); } React__namespace.useImperativeHandle(action, () => ({ focusVisible: () => { setFocusVisible(true); buttonRef.current.focus(); } }), []); const enableTouchRipple = ripple.shouldMount && !disableRipple && !disabled; React__namespace.useEffect(() => { if (focusVisible && focusRipple && !disableRipple) { ripple.pulsate(); } }, [disableRipple, focusRipple, focusVisible, ripple]); const handleMouseDown = useRippleHandler(ripple, "start", onMouseDown, disableTouchRipple); const handleContextMenu = useRippleHandler(ripple, "stop", onContextMenu, disableTouchRipple); const handleDragLeave = useRippleHandler(ripple, "stop", onDragLeave, disableTouchRipple); const handleMouseUp = useRippleHandler(ripple, "stop", onMouseUp, disableTouchRipple); const handleMouseLeave = useRippleHandler(ripple, "stop", (event) => { if (focusVisible) { event.preventDefault(); } if (onMouseLeave) { onMouseLeave(event); } }, disableTouchRipple); const handleTouchStart = useRippleHandler(ripple, "start", onTouchStart, disableTouchRipple); const handleTouchEnd = useRippleHandler(ripple, "stop", onTouchEnd, disableTouchRipple); const handleTouchMove = useRippleHandler(ripple, "stop", onTouchMove, disableTouchRipple); const handleBlur = useRippleHandler(ripple, "stop", (event) => { if (!isFocusVisible(event.target)) { setFocusVisible(false); } if (onBlur) { onBlur(event); } }, false); const handleFocus = useEventCallback((event) => { if (!buttonRef.current) { buttonRef.current = event.currentTarget; } if (isFocusVisible(event.target)) { setFocusVisible(true); if (onFocusVisible) { onFocusVisible(event); } } if (onFocus) { onFocus(event); } }); const isNonNativeButton = () => { const button = buttonRef.current; return component && component !== "button" && !(button.tagName === "A" && button.href); }; const handleKeyDown = useEventCallback((event) => { if (focusRipple && !event.repeat && focusVisible && event.key === " ") { ripple.stop(event, () => { ripple.start(event); }); } if (event.target === event.currentTarget && isNonNativeButton() && event.key === " ") { event.preventDefault(); } if (onKeyDown) { onKeyDown(event); } if (event.target === event.currentTarget && isNonNativeButton() && event.key === "Enter" && !disabled) { event.preventDefault(); if (onClick) { onClick(event); } } }); const handleKeyUp = useEventCallback((event) => { if (focusRipple && event.key === " " && focusVisible && !event.defaultPrevented) { ripple.stop(event, () => { ripple.pulsate(event); }); } if (onKeyUp) { onKeyUp(event); } if (onClick && event.target === event.currentTarget && isNonNativeButton() && event.key === " " && !event.defaultPrevented) { onClick(event); } }); let ComponentProp = component; if (ComponentProp === "button" && (other.href || other.to)) { ComponentProp = LinkComponent; } const buttonProps = {}; if (ComponentProp === "button") { buttonProps.type = type === void 0 ? "button" : type; buttonProps.disabled = disabled; } else { if (!other.href && !other.to) { buttonProps.role = "button"; } if (disabled) { buttonProps["aria-disabled"] = disabled; } } const handleRef = useForkRef(ref, buttonRef); const ownerState = { ...props, centerRipple, component, disabled, disableRipple, disableTouchRipple, focusRipple, tabIndex, focusVisible }; const classes = useUtilityClasses$G(ownerState); return /* @__PURE__ */ jsxRuntimeExports.jsxs(ButtonBaseRoot, { as: ComponentProp, className: clsx(classes.root, className), ownerState, onBlur: handleBlur, onClick, onContextMenu: handleContextMenu, onFocus: handleFocus, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, onMouseDown: handleMouseDown, onMouseLeave: handleMouseLeave, onMouseUp: handleMouseUp, onDragLeave: handleDragLeave, onTouchEnd: handleTouchEnd, onTouchMove: handleTouchMove, onTouchStart: handleTouchStart, ref: handleRef, tabIndex: disabled ? -1 : tabIndex, type, ...buttonProps, ...other, children: [children, enableTouchRipple ? /* @__PURE__ */ jsxRuntimeExports.jsx(TouchRipple, { ref: handleRippleRef, center: centerRipple, ...TouchRippleProps }) : null] }); }); function useRippleHandler(ripple, rippleAction, eventCallback, skipRippleAction = false) { return useEventCallback((event) => { if (eventCallback) { eventCallback(event); } if (!skipRippleAction) { ripple[rippleAction](event); } return true; }); } function hasCorrectMainProperty(obj) { return typeof obj.main === "string"; } function checkSimplePaletteColorValues(obj, additionalPropertiesToCheck = []) { if (!hasCorrectMainProperty(obj)) { return false; } for (const value of additionalPropertiesToCheck) { if (!obj.hasOwnProperty(value) || typeof obj[value] !== "string") { return false; } } return true; } function createSimplePaletteValueFilter(additionalPropertiesToCheck = []) { return ([, value]) => value && checkSimplePaletteColorValues(value, additionalPropertiesToCheck); } function getCircularProgressUtilityClass(slot) { return generateUtilityClass("MuiCircularProgress", slot); } generateUtilityClasses("MuiCircularProgress", ["root", "determinate", "indeterminate", "colorPrimary", "colorSecondary", "svg", "circle", "circleDeterminate", "circleIndeterminate", "circleDisableShrink"]); const SIZE = 44; const circularRotateKeyframe = keyframes` 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } `; const circularDashKeyframe = keyframes` 0% { stroke-dasharray: 1px, 200px; stroke-dashoffset: 0; } 50% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -15px; } 100% { stroke-dasharray: 1px, 200px; stroke-dashoffset: -126px; } `; const rotateAnimation = typeof circularRotateKeyframe !== "string" ? css` animation: ${circularRotateKeyframe} 1.4s linear infinite; ` : null; const dashAnimation = typeof circularDashKeyframe !== "string" ? css` animation: ${circularDashKeyframe} 1.4s ease-in-out infinite; ` : null; const useUtilityClasses$F = (ownerState) => { const { classes, variant, color: color2, disableShrink } = ownerState; const slots = { root: ["root", variant, `color${capitalize(color2)}`], svg: ["svg"], circle: ["circle", `circle${capitalize(variant)}`, disableShrink && "circleDisableShrink"] }; return composeClasses(slots, getCircularProgressUtilityClass, classes); }; const CircularProgressRoot = styled("span", { name: "MuiCircularProgress", slot: "Root", overridesResolver: (props, styles2) => { const { ownerState } = props; return [styles2.root, styles2[ownerState.variant], styles2[`color${capitalize(ownerState.color)}`]]; } })(memoTheme(({ theme }) => ({ display: "inline-block", variants: [{ props: { variant: "determinate" }, style: { transition: theme.transitions.create("transform") } }, { props: { variant: "indeterminate" }, style: rotateAnimation || { animation: `${circularRotateKeyframe} 1.4s linear infinite` } }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({ props: { color: color2 }, style: { color: (theme.vars || theme).palette[color2].main } }))] }))); const CircularProgressSVG = styled("svg", { name: "MuiCircularProgress", slot: "Svg", overridesResolver: (props, styles2) => styles2.svg })({ display: "block" // Keeps the progress centered }); const CircularProgressCircle = styled("circle", { name: "MuiCircularProgress", slot: "Circle", overridesResolver: (props, styles2) => { const { ownerState } = props; return [styles2.circle, styles2[`circle${capitalize(ownerState.variant)}`], ownerState.disableShrink && styles2.circleDisableShrink]; } })(memoTheme(({ theme }) => ({ stroke: "currentColor", variants: [{ props: { variant: "determinate" }, style: { transition: theme.transitions.create("stroke-dashoffset") } }, { props: { variant: "indeterminate" }, style: { // Some default value that looks fine waiting for the animation to kicks in. strokeDasharray: "80px, 200px", strokeDashoffset: 0 // Add the unit to fix a Edge 16 and below bug. } }, { props: ({ ownerState }) => ownerState.variant === "indeterminate" && !ownerState.disableShrink, style: dashAnimation || { // At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used. animation: `${circularDashKeyframe} 1.4s ease-in-out infinite` } }] }))); const CircularProgress = /* @__PURE__ */ React__namespace.forwardRef(function CircularProgress2(inProps, ref) { const props = useDefaultProps({ props: inProps, name: "MuiCircularProgress" }); const { className, color: color2 = "primary", disableShrink = false, size = 40, style: style2, thickness = 3.6, value = 0, variant = "indeterminate", ...other } = props; const ownerState = { ...props, color: color2, disableShrink, size, thickness, value, variant }; const classes = useUtilityClasses$F(ownerState); const circleStyle = {}; const rootStyle = {}; const rootProps = {}; if (variant === "determinate") { const circumference = 2 * Math.PI * ((SIZE - thickness) / 2); circleStyle.strokeDasharray = circumference.toFixed(3); rootProps["aria-valuenow"] = Math.round(value); circleStyle.strokeDashoffset = `${((100 - value) / 100 * circumference).toFixed(3)}px`; rootStyle.transform = "rotate(-90deg)"; } return /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgressRoot, { className: clsx(classes.root, className), style: { width: size, height: size, ...rootStyle, ...style2 }, ownerState, ref, role: "progressbar", ...rootProps, ...other, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgressSVG, { className: classes.svg, ownerState, viewBox: `${SIZE / 2} ${SIZE / 2} ${SIZE} ${SIZE}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgressCircle, { className: classes.circle, style: circleStyle, ownerState, cx: SIZE, cy: SIZE, r: (SIZE - thickness) / 2, fill: "none", strokeWidth: thickness }) }) }); }); function getButtonUtilityClass(slot) { return generateUtilityClass("MuiButton", slot); } const buttonClasses = generateUtilityClasses("MuiButton", ["root", "text", "textInherit", "textPrimary", "textSecondary", "textSuccess", "textError", "textInfo", "textWarning", "outlined", "outlinedInherit", "outlinedPrimary", "outlinedSecondary", "outlinedSuccess", "outlinedError", "outlinedInfo", "outlinedWarning", "contained", "containedInherit", "containedPrimary", "containedSecondary", "containedSuccess", "containedError", "containedInfo", "containedWarning", "disableElevation", "focusVisible", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorSuccess", "colorError", "colorInfo", "colorWarning", "textSizeSmall", "textSizeMedium", "textSizeLarge", "outlinedSizeSmall", "outlinedSizeMedium", "outlinedSizeLarge", "containedSizeSmall", "containedSizeMedium", "containedSizeLarge", "sizeMedium", "sizeSmall", "sizeLarge", "fullWidth", "startIcon", "endIcon", "icon", "iconSizeSmall", "iconSizeMedium", "iconSizeLarge", "loading", "loadingWrapper", "loadingIconPlaceholder", "loadingIndicator", "loadingPositionCenter", "loadingPositionStart", "loadingPositionEnd"]); const ButtonGroupContext = /* @__PURE__ */ React__namespace.createContext({}); const ButtonGroupButtonContext = /* @__PURE__ */ React__namespace.createContext(void 0); const useUtilityClasses$E = (ownerState) => { const { color: color2, disableElevation, fullWidth, size, variant, loading, loadingPosition, classes } = ownerState; const slots = { root: ["root", loading && "loading", variant, `${variant}${capitalize(color2)}`, `size${capitalize(size)}`, `${variant}Size${capitalize(size)}`, `color${capitalize(color2)}`, disableElevation && "disableElevation", fullWidth && "fullWidth", loading && `loadingPosition${capitalize(loadingPosition)}`], startIcon: ["icon", "startIcon", `iconSize${capitalize(size)}`], endIcon: ["icon", "endIcon", `iconSize${capitalize(size)}`], loadingIndicator: ["loadingIndicator"], loadingWrapper: ["loadingWrapper"] }; const composedClasses = composeClasses(slots, getButtonUtilityClass, classes); return { ...classes, // forward the focused, disabled, etc. classes to the ButtonBase ...composedClasses }; }; const commonIconStyles = [{ props: { size: "small" }, style: { "& > *:nth-of-type(1)": { fontSize: 18 } } }, { props: { size: "medium" }, style: { "& > *:nth-of-type(1)": { fontSize: 20 } } }, { props: { size: "large" }, style: { "& > *:nth-of-type(1)": { fontSize: 22 } } }]; const ButtonRoot = styled(ButtonBase, { shouldForwardProp: (prop) => rootShouldForwardProp(prop) || prop === "classes", name: "MuiButton", slot: "Root", overridesResolver: (props, styles2) => { const { ownerState } = props; return [styles2.root, styles2[ownerState.variant], styles2[`${ownerState.variant}${capitalize(ownerState.color)}`], styles2[`size${capitalize(ownerState.size)}`], styles2[`${ownerState.variant}Size${capitalize(ownerState.size)}`], ownerState.color === "inherit" && styles2.colorInherit, ownerState.disableElevation && styles2.disableElevation, ownerState.fullWidth && styles2.fullWidth, ownerState.loading && styles2.loading]; } })(memoTheme(({ theme }) => { const inheritContainedBackgroundColor = theme.palette.mode === "light" ? theme.palette.grey[300] : theme.palette.grey[800]; const inheritContainedHoverBackgroundColor = theme.palette.mode === "light" ? theme.palette.grey.A100 : theme.palette.grey[700]; return { ...theme.typography.button, minWidth: 64, padding: "6px 16px", border: 0, borderRadius: (theme.vars || theme).shape.borderRadius, transition: theme.transitions.create(["background-color", "box-shadow", "border-color", "color"], { duration: theme.transitions.duration.short }), "&:hover": { textDecoration: "none" }, [`&.${buttonClasses.disabled}`]: { color: (theme.vars || theme).palette.action.disabled }, variants: [{ props: { variant: "contained" }, style: { color: `var(--variant-containedColor)`, backgroundColor: `var(--variant-containedBg)`, boxShadow: (theme.vars || theme).shadows[2], "&:hover": { boxShadow: (theme.vars || theme).shadows[4], // Reset on touch devices, it doesn't add specificity "@media (hover: none)": { boxShadow: (theme.vars || theme).shadows[2] } }, "&:active": { boxShadow: (theme.vars || theme).shadows[8] }, [`&.${buttonClasses.focusVisible}`]: { boxShadow: (theme.vars || theme).shadows[6] }, [`&.${buttonClasses.disabled}`]: { color: (theme.vars || theme).palette.action.disabled, boxShadow: (theme.vars || theme).shadows[0], backgroundColor: (theme.vars || theme).palette.action.disabledBackground } } }, { props: { variant: "outlined" }, style: { padding: "5px 15px", border: "1px solid currentColor", borderColor: `var(--variant-outlinedBorder, currentColor)`, backgroundColor: `var(--variant-outlinedBg)`, color: `var(--variant-outlinedColor)`, [`&.${buttonClasses.disabled}`]: { border: `1px solid ${(theme.vars || theme).palette.action.disabledBackground}` } } }, { props: { variant: "text" }, style: { padding: "6px 8px", color: `var(--variant-textColor)`, backgroundColor: `var(--variant-textBg)` } }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({ props: { color: color2 }, style: { "--variant-textColor": (theme.vars || theme).palette[color2].main, "--variant-outlinedColor": (theme.vars || theme).palette[color2].main, "--variant-outlinedBorder": theme.vars ? `rgba(${theme.vars.palette[color2].mainChannel} / 0.5)` : alpha(theme.palette[color2].main, 0.5), "--variant-containedColor": (theme.vars || theme).palette[color2].contrastText, "--variant-containedBg": (theme.vars || theme).palette[color2].main, "@media (hover: hover)": { "&:hover": { "--variant-containedBg": (theme.vars || theme).palette[color2].dark, "--variant-textBg": theme.vars ? `rgba(${theme.vars.palette[color2].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[color2].main, theme.palette.action.hoverOpacity), "--variant-outlinedBorder": (theme.vars || theme).palette[color2].main, "--variant-outlinedBg": theme.vars ? `rgba(${theme.vars.palette[color2].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[color2].main, theme.palette.action.hoverOpacity) } } } })), { props: { color: "inherit" }, style: { color: "inherit", borderColor: "currentColor", "--variant-containedBg": theme.vars ? theme.vars.palette.Button.inheritContainedBg : inheritContainedBackgroundColor, "@media (hover: hover)": { "&:hover": { "--variant-containedBg": theme.vars ? theme.vars.palette.Button.inheritContainedHoverBg : inheritContainedHoverBackgroundColor, "--variant-textBg": theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity), "--variant-outlinedBg": theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity) } } } }, { props: { size: "small", variant: "text" }, style: { padding: "4px 5px", fontSize: theme.typography.pxToRem(13) } }, { props: { size: "large", variant: "text" }, style: { padding: "8px 11px", fontSize: theme.typography.pxToRem(15) } }, { props: { size: "small", variant: "outlined" }, style: { padding: "3px 9px", fontSize: theme.typography.pxToRem(13) } }, { props: { size: "large", variant: "outlined" }, style: { padding: "7px 21px", fontSize: theme.typography.pxToRem(15) } }, { props: { size: "small", variant: "contained" }, style: { padding: "4px 10px", fontSize: theme.typography.pxToRem(13) } }, { props: { size: "large", variant: "contained" }, style: { padding: "8px 22px", fontSize: theme.typography.pxToRem(15) } }, { props: { disableElevation: true }, style: { boxShadow: "none", "&:hover": { boxShadow: "none" }, [`&.${buttonClasses.focusVisible}`]: { boxShadow: "none" }, "&:active": { boxShadow: "none" }, [`&.${buttonClasses.disabled}`]: { boxShadow: "none" } } }, { props: { fullWidth: true }, style: { width: "100%" } }, { props: { loadingPosition: "center" }, style: { transition: theme.transitions.create(["background-color", "box-shadow", "border-color"], { duration: theme.transitions.duration.short }), [`&.${buttonClasses.loading}`]: { color: "transparent" } } }] }; })); const ButtonStartIcon = styled("span", { name: "MuiButton", slot: "StartIcon", overridesResolver: (props, styles2) => { const { ownerState } = props; return [styles2.startIcon, ownerState.loading && styles2.startIconLoadingStart, styles2[`iconSize${capitalize(ownerState.size)}`]]; } })(({ theme }) => ({ display: "inherit", marginRight: 8, marginLeft: -4, variants: [{ props: { size: "small" }, style: { marginLeft: -2 } }, { props: { loadingPosition: "start", loading: true }, style: { transition: theme.transitions.create(["opacity"], { duration: theme.transitions.duration.short }), opacity: 0 } }, { props: { loadingPosition: "start", loading: true, fullWidth: true }, style: { marginRight: -8 } }, ...commonIconStyles] })); const ButtonEndIcon = styled("span", { name: "MuiButton", slot: "EndIcon", overridesResolver: (props, styles2) => { const { ownerState } = props; return [styles2.endIcon, ownerState.loading && styles2.endIconLoadingEnd, styles2[`iconSize${capitalize(ownerState.size)}`]]; } })(({ theme }) => ({ display: "inherit", marginRight: -4, marginLeft: 8, variants: [{ props: { size: "small" }, style: { marginRight: -2 } }, { props: { loadingPosition: "end", loading: true }, style: { transition: theme.transitions.create(["opacity"], { duration: theme.transitions.duration.short }), opacity: 0 } }, { props: { loadingPosition: "end", loading: true, fullWidth: true }, style: { marginLeft: -8 } }, ...commonIconStyles] })); const ButtonLoadingIndicator = styled("span", { name: "MuiButton", slot: "LoadingIndicator", overridesResolver: (props, styles2) => styles2.loadingIndicator })(({ theme }) => ({ display: "none", position: "absolute", visibility: "visible", variants: [{ props: { loading: true }, style: { display: "flex" } }, { props: { loadingPosition: "start" }, style: { left: 14 } }, { props: { loadingPosition: "start", size: "small" }, style: { left: 10 } }, { props: { variant: "text", loadingPosition: "start" }, style: { left: 6 } }, { props: { loadingPosition: "center" }, style: { left: "50%", transform: "translate(-50%)", color: (theme.vars || theme).palette.action.disabled } }, { props: { loadingPosition: "end" }, style: { right: 14 } }, { props: { loadingPosition: "end", size: "small" }, style: { right: 10 } }, { props: { variant: "text", loadingPosition: "end" }, style: { right: 6 } }, { props: { loadingPosition: "start", fullWidth: true }, style: { position: "relative", left: -10 } }, { props: { loadingPosition: "end", fullWidth: true }, style: { position: "relative", right: -10 } }] })); const ButtonLoadingIconPlaceholder = styled("span", { name: "MuiButton", slot: "LoadingIconPlaceholder", overridesResolver: (props, styles2) => styles2.loadingIconPlaceholder })({ display: "inline-block", width: "1em", height: "1em" }); const Button = /* @__PURE__ */ React__namespace.forwardRef(function Button2(inProps, ref) { const contextProps = React__namespace.useContext(ButtonGroupContext); const buttonGroupButtonContextPositionClassName = React__namespace.useContext(ButtonGroupButtonContext); const resolvedProps = resolveProps(contextProps, inProps); const props = useDefaultProps({ props: resolvedProps, name: "MuiButton" }); const { children, color: color2 = "primary", component = "button", className, disabled = false, disableElevation = false, disableFocusRipple = false, endIcon: endIconProp, focusVisibleClassName, fullWidth = false, id: idProp, loading = null, loadingIndicator: loadingIndicatorProp, loadingPosition = "center", size = "medium", startIcon: startIconProp, type, variant = "text", ...other } = props; const loadingId = useId(idProp); const loadingIndicator = loadingIndicatorProp ?? /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgress, { "aria-labelledby": loadingId, color: "inherit", size: 16 }); const ownerState = { ...props, color: color2, component, disabled, disableElevation, disableFocusRipple, fullWidth, loading, loadingIndicator, loadingPosition, size, type, variant }; const classes = useUtilityClasses$E(ownerState); const startIcon = (startIconProp || loading && loadingPosition === "start") && /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonStartIcon, { className: classes.startIcon, ownerState, children: startIconProp || /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonLoadingIconPlaceholder, { className: classes.loadingIconPlaceholder, ownerState }) }); const endIcon = (endIconProp || loading && loadingPosition === "end") && /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonEndIcon, { className: classes.endIcon, ownerState, children: endIconProp || /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonLoadingIconPlaceholder, { className: classes.loadingIconPlaceholder, ownerState }) }); const positionClassName = buttonGroupButtonContextPositionClassName || ""; const loader = typeof loading === "boolean" ? ( // use plain HTML span to minimize the runtime overhead /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classes.loadingWrapper, style: { display: "contents" }, children: loading && /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonLoadingIndicator, { className: classes.loadingIndicator, ownerState, children: loadingIndicator }) }) ) : null; return /* @__PURE__ */ jsxRuntimeExports.jsxs(ButtonRoot, { ownerState, className: clsx(contextProps.className, classes.root, className, positionClassName), component, disabled: disabled || loading, focusRipple: !disableFocusRipple, focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName), ref, type, id: loading ? loadingId : idProp, ...other, classes, children: [startIcon, loadingPosition !== "end" && loader, children, loadingPosition === "end" && loader, endIcon] }); }); const ShareIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92" })); function ThemeProviderNoVars({ theme: themeInput, ...props }) { const scopedTheme = THEME_ID in themeInput ? themeInput[THEME_ID] : void 0; return /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider$1, { ...props, themeId: scopedTheme ? THEME_ID : void 0, theme: scopedTheme || themeInput }); } const defaultConfig = { colorSchemeStorageKey: "mui-color-scheme", defaultLightColorScheme: "light", defaultDarkColorScheme: "dark", modeStorageKey: "mui-mode" }; const { CssVarsProvider: InternalCssVarsProvider } = createCssVarsProvider({ themeId: THEME_ID, // @ts-ignore ignore module augmentation tests theme: () => createTheme({ cssVariables: true }), colorSchemeStorageKey: defaultConfig.colorSchemeStorageKey, modeStorageKey: defaultConfig.modeStorageKey, defaultColorScheme: { light: defaultConfig.defaultLightColorScheme, dark: defaultConfig.defaultDarkColorScheme }, resolveTheme: (theme) => { const newTheme = { ...theme, typography: createTypography(theme.palette, theme.typography) }; newTheme.unstable_sx = function sx(props) { return styleFunctionSx({ sx: props, theme: this }); }; return newTheme; } }); const CssVarsProvider = InternalCssVarsProvider; function ThemeProvider({ theme, ...props }) { if (typeof theme === "function") { return /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProviderNoVars, { theme, ...props }); } const muiTheme = THEME_ID in theme ? theme[THEME_ID] : theme; if (!("colorSchemes" in muiTheme)) { if (!("vars" in muiTheme)) { return /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProviderNoVars, { theme: { ...theme, vars: null }, ...props }); } return /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProviderNoVars, { theme, ...props }); } return /* @__PURE__ */ jsxRuntimeExports.jsx(CssVarsProvider, { theme, ...props }); } const reflow = (node2) => node2.scrollTop; function getTransitionProps(props, options) { const { timeout, easing: easing2, style: style2 = {} } = props; return { duration: style2.transitionDuration ?? (typeof timeout === "number" ? timeout : timeout[options.mode] || 0), easing: style2.transitionTimingFunction ?? (typeof easing2 === "object" ? easing2[options.mode] : easing2), delay: style2.transitionDelay }; } function getCollapseUtilityClass(slot) { return generateUtilityClass("MuiCollapse", slot); } generateUtilityClasses("MuiCollapse", ["root", "horizontal", "vertical", "entered", "hidden", "wrapper", "wrapperInner"]); const useUtilityClasses$D = (ownerState) => { const { orientation, classes } = ownerState; const slots = { root: ["root", `${orientation}`], entered: ["entered"], hidden: ["hidden"], wrapper: ["wrapper", `${orientation}`], wrapperInner: ["wrapperInner", `${orientation}`] }; return composeClasses(slots, getCollapseUtilityClass, classes); }; const CollapseRoot = styled("div", { name: "MuiCollapse", slot: "Root", overridesResolver: (props, styles2) => { const { ownerState } = props; return [styles2.root, styles2[ownerState.orientation], ownerState.state === "entered" && styles2.entered, ownerState.state === "exited" && !ownerState.in && ownerState.collapsedSize === "0px" && styles2.hidden]; } })(memoTheme(({ theme }) => ({ height: 0, overflow: "hidden", transition: theme.transitions.create("height"), variants: [{ props: { orientation: "horizontal" }, style: { height: "auto", width: 0, transition: theme.transitions.create("width") } }, { props: { state: "entered" }, style: { height: "auto", overflow: "visible" } }, { props: { state: "entered", orientation: "horizontal" }, style: { width: "auto" } }, { props: ({ ownerState }) => ownerState.state === "exited" && !ownerState.in && ownerState.collapsedSize === "0px", style: { visibility: "hidden" } }] }))); const CollapseWrapper = styled("div", { name: "MuiCollapse", slot: "Wrapper", overridesResolver: (props, styles2) => styles2.wrapper })({ // Hack to get children with a negative margin to not falsify the height computation. display: "flex", width: "100%", variants: [{ props: { orientation: "horizontal" }, style: { width: "auto", height: "100%" } }] }); const CollapseWrapperInner = styled("div", { name: "MuiCollapse", slot: "WrapperInner", overridesResolver: (props, styles2) => styles2.wrapperInner })({ width: "100%", variants: [{ props: { orientation: "horizontal" }, style: { width: "auto", height: "100%" } }] }); const Collapse = /* @__PURE__ */ React__namespace.forwardRef(function Collapse2(inProps, ref) { const props = useDefaultProps({ props: inProps, name: "MuiCollapse" }); const { addEndListener, children, className, collapsedSize: collapsedSizeProp = "0px", component, easing: easing2, in: inProp, onEnter, onEntered, onEntering, onExit, onExited, onExiting, orientation = "vertical", style: style2, timeout = duration.standard, // eslint-disable-next-line react/prop-types TransitionComponent = Transition, ...other } = props; const ownerState = { ...props, orientation, collapsedSize: collapsedSizeProp }; const classes = useUtilityClasses$D(ownerState); const theme = useTheme(); const timer2 = useTimeout(); const wrapperRef = React__namespace.useRef(null); const autoTransitionDuration = React__namespace.useRef(); const collapsedSize = typeof collapsedSizeProp === "number" ? `${collapsedSizeProp}px` : collapsedSizeProp; const isHorizontal2 = orientation === "horizontal"; const size = isHorizontal2 ? "width" : "height"; const nodeRef = React__namespace.useRef(null); const handleRef = useForkRef(ref, nodeRef); const normalizedTransitionCallback = (callback) => (maybeIsAppearing) => { if (callback) { const node2 = nodeRef.current; if (maybeIsAppearing === void 0) { callback(node2); } else { callback(node2, maybeIsAppearing); } } }; const getWrapperSize = () => wrapperRef.current ? wrapperRef.current[isHorizontal2 ? "clientWidth" : "clientHeight"] : 0; const handleEnter = normalizedTransitionCallback((node2, isAppearing) => { if (wrapperRef.current && isHorizontal2) { wrapperRef.current.style.position = "absolute"; } node2.style[size] = collapsedSize; if (onEnter) { onEnter(node2, isAppearing); } }); const handleEntering = normalizedTransitionCallback((node2, isAppearing) => { const wrapperSize = getWrapperSize(); if (wrapperRef.current && isHorizontal2) { wrapperRef.current.style.position = ""; } const { duration: transitionDuration, easing: transitionTimingFunction } = getTransitionProps({ style: style2, timeout, easing: easing2 }, { mode: "enter" }); if (timeout === "auto") { const duration2 = theme.transitions.getAutoHeightDuration(wrapperSize); node2.style.transitionDuration = `${duration2}ms`; autoTransitionDuration.current = duration2; } else { node2.style.transitionDuration = typeof transitionDuration === "string" ? transitionDuration : `${transitionDuration}ms`; } node2.style[size] = `${wrapperSize}px`; node2.style.transitionTimingFunction = transitionTimingFunction; if (onEntering) { onEntering(node2, isAppearing); } }); const handleEntered = normalizedTransitionCallback((node2, isAppearing) => { node2.style[size] = "auto"; if (onEntered) { onEntered(node2, isAppearing); } }); const handleExit = normalizedTransitionCallback((node2) => { node2.style[size] = `${getWrapperSize()}px`; if (onExit) { onExit(node2); } }); const handleExited = normalizedTransitionCallback(onExited); const handleExiting = normalizedTransitionCallback((node2) => { const wrapperSize = getWrapperSize(); const { duration: transitionDuration, easing: transitionTimingFunction } = getTransitionProps({ style: style2, timeout, easing: easing2 }, { mode: "exit" }); if (timeout === "auto") { const duration2 = theme.transitions.getAutoHeightDuration(wrapperSize); node2.style.transitionDuration = `${duration2}ms`; autoTransitionDuration.current = duration2; } else { node2.style.transitionDuration = typeof transitionDuration === "string" ? transitionDuration : `${transitionDuration}ms`; } node2.style[size] = collapsedSize; node2.style.transitionTimingFunction = transitionTimingFunction; if (onExiting) { onExiting(node2); } }); const handleAddEndListener = (next2) => { if (timeout === "auto") { timer2.start(autoTransitionDuration.current || 0, next2); } if (addEndListener) { addEndListener(nodeRef.current, next2); } }; return /* @__PURE__ */ jsxRuntimeExports.jsx(TransitionComponent, { in: inProp, onEnter: handleEnter, onEntered: handleEntered, onEntering: handleEntering, onExit: handleExit, onExited: handleExited, onExiting: handleExiting, addEndListener: handleAddEndListener, nodeRef, timeout: timeout === "auto" ? null : timeout, ...other, children: (state, { ownerState: incomingOwnerState, ...restChildProps }) => /* @__PURE__ */ jsxRuntimeExports.jsx(CollapseRoot, { as: component, className: clsx(classes.root, className, { "entered": classes.entered, "exited": !inProp && collapsedSize === "0px" && classes.hidden }[state]), style: { [isHorizontal2 ? "minWidth" : "minHeight"]: collapsedSize, ...style2 }, ref: handleRef, ownerState: { ...ownerState, state }, ...restChildProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CollapseWrapper, { ownerState: { ...ownerState, state }, className: classes.wrapper, ref: wrapperRef, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CollapseWrapperInner, { ownerState: { ...ownerState, state }, className: classes.wrapperInner, children }) }) }) }); }); if (Collapse) { Collapse.muiSupportAuto = true; } function getPaperUtilityClass(slot) { return generateUtilityClass("MuiPaper", slot); } generateUtilityClasses("MuiPaper", ["root", "rounded", "outlined", "elevation", "elevation0", "elevation1", "elevation2", "elevation3", "elevation4", "elevation5", "elevation6", "elevation7", "elevation8", "elevation9", "elevation10", "elevation11", "elevation12", "elevation13", "elevation14", "elevation15", "elevation16", "elevation17", "elevation18", "elevation19", "elevation20", "elevation21", "elevation22", "elevation23", "elevation24"]); const useUtilityClasses$C = (ownerState) => { const { square, elevation, variant, classes } = ownerState; const slots = { root: ["root", variant, !square && "rounded", variant === "elevation" && `elevation${elevation}`] }; return composeClasses(slots, getPaperUtilityClass, classes); }; const PaperRoot = styled("div", { name: "MuiPaper", slot: "Root", overridesResolver: (props, styles2) => { const { ownerState } = props; return [styles2.root, styles2[ownerState.variant], !ownerState.square && styles2.rounded, ownerState.variant === "elevation" && styles2[`elevation${ownerState.elevation}`]]; } })(memoTheme(({ theme }) => ({ backgroundColor: (theme.vars || theme).palette.background.paper, color: (theme.vars || theme).palette.text.primary, transition: theme.transitions.create("box-shadow"), variants: [{ props: ({ ownerState }) => !ownerState.square, style: { borderRadius: theme.shape.borderRadius } }, { props: { variant: "outlined" }, style: { border: `1px solid ${(theme.vars || theme).palette.divider}` } }, { props: { variant: "elevation" }, style: { boxShadow: "var(--Paper-shadow)", backgroundImage: "var(--Paper-overlay)" } }] }))); const Paper = /* @__PURE__ */ React__namespace.forwardRef(function Paper2(inProps, ref) { var _a; const props = useDefaultProps({ props: inProps, name: "MuiPaper" }); const theme = useTheme(); const { className, component = "div", elevation = 1, square = false, variant = "elevation", ...other } = props; const ownerState = { ...props, component, elevation, square, variant }; const classes = useUtilityClasses$C(ownerState); return /* @__PURE__ */ jsxRuntimeExports.jsx(PaperRoot, { as: component, ownerState, className: clsx(classes.root, className), ref, ...other, style: { ...variant === "elevation" && { "--Paper-shadow": (theme.vars || theme).shadows[elevation], ...theme.vars && { "--Paper-overlay": (_a = theme.vars.overlays) == null ? void 0 : _a[elevation] }, ...!theme.vars && theme.palette.mode === "dark" && { "--Paper-overlay": `linear-gradient(${alpha("#fff", getOverlayAlpha(elevation))}, ${alpha("#fff", getOverlayAlpha(elevation))})` } }, ...other.style } }); }); function useSlot(name, parameters) { const { className, elementType: initialElementType, ownerState, externalForwardedProps, internalForwardedProps, shouldForwardComponentProp = false, ...useSlotPropsParams } = parameters; const { component: rootComponent, slots = { [name]: void 0 }, slotProps = { [name]: void 0 }, ...other } = externalForwardedProps; const elementType = slots[name] || initialElementType; const resolvedComponentsProps = resolveComponentProps(slotProps[name], ownerState); const { props: { component: slotComponent, ...mergedProps }, internalRef } = mergeSlotProps$1({ className, ...useSlotPropsParams, externalForwardedProps: name === "root" ? other : void 0, externalSlotProps: resolvedComponentsProps }); const ref = useForkRef(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, parameters.ref); const LeafComponent = name === "root" ? slotComponent || rootComponent : slotComponent; const props = appendOwnerState(elementType, { ...name === "root" && !rootComponent && !slots[name] && internalForwardedProps, ...name !== "root" && !slots[name] && internalForwardedProps, ...mergedProps, ...LeafComponent && !shouldForwardComponentProp && { as: LeafComponent }, ...LeafComponent && shouldForwardComponentProp && { component: LeafComponent }, ref }, ownerState); return [elementType, props]; } function getAlertUtilityClass(slot) { return generateUtilityClass("MuiAlert", slot); } const alertClasses = generateUtilityClasses("MuiAlert", ["root", "action", "icon", "message", "filled", "colorSuccess", "colorInfo", "colorWarning", "colorError", "filledSuccess", "filledInfo", "filledWarning", "filledError", "outlined", "outlinedSuccess", "outlinedInfo", "outlinedWarning", "outlinedError", "standard", "standardSuccess", "standardInfo", "standardWarning", "standardError"]); function getIconButtonUtilityClass(slot) { return generateUtilityClass("MuiIconButton", slot); } const iconButtonClasses = generateUtilityClasses("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge", "loading", "loadingIndicator", "loadingWrapper"]); const useUtilityClasses$B = (ownerState) => { const { classes, disabled, color: color2, edge, size, loading } = ownerState; const slots = { root: ["root", loading && "loading", disabled && "disabled", color2 !== "default" && `color${capitalize(color2)}`, edge && `edge${capitalize(edge)}`, `size${capitalize(size)}`], loadingIndicator: ["loadingIndicator"], loadingWrapper: ["loadingWrapper"] }; return composeClasses(slots, getIconButtonUtilityClass, classes); }; const IconButtonRoot = styled(ButtonBase, { name: "MuiIconButton", slot: "Root", overridesResolver: (props, styles2) => { const { ownerState } = props; return [styles2.root, ownerState.loading && styles2.loading, ownerState.color !== "default" && styles2[`color${capitalize(ownerState.color)}`], ownerState.edge && styles2[`edge${capitalize(ownerState.edge)}`], styles2[`size${capitalize(ownerState.size)}`]]; } })(memoTheme(({ theme }) => ({ textAlign: "center", flex: "0 0 auto", fontSize: theme.typography.pxToRem(24), padding: 8, borderRadius: "50%", color: (theme.vars || theme).palette.action.active, transition: theme.transitions.create("background-color", { duration: theme.transitions.duration.shortest }), variants: [{ props: (props) => !props.disableRipple, style: { "--IconButton-hoverBg": theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity), "&:hover": { backgroundColor: "var(--IconButton-hoverBg)", // Reset on touch devices, it doesn't add specificity "@media (hover: none)": { backgroundColor: "transparent" } } } }, { props: { edge: "start" }, style: { marginLeft: -12 } }, { props: { edge: "start", size: "small" }, style: { marginLeft: -3 } }, { props: { edge: "end" }, style: { marginRight: -12 } }, { props: { edge: "end", size: "small" }, style: { marginRight: -3 } }] })), memoTheme(({ theme }) => ({ variants: [{ props: { color: "inherit" }, style: { color: "inherit" } }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({ props: { color: color2 }, style: { color: (theme.vars || theme).palette[color2].main } })), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({ props: { color: color2 }, style: { "--IconButton-hoverBg": theme.vars ? `rgba(${(theme.vars || theme).palette[color2].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha((theme.vars || theme).palette[color2].main, theme.palette.action.hoverOpacity) } })), { props: { size: "small" }, style: { padding: 5, fontSize: theme.typography.pxToRem(18) } }, { props: { size: "large" }, style: { padding: 12, fontSize: theme.typography.pxToRem(28) } }], [`&.${iconButtonClasses.disabled}`]: { backgroundColor: "transparent", color: (theme.vars || theme).palette.action.disabled }, [`&.${iconButtonClasses.loading}`]: { color: "transparent" } }))); const IconButtonLoadingIndicator = styled("span", { name: "MuiIconButton", slot: "LoadingIndicator", overridesResolver: (props, styles2) => styles2.loadingIndicator })(({ theme }) => ({ display: "none", position: "absolute", visibility: "visible", top: "50%", left: "50%", transform: "translate(-50%, -50%)", color: (theme.vars || theme).palette.action.disabled, variants: [{ props: { loading: true }, style: { display: "flex" } }] })); const IconButton = /* @__PURE__ */ React__namespace.forwardRef(function IconButton2(inProps, ref) { const props = useDefaultProps({ props: inProps, name: "MuiIconButton" }); const { edge = false, children, className, color: color2 = "default", disabled = false, disableFocusRipple = false, size = "medium", id: idProp, loading = null, loadingIndicator: loadingIndicatorProp, ...other } = props; const loadingId = useId(idProp); const loadingIndicator = loadingIndicatorProp ?? /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgress, { "aria-labelledby": loadingId, color: "inherit", size: 16 }); const ownerState = { ...props, edge, color: color2, disabled, disableFocusRipple, loading, loadingIndicator, size }; const classes = useUtilityClasses$B(ownerState); return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconButtonRoot, { id: loading ? loadingId : idProp, className: clsx(classes.root, className), centerRipple: true, focusRipple: !disableFocusRipple, disabled: disabled || loading, ref, ...other, ownerState, children: [typeof loading === "boolean" && // use plain HTML span to minimize the runtime overhead /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classes.loadingWrapper, style: { display: "contents" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButtonLoadingIndicator, { className: classes.loadingIndicator, ownerState, children: loading && loadingIndicator }) }), children] }); }); const SuccessOutlinedIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z" })); const ReportProblemOutlinedIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z" })); const ErrorOutlineIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" })); const InfoOutlinedIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z" })); const ClearIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })); const useUtilityClasses$A = (ownerState) => { const { variant, color: color2, severity, classes } = ownerState; const slots = { root: ["root", `color${capitalize(color2 || severity)}`, `${variant}${capitalize(color2 || severity)}`, `${variant}`], icon: ["icon"], message: ["message"], action: ["action"] }; return composeClasses(slots, getAlertUtilityClass, classes); }; const AlertRoot = styled(Paper, { name: "MuiAlert", slot: "Root", overridesResolver: (props, styles2) => { const { ownerState } = props; return [styles2.root, styles2[ownerState.variant], styles2[`${ownerState.variant}${capitalize(ownerState.color || ownerState.severity)}`]]; } })(memoTheme(({ theme }) => { const getColor = theme.palette.mode === "light" ? darken : lighten; const getBackgroundColor = theme.palette.mode === "light" ? lighten : darken; return { ...theme.typography.body2, backgroundColor: "transparent", display: "flex", padding: "6px 16px", variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(["light"])).map(([color2]) => ({ props: { colorSeverity: color2, variant: "standard" }, style: { color: theme.vars ? theme.vars.palette.Alert[`${color2}Color`] : getColor(theme.palette[color2].light, 0.6), backgroundColor: theme.vars ? theme.vars.palette.Alert[`${color2}StandardBg`] : getBackgroundColor(theme.palette[color2].light, 0.9), [`& .${alertClasses.icon}`]: theme.vars ? { color: theme.vars.palette.Alert[`${color2}IconColor`] } : { color: theme.palette[color2].main } } })), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(["light"])).map(([color2]) => ({ props: { colorSeverity: color2, variant: "outlined" }, style: { color: theme.vars ? theme.vars.palette.Alert[`${color2}Color`] : getColor(theme.palette[color2].light, 0.6), border: `1px solid ${(theme.vars || theme).palette[color2].light}`, [`& .${alertClasses.icon}`]: theme.vars ? { color: theme.vars.palette.Alert[`${color2}IconColor`] } : { color: theme.palette[color2].main } } })), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(["dark"])).map(([color2]) => ({ props: { colorSeverity: color2, variant: "filled" }, style: { fontWeight: theme.typography.fontWeightMedium, ...theme.vars ? { color: theme.vars.palette.Alert[`${color2}FilledColor`], backgroundColor: theme.vars.palette.Alert[`${color2}FilledBg`] } : { backgroundColor: theme.palette.mode === "dark" ? theme.palette[color2].dark : theme.palette[color2].main, color: theme.palette.getContrastText(theme.palette[color2].main) } } }))] }; })); const AlertIcon = styled("div", { name: "MuiAlert", slot: "Icon", overridesResolver: (props, styles2) => styles2.icon })({ marginRight: 12, padding: "7px 0", display: "flex", fontSize: 22, opacity: 0.9 }); const AlertMessage = styled("div", { name: "MuiAlert", slot: "Message", overridesResolver: (props, styles2) => styles2.message })({ padding: "8px 0", minWidth: 0, overflow: "auto" }); const AlertAction = styled("div", { name: "MuiAlert", slot: "Action", overridesResolver: (props, styles2) => styles2.action })({ display: "flex", alignItems: "flex-start", padding: "4px 0 0 16px", marginLeft: "auto", marginRight: -8 }); const defaultIconMapping = { success: /* @__PURE__ */ jsxRuntimeExports.jsx(SuccessOutlinedIcon, { fontSize: "inherit" }), warning: /* @__PURE__ */ jsxRuntimeExports.jsx(ReportProblemOutlinedIcon, { fontSize: "inherit" }), error: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorOutlineIcon, { fontSize: "inherit" }), info: /* @__PURE__ */ jsxRuntimeExports.jsx(InfoOutlinedIcon, { fontSize: "inherit" }) }; const Alert = /* @__PURE__ */ React__namespace.forwardRef(function Alert2(inProps, ref) { const props = useDefaultProps({ props: inProps, name: "MuiAlert" }); const { action, children, className, closeText = "Close", color: color2, components = {}, componentsProps = {}, icon, iconMapping = defaultIconMapping, onClose, role = "alert", severity = "success", slotProps = {}, slots = {}, variant = "standard", ...other } = props; const ownerState = { ...props, color: color2, severity, variant, colorSeverity: color2 || severity }; const classes = useUtilityClasses$A(ownerState); const externalForwardedProps = { slots: { closeButton: components.CloseButton, closeIcon: components.CloseIcon, ...slots }, slotProps: { ...componentsProps, ...slotProps } }; const [RootSlot, rootSlotProps] = useSlot("root", { ref, shouldForwardComponentProp: true, className: clsx(classes.root, className), elementType: AlertRoot, externalForwardedProps: { ...externalForwardedProps, ...other }, ownerState, additionalProps: { role, elevation: 0 } }); const [IconSlot, iconSlotProps] = useSlot("icon", { className: classes.icon, elementType: AlertIcon, externalForwardedProps, ownerState }); const [MessageSlot, messageSlotProps] = useSlot("message", { className: classes.message, elementType: AlertMessage, externalForwardedProps, ownerState }); const [ActionSlot, actionSlotProps] = useSlot("action", { className: classes.action, elementType: AlertAction, externalForwardedProps, ownerState }); const [CloseButtonSlot, closeButtonProps] = useSlot("closeButton", { elementType: IconButton, externalForwardedProps, ownerState }); const [CloseIconSlot, closeIconProps] = useSlot("closeIcon", { elementType: ClearIcon, externalForwardedProps, ownerState }); return /* @__PURE__ */ jsxRuntimeExports.jsxs(RootSlot, { ...rootSlotProps, children: [icon !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(IconSlot, { ...iconSlotProps, children: icon || iconMapping[severity] || defaultIconMapping[severity] }) : null, /* @__PURE__ */ jsxRuntimeExports.jsx(MessageSlot, { ...messageSlotProps, children }), action != null ? /* @__PURE__ */ jsxRuntimeExports.jsx(ActionSlot, { ...actionSlotProps, children: action }) : null, action == null && onClose ? /* @__PURE__ */ jsxRuntimeExports.jsx(ActionSlot, { ...actionSlotProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CloseButtonSlot, { size: "small", "aria-label": closeText, title: closeText, color: "inherit", onClick: onClose, ...closeButtonProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CloseIconSlot, { fontSize: "small", ...closeIconProps }) }) }) : null] }); }); function getTypographyUtilityClass(slot) { return generateUtilityClass("MuiTypography", slot); } generateUtilityClasses("MuiTypography", ["root", "h1", "h2", "h3", "h4", "h5", "h6", "subtitle1", "subtitle2", "body1", "body2", "inherit", "button", "caption", "overline", "alignLeft", "alignRight", "alignCenter", "alignJustify", "noWrap", "gutterBottom", "paragraph"]); const v6Colors = { primary: true, secondary: true, error: true, info: true, success: true, warning: true, textPrimary: true, textSecondary: true, textDisabled: true }; const extendSxProp = internal_createExtendSxProp(); const useUtilityClasses$z = (ownerState) => { const { align, gutterBottom, noWrap, paragraph, variant, classes } = ownerState; const slots = { root: ["root", variant, ownerState.align !== "inherit" && `align${capitalize(align)}`, gutterBottom && "gutterBottom", noWrap && "noWrap", paragraph && "paragraph"] }; return composeClasses(slots, getTypographyUtilityClass, classes); }; const TypographyRoot = styled("span", { name: "MuiTypography", slot: "Root", overridesResolver: (props, styles2) => { const { ownerState } = props; return [styles2.root, ownerState.variant && styles2[ownerState.variant], ownerState.align !== "inherit" && styles2[`align${capitalize(ownerState.align)}`], ownerState.noWrap && styles2.noWrap, ownerState.gutterBottom && styles2.gutterBottom, ownerState.paragraph && styles2.paragraph]; } })(memoTheme(({ theme }) => { var _a; return { margin: 0, variants: [{ props: { variant: "inherit" }, style: { // Some elements, like