omnieye-theme-studio 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,23 +1,23 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),_=require("react"),p=require("@mui/material"),Io=require("@emotion/styled");require("@emotion/react");const Ao=require("react-dom");function Oo(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const _e=Oo(_),Ar=e=>e,Do=()=>{let e=Ar;return{configure(r){e=r},generate(r){return e(r)},reset(){e=Ar}}},Mo=Do();function Ze(e,...r){const t=new URL(`https://mui.com/production-error/?code=${e}`);return r.forEach(o=>t.searchParams.append("args[]",o)),`Minified MUI error #${e}; visit ${t} for the full message.`}function et(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Ze(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Fo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Tt={exports:{}},kt={exports:{}},te={};/** @license React v16.13.1
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),L=require("react"),p=require("@mui/material"),Ao=require("@emotion/styled");require("@emotion/react");const Io=require("react-dom");function Oo(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const _e=Oo(L),Ir=e=>e,Do=()=>{let e=Ir;return{configure(r){e=r},generate(r){return e(r)},reset(){e=Ir}}},Fo=Do();function Ze(e,...r){const t=new URL(`https://mui.com/production-error/?code=${e}`);return r.forEach(o=>t.searchParams.append("args[]",o)),`Minified MUI error #${e}; visit ${t} for the full message.`}function et(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Ze(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Mo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Tt={exports:{}},kt={exports:{}},re={};/** @license React v16.13.1
2
2
  * react-is.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
5
5
  *
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
- */var Or;function Wo(){if(Or)return te;Or=1;var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,g=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,x=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,u=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function H(C){if(typeof C=="object"&&C!==null){var B=C.$$typeof;switch(B){case r:switch(C=C.type,C){case c:case g:case o:case s:case i:case x:return C;default:switch(C=C&&C.$$typeof,C){case l:case f:case b:case h:case a:return C;default:return B}}case t:return B}}}function S(C){return H(C)===g}return te.AsyncMode=c,te.ConcurrentMode=g,te.ContextConsumer=l,te.ContextProvider=a,te.Element=r,te.ForwardRef=f,te.Fragment=o,te.Lazy=b,te.Memo=h,te.Portal=t,te.Profiler=s,te.StrictMode=i,te.Suspense=x,te.isAsyncMode=function(C){return S(C)||H(C)===c},te.isConcurrentMode=S,te.isContextConsumer=function(C){return H(C)===l},te.isContextProvider=function(C){return H(C)===a},te.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===r},te.isForwardRef=function(C){return H(C)===f},te.isFragment=function(C){return H(C)===o},te.isLazy=function(C){return H(C)===b},te.isMemo=function(C){return H(C)===h},te.isPortal=function(C){return H(C)===t},te.isProfiler=function(C){return H(C)===s},te.isStrictMode=function(C){return H(C)===i},te.isSuspense=function(C){return H(C)===x},te.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===o||C===g||C===s||C===i||C===x||C===m||typeof C=="object"&&C!==null&&(C.$$typeof===b||C.$$typeof===h||C.$$typeof===a||C.$$typeof===l||C.$$typeof===f||C.$$typeof===y||C.$$typeof===v||C.$$typeof===E||C.$$typeof===u)},te.typeOf=H,te}var re={};/** @license React v16.13.1
8
+ */var Or;function Wo(){if(Or)return re;Or=1;var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,g=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,x=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,u=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function B(j){if(typeof j=="object"&&j!==null){var T=j.$$typeof;switch(T){case r:switch(j=j.type,j){case c:case g:case o:case s:case i:case x:return j;default:switch(j=j&&j.$$typeof,j){case l:case f:case b:case h:case a:return j;default:return T}}case t:return T}}}function S(j){return B(j)===g}return re.AsyncMode=c,re.ConcurrentMode=g,re.ContextConsumer=l,re.ContextProvider=a,re.Element=r,re.ForwardRef=f,re.Fragment=o,re.Lazy=b,re.Memo=h,re.Portal=t,re.Profiler=s,re.StrictMode=i,re.Suspense=x,re.isAsyncMode=function(j){return S(j)||B(j)===c},re.isConcurrentMode=S,re.isContextConsumer=function(j){return B(j)===l},re.isContextProvider=function(j){return B(j)===a},re.isElement=function(j){return typeof j=="object"&&j!==null&&j.$$typeof===r},re.isForwardRef=function(j){return B(j)===f},re.isFragment=function(j){return B(j)===o},re.isLazy=function(j){return B(j)===b},re.isMemo=function(j){return B(j)===h},re.isPortal=function(j){return B(j)===t},re.isProfiler=function(j){return B(j)===s},re.isStrictMode=function(j){return B(j)===i},re.isSuspense=function(j){return B(j)===x},re.isValidElementType=function(j){return typeof j=="string"||typeof j=="function"||j===o||j===g||j===s||j===i||j===x||j===m||typeof j=="object"&&j!==null&&(j.$$typeof===b||j.$$typeof===h||j.$$typeof===a||j.$$typeof===l||j.$$typeof===f||j.$$typeof===y||j.$$typeof===v||j.$$typeof===E||j.$$typeof===u)},re.typeOf=B,re}var ne={};/** @license React v16.13.1
9
9
  * react-is.development.js
10
10
  *
11
11
  * Copyright (c) Facebook, Inc. and its affiliates.
12
12
  *
13
13
  * This source code is licensed under the MIT license found in the
14
14
  * LICENSE file in the root directory of this source tree.
15
- */var Dr;function zo(){return Dr||(Dr=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,g=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,x=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,u=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function H(F){return typeof F=="string"||typeof F=="function"||F===o||F===g||F===s||F===i||F===x||F===m||typeof F=="object"&&F!==null&&(F.$$typeof===b||F.$$typeof===h||F.$$typeof===a||F.$$typeof===l||F.$$typeof===f||F.$$typeof===y||F.$$typeof===v||F.$$typeof===E||F.$$typeof===u)}function S(F){if(typeof F=="object"&&F!==null){var fe=F.$$typeof;switch(fe){case r:var Oe=F.type;switch(Oe){case c:case g:case o:case s:case i:case x:return Oe;default:var De=Oe&&Oe.$$typeof;switch(De){case l:case f:case b:case h:case a:return De;default:return fe}}case t:return fe}}}var C=c,B=g,D=l,$=a,X=r,Q=f,Y=o,d=b,I=h,P=t,W=s,z=i,q=x,U=!1;function G(F){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),R(F)||S(F)===c}function R(F){return S(F)===g}function O(F){return S(F)===l}function J(F){return S(F)===a}function V(F){return typeof F=="object"&&F!==null&&F.$$typeof===r}function N(F){return S(F)===f}function M(F){return S(F)===o}function j(F){return S(F)===b}function A(F){return S(F)===h}function k(F){return S(F)===t}function T(F){return S(F)===s}function K(F){return S(F)===i}function se(F){return S(F)===x}re.AsyncMode=C,re.ConcurrentMode=B,re.ContextConsumer=D,re.ContextProvider=$,re.Element=X,re.ForwardRef=Q,re.Fragment=Y,re.Lazy=d,re.Memo=I,re.Portal=P,re.Profiler=W,re.StrictMode=z,re.Suspense=q,re.isAsyncMode=G,re.isConcurrentMode=R,re.isContextConsumer=O,re.isContextProvider=J,re.isElement=V,re.isForwardRef=N,re.isFragment=M,re.isLazy=j,re.isMemo=A,re.isPortal=k,re.isProfiler=T,re.isStrictMode=K,re.isSuspense=se,re.isValidElementType=H,re.typeOf=S})()),re}var Mr;function Sn(){return Mr||(Mr=1,process.env.NODE_ENV==="production"?kt.exports=Wo():kt.exports=zo()),kt.exports}/*
15
+ */var Dr;function zo(){return Dr||(Dr=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,g=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,x=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,u=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function B(W){return typeof W=="string"||typeof W=="function"||W===o||W===g||W===s||W===i||W===x||W===m||typeof W=="object"&&W!==null&&(W.$$typeof===b||W.$$typeof===h||W.$$typeof===a||W.$$typeof===l||W.$$typeof===f||W.$$typeof===y||W.$$typeof===v||W.$$typeof===E||W.$$typeof===u)}function S(W){if(typeof W=="object"&&W!==null){var fe=W.$$typeof;switch(fe){case r:var Oe=W.type;switch(Oe){case c:case g:case o:case s:case i:case x:return Oe;default:var De=Oe&&Oe.$$typeof;switch(De){case l:case f:case b:case h:case a:return De;default:return fe}}case t:return fe}}}var j=c,T=g,M=l,P=a,X=r,Q=f,Y=o,d=b,$=h,H=t,z=s,_=i,K=x,U=!1;function J(W){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),R(W)||S(W)===c}function R(W){return S(W)===g}function I(W){return S(W)===l}function q(W){return S(W)===a}function V(W){return typeof W=="object"&&W!==null&&W.$$typeof===r}function G(W){return S(W)===f}function O(W){return S(W)===o}function C(W){return S(W)===b}function A(W){return S(W)===h}function D(W){return S(W)===t}function k(W){return S(W)===s}function F(W){return S(W)===i}function ee(W){return S(W)===x}ne.AsyncMode=j,ne.ConcurrentMode=T,ne.ContextConsumer=M,ne.ContextProvider=P,ne.Element=X,ne.ForwardRef=Q,ne.Fragment=Y,ne.Lazy=d,ne.Memo=$,ne.Portal=H,ne.Profiler=z,ne.StrictMode=_,ne.Suspense=K,ne.isAsyncMode=J,ne.isConcurrentMode=R,ne.isContextConsumer=I,ne.isContextProvider=q,ne.isElement=V,ne.isForwardRef=G,ne.isFragment=O,ne.isLazy=C,ne.isMemo=A,ne.isPortal=D,ne.isProfiler=k,ne.isStrictMode=F,ne.isSuspense=ee,ne.isValidElementType=B,ne.typeOf=S})()),ne}var Fr;function Sn(){return Fr||(Fr=1,process.env.NODE_ENV==="production"?kt.exports=Wo():kt.exports=zo()),kt.exports}/*
16
16
  object-assign
17
17
  (c) Sindre Sorhus
18
18
  @license MIT
19
- */var er,Fr;function _o(){if(Fr)return er;Fr=1;var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function o(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function i(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var a={},l=0;l<10;l++)a["_"+String.fromCharCode(l)]=l;var c=Object.getOwnPropertyNames(a).map(function(f){return a[f]});if(c.join("")!=="0123456789")return!1;var g={};return"abcdefghijklmnopqrst".split("").forEach(function(f){g[f]=f}),Object.keys(Object.assign({},g)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return er=i()?Object.assign:function(s,a){for(var l,c=o(s),g,f=1;f<arguments.length;f++){l=Object(arguments[f]);for(var x in l)r.call(l,x)&&(c[x]=l[x]);if(e){g=e(l);for(var m=0;m<g.length;m++)t.call(l,g[m])&&(c[g[m]]=l[g[m]])}}return c},er}var tr,Wr;function vr(){if(Wr)return tr;Wr=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return tr=e,tr}var rr,zr;function Cn(){return zr||(zr=1,rr=Function.call.bind(Object.prototype.hasOwnProperty)),rr}var nr,_r;function Lo(){if(_r)return nr;_r=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var r=vr(),t={},o=Cn();e=function(s){var a="Warning: "+s;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(s,a,l,c,g){if(process.env.NODE_ENV!=="production"){for(var f in s)if(o(s,f)){var x;try{if(typeof s[f]!="function"){var m=Error((c||"React class")+": "+l+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}x=s[f](a,f,c,l,null,r)}catch(b){x=b}if(x&&!(x instanceof Error)&&e((c||"React class")+": type specification of "+l+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof x+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),x instanceof Error&&!(x.message in t)){t[x.message]=!0;var h=g?g():"";e("Failed "+l+" type: "+x.message+(h??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},nr=i,nr}var or,Lr;function No(){if(Lr)return or;Lr=1;var e=Sn(),r=_o(),t=vr(),o=Cn(),i=Lo(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(l){var c="Warning: "+l;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return or=function(l,c){var g=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function x(R){var O=R&&(g&&R[g]||R[f]);if(typeof O=="function")return O}var m="<<anonymous>>",h={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:E(),arrayOf:H,element:S(),elementType:C(),instanceOf:B,node:Q(),objectOf:$,oneOf:D,oneOfType:X,shape:d,exact:I};function b(R,O){return R===O?R!==0||1/R===1/O:R!==R&&O!==O}function u(R,O){this.message=R,this.data=O&&typeof O=="object"?O:{},this.stack=""}u.prototype=Error.prototype;function y(R){if(process.env.NODE_ENV!=="production")var O={},J=0;function V(M,j,A,k,T,K,se){if(k=k||m,K=K||A,se!==t){if(c){var F=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw F.name="Invariant Violation",F}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var fe=k+":"+A;!O[fe]&&J<3&&(s("You are manually calling a React.PropTypes validation function for the `"+K+"` prop on `"+k+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),O[fe]=!0,J++)}}return j[A]==null?M?j[A]===null?new u("The "+T+" `"+K+"` is marked as required "+("in `"+k+"`, but its value is `null`.")):new u("The "+T+" `"+K+"` is marked as required in "+("`"+k+"`, but its value is `undefined`.")):null:R(j,A,k,T,K)}var N=V.bind(null,!1);return N.isRequired=V.bind(null,!0),N}function v(R){function O(J,V,N,M,j,A){var k=J[V],T=z(k);if(T!==R){var K=q(k);return new u("Invalid "+M+" `"+j+"` of type "+("`"+K+"` supplied to `"+N+"`, expected ")+("`"+R+"`."),{expectedType:R})}return null}return y(O)}function E(){return y(a)}function H(R){function O(J,V,N,M,j){if(typeof R!="function")return new u("Property `"+j+"` of component `"+N+"` has invalid PropType notation inside arrayOf.");var A=J[V];if(!Array.isArray(A)){var k=z(A);return new u("Invalid "+M+" `"+j+"` of type "+("`"+k+"` supplied to `"+N+"`, expected an array."))}for(var T=0;T<A.length;T++){var K=R(A,T,N,M,j+"["+T+"]",t);if(K instanceof Error)return K}return null}return y(O)}function S(){function R(O,J,V,N,M){var j=O[J];if(!l(j)){var A=z(j);return new u("Invalid "+N+" `"+M+"` of type "+("`"+A+"` supplied to `"+V+"`, expected a single ReactElement."))}return null}return y(R)}function C(){function R(O,J,V,N,M){var j=O[J];if(!e.isValidElementType(j)){var A=z(j);return new u("Invalid "+N+" `"+M+"` of type "+("`"+A+"` supplied to `"+V+"`, expected a single ReactElement type."))}return null}return y(R)}function B(R){function O(J,V,N,M,j){if(!(J[V]instanceof R)){var A=R.name||m,k=G(J[V]);return new u("Invalid "+M+" `"+j+"` of type "+("`"+k+"` supplied to `"+N+"`, expected ")+("instance of `"+A+"`."))}return null}return y(O)}function D(R){if(!Array.isArray(R))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),a;function O(J,V,N,M,j){for(var A=J[V],k=0;k<R.length;k++)if(b(A,R[k]))return null;var T=JSON.stringify(R,function(se,F){var fe=q(F);return fe==="symbol"?String(F):F});return new u("Invalid "+M+" `"+j+"` of value `"+String(A)+"` "+("supplied to `"+N+"`, expected one of "+T+"."))}return y(O)}function $(R){function O(J,V,N,M,j){if(typeof R!="function")return new u("Property `"+j+"` of component `"+N+"` has invalid PropType notation inside objectOf.");var A=J[V],k=z(A);if(k!=="object")return new u("Invalid "+M+" `"+j+"` of type "+("`"+k+"` supplied to `"+N+"`, expected an object."));for(var T in A)if(o(A,T)){var K=R(A,T,N,M,j+"."+T,t);if(K instanceof Error)return K}return null}return y(O)}function X(R){if(!Array.isArray(R))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var O=0;O<R.length;O++){var J=R[O];if(typeof J!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(J)+" at index "+O+"."),a}function V(N,M,j,A,k){for(var T=[],K=0;K<R.length;K++){var se=R[K],F=se(N,M,j,A,k,t);if(F==null)return null;F.data&&o(F.data,"expectedType")&&T.push(F.data.expectedType)}var fe=T.length>0?", expected one of type ["+T.join(", ")+"]":"";return new u("Invalid "+A+" `"+k+"` supplied to "+("`"+j+"`"+fe+"."))}return y(V)}function Q(){function R(O,J,V,N,M){return P(O[J])?null:new u("Invalid "+N+" `"+M+"` supplied to "+("`"+V+"`, expected a ReactNode."))}return y(R)}function Y(R,O,J,V,N){return new u((R||"React class")+": "+O+" type `"+J+"."+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+N+"`.")}function d(R){function O(J,V,N,M,j){var A=J[V],k=z(A);if(k!=="object")return new u("Invalid "+M+" `"+j+"` of type `"+k+"` "+("supplied to `"+N+"`, expected `object`."));for(var T in R){var K=R[T];if(typeof K!="function")return Y(N,M,j,T,q(K));var se=K(A,T,N,M,j+"."+T,t);if(se)return se}return null}return y(O)}function I(R){function O(J,V,N,M,j){var A=J[V],k=z(A);if(k!=="object")return new u("Invalid "+M+" `"+j+"` of type `"+k+"` "+("supplied to `"+N+"`, expected `object`."));var T=r({},J[V],R);for(var K in T){var se=R[K];if(o(R,K)&&typeof se!="function")return Y(N,M,j,K,q(se));if(!se)return new u("Invalid "+M+" `"+j+"` key `"+K+"` supplied to `"+N+"`.\nBad object: "+JSON.stringify(J[V],null," ")+`
20
- Valid keys: `+JSON.stringify(Object.keys(R),null," "));var F=se(A,K,N,M,j+"."+K,t);if(F)return F}return null}return y(O)}function P(R){switch(typeof R){case"number":case"string":case"undefined":return!0;case"boolean":return!R;case"object":if(Array.isArray(R))return R.every(P);if(R===null||l(R))return!0;var O=x(R);if(O){var J=O.call(R),V;if(O!==R.entries){for(;!(V=J.next()).done;)if(!P(V.value))return!1}else for(;!(V=J.next()).done;){var N=V.value;if(N&&!P(N[1]))return!1}}else return!1;return!0;default:return!1}}function W(R,O){return R==="symbol"?!0:O?O["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&O instanceof Symbol:!1}function z(R){var O=typeof R;return Array.isArray(R)?"array":R instanceof RegExp?"object":W(O,R)?"symbol":O}function q(R){if(typeof R>"u"||R===null)return""+R;var O=z(R);if(O==="object"){if(R instanceof Date)return"date";if(R instanceof RegExp)return"regexp"}return O}function U(R){var O=q(R);switch(O){case"array":case"object":return"an "+O;case"boolean":case"date":case"regexp":return"a "+O;default:return O}}function G(R){return!R.constructor||!R.constructor.name?m:R.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},or}var ir,Nr;function Vo(){if(Nr)return ir;Nr=1;var e=vr();function r(){}function t(){}return t.resetWarningCache=r,ir=function(){function o(a,l,c,g,f,x){if(x!==e){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}o.isRequired=o;function i(){return o}var s={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:i,element:o,elementType:o,instanceOf:i,node:o,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:t,resetWarningCache:r};return s.PropTypes=s,s},ir}var Vr;function Uo(){if(Vr)return Tt.exports;if(Vr=1,process.env.NODE_ENV!=="production"){var e=Sn(),r=!0;Tt.exports=No()(e.isElement,r)}else Tt.exports=Vo()();return Tt.exports}var Go=Uo();const ee=Fo(Go);function jn(e){var r,t,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(r=0;r<i;r++)e[r]&&(t=jn(e[r]))&&(o&&(o+=" "),o+=t)}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function wn(){for(var e,r,t=0,o="",i=arguments.length;t<i;t++)(e=arguments[t])&&(r=jn(e))&&(o&&(o+=" "),o+=r);return o}function Yo(e,r,t=void 0){const o={};for(const i in e){const s=e[i];let a="",l=!0;for(let c=0;c<s.length;c+=1){const g=s[c];g&&(a+=(l===!0?"":" ")+r(g),l=!1,t&&t[g]&&(a+=" "+t[g]))}o[i]=a}return o}var Bt={exports:{}},ie={};/**
19
+ */var er,Mr;function _o(){if(Mr)return er;Mr=1;var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function o(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function i(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var a={},l=0;l<10;l++)a["_"+String.fromCharCode(l)]=l;var c=Object.getOwnPropertyNames(a).map(function(f){return a[f]});if(c.join("")!=="0123456789")return!1;var g={};return"abcdefghijklmnopqrst".split("").forEach(function(f){g[f]=f}),Object.keys(Object.assign({},g)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return er=i()?Object.assign:function(s,a){for(var l,c=o(s),g,f=1;f<arguments.length;f++){l=Object(arguments[f]);for(var x in l)r.call(l,x)&&(c[x]=l[x]);if(e){g=e(l);for(var m=0;m<g.length;m++)t.call(l,g[m])&&(c[g[m]]=l[g[m]])}}return c},er}var tr,Wr;function vr(){if(Wr)return tr;Wr=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return tr=e,tr}var rr,zr;function Cn(){return zr||(zr=1,rr=Function.call.bind(Object.prototype.hasOwnProperty)),rr}var nr,_r;function Lo(){if(_r)return nr;_r=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var r=vr(),t={},o=Cn();e=function(s){var a="Warning: "+s;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(s,a,l,c,g){if(process.env.NODE_ENV!=="production"){for(var f in s)if(o(s,f)){var x;try{if(typeof s[f]!="function"){var m=Error((c||"React class")+": "+l+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}x=s[f](a,f,c,l,null,r)}catch(b){x=b}if(x&&!(x instanceof Error)&&e((c||"React class")+": type specification of "+l+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof x+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),x instanceof Error&&!(x.message in t)){t[x.message]=!0;var h=g?g():"";e("Failed "+l+" type: "+x.message+(h??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},nr=i,nr}var or,Lr;function No(){if(Lr)return or;Lr=1;var e=Sn(),r=_o(),t=vr(),o=Cn(),i=Lo(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(l){var c="Warning: "+l;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return or=function(l,c){var g=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function x(R){var I=R&&(g&&R[g]||R[f]);if(typeof I=="function")return I}var m="<<anonymous>>",h={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:E(),arrayOf:B,element:S(),elementType:j(),instanceOf:T,node:Q(),objectOf:P,oneOf:M,oneOfType:X,shape:d,exact:$};function b(R,I){return R===I?R!==0||1/R===1/I:R!==R&&I!==I}function u(R,I){this.message=R,this.data=I&&typeof I=="object"?I:{},this.stack=""}u.prototype=Error.prototype;function y(R){if(process.env.NODE_ENV!=="production")var I={},q=0;function V(O,C,A,D,k,F,ee){if(D=D||m,F=F||A,ee!==t){if(c){var W=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw W.name="Invariant Violation",W}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var fe=D+":"+A;!I[fe]&&q<3&&(s("You are manually calling a React.PropTypes validation function for the `"+F+"` prop on `"+D+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),I[fe]=!0,q++)}}return C[A]==null?O?C[A]===null?new u("The "+k+" `"+F+"` is marked as required "+("in `"+D+"`, but its value is `null`.")):new u("The "+k+" `"+F+"` is marked as required in "+("`"+D+"`, but its value is `undefined`.")):null:R(C,A,D,k,F)}var G=V.bind(null,!1);return G.isRequired=V.bind(null,!0),G}function v(R){function I(q,V,G,O,C,A){var D=q[V],k=_(D);if(k!==R){var F=K(D);return new u("Invalid "+O+" `"+C+"` of type "+("`"+F+"` supplied to `"+G+"`, expected ")+("`"+R+"`."),{expectedType:R})}return null}return y(I)}function E(){return y(a)}function B(R){function I(q,V,G,O,C){if(typeof R!="function")return new u("Property `"+C+"` of component `"+G+"` has invalid PropType notation inside arrayOf.");var A=q[V];if(!Array.isArray(A)){var D=_(A);return new u("Invalid "+O+" `"+C+"` of type "+("`"+D+"` supplied to `"+G+"`, expected an array."))}for(var k=0;k<A.length;k++){var F=R(A,k,G,O,C+"["+k+"]",t);if(F instanceof Error)return F}return null}return y(I)}function S(){function R(I,q,V,G,O){var C=I[q];if(!l(C)){var A=_(C);return new u("Invalid "+G+" `"+O+"` of type "+("`"+A+"` supplied to `"+V+"`, expected a single ReactElement."))}return null}return y(R)}function j(){function R(I,q,V,G,O){var C=I[q];if(!e.isValidElementType(C)){var A=_(C);return new u("Invalid "+G+" `"+O+"` of type "+("`"+A+"` supplied to `"+V+"`, expected a single ReactElement type."))}return null}return y(R)}function T(R){function I(q,V,G,O,C){if(!(q[V]instanceof R)){var A=R.name||m,D=J(q[V]);return new u("Invalid "+O+" `"+C+"` of type "+("`"+D+"` supplied to `"+G+"`, expected ")+("instance of `"+A+"`."))}return null}return y(I)}function M(R){if(!Array.isArray(R))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),a;function I(q,V,G,O,C){for(var A=q[V],D=0;D<R.length;D++)if(b(A,R[D]))return null;var k=JSON.stringify(R,function(ee,W){var fe=K(W);return fe==="symbol"?String(W):W});return new u("Invalid "+O+" `"+C+"` of value `"+String(A)+"` "+("supplied to `"+G+"`, expected one of "+k+"."))}return y(I)}function P(R){function I(q,V,G,O,C){if(typeof R!="function")return new u("Property `"+C+"` of component `"+G+"` has invalid PropType notation inside objectOf.");var A=q[V],D=_(A);if(D!=="object")return new u("Invalid "+O+" `"+C+"` of type "+("`"+D+"` supplied to `"+G+"`, expected an object."));for(var k in A)if(o(A,k)){var F=R(A,k,G,O,C+"."+k,t);if(F instanceof Error)return F}return null}return y(I)}function X(R){if(!Array.isArray(R))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var I=0;I<R.length;I++){var q=R[I];if(typeof q!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(q)+" at index "+I+"."),a}function V(G,O,C,A,D){for(var k=[],F=0;F<R.length;F++){var ee=R[F],W=ee(G,O,C,A,D,t);if(W==null)return null;W.data&&o(W.data,"expectedType")&&k.push(W.data.expectedType)}var fe=k.length>0?", expected one of type ["+k.join(", ")+"]":"";return new u("Invalid "+A+" `"+D+"` supplied to "+("`"+C+"`"+fe+"."))}return y(V)}function Q(){function R(I,q,V,G,O){return H(I[q])?null:new u("Invalid "+G+" `"+O+"` supplied to "+("`"+V+"`, expected a ReactNode."))}return y(R)}function Y(R,I,q,V,G){return new u((R||"React class")+": "+I+" type `"+q+"."+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+G+"`.")}function d(R){function I(q,V,G,O,C){var A=q[V],D=_(A);if(D!=="object")return new u("Invalid "+O+" `"+C+"` of type `"+D+"` "+("supplied to `"+G+"`, expected `object`."));for(var k in R){var F=R[k];if(typeof F!="function")return Y(G,O,C,k,K(F));var ee=F(A,k,G,O,C+"."+k,t);if(ee)return ee}return null}return y(I)}function $(R){function I(q,V,G,O,C){var A=q[V],D=_(A);if(D!=="object")return new u("Invalid "+O+" `"+C+"` of type `"+D+"` "+("supplied to `"+G+"`, expected `object`."));var k=r({},q[V],R);for(var F in k){var ee=R[F];if(o(R,F)&&typeof ee!="function")return Y(G,O,C,F,K(ee));if(!ee)return new u("Invalid "+O+" `"+C+"` key `"+F+"` supplied to `"+G+"`.\nBad object: "+JSON.stringify(q[V],null," ")+`
20
+ Valid keys: `+JSON.stringify(Object.keys(R),null," "));var W=ee(A,F,G,O,C+"."+F,t);if(W)return W}return null}return y(I)}function H(R){switch(typeof R){case"number":case"string":case"undefined":return!0;case"boolean":return!R;case"object":if(Array.isArray(R))return R.every(H);if(R===null||l(R))return!0;var I=x(R);if(I){var q=I.call(R),V;if(I!==R.entries){for(;!(V=q.next()).done;)if(!H(V.value))return!1}else for(;!(V=q.next()).done;){var G=V.value;if(G&&!H(G[1]))return!1}}else return!1;return!0;default:return!1}}function z(R,I){return R==="symbol"?!0:I?I["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&I instanceof Symbol:!1}function _(R){var I=typeof R;return Array.isArray(R)?"array":R instanceof RegExp?"object":z(I,R)?"symbol":I}function K(R){if(typeof R>"u"||R===null)return""+R;var I=_(R);if(I==="object"){if(R instanceof Date)return"date";if(R instanceof RegExp)return"regexp"}return I}function U(R){var I=K(R);switch(I){case"array":case"object":return"an "+I;case"boolean":case"date":case"regexp":return"a "+I;default:return I}}function J(R){return!R.constructor||!R.constructor.name?m:R.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},or}var ir,Nr;function Vo(){if(Nr)return ir;Nr=1;var e=vr();function r(){}function t(){}return t.resetWarningCache=r,ir=function(){function o(a,l,c,g,f,x){if(x!==e){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}o.isRequired=o;function i(){return o}var s={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:i,element:o,elementType:o,instanceOf:i,node:o,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:t,resetWarningCache:r};return s.PropTypes=s,s},ir}var Vr;function Uo(){if(Vr)return Tt.exports;if(Vr=1,process.env.NODE_ENV!=="production"){var e=Sn(),r=!0;Tt.exports=No()(e.isElement,r)}else Tt.exports=Vo()();return Tt.exports}var Go=Uo();const te=Mo(Go);function jn(e){var r,t,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(r=0;r<i;r++)e[r]&&(t=jn(e[r]))&&(o&&(o+=" "),o+=t)}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function wn(){for(var e,r,t=0,o="",i=arguments.length;t<i;t++)(e=arguments[t])&&(r=jn(e))&&(o&&(o+=" "),o+=r);return o}function Yo(e,r,t=void 0){const o={};for(const i in e){const s=e[i];let a="",l=!0;for(let c=0;c<s.length;c+=1){const g=s[c];g&&(a+=(l===!0?"":" ")+r(g),l=!1,t&&t[g]&&(a+=" "+t[g]))}o[i]=a}return o}var Bt={exports:{}},ae={};/**
21
21
  * @license React
22
22
  * react-is.production.js
23
23
  *
@@ -25,7 +25,7 @@ Valid keys: `+JSON.stringify(Object.keys(R),null," "));var F=se(A,K,N,M,j+"."+K
25
25
  *
26
26
  * This source code is licensed under the MIT license found in the
27
27
  * LICENSE file in the root directory of this source tree.
28
- */var Ur;function Jo(){if(Ur)return ie;Ur=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");function b(u){if(typeof u=="object"&&u!==null){var y=u.$$typeof;switch(y){case e:switch(u=u.type,u){case t:case i:case o:case c:case g:case m:return u;default:switch(u=u&&u.$$typeof,u){case a:case l:case x:case f:return u;case s:return u;default:return y}}case r:return y}}}return ie.ContextConsumer=s,ie.ContextProvider=a,ie.Element=e,ie.ForwardRef=l,ie.Fragment=t,ie.Lazy=x,ie.Memo=f,ie.Portal=r,ie.Profiler=i,ie.StrictMode=o,ie.Suspense=c,ie.SuspenseList=g,ie.isContextConsumer=function(u){return b(u)===s},ie.isContextProvider=function(u){return b(u)===a},ie.isElement=function(u){return typeof u=="object"&&u!==null&&u.$$typeof===e},ie.isForwardRef=function(u){return b(u)===l},ie.isFragment=function(u){return b(u)===t},ie.isLazy=function(u){return b(u)===x},ie.isMemo=function(u){return b(u)===f},ie.isPortal=function(u){return b(u)===r},ie.isProfiler=function(u){return b(u)===i},ie.isStrictMode=function(u){return b(u)===o},ie.isSuspense=function(u){return b(u)===c},ie.isSuspenseList=function(u){return b(u)===g},ie.isValidElementType=function(u){return typeof u=="string"||typeof u=="function"||u===t||u===i||u===o||u===c||u===g||typeof u=="object"&&u!==null&&(u.$$typeof===x||u.$$typeof===f||u.$$typeof===a||u.$$typeof===s||u.$$typeof===l||u.$$typeof===h||u.getModuleId!==void 0)},ie.typeOf=b,ie}var ae={};/**
28
+ */var Ur;function Jo(){if(Ur)return ae;Ur=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");function b(u){if(typeof u=="object"&&u!==null){var y=u.$$typeof;switch(y){case e:switch(u=u.type,u){case t:case i:case o:case c:case g:case m:return u;default:switch(u=u&&u.$$typeof,u){case a:case l:case x:case f:return u;case s:return u;default:return y}}case r:return y}}}return ae.ContextConsumer=s,ae.ContextProvider=a,ae.Element=e,ae.ForwardRef=l,ae.Fragment=t,ae.Lazy=x,ae.Memo=f,ae.Portal=r,ae.Profiler=i,ae.StrictMode=o,ae.Suspense=c,ae.SuspenseList=g,ae.isContextConsumer=function(u){return b(u)===s},ae.isContextProvider=function(u){return b(u)===a},ae.isElement=function(u){return typeof u=="object"&&u!==null&&u.$$typeof===e},ae.isForwardRef=function(u){return b(u)===l},ae.isFragment=function(u){return b(u)===t},ae.isLazy=function(u){return b(u)===x},ae.isMemo=function(u){return b(u)===f},ae.isPortal=function(u){return b(u)===r},ae.isProfiler=function(u){return b(u)===i},ae.isStrictMode=function(u){return b(u)===o},ae.isSuspense=function(u){return b(u)===c},ae.isSuspenseList=function(u){return b(u)===g},ae.isValidElementType=function(u){return typeof u=="string"||typeof u=="function"||u===t||u===i||u===o||u===c||u===g||typeof u=="object"&&u!==null&&(u.$$typeof===x||u.$$typeof===f||u.$$typeof===a||u.$$typeof===s||u.$$typeof===l||u.$$typeof===h||u.getModuleId!==void 0)},ae.typeOf=b,ae}var se={};/**
29
29
  * @license React
30
30
  * react-is.development.js
31
31
  *
@@ -33,21 +33,21 @@ Valid keys: `+JSON.stringify(Object.keys(R),null," "));var F=se(A,K,N,M,j+"."+K
33
33
  *
34
34
  * This source code is licensed under the MIT license found in the
35
35
  * LICENSE file in the root directory of this source tree.
36
- */var Gr;function qo(){return Gr||(Gr=1,process.env.NODE_ENV!=="production"&&(function(){function e(u){if(typeof u=="object"&&u!==null){var y=u.$$typeof;switch(y){case r:switch(u=u.type,u){case o:case s:case i:case g:case f:case h:return u;default:switch(u=u&&u.$$typeof,u){case l:case c:case m:case x:return u;case a:return u;default:return y}}case t:return y}}}var r=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),b=Symbol.for("react.client.reference");ae.ContextConsumer=a,ae.ContextProvider=l,ae.Element=r,ae.ForwardRef=c,ae.Fragment=o,ae.Lazy=m,ae.Memo=x,ae.Portal=t,ae.Profiler=s,ae.StrictMode=i,ae.Suspense=g,ae.SuspenseList=f,ae.isContextConsumer=function(u){return e(u)===a},ae.isContextProvider=function(u){return e(u)===l},ae.isElement=function(u){return typeof u=="object"&&u!==null&&u.$$typeof===r},ae.isForwardRef=function(u){return e(u)===c},ae.isFragment=function(u){return e(u)===o},ae.isLazy=function(u){return e(u)===m},ae.isMemo=function(u){return e(u)===x},ae.isPortal=function(u){return e(u)===t},ae.isProfiler=function(u){return e(u)===s},ae.isStrictMode=function(u){return e(u)===i},ae.isSuspense=function(u){return e(u)===g},ae.isSuspenseList=function(u){return e(u)===f},ae.isValidElementType=function(u){return typeof u=="string"||typeof u=="function"||u===o||u===s||u===i||u===g||u===f||typeof u=="object"&&u!==null&&(u.$$typeof===m||u.$$typeof===x||u.$$typeof===l||u.$$typeof===a||u.$$typeof===c||u.$$typeof===b||u.getModuleId!==void 0)},ae.typeOf=e})()),ae}var Yr;function Ko(){return Yr||(Yr=1,process.env.NODE_ENV==="production"?Bt.exports=Jo():Bt.exports=qo()),Bt.exports}var It=Ko();function Ie(e){if(typeof e!="object"||e===null)return!1;const r=Object.getPrototypeOf(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Tn(e){if(_e.isValidElement(e)||It.isValidElementType(e)||!Ie(e))return e;const r={};return Object.keys(e).forEach(t=>{r[t]=Tn(e[t])}),r}function we(e,r,t={clone:!0}){const o=t.clone?{...e}:e;return Ie(e)&&Ie(r)&&Object.keys(r).forEach(i=>{_e.isValidElement(r[i])||It.isValidElementType(r[i])?o[i]=r[i]:Ie(r[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Ie(e[i])?o[i]=we(e[i],r[i],t):t.clone?o[i]=Ie(r[i])?Tn(r[i]):r[i]:o[i]=r[i]}),o}function xt(e,r){return r?we(e,r,{clone:!1}):e}const Ne=process.env.NODE_ENV!=="production"?ee.oneOfType([ee.number,ee.string,ee.object,ee.array]):{};function Jr(e,r){if(!e.containerQueries)return r;const t=Object.keys(r).filter(o=>o.startsWith("@container")).sort((o,i)=>{var a,l;const s=/min-width:\s*([0-9.]+)/;return+(((a=o.match(s))==null?void 0:a[1])||0)-+(((l=i.match(s))==null?void 0:l[1])||0)});return t.length?t.reduce((o,i)=>{const s=r[i];return delete o[i],o[i]=s,o},{...r}):r}function Xo(e,r){return r==="@"||r.startsWith("@")&&(e.some(t=>r.startsWith(`@${t}`))||!!r.match(/^@\d/))}function Qo(e,r){const t=r.match(/^@([^/]+)?\/?(.+)?$/);if(!t){if(process.env.NODE_ENV!=="production")throw new Error(`MUI: The provided shorthand ${`(${r})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
37
- For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`);return null}const[,o,i]=t,s=Number.isNaN(+o)?o||0:+o;return e.containerQueries(i).up(s)}function Zo(e){const r=(s,a)=>s.replace("@media",a?`@container ${a}`:"@container");function t(s,a){s.up=(...l)=>r(e.breakpoints.up(...l),a),s.down=(...l)=>r(e.breakpoints.down(...l),a),s.between=(...l)=>r(e.breakpoints.between(...l),a),s.only=(...l)=>r(e.breakpoints.only(...l),a),s.not=(...l)=>{const c=r(e.breakpoints.not(...l),a);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const o={},i=s=>(t(o,s),o);return t(i),{...e,containerQueries:i}}const Ft={xs:0,sm:600,md:900,lg:1200,xl:1536},qr={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Ft[e]}px)`},ei={containerQueries:e=>({up:r=>{let t=typeof r=="number"?r:Ft[r]||r;return typeof t=="number"&&(t=`${t}px`),e?`@container ${e} (min-width:${t})`:`@container (min-width:${t})`}})};function Ae(e,r,t){const o=e.theme||{};if(Array.isArray(r)){const s=o.breakpoints||qr;return r.reduce((a,l,c)=>(a[s.up(s.keys[c])]=t(r[c]),a),{})}if(typeof r=="object"){const s=o.breakpoints||qr;return Object.keys(r).reduce((a,l)=>{if(Xo(s.keys,l)){const c=Qo(o.containerQueries?o:ei,l);c&&(a[c]=t(r[l],l))}else if(Object.keys(s.values||Ft).includes(l)){const c=s.up(l);a[c]=t(r[l],l)}else{const c=l;a[c]=r[c]}return a},{})}return t(r)}function ti(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((o,i)=>{const s=e.up(i);return o[s]={},o},{}))||{}}function Kr(e,r){return e.reduce((t,o)=>{const i=t[o];return(!i||Object.keys(i).length===0)&&delete t[o],t},r)}function Wt(e,r,t=!0){if(!r||typeof r!="string")return null;if(e&&e.vars&&t){const o=`vars.${r}`.split(".").reduce((i,s)=>i&&i[s]?i[s]:null,e);if(o!=null)return o}return r.split(".").reduce((o,i)=>o&&o[i]!=null?o[i]:null,e)}function At(e,r,t,o=t){let i;return typeof e=="function"?i=e(t):Array.isArray(e)?i=e[t]||o:i=Wt(e,t)||o,r&&(i=r(i,o,e)),i}function he(e){const{prop:r,cssProperty:t=e.prop,themeKey:o,transform:i}=e,s=a=>{if(a[r]==null)return null;const l=a[r],c=a.theme,g=Wt(c,o)||{};return Ae(a,l,x=>{let m=At(g,i,x);return x===m&&typeof x=="string"&&(m=At(g,i,`${r}${x==="default"?"":et(x)}`,x)),t===!1?m:{[t]:m}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[r]:Ne}:{},s.filterProps=[r],s}function ri(e){const r={};return t=>(r[t]===void 0&&(r[t]=e(t)),r[t])}const ni={m:"margin",p:"padding"},oi={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Xr={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},ii=ri(e=>{if(e.length>2)if(Xr[e])e=Xr[e];else return[e];const[r,t]=e.split(""),o=ni[r],i=oi[t]||"";return Array.isArray(i)?i.map(s=>o+s):[o+i]}),zt=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],_t=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],ai=[...zt,..._t];function yt(e,r,t,o){const i=Wt(e,r,!0)??t;return typeof i=="number"||typeof i=="string"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${s}.`),typeof i=="string"?i.startsWith("var(")&&s===0?0:i.startsWith("var(")&&s===1?i:`calc(${s} * ${i})`:i*s):Array.isArray(i)?s=>{if(typeof s=="string")return s;const a=Math.abs(s);process.env.NODE_ENV!=="production"&&(Number.isInteger(a)?a>i.length-1&&console.error([`MUI: The value provided (${a}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${a} > ${i.length-1}, you need to add the missing values.`].join(`
36
+ */var Gr;function qo(){return Gr||(Gr=1,process.env.NODE_ENV!=="production"&&(function(){function e(u){if(typeof u=="object"&&u!==null){var y=u.$$typeof;switch(y){case r:switch(u=u.type,u){case o:case s:case i:case g:case f:case h:return u;default:switch(u=u&&u.$$typeof,u){case l:case c:case m:case x:return u;case a:return u;default:return y}}case t:return y}}}var r=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),b=Symbol.for("react.client.reference");se.ContextConsumer=a,se.ContextProvider=l,se.Element=r,se.ForwardRef=c,se.Fragment=o,se.Lazy=m,se.Memo=x,se.Portal=t,se.Profiler=s,se.StrictMode=i,se.Suspense=g,se.SuspenseList=f,se.isContextConsumer=function(u){return e(u)===a},se.isContextProvider=function(u){return e(u)===l},se.isElement=function(u){return typeof u=="object"&&u!==null&&u.$$typeof===r},se.isForwardRef=function(u){return e(u)===c},se.isFragment=function(u){return e(u)===o},se.isLazy=function(u){return e(u)===m},se.isMemo=function(u){return e(u)===x},se.isPortal=function(u){return e(u)===t},se.isProfiler=function(u){return e(u)===s},se.isStrictMode=function(u){return e(u)===i},se.isSuspense=function(u){return e(u)===g},se.isSuspenseList=function(u){return e(u)===f},se.isValidElementType=function(u){return typeof u=="string"||typeof u=="function"||u===o||u===s||u===i||u===g||u===f||typeof u=="object"&&u!==null&&(u.$$typeof===m||u.$$typeof===x||u.$$typeof===l||u.$$typeof===a||u.$$typeof===c||u.$$typeof===b||u.getModuleId!==void 0)},se.typeOf=e})()),se}var Yr;function Ko(){return Yr||(Yr=1,process.env.NODE_ENV==="production"?Bt.exports=Jo():Bt.exports=qo()),Bt.exports}var At=Ko();function Ae(e){if(typeof e!="object"||e===null)return!1;const r=Object.getPrototypeOf(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Tn(e){if(_e.isValidElement(e)||At.isValidElementType(e)||!Ae(e))return e;const r={};return Object.keys(e).forEach(t=>{r[t]=Tn(e[t])}),r}function we(e,r,t={clone:!0}){const o=t.clone?{...e}:e;return Ae(e)&&Ae(r)&&Object.keys(r).forEach(i=>{_e.isValidElement(r[i])||At.isValidElementType(r[i])?o[i]=r[i]:Ae(r[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Ae(e[i])?o[i]=we(e[i],r[i],t):t.clone?o[i]=Ae(r[i])?Tn(r[i]):r[i]:o[i]=r[i]}),o}function xt(e,r){return r?we(e,r,{clone:!1}):e}const Ne=process.env.NODE_ENV!=="production"?te.oneOfType([te.number,te.string,te.object,te.array]):{};function Jr(e,r){if(!e.containerQueries)return r;const t=Object.keys(r).filter(o=>o.startsWith("@container")).sort((o,i)=>{var a,l;const s=/min-width:\s*([0-9.]+)/;return+(((a=o.match(s))==null?void 0:a[1])||0)-+(((l=i.match(s))==null?void 0:l[1])||0)});return t.length?t.reduce((o,i)=>{const s=r[i];return delete o[i],o[i]=s,o},{...r}):r}function Xo(e,r){return r==="@"||r.startsWith("@")&&(e.some(t=>r.startsWith(`@${t}`))||!!r.match(/^@\d/))}function Qo(e,r){const t=r.match(/^@([^/]+)?\/?(.+)?$/);if(!t){if(process.env.NODE_ENV!=="production")throw new Error(`MUI: The provided shorthand ${`(${r})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
37
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`);return null}const[,o,i]=t,s=Number.isNaN(+o)?o||0:+o;return e.containerQueries(i).up(s)}function Zo(e){const r=(s,a)=>s.replace("@media",a?`@container ${a}`:"@container");function t(s,a){s.up=(...l)=>r(e.breakpoints.up(...l),a),s.down=(...l)=>r(e.breakpoints.down(...l),a),s.between=(...l)=>r(e.breakpoints.between(...l),a),s.only=(...l)=>r(e.breakpoints.only(...l),a),s.not=(...l)=>{const c=r(e.breakpoints.not(...l),a);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const o={},i=s=>(t(o,s),o);return t(i),{...e,containerQueries:i}}const Mt={xs:0,sm:600,md:900,lg:1200,xl:1536},qr={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Mt[e]}px)`},ei={containerQueries:e=>({up:r=>{let t=typeof r=="number"?r:Mt[r]||r;return typeof t=="number"&&(t=`${t}px`),e?`@container ${e} (min-width:${t})`:`@container (min-width:${t})`}})};function Ie(e,r,t){const o=e.theme||{};if(Array.isArray(r)){const s=o.breakpoints||qr;return r.reduce((a,l,c)=>(a[s.up(s.keys[c])]=t(r[c]),a),{})}if(typeof r=="object"){const s=o.breakpoints||qr;return Object.keys(r).reduce((a,l)=>{if(Xo(s.keys,l)){const c=Qo(o.containerQueries?o:ei,l);c&&(a[c]=t(r[l],l))}else if(Object.keys(s.values||Mt).includes(l)){const c=s.up(l);a[c]=t(r[l],l)}else{const c=l;a[c]=r[c]}return a},{})}return t(r)}function ti(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((o,i)=>{const s=e.up(i);return o[s]={},o},{}))||{}}function Kr(e,r){return e.reduce((t,o)=>{const i=t[o];return(!i||Object.keys(i).length===0)&&delete t[o],t},r)}function Wt(e,r,t=!0){if(!r||typeof r!="string")return null;if(e&&e.vars&&t){const o=`vars.${r}`.split(".").reduce((i,s)=>i&&i[s]?i[s]:null,e);if(o!=null)return o}return r.split(".").reduce((o,i)=>o&&o[i]!=null?o[i]:null,e)}function It(e,r,t,o=t){let i;return typeof e=="function"?i=e(t):Array.isArray(e)?i=e[t]||o:i=Wt(e,t)||o,r&&(i=r(i,o,e)),i}function he(e){const{prop:r,cssProperty:t=e.prop,themeKey:o,transform:i}=e,s=a=>{if(a[r]==null)return null;const l=a[r],c=a.theme,g=Wt(c,o)||{};return Ie(a,l,x=>{let m=It(g,i,x);return x===m&&typeof x=="string"&&(m=It(g,i,`${r}${x==="default"?"":et(x)}`,x)),t===!1?m:{[t]:m}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[r]:Ne}:{},s.filterProps=[r],s}function ri(e){const r={};return t=>(r[t]===void 0&&(r[t]=e(t)),r[t])}const ni={m:"margin",p:"padding"},oi={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Xr={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},ii=ri(e=>{if(e.length>2)if(Xr[e])e=Xr[e];else return[e];const[r,t]=e.split(""),o=ni[r],i=oi[t]||"";return Array.isArray(i)?i.map(s=>o+s):[o+i]}),zt=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],_t=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],ai=[...zt,..._t];function yt(e,r,t,o){const i=Wt(e,r,!0)??t;return typeof i=="number"||typeof i=="string"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${s}.`),typeof i=="string"?i.startsWith("var(")&&s===0?0:i.startsWith("var(")&&s===1?i:`calc(${s} * ${i})`:i*s):Array.isArray(i)?s=>{if(typeof s=="string")return s;const a=Math.abs(s);process.env.NODE_ENV!=="production"&&(Number.isInteger(a)?a>i.length-1&&console.error([`MUI: The value provided (${a}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${a} > ${i.length-1}, you need to add the missing values.`].join(`
38
38
  `)):console.error([`MUI: The \`theme.${r}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${r}\` as a number.`].join(`
39
39
  `)));const l=i[a];return s>=0?l:typeof l=="number"?-l:typeof l=="string"&&l.startsWith("var(")?`calc(-1 * ${l})`:`-${l}`}:typeof i=="function"?i:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${r}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join(`
40
- `)),()=>{})}function Sr(e){return yt(e,"spacing",8,"spacing")}function bt(e,r){return typeof r=="string"||r==null?r:e(r)}function si(e,r){return t=>e.reduce((o,i)=>(o[i]=bt(r,t),o),{})}function li(e,r,t,o){if(!r.includes(t))return null;const i=ii(t),s=si(i,o),a=e[t];return Ae(e,a,s)}function kn(e,r){const t=Sr(e.theme);return Object.keys(e).map(o=>li(e,r,o,t)).reduce(xt,{})}function pe(e){return kn(e,zt)}pe.propTypes=process.env.NODE_ENV!=="production"?zt.reduce((e,r)=>(e[r]=Ne,e),{}):{};pe.filterProps=zt;function ue(e){return kn(e,_t)}ue.propTypes=process.env.NODE_ENV!=="production"?_t.reduce((e,r)=>(e[r]=Ne,e),{}):{};ue.filterProps=_t;process.env.NODE_ENV!=="production"&&ai.reduce((e,r)=>(e[r]=Ne,e),{});function Lt(...e){const r=e.reduce((o,i)=>(i.filterProps.forEach(s=>{o[s]=i}),o),{}),t=o=>Object.keys(o).reduce((i,s)=>r[s]?xt(i,r[s](o)):i,{});return t.propTypes=process.env.NODE_ENV!=="production"?e.reduce((o,i)=>Object.assign(o,i.propTypes),{}):{},t.filterProps=e.reduce((o,i)=>o.concat(i.filterProps),[]),t}function Te(e){return typeof e!="number"?e:`${e}px solid`}function ke(e,r){return he({prop:e,themeKey:"borders",transform:r})}const di=ke("border",Te),ci=ke("borderTop",Te),pi=ke("borderRight",Te),ui=ke("borderBottom",Te),fi=ke("borderLeft",Te),hi=ke("borderColor"),gi=ke("borderTopColor"),xi=ke("borderRightColor"),mi=ke("borderBottomColor"),yi=ke("borderLeftColor"),bi=ke("outline",Te),vi=ke("outlineColor"),Nt=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const r=yt(e.theme,"shape.borderRadius",4,"borderRadius"),t=o=>({borderRadius:bt(r,o)});return Ae(e,e.borderRadius,t)}return null};Nt.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Ne}:{};Nt.filterProps=["borderRadius"];Lt(di,ci,pi,ui,fi,hi,gi,xi,mi,yi,Nt,bi,vi);const Vt=e=>{if(e.gap!==void 0&&e.gap!==null){const r=yt(e.theme,"spacing",8,"gap"),t=o=>({gap:bt(r,o)});return Ae(e,e.gap,t)}return null};Vt.propTypes=process.env.NODE_ENV!=="production"?{gap:Ne}:{};Vt.filterProps=["gap"];const Ut=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const r=yt(e.theme,"spacing",8,"columnGap"),t=o=>({columnGap:bt(r,o)});return Ae(e,e.columnGap,t)}return null};Ut.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Ne}:{};Ut.filterProps=["columnGap"];const Gt=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const r=yt(e.theme,"spacing",8,"rowGap"),t=o=>({rowGap:bt(r,o)});return Ae(e,e.rowGap,t)}return null};Gt.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Ne}:{};Gt.filterProps=["rowGap"];const Si=he({prop:"gridColumn"}),Ci=he({prop:"gridRow"}),ji=he({prop:"gridAutoFlow"}),wi=he({prop:"gridAutoColumns"}),Ti=he({prop:"gridAutoRows"}),ki=he({prop:"gridTemplateColumns"}),Bi=he({prop:"gridTemplateRows"}),Ri=he({prop:"gridTemplateAreas"}),Ei=he({prop:"gridArea"});Lt(Vt,Ut,Gt,Si,Ci,ji,wi,Ti,ki,Bi,Ri,Ei);function lt(e,r){return r==="grey"?r:e}const Hi=he({prop:"color",themeKey:"palette",transform:lt}),Pi=he({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:lt}),$i=he({prop:"backgroundColor",themeKey:"palette",transform:lt});Lt(Hi,Pi,$i);function Ce(e){return e<=1&&e!==0?`${e*100}%`:e}const Ii=he({prop:"width",transform:Ce}),Cr=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const r=t=>{var i,s,a,l,c;const o=((a=(s=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:s.values)==null?void 0:a[t])||Ft[t];return o?((c=(l=e.theme)==null?void 0:l.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Ce(t)}};return Ae(e,e.maxWidth,r)}return null};Cr.filterProps=["maxWidth"];const Ai=he({prop:"minWidth",transform:Ce}),Oi=he({prop:"height",transform:Ce}),Di=he({prop:"maxHeight",transform:Ce}),Mi=he({prop:"minHeight",transform:Ce});he({prop:"size",cssProperty:"width",transform:Ce});he({prop:"size",cssProperty:"height",transform:Ce});const Fi=he({prop:"boxSizing"});Lt(Ii,Cr,Ai,Oi,Di,Mi,Fi);const Yt={border:{themeKey:"borders",transform:Te},borderTop:{themeKey:"borders",transform:Te},borderRight:{themeKey:"borders",transform:Te},borderBottom:{themeKey:"borders",transform:Te},borderLeft:{themeKey:"borders",transform:Te},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Te},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Nt},color:{themeKey:"palette",transform:lt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:lt},backgroundColor:{themeKey:"palette",transform:lt},p:{style:ue},pt:{style:ue},pr:{style:ue},pb:{style:ue},pl:{style:ue},px:{style:ue},py:{style:ue},padding:{style:ue},paddingTop:{style:ue},paddingRight:{style:ue},paddingBottom:{style:ue},paddingLeft:{style:ue},paddingX:{style:ue},paddingY:{style:ue},paddingInline:{style:ue},paddingInlineStart:{style:ue},paddingInlineEnd:{style:ue},paddingBlock:{style:ue},paddingBlockStart:{style:ue},paddingBlockEnd:{style:ue},m:{style:pe},mt:{style:pe},mr:{style:pe},mb:{style:pe},ml:{style:pe},mx:{style:pe},my:{style:pe},margin:{style:pe},marginTop:{style:pe},marginRight:{style:pe},marginBottom:{style:pe},marginLeft:{style:pe},marginX:{style:pe},marginY:{style:pe},marginInline:{style:pe},marginInlineStart:{style:pe},marginInlineEnd:{style:pe},marginBlock:{style:pe},marginBlockStart:{style:pe},marginBlockEnd:{style:pe},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Vt},rowGap:{style:Gt},columnGap:{style:Ut},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ce},maxWidth:{style:Cr},minWidth:{transform:Ce},height:{transform:Ce},maxHeight:{transform:Ce},minHeight:{transform:Ce},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Wi(...e){const r=e.reduce((o,i)=>o.concat(Object.keys(i)),[]),t=new Set(r);return e.every(o=>t.size===Object.keys(o).length)}function zi(e,r){return typeof e=="function"?e(r):e}function _i(){function e(t,o,i,s){const a={[t]:o,theme:i},l=s[t];if(!l)return{[t]:o};const{cssProperty:c=t,themeKey:g,transform:f,style:x}=l;if(o==null)return null;if(g==="typography"&&o==="inherit")return{[t]:o};const m=Wt(i,g)||{};return x?x(a):Ae(a,o,b=>{let u=At(m,f,b);return b===u&&typeof b=="string"&&(u=At(m,f,`${t}${b==="default"?"":et(b)}`,b)),c===!1?u:{[c]:u}})}function r(t){const{sx:o,theme:i={},nested:s}=t||{};if(!o)return null;const a=i.unstable_sxConfig??Yt;function l(c){let g=c;if(typeof c=="function")g=c(i);else if(typeof c!="object")return c;if(!g)return null;const f=ti(i.breakpoints),x=Object.keys(f);let m=f;return Object.keys(g).forEach(h=>{const b=zi(g[h],i);if(b!=null)if(typeof b=="object")if(a[h])m=xt(m,e(h,b,i,a));else{const u=Ae({theme:i},b,y=>({[h]:y}));Wi(u,b)?m[h]=r({sx:b,theme:i,nested:!0}):m=xt(m,u)}else m=xt(m,e(h,b,i,a))}),!s&&i.modularCssLayers?{"@layer sx":Jr(i,Kr(x,m))}:Jr(i,Kr(x,m))}return Array.isArray(o)?o.map(l):l(o)}return r}const dt=_i();dt.filterProps=["sx"];function Li(e){for(var r=0,t,o=0,i=e.length;i>=4;++o,i-=4)t=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,r=(t&65535)*1540483477+((t>>>16)*59797<<16)^(r&65535)*1540483477+((r>>>16)*59797<<16);switch(i){case 3:r^=(e.charCodeAt(o+2)&255)<<16;case 2:r^=(e.charCodeAt(o+1)&255)<<8;case 1:r^=e.charCodeAt(o)&255,r=(r&65535)*1540483477+((r>>>16)*59797<<16)}return r^=r>>>13,r=(r&65535)*1540483477+((r>>>16)*59797<<16),((r^r>>>15)>>>0).toString(36)}var Ni={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,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Vi(e){var r=Object.create(null);return function(t){return r[t]===void 0&&(r[t]=e(t)),r[t]}}var Ui=/[A-Z]|^ms/g,Gi=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Bn=function(r){return r.charCodeAt(1)===45},Qr=function(r){return r!=null&&typeof r!="boolean"},ar=Vi(function(e){return Bn(e)?e:e.replace(Ui,"-$&").toLowerCase()}),Zr=function(r,t){switch(r){case"animation":case"animationName":if(typeof t=="string")return t.replace(Gi,function(o,i,s){return ze={name:i,styles:s,next:ze},i})}return Ni[r]!==1&&!Bn(r)&&typeof t=="number"&&t!==0?t+"px":t};function Ot(e,r,t){if(t==null)return"";var o=t;if(o.__emotion_styles!==void 0)return o;switch(typeof t){case"boolean":return"";case"object":{var i=t;if(i.anim===1)return ze={name:i.name,styles:i.styles,next:ze},i.name;var s=t;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)ze={name:a.name,styles:a.styles,next:ze},a=a.next;var l=s.styles+";";return l}return Yi(e,r,t)}}var c=t;return c}function Yi(e,r,t){var o="";if(Array.isArray(t))for(var i=0;i<t.length;i++)o+=Ot(e,r,t[i])+";";else for(var s in t){var a=t[s];if(typeof a!="object"){var l=a;Qr(l)&&(o+=ar(s)+":"+Zr(s,l)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&r==null)for(var c=0;c<a.length;c++)Qr(a[c])&&(o+=ar(s)+":"+Zr(s,a[c])+";");else{var g=Ot(e,r,a);switch(s){case"animation":case"animationName":{o+=ar(s)+":"+g+";";break}default:o+=s+"{"+g+"}"}}}return o}var en=/label:\s*([^\s;{]+)\s*(;|$)/g,ze;function Ji(e,r,t){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,i="";ze=void 0;var s=e[0];if(s==null||s.raw===void 0)o=!1,i+=Ot(t,r,s);else{var a=s;i+=a[0]}for(var l=1;l<e.length;l++)if(i+=Ot(t,r,e[l]),o){var c=s;i+=c[l]}en.lastIndex=0;for(var g="",f;(f=en.exec(i))!==null;)g+="-"+f[1];var x=Li(i)+g;return{name:x,styles:i,next:ze}}/**
40
+ `)),()=>{})}function Sr(e){return yt(e,"spacing",8,"spacing")}function bt(e,r){return typeof r=="string"||r==null?r:e(r)}function si(e,r){return t=>e.reduce((o,i)=>(o[i]=bt(r,t),o),{})}function li(e,r,t,o){if(!r.includes(t))return null;const i=ii(t),s=si(i,o),a=e[t];return Ie(e,a,s)}function kn(e,r){const t=Sr(e.theme);return Object.keys(e).map(o=>li(e,r,o,t)).reduce(xt,{})}function pe(e){return kn(e,zt)}pe.propTypes=process.env.NODE_ENV!=="production"?zt.reduce((e,r)=>(e[r]=Ne,e),{}):{};pe.filterProps=zt;function ue(e){return kn(e,_t)}ue.propTypes=process.env.NODE_ENV!=="production"?_t.reduce((e,r)=>(e[r]=Ne,e),{}):{};ue.filterProps=_t;process.env.NODE_ENV!=="production"&&ai.reduce((e,r)=>(e[r]=Ne,e),{});function Lt(...e){const r=e.reduce((o,i)=>(i.filterProps.forEach(s=>{o[s]=i}),o),{}),t=o=>Object.keys(o).reduce((i,s)=>r[s]?xt(i,r[s](o)):i,{});return t.propTypes=process.env.NODE_ENV!=="production"?e.reduce((o,i)=>Object.assign(o,i.propTypes),{}):{},t.filterProps=e.reduce((o,i)=>o.concat(i.filterProps),[]),t}function Te(e){return typeof e!="number"?e:`${e}px solid`}function ke(e,r){return he({prop:e,themeKey:"borders",transform:r})}const di=ke("border",Te),ci=ke("borderTop",Te),pi=ke("borderRight",Te),ui=ke("borderBottom",Te),fi=ke("borderLeft",Te),hi=ke("borderColor"),gi=ke("borderTopColor"),xi=ke("borderRightColor"),mi=ke("borderBottomColor"),yi=ke("borderLeftColor"),bi=ke("outline",Te),vi=ke("outlineColor"),Nt=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const r=yt(e.theme,"shape.borderRadius",4,"borderRadius"),t=o=>({borderRadius:bt(r,o)});return Ie(e,e.borderRadius,t)}return null};Nt.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Ne}:{};Nt.filterProps=["borderRadius"];Lt(di,ci,pi,ui,fi,hi,gi,xi,mi,yi,Nt,bi,vi);const Vt=e=>{if(e.gap!==void 0&&e.gap!==null){const r=yt(e.theme,"spacing",8,"gap"),t=o=>({gap:bt(r,o)});return Ie(e,e.gap,t)}return null};Vt.propTypes=process.env.NODE_ENV!=="production"?{gap:Ne}:{};Vt.filterProps=["gap"];const Ut=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const r=yt(e.theme,"spacing",8,"columnGap"),t=o=>({columnGap:bt(r,o)});return Ie(e,e.columnGap,t)}return null};Ut.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Ne}:{};Ut.filterProps=["columnGap"];const Gt=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const r=yt(e.theme,"spacing",8,"rowGap"),t=o=>({rowGap:bt(r,o)});return Ie(e,e.rowGap,t)}return null};Gt.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Ne}:{};Gt.filterProps=["rowGap"];const Si=he({prop:"gridColumn"}),Ci=he({prop:"gridRow"}),ji=he({prop:"gridAutoFlow"}),wi=he({prop:"gridAutoColumns"}),Ti=he({prop:"gridAutoRows"}),ki=he({prop:"gridTemplateColumns"}),Bi=he({prop:"gridTemplateRows"}),Ri=he({prop:"gridTemplateAreas"}),Ei=he({prop:"gridArea"});Lt(Vt,Ut,Gt,Si,Ci,ji,wi,Ti,ki,Bi,Ri,Ei);function lt(e,r){return r==="grey"?r:e}const Hi=he({prop:"color",themeKey:"palette",transform:lt}),Pi=he({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:lt}),$i=he({prop:"backgroundColor",themeKey:"palette",transform:lt});Lt(Hi,Pi,$i);function Ce(e){return e<=1&&e!==0?`${e*100}%`:e}const Ai=he({prop:"width",transform:Ce}),Cr=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const r=t=>{var i,s,a,l,c;const o=((a=(s=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:s.values)==null?void 0:a[t])||Mt[t];return o?((c=(l=e.theme)==null?void 0:l.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Ce(t)}};return Ie(e,e.maxWidth,r)}return null};Cr.filterProps=["maxWidth"];const Ii=he({prop:"minWidth",transform:Ce}),Oi=he({prop:"height",transform:Ce}),Di=he({prop:"maxHeight",transform:Ce}),Fi=he({prop:"minHeight",transform:Ce});he({prop:"size",cssProperty:"width",transform:Ce});he({prop:"size",cssProperty:"height",transform:Ce});const Mi=he({prop:"boxSizing"});Lt(Ai,Cr,Ii,Oi,Di,Fi,Mi);const Yt={border:{themeKey:"borders",transform:Te},borderTop:{themeKey:"borders",transform:Te},borderRight:{themeKey:"borders",transform:Te},borderBottom:{themeKey:"borders",transform:Te},borderLeft:{themeKey:"borders",transform:Te},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Te},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Nt},color:{themeKey:"palette",transform:lt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:lt},backgroundColor:{themeKey:"palette",transform:lt},p:{style:ue},pt:{style:ue},pr:{style:ue},pb:{style:ue},pl:{style:ue},px:{style:ue},py:{style:ue},padding:{style:ue},paddingTop:{style:ue},paddingRight:{style:ue},paddingBottom:{style:ue},paddingLeft:{style:ue},paddingX:{style:ue},paddingY:{style:ue},paddingInline:{style:ue},paddingInlineStart:{style:ue},paddingInlineEnd:{style:ue},paddingBlock:{style:ue},paddingBlockStart:{style:ue},paddingBlockEnd:{style:ue},m:{style:pe},mt:{style:pe},mr:{style:pe},mb:{style:pe},ml:{style:pe},mx:{style:pe},my:{style:pe},margin:{style:pe},marginTop:{style:pe},marginRight:{style:pe},marginBottom:{style:pe},marginLeft:{style:pe},marginX:{style:pe},marginY:{style:pe},marginInline:{style:pe},marginInlineStart:{style:pe},marginInlineEnd:{style:pe},marginBlock:{style:pe},marginBlockStart:{style:pe},marginBlockEnd:{style:pe},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Vt},rowGap:{style:Gt},columnGap:{style:Ut},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ce},maxWidth:{style:Cr},minWidth:{transform:Ce},height:{transform:Ce},maxHeight:{transform:Ce},minHeight:{transform:Ce},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Wi(...e){const r=e.reduce((o,i)=>o.concat(Object.keys(i)),[]),t=new Set(r);return e.every(o=>t.size===Object.keys(o).length)}function zi(e,r){return typeof e=="function"?e(r):e}function _i(){function e(t,o,i,s){const a={[t]:o,theme:i},l=s[t];if(!l)return{[t]:o};const{cssProperty:c=t,themeKey:g,transform:f,style:x}=l;if(o==null)return null;if(g==="typography"&&o==="inherit")return{[t]:o};const m=Wt(i,g)||{};return x?x(a):Ie(a,o,b=>{let u=It(m,f,b);return b===u&&typeof b=="string"&&(u=It(m,f,`${t}${b==="default"?"":et(b)}`,b)),c===!1?u:{[c]:u}})}function r(t){const{sx:o,theme:i={},nested:s}=t||{};if(!o)return null;const a=i.unstable_sxConfig??Yt;function l(c){let g=c;if(typeof c=="function")g=c(i);else if(typeof c!="object")return c;if(!g)return null;const f=ti(i.breakpoints),x=Object.keys(f);let m=f;return Object.keys(g).forEach(h=>{const b=zi(g[h],i);if(b!=null)if(typeof b=="object")if(a[h])m=xt(m,e(h,b,i,a));else{const u=Ie({theme:i},b,y=>({[h]:y}));Wi(u,b)?m[h]=r({sx:b,theme:i,nested:!0}):m=xt(m,u)}else m=xt(m,e(h,b,i,a))}),!s&&i.modularCssLayers?{"@layer sx":Jr(i,Kr(x,m))}:Jr(i,Kr(x,m))}return Array.isArray(o)?o.map(l):l(o)}return r}const dt=_i();dt.filterProps=["sx"];function Li(e){for(var r=0,t,o=0,i=e.length;i>=4;++o,i-=4)t=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,r=(t&65535)*1540483477+((t>>>16)*59797<<16)^(r&65535)*1540483477+((r>>>16)*59797<<16);switch(i){case 3:r^=(e.charCodeAt(o+2)&255)<<16;case 2:r^=(e.charCodeAt(o+1)&255)<<8;case 1:r^=e.charCodeAt(o)&255,r=(r&65535)*1540483477+((r>>>16)*59797<<16)}return r^=r>>>13,r=(r&65535)*1540483477+((r>>>16)*59797<<16),((r^r>>>15)>>>0).toString(36)}var Ni={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,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Vi(e){var r=Object.create(null);return function(t){return r[t]===void 0&&(r[t]=e(t)),r[t]}}var Ui=/[A-Z]|^ms/g,Gi=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Bn=function(r){return r.charCodeAt(1)===45},Qr=function(r){return r!=null&&typeof r!="boolean"},ar=Vi(function(e){return Bn(e)?e:e.replace(Ui,"-$&").toLowerCase()}),Zr=function(r,t){switch(r){case"animation":case"animationName":if(typeof t=="string")return t.replace(Gi,function(o,i,s){return ze={name:i,styles:s,next:ze},i})}return Ni[r]!==1&&!Bn(r)&&typeof t=="number"&&t!==0?t+"px":t};function Ot(e,r,t){if(t==null)return"";var o=t;if(o.__emotion_styles!==void 0)return o;switch(typeof t){case"boolean":return"";case"object":{var i=t;if(i.anim===1)return ze={name:i.name,styles:i.styles,next:ze},i.name;var s=t;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)ze={name:a.name,styles:a.styles,next:ze},a=a.next;var l=s.styles+";";return l}return Yi(e,r,t)}}var c=t;return c}function Yi(e,r,t){var o="";if(Array.isArray(t))for(var i=0;i<t.length;i++)o+=Ot(e,r,t[i])+";";else for(var s in t){var a=t[s];if(typeof a!="object"){var l=a;Qr(l)&&(o+=ar(s)+":"+Zr(s,l)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&r==null)for(var c=0;c<a.length;c++)Qr(a[c])&&(o+=ar(s)+":"+Zr(s,a[c])+";");else{var g=Ot(e,r,a);switch(s){case"animation":case"animationName":{o+=ar(s)+":"+g+";";break}default:o+=s+"{"+g+"}"}}}return o}var en=/label:\s*([^\s;{]+)\s*(;|$)/g,ze;function Ji(e,r,t){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,i="";ze=void 0;var s=e[0];if(s==null||s.raw===void 0)o=!1,i+=Ot(t,r,s);else{var a=s;i+=a[0]}for(var l=1;l<e.length;l++)if(i+=Ot(t,r,e[l]),o){var c=s;i+=c[l]}en.lastIndex=0;for(var g="",f;(f=en.exec(i))!==null;)g+="-"+f[1];var x=Li(i)+g;return{name:x,styles:i,next:ze}}/**
41
41
  * @mui/styled-engine v7.3.10
42
42
  *
43
43
  * @license MIT
44
44
  * This source code is licensed under the MIT license found in the
45
45
  * LICENSE file in the root directory of this source tree.
46
- */function qi(e,r){const t=Io(e,r);return process.env.NODE_ENV!=="production"?(...o)=>{const i=typeof e=="string"?`"${e}"`:"component";return o.length===0?console.error([`MUI: Seems like you called \`styled(${i})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
47
- `)):o.some(s=>s===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),t(...o)}:t}function Ki(e,r){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=r(e.__emotion_styles))}const tn=[];function Qe(e){return tn[0]=e,Ji(tn)}const Xi=e=>{const r=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return r.sort((t,o)=>t.val-o.val),r.reduce((t,o)=>({...t,[o.key]:o.val}),{})};function Qi(e){const{values:r={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:t="px",step:o=5,...i}=e,s=Xi(r),a=Object.keys(s);function l(m){return`@media (min-width:${typeof r[m]=="number"?r[m]:m}${t})`}function c(m){return`@media (max-width:${(typeof r[m]=="number"?r[m]:m)-o/100}${t})`}function g(m,h){const b=a.indexOf(h);return`@media (min-width:${typeof r[m]=="number"?r[m]:m}${t}) and (max-width:${(b!==-1&&typeof r[a[b]]=="number"?r[a[b]]:h)-o/100}${t})`}function f(m){return a.indexOf(m)+1<a.length?g(m,a[a.indexOf(m)+1]):l(m)}function x(m){const h=a.indexOf(m);return h===0?l(a[1]):h===a.length-1?c(a[h]):g(m,a[a.indexOf(m)+1]).replace("@media","@media not all and")}return{keys:a,values:s,up:l,down:c,between:g,only:f,not:x,unit:t,...i}}const Zi={borderRadius:4};function Rn(e=8,r=Sr({spacing:e})){if(e.mui)return e;const t=(...o)=>(process.env.NODE_ENV!=="production"&&(o.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${o.length}`)),(o.length===0?[1]:o).map(s=>{const a=r(s);return typeof a=="number"?`${a}px`:a}).join(" "));return t.mui=!0,t}function ea(e,r){var o;const t=this;if(t.vars){if(!((o=t.colorSchemes)!=null&&o[e])||typeof t.getColorSchemeSelector!="function")return{};let i=t.getColorSchemeSelector(e);return i==="&"?r:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:r})}return t.palette.mode===e?r:{}}function En(e={},...r){const{breakpoints:t={},palette:o={},spacing:i,shape:s={},...a}=e,l=Qi(t),c=Rn(i);let g=we({breakpoints:l,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:c,shape:{...Zi,...s}},a);return g=Zo(g),g.applyStyles=ea,g=r.reduce((f,x)=>we(f,x),g),g.unstable_sxConfig={...Yt,...a==null?void 0:a.unstable_sxConfig},g.unstable_sx=function(x){return dt({sx:x,theme:this})},g}const ta={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 jr(e,r,t="Mui"){const o=ta[r];return o?`${t}-${o}`:`${Mo.generate(e)}-${r}`}function ra(e,r,t="Mui"){const o={};return r.forEach(i=>{o[i]=jr(e,i,t)}),o}function Hn(e,r=""){return e.displayName||e.name||r}function rn(e,r,t){const o=Hn(r);return e.displayName||(o!==""?`${t}(${o})`:t)}function na(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Hn(e,"Component");if(typeof e=="object")switch(e.$$typeof){case It.ForwardRef:return rn(e,e.render,"ForwardRef");case It.Memo:return rn(e,e.type,"memo");default:return}}}function Pn(e){const{variants:r,...t}=e,o={variants:r,style:Qe(t),isProcessed:!0};return o.style===t||r&&r.forEach(i=>{typeof i.style!="function"&&(i.style=Qe(i.style))}),o}const oa=En();function sr(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Xe(e,r){return r&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${r}{${String(e.styles)}}`),e}function ia(e){return e?(r,t)=>t[e]:null}function aa(e,r,t){e.theme=ca(e.theme)?t:e.theme[r]||e.theme}function $t(e,r,t){const o=typeof r=="function"?r(e):r;if(Array.isArray(o))return o.flatMap(i=>$t(e,i,t));if(Array.isArray(o==null?void 0:o.variants)){let i;if(o.isProcessed)i=t?Xe(o.style,t):o.style;else{const{variants:s,...a}=o;i=t?Xe(Qe(a),t):a}return $n(e,o.variants,[i],t)}return o!=null&&o.isProcessed?t?Xe(Qe(o.style),t):o.style:t?Xe(Qe(o),t):o}function $n(e,r,t=[],o=void 0){var s;let i;e:for(let a=0;a<r.length;a+=1){const l=r[a];if(typeof l.props=="function"){if(i??(i={...e,...e.ownerState,ownerState:e.ownerState}),!l.props(i))continue}else for(const c in l.props)if(e[c]!==l.props[c]&&((s=e.ownerState)==null?void 0:s[c])!==l.props[c])continue e;typeof l.style=="function"?(i??(i={...e,...e.ownerState,ownerState:e.ownerState}),t.push(o?Xe(Qe(l.style(i)),o):l.style(i))):t.push(o?Xe(Qe(l.style),o):l.style)}return t}function sa(e={}){const{themeId:r,defaultTheme:t=oa,rootShouldForwardProp:o=sr,slotShouldForwardProp:i=sr}=e;function s(l){aa(l,r,t)}return(l,c={})=>{Ki(l,B=>B.filter(D=>D!==dt));const{name:g,slot:f,skipVariantsResolver:x,skipSx:m,overridesResolver:h=ia(In(f)),...b}=c,u=g&&g.startsWith("Mui")||f?"components":"custom",y=x!==void 0?x:f&&f!=="Root"&&f!=="root"||!1,v=m||!1;let E=sr;f==="Root"||f==="root"?E=o:f?E=i:pa(l)&&(E=void 0);const H=qi(l,{shouldForwardProp:E,label:da(g,f),...b}),S=B=>{if(B.__emotion_real===B)return B;if(typeof B=="function")return function($){return $t($,B,$.theme.modularCssLayers?u:void 0)};if(Ie(B)){const D=Pn(B);return function(X){return D.variants?$t(X,D,X.theme.modularCssLayers?u:void 0):X.theme.modularCssLayers?Xe(D.style,u):D.style}}return B},C=(...B)=>{const D=[],$=B.map(S),X=[];if(D.push(s),g&&h&&X.push(function(I){var q,U;const W=(U=(q=I.theme.components)==null?void 0:q[g])==null?void 0:U.styleOverrides;if(!W)return null;const z={};for(const G in W)z[G]=$t(I,W[G],I.theme.modularCssLayers?"theme":void 0);return h(I,z)}),g&&!y&&X.push(function(I){var z,q;const P=I.theme,W=(q=(z=P==null?void 0:P.components)==null?void 0:z[g])==null?void 0:q.variants;return W?$n(I,W,[],I.theme.modularCssLayers?"theme":void 0):null}),v||X.push(dt),Array.isArray($[0])){const d=$.shift(),I=new Array(D.length).fill(""),P=new Array(X.length).fill("");let W;W=[...I,...d,...P],W.raw=[...I,...d.raw,...P],D.unshift(W)}const Q=[...D,...$,...X],Y=H(...Q);return l.muiName&&(Y.muiName=l.muiName),process.env.NODE_ENV!=="production"&&(Y.displayName=la(g,f,l)),Y};return H.withConfig&&(C.withConfig=H.withConfig),C}}function la(e,r,t){return e?`${e}${et(r||"")}`:`Styled(${na(t)})`}function da(e,r){let t;return process.env.NODE_ENV!=="production"&&e&&(t=`${e}-${In(r||"Root")}`),t}function ca(e){for(const r in e)return!1;return!0}function pa(e){return typeof e=="string"&&e.charCodeAt(0)>96}function In(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function hr(e,r,t=!1){const o={...r};for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const s=i;if(s==="components"||s==="slots")o[s]={...e[s],...o[s]};else if(s==="componentsProps"||s==="slotProps"){const a=e[s],l=r[s];if(!l)o[s]=a||{};else if(!a)o[s]=l;else{o[s]={...l};for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c)){const g=c;o[s][g]=hr(a[g],l[g],t)}}}else s==="className"&&t&&r.className?o.className=wn(e==null?void 0:e.className,r==null?void 0:r.className):s==="style"&&t&&r.style?o.style={...e==null?void 0:e.style,...r==null?void 0:r.style}:o[s]===void 0&&(o[s]=e[s])}return o}function ua(e,r=Number.MIN_SAFE_INTEGER,t=Number.MAX_SAFE_INTEGER){return Math.max(r,Math.min(e,t))}function wr(e,r=0,t=1){return process.env.NODE_ENV!=="production"&&(e<r||e>t)&&console.error(`MUI: The value provided ${e} is out of range [${r}, ${t}].`),ua(e,r,t)}function fa(e){e=e.slice(1);const r=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let t=e.match(r);return t&&t[0].length===1&&(t=t.map(o=>o+o)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),t?`rgb${t.length===4?"a":""}(${t.map((o,i)=>i<3?parseInt(o,16):Math.round(parseInt(o,16)/255*1e3)/1e3).join(", ")})`:""}function Le(e){if(e.type)return e;if(e.charAt(0)==="#")return Le(fa(e));const r=e.indexOf("("),t=e.substring(0,r);if(!["rgb","rgba","hsl","hsla","color"].includes(t))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
46
+ */function qi(e,r){const t=Ao(e,r);return process.env.NODE_ENV!=="production"?(...o)=>{const i=typeof e=="string"?`"${e}"`:"component";return o.length===0?console.error([`MUI: Seems like you called \`styled(${i})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
47
+ `)):o.some(s=>s===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),t(...o)}:t}function Ki(e,r){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=r(e.__emotion_styles))}const tn=[];function Qe(e){return tn[0]=e,Ji(tn)}const Xi=e=>{const r=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return r.sort((t,o)=>t.val-o.val),r.reduce((t,o)=>({...t,[o.key]:o.val}),{})};function Qi(e){const{values:r={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:t="px",step:o=5,...i}=e,s=Xi(r),a=Object.keys(s);function l(m){return`@media (min-width:${typeof r[m]=="number"?r[m]:m}${t})`}function c(m){return`@media (max-width:${(typeof r[m]=="number"?r[m]:m)-o/100}${t})`}function g(m,h){const b=a.indexOf(h);return`@media (min-width:${typeof r[m]=="number"?r[m]:m}${t}) and (max-width:${(b!==-1&&typeof r[a[b]]=="number"?r[a[b]]:h)-o/100}${t})`}function f(m){return a.indexOf(m)+1<a.length?g(m,a[a.indexOf(m)+1]):l(m)}function x(m){const h=a.indexOf(m);return h===0?l(a[1]):h===a.length-1?c(a[h]):g(m,a[a.indexOf(m)+1]).replace("@media","@media not all and")}return{keys:a,values:s,up:l,down:c,between:g,only:f,not:x,unit:t,...i}}const Zi={borderRadius:4};function Rn(e=8,r=Sr({spacing:e})){if(e.mui)return e;const t=(...o)=>(process.env.NODE_ENV!=="production"&&(o.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${o.length}`)),(o.length===0?[1]:o).map(s=>{const a=r(s);return typeof a=="number"?`${a}px`:a}).join(" "));return t.mui=!0,t}function ea(e,r){var o;const t=this;if(t.vars){if(!((o=t.colorSchemes)!=null&&o[e])||typeof t.getColorSchemeSelector!="function")return{};let i=t.getColorSchemeSelector(e);return i==="&"?r:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:r})}return t.palette.mode===e?r:{}}function En(e={},...r){const{breakpoints:t={},palette:o={},spacing:i,shape:s={},...a}=e,l=Qi(t),c=Rn(i);let g=we({breakpoints:l,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:c,shape:{...Zi,...s}},a);return g=Zo(g),g.applyStyles=ea,g=r.reduce((f,x)=>we(f,x),g),g.unstable_sxConfig={...Yt,...a==null?void 0:a.unstable_sxConfig},g.unstable_sx=function(x){return dt({sx:x,theme:this})},g}const ta={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 jr(e,r,t="Mui"){const o=ta[r];return o?`${t}-${o}`:`${Fo.generate(e)}-${r}`}function ra(e,r,t="Mui"){const o={};return r.forEach(i=>{o[i]=jr(e,i,t)}),o}function Hn(e,r=""){return e.displayName||e.name||r}function rn(e,r,t){const o=Hn(r);return e.displayName||(o!==""?`${t}(${o})`:t)}function na(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Hn(e,"Component");if(typeof e=="object")switch(e.$$typeof){case At.ForwardRef:return rn(e,e.render,"ForwardRef");case At.Memo:return rn(e,e.type,"memo");default:return}}}function Pn(e){const{variants:r,...t}=e,o={variants:r,style:Qe(t),isProcessed:!0};return o.style===t||r&&r.forEach(i=>{typeof i.style!="function"&&(i.style=Qe(i.style))}),o}const oa=En();function sr(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Xe(e,r){return r&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${r}{${String(e.styles)}}`),e}function ia(e){return e?(r,t)=>t[e]:null}function aa(e,r,t){e.theme=ca(e.theme)?t:e.theme[r]||e.theme}function $t(e,r,t){const o=typeof r=="function"?r(e):r;if(Array.isArray(o))return o.flatMap(i=>$t(e,i,t));if(Array.isArray(o==null?void 0:o.variants)){let i;if(o.isProcessed)i=t?Xe(o.style,t):o.style;else{const{variants:s,...a}=o;i=t?Xe(Qe(a),t):a}return $n(e,o.variants,[i],t)}return o!=null&&o.isProcessed?t?Xe(Qe(o.style),t):o.style:t?Xe(Qe(o),t):o}function $n(e,r,t=[],o=void 0){var s;let i;e:for(let a=0;a<r.length;a+=1){const l=r[a];if(typeof l.props=="function"){if(i??(i={...e,...e.ownerState,ownerState:e.ownerState}),!l.props(i))continue}else for(const c in l.props)if(e[c]!==l.props[c]&&((s=e.ownerState)==null?void 0:s[c])!==l.props[c])continue e;typeof l.style=="function"?(i??(i={...e,...e.ownerState,ownerState:e.ownerState}),t.push(o?Xe(Qe(l.style(i)),o):l.style(i))):t.push(o?Xe(Qe(l.style),o):l.style)}return t}function sa(e={}){const{themeId:r,defaultTheme:t=oa,rootShouldForwardProp:o=sr,slotShouldForwardProp:i=sr}=e;function s(l){aa(l,r,t)}return(l,c={})=>{Ki(l,T=>T.filter(M=>M!==dt));const{name:g,slot:f,skipVariantsResolver:x,skipSx:m,overridesResolver:h=ia(An(f)),...b}=c,u=g&&g.startsWith("Mui")||f?"components":"custom",y=x!==void 0?x:f&&f!=="Root"&&f!=="root"||!1,v=m||!1;let E=sr;f==="Root"||f==="root"?E=o:f?E=i:pa(l)&&(E=void 0);const B=qi(l,{shouldForwardProp:E,label:da(g,f),...b}),S=T=>{if(T.__emotion_real===T)return T;if(typeof T=="function")return function(P){return $t(P,T,P.theme.modularCssLayers?u:void 0)};if(Ae(T)){const M=Pn(T);return function(X){return M.variants?$t(X,M,X.theme.modularCssLayers?u:void 0):X.theme.modularCssLayers?Xe(M.style,u):M.style}}return T},j=(...T)=>{const M=[],P=T.map(S),X=[];if(M.push(s),g&&h&&X.push(function($){var K,U;const z=(U=(K=$.theme.components)==null?void 0:K[g])==null?void 0:U.styleOverrides;if(!z)return null;const _={};for(const J in z)_[J]=$t($,z[J],$.theme.modularCssLayers?"theme":void 0);return h($,_)}),g&&!y&&X.push(function($){var _,K;const H=$.theme,z=(K=(_=H==null?void 0:H.components)==null?void 0:_[g])==null?void 0:K.variants;return z?$n($,z,[],$.theme.modularCssLayers?"theme":void 0):null}),v||X.push(dt),Array.isArray(P[0])){const d=P.shift(),$=new Array(M.length).fill(""),H=new Array(X.length).fill("");let z;z=[...$,...d,...H],z.raw=[...$,...d.raw,...H],M.unshift(z)}const Q=[...M,...P,...X],Y=B(...Q);return l.muiName&&(Y.muiName=l.muiName),process.env.NODE_ENV!=="production"&&(Y.displayName=la(g,f,l)),Y};return B.withConfig&&(j.withConfig=B.withConfig),j}}function la(e,r,t){return e?`${e}${et(r||"")}`:`Styled(${na(t)})`}function da(e,r){let t;return process.env.NODE_ENV!=="production"&&e&&(t=`${e}-${An(r||"Root")}`),t}function ca(e){for(const r in e)return!1;return!0}function pa(e){return typeof e=="string"&&e.charCodeAt(0)>96}function An(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function hr(e,r,t=!1){const o={...r};for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const s=i;if(s==="components"||s==="slots")o[s]={...e[s],...o[s]};else if(s==="componentsProps"||s==="slotProps"){const a=e[s],l=r[s];if(!l)o[s]=a||{};else if(!a)o[s]=l;else{o[s]={...l};for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c)){const g=c;o[s][g]=hr(a[g],l[g],t)}}}else s==="className"&&t&&r.className?o.className=wn(e==null?void 0:e.className,r==null?void 0:r.className):s==="style"&&t&&r.style?o.style={...e==null?void 0:e.style,...r==null?void 0:r.style}:o[s]===void 0&&(o[s]=e[s])}return o}function ua(e,r=Number.MIN_SAFE_INTEGER,t=Number.MAX_SAFE_INTEGER){return Math.max(r,Math.min(e,t))}function wr(e,r=0,t=1){return process.env.NODE_ENV!=="production"&&(e<r||e>t)&&console.error(`MUI: The value provided ${e} is out of range [${r}, ${t}].`),ua(e,r,t)}function fa(e){e=e.slice(1);const r=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let t=e.match(r);return t&&t[0].length===1&&(t=t.map(o=>o+o)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),t?`rgb${t.length===4?"a":""}(${t.map((o,i)=>i<3?parseInt(o,16):Math.round(parseInt(o,16)/255*1e3)/1e3).join(", ")})`:""}function Le(e){if(e.type)return e;if(e.charAt(0)==="#")return Le(fa(e));const r=e.indexOf("("),t=e.substring(0,r);if(!["rgb","rgba","hsl","hsla","color"].includes(t))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
48
48
  The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Ze(9,e));let o=e.substring(r+1,e.length-1),i;if(t==="color"){if(o=o.split(" "),i=o.shift(),o.length===4&&o[3].charAt(0)==="/"&&(o[3]=o[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${i}\` color space.
49
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Ze(10,i))}else o=o.split(",");return o=o.map(s=>parseFloat(s)),{type:t,values:o,colorSpace:i}}const ha=e=>{const r=Le(e);return r.values.slice(0,3).map((t,o)=>r.type.includes("hsl")&&o!==0?`${t}%`:t).join(" ")},ht=(e,r)=>{try{return ha(e)}catch{return r&&process.env.NODE_ENV!=="production"&&console.warn(r),e}};function Jt(e){const{type:r,colorSpace:t}=e;let{values:o}=e;return r.includes("rgb")?o=o.map((i,s)=>s<3?parseInt(i,10):i):r.includes("hsl")&&(o[1]=`${o[1]}%`,o[2]=`${o[2]}%`),r.includes("color")?o=`${t} ${o.join(" ")}`:o=`${o.join(", ")}`,`${r}(${o})`}function An(e){e=Le(e);const{values:r}=e,t=r[0],o=r[1]/100,i=r[2]/100,s=o*Math.min(i,1-i),a=(g,f=(g+t/30)%12)=>i-s*Math.max(Math.min(f-3,9-f,1),-1);let l="rgb";const c=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(l+="a",c.push(r[3])),Jt({type:l,values:c})}function gr(e){e=Le(e);let r=e.type==="hsl"||e.type==="hsla"?Le(An(e)).values:e.values;return r=r.map(t=>(e.type!=="color"&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*r[0]+.7152*r[1]+.0722*r[2]).toFixed(3))}function nn(e,r){const t=gr(e),o=gr(r);return(Math.max(t,o)+.05)/(Math.min(t,o)+.05)}function On(e,r){return e=Le(e),r=wr(r),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${r}`:e.values[3]=r,Jt(e)}function Je(e,r,t){try{return On(e,r)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}}function qt(e,r){if(e=Le(e),r=wr(r),e.type.includes("hsl"))e.values[2]*=1-r;else if(e.type.includes("rgb")||e.type.includes("color"))for(let t=0;t<3;t+=1)e.values[t]*=1-r;return Jt(e)}function ne(e,r,t){try{return qt(e,r)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}}function Kt(e,r){if(e=Le(e),r=wr(r),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*r;else if(e.type.includes("rgb"))for(let t=0;t<3;t+=1)e.values[t]+=(255-e.values[t])*r;else if(e.type.includes("color"))for(let t=0;t<3;t+=1)e.values[t]+=(1-e.values[t])*r;return Jt(e)}function oe(e,r,t){try{return Kt(e,r)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}}function ga(e,r=.15){return gr(e)>.5?qt(e,r):Kt(e,r)}function Rt(e,r,t){try{return ga(e,r)}catch{return e}}const xa=_e.createContext(void 0);process.env.NODE_ENV!=="production"&&(ee.node,ee.object);function ma(e){const{theme:r,name:t,props:o}=e;if(!r||!r.components||!r.components[t])return o;const i=r.components[t];return i.defaultProps?hr(i.defaultProps,o,r.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?hr(i,o,r.components.mergeClassNameAndStyle):o}function ya({props:e,name:r}){const t=_e.useContext(xa);return ma({props:e,name:r,theme:{components:t}})}const on={theme:void 0};function ba(e){let r,t;return function(i){let s=r;return(s===void 0||i.theme!==t)&&(on.theme=i.theme,s=Pn(e(on)),r=s,t=i.theme),s}}function va(e=""){function r(...o){if(!o.length)return"";const i=o[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${r(...o.slice(1))})`:`, ${i}`}return(o,...i)=>`var(--${e?`${e}-`:""}${o}${r(...i)})`}const an=(e,r,t,o=[])=>{let i=e;r.forEach((s,a)=>{a===r.length-1?Array.isArray(i)?i[Number(s)]=t:i&&typeof i=="object"&&(i[s]=t):i&&typeof i=="object"&&(i[s]||(i[s]=o.includes(s)?[]:{}),i=i[s])})},Sa=(e,r,t)=>{function o(i,s=[],a=[]){Object.entries(i).forEach(([l,c])=>{(!t||t&&!t([...s,l]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?o(c,[...s,l],Array.isArray(c)?[...a,l]:a):r([...s,l],c,a))})}o(e)},Ca=(e,r)=>typeof r=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(o=>e.includes(o))||e[e.length-1].toLowerCase().includes("opacity")?r:`${r}px`:r;function lr(e,r){const{prefix:t,shouldSkipGeneratingVar:o}=r||{},i={},s={},a={};return Sa(e,(l,c,g)=>{if((typeof c=="string"||typeof c=="number")&&(!o||!o(l,c))){const f=`--${t?`${t}-`:""}${l.join("-")}`,x=Ca(l,c);Object.assign(i,{[f]:x}),an(s,l,`var(${f})`,g),an(a,l,`var(${f}, ${x})`,g)}},l=>l[0]==="vars"),{css:i,vars:s,varsWithDefaults:a}}function ja(e,r={}){const{getSelector:t=v,disableCssColorScheme:o,colorSchemeSelector:i,enableContrastVars:s}=r,{colorSchemes:a={},components:l,defaultColorScheme:c="light",...g}=e,{vars:f,css:x,varsWithDefaults:m}=lr(g,r);let h=m;const b={},{[c]:u,...y}=a;if(Object.entries(y||{}).forEach(([S,C])=>{const{vars:B,css:D,varsWithDefaults:$}=lr(C,r);h=we(h,$),b[S]={css:D,vars:B}}),u){const{css:S,vars:C,varsWithDefaults:B}=lr(u,r);h=we(h,B),b[c]={css:S,vars:C}}function v(S,C){var D,$;let B=i;if(i==="class"&&(B=".%s"),i==="data"&&(B="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(B=`[${i}="%s"]`),S){if(B==="media")return e.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${(($=(D=a[S])==null?void 0:D.palette)==null?void 0:$.mode)||S})`]:{":root":C}};if(B)return e.defaultColorScheme===S?`:root, ${B.replace("%s",String(S))}`:B.replace("%s",String(S))}return":root"}return{vars:h,generateThemeVars:()=>{let S={...f};return Object.entries(b).forEach(([,{vars:C}])=>{S=we(S,C)}),S},generateStyleSheets:()=>{var X,Q;const S=[],C=e.defaultColorScheme||"light";function B(Y,d){Object.keys(d).length&&S.push(typeof Y=="string"?{[Y]:{...d}}:Y)}B(t(void 0,{...x}),x);const{[C]:D,...$}=b;if(D){const{css:Y}=D,d=(Q=(X=a[C])==null?void 0:X.palette)==null?void 0:Q.mode,I=!o&&d?{colorScheme:d,...Y}:{...Y};B(t(C,{...I}),I)}return Object.entries($).forEach(([Y,{css:d}])=>{var W,z;const I=(z=(W=a[Y])==null?void 0:W.palette)==null?void 0:z.mode,P=!o&&I?{colorScheme:I,...d}:{...d};B(t(Y,{...P}),P)}),s&&S.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),S}}}function wa(e){return function(t){return e==="media"?(process.env.NODE_ENV!=="production"&&t!=="light"&&t!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${t}'.`),`@media (prefers-color-scheme: ${t})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:e==="class"?`.${t} &`:e==="data"?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}const mt={black:"#000",white:"#fff"},Ta={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"},rt={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},nt={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},ft={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},ot={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},it={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},at={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Dn(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:mt.white,default:mt.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Mn=Dn();function Fn(){return{text:{primary:mt.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:mt.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const xr=Fn();function sn(e,r,t,o){const i=o.light||o,s=o.dark||o*1.5;e[r]||(e.hasOwnProperty(t)?e[r]=e[t]:r==="light"?e.light=Kt(e.main,i):r==="dark"&&(e.dark=qt(e.main,s)))}function ln(e,r,t,o,i){const s=i.light||i,a=i.dark||i*1.5;r[t]||(r.hasOwnProperty(o)?r[t]=r[o]:t==="light"?r.light=`color-mix(in ${e}, ${r.main}, #fff ${(s*100).toFixed(0)}%)`:t==="dark"&&(r.dark=`color-mix(in ${e}, ${r.main}, #000 ${(a*100).toFixed(0)}%)`))}function ka(e="light"){return e==="dark"?{main:ot[200],light:ot[50],dark:ot[400]}:{main:ot[700],light:ot[400],dark:ot[800]}}function Ba(e="light"){return e==="dark"?{main:rt[200],light:rt[50],dark:rt[400]}:{main:rt[500],light:rt[300],dark:rt[700]}}function Ra(e="light"){return e==="dark"?{main:nt[500],light:nt[300],dark:nt[700]}:{main:nt[700],light:nt[400],dark:nt[800]}}function Ea(e="light"){return e==="dark"?{main:it[400],light:it[300],dark:it[700]}:{main:it[700],light:it[500],dark:it[900]}}function Ha(e="light"){return e==="dark"?{main:at[400],light:at[300],dark:at[700]}:{main:at[800],light:at[500],dark:at[900]}}function Pa(e="light"){return e==="dark"?{main:ft[400],light:ft[300],dark:ft[700]}:{main:"#ed6c02",light:ft[500],dark:ft[900]}}function $a(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function Tr(e){const{mode:r="light",contrastThreshold:t=3,tonalOffset:o=.2,colorSpace:i,...s}=e,a=e.primary||ka(r),l=e.secondary||Ba(r),c=e.error||Ra(r),g=e.info||Ea(r),f=e.success||Ha(r),x=e.warning||Pa(r);function m(y){if(i)return $a(y);const v=nn(y,xr.text.primary)>=t?xr.text.primary:Mn.text.primary;if(process.env.NODE_ENV!=="production"){const E=nn(y,v);E<3&&console.error([`MUI: The contrast ratio of ${E}:1 for ${v} on ${y}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
50
- `))}return v}const h=({color:y,name:v,mainShade:E=500,lightShade:H=300,darkShade:S=700})=>{if(y={...y},!y.main&&y[E]&&(y.main=y[E]),!y.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${v?` (${v})`:""} provided to augmentColor(color) is invalid.
49
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Ze(10,i))}else o=o.split(",");return o=o.map(s=>parseFloat(s)),{type:t,values:o,colorSpace:i}}const ha=e=>{const r=Le(e);return r.values.slice(0,3).map((t,o)=>r.type.includes("hsl")&&o!==0?`${t}%`:t).join(" ")},ht=(e,r)=>{try{return ha(e)}catch{return r&&process.env.NODE_ENV!=="production"&&console.warn(r),e}};function Jt(e){const{type:r,colorSpace:t}=e;let{values:o}=e;return r.includes("rgb")?o=o.map((i,s)=>s<3?parseInt(i,10):i):r.includes("hsl")&&(o[1]=`${o[1]}%`,o[2]=`${o[2]}%`),r.includes("color")?o=`${t} ${o.join(" ")}`:o=`${o.join(", ")}`,`${r}(${o})`}function In(e){e=Le(e);const{values:r}=e,t=r[0],o=r[1]/100,i=r[2]/100,s=o*Math.min(i,1-i),a=(g,f=(g+t/30)%12)=>i-s*Math.max(Math.min(f-3,9-f,1),-1);let l="rgb";const c=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(l+="a",c.push(r[3])),Jt({type:l,values:c})}function gr(e){e=Le(e);let r=e.type==="hsl"||e.type==="hsla"?Le(In(e)).values:e.values;return r=r.map(t=>(e.type!=="color"&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*r[0]+.7152*r[1]+.0722*r[2]).toFixed(3))}function nn(e,r){const t=gr(e),o=gr(r);return(Math.max(t,o)+.05)/(Math.min(t,o)+.05)}function On(e,r){return e=Le(e),r=wr(r),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${r}`:e.values[3]=r,Jt(e)}function Je(e,r,t){try{return On(e,r)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}}function qt(e,r){if(e=Le(e),r=wr(r),e.type.includes("hsl"))e.values[2]*=1-r;else if(e.type.includes("rgb")||e.type.includes("color"))for(let t=0;t<3;t+=1)e.values[t]*=1-r;return Jt(e)}function oe(e,r,t){try{return qt(e,r)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}}function Kt(e,r){if(e=Le(e),r=wr(r),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*r;else if(e.type.includes("rgb"))for(let t=0;t<3;t+=1)e.values[t]+=(255-e.values[t])*r;else if(e.type.includes("color"))for(let t=0;t<3;t+=1)e.values[t]+=(1-e.values[t])*r;return Jt(e)}function ie(e,r,t){try{return Kt(e,r)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}}function ga(e,r=.15){return gr(e)>.5?qt(e,r):Kt(e,r)}function Rt(e,r,t){try{return ga(e,r)}catch{return e}}const xa=_e.createContext(void 0);process.env.NODE_ENV!=="production"&&(te.node,te.object);function ma(e){const{theme:r,name:t,props:o}=e;if(!r||!r.components||!r.components[t])return o;const i=r.components[t];return i.defaultProps?hr(i.defaultProps,o,r.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?hr(i,o,r.components.mergeClassNameAndStyle):o}function ya({props:e,name:r}){const t=_e.useContext(xa);return ma({props:e,name:r,theme:{components:t}})}const on={theme:void 0};function ba(e){let r,t;return function(i){let s=r;return(s===void 0||i.theme!==t)&&(on.theme=i.theme,s=Pn(e(on)),r=s,t=i.theme),s}}function va(e=""){function r(...o){if(!o.length)return"";const i=o[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${r(...o.slice(1))})`:`, ${i}`}return(o,...i)=>`var(--${e?`${e}-`:""}${o}${r(...i)})`}const an=(e,r,t,o=[])=>{let i=e;r.forEach((s,a)=>{a===r.length-1?Array.isArray(i)?i[Number(s)]=t:i&&typeof i=="object"&&(i[s]=t):i&&typeof i=="object"&&(i[s]||(i[s]=o.includes(s)?[]:{}),i=i[s])})},Sa=(e,r,t)=>{function o(i,s=[],a=[]){Object.entries(i).forEach(([l,c])=>{(!t||t&&!t([...s,l]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?o(c,[...s,l],Array.isArray(c)?[...a,l]:a):r([...s,l],c,a))})}o(e)},Ca=(e,r)=>typeof r=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(o=>e.includes(o))||e[e.length-1].toLowerCase().includes("opacity")?r:`${r}px`:r;function lr(e,r){const{prefix:t,shouldSkipGeneratingVar:o}=r||{},i={},s={},a={};return Sa(e,(l,c,g)=>{if((typeof c=="string"||typeof c=="number")&&(!o||!o(l,c))){const f=`--${t?`${t}-`:""}${l.join("-")}`,x=Ca(l,c);Object.assign(i,{[f]:x}),an(s,l,`var(${f})`,g),an(a,l,`var(${f}, ${x})`,g)}},l=>l[0]==="vars"),{css:i,vars:s,varsWithDefaults:a}}function ja(e,r={}){const{getSelector:t=v,disableCssColorScheme:o,colorSchemeSelector:i,enableContrastVars:s}=r,{colorSchemes:a={},components:l,defaultColorScheme:c="light",...g}=e,{vars:f,css:x,varsWithDefaults:m}=lr(g,r);let h=m;const b={},{[c]:u,...y}=a;if(Object.entries(y||{}).forEach(([S,j])=>{const{vars:T,css:M,varsWithDefaults:P}=lr(j,r);h=we(h,P),b[S]={css:M,vars:T}}),u){const{css:S,vars:j,varsWithDefaults:T}=lr(u,r);h=we(h,T),b[c]={css:S,vars:j}}function v(S,j){var M,P;let T=i;if(i==="class"&&(T=".%s"),i==="data"&&(T="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(T=`[${i}="%s"]`),S){if(T==="media")return e.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${((P=(M=a[S])==null?void 0:M.palette)==null?void 0:P.mode)||S})`]:{":root":j}};if(T)return e.defaultColorScheme===S?`:root, ${T.replace("%s",String(S))}`:T.replace("%s",String(S))}return":root"}return{vars:h,generateThemeVars:()=>{let S={...f};return Object.entries(b).forEach(([,{vars:j}])=>{S=we(S,j)}),S},generateStyleSheets:()=>{var X,Q;const S=[],j=e.defaultColorScheme||"light";function T(Y,d){Object.keys(d).length&&S.push(typeof Y=="string"?{[Y]:{...d}}:Y)}T(t(void 0,{...x}),x);const{[j]:M,...P}=b;if(M){const{css:Y}=M,d=(Q=(X=a[j])==null?void 0:X.palette)==null?void 0:Q.mode,$=!o&&d?{colorScheme:d,...Y}:{...Y};T(t(j,{...$}),$)}return Object.entries(P).forEach(([Y,{css:d}])=>{var z,_;const $=(_=(z=a[Y])==null?void 0:z.palette)==null?void 0:_.mode,H=!o&&$?{colorScheme:$,...d}:{...d};T(t(Y,{...H}),H)}),s&&S.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),S}}}function wa(e){return function(t){return e==="media"?(process.env.NODE_ENV!=="production"&&t!=="light"&&t!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${t}'.`),`@media (prefers-color-scheme: ${t})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:e==="class"?`.${t} &`:e==="data"?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}const mt={black:"#000",white:"#fff"},Ta={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"},rt={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},nt={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},ft={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},ot={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},it={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},at={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Dn(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:mt.white,default:mt.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Fn=Dn();function Mn(){return{text:{primary:mt.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:mt.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const xr=Mn();function sn(e,r,t,o){const i=o.light||o,s=o.dark||o*1.5;e[r]||(e.hasOwnProperty(t)?e[r]=e[t]:r==="light"?e.light=Kt(e.main,i):r==="dark"&&(e.dark=qt(e.main,s)))}function ln(e,r,t,o,i){const s=i.light||i,a=i.dark||i*1.5;r[t]||(r.hasOwnProperty(o)?r[t]=r[o]:t==="light"?r.light=`color-mix(in ${e}, ${r.main}, #fff ${(s*100).toFixed(0)}%)`:t==="dark"&&(r.dark=`color-mix(in ${e}, ${r.main}, #000 ${(a*100).toFixed(0)}%)`))}function ka(e="light"){return e==="dark"?{main:ot[200],light:ot[50],dark:ot[400]}:{main:ot[700],light:ot[400],dark:ot[800]}}function Ba(e="light"){return e==="dark"?{main:rt[200],light:rt[50],dark:rt[400]}:{main:rt[500],light:rt[300],dark:rt[700]}}function Ra(e="light"){return e==="dark"?{main:nt[500],light:nt[300],dark:nt[700]}:{main:nt[700],light:nt[400],dark:nt[800]}}function Ea(e="light"){return e==="dark"?{main:it[400],light:it[300],dark:it[700]}:{main:it[700],light:it[500],dark:it[900]}}function Ha(e="light"){return e==="dark"?{main:at[400],light:at[300],dark:at[700]}:{main:at[800],light:at[500],dark:at[900]}}function Pa(e="light"){return e==="dark"?{main:ft[400],light:ft[300],dark:ft[700]}:{main:"#ed6c02",light:ft[500],dark:ft[900]}}function $a(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function Tr(e){const{mode:r="light",contrastThreshold:t=3,tonalOffset:o=.2,colorSpace:i,...s}=e,a=e.primary||ka(r),l=e.secondary||Ba(r),c=e.error||Ra(r),g=e.info||Ea(r),f=e.success||Ha(r),x=e.warning||Pa(r);function m(y){if(i)return $a(y);const v=nn(y,xr.text.primary)>=t?xr.text.primary:Fn.text.primary;if(process.env.NODE_ENV!=="production"){const E=nn(y,v);E<3&&console.error([`MUI: The contrast ratio of ${E}:1 for ${v} on ${y}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
50
+ `))}return v}const h=({color:y,name:v,mainShade:E=500,lightShade:B=300,darkShade:S=700})=>{if(y={...y},!y.main&&y[E]&&(y.main=y[E]),!y.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${v?` (${v})`:""} provided to augmentColor(color) is invalid.
51
51
  The color object needs to have a \`main\` property or a \`${E}\` property.`:Ze(11,v?` (${v})`:"",E));if(typeof y.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${v?` (${v})`:""} provided to augmentColor(color) is invalid.
52
52
  \`color.main\` should be a string, but \`${JSON.stringify(y.main)}\` was provided instead.
53
53
 
@@ -61,14 +61,14 @@ const theme1 = createTheme({ palette: {
61
61
 
62
62
  const theme2 = createTheme({ palette: {
63
63
  primary: { main: green[500] },
64
- } });`:Ze(12,v?` (${v})`:"",JSON.stringify(y.main)));return i?(ln(i,y,"light",H,o),ln(i,y,"dark",S,o)):(sn(y,"light",H,o),sn(y,"dark",S,o)),y.contrastText||(y.contrastText=m(y.main)),y};let b;return r==="light"?b=Dn():r==="dark"&&(b=Fn()),process.env.NODE_ENV!=="production"&&(b||console.error(`MUI: The palette mode \`${r}\` is not supported.`)),we({common:{...mt},mode:r,primary:h({color:a,name:"primary"}),secondary:h({color:l,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:c,name:"error"}),warning:h({color:x,name:"warning"}),info:h({color:g,name:"info"}),success:h({color:f,name:"success"}),grey:Ta,contrastThreshold:t,getContrastText:m,augmentColor:h,tonalOffset:o,...b},s)}function Ia(e){const r={};return Object.entries(e).forEach(o=>{const[i,s]=o;typeof s=="object"&&(r[i]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),r}function Aa(e,r){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...r}}function Oa(e){return Math.round(e*1e5)/1e5}const dn={textTransform:"uppercase"},cn='"Roboto", "Helvetica", "Arial", sans-serif';function Da(e,r){const{fontFamily:t=cn,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:g,pxToRem:f,...x}=typeof r=="function"?r(e):r;process.env.NODE_ENV!=="production"&&(typeof o!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const m=o/14,h=f||(y=>`${y/c*m}rem`),b=(y,v,E,H,S)=>({fontFamily:t,fontWeight:y,fontSize:h(v),lineHeight:E,...t===cn?{letterSpacing:`${Oa(H/v)}em`}:{},...S,...g}),u={h1:b(i,96,1.167,-1.5),h2:b(i,60,1.2,-.5),h3:b(s,48,1.167,0),h4:b(s,34,1.235,.25),h5:b(s,24,1.334,0),h6:b(a,20,1.6,.15),subtitle1:b(s,16,1.75,.15),subtitle2:b(a,14,1.57,.1),body1:b(s,16,1.5,.15),body2:b(s,14,1.43,.15),button:b(a,14,1.75,.4,dn),caption:b(s,12,1.66,.4),overline:b(s,12,2.66,1,dn),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return we({htmlFontSize:c,pxToRem:h,fontFamily:t,fontSize:o,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l,...u},x,{clone:!1})}const Ma=.2,Fa=.14,Wa=.12;function de(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Ma})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Fa})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Wa})`].join(",")}const za=["none",de(0,2,1,-1,0,1,1,0,0,1,3,0),de(0,3,1,-2,0,2,2,0,0,1,5,0),de(0,3,3,-2,0,3,4,0,0,1,8,0),de(0,2,4,-1,0,4,5,0,0,1,10,0),de(0,3,5,-1,0,5,8,0,0,1,14,0),de(0,3,5,-1,0,6,10,0,0,1,18,0),de(0,4,5,-2,0,7,10,1,0,2,16,1),de(0,5,5,-3,0,8,10,1,0,3,14,2),de(0,5,6,-3,0,9,12,1,0,3,16,2),de(0,6,6,-3,0,10,14,1,0,4,18,3),de(0,6,7,-4,0,11,15,1,0,4,20,3),de(0,7,8,-4,0,12,17,2,0,5,22,4),de(0,7,8,-4,0,13,19,2,0,5,24,4),de(0,7,9,-4,0,14,21,2,0,5,26,4),de(0,8,9,-5,0,15,22,2,0,6,28,5),de(0,8,10,-5,0,16,24,2,0,6,30,5),de(0,8,11,-5,0,17,26,2,0,6,32,5),de(0,9,11,-5,0,18,28,2,0,7,34,6),de(0,9,12,-6,0,19,29,2,0,7,36,6),de(0,10,13,-6,0,20,31,3,0,8,38,7),de(0,10,13,-6,0,21,33,3,0,8,40,7),de(0,10,14,-6,0,22,35,3,0,8,42,7),de(0,11,14,-7,0,23,36,3,0,9,44,8),de(0,11,15,-7,0,24,38,3,0,9,46,8)],_a={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},La={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function pn(e){return`${Math.round(e)}ms`}function Na(e){if(!e)return 0;const r=e/36;return Math.min(Math.round((4+15*r**.25+r/5)*10),3e3)}function Va(e){const r={..._a,...e.easing},t={...La,...e.duration};return{getAutoHeightDuration:Na,create:(i=["all"],s={})=>{const{duration:a=t.standard,easing:l=r.easeInOut,delay:c=0,...g}=s;if(process.env.NODE_ENV!=="production"){const f=m=>typeof m=="string",x=m=>!Number.isNaN(parseFloat(m));!f(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!x(a)&&!f(a)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${a}.`),f(l)||console.error('MUI: Argument "easing" must be a string.'),!x(c)&&!f(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof s!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
65
- `)),Object.keys(g).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(g).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(f=>`${f} ${typeof a=="string"?a:pn(a)} ${l} ${typeof c=="string"?c:pn(c)}`).join(",")},...e,easing:r,duration:t}}const Ua={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Ga(e){return Ie(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Wn(e={}){const r={...e};function t(o){const i=Object.entries(o);for(let s=0;s<i.length;s++){const[a,l]=i[s];!Ga(l)||a.startsWith("unstable_")?delete o[a]:Ie(l)&&(o[a]={...l},t(o[a]))}}return t(r),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
64
+ } });`:Ze(12,v?` (${v})`:"",JSON.stringify(y.main)));return i?(ln(i,y,"light",B,o),ln(i,y,"dark",S,o)):(sn(y,"light",B,o),sn(y,"dark",S,o)),y.contrastText||(y.contrastText=m(y.main)),y};let b;return r==="light"?b=Dn():r==="dark"&&(b=Mn()),process.env.NODE_ENV!=="production"&&(b||console.error(`MUI: The palette mode \`${r}\` is not supported.`)),we({common:{...mt},mode:r,primary:h({color:a,name:"primary"}),secondary:h({color:l,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:c,name:"error"}),warning:h({color:x,name:"warning"}),info:h({color:g,name:"info"}),success:h({color:f,name:"success"}),grey:Ta,contrastThreshold:t,getContrastText:m,augmentColor:h,tonalOffset:o,...b},s)}function Aa(e){const r={};return Object.entries(e).forEach(o=>{const[i,s]=o;typeof s=="object"&&(r[i]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),r}function Ia(e,r){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...r}}function Oa(e){return Math.round(e*1e5)/1e5}const dn={textTransform:"uppercase"},cn='"Roboto", "Helvetica", "Arial", sans-serif';function Da(e,r){const{fontFamily:t=cn,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:g,pxToRem:f,...x}=typeof r=="function"?r(e):r;process.env.NODE_ENV!=="production"&&(typeof o!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const m=o/14,h=f||(y=>`${y/c*m}rem`),b=(y,v,E,B,S)=>({fontFamily:t,fontWeight:y,fontSize:h(v),lineHeight:E,...t===cn?{letterSpacing:`${Oa(B/v)}em`}:{},...S,...g}),u={h1:b(i,96,1.167,-1.5),h2:b(i,60,1.2,-.5),h3:b(s,48,1.167,0),h4:b(s,34,1.235,.25),h5:b(s,24,1.334,0),h6:b(a,20,1.6,.15),subtitle1:b(s,16,1.75,.15),subtitle2:b(a,14,1.57,.1),body1:b(s,16,1.5,.15),body2:b(s,14,1.43,.15),button:b(a,14,1.75,.4,dn),caption:b(s,12,1.66,.4),overline:b(s,12,2.66,1,dn),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return we({htmlFontSize:c,pxToRem:h,fontFamily:t,fontSize:o,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l,...u},x,{clone:!1})}const Fa=.2,Ma=.14,Wa=.12;function le(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Fa})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Ma})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Wa})`].join(",")}const za=["none",le(0,2,1,-1,0,1,1,0,0,1,3,0),le(0,3,1,-2,0,2,2,0,0,1,5,0),le(0,3,3,-2,0,3,4,0,0,1,8,0),le(0,2,4,-1,0,4,5,0,0,1,10,0),le(0,3,5,-1,0,5,8,0,0,1,14,0),le(0,3,5,-1,0,6,10,0,0,1,18,0),le(0,4,5,-2,0,7,10,1,0,2,16,1),le(0,5,5,-3,0,8,10,1,0,3,14,2),le(0,5,6,-3,0,9,12,1,0,3,16,2),le(0,6,6,-3,0,10,14,1,0,4,18,3),le(0,6,7,-4,0,11,15,1,0,4,20,3),le(0,7,8,-4,0,12,17,2,0,5,22,4),le(0,7,8,-4,0,13,19,2,0,5,24,4),le(0,7,9,-4,0,14,21,2,0,5,26,4),le(0,8,9,-5,0,15,22,2,0,6,28,5),le(0,8,10,-5,0,16,24,2,0,6,30,5),le(0,8,11,-5,0,17,26,2,0,6,32,5),le(0,9,11,-5,0,18,28,2,0,7,34,6),le(0,9,12,-6,0,19,29,2,0,7,36,6),le(0,10,13,-6,0,20,31,3,0,8,38,7),le(0,10,13,-6,0,21,33,3,0,8,40,7),le(0,10,14,-6,0,22,35,3,0,8,42,7),le(0,11,14,-7,0,23,36,3,0,9,44,8),le(0,11,15,-7,0,24,38,3,0,9,46,8)],_a={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},La={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function pn(e){return`${Math.round(e)}ms`}function Na(e){if(!e)return 0;const r=e/36;return Math.min(Math.round((4+15*r**.25+r/5)*10),3e3)}function Va(e){const r={..._a,...e.easing},t={...La,...e.duration};return{getAutoHeightDuration:Na,create:(i=["all"],s={})=>{const{duration:a=t.standard,easing:l=r.easeInOut,delay:c=0,...g}=s;if(process.env.NODE_ENV!=="production"){const f=m=>typeof m=="string",x=m=>!Number.isNaN(parseFloat(m));!f(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!x(a)&&!f(a)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${a}.`),f(l)||console.error('MUI: Argument "easing" must be a string.'),!x(c)&&!f(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof s!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
65
+ `)),Object.keys(g).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(g).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(f=>`${f} ${typeof a=="string"?a:pn(a)} ${l} ${typeof c=="string"?c:pn(c)}`).join(",")},...e,easing:r,duration:t}}const Ua={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Ga(e){return Ae(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Wn(e={}){const r={...e};function t(o){const i=Object.entries(o);for(let s=0;s<i.length;s++){const[a,l]=i[s];!Ga(l)||a.startsWith("unstable_")?delete o[a]:Ae(l)&&(o[a]={...l},t(o[a]))}}return t(r),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
66
66
 
67
67
  const theme = ${JSON.stringify(r,null,2)};
68
68
 
69
69
  theme.breakpoints = createBreakpoints(theme.breakpoints || {});
70
70
  theme.transitions = createTransitions(theme.transitions || {});
71
71
 
72
- export default theme;`}function un(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const Ya=e=>{if(!Number.isNaN(+e))return+e;const r=e.match(/\d*\.?\d+/g);if(!r)return 0;let t=0;for(let o=0;o<r.length;o+=1)t+=+r[o];return t};function Ja(e){Object.assign(e,{alpha(r,t){const o=this||e;return o.colorSpace?`oklch(from ${r} l c h / ${typeof t=="string"?`calc(${t})`:t})`:o.vars?`rgba(${r.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof t=="string"?`calc(${t})`:t})`:On(r,Ya(t))},lighten(r,t){const o=this||e;return o.colorSpace?`color-mix(in ${o.colorSpace}, ${r}, #fff ${un(t)})`:Kt(r,t)},darken(r,t){const o=this||e;return o.colorSpace?`color-mix(in ${o.colorSpace}, ${r}, #000 ${un(t)})`:qt(r,t)}})}function mr(e={},...r){const{breakpoints:t,mixins:o={},spacing:i,palette:s={},transitions:a={},typography:l={},shape:c,colorSpace:g,...f}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://v7.mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Ze(20));const x=Tr({...s,colorSpace:g}),m=En(e);let h=we(m,{mixins:Aa(m.breakpoints,o),palette:x,shadows:za.slice(),typography:Da(x,l),transitions:Va(a),zIndex:{...Ua}});if(h=we(h,f),h=r.reduce((b,u)=>we(b,u),h),process.env.NODE_ENV!=="production"){const b=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],u=(y,v)=>{let E;for(E in y){const H=y[E];if(b.includes(E)&&Object.keys(H).length>0){if(process.env.NODE_ENV!=="production"){const S=jr("",E);console.error([`MUI: The \`${v}\` component increases the CSS specificity of the \`${E}\` internal state.`,"You can not override it like this: ",JSON.stringify(y,null,2),"",`Instead, you need to use the '&.${S}' syntax:`,JSON.stringify({root:{[`&.${S}`]:H}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
73
- `))}y[E]={}}}};Object.keys(h.components).forEach(y=>{const v=h.components[y].styleOverrides;v&&y.startsWith("Mui")&&u(v,y)})}return h.unstable_sxConfig={...Yt,...f==null?void 0:f.unstable_sxConfig},h.unstable_sx=function(u){return dt({sx:u,theme:this})},h.toRuntimeSource=Wn,Ja(h),h}function qa(e){let r;return e<1?r=5.11916*e**2:r=4.5*Math.log(e+1)+2,Math.round(r*10)/1e3}const Ka=[...Array(25)].map((e,r)=>{if(r===0)return"none";const t=qa(r);return`linear-gradient(rgba(255 255 255 / ${t}), rgba(255 255 255 / ${t}))`});function zn(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function _n(e){return e==="dark"?Ka:[]}function Xa(e){const{palette:r={mode:"light"},opacity:t,overlays:o,colorSpace:i,...s}=e,a=Tr({...r,colorSpace:i});return{palette:a,opacity:{...zn(a.mode),...t},overlays:o||_n(a.mode),...s}}function Qa(e){var r;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((r=e[1])!=null&&r.match(/(mode|contrastThreshold|tonalOffset)/))}const Za=e=>[...[...Array(25)].map((r,t)=>`--${e?`${e}-`:""}overlays-${t}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],es=e=>(r,t)=>{const o=e.rootSelector||":root",i=e.colorSchemeSelector;let s=i;if(i==="class"&&(s=".%s"),i==="data"&&(s="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(s=`[${i}="%s"]`),e.defaultColorScheme===r){if(r==="dark"){const a={};return Za(e.cssVarPrefix).forEach(l=>{a[l]=t[l],delete t[l]}),s==="media"?{[o]:t,"@media (prefers-color-scheme: dark)":{[o]:a}}:s?{[s.replace("%s",r)]:a,[`${o}, ${s.replace("%s",r)}`]:t}:{[o]:{...t,...a}}}if(s&&s!=="media")return`${o}, ${s.replace("%s",String(r))}`}else if(r){if(s==="media")return{[`@media (prefers-color-scheme: ${String(r)})`]:{[o]:t}};if(s)return s.replace("%s",String(r))}return o};function ts(e,r){r.forEach(t=>{e[t]||(e[t]={})})}function w(e,r,t){!e[r]&&t&&(e[r]=t)}function gt(e){return typeof e!="string"||!e.startsWith("hsl")?e:An(e)}function Pe(e,r){`${r}Channel`in e||(e[`${r}Channel`]=ht(gt(e[r]),`MUI: Can't create \`palette.${r}Channel\` because \`palette.${r}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
74
- To suppress this warning, you need to explicitly provide the \`palette.${r}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function rs(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Ee=e=>{try{return e()}catch{}},ns=(e="mui")=>va(e);function dr(e,r,t,o,i){if(!t)return;t=t===!0?{}:t;const s=i==="dark"?"dark":"light";if(!o){r[i]=Xa({...t,palette:{mode:s,...t==null?void 0:t.palette},colorSpace:e});return}const{palette:a,...l}=mr({...o,palette:{mode:s,...t==null?void 0:t.palette},colorSpace:e});return r[i]={...t,palette:a,opacity:{...zn(s),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||_n(s)},l}function os(e={},...r){const{colorSchemes:t={light:!0},defaultColorScheme:o,disableCssColorScheme:i=!1,cssVarPrefix:s="mui",nativeColor:a=!1,shouldSkipGeneratingVar:l=Qa,colorSchemeSelector:c=t.light&&t.dark?"media":void 0,rootSelector:g=":root",...f}=e,x=Object.keys(t)[0],m=o||(t.light&&x!=="light"?"light":x),h=ns(s),{[m]:b,light:u,dark:y,...v}=t,E={...v};let H=b;if((m==="dark"&&!("dark"in t)||m==="light"&&!("light"in t))&&(H=!0),!H)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${m}\` option is either missing or invalid.`:Ze(21,m));let S;a&&(S="oklch");const C=dr(S,E,H,f,m);u&&!E.light&&dr(S,E,u,void 0,"light"),y&&!E.dark&&dr(S,E,y,void 0,"dark");let B={defaultColorScheme:m,...C,cssVarPrefix:s,colorSchemeSelector:c,rootSelector:g,getCssVar:h,colorSchemes:E,font:{...Ia(C.typography),...C.font},spacing:rs(f.spacing)};Object.keys(B.colorSchemes).forEach(Y=>{const d=B.colorSchemes[Y].palette,I=W=>{const z=W.split("-"),q=z[1],U=z[2];return h(W,d[q][U])};d.mode==="light"&&(w(d.common,"background","#fff"),w(d.common,"onBackground","#000")),d.mode==="dark"&&(w(d.common,"background","#000"),w(d.common,"onBackground","#fff"));function P(W,z,q){if(S){let U;return W===Je&&(U=`transparent ${((1-q)*100).toFixed(0)}%`),W===ne&&(U=`#000 ${(q*100).toFixed(0)}%`),W===oe&&(U=`#fff ${(q*100).toFixed(0)}%`),`color-mix(in ${S}, ${z}, ${U})`}return W(z,q)}if(ts(d,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),d.mode==="light"){w(d.Alert,"errorColor",P(ne,a?h("palette-error-light"):d.error.light,.6)),w(d.Alert,"infoColor",P(ne,a?h("palette-info-light"):d.info.light,.6)),w(d.Alert,"successColor",P(ne,a?h("palette-success-light"):d.success.light,.6)),w(d.Alert,"warningColor",P(ne,a?h("palette-warning-light"):d.warning.light,.6)),w(d.Alert,"errorFilledBg",I("palette-error-main")),w(d.Alert,"infoFilledBg",I("palette-info-main")),w(d.Alert,"successFilledBg",I("palette-success-main")),w(d.Alert,"warningFilledBg",I("palette-warning-main")),w(d.Alert,"errorFilledColor",Ee(()=>d.getContrastText(d.error.main))),w(d.Alert,"infoFilledColor",Ee(()=>d.getContrastText(d.info.main))),w(d.Alert,"successFilledColor",Ee(()=>d.getContrastText(d.success.main))),w(d.Alert,"warningFilledColor",Ee(()=>d.getContrastText(d.warning.main))),w(d.Alert,"errorStandardBg",P(oe,a?h("palette-error-light"):d.error.light,.9)),w(d.Alert,"infoStandardBg",P(oe,a?h("palette-info-light"):d.info.light,.9)),w(d.Alert,"successStandardBg",P(oe,a?h("palette-success-light"):d.success.light,.9)),w(d.Alert,"warningStandardBg",P(oe,a?h("palette-warning-light"):d.warning.light,.9)),w(d.Alert,"errorIconColor",I("palette-error-main")),w(d.Alert,"infoIconColor",I("palette-info-main")),w(d.Alert,"successIconColor",I("palette-success-main")),w(d.Alert,"warningIconColor",I("palette-warning-main")),w(d.AppBar,"defaultBg",I("palette-grey-100")),w(d.Avatar,"defaultBg",I("palette-grey-400")),w(d.Button,"inheritContainedBg",I("palette-grey-300")),w(d.Button,"inheritContainedHoverBg",I("palette-grey-A100")),w(d.Chip,"defaultBorder",I("palette-grey-400")),w(d.Chip,"defaultAvatarColor",I("palette-grey-700")),w(d.Chip,"defaultIconColor",I("palette-grey-700")),w(d.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),w(d.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),w(d.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),w(d.LinearProgress,"primaryBg",P(oe,a?h("palette-primary-main"):d.primary.main,.62)),w(d.LinearProgress,"secondaryBg",P(oe,a?h("palette-secondary-main"):d.secondary.main,.62)),w(d.LinearProgress,"errorBg",P(oe,a?h("palette-error-main"):d.error.main,.62)),w(d.LinearProgress,"infoBg",P(oe,a?h("palette-info-main"):d.info.main,.62)),w(d.LinearProgress,"successBg",P(oe,a?h("palette-success-main"):d.success.main,.62)),w(d.LinearProgress,"warningBg",P(oe,a?h("palette-warning-light"):d.warning.main,.62)),w(d.Skeleton,"bg",S?P(Je,a?h("palette-text-primary"):d.text.primary,.11):`rgba(${I("palette-text-primaryChannel")} / 0.11)`),w(d.Slider,"primaryTrack",P(oe,a?h("palette-primary-main"):d.primary.main,.62)),w(d.Slider,"secondaryTrack",P(oe,a?h("palette-secondary-main"):d.secondary.main,.62)),w(d.Slider,"errorTrack",P(oe,a?h("palette-error-main"):d.error.main,.62)),w(d.Slider,"infoTrack",P(oe,a?h("palette-info-main"):d.info.main,.62)),w(d.Slider,"successTrack",P(oe,a?h("palette-success-main"):d.success.main,.62)),w(d.Slider,"warningTrack",P(oe,a?h("palette-warning-main"):d.warning.main,.62));const W=S?P(ne,a?h("palette-background-default"):d.background.default,.6825):Rt(d.background.default,.8);w(d.SnackbarContent,"bg",W),w(d.SnackbarContent,"color",Ee(()=>S?xr.text.primary:d.getContrastText(W))),w(d.SpeedDialAction,"fabHoverBg",Rt(d.background.paper,.15)),w(d.StepConnector,"border",I("palette-grey-400")),w(d.StepContent,"border",I("palette-grey-400")),w(d.Switch,"defaultColor",I("palette-common-white")),w(d.Switch,"defaultDisabledColor",I("palette-grey-100")),w(d.Switch,"primaryDisabledColor",P(oe,a?h("palette-primary-main"):d.primary.main,.62)),w(d.Switch,"secondaryDisabledColor",P(oe,a?h("palette-secondary-main"):d.secondary.main,.62)),w(d.Switch,"errorDisabledColor",P(oe,a?h("palette-error-main"):d.error.main,.62)),w(d.Switch,"infoDisabledColor",P(oe,a?h("palette-info-main"):d.info.main,.62)),w(d.Switch,"successDisabledColor",P(oe,a?h("palette-success-main"):d.success.main,.62)),w(d.Switch,"warningDisabledColor",P(oe,a?h("palette-warning-main"):d.warning.main,.62)),w(d.TableCell,"border",P(oe,Je(a?h("palette-divider"):d.divider,1),.88)),w(d.Tooltip,"bg",P(Je,a?h("palette-grey-700"):d.grey[700],.92))}if(d.mode==="dark"){w(d.Alert,"errorColor",P(oe,a?h("palette-error-light"):d.error.light,.6)),w(d.Alert,"infoColor",P(oe,a?h("palette-info-light"):d.info.light,.6)),w(d.Alert,"successColor",P(oe,a?h("palette-success-light"):d.success.light,.6)),w(d.Alert,"warningColor",P(oe,a?h("palette-warning-light"):d.warning.light,.6)),w(d.Alert,"errorFilledBg",I("palette-error-dark")),w(d.Alert,"infoFilledBg",I("palette-info-dark")),w(d.Alert,"successFilledBg",I("palette-success-dark")),w(d.Alert,"warningFilledBg",I("palette-warning-dark")),w(d.Alert,"errorFilledColor",Ee(()=>d.getContrastText(d.error.dark))),w(d.Alert,"infoFilledColor",Ee(()=>d.getContrastText(d.info.dark))),w(d.Alert,"successFilledColor",Ee(()=>d.getContrastText(d.success.dark))),w(d.Alert,"warningFilledColor",Ee(()=>d.getContrastText(d.warning.dark))),w(d.Alert,"errorStandardBg",P(ne,a?h("palette-error-light"):d.error.light,.9)),w(d.Alert,"infoStandardBg",P(ne,a?h("palette-info-light"):d.info.light,.9)),w(d.Alert,"successStandardBg",P(ne,a?h("palette-success-light"):d.success.light,.9)),w(d.Alert,"warningStandardBg",P(ne,a?h("palette-warning-light"):d.warning.light,.9)),w(d.Alert,"errorIconColor",I("palette-error-main")),w(d.Alert,"infoIconColor",I("palette-info-main")),w(d.Alert,"successIconColor",I("palette-success-main")),w(d.Alert,"warningIconColor",I("palette-warning-main")),w(d.AppBar,"defaultBg",I("palette-grey-900")),w(d.AppBar,"darkBg",I("palette-background-paper")),w(d.AppBar,"darkColor",I("palette-text-primary")),w(d.Avatar,"defaultBg",I("palette-grey-600")),w(d.Button,"inheritContainedBg",I("palette-grey-800")),w(d.Button,"inheritContainedHoverBg",I("palette-grey-700")),w(d.Chip,"defaultBorder",I("palette-grey-700")),w(d.Chip,"defaultAvatarColor",I("palette-grey-300")),w(d.Chip,"defaultIconColor",I("palette-grey-300")),w(d.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),w(d.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),w(d.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),w(d.LinearProgress,"primaryBg",P(ne,a?h("palette-primary-main"):d.primary.main,.5)),w(d.LinearProgress,"secondaryBg",P(ne,a?h("palette-secondary-main"):d.secondary.main,.5)),w(d.LinearProgress,"errorBg",P(ne,a?h("palette-error-main"):d.error.main,.5)),w(d.LinearProgress,"infoBg",P(ne,a?h("palette-info-main"):d.info.main,.5)),w(d.LinearProgress,"successBg",P(ne,a?h("palette-success-main"):d.success.main,.5)),w(d.LinearProgress,"warningBg",P(ne,a?h("palette-warning-main"):d.warning.main,.5)),w(d.Skeleton,"bg",S?P(Je,a?h("palette-text-primary"):d.text.primary,.13):`rgba(${I("palette-text-primaryChannel")} / 0.13)`),w(d.Slider,"primaryTrack",P(ne,a?h("palette-primary-main"):d.primary.main,.5)),w(d.Slider,"secondaryTrack",P(ne,a?h("palette-secondary-main"):d.secondary.main,.5)),w(d.Slider,"errorTrack",P(ne,a?h("palette-error-main"):d.error.main,.5)),w(d.Slider,"infoTrack",P(ne,a?h("palette-info-main"):d.info.main,.5)),w(d.Slider,"successTrack",P(ne,a?h("palette-success-main"):d.success.main,.5)),w(d.Slider,"warningTrack",P(ne,a?h("palette-warning-light"):d.warning.main,.5));const W=S?P(oe,a?h("palette-background-default"):d.background.default,.985):Rt(d.background.default,.98);w(d.SnackbarContent,"bg",W),w(d.SnackbarContent,"color",Ee(()=>S?Mn.text.primary:d.getContrastText(W))),w(d.SpeedDialAction,"fabHoverBg",Rt(d.background.paper,.15)),w(d.StepConnector,"border",I("palette-grey-600")),w(d.StepContent,"border",I("palette-grey-600")),w(d.Switch,"defaultColor",I("palette-grey-300")),w(d.Switch,"defaultDisabledColor",I("palette-grey-600")),w(d.Switch,"primaryDisabledColor",P(ne,a?h("palette-primary-main"):d.primary.main,.55)),w(d.Switch,"secondaryDisabledColor",P(ne,a?h("palette-secondary-main"):d.secondary.main,.55)),w(d.Switch,"errorDisabledColor",P(ne,a?h("palette-error-main"):d.error.main,.55)),w(d.Switch,"infoDisabledColor",P(ne,a?h("palette-info-main"):d.info.main,.55)),w(d.Switch,"successDisabledColor",P(ne,a?h("palette-success-main"):d.success.main,.55)),w(d.Switch,"warningDisabledColor",P(ne,a?h("palette-warning-light"):d.warning.main,.55)),w(d.TableCell,"border",P(ne,Je(a?h("palette-divider"):d.divider,1),.68)),w(d.Tooltip,"bg",P(Je,a?h("palette-grey-700"):d.grey[700],.92))}a||(Pe(d.background,"default"),Pe(d.background,"paper"),Pe(d.common,"background"),Pe(d.common,"onBackground"),Pe(d,"divider")),Object.keys(d).forEach(W=>{const z=d[W];W!=="tonalOffset"&&!a&&z&&typeof z=="object"&&(z.main&&w(d[W],"mainChannel",ht(gt(z.main))),z.light&&w(d[W],"lightChannel",ht(gt(z.light))),z.dark&&w(d[W],"darkChannel",ht(gt(z.dark))),z.contrastText&&w(d[W],"contrastTextChannel",ht(gt(z.contrastText))),W==="text"&&(Pe(d[W],"primary"),Pe(d[W],"secondary")),W==="action"&&(z.active&&Pe(d[W],"active"),z.selected&&Pe(d[W],"selected")))})}),B=r.reduce((Y,d)=>we(Y,d),B);const D={prefix:s,disableCssColorScheme:i,shouldSkipGeneratingVar:l,getSelector:es(B),enableContrastVars:a},{vars:$,generateThemeVars:X,generateStyleSheets:Q}=ja(B,D);return B.vars=$,Object.entries(B.colorSchemes[B.defaultColorScheme]).forEach(([Y,d])=>{B[Y]=d}),B.generateThemeVars=X,B.generateStyleSheets=Q,B.generateSpacing=function(){return Rn(f.spacing,Sr(this))},B.getColorSchemeSelector=wa(c),B.spacing=B.generateSpacing(),B.shouldSkipGeneratingVar=l,B.unstable_sxConfig={...Yt,...f==null?void 0:f.unstable_sxConfig},B.unstable_sx=function(d){return dt({sx:d,theme:this})},B.toRuntimeSource=Wn,B}function fn(e,r,t){e.colorSchemes&&t&&(e.colorSchemes[r]={...t!==!0&&t,palette:Tr({...t===!0?{}:t.palette,mode:r})})}function Ln(e={},...r){const{palette:t,cssVariables:o=!1,colorSchemes:i=t?void 0:{light:!0},defaultColorScheme:s=t==null?void 0:t.mode,...a}=e,l=s||"light",c=i==null?void 0:i[l],g={...i,...t?{[l]:{...typeof c!="boolean"&&c,palette:t}}:void 0};if(o===!1){if(!("colorSchemes"in e))return mr(e,...r);let f=t;"palette"in e||g[l]&&(g[l]!==!0?f=g[l].palette:l==="dark"&&(f={mode:"dark"}));const x=mr({...e,palette:f},...r);return x.defaultColorScheme=l,x.colorSchemes=g,x.palette.mode==="light"&&(x.colorSchemes.light={...g.light!==!0&&g.light,palette:x.palette},fn(x,"dark",g.dark)),x.palette.mode==="dark"&&(x.colorSchemes.dark={...g.dark!==!0&&g.dark,palette:x.palette},fn(x,"light",g.light)),x}return!t&&!("light"in g)&&l==="light"&&(g.light=!0),os({...a,colorSchemes:g,defaultColorScheme:l,...typeof o!="boolean"&&o},...r)}const is=Ln(),as="$$material";function ss(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const ls=e=>ss(e)&&e!=="classes",ds=sa({themeId:as,defaultTheme:is,rootShouldForwardProp:ls}),cs=ba;process.env.NODE_ENV!=="production"&&(ee.node,ee.object.isRequired);function ps(e){return ya(e)}function us(e){return jr("MuiSvgIcon",e)}ra("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const fs=e=>{const{color:r,fontSize:t,classes:o}=e,i={root:["root",r!=="inherit"&&`color${et(r)}`,`fontSize${et(t)}`]};return Yo(i,us,o)},hs=ds("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,t.color!=="inherit"&&r[`color${et(t.color)}`],r[`fontSize${et(t.fontSize)}`]]}})(cs(({theme:e})=>{var r,t,o,i,s,a,l,c,g,f,x,m,h,b;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(i=(r=e.transitions)==null?void 0:r.create)==null?void 0:i.call(r,"fill",{duration:(o=(t=(e.vars??e).transitions)==null?void 0:t.duration)==null?void 0:o.shorter}),variants:[{props:u=>!u.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((a=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:a.call(s,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(l=e.typography)==null?void 0:l.pxToRem)==null?void 0:c.call(l,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(g=e.typography)==null?void 0:g.pxToRem)==null?void 0:f.call(g,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,u])=>u&&u.main).map(([u])=>{var y,v;return{props:{color:u},style:{color:(v=(y=(e.vars??e).palette)==null?void 0:y[u])==null?void 0:v.main}}}),{props:{color:"action"},style:{color:(m=(x=(e.vars??e).palette)==null?void 0:x.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(b=(h=(e.vars??e).palette)==null?void 0:h.action)==null?void 0:b.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Dt=_e.forwardRef(function(r,t){const o=ps({props:r,name:"MuiSvgIcon"}),{children:i,className:s,color:a="inherit",component:l="svg",fontSize:c="medium",htmlColor:g,inheritViewBox:f=!1,titleAccess:x,viewBox:m="0 0 24 24",...h}=o,b=_e.isValidElement(i)&&i.type==="svg",u={...o,color:a,component:l,fontSize:c,instanceFontSize:r.fontSize,inheritViewBox:f,viewBox:m,hasSvgAsChild:b},y={};f||(y.viewBox=m);const v=fs(u);return n.jsxs(hs,{as:l,className:wn(v.root,s),focusable:"false",color:g,"aria-hidden":x?void 0:!0,role:x?"img":void 0,ref:t,...y,...h,...b&&i.props,ownerState:u,children:[b?i.props.children:i,x?n.jsx("title",{children:x}):null]})});process.env.NODE_ENV!=="production"&&(Dt.propTypes={children:ee.node,classes:ee.object,className:ee.string,color:ee.oneOfType([ee.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),ee.string]),component:ee.elementType,fontSize:ee.oneOfType([ee.oneOf(["inherit","large","medium","small"]),ee.string]),htmlColor:ee.string,inheritViewBox:ee.bool,shapeRendering:ee.string,sx:ee.oneOfType([ee.arrayOf(ee.oneOfType([ee.func,ee.object,ee.bool])),ee.func,ee.object]),titleAccess:ee.string,viewBox:ee.string});Dt.muiName="SvgIcon";function vt(e,r){function t(o,i){return n.jsx(Dt,{"data-testid":process.env.NODE_ENV!=="production"?`${r}Icon`:void 0,ref:i,...o,children:e})}return process.env.NODE_ENV!=="production"&&(t.displayName=`${r}Icon`),t.muiName=Dt.muiName,_e.memo(_e.forwardRef(t))}const gs=vt(n.jsx("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"}),"TuneRounded"),xs=vt(n.jsx("path",{d:"M12 5V3.21c0-.45-.54-.67-.85-.35l-2.8 2.79c-.2.2-.2.51 0 .71l2.79 2.79c.32.31.86.09.86-.36V7c3.31 0 6 2.69 6 6 0 2.72-1.83 5.02-4.31 5.75-.42.12-.69.52-.69.95 0 .65.62 1.16 1.25.97C17.57 19.7 20 16.64 20 13c0-4.42-3.58-8-8-8m-6 8c0-1.34.44-2.58 1.19-3.59.3-.4.26-.95-.09-1.31-.42-.42-1.14-.38-1.5.1-1 1.34-1.6 3-1.6 4.8 0 3.64 2.43 6.7 5.75 7.67.63.19 1.25-.32 1.25-.97 0-.43-.27-.83-.69-.95C7.83 18.02 6 15.72 6 13"}),"RestartAltRounded"),ms=vt(n.jsx("path",{d:"M9.37 5.51c-.18.64-.27 1.31-.27 1.99 0 4.08 3.32 7.4 7.4 7.4.68 0 1.35-.09 1.99-.27C17.45 17.19 14.93 19 12 19c-3.86 0-7-3.14-7-7 0-2.93 1.81-5.45 4.37-6.49M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"}),"DarkModeOutlined"),ys=vt(n.jsx("path",{d:"M12 9c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}),"LightModeOutlined"),hn=e=>{let r;const t=new Set,o=(g,f)=>{const x=typeof g=="function"?g(r):g;if(!Object.is(x,r)){const m=r;r=f??(typeof x!="object"||x===null)?x:Object.assign({},r,x),t.forEach(h=>h(r,m))}},i=()=>r,l={setState:o,getState:i,getInitialState:()=>c,subscribe:g=>(t.add(g),()=>t.delete(g))},c=r=e(o,i,l);return l},bs=(e=>e?hn(e):hn),vs=e=>e;function Ss(e,r=vs){const t=_.useSyncExternalStore(e.subscribe,_.useCallback(()=>r(e.getState()),[e,r]),_.useCallback(()=>r(e.getInitialState()),[e,r]));return _.useDebugValue(t),t}const gn=e=>{const r=bs(e),t=o=>Ss(r,o);return Object.assign(t,r),t},Nn=(e=>e?gn(e):gn);function Cs(e,r){let t;try{t=e()}catch{return}return{getItem:i=>{var s;const a=c=>c===null?null:JSON.parse(c,void 0),l=(s=t.getItem(i))!=null?s:null;return l instanceof Promise?l.then(a):a(l)},setItem:(i,s)=>t.setItem(i,JSON.stringify(s,void 0)),removeItem:i=>t.removeItem(i)}}const yr=e=>r=>{try{const t=e(r);return t instanceof Promise?t:{then(o){return yr(o)(t)},catch(o){return this}}}catch(t){return{then(o){return this},catch(o){return yr(o)(t)}}}},js=(e,r)=>(t,o,i)=>{let s={storage:Cs(()=>window.localStorage),partialize:y=>y,version:0,merge:(y,v)=>({...v,...y}),...r},a=!1,l=0;const c=new Set,g=new Set;let f=s.storage;if(!f)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),t(...y)},o,i);const x=()=>{const y=s.partialize({...o()});return f.setItem(s.name,{state:y,version:s.version})},m=i.setState;i.setState=(y,v)=>(m(y,v),x());const h=e((...y)=>(t(...y),x()),o,i);i.getInitialState=()=>h;let b;const u=()=>{var y,v;if(!f)return;const E=++l;a=!1,c.forEach(S=>{var C;return S((C=o())!=null?C:h)});const H=((v=s.onRehydrateStorage)==null?void 0:v.call(s,(y=o())!=null?y:h))||void 0;return yr(f.getItem.bind(f))(s.name).then(S=>{if(S)if(typeof S.version=="number"&&S.version!==s.version){if(s.migrate){const C=s.migrate(S.state,S.version);return C instanceof Promise?C.then(B=>[!0,B]):[!0,C]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,S.state];return[!1,void 0]}).then(S=>{var C;if(E!==l)return;const[B,D]=S;if(b=s.merge(D,(C=o())!=null?C:h),t(b,!0),B)return x()}).then(()=>{E===l&&(H==null||H(o(),void 0),b=o(),a=!0,g.forEach(S=>S(b)))}).catch(S=>{E===l&&(H==null||H(void 0,S))})};return i.persist={setOptions:y=>{s={...s,...y},y.storage&&(f=y.storage)},clearStorage:()=>{f==null||f.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>u(),hasHydrated:()=>a,onHydrate:y=>(c.add(y),()=>{c.delete(y)}),onFinishHydration:y=>(g.add(y),()=>{g.delete(y)})},s.skipHydration||u(),b||h},ws=js,Re={appName:"Crystal Ball",appTagline:"Run your whole business in one place",logoMode:"icon",logoUrl:"",iconColor:"#1565c0",presetId:"corporate",mode:"light",primaryHex:"#1565c0",secondaryHex:"#00897b",highlightHex:"",errorHex:"#d32f2f",warningHex:"#ed6c02",infoHex:"#0288d1",successHex:"#2e7d32",cardBgHex:"",cardHdrHex:"",pageBgHex:"",notifCardHex:"",textPrimaryHex:"",textSecondaryHex:"",dividerHex:"",btnColorHex:"",btnTextHex:"",h1Color:"",h2Color:"",h3Color:"",h4Color:"",h5Color:"",h6Color:"",fontFamily:"Roboto",headingFont:"Figtree",customFonts:[],customHeadFonts:[],textSize:"df",baseFontPx:0,bodyLineHeight:0,bodyWeight:0,letterSpace:0,scaleRatio:"default",scaleRatioCustom:0,h1Size:0,h2Size:0,h3Size:0,h4Size:0,h5Size:0,h6Size:0,h1Weight:0,h2Weight:0,h3Weight:0,h4Weight:0,h5Weight:0,h6Weight:0,headingWeight:600,headingLH:0,radiusPreset:"rounded",radiusVal:9,density:"default",densityScale:0,cardShadowPx:-1,contrast:"medium",contrastMode:"auto",containerPadPx:0,edgePadPx:0,cardGapPx:0,cardStyle:"soft",cardHeader:"plain",surfaceTint:"snow",nestedStyle:"recessed",nestedDepth:-1,headerStrength:-1,tintIntensity:-1,btnCase:"upper",accentGradient:!1,statusBold:!1,mapGlass:"light",chartScheme:"brand",tableDensity:"default",tableColDensity:"default",tableDividers:!1,tableColDividers:!1,tableRowDivW:1,tableColDivW:1,tableStripe:!1,tableHeaderStyle:"tinted",tableCellAlignH:"left",tableCellAlignV:"middle",notifPosition:"bottom-right",notifStyle:"toast",notifAccent:"severity",notifBadge:!0,notifAutoDismiss:!1,autoDismissSec:0,toastW:0,navPattern:"sidebar",sidebarWidth:220,appBarH:0,loginLayout:"split",loginImage:"",loginShowTagline:!0,loginPanelColor:"",loginImgOpacity:0,loginCardW:0},$e=e=>JSON.stringify(e);function cr(e){const r={...Re};if(e&&typeof e=="object")for(const t of Object.keys(Re)){const o=e[t];o!==void 0&&typeof o==typeof Re[t]&&(r[t]=o)}return r}function Ts(e){if(!e||typeof e!="object")return!1;const r=Object.keys(Re);let t=0;for(const o of r){const i=e[o];i!==void 0&&typeof i==typeof Re[o]&&t++}return t/r.length>=.5}const L=Nn()(ws((e,r)=>({settings:{...Re},savedThemes:[],baseline:$e(Re),editingSavedId:null,lastImportedId:null,set:t=>e(o=>({settings:{...o.settings,...t,presetId:"custom"}})),applyPreset:(t,o)=>e(i=>{const s={...i.settings,...o,presetId:t};return{settings:s,baseline:$e(s),editingSavedId:null,lastImportedId:null}}),reset:()=>e(()=>({settings:{...Re},baseline:$e(Re),editingSavedId:null,lastImportedId:null})),captureBaseline:()=>e(t=>({baseline:$e(t.settings)})),restoreBaseline:()=>e(t=>{try{return{settings:JSON.parse(t.baseline)}}catch{return{}}}),isDirty:()=>$e(r().settings)!==r().baseline,saveTheme:t=>e(o=>{const i="cust"+Date.now(),s={...o.settings};return{savedThemes:[...o.savedThemes,{id:i,name:t,snap:s}],settings:{...o.settings,presetId:i},baseline:$e({...o.settings,presetId:i}),editingSavedId:i,lastImportedId:null}}),updateSaved:(t,o,i)=>e(s=>{const a={...i,presetId:t};return{savedThemes:s.savedThemes.map(l=>l.id===t?{...l,name:o,snap:i}:l),settings:a,baseline:$e(a),editingSavedId:t,lastImportedId:null}}),applySaved:t=>e(()=>{const o={...cr(t.snap),presetId:t.id};return{settings:o,baseline:$e(o),editingSavedId:t.id,lastImportedId:null}}),renameSaved:(t,o)=>e(i=>({savedThemes:i.savedThemes.map(s=>s.id===t?{...s,name:o}:s)})),deleteSaved:t=>e(o=>({savedThemes:o.savedThemes.filter(i=>i.id!==t),editingSavedId:o.editingSavedId===t?null:o.editingSavedId,lastImportedId:o.lastImportedId===t?null:o.lastImportedId})),importTheme:(t,o)=>{const i=cr(o),s={id:"imp"+Date.now(),name:t,snap:i};return e(a=>{const l={...i,presetId:s.id};return{savedThemes:[s,...a.savedThemes],settings:l,baseline:$e(l),editingSavedId:s.id,lastImportedId:s.id}}),s}}),{name:"omnieye-theme-studio",merge:(e,r)=>{const t=e??{};return{...r,...t,settings:cr(t.settings)}}}));function He(e){const r=e==="dark";return{studioBg:r?"#15181d":"#f5f7fa",studioBd:r?"#2a2f38":"#d8dee6",card:r?"#1e222a":"#ffffff",cardBd:r?"#2b313b":"#e6eaf0",inset:r?"#262b34":"#f7f9fb",insetBd:r?"#363d48":"#e9edf2",divider:r?"#262b34":"#f0f3f7",iconTile:r?"#2b313b":"#eef1f6",text:r?"rgba(255,255,255,0.92)":"#1c2127",label:r?"rgba(255,255,255,0.5)":"#9aa4b0",label2:r?"rgba(255,255,255,0.6)":"#7a8593",body:r?"rgba(255,255,255,0.78)":"#5a6573",muted:r?"rgba(255,255,255,0.42)":"#aeb6c0",chevron:r?"rgba(255,255,255,0.42)":"#b3bcc7"}}function br(e){if(!e||e.length<7)return[210,60,45];const r=parseInt(e.slice(1,3),16)/255,t=parseInt(e.slice(3,5),16)/255,o=parseInt(e.slice(5,7),16)/255,i=Math.max(r,t,o),s=Math.min(r,t,o),a=i-s;let l=0,c=0;const g=(i+s)/2;return a&&(c=a/(1-Math.abs(2*g-1)),i===r?l=(t-o)/a%6:i===t?l=(o-r)/a+2:l=(r-t)/a+4,l=Math.round(l*60),l<0&&(l+=360)),[l,Math.round(c*100),Math.round(g*100)]}function le(e,r,t){r/=100,t/=100;const o=i=>{const s=(i+e/30)%12,a=r*Math.min(t,1-t);return Math.round((t-a*Math.max(-1,Math.min(s-3,Math.min(9-s,1))))*255).toString(16).padStart(2,"0")};return"#"+o(0)+o(8)+o(4)}function Se(e){try{const[r,t]=br(e),o=Math.max(t,18);return{50:le(r,Math.max(Math.round(o*.3),10),96),100:le(r,Math.max(Math.round(o*.42),12),91),200:le(r,Math.max(Math.round(o*.55),16),82),300:le(r,Math.max(Math.round(o*.7),20),70),400:le(r,o,60),500:e,600:le(r,Math.min(o+4,100),44),700:le(r,Math.min(o+8,100),36),800:le(r,Math.max(Math.round(o*.92),16),26),900:le(r,Math.max(Math.round(o*.8),14),16)}}catch{return{50:"#eef",100:"#dde",200:"#bbd",300:"#99c",400:"#77b",500:e||"#1565c0",600:"#1257a8",700:"#0e4488",800:"#0a3266",900:"#062044"}}}function pr(e,r){try{const t=l=>{const c=[1,3,5].map(g=>{const f=parseInt(l.slice(g,g+2),16)/255;return f<=.04045?f/12.92:Math.pow((f+.055)/1.055,2.4)});return .2126*c[0]+.7152*c[1]+.0722*c[2]},o=t(e),i=t(r),s=Math.max(o,i),a=Math.min(o,i);return(s+.05)/(a+.05)}catch{return 1}}function ce(e,r){if(!e||e[0]!=="#"||e.length<7)return"rgba(20,30,48,"+r+")";const t=parseInt(e.slice(1,3),16),o=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16);return"rgba("+t+","+o+","+i+","+r+")"}function kr(e){const r=Se(e.primaryHex),t=Se(e.secondaryHex),o=e.mode==="dark",i=o?r[300]:e.primaryHex,s=o?t[300]:e.secondaryHex,a={pMain:i,pDark:r[700],pLight:r[300],highlight:e.highlightHex||"#ffd400",highlightSoft:ce(e.highlightHex||"#ffd400",.15),highlightBd:ce(e.highlightHex||"#ffd400",.34),pContrast:e.contrastMode==="light"?"#ffffff":e.contrastMode==="dark"?"rgba(0,0,0,0.87)":pr(i,"#ffffff")>=2.9?"#ffffff":"rgba(0,0,0,0.87)",pContainer:o?ce(e.primaryHex,.26):r[50],onPContainer:o?r[100]:r[800],sMain:s,sContrast:pr(s,"#ffffff")>=2.9?"#ffffff":"rgba(0,0,0,0.87)",bgDefault:o?"#121212":"#f3f5f8",paper:o?"#1e1e1e":"#ffffff",paper2:o?"#262630":"#f6f8fb",frameGutterBg:o?"#0a0a0a":"#e3e7ec",footerBg:o?"#17171c":"#eceef2",textPrimary:o?"rgba(255,255,255,0.92)":"rgba(0,0,0,0.87)",textSecondary:o?"rgba(255,255,255,0.62)":"rgba(0,0,0,0.6)",textDisabled:o?"rgba(255,255,255,0.4)":"rgba(0,0,0,0.38)",divider:o?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.12)",outline:o?"rgba(255,255,255,0.23)":"rgba(0,0,0,0.23)"},l=e.statusBold,c=l?e.errorHex:ce(e.errorHex,o?.22:.13),g=l?e.warningHex:ce(e.warningHex,o?.22:.14),f=l?e.infoHex:ce(e.infoHex,o?.22:.13),x=l?e.successHex:ce(e.successHex,o?.22:.13),m=l?"#ffffff":o?Se(e.errorHex)[300]:e.errorHex,h=l?"#ffffff":o?Se(e.warningHex)[300]:Se(e.warningHex)[700],b=l?"#ffffff":o?Se(e.infoHex)[300]:e.infoHex,u=l?"#ffffff":o?Se(e.successHex)[300]:Se(e.successHex)[700],y=br(e.primaryHex)[0],v={neutral:[220,6],warm:[32,26],cool:[210,30],brand:[y,42],slate:[214,16],snow:[0,0]},E=v[e.surfaceTint]||v.neutral,H=e.tintIntensity>=0?e.tintIntensity:100,S=[E[0],Math.round(E[1]*H/100)];o?(a.bgDefault=le(S[0],Math.round(S[1]*.7),7),a.paper=le(S[0],Math.round(S[1]*.7),13),a.paper2=le(S[0],Math.round(S[1]*.85),19)):e.surfaceTint==="snow"&&!(e.tintIntensity>0)?(a.bgDefault="#ffffff",a.paper="#ffffff",a.paper2="#ffffff"):(a.bgDefault=le(S[0],Math.round(S[1]*.9),e.surfaceTint==="brand"?92:e.surfaceTint==="cool"?94:96),a.paper=le(S[0],Math.round(S[1]*.4),99),a.paper2=le(S[0],Math.round(S[1]*.85),e.surfaceTint==="brand"?95:96.5)),e.pageBgHex&&(a.bgDefault=e.pageBgHex),e.cardBgHex&&(a.paper=e.cardBgHex);const C={soft:0,standard:1,medium:2,high:3},B=C[e.contrast]!==void 0?C[e.contrast]:1,D=o?[["rgba(255,255,255,0.82)","rgba(255,255,255,0.55)","rgba(255,255,255,0.09)","rgba(255,255,255,0.16)"],["rgba(255,255,255,0.92)","rgba(255,255,255,0.62)","rgba(255,255,255,0.12)","rgba(255,255,255,0.23)"],["rgba(255,255,255,0.96)","rgba(255,255,255,0.74)","rgba(255,255,255,0.18)","rgba(255,255,255,0.34)"],["#ffffff","rgba(255,255,255,0.87)","rgba(255,255,255,0.26)","rgba(255,255,255,0.46)"]]:[["rgba(0,0,0,0.72)","rgba(0,0,0,0.5)","rgba(0,0,0,0.08)","rgba(0,0,0,0.16)"],["rgba(0,0,0,0.87)","rgba(0,0,0,0.6)","rgba(0,0,0,0.12)","rgba(0,0,0,0.23)"],["rgba(0,0,0,0.92)","rgba(0,0,0,0.7)","rgba(0,0,0,0.18)","rgba(0,0,0,0.34)"],["#000000","rgba(0,0,0,0.8)","rgba(0,0,0,0.24)","rgba(0,0,0,0.46)"]];a.textPrimary=D[B][0],a.textSecondary=D[B][1],a.divider=D[B][2],a.outline=D[B][3],e.textPrimaryHex&&(a.textPrimary=e.textPrimaryHex),e.textSecondaryHex&&(a.textSecondary=e.textSecondaryHex),e.dividerHex&&(a.divider=e.dividerHex),e.nestedStyle==="lighter"?a.paper2=o?le(S[0],Math.round(S[1]*.9),22):le(S[0],Math.max(Math.round(S[1]*.3),4),100):e.nestedStyle==="bordered"?a.paper2=a.paper:a.paper2=o?le(S[0],Math.round(S[1]*.9),Math.max(3,5)):le(S[0],Math.min(Math.round(S[1]*1.1),60),Math.max(88,94-S[1]*.18));const $=e.btnColorHex||i,X=e.accentGradient?"linear-gradient(135deg,"+$+","+(e.btnColorHex?Se(e.btnColorHex)[700]:r[o?500:700])+")":$,Q=e.btnTextHex||(pr($,"#ffffff")>=2.9?"#ffffff":"rgba(0,0,0,0.87)"),Y=e.h1Color||null,d=e.h2Color||null,I=e.h3Color||null,P=e.h4Color||null,W=e.h5Color||null,z=e.h6Color||null,q=[{key:"sm",px:13},{key:"df",px:12},{key:"lg",px:18}],U=q.find(me=>me.key===e.textSize)||q[1],G=e.baseFontPx>0?e.baseFontPx:U.px,R=e.bodyLineHeight>0?e.bodyLineHeight:1.5,O=e.h1Size>0?e.h1Size:20,J=Math.round(O*1.1),V=O,N=Math.max(Math.round(O*.9),11),M=Math.max(Math.round(O*.8),11),j=Math.max(Math.round(O*.7),10),A=Math.max(Math.round(O*.6),10),k=Math.max(Math.round(O*.5),9),T=G,K=Math.round(G*.92),se=Math.round(G*.8),F=Math.round(G*.72),fe=e.headingWeight,Oe=e.headingLH>0?e.headingLH:1.2,De=e.bodyWeight>0?e.bodyWeight:400,Ve=Math.min(900,De+200),Ue={compact:.82,default:1,comfortable:1.16},Be=e.densityScale>0?e.densityScale/100:Ue[e.density]??1,Xt=Math.round(20*Be),Me=Math.round(14*Be),St=e.cardGapPx>0?e.cardGapPx:Math.round(16*Be),Ge=Math.round(11*Be*({compact:.66,default:1,comfortable:1.32}[e.tableDensity]??1)),Fe=e.containerPadPx>0?e.containerPadPx:Math.round(10*Be),Z=e.radiusVal,ct=Z+"px",pt=Math.max(Math.round(Z*.6),2)+"px",We={0:"none",1:"0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12)",2:"0px 3px 3px -2px rgba(0,0,0,0.2),0px 3px 4px 0px rgba(0,0,0,0.14),0px 1px 8px 0px rgba(0,0,0,0.12)",4:"0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)",8:"0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12)"},Rr="1px solid rgba(255,255,255,0.06)";let ut,Ye,Ct;e.cardStyle==="outlined"?(ut="none",Ye="1.5px solid "+a.outline,Ct="none"):e.cardStyle==="soft"?(ut=We[1],Ye=o?Rr:"none",Ct=We[1]):(ut=We[8],Ye=o?Rr:"none",Ct=We[4]),e.cardShadowPx>=0&&(ut="0 "+Math.round(e.cardShadowPx*.45)+"px "+e.cardShadowPx+"px rgba(16,24,40,"+(o?.55:.16)+")");let jt="transparent",Er="1px solid "+a.divider,Qt="none";e.cardHeader==="plain"?Er="none":e.cardHeader==="tinted"?jt=a.pContainer:e.cardHeader==="accent"&&(Qt="inset 3px 0 0 "+i),e.headerStrength>=0&&(e.cardHeader==="tinted"?jt=ce(e.primaryHex,(o?.14:.08)*(e.headerStrength/100)):e.cardHeader==="accent"&&(Qt="inset "+Math.round(e.headerStrength*.06)+"px 0 0 "+i)),e.cardHdrHex&&(jt=e.cardHdrHex);const Gn=o?"none":We[4],Yn=o?"1px solid "+a.divider:"none",Jn=e.nestedStyle==="bordered"?"1.5px solid "+a.outline:"1px solid "+a.divider,qn=e.nestedDepth>0?"inset 3px 0 0 "+ce(e.primaryHex,.55)+", 0 "+Math.round(e.nestedDepth*.4)+"px "+e.nestedDepth+"px rgba(16,24,40,"+(o?.42:.1)+")":"none",Kn=(e.appName||"").trim().split(/\s+/).slice(0,2).map(me=>me[0]||"").join("").toUpperCase()||"AP",Xn=!!(e.logoMode==="image"&&e.logoUrl),Qn=!!e.loginImage,Hr=me=>{const be=me||"Roboto";return be.includes(" ")&&!be.startsWith('"')&&!be.startsWith("'")?`"${be}"`:be},Zn=Hr(e.headingFont||e.fontFamily),eo=Hr(e.fontFamily),ye=br(e.primaryHex)[0],xe=(me,be)=>le((me%360+360)%360,62,o?60:46),Pr={brand:[i,s,xe(ye+42),xe(ye+205),xe(ye+120)],categorical:[xe(ye),xe(ye+72),xe(ye+144),xe(ye+216),xe(ye+288)],sequential:[le(ye,55,o?40:78),le(ye,60,o?50:64),i,le(ye,70,o?70:38),le(ye,78,o?82:26)],cbsafe:["#0072B2","#E69F00","#009E73","#CC79A7","#56B4E9"],warm:[xe(8),xe(28),xe(45),xe(350),xe(18)],cool:[xe(200),xe(220),xe(255),xe(180),xe(235)]},to=Pr[e.chartScheme]||Pr.brand,ro=[r[600],t[600],le((ye+42)%360,55,46),le((ye+205)%360,50,46)],no={error:{cb:c,cc:m},success:{cb:x,cc:u},info:{cb:f,cc:b},warning:{cb:g,cc:h}},Zt=e.mapGlass==="light",oo=Zt?"rgba(255,255,255,0.84)":"rgba(15,20,28,0.74)",io=Zt?"#1c2733":"#f3f6fa",ao=Zt?"rgba(0,0,0,0.12)":"rgba(255,255,255,0.18)",so="repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 11px, rgba(255,255,255,0) 11px, rgba(255,255,255,0) 22px), radial-gradient(circle at 50% 38%, "+ce(i,.22)+", rgba(0,0,0,0) 60%), "+"#0f141c",lo="linear-gradient(135deg,"+i+","+r[700]+")",co="linear-gradient(180deg,"+ce(r[900],.12)+","+ce(r[900],.55)+")",po="linear-gradient(135deg,"+r[700]+","+r[900]+")",uo="linear-gradient(135deg,"+ce(r[900],.55)+","+ce(e.primaryHex,.45)+")",$r={"top-right":{top:"14px",right:"14px"},"top-center":{top:"14px",left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:"14px",right:"14px"},"bottom-left":{bottom:"14px",left:"14px"}},fo=$r[e.notifPosition]||$r["top-right"],Ir=e.notifAccent==="primary"?{bar:i,icbg:a.pContainer,icc:a.onPContainer,dot:i}:e.notifAccent==="mono"?{bar:a.textSecondary,icbg:a.paper2,icc:a.textPrimary,dot:a.textSecondary}:{bar:e.warningHex,icbg:g,icc:h,dot:e.warningHex};let wt;e.notifStyle==="toast"?wt={boxShadow:We[8],border:typeof Ye=="string"&&Ye!=="none"?Ye:"none"}:e.notifStyle==="banner"?wt={boxShadow:We[2],borderLeft:"4px solid "+Ir.bar}:wt={boxShadow:"none",border:"1px solid "+a.divider};const ho=e.notifCardHex||(o?"#1e1e1e":"#ffffff"),go={compact:"7px",default:"11px",comfortable:"16px"},xo={compact:"6px",default:"12px",comfortable:"22px"},mo={top:"flex-start",middle:"center",bottom:"flex-end"},yo={left:"flex-start",center:"center",right:"flex-end"},bo={plain:"transparent",tinted:a.paper2,accent:a.highlightSoft},vo={rowPy:go[e.tableDensity]||"11px",cellPx:xo[e.tableColDensity]||"12px",rowBorder:e.tableDividers?(e.tableRowDivW||1)+"px solid "+a.divider:"none",colBorder:e.tableColDividers?(e.tableColDivW||1)+"px solid "+a.divider:"none",headBg:bo[e.tableHeaderStyle]||a.paper2,cellAI:mo[e.tableCellAlignV]||"center",cellJC:yo[e.tableCellAlignH]||"flex-start",stripeBg:o?"rgba(255,255,255,0.035)":"rgba(0,0,0,0.028)",statusMap:{Delivered:{sb:x,sc:u},Processing:{sb:a.pContainer,sc:o?a.pLight:a.pDark},Pending:{sb:g,sc:h},Shipped:{sb:f,sc:b}},filters:["All","Delivered","Processing","Pending"].map((me,be)=>({label:me,bg:be===0?a.highlightSoft:"transparent",c:be===0?a.textPrimary:a.textSecondary,brd:be===0?a.highlightBd:a.outline}))},So={sm:"Small",df:"Default",lg:"Large"},Co={compact:"Compact",default:"Default",comfortable:"Comfortable"},jo={outlined:"Outlined",soft:"Soft",floating:"Floating"},wo={sharp:"Sharp",rounded:"Rounded",round:"Round"},To=[{key:"sidebar",label:"Sidebar",desc:"Full drawer",ic:"▤"},{key:"rail",label:"Rail",desc:"Icons only",ic:"▥"},{key:"topbar",label:"Top Bar",desc:"Horizontal",ic:"▦"}],ko=e.fontFamily+" · "+(So[e.textSize]||"Default"),Bo=(wo[e.radiusPreset]||"Custom")+" · "+(Co[e.density]||"Default")+" · "+(jo[e.cardStyle]||"Soft"),Ro=[{label:"General",ic:"◉"},{label:"Appearance",ic:"◧"},{label:"Modules",ic:"◫"},{label:"Team",ic:"◍"},{label:"Security",ic:"▣"},{label:"Billing",ic:"◳"}].map((me,be)=>({...me,on:be===1,bg:be===1?a.highlightSoft:"transparent",c:be===1?a.textPrimary:a.textSecondary,bar:be===1?"3px solid "+a.highlight:"3px solid transparent"})),Eo=To.map(me=>({...me,active:e.navPattern===me.key,brd:e.navPattern===me.key?i:a.divider,bg:e.navPattern===me.key?a.pContainer:a.paper,color:e.navPattern===me.key?a.onPContainer:a.textPrimary})),Ho=e.sidebarWidth,Po=e.appBarH>0?e.appBarH:56,$o=e.appBarH>0?e.appBarH+"px":"Auto (56px)";return{pal:r,spal:t,isDark:o,pMain:i,sMain:s,t:a,errSoft:c,warnSoft:g,infoSoft:f,sucSoft:x,errTxt:m,warnTxt:h,infoTxt:b,sucTxt:u,sevMap:no,accentBg:X,btnText:Q,hc1:Y,hc2:d,hc3:I,hc4:P,hc5:W,hc6:z,base:G,bodyLH:R,h1base:O,tDisplay:J,tH1:V,tH2:N,tTitle:M,tH4:j,tH5:A,tH6:k,tBody:T,tBodySm:K,tCaption:se,tOverline:F,wH1:fe,wH2:fe,wH3:fe,wH4:fe,wH5:fe,wH6:fe,headLH:Oe,bodyWeightEff:De,bwEmph:Ve,pad:Xt,padSm:Me,gap:St,rowPy:Ge,screenPad:Fe,r:Z,rad:ct,radSm:pt,SH:We,cardShadow:ut,cardBorder:Ye,btnShadow:Ct,cardHdrBg:jt,cardHdrBorder:Er,cardHdrAccent:Qt,appbarShadow:Gn,appbarBorder:Yn,nestBorder:Jn,nestShadow:qn,iconInitials:Kn,hasLogo:Xn,hasLoginImage:Qn,headFam:Zn,bodyFam:eo,chartHue:ye,chartPalette:to,avatarColors:ro,overlaySurface:oo,onOverlay:io,overlayBorder:ao,mediaBg:so,loginBrandGrad:lo,loginScrimGrad:co,loginCenteredGrad:po,loginScrimGradC:uo,npos:fo,nacc:Ir,toastDeco:wt,toastBg:ho,btnCase:e.btnCase!=="none"?"uppercase":"none",table:vo,typeSummary:ko,shapeSummary:Bo,settingsCats:Ro,navSettingsChips:Eo,sidebarWidth:Ho,appBarHEff:Po,appBarHLabel:$o}}function ks({icon:e,title:r,info:t,open:o,dimmed:i,onToggle:s,onPreviewMenu:a,children:l}){const c=L(v=>v.settings),g=c.mode==="dark",f=c.primaryHex||"#1565c0",x=He(c.mode),m=Se(f),h=kr(c),b=o?g?ce(f,.22):ce(f,.1):"transparent",u=o?g?m[200]:m[700]:x.text,y=o?f:x.chevron;return n.jsxs(p.Box,{sx:{background:b,opacity:i?.3:1,transform:o?"translateY(-2px)":"none",transition:"opacity .22s ease, transform .22s ease",borderBottom:`1px solid ${x.divider}`,overflow:"hidden"},children:[n.jsxs(p.Box,{component:"button",onClick:s,sx:{width:"100%",display:"flex",alignItems:"center",gap:"9px",p:"7px 11px",background:"transparent",border:"none",textAlign:"left",cursor:"pointer",fontFamily:"inherit"},children:[n.jsx(p.Box,{sx:{width:32,height:32,borderRadius:"10px",background:x.iconTile,color:x.body,display:"grid",placeItems:"center",flexShrink:0,position:"relative"},children:e}),n.jsx(p.Box,{sx:{flex:1,minWidth:0},children:n.jsx(p.Box,{sx:{fontSize:`${h.tH5}px`,fontWeight:h.wH5,fontFamily:`${h.headFam},sans-serif`,lineHeight:1.25,color:u,letterSpacing:"-.2px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r})}),a&&n.jsx(p.Box,{component:"span",title:"Change preview screen",onClick:v=>{v.stopPropagation(),a()},sx:{width:16,height:16,mr:"6px",flexShrink:0,cursor:"pointer",display:"grid",placeItems:"center",color:x.chevron,transition:"filter .15s ease, transform .1s ease","&:hover":{filter:"brightness(1.15)",transform:"scale(1.12)"}},children:n.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}),n.jsx("path",{d:"M8 21h8M12 17v4"})]})}),t&&n.jsx(p.Box,{component:"span",title:t,sx:{width:15,height:15,borderRadius:"50%",border:`1.2px solid ${x.chevron}`,color:x.chevron,fontSize:"9px",fontWeight:800,fontStyle:"italic",fontFamily:"Georgia, serif",display:"grid",placeItems:"center",mr:"7px",flexShrink:0,cursor:"help"},children:"i"}),n.jsx(p.Box,{sx:{width:20,height:20,borderRadius:"6px",display:"grid",placeItems:"center",fontSize:"9px",color:y,flexShrink:0,transition:"background .18s, border-color .18s"},children:n.jsx(p.Box,{component:"span",sx:{display:"block",lineHeight:1,transform:o?"rotate(180deg)":"none",transition:"transform .2s"},children:"▼"})})]}),n.jsx(p.Collapse,{in:o,unmountOnExit:!0,timeout:280,children:n.jsx(p.Box,{sx:{p:"2px 13px 12px",borderTop:`1px solid ${x.divider}`},children:l})})]})}function ve(){const e=L(r=>r.settings);return _.useMemo(()=>kr(e),[e])}function tt({tabs:e,active:r,onChange:t}){const o=L(m=>m.settings.mode),i=L(m=>m.settings.primaryHex)||"#1565c0",s=L(m=>m.settings.highlightHex)||"#ffd400",a=L(m=>m.settings.bodyWeight)||400,l=o==="dark",c=Math.min(900,a+200),g=ve(),f=l?"#e6edf3":"#1c2127",x=l?"#cdd4de":"#5a6573";return n.jsx(p.Box,{sx:{display:"flex",gap:"2px",mb:"2px",px:"2px",borderBottom:"1.5px solid rgba(120,130,145,0.5)"},children:e.map(m=>{const h=m.key===r,b=n.jsx(p.Button,{onClick:()=>t(m.key),disableRipple:!0,sx:{flex:1,minWidth:0,px:"2px",pt:"9px",pb:"8px",minHeight:44,borderRadius:"6px 6px 0 0",mb:"-1px",fontSize:`${g.tBodySm}px`,fontFamily:`${g.headFam},sans-serif`,fontWeight:h?c:a,letterSpacing:0,textTransform:"none",whiteSpace:"normal",lineHeight:1.15,textAlign:"center",color:h?f:x,opacity:h?1:.3,bgcolor:h?ce(s,l?.26:.18):"transparent",borderBottom:h?`3px solid ${i}`:"2px solid transparent",transition:"color .16s ease, background .16s ease, border-color .16s ease, opacity .16s ease","&:hover":h?{bgcolor:ce(s,l?.26:.18)}:{opacity:1,bgcolor:"rgba(150,160,175,0.35)",borderRadius:"8px",boxShadow:"0 6px 18px rgba(0,0,0,0.35)",transform:"translateY(-2px)"}},children:m.label},m.key);return m.info?n.jsx(p.Tooltip,{title:m.info,arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:b},m.key):b})})}const Mt=[{id:"corporate",name:"Corporate Blue",snap:{primaryHex:"#1565c0",secondaryHex:"#00897b",iconColor:"#1565c0"}},{id:"emerald",name:"Emerald",snap:{primaryHex:"#2e7d32",secondaryHex:"#00897b",iconColor:"#2e7d32"}},{id:"indigo",name:"Indigo Violet",snap:{primaryHex:"#3949ab",secondaryHex:"#7c4dff",iconColor:"#3949ab"}},{id:"slate",name:"Graphite",snap:{primaryHex:"#455a64",secondaryHex:"#78909c",iconColor:"#455a64"}},{id:"teal",name:"Ocean Teal",snap:{primaryHex:"#00838f",secondaryHex:"#0277bd",iconColor:"#00838f"}},{id:"amber",name:"Amber",snap:{primaryHex:"#e65100",secondaryHex:"#d84315",iconColor:"#e65100"}}];function Bs(){var N,M;const[e,r]=_.useState("presets"),t=L(j=>j.settings),o=t.mode==="dark",i=t.highlightHex||"#ffd400",s=ce(i,o?.3:.18),a=o?"#e6edf3":"#1c2127",l=o?"rgba(255,255,255,0.82)":"#2c333d",c=L(j=>j.savedThemes),g=L(j=>j.applyPreset),f=L(j=>j.applySaved),x=L(j=>j.saveTheme),m=L(j=>j.updateSaved),h=L(j=>j.renameSaved),b=L(j=>j.deleteSaved),u=L(j=>j.importTheme),y=L(j=>j.set),v=L(j=>j.isDirty),E=L(j=>j.editingSavedId),H=L(j=>j.lastImportedId),S=c.find(j=>j.id===E),C=(j,A)=>{const k=new Blob([JSON.stringify({name:j,snap:A},null,2)],{type:"application/json"}),T=URL.createObjectURL(k),K=document.createElement("a");K.href=T,K.download=`${j.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}.theme.json`,K.click(),URL.revokeObjectURL(T)},[B,D]=_.useState("");_.useEffect(()=>{if(!B)return;const j=setTimeout(()=>D(""),5e3);return()=>clearTimeout(j)},[B]);const[$,X]=_.useState(null),Q=j=>{const A=c.map(K=>K.name.toLowerCase());let k=j,T=2;for(;A.includes(k.toLowerCase());)k=`${j} ${T++}`;return k},Y=j=>{var T;const A=(T=j.target.files)==null?void 0:T[0];if(!A)return;const k=new FileReader;k.onload=()=>{try{const K=JSON.parse(k.result),se=K.snap??K;if(!Ts(se)){D("Invalid theme file. The selected file is not a valid Theme Studio export.");return}const F=K.name||"Imported Theme";if(c.some(fe=>fe.name.toLowerCase()===F.toLowerCase())){X({name:F,snap:se});return}D(""),u(F,se)}catch{D("Invalid theme file. The selected file is not a valid Theme Studio export.")}},k.readAsText(A),j.target.value=""},[d,I]=_.useState(null),[P,W]=_.useState(!1),[z,q]=_.useState(""),[U,G]=_.useState(null),[R,O]=_.useState(null),J=(S==null?void 0:S.name)||((N=Mt.find(j=>j.id===t.presetId))==null?void 0:N.name)||((M=c.find(j=>j.id===t.presetId))==null?void 0:M.name)||"Custom Theme",V=(j,A)=>{const k=j.trim();return k?c.some(T=>T.name.toLowerCase()===k.toLowerCase()&&T.id!==A)?"Name already exists":"":"Name required"};return n.jsxs(n.Fragment,{children:[n.jsx(tt,{active:e,onChange:r,tabs:[{key:"presets",label:"Presets",info:"Ready-made colour themes."},{key:"saved",label:"My Themes",info:"Your saved custom themes."},{key:"mode",label:"Mode",info:"Light / Dark."}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="presets"&&n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"9px"},children:Mt.map(j=>{const A=t.presetId===j.id;return n.jsxs(p.Box,{onClick:()=>g(j.id,j.snap),title:`${j.name} — applies this colour palette`,sx:{display:"flex",alignItems:"center",gap:"9px",p:"9px 10px",borderRadius:"11px",cursor:"pointer",textAlign:"left",border:`1px solid ${A?i:o?"#363d48":"#e3e8ee"}`,bgcolor:A?s:o?"#262b34":"#ffffff",transition:"all .14s ease"},children:[n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"2px",flexShrink:0},children:[n.jsx(p.Box,{sx:{width:20,height:11,borderRadius:"3px",bgcolor:j.snap.primaryHex}}),n.jsx(p.Box,{sx:{width:20,height:7,borderRadius:"2px",bgcolor:j.snap.secondaryHex}})]}),n.jsx(p.Box,{component:"span",sx:{fontSize:"11px",fontWeight:600,color:A?a:l,lineHeight:1.3},children:j.name})]},j.id)})}),e==="saved"&&n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[c.length===0&&n.jsx(p.Typography,{variant:"caption",sx:{color:"text.secondary",py:2,textAlign:"center"},children:"No saved themes yet."}),n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:.9},children:c.map(j=>{const A=E===j.id;return n.jsxs(p.Box,{onClick:()=>f(j),title:"Apply this saved theme",sx:{display:"flex",flexDirection:"column",gap:.9,p:"9px 10px",borderRadius:"11px",cursor:"pointer",position:"relative",border:`1px solid ${A?i:o?"#363d48":"#e3e8ee"}`,bgcolor:A?s:o?"#262b34":"#ffffff",transition:"all .14s ease"},children:[A&&H===j.id&&n.jsx(p.Tooltip,{title:"recently upload",arrow:!0,children:n.jsx(p.Box,{component:"span",sx:{position:"absolute",top:-2,right:0,width:6,height:6,borderRadius:"50%",bgcolor:"error.main",flexShrink:0}})}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"2px",flexShrink:0},children:[n.jsx(p.Box,{sx:{width:20,height:11,borderRadius:"3px",bgcolor:j.snap.primaryHex}}),n.jsx(p.Box,{sx:{width:20,height:7,borderRadius:"2px",bgcolor:j.snap.secondaryHex}})]}),n.jsx(p.Box,{component:"span",sx:{flex:1,minWidth:0,fontSize:"11px",fontWeight:600,color:A?a:l,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"normal"},children:j.name}),n.jsx(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end"},children:n.jsx(p.Box,{component:"span",onClick:k=>{k.stopPropagation(),I({el:k.currentTarget,id:j.id})},sx:{cursor:"pointer",color:"text.muted",px:.5},children:"⋮"})})]})]},j.id)})}),B&&n.jsxs(p.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1,bgcolor:"rgba(211,47,47,0.08)",border:"1px solid rgba(211,47,47,0.35)",borderRadius:"10px",px:1.5,py:1.25,color:"#b3261e"},children:[n.jsx(p.Box,{component:"span",sx:{fontWeight:900,fontSize:15,lineHeight:1.4},children:"!"}),n.jsx(p.Box,{sx:{fontSize:12.5,lineHeight:1.4},children:B})]}),n.jsxs(p.Box,{sx:{display:"flex",gap:1,mt:1},children:[n.jsxs(p.Button,{size:"small",variant:"outlined",component:"label",sx:{flex:1,textTransform:"none"},children:["↑ Import",n.jsx("input",{hidden:!0,type:"file",accept:".json,application/json",onChange:Y})]}),n.jsx(p.Button,{size:"small",variant:"outlined",onClick:()=>C(J,t),sx:{flex:1,textTransform:"none"},children:"⤓ Download"}),n.jsx(p.Button,{size:"small",variant:"contained",disabled:!v(),onClick:()=>{q(S?S.name:""),W(!0)},sx:{flex:1,textTransform:"none"},children:"+ Save"})]})]}),e==="mode"&&n.jsx(p.Box,{sx:{display:"flex",gap:1},children:["light","dark"].map(j=>n.jsx(p.Button,{onClick:()=>y({mode:j}),variant:t.mode===j?"contained":"outlined",sx:{flex:1,textTransform:"capitalize"},children:j},j))})]}),n.jsxs(p.Menu,{open:!!d,anchorEl:d==null?void 0:d.el,onClose:()=>I(null),children:[n.jsx(p.MenuItem,{onClick:()=>{const j=c.find(A=>A.id===d.id);f(j),I(null)},children:"✏️ Edit"}),n.jsx(p.MenuItem,{onClick:()=>{const j=c.find(A=>A.id===d.id);G({id:j.id,name:j.name}),I(null)},children:"✎ Rename"}),n.jsx(p.MenuItem,{onClick:()=>{const j=c.find(A=>A.id===d.id);O({id:j.id,name:j.name}),I(null)},children:"🗑 Delete"}),n.jsx(p.MenuItem,{onClick:()=>{const j=c.find(A=>A.id===d.id);C(j.name,j.snap),I(null)},children:"⤓ Download"})]}),n.jsxs(p.Dialog,{open:P,onClose:()=>W(!1),children:[n.jsx(p.DialogTitle,{children:S?`Save changes to “${S.name}”`:"Save theme"}),n.jsx(p.DialogContent,{children:n.jsx(p.TextField,{autoFocus:!0,fullWidth:!0,size:"small",label:"Theme name",value:z,onChange:j=>q(j.target.value),error:!!V(z,S==null?void 0:S.id),helperText:V(z,S==null?void 0:S.id),sx:{mt:1}})}),n.jsxs(p.DialogActions,{children:[n.jsx(p.Button,{onClick:()=>W(!1),children:"Cancel"}),S&&n.jsx(p.Button,{variant:"contained",disabled:!!V(z,S.id),onClick:()=>{m(S.id,z.trim(),t),W(!1)},children:"Update"}),n.jsx(p.Button,{variant:S?"outlined":"contained",disabled:!!V(z),onClick:()=>{x(z.trim()),W(!1)},children:S?"Save as New":"Save"})]})]}),n.jsxs(p.Dialog,{open:!!U,onClose:()=>G(null),children:[n.jsx(p.DialogTitle,{children:"Rename theme"}),n.jsx(p.DialogContent,{children:n.jsx(p.TextField,{autoFocus:!0,fullWidth:!0,size:"small",label:"New name",value:(U==null?void 0:U.name)??"",onChange:j=>G(A=>A&&{...A,name:j.target.value}),error:!!(U&&V(U.name,U.id)),helperText:U?V(U.name,U.id):"",sx:{mt:1}})}),n.jsxs(p.DialogActions,{children:[n.jsx(p.Button,{onClick:()=>G(null),children:"Cancel"}),n.jsx(p.Button,{variant:"contained",disabled:!!(U&&V(U.name,U.id)),onClick:()=>{h(U.id,U.name.trim()),G(null)},children:"Rename"})]})]}),n.jsxs(p.Dialog,{open:!!$,onClose:()=>X(null),children:[n.jsx(p.DialogTitle,{children:"Theme already exists"}),n.jsx(p.DialogContent,{children:n.jsxs(p.Typography,{variant:"body2",children:["A theme named “",$==null?void 0:$.name,"” is already in My Themes. Upload it anyway as a copy?"]})}),n.jsxs(p.DialogActions,{children:[n.jsx(p.Button,{onClick:()=>{X(null),D("You’ve selected a duplicate file — it already exists.")},children:"Cancel"}),n.jsx(p.Button,{variant:"contained",onClick:()=>{u(Q($.name),$.snap),X(null)},children:"Yes, continue"})]})]}),n.jsxs(p.Dialog,{open:!!R,onClose:()=>O(null),children:[n.jsx(p.DialogTitle,{children:"Delete theme"}),n.jsx(p.DialogContent,{children:n.jsxs(p.Typography,{variant:"body2",children:["Delete “",R==null?void 0:R.name,"”? This cannot be undone."]})}),n.jsxs(p.DialogActions,{children:[n.jsx(p.Button,{onClick:()=>O(null),children:"Cancel"}),n.jsx(p.Button,{color:"error",variant:"contained",onClick:()=>{b(R.id),O(null)},children:"Delete"})]})]})]})}function Rs({tip:e,sk:r}){return n.jsx(p.Box,{component:"span",title:e,sx:{width:13,height:13,borderRadius:"50%",border:`1.1px solid ${r.chevron}`,color:r.chevron,fontSize:8,fontWeight:800,fontStyle:"italic",fontFamily:"Georgia, serif",display:"inline-grid",placeItems:"center",flexShrink:0,cursor:"help",verticalAlign:"middle"},children:"i"})}function qe({children:e,tip:r,sk:t,mt:o}){const i=ve();return n.jsxs(p.Box,{sx:{fontSize:`${i.tCaption}px`,fontWeight:i.bwEmph,fontFamily:`${i.bodyFam},sans-serif`,color:t.label2,textTransform:"uppercase",letterSpacing:".5px",mb:"6px",mt:o?`${o}px`:0,display:"flex",alignItems:"center",gap:"5px"},children:[e,r&&n.jsx(Rs,{tip:r,sk:t})]})}function st({value:e,onChange:r,w:t=30,h:o=24,r:i=7,border:s,sk:a}){return n.jsx(p.Box,{sx:{width:t,height:o,borderRadius:`${i}px`,position:"relative",overflow:"hidden",flexShrink:0,background:e,border:s?`1px solid ${a.insetBd}`:"none"},children:n.jsx(p.Box,{component:"input",type:"color",value:e,onChange:l=>r(l.target.value),sx:{position:"absolute",top:-4,left:-4,width:t+10,height:o+10,opacity:0,cursor:"pointer",border:"none",p:0}})})}const Es=/^#[0-9a-fA-F]{6}$/;function Hs({value:e,onCommit:r,onWarnChange:t}){const[o,i]=_.useState(!1),[s,a]=_.useState(e),[l,c]=_.useState(""),g=_.useRef(void 0);_.useEffect(()=>{o||a(e)},[e,o]),_.useEffect(()=>()=>clearTimeout(g.current),[]);const f=m=>{clearTimeout(g.current),c(m),t==null||t(m),m&&(g.current=setTimeout(()=>{c(""),t==null||t("")},3e3))},x=m=>{const h=m.trim();return Es.test(h)?(f(""),r(h),!0):(f("Enter a valid hex colour, e.g. #1565c0"),!1)};return o?n.jsx(p.InputBase,{autoFocus:!0,value:s,title:l||void 0,onChange:m=>{a(m.target.value)},onBlur:()=>{x(s)||a(e),i(!1)},onKeyDown:m=>{m.key==="Enter"&&x(s)&&i(!1),m.key==="Escape"&&(a(e),f(""),i(!1))},sx:{color:l?"#ffcdd2":"#fff",fontSize:"12.5px",fontWeight:700,width:100,position:"relative",zIndex:1}}):n.jsxs(p.Box,{component:"span",title:l||void 0,onClick:()=>{a(e),i(!0)},sx:{color:l?"#ffcdd2":"rgba(255,255,255,.85)",fontSize:"12.5px",fontWeight:700,cursor:"text",position:"relative",zIndex:1},children:[e," · tap to change"]})}function Ps(){const[e,r]=_.useState("brand"),[t,o]=_.useState(""),i=L(v=>v.settings),s=L(v=>v.set),a=He(i.mode),l=ve(),c={fontSize:"11.5px",color:a.body,fontWeight:600},g={fontSize:`${l.tBodySm}px`,color:a.body,fontWeight:l.bodyWeightEff,fontFamily:`${l.bodyFam},sans-serif`,lineHeight:l.bodyLH},f=i.primaryHex||"#1565c0",x=Se(f),m=[50,100,200,300,400,500,600,700,800,900].map(v=>x[v]),h=v=>s({...v,presetId:"custom"}),b=[{key:"h1Color",label:"H1 · Page Title"},{key:"h2Color",label:"H2 · Metric"},{key:"h3Color",label:"H3 · Card Title"},{key:"h4Color",label:"H4 · Section Label"},{key:"h5Color",label:"H5 · Caption"},{key:"h6Color",label:"H6 · Overline"}],u=[{key:"successHex",label:"Success"},{key:"warningHex",label:"Warning"},{key:"infoHex",label:"Info"},{key:"errorHex",label:"Error"}],y=[{key:"cardBgHex",label:"Card background",fb:"#ffffff"},{key:"cardHdrHex",label:"Card header",fb:"#f6f8fb"},{key:"pageBgHex",label:"Page background",fb:"#f4f6f9"},{key:"notifCardHex",label:"Notification background",fb:"#ffffff"}];return n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"11px"},children:[n.jsx(tt,{active:e,onChange:r,tabs:[{key:"brand",label:"Brand",info:"Core brand colours — primary, secondary and the selection highlight colour used across the app."},{key:"text",label:"Text",info:"Heading and body text colours"},{key:"status",label:"Status",info:"Status colours & surface overrides"}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px",display:"flex",flexDirection:"column",gap:"11px"},children:[e==="brand"&&n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"11px"},children:[n.jsxs(p.Box,{children:[n.jsx(qe,{sk:a,tip:"Primary brand colour — main/filled buttons, active sidebar item, links, focus rings, first chart series, and the login Sign-in button.",children:"Brand Color"}),n.jsxs(p.Box,{sx:{position:"relative",height:46,borderRadius:"11px",background:f,overflow:"hidden",display:"flex",alignItems:"center",px:"14px",boxShadow:`0 3px 10px ${f}44`},children:[n.jsx(Hs,{value:f,onCommit:v=>h({primaryHex:v}),onWarnChange:o}),n.jsx(p.Box,{component:"input",type:"color",value:f,onChange:v=>h({primaryHex:v.target.value}),sx:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer",border:"none",p:0}})]}),n.jsx(p.Box,{sx:{display:"flex",gap:"2px",borderRadius:"7px",overflow:"hidden",height:14,mt:"7px"},children:m.map((v,E)=>n.jsx(p.Box,{sx:{flex:1,background:v}},E))}),t&&n.jsxs(p.Box,{sx:{display:"inline-flex",alignItems:"center",gap:"6px",mt:"8px",px:"10px",py:"6px",borderRadius:"8px",bgcolor:l.warnSoft,border:`1px solid ${l.warnTxt}`,color:l.warnTxt,fontSize:12,fontWeight:600},children:[n.jsx(p.Box,{component:"span",sx:{fontSize:13,lineHeight:1},children:"⚠"}),t]})]}),n.jsxs(p.Box,{children:[n.jsx(qe,{sk:a,tip:"Secondary accent — secondary/outlined buttons, switches & toggles, selected chips, and the second data series in charts.",children:"Secondary / Accent"}),n.jsx(p.Box,{sx:{position:"relative",height:34,borderRadius:"9px",background:i.secondaryHex,overflow:"hidden"},children:n.jsx(p.Box,{component:"input",type:"color",value:i.secondaryHex,onChange:v=>h({secondaryHex:v.target.value}),sx:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer",border:"none",p:0}})})]}),n.jsxs(p.Box,{children:[n.jsx(qe,{sk:a,tip:"Accent colour used to draw attention — highlight panels, featured badges, callouts. Defaults to the brand colour.",children:"Highlight Colour"}),n.jsx(p.Box,{sx:{position:"relative",height:34,borderRadius:"8px",background:i.highlightHex||"#ffd400",overflow:"hidden",border:`1px solid ${a.insetBd}`},children:n.jsx(p.Box,{component:"input",type:"color",value:i.highlightHex||"#ffd400",onChange:v=>h({highlightHex:v.target.value}),sx:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer",border:"none",p:0}})})]})]}),e==="text"&&n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"11px"},children:[n.jsx(qe,{sk:a,children:"Heading Text Colors"}),n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"9px"},children:b.map(v=>n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(st,{sk:a,border:!0,value:i[v.key]||"#1c2127",onChange:E=>s({[v.key]:E})}),n.jsx(p.Box,{component:"span",sx:g,children:v.label})]},v.key))}),n.jsx(qe,{sk:a,children:"Body Text Colors"}),n.jsxs(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"7px"},children:[n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(st,{sk:a,border:!0,value:i.textPrimaryHex||"#1c2127",onChange:v=>s({textPrimaryHex:v})}),n.jsx(p.Box,{component:"span",sx:c,title:"Main body text colour.",children:"Primary Text"})]}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(st,{sk:a,border:!0,value:i.textSecondaryHex||"#5a6573",onChange:v=>s({textSecondaryHex:v})}),n.jsx(p.Box,{component:"span",sx:c,title:"Muted text colour.",children:"Secondary Text"})]}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(st,{sk:a,border:!0,value:i.dividerHex||"#e3e8ee",onChange:v=>s({dividerHex:v})}),n.jsx(p.Box,{component:"span",sx:c,title:"Divider / border colour.",children:"Divider"})]})]})]}),e==="status"&&n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"7px"},children:[n.jsxs(p.Box,{children:[n.jsx(qe,{sk:a,tip:"Success, warning, error & info colours — used for alerts, status pills, toasts and validation states.",children:"Status Colors"}),n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"7px"},children:u.map(v=>n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"8px",background:a.card,border:`1px solid ${a.insetBd}`,borderRadius:"9px",px:"9px",py:"7px"},children:[n.jsx(st,{sk:a,w:22,h:22,r:6,value:i[v.key],onChange:E=>s({[v.key]:E})}),n.jsx(p.Box,{component:"span",sx:c,children:v.label})]},v.key))})]}),n.jsxs(p.Box,{children:[n.jsx(qe,{sk:a,tip:"Override the auto-generated surface colours. Leave on Auto to follow the surface tint & mode.",children:"Surfaces"}),n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"7px"},children:y.map(v=>{const E=!!i[v.key];return n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"8px",background:a.card,border:`1px solid ${a.insetBd}`,borderRadius:"9px",px:"9px",py:"5px"},children:[n.jsx(st,{sk:a,w:22,h:22,r:6,border:!0,value:i[v.key]||v.fb,onChange:H=>s({[v.key]:H})}),n.jsx(p.Box,{component:"span",sx:{...c,flex:1},children:v.label}),E&&n.jsx(p.Box,{component:"button",title:"Reset to Auto",onClick:()=>s({[v.key]:""}),sx:{background:"transparent",border:`1px solid ${a.insetBd}`,borderRadius:"6px",color:a.muted,fontSize:"10px",fontWeight:700,px:"7px",py:"3px",cursor:"pointer"},children:"Auto"})]},v.key)})})]})]})]})]})}function ge(e){const{label:r,info:t,value:o,effective:i,min:s,max:a,step:l=1,unit:c="",autoLabel:g,autoValue:f=0,softMin:x,softMax:m,floorValue:h,floorReset:b,floorMessage:u,extra:y,onChange:v}=e,E=He(L(q=>q.settings.mode)),H=ve(),S=`${H.bodyFam},sans-serif`,[C,B]=_.useState(!1),[D,$]=_.useState(String(i)),[X,Q]=_.useState(""),Y=_.useRef(void 0);_.useEffect(()=>{C||$(String(i))},[i,C]),_.useEffect(()=>()=>clearTimeout(Y.current),[]);const d=q=>{clearTimeout(Y.current),Q(q),q&&(Y.current=setTimeout(()=>Q(""),3e3))},I=q=>x!=null&&q<x?`Below ${x}${c} may break the UI`:m!=null&&q>m?`Above ${m}${c} may break the UI`:"",P=()=>{d(u??`Minimum is ${b}${c} — reset`),v(b),$(String(b))},W=q=>{const U=parseFloat(q);if(isNaN(U)){d("Enter a number"),$(String(i));return}if(h!=null&&b!=null&&U<=h){P();return}const G=Math.min(a,Math.max(s,U));d(G!==U?`Must be between ${s}${c} and ${a}${c} — clamped to ${G}${c}`:I(G)),$(String(G)),v(G)},z=o===f&&g?g:`${i}${c}`;return n.jsxs(p.Box,{sx:{mb:1.5},children:[n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:"8px"},children:[n.jsxs(p.Typography,{sx:{fontSize:`${H.tBodySm}px`,fontWeight:H.bwEmph,fontFamily:S,lineHeight:H.bodyLH,color:E.label2,display:"flex",alignItems:"center",gap:"5px"},children:[r,t&&n.jsx(p.Tooltip,{title:t,arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.Box,{component:"span",sx:{width:13,height:13,borderRadius:"50%",border:`1.1px solid ${E.chevron}`,color:E.chevron,fontSize:8,fontWeight:800,fontStyle:"italic",fontFamily:"Georgia, serif",display:"inline-grid",placeItems:"center",cursor:"help"},children:"i"})})]}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"5px",flexShrink:0},children:[C?n.jsx(p.InputBase,{autoFocus:!0,value:D,onChange:q=>$(q.target.value),onBlur:()=>{W(D),B(!1)},onKeyDown:q=>{q.key==="Enter"&&(W(D),B(!1)),q.key==="Escape"&&B(!1)},sx:{width:56,fontSize:`${H.tBodySm}px`,fontWeight:700,fontFamily:S,border:"1.5px solid",borderColor:"primary.main",borderRadius:"6px",px:"6px",py:"3px","& input":{p:0,textAlign:"center"}}}):n.jsxs(p.Box,{component:"button",onClick:()=>{$(String(i)),B(!0)},sx:{display:"inline-flex",alignItems:"center",gap:"5px",fontFamily:S,fontSize:`${H.tBodySm}px`,fontWeight:800,color:E.body,bgcolor:"rgba(130,140,155,0.14)",border:"1px solid rgba(130,140,155,0.28)",borderRadius:"6px",px:"7px",py:"2px",cursor:"pointer",lineHeight:1.3,"&:hover":{bgcolor:"rgba(130,140,155,0.24)"}},children:[z,n.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"block",flexShrink:0},children:[n.jsx("path",{d:"M12 20h9"}),n.jsx("path",{d:"M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z"})]})]}),y]})]}),n.jsx(p.Box,{component:"input",type:"range",min:s,max:a,step:l,value:i,onChange:q=>{const U=parseFloat(q.target.value);if(h!=null&&b!=null&&U<=h){P();return}d(I(U)),v(U)},sx:{WebkitAppearance:"none",appearance:"none",width:"100%",height:"4px",m:0,p:0,display:"block",borderRadius:"2px",outline:"none",cursor:"pointer",background:"#dde3ea",accentColor:"primary.main","&::-webkit-slider-thumb":{WebkitAppearance:"none",width:18,height:18,borderRadius:"50%",background:"#fff",cursor:"pointer",boxShadow:"0 1px 4px rgba(0,0,0,.25),0 0 0 1px rgba(0,0,0,.05)"},"&::-moz-range-thumb":{width:18,height:18,border:"none",borderRadius:"50%",background:"#fff",cursor:"pointer",boxShadow:"0 1px 4px rgba(0,0,0,.25),0 0 0 1px rgba(0,0,0,.05)"}}}),X&&n.jsxs(p.Box,{sx:{display:"inline-flex",alignItems:"center",gap:"6px",mt:"8px",px:"10px",py:"6px",borderRadius:"8px",bgcolor:H.warnSoft,border:`1px solid ${H.warnTxt}`,color:H.warnTxt,fontSize:12,fontWeight:600},children:[n.jsx(p.Box,{component:"span",sx:{fontSize:13,lineHeight:1},children:"⚠"}),X]})]})}const xn=new Set;function Vn(e,r){if(xn.has(e))return;xn.add(e);const t=document.createElement("style");t.textContent=`@font-face{font-family:'${e}';src:url('${r}');font-display:swap;}`,document.head.appendChild(t)}function mn(e){e.forEach(r=>Vn(r.name,r.dataUrl))}const $s=[{key:"Roboto",label:"Roboto",sub:"Material"},{key:"Inter",label:"Inter",sub:"Enterprise"},{key:"DM Sans",label:"DM Sans",sub:"Modern"},{key:"Manrope",label:"Manrope",sub:"Geometric"},{key:"Plus Jakarta Sans",label:"Jakarta",sub:"Friendly"},{key:"Nunito Sans",label:"Nunito",sub:"Rounded"}],Is=[{key:"Figtree",label:"Google Sans"},{key:"Roboto",label:"Roboto"},{key:"Inter",label:"Inter"},{key:"Arial",label:"Arial"},{key:"Manrope",label:"Manrope"},{key:"Plus Jakarta Sans",label:"Jakarta"}];function Et({label:e,fam:r,active:t,onClick:o}){const i=L(f=>f.settings.mode),s=L(f=>f.settings.primaryHex)||"#1565c0",a=L(f=>f.settings.highlightHex)||"#ffd400",l=i==="dark",c=Se(s),g=ce(a,l?.3:.18);return n.jsx(p.Box,{onClick:o,sx:{py:"17px",px:"4px",borderRadius:"10px",textAlign:"center",cursor:"pointer",border:`1px solid ${t?l?c[400]:s:l?"#363d48":"#e3e8ee"}`,bgcolor:t?g:l?"#262b34":"#ffffff",transition:"all .14s ease","&:hover":t?{}:{borderColor:l?"#4a5361":"#c9d0d9"}},children:n.jsx(p.Box,{sx:{fontFamily:`${r}, sans-serif`,fontSize:13,fontWeight:700,lineHeight:1,color:t?l?c[200]:c[700]:l?"#aeb6c0":"#5a6573"},children:e})})}const As=["woff2","woff","ttf","otf"],Os=10*1024*1024,Ds=e=>new Promise((r,t)=>{const o=new FileReader;o.onload=()=>r(o.result),o.onerror=()=>t(o.error),o.readAsDataURL(e)}),Ms=e=>new Promise(r=>{const t=setTimeout(()=>r(!1),5e3),o=new FileReader;o.onload=()=>{var a;clearTimeout(t);const i=new Uint8Array(o.result),s=((a=e.name.split(".").pop())==null?void 0:a.toLowerCase())||"";if(s==="woff2"&&i[0]===119&&i[1]===79&&i[2]===70&&i[3]===50||s==="woff"&&i[0]===119&&i[1]===79&&i[2]===70&&i[3]===70||s==="otf"&&i[0]===79&&i[1]===84&&i[2]===84&&i[3]===79||s==="ttf"&&i[0]===0&&i[1]===1&&i[2]===0&&i[3]===0||s==="ttf"&&i[0]===79&&i[1]===84&&i[2]===84&&i[3]===79)return r(!0);r(!1)},o.onerror=()=>{clearTimeout(t),r(!1)};try{o.readAsArrayBuffer(e.slice(0,4))}catch{clearTimeout(t),r(!1)}});function yn({label:e,list:r,onAdd:t}){const o=He(L(f=>f.settings.mode)),i=ve(),[s,a]=_.useState(""),l=_.useRef(void 0);_.useEffect(()=>()=>clearTimeout(l.current),[]);const c=f=>{clearTimeout(l.current),a(f),f&&(l.current=setTimeout(()=>a(""),3e3))},g=async f=>{var E;const x=Array.from(f.target.files??[]);if(f.target.value="",!x.length)return;const m=[],h=[],b=[],u=[],y=[];for(const H of x){const S=((E=H.name.split(".").pop())==null?void 0:E.toLowerCase())||"";if(!As.includes(S)){b.push(H.name);continue}if(H.size>Os){u.push(H.name);continue}if(!await Ms(H)){y.push(H.name);continue}const C=H.name.replace(/\.[^.]+$/,""),B=$=>$.toLowerCase()===C.toLowerCase();if(r.some($=>B($.name))||m.some($=>B($.name))){h.push(C);continue}const D=await Ds(H);Vn(C,D),m.push({name:C,dataUrl:D})}m.length&&t(m);const v=[];h.length&&v.push(`Already added: ${h.join(", ")}`),b.length&&v.push(`Unsupported file type: ${b.join(", ")}`),u.length&&v.push(`Too large (max 10MB): ${u.join(", ")}`),y.length&&v.push(`Invalid font file: ${y.join(", ")}`),c(v.join(" · "))};return n.jsxs(p.Box,{sx:{mt:1.5},children:[n.jsxs(p.Box,{component:"label",sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:.75,bgcolor:o.inset,border:`1.5px dashed ${o.insetBd}`,borderRadius:"9px",p:1.5,cursor:"pointer",color:o.body,fontSize:11.5,fontWeight:600,fontFamily:`${i.bodyFam},sans-serif`,textAlign:"center"},children:["⬆ ",e,n.jsx(p.Box,{component:"span",sx:{color:o.muted},children:".woff2 / .ttf / .otf"}),n.jsx("input",{type:"file",accept:".woff2,.woff,.ttf,.otf",multiple:!0,onChange:g,style:{display:"none"}})]}),s&&n.jsxs(p.Box,{sx:{mt:.9,display:"flex",alignItems:"center",gap:.9,bgcolor:"error.main",borderRadius:2,px:1.4,py:.9,color:"error.contrastText",fontFamily:`${i.bodyFam},sans-serif`},children:[n.jsx(p.Box,{component:"span",sx:{fontWeight:900,fontSize:12},children:"✕"}),n.jsx(p.Box,{component:"span",sx:{fontSize:11.5},children:s})]})]})}const Fs={compact:1.15,default:1.25,airy:1.414};function Ws(){const e=L(f=>f.settings),r=L(f=>f.set),t=He(e.mode),o=ve(),[i,s]=_.useState(!1),a=e.scaleRatioCustom>0?e.scaleRatioCustom:Fs[e.scaleRatio]??1.25,[l,c]=_.useState(a.toFixed(2));_.useEffect(()=>{i||c(a.toFixed(2))},[a,i]);const g=()=>{const f=parseFloat(l);isNaN(f)||r({scaleRatioCustom:f}),s(!1)};return i?n.jsx(p.InputBase,{autoFocus:!0,value:l,onChange:f=>c(f.target.value),onBlur:g,onKeyDown:f=>{f.key==="Enter"&&g(),f.key==="Escape"&&s(!1)},sx:{width:56,fontSize:"11.5px",fontWeight:700,fontFamily:`${o.bodyFam},sans-serif`,border:"1.5px solid",borderColor:"primary.main",borderRadius:"6px",px:"6px",py:"3px","& input":{p:0,textAlign:"center"}}}):n.jsx(p.Box,{component:"button",title:"Configure scale ratio — each heading is the one above ÷ this value",onClick:()=>{c(a.toFixed(2)),s(!0)},sx:{display:"inline-grid",placeItems:"center",color:t.body,bgcolor:"rgba(130,140,155,0.14)",border:"1px solid rgba(130,140,155,0.28)",borderRadius:"6px",px:"6px",py:"3px",cursor:"pointer",fontFamily:`${o.bodyFam},sans-serif`,"&:hover":{bgcolor:"rgba(130,140,155,0.24)"}},children:n.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"block"},children:[n.jsx("circle",{cx:"12",cy:"12",r:"3"}),n.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]})})}function zs(){const[e,r]=_.useState("bodyFont"),t=L(i=>i.settings),o=L(i=>i.set);return n.jsxs(n.Fragment,{children:[n.jsx(tt,{active:e,onChange:r,tabs:[{key:"bodyFont",label:"Body Font",info:"Typeface used for body / paragraph text (headings use the Heading Font)"},{key:"headFont",label:"Heading Font",info:"Choose a separate typeface for headings (or match the body font)"},{key:"headText",label:"Heading Text",info:"Fine-tune size & weight per heading level (H1–H4)"},{key:"bodyText",label:"Body Text",info:"Adjust base font size and line height for body copy"}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="bodyFont"&&n.jsxs(n.Fragment,{children:[n.jsxs(p.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:"10px"},children:[$s.map(i=>n.jsx(Et,{label:i.label,sub:i.sub,fam:i.key,active:t.fontFamily===i.key,onClick:()=>o({fontFamily:i.key})},i.key)),t.customFonts.map(i=>n.jsx(Et,{label:i.name,sub:"Custom",fam:i.name,active:t.fontFamily===i.name,onClick:()=>o({fontFamily:i.name})},i.name))]}),n.jsx(yn,{label:"Upload custom font",list:t.customFonts,onAdd:i=>o({customFonts:[...i,...t.customFonts],fontFamily:i[0].name})})]}),e==="headFont"&&n.jsxs(n.Fragment,{children:[n.jsxs(p.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:"10px"},children:[Is.map(i=>n.jsx(Et,{label:i.label,fam:i.key,active:t.headingFont===i.key,onClick:()=>o({headingFont:i.key})},i.key)),t.customHeadFonts.map(i=>n.jsx(Et,{label:i.name,sub:"Custom",fam:i.name,active:t.headingFont===i.name,onClick:()=>o({headingFont:i.name})},i.name))]}),n.jsx(yn,{label:"Upload heading font",list:t.customHeadFonts,onAdd:i=>o({customHeadFonts:[...i,...t.customHeadFonts],headingFont:i[0].name})})]}),e==="headText"&&n.jsxs(n.Fragment,{children:[n.jsx(ge,{label:"H1 size",info:"All heading levels scale from H1 by a modular ratio (configurable via the gear icon).",value:t.h1Size,effective:t.h1Size||20,min:18,max:56,unit:"px",extra:n.jsx(Ws,{}),onChange:i=>o({h1Size:i})}),n.jsx(ge,{label:"Weight (all headings)",value:t.headingWeight,effective:t.headingWeight,min:300,max:900,step:100,onChange:i=>o({headingWeight:i})}),n.jsx(ge,{label:"Line height (all headings)",value:t.headingLH,effective:t.headingLH||1.2,min:.9,max:2,step:.05,autoLabel:"Auto (1.20)",onChange:i=>o({headingLH:i})})]}),e==="bodyText"&&n.jsxs(n.Fragment,{children:[n.jsx(ge,{label:"Base font size",info:"Root body text size.",value:t.baseFontPx,effective:t.baseFontPx||12,min:9,max:20,unit:"px",softMin:9,onChange:i=>o({baseFontPx:i})}),n.jsx(ge,{label:"Body weight",value:t.bodyWeight,effective:t.bodyWeight||400,min:300,max:900,step:100,autoLabel:"Auto (400)",onChange:i=>o({bodyWeight:i})}),n.jsx(ge,{label:"Body line height",value:t.bodyLineHeight,effective:t.bodyLineHeight||1.5,min:1.2,max:2,step:.05,autoLabel:"Auto (1.50)",onChange:i=>o({bodyLineHeight:i})})]})]})]})}function je({options:e,value:r,columns:t=3,onChange:o}){const i=L(v=>v.settings.mode),s=L(v=>v.settings.primaryHex)||"#1565c0",a=L(v=>v.settings.highlightHex)||"#ffd400",l=i==="dark",c=Se(s),g=ve(),f=`${g.bodyFam},sans-serif`,x=ce(a,l?.3:.18),m=l?c[400]:s,h=l?c[200]:c[700],b=l?"#262b34":"#ffffff",u=l?"#363d48":"#e3e8ee",y=l?"#aeb6c0":"#5a6573";return n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:`repeat(${t}, 1fr)`,gap:"6px"},children:e.map(v=>{const E=v.key===r,H=n.jsx(p.Box,{onClick:()=>o(v.key),sx:{py:"9px",px:"4px",borderRadius:"10px",textAlign:"center",cursor:"pointer",userSelect:"none",fontSize:`${g.tCaption}px`,fontWeight:E?g.bwEmph:g.bodyWeightEff,fontFamily:f,border:`1px solid ${E?m:u}`,bgcolor:E?x:b,color:E?h:y,transition:"color .14s ease, background .14s ease, border-color .14s ease","&:hover":E?{}:{borderColor:l?"#4a5361":"#c9d0d9"}},children:v.label},v.key);return v.info?n.jsx(p.Tooltip,{title:v.info,arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:H},v.key):H})})}const Ht={outlined:0,soft:6,floating:24},Pt={plain:0,tinted:40,accent:60},_s={bordered:0,recessed:6,lighter:4};function Ls(){const[e,r]=_.useState("style"),t=L(c=>c.settings),o=L(c=>c.set),i=t.cardShadowPx>=0?t.cardShadowPx:Ht[t.cardStyle]??24,s=t.headerStrength>=0?t.headerStrength:Pt[t.cardHeader]??45,a=t.nestedDepth>=0?t.nestedDepth:_s[t.nestedStyle]??6,l=t.tintIntensity>=0?t.tintIntensity:100;return n.jsxs(n.Fragment,{children:[n.jsx(tt,{active:e,onChange:r,tabs:[{key:"style",label:"Style",info:"Card border vs shadow depth."},{key:"header",label:"Header",info:"Card header treatment."},{key:"nested",label:"Nested",info:"How cards-within-cards look."},{key:"tint",label:"Tint",info:"Overall surface tint colour & strength."}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="style"&&n.jsxs(n.Fragment,{children:[n.jsx(je,{value:t.cardStyle,onChange:c=>{const g=c;o({cardStyle:g,cardShadowPx:Ht[g]})},options:[{key:"outlined",label:"Outlined"},{key:"soft",label:"Soft"},{key:"floating",label:"Floating"}]}),n.jsx(p.Box,{sx:{mt:1.5},children:n.jsx(ge,{label:"Shadow depth",info:"Card elevation (px).",value:t.cardShadowPx,effective:i,min:0,max:32,unit:"px",autoValue:-1,autoLabel:`Auto (${i}px)`,softMin:t.cardStyle==="outlined"?void 0:1,softMax:32,floorValue:t.cardStyle==="outlined"?void 0:0,floorReset:Ht[t.cardStyle],floorMessage:`${t.cardStyle==="soft"?"Soft":"Floating"} cards need shadow - reset to ${Ht[t.cardStyle]}px`,onChange:c=>o({cardShadowPx:c})})})]}),e==="header"&&n.jsxs(n.Fragment,{children:[n.jsx(je,{value:t.cardHeader,onChange:c=>{const g=c;o({cardHeader:g,headerStrength:Pt[g]})},options:[{key:"plain",label:"Plain"},{key:"tinted",label:"Tinted"},{key:"accent",label:"Accent"}]}),n.jsx(p.Box,{sx:{mt:1.5},children:n.jsx(ge,{label:"Header strength",info:"Header tint / accent intensity.",value:t.headerStrength,effective:s,min:0,max:100,unit:"%",autoValue:-1,autoLabel:`Auto (${s}%)`,softMin:t.cardHeader==="plain"?void 0:1,floorValue:t.cardHeader==="plain"?void 0:0,floorReset:Pt[t.cardHeader],floorMessage:`${t.cardHeader==="tinted"?"Tinted":"Accent"} headers need strength - reset to ${Pt[t.cardHeader]}%`,onChange:c=>o({headerStrength:c})})})]}),e==="nested"&&n.jsxs(n.Fragment,{children:[n.jsx(je,{value:t.nestedStyle,onChange:c=>o({nestedStyle:c}),options:[{key:"recessed",label:"Recessed"},{key:"lighter",label:"Lighter"},{key:"bordered",label:"Bordered"}]}),n.jsx(p.Box,{sx:{mt:1.5},children:n.jsx(ge,{label:"Nested depth",info:"Inset depth of cards-within-cards.",value:t.nestedDepth,effective:a,min:0,max:24,unit:"px",autoValue:-1,autoLabel:`Auto (${a}px)`,onChange:c=>o({nestedDepth:c})})})]}),e==="tint"&&n.jsxs(n.Fragment,{children:[n.jsx(je,{value:t.surfaceTint,onChange:c=>o({surfaceTint:c}),options:[{key:"snow",label:"None"},{key:"neutral",label:"Low"},{key:"brand",label:"High"}]}),n.jsx(p.Box,{sx:{mt:1.5},children:n.jsx(ge,{label:"Tint intensity",info:"Strength of the page surface tint.",value:t.tintIntensity,effective:l,min:0,max:100,unit:"%",autoValue:-1,autoLabel:`Auto (${l}%)`,onChange:c=>o({tintIntensity:c})})})]})]})]})}function Ns(){const[e,r]=_.useState("rows"),t=L(i=>i.settings),o=L(i=>i.set);return n.jsxs(n.Fragment,{children:[n.jsx(tt,{active:e,onChange:r,tabs:[{key:"rows",label:"Rows",info:"Row density & dividers."},{key:"cols",label:"Columns",info:"Column density & dividers."},{key:"cells",label:"Cells",info:"Cell text & vertical alignment."},{key:"styling",label:"Styling",info:"Header background & row striping."}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="rows"&&n.jsxs(n.Fragment,{children:[n.jsx(je,{value:t.tableDensity,onChange:i=>o({tableDensity:i}),options:[{key:"compact",label:"Compact"},{key:"default",label:"Default"},{key:"comfortable",label:"Comfortable"}]}),n.jsx(p.FormControlLabel,{sx:{mt:1},control:n.jsx(p.Switch,{checked:t.tableDividers,onChange:i=>o({tableDividers:i.target.checked})}),label:"Row dividers"}),t.tableDividers&&n.jsx(ge,{label:"Divider width",value:t.tableRowDivW,effective:t.tableRowDivW,min:1,max:4,unit:"px",onChange:i=>o({tableRowDivW:i})})]}),e==="cols"&&n.jsxs(n.Fragment,{children:[n.jsx(je,{value:t.tableColDensity,onChange:i=>o({tableColDensity:i}),options:[{key:"compact",label:"Compact"},{key:"default",label:"Default"},{key:"comfortable",label:"Comfortable"}]}),n.jsx(p.FormControlLabel,{sx:{mt:1},control:n.jsx(p.Switch,{checked:t.tableColDividers,onChange:i=>o({tableColDividers:i.target.checked})}),label:"Column dividers"}),t.tableColDividers&&n.jsx(ge,{label:"Divider width",value:t.tableColDivW,effective:t.tableColDivW,min:1,max:4,unit:"px",onChange:i=>o({tableColDivW:i})})]}),e==="cells"&&n.jsxs(n.Fragment,{children:[n.jsx(je,{value:t.tableCellAlignH,onChange:i=>o({tableCellAlignH:i}),options:[{key:"left",label:"Left"},{key:"center",label:"Center"},{key:"right",label:"Right"}]}),n.jsx(p.Box,{sx:{mt:1},children:n.jsx(je,{value:t.tableCellAlignV,onChange:i=>o({tableCellAlignV:i}),options:[{key:"top",label:"Top"},{key:"middle",label:"Middle"},{key:"bottom",label:"Bottom"}]})})]}),e==="styling"&&n.jsxs(n.Fragment,{children:[n.jsx(je,{value:t.tableHeaderStyle,onChange:i=>o({tableHeaderStyle:i}),options:[{key:"plain",label:"Plain"},{key:"tinted",label:"Tinted"},{key:"accent",label:"Accent"}]}),n.jsx(p.FormControlLabel,{sx:{mt:1},control:n.jsx(p.Switch,{checked:t.tableStripe,onChange:i=>o({tableStripe:i.target.checked})}),label:"Striped rows"})]})]})]})}const ur={compact:.82,default:1,comfortable:1.16};function Vs(){const[e,r]=_.useState("shape"),t=L(c=>c.settings),o=L(c=>c.set),i=He(t.mode),s=t.densityScale>0?t.densityScale:Math.round((ur[t.density]??1)*100),a=t.cardGapPx>0?t.cardGapPx:Math.round(16*(ur[t.density]??1)),l=t.containerPadPx>0?t.containerPadPx:Math.round(10*(ur[t.density]??1));return n.jsxs(n.Fragment,{children:[n.jsx(tt,{active:e,onChange:r,tabs:[{key:"shape",label:"Shape",info:"Corner radius & layout density."},{key:"effects",label:"Effects",info:"Spacing, button case & status chips."}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="shape"&&n.jsxs(n.Fragment,{children:[n.jsx(p.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2,textTransform:"uppercase",letterSpacing:".6px",display:"block",mb:.75},children:"Corner Radius"}),n.jsx(je,{value:t.radiusPreset,onChange:c=>o({radiusPreset:c,radiusVal:c==="sharp"?0:c==="round"?18:9}),options:[{key:"sharp",label:"Sharp"},{key:"rounded",label:"Rounded"},{key:"round",label:"Round"}]}),n.jsx(p.Box,{sx:{mt:1.25},children:n.jsx(ge,{label:"Exact radius",value:t.radiusVal,effective:t.radiusVal,min:0,max:28,unit:"px",onChange:c=>o({radiusVal:c,radiusPreset:"rounded"})})}),n.jsx(p.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2,textTransform:"uppercase",letterSpacing:".6px",display:"block",mb:.75,mt:.5},children:"Density"}),n.jsx(je,{value:t.densityScale>0?"":t.density,onChange:c=>o({density:c,densityScale:0}),options:[{key:"compact",label:"Compact"},{key:"default",label:"Default"},{key:"comfortable",label:"Comfortable"}]}),n.jsx(p.Box,{sx:{mt:1.25},children:n.jsx(ge,{label:"Exact density",info:"Fine-tune spacing scale (%).",value:t.densityScale,effective:s,min:60,max:140,unit:"%",onChange:c=>o({densityScale:c})})})]}),e==="effects"&&n.jsxs(n.Fragment,{children:[n.jsx(ge,{label:"Card-to-card gap",value:t.cardGapPx,effective:a,min:0,max:40,step:2,unit:"px",autoLabel:`Auto (${a}px)`,onChange:c=>o({cardGapPx:c})}),n.jsx(ge,{label:"Container padding",value:t.containerPadPx,effective:l,min:0,max:40,step:2,unit:"px",autoLabel:`Auto (${l}px)`,onChange:c=>o({containerPadPx:c})}),n.jsx(ge,{label:"Edge gap",info:"Space between the preview frame and the outer app card.",value:t.edgePadPx,effective:t.edgePadPx,min:0,max:40,step:2,unit:"px",autoLabel:"0px (flush)",onChange:c=>o({edgePadPx:c})}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mt:1},children:[n.jsx(p.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2},children:"Uppercase button labels"}),n.jsx(p.Switch,{size:"small",checked:t.btnCase==="upper",onChange:c=>o({btnCase:c.target.checked?"upper":"none"})})]}),n.jsxs(p.Box,{sx:{mt:1.25},children:[n.jsx(p.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2,textTransform:"uppercase",letterSpacing:".6px",display:"block",mb:.75},children:"Status Chips"}),n.jsx(je,{columns:2,value:t.statusBold?"bold":"soft",onChange:c=>o({statusBold:c==="bold"}),options:[{key:"soft",label:"Soft"},{key:"bold",label:"Bold"}]})]})]})]})]})}function Us(){const[e,r]=_.useState("placement"),t=L(i=>i.settings),o=L(i=>i.set);return n.jsxs(n.Fragment,{children:[n.jsx(tt,{active:e,onChange:r,tabs:[{key:"placement",label:"Placement",info:"Where toasts appear."},{key:"behaviour",label:"Behaviour",info:"Width & auto-dismiss."}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="placement"&&n.jsx(je,{columns:2,value:t.notifPosition,onChange:i=>o({notifPosition:i}),options:[{key:"top-center",label:"Top Center"},{key:"top-right",label:"Top Right"},{key:"bottom-left",label:"Bottom Left"},{key:"bottom-right",label:"Bottom Right"}]}),e==="behaviour"&&n.jsxs(n.Fragment,{children:[n.jsx(ge,{label:"Toast width",value:t.toastW,effective:t.toastW||252,min:200,max:500,unit:"px",softMax:500,onChange:i=>o({toastW:i})}),n.jsx(p.FormControlLabel,{sx:{mt:.5},control:n.jsx(p.Switch,{checked:t.notifBadge,onChange:i=>o({notifBadge:i.target.checked})}),label:"Show unread badge"}),n.jsx(p.FormControlLabel,{sx:{mt:.5,display:"flex"},control:n.jsx(p.Switch,{checked:t.notifAutoDismiss,onChange:i=>o({notifAutoDismiss:i.target.checked})}),label:"Auto-dismiss toasts"}),t.notifAutoDismiss&&n.jsx(ge,{label:"Dismiss after",value:t.autoDismissSec,effective:t.autoDismissSec||5,min:5,max:30,unit:"s",onChange:i=>o({autoDismissSec:i})})]})]})]})}function Gs({label:e,info:r,value:t,fallback:o,onChange:i,onReset:s}){const a=He(L(f=>f.settings.mode)),[l,c]=_.useState(null),g=t||o;return n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1,py:.5},children:[n.jsx(p.Box,{onClick:f=>c(f.currentTarget),sx:{width:22,height:22,borderRadius:1.5,border:`1px solid ${a.insetBd}`,bgcolor:g,cursor:"pointer",flexShrink:0}}),n.jsxs(p.Typography,{variant:"caption",sx:{flex:1,color:a.body,display:"flex",alignItems:"center",gap:.5},children:[e,r&&n.jsx(p.Tooltip,{title:r,arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.Box,{component:"span",sx:{width:13,height:13,borderRadius:"50%",border:`1.1px solid ${a.chevron}`,color:a.chevron,fontSize:8,fontWeight:800,fontStyle:"italic",fontFamily:"Georgia, serif",display:"inline-grid",placeItems:"center",cursor:"help"},children:"i"})})]}),t&&s&&n.jsx(p.Box,{component:"span",onClick:s,title:"Reset to theme default",sx:{fontSize:13,color:a.muted,cursor:"pointer"},children:"↺"}),n.jsx(p.Popover,{open:!!l,anchorEl:l,onClose:()=>c(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},children:n.jsx(p.Box,{sx:{p:1},children:n.jsx("input",{type:"color",value:g,onChange:f=>i(f.target.value),style:{width:160,height:40,border:"none",background:"none"}})})})]})}function Ys({src:e,aspect:r,onCancel:t,onConfirm:o}){const[i,s]=_.useState(1),[a,l]=_.useState({x:0,y:0}),c=_.useRef(null),g=_.useRef(null),f=_.useRef(null),x=_.useRef(null);_.useEffect(()=>{const b=y=>{x.current&&l({x:x.current.ox+(y.clientX-x.current.sx),y:x.current.oy+(y.clientY-x.current.sy)})},u=()=>{x.current=null};return document.addEventListener("pointermove",b),document.addEventListener("pointerup",u),()=>{document.removeEventListener("pointermove",b),document.removeEventListener("pointerup",u)}},[]);const m=b=>{b.preventDefault(),x.current={sx:b.clientX,sy:b.clientY,ox:a.x,oy:a.y}},h=()=>{const b=c.current,u=g.current,y=f.current;if(!b||!u){o(e);return}const v=(y||b).getBoundingClientRect(),E=1e3,H=Math.round(E*r),S=H/v.width,C=document.createElement("canvas");C.width=H,C.height=E;const B=C.getContext("2d");if(!B){o(e);return}const D=u.getBoundingClientRect(),$=(D.left-v.left)*S,X=(D.top-v.top)*S,Q=D.width*S,Y=D.height*S;try{B.drawImage(u,$,X,Q,Y),o(C.toDataURL("image/png"))}catch{o(e)}};return Ao.createPortal(n.jsx(p.Box,{sx:{position:"fixed",inset:0,zIndex:1400,bgcolor:"rgba(15,23,42,.6)",display:"flex",alignItems:"center",justifyContent:"center",p:2.25,overflow:"auto"},children:n.jsxs(p.Box,{sx:{width:"100%",maxWidth:320,bgcolor:"background.paper",border:"1px solid",borderColor:"divider",borderRadius:3,boxShadow:"0 20px 50px rgba(15,23,42,.4)",p:2},children:[n.jsx(p.Typography,{sx:{fontSize:14,fontWeight:800,mb:.5},children:"Adjust brand image"}),n.jsx(p.Typography,{sx:{fontSize:11.5,color:"text.secondary",mb:1.5,lineHeight:1.45},children:"Drag and zoom to fit your image inside the bright frame. Anything in the dimmed area is cropped out."}),n.jsxs(p.Box,{ref:c,onPointerDown:m,sx:{position:"relative",width:"100%",aspectRatio:"1.55",borderRadius:2.5,overflow:"hidden",bgcolor:"#e9edf2",cursor:"grab",touchAction:"none",display:"grid",placeItems:"center","&:active":{cursor:"grabbing"}},children:[n.jsx("img",{ref:g,src:e,alt:"",draggable:!1,style:{position:"absolute",left:"50%",top:"50%",transform:`translate(-50%,-50%) translate(${a.x}px,${a.y}px) scale(${i})`,transformOrigin:"center",maxWidth:"100%",maxHeight:"100%",width:"auto",height:"auto",userSelect:"none",pointerEvents:"none"}}),n.jsx(p.Box,{ref:f,sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"72%",aspectRatio:String(r),maxWidth:"90%",boxShadow:"0 0 0 9999px rgba(10,15,25,.62)",border:"2px solid #fff",borderRadius:"3px",pointerEvents:"none"}})]}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1,my:1.5},children:[n.jsx(p.Typography,{sx:{fontSize:12,fontWeight:700,color:"text.secondary"},children:"Zoom"}),n.jsx(p.Slider,{size:"small",min:.3,max:4,step:.02,value:i,onChange:(b,u)=>s(u)})]}),n.jsxs(p.Box,{sx:{display:"flex",gap:1},children:[n.jsx(p.Box,{component:"button",onClick:t,sx:{flex:1,p:1.25,borderRadius:2.5,border:"1px solid",borderColor:"divider",bgcolor:"action.hover",color:"text.secondary",fontSize:12.5,fontWeight:700,cursor:"pointer"},children:"Cancel"}),n.jsx(p.Box,{component:"button",onClick:h,sx:{flex:1,p:1.25,borderRadius:2.5,border:"none",bgcolor:"primary.main",color:"primary.contrastText",fontSize:12.5,fontWeight:700,cursor:"pointer"},children:"Confirm"})]})]})}),document.body)}function Js(){const e=L(f=>f.settings),r=L(f=>f.set),t=He(e.mode),[o,i]=_.useState(null),s=(f,x)=>{var b;const m=(b=f.target.files)==null?void 0:b[0];if(!m)return;const h=new FileReader;h.onload=()=>i({src:h.result,aspect:x==="logoUrl"?3.5:1.55,target:x}),h.readAsDataURL(m),f.target.value=""},a=f=>{o&&(o.target==="logoUrl"?r({logoUrl:f,logoMode:"image"}):r({loginImage:f}),i(null))},l={fontSize:11,fontWeight:700,textTransform:"uppercase",letterSpacing:".6px"},c={display:"flex",alignItems:"center",justifyContent:"center",gap:1,border:`1.5px dashed ${t.insetBd}`,borderRadius:2.5,p:1.75,cursor:"pointer",color:t.body,fontSize:12.5,fontWeight:600,bgcolor:t.inset},g=(f,x)=>n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1,mt:1,p:.9,bgcolor:t.inset,border:`1px solid ${t.insetBd}`,borderRadius:2},children:[n.jsx(p.Typography,{variant:"caption",sx:{flex:1,minWidth:0,color:t.body,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f}),n.jsx(p.Box,{component:"button",onClick:x,title:"Remove",sx:{border:"none",background:"transparent",color:t.muted,cursor:"pointer",fontSize:14},children:"✕"})]});return n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1.75},children:[n.jsxs(p.Box,{children:[n.jsx(p.Typography,{variant:"caption",sx:{...l,color:t.label2,display:"block",mb:1},children:"Brand Image"}),n.jsxs(p.Box,{component:"label",sx:c,children:["⬆ Choose image",n.jsx("input",{hidden:!0,type:"file",accept:"image/*",onChange:f=>s(f,"loginImage")})]}),e.loginImage&&g("Uploaded image",()=>r({loginImage:""}))]}),n.jsxs(p.Box,{children:[n.jsx(p.Typography,{variant:"caption",sx:{...l,color:t.label2,display:"block",mb:1},children:"Logo"}),n.jsxs(p.Box,{component:"label",sx:c,children:["⬆ Choose logo file",n.jsx("input",{hidden:!0,type:"file",accept:"image/png,image/svg+xml,image/webp",onChange:f=>s(f,"logoUrl")})]}),e.logoMode==="image"&&e.logoUrl&&g("Uploaded logo",()=>r({logoUrl:"",logoMode:"icon"}))]}),n.jsxs(p.Box,{children:[n.jsx(p.Typography,{variant:"caption",sx:{...l,color:t.label2,display:"block",mb:.5},children:"Panel Colour"}),n.jsx(Gs,{label:"Login panel background",value:e.loginPanelColor,fallback:e.primaryHex,onChange:f=>r({loginPanelColor:f}),onReset:()=>r({loginPanelColor:""})})]}),o&&n.jsx(Ys,{src:o.src,aspect:o.aspect,onCancel:()=>i(null),onConfirm:a})]})}const qs=[{key:"dashboard",label:"Dashboard"},{key:"orders",label:"Orders"},{key:"reports",label:"Reports"},{key:"cameras",label:"Cameras"},{key:"operations",label:"Operations"},{key:"components",label:"Components"},{key:"login",label:"Login"}],Ks=[{key:"dashboard",label:"Dashboard"},{key:"operations",label:"Operations"},{key:"cameras",label:"Cameras"},{key:"reports",label:"Reports"},{key:"orders",label:"Orders"},{key:"components",label:"Components"}],Ke=Nn(e=>({openSection:"",setOpenSection:r=>e({openSection:r}),previewScreen:"dashboard",setPreviewScreen:r=>e({previewScreen:r}),previewMenuOpen:!1,setPreviewMenuOpen:r=>e({previewMenuOpen:r}),studioOpen:!0,setStudioOpen:r=>e({studioOpen:r})}));function Xs({onClose:e}){var M,j,A,k;const r=Ke(T=>T.openSection),t=Ke(T=>T.setOpenSection),o=Ke(T=>T.setPreviewScreen),i=Ke(T=>T.previewScreen),s=Ke(T=>T.previewMenuOpen),a=Ke(T=>T.setPreviewMenuOpen),l=L(T=>T.settings),c=L(T=>T.savedThemes),g=L(T=>T.editingSavedId),f=L(T=>T.isDirty),x=L(T=>T.set),m=L(T=>T.reset),h=He(l.mode),b=_.useRef("theme"),[u,y]=_.useState(!1),v=(T,K)=>{const se=r!==T;t(se?T:""),a(!1),se&&b.current!==T&&(o(K),b.current=T)},E=((M=c.find(T=>T.id===g))==null?void 0:M.name)||((j=Mt.find(T=>T.id===l.presetId))==null?void 0:j.name)||((A=c.find(T=>T.id===l.presetId))==null?void 0:A.name)||"Custom Theme",H=f(),S=((k=Mt.find(T=>T.id===Re.presetId))==null?void 0:k.name)??"default",C={fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},B=({children:T})=>n.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",...C,children:T}),D=n.jsxs(B,{children:[n.jsx("circle",{cx:"13.5",cy:"6.5",r:"2.5"}),n.jsx("circle",{cx:"17.5",cy:"10.5",r:"2.5"}),n.jsx("circle",{cx:"8.5",cy:"7.5",r:"2.5"}),n.jsx("circle",{cx:"6.5",cy:"12.5",r:"2.5"}),n.jsx("path",{d:"M12 2a10 10 0 0 0 0 20 3 3 0 0 0 0-6 2 2 0 0 1 0-4 4 4 0 0 0 4-4 6 6 0 0 0-4-6z"})]}),$=n.jsxs(p.Box,{sx:{display:"flex",gap:"2px",width:14,height:14},children:[n.jsx(p.Box,{sx:{flex:1,background:l.secondaryHex,borderRadius:"2px"}}),n.jsx(p.Box,{sx:{flex:1,background:l.errorHex,borderRadius:"2px"}}),n.jsx(p.Box,{sx:{flex:1,background:l.successHex,borderRadius:"2px"}})]}),X=n.jsxs(B,{children:[n.jsx("path",{d:"M4 20 9 5l5 15M6 14h6"}),n.jsx("path",{d:"M15 20l3-9 3 9M16.2 17h3.6"})]}),Q=n.jsxs(B,{children:[n.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),n.jsx("path",{d:"M3 9h18"})]}),Y=n.jsxs(B,{children:[n.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),n.jsx("path",{d:"M3 9h18M3 15h18M9 3v18"})]}),d=n.jsx(B,{children:n.jsx("rect",{x:"4",y:"4",width:"16",height:"16",rx:"4"})}),I=n.jsxs(n.Fragment,{children:[n.jsxs(B,{children:[n.jsx("path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"}),n.jsx("path",{d:"M10 21a2 2 0 0 0 4 0"})]}),n.jsx(p.Box,{sx:{position:"absolute",top:"6px",right:"6px",width:7,height:7,borderRadius:"50%",background:l.primaryHex,border:`1.5px solid ${h.iconTile}`}})]}),P=n.jsxs(B,{children:[n.jsx("path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"}),n.jsx("path",{d:"M10 17l5-5-5-5"}),n.jsx("path",{d:"M15 12H3"})]}),W=l.mode==="dark",z=T=>T.charAt(0).toUpperCase()+T.slice(1),q={sm:"Small",df:"Default",lg:"Large"},U={sharp:"Sharp",rounded:"Rounded",round:"Round"},G={compact:"Compact",default:"Default",comfortable:"Comfortable"},R={flat:"Flat",outlined:"Outlined",soft:"Soft",raised:"Raised",elevated:"Elevated",floating:"Floating"},O={split:"Split Brand",centered:"Centered Card"},J={"top-center":"Top Center","top-right":"Top Right","bottom-left":"Bottom Left","bottom-right":"Bottom Right"},V={theme:`${E} · ${W?"Dark":"Light"}`,color:"Secondary & status colours",type:`${l.fontFamily} · ${q[l.textSize]??"Default"}`,cards:"Card style, header, nesting & surface tint",tables:"Table row density, dividers, striping & header style — previewed on the Orders screen",shape:`${U[l.radiusPreset]??"Custom"} · ${G[l.density]??"Default"} · ${R[l.cardStyle]??""}`,notif:`${J[l.notifPosition]??""} · ${z(l.notifStyle)}`,login:`${O[l.loginLayout]??""}${l.loginImage?" · image":""}`},N=[{id:"theme",title:"Theme Settings",info:"Presets, saved themes & light/dark mode.",icon:D,screen:"dashboard",body:n.jsx(Bs,{})},{id:"color",title:"Colour Settings",info:"Brand, text & status colours.",icon:$,screen:"components",body:n.jsx(Ps,{})},{id:"type",title:"Typography",info:"Fonts, sizes, weight & line-height.",icon:X,screen:"components",body:n.jsx(zs,{})},{id:"cards",title:"Cards",info:"Card style, header, nesting & tint.",icon:Q,screen:"dashboard",body:n.jsx(Ls,{})},{id:"tables",title:"Tables",info:"Row/column density, dividers & alignment.",icon:Y,screen:"orders",body:n.jsx(Ns,{})},{id:"shape",title:"Surface & Shape",info:"Radius, density, elevation & spacing.",icon:d,screen:"dashboard",body:n.jsx(Vs,{})},{id:"notif",title:"Notifications",info:"Toast placement & behaviour.",icon:I,screen:"operations",body:n.jsx(Us,{})},{id:"login",title:"Login Screen",info:"Brand image, logo & panel colour.",icon:P,screen:"login",body:n.jsx(Js,{})}];return n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",bgcolor:h.card},children:[n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.1,borderBottom:`1px solid ${h.divider}`,bgcolor:h.card},children:[n.jsxs(p.Box,{sx:{display:"flex",gap:.5,flexShrink:0},children:[n.jsx(p.Box,{sx:{width:13,height:13,borderRadius:"3px",bgcolor:l.primaryHex}}),n.jsx(p.Box,{sx:{width:13,height:13,borderRadius:"3px",bgcolor:l.secondaryHex}})]}),n.jsxs(p.Box,{sx:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:"6px"},children:[n.jsx(p.Typography,{variant:"caption",sx:{minWidth:0,fontWeight:800,color:h.text,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:E}),H&&n.jsx(p.Tooltip,{title:"Unsaved changes",arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.Box,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:"error.main",flexShrink:0}})})]}),n.jsx(p.Tooltip,{title:"Reset to defaults",arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.IconButton,{size:"small",onClick:()=>y(!0),sx:{bgcolor:"action.selected"},children:n.jsx(xs,{sx:{fontSize:16}})})}),n.jsx(p.Tooltip,{title:l.mode==="dark"?"Switch to light":"Switch to dark",arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.IconButton,{size:"small",onClick:()=>x({mode:l.mode==="dark"?"light":"dark"}),sx:{bgcolor:"action.selected"},children:l.mode==="dark"?n.jsx(ys,{sx:{fontSize:16}}):n.jsx(ms,{sx:{fontSize:16}})})})]}),s&&n.jsxs(p.Box,{sx:{borderBottom:"1px solid",borderColor:"divider",borderLeft:"3px solid #eab308",bgcolor:T=>T.palette.mode==="dark"?"rgba(234,179,8,0.14)":"#fef9c3",px:1.6,py:1.5},children:[n.jsx(p.Typography,{sx:{fontSize:10,fontWeight:800,textTransform:"uppercase",letterSpacing:".6px",color:T=>T.palette.mode==="dark"?"#f2cd5c":"#854d0e",mb:1},children:"Previewing Screen"}),n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:.75},children:Ks.map(T=>{const K=i===T.key;return n.jsx(p.Box,{component:"button",onClick:()=>{i!==T.key&&o(T.key),a(!1)},sx:{px:.75,py:1,borderRadius:2,cursor:"pointer",fontSize:11,fontWeight:K?800:600,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",border:"1.5px solid",borderColor:K?"#d4a915":"#e6dca8",bgcolor:K?"#fde68a":"background.paper",color:K?"#713f12":"text.secondary"},children:T.label},T.key)})})]}),N.map(T=>n.jsx(ks,{icon:T.icon,title:T.title,info:V[T.id]??T.info,open:r===T.id,dimmed:r!==""&&r!==T.id,onToggle:()=>v(T.id,T.screen),onPreviewMenu:()=>a(!s),children:T.body},T.id)),n.jsxs(p.Dialog,{open:u,onClose:()=>y(!1),PaperProps:{sx:{borderRadius:3,width:320,p:2.5}},children:[n.jsx(p.Typography,{sx:{fontSize:15,fontWeight:800,mb:.75},children:"Reset everything?"}),n.jsxs(p.Typography,{sx:{fontSize:12.5,color:"text.secondary",lineHeight:1.5,mb:2.25},children:["This reverts every change you've made — theme preset, light/dark mode, brand colours, logo, typography, cards, surface & shape, notifications and login screen — back to the default ",S," preset. This can't be undone."]}),n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[n.jsx(p.Box,{component:"button",onClick:()=>{m(),y(!1)},sx:{p:1.4,borderRadius:2.5,border:"none",bgcolor:"error.main",color:"error.contrastText",fontSize:13,fontWeight:700,cursor:"pointer"},children:"Reset to defaults"}),n.jsx(p.Box,{component:"button",onClick:()=>y(!1),sx:{p:1.1,borderRadius:2.5,border:"none",bgcolor:"transparent",color:"text.secondary",fontSize:12.5,fontWeight:600,cursor:"pointer"},children:"Cancel"})]})]})]})}const Qs=vt(n.jsx("path",{d:"M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v2H8v2h8v-2h-2v-2h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H3V4h18z"}),"DesktopWindowsOutlined");function Br(e,r,t){const o=_.useRef(null),[i,s]=_.useState(e);return _.useLayoutEffect(()=>{const a=o.current;if(!a)return;const l=()=>{const x=a.children.length;if(!x)return;const m=parseFloat(getComputedStyle(a).rowGap)||0;let h=0;for(const y of Array.from(a.children))h+=y.offsetHeight;const b=h/x,u=a.clientHeight;u<=0||b<=0||s(Math.max(r,Math.min(t,Math.floor((u+m)/(b+m)))))};l();const c=requestAnimationFrame(l),g=setTimeout(l,300),f=new ResizeObserver(l);return f.observe(a),()=>{cancelAnimationFrame(c),clearTimeout(g),f.disconnect()}},[r,t]),[o,i]}function Un(e,r,t){const o=_.useRef(null),i=_.useRef(null),[s,a]=_.useState(e);return _.useLayoutEffect(()=>{const l=i.current;if(!l)return;const c=()=>{var u;const m=Array.from(l.children).filter(y=>getComputedStyle(y).position!=="absolute"),h=m.length?m[0].offsetHeight:((u=o.current)==null?void 0:u.offsetHeight)||36,b=l.clientHeight;b<=0||h<=0||a(Math.max(r,Math.min(t,Math.floor(b/h))))};c();const g=requestAnimationFrame(c),f=setTimeout(c,300),x=new ResizeObserver(c);return x.observe(l),()=>{cancelAnimationFrame(g),clearTimeout(f),x.disconnect()}},[r,t]),[o,i,s]}const Zs=["Jan","Feb","Mar","Apr","May","Jun"],el=[44,60,50,74,88,96],tl=[24,32,30,42,52,60];function rl(){const e=ve(),r=L(M=>M.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:c,tH1:g,tH2:f,tTitle:x,tH4:m,wH1:h,headFam:b,headLH:u,accentBg:y,btnText:v,tBodySm:E,bwEmph:H,btnCase:S,bodyWeightEff:C,bodyLH:B,tCaption:D,pMain:$,sMain:X}=e,Q=b+",sans-serif",Y=r.fontFamily+",sans-serif",d=e.hc1||t.textPrimary,I=e.hc2||t.textPrimary,P=e.hc3||t.textPrimary,W=[{label:"Revenue",val:"$2.41M",chg:"+12.5%",up:!0},{label:"Open Orders",val:"1,284",chg:"+3.2%",up:!0},{label:"Inventory",val:"8,540",chg:"-1.8%",up:!1},{label:"Active Users",val:"342",chg:"+5",up:!0}].map(M=>({...M,cc:M.up?e.sucTxt:e.errTxt,cb:M.up?e.sucSoft:e.errSoft,arrow:M.up?"▲":"▼"})),z=M=>M==="✓"?{cb:e.sucSoft,cc:e.sucTxt}:M==="!"?{cb:e.warnSoft,cc:e.warnTxt}:M==="+"?{cb:e.infoSoft,cc:e.infoTxt}:{cb:t.pContainer,cc:e.isDark?t.pLight:t.pDark},q=[{title:"Order ORD-1042 delivered to Acme Corp",time:"2m ago",ic:"✓"},{title:"Invoice #4821 paid — $12,400",time:"18m ago",ic:"$"},{title:"Low stock alert: Widget Pro (12 left)",time:"1h ago",ic:"!"},{title:"New customer onboarded: Globex Ltd",time:"3h ago",ic:"+"},{title:'Report "Q2 Summary" exported to PDF',time:"5h ago",ic:"▤"},{title:"Shipment SHP-2093 dispatched — Initech",time:"6h ago",ic:"✓"},{title:"Refund processed — $840 to Umbrella Co",time:"7h ago",ic:"$"},{title:"Payment overdue: Waystar Royco",time:"8h ago",ic:"!"},{title:"New support ticket — Stark Industries",time:"9h ago",ic:"+"},{title:"Backup completed — 12,480 records",time:"11h ago",ic:"✓"},{title:"Purchase order PO-771 approved",time:"13h ago",ic:"$"},{title:"Inventory reconciled — Warehouse 3",time:"15h ago",ic:"▤"},{title:"SLA breach warning — Hooli Inc",time:"17h ago",ic:"!"},{title:"New user invited — M. Fernandez",time:"19h ago",ic:"+"},{title:"Quarterly report scheduled",time:"21h ago",ic:"▤"},{title:"Order ORD-1039 delivered to Oscorp",time:"23h ago",ic:"✓"}].map(M=>({...M,...z(M.ic)})),[U,G]=Br(5,4,q.length),R=q.slice(0,G),O=e.cardBorder==="none"?"none":e.cardBorder,J={background:t.paper,border:O,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden"},V={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between"},N={fontSize:x,lineHeight:u,fontWeight:h,color:P,fontFamily:Q};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:O,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:Y,fontWeight:C,color:t.textPrimary},children:[n.jsxs("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between",gap:14},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:u,fontWeight:h,color:d,letterSpacing:"-.3px",fontFamily:Q},children:"Dashboard"}),n.jsx("span",{title:"Good morning, Admin · Jun 21, 2026",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:H,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]}),n.jsx("button",{style:{padding:"10px 20px",borderRadius:i,border:"none",background:y,color:v,fontSize:E,fontWeight:H,textTransform:S,letterSpacing:".4px",boxShadow:e.btnShadow,whiteSpace:"nowrap",cursor:"pointer"},children:"+ New"})]}),n.jsxs("div",{style:{padding:c,background:t.bgDefault,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[n.jsxs("div",{style:{...J,marginBottom:l},children:[n.jsxs("div",{style:V,children:[n.jsx("span",{style:{...N},children:"Performance Overview"}),n.jsx("span",{style:{fontSize:D,color:t.textSecondary,fontWeight:H},children:"This month"})]}),n.jsx("div",{style:{padding:s,display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:l},children:W.map(M=>n.jsxs("div",{style:{background:t.paper2,border:e.nestBorder,borderRadius:i,boxShadow:e.nestShadow,padding:a},children:[n.jsx("div",{style:{fontSize:m,color:t.textSecondary,fontWeight:h,fontFamily:Q,textTransform:"uppercase",letterSpacing:".6px",marginBottom:8},children:M.label}),n.jsx("div",{style:{fontSize:f,fontWeight:h,color:I,letterSpacing:"-.8px",lineHeight:1,marginBottom:6},children:M.val}),n.jsxs("span",{style:{fontSize:D,fontWeight:H,color:M.cc,background:M.cb,padding:"3px 9px",borderRadius:999},children:[M.arrow," ",M.chg]})]},M.label))})]}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 300px",gap:l,flex:1,minHeight:0},children:[n.jsxs("div",{style:{...J,display:"flex",flexDirection:"column",minHeight:0},children:[n.jsxs("div",{style:V,children:[n.jsx("span",{style:N,children:"Revenue Trend"}),n.jsx("div",{style:{display:"flex",gap:12},children:[["Revenue",$],["Profit",X]].map(([M,j])=>n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5},children:[n.jsx("div",{style:{width:10,height:10,borderRadius:2,background:j}}),n.jsx("span",{style:{fontSize:D,color:t.textSecondary},children:M})]},M))})]}),n.jsx("div",{style:{padding:`${a}px ${s}px`,display:"flex",alignItems:"flex-end",gap:12,flex:1,minHeight:200},children:Zs.map((M,j)=>n.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",gap:6,height:"100%"},children:[n.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-end",gap:3,flex:1},children:[n.jsx("div",{style:{width:"100%",height:tl[j]+"%",background:X,opacity:.55,borderRadius:`${i} ${i} 0 0`}}),n.jsx("div",{style:{width:"100%",height:el[j]+"%",background:$,borderRadius:`${i} ${i} 0 0`}})]}),n.jsx("span",{style:{fontSize:D,color:t.textSecondary},children:M})]},M))})]}),n.jsxs("div",{style:{...J,display:"flex",flexDirection:"column",minHeight:0},children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:N,children:"Recent Activity"})}),n.jsx("div",{ref:U,style:{padding:a,display:"flex",flexDirection:"column",justifyContent:"space-between",gap:4,flex:1,minHeight:0},children:R.map((M,j)=>n.jsxs("div",{style:{display:"flex",gap:11,alignItems:"flex-start",padding:8,borderRadius:i},children:[n.jsx("div",{style:{width:28,height:28,borderRadius:i,background:M.cb,color:M.cc,display:"grid",placeItems:"center",flexShrink:0,fontSize:13,fontWeight:H},children:M.ic}),n.jsxs("div",{style:{flex:1,minWidth:0},children:[n.jsx("div",{style:{fontSize:E,color:t.textPrimary,fontFamily:Y,fontWeight:C,lineHeight:B,marginBottom:2},children:M.title}),n.jsx("div",{style:{fontSize:D,color:t.textSecondary,fontFamily:Y},children:M.time})]})]},j))})]})]})]})]})}const nl=[{id:"ORD-1042",cust:"Acme Corporation",status:"Delivered",amt:"$12,400",date:"Jun 18"},{id:"ORD-1041",cust:"Globex Ltd",status:"Processing",amt:"$8,750",date:"Jun 17"},{id:"ORD-1040",cust:"Initech",status:"Pending",amt:"$5,200",date:"Jun 16"},{id:"ORD-1039",cust:"Umbrella Co",status:"Shipped",amt:"$22,100",date:"Jun 15"},{id:"ORD-1038",cust:"Waystar Royco",status:"Delivered",amt:"$9,800",date:"Jun 14"},{id:"ORD-1037",cust:"Stark Industries",status:"Processing",amt:"$31,500",date:"Jun 13"},{id:"ORD-1036",cust:"Wayne Enterprises",status:"Delivered",amt:"$18,240",date:"Jun 12"},{id:"ORD-1035",cust:"Soylent Corp",status:"Pending",amt:"$4,120",date:"Jun 11"},{id:"ORD-1034",cust:"Hooli Inc",status:"Shipped",amt:"$27,900",date:"Jun 10"},{id:"ORD-1033",cust:"Cyberdyne Systems",status:"Delivered",amt:"$14,650",date:"Jun 09"},{id:"ORD-1032",cust:"Massive Dynamic",status:"Processing",amt:"$10,300",date:"Jun 08"},{id:"ORD-1031",cust:"Tyrell Corp",status:"Delivered",amt:"$16,780",date:"Jun 07"},{id:"ORD-1030",cust:"Oscorp",status:"Shipped",amt:"$7,940",date:"Jun 06"},{id:"ORD-1029",cust:"Nakatomi Trading",status:"Pending",amt:"$3,560",date:"Jun 05"},{id:"ORD-1028",cust:"Gekko & Co",status:"Delivered",amt:"$25,300",date:"Jun 04"},{id:"ORD-1027",cust:"Bluth Company",status:"Processing",amt:"$6,410",date:"Jun 03"}],fr="100px 1fr 120px 100px 80px 70px";function ol(){const e=ve(),r=L(G=>G.settings),{t,rad:o,radSm:i,pad:s,padSm:a,screenPad:l,rowPy:c,tH1:g,wH1:f,headFam:x,headLH:m,accentBg:h,btnText:b,btnShadow:u,tBody:y,tBodySm:v,tCaption:E,tOverline:H,bwEmph:S,btnCase:C,bodyWeightEff:B,pMain:D,table:$}=e,X=x+",sans-serif",Q=r.fontFamily+",sans-serif",Y=e.hc1||t.textPrimary,[d,I,P]=Un(12,3,16),W=nl.slice(0,P).map((G,R)=>({...G,...$.statusMap[G.status]||{sb:t.divider,sc:t.textSecondary},rowBg:r.tableStripe&&R%2===1?$.stripeBg:"transparent"})),z=e.cardBorder==="none"?"none":e.cardBorder,q=G=>({fontSize:H,fontWeight:S,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".5px",borderRight:$.colBorder,alignSelf:"stretch",display:"flex",alignItems:$.cellAI,justifyContent:$.cellJC,padding:`${$.rowPy} ${$.cellPx}`}),U={alignSelf:"stretch",display:"flex",alignItems:$.cellAI,justifyContent:$.cellJC,padding:`${$.rowPy} ${$.cellPx}`};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:z,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:Q,fontWeight:B,color:t.textPrimary},children:[n.jsxs("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:14},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:m,fontWeight:f,color:Y,letterSpacing:"-.3px",fontFamily:X},children:"Orders"}),n.jsx("span",{title:"1,284 orders · June 2026",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:S,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]}),n.jsx("button",{style:{padding:"10px 20px",borderRadius:i,border:"none",background:h,color:b,fontSize:v,fontWeight:S,textTransform:C,letterSpacing:".4px",boxShadow:u,whiteSpace:"nowrap",cursor:"pointer"},children:"+ New Order"})]}),n.jsx("div",{style:{padding:l,background:t.bgDefault,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:z,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",flex:1,minHeight:0},children:[n.jsxs("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",gap:9,alignItems:"center",flexWrap:"wrap"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,background:t.paper,border:"1.5px solid "+t.divider,borderRadius:999,padding:"8px 15px",flex:1,minWidth:170},children:[n.jsx("span",{style:{color:t.textSecondary,fontSize:13},children:"⌕"}),n.jsx("span",{style:{fontSize:v,color:t.textSecondary},children:"Search orders…"})]}),$.filters.map(G=>n.jsx("button",{style:{padding:"7px 14px",borderRadius:999,border:"1px solid "+G.brd,background:G.bg,color:G.c,fontSize:E,fontWeight:S,whiteSpace:"nowrap",cursor:"pointer"},children:G.label},G.label))]}),n.jsxs("div",{ref:d,style:{display:"grid",gridTemplateColumns:fr,padding:`0 ${s}px`,borderBottom:$.rowBorder,background:$.headBg},children:[["Order ID","Customer","Status","Amount","Date"].map(G=>n.jsx("div",{style:q(),children:G},G)),n.jsx("div",{style:{alignSelf:"stretch",padding:`${$.rowPy} 0`}})]}),n.jsxs("div",{ref:I,style:{position:"relative",display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[n.jsxs("div",{style:{position:"absolute",inset:0,padding:`0 ${s}px`,display:"grid",gridTemplateColumns:fr,pointerEvents:"none",zIndex:2},children:[n.jsx("div",{style:{borderRight:$.colBorder}}),n.jsx("div",{style:{borderRight:$.colBorder}}),n.jsx("div",{style:{borderRight:$.colBorder}}),n.jsx("div",{style:{borderRight:$.colBorder}}),n.jsx("div",{style:{borderRight:$.colBorder}}),n.jsx("div",{})]}),W.map(G=>n.jsxs("div",{style:{display:"grid",gridTemplateColumns:fr,padding:`0 ${s}px`,borderBottom:$.rowBorder,alignItems:"stretch",background:G.rowBg},children:[n.jsx("div",{style:{...U,fontSize:v,fontWeight:S,color:D,fontFamily:Q},children:G.id}),n.jsx("div",{style:{...U,fontSize:y,color:t.textPrimary,fontWeight:S},children:G.cust}),n.jsx("div",{style:U,children:n.jsx("span",{style:{padding:"4px 11px",borderRadius:999,fontSize:E,fontWeight:S,background:G.sb,color:G.sc,whiteSpace:"nowrap"},children:G.status})}),n.jsx("div",{style:{...U,fontSize:y,color:t.textPrimary,fontWeight:S},children:G.amt}),n.jsx("div",{style:{...U,fontSize:v,color:t.textSecondary},children:G.date}),n.jsx("div",{style:U,children:n.jsx("button",{style:{fontSize:E,color:D,background:t.pContainer,border:"none",fontWeight:S,padding:"5px 11px",borderRadius:i,cursor:"pointer"},children:"View"})})]},G.id))]}),n.jsxs("div",{style:{padding:`${c}px ${s}px`,display:"flex",alignItems:"center",gap:7,borderTop:"1px solid "+t.divider},children:[n.jsxs("span",{style:{fontSize:v,color:t.textSecondary,flex:1},children:["Showing 1–",W.length," of 1,284"]}),n.jsx("button",{style:{width:32,height:32,borderRadius:i,border:"1px solid "+t.outline,background:"transparent",color:t.textSecondary,cursor:"pointer"},children:"‹"}),n.jsx("button",{style:{width:32,height:32,borderRadius:i,border:"none",background:h,color:b,fontWeight:S,cursor:"pointer"},children:"1"}),n.jsx("button",{style:{width:32,height:32,borderRadius:i,border:"1px solid "+t.outline,background:"transparent",color:t.textSecondary,cursor:"pointer"},children:"2"}),n.jsx("button",{style:{width:32,height:32,borderRadius:i,border:"1px solid "+t.outline,background:"transparent",color:t.textSecondary,cursor:"pointer"},children:"›"})]})]})})]})}function il(){const e=ve(),r=L(Z=>Z.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:c,tH1:g,tH2:f,tTitle:x,tH4:m,tH5:h,tH6:b,tBody:u,tBodySm:y,tCaption:v,wH1:E,headFam:H,headLH:S,accentBg:C,btnText:B,btnShadow:D,bwEmph:$,btnCase:X,bodyWeightEff:Q,bodyLH:Y,pMain:d,errSoft:I,errTxt:P,warnSoft:W,warnTxt:z,infoSoft:q,infoTxt:U,sucSoft:G,sucTxt:R}=e,O=H+",sans-serif",J=r.fontFamily+",sans-serif",V=e.t.highlight,N=e.t.highlightSoft,M=e.t.highlightBd,j=t.pContainer,A=t.onPContainer,k=t.pContrast,T=e.hc1||t.textPrimary,K=e.hc2||t.textPrimary,se=e.hc3||t.textPrimary,F=e.hc4||t.textPrimary,fe=e.hc5||t.textPrimary,Oe=e.hc6||t.textPrimary,De=e.cardBorder==="none"?"none":e.cardBorder,Ve={display:"flex",flexDirection:"column",background:t.paper,border:De,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",height:"100%"},Ue={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},Be={fontSize:x,lineHeight:S,fontWeight:E,color:se,fontFamily:O},Xt=[{label:"Dashboard Overview",size:g,w:E,color:T,lh:1.1,ls:"-.5px",name:"H1",border:!0},{label:"Revenue Report",size:f,w:E,color:K,lh:1.1,ls:"-.4px",name:"H2",border:!0},{label:"Performance Overview",size:x,w:E,color:se,lh:1.15,name:"H3",border:!0},{label:"Active Users",size:m,w:E,color:F,lh:1.2,name:"H4",border:!0},{label:"Last updated 2m ago",size:h,w:E,color:fe,lh:1.25,name:"H5",border:!0},{label:"Status · Live",size:b,w:E,color:Oe,lh:1.3,name:"H6",border:!0}],Me=Z=>n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"11px 12px",borderBottom:"1px solid "+t.divider,background:Z?N:"transparent",boxShadow:Z?"inset 3px 0 0 "+V:"none"},children:[n.jsx("div",{style:{width:16,height:16,borderRadius:"50%",border:"2px solid "+(Z?V:t.outline),display:"grid",placeItems:"center",flexShrink:0},children:Z&&n.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:V}})}),n.jsx("span",{style:{flex:1,fontSize:y,fontFamily:J,fontWeight:Z?$:Q,color:t.textPrimary},children:Z?"Selected item":"Unselected item"}),Z&&n.jsx("span",{style:{fontSize:v,fontFamily:J,fontWeight:$,color:t.textSecondary},children:"Active"})]}),St=(Z,ct,pt)=>n.jsxs("div",{style:{position:"relative",border:Z?"2px solid "+d:"1.5px solid "+t.outline,borderRadius:i,padding:"12px 13px"},children:[n.jsx("span",{style:{position:"absolute",top:-8,left:10,background:t.paper,padding:"0 5px",fontSize:v,color:Z?d:t.textSecondary,fontWeight:Z?$:void 0},children:ct}),n.jsx("span",{style:{fontSize:u,color:Z?t.textPrimary:t.textSecondary},children:pt})]}),Ge=(Z,ct,pt)=>n.jsx("span",{style:{padding:"5px 13px",borderRadius:999,background:Z,color:ct,fontSize:v,fontWeight:$},children:pt}),Fe=Z=>({padding:"9px 20px",borderRadius:i,fontSize:y,fontWeight:$,textTransform:X,letterSpacing:".4px",cursor:"pointer",...Z});return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:De,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:J,fontWeight:Q,color:t.textPrimary},children:[n.jsx("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:S,fontWeight:E,color:T,letterSpacing:"-.3px",fontFamily:O},children:"Component Library"}),n.jsx("span",{title:"Every Material UI component reflects your live theme",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:$,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]})}),n.jsxs("div",{style:{padding:c,background:t.bgDefault,display:"flex",flexDirection:"column",gap:l,flex:1,minHeight:0},children:[n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:l,alignItems:"stretch"},children:[n.jsxs("div",{style:Ve,children:[n.jsx("div",{style:Ue,children:n.jsx("span",{style:Be,children:"Typography Scale"})}),n.jsxs("div",{style:{padding:s,display:"flex",flexDirection:"column",justifyContent:"space-between",flex:1,minHeight:0,gap:6},children:[Xt.map(Z=>n.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,borderBottom:"1px solid "+t.divider,paddingBottom:14},children:[n.jsx("span",{style:{fontSize:Z.size,lineHeight:Z.lh,fontWeight:Z.w,color:Z.color,fontFamily:O,letterSpacing:Z.ls},children:Z.label}),n.jsxs("span",{style:{fontSize:Z.size,color:t.textSecondary,fontWeight:Z.w,whiteSpace:"nowrap",flexShrink:0,fontFamily:O},children:[Z.name," · ",Z.size]})]},Z.name)),n.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12},children:[n.jsx("span",{style:{fontSize:u,lineHeight:Y,color:t.textPrimary,fontFamily:J,fontWeight:Q},children:"Body text — the quick brown fox jumps over the lazy dog."}),n.jsxs("span",{style:{fontSize:u,color:t.textSecondary,fontWeight:Q,whiteSpace:"nowrap",flexShrink:0,fontFamily:J},children:["Body · ",u]})]}),n.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12},children:[n.jsx("span",{style:{fontSize:v,lineHeight:Y,color:t.textSecondary,fontFamily:J,fontWeight:Q},children:"Caption & helper text style"}),n.jsxs("span",{style:{fontSize:v,color:t.textSecondary,fontWeight:Q,whiteSpace:"nowrap",flexShrink:0,fontFamily:J},children:["Caption · ",v]})]})]})]}),n.jsxs("div",{style:Ve,children:[n.jsx("div",{style:Ue,children:n.jsx("span",{style:Be,children:"Selection States"})}),n.jsxs("div",{style:{padding:s,display:"flex",flexDirection:"column",gap:14},children:[n.jsxs("div",{style:{display:"flex",gap:2,borderBottom:"1.5px solid "+t.divider},children:[n.jsx("div",{style:{flex:1,textAlign:"center",padding:"8px 4px",fontSize:y,fontWeight:$,color:t.textPrimary,background:N,borderBottom:"2.5px solid "+d,marginBottom:-1.5,borderRadius:"6px 6px 0 0"},children:"Overview"}),n.jsx("div",{style:{flex:1,textAlign:"center",padding:"8px 4px",fontSize:y,fontWeight:$,color:t.textSecondary},children:"Activity"}),n.jsx("div",{style:{flex:1,textAlign:"center",padding:"8px 4px",fontSize:y,fontWeight:$,color:t.textSecondary},children:"Settings"})]}),n.jsxs("div",{style:{display:"flex",flexDirection:"column",border:"1px solid "+t.divider,borderRadius:i,overflow:"hidden"},children:[Me(!0),Me(!1),Me(!1),Me(!1),Me(!0),Me(!1)]}),n.jsx("div",{style:{display:"inline-flex",alignSelf:"flex-start",padding:"6px 12px",borderRadius:i,background:N,border:"1px solid "+M},children:n.jsx("span",{style:{fontSize:v,fontWeight:$,color:V},children:"2 selected items"})})]})]})]}),n.jsxs("div",{style:{...Ve,height:"auto"},children:[n.jsx("div",{style:Ue,children:n.jsx("span",{style:Be,children:"Inputs & Selection"})}),n.jsxs("div",{style:{padding:s},children:[n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:l,marginBottom:l},children:[St(!1,"Outlined","Placeholder…"),St(!0,"Focused","Active value")]}),n.jsxs("div",{style:{display:"flex",gap:22,alignItems:"center",flexWrap:"wrap",paddingTop:a,borderTop:"1px solid "+t.divider},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{width:18,height:18,borderRadius:4,background:d,display:"grid",placeItems:"center",color:k,fontSize:11,fontWeight:$},children:"✓"}),n.jsx("span",{style:{fontSize:y,color:t.textPrimary},children:"Checkbox"})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{width:18,height:18,borderRadius:"50%",border:"2px solid "+d,display:"grid",placeItems:"center"},children:n.jsx("div",{style:{width:9,height:9,borderRadius:"50%",background:d}})}),n.jsx("span",{style:{fontSize:y,color:t.textPrimary},children:"Radio"})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{width:38,height:22,borderRadius:999,background:d,position:"relative"},children:n.jsx("div",{style:{position:"absolute",top:3,right:3,width:16,height:16,borderRadius:"50%",background:"#fff"}})}),n.jsx("span",{style:{fontSize:y,color:t.textPrimary},children:"Switch"})]})]})]})]}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:l,alignItems:"stretch"},children:[n.jsxs("div",{style:Ve,children:[n.jsx("div",{style:Ue,children:n.jsx("span",{style:Be,children:"Buttons"})}),n.jsxs("div",{style:{padding:s,display:"flex",gap:10,flexWrap:"wrap",alignItems:"center"},children:[n.jsx("button",{style:Fe({border:"none",background:C,color:B,boxShadow:D}),children:"Contained"}),n.jsx("button",{style:Fe({border:"1.5px solid "+d,background:"transparent",color:d}),children:"Outlined"}),n.jsx("button",{style:Fe({border:"none",background:"transparent",color:d}),children:"Text"}),n.jsx("button",{style:Fe({border:"none",background:j,color:A}),children:"Tonal"}),n.jsx("button",{style:Fe({border:"none",background:C,color:B,boxShadow:D,borderRadius:999}),children:"Rounded"}),n.jsx("button",{style:Fe({border:"none",background:I,color:P}),children:"Error"})]})]}),n.jsxs("div",{style:Ve,children:[n.jsx("div",{style:Ue,children:n.jsx("span",{style:Be,children:"Chips, Alerts & Progress"})}),n.jsxs("div",{style:{padding:s},children:[n.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginBottom:l},children:[Ge(j,A,"Primary"),Ge(G,R,"Success"),Ge(W,z,"Warning"),Ge(q,U,"Info"),Ge(I,P,"Error")]}),n.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:7},children:[n.jsx("span",{style:{fontSize:y,color:t.textPrimary,fontWeight:$},children:"Revenue goal"}),n.jsx("span",{style:{fontSize:y,color:d,fontWeight:$},children:"74%"})]}),n.jsx("div",{style:{height:8,background:t.paper2,border:"1px solid "+t.divider,borderRadius:999,overflow:"hidden"},children:n.jsx("div",{style:{height:"100%",width:"74%",background:d,borderRadius:999}})})]})]})]})]})]})}const al=[{label:"Cameras Online",val:"5 / 6"},{label:"Recording",val:"4"},{label:"Motion Alerts",val:"2"},{label:"Storage Used",val:"82%"}],sl=[{name:"CAM 01",loc:"Main Lobby",rec:!0,online:!0,time:"14:32:08"},{name:"CAM 02",loc:"North Gate",rec:!0,online:!0,time:"14:32:08"},{name:"CAM 03",loc:"Loading Bay",rec:!1,online:!0,time:"14:32:07"},{name:"CAM 04",loc:"Rooftop",rec:!0,online:!0,time:"14:32:08"},{name:"CAM 05",loc:"Parking Deck",rec:!1,online:!1,time:"—"},{name:"CAM 06",loc:"Server Room",rec:!0,online:!0,time:"14:32:08"}],ll=[{cam:"CAM 04",label:"Motion detected — Rooftop",time:"just now",sev:"error"},{cam:"CAM 02",label:"Person identified — North Gate",time:"6m ago",sev:"info"},{cam:"CAM 01",label:"Loitering cleared — Main Lobby",time:"22m ago",sev:"success"},{cam:"CAM 06",label:"Door forced — Server Room",time:"34m ago",sev:"error"},{cam:"CAM 03",label:"Vehicle detected — Loading Bay",time:"48m ago",sev:"info"},{cam:"CAM 05",label:"Signal restored — Parking Deck",time:"1h ago",sev:"success"},{cam:"CAM 02",label:"Tailgating flagged — North Gate",time:"1h ago",sev:"error"},{cam:"CAM 04",label:"Crowd density normal — Rooftop",time:"2h ago",sev:"success"},{cam:"CAM 01",label:"Object left behind — Main Lobby",time:"2h ago",sev:"info"},{cam:"CAM 03",label:"Motion detected — Loading Bay",time:"3h ago",sev:"error"},{cam:"CAM 06",label:"Access granted — Server Room",time:"3h ago",sev:"success"},{cam:"CAM 05",label:"Camera offline — Parking Deck",time:"4h ago",sev:"error"},{cam:"CAM 02",label:"Face match — North Gate",time:"5h ago",sev:"info"},{cam:"CAM 01",label:"Queue length normal — Main Lobby",time:"6h ago",sev:"success"},{cam:"CAM 04",label:"Perimeter breach — Rooftop",time:"7h ago",sev:"error"},{cam:"CAM 03",label:"Package scanned — Loading Bay",time:"8h ago",sev:"info"}];function dl(){const e=ve(),r=L(k=>k.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:c,tH1:g,tH2:f,tTitle:x,wH1:m,headFam:h,headLH:b,accentBg:u,btnText:y,btnShadow:v,tBodySm:E,tCaption:H,tOverline:S,bwEmph:C,btnCase:B,bodyWeightEff:D,errSoft:$,errTxt:X,mediaBg:Q,overlaySurface:Y,overlayBorder:d,onOverlay:I,sevMap:P}=e,W=h+",sans-serif",z=r.fontFamily+",sans-serif",q=e.hc1||t.textPrimary,U=e.hc2||t.textPrimary,G=e.hc3||t.textPrimary,R=e.cardBorder==="none"?"none":e.cardBorder,O=sl.map(k=>({...k,dotC:k.online?r.successHex:t.textDisabled})),[J,V]=Br(3,3,16),N=ll.slice(0,V).map(k=>({...k,...P[k.sev]})),M={background:t.paper,border:R,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden"},j={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between"},A={fontSize:x,lineHeight:b,fontWeight:m,color:G,fontFamily:W};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:R,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:z,fontWeight:D,color:t.textPrimary},children:[n.jsxs("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:14},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:b,fontWeight:m,color:q,letterSpacing:"-.3px",fontFamily:W},children:"Camera Surveillance"}),n.jsx("span",{title:"6 feeds · live monitoring & recording",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:C,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:H,fontWeight:C,color:X,background:$,padding:"6px 12px",borderRadius:999},children:[n.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:r.errorHex}}),"LIVE"]}),n.jsx("button",{style:{padding:"10px 18px",borderRadius:i,border:"none",background:u,color:y,fontSize:E,fontWeight:C,textTransform:B,letterSpacing:".4px",boxShadow:v,whiteSpace:"nowrap",cursor:"pointer"},children:"+ Add Camera"})]})]}),n.jsxs("div",{style:{padding:c,background:t.bgDefault,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[n.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:l,marginBottom:l},children:al.map(k=>n.jsxs("div",{style:M,children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:{fontSize:S,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".6px",fontWeight:C},children:k.label})}),n.jsx("div",{style:{padding:`${a}px ${s}px`},children:n.jsx("div",{style:{fontSize:f,fontWeight:m,color:U,letterSpacing:"-.8px",lineHeight:1},children:k.val})})]},k.label))}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 300px",gap:l,flex:1,minHeight:0},children:[n.jsxs("div",{style:{...M,display:"flex",flexDirection:"column"},children:[n.jsxs("div",{style:j,children:[n.jsx("span",{style:A,children:"Camera Wall"}),n.jsx("span",{style:{fontSize:H,color:t.textSecondary,fontWeight:C},children:"2 × 3 grid"})]}),n.jsx("div",{style:{padding:s,display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gridAutoRows:"1fr",gap:l},children:O.map(k=>n.jsxs("div",{style:{position:"relative",borderRadius:i,overflow:"hidden",background:Q,minHeight:104,border:"1px solid "+t.divider},children:[n.jsx("div",{style:{position:"absolute",inset:0,display:"grid",placeItems:"center"},children:n.jsx("span",{style:{fontFamily:"monospace",fontSize:H,color:"rgba(255,255,255,.3)",letterSpacing:1},children:k.loc})}),n.jsxs("div",{style:{position:"absolute",top:7,left:7,display:"flex",alignItems:"center",gap:5,background:Y,border:"1px solid "+d,borderRadius:999,padding:"2px 8px"},children:[n.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:k.dotC}}),n.jsx("span",{style:{color:I,fontSize:H,fontWeight:700,letterSpacing:".4px"},children:k.name})]}),k.rec&&n.jsxs("div",{style:{position:"absolute",top:7,right:7,display:"flex",alignItems:"center",gap:4,background:Y,borderRadius:999,padding:"2px 7px"},children:[n.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:r.errorHex}}),n.jsx("span",{style:{color:I,fontSize:8,fontWeight:800,letterSpacing:".5px"},children:"REC"})]}),k.online&&n.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,padding:"5px 8px",background:"linear-gradient(0deg,rgba(0,0,0,.7),rgba(0,0,0,0))",display:"flex",justifyContent:"space-between",alignItems:"center"},children:n.jsx("span",{style:{color:"#fff",fontSize:H,fontWeight:600,fontFamily:"monospace"},children:k.time})})]},k.name))})]}),n.jsxs("div",{style:{...M,display:"flex",flexDirection:"column"},children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:A,children:"Recent Detections"})}),n.jsx("div",{ref:J,style:{padding:a,display:"flex",flexDirection:"column",justifyContent:"space-between",gap:2,flex:1,minHeight:0},children:N.map((k,T)=>n.jsxs("div",{style:{display:"flex",gap:11,alignItems:"flex-start",padding:"9px 8px",borderRadius:i},children:[n.jsx("div",{style:{width:28,height:28,borderRadius:i,background:k.cb,color:k.cc,display:"grid",placeItems:"center",flexShrink:0,fontSize:11,fontWeight:800,fontFamily:"monospace"},children:"●"}),n.jsxs("div",{style:{flex:1,minWidth:0},children:[n.jsx("div",{style:{fontSize:E,color:t.textPrimary,fontWeight:D,lineHeight:1.35},children:k.label}),n.jsxs("div",{style:{fontSize:H,color:t.textSecondary,marginTop:2},children:[k.cam," · ",k.time]})]})]},T))})]})]})]})]})}const cl=[{ic:"!",label:"Camera 04 motion detected — Loading Bay",time:"just now",sev:"error",unread:!0},{ic:"✓",label:"Stream reconnected — North Gate feed",time:"4m ago",sev:"success",unread:!0},{ic:"i",label:"Access request — J. Okoro (Operator)",time:"22m ago",sev:"info",unread:!1},{ic:"!",label:"Report archive storage 82% full",time:"1h ago",sev:"warning",unread:!1},{ic:"✓",label:"Backup completed — 12,480 clips archived",time:"2h ago",sev:"success",unread:!1},{ic:"i",label:"Firmware update available — 3 devices",time:"3h ago",sev:"info",unread:!1},{ic:"!",label:"Camera 02 lens obstruction detected",time:"5h ago",sev:"error",unread:!1},{ic:"✓",label:"Nightly health check passed — all nodes",time:"6h ago",sev:"success",unread:!1},{ic:"i",label:"New operator invited — M. Fernandez",time:"7h ago",sev:"info",unread:!1},{ic:"!",label:"Bandwidth spike on West Wing uplink",time:"8h ago",sev:"warning",unread:!1},{ic:"✓",label:"Retention policy applied — 30 day window",time:"9h ago",sev:"success",unread:!1},{ic:"i",label:"Scheduled maintenance — Sat 02:00 UTC",time:"11h ago",sev:"info",unread:!1},{ic:"!",label:"Motion zone breach — Perimeter Gate 3",time:"12h ago",sev:"error",unread:!1},{ic:"✓",label:"Clip export finished — Incident #4821",time:"14h ago",sev:"success",unread:!1},{ic:"i",label:"Analytics model updated — v2.4.1",time:"16h ago",sev:"info",unread:!1},{ic:"!",label:"Disk latency elevated — NVR-02",time:"18h ago",sev:"warning",unread:!1}];function pl(){const e=ve(),r=L(A=>A.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:c,tH1:g,tTitle:f,wH1:x,headFam:m,headLH:h,accentBg:b,btnText:u,tBodySm:y,tCaption:v,tOverline:E,bwEmph:H,bodyWeightEff:S,bodyLH:C,errSoft:B,errTxt:D,pMain:$,mediaBg:X,overlaySurface:Q,overlayBorder:Y,onOverlay:d,sevMap:I}=e,P=m+",sans-serif",W=r.fontFamily+",sans-serif",z=e.hc1||t.textPrimary,q=e.hc3||t.textPrimary,U=e.cardBorder==="none"?"none":e.cardBorder,[G,R]=Br(7,4,16),O=cl.slice(0,R).map(A=>({...A,...I[A.sev],rowBg:A.unread?ce(r.primaryHex,e.isDark?.12:.05):"transparent"})),J=O.filter(A=>A.unread).length,V={display:"flex",flexDirection:"column",minHeight:0,background:t.paper,border:U,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden"},N={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between"},M={fontSize:f,lineHeight:h,fontWeight:x,color:q,fontFamily:P},j={height:30,borderRadius:i,border:"none",background:"rgba(255,255,255,.14)",color:d,fontSize:v,fontWeight:H,cursor:"pointer",fontFamily:"inherit"};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:U,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:W,fontWeight:S,color:t.textPrimary},children:[n.jsx("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:h,fontWeight:x,color:z,letterSpacing:"-.3px",fontFamily:P},children:"Operations Center"}),n.jsx("span",{title:"Live map, camera feeds, alerts & access — every module themed end to end",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:H,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]})}),n.jsx("div",{style:{padding:c,background:t.bgDefault,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 320px",gap:l,flex:1,minHeight:0},children:[n.jsxs("div",{style:V,children:[n.jsxs("div",{style:N,children:[n.jsx("span",{style:M,children:"Live Map · Street View"}),n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:v,fontWeight:H,color:D,background:B,padding:"3px 10px",borderRadius:999},children:[n.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:r.errorHex}}),"LIVE"]})]}),n.jsxs("div",{style:{position:"relative",flex:1,minHeight:320,background:X,display:"flex",alignItems:"center",justifyContent:"center"},children:[n.jsx("span",{style:{fontFamily:"monospace",fontSize:v,color:"rgba(255,255,255,.42)",letterSpacing:1.5},children:"◍ GOOGLE STREET VIEW / EARTH EMBED"}),n.jsx("div",{style:{position:"absolute",top:12,left:12,display:"flex",alignItems:"center",gap:7,background:Q,border:"1px solid "+Y,borderRadius:999,padding:"6px 12px"},children:n.jsx("span",{style:{color:d,fontSize:v,fontWeight:H},children:"◎ 40.7128, -74.0060 · Manhattan"})}),n.jsxs("div",{style:{position:"absolute",bottom:12,left:"50%",transform:"translateX(-50%)",display:"flex",alignItems:"center",gap:4,background:Q,border:"1px solid "+Y,borderRadius:i,padding:5},children:[n.jsx("button",{style:{width:30,height:30,borderRadius:i,border:"none",background:b,color:u,fontSize:16,fontWeight:H,cursor:"pointer"},children:"+"}),n.jsx("button",{style:{width:30,height:30,borderRadius:i,border:"none",background:"rgba(255,255,255,.14)",color:d,fontSize:16,fontWeight:H,cursor:"pointer"},children:"−"}),n.jsx("div",{style:{width:1,height:18,background:Y,margin:"0 3px"}}),n.jsx("button",{style:{...j,padding:"0 12px"},children:"Layers"}),n.jsx("button",{style:{...j,padding:"0 12px"},children:"◎ Locate"})]})]})]}),n.jsxs("div",{style:V,children:[n.jsxs("div",{style:N,children:[n.jsx("span",{style:M,children:"Notifications"}),n.jsxs("span",{style:{fontSize:E,fontWeight:H,color:t.pContrast,background:$,padding:"2px 9px",borderRadius:999},children:[J," NEW"]})]}),n.jsx("div",{ref:G,style:{padding:a,display:"flex",flexDirection:"column",gap:2,flex:1,minHeight:0},children:O.map((A,k)=>n.jsxs("div",{style:{display:"flex",gap:11,alignItems:"flex-start",padding:"9px 8px",borderRadius:i,background:A.rowBg},children:[n.jsx("div",{style:{width:26,height:26,borderRadius:i,background:A.cb,color:A.cc,display:"grid",placeItems:"center",flexShrink:0,fontSize:13,fontWeight:H},children:A.ic}),n.jsxs("div",{style:{flex:1,minWidth:0},children:[n.jsx("div",{style:{fontSize:y,color:t.textPrimary,fontWeight:S,lineHeight:C},children:A.label}),n.jsx("div",{style:{fontSize:v,color:t.textSecondary,marginTop:2},children:A.time})]}),A.unread&&n.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:$,flexShrink:0,marginTop:6}})]},k))})]})]})})]})}const ul=[{label:"Reports Generated",val:"248"},{label:"Avg Generation",val:"1.2s"},{label:"Data Points",val:"84.2K"},{label:"Scheduled",val:"12"}],fl=["Jan","Feb","Mar","Apr","May","Jun"],hl=[44,60,50,74,88,96],gl=[24,32,30,42,52,60],xl=[{l:"Reports",h:72},{l:"Cameras",h:92},{l:"Alerts",h:40},{l:"Users",h:58},{l:"Storage",h:80}],ml=[{name:"Q2 Revenue Summary",type:"Financial",date:"Jun 20",status:"Ready"},{name:"Camera Uptime Audit",type:"Operations",date:"Jun 19",status:"Ready"},{name:"User Access Log",type:"Security",date:"Jun 18",status:"Ready"},{name:"Inventory Forecast",type:"Analytics",date:"Jun 17",status:"Processing"},{name:"Monthly KPI Digest",type:"Executive",date:"Jun 15",status:"Ready"},{name:"Incident Response Log",type:"Security",date:"Jun 14",status:"Ready"},{name:"Storage Utilization Report",type:"Operations",date:"Jun 13",status:"Ready"},{name:"Weekly Traffic Analysis",type:"Analytics",date:"Jun 12",status:"Processing"},{name:"Vendor SLA Compliance",type:"Financial",date:"Jun 11",status:"Ready"},{name:"Motion Event Rollup",type:"Operations",date:"Jun 10",status:"Ready"},{name:"Quarterly Audit Trail",type:"Security",date:"Jun 09",status:"Ready"},{name:"Energy Consumption Digest",type:"Analytics",date:"Jun 08",status:"Processing"},{name:"Executive Board Pack",type:"Executive",date:"Jun 07",status:"Ready"},{name:"Device Firmware Ledger",type:"Operations",date:"Jun 06",status:"Ready"},{name:"Access Anomaly Report",type:"Security",date:"Jun 05",status:"Ready"},{name:"Cost Allocation Summary",type:"Financial",date:"Jun 04",status:"Ready"}],bn="1fr 130px 110px 90px 70px";function yl(){const e=ve(),r=L(k=>k.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:c,rowPy:g,tH1:f,tH2:x,tTitle:m,wH1:h,headFam:b,headLH:u,accentBg:y,btnText:v,btnShadow:E,tBody:H,tBodySm:S,tCaption:C,tOverline:B,bwEmph:D,btnCase:$,bodyWeightEff:X,pMain:Q,sMain:Y,chartPalette:d}=e,I=b+",sans-serif",P=r.fontFamily+",sans-serif",W=e.hc1||t.textPrimary,z=e.hc2||t.textPrimary,q=e.hc3||t.textPrimary,U=e.cardBorder==="none"?"none":e.cardBorder,[G,R,O]=Un(5,3,16),J=ml.slice(0,O).map(k=>({...k,sb:k.status==="Ready"?e.sucSoft:e.warnSoft,sc:k.status==="Ready"?e.sucTxt:e.warnTxt})),V=xl.map((k,T)=>({...k,c:d[T%d.length]})),N={background:t.paper,border:U,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden"},M={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between"},j={fontSize:m,lineHeight:u,fontWeight:h,color:q,fontFamily:I},A={fontSize:B,fontWeight:D,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".5px"};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:U,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:P,fontWeight:X,color:t.textPrimary},children:[n.jsxs("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:14},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:f,lineHeight:u,fontWeight:h,color:W,letterSpacing:"-.3px",fontFamily:I},children:"Reports"}),n.jsx("span",{title:"Generated insights across every module",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:D,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]}),n.jsx("button",{style:{padding:"10px 20px",borderRadius:i,border:"none",background:y,color:v,fontSize:S,fontWeight:D,textTransform:$,letterSpacing:".4px",boxShadow:E,whiteSpace:"nowrap",cursor:"pointer"},children:"↓ Export PDF"})]}),n.jsxs("div",{style:{padding:c,background:t.bgDefault,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[n.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:l,marginBottom:l},children:ul.map(k=>n.jsxs("div",{style:N,children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:{fontSize:B,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".6px",fontWeight:D},children:k.label})}),n.jsx("div",{style:{padding:`${a}px ${s}px`},children:n.jsx("div",{style:{fontSize:x,fontWeight:h,color:z,letterSpacing:"-.8px",lineHeight:1},children:k.val})})]},k.label))}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 300px",gap:l,marginBottom:l},children:[n.jsxs("div",{style:N,children:[n.jsxs("div",{style:M,children:[n.jsx("span",{style:j,children:"Revenue & Profit Trend"}),n.jsx("span",{style:{fontSize:C,color:t.textSecondary,fontWeight:D},children:"6 months"})]}),n.jsx("div",{style:{padding:s,display:"flex",alignItems:"flex-end",gap:12,height:160},children:fl.map((k,T)=>n.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",gap:6,height:"100%"},children:[n.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-end",gap:3,flex:1},children:[n.jsx("div",{style:{width:"100%",height:gl[T]+"%",background:Y,opacity:.55,borderRadius:`${i} ${i} 0 0`}}),n.jsx("div",{style:{width:"100%",height:hl[T]+"%",background:Q,borderRadius:`${i} ${i} 0 0`}})]}),n.jsx("span",{style:{fontSize:C,color:t.textSecondary},children:k})]},k))})]}),n.jsxs("div",{style:N,children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:j,children:"By Module"})}),n.jsx("div",{style:{padding:s,display:"flex",alignItems:"flex-end",gap:10,height:128},children:V.map(k=>n.jsx("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:n.jsx("div",{style:{width:"100%",height:k.h+"%",background:k.c,borderRadius:`${i} ${i} 0 0`}})},k.l))})]})]}),n.jsxs("div",{style:{...N,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:j,children:"Recent Reports"})}),n.jsxs("div",{ref:G,style:{display:"grid",gridTemplateColumns:bn,padding:`${g}px ${s}px`,borderBottom:"1px solid "+t.divider,background:t.paper2},children:[["Report","Type","Status","Date"].map(k=>n.jsx("div",{style:A,children:k},k)),n.jsx("div",{})]}),n.jsx("div",{ref:R,style:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:J.map(k=>n.jsxs("div",{style:{display:"grid",gridTemplateColumns:bn,padding:`${g}px ${s}px`,borderBottom:"1px solid "+t.divider,alignItems:"center"},children:[n.jsx("div",{style:{fontSize:H,color:t.textPrimary,fontWeight:D},children:k.name}),n.jsx("div",{style:{fontSize:S,color:t.textSecondary},children:k.type}),n.jsx("div",{children:n.jsx("span",{style:{padding:"4px 11px",borderRadius:999,fontSize:C,fontWeight:D,background:k.sb,color:k.sc,whiteSpace:"nowrap"},children:k.status})}),n.jsx("div",{style:{fontSize:S,color:t.textSecondary},children:k.date}),n.jsx("div",{children:n.jsx("button",{style:{fontSize:C,color:Q,background:t.pContainer,border:"none",fontWeight:D,padding:"5px 11px",borderRadius:i,cursor:"pointer"},children:"↓ PDF"})})]},k.name))})]})]})]})}const vn=({size:e})=>n.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),n.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),n.jsx("path",{d:"m21 15-5-5L5 21"})]});function bl(){const e=ve(),r=L(z=>z.settings),{t,rad:o,radSm:i,pad:s,tH1:a,tBody:l,tBodySm:c,tCaption:g,wH1:f,headLH:x,accentBg:m,btnText:h,btnShadow:b,bwEmph:u,pMain:y,iconInitials:v,hasLoginImage:E,loginCenteredGrad:H,loginScrimGradC:S}=e,C=r.fontFamily+",sans-serif",B=e.hc1||t.textPrimary,D=t.pContrast,$=e.cardBorder==="none"?"none":e.cardBorder,X=r.logoMode==="image"&&!!r.logoUrl,Q=e.isDark?t.paper2:"#ffffff",Y=r.loginPanelColor||t.bgDefault,d=r.loginImgOpacity>0?r.loginImgOpacity:1,I=E?n.jsx("img",{src:r.loginImage,alt:"",style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",zIndex:0,opacity:d}}):null,P={background:t.paper,border:$,borderRadius:o,boxShadow:e.cardShadow,padding:s,display:"flex",flexDirection:"column",gap:20},W=z=>({position:"relative",background:t.paper2,border:"1.5px solid "+(z?y:t.outline),borderRadius:i});return r.loginLayout==="centered"?n.jsxs("div",{style:{minHeight:560,background:H,display:"flex",alignItems:"center",justifyContent:"center",padding:40,position:"relative",overflow:"hidden",fontFamily:C,borderRadius:o},children:[I,E&&n.jsx("div",{style:{position:"absolute",inset:0,background:S,zIndex:0}}),n.jsxs("div",{style:{position:"relative",zIndex:1,width:"100%",maxWidth:380,background:t.paper,border:$,borderRadius:o,boxShadow:"0 24px 60px rgba(0,0,0,.35)",padding:s,display:"flex",flexDirection:"column",gap:20,alignItems:"center"},children:[n.jsx("div",{style:{width:72,height:72,borderRadius:20,background:r.iconColor,display:"grid",placeItems:"center",boxShadow:"0 6px 18px "+r.iconColor+"55"},children:n.jsx("span",{style:{color:"#fff",fontSize:24,fontWeight:u,letterSpacing:"-1px"},children:v})}),n.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",gap:14},children:[n.jsxs("div",{style:{position:"relative",border:"1.5px solid "+t.outline,borderRadius:i,padding:"13px 14px"},children:[n.jsx("span",{style:{position:"absolute",top:-8,left:11,background:t.paper,padding:"0 5px",fontSize:11,color:t.textSecondary},children:"Email"}),n.jsx("span",{style:{fontSize:l,color:t.textPrimary},children:"admin@company.com"})]}),n.jsxs("div",{style:{position:"relative",border:"1.5px solid "+t.outline,borderRadius:i,padding:"13px 14px"},children:[n.jsx("span",{style:{position:"absolute",top:-8,left:11,background:t.paper,padding:"0 5px",fontSize:11,color:t.textSecondary},children:"Password"}),n.jsx("span",{style:{fontSize:l,color:t.textPrimary,letterSpacing:3},children:"••••••••"})]}),n.jsx("button",{style:{padding:13,borderRadius:i,border:"none",background:m,color:h,fontSize:l,fontWeight:u,textTransform:"uppercase",letterSpacing:".5px",boxShadow:b,cursor:"pointer"},children:"Sign in"})]})]})]}):n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"3fr 1fr",minHeight:560,fontFamily:C,borderRadius:o,overflow:"hidden"},children:[n.jsxs("div",{style:{background:Q,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"48px 40px",gap:22,position:"relative",overflow:"hidden"},children:[I,!E&&n.jsxs("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,color:t.textSecondary,border:"1.5px dashed "+t.outline,padding:24,boxSizing:"border-box"},children:[n.jsx(vn,{size:46}),n.jsx("div",{style:{fontSize:14,fontWeight:u,color:t.textPrimary},children:"No brand image"}),n.jsx("div",{style:{fontSize:12,color:t.textSecondary,textAlign:"center",maxWidth:220},children:"Upload an image in the Login Screen settings to fill this panel."})]})]}),n.jsxs("div",{style:{background:Y,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:22,padding:"48px 40px"},children:[X?n.jsx("img",{src:r.logoUrl,alt:r.appName,style:{maxHeight:64,maxWidth:200,objectFit:"contain"}}):n.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:6,maxWidth:200,maxHeight:64,border:"1.5px dashed "+t.outline,borderRadius:i,boxSizing:"border-box",color:t.textSecondary,padding:"8px 16px"},children:[n.jsx(vn,{size:20}),n.jsx("span",{style:{fontSize:g,fontWeight:u,color:t.textSecondary,whiteSpace:"nowrap"},children:"No logo uploaded"})]}),n.jsxs("div",{style:{width:"100%",maxWidth:340,...P},children:[n.jsxs("div",{style:{textAlign:"center"},children:[n.jsx("div",{style:{fontSize:a,lineHeight:x,fontWeight:f,color:B,letterSpacing:"-.4px",marginBottom:5},children:"Welcome back"}),n.jsx("div",{style:{fontSize:c,color:t.textSecondary},children:"Sign in to continue"})]}),n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[n.jsxs("div",{children:[n.jsx("div",{style:{fontSize:g,fontWeight:u,color:t.textPrimary,marginBottom:7},children:"Email Address"}),n.jsxs("div",{style:{...W(!1),padding:"12px 14px 12px 40px"},children:[n.jsx("span",{style:{position:"absolute",left:13,top:"50%",transform:"translateY(-50%)",color:t.textSecondary,fontSize:14},children:"✉"}),n.jsx("span",{style:{fontSize:l,color:t.textPrimary},children:"admin@company.com"})]})]}),n.jsxs("div",{children:[n.jsx("div",{style:{fontSize:g,fontWeight:u,color:t.textPrimary,marginBottom:7},children:"Password"}),n.jsxs("div",{style:{...W(!0),padding:"12px 40px 12px 40px"},children:[n.jsx("span",{style:{position:"absolute",left:13,top:"50%",transform:"translateY(-50%)",color:t.textSecondary,fontSize:14},children:"🔒"}),n.jsx("span",{style:{fontSize:l,color:t.textPrimary,letterSpacing:3},children:"••••••••"}),n.jsx("span",{style:{position:"absolute",right:13,top:"50%",transform:"translateY(-50%)",color:t.textSecondary,fontSize:14},children:"👁"})]})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{width:17,height:17,borderRadius:4,background:y,display:"grid",placeItems:"center",color:D,fontSize:11,fontWeight:u},children:"✓"}),n.jsx("span",{style:{fontSize:c,color:t.textPrimary},children:"Remember me"})]}),n.jsx("span",{style:{fontSize:c,color:y,fontWeight:u},children:"Forgot password?"})]}),n.jsxs("button",{style:{padding:13,borderRadius:i,border:"none",background:m,color:h,fontSize:l,fontWeight:u,letterSpacing:".3px",boxShadow:b,marginTop:2,display:"flex",alignItems:"center",justifyContent:"center",gap:8,cursor:"pointer"},children:["Login ",n.jsx("span",{style:{fontSize:15},children:"→"})]})]}),n.jsxs("div",{style:{textAlign:"center",fontSize:g,color:t.textSecondary},children:["Powered by ",n.jsx("span",{style:{color:y,fontWeight:u},children:r.appName})," © 2026"]})]})]})]})}function vl(){const e=ve(),r=L(b=>b.settings),[t,o]=_.useState(!1);if(t)return null;const{t:i,npos:s,nacc:a,toastDeco:l,toastBg:c,rad:g,radSm:f,tBodySm:x,tCaption:m}=e,h=(r.toastW>0?r.toastW:252)+"px";return n.jsxs("div",{style:{position:"absolute",zIndex:40,width:h,maxWidth:"70%",boxSizing:"border-box",background:c,borderRadius:g,display:"flex",gap:"10px",alignItems:"flex-start",padding:"12px 13px",fontFamily:r.fontFamily+",sans-serif",...s,...l},children:[n.jsx("div",{style:{width:"30px",height:"30px",borderRadius:f,background:a.icbg,color:a.icc,display:"grid",placeItems:"center",flexShrink:0,fontSize:"15px",fontWeight:800},children:"!"}),n.jsxs("div",{style:{flex:1,minWidth:0},children:[n.jsx("div",{style:{fontSize:x+"px",fontWeight:700,color:i.textPrimary,marginBottom:"2px"},children:"Low stock alert"}),n.jsx("div",{style:{fontSize:m+"px",color:i.textSecondary,lineHeight:1.4},children:"Widget Pro is down to 12 units left."})]}),r.notifAutoDismiss&&n.jsx("div",{title:"Auto-dismiss countdown",style:{flexShrink:0,marginTop:"1px",minWidth:"26px",height:"20px",padding:"0 7px",borderRadius:"999px",background:ce(a.dot,.14),color:a.dot,fontSize:m-.5+"px",fontWeight:800,display:"grid",placeItems:"center",fontVariantNumeric:"tabular-nums"},children:(r.autoDismissSec>0?r.autoDismissSec:8)+"s"}),n.jsx("button",{title:"Dismiss notification",onClick:()=>o(!0),style:{flexShrink:0,width:"20px",height:"20px",marginTop:"1px",border:"none",background:"transparent",color:i.textSecondary,cursor:"pointer",borderRadius:"6px",display:"grid",placeItems:"center",padding:0,lineHeight:1},children:n.jsx("svg",{width:13,height:13,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.4,strokeLinecap:"round",children:n.jsx("path",{d:"M18 6 6 18M6 6l12 12"})})})]})}const Sl=[75,90,100,125];function Cl(){var f;const e=Ke(x=>x.previewScreen),r=L(x=>x.settings.edgePadPx)||0,t=e==="operations"?0:r,[o,i]=_.useState("fit"),s=_.useRef(null),a=_.useRef(null),[l,c]=_.useState(100);_.useLayoutEffect(()=>{const x=s.current,m=a.current;if(!x||!m)return;const h=()=>{const E=getComputedStyle(x),H=(parseFloat(E.paddingTop)||0)+(parseFloat(E.paddingBottom)||0);if(o!=="fit"){const d=o/100;m.style.zoom=String(d);const I=x.clientHeight-H;m.style.minHeight=(I>0?Math.floor(I/d):0)+"px",c(o);return}m.style.zoom="1",m.style.minHeight="0px",m.offsetHeight;const S=(parseFloat(E.paddingLeft)||0)+(parseFloat(E.paddingRight)||0),C=x.clientWidth-S,B=x.clientHeight-H,D=m.scrollWidth,$=m.scrollHeight;if(D<=0||$<=0||C<=0||B<=0)return;const X=Math.min(C/D,B/$,1),Q=X<.985?Math.max(.36,X):1;m.style.zoom=String(Q);const Y=Math.min(C/D,1);m.style.minHeight=Math.floor(B/Math.max(Y,.36))+"px",c(Math.round(Q*100))};let b=0,u=0;const y=()=>{h(),++u<36&&(b=requestAnimationFrame(y))};y();const v=new ResizeObserver(h);return v.observe(x),v.observe(m),()=>{cancelAnimationFrame(b),v.disconnect()}},[o,t,e]);const g=((f=qs.find(x=>x.key===e))==null?void 0:f.label)??"";return n.jsxs(p.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",bgcolor:"background.default"},children:[n.jsxs(p.Box,{sx:{px:2.5,py:1.25,borderBottom:"1px solid",borderColor:"divider",display:"flex",alignItems:"center",gap:1.5,bgcolor:"background.paper"},children:[n.jsx(Qs,{sx:{fontSize:22,color:"text.secondary"}}),n.jsxs(p.Typography,{variant:"h5",sx:{flex:1,fontSize:18,fontWeight:700,letterSpacing:"-.2px"},children:["Previewing ",g]}),n.jsxs(p.Select,{size:"small",value:o,onChange:x=>i(x.target.value==="fit"?"fit":Number(x.target.value)),sx:{minWidth:128,fontSize:13,fontWeight:600,"& .MuiSelect-select":{py:.75}},children:[n.jsxs(p.MenuItem,{value:"fit",children:["Fit (",l,"%)"]}),Sl.map(x=>n.jsxs(p.MenuItem,{value:x,children:[x,"%"]},x))]})]}),n.jsxs(p.Box,{ref:s,sx:{flex:1,overflow:"auto",p:`${t}px`,position:"relative",bgcolor:"background.default"},children:[n.jsxs(p.Box,{ref:a,sx:{width:"100%",display:"flex",flexDirection:"column","& > *":{flex:"1 1 0%",minHeight:0}},children:[e==="dashboard"&&n.jsx(rl,{}),e==="orders"&&n.jsx(ol,{}),e==="reports"&&n.jsx(yl,{}),e==="cameras"&&n.jsx(dl,{}),e==="operations"&&n.jsx(pl,{}),e==="components"&&n.jsx(il,{}),e==="login"&&n.jsx(bl,{})]}),e!=="login"&&n.jsx(vl,{})]})]})}const jl=300,wl=520;function Tl(){const[e,r]=_.useState(!0),[t,o]=_.useState(300),[i,s]=_.useState(!1),a=L(y=>y.isDirty),l=L(y=>y.captureBaseline),c=L(y=>y.restoreBaseline),g=He(L(y=>y.settings.mode)),f=L(y=>y.settings.customFonts),x=L(y=>y.settings.customHeadFonts),m=_.useRef(null);_.useEffect(()=>{mn(f),mn(x)},[f,x]);const h=y=>{y.preventDefault(),m.current={x:y.clientX,w:t};const v=H=>{if(!m.current)return;const S=Math.max(jl,Math.min(wl,m.current.w+(H.clientX-m.current.x)));o(S)},E=()=>{m.current=null,window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",E)};window.addEventListener("mousemove",v),window.addEventListener("mouseup",E)},b=()=>{a()?s(!0):r(!1)},u=()=>{r(!0),l()};return n.jsxs(p.Box,{sx:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",bgcolor:"background.paper"},children:[n.jsx(p.Box,{sx:{flex:1,minHeight:0,display:"flex"},children:n.jsxs(p.Box,{sx:{flex:1,minWidth:0,display:"flex",bgcolor:"background.default",borderTop:"1px solid",borderColor:"divider"},children:[e?n.jsxs(p.Box,{sx:{display:"flex",flexShrink:0},children:[n.jsx(p.Box,{sx:{width:t,flexShrink:0,borderRight:`1px solid ${g.studioBd}`,display:"flex",flexDirection:"column",bgcolor:g.card,overflow:"auto",scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}},children:n.jsx(Xs,{onClose:b})}),n.jsx(p.Box,{onMouseDown:h,sx:{width:5,cursor:"col-resize",flexShrink:0,bgcolor:"divider",opacity:.4,"&:hover":{opacity:1,bgcolor:"primary.main"}}})]}):n.jsx(p.Tooltip,{title:"Open Theme Studio",placement:"right",arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.IconButton,{onClick:u,sx:{position:"absolute",left:68,bottom:56,zIndex:10,bgcolor:"primary.main",color:"primary.contrastText",boxShadow:4,"&:hover":{bgcolor:"primary.dark"}},children:n.jsx(gs,{})})}),n.jsx(Cl,{})]})}),n.jsxs(p.Dialog,{open:i,onClose:()=>s(!1),PaperProps:{sx:{borderRadius:3,width:300,p:2.5}},children:[n.jsx(p.Typography,{sx:{fontSize:15,fontWeight:800,mb:.75},children:"Save changes?"}),n.jsx(p.Typography,{sx:{fontSize:12.5,color:"text.secondary",lineHeight:1.5,mb:2.25},children:"You've made changes to the theme. Do you want to save them before leaving?"}),n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[n.jsx(p.Box,{component:"button",onClick:()=>{l(),s(!1),r(!1)},sx:{p:1.4,borderRadius:2.5,border:"none",bgcolor:"primary.main",color:"primary.contrastText",fontSize:13,fontWeight:700,cursor:"pointer"},children:"Save & exit"}),n.jsx(p.Box,{component:"button",onClick:()=>{c(),s(!1),r(!1)},sx:{p:1.4,borderRadius:2.5,border:"1px solid",borderColor:"divider",bgcolor:"action.hover",color:"text.secondary",fontSize:13,fontWeight:600,cursor:"pointer"},children:"Discard & exit"}),n.jsx(p.Box,{component:"button",onClick:()=>s(!1),sx:{p:1.1,borderRadius:2.5,border:"none",bgcolor:"transparent",color:"text.secondary",fontSize:12.5,fontWeight:600,cursor:"pointer"},children:"Keep editing"})]})]})]})}function kl(e){const r=kr(e),t=r.t,o=`${r.headFam},sans-serif`,i=`${r.bodyFam},sans-serif`,s=a=>({fontFamily:o,fontSize:a,fontWeight:r.wH1,lineHeight:r.headLH});if(typeof window<"u"&&typeof document<"u"){const a=["Roboto","Inter","DM Sans","Manrope","Plus Jakarta Sans","Nunito Sans","Figtree"],c=[e.fontFamily,e.headingFont].filter(Boolean).map(f=>f.replace(/"/g,"").replace(/'/g,"")),g=Array.from(new Set(c)).filter(f=>a.includes(f));if(g.length>0){const f="dynamic-google-fonts";let x=document.getElementById(f);const h=`https://fonts.googleapis.com/css2?${g.map(b=>`family=${b.replace(/ /g,"+")}:wght@300;400;500;600;700;800;900`).join("&")}&display=swap`;x||(x=document.createElement("link"),x.id=f,x.rel="stylesheet",document.head.appendChild(x)),x.href=h}}return Ln({palette:{mode:e.mode,primary:{main:r.pMain,dark:r.pal[700],light:r.pal[300],contrastText:t.pContrast},secondary:{main:r.sMain,dark:r.spal[700],light:r.spal[300],contrastText:t.sContrast},success:{main:e.successHex},warning:{main:e.warningHex},info:{main:e.infoHex},error:{main:e.errorHex},background:{default:t.bgDefault,paper:t.paper},text:{primary:t.textPrimary,secondary:t.textSecondary,disabled:t.textDisabled},divider:t.divider},shape:{borderRadius:r.r},typography:{fontFamily:i,fontSize:r.base,h1:s(r.tH1),h2:s(r.tH2),h3:s(r.tTitle),h4:s(r.tH4),h5:s(r.tH5),h6:s(r.tH6),body1:{fontFamily:i,fontSize:r.tBody,lineHeight:r.bodyLH,fontWeight:r.bodyWeightEff},body2:{fontFamily:i,fontSize:r.tBodySm,lineHeight:r.bodyLH,fontWeight:r.bodyWeightEff},caption:{fontFamily:i,fontSize:r.tCaption,lineHeight:r.bodyLH},button:{textTransform:r.btnCase,fontWeight:r.bwEmph}},components:{MuiCssBaseline:{styleOverrides:{"button, input, textarea, select":{fontFamily:"inherit"}}},MuiCard:{styleOverrides:{root:{borderRadius:r.r,border:r.cardBorder==="none"?"none":r.cardBorder,boxShadow:r.cardShadow,backgroundImage:"none"}}},MuiCardHeader:{styleOverrides:{root:{backgroundColor:r.cardHdrBg,borderBottom:r.cardHdrBorder,boxShadow:r.cardHdrAccent}}},MuiDialog:{styleOverrides:{paper:{borderRadius:r.r,border:r.cardBorder==="none"?"none":r.cardBorder,boxShadow:r.cardShadow,backgroundImage:"none"}}},MuiDialogTitle:{styleOverrides:{root:{backgroundColor:r.cardHdrBg,borderBottom:r.cardHdrBorder,boxShadow:r.cardHdrAccent}}},MuiButton:{styleOverrides:{root:{borderRadius:r.r,boxShadow:"none"}},defaultProps:{disableElevation:!0},variants:e.accentGradient?[{props:{variant:"contained"},style:{backgroundImage:r.accentBg}}]:[]},MuiChip:{styleOverrides:{root:{borderRadius:999,fontWeight:e.statusBold?700:500}}}},urmTable:{rowPaddingY:r.table.rowPy,cellPaddingX:r.table.cellPx,headerBg:r.table.headBg,rowDivider:r.table.rowBorder,colDivider:r.table.colBorder,cellAlignH:e.tableCellAlignH,cellAlignV:e.tableCellAlignV,striped:e.tableStripe,stripeBg:r.table.stripeBg},tokens:{toastW:e.toastW>0?e.toastW:void 0,cardBorder:r.toastDeco.border,cardShadow:r.toastDeco.boxShadow,cardBodyBorder:r.cardBorder==="none"?"none":r.cardBorder,cardBodyShadow:r.cardShadow,cardHdrBg:r.cardHdrBg,cardHdrBorder:r.cardHdrBorder,cardHdrAccent:r.cardHdrAccent,cardHeader:e.cardHeader,status:{errSoft:r.errSoft,warnSoft:r.warnSoft,infoSoft:r.infoSoft,sucSoft:r.sucSoft,errTxt:r.errTxt,warnTxt:r.warnTxt,infoTxt:r.infoTxt,sucTxt:r.sucTxt},notifPosition:e.notifPosition,notifStyle:e.notifStyle,notifAccent:e.notifAccent,notifAutoDismiss:e.notifAutoDismiss,toastBg:r.toastBg,autoDismissSec:e.autoDismissSec>0?e.autoDismissSec:void 0,statusBold:e.statusBold,cardHdrHex:e.cardHdrHex||void 0,containerPad:r.screenPad,cardGap:r.gap,edgePad:e.edgePadPx,highlight:t.highlight,highlightSoft:t.highlightSoft,highlightBd:t.highlightBd}})}exports.DEFAULT_SETTINGS=Re;exports.ThemeStudio=Tl;exports.buildMuiTheme=kl;exports.useThemeStore=L;
72
+ export default theme;`}function un(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const Ya=e=>{if(!Number.isNaN(+e))return+e;const r=e.match(/\d*\.?\d+/g);if(!r)return 0;let t=0;for(let o=0;o<r.length;o+=1)t+=+r[o];return t};function Ja(e){Object.assign(e,{alpha(r,t){const o=this||e;return o.colorSpace?`oklch(from ${r} l c h / ${typeof t=="string"?`calc(${t})`:t})`:o.vars?`rgba(${r.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof t=="string"?`calc(${t})`:t})`:On(r,Ya(t))},lighten(r,t){const o=this||e;return o.colorSpace?`color-mix(in ${o.colorSpace}, ${r}, #fff ${un(t)})`:Kt(r,t)},darken(r,t){const o=this||e;return o.colorSpace?`color-mix(in ${o.colorSpace}, ${r}, #000 ${un(t)})`:qt(r,t)}})}function mr(e={},...r){const{breakpoints:t,mixins:o={},spacing:i,palette:s={},transitions:a={},typography:l={},shape:c,colorSpace:g,...f}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://v7.mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Ze(20));const x=Tr({...s,colorSpace:g}),m=En(e);let h=we(m,{mixins:Ia(m.breakpoints,o),palette:x,shadows:za.slice(),typography:Da(x,l),transitions:Va(a),zIndex:{...Ua}});if(h=we(h,f),h=r.reduce((b,u)=>we(b,u),h),process.env.NODE_ENV!=="production"){const b=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],u=(y,v)=>{let E;for(E in y){const B=y[E];if(b.includes(E)&&Object.keys(B).length>0){if(process.env.NODE_ENV!=="production"){const S=jr("",E);console.error([`MUI: The \`${v}\` component increases the CSS specificity of the \`${E}\` internal state.`,"You can not override it like this: ",JSON.stringify(y,null,2),"",`Instead, you need to use the '&.${S}' syntax:`,JSON.stringify({root:{[`&.${S}`]:B}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
73
+ `))}y[E]={}}}};Object.keys(h.components).forEach(y=>{const v=h.components[y].styleOverrides;v&&y.startsWith("Mui")&&u(v,y)})}return h.unstable_sxConfig={...Yt,...f==null?void 0:f.unstable_sxConfig},h.unstable_sx=function(u){return dt({sx:u,theme:this})},h.toRuntimeSource=Wn,Ja(h),h}function qa(e){let r;return e<1?r=5.11916*e**2:r=4.5*Math.log(e+1)+2,Math.round(r*10)/1e3}const Ka=[...Array(25)].map((e,r)=>{if(r===0)return"none";const t=qa(r);return`linear-gradient(rgba(255 255 255 / ${t}), rgba(255 255 255 / ${t}))`});function zn(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function _n(e){return e==="dark"?Ka:[]}function Xa(e){const{palette:r={mode:"light"},opacity:t,overlays:o,colorSpace:i,...s}=e,a=Tr({...r,colorSpace:i});return{palette:a,opacity:{...zn(a.mode),...t},overlays:o||_n(a.mode),...s}}function Qa(e){var r;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((r=e[1])!=null&&r.match(/(mode|contrastThreshold|tonalOffset)/))}const Za=e=>[...[...Array(25)].map((r,t)=>`--${e?`${e}-`:""}overlays-${t}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],es=e=>(r,t)=>{const o=e.rootSelector||":root",i=e.colorSchemeSelector;let s=i;if(i==="class"&&(s=".%s"),i==="data"&&(s="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(s=`[${i}="%s"]`),e.defaultColorScheme===r){if(r==="dark"){const a={};return Za(e.cssVarPrefix).forEach(l=>{a[l]=t[l],delete t[l]}),s==="media"?{[o]:t,"@media (prefers-color-scheme: dark)":{[o]:a}}:s?{[s.replace("%s",r)]:a,[`${o}, ${s.replace("%s",r)}`]:t}:{[o]:{...t,...a}}}if(s&&s!=="media")return`${o}, ${s.replace("%s",String(r))}`}else if(r){if(s==="media")return{[`@media (prefers-color-scheme: ${String(r)})`]:{[o]:t}};if(s)return s.replace("%s",String(r))}return o};function ts(e,r){r.forEach(t=>{e[t]||(e[t]={})})}function w(e,r,t){!e[r]&&t&&(e[r]=t)}function gt(e){return typeof e!="string"||!e.startsWith("hsl")?e:In(e)}function Pe(e,r){`${r}Channel`in e||(e[`${r}Channel`]=ht(gt(e[r]),`MUI: Can't create \`palette.${r}Channel\` because \`palette.${r}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
74
+ To suppress this warning, you need to explicitly provide the \`palette.${r}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function rs(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Ee=e=>{try{return e()}catch{}},ns=(e="mui")=>va(e);function dr(e,r,t,o,i){if(!t)return;t=t===!0?{}:t;const s=i==="dark"?"dark":"light";if(!o){r[i]=Xa({...t,palette:{mode:s,...t==null?void 0:t.palette},colorSpace:e});return}const{palette:a,...l}=mr({...o,palette:{mode:s,...t==null?void 0:t.palette},colorSpace:e});return r[i]={...t,palette:a,opacity:{...zn(s),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||_n(s)},l}function os(e={},...r){const{colorSchemes:t={light:!0},defaultColorScheme:o,disableCssColorScheme:i=!1,cssVarPrefix:s="mui",nativeColor:a=!1,shouldSkipGeneratingVar:l=Qa,colorSchemeSelector:c=t.light&&t.dark?"media":void 0,rootSelector:g=":root",...f}=e,x=Object.keys(t)[0],m=o||(t.light&&x!=="light"?"light":x),h=ns(s),{[m]:b,light:u,dark:y,...v}=t,E={...v};let B=b;if((m==="dark"&&!("dark"in t)||m==="light"&&!("light"in t))&&(B=!0),!B)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${m}\` option is either missing or invalid.`:Ze(21,m));let S;a&&(S="oklch");const j=dr(S,E,B,f,m);u&&!E.light&&dr(S,E,u,void 0,"light"),y&&!E.dark&&dr(S,E,y,void 0,"dark");let T={defaultColorScheme:m,...j,cssVarPrefix:s,colorSchemeSelector:c,rootSelector:g,getCssVar:h,colorSchemes:E,font:{...Aa(j.typography),...j.font},spacing:rs(f.spacing)};Object.keys(T.colorSchemes).forEach(Y=>{const d=T.colorSchemes[Y].palette,$=z=>{const _=z.split("-"),K=_[1],U=_[2];return h(z,d[K][U])};d.mode==="light"&&(w(d.common,"background","#fff"),w(d.common,"onBackground","#000")),d.mode==="dark"&&(w(d.common,"background","#000"),w(d.common,"onBackground","#fff"));function H(z,_,K){if(S){let U;return z===Je&&(U=`transparent ${((1-K)*100).toFixed(0)}%`),z===oe&&(U=`#000 ${(K*100).toFixed(0)}%`),z===ie&&(U=`#fff ${(K*100).toFixed(0)}%`),`color-mix(in ${S}, ${_}, ${U})`}return z(_,K)}if(ts(d,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),d.mode==="light"){w(d.Alert,"errorColor",H(oe,a?h("palette-error-light"):d.error.light,.6)),w(d.Alert,"infoColor",H(oe,a?h("palette-info-light"):d.info.light,.6)),w(d.Alert,"successColor",H(oe,a?h("palette-success-light"):d.success.light,.6)),w(d.Alert,"warningColor",H(oe,a?h("palette-warning-light"):d.warning.light,.6)),w(d.Alert,"errorFilledBg",$("palette-error-main")),w(d.Alert,"infoFilledBg",$("palette-info-main")),w(d.Alert,"successFilledBg",$("palette-success-main")),w(d.Alert,"warningFilledBg",$("palette-warning-main")),w(d.Alert,"errorFilledColor",Ee(()=>d.getContrastText(d.error.main))),w(d.Alert,"infoFilledColor",Ee(()=>d.getContrastText(d.info.main))),w(d.Alert,"successFilledColor",Ee(()=>d.getContrastText(d.success.main))),w(d.Alert,"warningFilledColor",Ee(()=>d.getContrastText(d.warning.main))),w(d.Alert,"errorStandardBg",H(ie,a?h("palette-error-light"):d.error.light,.9)),w(d.Alert,"infoStandardBg",H(ie,a?h("palette-info-light"):d.info.light,.9)),w(d.Alert,"successStandardBg",H(ie,a?h("palette-success-light"):d.success.light,.9)),w(d.Alert,"warningStandardBg",H(ie,a?h("palette-warning-light"):d.warning.light,.9)),w(d.Alert,"errorIconColor",$("palette-error-main")),w(d.Alert,"infoIconColor",$("palette-info-main")),w(d.Alert,"successIconColor",$("palette-success-main")),w(d.Alert,"warningIconColor",$("palette-warning-main")),w(d.AppBar,"defaultBg",$("palette-grey-100")),w(d.Avatar,"defaultBg",$("palette-grey-400")),w(d.Button,"inheritContainedBg",$("palette-grey-300")),w(d.Button,"inheritContainedHoverBg",$("palette-grey-A100")),w(d.Chip,"defaultBorder",$("palette-grey-400")),w(d.Chip,"defaultAvatarColor",$("palette-grey-700")),w(d.Chip,"defaultIconColor",$("palette-grey-700")),w(d.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),w(d.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),w(d.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),w(d.LinearProgress,"primaryBg",H(ie,a?h("palette-primary-main"):d.primary.main,.62)),w(d.LinearProgress,"secondaryBg",H(ie,a?h("palette-secondary-main"):d.secondary.main,.62)),w(d.LinearProgress,"errorBg",H(ie,a?h("palette-error-main"):d.error.main,.62)),w(d.LinearProgress,"infoBg",H(ie,a?h("palette-info-main"):d.info.main,.62)),w(d.LinearProgress,"successBg",H(ie,a?h("palette-success-main"):d.success.main,.62)),w(d.LinearProgress,"warningBg",H(ie,a?h("palette-warning-light"):d.warning.main,.62)),w(d.Skeleton,"bg",S?H(Je,a?h("palette-text-primary"):d.text.primary,.11):`rgba(${$("palette-text-primaryChannel")} / 0.11)`),w(d.Slider,"primaryTrack",H(ie,a?h("palette-primary-main"):d.primary.main,.62)),w(d.Slider,"secondaryTrack",H(ie,a?h("palette-secondary-main"):d.secondary.main,.62)),w(d.Slider,"errorTrack",H(ie,a?h("palette-error-main"):d.error.main,.62)),w(d.Slider,"infoTrack",H(ie,a?h("palette-info-main"):d.info.main,.62)),w(d.Slider,"successTrack",H(ie,a?h("palette-success-main"):d.success.main,.62)),w(d.Slider,"warningTrack",H(ie,a?h("palette-warning-main"):d.warning.main,.62));const z=S?H(oe,a?h("palette-background-default"):d.background.default,.6825):Rt(d.background.default,.8);w(d.SnackbarContent,"bg",z),w(d.SnackbarContent,"color",Ee(()=>S?xr.text.primary:d.getContrastText(z))),w(d.SpeedDialAction,"fabHoverBg",Rt(d.background.paper,.15)),w(d.StepConnector,"border",$("palette-grey-400")),w(d.StepContent,"border",$("palette-grey-400")),w(d.Switch,"defaultColor",$("palette-common-white")),w(d.Switch,"defaultDisabledColor",$("palette-grey-100")),w(d.Switch,"primaryDisabledColor",H(ie,a?h("palette-primary-main"):d.primary.main,.62)),w(d.Switch,"secondaryDisabledColor",H(ie,a?h("palette-secondary-main"):d.secondary.main,.62)),w(d.Switch,"errorDisabledColor",H(ie,a?h("palette-error-main"):d.error.main,.62)),w(d.Switch,"infoDisabledColor",H(ie,a?h("palette-info-main"):d.info.main,.62)),w(d.Switch,"successDisabledColor",H(ie,a?h("palette-success-main"):d.success.main,.62)),w(d.Switch,"warningDisabledColor",H(ie,a?h("palette-warning-main"):d.warning.main,.62)),w(d.TableCell,"border",H(ie,Je(a?h("palette-divider"):d.divider,1),.88)),w(d.Tooltip,"bg",H(Je,a?h("palette-grey-700"):d.grey[700],.92))}if(d.mode==="dark"){w(d.Alert,"errorColor",H(ie,a?h("palette-error-light"):d.error.light,.6)),w(d.Alert,"infoColor",H(ie,a?h("palette-info-light"):d.info.light,.6)),w(d.Alert,"successColor",H(ie,a?h("palette-success-light"):d.success.light,.6)),w(d.Alert,"warningColor",H(ie,a?h("palette-warning-light"):d.warning.light,.6)),w(d.Alert,"errorFilledBg",$("palette-error-dark")),w(d.Alert,"infoFilledBg",$("palette-info-dark")),w(d.Alert,"successFilledBg",$("palette-success-dark")),w(d.Alert,"warningFilledBg",$("palette-warning-dark")),w(d.Alert,"errorFilledColor",Ee(()=>d.getContrastText(d.error.dark))),w(d.Alert,"infoFilledColor",Ee(()=>d.getContrastText(d.info.dark))),w(d.Alert,"successFilledColor",Ee(()=>d.getContrastText(d.success.dark))),w(d.Alert,"warningFilledColor",Ee(()=>d.getContrastText(d.warning.dark))),w(d.Alert,"errorStandardBg",H(oe,a?h("palette-error-light"):d.error.light,.9)),w(d.Alert,"infoStandardBg",H(oe,a?h("palette-info-light"):d.info.light,.9)),w(d.Alert,"successStandardBg",H(oe,a?h("palette-success-light"):d.success.light,.9)),w(d.Alert,"warningStandardBg",H(oe,a?h("palette-warning-light"):d.warning.light,.9)),w(d.Alert,"errorIconColor",$("palette-error-main")),w(d.Alert,"infoIconColor",$("palette-info-main")),w(d.Alert,"successIconColor",$("palette-success-main")),w(d.Alert,"warningIconColor",$("palette-warning-main")),w(d.AppBar,"defaultBg",$("palette-grey-900")),w(d.AppBar,"darkBg",$("palette-background-paper")),w(d.AppBar,"darkColor",$("palette-text-primary")),w(d.Avatar,"defaultBg",$("palette-grey-600")),w(d.Button,"inheritContainedBg",$("palette-grey-800")),w(d.Button,"inheritContainedHoverBg",$("palette-grey-700")),w(d.Chip,"defaultBorder",$("palette-grey-700")),w(d.Chip,"defaultAvatarColor",$("palette-grey-300")),w(d.Chip,"defaultIconColor",$("palette-grey-300")),w(d.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),w(d.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),w(d.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),w(d.LinearProgress,"primaryBg",H(oe,a?h("palette-primary-main"):d.primary.main,.5)),w(d.LinearProgress,"secondaryBg",H(oe,a?h("palette-secondary-main"):d.secondary.main,.5)),w(d.LinearProgress,"errorBg",H(oe,a?h("palette-error-main"):d.error.main,.5)),w(d.LinearProgress,"infoBg",H(oe,a?h("palette-info-main"):d.info.main,.5)),w(d.LinearProgress,"successBg",H(oe,a?h("palette-success-main"):d.success.main,.5)),w(d.LinearProgress,"warningBg",H(oe,a?h("palette-warning-main"):d.warning.main,.5)),w(d.Skeleton,"bg",S?H(Je,a?h("palette-text-primary"):d.text.primary,.13):`rgba(${$("palette-text-primaryChannel")} / 0.13)`),w(d.Slider,"primaryTrack",H(oe,a?h("palette-primary-main"):d.primary.main,.5)),w(d.Slider,"secondaryTrack",H(oe,a?h("palette-secondary-main"):d.secondary.main,.5)),w(d.Slider,"errorTrack",H(oe,a?h("palette-error-main"):d.error.main,.5)),w(d.Slider,"infoTrack",H(oe,a?h("palette-info-main"):d.info.main,.5)),w(d.Slider,"successTrack",H(oe,a?h("palette-success-main"):d.success.main,.5)),w(d.Slider,"warningTrack",H(oe,a?h("palette-warning-light"):d.warning.main,.5));const z=S?H(ie,a?h("palette-background-default"):d.background.default,.985):Rt(d.background.default,.98);w(d.SnackbarContent,"bg",z),w(d.SnackbarContent,"color",Ee(()=>S?Fn.text.primary:d.getContrastText(z))),w(d.SpeedDialAction,"fabHoverBg",Rt(d.background.paper,.15)),w(d.StepConnector,"border",$("palette-grey-600")),w(d.StepContent,"border",$("palette-grey-600")),w(d.Switch,"defaultColor",$("palette-grey-300")),w(d.Switch,"defaultDisabledColor",$("palette-grey-600")),w(d.Switch,"primaryDisabledColor",H(oe,a?h("palette-primary-main"):d.primary.main,.55)),w(d.Switch,"secondaryDisabledColor",H(oe,a?h("palette-secondary-main"):d.secondary.main,.55)),w(d.Switch,"errorDisabledColor",H(oe,a?h("palette-error-main"):d.error.main,.55)),w(d.Switch,"infoDisabledColor",H(oe,a?h("palette-info-main"):d.info.main,.55)),w(d.Switch,"successDisabledColor",H(oe,a?h("palette-success-main"):d.success.main,.55)),w(d.Switch,"warningDisabledColor",H(oe,a?h("palette-warning-light"):d.warning.main,.55)),w(d.TableCell,"border",H(oe,Je(a?h("palette-divider"):d.divider,1),.68)),w(d.Tooltip,"bg",H(Je,a?h("palette-grey-700"):d.grey[700],.92))}a||(Pe(d.background,"default"),Pe(d.background,"paper"),Pe(d.common,"background"),Pe(d.common,"onBackground"),Pe(d,"divider")),Object.keys(d).forEach(z=>{const _=d[z];z!=="tonalOffset"&&!a&&_&&typeof _=="object"&&(_.main&&w(d[z],"mainChannel",ht(gt(_.main))),_.light&&w(d[z],"lightChannel",ht(gt(_.light))),_.dark&&w(d[z],"darkChannel",ht(gt(_.dark))),_.contrastText&&w(d[z],"contrastTextChannel",ht(gt(_.contrastText))),z==="text"&&(Pe(d[z],"primary"),Pe(d[z],"secondary")),z==="action"&&(_.active&&Pe(d[z],"active"),_.selected&&Pe(d[z],"selected")))})}),T=r.reduce((Y,d)=>we(Y,d),T);const M={prefix:s,disableCssColorScheme:i,shouldSkipGeneratingVar:l,getSelector:es(T),enableContrastVars:a},{vars:P,generateThemeVars:X,generateStyleSheets:Q}=ja(T,M);return T.vars=P,Object.entries(T.colorSchemes[T.defaultColorScheme]).forEach(([Y,d])=>{T[Y]=d}),T.generateThemeVars=X,T.generateStyleSheets=Q,T.generateSpacing=function(){return Rn(f.spacing,Sr(this))},T.getColorSchemeSelector=wa(c),T.spacing=T.generateSpacing(),T.shouldSkipGeneratingVar=l,T.unstable_sxConfig={...Yt,...f==null?void 0:f.unstable_sxConfig},T.unstable_sx=function(d){return dt({sx:d,theme:this})},T.toRuntimeSource=Wn,T}function fn(e,r,t){e.colorSchemes&&t&&(e.colorSchemes[r]={...t!==!0&&t,palette:Tr({...t===!0?{}:t.palette,mode:r})})}function Ln(e={},...r){const{palette:t,cssVariables:o=!1,colorSchemes:i=t?void 0:{light:!0},defaultColorScheme:s=t==null?void 0:t.mode,...a}=e,l=s||"light",c=i==null?void 0:i[l],g={...i,...t?{[l]:{...typeof c!="boolean"&&c,palette:t}}:void 0};if(o===!1){if(!("colorSchemes"in e))return mr(e,...r);let f=t;"palette"in e||g[l]&&(g[l]!==!0?f=g[l].palette:l==="dark"&&(f={mode:"dark"}));const x=mr({...e,palette:f},...r);return x.defaultColorScheme=l,x.colorSchemes=g,x.palette.mode==="light"&&(x.colorSchemes.light={...g.light!==!0&&g.light,palette:x.palette},fn(x,"dark",g.dark)),x.palette.mode==="dark"&&(x.colorSchemes.dark={...g.dark!==!0&&g.dark,palette:x.palette},fn(x,"light",g.light)),x}return!t&&!("light"in g)&&l==="light"&&(g.light=!0),os({...a,colorSchemes:g,defaultColorScheme:l,...typeof o!="boolean"&&o},...r)}const is=Ln(),as="$$material";function ss(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const ls=e=>ss(e)&&e!=="classes",ds=sa({themeId:as,defaultTheme:is,rootShouldForwardProp:ls}),cs=ba;process.env.NODE_ENV!=="production"&&(te.node,te.object.isRequired);function ps(e){return ya(e)}function us(e){return jr("MuiSvgIcon",e)}ra("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const fs=e=>{const{color:r,fontSize:t,classes:o}=e,i={root:["root",r!=="inherit"&&`color${et(r)}`,`fontSize${et(t)}`]};return Yo(i,us,o)},hs=ds("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,t.color!=="inherit"&&r[`color${et(t.color)}`],r[`fontSize${et(t.fontSize)}`]]}})(cs(({theme:e})=>{var r,t,o,i,s,a,l,c,g,f,x,m,h,b;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(i=(r=e.transitions)==null?void 0:r.create)==null?void 0:i.call(r,"fill",{duration:(o=(t=(e.vars??e).transitions)==null?void 0:t.duration)==null?void 0:o.shorter}),variants:[{props:u=>!u.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((a=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:a.call(s,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(l=e.typography)==null?void 0:l.pxToRem)==null?void 0:c.call(l,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(g=e.typography)==null?void 0:g.pxToRem)==null?void 0:f.call(g,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,u])=>u&&u.main).map(([u])=>{var y,v;return{props:{color:u},style:{color:(v=(y=(e.vars??e).palette)==null?void 0:y[u])==null?void 0:v.main}}}),{props:{color:"action"},style:{color:(m=(x=(e.vars??e).palette)==null?void 0:x.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(b=(h=(e.vars??e).palette)==null?void 0:h.action)==null?void 0:b.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Dt=_e.forwardRef(function(r,t){const o=ps({props:r,name:"MuiSvgIcon"}),{children:i,className:s,color:a="inherit",component:l="svg",fontSize:c="medium",htmlColor:g,inheritViewBox:f=!1,titleAccess:x,viewBox:m="0 0 24 24",...h}=o,b=_e.isValidElement(i)&&i.type==="svg",u={...o,color:a,component:l,fontSize:c,instanceFontSize:r.fontSize,inheritViewBox:f,viewBox:m,hasSvgAsChild:b},y={};f||(y.viewBox=m);const v=fs(u);return n.jsxs(hs,{as:l,className:wn(v.root,s),focusable:"false",color:g,"aria-hidden":x?void 0:!0,role:x?"img":void 0,ref:t,...y,...h,...b&&i.props,ownerState:u,children:[b?i.props.children:i,x?n.jsx("title",{children:x}):null]})});process.env.NODE_ENV!=="production"&&(Dt.propTypes={children:te.node,classes:te.object,className:te.string,color:te.oneOfType([te.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),te.string]),component:te.elementType,fontSize:te.oneOfType([te.oneOf(["inherit","large","medium","small"]),te.string]),htmlColor:te.string,inheritViewBox:te.bool,shapeRendering:te.string,sx:te.oneOfType([te.arrayOf(te.oneOfType([te.func,te.object,te.bool])),te.func,te.object]),titleAccess:te.string,viewBox:te.string});Dt.muiName="SvgIcon";function vt(e,r){function t(o,i){return n.jsx(Dt,{"data-testid":process.env.NODE_ENV!=="production"?`${r}Icon`:void 0,ref:i,...o,children:e})}return process.env.NODE_ENV!=="production"&&(t.displayName=`${r}Icon`),t.muiName=Dt.muiName,_e.memo(_e.forwardRef(t))}const gs=vt(n.jsx("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"}),"TuneRounded"),xs=vt(n.jsx("path",{d:"M12 5V3.21c0-.45-.54-.67-.85-.35l-2.8 2.79c-.2.2-.2.51 0 .71l2.79 2.79c.32.31.86.09.86-.36V7c3.31 0 6 2.69 6 6 0 2.72-1.83 5.02-4.31 5.75-.42.12-.69.52-.69.95 0 .65.62 1.16 1.25.97C17.57 19.7 20 16.64 20 13c0-4.42-3.58-8-8-8m-6 8c0-1.34.44-2.58 1.19-3.59.3-.4.26-.95-.09-1.31-.42-.42-1.14-.38-1.5.1-1 1.34-1.6 3-1.6 4.8 0 3.64 2.43 6.7 5.75 7.67.63.19 1.25-.32 1.25-.97 0-.43-.27-.83-.69-.95C7.83 18.02 6 15.72 6 13"}),"RestartAltRounded"),ms=vt(n.jsx("path",{d:"M9.37 5.51c-.18.64-.27 1.31-.27 1.99 0 4.08 3.32 7.4 7.4 7.4.68 0 1.35-.09 1.99-.27C17.45 17.19 14.93 19 12 19c-3.86 0-7-3.14-7-7 0-2.93 1.81-5.45 4.37-6.49M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"}),"DarkModeOutlined"),ys=vt(n.jsx("path",{d:"M12 9c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}),"LightModeOutlined"),hn=e=>{let r;const t=new Set,o=(g,f)=>{const x=typeof g=="function"?g(r):g;if(!Object.is(x,r)){const m=r;r=f??(typeof x!="object"||x===null)?x:Object.assign({},r,x),t.forEach(h=>h(r,m))}},i=()=>r,l={setState:o,getState:i,getInitialState:()=>c,subscribe:g=>(t.add(g),()=>t.delete(g))},c=r=e(o,i,l);return l},bs=(e=>e?hn(e):hn),vs=e=>e;function Ss(e,r=vs){const t=L.useSyncExternalStore(e.subscribe,L.useCallback(()=>r(e.getState()),[e,r]),L.useCallback(()=>r(e.getInitialState()),[e,r]));return L.useDebugValue(t),t}const gn=e=>{const r=bs(e),t=o=>Ss(r,o);return Object.assign(t,r),t},Nn=(e=>e?gn(e):gn);function Cs(e,r){let t;try{t=e()}catch{return}return{getItem:i=>{var s;const a=c=>c===null?null:JSON.parse(c,void 0),l=(s=t.getItem(i))!=null?s:null;return l instanceof Promise?l.then(a):a(l)},setItem:(i,s)=>t.setItem(i,JSON.stringify(s,void 0)),removeItem:i=>t.removeItem(i)}}const yr=e=>r=>{try{const t=e(r);return t instanceof Promise?t:{then(o){return yr(o)(t)},catch(o){return this}}}catch(t){return{then(o){return this},catch(o){return yr(o)(t)}}}},js=(e,r)=>(t,o,i)=>{let s={storage:Cs(()=>window.localStorage),partialize:y=>y,version:0,merge:(y,v)=>({...v,...y}),...r},a=!1,l=0;const c=new Set,g=new Set;let f=s.storage;if(!f)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),t(...y)},o,i);const x=()=>{const y=s.partialize({...o()});return f.setItem(s.name,{state:y,version:s.version})},m=i.setState;i.setState=(y,v)=>(m(y,v),x());const h=e((...y)=>(t(...y),x()),o,i);i.getInitialState=()=>h;let b;const u=()=>{var y,v;if(!f)return;const E=++l;a=!1,c.forEach(S=>{var j;return S((j=o())!=null?j:h)});const B=((v=s.onRehydrateStorage)==null?void 0:v.call(s,(y=o())!=null?y:h))||void 0;return yr(f.getItem.bind(f))(s.name).then(S=>{if(S)if(typeof S.version=="number"&&S.version!==s.version){if(s.migrate){const j=s.migrate(S.state,S.version);return j instanceof Promise?j.then(T=>[!0,T]):[!0,j]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,S.state];return[!1,void 0]}).then(S=>{var j;if(E!==l)return;const[T,M]=S;if(b=s.merge(M,(j=o())!=null?j:h),t(b,!0),T)return x()}).then(()=>{E===l&&(B==null||B(o(),void 0),b=o(),a=!0,g.forEach(S=>S(b)))}).catch(S=>{E===l&&(B==null||B(void 0,S))})};return i.persist={setOptions:y=>{s={...s,...y},y.storage&&(f=y.storage)},clearStorage:()=>{f==null||f.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>u(),hasHydrated:()=>a,onHydrate:y=>(c.add(y),()=>{c.delete(y)}),onFinishHydration:y=>(g.add(y),()=>{g.delete(y)})},s.skipHydration||u(),b||h},ws=js,Re={appName:"Crystal Ball",appTagline:"Run your whole business in one place",logoMode:"icon",logoUrl:"",iconColor:"#4F6BFF",presetId:"corporate",mode:"light",primaryHex:"#4F6BFF",secondaryHex:"#22D3EE",highlightHex:"",errorHex:"#d32f2f",warningHex:"#ed6c02",infoHex:"#0288d1",successHex:"#2e7d32",cardBgHex:"",cardHdrHex:"",pageBgHex:"",notifCardHex:"",textPrimaryHex:"",textSecondaryHex:"",dividerHex:"",btnColorHex:"",btnTextHex:"",h1Color:"",h2Color:"",h3Color:"",h4Color:"",h5Color:"",h6Color:"",fontFamily:"Roboto",headingFont:"Figtree",customFonts:[],customHeadFonts:[],textSize:"df",baseFontPx:0,bodyLineHeight:0,bodyWeight:0,letterSpace:0,scaleRatio:"default",scaleRatioCustom:0,h1Size:0,h2Size:0,h3Size:0,h4Size:0,h5Size:0,h6Size:0,h1Weight:0,h2Weight:0,h3Weight:0,h4Weight:0,h5Weight:0,h6Weight:0,headingWeight:600,headingLH:0,radiusPreset:"rounded",radiusVal:9,density:"default",densityScale:0,cardShadowPx:-1,contrast:"medium",contrastMode:"auto",containerPadPx:0,edgePadPx:0,cardGapPx:0,cardStyle:"soft",cardHeader:"plain",surfaceTint:"snow",nestedStyle:"recessed",nestedDepth:-1,headerStrength:-1,tintIntensity:-1,btnCase:"upper",accentGradient:!1,statusBold:!1,mapGlass:"light",chartScheme:"brand",tableDensity:"default",tableColDensity:"default",tableDividers:!1,tableColDividers:!1,tableRowDivW:1,tableColDivW:1,tableStripe:!1,tableHeaderStyle:"tinted",tableCellAlignH:"left",tableCellAlignV:"middle",notifPosition:"bottom-right",notifStyle:"toast",notifAccent:"severity",notifBadge:!0,notifAutoDismiss:!1,autoDismissSec:8,toastW:0,navPattern:"sidebar",sidebarWidth:220,appBarH:0,loginLayout:"split",loginImage:"",loginShowTagline:!0,loginPanelColor:"",loginImgOpacity:0,loginCardW:0},$e=e=>JSON.stringify(e);function cr(e){const r={...Re};if(e&&typeof e=="object")for(const t of Object.keys(Re)){const o=e[t];o!==void 0&&typeof o==typeof Re[t]&&(r[t]=o)}return r}function Ts(e){if(!e||typeof e!="object")return!1;const r=Object.keys(Re);let t=0;for(const o of r){const i=e[o];i!==void 0&&typeof i==typeof Re[o]&&t++}return t/r.length>=.5}const N=Nn()(ws((e,r)=>({settings:{...Re},savedThemes:[],baseline:$e(Re),editingSavedId:null,lastImportedId:null,set:t=>e(o=>({settings:{...o.settings,...t,presetId:"custom"}})),applyPreset:(t,o)=>e(i=>{const s={...i.settings,...o,presetId:t};return{settings:s,baseline:$e(s),editingSavedId:null,lastImportedId:null}}),reset:()=>e(()=>({settings:{...Re},baseline:$e(Re),editingSavedId:null,lastImportedId:null})),captureBaseline:()=>e(t=>({baseline:$e(t.settings)})),restoreBaseline:()=>e(t=>{try{return{settings:JSON.parse(t.baseline)}}catch{return{}}}),isDirty:()=>$e(r().settings)!==r().baseline,saveTheme:t=>e(o=>{const i="cust"+Date.now(),s={...o.settings};return{savedThemes:[...o.savedThemes,{id:i,name:t,snap:s}],settings:{...o.settings,presetId:i},baseline:$e({...o.settings,presetId:i}),editingSavedId:i,lastImportedId:null}}),updateSaved:(t,o,i)=>e(s=>{const a={...i,presetId:t};return{savedThemes:s.savedThemes.map(l=>l.id===t?{...l,name:o,snap:i}:l),settings:a,baseline:$e(a),editingSavedId:t,lastImportedId:null}}),applySaved:t=>e(()=>{const o={...cr(t.snap),presetId:t.id};return{settings:o,baseline:$e(o),editingSavedId:t.id,lastImportedId:null}}),renameSaved:(t,o)=>e(i=>({savedThemes:i.savedThemes.map(s=>s.id===t?{...s,name:o}:s)})),deleteSaved:t=>e(o=>({savedThemes:o.savedThemes.filter(i=>i.id!==t),editingSavedId:o.editingSavedId===t?null:o.editingSavedId,lastImportedId:o.lastImportedId===t?null:o.lastImportedId})),importTheme:(t,o)=>{const i=cr(o),s={id:"imp"+Date.now(),name:t,snap:i};return e(a=>{const l={...i,presetId:s.id};return{savedThemes:[s,...a.savedThemes],settings:l,baseline:$e(l),editingSavedId:s.id,lastImportedId:s.id}}),s}}),{name:"omnieye-theme-studio",merge:(e,r)=>{const t=e??{};return{...r,...t,settings:cr(t.settings),savedThemes:Array.isArray(t.savedThemes)?t.savedThemes:r.savedThemes}}}));function He(e){const r=e==="dark";return{studioBg:r?"#15181d":"#f5f7fa",studioBd:r?"#2a2f38":"#d8dee6",card:r?"#1e222a":"#ffffff",cardBd:r?"#2b313b":"#e6eaf0",inset:r?"#262b34":"#f7f9fb",insetBd:r?"#363d48":"#e9edf2",divider:r?"#262b34":"#f0f3f7",iconTile:r?"#2b313b":"#eef1f6",text:r?"rgba(255,255,255,0.92)":"#1c2127",label:r?"rgba(255,255,255,0.5)":"#9aa4b0",label2:r?"rgba(255,255,255,0.6)":"#7a8593",body:r?"rgba(255,255,255,0.78)":"#5a6573",muted:r?"rgba(255,255,255,0.42)":"#aeb6c0",chevron:r?"rgba(255,255,255,0.42)":"#b3bcc7"}}function br(e){if(!e||e.length<7)return[210,60,45];const r=parseInt(e.slice(1,3),16)/255,t=parseInt(e.slice(3,5),16)/255,o=parseInt(e.slice(5,7),16)/255,i=Math.max(r,t,o),s=Math.min(r,t,o),a=i-s;let l=0,c=0;const g=(i+s)/2;return a&&(c=a/(1-Math.abs(2*g-1)),i===r?l=(t-o)/a%6:i===t?l=(o-r)/a+2:l=(r-t)/a+4,l=Math.round(l*60),l<0&&(l+=360)),[l,Math.round(c*100),Math.round(g*100)]}function de(e,r,t){r/=100,t/=100;const o=i=>{const s=(i+e/30)%12,a=r*Math.min(t,1-t);return Math.round((t-a*Math.max(-1,Math.min(s-3,Math.min(9-s,1))))*255).toString(16).padStart(2,"0")};return"#"+o(0)+o(8)+o(4)}function Se(e){try{const[r,t]=br(e),o=Math.max(t,18);return{50:de(r,Math.max(Math.round(o*.3),10),96),100:de(r,Math.max(Math.round(o*.42),12),91),200:de(r,Math.max(Math.round(o*.55),16),82),300:de(r,Math.max(Math.round(o*.7),20),70),400:de(r,o,60),500:e,600:de(r,Math.min(o+4,100),44),700:de(r,Math.min(o+8,100),36),800:de(r,Math.max(Math.round(o*.92),16),26),900:de(r,Math.max(Math.round(o*.8),14),16)}}catch{return{50:"#eef",100:"#dde",200:"#bbd",300:"#99c",400:"#77b",500:e||"#4F6BFF",600:"#1257a8",700:"#0e4488",800:"#0a3266",900:"#062044"}}}function pr(e,r){try{const t=l=>{const c=[1,3,5].map(g=>{const f=parseInt(l.slice(g,g+2),16)/255;return f<=.04045?f/12.92:Math.pow((f+.055)/1.055,2.4)});return .2126*c[0]+.7152*c[1]+.0722*c[2]},o=t(e),i=t(r),s=Math.max(o,i),a=Math.min(o,i);return(s+.05)/(a+.05)}catch{return 1}}function ce(e,r){if(!e||e[0]!=="#"||e.length<7)return"rgba(20,30,48,"+r+")";const t=parseInt(e.slice(1,3),16),o=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16);return"rgba("+t+","+o+","+i+","+r+")"}function kr(e){const r=Se(e.primaryHex),t=Se(e.secondaryHex),o=e.mode==="dark",i=o?r[300]:e.primaryHex,s=o?t[300]:e.secondaryHex,a={pMain:i,pDark:r[700],pLight:r[300],highlight:e.highlightHex||"#ffd400",highlightSoft:ce(e.highlightHex||"#ffd400",.15),highlightBd:ce(e.highlightHex||"#ffd400",.34),pContrast:e.contrastMode==="light"?"#ffffff":e.contrastMode==="dark"?"rgba(0,0,0,0.87)":pr(i,"#ffffff")>=2.9?"#ffffff":"rgba(0,0,0,0.87)",pContainer:o?ce(e.primaryHex,.26):r[50],onPContainer:o?r[100]:r[800],sMain:s,sContrast:pr(s,"#ffffff")>=2.9?"#ffffff":"rgba(0,0,0,0.87)",bgDefault:o?"#121212":"#f3f5f8",paper:o?"#1e1e1e":"#ffffff",paper2:o?"#262630":"#f6f8fb",frameGutterBg:o?"#0a0a0a":"#e3e7ec",footerBg:o?"#17171c":"#eceef2",textPrimary:o?"rgba(255,255,255,0.92)":"rgba(0,0,0,0.87)",textSecondary:o?"rgba(255,255,255,0.62)":"rgba(0,0,0,0.6)",textDisabled:o?"rgba(255,255,255,0.4)":"rgba(0,0,0,0.38)",divider:o?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.12)",outline:o?"rgba(255,255,255,0.23)":"rgba(0,0,0,0.23)"},l=e.statusBold,c=l?e.errorHex:ce(e.errorHex,o?.22:.13),g=l?e.warningHex:ce(e.warningHex,o?.22:.14),f=l?e.infoHex:ce(e.infoHex,o?.22:.13),x=l?e.successHex:ce(e.successHex,o?.22:.13),m=l?"#ffffff":o?Se(e.errorHex)[300]:e.errorHex,h=l?"#ffffff":o?Se(e.warningHex)[300]:Se(e.warningHex)[700],b=l?"#ffffff":o?Se(e.infoHex)[300]:e.infoHex,u=l?"#ffffff":o?Se(e.successHex)[300]:Se(e.successHex)[700],y=br(e.primaryHex)[0],v={neutral:[220,6],warm:[32,26],cool:[210,30],brand:[y,42],slate:[214,16],snow:[0,0]},E=v[e.surfaceTint]||v.neutral,B=e.tintIntensity>=0?e.tintIntensity:100,S=[E[0],Math.round(E[1]*B/100)];o?(a.bgDefault=de(S[0],Math.round(S[1]*.7),7),a.paper=de(S[0],Math.round(S[1]*.7),13),a.paper2=de(S[0],Math.round(S[1]*.85),19)):(a.bgDefault="#ffffff",a.paper="#ffffff",a.paper2=de(S[0],Math.round(S[1]*.85),e.surfaceTint==="brand"?95:96.5)),e.pageBgHex&&(a.bgDefault=e.pageBgHex),e.cardBgHex&&(a.paper=e.cardBgHex);const j={soft:0,standard:1,medium:2,high:3},T=j[e.contrast]!==void 0?j[e.contrast]:1,M=o?[["rgba(255,255,255,0.82)","rgba(255,255,255,0.55)","rgba(255,255,255,0.09)","rgba(255,255,255,0.16)"],["rgba(255,255,255,0.92)","rgba(255,255,255,0.62)","rgba(255,255,255,0.12)","rgba(255,255,255,0.23)"],["rgba(255,255,255,0.96)","rgba(255,255,255,0.74)","rgba(255,255,255,0.18)","rgba(255,255,255,0.34)"],["#ffffff","rgba(255,255,255,0.87)","rgba(255,255,255,0.26)","rgba(255,255,255,0.46)"]]:[["rgba(0,0,0,0.72)","rgba(0,0,0,0.5)","rgba(0,0,0,0.08)","rgba(0,0,0,0.16)"],["rgba(0,0,0,0.87)","rgba(0,0,0,0.6)","rgba(0,0,0,0.12)","rgba(0,0,0,0.23)"],["rgba(0,0,0,0.92)","rgba(0,0,0,0.7)","rgba(0,0,0,0.18)","rgba(0,0,0,0.34)"],["#000000","rgba(0,0,0,0.8)","rgba(0,0,0,0.24)","rgba(0,0,0,0.46)"]];a.textPrimary=M[T][0],a.textSecondary=M[T][1],a.divider=M[T][2],a.outline=M[T][3],e.textPrimaryHex&&(a.textPrimary=e.textPrimaryHex),e.textSecondaryHex&&(a.textSecondary=e.textSecondaryHex),e.dividerHex&&(a.divider=e.dividerHex),e.nestedStyle==="lighter"?a.paper2=o?de(S[0],Math.round(S[1]*.9),22):de(S[0],Math.max(Math.round(S[1]*.3),4),100):e.nestedStyle==="bordered"?a.paper2=a.paper:a.paper2=o?de(S[0],Math.round(S[1]*.9),Math.max(3,5)):de(S[0],Math.min(Math.round(S[1]*1.1),60),Math.max(88,94-S[1]*.18));const P=e.btnColorHex||i,X=e.accentGradient?"linear-gradient(135deg,"+P+","+(e.btnColorHex?Se(e.btnColorHex)[700]:r[o?500:700])+")":P,Q=e.btnTextHex||(pr(P,"#ffffff")>=2.9?"#ffffff":"rgba(0,0,0,0.87)"),Y=e.h1Color||null,d=e.h2Color||null,$=e.h3Color||null,H=e.h4Color||null,z=e.h5Color||null,_=e.h6Color||null,K=[{key:"sm",px:13},{key:"df",px:12},{key:"lg",px:18}],U=K.find(me=>me.key===e.textSize)||K[1],J=e.baseFontPx>0?e.baseFontPx:U.px,R=e.bodyLineHeight>0?e.bodyLineHeight:1.5,I=e.h1Size>0?e.h1Size:20,q=Math.round(I*1.1),V=I,G=Math.max(Math.round(I*.9),11),O=Math.max(Math.round(I*.8),11),C=Math.max(Math.round(I*.7),10),A=Math.max(Math.round(I*.6),10),D=Math.max(Math.round(I*.5),9),k=J,F=Math.round(J*.92),ee=Math.round(J*.8),W=Math.round(J*.72),fe=e.headingWeight,Oe=e.headingLH>0?e.headingLH:1.2,De=e.bodyWeight>0?e.bodyWeight:400,Ve=Math.min(900,De+200),Ue={compact:.82,default:1,comfortable:1.16},Be=e.densityScale>0?e.densityScale/100:Ue[e.density]??1,Xt=Math.round(20*Be),Fe=Math.round(14*Be),St=e.cardGapPx>0?e.cardGapPx:Math.round(16*Be),Ge=Math.round(11*Be*({compact:.66,default:1,comfortable:1.32}[e.tableDensity]??1)),Me=e.containerPadPx>0?e.containerPadPx:Math.round(10*Be),Z=e.radiusVal,ct=Z+"px",pt=Math.max(Math.round(Z*.6),2)+"px",We={0:"none",1:"0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12)",2:"0px 3px 3px -2px rgba(0,0,0,0.2),0px 3px 4px 0px rgba(0,0,0,0.14),0px 1px 8px 0px rgba(0,0,0,0.12)",4:"0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)",8:"0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12)"},Rr="1px solid rgba(255,255,255,0.06)";let ut,Ye,Ct;e.cardStyle==="outlined"?(ut="none",Ye="1.5px solid "+a.outline,Ct="none"):e.cardStyle==="soft"?(ut=We[1],Ye=o?Rr:"none",Ct=We[1]):(ut=We[8],Ye=o?Rr:"none",Ct=We[4]),e.cardShadowPx>=0&&(ut="0 "+Math.round(e.cardShadowPx*.45)+"px "+e.cardShadowPx+"px rgba(16,24,40,"+(o?.55:.16)+")");let jt="transparent",Er="1px solid "+a.divider,Qt="none";e.cardHeader==="plain"?Er="none":e.cardHeader==="tinted"?jt=a.pContainer:e.cardHeader==="accent"&&(Qt="inset 3px 0 0 "+i),e.headerStrength>=0&&(e.cardHeader==="tinted"?jt=ce(e.primaryHex,(o?.14:.08)*(e.headerStrength/100)):e.cardHeader==="accent"&&(Qt="inset "+Math.round(e.headerStrength*.06)+"px 0 0 "+i)),e.cardHdrHex&&(jt=e.cardHdrHex);const Gn=o?"none":We[4],Yn=o?"1px solid "+a.divider:"none",Jn=e.nestedStyle==="bordered"?"1.5px solid "+a.outline:"1px solid "+a.divider,qn=e.nestedDepth>0?"inset 3px 0 0 "+ce(e.primaryHex,.55)+", 0 "+Math.round(e.nestedDepth*.4)+"px "+e.nestedDepth+"px rgba(16,24,40,"+(o?.42:.1)+")":"none",Kn=(e.appName||"").trim().split(/\s+/).slice(0,2).map(me=>me[0]||"").join("").toUpperCase()||"AP",Xn=!!(e.logoMode==="image"&&e.logoUrl),Qn=!!e.loginImage,Hr=me=>{const be=me||"Roboto";return be.includes(" ")&&!be.startsWith('"')&&!be.startsWith("'")?`"${be}"`:be},Zn=Hr(e.headingFont||e.fontFamily),eo=Hr(e.fontFamily),ye=br(e.primaryHex)[0],xe=(me,be)=>de((me%360+360)%360,62,o?60:46),Pr={brand:[i,s,xe(ye+42),xe(ye+205),xe(ye+120)],categorical:[xe(ye),xe(ye+72),xe(ye+144),xe(ye+216),xe(ye+288)],sequential:[de(ye,55,o?40:78),de(ye,60,o?50:64),i,de(ye,70,o?70:38),de(ye,78,o?82:26)],cbsafe:["#0072B2","#E69F00","#009E73","#CC79A7","#56B4E9"],warm:[xe(8),xe(28),xe(45),xe(350),xe(18)],cool:[xe(200),xe(220),xe(255),xe(180),xe(235)]},to=Pr[e.chartScheme]||Pr.brand,ro=[r[600],t[600],de((ye+42)%360,55,46),de((ye+205)%360,50,46)],no={error:{cb:c,cc:m},success:{cb:x,cc:u},info:{cb:f,cc:b},warning:{cb:g,cc:h}},Zt=e.mapGlass==="light",oo=Zt?"rgba(255,255,255,0.84)":"rgba(15,20,28,0.74)",io=Zt?"#1c2733":"#f3f6fa",ao=Zt?"rgba(0,0,0,0.12)":"rgba(255,255,255,0.18)",so="repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 11px, rgba(255,255,255,0) 11px, rgba(255,255,255,0) 22px), radial-gradient(circle at 50% 38%, "+ce(i,.22)+", rgba(0,0,0,0) 60%), "+"#0f141c",lo="linear-gradient(135deg,"+i+","+r[700]+")",co="linear-gradient(180deg,"+ce(r[900],.12)+","+ce(r[900],.55)+")",po="linear-gradient(135deg,"+r[700]+","+r[900]+")",uo="linear-gradient(135deg,"+ce(r[900],.55)+","+ce(e.primaryHex,.45)+")",$r={"top-right":{top:"14px",right:"14px"},"top-center":{top:"14px",left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:"14px",right:"14px"},"bottom-left":{bottom:"14px",left:"14px"}},fo=$r[e.notifPosition]||$r["top-right"],Ar=e.notifAccent==="primary"?{bar:i,icbg:a.pContainer,icc:a.onPContainer,dot:i}:e.notifAccent==="mono"?{bar:a.textSecondary,icbg:a.paper2,icc:a.textPrimary,dot:a.textSecondary}:{bar:e.warningHex,icbg:g,icc:h,dot:e.warningHex};let wt;e.notifStyle==="toast"?wt={boxShadow:We[8],border:typeof Ye=="string"&&Ye!=="none"?Ye:"none"}:e.notifStyle==="banner"?wt={boxShadow:We[2],borderLeft:"4px solid "+Ar.bar}:wt={boxShadow:"none",border:"1px solid "+a.divider};const ho=e.notifCardHex||(o?"#1e1e1e":"#ffffff"),go={compact:"7px",default:"11px",comfortable:"16px"},xo={compact:"6px",default:"12px",comfortable:"22px"},mo={top:"flex-start",middle:"center",bottom:"flex-end"},yo={left:"flex-start",center:"center",right:"flex-end"},bo={plain:"transparent",tinted:a.paper2,accent:a.highlightSoft},vo={rowPy:go[e.tableDensity]||"11px",cellPx:xo[e.tableColDensity]||"12px",rowBorder:e.tableDividers?(e.tableRowDivW||1)+"px solid "+a.divider:"none",colBorder:e.tableColDividers?(e.tableColDivW||1)+"px solid "+a.divider:"none",headBg:bo[e.tableHeaderStyle]||a.paper2,cellAI:mo[e.tableCellAlignV]||"center",cellJC:yo[e.tableCellAlignH]||"flex-start",stripeBg:o?"rgba(255,255,255,0.035)":"rgba(0,0,0,0.028)",statusMap:{Delivered:{sb:x,sc:u},Processing:{sb:a.pContainer,sc:o?a.pLight:a.pDark},Pending:{sb:g,sc:h},Shipped:{sb:f,sc:b}},filters:["All","Delivered","Processing","Pending"].map((me,be)=>({label:me,bg:be===0?a.highlightSoft:"transparent",c:be===0?a.textPrimary:a.textSecondary,brd:be===0?a.highlightBd:a.outline}))},So={sm:"Small",df:"Default",lg:"Large"},Co={compact:"Compact",default:"Default",comfortable:"Comfortable"},jo={outlined:"Outlined",soft:"Soft",floating:"Floating"},wo={sharp:"Sharp",rounded:"Rounded",round:"Round"},To=[{key:"sidebar",label:"Sidebar",desc:"Full drawer",ic:"▤"},{key:"rail",label:"Rail",desc:"Icons only",ic:"▥"},{key:"topbar",label:"Top Bar",desc:"Horizontal",ic:"▦"}],ko=e.fontFamily+" · "+(So[e.textSize]||"Default"),Bo=(wo[e.radiusPreset]||"Custom")+" · "+(Co[e.density]||"Default")+" · "+(jo[e.cardStyle]||"Soft"),Ro=[{label:"General",ic:"◉"},{label:"Appearance",ic:"◧"},{label:"Modules",ic:"◫"},{label:"Team",ic:"◍"},{label:"Security",ic:"▣"},{label:"Billing",ic:"◳"}].map((me,be)=>({...me,on:be===1,bg:be===1?a.highlightSoft:"transparent",c:be===1?a.textPrimary:a.textSecondary,bar:be===1?"3px solid "+a.highlight:"3px solid transparent"})),Eo=To.map(me=>({...me,active:e.navPattern===me.key,brd:e.navPattern===me.key?i:a.divider,bg:e.navPattern===me.key?a.pContainer:a.paper,color:e.navPattern===me.key?a.onPContainer:a.textPrimary})),Ho=e.sidebarWidth,Po=e.appBarH>0?e.appBarH:56,$o=e.appBarH>0?e.appBarH+"px":"Auto (56px)";return{pal:r,spal:t,isDark:o,pMain:i,sMain:s,t:a,errSoft:c,warnSoft:g,infoSoft:f,sucSoft:x,errTxt:m,warnTxt:h,infoTxt:b,sucTxt:u,sevMap:no,accentBg:X,btnText:Q,hc1:Y,hc2:d,hc3:$,hc4:H,hc5:z,hc6:_,base:J,bodyLH:R,h1base:I,tDisplay:q,tH1:V,tH2:G,tTitle:O,tH4:C,tH5:A,tH6:D,tBody:k,tBodySm:F,tCaption:ee,tOverline:W,wH1:fe,wH2:fe,wH3:fe,wH4:fe,wH5:fe,wH6:fe,headLH:Oe,bodyWeightEff:De,bwEmph:Ve,pad:Xt,padSm:Fe,gap:St,rowPy:Ge,screenPad:Me,r:Z,rad:ct,radSm:pt,SH:We,cardShadow:ut,cardBorder:Ye,btnShadow:Ct,cardHdrBg:jt,cardHdrBorder:Er,cardHdrAccent:Qt,appbarShadow:Gn,appbarBorder:Yn,nestBorder:Jn,nestShadow:qn,iconInitials:Kn,hasLogo:Xn,hasLoginImage:Qn,headFam:Zn,bodyFam:eo,chartHue:ye,chartPalette:to,avatarColors:ro,overlaySurface:oo,onOverlay:io,overlayBorder:ao,mediaBg:so,loginBrandGrad:lo,loginScrimGrad:co,loginCenteredGrad:po,loginScrimGradC:uo,npos:fo,nacc:Ar,toastDeco:wt,toastBg:ho,btnCase:e.btnCase!=="none"?"uppercase":"none",table:vo,typeSummary:ko,shapeSummary:Bo,settingsCats:Ro,navSettingsChips:Eo,sidebarWidth:Ho,appBarHEff:Po,appBarHLabel:$o}}function ks({icon:e,title:r,info:t,open:o,dimmed:i,onToggle:s,onPreviewMenu:a,children:l}){const c=N(v=>v.settings),g=c.mode==="dark",f=c.primaryHex||"#4F6BFF",x=He(c.mode),m=Se(f),h=kr(c),b=o?g?ce(f,.22):ce(f,.1):"transparent",u=o?g?m[200]:m[700]:x.text,y=o?f:x.chevron;return n.jsxs(p.Box,{sx:{background:b,opacity:i?.3:1,transform:o?"translateY(-2px)":"none",transition:"opacity .22s ease, transform .22s ease",borderBottom:`1px solid ${x.divider}`,overflow:"hidden"},children:[n.jsxs(p.Box,{component:"button",onClick:s,sx:{width:"100%",display:"flex",alignItems:"center",gap:"9px",p:"7px 11px",background:"transparent",border:"none",textAlign:"left",cursor:"pointer",fontFamily:"inherit"},children:[n.jsx(p.Box,{sx:{width:32,height:32,borderRadius:"10px",background:x.iconTile,color:x.body,display:"grid",placeItems:"center",flexShrink:0,position:"relative"},children:e}),n.jsx(p.Box,{sx:{flex:1,minWidth:0},children:n.jsx(p.Box,{sx:{fontSize:`${h.tH5}px`,fontWeight:h.wH5,fontFamily:`${h.headFam},sans-serif`,lineHeight:1.25,color:u,letterSpacing:"-.2px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r})}),a&&n.jsx(p.Box,{component:"span",title:"Change preview screen",onClick:v=>{v.stopPropagation(),a()},sx:{width:16,height:16,mr:"6px",flexShrink:0,cursor:"pointer",display:"grid",placeItems:"center",color:x.chevron,transition:"filter .15s ease, transform .1s ease","&:hover":{filter:"brightness(1.15)",transform:"scale(1.12)"}},children:n.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}),n.jsx("path",{d:"M8 21h8M12 17v4"})]})}),t&&n.jsx(p.Box,{component:"span",title:t,sx:{width:15,height:15,borderRadius:"50%",border:`1.2px solid ${x.chevron}`,color:x.chevron,fontSize:"9px",fontWeight:800,fontStyle:"italic",fontFamily:"Georgia, serif",display:"grid",placeItems:"center",mr:"7px",flexShrink:0,cursor:"help"},children:"i"}),n.jsx(p.Box,{sx:{width:20,height:20,borderRadius:"6px",display:"grid",placeItems:"center",fontSize:"9px",color:y,flexShrink:0,transition:"background .18s, border-color .18s"},children:n.jsx(p.Box,{component:"span",sx:{display:"block",lineHeight:1,transform:o?"rotate(180deg)":"none",transition:"transform .2s"},children:"▼"})})]}),n.jsx(p.Collapse,{in:o,unmountOnExit:!0,timeout:280,children:n.jsx(p.Box,{sx:{p:"2px 13px 12px",borderTop:`1px solid ${x.divider}`},children:l})})]})}function ve(){const e=N(r=>r.settings);return L.useMemo(()=>kr(e),[e])}function tt({tabs:e,active:r,onChange:t}){const o=N(m=>m.settings.mode),i=N(m=>m.settings.primaryHex)||"#4F6BFF",s=N(m=>m.settings.highlightHex)||"#ffd400",a=N(m=>m.settings.bodyWeight)||400,l=o==="dark",c=Math.min(900,a+200),g=ve(),f=l?"#e6edf3":"#1c2127",x=l?"#cdd4de":"#5a6573";return n.jsx(p.Box,{sx:{display:"flex",gap:"2px",mb:"2px",px:"2px",borderBottom:"1.5px solid rgba(120,130,145,0.5)"},children:e.map(m=>{const h=m.key===r,b=n.jsx(p.Button,{onClick:()=>t(m.key),disableRipple:!0,sx:{flex:1,minWidth:0,px:"2px",pt:"9px",pb:"8px",minHeight:44,borderRadius:"6px 6px 0 0",mb:"-1px",fontSize:`${g.tBodySm}px`,fontFamily:`${g.headFam},sans-serif`,fontWeight:h?c:a,letterSpacing:0,textTransform:"none",whiteSpace:"normal",lineHeight:1.15,textAlign:"center",color:h?f:x,opacity:h?1:.3,bgcolor:h?ce(s,l?.26:.18):"transparent",borderBottom:h?`3px solid ${i}`:"2px solid transparent",transition:"color .16s ease, background .16s ease, border-color .16s ease, opacity .16s ease","&:hover":h?{bgcolor:ce(s,l?.26:.18)}:{opacity:1,bgcolor:"rgba(150,160,175,0.35)",borderRadius:"8px",boxShadow:"0 6px 18px rgba(0,0,0,0.35)",transform:"translateY(-2px)"}},children:m.label},m.key);return m.info?n.jsx(p.Tooltip,{title:m.info,arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:b},m.key):b})})}const Ft=[{id:"corporate",name:"Corporate Blue",snap:{primaryHex:"#4F6BFF",secondaryHex:"#22D3EE",iconColor:"#4F6BFF"}},{id:"emerald",name:"Emerald",snap:{primaryHex:"#2EE6A6",secondaryHex:"#FFC255",iconColor:"#2EE6A6"}},{id:"indigo",name:"Indigo Violet",snap:{primaryHex:"#A97BFF",secondaryHex:"#FF5FA2",iconColor:"#A97BFF"}},{id:"slate",name:"Graphite",snap:{primaryHex:"#455a64",secondaryHex:"#78909c",iconColor:"#455a64"}},{id:"teal",name:"Ocean Teal",snap:{primaryHex:"#00838f",secondaryHex:"#0277bd",iconColor:"#00838f"}},{id:"amber",name:"Amber",snap:{primaryHex:"#e65100",secondaryHex:"#d84315",iconColor:"#e65100"}}];function Bs(){var G,O;const[e,r]=L.useState("presets"),t=N(C=>C.settings),o=t.mode==="dark",i=t.highlightHex||"#ffd400",s=ce(i,o?.3:.18),a=o?"#e6edf3":"#1c2127",l=o?"rgba(255,255,255,0.82)":"#2c333d",c=N(C=>C.savedThemes),g=N(C=>C.applyPreset),f=N(C=>C.applySaved),x=N(C=>C.saveTheme),m=N(C=>C.updateSaved),h=N(C=>C.renameSaved),b=N(C=>C.deleteSaved),u=N(C=>C.importTheme),y=N(C=>C.set),v=N(C=>C.isDirty),E=N(C=>C.editingSavedId),B=N(C=>C.lastImportedId),S=c.find(C=>C.id===E),j=(C,A)=>{const D=new Blob([JSON.stringify({name:C,snap:A},null,2)],{type:"application/json"}),k=URL.createObjectURL(D),F=document.createElement("a");F.href=k,F.download=`${C.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}.theme.json`,F.click(),URL.revokeObjectURL(k)},[T,M]=L.useState("");L.useEffect(()=>{if(!T)return;const C=setTimeout(()=>M(""),5e3);return()=>clearTimeout(C)},[T]);const[P,X]=L.useState(null),Q=C=>{const A=c.map(F=>F.name.toLowerCase());let D=C,k=2;for(;A.includes(D.toLowerCase());)D=`${C} ${k++}`;return D},Y=C=>{var k;const A=(k=C.target.files)==null?void 0:k[0];if(!A)return;const D=new FileReader;D.onload=()=>{try{const F=JSON.parse(D.result),ee=F.snap??F;if(!Ts(ee)){M("Invalid theme file. The selected file is not a valid Theme Studio export.");return}const W=F.name||"Imported Theme";if(c.some(fe=>fe.name.toLowerCase()===W.toLowerCase())){X({name:W,snap:ee});return}M(""),u(W,ee)}catch{M("Invalid theme file. The selected file is not a valid Theme Studio export.")}},D.readAsText(A),C.target.value=""},[d,$]=L.useState(null),[H,z]=L.useState(!1),[_,K]=L.useState(""),[U,J]=L.useState(null),[R,I]=L.useState(null),q=(S==null?void 0:S.name)||((G=Ft.find(C=>C.id===t.presetId))==null?void 0:G.name)||((O=c.find(C=>C.id===t.presetId))==null?void 0:O.name)||"Custom Theme",V=(C,A)=>{const D=C.trim();return D?c.some(k=>k.name.toLowerCase()===D.toLowerCase()&&k.id!==A)?"Name already exists":"":"Name required"};return n.jsxs(n.Fragment,{children:[n.jsx(tt,{active:e,onChange:r,tabs:[{key:"presets",label:"Presets",info:"Ready-made colour themes."},{key:"saved",label:"My Themes",info:"Your saved custom themes."},{key:"mode",label:"Mode",info:"Light / Dark."}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="presets"&&n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"9px"},children:Ft.map(C=>{const A=t.presetId===C.id;return n.jsxs(p.Box,{onClick:()=>g(C.id,C.snap),title:`${C.name} — applies this colour palette`,sx:{display:"flex",alignItems:"center",gap:"9px",p:"9px 10px",borderRadius:"11px",cursor:"pointer",textAlign:"left",border:`1px solid ${A?i:o?"#363d48":"#e3e8ee"}`,bgcolor:A?s:o?"#262b34":"#ffffff",transition:"all .14s ease"},children:[n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"2px",flexShrink:0},children:[n.jsx(p.Box,{sx:{width:20,height:11,borderRadius:"3px",bgcolor:C.snap.primaryHex}}),n.jsx(p.Box,{sx:{width:20,height:7,borderRadius:"2px",bgcolor:C.snap.secondaryHex}})]}),n.jsx(p.Box,{component:"span",sx:{fontSize:"11px",fontWeight:600,color:A?a:l,lineHeight:1.3},children:C.name})]},C.id)})}),e==="saved"&&n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[c.length===0&&n.jsx(p.Typography,{variant:"caption",sx:{color:"text.secondary",py:2,textAlign:"center"},children:"No saved themes yet."}),n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:.9},children:c.map(C=>{const A=E===C.id;return n.jsxs(p.Box,{onClick:()=>f(C),title:"Apply this saved theme",sx:{display:"flex",flexDirection:"column",gap:.9,p:"9px 10px",borderRadius:"11px",cursor:"pointer",position:"relative",border:`1px solid ${A?i:o?"#363d48":"#e3e8ee"}`,bgcolor:A?s:o?"#262b34":"#ffffff",transition:"all .14s ease"},children:[A&&B===C.id&&n.jsx(p.Tooltip,{title:"recently upload",arrow:!0,children:n.jsx(p.Box,{component:"span",sx:{position:"absolute",top:-2,right:0,width:6,height:6,borderRadius:"50%",bgcolor:"error.main",flexShrink:0}})}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"2px",flexShrink:0},children:[n.jsx(p.Box,{sx:{width:20,height:11,borderRadius:"3px",bgcolor:C.snap.primaryHex}}),n.jsx(p.Box,{sx:{width:20,height:7,borderRadius:"2px",bgcolor:C.snap.secondaryHex}})]}),n.jsx(p.Box,{component:"span",sx:{flex:1,minWidth:0,fontSize:"11px",fontWeight:600,color:A?a:l,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"normal"},children:C.name}),n.jsx(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end"},children:n.jsx(p.Box,{component:"span",onClick:D=>{D.stopPropagation(),$({el:D.currentTarget,id:C.id})},sx:{cursor:"pointer",color:"text.muted",px:.5},children:"⋮"})})]})]},C.id)})}),T&&n.jsxs(p.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1,bgcolor:"rgba(211,47,47,0.08)",border:"1px solid rgba(211,47,47,0.35)",borderRadius:"10px",px:1.5,py:1.25,color:"#b3261e"},children:[n.jsx(p.Box,{component:"span",sx:{fontWeight:900,fontSize:15,lineHeight:1.4},children:"!"}),n.jsx(p.Box,{sx:{fontSize:12.5,lineHeight:1.4},children:T})]}),n.jsxs(p.Box,{sx:{display:"flex",gap:1,mt:1},children:[n.jsxs(p.Button,{size:"small",variant:"outlined",component:"label",sx:{flex:1,textTransform:"none"},children:["↑ Import",n.jsx("input",{hidden:!0,type:"file",accept:".json,application/json",onChange:Y})]}),n.jsx(p.Button,{size:"small",variant:"outlined",onClick:()=>j(q,t),sx:{flex:1,textTransform:"none"},children:"⤓ Download"}),n.jsx(p.Button,{size:"small",variant:"contained",disabled:!v(),onClick:()=>{K(S?S.name:""),z(!0)},sx:{flex:1,textTransform:"none"},children:"+ Save"})]})]}),e==="mode"&&n.jsx(p.Box,{sx:{display:"flex",gap:1},children:["light","dark"].map(C=>n.jsx(p.Button,{onClick:()=>y({mode:C}),variant:t.mode===C?"contained":"outlined",sx:{flex:1,textTransform:"capitalize"},children:C},C))})]}),n.jsxs(p.Menu,{open:!!d,anchorEl:d==null?void 0:d.el,onClose:()=>$(null),children:[n.jsx(p.MenuItem,{onClick:()=>{const C=c.find(A=>A.id===d.id);f(C),$(null)},children:"✏️ Edit"}),n.jsx(p.MenuItem,{onClick:()=>{const C=c.find(A=>A.id===d.id);J({id:C.id,name:C.name}),$(null)},children:"✎ Rename"}),n.jsx(p.MenuItem,{onClick:()=>{const C=c.find(A=>A.id===d.id);I({id:C.id,name:C.name}),$(null)},children:"🗑 Delete"}),n.jsx(p.MenuItem,{onClick:()=>{const C=c.find(A=>A.id===d.id);j(C.name,C.snap),$(null)},children:"⤓ Download"})]}),n.jsxs(p.Dialog,{open:H,onClose:()=>z(!1),children:[n.jsx(p.DialogTitle,{children:S?`Save changes to “${S.name}”`:"Save theme"}),n.jsx(p.DialogContent,{children:n.jsx(p.TextField,{autoFocus:!0,fullWidth:!0,size:"small",label:"Theme name",value:_,onChange:C=>K(C.target.value),error:!!V(_,S==null?void 0:S.id),helperText:V(_,S==null?void 0:S.id),sx:{mt:1}})}),n.jsxs(p.DialogActions,{children:[n.jsx(p.Button,{onClick:()=>z(!1),children:"Cancel"}),S&&n.jsx(p.Button,{variant:"contained",disabled:!!V(_,S.id),onClick:()=>{m(S.id,_.trim(),t),z(!1)},children:"Update"}),n.jsx(p.Button,{variant:S?"outlined":"contained",disabled:!!V(_),onClick:()=>{x(_.trim()),z(!1)},children:S?"Save as New":"Save"})]})]}),n.jsxs(p.Dialog,{open:!!U,onClose:()=>J(null),children:[n.jsx(p.DialogTitle,{children:"Rename theme"}),n.jsx(p.DialogContent,{children:n.jsx(p.TextField,{autoFocus:!0,fullWidth:!0,size:"small",label:"New name",value:(U==null?void 0:U.name)??"",onChange:C=>J(A=>A&&{...A,name:C.target.value}),error:!!(U&&V(U.name,U.id)),helperText:U?V(U.name,U.id):"",sx:{mt:1}})}),n.jsxs(p.DialogActions,{children:[n.jsx(p.Button,{onClick:()=>J(null),children:"Cancel"}),n.jsx(p.Button,{variant:"contained",disabled:!!(U&&V(U.name,U.id)),onClick:()=>{h(U.id,U.name.trim()),J(null)},children:"Rename"})]})]}),n.jsxs(p.Dialog,{open:!!P,onClose:()=>X(null),children:[n.jsx(p.DialogTitle,{children:"Theme already exists"}),n.jsx(p.DialogContent,{children:n.jsxs(p.Typography,{variant:"body2",children:["A theme named “",P==null?void 0:P.name,"” is already in My Themes. Upload it anyway as a copy?"]})}),n.jsxs(p.DialogActions,{children:[n.jsx(p.Button,{onClick:()=>{X(null),M("You’ve selected a duplicate file — it already exists.")},children:"Cancel"}),n.jsx(p.Button,{variant:"contained",onClick:()=>{u(Q(P.name),P.snap),X(null)},children:"Yes, continue"})]})]}),n.jsxs(p.Dialog,{open:!!R,onClose:()=>I(null),children:[n.jsx(p.DialogTitle,{children:"Delete theme"}),n.jsx(p.DialogContent,{children:n.jsxs(p.Typography,{variant:"body2",children:["Delete “",R==null?void 0:R.name,"”? This cannot be undone."]})}),n.jsxs(p.DialogActions,{children:[n.jsx(p.Button,{onClick:()=>I(null),children:"Cancel"}),n.jsx(p.Button,{color:"error",variant:"contained",onClick:()=>{b(R.id),I(null)},children:"Delete"})]})]})]})}function Rs({tip:e,sk:r}){return n.jsx(p.Box,{component:"span",title:e,sx:{width:13,height:13,borderRadius:"50%",border:`1.1px solid ${r.chevron}`,color:r.chevron,fontSize:8,fontWeight:800,fontStyle:"italic",fontFamily:"Georgia, serif",display:"inline-grid",placeItems:"center",flexShrink:0,cursor:"help",verticalAlign:"middle"},children:"i"})}function qe({children:e,tip:r,sk:t,mt:o}){const i=ve();return n.jsxs(p.Box,{sx:{fontSize:`${i.tCaption}px`,fontWeight:i.bwEmph,fontFamily:`${i.bodyFam},sans-serif`,color:t.label2,textTransform:"uppercase",letterSpacing:".5px",mb:"6px",mt:o?`${o}px`:0,display:"flex",alignItems:"center",gap:"5px"},children:[e,r&&n.jsx(Rs,{tip:r,sk:t})]})}function st({value:e,onChange:r,w:t=30,h:o=24,r:i=7,border:s,sk:a}){return n.jsx(p.Box,{sx:{width:t,height:o,borderRadius:`${i}px`,position:"relative",overflow:"hidden",flexShrink:0,background:e,border:s?`1px solid ${a.insetBd}`:"none"},children:n.jsx(p.Box,{component:"input",type:"color",value:e,onChange:l=>r(l.target.value),sx:{position:"absolute",top:-4,left:-4,width:t+10,height:o+10,opacity:0,cursor:"pointer",border:"none",p:0}})})}const Es=/^#[0-9a-fA-F]{6}$/;function Hs({value:e,onCommit:r,onWarnChange:t}){const[o,i]=L.useState(!1),[s,a]=L.useState(e),[l,c]=L.useState(""),g=L.useRef(void 0);L.useEffect(()=>{o||a(e)},[e,o]),L.useEffect(()=>()=>clearTimeout(g.current),[]);const f=m=>{clearTimeout(g.current),c(m),t==null||t(m),m&&(g.current=setTimeout(()=>{c(""),t==null||t("")},3e3))},x=m=>{const h=m.trim();return Es.test(h)?(f(""),r(h),!0):(f("Enter a valid hex colour, e.g. #4F6BFF"),!1)};return o?n.jsx(p.InputBase,{autoFocus:!0,value:s,title:l||void 0,onChange:m=>{a(m.target.value)},onBlur:()=>{x(s)||a(e),i(!1)},onKeyDown:m=>{m.key==="Enter"&&x(s)&&i(!1),m.key==="Escape"&&(a(e),f(""),i(!1))},sx:{color:l?"#ffcdd2":"#fff",fontSize:"12.5px",fontWeight:700,width:100,position:"relative",zIndex:1}}):n.jsxs(p.Box,{component:"span",title:l||void 0,onClick:()=>{a(e),i(!0)},sx:{color:l?"#ffcdd2":"rgba(255,255,255,.85)",fontSize:"12.5px",fontWeight:700,cursor:"text",position:"relative",zIndex:1},children:[e," · tap to change"]})}function Ps(){const[e,r]=L.useState("brand"),[t,o]=L.useState(""),i=N(v=>v.settings),s=N(v=>v.set),a=He(i.mode),l=ve(),c={fontSize:"11.5px",color:a.body,fontWeight:600},g={fontSize:`${l.tBodySm}px`,color:a.body,fontWeight:l.bodyWeightEff,fontFamily:`${l.bodyFam},sans-serif`,lineHeight:l.bodyLH},f=i.primaryHex||"#4F6BFF",x=Se(f),m=[50,100,200,300,400,500,600,700,800,900].map(v=>x[v]),h=v=>s({...v,presetId:"custom"}),b=[{key:"h1Color",label:"H1 · Page Title"},{key:"h2Color",label:"H2 · Metric"},{key:"h3Color",label:"H3 · Card Title"},{key:"h4Color",label:"H4 · Section Label"},{key:"h5Color",label:"H5 · Caption"},{key:"h6Color",label:"H6 · Overline"}],u=[{key:"successHex",label:"Success"},{key:"warningHex",label:"Warning"},{key:"infoHex",label:"Info"},{key:"errorHex",label:"Error"}],y=[{key:"cardBgHex",label:"Card background",fb:"#ffffff"},{key:"cardHdrHex",label:"Card header",fb:"#f6f8fb"},{key:"pageBgHex",label:"Page background",fb:"#f4f6f9"},{key:"notifCardHex",label:"Notification background",fb:"#ffffff"}];return n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"11px"},children:[n.jsx(tt,{active:e,onChange:r,tabs:[{key:"brand",label:"Brand",info:"Core brand colours — primary, secondary and the selection highlight colour used across the app."},{key:"text",label:"Text",info:"Heading and body text colours"},{key:"status",label:"Status",info:"Status colours & surface overrides"}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px",display:"flex",flexDirection:"column",gap:"11px"},children:[e==="brand"&&n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"11px"},children:[n.jsxs(p.Box,{children:[n.jsx(qe,{sk:a,tip:"Primary brand colour — main/filled buttons, active sidebar item, links, focus rings, first chart series, and the login Sign-in button.",children:"Brand Color"}),n.jsxs(p.Box,{sx:{position:"relative",height:46,borderRadius:"11px",background:f,overflow:"hidden",display:"flex",alignItems:"center",px:"14px",boxShadow:`0 3px 10px ${f}44`},children:[n.jsx(Hs,{value:f,onCommit:v=>h({primaryHex:v}),onWarnChange:o}),n.jsx(p.Box,{component:"input",type:"color",value:f,onChange:v=>h({primaryHex:v.target.value}),sx:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer",border:"none",p:0}})]}),n.jsx(p.Box,{sx:{display:"flex",gap:"2px",borderRadius:"7px",overflow:"hidden",height:14,mt:"7px"},children:m.map((v,E)=>n.jsx(p.Box,{sx:{flex:1,background:v}},E))}),t&&n.jsxs(p.Box,{sx:{display:"inline-flex",alignItems:"center",gap:"6px",mt:"8px",px:"10px",py:"6px",borderRadius:"8px",bgcolor:l.warnSoft,border:`1px solid ${l.warnTxt}`,color:l.warnTxt,fontSize:12,fontWeight:600},children:[n.jsx(p.Box,{component:"span",sx:{fontSize:13,lineHeight:1},children:"⚠"}),t]})]}),n.jsxs(p.Box,{children:[n.jsx(qe,{sk:a,tip:"Secondary accent — secondary/outlined buttons, switches & toggles, selected chips, and the second data series in charts.",children:"Secondary / Accent"}),n.jsx(p.Box,{sx:{position:"relative",height:34,borderRadius:"9px",background:i.secondaryHex,overflow:"hidden"},children:n.jsx(p.Box,{component:"input",type:"color",value:i.secondaryHex,onChange:v=>h({secondaryHex:v.target.value}),sx:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer",border:"none",p:0}})})]}),n.jsxs(p.Box,{children:[n.jsx(qe,{sk:a,tip:"Accent colour used to draw attention — highlight panels, featured badges, callouts. Defaults to the brand colour.",children:"Highlight Colour"}),n.jsx(p.Box,{sx:{position:"relative",height:34,borderRadius:"8px",background:i.highlightHex||"#ffd400",overflow:"hidden",border:`1px solid ${a.insetBd}`},children:n.jsx(p.Box,{component:"input",type:"color",value:i.highlightHex||"#ffd400",onChange:v=>h({highlightHex:v.target.value}),sx:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer",border:"none",p:0}})})]})]}),e==="text"&&n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"11px"},children:[n.jsx(qe,{sk:a,children:"Heading Text Colors"}),n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"9px"},children:b.map(v=>n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(st,{sk:a,border:!0,value:i[v.key]||"#1c2127",onChange:E=>s({[v.key]:E})}),n.jsx(p.Box,{component:"span",sx:g,children:v.label})]},v.key))}),n.jsx(qe,{sk:a,children:"Body Text Colors"}),n.jsxs(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"7px"},children:[n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(st,{sk:a,border:!0,value:i.textPrimaryHex||"#1c2127",onChange:v=>s({textPrimaryHex:v})}),n.jsx(p.Box,{component:"span",sx:c,title:"Main body text colour.",children:"Primary Text"})]}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(st,{sk:a,border:!0,value:i.textSecondaryHex||"#5a6573",onChange:v=>s({textSecondaryHex:v})}),n.jsx(p.Box,{component:"span",sx:c,title:"Muted text colour.",children:"Secondary Text"})]}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(st,{sk:a,border:!0,value:i.dividerHex||"#e3e8ee",onChange:v=>s({dividerHex:v})}),n.jsx(p.Box,{component:"span",sx:c,title:"Divider / border colour.",children:"Divider"})]})]})]}),e==="status"&&n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"7px"},children:[n.jsxs(p.Box,{children:[n.jsx(qe,{sk:a,tip:"Success, warning, error & info colours — used for alerts, status pills, toasts and validation states.",children:"Status Colors"}),n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"7px"},children:u.map(v=>n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"8px",background:a.card,border:`1px solid ${a.insetBd}`,borderRadius:"9px",px:"9px",py:"7px"},children:[n.jsx(st,{sk:a,w:22,h:22,r:6,value:i[v.key],onChange:E=>s({[v.key]:E})}),n.jsx(p.Box,{component:"span",sx:c,children:v.label})]},v.key))})]}),n.jsxs(p.Box,{children:[n.jsx(qe,{sk:a,tip:"Override the auto-generated surface colours. Leave on Auto to follow the surface tint & mode.",children:"Surfaces"}),n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"7px"},children:y.map(v=>{const E=!!i[v.key];return n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"8px",background:a.card,border:`1px solid ${a.insetBd}`,borderRadius:"9px",px:"9px",py:"5px"},children:[n.jsx(st,{sk:a,w:22,h:22,r:6,border:!0,value:i[v.key]||v.fb,onChange:B=>s({[v.key]:B})}),n.jsx(p.Box,{component:"span",sx:{...c,flex:1},children:v.label}),E&&n.jsx(p.Box,{component:"button",title:"Reset to Auto",onClick:()=>s({[v.key]:""}),sx:{background:"transparent",border:`1px solid ${a.insetBd}`,borderRadius:"6px",color:a.muted,fontSize:"10px",fontWeight:700,px:"7px",py:"3px",cursor:"pointer"},children:"Auto"})]},v.key)})})]})]})]})]})}function ge(e){const{label:r,info:t,value:o,effective:i,min:s,max:a,step:l=1,unit:c="",autoLabel:g,autoValue:f=0,softMin:x,softMax:m,floorValue:h,floorReset:b,floorMessage:u,extra:y,onChange:v}=e,E=He(N(K=>K.settings.mode)),B=ve(),S=`${B.bodyFam},sans-serif`,[j,T]=L.useState(!1),[M,P]=L.useState(String(i)),[X,Q]=L.useState(""),Y=L.useRef(void 0);L.useEffect(()=>{j||P(String(i))},[i,j]),L.useEffect(()=>()=>clearTimeout(Y.current),[]);const d=K=>{clearTimeout(Y.current),Q(K),K&&(Y.current=setTimeout(()=>Q(""),3e3))},$=K=>x!=null&&K<x?`Below ${x}${c} may break the UI`:m!=null&&K>m?`Above ${m}${c} may break the UI`:"",H=()=>{d(u??`Minimum is ${b}${c} — reset`),v(b),P(String(b))},z=K=>{const U=parseFloat(K);if(isNaN(U)){d("Enter a number"),P(String(i));return}if(h!=null&&b!=null&&U<=h){H();return}const J=Math.min(a,Math.max(s,U));d(J!==U?`Must be between ${s}${c} and ${a}${c} — clamped to ${J}${c}`:$(J)),P(String(J)),v(J)},_=o===f&&g?g:`${i}${c}`;return n.jsxs(p.Box,{sx:{mb:1.5},children:[n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:"8px"},children:[n.jsxs(p.Typography,{sx:{fontSize:`${B.tBodySm}px`,fontWeight:B.bwEmph,fontFamily:S,lineHeight:B.bodyLH,color:E.label2,display:"flex",alignItems:"center",gap:"5px"},children:[r,t&&n.jsx(p.Tooltip,{title:t,arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.Box,{component:"span",sx:{width:13,height:13,borderRadius:"50%",border:`1.1px solid ${E.chevron}`,color:E.chevron,fontSize:8,fontWeight:800,fontStyle:"italic",fontFamily:"Georgia, serif",display:"inline-grid",placeItems:"center",cursor:"help"},children:"i"})})]}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"5px",flexShrink:0},children:[j?n.jsx(p.InputBase,{autoFocus:!0,value:M,onChange:K=>P(K.target.value),onBlur:()=>{z(M),T(!1)},onKeyDown:K=>{K.key==="Enter"&&(z(M),T(!1)),K.key==="Escape"&&T(!1)},sx:{width:56,fontSize:`${B.tBodySm}px`,fontWeight:700,fontFamily:S,border:"1.5px solid",borderColor:"primary.main",borderRadius:"6px",px:"6px",py:"3px","& input":{p:0,textAlign:"center"}}}):n.jsxs(p.Box,{component:"button",onClick:()=>{P(String(i)),T(!0)},sx:{display:"inline-flex",alignItems:"center",gap:"5px",fontFamily:S,fontSize:`${B.tBodySm}px`,fontWeight:800,color:E.body,bgcolor:"rgba(130,140,155,0.14)",border:"1px solid rgba(130,140,155,0.28)",borderRadius:"6px",px:"7px",py:"2px",cursor:"pointer",lineHeight:1.3,"&:hover":{bgcolor:"rgba(130,140,155,0.24)"}},children:[_,n.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"block",flexShrink:0},children:[n.jsx("path",{d:"M12 20h9"}),n.jsx("path",{d:"M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z"})]})]}),y]})]}),n.jsx(p.Box,{component:"input",type:"range",min:s,max:a,step:l,value:i,onChange:K=>{const U=parseFloat(K.target.value);if(h!=null&&b!=null&&U<=h){H();return}d($(U)),v(U)},sx:{WebkitAppearance:"none",appearance:"none",width:"100%",height:"4px",m:0,p:0,display:"block",borderRadius:"2px",outline:"none",cursor:"pointer",background:"#dde3ea",accentColor:"primary.main","&::-webkit-slider-thumb":{WebkitAppearance:"none",width:18,height:18,borderRadius:"50%",background:"#fff",cursor:"pointer",boxShadow:"0 1px 4px rgba(0,0,0,.25),0 0 0 1px rgba(0,0,0,.05)"},"&::-moz-range-thumb":{width:18,height:18,border:"none",borderRadius:"50%",background:"#fff",cursor:"pointer",boxShadow:"0 1px 4px rgba(0,0,0,.25),0 0 0 1px rgba(0,0,0,.05)"}}}),X&&n.jsxs(p.Box,{sx:{display:"inline-flex",alignItems:"center",gap:"6px",mt:"8px",px:"10px",py:"6px",borderRadius:"8px",bgcolor:B.warnSoft,border:`1px solid ${B.warnTxt}`,color:B.warnTxt,fontSize:12,fontWeight:600},children:[n.jsx(p.Box,{component:"span",sx:{fontSize:13,lineHeight:1},children:"⚠"}),X]})]})}const xn=new Set;function Vn(e,r){if(xn.has(e))return;xn.add(e);const t=document.createElement("style");t.textContent=`@font-face{font-family:'${e}';src:url('${r}');font-display:swap;}`,document.head.appendChild(t)}function mn(e){e.forEach(r=>Vn(r.name,r.dataUrl))}const $s=[{key:"Roboto",label:"Roboto",sub:"Material"},{key:"Inter",label:"Inter",sub:"Enterprise"},{key:"DM Sans",label:"DM Sans",sub:"Modern"},{key:"Manrope",label:"Manrope",sub:"Geometric"},{key:"Plus Jakarta Sans",label:"Jakarta",sub:"Friendly"},{key:"Nunito Sans",label:"Nunito",sub:"Rounded"}],As=[{key:"Figtree",label:"Google Sans"},{key:"Roboto",label:"Roboto"},{key:"Inter",label:"Inter"},{key:"Arial",label:"Arial"},{key:"Manrope",label:"Manrope"},{key:"Plus Jakarta Sans",label:"Jakarta"}];function Et({label:e,fam:r,active:t,onClick:o}){const i=N(f=>f.settings.mode),s=N(f=>f.settings.primaryHex)||"#4F6BFF",a=N(f=>f.settings.highlightHex)||"#ffd400",l=i==="dark",c=Se(s),g=ce(a,l?.3:.18);return n.jsx(p.Box,{onClick:o,sx:{py:"17px",px:"4px",borderRadius:"10px",textAlign:"center",cursor:"pointer",border:`1px solid ${t?l?c[400]:s:l?"#363d48":"#e3e8ee"}`,bgcolor:t?g:l?"#262b34":"#ffffff",transition:"all .14s ease","&:hover":t?{}:{borderColor:l?"#4a5361":"#c9d0d9"}},children:n.jsx(p.Box,{sx:{fontFamily:`${r}, sans-serif`,fontSize:13,fontWeight:700,lineHeight:1,color:t?l?c[200]:c[700]:l?"#aeb6c0":"#5a6573"},children:e})})}const Is=["woff2","woff","ttf","otf"],Os=10*1024*1024,Ds=e=>new Promise((r,t)=>{const o=new FileReader;o.onload=()=>r(o.result),o.onerror=()=>t(o.error),o.readAsDataURL(e)}),Fs=e=>new Promise(r=>{const t=setTimeout(()=>r(!1),5e3),o=new FileReader;o.onload=()=>{var a;clearTimeout(t);const i=new Uint8Array(o.result),s=((a=e.name.split(".").pop())==null?void 0:a.toLowerCase())||"";if(s==="woff2"&&i[0]===119&&i[1]===79&&i[2]===70&&i[3]===50||s==="woff"&&i[0]===119&&i[1]===79&&i[2]===70&&i[3]===70||s==="otf"&&i[0]===79&&i[1]===84&&i[2]===84&&i[3]===79||s==="ttf"&&i[0]===0&&i[1]===1&&i[2]===0&&i[3]===0||s==="ttf"&&i[0]===79&&i[1]===84&&i[2]===84&&i[3]===79)return r(!0);r(!1)},o.onerror=()=>{clearTimeout(t),r(!1)};try{o.readAsArrayBuffer(e.slice(0,4))}catch{clearTimeout(t),r(!1)}});function yn({label:e,list:r,onAdd:t}){const o=He(N(f=>f.settings.mode)),i=ve(),[s,a]=L.useState(""),l=L.useRef(void 0);L.useEffect(()=>()=>clearTimeout(l.current),[]);const c=f=>{clearTimeout(l.current),a(f),f&&(l.current=setTimeout(()=>a(""),3e3))},g=async f=>{var E;const x=Array.from(f.target.files??[]);if(f.target.value="",!x.length)return;const m=[],h=[],b=[],u=[],y=[];for(const B of x){const S=((E=B.name.split(".").pop())==null?void 0:E.toLowerCase())||"";if(!Is.includes(S)){b.push(B.name);continue}if(B.size>Os){u.push(B.name);continue}if(!await Fs(B)){y.push(B.name);continue}const j=B.name.replace(/\.[^.]+$/,""),T=P=>P.toLowerCase()===j.toLowerCase();if(r.some(P=>T(P.name))||m.some(P=>T(P.name))){h.push(j);continue}const M=await Ds(B);Vn(j,M),m.push({name:j,dataUrl:M})}m.length&&t(m);const v=[];h.length&&v.push(`Already added: ${h.join(", ")}`),b.length&&v.push(`Unsupported file type: ${b.join(", ")}`),u.length&&v.push(`Too large (max 10MB): ${u.join(", ")}`),y.length&&v.push(`Invalid font file: ${y.join(", ")}`),c(v.join(" · "))};return n.jsxs(p.Box,{sx:{mt:1.5},children:[n.jsxs(p.Box,{component:"label",sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:.75,bgcolor:o.inset,border:`1.5px dashed ${o.insetBd}`,borderRadius:"9px",p:1.5,cursor:"pointer",color:o.body,fontSize:11.5,fontWeight:600,fontFamily:`${i.bodyFam},sans-serif`,textAlign:"center"},children:["⬆ ",e,n.jsx(p.Box,{component:"span",sx:{color:o.muted},children:".woff2 / .ttf / .otf"}),n.jsx("input",{type:"file",accept:".woff2,.woff,.ttf,.otf",multiple:!0,onChange:g,style:{display:"none"}})]}),s&&n.jsxs(p.Box,{sx:{mt:.9,display:"flex",alignItems:"center",gap:.9,bgcolor:"error.main",borderRadius:2,px:1.4,py:.9,color:"error.contrastText",fontFamily:`${i.bodyFam},sans-serif`},children:[n.jsx(p.Box,{component:"span",sx:{fontWeight:900,fontSize:12},children:"✕"}),n.jsx(p.Box,{component:"span",sx:{fontSize:11.5},children:s})]})]})}const Ms={compact:1.15,default:1.25,airy:1.414};function Ws(){const e=N(f=>f.settings),r=N(f=>f.set),t=He(e.mode),o=ve(),[i,s]=L.useState(!1),a=e.scaleRatioCustom>0?e.scaleRatioCustom:Ms[e.scaleRatio]??1.25,[l,c]=L.useState(a.toFixed(2));L.useEffect(()=>{i||c(a.toFixed(2))},[a,i]);const g=()=>{const f=parseFloat(l);isNaN(f)||r({scaleRatioCustom:f}),s(!1)};return i?n.jsx(p.InputBase,{autoFocus:!0,value:l,onChange:f=>c(f.target.value),onBlur:g,onKeyDown:f=>{f.key==="Enter"&&g(),f.key==="Escape"&&s(!1)},sx:{width:56,fontSize:"11.5px",fontWeight:700,fontFamily:`${o.bodyFam},sans-serif`,border:"1.5px solid",borderColor:"primary.main",borderRadius:"6px",px:"6px",py:"3px","& input":{p:0,textAlign:"center"}}}):n.jsx(p.Box,{component:"button",title:"Configure scale ratio — each heading is the one above ÷ this value",onClick:()=>{c(a.toFixed(2)),s(!0)},sx:{display:"inline-grid",placeItems:"center",color:t.body,bgcolor:"rgba(130,140,155,0.14)",border:"1px solid rgba(130,140,155,0.28)",borderRadius:"6px",px:"6px",py:"3px",cursor:"pointer",fontFamily:`${o.bodyFam},sans-serif`,"&:hover":{bgcolor:"rgba(130,140,155,0.24)"}},children:n.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"block"},children:[n.jsx("circle",{cx:"12",cy:"12",r:"3"}),n.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]})})}function zs(){const[e,r]=L.useState("bodyFont"),t=N(i=>i.settings),o=N(i=>i.set);return n.jsxs(n.Fragment,{children:[n.jsx(tt,{active:e,onChange:r,tabs:[{key:"bodyFont",label:"Body Font",info:"Typeface used for body / paragraph text (headings use the Heading Font)"},{key:"headFont",label:"Heading Font",info:"Choose a separate typeface for headings (or match the body font)"},{key:"headText",label:"Heading Text",info:"Fine-tune size & weight per heading level (H1–H4)"},{key:"bodyText",label:"Body Text",info:"Adjust base font size and line height for body copy"}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="bodyFont"&&n.jsxs(n.Fragment,{children:[n.jsxs(p.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:"10px"},children:[$s.map(i=>n.jsx(Et,{label:i.label,sub:i.sub,fam:i.key,active:t.fontFamily===i.key,onClick:()=>o({fontFamily:i.key})},i.key)),t.customFonts.map(i=>n.jsx(Et,{label:i.name,sub:"Custom",fam:i.name,active:t.fontFamily===i.name,onClick:()=>o({fontFamily:i.name})},i.name))]}),n.jsx(yn,{label:"Upload custom font",list:t.customFonts,onAdd:i=>o({customFonts:[...i,...t.customFonts],fontFamily:i[0].name})})]}),e==="headFont"&&n.jsxs(n.Fragment,{children:[n.jsxs(p.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:"10px"},children:[As.map(i=>n.jsx(Et,{label:i.label,fam:i.key,active:t.headingFont===i.key,onClick:()=>o({headingFont:i.key})},i.key)),t.customHeadFonts.map(i=>n.jsx(Et,{label:i.name,sub:"Custom",fam:i.name,active:t.headingFont===i.name,onClick:()=>o({headingFont:i.name})},i.name))]}),n.jsx(yn,{label:"Upload heading font",list:t.customHeadFonts,onAdd:i=>o({customHeadFonts:[...i,...t.customHeadFonts],headingFont:i[0].name})})]}),e==="headText"&&n.jsxs(n.Fragment,{children:[n.jsx(ge,{label:"H1 size",info:"All heading levels scale from H1 by a modular ratio (configurable via the gear icon).",value:t.h1Size,effective:t.h1Size||20,min:18,max:56,unit:"px",extra:n.jsx(Ws,{}),onChange:i=>o({h1Size:i})}),n.jsx(ge,{label:"Weight (all headings)",value:t.headingWeight,effective:t.headingWeight,min:300,max:900,step:100,onChange:i=>o({headingWeight:i})}),n.jsx(ge,{label:"Line height (all headings)",value:t.headingLH,effective:t.headingLH||1.2,min:.9,max:2,step:.05,autoLabel:"Auto (1.20)",onChange:i=>o({headingLH:i})})]}),e==="bodyText"&&n.jsxs(n.Fragment,{children:[n.jsx(ge,{label:"Base font size",info:"Root body text size.",value:t.baseFontPx,effective:t.baseFontPx||12,min:9,max:20,unit:"px",softMin:9,onChange:i=>o({baseFontPx:i})}),n.jsx(ge,{label:"Body weight",value:t.bodyWeight,effective:t.bodyWeight||400,min:300,max:900,step:100,autoLabel:"Auto (400)",onChange:i=>o({bodyWeight:i})}),n.jsx(ge,{label:"Body line height",value:t.bodyLineHeight,effective:t.bodyLineHeight||1.5,min:1.2,max:2,step:.05,autoLabel:"Auto (1.50)",onChange:i=>o({bodyLineHeight:i})})]})]})]})}function je({options:e,value:r,columns:t=3,onChange:o}){const i=N(v=>v.settings.mode),s=N(v=>v.settings.primaryHex)||"#4F6BFF",a=N(v=>v.settings.highlightHex)||"#ffd400",l=i==="dark",c=Se(s),g=ve(),f=`${g.bodyFam},sans-serif`,x=ce(a,l?.3:.18),m=l?c[400]:s,h=l?c[200]:c[700],b=l?"#262b34":"#ffffff",u=l?"#363d48":"#e3e8ee",y=l?"#aeb6c0":"#5a6573";return n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:`repeat(${t}, 1fr)`,gap:"6px"},children:e.map(v=>{const E=v.key===r,B=n.jsx(p.Box,{onClick:()=>o(v.key),sx:{py:"9px",px:"4px",borderRadius:"10px",textAlign:"center",cursor:"pointer",userSelect:"none",fontSize:`${g.tCaption}px`,fontWeight:E?g.bwEmph:g.bodyWeightEff,fontFamily:f,border:`1px solid ${E?m:u}`,bgcolor:E?x:b,color:E?h:y,transition:"color .14s ease, background .14s ease, border-color .14s ease","&:hover":E?{}:{borderColor:l?"#4a5361":"#c9d0d9"}},children:v.label},v.key);return v.info?n.jsx(p.Tooltip,{title:v.info,arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:B},v.key):B})})}const Ht={outlined:0,soft:6,floating:24},Pt={plain:0,tinted:40,accent:60},_s={bordered:0,recessed:6,lighter:4};function Ls(){const[e,r]=L.useState("style"),t=N(c=>c.settings),o=N(c=>c.set),i=t.cardShadowPx>=0?t.cardShadowPx:Ht[t.cardStyle]??24,s=t.headerStrength>=0?t.headerStrength:Pt[t.cardHeader]??45,a=t.nestedDepth>=0?t.nestedDepth:_s[t.nestedStyle]??6,l=t.tintIntensity>=0?t.tintIntensity:100;return n.jsxs(n.Fragment,{children:[n.jsx(tt,{active:e,onChange:r,tabs:[{key:"style",label:"Style",info:"Card border vs shadow depth."},{key:"header",label:"Header",info:"Card header treatment."},{key:"nested",label:"Nested",info:"How cards-within-cards look."},{key:"tint",label:"Tint",info:"Overall surface tint colour & strength."}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="style"&&n.jsxs(n.Fragment,{children:[n.jsx(je,{value:t.cardStyle,onChange:c=>{const g=c;o({cardStyle:g,cardShadowPx:Ht[g]})},options:[{key:"outlined",label:"Outlined"},{key:"soft",label:"Soft"},{key:"floating",label:"Floating"}]}),n.jsx(p.Box,{sx:{mt:1.5},children:n.jsx(ge,{label:"Shadow depth",info:"Card elevation (px).",value:t.cardShadowPx,effective:i,min:0,max:32,unit:"px",autoValue:-1,autoLabel:`Auto (${i}px)`,softMin:t.cardStyle==="outlined"?void 0:1,softMax:32,floorValue:t.cardStyle==="outlined"?void 0:0,floorReset:Ht[t.cardStyle],floorMessage:`${t.cardStyle==="soft"?"Soft":"Floating"} cards need shadow - reset to ${Ht[t.cardStyle]}px`,onChange:c=>o({cardShadowPx:c})})})]}),e==="header"&&n.jsxs(n.Fragment,{children:[n.jsx(je,{value:t.cardHeader,onChange:c=>{const g=c;o({cardHeader:g,headerStrength:Pt[g]})},options:[{key:"plain",label:"Plain"},{key:"tinted",label:"Tinted"},{key:"accent",label:"Accent"}]}),n.jsx(p.Box,{sx:{mt:1.5},children:n.jsx(ge,{label:"Header strength",info:"Header tint / accent intensity.",value:t.headerStrength,effective:s,min:0,max:100,unit:"%",autoValue:-1,autoLabel:`Auto (${s}%)`,softMin:t.cardHeader==="plain"?void 0:1,floorValue:t.cardHeader==="plain"?void 0:0,floorReset:Pt[t.cardHeader],floorMessage:`${t.cardHeader==="tinted"?"Tinted":"Accent"} headers need strength - reset to ${Pt[t.cardHeader]}%`,onChange:c=>o({headerStrength:c})})})]}),e==="nested"&&n.jsxs(n.Fragment,{children:[n.jsx(je,{value:t.nestedStyle,onChange:c=>o({nestedStyle:c}),options:[{key:"recessed",label:"Recessed"},{key:"lighter",label:"Lighter"},{key:"bordered",label:"Bordered"}]}),n.jsx(p.Box,{sx:{mt:1.5},children:n.jsx(ge,{label:"Nested depth",info:"Inset depth of cards-within-cards.",value:t.nestedDepth,effective:a,min:0,max:24,unit:"px",autoValue:-1,autoLabel:`Auto (${a}px)`,onChange:c=>o({nestedDepth:c})})})]}),e==="tint"&&n.jsxs(n.Fragment,{children:[n.jsx(je,{value:t.surfaceTint,onChange:c=>o({surfaceTint:c}),options:[{key:"snow",label:"None"},{key:"neutral",label:"Low"},{key:"brand",label:"High"}]}),n.jsx(p.Box,{sx:{mt:1.5},children:n.jsx(ge,{label:"Tint intensity",info:"Strength of the page surface tint.",value:t.tintIntensity,effective:l,min:0,max:100,unit:"%",autoValue:-1,autoLabel:`Auto (${l}%)`,onChange:c=>o({tintIntensity:c})})})]})]})]})}function Ns(){const[e,r]=L.useState("rows"),t=N(i=>i.settings),o=N(i=>i.set);return n.jsxs(n.Fragment,{children:[n.jsx(tt,{active:e,onChange:r,tabs:[{key:"rows",label:"Rows",info:"Row density & dividers."},{key:"cols",label:"Columns",info:"Column density & dividers."},{key:"cells",label:"Cells",info:"Cell text & vertical alignment."},{key:"styling",label:"Styling",info:"Header background & row striping."}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="rows"&&n.jsxs(n.Fragment,{children:[n.jsx(je,{value:t.tableDensity,onChange:i=>o({tableDensity:i}),options:[{key:"compact",label:"Compact"},{key:"default",label:"Default"},{key:"comfortable",label:"Comfortable"}]}),n.jsx(p.FormControlLabel,{sx:{mt:1},control:n.jsx(p.Switch,{checked:t.tableDividers,onChange:i=>o({tableDividers:i.target.checked})}),label:"Row dividers"}),t.tableDividers&&n.jsx(ge,{label:"Divider width",value:t.tableRowDivW,effective:t.tableRowDivW,min:1,max:4,unit:"px",onChange:i=>o({tableRowDivW:i})})]}),e==="cols"&&n.jsxs(n.Fragment,{children:[n.jsx(je,{value:t.tableColDensity,onChange:i=>o({tableColDensity:i}),options:[{key:"compact",label:"Compact"},{key:"default",label:"Default"},{key:"comfortable",label:"Comfortable"}]}),n.jsx(p.FormControlLabel,{sx:{mt:1},control:n.jsx(p.Switch,{checked:t.tableColDividers,onChange:i=>o({tableColDividers:i.target.checked})}),label:"Column dividers"}),t.tableColDividers&&n.jsx(ge,{label:"Divider width",value:t.tableColDivW,effective:t.tableColDivW,min:1,max:4,unit:"px",onChange:i=>o({tableColDivW:i})})]}),e==="cells"&&n.jsxs(n.Fragment,{children:[n.jsx(je,{value:t.tableCellAlignH,onChange:i=>o({tableCellAlignH:i}),options:[{key:"left",label:"Left"},{key:"center",label:"Center"},{key:"right",label:"Right"}]}),n.jsx(p.Box,{sx:{mt:1},children:n.jsx(je,{value:t.tableCellAlignV,onChange:i=>o({tableCellAlignV:i}),options:[{key:"top",label:"Top"},{key:"middle",label:"Middle"},{key:"bottom",label:"Bottom"}]})})]}),e==="styling"&&n.jsxs(n.Fragment,{children:[n.jsx(je,{value:t.tableHeaderStyle,onChange:i=>o({tableHeaderStyle:i}),options:[{key:"plain",label:"Plain"},{key:"tinted",label:"Tinted"},{key:"accent",label:"Accent"}]}),n.jsx(p.FormControlLabel,{sx:{mt:1},control:n.jsx(p.Switch,{checked:t.tableStripe,onChange:i=>o({tableStripe:i.target.checked})}),label:"Striped rows"})]})]})]})}const ur={compact:.82,default:1,comfortable:1.16};function Vs(){const[e,r]=L.useState("shape"),t=N(c=>c.settings),o=N(c=>c.set),i=He(t.mode),s=t.densityScale>0?t.densityScale:Math.round((ur[t.density]??1)*100),a=t.cardGapPx>0?t.cardGapPx:Math.round(16*(ur[t.density]??1)),l=t.containerPadPx>0?t.containerPadPx:Math.round(10*(ur[t.density]??1));return n.jsxs(n.Fragment,{children:[n.jsx(tt,{active:e,onChange:r,tabs:[{key:"shape",label:"Shape",info:"Corner radius & layout density."},{key:"effects",label:"Effects",info:"Spacing, button case & status chips."}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="shape"&&n.jsxs(n.Fragment,{children:[n.jsx(p.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2,textTransform:"uppercase",letterSpacing:".6px",display:"block",mb:.75},children:"Corner Radius"}),n.jsx(je,{value:t.radiusPreset,onChange:c=>o({radiusPreset:c,radiusVal:c==="sharp"?0:c==="round"?18:9}),options:[{key:"sharp",label:"Sharp"},{key:"rounded",label:"Rounded"},{key:"round",label:"Round"}]}),n.jsx(p.Box,{sx:{mt:1.25},children:n.jsx(ge,{label:"Exact radius",value:t.radiusVal,effective:t.radiusVal,min:0,max:28,unit:"px",onChange:c=>o({radiusVal:c,radiusPreset:"rounded"})})}),n.jsx(p.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2,textTransform:"uppercase",letterSpacing:".6px",display:"block",mb:.75,mt:.5},children:"Density"}),n.jsx(je,{value:t.densityScale>0?"":t.density,onChange:c=>o({density:c,densityScale:0}),options:[{key:"compact",label:"Compact"},{key:"default",label:"Default"},{key:"comfortable",label:"Comfortable"}]}),n.jsx(p.Box,{sx:{mt:1.25},children:n.jsx(ge,{label:"Exact density",info:"Fine-tune spacing scale (%).",value:t.densityScale,effective:s,min:60,max:140,unit:"%",onChange:c=>o({densityScale:c})})})]}),e==="effects"&&n.jsxs(n.Fragment,{children:[n.jsx(ge,{label:"Card-to-card gap",value:t.cardGapPx,effective:a,min:0,max:40,step:2,unit:"px",autoLabel:`Auto (${a}px)`,onChange:c=>o({cardGapPx:c})}),n.jsx(ge,{label:"Container padding",value:t.containerPadPx,effective:l,min:0,max:40,step:2,unit:"px",autoLabel:`Auto (${l}px)`,onChange:c=>o({containerPadPx:c})}),n.jsx(ge,{label:"Edge gap",info:"Space between the preview frame and the outer app card.",value:t.edgePadPx,effective:t.edgePadPx,min:0,max:40,step:2,unit:"px",autoLabel:"0px (flush)",onChange:c=>o({edgePadPx:c})}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mt:1},children:[n.jsx(p.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2},children:"Uppercase button labels"}),n.jsx(p.Switch,{size:"small",checked:t.btnCase==="upper",onChange:c=>o({btnCase:c.target.checked?"upper":"none"})})]}),n.jsxs(p.Box,{sx:{mt:1.25},children:[n.jsx(p.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2,textTransform:"uppercase",letterSpacing:".6px",display:"block",mb:.75},children:"Status Chips"}),n.jsx(je,{columns:2,value:t.statusBold?"bold":"soft",onChange:c=>o({statusBold:c==="bold"}),options:[{key:"soft",label:"Soft"},{key:"bold",label:"Bold"}]})]})]})]})]})}function Us(){const[e,r]=L.useState("placement"),t=N(i=>i.settings),o=N(i=>i.set);return n.jsxs(n.Fragment,{children:[n.jsx(tt,{active:e,onChange:r,tabs:[{key:"placement",label:"Placement",info:"Where toasts appear."},{key:"behaviour",label:"Behaviour",info:"Width & auto-dismiss."}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="placement"&&n.jsx(je,{columns:2,value:t.notifPosition,onChange:i=>o({notifPosition:i}),options:[{key:"top-center",label:"Top Center"},{key:"top-right",label:"Top Right"},{key:"bottom-left",label:"Bottom Left"},{key:"bottom-right",label:"Bottom Right"}]}),e==="behaviour"&&n.jsxs(n.Fragment,{children:[n.jsx(ge,{label:"Toast width",value:t.toastW,effective:t.toastW||252,min:200,max:500,unit:"px",softMax:500,onChange:i=>o({toastW:i})}),n.jsx(p.FormControlLabel,{sx:{mt:.5},control:n.jsx(p.Switch,{checked:t.notifBadge,onChange:i=>o({notifBadge:i.target.checked})}),label:"Show unread badge"}),n.jsx(p.FormControlLabel,{sx:{mt:.5,display:"flex"},control:n.jsx(p.Switch,{checked:t.notifAutoDismiss,onChange:i=>o({notifAutoDismiss:i.target.checked})}),label:"Auto-dismiss toasts"}),t.notifAutoDismiss&&n.jsx(ge,{label:"Dismiss after",value:t.autoDismissSec,effective:t.autoDismissSec||5,min:5,max:30,unit:"s",onChange:i=>o({autoDismissSec:i})})]})]})]})}function Gs({label:e,info:r,value:t,fallback:o,onChange:i,onReset:s}){const a=He(N(f=>f.settings.mode)),[l,c]=L.useState(null),g=t||o;return n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1,py:.5},children:[n.jsx(p.Box,{onClick:f=>c(f.currentTarget),sx:{width:22,height:22,borderRadius:1.5,border:`1px solid ${a.insetBd}`,bgcolor:g,cursor:"pointer",flexShrink:0}}),n.jsxs(p.Typography,{variant:"caption",sx:{flex:1,color:a.body,display:"flex",alignItems:"center",gap:.5},children:[e,r&&n.jsx(p.Tooltip,{title:r,arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.Box,{component:"span",sx:{width:13,height:13,borderRadius:"50%",border:`1.1px solid ${a.chevron}`,color:a.chevron,fontSize:8,fontWeight:800,fontStyle:"italic",fontFamily:"Georgia, serif",display:"inline-grid",placeItems:"center",cursor:"help"},children:"i"})})]}),t&&s&&n.jsx(p.Box,{component:"span",onClick:s,title:"Reset to theme default",sx:{fontSize:13,color:a.muted,cursor:"pointer"},children:"↺"}),n.jsx(p.Popover,{open:!!l,anchorEl:l,onClose:()=>c(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},children:n.jsx(p.Box,{sx:{p:1},children:n.jsx("input",{type:"color",value:g,onChange:f=>i(f.target.value),style:{width:160,height:40,border:"none",background:"none"}})})})]})}function Ys({src:e,aspect:r,onCancel:t,onConfirm:o}){const[i,s]=L.useState(1),[a,l]=L.useState({x:0,y:0}),c=L.useRef(null),g=L.useRef(null),f=L.useRef(null),x=L.useRef(null);L.useEffect(()=>{const b=y=>{x.current&&l({x:x.current.ox+(y.clientX-x.current.sx),y:x.current.oy+(y.clientY-x.current.sy)})},u=()=>{x.current=null};return document.addEventListener("pointermove",b),document.addEventListener("pointerup",u),()=>{document.removeEventListener("pointermove",b),document.removeEventListener("pointerup",u)}},[]);const m=b=>{b.preventDefault(),x.current={sx:b.clientX,sy:b.clientY,ox:a.x,oy:a.y}},h=()=>{const b=c.current,u=g.current,y=f.current;if(!b||!u){o(e);return}const v=(y||b).getBoundingClientRect(),E=1e3,B=Math.round(E*r),S=B/v.width,j=document.createElement("canvas");j.width=B,j.height=E;const T=j.getContext("2d");if(!T){o(e);return}const M=u.getBoundingClientRect(),P=(M.left-v.left)*S,X=(M.top-v.top)*S,Q=M.width*S,Y=M.height*S;try{T.drawImage(u,P,X,Q,Y),o(j.toDataURL("image/png"))}catch{o(e)}};return Io.createPortal(n.jsx(p.Box,{sx:{position:"fixed",inset:0,zIndex:1400,bgcolor:"rgba(15,23,42,.6)",display:"flex",alignItems:"center",justifyContent:"center",p:2.25,overflow:"auto"},children:n.jsxs(p.Box,{sx:{width:"100%",maxWidth:320,bgcolor:"background.paper",border:"1px solid",borderColor:"divider",borderRadius:3,boxShadow:"0 20px 50px rgba(15,23,42,.4)",p:2},children:[n.jsx(p.Typography,{sx:{fontSize:14,fontWeight:800,mb:.5},children:"Adjust brand image"}),n.jsx(p.Typography,{sx:{fontSize:11.5,color:"text.secondary",mb:1.5,lineHeight:1.45},children:"Drag and zoom to fit your image inside the bright frame. Anything in the dimmed area is cropped out."}),n.jsxs(p.Box,{ref:c,onPointerDown:m,sx:{position:"relative",width:"100%",aspectRatio:"1.55",borderRadius:2.5,overflow:"hidden",bgcolor:"#e9edf2",cursor:"grab",touchAction:"none",display:"grid",placeItems:"center","&:active":{cursor:"grabbing"}},children:[n.jsx("img",{ref:g,src:e,alt:"",draggable:!1,style:{position:"absolute",left:"50%",top:"50%",transform:`translate(-50%,-50%) translate(${a.x}px,${a.y}px) scale(${i})`,transformOrigin:"center",maxWidth:"100%",maxHeight:"100%",width:"auto",height:"auto",userSelect:"none",pointerEvents:"none"}}),n.jsx(p.Box,{ref:f,sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"72%",aspectRatio:String(r),maxWidth:"90%",boxShadow:"0 0 0 9999px rgba(10,15,25,.62)",border:"2px solid #fff",borderRadius:"3px",pointerEvents:"none"}})]}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1,my:1.5},children:[n.jsx(p.Typography,{sx:{fontSize:12,fontWeight:700,color:"text.secondary"},children:"Zoom"}),n.jsx(p.Slider,{size:"small",min:.3,max:4,step:.02,value:i,onChange:(b,u)=>s(u)})]}),n.jsxs(p.Box,{sx:{display:"flex",gap:1},children:[n.jsx(p.Box,{component:"button",onClick:t,sx:{flex:1,p:1.25,borderRadius:2.5,border:"1px solid",borderColor:"divider",bgcolor:"action.hover",color:"text.secondary",fontSize:12.5,fontWeight:700,cursor:"pointer"},children:"Cancel"}),n.jsx(p.Box,{component:"button",onClick:h,sx:{flex:1,p:1.25,borderRadius:2.5,border:"none",bgcolor:"primary.main",color:"primary.contrastText",fontSize:12.5,fontWeight:700,cursor:"pointer"},children:"Confirm"})]})]})}),document.body)}function Js(){const e=N(f=>f.settings),r=N(f=>f.set),t=He(e.mode),[o,i]=L.useState(null),s=(f,x)=>{var b;const m=(b=f.target.files)==null?void 0:b[0];if(!m)return;const h=new FileReader;h.onload=()=>i({src:h.result,aspect:x==="logoUrl"?3.5:1.55,target:x}),h.readAsDataURL(m),f.target.value=""},a=f=>{o&&(o.target==="logoUrl"?r({logoUrl:f,logoMode:"image"}):r({loginImage:f}),i(null))},l={fontSize:11,fontWeight:700,textTransform:"uppercase",letterSpacing:".6px"},c={display:"flex",alignItems:"center",justifyContent:"center",gap:1,border:`1.5px dashed ${t.insetBd}`,borderRadius:2.5,p:1.75,cursor:"pointer",color:t.body,fontSize:12.5,fontWeight:600,bgcolor:t.inset},g=(f,x)=>n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1,mt:1,p:.9,bgcolor:t.inset,border:`1px solid ${t.insetBd}`,borderRadius:2},children:[n.jsx(p.Typography,{variant:"caption",sx:{flex:1,minWidth:0,color:t.body,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f}),n.jsx(p.Box,{component:"button",onClick:x,title:"Remove",sx:{border:"none",background:"transparent",color:t.muted,cursor:"pointer",fontSize:14},children:"✕"})]});return n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1.75},children:[n.jsxs(p.Box,{children:[n.jsx(p.Typography,{variant:"caption",sx:{...l,color:t.label2,display:"block",mb:1},children:"Brand Image"}),n.jsxs(p.Box,{component:"label",sx:c,children:["⬆ Choose image",n.jsx("input",{hidden:!0,type:"file",accept:"image/*",onChange:f=>s(f,"loginImage")})]}),e.loginImage&&g("Uploaded image",()=>r({loginImage:""}))]}),n.jsxs(p.Box,{children:[n.jsx(p.Typography,{variant:"caption",sx:{...l,color:t.label2,display:"block",mb:1},children:"Logo"}),n.jsxs(p.Box,{component:"label",sx:c,children:["⬆ Choose logo file",n.jsx("input",{hidden:!0,type:"file",accept:"image/png,image/svg+xml,image/webp",onChange:f=>s(f,"logoUrl")})]}),e.logoMode==="image"&&e.logoUrl&&g("Uploaded logo",()=>r({logoUrl:"",logoMode:"icon"}))]}),n.jsxs(p.Box,{children:[n.jsx(p.Typography,{variant:"caption",sx:{...l,color:t.label2,display:"block",mb:.5},children:"Panel Colour"}),n.jsx(Gs,{label:"Login panel background",value:e.loginPanelColor,fallback:e.primaryHex,onChange:f=>r({loginPanelColor:f}),onReset:()=>r({loginPanelColor:""})})]}),o&&n.jsx(Ys,{src:o.src,aspect:o.aspect,onCancel:()=>i(null),onConfirm:a})]})}const qs=[{key:"dashboard",label:"Dashboard"},{key:"orders",label:"Orders"},{key:"reports",label:"Reports"},{key:"cameras",label:"Cameras"},{key:"operations",label:"Operations"},{key:"components",label:"Components"},{key:"login",label:"Login"}],Ks=[{key:"dashboard",label:"Dashboard"},{key:"operations",label:"Operations"},{key:"cameras",label:"Cameras"},{key:"reports",label:"Reports"},{key:"orders",label:"Orders"},{key:"components",label:"Components"}],Ke=Nn(e=>({openSection:"",setOpenSection:r=>e({openSection:r}),previewScreen:"dashboard",setPreviewScreen:r=>e({previewScreen:r}),previewMenuOpen:!1,setPreviewMenuOpen:r=>e({previewMenuOpen:r}),studioOpen:!0,setStudioOpen:r=>e({studioOpen:r})}));function Xs({onClose:e}){var O,C,A,D;const r=Ke(k=>k.openSection),t=Ke(k=>k.setOpenSection),o=Ke(k=>k.setPreviewScreen),i=Ke(k=>k.previewScreen),s=Ke(k=>k.previewMenuOpen),a=Ke(k=>k.setPreviewMenuOpen),l=N(k=>k.settings),c=N(k=>k.savedThemes),g=N(k=>k.editingSavedId),f=N(k=>k.isDirty),x=N(k=>k.set),m=N(k=>k.reset),h=He(l.mode),b=L.useRef("theme"),[u,y]=L.useState(!1),v=(k,F)=>{const ee=r!==k;t(ee?k:""),a(!1),ee&&b.current!==k&&(o(F),b.current=k)},E=((O=c.find(k=>k.id===g))==null?void 0:O.name)||((C=Ft.find(k=>k.id===l.presetId))==null?void 0:C.name)||((A=c.find(k=>k.id===l.presetId))==null?void 0:A.name)||"Custom Theme",B=f(),S=((D=Ft.find(k=>k.id===Re.presetId))==null?void 0:D.name)??"default",j={fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},T=({children:k})=>n.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",...j,children:k}),M=n.jsxs(T,{children:[n.jsx("circle",{cx:"13.5",cy:"6.5",r:"2.5"}),n.jsx("circle",{cx:"17.5",cy:"10.5",r:"2.5"}),n.jsx("circle",{cx:"8.5",cy:"7.5",r:"2.5"}),n.jsx("circle",{cx:"6.5",cy:"12.5",r:"2.5"}),n.jsx("path",{d:"M12 2a10 10 0 0 0 0 20 3 3 0 0 0 0-6 2 2 0 0 1 0-4 4 4 0 0 0 4-4 6 6 0 0 0-4-6z"})]}),P=n.jsxs(p.Box,{sx:{display:"flex",gap:"2px",width:14,height:14},children:[n.jsx(p.Box,{sx:{flex:1,background:l.secondaryHex,borderRadius:"2px"}}),n.jsx(p.Box,{sx:{flex:1,background:l.errorHex,borderRadius:"2px"}}),n.jsx(p.Box,{sx:{flex:1,background:l.successHex,borderRadius:"2px"}})]}),X=n.jsxs(T,{children:[n.jsx("path",{d:"M4 20 9 5l5 15M6 14h6"}),n.jsx("path",{d:"M15 20l3-9 3 9M16.2 17h3.6"})]}),Q=n.jsxs(T,{children:[n.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),n.jsx("path",{d:"M3 9h18"})]}),Y=n.jsxs(T,{children:[n.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),n.jsx("path",{d:"M3 9h18M3 15h18M9 3v18"})]}),d=n.jsx(T,{children:n.jsx("rect",{x:"4",y:"4",width:"16",height:"16",rx:"4"})}),$=n.jsxs(n.Fragment,{children:[n.jsxs(T,{children:[n.jsx("path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"}),n.jsx("path",{d:"M10 21a2 2 0 0 0 4 0"})]}),n.jsx(p.Box,{sx:{position:"absolute",top:"6px",right:"6px",width:7,height:7,borderRadius:"50%",background:l.primaryHex,border:`1.5px solid ${h.iconTile}`}})]}),H=n.jsxs(T,{children:[n.jsx("path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"}),n.jsx("path",{d:"M10 17l5-5-5-5"}),n.jsx("path",{d:"M15 12H3"})]}),z=l.mode==="dark",_=k=>k.charAt(0).toUpperCase()+k.slice(1),K={sm:"Small",df:"Default",lg:"Large"},U={sharp:"Sharp",rounded:"Rounded",round:"Round"},J={compact:"Compact",default:"Default",comfortable:"Comfortable"},R={flat:"Flat",outlined:"Outlined",soft:"Soft",raised:"Raised",elevated:"Elevated",floating:"Floating"},I={split:"Split Brand",centered:"Centered Card"},q={"top-center":"Top Center","top-right":"Top Right","bottom-left":"Bottom Left","bottom-right":"Bottom Right"},V={theme:`${E} · ${z?"Dark":"Light"}`,color:"Secondary & status colours",type:`${l.fontFamily} · ${K[l.textSize]??"Default"}`,cards:"Card style, header, nesting & surface tint",tables:"Table row density, dividers, striping & header style — previewed on the Orders screen",shape:`${U[l.radiusPreset]??"Custom"} · ${J[l.density]??"Default"} · ${R[l.cardStyle]??""}`,notif:`${q[l.notifPosition]??""} · ${_(l.notifStyle)}`,login:`${I[l.loginLayout]??""}${l.loginImage?" · image":""}`},G=[{id:"theme",title:"Theme Settings",info:"Presets, saved themes & light/dark mode.",icon:M,screen:"dashboard",body:n.jsx(Bs,{})},{id:"color",title:"Colour Settings",info:"Brand, text & status colours.",icon:P,screen:"components",body:n.jsx(Ps,{})},{id:"type",title:"Typography",info:"Fonts, sizes, weight & line-height.",icon:X,screen:"components",body:n.jsx(zs,{})},{id:"cards",title:"Cards",info:"Card style, header, nesting & tint.",icon:Q,screen:"dashboard",body:n.jsx(Ls,{})},{id:"tables",title:"Tables",info:"Row/column density, dividers & alignment.",icon:Y,screen:"orders",body:n.jsx(Ns,{})},{id:"shape",title:"Surface & Shape",info:"Radius, density, elevation & spacing.",icon:d,screen:"dashboard",body:n.jsx(Vs,{})},{id:"notif",title:"Notifications",info:"Toast placement & behaviour.",icon:$,screen:"operations",body:n.jsx(Us,{})},{id:"login",title:"Login Screen",info:"Brand image, logo & panel colour.",icon:H,screen:"login",body:n.jsx(Js,{})}];return n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",bgcolor:h.card},children:[n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.1,borderBottom:`1px solid ${h.divider}`,bgcolor:h.card},children:[n.jsxs(p.Box,{sx:{display:"flex",gap:.5,flexShrink:0},children:[n.jsx(p.Box,{sx:{width:13,height:13,borderRadius:"3px",bgcolor:l.primaryHex}}),n.jsx(p.Box,{sx:{width:13,height:13,borderRadius:"3px",bgcolor:l.secondaryHex}})]}),n.jsxs(p.Box,{sx:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:"6px"},children:[n.jsx(p.Typography,{variant:"caption",sx:{minWidth:0,fontWeight:800,color:h.text,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:E}),B&&n.jsx(p.Tooltip,{title:"Unsaved changes",arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.Box,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:"error.main",flexShrink:0}})})]}),n.jsx(p.Tooltip,{title:"Reset to defaults",arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.IconButton,{size:"small",onClick:()=>y(!0),sx:{bgcolor:"action.selected"},children:n.jsx(xs,{sx:{fontSize:16}})})}),n.jsx(p.Tooltip,{title:l.mode==="dark"?"Switch to light":"Switch to dark",arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.IconButton,{size:"small",onClick:()=>x({mode:l.mode==="dark"?"light":"dark"}),sx:{bgcolor:"action.selected"},children:l.mode==="dark"?n.jsx(ys,{sx:{fontSize:16}}):n.jsx(ms,{sx:{fontSize:16}})})})]}),s&&n.jsxs(p.Box,{sx:{borderBottom:"1px solid",borderColor:"divider",borderLeft:"3px solid #eab308",bgcolor:k=>k.palette.mode==="dark"?"rgba(234,179,8,0.14)":"#fef9c3",px:1.6,py:1.5},children:[n.jsx(p.Typography,{sx:{fontSize:10,fontWeight:800,textTransform:"uppercase",letterSpacing:".6px",color:k=>k.palette.mode==="dark"?"#f2cd5c":"#854d0e",mb:1},children:"Previewing Screen"}),n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:.75},children:Ks.map(k=>{const F=i===k.key;return n.jsx(p.Box,{component:"button",onClick:()=>{i!==k.key&&o(k.key),a(!1)},sx:{px:.75,py:1,borderRadius:2,cursor:"pointer",fontSize:11,fontWeight:F?800:600,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",border:"1.5px solid",borderColor:F?"#d4a915":"#e6dca8",bgcolor:F?"#fde68a":"background.paper",color:F?"#713f12":"text.secondary"},children:k.label},k.key)})})]}),G.map(k=>n.jsx(ks,{icon:k.icon,title:k.title,info:V[k.id]??k.info,open:r===k.id,dimmed:r!==""&&r!==k.id,onToggle:()=>v(k.id,k.screen),onPreviewMenu:()=>a(!s),children:k.body},k.id)),n.jsxs(p.Dialog,{open:u,onClose:()=>y(!1),PaperProps:{sx:{borderRadius:3,width:320,p:2.5}},children:[n.jsx(p.Typography,{sx:{fontSize:15,fontWeight:800,mb:.75},children:"Reset everything?"}),n.jsxs(p.Typography,{sx:{fontSize:12.5,color:"text.secondary",lineHeight:1.5,mb:2.25},children:["This reverts every change you've made — theme preset, light/dark mode, brand colours, logo, typography, cards, surface & shape, notifications and login screen — back to the default ",S," preset. This can't be undone."]}),n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[n.jsx(p.Box,{component:"button",onClick:()=>{m(),y(!1)},sx:{p:1.4,borderRadius:2.5,border:"none",bgcolor:"error.main",color:"error.contrastText",fontSize:13,fontWeight:700,cursor:"pointer"},children:"Reset to defaults"}),n.jsx(p.Box,{component:"button",onClick:()=>y(!1),sx:{p:1.1,borderRadius:2.5,border:"none",bgcolor:"transparent",color:"text.secondary",fontSize:12.5,fontWeight:600,cursor:"pointer"},children:"Cancel"})]})]})]})}const Qs=vt(n.jsx("path",{d:"M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v2H8v2h8v-2h-2v-2h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H3V4h18z"}),"DesktopWindowsOutlined");function Br(e,r,t){const o=L.useRef(null),[i,s]=L.useState(e);return L.useLayoutEffect(()=>{const a=o.current;if(!a)return;const l=()=>{const x=a.children.length;if(!x)return;const m=parseFloat(getComputedStyle(a).rowGap)||0;let h=0;for(const y of Array.from(a.children))h+=y.offsetHeight;const b=h/x,u=a.clientHeight;u<=0||b<=0||s(Math.max(r,Math.min(t,Math.floor((u+m)/(b+m)))))};l();const c=requestAnimationFrame(l),g=setTimeout(l,300),f=new ResizeObserver(l);return f.observe(a),()=>{cancelAnimationFrame(c),clearTimeout(g),f.disconnect()}},[r,t]),[o,i]}function Un(e,r,t){const o=L.useRef(null),i=L.useRef(null),[s,a]=L.useState(e);return L.useLayoutEffect(()=>{const l=i.current;if(!l)return;const c=()=>{var u;const m=Array.from(l.children).filter(y=>getComputedStyle(y).position!=="absolute"),h=m.length?m[0].offsetHeight:((u=o.current)==null?void 0:u.offsetHeight)||36,b=l.clientHeight;b<=0||h<=0||a(Math.max(r,Math.min(t,Math.floor(b/h))))};c();const g=requestAnimationFrame(c),f=setTimeout(c,300),x=new ResizeObserver(c);return x.observe(l),()=>{cancelAnimationFrame(g),clearTimeout(f),x.disconnect()}},[r,t]),[o,i,s]}const Zs=["Jan","Feb","Mar","Apr","May","Jun"],el=[44,60,50,74,88,96],tl=[24,32,30,42,52,60];function rl(){const e=ve(),r=N(O=>O.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:c,tH1:g,tH2:f,tTitle:x,tH4:m,wH1:h,headFam:b,headLH:u,accentBg:y,btnText:v,tBodySm:E,bwEmph:B,btnCase:S,bodyWeightEff:j,bodyLH:T,tCaption:M,pMain:P,sMain:X}=e,Q=b+",sans-serif",Y=r.fontFamily+",sans-serif",d=e.hc1||t.textPrimary,$=e.hc2||t.textPrimary,H=e.hc3||t.textPrimary,z=[{label:"Revenue",val:"$2.41M",chg:"+12.5%",up:!0},{label:"Open Orders",val:"1,284",chg:"+3.2%",up:!0},{label:"Inventory",val:"8,540",chg:"-1.8%",up:!1},{label:"Active Users",val:"342",chg:"+5",up:!0}].map(O=>({...O,cc:O.up?e.sucTxt:e.errTxt,cb:O.up?e.sucSoft:e.errSoft,arrow:O.up?"▲":"▼"})),_=O=>O==="✓"?{cb:e.sucSoft,cc:e.sucTxt}:O==="!"?{cb:e.warnSoft,cc:e.warnTxt}:O==="+"?{cb:e.infoSoft,cc:e.infoTxt}:{cb:t.pContainer,cc:e.isDark?t.pLight:t.pDark},K=[{title:"Order ORD-1042 delivered to Acme Corp",time:"2m ago",ic:"✓"},{title:"Invoice #4821 paid — $12,400",time:"18m ago",ic:"$"},{title:"Low stock alert: Widget Pro (12 left)",time:"1h ago",ic:"!"},{title:"New customer onboarded: Globex Ltd",time:"3h ago",ic:"+"},{title:'Report "Q2 Summary" exported to PDF',time:"5h ago",ic:"▤"},{title:"Shipment SHP-2093 dispatched — Initech",time:"6h ago",ic:"✓"},{title:"Refund processed — $840 to Umbrella Co",time:"7h ago",ic:"$"},{title:"Payment overdue: Waystar Royco",time:"8h ago",ic:"!"},{title:"New support ticket — Stark Industries",time:"9h ago",ic:"+"},{title:"Backup completed — 12,480 records",time:"11h ago",ic:"✓"},{title:"Purchase order PO-771 approved",time:"13h ago",ic:"$"},{title:"Inventory reconciled — Warehouse 3",time:"15h ago",ic:"▤"},{title:"SLA breach warning — Hooli Inc",time:"17h ago",ic:"!"},{title:"New user invited — M. Fernandez",time:"19h ago",ic:"+"},{title:"Quarterly report scheduled",time:"21h ago",ic:"▤"},{title:"Order ORD-1039 delivered to Oscorp",time:"23h ago",ic:"✓"}].map(O=>({...O,..._(O.ic)})),[U,J]=Br(5,4,K.length),R=K.slice(0,J),I=e.cardBorder==="none"?"none":e.cardBorder,q={background:t.paper,border:I,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden"},V={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between"},G={fontSize:x,lineHeight:u,fontWeight:h,color:H,fontFamily:Q};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:I,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:Y,fontWeight:j,color:t.textPrimary},children:[n.jsxs("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between",gap:14},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:u,fontWeight:h,color:d,letterSpacing:"-.3px",fontFamily:Q},children:"Dashboard"}),n.jsx("span",{title:"Good morning, Admin · Jun 21, 2026",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:B,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]}),n.jsx("button",{style:{padding:"10px 20px",borderRadius:i,border:"none",background:y,color:v,fontSize:E,fontWeight:B,textTransform:S,letterSpacing:".4px",boxShadow:e.btnShadow,whiteSpace:"nowrap",cursor:"pointer"},children:"+ New"})]}),n.jsxs("div",{style:{padding:c,background:t.bgDefault,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[n.jsxs("div",{style:{...q,marginBottom:l},children:[n.jsxs("div",{style:V,children:[n.jsx("span",{style:{...G},children:"Performance Overview"}),n.jsx("span",{style:{fontSize:M,color:t.textSecondary,fontWeight:B},children:"This month"})]}),n.jsx("div",{style:{padding:s,display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:l},children:z.map(O=>n.jsxs("div",{style:{background:t.paper2,border:e.nestBorder,borderRadius:i,boxShadow:e.nestShadow,padding:a},children:[n.jsx("div",{style:{fontSize:m,color:t.textSecondary,fontWeight:h,fontFamily:Q,textTransform:"uppercase",letterSpacing:".6px",marginBottom:8},children:O.label}),n.jsx("div",{style:{fontSize:f,fontWeight:h,color:$,letterSpacing:"-.8px",lineHeight:1,marginBottom:6},children:O.val}),n.jsxs("span",{style:{fontSize:M,fontWeight:B,color:O.cc,background:O.cb,padding:"3px 9px",borderRadius:999},children:[O.arrow," ",O.chg]})]},O.label))})]}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 300px",gap:l,flex:1,minHeight:0},children:[n.jsxs("div",{style:{...q,display:"flex",flexDirection:"column",minHeight:0},children:[n.jsxs("div",{style:V,children:[n.jsx("span",{style:G,children:"Revenue Trend"}),n.jsx("div",{style:{display:"flex",gap:12},children:[["Revenue",P],["Profit",X]].map(([O,C])=>n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5},children:[n.jsx("div",{style:{width:10,height:10,borderRadius:2,background:C}}),n.jsx("span",{style:{fontSize:M,color:t.textSecondary},children:O})]},O))})]}),n.jsx("div",{style:{padding:`${a}px ${s}px`,display:"flex",alignItems:"flex-end",gap:12,flex:1,minHeight:200},children:Zs.map((O,C)=>n.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",gap:6,height:"100%"},children:[n.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-end",gap:3,flex:1},children:[n.jsx("div",{style:{width:"100%",height:tl[C]+"%",background:X,opacity:.55,borderRadius:`${i} ${i} 0 0`}}),n.jsx("div",{style:{width:"100%",height:el[C]+"%",background:P,borderRadius:`${i} ${i} 0 0`}})]}),n.jsx("span",{style:{fontSize:M,color:t.textSecondary},children:O})]},O))})]}),n.jsxs("div",{style:{...q,display:"flex",flexDirection:"column",minHeight:0},children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:G,children:"Recent Activity"})}),n.jsx("div",{ref:U,style:{padding:a,display:"flex",flexDirection:"column",justifyContent:"space-between",gap:4,flex:1,minHeight:0},children:R.map((O,C)=>n.jsxs("div",{style:{display:"flex",gap:11,alignItems:"flex-start",padding:8,borderRadius:i},children:[n.jsx("div",{style:{width:28,height:28,borderRadius:i,background:O.cb,color:O.cc,display:"grid",placeItems:"center",flexShrink:0,fontSize:13,fontWeight:B},children:O.ic}),n.jsxs("div",{style:{flex:1,minWidth:0},children:[n.jsx("div",{style:{fontSize:E,color:t.textPrimary,fontFamily:Y,fontWeight:j,lineHeight:T,marginBottom:2},children:O.title}),n.jsx("div",{style:{fontSize:M,color:t.textSecondary,fontFamily:Y},children:O.time})]})]},C))})]})]})]})]})}const nl=[{id:"ORD-1042",cust:"Acme Corporation",status:"Delivered",amt:"$12,400",date:"Jun 18"},{id:"ORD-1041",cust:"Globex Ltd",status:"Processing",amt:"$8,750",date:"Jun 17"},{id:"ORD-1040",cust:"Initech",status:"Pending",amt:"$5,200",date:"Jun 16"},{id:"ORD-1039",cust:"Umbrella Co",status:"Shipped",amt:"$22,100",date:"Jun 15"},{id:"ORD-1038",cust:"Waystar Royco",status:"Delivered",amt:"$9,800",date:"Jun 14"},{id:"ORD-1037",cust:"Stark Industries",status:"Processing",amt:"$31,500",date:"Jun 13"},{id:"ORD-1036",cust:"Wayne Enterprises",status:"Delivered",amt:"$18,240",date:"Jun 12"},{id:"ORD-1035",cust:"Soylent Corp",status:"Pending",amt:"$4,120",date:"Jun 11"},{id:"ORD-1034",cust:"Hooli Inc",status:"Shipped",amt:"$27,900",date:"Jun 10"},{id:"ORD-1033",cust:"Cyberdyne Systems",status:"Delivered",amt:"$14,650",date:"Jun 09"},{id:"ORD-1032",cust:"Massive Dynamic",status:"Processing",amt:"$10,300",date:"Jun 08"},{id:"ORD-1031",cust:"Tyrell Corp",status:"Delivered",amt:"$16,780",date:"Jun 07"},{id:"ORD-1030",cust:"Oscorp",status:"Shipped",amt:"$7,940",date:"Jun 06"},{id:"ORD-1029",cust:"Nakatomi Trading",status:"Pending",amt:"$3,560",date:"Jun 05"},{id:"ORD-1028",cust:"Gekko & Co",status:"Delivered",amt:"$25,300",date:"Jun 04"},{id:"ORD-1027",cust:"Bluth Company",status:"Processing",amt:"$6,410",date:"Jun 03"}],fr="100px 1fr 120px 100px 80px 70px";function ol(){const e=ve(),r=N(J=>J.settings),{t,rad:o,radSm:i,pad:s,padSm:a,screenPad:l,rowPy:c,tH1:g,wH1:f,headFam:x,headLH:m,accentBg:h,btnText:b,btnShadow:u,tBody:y,tBodySm:v,tCaption:E,tOverline:B,bwEmph:S,btnCase:j,bodyWeightEff:T,pMain:M,table:P}=e,X=x+",sans-serif",Q=r.fontFamily+",sans-serif",Y=e.hc1||t.textPrimary,[d,$,H]=Un(12,3,16),z=nl.slice(0,H).map((J,R)=>({...J,...P.statusMap[J.status]||{sb:t.divider,sc:t.textSecondary},rowBg:r.tableStripe&&R%2===1?P.stripeBg:"transparent"})),_=e.cardBorder==="none"?"none":e.cardBorder,K=J=>({fontSize:B,fontWeight:S,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".5px",borderRight:P.colBorder,alignSelf:"stretch",display:"flex",alignItems:P.cellAI,justifyContent:P.cellJC,padding:`${P.rowPy} ${P.cellPx}`}),U={alignSelf:"stretch",display:"flex",alignItems:P.cellAI,justifyContent:P.cellJC,padding:`${P.rowPy} ${P.cellPx}`};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:_,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:Q,fontWeight:T,color:t.textPrimary},children:[n.jsxs("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:14},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:m,fontWeight:f,color:Y,letterSpacing:"-.3px",fontFamily:X},children:"Orders"}),n.jsx("span",{title:"1,284 orders · June 2026",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:S,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]}),n.jsx("button",{style:{padding:"10px 20px",borderRadius:i,border:"none",background:h,color:b,fontSize:v,fontWeight:S,textTransform:j,letterSpacing:".4px",boxShadow:u,whiteSpace:"nowrap",cursor:"pointer"},children:"+ New Order"})]}),n.jsx("div",{style:{padding:l,background:t.bgDefault,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:_,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",flex:1,minHeight:0},children:[n.jsxs("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",gap:9,alignItems:"center",flexWrap:"wrap"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,background:t.paper,border:"1.5px solid "+t.divider,borderRadius:999,padding:"8px 15px",flex:1,minWidth:170},children:[n.jsx("span",{style:{color:t.textSecondary,fontSize:13},children:"⌕"}),n.jsx("span",{style:{fontSize:v,color:t.textSecondary},children:"Search orders…"})]}),P.filters.map(J=>n.jsx("button",{style:{padding:"7px 14px",borderRadius:999,border:"1px solid "+J.brd,background:J.bg,color:J.c,fontSize:E,fontWeight:S,whiteSpace:"nowrap",cursor:"pointer"},children:J.label},J.label))]}),n.jsxs("div",{ref:d,style:{display:"grid",gridTemplateColumns:fr,padding:`0 ${s}px`,borderBottom:P.rowBorder,background:P.headBg},children:[["Order ID","Customer","Status","Amount","Date"].map(J=>n.jsx("div",{style:K(),children:J},J)),n.jsx("div",{style:{alignSelf:"stretch",padding:`${P.rowPy} 0`}})]}),n.jsxs("div",{ref:$,style:{position:"relative",display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[n.jsxs("div",{style:{position:"absolute",inset:0,padding:`0 ${s}px`,display:"grid",gridTemplateColumns:fr,pointerEvents:"none",zIndex:2},children:[n.jsx("div",{style:{borderRight:P.colBorder}}),n.jsx("div",{style:{borderRight:P.colBorder}}),n.jsx("div",{style:{borderRight:P.colBorder}}),n.jsx("div",{style:{borderRight:P.colBorder}}),n.jsx("div",{style:{borderRight:P.colBorder}}),n.jsx("div",{})]}),z.map(J=>n.jsxs("div",{style:{display:"grid",gridTemplateColumns:fr,padding:`0 ${s}px`,borderBottom:P.rowBorder,alignItems:"stretch",background:J.rowBg},children:[n.jsx("div",{style:{...U,fontSize:v,fontWeight:S,color:M,fontFamily:Q},children:J.id}),n.jsx("div",{style:{...U,fontSize:y,color:t.textPrimary,fontWeight:S},children:J.cust}),n.jsx("div",{style:U,children:n.jsx("span",{style:{padding:"4px 11px",borderRadius:999,fontSize:E,fontWeight:S,background:J.sb,color:J.sc,whiteSpace:"nowrap"},children:J.status})}),n.jsx("div",{style:{...U,fontSize:y,color:t.textPrimary,fontWeight:S},children:J.amt}),n.jsx("div",{style:{...U,fontSize:v,color:t.textSecondary},children:J.date}),n.jsx("div",{style:U,children:n.jsx("button",{style:{fontSize:E,color:M,background:t.pContainer,border:"none",fontWeight:S,padding:"5px 11px",borderRadius:i,cursor:"pointer"},children:"View"})})]},J.id))]}),n.jsxs("div",{style:{padding:`${c}px ${s}px`,display:"flex",alignItems:"center",gap:7,borderTop:"1px solid "+t.divider},children:[n.jsxs("span",{style:{fontSize:v,color:t.textSecondary,flex:1},children:["Showing 1–",z.length," of 1,284"]}),n.jsx("button",{style:{width:32,height:32,borderRadius:i,border:"1px solid "+t.outline,background:"transparent",color:t.textSecondary,cursor:"pointer"},children:"‹"}),n.jsx("button",{style:{width:32,height:32,borderRadius:i,border:"none",background:h,color:b,fontWeight:S,cursor:"pointer"},children:"1"}),n.jsx("button",{style:{width:32,height:32,borderRadius:i,border:"1px solid "+t.outline,background:"transparent",color:t.textSecondary,cursor:"pointer"},children:"2"}),n.jsx("button",{style:{width:32,height:32,borderRadius:i,border:"1px solid "+t.outline,background:"transparent",color:t.textSecondary,cursor:"pointer"},children:"›"})]})]})})]})}function il(){const e=ve(),r=N(Z=>Z.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:c,tH1:g,tH2:f,tTitle:x,tH4:m,tH5:h,tH6:b,tBody:u,tBodySm:y,tCaption:v,wH1:E,headFam:B,headLH:S,accentBg:j,btnText:T,btnShadow:M,bwEmph:P,btnCase:X,bodyWeightEff:Q,bodyLH:Y,pMain:d,errSoft:$,errTxt:H,warnSoft:z,warnTxt:_,infoSoft:K,infoTxt:U,sucSoft:J,sucTxt:R}=e,I=B+",sans-serif",q=r.fontFamily+",sans-serif",V=e.t.highlight,G=e.t.highlightSoft,O=e.t.highlightBd,C=t.pContainer,A=t.onPContainer,D=t.pContrast,k=e.hc1||t.textPrimary,F=e.hc2||t.textPrimary,ee=e.hc3||t.textPrimary,W=e.hc4||t.textPrimary,fe=e.hc5||t.textPrimary,Oe=e.hc6||t.textPrimary,De=e.cardBorder==="none"?"none":e.cardBorder,Ve={display:"flex",flexDirection:"column",background:t.paper,border:De,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",height:"100%"},Ue={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},Be={fontSize:x,lineHeight:S,fontWeight:E,color:ee,fontFamily:I},Xt=[{label:"Dashboard Overview",size:g,w:E,color:k,lh:1.1,ls:"-.5px",name:"H1",border:!0},{label:"Revenue Report",size:f,w:E,color:F,lh:1.1,ls:"-.4px",name:"H2",border:!0},{label:"Performance Overview",size:x,w:E,color:ee,lh:1.15,name:"H3",border:!0},{label:"Active Users",size:m,w:E,color:W,lh:1.2,name:"H4",border:!0},{label:"Last updated 2m ago",size:h,w:E,color:fe,lh:1.25,name:"H5",border:!0},{label:"Status · Live",size:b,w:E,color:Oe,lh:1.3,name:"H6",border:!0}],Fe=Z=>n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"11px 12px",borderBottom:"1px solid "+t.divider,background:Z?G:"transparent",boxShadow:Z?"inset 3px 0 0 "+V:"none"},children:[n.jsx("div",{style:{width:16,height:16,borderRadius:"50%",border:"2px solid "+(Z?V:t.outline),display:"grid",placeItems:"center",flexShrink:0},children:Z&&n.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:V}})}),n.jsx("span",{style:{flex:1,fontSize:y,fontFamily:q,fontWeight:Z?P:Q,color:t.textPrimary},children:Z?"Selected item":"Unselected item"}),Z&&n.jsx("span",{style:{fontSize:v,fontFamily:q,fontWeight:P,color:t.textSecondary},children:"Active"})]}),St=(Z,ct,pt)=>n.jsxs("div",{style:{position:"relative",border:Z?"2px solid "+d:"1.5px solid "+t.outline,borderRadius:i,padding:"12px 13px"},children:[n.jsx("span",{style:{position:"absolute",top:-8,left:10,background:t.paper,padding:"0 5px",fontSize:v,color:Z?d:t.textSecondary,fontWeight:Z?P:void 0},children:ct}),n.jsx("span",{style:{fontSize:u,color:Z?t.textPrimary:t.textSecondary},children:pt})]}),Ge=(Z,ct,pt)=>n.jsx("span",{style:{padding:"5px 13px",borderRadius:999,background:Z,color:ct,fontSize:v,fontWeight:P},children:pt}),Me=Z=>({padding:"9px 20px",borderRadius:i,fontSize:y,fontWeight:P,textTransform:X,letterSpacing:".4px",cursor:"pointer",...Z});return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:De,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:q,fontWeight:Q,color:t.textPrimary},children:[n.jsx("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:S,fontWeight:E,color:k,letterSpacing:"-.3px",fontFamily:I},children:"Component Library"}),n.jsx("span",{title:"Every Material UI component reflects your live theme",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:P,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]})}),n.jsxs("div",{style:{padding:c,background:t.bgDefault,display:"flex",flexDirection:"column",gap:l,flex:1,minHeight:0},children:[n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:l,alignItems:"stretch"},children:[n.jsxs("div",{style:Ve,children:[n.jsx("div",{style:Ue,children:n.jsx("span",{style:Be,children:"Typography Scale"})}),n.jsxs("div",{style:{padding:s,display:"flex",flexDirection:"column",justifyContent:"space-between",flex:1,minHeight:0,gap:6},children:[Xt.map(Z=>n.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,borderBottom:"1px solid "+t.divider,paddingBottom:14},children:[n.jsx("span",{style:{fontSize:Z.size,lineHeight:Z.lh,fontWeight:Z.w,color:Z.color,fontFamily:I,letterSpacing:Z.ls},children:Z.label}),n.jsxs("span",{style:{fontSize:Z.size,color:t.textSecondary,fontWeight:Z.w,whiteSpace:"nowrap",flexShrink:0,fontFamily:I},children:[Z.name," · ",Z.size]})]},Z.name)),n.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12},children:[n.jsx("span",{style:{fontSize:u,lineHeight:Y,color:t.textPrimary,fontFamily:q,fontWeight:Q},children:"Body text — the quick brown fox jumps over the lazy dog."}),n.jsxs("span",{style:{fontSize:u,color:t.textSecondary,fontWeight:Q,whiteSpace:"nowrap",flexShrink:0,fontFamily:q},children:["Body · ",u]})]}),n.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12},children:[n.jsx("span",{style:{fontSize:v,lineHeight:Y,color:t.textSecondary,fontFamily:q,fontWeight:Q},children:"Caption & helper text style"}),n.jsxs("span",{style:{fontSize:v,color:t.textSecondary,fontWeight:Q,whiteSpace:"nowrap",flexShrink:0,fontFamily:q},children:["Caption · ",v]})]})]})]}),n.jsxs("div",{style:Ve,children:[n.jsx("div",{style:Ue,children:n.jsx("span",{style:Be,children:"Selection States"})}),n.jsxs("div",{style:{padding:s,display:"flex",flexDirection:"column",gap:14},children:[n.jsxs("div",{style:{display:"flex",gap:2,borderBottom:"1.5px solid "+t.divider},children:[n.jsx("div",{style:{flex:1,textAlign:"center",padding:"8px 4px",fontSize:y,fontWeight:P,color:t.textPrimary,background:G,borderBottom:"2.5px solid "+d,marginBottom:-1.5,borderRadius:"6px 6px 0 0"},children:"Overview"}),n.jsx("div",{style:{flex:1,textAlign:"center",padding:"8px 4px",fontSize:y,fontWeight:P,color:t.textSecondary},children:"Activity"}),n.jsx("div",{style:{flex:1,textAlign:"center",padding:"8px 4px",fontSize:y,fontWeight:P,color:t.textSecondary},children:"Settings"})]}),n.jsxs("div",{style:{display:"flex",flexDirection:"column",border:"1px solid "+t.divider,borderRadius:i,overflow:"hidden"},children:[Fe(!0),Fe(!1),Fe(!1),Fe(!1),Fe(!0),Fe(!1)]}),n.jsx("div",{style:{display:"inline-flex",alignSelf:"flex-start",padding:"6px 12px",borderRadius:i,background:G,border:"1px solid "+O},children:n.jsx("span",{style:{fontSize:v,fontWeight:P,color:V},children:"2 selected items"})})]})]})]}),n.jsxs("div",{style:{...Ve,height:"auto"},children:[n.jsx("div",{style:Ue,children:n.jsx("span",{style:Be,children:"Inputs & Selection"})}),n.jsxs("div",{style:{padding:s},children:[n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:l,marginBottom:l},children:[St(!1,"Outlined","Placeholder…"),St(!0,"Focused","Active value")]}),n.jsxs("div",{style:{display:"flex",gap:22,alignItems:"center",flexWrap:"wrap",paddingTop:a,borderTop:"1px solid "+t.divider},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{width:18,height:18,borderRadius:4,background:d,display:"grid",placeItems:"center",color:D,fontSize:11,fontWeight:P},children:"✓"}),n.jsx("span",{style:{fontSize:y,color:t.textPrimary},children:"Checkbox"})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{width:18,height:18,borderRadius:"50%",border:"2px solid "+d,display:"grid",placeItems:"center"},children:n.jsx("div",{style:{width:9,height:9,borderRadius:"50%",background:d}})}),n.jsx("span",{style:{fontSize:y,color:t.textPrimary},children:"Radio"})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{width:38,height:22,borderRadius:999,background:d,position:"relative"},children:n.jsx("div",{style:{position:"absolute",top:3,right:3,width:16,height:16,borderRadius:"50%",background:"#fff"}})}),n.jsx("span",{style:{fontSize:y,color:t.textPrimary},children:"Switch"})]})]})]})]}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:l,alignItems:"stretch"},children:[n.jsxs("div",{style:Ve,children:[n.jsx("div",{style:Ue,children:n.jsx("span",{style:Be,children:"Buttons"})}),n.jsxs("div",{style:{padding:s,display:"flex",gap:10,flexWrap:"wrap",alignItems:"center"},children:[n.jsx("button",{style:Me({border:"none",background:j,color:T,boxShadow:M}),children:"Contained"}),n.jsx("button",{style:Me({border:"1.5px solid "+d,background:"transparent",color:d}),children:"Outlined"}),n.jsx("button",{style:Me({border:"none",background:"transparent",color:d}),children:"Text"}),n.jsx("button",{style:Me({border:"none",background:C,color:A}),children:"Tonal"}),n.jsx("button",{style:Me({border:"none",background:j,color:T,boxShadow:M,borderRadius:999}),children:"Rounded"}),n.jsx("button",{style:Me({border:"none",background:$,color:H}),children:"Error"})]})]}),n.jsxs("div",{style:Ve,children:[n.jsx("div",{style:Ue,children:n.jsx("span",{style:Be,children:"Chips, Alerts & Progress"})}),n.jsxs("div",{style:{padding:s},children:[n.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginBottom:l},children:[Ge(C,A,"Primary"),Ge(J,R,"Success"),Ge(z,_,"Warning"),Ge(K,U,"Info"),Ge($,H,"Error")]}),n.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:7},children:[n.jsx("span",{style:{fontSize:y,color:t.textPrimary,fontWeight:P},children:"Revenue goal"}),n.jsx("span",{style:{fontSize:y,color:d,fontWeight:P},children:"74%"})]}),n.jsx("div",{style:{height:8,background:t.paper2,border:"1px solid "+t.divider,borderRadius:999,overflow:"hidden"},children:n.jsx("div",{style:{height:"100%",width:"74%",background:d,borderRadius:999}})})]})]})]})]})]})}const al=[{label:"Cameras Online",val:"5 / 6"},{label:"Recording",val:"4"},{label:"Motion Alerts",val:"2"},{label:"Storage Used",val:"82%"}],sl=[{name:"CAM 01",loc:"Main Lobby",rec:!0,online:!0,time:"14:32:08"},{name:"CAM 02",loc:"North Gate",rec:!0,online:!0,time:"14:32:08"},{name:"CAM 03",loc:"Loading Bay",rec:!1,online:!0,time:"14:32:07"},{name:"CAM 04",loc:"Rooftop",rec:!0,online:!0,time:"14:32:08"},{name:"CAM 05",loc:"Parking Deck",rec:!1,online:!1,time:"—"},{name:"CAM 06",loc:"Server Room",rec:!0,online:!0,time:"14:32:08"}],ll=[{cam:"CAM 04",label:"Motion detected — Rooftop",time:"just now",sev:"error"},{cam:"CAM 02",label:"Person identified — North Gate",time:"6m ago",sev:"info"},{cam:"CAM 01",label:"Loitering cleared — Main Lobby",time:"22m ago",sev:"success"},{cam:"CAM 06",label:"Door forced — Server Room",time:"34m ago",sev:"error"},{cam:"CAM 03",label:"Vehicle detected — Loading Bay",time:"48m ago",sev:"info"},{cam:"CAM 05",label:"Signal restored — Parking Deck",time:"1h ago",sev:"success"},{cam:"CAM 02",label:"Tailgating flagged — North Gate",time:"1h ago",sev:"error"},{cam:"CAM 04",label:"Crowd density normal — Rooftop",time:"2h ago",sev:"success"},{cam:"CAM 01",label:"Object left behind — Main Lobby",time:"2h ago",sev:"info"},{cam:"CAM 03",label:"Motion detected — Loading Bay",time:"3h ago",sev:"error"},{cam:"CAM 06",label:"Access granted — Server Room",time:"3h ago",sev:"success"},{cam:"CAM 05",label:"Camera offline — Parking Deck",time:"4h ago",sev:"error"},{cam:"CAM 02",label:"Face match — North Gate",time:"5h ago",sev:"info"},{cam:"CAM 01",label:"Queue length normal — Main Lobby",time:"6h ago",sev:"success"},{cam:"CAM 04",label:"Perimeter breach — Rooftop",time:"7h ago",sev:"error"},{cam:"CAM 03",label:"Package scanned — Loading Bay",time:"8h ago",sev:"info"}];function dl(){const e=ve(),r=N(D=>D.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:c,tH1:g,tH2:f,tTitle:x,wH1:m,headFam:h,headLH:b,accentBg:u,btnText:y,btnShadow:v,tBodySm:E,tCaption:B,tOverline:S,bwEmph:j,btnCase:T,bodyWeightEff:M,errSoft:P,errTxt:X,mediaBg:Q,overlaySurface:Y,overlayBorder:d,onOverlay:$,sevMap:H}=e,z=h+",sans-serif",_=r.fontFamily+",sans-serif",K=e.hc1||t.textPrimary,U=e.hc2||t.textPrimary,J=e.hc3||t.textPrimary,R=e.cardBorder==="none"?"none":e.cardBorder,I=sl.map(D=>({...D,dotC:D.online?r.successHex:t.textDisabled})),[q,V]=Br(3,3,16),G=ll.slice(0,V).map(D=>({...D,...H[D.sev]})),O={background:t.paper,border:R,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden"},C={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between"},A={fontSize:x,lineHeight:b,fontWeight:m,color:J,fontFamily:z};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:R,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:_,fontWeight:M,color:t.textPrimary},children:[n.jsxs("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:14},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:b,fontWeight:m,color:K,letterSpacing:"-.3px",fontFamily:z},children:"Camera Surveillance"}),n.jsx("span",{title:"6 feeds · live monitoring & recording",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:j,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:B,fontWeight:j,color:X,background:P,padding:"6px 12px",borderRadius:999},children:[n.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:r.errorHex}}),"LIVE"]}),n.jsx("button",{style:{padding:"10px 18px",borderRadius:i,border:"none",background:u,color:y,fontSize:E,fontWeight:j,textTransform:T,letterSpacing:".4px",boxShadow:v,whiteSpace:"nowrap",cursor:"pointer"},children:"+ Add Camera"})]})]}),n.jsxs("div",{style:{padding:c,background:t.bgDefault,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[n.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:l,marginBottom:l},children:al.map(D=>n.jsxs("div",{style:O,children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:{fontSize:S,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".6px",fontWeight:j},children:D.label})}),n.jsx("div",{style:{padding:`${a}px ${s}px`},children:n.jsx("div",{style:{fontSize:f,fontWeight:m,color:U,letterSpacing:"-.8px",lineHeight:1},children:D.val})})]},D.label))}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 300px",gap:l,flex:1,minHeight:0},children:[n.jsxs("div",{style:{...O,display:"flex",flexDirection:"column"},children:[n.jsxs("div",{style:C,children:[n.jsx("span",{style:A,children:"Camera Wall"}),n.jsx("span",{style:{fontSize:B,color:t.textSecondary,fontWeight:j},children:"2 × 3 grid"})]}),n.jsx("div",{style:{padding:s,display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gridAutoRows:"1fr",gap:l},children:I.map(D=>n.jsxs("div",{style:{position:"relative",borderRadius:i,overflow:"hidden",background:Q,minHeight:104,border:"1px solid "+t.divider},children:[n.jsx("div",{style:{position:"absolute",inset:0,display:"grid",placeItems:"center"},children:n.jsx("span",{style:{fontFamily:"monospace",fontSize:B,color:"rgba(255,255,255,.3)",letterSpacing:1},children:D.loc})}),n.jsxs("div",{style:{position:"absolute",top:7,left:7,display:"flex",alignItems:"center",gap:5,background:Y,border:"1px solid "+d,borderRadius:999,padding:"2px 8px"},children:[n.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:D.dotC}}),n.jsx("span",{style:{color:$,fontSize:B,fontWeight:700,letterSpacing:".4px"},children:D.name})]}),D.rec&&n.jsxs("div",{style:{position:"absolute",top:7,right:7,display:"flex",alignItems:"center",gap:4,background:Y,borderRadius:999,padding:"2px 7px"},children:[n.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:r.errorHex}}),n.jsx("span",{style:{color:$,fontSize:8,fontWeight:800,letterSpacing:".5px"},children:"REC"})]}),D.online&&n.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,padding:"5px 8px",background:"linear-gradient(0deg,rgba(0,0,0,.7),rgba(0,0,0,0))",display:"flex",justifyContent:"space-between",alignItems:"center"},children:n.jsx("span",{style:{color:"#fff",fontSize:B,fontWeight:600,fontFamily:"monospace"},children:D.time})})]},D.name))})]}),n.jsxs("div",{style:{...O,display:"flex",flexDirection:"column"},children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:A,children:"Recent Detections"})}),n.jsx("div",{ref:q,style:{padding:a,display:"flex",flexDirection:"column",justifyContent:"space-between",gap:2,flex:1,minHeight:0},children:G.map((D,k)=>n.jsxs("div",{style:{display:"flex",gap:11,alignItems:"flex-start",padding:"9px 8px",borderRadius:i},children:[n.jsx("div",{style:{width:28,height:28,borderRadius:i,background:D.cb,color:D.cc,display:"grid",placeItems:"center",flexShrink:0,fontSize:11,fontWeight:800,fontFamily:"monospace"},children:"●"}),n.jsxs("div",{style:{flex:1,minWidth:0},children:[n.jsx("div",{style:{fontSize:E,color:t.textPrimary,fontWeight:M,lineHeight:1.35},children:D.label}),n.jsxs("div",{style:{fontSize:B,color:t.textSecondary,marginTop:2},children:[D.cam," · ",D.time]})]})]},k))})]})]})]})]})}const cl=[{ic:"!",label:"Camera 04 motion detected — Loading Bay",time:"just now",sev:"error",unread:!0},{ic:"✓",label:"Stream reconnected — North Gate feed",time:"4m ago",sev:"success",unread:!0},{ic:"i",label:"Access request — J. Okoro (Operator)",time:"22m ago",sev:"info",unread:!1},{ic:"!",label:"Report archive storage 82% full",time:"1h ago",sev:"warning",unread:!1},{ic:"✓",label:"Backup completed — 12,480 clips archived",time:"2h ago",sev:"success",unread:!1},{ic:"i",label:"Firmware update available — 3 devices",time:"3h ago",sev:"info",unread:!1},{ic:"!",label:"Camera 02 lens obstruction detected",time:"5h ago",sev:"error",unread:!1},{ic:"✓",label:"Nightly health check passed — all nodes",time:"6h ago",sev:"success",unread:!1},{ic:"i",label:"New operator invited — M. Fernandez",time:"7h ago",sev:"info",unread:!1},{ic:"!",label:"Bandwidth spike on West Wing uplink",time:"8h ago",sev:"warning",unread:!1},{ic:"✓",label:"Retention policy applied — 30 day window",time:"9h ago",sev:"success",unread:!1},{ic:"i",label:"Scheduled maintenance — Sat 02:00 UTC",time:"11h ago",sev:"info",unread:!1},{ic:"!",label:"Motion zone breach — Perimeter Gate 3",time:"12h ago",sev:"error",unread:!1},{ic:"✓",label:"Clip export finished — Incident #4821",time:"14h ago",sev:"success",unread:!1},{ic:"i",label:"Analytics model updated — v2.4.1",time:"16h ago",sev:"info",unread:!1},{ic:"!",label:"Disk latency elevated — NVR-02",time:"18h ago",sev:"warning",unread:!1}];function pl(){const e=ve(),r=N(A=>A.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:c,tH1:g,tTitle:f,wH1:x,headFam:m,headLH:h,accentBg:b,btnText:u,tBodySm:y,tCaption:v,tOverline:E,bwEmph:B,bodyWeightEff:S,bodyLH:j,errSoft:T,errTxt:M,pMain:P,mediaBg:X,overlaySurface:Q,overlayBorder:Y,onOverlay:d,sevMap:$}=e,H=m+",sans-serif",z=r.fontFamily+",sans-serif",_=e.hc1||t.textPrimary,K=e.hc3||t.textPrimary,U=e.cardBorder==="none"?"none":e.cardBorder,[J,R]=Br(7,4,16),I=cl.slice(0,R).map(A=>({...A,...$[A.sev],rowBg:A.unread?ce(r.primaryHex,e.isDark?.12:.05):"transparent"})),q=I.filter(A=>A.unread).length,V={display:"flex",flexDirection:"column",minHeight:0,background:t.paper,border:U,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden"},G={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between"},O={fontSize:f,lineHeight:h,fontWeight:x,color:K,fontFamily:H},C={height:30,borderRadius:i,border:"none",background:"rgba(255,255,255,.14)",color:d,fontSize:v,fontWeight:B,cursor:"pointer",fontFamily:"inherit"};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:U,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:z,fontWeight:S,color:t.textPrimary},children:[n.jsx("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:h,fontWeight:x,color:_,letterSpacing:"-.3px",fontFamily:H},children:"Operations Center"}),n.jsx("span",{title:"Live map, camera feeds, alerts & access — every module themed end to end",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:B,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]})}),n.jsx("div",{style:{padding:c,background:t.bgDefault,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 320px",gap:l,flex:1,minHeight:0},children:[n.jsxs("div",{style:V,children:[n.jsxs("div",{style:G,children:[n.jsx("span",{style:O,children:"Live Map · Street View"}),n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:v,fontWeight:B,color:M,background:T,padding:"3px 10px",borderRadius:999},children:[n.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:r.errorHex}}),"LIVE"]})]}),n.jsxs("div",{style:{position:"relative",flex:1,minHeight:320,background:X,display:"flex",alignItems:"center",justifyContent:"center"},children:[n.jsx("span",{style:{fontFamily:"monospace",fontSize:v,color:"rgba(255,255,255,.42)",letterSpacing:1.5},children:"◍ GOOGLE STREET VIEW / EARTH EMBED"}),n.jsx("div",{style:{position:"absolute",top:12,left:12,display:"flex",alignItems:"center",gap:7,background:Q,border:"1px solid "+Y,borderRadius:999,padding:"6px 12px"},children:n.jsx("span",{style:{color:d,fontSize:v,fontWeight:B},children:"◎ 40.7128, -74.0060 · Manhattan"})}),n.jsxs("div",{style:{position:"absolute",bottom:12,left:"50%",transform:"translateX(-50%)",display:"flex",alignItems:"center",gap:4,background:Q,border:"1px solid "+Y,borderRadius:i,padding:5},children:[n.jsx("button",{style:{width:30,height:30,borderRadius:i,border:"none",background:b,color:u,fontSize:16,fontWeight:B,cursor:"pointer"},children:"+"}),n.jsx("button",{style:{width:30,height:30,borderRadius:i,border:"none",background:"rgba(255,255,255,.14)",color:d,fontSize:16,fontWeight:B,cursor:"pointer"},children:"−"}),n.jsx("div",{style:{width:1,height:18,background:Y,margin:"0 3px"}}),n.jsx("button",{style:{...C,padding:"0 12px"},children:"Layers"}),n.jsx("button",{style:{...C,padding:"0 12px"},children:"◎ Locate"})]})]})]}),n.jsxs("div",{style:V,children:[n.jsxs("div",{style:G,children:[n.jsx("span",{style:O,children:"Notifications"}),n.jsxs("span",{style:{fontSize:E,fontWeight:B,color:t.pContrast,background:P,padding:"2px 9px",borderRadius:999},children:[q," NEW"]})]}),n.jsx("div",{ref:J,style:{padding:a,display:"flex",flexDirection:"column",gap:2,flex:1,minHeight:0},children:I.map((A,D)=>n.jsxs("div",{style:{display:"flex",gap:11,alignItems:"flex-start",padding:"9px 8px",borderRadius:i,background:A.rowBg},children:[n.jsx("div",{style:{width:26,height:26,borderRadius:i,background:A.cb,color:A.cc,display:"grid",placeItems:"center",flexShrink:0,fontSize:13,fontWeight:B},children:A.ic}),n.jsxs("div",{style:{flex:1,minWidth:0},children:[n.jsx("div",{style:{fontSize:y,color:t.textPrimary,fontWeight:S,lineHeight:j},children:A.label}),n.jsx("div",{style:{fontSize:v,color:t.textSecondary,marginTop:2},children:A.time})]}),A.unread&&n.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:P,flexShrink:0,marginTop:6}})]},D))})]})]})})]})}const ul=[{label:"Reports Generated",val:"248"},{label:"Avg Generation",val:"1.2s"},{label:"Data Points",val:"84.2K"},{label:"Scheduled",val:"12"}],fl=["Jan","Feb","Mar","Apr","May","Jun"],hl=[44,60,50,74,88,96],gl=[24,32,30,42,52,60],xl=[{l:"Reports",h:72},{l:"Cameras",h:92},{l:"Alerts",h:40},{l:"Users",h:58},{l:"Storage",h:80}],ml=[{name:"Q2 Revenue Summary",type:"Financial",date:"Jun 20",status:"Ready"},{name:"Camera Uptime Audit",type:"Operations",date:"Jun 19",status:"Ready"},{name:"User Access Log",type:"Security",date:"Jun 18",status:"Ready"},{name:"Inventory Forecast",type:"Analytics",date:"Jun 17",status:"Processing"},{name:"Monthly KPI Digest",type:"Executive",date:"Jun 15",status:"Ready"},{name:"Incident Response Log",type:"Security",date:"Jun 14",status:"Ready"},{name:"Storage Utilization Report",type:"Operations",date:"Jun 13",status:"Ready"},{name:"Weekly Traffic Analysis",type:"Analytics",date:"Jun 12",status:"Processing"},{name:"Vendor SLA Compliance",type:"Financial",date:"Jun 11",status:"Ready"},{name:"Motion Event Rollup",type:"Operations",date:"Jun 10",status:"Ready"},{name:"Quarterly Audit Trail",type:"Security",date:"Jun 09",status:"Ready"},{name:"Energy Consumption Digest",type:"Analytics",date:"Jun 08",status:"Processing"},{name:"Executive Board Pack",type:"Executive",date:"Jun 07",status:"Ready"},{name:"Device Firmware Ledger",type:"Operations",date:"Jun 06",status:"Ready"},{name:"Access Anomaly Report",type:"Security",date:"Jun 05",status:"Ready"},{name:"Cost Allocation Summary",type:"Financial",date:"Jun 04",status:"Ready"}],bn="1fr 130px 110px 90px 70px";function yl(){const e=ve(),r=N(F=>F.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:c,tH1:g,tH2:f,tTitle:x,wH1:m,headFam:h,headLH:b,accentBg:u,btnText:y,btnShadow:v,tBody:E,tBodySm:B,tCaption:S,tOverline:j,bwEmph:T,btnCase:M,bodyWeightEff:P,pMain:X,sMain:Q,chartPalette:Y,table:d}=e,$=h+",sans-serif",H=r.fontFamily+",sans-serif",z=e.hc1||t.textPrimary,_=e.hc2||t.textPrimary,K=e.hc3||t.textPrimary,U=e.cardBorder==="none"?"none":e.cardBorder,[J,R,I]=Un(5,3,16),q=ml.slice(0,I).map((F,ee)=>({...F,sb:F.status==="Ready"?e.sucSoft:e.warnSoft,sc:F.status==="Ready"?e.sucTxt:e.warnTxt,rowBg:r.tableStripe&&ee%2===1?d.stripeBg:"transparent"})),V=xl.map((F,ee)=>({...F,c:Y[ee%Y.length]})),G={borderRight:d.colBorder,alignSelf:"stretch",display:"flex",alignItems:d.cellAI,justifyContent:d.cellJC,padding:`${d.rowPy} ${d.cellPx}`},O={alignSelf:"stretch",display:"flex",alignItems:d.cellAI,justifyContent:d.cellJC,padding:`${d.rowPy} ${d.cellPx}`},C={background:t.paper,border:U,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden"},A={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between"},D={fontSize:x,lineHeight:b,fontWeight:m,color:K,fontFamily:$},k={fontSize:j,fontWeight:T,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".5px"};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:U,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:H,fontWeight:P,color:t.textPrimary},children:[n.jsxs("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:14},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:b,fontWeight:m,color:z,letterSpacing:"-.3px",fontFamily:$},children:"Reports"}),n.jsx("span",{title:"Generated insights across every module",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:T,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]}),n.jsx("button",{style:{padding:"10px 20px",borderRadius:i,border:"none",background:u,color:y,fontSize:B,fontWeight:T,textTransform:M,letterSpacing:".4px",boxShadow:v,whiteSpace:"nowrap",cursor:"pointer"},children:"↓ Export PDF"})]}),n.jsxs("div",{style:{padding:c,background:t.bgDefault,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[n.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:l,marginBottom:l},children:ul.map(F=>n.jsxs("div",{style:C,children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:{fontSize:j,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".6px",fontWeight:T},children:F.label})}),n.jsx("div",{style:{padding:`${a}px ${s}px`},children:n.jsx("div",{style:{fontSize:f,fontWeight:m,color:_,letterSpacing:"-.8px",lineHeight:1},children:F.val})})]},F.label))}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 300px",gap:l,marginBottom:l},children:[n.jsxs("div",{style:C,children:[n.jsxs("div",{style:A,children:[n.jsx("span",{style:D,children:"Revenue & Profit Trend"}),n.jsx("span",{style:{fontSize:S,color:t.textSecondary,fontWeight:T},children:"6 months"})]}),n.jsx("div",{style:{padding:s,display:"flex",alignItems:"flex-end",gap:12,height:160},children:fl.map((F,ee)=>n.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",gap:6,height:"100%"},children:[n.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-end",gap:3,flex:1},children:[n.jsx("div",{style:{width:"100%",height:gl[ee]+"%",background:Q,opacity:.55,borderRadius:`${i} ${i} 0 0`}}),n.jsx("div",{style:{width:"100%",height:hl[ee]+"%",background:X,borderRadius:`${i} ${i} 0 0`}})]}),n.jsx("span",{style:{fontSize:S,color:t.textSecondary},children:F})]},F))})]}),n.jsxs("div",{style:C,children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:D,children:"By Module"})}),n.jsx("div",{style:{padding:s,display:"flex",alignItems:"flex-end",gap:10,height:128},children:V.map(F=>n.jsx("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:n.jsx("div",{style:{width:"100%",height:F.h+"%",background:F.c,borderRadius:`${i} ${i} 0 0`}})},F.l))})]})]}),n.jsxs("div",{style:{...C,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:D,children:"Recent Reports"})}),n.jsxs("div",{ref:J,style:{display:"grid",gridTemplateColumns:bn,padding:`0 ${s}px`,borderBottom:d.rowBorder,background:d.headBg},children:[["Report","Type","Status","Date"].map(F=>n.jsx("div",{style:{...k,...G},children:F},F)),n.jsx("div",{style:{alignSelf:"stretch",padding:`${d.rowPy} 0`}})]}),n.jsx("div",{ref:R,style:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:q.map(F=>n.jsxs("div",{style:{display:"grid",gridTemplateColumns:bn,padding:`0 ${s}px`,borderBottom:d.rowBorder,background:F.rowBg},children:[n.jsx("div",{style:{...O,fontSize:E,color:t.textPrimary,fontWeight:T},children:F.name}),n.jsx("div",{style:{...O,fontSize:B,color:t.textSecondary},children:F.type}),n.jsx("div",{style:O,children:n.jsx("span",{style:{padding:"4px 11px",borderRadius:999,fontSize:S,fontWeight:T,background:F.sb,color:F.sc,whiteSpace:"nowrap"},children:F.status})}),n.jsx("div",{style:{...O,fontSize:B,color:t.textSecondary},children:F.date}),n.jsx("div",{style:O,children:n.jsx("button",{style:{fontSize:S,color:X,background:t.pContainer,border:"none",fontWeight:T,padding:"5px 11px",borderRadius:i,cursor:"pointer"},children:"↓ PDF"})})]},F.name))})]})]})]})}const vn=({size:e})=>n.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),n.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),n.jsx("path",{d:"m21 15-5-5L5 21"})]});function bl(){const e=ve(),r=N(_=>_.settings),{t,rad:o,radSm:i,pad:s,tH1:a,tBody:l,tBodySm:c,tCaption:g,wH1:f,headLH:x,accentBg:m,btnText:h,btnShadow:b,bwEmph:u,pMain:y,iconInitials:v,hasLoginImage:E,loginCenteredGrad:B,loginScrimGradC:S}=e,j=r.fontFamily+",sans-serif",T=e.hc1||t.textPrimary,M=t.pContrast,P=e.cardBorder==="none"?"none":e.cardBorder,X=r.logoMode==="image"&&!!r.logoUrl,Q=e.isDark?t.paper2:"#ffffff",Y=r.loginPanelColor||t.bgDefault,d=r.loginImgOpacity>0?r.loginImgOpacity:1,$=E?n.jsx("img",{src:r.loginImage,alt:"",style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",zIndex:0,opacity:d}}):null,H={background:t.paper,border:P,borderRadius:o,boxShadow:e.cardShadow,padding:s,display:"flex",flexDirection:"column",gap:20},z=_=>({position:"relative",background:t.paper2,border:"1.5px solid "+(_?y:t.outline),borderRadius:i});return r.loginLayout==="centered"?n.jsxs("div",{style:{minHeight:560,background:B,display:"flex",alignItems:"center",justifyContent:"center",padding:40,position:"relative",overflow:"hidden",fontFamily:j,borderRadius:o},children:[$,E&&n.jsx("div",{style:{position:"absolute",inset:0,background:S,zIndex:0}}),n.jsxs("div",{style:{position:"relative",zIndex:1,width:"100%",maxWidth:380,background:t.paper,border:P,borderRadius:o,boxShadow:"0 24px 60px rgba(0,0,0,.35)",padding:s,display:"flex",flexDirection:"column",gap:20,alignItems:"center"},children:[n.jsx("div",{style:{width:72,height:72,borderRadius:20,background:r.iconColor,display:"grid",placeItems:"center",boxShadow:"0 6px 18px "+r.iconColor+"55"},children:n.jsx("span",{style:{color:"#fff",fontSize:24,fontWeight:u,letterSpacing:"-1px"},children:v})}),n.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",gap:14},children:[n.jsxs("div",{style:{position:"relative",border:"1.5px solid "+t.outline,borderRadius:i,padding:"13px 14px"},children:[n.jsx("span",{style:{position:"absolute",top:-8,left:11,background:t.paper,padding:"0 5px",fontSize:11,color:t.textSecondary},children:"Email"}),n.jsx("span",{style:{fontSize:l,color:t.textPrimary},children:"admin@company.com"})]}),n.jsxs("div",{style:{position:"relative",border:"1.5px solid "+t.outline,borderRadius:i,padding:"13px 14px"},children:[n.jsx("span",{style:{position:"absolute",top:-8,left:11,background:t.paper,padding:"0 5px",fontSize:11,color:t.textSecondary},children:"Password"}),n.jsx("span",{style:{fontSize:l,color:t.textPrimary,letterSpacing:3},children:"••••••••"})]}),n.jsx("button",{style:{padding:13,borderRadius:i,border:"none",background:m,color:h,fontSize:l,fontWeight:u,textTransform:"uppercase",letterSpacing:".5px",boxShadow:b,cursor:"pointer"},children:"Sign in"})]})]})]}):n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"3fr 1fr",minHeight:560,fontFamily:j,borderRadius:o,overflow:"hidden"},children:[n.jsxs("div",{style:{background:Q,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"48px 40px",gap:22,position:"relative",overflow:"hidden"},children:[$,!E&&n.jsxs("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,color:t.textSecondary,border:"1.5px dashed "+t.outline,padding:24,boxSizing:"border-box"},children:[n.jsx(vn,{size:46}),n.jsx("div",{style:{fontSize:14,fontWeight:u,color:t.textPrimary},children:"No brand image"}),n.jsx("div",{style:{fontSize:12,color:t.textSecondary,textAlign:"center",maxWidth:220},children:"Upload an image in the Login Screen settings to fill this panel."})]})]}),n.jsxs("div",{style:{background:Y,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:22,padding:"48px 40px"},children:[X?n.jsx("img",{src:r.logoUrl,alt:r.appName,style:{maxHeight:64,maxWidth:200,objectFit:"contain"}}):n.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:6,maxWidth:200,maxHeight:64,border:"1.5px dashed "+t.outline,borderRadius:i,boxSizing:"border-box",color:t.textSecondary,padding:"8px 16px"},children:[n.jsx(vn,{size:20}),n.jsx("span",{style:{fontSize:g,fontWeight:u,color:t.textSecondary,whiteSpace:"nowrap"},children:"No logo uploaded"})]}),n.jsxs("div",{style:{width:"100%",maxWidth:340,...H},children:[n.jsxs("div",{style:{textAlign:"center"},children:[n.jsx("div",{style:{fontSize:a,lineHeight:x,fontWeight:f,color:T,letterSpacing:"-.4px",marginBottom:5},children:"Welcome back"}),n.jsx("div",{style:{fontSize:c,color:t.textSecondary},children:"Sign in to continue"})]}),n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[n.jsxs("div",{children:[n.jsx("div",{style:{fontSize:g,fontWeight:u,color:t.textPrimary,marginBottom:7},children:"Email Address"}),n.jsxs("div",{style:{...z(!1),padding:"12px 14px 12px 40px"},children:[n.jsx("span",{style:{position:"absolute",left:13,top:"50%",transform:"translateY(-50%)",color:t.textSecondary,fontSize:14},children:"✉"}),n.jsx("span",{style:{fontSize:l,color:t.textPrimary},children:"admin@company.com"})]})]}),n.jsxs("div",{children:[n.jsx("div",{style:{fontSize:g,fontWeight:u,color:t.textPrimary,marginBottom:7},children:"Password"}),n.jsxs("div",{style:{...z(!0),padding:"12px 40px 12px 40px"},children:[n.jsx("span",{style:{position:"absolute",left:13,top:"50%",transform:"translateY(-50%)",color:t.textSecondary,fontSize:14},children:"🔒"}),n.jsx("span",{style:{fontSize:l,color:t.textPrimary,letterSpacing:3},children:"••••••••"}),n.jsx("span",{style:{position:"absolute",right:13,top:"50%",transform:"translateY(-50%)",color:t.textSecondary,fontSize:14},children:"👁"})]})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{width:17,height:17,borderRadius:4,background:y,display:"grid",placeItems:"center",color:M,fontSize:11,fontWeight:u},children:"✓"}),n.jsx("span",{style:{fontSize:c,color:t.textPrimary},children:"Remember me"})]}),n.jsx("span",{style:{fontSize:c,color:y,fontWeight:u},children:"Forgot password?"})]}),n.jsxs("button",{style:{padding:13,borderRadius:i,border:"none",background:m,color:h,fontSize:l,fontWeight:u,letterSpacing:".3px",boxShadow:b,marginTop:2,display:"flex",alignItems:"center",justifyContent:"center",gap:8,cursor:"pointer"},children:["Login ",n.jsx("span",{style:{fontSize:15},children:"→"})]})]}),n.jsxs("div",{style:{textAlign:"center",fontSize:g,color:t.textSecondary},children:["Powered by ",n.jsx("span",{style:{color:y,fontWeight:u},children:r.appName})," © 2026"]})]})]})]})}function vl(){const e=ve(),r=N(b=>b.settings),[t,o]=L.useState(!1);if(t)return null;const{t:i,npos:s,nacc:a,toastDeco:l,toastBg:c,rad:g,radSm:f,tBodySm:x,tCaption:m}=e,h=(r.toastW>0?r.toastW:252)+"px";return n.jsxs("div",{style:{position:"absolute",zIndex:40,width:h,maxWidth:"70%",boxSizing:"border-box",background:c,borderRadius:g,display:"flex",gap:"10px",alignItems:"flex-start",padding:"12px 13px",fontFamily:r.fontFamily+",sans-serif",...s,...l},children:[n.jsx("div",{style:{width:"30px",height:"30px",borderRadius:f,background:a.icbg,color:a.icc,display:"grid",placeItems:"center",flexShrink:0,fontSize:"15px",fontWeight:800},children:"!"}),n.jsxs("div",{style:{flex:1,minWidth:0},children:[n.jsx("div",{style:{fontSize:x+"px",fontWeight:700,color:i.textPrimary,marginBottom:"2px"},children:"Low stock alert"}),n.jsx("div",{style:{fontSize:m+"px",color:i.textSecondary,lineHeight:1.4},children:"Widget Pro is down to 12 units left."})]}),r.notifAutoDismiss&&n.jsx("div",{title:"Auto-dismiss countdown",style:{flexShrink:0,marginTop:"1px",minWidth:"26px",height:"20px",padding:"0 7px",borderRadius:"999px",background:ce(a.dot,.14),color:a.dot,fontSize:m-.5+"px",fontWeight:800,display:"grid",placeItems:"center",fontVariantNumeric:"tabular-nums"},children:(r.autoDismissSec>0?r.autoDismissSec:8)+"s"}),n.jsx("button",{title:"Dismiss notification",onClick:()=>o(!0),style:{flexShrink:0,width:"20px",height:"20px",marginTop:"1px",border:"none",background:"transparent",color:i.textSecondary,cursor:"pointer",borderRadius:"6px",display:"grid",placeItems:"center",padding:0,lineHeight:1},children:n.jsx("svg",{width:13,height:13,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.4,strokeLinecap:"round",children:n.jsx("path",{d:"M18 6 6 18M6 6l12 12"})})})]})}const Sl=[75,90,100,125];function Cl(){var f;const e=Ke(x=>x.previewScreen),r=N(x=>x.settings.edgePadPx)||0,t=e==="operations"?0:r,[o,i]=L.useState("fit"),s=L.useRef(null),a=L.useRef(null),[l,c]=L.useState(100);L.useLayoutEffect(()=>{const x=s.current,m=a.current;if(!x||!m)return;const h=()=>{const E=getComputedStyle(x),B=(parseFloat(E.paddingTop)||0)+(parseFloat(E.paddingBottom)||0);if(o!=="fit"){const d=o/100;m.style.zoom=String(d);const $=x.clientHeight-B;m.style.minHeight=($>0?Math.floor($/d):0)+"px",c(o);return}m.style.zoom="1",m.style.minHeight="0px",m.offsetHeight;const S=(parseFloat(E.paddingLeft)||0)+(parseFloat(E.paddingRight)||0),j=x.clientWidth-S,T=x.clientHeight-B,M=m.scrollWidth,P=m.scrollHeight;if(M<=0||P<=0||j<=0||T<=0)return;const X=Math.min(j/M,T/P,1),Q=X<.985?Math.max(.36,X):1;m.style.zoom=String(Q);const Y=Math.min(j/M,1);m.style.minHeight=Math.floor(T/Math.max(Y,.36))+"px",c(Math.round(Q*100))};let b=0,u=0;const y=()=>{h(),++u<36&&(b=requestAnimationFrame(y))};y();const v=new ResizeObserver(h);return v.observe(x),v.observe(m),()=>{cancelAnimationFrame(b),v.disconnect()}},[o,t,e]);const g=((f=qs.find(x=>x.key===e))==null?void 0:f.label)??"";return n.jsxs(p.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",bgcolor:"background.default"},children:[n.jsxs(p.Box,{sx:{px:2.5,py:1.25,borderBottom:"1px solid",borderColor:"divider",display:"flex",alignItems:"center",gap:1.5,bgcolor:"background.paper"},children:[n.jsx(Qs,{sx:{fontSize:22,color:"text.secondary"}}),n.jsxs(p.Typography,{variant:"h5",sx:{flex:1,fontSize:18,fontWeight:700,letterSpacing:"-.2px"},children:["Previewing ",g]}),n.jsxs(p.Select,{size:"small",value:o,onChange:x=>i(x.target.value==="fit"?"fit":Number(x.target.value)),sx:{minWidth:128,fontSize:13,fontWeight:600,"& .MuiSelect-select":{py:.75}},children:[n.jsxs(p.MenuItem,{value:"fit",children:["Fit (",l,"%)"]}),Sl.map(x=>n.jsxs(p.MenuItem,{value:x,children:[x,"%"]},x))]})]}),n.jsxs(p.Box,{ref:s,sx:{flex:1,overflow:"auto",p:`${t}px`,position:"relative",bgcolor:"background.default"},children:[n.jsxs(p.Box,{ref:a,sx:{width:"100%",display:"flex",flexDirection:"column","& > *":{flex:"1 1 0%",minHeight:0}},children:[e==="dashboard"&&n.jsx(rl,{}),e==="orders"&&n.jsx(ol,{}),e==="reports"&&n.jsx(yl,{}),e==="cameras"&&n.jsx(dl,{}),e==="operations"&&n.jsx(pl,{}),e==="components"&&n.jsx(il,{}),e==="login"&&n.jsx(bl,{})]}),e!=="login"&&n.jsx(vl,{})]})]})}const jl=300,wl=520;function Tl(){const[e,r]=L.useState(!0),[t,o]=L.useState(300),[i,s]=L.useState(!1),a=N(y=>y.isDirty),l=N(y=>y.captureBaseline),c=N(y=>y.restoreBaseline),g=He(N(y=>y.settings.mode)),f=N(y=>y.settings.customFonts),x=N(y=>y.settings.customHeadFonts),m=L.useRef(null);L.useEffect(()=>{mn(f),mn(x)},[f,x]);const h=y=>{y.preventDefault(),m.current={x:y.clientX,w:t};const v=B=>{if(!m.current)return;const S=Math.max(jl,Math.min(wl,m.current.w+(B.clientX-m.current.x)));o(S)},E=()=>{m.current=null,window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",E)};window.addEventListener("mousemove",v),window.addEventListener("mouseup",E)},b=()=>{a()?s(!0):r(!1)},u=()=>{r(!0),l()};return n.jsxs(p.Box,{sx:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",bgcolor:"background.paper"},children:[n.jsx(p.Box,{sx:{flex:1,minHeight:0,display:"flex"},children:n.jsxs(p.Box,{sx:{flex:1,minWidth:0,display:"flex",bgcolor:"background.default",borderTop:"1px solid",borderColor:"divider"},children:[e?n.jsxs(p.Box,{sx:{display:"flex",flexShrink:0},children:[n.jsx(p.Box,{sx:{width:t,flexShrink:0,borderRight:`1px solid ${g.studioBd}`,display:"flex",flexDirection:"column",bgcolor:g.card,overflow:"auto",scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}},children:n.jsx(Xs,{onClose:b})}),n.jsx(p.Box,{onMouseDown:h,sx:{width:5,cursor:"col-resize",flexShrink:0,bgcolor:"divider",opacity:.4,"&:hover":{opacity:1,bgcolor:"primary.main"}}})]}):n.jsx(p.Tooltip,{title:"Open Theme Studio",placement:"right",arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.IconButton,{onClick:u,sx:{position:"absolute",left:68,bottom:56,zIndex:10,bgcolor:"primary.main",color:"primary.contrastText",boxShadow:4,"&:hover":{bgcolor:"primary.dark"}},children:n.jsx(gs,{})})}),n.jsx(Cl,{})]})}),n.jsxs(p.Dialog,{open:i,onClose:()=>s(!1),PaperProps:{sx:{borderRadius:3,width:300,p:2.5}},children:[n.jsx(p.Typography,{sx:{fontSize:15,fontWeight:800,mb:.75},children:"Save changes?"}),n.jsx(p.Typography,{sx:{fontSize:12.5,color:"text.secondary",lineHeight:1.5,mb:2.25},children:"You've made changes to the theme. Do you want to save them before leaving?"}),n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[n.jsx(p.Box,{component:"button",onClick:()=>{l(),s(!1),r(!1)},sx:{p:1.4,borderRadius:2.5,border:"none",bgcolor:"primary.main",color:"primary.contrastText",fontSize:13,fontWeight:700,cursor:"pointer"},children:"Save & exit"}),n.jsx(p.Box,{component:"button",onClick:()=>{c(),s(!1),r(!1)},sx:{p:1.4,borderRadius:2.5,border:"1px solid",borderColor:"divider",bgcolor:"action.hover",color:"text.secondary",fontSize:13,fontWeight:600,cursor:"pointer"},children:"Discard & exit"}),n.jsx(p.Box,{component:"button",onClick:()=>s(!1),sx:{p:1.1,borderRadius:2.5,border:"none",bgcolor:"transparent",color:"text.secondary",fontSize:12.5,fontWeight:600,cursor:"pointer"},children:"Keep editing"})]})]})]})}function kl(e){const r=kr(e),t=r.t,o=`${r.headFam},sans-serif`,i=`${r.bodyFam},sans-serif`,s=a=>({fontFamily:o,fontSize:a,fontWeight:r.wH1,lineHeight:r.headLH});if(typeof window<"u"&&typeof document<"u"){const a=["Roboto","Inter","DM Sans","Manrope","Plus Jakarta Sans","Nunito Sans","Figtree"],c=[e.fontFamily,e.headingFont].filter(Boolean).map(f=>f.replace(/"/g,"").replace(/'/g,"")),g=Array.from(new Set(c)).filter(f=>a.includes(f));if(g.length>0){const f="dynamic-google-fonts";let x=document.getElementById(f);const h=`https://fonts.googleapis.com/css2?${g.map(b=>`family=${b.replace(/ /g,"+")}:wght@300;400;500;600;700;800;900`).join("&")}&display=swap`;x||(x=document.createElement("link"),x.id=f,x.rel="stylesheet",document.head.appendChild(x)),x.href=h}}return Ln({palette:{mode:e.mode,primary:{main:r.pMain,dark:r.pal[700],light:r.pal[300],contrastText:t.pContrast},secondary:{main:r.sMain,dark:r.spal[700],light:r.spal[300],contrastText:t.sContrast},success:{main:e.successHex},warning:{main:e.warningHex},info:{main:e.infoHex},error:{main:e.errorHex},background:{default:t.bgDefault,paper:t.paper},text:{primary:t.textPrimary,secondary:t.textSecondary,disabled:t.textDisabled},divider:t.divider},shape:{borderRadius:r.r},typography:{fontFamily:i,fontSize:r.base,h1:s(r.tH1),h2:s(r.tH2),h3:s(r.tTitle),h4:s(r.tH4),h5:s(r.tH5),h6:s(r.tH6),body1:{fontFamily:i,fontSize:r.tBody,lineHeight:r.bodyLH,fontWeight:r.bodyWeightEff},body2:{fontFamily:i,fontSize:r.tBodySm,lineHeight:r.bodyLH,fontWeight:r.bodyWeightEff},caption:{fontFamily:i,fontSize:r.tCaption,lineHeight:r.bodyLH},button:{textTransform:r.btnCase,fontWeight:r.bwEmph}},components:{MuiCssBaseline:{styleOverrides:{"button, input, textarea, select":{fontFamily:"inherit"}}},MuiCard:{styleOverrides:{root:{borderRadius:r.r,border:r.cardBorder==="none"?"none":r.cardBorder,boxShadow:r.cardShadow,backgroundImage:"none"}}},MuiCardHeader:{styleOverrides:{root:{backgroundColor:r.cardHdrBg,borderBottom:r.cardHdrBorder,boxShadow:r.cardHdrAccent}}},MuiDialog:{styleOverrides:{paper:{borderRadius:r.r,border:r.cardBorder==="none"?"none":r.cardBorder,boxShadow:r.cardShadow,backgroundImage:"none"}}},MuiDialogTitle:{styleOverrides:{root:{backgroundColor:r.cardHdrBg,borderBottom:r.cardHdrBorder,boxShadow:r.cardHdrAccent}}},MuiButton:{styleOverrides:{root:{borderRadius:r.r,boxShadow:"none"}},defaultProps:{disableElevation:!0},variants:e.accentGradient?[{props:{variant:"contained"},style:{backgroundImage:r.accentBg}}]:[]},MuiChip:{styleOverrides:{root:{borderRadius:999,fontWeight:e.statusBold?700:500}}}},urmTable:{rowPaddingY:r.table.rowPy,cellPaddingX:r.table.cellPx,headerBg:r.table.headBg,rowDivider:r.table.rowBorder,colDivider:r.table.colBorder,cellAlignH:e.tableCellAlignH,cellAlignV:e.tableCellAlignV,striped:e.tableStripe,stripeBg:r.table.stripeBg},tokens:{toastW:e.toastW>0?e.toastW:void 0,cardBorder:r.toastDeco.border,cardShadow:r.toastDeco.boxShadow,cardBodyBorder:r.cardBorder==="none"?"none":r.cardBorder,cardBodyShadow:r.cardShadow,cardHdrBg:r.cardHdrBg,cardHdrBorder:r.cardHdrBorder,cardHdrAccent:r.cardHdrAccent,cardHeader:e.cardHeader,status:{errSoft:r.errSoft,warnSoft:r.warnSoft,infoSoft:r.infoSoft,sucSoft:r.sucSoft,errTxt:r.errTxt,warnTxt:r.warnTxt,infoTxt:r.infoTxt,sucTxt:r.sucTxt},notifPosition:e.notifPosition,notifStyle:e.notifStyle,notifAccent:e.notifAccent,notifAutoDismiss:e.notifAutoDismiss,toastBg:r.toastBg,autoDismissSec:e.autoDismissSec>0?e.autoDismissSec:void 0,statusBold:e.statusBold,cardHdrHex:e.cardHdrHex||void 0,containerPad:r.screenPad,cardGap:r.gap,edgePad:e.edgePadPx,highlight:t.highlight,highlightSoft:t.highlightSoft,highlightBd:t.highlightBd}})}exports.DEFAULT_SETTINGS=Re;exports.ThemeStudio=Tl;exports.buildMuiTheme=kl;exports.useThemeStore=N;