omnieye-theme-studio 1.1.2 → 1.1.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.esm.js +2304 -2110
- package/dist/index.js +20 -20
- package/package.json +1 -1
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"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),U=require("react"),f=require("@mui/material"),Eo=require("@emotion/styled");require("@emotion/react");const Ho=require("react-dom");function Po(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=Po(U),Ar=e=>e,$o=()=>{let e=Ar;return{configure(r){e=r},generate(r){return e(r)},reset(){e=Ar}}},Ao=$o();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 Io(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kt={exports:{}},Tt={exports:{}},te={};/** @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
|
|
8
|
+
*/var Ir;function Oo(){if(Ir)return te;Ir=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,u=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,x=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,k=e?Symbol.for("react.responder"):60118,P=e?Symbol.for("react.scope"):60119;function $(C){if(typeof C=="object"&&C!==null){var R=C.$$typeof;switch(R){case r:switch(C=C.type,C){case c:case u:case o:case s:case i:case x:return C;default:switch(C=C&&C.$$typeof,C){case l:case h:case y:case g:case a:return C;default:return R}}case t:return R}}}function v(C){return $(C)===u}return te.AsyncMode=c,te.ConcurrentMode=u,te.ContextConsumer=l,te.ContextProvider=a,te.Element=r,te.ForwardRef=h,te.Fragment=o,te.Lazy=y,te.Memo=g,te.Portal=t,te.Profiler=s,te.StrictMode=i,te.Suspense=x,te.isAsyncMode=function(C){return v(C)||$(C)===c},te.isConcurrentMode=v,te.isContextConsumer=function(C){return $(C)===l},te.isContextProvider=function(C){return $(C)===a},te.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===r},te.isForwardRef=function(C){return $(C)===h},te.isFragment=function(C){return $(C)===o},te.isLazy=function(C){return $(C)===y},te.isMemo=function(C){return $(C)===g},te.isPortal=function(C){return $(C)===t},te.isProfiler=function(C){return $(C)===s},te.isStrictMode=function(C){return $(C)===i},te.isSuspense=function(C){return $(C)===x},te.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===o||C===u||C===s||C===i||C===x||C===m||typeof C=="object"&&C!==null&&(C.$$typeof===y||C.$$typeof===g||C.$$typeof===a||C.$$typeof===l||C.$$typeof===h||C.$$typeof===b||C.$$typeof===k||C.$$typeof===P||C.$$typeof===p)},te.typeOf=$,te}var re={};/** @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
|
|
15
|
+
*/var Or;function Do(){return Or||(Or=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,u=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,x=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,k=e?Symbol.for("react.responder"):60118,P=e?Symbol.for("react.scope"):60119;function $(F){return typeof F=="string"||typeof F=="function"||F===o||F===u||F===s||F===i||F===x||F===m||typeof F=="object"&&F!==null&&(F.$$typeof===y||F.$$typeof===g||F.$$typeof===a||F.$$typeof===l||F.$$typeof===h||F.$$typeof===b||F.$$typeof===k||F.$$typeof===P||F.$$typeof===p)}function v(F){if(typeof F=="object"&&F!==null){var he=F.$$typeof;switch(he){case r:var Oe=F.type;switch(Oe){case c:case u:case o:case s:case i:case x:return Oe;default:var De=Oe&&Oe.$$typeof;switch(De){case l:case h:case y:case g:case a:return De;default:return he}}case t:return he}}}var C=c,R=u,M=l,I=a,J=r,q=h,G=o,d=y,E=g,B=t,D=s,z=i,V=x,K=!1;function Y(F){return K||(K=!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.")),T(F)||v(F)===c}function T(F){return v(F)===u}function S(F){return v(F)===l}function L(F){return v(F)===a}function j(F){return typeof F=="object"&&F!==null&&F.$$typeof===r}function O(F){return v(F)===h}function A(F){return v(F)===o}function _(F){return v(F)===y}function W(F){return v(F)===g}function H(F){return v(F)===t}function X(F){return v(F)===s}function Q(F){return v(F)===i}function fe(F){return v(F)===x}re.AsyncMode=C,re.ConcurrentMode=R,re.ContextConsumer=M,re.ContextProvider=I,re.Element=J,re.ForwardRef=q,re.Fragment=G,re.Lazy=d,re.Memo=E,re.Portal=B,re.Profiler=D,re.StrictMode=z,re.Suspense=V,re.isAsyncMode=Y,re.isConcurrentMode=T,re.isContextConsumer=S,re.isContextProvider=L,re.isElement=j,re.isForwardRef=O,re.isFragment=A,re.isLazy=_,re.isMemo=W,re.isPortal=H,re.isProfiler=X,re.isStrictMode=Q,re.isSuspense=fe,re.isValidElementType=$,re.typeOf=v})()),re}var Dr;function yn(){return Dr||(Dr=1,process.env.NODE_ENV==="production"?Tt.exports=Oo():Tt.exports=Do()),Tt.exports}/*
|
|
16
16
|
object-assign
|
|
17
17
|
(c) Sindre Sorhus
|
|
18
18
|
@license MIT
|
|
19
|
-
*/var
|
|
20
|
-
Valid keys: `+JSON.stringify(Object.keys(T),null," "));var F=
|
|
19
|
+
*/var Qt,Mr;function Mo(){if(Mr)return Qt;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(h){return a[h]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(h){u[h]=h}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Qt=i()?Object.assign:function(s,a){for(var l,c=o(s),u,h=1;h<arguments.length;h++){l=Object(arguments[h]);for(var x in l)r.call(l,x)&&(c[x]=l[x]);if(e){u=e(l);for(var m=0;m<u.length;m++)t.call(l,u[m])&&(c[u[m]]=l[u[m]])}}return c},Qt}var Zt,Fr;function br(){if(Fr)return Zt;Fr=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Zt=e,Zt}var er,Wr;function bn(){return Wr||(Wr=1,er=Function.call.bind(Object.prototype.hasOwnProperty)),er}var tr,zr;function Fo(){if(zr)return tr;zr=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var r=br(),t={},o=bn();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,u){if(process.env.NODE_ENV!=="production"){for(var h in s)if(o(s,h)){var x;try{if(typeof s[h]!="function"){var m=Error((c||"React class")+": "+l+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}x=s[h](a,h,c,l,null,r)}catch(y){x=y}if(x&&!(x instanceof Error)&&e((c||"React class")+": type specification of "+l+" `"+h+"` 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 g=u?u():"";e("Failed "+l+" type: "+x.message+(g??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},tr=i,tr}var rr,_r;function Wo(){if(_r)return rr;_r=1;var e=yn(),r=Mo(),t=br(),o=bn(),i=Fo(),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 rr=function(l,c){var u=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function x(T){var S=T&&(u&&T[u]||T[h]);if(typeof S=="function")return S}var m="<<anonymous>>",g={array:k("array"),bigint:k("bigint"),bool:k("boolean"),func:k("function"),number:k("number"),object:k("object"),string:k("string"),symbol:k("symbol"),any:P(),arrayOf:$,element:v(),elementType:C(),instanceOf:R,node:q(),objectOf:I,oneOf:M,oneOfType:J,shape:d,exact:E};function y(T,S){return T===S?T!==0||1/T===1/S:T!==T&&S!==S}function p(T,S){this.message=T,this.data=S&&typeof S=="object"?S:{},this.stack=""}p.prototype=Error.prototype;function b(T){if(process.env.NODE_ENV!=="production")var S={},L=0;function j(A,_,W,H,X,Q,fe){if(H=H||m,Q=Q||W,fe!==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 he=H+":"+W;!S[he]&&L<3&&(s("You are manually calling a React.PropTypes validation function for the `"+Q+"` prop on `"+H+"`. 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."),S[he]=!0,L++)}}return _[W]==null?A?_[W]===null?new p("The "+X+" `"+Q+"` is marked as required "+("in `"+H+"`, but its value is `null`.")):new p("The "+X+" `"+Q+"` is marked as required in "+("`"+H+"`, but its value is `undefined`.")):null:T(_,W,H,X,Q)}var O=j.bind(null,!1);return O.isRequired=j.bind(null,!0),O}function k(T){function S(L,j,O,A,_,W){var H=L[j],X=z(H);if(X!==T){var Q=V(H);return new p("Invalid "+A+" `"+_+"` of type "+("`"+Q+"` supplied to `"+O+"`, expected ")+("`"+T+"`."),{expectedType:T})}return null}return b(S)}function P(){return b(a)}function $(T){function S(L,j,O,A,_){if(typeof T!="function")return new p("Property `"+_+"` of component `"+O+"` has invalid PropType notation inside arrayOf.");var W=L[j];if(!Array.isArray(W)){var H=z(W);return new p("Invalid "+A+" `"+_+"` of type "+("`"+H+"` supplied to `"+O+"`, expected an array."))}for(var X=0;X<W.length;X++){var Q=T(W,X,O,A,_+"["+X+"]",t);if(Q instanceof Error)return Q}return null}return b(S)}function v(){function T(S,L,j,O,A){var _=S[L];if(!l(_)){var W=z(_);return new p("Invalid "+O+" `"+A+"` of type "+("`"+W+"` supplied to `"+j+"`, expected a single ReactElement."))}return null}return b(T)}function C(){function T(S,L,j,O,A){var _=S[L];if(!e.isValidElementType(_)){var W=z(_);return new p("Invalid "+O+" `"+A+"` of type "+("`"+W+"` supplied to `"+j+"`, expected a single ReactElement type."))}return null}return b(T)}function R(T){function S(L,j,O,A,_){if(!(L[j]instanceof T)){var W=T.name||m,H=Y(L[j]);return new p("Invalid "+A+" `"+_+"` of type "+("`"+H+"` supplied to `"+O+"`, expected ")+("instance of `"+W+"`."))}return null}return b(S)}function M(T){if(!Array.isArray(T))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 S(L,j,O,A,_){for(var W=L[j],H=0;H<T.length;H++)if(y(W,T[H]))return null;var X=JSON.stringify(T,function(fe,F){var he=V(F);return he==="symbol"?String(F):F});return new p("Invalid "+A+" `"+_+"` of value `"+String(W)+"` "+("supplied to `"+O+"`, expected one of "+X+"."))}return b(S)}function I(T){function S(L,j,O,A,_){if(typeof T!="function")return new p("Property `"+_+"` of component `"+O+"` has invalid PropType notation inside objectOf.");var W=L[j],H=z(W);if(H!=="object")return new p("Invalid "+A+" `"+_+"` of type "+("`"+H+"` supplied to `"+O+"`, expected an object."));for(var X in W)if(o(W,X)){var Q=T(W,X,O,A,_+"."+X,t);if(Q instanceof Error)return Q}return null}return b(S)}function J(T){if(!Array.isArray(T))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var S=0;S<T.length;S++){var L=T[S];if(typeof L!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+K(L)+" at index "+S+"."),a}function j(O,A,_,W,H){for(var X=[],Q=0;Q<T.length;Q++){var fe=T[Q],F=fe(O,A,_,W,H,t);if(F==null)return null;F.data&&o(F.data,"expectedType")&&X.push(F.data.expectedType)}var he=X.length>0?", expected one of type ["+X.join(", ")+"]":"";return new p("Invalid "+W+" `"+H+"` supplied to "+("`"+_+"`"+he+"."))}return b(j)}function q(){function T(S,L,j,O,A){return B(S[L])?null:new p("Invalid "+O+" `"+A+"` supplied to "+("`"+j+"`, expected a ReactNode."))}return b(T)}function G(T,S,L,j,O){return new p((T||"React class")+": "+S+" type `"+L+"."+j+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+O+"`.")}function d(T){function S(L,j,O,A,_){var W=L[j],H=z(W);if(H!=="object")return new p("Invalid "+A+" `"+_+"` of type `"+H+"` "+("supplied to `"+O+"`, expected `object`."));for(var X in T){var Q=T[X];if(typeof Q!="function")return G(O,A,_,X,V(Q));var fe=Q(W,X,O,A,_+"."+X,t);if(fe)return fe}return null}return b(S)}function E(T){function S(L,j,O,A,_){var W=L[j],H=z(W);if(H!=="object")return new p("Invalid "+A+" `"+_+"` of type `"+H+"` "+("supplied to `"+O+"`, expected `object`."));var X=r({},L[j],T);for(var Q in X){var fe=T[Q];if(o(T,Q)&&typeof fe!="function")return G(O,A,_,Q,V(fe));if(!fe)return new p("Invalid "+A+" `"+_+"` key `"+Q+"` supplied to `"+O+"`.\nBad object: "+JSON.stringify(L[j],null," ")+`
|
|
20
|
+
Valid keys: `+JSON.stringify(Object.keys(T),null," "));var F=fe(W,Q,O,A,_+"."+Q,t);if(F)return F}return null}return b(S)}function B(T){switch(typeof T){case"number":case"string":case"undefined":return!0;case"boolean":return!T;case"object":if(Array.isArray(T))return T.every(B);if(T===null||l(T))return!0;var S=x(T);if(S){var L=S.call(T),j;if(S!==T.entries){for(;!(j=L.next()).done;)if(!B(j.value))return!1}else for(;!(j=L.next()).done;){var O=j.value;if(O&&!B(O[1]))return!1}}else return!1;return!0;default:return!1}}function D(T,S){return T==="symbol"?!0:S?S["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&S instanceof Symbol:!1}function z(T){var S=typeof T;return Array.isArray(T)?"array":T instanceof RegExp?"object":D(S,T)?"symbol":S}function V(T){if(typeof T>"u"||T===null)return""+T;var S=z(T);if(S==="object"){if(T instanceof Date)return"date";if(T instanceof RegExp)return"regexp"}return S}function K(T){var S=V(T);switch(S){case"array":case"object":return"an "+S;case"boolean":case"date":case"regexp":return"a "+S;default:return S}}function Y(T){return!T.constructor||!T.constructor.name?m:T.constructor.name}return g.checkPropTypes=i,g.resetWarningCache=i.resetWarningCache,g.PropTypes=g,g},rr}var nr,Lr;function zo(){if(Lr)return nr;Lr=1;var e=br();function r(){}function t(){}return t.resetWarningCache=r,nr=function(){function o(a,l,c,u,h,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},nr}var Nr;function _o(){if(Nr)return kt.exports;if(Nr=1,process.env.NODE_ENV!=="production"){var e=yn(),r=!0;kt.exports=Wo()(e.isElement,r)}else kt.exports=zo()();return kt.exports}var Lo=_o();const ee=Io(Lo);function vn(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=vn(e[r]))&&(o&&(o+=" "),o+=t)}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function Sn(){for(var e,r,t=0,o="",i=arguments.length;t<i;t++)(e=arguments[t])&&(r=vn(e))&&(o&&(o+=" "),o+=r);return o}function No(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 u=s[c];u&&(a+=(l===!0?"":" ")+r(u),l=!1,t&&t[u]&&(a+=" "+t[u]))}o[i]=a}return o}var Bt={exports:{}},ie={};/**
|
|
21
21
|
* @license React
|
|
22
22
|
* react-is.production.js
|
|
23
23
|
*
|
|
@@ -25,7 +25,7 @@ Valid keys: `+JSON.stringify(Object.keys(T),null," "));var F=le(L,Q,V,O,Y+"."+Q
|
|
|
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
|
|
28
|
+
*/var Vr;function Vo(){if(Vr)return ie;Vr=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"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");function y(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case e:switch(p=p.type,p){case t:case i:case o:case c:case u:case m:return p;default:switch(p=p&&p.$$typeof,p){case a:case l:case x:case h:return p;case s:return p;default:return b}}case r:return b}}}return ie.ContextConsumer=s,ie.ContextProvider=a,ie.Element=e,ie.ForwardRef=l,ie.Fragment=t,ie.Lazy=x,ie.Memo=h,ie.Portal=r,ie.Profiler=i,ie.StrictMode=o,ie.Suspense=c,ie.SuspenseList=u,ie.isContextConsumer=function(p){return y(p)===s},ie.isContextProvider=function(p){return y(p)===a},ie.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},ie.isForwardRef=function(p){return y(p)===l},ie.isFragment=function(p){return y(p)===t},ie.isLazy=function(p){return y(p)===x},ie.isMemo=function(p){return y(p)===h},ie.isPortal=function(p){return y(p)===r},ie.isProfiler=function(p){return y(p)===i},ie.isStrictMode=function(p){return y(p)===o},ie.isSuspense=function(p){return y(p)===c},ie.isSuspenseList=function(p){return y(p)===u},ie.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===t||p===i||p===o||p===c||p===u||typeof p=="object"&&p!==null&&(p.$$typeof===x||p.$$typeof===h||p.$$typeof===a||p.$$typeof===s||p.$$typeof===l||p.$$typeof===g||p.getModuleId!==void 0)},ie.typeOf=y,ie}var ae={};/**
|
|
29
29
|
* @license React
|
|
30
30
|
* react-is.development.js
|
|
31
31
|
*
|
|
@@ -33,22 +33,22 @@ Valid keys: `+JSON.stringify(Object.keys(T),null," "));var F=le(L,Q,V,O,Y+"."+Q
|
|
|
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
|
|
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
|
|
36
|
+
*/var Ur;function Uo(){return Ur||(Ur=1,process.env.NODE_ENV!=="production"&&(function(){function e(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case r:switch(p=p.type,p){case o:case s:case i:case u:case h:case g:return p;default:switch(p=p&&p.$$typeof,p){case l:case c:case m:case x:return p;case a:return p;default:return b}}case t:return b}}}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"),u=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.view_transition"),y=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=u,ae.SuspenseList=h,ae.isContextConsumer=function(p){return e(p)===a},ae.isContextProvider=function(p){return e(p)===l},ae.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===r},ae.isForwardRef=function(p){return e(p)===c},ae.isFragment=function(p){return e(p)===o},ae.isLazy=function(p){return e(p)===m},ae.isMemo=function(p){return e(p)===x},ae.isPortal=function(p){return e(p)===t},ae.isProfiler=function(p){return e(p)===s},ae.isStrictMode=function(p){return e(p)===i},ae.isSuspense=function(p){return e(p)===u},ae.isSuspenseList=function(p){return e(p)===h},ae.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===o||p===s||p===i||p===u||p===h||typeof p=="object"&&p!==null&&(p.$$typeof===m||p.$$typeof===x||p.$$typeof===l||p.$$typeof===a||p.$$typeof===c||p.$$typeof===y||p.getModuleId!==void 0)},ae.typeOf=e})()),ae}var Gr;function Go(){return Gr||(Gr=1,process.env.NODE_ENV==="production"?Bt.exports=Vo():Bt.exports=Uo()),Bt.exports}var $t=Go();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 Cn(e){if(_e.isValidElement(e)||$t.isValidElementType(e)||!Ae(e))return e;const r={};return Object.keys(e).forEach(t=>{r[t]=Cn(e[t])}),r}function je(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])||$t.isValidElementType(r[i])?o[i]=r[i]:Ae(r[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Ae(e[i])?o[i]=je(e[i],r[i],t):t.clone?o[i]=Ae(r[i])?Cn(r[i]):r[i]:o[i]=r[i]}),o}function mt(e,r){return r?je(e,r,{clone:!1}):e}const Ne=process.env.NODE_ENV!=="production"?ee.oneOfType([ee.number,ee.string,ee.object,ee.array]):{};function Yr(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 Yo(e,r){return r==="@"||r.startsWith("@")&&(e.some(t=>r.startsWith(`@${t}`))||!!r.match(/^@\d/))}function Jo(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 qo(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 Dt={xs:0,sm:600,md:900,lg:1200,xl:1536},Jr={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Dt[e]}px)`},Ko={containerQueries:e=>({up:r=>{let t=typeof r=="number"?r:Dt[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||Jr;return r.reduce((a,l,c)=>(a[s.up(s.keys[c])]=t(r[c]),a),{})}if(typeof r=="object"){const s=o.breakpoints||Jr;return Object.keys(r).reduce((a,l)=>{if(Yo(s.keys,l)){const c=Jo(o.containerQueries?o:Ko,l);c&&(a[c]=t(r[l],l))}else if(Object.keys(s.values||Dt).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 Xo(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((o,i)=>{const s=e.up(i);return o[s]={},o},{}))||{}}function qr(e,r){return e.reduce((t,o)=>{const i=t[o];return(!i||Object.keys(i).length===0)&&delete t[o],t},r)}function Mt(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=Mt(e,t)||o,r&&(i=r(i,o,e)),i}function ue(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,u=Mt(c,o)||{};return Ie(a,l,x=>{let m=At(u,i,x);return x===m&&typeof x=="string"&&(m=At(u,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 Qo(e){const r={};return t=>(r[t]===void 0&&(r[t]=e(t)),r[t])}const Zo={m:"margin",p:"padding"},ei={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Kr={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},ti=Qo(e=>{if(e.length>2)if(Kr[e])e=Kr[e];else return[e];const[r,t]=e.split(""),o=Zo[r],i=ei[t]||"";return Array.isArray(i)?i.map(s=>o+s):[o+i]}),Ft=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Wt=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],ri=[...Ft,...Wt];function bt(e,r,t,o){const i=Mt(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 mr(e){return yt(e,"spacing",8,"spacing")}function bt(e,r){return typeof r=="string"||r==null?r:e(r)}function Zo(e,r){return t=>e.reduce((o,i)=>(o[i]=bt(r,t),o),{})}function ei(e,r,t,o){if(!r.includes(t))return null;const i=Xo(t),s=Zo(i,o),a=e[t];return Ie(e,a,s)}function bn(e,r){const t=mr(e.theme);return Object.keys(e).map(o=>ei(e,r,o,t)).reduce(xt,{})}function ue(e){return bn(e,Dt)}ue.propTypes=process.env.NODE_ENV!=="production"?Dt.reduce((e,r)=>(e[r]=Le,e),{}):{};ue.filterProps=Dt;function fe(e){return bn(e,Mt)}fe.propTypes=process.env.NODE_ENV!=="production"?Mt.reduce((e,r)=>(e[r]=Le,e),{}):{};fe.filterProps=Mt;process.env.NODE_ENV!=="production"&&Qo.reduce((e,r)=>(e[r]=Le,e),{});function Ft(...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 we(e){return typeof e!="number"?e:`${e}px solid`}function ke(e,r){return he({prop:e,themeKey:"borders",transform:r})}const ti=ke("border",we),ri=ke("borderTop",we),ni=ke("borderRight",we),oi=ke("borderBottom",we),ii=ke("borderLeft",we),ai=ke("borderColor"),si=ke("borderTopColor"),li=ke("borderRightColor"),ci=ke("borderBottomColor"),di=ke("borderLeftColor"),pi=ke("outline",we),ui=ke("outlineColor"),Wt=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};Wt.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Le}:{};Wt.filterProps=["borderRadius"];Ft(ti,ri,ni,oi,ii,ai,si,li,ci,di,Wt,pi,ui);const zt=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};zt.propTypes=process.env.NODE_ENV!=="production"?{gap:Le}:{};zt.filterProps=["gap"];const _t=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};_t.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Le}:{};_t.filterProps=["columnGap"];const Lt=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};Lt.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Le}:{};Lt.filterProps=["rowGap"];const fi=he({prop:"gridColumn"}),hi=he({prop:"gridRow"}),gi=he({prop:"gridAutoFlow"}),xi=he({prop:"gridAutoColumns"}),mi=he({prop:"gridAutoRows"}),yi=he({prop:"gridTemplateColumns"}),bi=he({prop:"gridTemplateRows"}),vi=he({prop:"gridTemplateAreas"}),Si=he({prop:"gridArea"});Ft(zt,_t,Lt,fi,hi,gi,xi,mi,yi,bi,vi,Si);function lt(e,r){return r==="grey"?r:e}const Ci=he({prop:"color",themeKey:"palette",transform:lt}),ji=he({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:lt}),wi=he({prop:"backgroundColor",themeKey:"palette",transform:lt});Ft(Ci,ji,wi);function ve(e){return e<=1&&e!==0?`${e*100}%`:e}const ki=he({prop:"width",transform:ve}),yr=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const r=t=>{var i,s,a,l,p;const o=((a=(s=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:s.values)==null?void 0:a[t])||It[t];return o?((p=(l=e.theme)==null?void 0:l.breakpoints)==null?void 0:p.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:ve(t)}};return Ie(e,e.maxWidth,r)}return null};yr.filterProps=["maxWidth"];const Ti=he({prop:"minWidth",transform:ve}),Bi=he({prop:"height",transform:ve}),Ri=he({prop:"maxHeight",transform:ve}),Ei=he({prop:"minHeight",transform:ve});he({prop:"size",cssProperty:"width",transform:ve});he({prop:"size",cssProperty:"height",transform:ve});const Hi=he({prop:"boxSizing"});Ft(ki,yr,Ti,Bi,Ri,Ei,Hi);const Nt={border:{themeKey:"borders",transform:we},borderTop:{themeKey:"borders",transform:we},borderRight:{themeKey:"borders",transform:we},borderBottom:{themeKey:"borders",transform:we},borderLeft:{themeKey:"borders",transform:we},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:we},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Wt},color:{themeKey:"palette",transform:lt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:lt},backgroundColor:{themeKey:"palette",transform:lt},p:{style:fe},pt:{style:fe},pr:{style:fe},pb:{style:fe},pl:{style:fe},px:{style:fe},py:{style:fe},padding:{style:fe},paddingTop:{style:fe},paddingRight:{style:fe},paddingBottom:{style:fe},paddingLeft:{style:fe},paddingX:{style:fe},paddingY:{style:fe},paddingInline:{style:fe},paddingInlineStart:{style:fe},paddingInlineEnd:{style:fe},paddingBlock:{style:fe},paddingBlockStart:{style:fe},paddingBlockEnd:{style:fe},m:{style:ue},mt:{style:ue},mr:{style:ue},mb:{style:ue},ml:{style:ue},mx:{style:ue},my:{style:ue},margin:{style:ue},marginTop:{style:ue},marginRight:{style:ue},marginBottom:{style:ue},marginLeft:{style:ue},marginX:{style:ue},marginY:{style:ue},marginInline:{style:ue},marginInlineStart:{style:ue},marginInlineEnd:{style:ue},marginBlock:{style:ue},marginBlockStart:{style:ue},marginBlockEnd:{style:ue},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:zt},rowGap:{style:Lt},columnGap:{style:_t},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ve},maxWidth:{style:yr},minWidth:{transform:ve},height:{transform:ve},maxHeight:{transform:ve},minHeight:{transform:ve},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 Pi(...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 $i(e,r){return typeof e=="function"?e(r):e}function Ai(){function e(t,o,i,s){const a={[t]:o,theme:i},l=s[t];if(!l)return{[t]:o};const{cssProperty:p=t,themeKey:f,transform:h,style:x}=l;if(o==null)return null;if(f==="typography"&&o==="inherit")return{[t]:o};const m=Ot(i,f)||{};return x?x(a):Ie(a,o,y=>{let d=Pt(m,h,y);return y===d&&typeof y=="string"&&(d=Pt(m,h,`${t}${y==="default"?"":Ze(y)}`,y)),p===!1?d:{[p]:d}})}function r(t){const{sx:o,theme:i={},nested:s}=t||{};if(!o)return null;const a=i.unstable_sxConfig??Nt;function l(p){let f=p;if(typeof p=="function")f=p(i);else if(typeof p!="object")return p;if(!f)return null;const h=Yo(i.breakpoints),x=Object.keys(h);let m=h;return Object.keys(f).forEach(g=>{const y=$i(f[g],i);if(y!=null)if(typeof y=="object")if(a[g])m=xt(m,e(g,y,i,a));else{const d=Ie({theme:i},y,b=>({[g]:b}));Pi(d,y)?m[g]=r({sx:y,theme:i,nested:!0}):m=xt(m,d)}else m=xt(m,e(g,y,i,a))}),!s&&i.modularCssLayers?{"@layer sx":Nr(i,Ur(x,m))}:Nr(i,Ur(x,m))}return Array.isArray(o)?o.map(l):l(o)}return r}const ct=Ai();ct.filterProps=["sx"];function Ii(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 Oi={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 Di(e){var r=Object.create(null);return function(t){return r[t]===void 0&&(r[t]=e(t)),r[t]}}var Mi=/[A-Z]|^ms/g,Fi=/_EMO_([^_]+?)_([^]*?)_EMO_/g,vn=function(r){return r.charCodeAt(1)===45},Yr=function(r){return r!=null&&typeof r!="boolean"},rr=Di(function(e){return vn(e)?e:e.replace(Mi,"-$&").toLowerCase()}),Jr=function(r,t){switch(r){case"animation":case"animationName":if(typeof t=="string")return t.replace(Fi,function(o,i,s){return We={name:i,styles:s,next:We},i})}return Oi[r]!==1&&!vn(r)&&typeof t=="number"&&t!==0?t+"px":t};function $t(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 We={name:i.name,styles:i.styles,next:We},i.name;var s=t;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)We={name:a.name,styles:a.styles,next:We},a=a.next;var l=s.styles+";";return l}return Wi(e,r,t)}}var p=t;return p}function Wi(e,r,t){var o="";if(Array.isArray(t))for(var i=0;i<t.length;i++)o+=$t(e,r,t[i])+";";else for(var s in t){var a=t[s];if(typeof a!="object"){var l=a;Yr(l)&&(o+=rr(s)+":"+Jr(s,l)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&r==null)for(var p=0;p<a.length;p++)Yr(a[p])&&(o+=rr(s)+":"+Jr(s,a[p])+";");else{var f=$t(e,r,a);switch(s){case"animation":case"animationName":{o+=rr(s)+":"+f+";";break}default:o+=s+"{"+f+"}"}}}return o}var qr=/label:\s*([^\s;{]+)\s*(;|$)/g,We;function zi(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="";We=void 0;var s=e[0];if(s==null||s.raw===void 0)o=!1,i+=$t(t,r,s);else{var a=s;i+=a[0]}for(var l=1;l<e.length;l++)if(i+=$t(t,r,e[l]),o){var p=s;i+=p[l]}qr.lastIndex=0;for(var f="",h;(h=qr.exec(i))!==null;)f+="-"+h[1];var x=Ii(i)+f;return{name:x,styles:i,next:We}}/**
|
|
40
|
+
`)),()=>{})}function vr(e){return bt(e,"spacing",8,"spacing")}function vt(e,r){return typeof r=="string"||r==null?r:e(r)}function ni(e,r){return t=>e.reduce((o,i)=>(o[i]=vt(r,t),o),{})}function oi(e,r,t,o){if(!r.includes(t))return null;const i=ti(t),s=ni(i,o),a=e[t];return Ie(e,a,s)}function jn(e,r){const t=vr(e.theme);return Object.keys(e).map(o=>oi(e,r,o,t)).reduce(mt,{})}function ce(e){return jn(e,Ft)}ce.propTypes=process.env.NODE_ENV!=="production"?Ft.reduce((e,r)=>(e[r]=Ne,e),{}):{};ce.filterProps=Ft;function pe(e){return jn(e,Wt)}pe.propTypes=process.env.NODE_ENV!=="production"?Wt.reduce((e,r)=>(e[r]=Ne,e),{}):{};pe.filterProps=Wt;process.env.NODE_ENV!=="production"&&ri.reduce((e,r)=>(e[r]=Ne,e),{});function zt(...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]?mt(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 we(e){return typeof e!="number"?e:`${e}px solid`}function ke(e,r){return ue({prop:e,themeKey:"borders",transform:r})}const ii=ke("border",we),ai=ke("borderTop",we),si=ke("borderRight",we),li=ke("borderBottom",we),di=ke("borderLeft",we),ci=ke("borderColor"),pi=ke("borderTopColor"),ui=ke("borderRightColor"),fi=ke("borderBottomColor"),hi=ke("borderLeftColor"),gi=ke("outline",we),xi=ke("outlineColor"),_t=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const r=bt(e.theme,"shape.borderRadius",4,"borderRadius"),t=o=>({borderRadius:vt(r,o)});return Ie(e,e.borderRadius,t)}return null};_t.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Ne}:{};_t.filterProps=["borderRadius"];zt(ii,ai,si,li,di,ci,pi,ui,fi,hi,_t,gi,xi);const Lt=e=>{if(e.gap!==void 0&&e.gap!==null){const r=bt(e.theme,"spacing",8,"gap"),t=o=>({gap:vt(r,o)});return Ie(e,e.gap,t)}return null};Lt.propTypes=process.env.NODE_ENV!=="production"?{gap:Ne}:{};Lt.filterProps=["gap"];const Nt=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const r=bt(e.theme,"spacing",8,"columnGap"),t=o=>({columnGap:vt(r,o)});return Ie(e,e.columnGap,t)}return null};Nt.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Ne}:{};Nt.filterProps=["columnGap"];const Vt=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const r=bt(e.theme,"spacing",8,"rowGap"),t=o=>({rowGap:vt(r,o)});return Ie(e,e.rowGap,t)}return null};Vt.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Ne}:{};Vt.filterProps=["rowGap"];const mi=ue({prop:"gridColumn"}),yi=ue({prop:"gridRow"}),bi=ue({prop:"gridAutoFlow"}),vi=ue({prop:"gridAutoColumns"}),Si=ue({prop:"gridAutoRows"}),Ci=ue({prop:"gridTemplateColumns"}),ji=ue({prop:"gridTemplateRows"}),wi=ue({prop:"gridTemplateAreas"}),ki=ue({prop:"gridArea"});zt(Lt,Nt,Vt,mi,yi,bi,vi,Si,Ci,ji,wi,ki);function lt(e,r){return r==="grey"?r:e}const Ti=ue({prop:"color",themeKey:"palette",transform:lt}),Bi=ue({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:lt}),Ri=ue({prop:"backgroundColor",themeKey:"palette",transform:lt});zt(Ti,Bi,Ri);function Se(e){return e<=1&&e!==0?`${e*100}%`:e}const Ei=ue({prop:"width",transform:Se}),Sr=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])||Dt[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:Se(t)}};return Ie(e,e.maxWidth,r)}return null};Sr.filterProps=["maxWidth"];const Hi=ue({prop:"minWidth",transform:Se}),Pi=ue({prop:"height",transform:Se}),$i=ue({prop:"maxHeight",transform:Se}),Ai=ue({prop:"minHeight",transform:Se});ue({prop:"size",cssProperty:"width",transform:Se});ue({prop:"size",cssProperty:"height",transform:Se});const Ii=ue({prop:"boxSizing"});zt(Ei,Sr,Hi,Pi,$i,Ai,Ii);const Ut={border:{themeKey:"borders",transform:we},borderTop:{themeKey:"borders",transform:we},borderRight:{themeKey:"borders",transform:we},borderBottom:{themeKey:"borders",transform:we},borderLeft:{themeKey:"borders",transform:we},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:we},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:_t},color:{themeKey:"palette",transform:lt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:lt},backgroundColor:{themeKey:"palette",transform:lt},p:{style:pe},pt:{style:pe},pr:{style:pe},pb:{style:pe},pl:{style:pe},px:{style:pe},py:{style:pe},padding:{style:pe},paddingTop:{style:pe},paddingRight:{style:pe},paddingBottom:{style:pe},paddingLeft:{style:pe},paddingX:{style:pe},paddingY:{style:pe},paddingInline:{style:pe},paddingInlineStart:{style:pe},paddingInlineEnd:{style:pe},paddingBlock:{style:pe},paddingBlockStart:{style:pe},paddingBlockEnd:{style:pe},m:{style:ce},mt:{style:ce},mr:{style:ce},mb:{style:ce},ml:{style:ce},mx:{style:ce},my:{style:ce},margin:{style:ce},marginTop:{style:ce},marginRight:{style:ce},marginBottom:{style:ce},marginLeft:{style:ce},marginX:{style:ce},marginY:{style:ce},marginInline:{style:ce},marginInlineStart:{style:ce},marginInlineEnd:{style:ce},marginBlock:{style:ce},marginBlockStart:{style:ce},marginBlockEnd:{style:ce},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:Lt},rowGap:{style:Vt},columnGap:{style:Nt},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Se},maxWidth:{style:Sr},minWidth:{transform:Se},height:{transform:Se},maxHeight:{transform:Se},minHeight:{transform:Se},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 Oi(...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 Di(e,r){return typeof e=="function"?e(r):e}function Mi(){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:u,transform:h,style:x}=l;if(o==null)return null;if(u==="typography"&&o==="inherit")return{[t]:o};const m=Mt(i,u)||{};return x?x(a):Ie(a,o,y=>{let p=At(m,h,y);return y===p&&typeof y=="string"&&(p=At(m,h,`${t}${y==="default"?"":et(y)}`,y)),c===!1?p:{[c]:p}})}function r(t){const{sx:o,theme:i={},nested:s}=t||{};if(!o)return null;const a=i.unstable_sxConfig??Ut;function l(c){let u=c;if(typeof c=="function")u=c(i);else if(typeof c!="object")return c;if(!u)return null;const h=Xo(i.breakpoints),x=Object.keys(h);let m=h;return Object.keys(u).forEach(g=>{const y=Di(u[g],i);if(y!=null)if(typeof y=="object")if(a[g])m=mt(m,e(g,y,i,a));else{const p=Ie({theme:i},y,b=>({[g]:b}));Oi(p,y)?m[g]=r({sx:y,theme:i,nested:!0}):m=mt(m,p)}else m=mt(m,e(g,y,i,a))}),!s&&i.modularCssLayers?{"@layer sx":Yr(i,qr(x,m))}:Yr(i,qr(x,m))}return Array.isArray(o)?o.map(l):l(o)}return r}const dt=Mi();dt.filterProps=["sx"];function Fi(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 Wi={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 zi(e){var r=Object.create(null);return function(t){return r[t]===void 0&&(r[t]=e(t)),r[t]}}var _i=/[A-Z]|^ms/g,Li=/_EMO_([^_]+?)_([^]*?)_EMO_/g,wn=function(r){return r.charCodeAt(1)===45},Xr=function(r){return r!=null&&typeof r!="boolean"},or=zi(function(e){return wn(e)?e:e.replace(_i,"-$&").toLowerCase()}),Qr=function(r,t){switch(r){case"animation":case"animationName":if(typeof t=="string")return t.replace(Li,function(o,i,s){return ze={name:i,styles:s,next:ze},i})}return Wi[r]!==1&&!wn(r)&&typeof t=="number"&&t!==0?t+"px":t};function It(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 Ni(e,r,t)}}var c=t;return c}function Ni(e,r,t){var o="";if(Array.isArray(t))for(var i=0;i<t.length;i++)o+=It(e,r,t[i])+";";else for(var s in t){var a=t[s];if(typeof a!="object"){var l=a;Xr(l)&&(o+=or(s)+":"+Qr(s,l)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&r==null)for(var c=0;c<a.length;c++)Xr(a[c])&&(o+=or(s)+":"+Qr(s,a[c])+";");else{var u=It(e,r,a);switch(s){case"animation":case"animationName":{o+=or(s)+":"+u+";";break}default:o+=s+"{"+u+"}"}}}return o}var Zr=/label:\s*([^\s;{]+)\s*(;|$)/g,ze;function Vi(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+=It(t,r,s);else{var a=s;i+=a[0]}for(var l=1;l<e.length;l++)if(i+=It(t,r,e[l]),o){var c=s;i+=c[l]}Zr.lastIndex=0;for(var u="",h;(h=Zr.exec(i))!==null;)u+="-"+h[1];var x=Fi(i)+u;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
|
|
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
|
|
48
|
-
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:
|
|
49
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:
|
|
50
|
-
`))}return
|
|
51
|
-
The color object needs to have a \`main\` property or a \`${
|
|
46
|
+
*/function Ui(e,r){const t=Eo(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 Gi(e,r){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=r(e.__emotion_styles))}const en=[];function Qe(e){return en[0]=e,Vi(en)}const Yi=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 Ji(e){const{values:r={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:t="px",step:o=5,...i}=e,s=Yi(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 u(m,g){const y=a.indexOf(g);return`@media (min-width:${typeof r[m]=="number"?r[m]:m}${t}) and (max-width:${(y!==-1&&typeof r[a[y]]=="number"?r[a[y]]:g)-o/100}${t})`}function h(m){return a.indexOf(m)+1<a.length?u(m,a[a.indexOf(m)+1]):l(m)}function x(m){const g=a.indexOf(m);return g===0?l(a[1]):g===a.length-1?c(a[g]):u(m,a[a.indexOf(m)+1]).replace("@media","@media not all and")}return{keys:a,values:s,up:l,down:c,between:u,only:h,not:x,unit:t,...i}}const qi={borderRadius:4};function kn(e=8,r=vr({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 Ki(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 Tn(e={},...r){const{breakpoints:t={},palette:o={},spacing:i,shape:s={},...a}=e,l=Ji(t),c=kn(i);let u=je({breakpoints:l,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:c,shape:{...qi,...s}},a);return u=qo(u),u.applyStyles=Ki,u=r.reduce((h,x)=>je(h,x),u),u.unstable_sxConfig={...Ut,...a==null?void 0:a.unstable_sxConfig},u.unstable_sx=function(x){return dt({sx:x,theme:this})},u}const Xi={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 Cr(e,r,t="Mui"){const o=Xi[r];return o?`${t}-${o}`:`${Ao.generate(e)}-${r}`}function Qi(e,r,t="Mui"){const o={};return r.forEach(i=>{o[i]=Cr(e,i,t)}),o}function Bn(e,r=""){return e.displayName||e.name||r}function tn(e,r,t){const o=Bn(r);return e.displayName||(o!==""?`${t}(${o})`:t)}function Zi(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Bn(e,"Component");if(typeof e=="object")switch(e.$$typeof){case $t.ForwardRef:return tn(e,e.render,"ForwardRef");case $t.Memo:return tn(e,e.type,"memo");default:return}}}function Rn(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 ea=Tn();function ir(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 ta(e){return e?(r,t)=>t[e]:null}function ra(e,r,t){e.theme=aa(e.theme)?t:e.theme[r]||e.theme}function Pt(e,r,t){const o=typeof r=="function"?r(e):r;if(Array.isArray(o))return o.flatMap(i=>Pt(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 En(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 En(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 na(e={}){const{themeId:r,defaultTheme:t=ea,rootShouldForwardProp:o=ir,slotShouldForwardProp:i=ir}=e;function s(l){ra(l,r,t)}return(l,c={})=>{Gi(l,R=>R.filter(M=>M!==dt));const{name:u,slot:h,skipVariantsResolver:x,skipSx:m,overridesResolver:g=ta(Hn(h)),...y}=c,p=u&&u.startsWith("Mui")||h?"components":"custom",b=x!==void 0?x:h&&h!=="Root"&&h!=="root"||!1,k=m||!1;let P=ir;h==="Root"||h==="root"?P=o:h?P=i:sa(l)&&(P=void 0);const $=Ui(l,{shouldForwardProp:P,label:ia(u,h),...y}),v=R=>{if(R.__emotion_real===R)return R;if(typeof R=="function")return function(I){return Pt(I,R,I.theme.modularCssLayers?p:void 0)};if(Ae(R)){const M=Rn(R);return function(J){return M.variants?Pt(J,M,J.theme.modularCssLayers?p:void 0):J.theme.modularCssLayers?Xe(M.style,p):M.style}}return R},C=(...R)=>{const M=[],I=R.map(v),J=[];if(M.push(s),u&&g&&J.push(function(E){var V,K;const D=(K=(V=E.theme.components)==null?void 0:V[u])==null?void 0:K.styleOverrides;if(!D)return null;const z={};for(const Y in D)z[Y]=Pt(E,D[Y],E.theme.modularCssLayers?"theme":void 0);return g(E,z)}),u&&!b&&J.push(function(E){var z,V;const B=E.theme,D=(V=(z=B==null?void 0:B.components)==null?void 0:z[u])==null?void 0:V.variants;return D?En(E,D,[],E.theme.modularCssLayers?"theme":void 0):null}),k||J.push(dt),Array.isArray(I[0])){const d=I.shift(),E=new Array(M.length).fill(""),B=new Array(J.length).fill("");let D;D=[...E,...d,...B],D.raw=[...E,...d.raw,...B],M.unshift(D)}const q=[...M,...I,...J],G=$(...q);return l.muiName&&(G.muiName=l.muiName),process.env.NODE_ENV!=="production"&&(G.displayName=oa(u,h,l)),G};return $.withConfig&&(C.withConfig=$.withConfig),C}}function oa(e,r,t){return e?`${e}${et(r||"")}`:`Styled(${Zi(t)})`}function ia(e,r){let t;return process.env.NODE_ENV!=="production"&&e&&(t=`${e}-${Hn(r||"Root")}`),t}function aa(e){for(const r in e)return!1;return!0}function sa(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Hn(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function ur(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 u=c;o[s][u]=ur(a[u],l[u],t)}}}else s==="className"&&t&&r.className?o.className=Sn(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 la(e,r=Number.MIN_SAFE_INTEGER,t=Number.MAX_SAFE_INTEGER){return Math.max(r,Math.min(e,t))}function jr(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}].`),la(e,r,t)}function da(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(da(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
|
+
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 ca=e=>{const r=Le(e);return r.values.slice(0,3).map((t,o)=>r.type.includes("hsl")&&o!==0?`${t}%`:t).join(" ")},gt=(e,r)=>{try{return ca(e)}catch{return r&&process.env.NODE_ENV!=="production"&&console.warn(r),e}};function Gt(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 Pn(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=(u,h=(u+t/30)%12)=>i-s*Math.max(Math.min(h-3,9-h,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])),Gt({type:l,values:c})}function fr(e){e=Le(e);let r=e.type==="hsl"||e.type==="hsla"?Le(Pn(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 rn(e,r){const t=fr(e),o=fr(r);return(Math.max(t,o)+.05)/(Math.min(t,o)+.05)}function $n(e,r){return e=Le(e),r=jr(r),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${r}`:e.values[3]=r,Gt(e)}function Je(e,r,t){try{return $n(e,r)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}}function Yt(e,r){if(e=Le(e),r=jr(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 Gt(e)}function ne(e,r,t){try{return Yt(e,r)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}}function Jt(e,r){if(e=Le(e),r=jr(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 Gt(e)}function oe(e,r,t){try{return Jt(e,r)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}}function pa(e,r=.15){return fr(e)>.5?Yt(e,r):Jt(e,r)}function Rt(e,r,t){try{return pa(e,r)}catch{return e}}const ua=_e.createContext(void 0);process.env.NODE_ENV!=="production"&&(ee.node,ee.object);function fa(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?ur(i.defaultProps,o,r.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?ur(i,o,r.components.mergeClassNameAndStyle):o}function ha({props:e,name:r}){const t=_e.useContext(ua);return fa({props:e,name:r,theme:{components:t}})}const nn={theme:void 0};function ga(e){let r,t;return function(i){let s=r;return(s===void 0||i.theme!==t)&&(nn.theme=i.theme,s=Rn(e(nn)),r=s,t=i.theme),s}}function xa(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 on=(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])})},ma=(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)},ya=(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 ar(e,r){const{prefix:t,shouldSkipGeneratingVar:o}=r||{},i={},s={},a={};return ma(e,(l,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!o||!o(l,c))){const h=`--${t?`${t}-`:""}${l.join("-")}`,x=ya(l,c);Object.assign(i,{[h]:x}),on(s,l,`var(${h})`,u),on(a,l,`var(${h}, ${x})`,u)}},l=>l[0]==="vars"),{css:i,vars:s,varsWithDefaults:a}}function ba(e,r={}){const{getSelector:t=k,disableCssColorScheme:o,colorSchemeSelector:i,enableContrastVars:s}=r,{colorSchemes:a={},components:l,defaultColorScheme:c="light",...u}=e,{vars:h,css:x,varsWithDefaults:m}=ar(u,r);let g=m;const y={},{[c]:p,...b}=a;if(Object.entries(b||{}).forEach(([v,C])=>{const{vars:R,css:M,varsWithDefaults:I}=ar(C,r);g=je(g,I),y[v]={css:M,vars:R}}),p){const{css:v,vars:C,varsWithDefaults:R}=ar(p,r);g=je(g,R),y[c]={css:v,vars:C}}function k(v,C){var M,I;let R=i;if(i==="class"&&(R=".%s"),i==="data"&&(R="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(R=`[${i}="%s"]`),v){if(R==="media")return e.defaultColorScheme===v?":root":{[`@media (prefers-color-scheme: ${((I=(M=a[v])==null?void 0:M.palette)==null?void 0:I.mode)||v})`]:{":root":C}};if(R)return e.defaultColorScheme===v?`:root, ${R.replace("%s",String(v))}`:R.replace("%s",String(v))}return":root"}return{vars:g,generateThemeVars:()=>{let v={...h};return Object.entries(y).forEach(([,{vars:C}])=>{v=je(v,C)}),v},generateStyleSheets:()=>{var J,q;const v=[],C=e.defaultColorScheme||"light";function R(G,d){Object.keys(d).length&&v.push(typeof G=="string"?{[G]:{...d}}:G)}R(t(void 0,{...x}),x);const{[C]:M,...I}=y;if(M){const{css:G}=M,d=(q=(J=a[C])==null?void 0:J.palette)==null?void 0:q.mode,E=!o&&d?{colorScheme:d,...G}:{...G};R(t(C,{...E}),E)}return Object.entries(I).forEach(([G,{css:d}])=>{var D,z;const E=(z=(D=a[G])==null?void 0:D.palette)==null?void 0:z.mode,B=!o&&E?{colorScheme:E,...d}:{...d};R(t(G,{...B}),B)}),s&&v.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)"}}),v}}}function va(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 yt={black:"#000",white:"#fff"},Sa={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"},ht={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 An(){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:yt.white,default:yt.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 In=An();function On(){return{text:{primary:yt.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:yt.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 hr=On();function an(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=Jt(e.main,i):r==="dark"&&(e.dark=Yt(e.main,s)))}function sn(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 Ca(e="light"){return e==="dark"?{main:ot[200],light:ot[50],dark:ot[400]}:{main:ot[700],light:ot[400],dark:ot[800]}}function ja(e="light"){return e==="dark"?{main:rt[200],light:rt[50],dark:rt[400]}:{main:rt[500],light:rt[300],dark:rt[700]}}function wa(e="light"){return e==="dark"?{main:nt[500],light:nt[300],dark:nt[700]}:{main:nt[700],light:nt[400],dark:nt[800]}}function ka(e="light"){return e==="dark"?{main:it[400],light:it[300],dark:it[700]}:{main:it[700],light:it[500],dark:it[900]}}function Ta(e="light"){return e==="dark"?{main:at[400],light:at[300],dark:at[700]}:{main:at[800],light:at[500],dark:at[900]}}function Ba(e="light"){return e==="dark"?{main:ht[400],light:ht[300],dark:ht[700]}:{main:"#ed6c02",light:ht[500],dark:ht[900]}}function Ra(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function wr(e){const{mode:r="light",contrastThreshold:t=3,tonalOffset:o=.2,colorSpace:i,...s}=e,a=e.primary||Ca(r),l=e.secondary||ja(r),c=e.error||wa(r),u=e.info||ka(r),h=e.success||Ta(r),x=e.warning||Ba(r);function m(b){if(i)return Ra(b);const k=rn(b,hr.text.primary)>=t?hr.text.primary:In.text.primary;if(process.env.NODE_ENV!=="production"){const P=rn(b,k);P<3&&console.error([`MUI: The contrast ratio of ${P}:1 for ${k} on ${b}`,"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 k}const g=({color:b,name:k,mainShade:P=500,lightShade:$=300,darkShade:v=700})=>{if(b={...b},!b.main&&b[P]&&(b.main=b[P]),!b.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${k?` (${k})`:""} provided to augmentColor(color) is invalid.
|
|
51
|
+
The color object needs to have a \`main\` property or a \`${P}\` property.`:Ze(11,k?` (${k})`:"",P));if(typeof b.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${k?` (${k})`:""} provided to augmentColor(color) is invalid.
|
|
52
52
|
\`color.main\` should be a string, but \`${JSON.stringify(b.main)}\` was provided instead.
|
|
53
53
|
|
|
54
54
|
Did you intend to use one of the following approaches?
|
|
@@ -61,14 +61,14 @@ const theme1 = createTheme({ palette: {
|
|
|
61
61
|
|
|
62
62
|
const theme2 = createTheme({ palette: {
|
|
63
63
|
primary: { main: green[500] },
|
|
64
|
-
} });`:
|
|
65
|
-
`)),Object.keys(
|
|
64
|
+
} });`:Ze(12,k?` (${k})`:"",JSON.stringify(b.main)));return i?(sn(i,b,"light",$,o),sn(i,b,"dark",v,o)):(an(b,"light",$,o),an(b,"dark",v,o)),b.contrastText||(b.contrastText=m(b.main)),b};let y;return r==="light"?y=An():r==="dark"&&(y=On()),process.env.NODE_ENV!=="production"&&(y||console.error(`MUI: The palette mode \`${r}\` is not supported.`)),je({common:{...yt},mode:r,primary:g({color:a,name:"primary"}),secondary:g({color:l,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:g({color:c,name:"error"}),warning:g({color:x,name:"warning"}),info:g({color:u,name:"info"}),success:g({color:h,name:"success"}),grey:Sa,contrastThreshold:t,getContrastText:m,augmentColor:g,tonalOffset:o,...y},s)}function Ea(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 Ha(e,r){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...r}}function Pa(e){return Math.round(e*1e5)/1e5}const ln={textTransform:"uppercase"},dn='"Roboto", "Helvetica", "Arial", sans-serif';function $a(e,r){const{fontFamily:t=dn,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:h,...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,g=h||(b=>`${b/c*m}rem`),y=(b,k,P,$,v)=>({fontFamily:t,fontWeight:b,fontSize:g(k),lineHeight:P,...t===dn?{letterSpacing:`${Pa($/k)}em`}:{},...v,...u}),p={h1:y(i,96,1.167,-1.5),h2:y(i,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(a,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(a,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(a,14,1.75,.4,ln),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,ln),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return je({htmlFontSize:c,pxToRem:g,fontFamily:t,fontSize:o,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l,...p},x,{clone:!1})}const Aa=.2,Ia=.14,Oa=.12;function le(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Aa})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Ia})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Oa})`].join(",")}const Da=["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)],Ma={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)"},Fa={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function cn(e){return`${Math.round(e)}ms`}function Wa(e){if(!e)return 0;const r=e/36;return Math.min(Math.round((4+15*r**.25+r/5)*10),3e3)}function za(e){const r={...Ma,...e.easing},t={...Fa,...e.duration};return{getAutoHeightDuration:Wa,create:(i=["all"],s={})=>{const{duration:a=t.standard,easing:l=r.easeInOut,delay:c=0,...u}=s;if(process.env.NODE_ENV!=="production"){const h=m=>typeof m=="string",x=m=>!Number.isNaN(parseFloat(m));!h(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!x(a)&&!h(a)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${a}.`),h(l)||console.error('MUI: Argument "easing" must be a string.'),!x(c)&&!h(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(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(h=>`${h} ${typeof a=="string"?a:cn(a)} ${l} ${typeof c=="string"?c:cn(c)}`).join(",")},...e,easing:r,duration:t}}const _a={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function La(e){return Ae(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Dn(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];!La(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
|
|
73
|
-
`))}b[
|
|
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 Ja(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{}},qa=(e="mui")=>ua(e);function ir(e,r,t,o,i){if(!t)return;t=t===!0?{}:t;const s=i==="dark"?"dark":"light";if(!o){r[i]=Na({...t,palette:{mode:s,...t==null?void 0:t.palette},colorSpace:e});return}const{palette:a,...l}=ur({...o,palette:{mode:s,...t==null?void 0:t.palette},colorSpace:e});return r[i]={...t,palette:a,opacity:{...An(s),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||In(s)},l}function Ka(e={},...r){const{colorSchemes:t={light:!0},defaultColorScheme:o,disableCssColorScheme:i=!1,cssVarPrefix:s="mui",nativeColor:a=!1,shouldSkipGeneratingVar:l=Va,colorSchemeSelector:p=t.light&&t.dark?"media":void 0,rootSelector:f=":root",...h}=e,x=Object.keys(t)[0],m=o||(t.light&&x!=="light"?"light":x),g=qa(s),{[m]:y,light:d,dark:b,...w}=t,k={...w};let $=y;if((m==="dark"&&!("dark"in t)||m==="light"&&!("light"in t))&&($=!0),!$)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${m}\` option is either missing or invalid.`:Qe(21,m));let C;a&&(C="oklch");const v=ir(C,k,$,h,m);d&&!k.light&&ir(C,k,d,void 0,"light"),b&&!k.dark&&ir(C,k,b,void 0,"dark");let E={defaultColorScheme:m,...v,cssVarPrefix:s,colorSchemeSelector:p,rootSelector:f,getCssVar:g,colorSchemes:k,font:{...ka(v.typography),...v.font},spacing:Ja(h.spacing)};Object.keys(E.colorSchemes).forEach(N=>{const c=E.colorSchemes[N].palette,H=M=>{const _=M.split("-"),K=_[1],B=_[2];return g(M,c[K][B])};c.mode==="light"&&(j(c.common,"background","#fff"),j(c.common,"onBackground","#000")),c.mode==="dark"&&(j(c.common,"background","#000"),j(c.common,"onBackground","#fff"));function R(M,_,K){if(C){let B;return M===Ye&&(B=`transparent ${((1-K)*100).toFixed(0)}%`),M===ne&&(B=`#000 ${(K*100).toFixed(0)}%`),M===oe&&(B=`#fff ${(K*100).toFixed(0)}%`),`color-mix(in ${C}, ${_}, ${B})`}return M(_,K)}if(Ya(c,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),c.mode==="light"){j(c.Alert,"errorColor",R(ne,a?g("palette-error-light"):c.error.light,.6)),j(c.Alert,"infoColor",R(ne,a?g("palette-info-light"):c.info.light,.6)),j(c.Alert,"successColor",R(ne,a?g("palette-success-light"):c.success.light,.6)),j(c.Alert,"warningColor",R(ne,a?g("palette-warning-light"):c.warning.light,.6)),j(c.Alert,"errorFilledBg",H("palette-error-main")),j(c.Alert,"infoFilledBg",H("palette-info-main")),j(c.Alert,"successFilledBg",H("palette-success-main")),j(c.Alert,"warningFilledBg",H("palette-warning-main")),j(c.Alert,"errorFilledColor",Ee(()=>c.getContrastText(c.error.main))),j(c.Alert,"infoFilledColor",Ee(()=>c.getContrastText(c.info.main))),j(c.Alert,"successFilledColor",Ee(()=>c.getContrastText(c.success.main))),j(c.Alert,"warningFilledColor",Ee(()=>c.getContrastText(c.warning.main))),j(c.Alert,"errorStandardBg",R(oe,a?g("palette-error-light"):c.error.light,.9)),j(c.Alert,"infoStandardBg",R(oe,a?g("palette-info-light"):c.info.light,.9)),j(c.Alert,"successStandardBg",R(oe,a?g("palette-success-light"):c.success.light,.9)),j(c.Alert,"warningStandardBg",R(oe,a?g("palette-warning-light"):c.warning.light,.9)),j(c.Alert,"errorIconColor",H("palette-error-main")),j(c.Alert,"infoIconColor",H("palette-info-main")),j(c.Alert,"successIconColor",H("palette-success-main")),j(c.Alert,"warningIconColor",H("palette-warning-main")),j(c.AppBar,"defaultBg",H("palette-grey-100")),j(c.Avatar,"defaultBg",H("palette-grey-400")),j(c.Button,"inheritContainedBg",H("palette-grey-300")),j(c.Button,"inheritContainedHoverBg",H("palette-grey-A100")),j(c.Chip,"defaultBorder",H("palette-grey-400")),j(c.Chip,"defaultAvatarColor",H("palette-grey-700")),j(c.Chip,"defaultIconColor",H("palette-grey-700")),j(c.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),j(c.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),j(c.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),j(c.LinearProgress,"primaryBg",R(oe,a?g("palette-primary-main"):c.primary.main,.62)),j(c.LinearProgress,"secondaryBg",R(oe,a?g("palette-secondary-main"):c.secondary.main,.62)),j(c.LinearProgress,"errorBg",R(oe,a?g("palette-error-main"):c.error.main,.62)),j(c.LinearProgress,"infoBg",R(oe,a?g("palette-info-main"):c.info.main,.62)),j(c.LinearProgress,"successBg",R(oe,a?g("palette-success-main"):c.success.main,.62)),j(c.LinearProgress,"warningBg",R(oe,a?g("palette-warning-light"):c.warning.main,.62)),j(c.Skeleton,"bg",C?R(Ye,a?g("palette-text-primary"):c.text.primary,.11):`rgba(${H("palette-text-primaryChannel")} / 0.11)`),j(c.Slider,"primaryTrack",R(oe,a?g("palette-primary-main"):c.primary.main,.62)),j(c.Slider,"secondaryTrack",R(oe,a?g("palette-secondary-main"):c.secondary.main,.62)),j(c.Slider,"errorTrack",R(oe,a?g("palette-error-main"):c.error.main,.62)),j(c.Slider,"infoTrack",R(oe,a?g("palette-info-main"):c.info.main,.62)),j(c.Slider,"successTrack",R(oe,a?g("palette-success-main"):c.success.main,.62)),j(c.Slider,"warningTrack",R(oe,a?g("palette-warning-main"):c.warning.main,.62));const M=C?R(ne,a?g("palette-background-default"):c.background.default,.6825):Bt(c.background.default,.8);j(c.SnackbarContent,"bg",M),j(c.SnackbarContent,"color",Ee(()=>C?pr.text.primary:c.getContrastText(M))),j(c.SpeedDialAction,"fabHoverBg",Bt(c.background.paper,.15)),j(c.StepConnector,"border",H("palette-grey-400")),j(c.StepContent,"border",H("palette-grey-400")),j(c.Switch,"defaultColor",H("palette-common-white")),j(c.Switch,"defaultDisabledColor",H("palette-grey-100")),j(c.Switch,"primaryDisabledColor",R(oe,a?g("palette-primary-main"):c.primary.main,.62)),j(c.Switch,"secondaryDisabledColor",R(oe,a?g("palette-secondary-main"):c.secondary.main,.62)),j(c.Switch,"errorDisabledColor",R(oe,a?g("palette-error-main"):c.error.main,.62)),j(c.Switch,"infoDisabledColor",R(oe,a?g("palette-info-main"):c.info.main,.62)),j(c.Switch,"successDisabledColor",R(oe,a?g("palette-success-main"):c.success.main,.62)),j(c.Switch,"warningDisabledColor",R(oe,a?g("palette-warning-main"):c.warning.main,.62)),j(c.TableCell,"border",R(oe,Ye(a?g("palette-divider"):c.divider,1),.88)),j(c.Tooltip,"bg",R(Ye,a?g("palette-grey-700"):c.grey[700],.92))}if(c.mode==="dark"){j(c.Alert,"errorColor",R(oe,a?g("palette-error-light"):c.error.light,.6)),j(c.Alert,"infoColor",R(oe,a?g("palette-info-light"):c.info.light,.6)),j(c.Alert,"successColor",R(oe,a?g("palette-success-light"):c.success.light,.6)),j(c.Alert,"warningColor",R(oe,a?g("palette-warning-light"):c.warning.light,.6)),j(c.Alert,"errorFilledBg",H("palette-error-dark")),j(c.Alert,"infoFilledBg",H("palette-info-dark")),j(c.Alert,"successFilledBg",H("palette-success-dark")),j(c.Alert,"warningFilledBg",H("palette-warning-dark")),j(c.Alert,"errorFilledColor",Ee(()=>c.getContrastText(c.error.dark))),j(c.Alert,"infoFilledColor",Ee(()=>c.getContrastText(c.info.dark))),j(c.Alert,"successFilledColor",Ee(()=>c.getContrastText(c.success.dark))),j(c.Alert,"warningFilledColor",Ee(()=>c.getContrastText(c.warning.dark))),j(c.Alert,"errorStandardBg",R(ne,a?g("palette-error-light"):c.error.light,.9)),j(c.Alert,"infoStandardBg",R(ne,a?g("palette-info-light"):c.info.light,.9)),j(c.Alert,"successStandardBg",R(ne,a?g("palette-success-light"):c.success.light,.9)),j(c.Alert,"warningStandardBg",R(ne,a?g("palette-warning-light"):c.warning.light,.9)),j(c.Alert,"errorIconColor",H("palette-error-main")),j(c.Alert,"infoIconColor",H("palette-info-main")),j(c.Alert,"successIconColor",H("palette-success-main")),j(c.Alert,"warningIconColor",H("palette-warning-main")),j(c.AppBar,"defaultBg",H("palette-grey-900")),j(c.AppBar,"darkBg",H("palette-background-paper")),j(c.AppBar,"darkColor",H("palette-text-primary")),j(c.Avatar,"defaultBg",H("palette-grey-600")),j(c.Button,"inheritContainedBg",H("palette-grey-800")),j(c.Button,"inheritContainedHoverBg",H("palette-grey-700")),j(c.Chip,"defaultBorder",H("palette-grey-700")),j(c.Chip,"defaultAvatarColor",H("palette-grey-300")),j(c.Chip,"defaultIconColor",H("palette-grey-300")),j(c.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),j(c.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),j(c.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),j(c.LinearProgress,"primaryBg",R(ne,a?g("palette-primary-main"):c.primary.main,.5)),j(c.LinearProgress,"secondaryBg",R(ne,a?g("palette-secondary-main"):c.secondary.main,.5)),j(c.LinearProgress,"errorBg",R(ne,a?g("palette-error-main"):c.error.main,.5)),j(c.LinearProgress,"infoBg",R(ne,a?g("palette-info-main"):c.info.main,.5)),j(c.LinearProgress,"successBg",R(ne,a?g("palette-success-main"):c.success.main,.5)),j(c.LinearProgress,"warningBg",R(ne,a?g("palette-warning-main"):c.warning.main,.5)),j(c.Skeleton,"bg",C?R(Ye,a?g("palette-text-primary"):c.text.primary,.13):`rgba(${H("palette-text-primaryChannel")} / 0.13)`),j(c.Slider,"primaryTrack",R(ne,a?g("palette-primary-main"):c.primary.main,.5)),j(c.Slider,"secondaryTrack",R(ne,a?g("palette-secondary-main"):c.secondary.main,.5)),j(c.Slider,"errorTrack",R(ne,a?g("palette-error-main"):c.error.main,.5)),j(c.Slider,"infoTrack",R(ne,a?g("palette-info-main"):c.info.main,.5)),j(c.Slider,"successTrack",R(ne,a?g("palette-success-main"):c.success.main,.5)),j(c.Slider,"warningTrack",R(ne,a?g("palette-warning-light"):c.warning.main,.5));const M=C?R(oe,a?g("palette-background-default"):c.background.default,.985):Bt(c.background.default,.98);j(c.SnackbarContent,"bg",M),j(c.SnackbarContent,"color",Ee(()=>C?Hn.text.primary:c.getContrastText(M))),j(c.SpeedDialAction,"fabHoverBg",Bt(c.background.paper,.15)),j(c.StepConnector,"border",H("palette-grey-600")),j(c.StepContent,"border",H("palette-grey-600")),j(c.Switch,"defaultColor",H("palette-grey-300")),j(c.Switch,"defaultDisabledColor",H("palette-grey-600")),j(c.Switch,"primaryDisabledColor",R(ne,a?g("palette-primary-main"):c.primary.main,.55)),j(c.Switch,"secondaryDisabledColor",R(ne,a?g("palette-secondary-main"):c.secondary.main,.55)),j(c.Switch,"errorDisabledColor",R(ne,a?g("palette-error-main"):c.error.main,.55)),j(c.Switch,"infoDisabledColor",R(ne,a?g("palette-info-main"):c.info.main,.55)),j(c.Switch,"successDisabledColor",R(ne,a?g("palette-success-main"):c.success.main,.55)),j(c.Switch,"warningDisabledColor",R(ne,a?g("palette-warning-light"):c.warning.main,.55)),j(c.TableCell,"border",R(ne,Ye(a?g("palette-divider"):c.divider,1),.68)),j(c.Tooltip,"bg",R(Ye,a?g("palette-grey-700"):c.grey[700],.92))}a||($e(c.background,"default"),$e(c.background,"paper"),$e(c.common,"background"),$e(c.common,"onBackground"),$e(c,"divider")),Object.keys(c).forEach(M=>{const _=c[M];M!=="tonalOffset"&&!a&&_&&typeof _=="object"&&(_.main&&j(c[M],"mainChannel",ft(ht(_.main))),_.light&&j(c[M],"lightChannel",ft(ht(_.light))),_.dark&&j(c[M],"darkChannel",ft(ht(_.dark))),_.contrastText&&j(c[M],"contrastTextChannel",ft(ht(_.contrastText))),M==="text"&&($e(c[M],"primary"),$e(c[M],"secondary")),M==="action"&&(_.active&&$e(c[M],"active"),_.selected&&$e(c[M],"selected")))})}),E=r.reduce((N,c)=>Ce(N,c),E);const D={prefix:s,disableCssColorScheme:i,shouldSkipGeneratingVar:l,getSelector:Ga(E),enableContrastVars:a},{vars:A,generateThemeVars:J,generateStyleSheets:z}=ga(E,D);return E.vars=A,Object.entries(E.colorSchemes[E.defaultColorScheme]).forEach(([N,c])=>{E[N]=c}),E.generateThemeVars=J,E.generateStyleSheets=z,E.generateSpacing=function(){return Sn(h.spacing,mr(this))},E.getColorSchemeSelector=xa(p),E.spacing=E.generateSpacing(),E.shouldSkipGeneratingVar=l,E.unstable_sxConfig={...Nt,...h==null?void 0:h.unstable_sxConfig},E.unstable_sx=function(c){return ct({sx:c,theme:this})},E.toRuntimeSource=$n,E}function ln(e,r,t){e.colorSchemes&&t&&(e.colorSchemes[r]={...t!==!0&&t,palette:Sr({...t===!0?{}:t.palette,mode:r})})}function On(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",p=i==null?void 0:i[l],f={...i,...t?{[l]:{...typeof p!="boolean"&&p,palette:t}}:void 0};if(o===!1){if(!("colorSchemes"in e))return ur(e,...r);let h=t;"palette"in e||f[l]&&(f[l]!==!0?h=f[l].palette:l==="dark"&&(h={mode:"dark"}));const x=ur({...e,palette:h},...r);return x.defaultColorScheme=l,x.colorSchemes=f,x.palette.mode==="light"&&(x.colorSchemes.light={...f.light!==!0&&f.light,palette:x.palette},ln(x,"dark",f.dark)),x.palette.mode==="dark"&&(x.colorSchemes.dark={...f.dark!==!0&&f.dark,palette:x.palette},ln(x,"light",f.light)),x}return!t&&!("light"in f)&&l==="light"&&(f.light=!0),Ka({...a,colorSchemes:f,defaultColorScheme:l,...typeof o!="boolean"&&o},...r)}const Xa=On(),Qa="$$material";function Za(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const es=e=>Za(e)&&e!=="classes",ts=Zi({themeId:Qa,defaultTheme:Xa,rootShouldForwardProp:es}),rs=pa;process.env.NODE_ENV!=="production"&&(ee.node,ee.object.isRequired);function ns(e){return da(e)}function os(e){return br("MuiSvgIcon",e)}Ji("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const is=e=>{const{color:r,fontSize:t,classes:o}=e,i={root:["root",r!=="inherit"&&`color${Ze(r)}`,`fontSize${Ze(t)}`]};return Wo(i,os,o)},as=ts("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,t.color!=="inherit"&&r[`color${Ze(t.color)}`],r[`fontSize${Ze(t.fontSize)}`]]}})(rs(({theme:e})=>{var r,t,o,i,s,a,l,p,f,h,x,m,g,y;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:d=>!d.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:((p=(l=e.typography)==null?void 0:l.pxToRem)==null?void 0:p.call(l,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((h=(f=e.typography)==null?void 0:f.pxToRem)==null?void 0:h.call(f,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,d])=>d&&d.main).map(([d])=>{var b,w;return{props:{color:d},style:{color:(w=(b=(e.vars??e).palette)==null?void 0:b[d])==null?void 0:w.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:(y=(g=(e.vars??e).palette)==null?void 0:g.action)==null?void 0:y.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),At=ze.forwardRef(function(r,t){const o=ns({props:r,name:"MuiSvgIcon"}),{children:i,className:s,color:a="inherit",component:l="svg",fontSize:p="medium",htmlColor:f,inheritViewBox:h=!1,titleAccess:x,viewBox:m="0 0 24 24",...g}=o,y=ze.isValidElement(i)&&i.type==="svg",d={...o,color:a,component:l,fontSize:p,instanceFontSize:r.fontSize,inheritViewBox:h,viewBox:m,hasSvgAsChild:y},b={};h||(b.viewBox=m);const w=is(d);return n.jsxs(as,{as:l,className:mn(w.root,s),focusable:"false",color:f,"aria-hidden":x?void 0:!0,role:x?"img":void 0,ref:t,...b,...g,...y&&i.props,ownerState:d,children:[y?i.props.children:i,x?n.jsx("title",{children:x}):null]})});process.env.NODE_ENV!=="production"&&(At.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});At.muiName="SvgIcon";function dt(e,r){function t(o,i){return n.jsx(At,{"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=At.muiName,ze.memo(ze.forwardRef(t))}const ss=dt(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"),ls=dt(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"),cs=dt(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"),ds=dt(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"),ps=dt(n.jsx("path",{d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded"),cn=e=>{let r;const t=new Set,o=(f,h)=>{const x=typeof f=="function"?f(r):f;if(!Object.is(x,r)){const m=r;r=h??(typeof x!="object"||x===null)?x:Object.assign({},r,x),t.forEach(g=>g(r,m))}},i=()=>r,l={setState:o,getState:i,getInitialState:()=>p,subscribe:f=>(t.add(f),()=>t.delete(f))},p=r=e(o,i,l);return l},us=(e=>e?cn(e):cn),fs=e=>e;function hs(e,r=fs){const t=q.useSyncExternalStore(e.subscribe,q.useCallback(()=>r(e.getState()),[e,r]),q.useCallback(()=>r(e.getInitialState()),[e,r]));return q.useDebugValue(t),t}const dn=e=>{const r=us(e),t=o=>hs(r,o);return Object.assign(t,r),t},Dn=(e=>e?dn(e):dn);function gs(e,r){let t;try{t=e()}catch{return}return{getItem:i=>{var s;const a=p=>p===null?null:JSON.parse(p,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 fr=e=>r=>{try{const t=e(r);return t instanceof Promise?t:{then(o){return fr(o)(t)},catch(o){return this}}}catch(t){return{then(o){return this},catch(o){return fr(o)(t)}}}},xs=(e,r)=>(t,o,i)=>{let s={storage:gs(()=>window.localStorage),partialize:b=>b,version:0,merge:(b,w)=>({...w,...b}),...r},a=!1,l=0;const p=new Set,f=new Set;let h=s.storage;if(!h)return e((...b)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),t(...b)},o,i);const x=()=>{const b=s.partialize({...o()});return h.setItem(s.name,{state:b,version:s.version})},m=i.setState;i.setState=(b,w)=>(m(b,w),x());const g=e((...b)=>(t(...b),x()),o,i);i.getInitialState=()=>g;let y;const d=()=>{var b,w;if(!h)return;const k=++l;a=!1,p.forEach(C=>{var v;return C((v=o())!=null?v:g)});const $=((w=s.onRehydrateStorage)==null?void 0:w.call(s,(b=o())!=null?b:g))||void 0;return fr(h.getItem.bind(h))(s.name).then(C=>{if(C)if(typeof C.version=="number"&&C.version!==s.version){if(s.migrate){const v=s.migrate(C.state,C.version);return v instanceof Promise?v.then(E=>[!0,E]):[!0,v]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,C.state];return[!1,void 0]}).then(C=>{var v;if(k!==l)return;const[E,D]=C;if(y=s.merge(D,(v=o())!=null?v:g),t(y,!0),E)return x()}).then(()=>{k===l&&($==null||$(o(),void 0),y=o(),a=!0,f.forEach(C=>C(y)))}).catch(C=>{k===l&&($==null||$(void 0,C))})};return i.persist={setOptions:b=>{s={...s,...b},b.storage&&(h=b.storage)},clearStorage:()=>{h==null||h.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>d(),hasHydrated:()=>a,onHydrate:b=>(p.add(b),()=>{p.delete(b)}),onFinishHydration:b=>(f.add(b),()=>{f.delete(b)})},s.skipHydration||d(),y||g},ms=xs,gt={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",customFont:"",customHeadFont:"",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:0,contrast:"medium",contrastMode:"auto",containerPadPx:0,edgePadPx:0,cardGapPx:0,cardStyle:"soft",cardHeader:"plain",surfaceTint:"snow",nestedStyle:"recessed",nestedDepth:0,headerStrength:0,tintIntensity:0,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},Fe=e=>JSON.stringify(e),U=Dn()(ms((e,r)=>({settings:{...gt},savedThemes:[],baseline:Fe(gt),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:Fe(s)}}),reset:()=>e(()=>({settings:{...gt},baseline:Fe(gt)})),captureBaseline:()=>e(t=>({baseline:Fe(t.settings)})),restoreBaseline:()=>e(t=>{try{return{settings:JSON.parse(t.baseline)}}catch{return{}}}),isDirty:()=>Fe(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:Fe({...o.settings,presetId:i})}}),applySaved:t=>e(()=>{const o={...t.snap,presetId:t.id};return{settings:o,baseline:Fe(o)}}),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)})),importTheme:(t,o)=>{const i=r().savedThemes.map(p=>p.name.toLowerCase());let s=t,a=2;for(;i.includes(s.toLowerCase());)s=`${t} ${a++}`;const l={id:"imp"+Date.now(),name:s,snap:o};return e(p=>{const f={...o,presetId:l.id};return{savedThemes:[...p.savedThemes,l],settings:f,baseline:Fe(f)}}),l}}),{name:"omnieye-theme-studio"}));function Re(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 hr(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,p=0;const f=(i+s)/2;return a&&(p=a/(1-Math.abs(2*f-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(p*100),Math.round(f*100)]}function se(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 be(e){try{const[r,t]=hr(e),o=Math.max(t,18);return{50:se(r,Math.max(Math.round(o*.3),10),96),100:se(r,Math.max(Math.round(o*.42),12),91),200:se(r,Math.max(Math.round(o*.55),16),82),300:se(r,Math.max(Math.round(o*.7),20),70),400:se(r,o,60),500:e,600:se(r,Math.min(o+4,100),44),700:se(r,Math.min(o+8,100),36),800:se(r,Math.max(Math.round(o*.92),16),26),900:se(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 ar(e,r){try{const t=l=>{const p=[1,3,5].map(f=>{const h=parseInt(l.slice(f,f+2),16)/255;return h<=.04045?h/12.92:Math.pow((h+.055)/1.055,2.4)});return .2126*p[0]+.7152*p[1]+.0722*p[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 pe(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 Cr(e){const r=be(e.primaryHex),t=be(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:pe(e.highlightHex||"#ffd400",.15),highlightBd:pe(e.highlightHex||"#ffd400",.34),pContrast:e.contrastMode==="light"?"#ffffff":e.contrastMode==="dark"?"rgba(0,0,0,0.87)":ar(i,"#ffffff")>=2.9?"#ffffff":"rgba(0,0,0,0.87)",pContainer:o?pe(e.primaryHex,.26):r[50],onPContainer:o?r[100]:r[800],sMain:s,sContrast:ar(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,p=l?e.errorHex:pe(e.errorHex,o?.22:.13),f=l?e.warningHex:pe(e.warningHex,o?.22:.14),h=l?e.infoHex:pe(e.infoHex,o?.22:.13),x=l?e.successHex:pe(e.successHex,o?.22:.13),m=l?"#ffffff":o?be(e.errorHex)[300]:e.errorHex,g=l?"#ffffff":o?be(e.warningHex)[300]:be(e.warningHex)[700],y=l?"#ffffff":o?be(e.infoHex)[300]:e.infoHex,d=l?"#ffffff":o?be(e.successHex)[300]:be(e.successHex)[700],b=hr(e.primaryHex)[0],w={neutral:[220,6],warm:[32,26],cool:[210,30],brand:[b,42],slate:[214,16],snow:[0,0]};let k=w[e.surfaceTint]||w.neutral;if(e.tintIntensity>0){const ce=!!(e.surfaceTint&&w[e.surfaceTint]&&e.surfaceTint!=="snow");k=[ce?k[0]:b,Math.round((ce?k[1]:42)*e.tintIntensity/100)]}o?(a.bgDefault=se(k[0],Math.round(k[1]*.7),7),a.paper=se(k[0],Math.round(k[1]*.7),13),a.paper2=se(k[0],Math.round(k[1]*.85),19)):e.surfaceTint==="snow"&&!(e.tintIntensity>0)?(a.bgDefault="#ffffff",a.paper="#ffffff",a.paper2="#ffffff"):(a.bgDefault=se(k[0],Math.round(k[1]*.9),e.surfaceTint==="brand"?92:e.surfaceTint==="cool"?94:96),a.paper=se(k[0],Math.round(k[1]*.4),99),a.paper2=se(k[0],Math.round(k[1]*.85),e.surfaceTint==="brand"?95:96.5)),e.pageBgHex&&(a.bgDefault=e.pageBgHex),e.cardBgHex&&(a.paper=e.cardBgHex);const $={soft:0,standard:1,medium:2,high:3},C=$[e.contrast]!==void 0?$[e.contrast]:1,v=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=v[C][0],a.textSecondary=v[C][1],a.divider=v[C][2],a.outline=v[C][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?se(k[0],Math.round(k[1]*.9),22):se(k[0],Math.max(Math.round(k[1]*.3),4),100):e.nestedStyle==="bordered"?a.paper2=a.paper:a.paper2=o?se(k[0],Math.round(k[1]*.9),Math.max(3,5)):se(k[0],Math.min(Math.round(k[1]*1.1),60),Math.max(88,94-k[1]*.18));const E=e.btnColorHex||i,D=e.accentGradient?"linear-gradient(135deg,"+E+","+(e.btnColorHex?be(e.btnColorHex)[700]:r[o?500:700])+")":E,A=e.btnTextHex||(ar(E,"#ffffff")>=2.9?"#ffffff":"rgba(0,0,0,0.87)"),J=e.h1Color||null,z=e.h2Color||null,N=e.h3Color||null,c=e.h4Color||null,H=e.h5Color||null,R=e.h6Color||null,M=[{key:"sm",px:13},{key:"df",px:12},{key:"lg",px:18}],_=M.find(ce=>ce.key===e.textSize)||M[1],K=e.baseFontPx>0?e.baseFontPx:_.px,B=e.bodyLineHeight>0?e.bodyLineHeight:1.5,I=e.h1Size>0?e.h1Size:20,T=Math.round(I*1.1),S=I,W=Math.max(Math.round(I*.9),11),G=Math.max(Math.round(I*.8),11),V=Math.max(Math.round(I*.7),10),O=Math.max(Math.round(I*.6),10),Y=Math.max(Math.round(I*.5),9),L=K,P=Math.round(K*.92),X=Math.round(K*.8),Q=Math.round(K*.72),le=e.headingWeight,F=e.headingLH>0?e.headingLH:1.2,me=e.bodyWeight>0?e.bodyWeight:400,Oe=Math.min(900,me+200),Ne={compact:.82,default:1,comfortable:1.16},Be=e.densityScale>0?e.densityScale/100:Ne[e.density]??1,Ve=Math.round(20*Be),Ue=Math.round(14*Be),Yt=e.cardGapPx>0?e.cardGapPx:Math.round(16*Be),De=Math.round(11*Be*({compact:.66,default:1,comfortable:1.32}[e.tableDensity]??1)),vt=e.containerPadPx>0?e.containerPadPx:Math.round(10*Be),He=e.radiusVal,Me=He+"px",Z=Math.max(Math.round(He*.6),2)+"px",je={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)"},tt="1px solid rgba(255,255,255,0.06)";let pt,Ge,St;e.cardStyle==="outlined"?(pt="none",Ge="1.5px solid "+a.outline,St="none"):e.cardStyle==="soft"?(pt=je[1],Ge=o?tt:"none",St=je[1]):(pt=je[8],Ge=o?tt:"none",St=je[4]),e.cardShadowPx>0&&(pt="0 "+Math.round(e.cardShadowPx*.45)+"px "+e.cardShadowPx+"px rgba(16,24,40,"+(o?.55:.16)+")");let Ct="transparent",wr="1px solid "+a.divider,Jt="none";e.cardHeader==="plain"?wr="none":e.cardHeader==="tinted"?Ct=a.pContainer:e.cardHeader==="accent"&&(Jt="inset 3px 0 0 "+i),e.headerStrength>0&&(Jt="inset "+Math.max(1,Math.round(e.headerStrength*.06))+"px 0 0 "+i,Ct=pe(e.primaryHex,(o?.14:.08)*(e.headerStrength/100))),e.cardHdrHex&&(Ct=e.cardHdrHex);const Fn=o?"none":je[4],Wn=o?"1px solid "+a.divider:"none",zn=e.nestedStyle==="bordered"?"1.5px solid "+a.outline:"1px solid "+a.divider,_n=e.nestedDepth>0?"inset 3px 0 0 "+pe(e.primaryHex,.55)+", 0 "+Math.round(e.nestedDepth*.4)+"px "+e.nestedDepth+"px rgba(16,24,40,"+(o?.42:.1)+")":"none",Ln=(e.appName||"").trim().split(/\s+/).slice(0,2).map(ce=>ce[0]||"").join("").toUpperCase()||"AP",Nn=!!(e.logoMode==="image"&&e.logoUrl),Vn=!!e.loginImage,kr=ce=>ce.includes(" ")&&!ce.startsWith('"')&&!ce.startsWith("'")?`"${ce}"`:ce,Un=kr(e.headingFont||e.fontFamily),Gn=kr(e.fontFamily),ye=hr(e.primaryHex)[0],xe=(ce,Pe)=>se((ce%360+360)%360,62,o?60:46),Tr={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:[se(ye,55,o?40:78),se(ye,60,o?50:64),i,se(ye,70,o?70:38),se(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)]},Yn=Tr[e.chartScheme]||Tr.brand,Jn=[r[600],t[600],se((ye+42)%360,55,46),se((ye+205)%360,50,46)],qn={error:{cb:p,cc:m},success:{cb:x,cc:d},info:{cb:h,cc:y},warning:{cb:f,cc:g}},qt=e.mapGlass==="light",Kn=qt?"rgba(255,255,255,0.84)":"rgba(15,20,28,0.74)",Xn=qt?"#1c2733":"#f3f6fa",Qn=qt?"rgba(0,0,0,0.12)":"rgba(255,255,255,0.18)",Zn="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%, "+pe(i,.22)+", rgba(0,0,0,0) 60%), "+"#0f141c",eo="linear-gradient(135deg,"+i+","+r[700]+")",to="linear-gradient(180deg,"+pe(r[900],.12)+","+pe(r[900],.55)+")",ro="linear-gradient(135deg,"+r[700]+","+r[900]+")",no="linear-gradient(135deg,"+pe(r[900],.55)+","+pe(e.primaryHex,.45)+")",Br={"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"}},oo=Br[e.notifPosition]||Br["top-right"],Rr=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:f,icc:g,dot:e.warningHex};let jt;e.notifStyle==="toast"?jt={boxShadow:je[8],border:typeof Ge=="string"&&Ge!=="none"?Ge:"none"}:e.notifStyle==="banner"?jt={boxShadow:je[2],borderLeft:"4px solid "+Rr.bar}:jt={boxShadow:"none",border:"1px solid "+a.divider};const io=e.notifCardHex||(o?"#1e1e1e":"#ffffff"),ao={compact:"7px",default:"11px",comfortable:"16px"},so={compact:"6px",default:"12px",comfortable:"22px"},lo={top:"flex-start",middle:"center",bottom:"flex-end"},co={left:"flex-start",center:"center",right:"flex-end"},po={plain:"transparent",tinted:a.paper2,accent:a.highlightSoft},uo={rowPy:ao[e.tableDensity]||"11px",cellPx:so[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:po[e.tableHeaderStyle]||a.paper2,cellAI:lo[e.tableCellAlignV]||"center",cellJC:co[e.tableCellAlignH]||"flex-start",stripeBg:o?"rgba(255,255,255,0.035)":"rgba(0,0,0,0.028)",statusMap:{Delivered:{sb:x,sc:d},Processing:{sb:a.pContainer,sc:o?a.pLight:a.pDark},Pending:{sb:f,sc:g},Shipped:{sb:h,sc:y}},filters:["All","Delivered","Processing","Pending"].map((ce,Pe)=>({label:ce,bg:Pe===0?a.highlightSoft:"transparent",c:Pe===0?a.textPrimary:a.textSecondary,brd:Pe===0?a.highlightBd:a.outline}))},fo={sm:"Small",df:"Default",lg:"Large"},ho={compact:"Compact",default:"Default",comfortable:"Comfortable"},go={outlined:"Outlined",soft:"Soft",floating:"Floating"},xo={sharp:"Sharp",rounded:"Rounded",round:"Round"},mo=[{key:"sidebar",label:"Sidebar",desc:"Full drawer",ic:"▤"},{key:"rail",label:"Rail",desc:"Icons only",ic:"▥"},{key:"topbar",label:"Top Bar",desc:"Horizontal",ic:"▦"}],yo=e.fontFamily+" · "+(fo[e.textSize]||"Default"),bo=(xo[e.radiusPreset]||"Custom")+" · "+(ho[e.density]||"Default")+" · "+(go[e.cardStyle]||"Soft"),vo=[{label:"General",ic:"◉"},{label:"Appearance",ic:"◧"},{label:"Modules",ic:"◫"},{label:"Team",ic:"◍"},{label:"Security",ic:"▣"},{label:"Billing",ic:"◳"}].map((ce,Pe)=>({...ce,on:Pe===1,bg:Pe===1?a.highlightSoft:"transparent",c:Pe===1?a.textPrimary:a.textSecondary,bar:Pe===1?"3px solid "+a.highlight:"3px solid transparent"})),So=mo.map(ce=>({...ce,active:e.navPattern===ce.key,brd:e.navPattern===ce.key?i:a.divider,bg:e.navPattern===ce.key?a.pContainer:a.paper,color:e.navPattern===ce.key?a.onPContainer:a.textPrimary})),Co=e.sidebarWidth,jo=e.appBarH>0?e.appBarH:56,wo=e.appBarH>0?e.appBarH+"px":"Auto (56px)";return{pal:r,spal:t,isDark:o,pMain:i,sMain:s,t:a,errSoft:p,warnSoft:f,infoSoft:h,sucSoft:x,errTxt:m,warnTxt:g,infoTxt:y,sucTxt:d,sevMap:qn,accentBg:D,btnText:A,hc1:J,hc2:z,hc3:N,hc4:c,hc5:H,hc6:R,base:K,bodyLH:B,h1base:I,tDisplay:T,tH1:S,tH2:W,tTitle:G,tH4:V,tH5:O,tH6:Y,tBody:L,tBodySm:P,tCaption:X,tOverline:Q,wH1:le,wH2:le,wH3:le,wH4:le,wH5:le,wH6:le,headLH:F,bodyWeightEff:me,bwEmph:Oe,pad:Ve,padSm:Ue,gap:Yt,rowPy:De,screenPad:vt,r:He,rad:Me,radSm:Z,SH:je,cardShadow:pt,cardBorder:Ge,btnShadow:St,cardHdrBg:Ct,cardHdrBorder:wr,cardHdrAccent:Jt,appbarShadow:Fn,appbarBorder:Wn,nestBorder:zn,nestShadow:_n,iconInitials:Ln,hasLogo:Nn,hasLoginImage:Vn,headFam:Un,bodyFam:Gn,chartHue:ye,chartPalette:Yn,avatarColors:Jn,overlaySurface:Kn,onOverlay:Xn,overlayBorder:Qn,mediaBg:Zn,loginBrandGrad:eo,loginScrimGrad:to,loginCenteredGrad:ro,loginScrimGradC:no,npos:oo,nacc:Rr,toastDeco:jt,toastBg:io,btnCase:e.btnCase!=="none"?"uppercase":"none",table:uo,typeSummary:yo,shapeSummary:bo,settingsCats:vo,navSettingsChips:So,sidebarWidth:Co,appBarHEff:jo,appBarHLabel:wo}}function ys({icon:e,title:r,info:t,open:o,dimmed:i,onToggle:s,onPreviewMenu:a,children:l}){const p=U(w=>w.settings),f=p.mode==="dark",h=p.primaryHex||"#1565c0",x=Re(p.mode),m=be(h),g=Cr(p),y=o?f?pe(h,.22):pe(h,.1):"transparent",d=o?f?m[200]:m[700]:x.text,b=o?h:x.chevron;return n.jsxs(u.Box,{sx:{background:y,opacity:i?.1:1,transform:o?"translateY(-2px)":"none",transition:"opacity .22s ease, transform .22s ease",borderBottom:`1px solid ${x.divider}`,overflow:"hidden"},children:[n.jsxs(u.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(u.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(u.Box,{sx:{flex:1,minWidth:0},children:n.jsx(u.Box,{sx:{fontSize:`${g.tH5}px`,fontWeight:g.wH5,fontFamily:`${g.headFam},sans-serif`,lineHeight:1.25,color:d,letterSpacing:"-.2px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r})}),a&&n.jsx(u.Box,{component:"span",title:"Change preview screen",onClick:w=>{w.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(u.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(u.Box,{sx:{width:20,height:20,borderRadius:"6px",display:"grid",placeItems:"center",fontSize:"9px",color:b,flexShrink:0,transition:"background .18s, border-color .18s"},children:n.jsx(u.Box,{component:"span",sx:{display:"block",lineHeight:1,transform:o?"rotate(180deg)":"none",transition:"transform .2s"},children:"▼"})})]}),n.jsx(u.Collapse,{in:o,unmountOnExit:!0,timeout:280,children:n.jsx(u.Box,{sx:{p:"2px 13px 12px",borderTop:`1px solid ${x.divider}`},children:l})})]})}function Te(){const e=U(r=>r.settings);return q.useMemo(()=>Cr(e),[e])}function et({tabs:e,active:r,onChange:t}){const o=U(m=>m.settings.mode),i=U(m=>m.settings.primaryHex)||"#1565c0",s=U(m=>m.settings.highlightHex)||"#ffd400",a=U(m=>m.settings.bodyWeight)||400,l=o==="dark",p=Math.min(900,a+200),f=Te(),h=l?"#e6edf3":"#1c2127",x=l?"#cdd4de":"#5a6573";return n.jsx(u.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 g=m.key===r,y=n.jsx(u.Button,{onClick:()=>t(m.key),disableRipple:!0,sx:{flex:1,minWidth:0,px:"4px",pt:"9px",pb:"8px",borderRadius:"6px 6px 0 0",mb:"-1px",fontSize:`${f.tBodySm}px`,fontFamily:`${f.bodyFam},sans-serif`,fontWeight:g?p:a,letterSpacing:".2px",textTransform:"none",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:g?h:x,opacity:g?1:.3,bgcolor:g?pe(s,l?.26:.18):"transparent",borderBottom:g?`3px solid ${i}`:"2px solid transparent",transition:"color .16s ease, background .16s ease, border-color .16s ease, opacity .16s ease","&:hover":g?{bgcolor:pe(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(u.Tooltip,{title:m.info,arrow:!0,children:y},m.key):y})})}const gr=[{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 _,K;const[e,r]=q.useState("presets"),t=U(B=>B.settings),o=t.mode==="dark",i=Re(t.mode),s=t.highlightHex||"#ffd400",a=pe(s,o?.3:.18),l=o?"#e6edf3":"#1c2127",p=o?"rgba(255,255,255,0.82)":"#2c333d",f=U(B=>B.savedThemes),h=U(B=>B.applyPreset),x=U(B=>B.applySaved),m=U(B=>B.saveTheme),g=U(B=>B.renameSaved),y=U(B=>B.deleteSaved),d=U(B=>B.importTheme),b=U(B=>B.set),w=U(B=>B.isDirty),k=(B,I)=>{const T=new Blob([JSON.stringify({name:B,snap:I},null,2)],{type:"application/json"}),S=URL.createObjectURL(T),W=document.createElement("a");W.href=S,W.download=`${B.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}.theme.json`,W.click(),URL.revokeObjectURL(S)},$=B=>{var S;const I=(S=B.target.files)==null?void 0:S[0];if(!I)return;const T=new FileReader;T.onload=()=>{try{const W=JSON.parse(T.result),G=W.snap??W;d(W.name||"Imported Theme",G)}catch{}},T.readAsText(I),B.target.value=""},[C,v]=q.useState(null),[E,D]=q.useState(!1),[A,J]=q.useState(""),[z,N]=q.useState(null),[c,H]=q.useState(null),R=((_=gr.find(B=>B.id===t.presetId))==null?void 0:_.name)||((K=f.find(B=>B.id===t.presetId))==null?void 0:K.name)||"Custom Theme",M=(B,I)=>{const T=B.trim();return T?f.some(S=>S.name.toLowerCase()===T.toLowerCase()&&S.id!==I)?"Name already exists":"":"Name required"};return n.jsxs(n.Fragment,{children:[n.jsx(et,{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(u.Box,{sx:{p:"12px 2px 2px"},children:[e==="presets"&&n.jsx(u.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"9px"},children:gr.map(B=>{const I=t.presetId===B.id;return n.jsxs(u.Box,{onClick:()=>h(B.id,B.snap),title:`${B.name} — applies this colour palette`,sx:{display:"flex",alignItems:"center",gap:"9px",p:"9px 10px",borderRadius:"11px",cursor:"pointer",textAlign:"left",border:`1px solid ${I?s:o?"#363d48":"#e3e8ee"}`,bgcolor:I?a:o?"#262b34":"#ffffff",transition:"all .14s ease"},children:[n.jsxs(u.Box,{sx:{display:"flex",flexDirection:"column",gap:"2px",flexShrink:0},children:[n.jsx(u.Box,{sx:{width:20,height:11,borderRadius:"3px",bgcolor:B.snap.primaryHex}}),n.jsx(u.Box,{sx:{width:20,height:7,borderRadius:"2px",bgcolor:B.snap.secondaryHex}})]}),n.jsx(u.Box,{component:"span",sx:{fontSize:"11px",fontWeight:600,color:I?l:p,lineHeight:1.3},children:B.name})]},B.id)})}),e==="saved"&&n.jsxs(u.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[f.length===0&&n.jsx(u.Typography,{variant:"caption",sx:{color:"text.secondary",py:2,textAlign:"center"},children:"No saved themes yet."}),n.jsx(u.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:.9},children:f.map(B=>{const I=t.presetId===B.id;return n.jsxs(u.Box,{onClick:()=>x(B),title:"Apply this saved theme",sx:{display:"flex",flexDirection:"column",gap:.9,p:"9px 10px",borderRadius:"11px",cursor:"pointer",border:`1px solid ${I?s:o?"#363d48":"#e3e8ee"}`,bgcolor:I?a:o?"#262b34":"#ffffff",transition:"all .14s ease"},children:[n.jsxs(u.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[n.jsxs(u.Box,{sx:{display:"flex",flexDirection:"column",gap:"2px",flexShrink:0},children:[n.jsx(u.Box,{sx:{width:20,height:11,borderRadius:"3px",bgcolor:B.snap.primaryHex}}),n.jsx(u.Box,{sx:{width:20,height:7,borderRadius:"2px",bgcolor:B.snap.secondaryHex}})]}),n.jsx(u.Box,{component:"span",sx:{flex:1,minWidth:0,fontSize:"11px",fontWeight:600,color:I?l:p,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:B.name})]}),n.jsx(u.Box,{sx:{display:"flex",justifyContent:"flex-end"},children:n.jsx(u.Box,{component:"span",onClick:T=>{T.stopPropagation(),v({el:T.currentTarget,id:B.id})},sx:{cursor:"pointer",color:i.muted,px:.5},children:"⋮"})})]},B.id)})}),n.jsxs(u.Box,{sx:{display:"flex",gap:1,mt:1},children:[n.jsxs(u.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:$})]}),n.jsx(u.Button,{size:"small",variant:"outlined",onClick:()=>k(R,t),sx:{flex:1,textTransform:"none"},children:"⤓ Download"}),n.jsx(u.Button,{size:"small",variant:"contained",disabled:!w(),onClick:()=>{J(""),D(!0)},sx:{flex:1,textTransform:"none"},children:"+ Save"})]})]}),e==="mode"&&n.jsx(u.Box,{sx:{display:"flex",gap:1},children:["light","dark"].map(B=>n.jsx(u.Button,{onClick:()=>b({mode:B}),variant:t.mode===B?"contained":"outlined",sx:{flex:1,textTransform:"capitalize"},children:B},B))})]}),n.jsxs(u.Menu,{open:!!C,anchorEl:C==null?void 0:C.el,onClose:()=>v(null),children:[n.jsx(u.MenuItem,{onClick:()=>{const B=f.find(I=>I.id===C.id);x(B),v(null)},children:"✏️ Edit"}),n.jsx(u.MenuItem,{onClick:()=>{const B=f.find(I=>I.id===C.id);N({id:B.id,name:B.name}),v(null)},children:"✎ Rename"}),n.jsx(u.MenuItem,{onClick:()=>{const B=f.find(I=>I.id===C.id);H({id:B.id,name:B.name}),v(null)},children:"🗑 Delete"}),n.jsx(u.MenuItem,{onClick:()=>{const B=f.find(I=>I.id===C.id);k(B.name,B.snap),v(null)},children:"⤓ Download"})]}),n.jsxs(u.Dialog,{open:E,onClose:()=>D(!1),children:[n.jsx(u.DialogTitle,{children:"Save theme"}),n.jsx(u.DialogContent,{children:n.jsx(u.TextField,{autoFocus:!0,fullWidth:!0,size:"small",label:"Theme name",value:A,onChange:B=>J(B.target.value),error:!!M(A),helperText:M(A),sx:{mt:1}})}),n.jsxs(u.DialogActions,{children:[n.jsx(u.Button,{onClick:()=>D(!1),children:"Cancel"}),n.jsx(u.Button,{variant:"contained",disabled:!!M(A),onClick:()=>{m(A.trim()),D(!1)},children:"Save"})]})]}),n.jsxs(u.Dialog,{open:!!z,onClose:()=>N(null),children:[n.jsx(u.DialogTitle,{children:"Rename theme"}),n.jsx(u.DialogContent,{children:n.jsx(u.TextField,{autoFocus:!0,fullWidth:!0,size:"small",label:"New name",value:(z==null?void 0:z.name)??"",onChange:B=>N(I=>I&&{...I,name:B.target.value}),error:!!(z&&M(z.name,z.id)),helperText:z?M(z.name,z.id):"",sx:{mt:1}})}),n.jsxs(u.DialogActions,{children:[n.jsx(u.Button,{onClick:()=>N(null),children:"Cancel"}),n.jsx(u.Button,{variant:"contained",disabled:!!(z&&M(z.name,z.id)),onClick:()=>{g(z.id,z.name.trim()),N(null)},children:"Rename"})]})]}),n.jsxs(u.Dialog,{open:!!c,onClose:()=>H(null),children:[n.jsx(u.DialogTitle,{children:"Delete theme"}),n.jsx(u.DialogContent,{children:n.jsxs(u.Typography,{variant:"body2",children:["Delete “",c==null?void 0:c.name,"”? This cannot be undone."]})}),n.jsxs(u.DialogActions,{children:[n.jsx(u.Button,{onClick:()=>H(null),children:"Cancel"}),n.jsx(u.Button,{color:"error",variant:"contained",onClick:()=>{y(c.id),H(null)},children:"Delete"})]})]})]})}function vs({tip:e,sk:r}){return n.jsx(u.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 Je({children:e,tip:r,sk:t,mt:o}){const i=Te();return n.jsxs(u.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(vs,{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(u.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(u.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}})})}function Ss(){const[e,r]=q.useState("brand"),t=U(d=>d.settings),o=U(d=>d.set),i=Re(t.mode),s=Te(),a={fontSize:"11.5px",color:i.body,fontWeight:600},l={fontSize:`${s.tBodySm}px`,color:i.body,fontWeight:s.bodyWeightEff,fontFamily:`${s.bodyFam},sans-serif`,lineHeight:s.bodyLH},p=t.primaryHex||"#1565c0",f=be(p),h=[50,100,200,300,400,500,600,700,800,900].map(d=>f[d]),x=d=>o({...d,presetId:"custom"}),m=[{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"}],g=[{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(u.Box,{sx:{display:"flex",flexDirection:"column",gap:"11px"},children:[n.jsx(et,{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(u.Box,{sx:{p:"12px 2px 2px",display:"flex",flexDirection:"column",gap:"11px"},children:[e==="brand"&&n.jsxs(u.Box,{sx:{display:"flex",flexDirection:"column",gap:"11px"},children:[n.jsxs(u.Box,{children:[n.jsx(Je,{sk:i,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(u.Box,{sx:{position:"relative",height:46,borderRadius:"11px",background:p,overflow:"hidden",display:"flex",alignItems:"center",px:"14px",boxShadow:`0 3px 10px ${p}44`},children:[n.jsxs(u.Box,{component:"span",sx:{color:"rgba(255,255,255,.85)",fontSize:"12.5px",fontWeight:700,pointerEvents:"none"},children:[p," · tap to change"]}),n.jsx(u.Box,{component:"input",type:"color",value:p,onChange:d=>x({primaryHex:d.target.value}),sx:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer",border:"none",p:0}})]}),n.jsx(u.Box,{sx:{display:"flex",gap:"2px",borderRadius:"7px",overflow:"hidden",height:14,mt:"7px"},children:h.map((d,b)=>n.jsx(u.Box,{sx:{flex:1,background:d}},b))})]}),n.jsxs(u.Box,{children:[n.jsx(Je,{sk:i,tip:"Secondary accent — secondary/outlined buttons, switches & toggles, selected chips, and the second data series in charts.",children:"Secondary / Accent"}),n.jsx(u.Box,{sx:{position:"relative",height:34,borderRadius:"9px",background:t.secondaryHex,overflow:"hidden"},children:n.jsx(u.Box,{component:"input",type:"color",value:t.secondaryHex,onChange:d=>x({secondaryHex:d.target.value}),sx:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer",border:"none",p:0}})})]}),n.jsxs(u.Box,{children:[n.jsx(Je,{sk:i,tip:"Accent colour used to draw attention — highlight panels, featured badges, callouts. Defaults to the brand colour.",children:"Highlight Colour"}),n.jsx(u.Box,{sx:{position:"relative",height:34,borderRadius:"8px",background:t.highlightHex||"#ffd400",overflow:"hidden",border:`1px solid ${i.insetBd}`},children:n.jsx(u.Box,{component:"input",type:"color",value:t.highlightHex||"#ffd400",onChange:d=>x({highlightHex:d.target.value}),sx:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer",border:"none",p:0}})})]})]}),e==="text"&&n.jsxs(u.Box,{sx:{display:"flex",flexDirection:"column",gap:"11px"},children:[n.jsx(Je,{sk:i,children:"Heading Text Colors"}),n.jsx(u.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"9px"},children:m.map(d=>n.jsxs(u.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(st,{sk:i,border:!0,value:t[d.key]||"#1c2127",onChange:b=>o({[d.key]:b})}),n.jsx(u.Box,{component:"span",sx:l,children:d.label})]},d.key))}),n.jsx(Je,{sk:i,children:"Body Text Colors"}),n.jsxs(u.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"7px"},children:[n.jsxs(u.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(st,{sk:i,border:!0,value:t.textPrimaryHex||"#1c2127",onChange:d=>o({textPrimaryHex:d})}),n.jsx(u.Box,{component:"span",sx:a,title:"Main body text colour.",children:"Primary Text"})]}),n.jsxs(u.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(st,{sk:i,border:!0,value:t.textSecondaryHex||"#5a6573",onChange:d=>o({textSecondaryHex:d})}),n.jsx(u.Box,{component:"span",sx:a,title:"Muted text colour.",children:"Secondary Text"})]}),n.jsxs(u.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(st,{sk:i,border:!0,value:t.dividerHex||"#e3e8ee",onChange:d=>o({dividerHex:d})}),n.jsx(u.Box,{component:"span",sx:a,title:"Divider / border colour.",children:"Divider"})]})]})]}),e==="status"&&n.jsxs(u.Box,{sx:{display:"flex",flexDirection:"column",gap:"7px"},children:[n.jsxs(u.Box,{children:[n.jsx(Je,{sk:i,tip:"Success, warning, error & info colours — used for alerts, status pills, toasts and validation states.",children:"Status Colors"}),n.jsx(u.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"7px"},children:g.map(d=>n.jsxs(u.Box,{sx:{display:"flex",alignItems:"center",gap:"8px",background:i.card,border:`1px solid ${i.insetBd}`,borderRadius:"9px",px:"9px",py:"7px"},children:[n.jsx(st,{sk:i,w:22,h:22,r:6,value:t[d.key],onChange:b=>o({[d.key]:b})}),n.jsx(u.Box,{component:"span",sx:a,children:d.label})]},d.key))})]}),n.jsxs(u.Box,{children:[n.jsx(Je,{sk:i,tip:"Override the auto-generated surface colours. Leave on Auto to follow the surface tint & mode.",children:"Surfaces"}),n.jsx(u.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"7px"},children:y.map(d=>{const b=!!t[d.key];return n.jsxs(u.Box,{sx:{display:"flex",alignItems:"center",gap:"8px",background:i.card,border:`1px solid ${i.insetBd}`,borderRadius:"9px",px:"9px",py:"5px"},children:[n.jsx(st,{sk:i,w:22,h:22,r:6,border:!0,value:t[d.key]||d.fb,onChange:w=>o({[d.key]:w})}),n.jsx(u.Box,{component:"span",sx:{...a,flex:1},children:d.label}),b&&n.jsx(u.Box,{component:"button",title:"Reset to Auto",onClick:()=>o({[d.key]:""}),sx:{background:"transparent",border:`1px solid ${i.insetBd}`,borderRadius:"6px",color:i.muted,fontSize:"10px",fontWeight:700,px:"7px",py:"3px",cursor:"pointer"},children:"Auto"})]},d.key)})})]})]})]})]})}function ge(e){const{label:r,info:t,value:o,effective:i,min:s,max:a,step:l=1,unit:p="",autoLabel:f,softMin:h,softMax:x,extra:m,onChange:g}=e,y=Re(U(J=>J.settings.mode)),d=Te(),b=`${d.bodyFam},sans-serif`,[w,k]=q.useState(!1),[$,C]=q.useState(String(i)),[v,E]=q.useState("");q.useEffect(()=>{w||C(String(i))},[i,w]);const D=J=>{const z=parseFloat(J);if(isNaN(z)){E("Enter a number");return}h!=null&&z<h?E(`Below ${h}${p} may break the UI`):x!=null&&z>x?E(`Above ${x}${p} may break the UI`):E(""),g(z)},A=o===0&&f?f:`${i}${p}`;return n.jsxs(u.Box,{sx:{mb:1.5},children:[n.jsxs(u.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:"8px"},children:[n.jsxs(u.Typography,{sx:{fontSize:`${d.tBodySm}px`,fontWeight:d.bwEmph,fontFamily:b,lineHeight:d.bodyLH,color:y.label2,display:"flex",alignItems:"center",gap:"5px"},children:[r,t&&n.jsx(u.Tooltip,{title:t,arrow:!0,children:n.jsx(u.Box,{component:"span",sx:{width:13,height:13,borderRadius:"50%",border:`1.1px solid ${y.chevron}`,color:y.chevron,fontSize:8,fontWeight:800,fontStyle:"italic",fontFamily:"Georgia, serif",display:"inline-grid",placeItems:"center",cursor:"help"},children:"i"})})]}),n.jsxs(u.Box,{sx:{display:"flex",alignItems:"center",gap:"5px",flexShrink:0},children:[w?n.jsx(u.InputBase,{autoFocus:!0,value:$,onChange:J=>C(J.target.value),onBlur:()=>{D($),k(!1)},onKeyDown:J=>{J.key==="Enter"&&(D($),k(!1)),J.key==="Escape"&&k(!1)},sx:{width:56,fontSize:`${d.tBodySm}px`,fontWeight:700,fontFamily:b,border:"1.5px solid",borderColor:"primary.main",borderRadius:"6px",px:"6px",py:"3px","& input":{p:0,textAlign:"center"}}}):n.jsxs(u.Box,{component:"button",onClick:()=>{C(String(i)),k(!0)},sx:{display:"inline-flex",alignItems:"center",gap:"5px",fontFamily:b,fontSize:`${d.tBodySm}px`,fontWeight:800,color:y.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:[A,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"})]})]}),m]})]}),n.jsx(u.Box,{component:"input",type:"range",min:s,max:a,step:l,value:i,onChange:J=>{E(""),g(parseFloat(J.target.value))},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)"}}}),v&&n.jsx(u.Typography,{variant:"caption",sx:{color:"warning.main",fontSize:10},children:v})]})}const Cs=[{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"}],js=[{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 Rt({label:e,fam:r,active:t,onClick:o}){const i=U(h=>h.settings.mode),s=U(h=>h.settings.primaryHex)||"#1565c0",a=U(h=>h.settings.highlightHex)||"#ffd400",l=i==="dark",p=be(s),f=pe(a,l?.3:.18);return n.jsx(u.Box,{onClick:o,sx:{py:"17px",px:"4px",borderRadius:"10px",textAlign:"center",cursor:"pointer",border:`1px solid ${t?l?p[400]:s:l?"#363d48":"#e3e8ee"}`,bgcolor:t?f:l?"#262b34":"#ffffff",transition:"all .14s ease","&:hover":t?{}:{borderColor:l?"#4a5361":"#c9d0d9"}},children:n.jsx(u.Box,{sx:{fontFamily:`${r}, sans-serif`,fontSize:13,fontWeight:700,lineHeight:1,color:t?l?p[200]:p[700]:l?"#aeb6c0":"#5a6573"},children:e})})}function pn({label:e,current:r,onLoad:t}){const o=Re(U(s=>s.settings.mode)),i=s=>{var h;const a=(h=s.target.files)==null?void 0:h[0];if(!a)return;const l=a.name.replace(/\.[^.]+$/,""),p=URL.createObjectURL(a),f=document.createElement("style");f.textContent=`@font-face{font-family:'${l}';src:url('${p}');font-display:swap;}`,document.head.appendChild(f),t(l,p)};return n.jsxs(u.Box,{sx:{mt:1.5},children:[n.jsxs(u.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,textAlign:"center"},children:["⬆ ",e,n.jsx(u.Box,{component:"span",sx:{color:o.muted},children:".woff2 / .ttf / .otf"}),n.jsx("input",{type:"file",accept:".woff2,.woff,.ttf,.otf",onChange:i,style:{display:"none"}})]}),r&&n.jsxs(u.Box,{sx:{mt:.9,display:"flex",alignItems:"center",gap:.9,bgcolor:"success.main",borderRadius:2,px:1.4,py:.9,color:"success.contrastText"},children:[n.jsx(u.Box,{component:"span",sx:{fontWeight:900,fontSize:12},children:"✓"}),n.jsxs(u.Box,{component:"span",sx:{fontSize:11.5},children:["Loaded: ",n.jsx("b",{children:r})]})]})]})}const ws={compact:1.15,default:1.25,airy:1.414};function ks(){const e=U(f=>f.settings),r=U(f=>f.set),t=Re(e.mode),[o,i]=q.useState(!1),s=e.scaleRatioCustom>0?e.scaleRatioCustom:ws[e.scaleRatio]??1.25,[a,l]=q.useState(s.toFixed(2));q.useEffect(()=>{o||l(s.toFixed(2))},[s,o]);const p=()=>{const f=parseFloat(a);isNaN(f)||r({scaleRatioCustom:f}),i(!1)};return o?n.jsx(u.InputBase,{autoFocus:!0,value:a,onChange:f=>l(f.target.value),onBlur:p,onKeyDown:f=>{f.key==="Enter"&&p(),f.key==="Escape"&&i(!1)},sx:{width:56,fontSize:"11.5px",fontWeight:700,border:"1.5px solid",borderColor:"primary.main",borderRadius:"6px",px:"6px",py:"3px","& input":{p:0,textAlign:"center"}}}):n.jsx(u.Box,{component:"button",title:"Configure scale ratio — each heading is the one above ÷ this value",onClick:()=>{l(s.toFixed(2)),i(!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","&: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 Ts(){const[e,r]=q.useState("bodyFont"),t=U(i=>i.settings),o=U(i=>i.set);return n.jsxs(n.Fragment,{children:[n.jsx(et,{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(u.Box,{sx:{p:"12px 2px 2px"},children:[e==="bodyFont"&&n.jsxs(n.Fragment,{children:[n.jsxs(u.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:"10px"},children:[Cs.map(i=>n.jsx(Rt,{label:i.label,sub:i.sub,fam:i.key,active:t.fontFamily===i.key,onClick:()=>o({fontFamily:i.key})},i.key)),t.customFont&&n.jsx(Rt,{label:t.customFont,sub:"Custom",fam:t.customFont,active:t.fontFamily===t.customFont,onClick:()=>o({fontFamily:t.customFont})})]}),n.jsx(pn,{label:"Upload custom font",current:t.customFont,onLoad:i=>o({customFont:i,fontFamily:i})})]}),e==="headFont"&&n.jsxs(n.Fragment,{children:[n.jsxs(u.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:"10px"},children:[js.map(i=>n.jsx(Rt,{label:i.label,fam:i.key,active:t.headingFont===i.key,onClick:()=>o({headingFont:i.key})},i.key)),t.customHeadFont&&n.jsx(Rt,{label:t.customHeadFont,sub:"Custom",fam:t.customHeadFont,active:t.headingFont===t.customHeadFont,onClick:()=>o({headingFont:t.customHeadFont})})]}),n.jsx(pn,{label:"Upload heading font",current:t.customHeadFont,onLoad:i=>o({customHeadFont:i,headingFont:i})})]}),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(ks,{}),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 Se({options:e,value:r,columns:t=3,onChange:o}){const i=U(w=>w.settings.mode),s=U(w=>w.settings.primaryHex)||"#1565c0",a=U(w=>w.settings.highlightHex)||"#ffd400",l=U(w=>w.settings.bodyWeight)||400,p=i==="dark",f=be(s),h=Math.min(900,l+200),x=pe(a,p?.3:.18),m=p?f[400]:s,g=p?f[200]:f[700],y=p?"#262b34":"#ffffff",d=p?"#363d48":"#e3e8ee",b=p?"#aeb6c0":"#5a6573";return n.jsx(u.Box,{sx:{display:"grid",gridTemplateColumns:`repeat(${t}, 1fr)`,gap:"6px"},children:e.map(w=>{const k=w.key===r,$=n.jsx(u.Box,{onClick:()=>o(w.key),sx:{py:"9px",px:"4px",borderRadius:"10px",textAlign:"center",cursor:"pointer",userSelect:"none",fontSize:"11px",fontWeight:k?h:l,border:`1px solid ${k?m:d}`,bgcolor:k?x:y,color:k?g:b,transition:"color .14s ease, background .14s ease, border-color .14s ease","&:hover":k?{}:{borderColor:p?"#4a5361":"#c9d0d9"}},children:w.label},w.key);return w.info?n.jsx(u.Tooltip,{title:w.info,arrow:!0,children:$},w.key):$})})}const Bs={outlined:0,soft:6,floating:24},Rs={plain:0,tinted:40,accent:60},Es={bordered:0,recessed:6,lighter:4};function Hs(){const[e,r]=q.useState("style"),t=U(p=>p.settings),o=U(p=>p.set),i=t.cardShadowPx>0?t.cardShadowPx:Bs[t.cardStyle]??24,s=t.headerStrength>0?t.headerStrength:Rs[t.cardHeader]??45,a=t.nestedDepth>0?t.nestedDepth:Es[t.nestedStyle]??6,l=t.tintIntensity>0?t.tintIntensity:t.surfaceTint==="snow"?0:50;return n.jsxs(n.Fragment,{children:[n.jsx(et,{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(u.Box,{sx:{p:"12px 2px 2px"},children:[e==="style"&&n.jsxs(n.Fragment,{children:[n.jsx(Se,{value:t.cardStyle,onChange:p=>o({cardStyle:p}),options:[{key:"outlined",label:"Outlined"},{key:"soft",label:"Soft"},{key:"floating",label:"Floating"}]}),n.jsx(u.Box,{sx:{mt:1.5},children:n.jsx(ge,{label:"Shadow depth",info:"Card elevation (px).",value:t.cardShadowPx,effective:i,min:0,max:40,unit:"px",onChange:p=>o({cardShadowPx:p})})})]}),e==="header"&&n.jsxs(n.Fragment,{children:[n.jsx(Se,{value:t.cardHeader,onChange:p=>o({cardHeader:p}),options:[{key:"plain",label:"Plain"},{key:"tinted",label:"Tinted"},{key:"accent",label:"Accent"}]}),n.jsx(u.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:"%",onChange:p=>o({headerStrength:p})})})]}),e==="nested"&&n.jsxs(n.Fragment,{children:[n.jsx(Se,{value:t.nestedStyle,onChange:p=>o({nestedStyle:p}),options:[{key:"recessed",label:"Recessed"},{key:"lighter",label:"Lighter"},{key:"bordered",label:"Bordered"}]}),n.jsx(u.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",onChange:p=>o({nestedDepth:p})})})]}),e==="tint"&&n.jsxs(n.Fragment,{children:[n.jsx(Se,{value:t.surfaceTint,onChange:p=>o({surfaceTint:p}),options:[{key:"snow",label:"None"},{key:"neutral",label:"Low"},{key:"brand",label:"High"}]}),n.jsx(u.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:"%",onChange:p=>o({tintIntensity:p})})})]})]})]})}function Ps(){const[e,r]=q.useState("rows"),t=U(i=>i.settings),o=U(i=>i.set);return n.jsxs(n.Fragment,{children:[n.jsx(et,{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(u.Box,{sx:{p:"12px 2px 2px"},children:[e==="rows"&&n.jsxs(n.Fragment,{children:[n.jsx(Se,{value:t.tableDensity,onChange:i=>o({tableDensity:i}),options:[{key:"compact",label:"Compact"},{key:"default",label:"Default"},{key:"comfortable",label:"Comfortable"}]}),n.jsx(u.FormControlLabel,{sx:{mt:1},control:n.jsx(u.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(Se,{value:t.tableColDensity,onChange:i=>o({tableColDensity:i}),options:[{key:"compact",label:"Compact"},{key:"default",label:"Default"},{key:"comfortable",label:"Comfortable"}]}),n.jsx(u.FormControlLabel,{sx:{mt:1},control:n.jsx(u.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(Se,{value:t.tableCellAlignH,onChange:i=>o({tableCellAlignH:i}),options:[{key:"left",label:"Left"},{key:"center",label:"Center"},{key:"right",label:"Right"}]}),n.jsx(u.Box,{sx:{mt:1},children:n.jsx(Se,{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(Se,{value:t.tableHeaderStyle,onChange:i=>o({tableHeaderStyle:i}),options:[{key:"plain",label:"Plain"},{key:"tinted",label:"Tinted"},{key:"accent",label:"Accent"}]}),n.jsx(u.FormControlLabel,{sx:{mt:1},control:n.jsx(u.Switch,{checked:t.tableStripe,onChange:i=>o({tableStripe:i.target.checked})}),label:"Striped rows"})]})]})]})}const sr={compact:.82,default:1,comfortable:1.16};function $s(){const[e,r]=q.useState("shape"),t=U(p=>p.settings),o=U(p=>p.set),i=Re(t.mode),s=t.densityScale>0?t.densityScale:Math.round((sr[t.density]??1)*100),a=t.cardGapPx>0?t.cardGapPx:Math.round(16*(sr[t.density]??1)),l=t.containerPadPx>0?t.containerPadPx:Math.round(10*(sr[t.density]??1));return n.jsxs(n.Fragment,{children:[n.jsx(et,{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(u.Box,{sx:{p:"12px 2px 2px"},children:[e==="shape"&&n.jsxs(n.Fragment,{children:[n.jsx(u.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2,textTransform:"uppercase",letterSpacing:".6px",display:"block",mb:.75},children:"Corner Radius"}),n.jsx(Se,{value:t.radiusPreset,onChange:p=>o({radiusPreset:p,radiusVal:p==="sharp"?0:p==="round"?18:9}),options:[{key:"sharp",label:"Sharp"},{key:"rounded",label:"Rounded"},{key:"round",label:"Round"}]}),n.jsx(u.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:p=>o({radiusVal:p,radiusPreset:"rounded"})})}),n.jsx(u.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2,textTransform:"uppercase",letterSpacing:".6px",display:"block",mb:.75,mt:.5},children:"Density"}),n.jsx(Se,{value:t.densityScale>0?"":t.density,onChange:p=>o({density:p,densityScale:0}),options:[{key:"compact",label:"Compact"},{key:"default",label:"Default"},{key:"comfortable",label:"Comfortable"}]}),n.jsx(u.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:p=>o({densityScale:p})})})]}),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",onChange:p=>o({cardGapPx:p})}),n.jsx(ge,{label:"Container padding",value:t.containerPadPx,effective:l,min:0,max:40,step:2,unit:"px",onChange:p=>o({containerPadPx:p})}),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:p=>o({edgePadPx:p})}),n.jsxs(u.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mt:1},children:[n.jsx(u.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2},children:"Uppercase button labels"}),n.jsx(u.Switch,{size:"small",checked:t.btnCase==="upper",onChange:p=>o({btnCase:p.target.checked?"upper":"none"})})]}),n.jsxs(u.Box,{sx:{mt:1.25},children:[n.jsx(u.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2,textTransform:"uppercase",letterSpacing:".6px",display:"block",mb:.75},children:"Status Chips"}),n.jsx(Se,{columns:2,value:t.statusBold?"bold":"soft",onChange:p=>o({statusBold:p==="bold"}),options:[{key:"soft",label:"Soft"},{key:"bold",label:"Bold"}]})]})]})]})]})}function As(){const[e,r]=q.useState("placement"),t=U(i=>i.settings),o=U(i=>i.set);return n.jsxs(n.Fragment,{children:[n.jsx(et,{active:e,onChange:r,tabs:[{key:"placement",label:"Placement",info:"Where toasts appear."},{key:"behaviour",label:"Behaviour",info:"Width & auto-dismiss."}]}),n.jsxs(u.Box,{sx:{p:"12px 2px 2px"},children:[e==="placement"&&n.jsx(Se,{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(u.FormControlLabel,{sx:{mt:.5},control:n.jsx(u.Switch,{checked:t.notifBadge,onChange:i=>o({notifBadge:i.target.checked})}),label:"Show unread badge"}),n.jsx(u.FormControlLabel,{sx:{mt:.5,display:"flex"},control:n.jsx(u.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 Is({label:e,info:r,value:t,fallback:o,onChange:i,onReset:s}){const a=Re(U(h=>h.settings.mode)),[l,p]=q.useState(null),f=t||o;return n.jsxs(u.Box,{sx:{display:"flex",alignItems:"center",gap:1,py:.5},children:[n.jsx(u.Box,{onClick:h=>p(h.currentTarget),sx:{width:22,height:22,borderRadius:1.5,border:`1px solid ${a.insetBd}`,bgcolor:f,cursor:"pointer",flexShrink:0}}),n.jsxs(u.Typography,{variant:"caption",sx:{flex:1,color:a.body,display:"flex",alignItems:"center",gap:.5},children:[e,r&&n.jsx(u.Tooltip,{title:r,arrow:!0,children:n.jsx(u.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(u.Box,{component:"span",onClick:s,title:"Reset to theme default",sx:{fontSize:13,color:a.muted,cursor:"pointer"},children:"↺"}),n.jsx(u.Popover,{open:!!l,anchorEl:l,onClose:()=>p(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},children:n.jsx(u.Box,{sx:{p:1},children:n.jsx("input",{type:"color",value:f,onChange:h=>i(h.target.value),style:{width:160,height:40,border:"none",background:"none"}})})})]})}function Os({src:e,aspect:r,onCancel:t,onConfirm:o}){const[i,s]=q.useState(1),[a,l]=q.useState({x:0,y:0}),p=q.useRef(null),f=q.useRef(null),h=q.useRef(null),x=q.useRef(null);q.useEffect(()=>{const y=b=>{x.current&&l({x:x.current.ox+(b.clientX-x.current.sx),y:x.current.oy+(b.clientY-x.current.sy)})},d=()=>{x.current=null};return document.addEventListener("pointermove",y),document.addEventListener("pointerup",d),()=>{document.removeEventListener("pointermove",y),document.removeEventListener("pointerup",d)}},[]);const m=y=>{y.preventDefault(),x.current={sx:y.clientX,sy:y.clientY,ox:a.x,oy:a.y}},g=()=>{const y=p.current,d=f.current,b=h.current;if(!y||!d){o(e);return}const w=(b||y).getBoundingClientRect(),k=1e3,$=Math.round(k*r),C=$/w.width,v=document.createElement("canvas");v.width=$,v.height=k;const E=v.getContext("2d");if(!E){o(e);return}const D=d.getBoundingClientRect(),A=(D.left-w.left)*C,J=(D.top-w.top)*C,z=D.width*C,N=D.height*C;try{E.drawImage(d,A,J,z,N),o(v.toDataURL("image/png"))}catch{o(e)}};return To.createPortal(n.jsx(u.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(u.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(u.Typography,{sx:{fontSize:14,fontWeight:800,mb:.5},children:"Adjust brand image"}),n.jsx(u.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(u.Box,{ref:p,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:f,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(u.Box,{ref:h,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(u.Box,{sx:{display:"flex",alignItems:"center",gap:1,my:1.5},children:[n.jsx(u.Typography,{sx:{fontSize:12,fontWeight:700,color:"text.secondary"},children:"Zoom"}),n.jsx(u.Slider,{size:"small",min:.3,max:4,step:.02,value:i,onChange:(y,d)=>s(d)})]}),n.jsxs(u.Box,{sx:{display:"flex",gap:1},children:[n.jsx(u.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(u.Box,{component:"button",onClick:g,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 Ds(){const e=U(h=>h.settings),r=U(h=>h.set),t=Re(e.mode),[o,i]=q.useState(null),s=(h,x)=>{var y;const m=(y=h.target.files)==null?void 0:y[0];if(!m)return;const g=new FileReader;g.onload=()=>i({src:g.result,aspect:x==="logoUrl"?3.5:1.55,target:x}),g.readAsDataURL(m),h.target.value=""},a=h=>{o&&(o.target==="logoUrl"?r({logoUrl:h,logoMode:"image"}):r({loginImage:h}),i(null))},l={fontSize:11,fontWeight:700,textTransform:"uppercase",letterSpacing:".6px"},p={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},f=(h,x)=>n.jsxs(u.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(u.Typography,{variant:"caption",sx:{flex:1,minWidth:0,color:t.body,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h}),n.jsx(u.Box,{component:"button",onClick:x,title:"Remove",sx:{border:"none",background:"transparent",color:t.muted,cursor:"pointer",fontSize:14},children:"✕"})]});return n.jsxs(u.Box,{sx:{display:"flex",flexDirection:"column",gap:1.75},children:[n.jsxs(u.Box,{children:[n.jsx(u.Typography,{variant:"caption",sx:{...l,color:t.label2,display:"block",mb:1},children:"Brand Image"}),n.jsxs(u.Box,{component:"label",sx:p,children:["⬆ Choose image",n.jsx("input",{hidden:!0,type:"file",accept:"image/*",onChange:h=>s(h,"loginImage")})]}),e.loginImage&&f("Uploaded image",()=>r({loginImage:""}))]}),n.jsxs(u.Box,{children:[n.jsx(u.Typography,{variant:"caption",sx:{...l,color:t.label2,display:"block",mb:1},children:"Logo"}),n.jsxs(u.Box,{component:"label",sx:p,children:["⬆ Choose logo file",n.jsx("input",{hidden:!0,type:"file",accept:"image/png,image/svg+xml,image/webp",onChange:h=>s(h,"logoUrl")})]}),e.logoMode==="image"&&e.logoUrl&&f("Uploaded logo",()=>r({logoUrl:"",logoMode:"icon"}))]}),n.jsxs(u.Box,{children:[n.jsx(u.Typography,{variant:"caption",sx:{...l,color:t.label2,display:"block",mb:.5},children:"Panel Colour"}),n.jsx(Is,{label:"Login panel background",value:e.loginPanelColor,fallback:e.primaryHex,onChange:h=>r({loginPanelColor:h}),onReset:()=>r({loginPanelColor:""})})]}),o&&n.jsx(Os,{src:o.src,aspect:o.aspect,onCancel:()=>i(null),onConfirm:a})]})}const Ms=[{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"}],Fs=[{key:"dashboard",label:"Dashboard"},{key:"operations",label:"Operations"},{key:"cameras",label:"Cameras"},{key:"reports",label:"Reports"},{key:"orders",label:"Orders"},{key:"components",label:"Components"}],qe=Dn(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 Ws({onClose:e}){var I,T;const r=qe(S=>S.openSection),t=qe(S=>S.setOpenSection),o=qe(S=>S.setPreviewScreen),i=qe(S=>S.previewScreen),s=qe(S=>S.previewMenuOpen),a=qe(S=>S.setPreviewMenuOpen),l=U(S=>S.settings),p=U(S=>S.savedThemes),f=U(S=>S.set),h=U(S=>S.reset),x=Re(l.mode),m=q.useRef("theme"),g=(S,W)=>{const G=r!==S;t(G?S:""),a(!1),G&&m.current!==S&&(o(W),m.current=S)},y=((I=gr.find(S=>S.id===l.presetId))==null?void 0:I.name)||((T=p.find(S=>S.id===l.presetId))==null?void 0:T.name)||"Custom Theme",d={fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},b=({children:S})=>n.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",...d,children:S}),w=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"})]}),k=n.jsxs(u.Box,{sx:{display:"flex",gap:"2px",width:14,height:14},children:[n.jsx(u.Box,{sx:{flex:1,background:l.secondaryHex,borderRadius:"2px"}}),n.jsx(u.Box,{sx:{flex:1,background:l.errorHex,borderRadius:"2px"}}),n.jsx(u.Box,{sx:{flex:1,background:l.successHex,borderRadius:"2px"}})]}),$=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"})]}),C=n.jsxs(b,{children:[n.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),n.jsx("path",{d:"M3 9h18"})]}),v=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"})]}),E=n.jsx(b,{children:n.jsx("rect",{x:"4",y:"4",width:"16",height:"16",rx:"4"})}),D=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(u.Box,{sx:{position:"absolute",top:"6px",right:"6px",width:7,height:7,borderRadius:"50%",background:l.primaryHex,border:`1.5px solid ${x.iconTile}`}})]}),A=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"})]}),J=l.mode==="dark",z=S=>S.charAt(0).toUpperCase()+S.slice(1),N={sm:"Small",df:"Default",lg:"Large"},c={sharp:"Sharp",rounded:"Rounded",round:"Round"},H={compact:"Compact",default:"Default",comfortable:"Comfortable"},R={flat:"Flat",outlined:"Outlined",soft:"Soft",raised:"Raised",elevated:"Elevated",floating:"Floating"},M={split:"Split Brand",centered:"Centered Card"},_={"top-center":"Top Center","top-right":"Top Right","bottom-left":"Bottom Left","bottom-right":"Bottom Right"},K={theme:`${y} · ${J?"Dark":"Light"}`,color:"Secondary & status colours",type:`${l.fontFamily} · ${N[l.textSize]??"Default"}`,cards:"Card style, header, nesting & surface tint",tables:"Table row density, dividers, striping & header style — previewed on the Orders screen",shape:`${c[l.radiusPreset]??"Custom"} · ${H[l.density]??"Default"} · ${R[l.cardStyle]??""}`,notif:`${_[l.notifPosition]??""} · ${z(l.notifStyle)}`,login:`${M[l.loginLayout]??""}${l.loginImage?" · image":""}`},B=[{id:"theme",title:"Theme Settings",info:"Presets, saved themes & light/dark mode.",icon:w,screen:"dashboard",body:n.jsx(bs,{})},{id:"color",title:"Colour Settings",info:"Brand, text & status colours.",icon:k,screen:"components",body:n.jsx(Ss,{})},{id:"type",title:"Typography",info:"Fonts, sizes, weight & line-height.",icon:$,screen:"components",body:n.jsx(Ts,{})},{id:"cards",title:"Cards",info:"Card style, header, nesting & tint.",icon:C,screen:"dashboard",body:n.jsx(Hs,{})},{id:"tables",title:"Tables",info:"Row/column density, dividers & alignment.",icon:v,screen:"orders",body:n.jsx(Ps,{})},{id:"shape",title:"Surface & Shape",info:"Radius, density, elevation & spacing.",icon:E,screen:"dashboard",body:n.jsx($s,{})},{id:"notif",title:"Notifications",info:"Toast placement & behaviour.",icon:D,screen:"operations",body:n.jsx(As,{})},{id:"login",title:"Login Screen",info:"Brand image, logo & panel colour.",icon:A,screen:"login",body:n.jsx(Ds,{})}];return n.jsxs(u.Box,{sx:{display:"flex",flexDirection:"column",bgcolor:x.card},children:[n.jsxs(u.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.1,borderBottom:`1px solid ${x.divider}`,bgcolor:x.card},children:[n.jsxs(u.Box,{sx:{display:"flex",gap:.5,flexShrink:0},children:[n.jsx(u.Box,{sx:{width:13,height:13,borderRadius:"3px",bgcolor:l.primaryHex}}),n.jsx(u.Box,{sx:{width:13,height:13,borderRadius:"3px",bgcolor:l.secondaryHex}})]}),n.jsx(u.Typography,{variant:"caption",sx:{flex:1,minWidth:0,fontWeight:800,color:x.text,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y}),n.jsx(u.Tooltip,{title:"Reset to defaults",arrow:!0,children:n.jsx(u.IconButton,{size:"small",onClick:h,sx:{bgcolor:"action.selected"},children:n.jsx(ls,{sx:{fontSize:16}})})}),n.jsx(u.Tooltip,{title:l.mode==="dark"?"Switch to light":"Switch to dark",arrow:!0,children:n.jsx(u.IconButton,{size:"small",onClick:()=>f({mode:l.mode==="dark"?"light":"dark"}),sx:{bgcolor:"action.selected"},children:l.mode==="dark"?n.jsx(ds,{sx:{fontSize:16}}):n.jsx(cs,{sx:{fontSize:16}})})}),e&&n.jsx(u.Tooltip,{title:"Close studio",arrow:!0,children:n.jsx(u.IconButton,{size:"small",onClick:e,sx:{bgcolor:"action.selected"},children:n.jsx(ps,{sx:{fontSize:16}})})})]}),s&&n.jsxs(u.Box,{sx:{borderBottom:"1px solid",borderColor:"divider",borderLeft:"3px solid #eab308",bgcolor:S=>S.palette.mode==="dark"?"rgba(234,179,8,0.14)":"#fef9c3",px:1.6,py:1.5},children:[n.jsx(u.Typography,{sx:{fontSize:10,fontWeight:800,textTransform:"uppercase",letterSpacing:".6px",color:S=>S.palette.mode==="dark"?"#f2cd5c":"#854d0e",mb:1},children:"Previewing Screen"}),n.jsx(u.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:.75},children:Fs.map(S=>{const W=i===S.key;return n.jsx(u.Box,{component:"button",onClick:()=>{i!==S.key&&o(S.key),a(!1)},sx:{px:.75,py:1,borderRadius:2,cursor:"pointer",fontSize:11,fontWeight:W?800:600,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",border:"1.5px solid",borderColor:W?"#d4a915":"#e6dca8",bgcolor:W?"#fde68a":"background.paper",color:W?"#713f12":"text.secondary"},children:S.label},S.key)})})]}),B.map(S=>n.jsx(ys,{icon:S.icon,title:S.title,info:K[S.id]??S.info,open:r===S.id,dimmed:r!==""&&r!==S.id,onToggle:()=>g(S.id,S.screen),onPreviewMenu:()=>a(!s),children:S.body},S.id))]})}const zs=dt(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 jr(e,r,t){const o=q.useRef(null),[i,s]=q.useState(e);return q.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 g=0;for(const b of Array.from(a.children))g+=b.offsetHeight;const y=g/x,d=a.clientHeight;d<=0||y<=0||s(Math.max(r,Math.min(t,Math.floor((d+m)/(y+m)))))};l();const p=requestAnimationFrame(l),f=setTimeout(l,300),h=new ResizeObserver(l);return h.observe(a),()=>{cancelAnimationFrame(p),clearTimeout(f),h.disconnect()}},[r,t]),[o,i]}function Mn(e,r,t){const o=q.useRef(null),i=q.useRef(null),[s,a]=q.useState(e);return q.useLayoutEffect(()=>{const l=i.current;if(!l)return;const p=()=>{var d;const m=Array.from(l.children).filter(b=>getComputedStyle(b).position!=="absolute"),g=m.length?m[0].offsetHeight:((d=o.current)==null?void 0:d.offsetHeight)||36,y=l.clientHeight;y<=0||g<=0||a(Math.max(r,Math.min(t,Math.floor(y/g))))};p();const f=requestAnimationFrame(p),h=setTimeout(p,300),x=new ResizeObserver(p);return x.observe(l),()=>{cancelAnimationFrame(f),clearTimeout(h),x.disconnect()}},[r,t]),[o,i,s]}const _s=["Jan","Feb","Mar","Apr","May","Jun"],Ls=[44,60,50,74,88,96],Ns=[24,32,30,42,52,60];function Vs(){const e=Te(),r=U(O=>O.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:p,tH1:f,tH2:h,tTitle:x,tH4:m,wH1:g,headFam:y,headLH:d,accentBg:b,btnText:w,tBodySm:k,bwEmph:$,btnCase:C,bodyWeightEff:v,bodyLH:E,tCaption:D,pMain:A,sMain:J}=e,z=y+",sans-serif",N=r.fontFamily+",sans-serif",c=e.hc1||t.textPrimary,H=e.hc2||t.textPrimary,R=e.hc3||t.textPrimary,M=[{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)})),[B,I]=jr(5,4,K.length),T=K.slice(0,I),S=e.cardBorder==="none"?"none":e.cardBorder,W={background:t.paper,border:S,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"},V={fontSize:x,lineHeight:d,fontWeight:g,color:R,fontFamily:z};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:S,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:N,fontWeight:v,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:f,lineHeight:1.15,fontWeight:g,color:c,letterSpacing:"-.3px",fontFamily:z},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:$,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:b,color:w,fontSize:k,fontWeight:$,textTransform:C,letterSpacing:".4px",boxShadow:e.btnShadow,whiteSpace:"nowrap",cursor:"pointer"},children:"+ New"})]}),n.jsxs("div",{style:{padding:p,background:t.bgDefault,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[n.jsxs("div",{style:{...W,marginBottom:l},children:[n.jsxs("div",{style:G,children:[n.jsx("span",{style:{...V},children:"Performance Overview"}),n.jsx("span",{style:{fontSize:D,color:t.textSecondary,fontWeight:$},children:"This month"})]}),n.jsx("div",{style:{padding:s,display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:l},children:M.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:g,fontFamily:z,textTransform:"uppercase",letterSpacing:".6px",marginBottom:8},children:O.label}),n.jsx("div",{style:{fontSize:h,fontWeight:g,color:H,letterSpacing:"-.8px",lineHeight:1,marginBottom:6},children:O.val}),n.jsxs("span",{style:{fontSize:D,fontWeight:$,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:{...W,display:"flex",flexDirection:"column",minHeight:0},children:[n.jsxs("div",{style:G,children:[n.jsx("span",{style:V,children:"Revenue Trend"}),n.jsx("div",{style:{display:"flex",gap:12},children:[["Revenue",A],["Profit",J]].map(([O,Y])=>n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5},children:[n.jsx("div",{style:{width:10,height:10,borderRadius:2,background:Y}}),n.jsx("span",{style:{fontSize:D,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:_s.map((O,Y)=>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:Ns[Y]+"%",background:J,opacity:.55,borderRadius:`${i} ${i} 0 0`}}),n.jsx("div",{style:{width:"100%",height:Ls[Y]+"%",background:A,borderRadius:`${i} ${i} 0 0`}})]}),n.jsx("span",{style:{fontSize:D,color:t.textSecondary},children:O})]},O))})]}),n.jsxs("div",{style:{...W,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:V,children:"Recent Activity"})}),n.jsx("div",{ref:B,style:{padding:a,display:"flex",flexDirection:"column",justifyContent:"space-between",gap:4,flex:1,minHeight:0},children:T.map((O,Y)=>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:$},children:O.ic}),n.jsxs("div",{style:{flex:1,minWidth:0},children:[n.jsx("div",{style:{fontSize:k,color:t.textPrimary,fontFamily:N,fontWeight:v,lineHeight:E,marginBottom:2},children:O.title}),n.jsx("div",{style:{fontSize:D,color:t.textSecondary,fontFamily:N},children:O.time})]})]},Y))})]})]})]})]})}const Us=[{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"}],lr="100px 1fr 120px 100px 80px 70px";function Gs(){const e=Te(),r=U(I=>I.settings),{t,rad:o,radSm:i,pad:s,padSm:a,screenPad:l,rowPy:p,tH1:f,wH1:h,headFam:x,headLH:m,accentBg:g,btnText:y,btnShadow:d,tBody:b,tBodySm:w,tCaption:k,tOverline:$,bwEmph:C,btnCase:v,bodyWeightEff:E,pMain:D,table:A}=e,J=x+",sans-serif",z=r.fontFamily+",sans-serif",N=e.hc1||t.textPrimary,[c,H,R]=Mn(12,3,16),M=Us.slice(0,R).map((I,T)=>({...I,...A.statusMap[I.status]||{sb:t.divider,sc:t.textSecondary},rowBg:r.tableStripe&&T%2===1?A.stripeBg:"transparent"})),_=e.cardBorder==="none"?"none":e.cardBorder,K=I=>({fontSize:$,fontWeight:C,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".5px",borderRight:A.colBorder,alignSelf:"stretch",display:"flex",alignItems:A.cellAI,justifyContent:A.cellJC,padding:`${A.rowPy} ${A.cellPx}`}),B={alignSelf:"stretch",display:"flex",alignItems:A.cellAI,justifyContent:A.cellJC,padding:`${A.rowPy} ${A.cellPx}`};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:_,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:z,fontWeight:E,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:m,fontWeight:h,color:N,letterSpacing:"-.3px",fontFamily:J},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:C,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:g,color:y,fontSize:w,fontWeight:C,textTransform:v,letterSpacing:".4px",boxShadow:d,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:w,color:t.textSecondary},children:"Search orders…"})]}),A.filters.map(I=>n.jsx("button",{style:{padding:"7px 14px",borderRadius:999,border:"1px solid "+I.brd,background:I.bg,color:I.c,fontSize:k,fontWeight:C,whiteSpace:"nowrap",cursor:"pointer"},children:I.label},I.label))]}),n.jsxs("div",{ref:c,style:{display:"grid",gridTemplateColumns:lr,padding:`0 ${s}px`,borderBottom:A.rowBorder,background:A.headBg},children:[["Order ID","Customer","Status","Amount","Date"].map(I=>n.jsx("div",{style:K(),children:I},I)),n.jsx("div",{style:{alignSelf:"stretch",padding:`${A.rowPy} 0`}})]}),n.jsxs("div",{ref:H,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:lr,pointerEvents:"none",zIndex:2},children:[n.jsx("div",{style:{borderRight:A.colBorder}}),n.jsx("div",{style:{borderRight:A.colBorder}}),n.jsx("div",{style:{borderRight:A.colBorder}}),n.jsx("div",{style:{borderRight:A.colBorder}}),n.jsx("div",{style:{borderRight:A.colBorder}}),n.jsx("div",{})]}),M.map(I=>n.jsxs("div",{style:{display:"grid",gridTemplateColumns:lr,padding:`0 ${s}px`,borderBottom:A.rowBorder,alignItems:"stretch",background:I.rowBg},children:[n.jsx("div",{style:{...B,fontSize:w,fontWeight:C,color:D,fontFamily:z},children:I.id}),n.jsx("div",{style:{...B,fontSize:b,color:t.textPrimary,fontWeight:C},children:I.cust}),n.jsx("div",{style:B,children:n.jsx("span",{style:{padding:"4px 11px",borderRadius:999,fontSize:k,fontWeight:C,background:I.sb,color:I.sc,whiteSpace:"nowrap"},children:I.status})}),n.jsx("div",{style:{...B,fontSize:b,color:t.textPrimary,fontWeight:C},children:I.amt}),n.jsx("div",{style:{...B,fontSize:w,color:t.textSecondary},children:I.date}),n.jsx("div",{style:B,children:n.jsx("button",{style:{fontSize:k,color:D,background:t.pContainer,border:"none",fontWeight:C,padding:"5px 11px",borderRadius:i,cursor:"pointer"},children:"View"})})]},I.id))]}),n.jsxs("div",{style:{padding:`${p}px ${s}px`,display:"flex",alignItems:"center",gap:7,borderTop:"1px solid "+t.divider},children:[n.jsxs("span",{style:{fontSize:w,color:t.textSecondary,flex:1},children:["Showing 1–",M.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:g,color:y,fontWeight:C,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 Ys(){const e=Te(),r=U(Z=>Z.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:p,tH1:f,tH2:h,tTitle:x,tH4:m,tH5:g,tH6:y,tBody:d,tBodySm:b,tCaption:w,wH1:k,headFam:$,headLH:C,accentBg:v,btnText:E,btnShadow:D,bwEmph:A,btnCase:J,bodyWeightEff:z,bodyLH:N,pMain:c,errSoft:H,errTxt:R,warnSoft:M,warnTxt:_,infoSoft:K,infoTxt:B,sucSoft:I,sucTxt:T}=e,S=$+",sans-serif",W=r.fontFamily+",sans-serif",G=e.t.highlight,V=e.t.highlightSoft,O=e.t.highlightBd,Y=t.pContainer,L=t.onPContainer,P=t.pContrast,X=e.hc1||t.textPrimary,Q=e.hc2||t.textPrimary,le=e.hc3||t.textPrimary,F=e.hc4||t.textPrimary,me=e.hc5||t.textPrimary,Oe=e.hc6||t.textPrimary,Ne=e.cardBorder==="none"?"none":e.cardBorder,Be={display:"flex",flexDirection:"column",background:t.paper,border:Ne,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",height:"100%"},Ve={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},Ue={fontSize:x,lineHeight:C,fontWeight:k,color:le,fontFamily:S},Yt=[{label:"Dashboard Overview",size:f,w:k,color:X,lh:1.1,ls:"-.5px",name:"H1",border:!0},{label:"Revenue Report",size:h,w:k,color:Q,lh:1.1,ls:"-.4px",name:"H2",border:!0},{label:"Performance Overview",size:x,w:k,color:le,lh:1.15,name:"H3",border:!0},{label:"Active Users",size:m,w:k,color:F,lh:1.2,name:"H4",border:!0},{label:"Last updated 2m ago",size:g,w:k,color:me,lh:1.25,name:"H5",border:!0},{label:"Status · Live",size:y,w:k,color:Oe,lh:1.3,name:"H6",border:!0}],De=Z=>n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"11px 12px",borderBottom:"1px solid "+t.divider,background:Z?V:"transparent",boxShadow:Z?"inset 3px 0 0 "+G:"none"},children:[n.jsx("div",{style:{width:16,height:16,borderRadius:"50%",border:"2px solid "+(Z?G:t.outline),display:"grid",placeItems:"center",flexShrink:0},children:Z&&n.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:G}})}),n.jsx("span",{style:{flex:1,fontSize:b,fontFamily:W,fontWeight:Z?A:z,color:t.textPrimary},children:Z?"Selected item":"Unselected item"}),Z&&n.jsx("span",{style:{fontSize:w,fontFamily:W,fontWeight:A,color:t.textSecondary},children:"Active"})]}),vt=(Z,je,tt)=>n.jsxs("div",{style:{position:"relative",border:Z?"2px solid "+c:"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:w,color:Z?c:t.textSecondary,fontWeight:Z?A:void 0},children:je}),n.jsx("span",{style:{fontSize:d,color:Z?t.textPrimary:t.textSecondary},children:tt})]}),He=(Z,je,tt)=>n.jsx("span",{style:{padding:"5px 13px",borderRadius:999,background:Z,color:je,fontSize:w,fontWeight:A},children:tt}),Me=Z=>({padding:"9px 20px",borderRadius:i,fontSize:b,fontWeight:A,textTransform:J,letterSpacing:".4px",cursor:"pointer",...Z});return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:Ne,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:W,fontWeight:z,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:f,lineHeight:C,fontWeight:k,color:X,letterSpacing:"-.3px",fontFamily:S},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:A,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]})}),n.jsxs("div",{style:{padding:p,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:Be,children:[n.jsx("div",{style:Ve,children:n.jsx("span",{style:Ue,children:"Typography Scale"})}),n.jsxs("div",{style:{padding:s,display:"flex",flexDirection:"column",justifyContent:"space-between",flex:1,minHeight:0,gap:6},children:[Yt.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:S,letterSpacing:Z.ls},children:Z.label}),n.jsxs("span",{style:{fontSize:Z.size,color:t.textSecondary,fontWeight:Z.w,whiteSpace:"nowrap",flexShrink:0,fontFamily:S},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:d,lineHeight:N,color:t.textPrimary,fontFamily:W,fontWeight:z},children:"Body text — the quick brown fox jumps over the lazy dog."}),n.jsxs("span",{style:{fontSize:d,color:t.textSecondary,fontWeight:z,whiteSpace:"nowrap",flexShrink:0,fontFamily:W},children:["Body · ",d]})]}),n.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12},children:[n.jsx("span",{style:{fontSize:w,lineHeight:N,color:t.textSecondary,fontFamily:W,fontWeight:z},children:"Caption & helper text style"}),n.jsxs("span",{style:{fontSize:w,color:t.textSecondary,fontWeight:z,whiteSpace:"nowrap",flexShrink:0,fontFamily:W},children:["Caption · ",w]})]})]})]}),n.jsxs("div",{style:Be,children:[n.jsx("div",{style:Ve,children:n.jsx("span",{style:Ue,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:b,fontWeight:A,color:t.textPrimary,background:V,borderBottom:"2.5px solid "+c,marginBottom:-1.5,borderRadius:"6px 6px 0 0"},children:"Overview"}),n.jsx("div",{style:{flex:1,textAlign:"center",padding:"8px 4px",fontSize:b,fontWeight:A,color:t.textSecondary},children:"Activity"}),n.jsx("div",{style:{flex:1,textAlign:"center",padding:"8px 4px",fontSize:b,fontWeight:A,color:t.textSecondary},children:"Settings"})]}),n.jsxs("div",{style:{display:"flex",flexDirection:"column",border:"1px solid "+t.divider,borderRadius:i,overflow:"hidden"},children:[De(!0),De(!1),De(!1),De(!1),De(!0),De(!1)]}),n.jsx("div",{style:{display:"inline-flex",alignSelf:"flex-start",padding:"6px 12px",borderRadius:i,background:V,border:"1px solid "+O},children:n.jsx("span",{style:{fontSize:w,fontWeight:A,color:G},children:"2 selected items"})})]})]})]}),n.jsxs("div",{style:{...Be,height:"auto"},children:[n.jsx("div",{style:Ve,children:n.jsx("span",{style:Ue,children:"Inputs & Selection"})}),n.jsxs("div",{style:{padding:s},children:[n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:l,marginBottom:l},children:[vt(!1,"Outlined","Placeholder…"),vt(!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:c,display:"grid",placeItems:"center",color:P,fontSize:11,fontWeight:A},children:"✓"}),n.jsx("span",{style:{fontSize:b,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 "+c,display:"grid",placeItems:"center"},children:n.jsx("div",{style:{width:9,height:9,borderRadius:"50%",background:c}})}),n.jsx("span",{style:{fontSize:b,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:c,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:b,color:t.textPrimary},children:"Switch"})]})]})]})]}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:l,alignItems:"stretch"},children:[n.jsxs("div",{style:Be,children:[n.jsx("div",{style:Ve,children:n.jsx("span",{style:Ue,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:v,color:E,boxShadow:D}),children:"Contained"}),n.jsx("button",{style:Me({border:"1.5px solid "+c,background:"transparent",color:c}),children:"Outlined"}),n.jsx("button",{style:Me({border:"none",background:"transparent",color:c}),children:"Text"}),n.jsx("button",{style:Me({border:"none",background:Y,color:L}),children:"Tonal"}),n.jsx("button",{style:Me({border:"none",background:v,color:E,boxShadow:D,borderRadius:999}),children:"Rounded"}),n.jsx("button",{style:Me({border:"none",background:H,color:R}),children:"Error"})]})]}),n.jsxs("div",{style:Be,children:[n.jsx("div",{style:Ve,children:n.jsx("span",{style:Ue,children:"Chips, Alerts & Progress"})}),n.jsxs("div",{style:{padding:s},children:[n.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginBottom:l},children:[He(Y,L,"Primary"),He(I,T,"Success"),He(M,_,"Warning"),He(K,B,"Info"),He(H,R,"Error")]}),n.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:7},children:[n.jsx("span",{style:{fontSize:b,color:t.textPrimary,fontWeight:A},children:"Revenue goal"}),n.jsx("span",{style:{fontSize:b,color:c,fontWeight:A},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:c,borderRadius:999}})})]})]})]})]})]})}const Js=[{label:"Cameras Online",val:"5 / 6"},{label:"Recording",val:"4"},{label:"Motion Alerts",val:"2"},{label:"Storage Used",val:"82%"}],qs=[{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"}],Ks=[{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 Xs(){const e=Te(),r=U(P=>P.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:p,tH1:f,tH2:h,tTitle:x,wH1:m,headFam:g,headLH:y,accentBg:d,btnText:b,btnShadow:w,tBodySm:k,tCaption:$,tOverline:C,bwEmph:v,btnCase:E,bodyWeightEff:D,errSoft:A,errTxt:J,mediaBg:z,overlaySurface:N,overlayBorder:c,onOverlay:H,sevMap:R}=e,M=g+",sans-serif",_=r.fontFamily+",sans-serif",K=e.hc1||t.textPrimary,B=e.hc2||t.textPrimary,I=e.hc3||t.textPrimary,T=e.cardBorder==="none"?"none":e.cardBorder,S=qs.map(P=>({...P,dotC:P.online?r.successHex:t.textDisabled})),[W,G]=jr(3,3,16),V=Ks.slice(0,G).map(P=>({...P,...R[P.sev]})),O={background:t.paper,border:T,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden"},Y={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between"},L={fontSize:x,lineHeight:y,fontWeight:m,color:I,fontFamily:M};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:T,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:_,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:f,lineHeight:y,fontWeight:m,color:K,letterSpacing:"-.3px",fontFamily:M},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:v,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:$,fontWeight:v,color:J,background:A,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:d,color:b,fontSize:k,fontWeight:v,textTransform:E,letterSpacing:".4px",boxShadow:w,whiteSpace:"nowrap",cursor:"pointer"},children:"+ Add Camera"})]})]}),n.jsxs("div",{style:{padding:p,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:Js.map(P=>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:C,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".6px",fontWeight:v},children:P.label})}),n.jsx("div",{style:{padding:`${a}px ${s}px`},children:n.jsx("div",{style:{fontSize:h,fontWeight:m,color:B,letterSpacing:"-.8px",lineHeight:1},children:P.val})})]},P.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:Y,children:[n.jsx("span",{style:L,children:"Camera Wall"}),n.jsx("span",{style:{fontSize:$,color:t.textSecondary,fontWeight:v},children:"2 × 3 grid"})]}),n.jsx("div",{style:{padding:s,display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gridAutoRows:"1fr",gap:l},children:S.map(P=>n.jsxs("div",{style:{position:"relative",borderRadius:i,overflow:"hidden",background:z,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:$,color:"rgba(255,255,255,.3)",letterSpacing:1},children:P.loc})}),n.jsxs("div",{style:{position:"absolute",top:7,left:7,display:"flex",alignItems:"center",gap:5,background:N,border:"1px solid "+c,borderRadius:999,padding:"2px 8px"},children:[n.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:P.dotC}}),n.jsx("span",{style:{color:H,fontSize:$,fontWeight:700,letterSpacing:".4px"},children:P.name})]}),P.rec&&n.jsxs("div",{style:{position:"absolute",top:7,right:7,display:"flex",alignItems:"center",gap:4,background:N,borderRadius:999,padding:"2px 7px"},children:[n.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:r.errorHex}}),n.jsx("span",{style:{color:H,fontSize:8,fontWeight:800,letterSpacing:".5px"},children:"REC"})]}),P.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:$,fontWeight:600,fontFamily:"monospace"},children:P.time})})]},P.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:L,children:"Recent Detections"})}),n.jsx("div",{ref:W,style:{padding:a,display:"flex",flexDirection:"column",justifyContent:"space-between",gap:2,flex:1,minHeight:0},children:V.map((P,X)=>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:P.cb,color:P.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:k,color:t.textPrimary,fontWeight:D,lineHeight:1.35},children:P.label}),n.jsxs("div",{style:{fontSize:$,color:t.textSecondary,marginTop:2},children:[P.cam," · ",P.time]})]})]},X))})]})]})]})]})}const Qs=[{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 Zs(){const e=Te(),r=U(L=>L.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:p,tH1:f,tTitle:h,wH1:x,headFam:m,headLH:g,accentBg:y,btnText:d,tBodySm:b,tCaption:w,tOverline:k,bwEmph:$,bodyWeightEff:C,bodyLH:v,errSoft:E,errTxt:D,pMain:A,mediaBg:J,overlaySurface:z,overlayBorder:N,onOverlay:c,sevMap:H}=e,R=m+",sans-serif",M=r.fontFamily+",sans-serif",_=e.hc1||t.textPrimary,K=e.hc3||t.textPrimary,B=e.cardBorder==="none"?"none":e.cardBorder,[I,T]=jr(7,4,16),S=Qs.slice(0,T).map(L=>({...L,...H[L.sev],rowBg:L.unread?pe(r.primaryHex,e.isDark?.12:.05):"transparent"})),W=S.filter(L=>L.unread).length,G={display:"flex",flexDirection:"column",minHeight:0,background:t.paper,border:B,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"},O={fontSize:h,lineHeight:g,fontWeight:x,color:K,fontFamily:R},Y={height:30,borderRadius:i,border:"none",background:"rgba(255,255,255,.14)",color:c,fontSize:w,fontWeight:$,cursor:"pointer",fontFamily:"inherit"};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:B,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:M,fontWeight:C,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:f,lineHeight:g,fontWeight:x,color:_,letterSpacing:"-.3px",fontFamily:R},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:$,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]})}),n.jsx("div",{style:{padding:p,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:G,children:[n.jsxs("div",{style:V,children:[n.jsx("span",{style:O,children:"Live Map · Street View"}),n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:w,fontWeight:$,color:D,background:E,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:J,display:"flex",alignItems:"center",justifyContent:"center"},children:[n.jsx("span",{style:{fontFamily:"monospace",fontSize:w,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:z,border:"1px solid "+N,borderRadius:999,padding:"6px 12px"},children:n.jsx("span",{style:{color:c,fontSize:w,fontWeight:$},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:z,border:"1px solid "+N,borderRadius:i,padding:5},children:[n.jsx("button",{style:{width:30,height:30,borderRadius:i,border:"none",background:y,color:d,fontSize:16,fontWeight:$,cursor:"pointer"},children:"+"}),n.jsx("button",{style:{width:30,height:30,borderRadius:i,border:"none",background:"rgba(255,255,255,.14)",color:c,fontSize:16,fontWeight:$,cursor:"pointer"},children:"−"}),n.jsx("div",{style:{width:1,height:18,background:N,margin:"0 3px"}}),n.jsx("button",{style:{...Y,padding:"0 12px"},children:"Layers"}),n.jsx("button",{style:{...Y,padding:"0 12px"},children:"◎ Locate"})]})]})]}),n.jsxs("div",{style:G,children:[n.jsxs("div",{style:V,children:[n.jsx("span",{style:O,children:"Notifications"}),n.jsxs("span",{style:{fontSize:k,fontWeight:$,color:t.pContrast,background:A,padding:"2px 9px",borderRadius:999},children:[W," NEW"]})]}),n.jsx("div",{ref:I,style:{padding:a,display:"flex",flexDirection:"column",gap:2,flex:1,minHeight:0},children:S.map((L,P)=>n.jsxs("div",{style:{display:"flex",gap:11,alignItems:"flex-start",padding:"9px 8px",borderRadius:i,background:L.rowBg},children:[n.jsx("div",{style:{width:26,height:26,borderRadius:i,background:L.cb,color:L.cc,display:"grid",placeItems:"center",flexShrink:0,fontSize:13,fontWeight:$},children:L.ic}),n.jsxs("div",{style:{flex:1,minWidth:0},children:[n.jsx("div",{style:{fontSize:b,color:t.textPrimary,fontWeight:C,lineHeight:v},children:L.label}),n.jsx("div",{style:{fontSize:w,color:t.textSecondary,marginTop:2},children:L.time})]}),L.unread&&n.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:A,flexShrink:0,marginTop:6}})]},P))})]})]})})]})}const el=[{label:"Reports Generated",val:"248"},{label:"Avg Generation",val:"1.2s"},{label:"Data Points",val:"84.2K"},{label:"Scheduled",val:"12"}],tl=["Jan","Feb","Mar","Apr","May","Jun"],rl=[44,60,50,74,88,96],nl=[24,32,30,42,52,60],ol=[{l:"Reports",h:72},{l:"Cameras",h:92},{l:"Alerts",h:40},{l:"Users",h:58},{l:"Storage",h:80}],il=[{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"}],un="1fr 130px 110px 90px 70px";function al(){const e=Te(),r=U(P=>P.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:p,rowPy:f,tH1:h,tH2:x,tTitle:m,wH1:g,headFam:y,headLH:d,accentBg:b,btnText:w,btnShadow:k,tBody:$,tBodySm:C,tCaption:v,tOverline:E,bwEmph:D,btnCase:A,bodyWeightEff:J,pMain:z,sMain:N,chartPalette:c}=e,H=y+",sans-serif",R=r.fontFamily+",sans-serif",M=e.hc1||t.textPrimary,_=e.hc2||t.textPrimary,K=e.hc3||t.textPrimary,B=e.cardBorder==="none"?"none":e.cardBorder,[I,T,S]=Mn(5,3,16),W=il.slice(0,S).map(P=>({...P,sb:P.status==="Ready"?e.sucSoft:e.warnSoft,sc:P.status==="Ready"?e.sucTxt:e.warnTxt})),G=ol.map((P,X)=>({...P,c:c[X%c.length]})),V={background:t.paper,border:B,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden"},O={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between"},Y={fontSize:m,lineHeight:d,fontWeight:g,color:K,fontFamily:H},L={fontSize:E,fontWeight:D,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".5px"};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:B,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:R,fontWeight:J,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:h,lineHeight:d,fontWeight:g,color:M,letterSpacing:"-.3px",fontFamily:H},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:b,color:w,fontSize:C,fontWeight:D,textTransform:A,letterSpacing:".4px",boxShadow:k,whiteSpace:"nowrap",cursor:"pointer"},children:"↓ Export PDF"})]}),n.jsxs("div",{style:{padding:p,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:el.map(P=>n.jsxs("div",{style:V,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:E,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".6px",fontWeight:D},children:P.label})}),n.jsx("div",{style:{padding:`${a}px ${s}px`},children:n.jsx("div",{style:{fontSize:x,fontWeight:g,color:_,letterSpacing:"-.8px",lineHeight:1},children:P.val})})]},P.label))}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 300px",gap:l,marginBottom:l},children:[n.jsxs("div",{style:V,children:[n.jsxs("div",{style:O,children:[n.jsx("span",{style:Y,children:"Revenue & Profit Trend"}),n.jsx("span",{style:{fontSize:v,color:t.textSecondary,fontWeight:D},children:"6 months"})]}),n.jsx("div",{style:{padding:s,display:"flex",alignItems:"flex-end",gap:12,height:160},children:tl.map((P,X)=>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:nl[X]+"%",background:N,opacity:.55,borderRadius:`${i} ${i} 0 0`}}),n.jsx("div",{style:{width:"100%",height:rl[X]+"%",background:z,borderRadius:`${i} ${i} 0 0`}})]}),n.jsx("span",{style:{fontSize:v,color:t.textSecondary},children:P})]},P))})]}),n.jsxs("div",{style:V,children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:Y,children:"By Module"})}),n.jsx("div",{style:{padding:s,display:"flex",alignItems:"flex-end",gap:10,height:128},children:G.map(P=>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:P.h+"%",background:P.c,borderRadius:`${i} ${i} 0 0`}})},P.l))})]})]}),n.jsxs("div",{style:{...V,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:Y,children:"Recent Reports"})}),n.jsxs("div",{ref:I,style:{display:"grid",gridTemplateColumns:un,padding:`${f}px ${s}px`,borderBottom:"1px solid "+t.divider,background:t.paper2},children:[["Report","Type","Status","Date"].map(P=>n.jsx("div",{style:L,children:P},P)),n.jsx("div",{})]}),n.jsx("div",{ref:T,style:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:W.map(P=>n.jsxs("div",{style:{display:"grid",gridTemplateColumns:un,padding:`${f}px ${s}px`,borderBottom:"1px solid "+t.divider,alignItems:"center"},children:[n.jsx("div",{style:{fontSize:$,color:t.textPrimary,fontWeight:D},children:P.name}),n.jsx("div",{style:{fontSize:C,color:t.textSecondary},children:P.type}),n.jsx("div",{children:n.jsx("span",{style:{padding:"4px 11px",borderRadius:999,fontSize:v,fontWeight:D,background:P.sb,color:P.sc,whiteSpace:"nowrap"},children:P.status})}),n.jsx("div",{style:{fontSize:C,color:t.textSecondary},children:P.date}),n.jsx("div",{children:n.jsx("button",{style:{fontSize:v,color:z,background:t.pContainer,border:"none",fontWeight:D,padding:"5px 11px",borderRadius:i,cursor:"pointer"},children:"↓ PDF"})})]},P.name))})]})]})]})}const fn=({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 sl(){const e=Te(),r=U(_=>_.settings),{t,rad:o,radSm:i,pad:s,tH1:a,tBody:l,tBodySm:p,tCaption:f,wH1:h,headLH:x,accentBg:m,btnText:g,btnShadow:y,bwEmph:d,pMain:b,iconInitials:w,hasLoginImage:k,loginCenteredGrad:$,loginScrimGradC:C}=e,v=r.fontFamily+",sans-serif",E=e.hc1||t.textPrimary,D=t.pContrast,A=e.cardBorder==="none"?"none":e.cardBorder,J=r.logoMode==="image"&&!!r.logoUrl,z=e.isDark?t.paper2:"#ffffff",N=r.loginPanelColor||t.bgDefault,c=r.loginImgOpacity>0?r.loginImgOpacity:1,H=k?n.jsx("img",{src:r.loginImage,alt:"",style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",zIndex:0,opacity:c}}):null,R={background:t.paper,border:A,borderRadius:o,boxShadow:e.cardShadow,padding:s,display:"flex",flexDirection:"column",gap:20},M=_=>({position:"relative",background:t.paper2,border:"1.5px solid "+(_?b:t.outline),borderRadius:i});return r.loginLayout==="centered"?n.jsxs("div",{style:{minHeight:560,background:$,display:"flex",alignItems:"center",justifyContent:"center",padding:40,position:"relative",overflow:"hidden",fontFamily:v,borderRadius:o},children:[H,k&&n.jsx("div",{style:{position:"absolute",inset:0,background:C,zIndex:0}}),n.jsxs("div",{style:{position:"relative",zIndex:1,width:"100%",maxWidth:380,background:t.paper,border:A,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:d,letterSpacing:"-1px"},children:w})}),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:g,fontSize:l,fontWeight:d,textTransform:"uppercase",letterSpacing:".5px",boxShadow:y,cursor:"pointer"},children:"Sign in"})]})]})]}):n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"3fr 1fr",minHeight:560,fontFamily:v,borderRadius:o,overflow:"hidden"},children:[n.jsxs("div",{style:{background:z,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"48px 40px",gap:22,position:"relative",overflow:"hidden"},children:[H,!k&&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(fn,{size:46}),n.jsx("div",{style:{fontSize:14,fontWeight:d,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:N,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:22,padding:"48px 40px"},children:[J?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(fn,{size:20}),n.jsx("span",{style:{fontSize:f,fontWeight:d,color:t.textSecondary,whiteSpace:"nowrap"},children:"No logo uploaded"})]}),n.jsxs("div",{style:{width:"100%",maxWidth:340,...R},children:[n.jsxs("div",{style:{textAlign:"center"},children:[n.jsx("div",{style:{fontSize:a,lineHeight:x,fontWeight:h,color:E,letterSpacing:"-.4px",marginBottom:5},children:"Welcome back"}),n.jsx("div",{style:{fontSize:p,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:f,fontWeight:d,color:t.textPrimary,marginBottom:7},children:"Email Address"}),n.jsxs("div",{style:{...M(!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:f,fontWeight:d,color:t.textPrimary,marginBottom:7},children:"Password"}),n.jsxs("div",{style:{...M(!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:b,display:"grid",placeItems:"center",color:D,fontSize:11,fontWeight:d},children:"✓"}),n.jsx("span",{style:{fontSize:p,color:t.textPrimary},children:"Remember me"})]}),n.jsx("span",{style:{fontSize:p,color:b,fontWeight:d},children:"Forgot password?"})]}),n.jsxs("button",{style:{padding:13,borderRadius:i,border:"none",background:m,color:g,fontSize:l,fontWeight:d,letterSpacing:".3px",boxShadow:y,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:f,color:t.textSecondary},children:["Powered by ",n.jsx("span",{style:{color:b,fontWeight:d},children:r.appName})," © 2026"]})]})]})]})}function ll(){const e=Te(),r=U(y=>y.settings),[t,o]=q.useState(!1);if(t)return null;const{t:i,npos:s,nacc:a,toastDeco:l,toastBg:p,rad:f,radSm:h,tBodySm:x,tCaption:m}=e,g=(r.toastW>0?r.toastW:252)+"px";return n.jsxs("div",{style:{position:"absolute",zIndex:40,width:g,maxWidth:"70%",boxSizing:"border-box",background:p,borderRadius:f,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:h,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:pe(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 cl=[75,90,100,125];function dl(){var h;const e=qe(x=>x.previewScreen),r=U(x=>x.settings.edgePadPx)||0,t=e==="operations"?0:r,[o,i]=q.useState("fit"),s=q.useRef(null),a=q.useRef(null),[l,p]=q.useState(100);q.useLayoutEffect(()=>{const x=s.current,m=a.current;if(!x||!m)return;const g=()=>{const k=getComputedStyle(x),$=(parseFloat(k.paddingTop)||0)+(parseFloat(k.paddingBottom)||0);if(o!=="fit"){const c=o/100;m.style.zoom=String(c);const H=x.clientHeight-$;m.style.minHeight=(H>0?Math.floor(H/c):0)+"px",p(o);return}m.style.zoom="1",m.style.minHeight="0px",m.offsetHeight;const C=(parseFloat(k.paddingLeft)||0)+(parseFloat(k.paddingRight)||0),v=x.clientWidth-C,E=x.clientHeight-$,D=m.scrollWidth,A=m.scrollHeight;if(D<=0||A<=0||v<=0||E<=0)return;const J=Math.min(v/D,E/A,1),z=J<.985?Math.max(.36,J):1;m.style.zoom=String(z);const N=Math.min(v/D,1);m.style.minHeight=Math.floor(E/Math.max(N,.36))+"px",p(Math.round(z*100))};let y=0,d=0;const b=()=>{g(),++d<36&&(y=requestAnimationFrame(b))};b();const w=new ResizeObserver(g);return w.observe(x),w.observe(m),()=>{cancelAnimationFrame(y),w.disconnect()}},[o,t,e]);const f=((h=Ms.find(x=>x.key===e))==null?void 0:h.label)??"";return n.jsxs(u.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",bgcolor:"background.default"},children:[n.jsxs(u.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(zs,{sx:{fontSize:22,color:"text.secondary"}}),n.jsxs(u.Typography,{variant:"h5",sx:{flex:1,fontSize:18,fontWeight:700,letterSpacing:"-.2px"},children:["Previewing ",f]}),n.jsxs(u.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(u.MenuItem,{value:"fit",children:["Fit (",l,"%)"]}),cl.map(x=>n.jsxs(u.MenuItem,{value:x,children:[x,"%"]},x))]})]}),n.jsxs(u.Box,{ref:s,sx:{flex:1,overflow:"auto",p:`${t}px`,position:"relative",bgcolor:"background.default"},children:[n.jsxs(u.Box,{ref:a,sx:{width:"100%",display:"flex",flexDirection:"column","& > *":{flex:"1 1 0%",minHeight:0}},children:[e==="dashboard"&&n.jsx(Vs,{}),e==="orders"&&n.jsx(Gs,{}),e==="reports"&&n.jsx(al,{}),e==="cameras"&&n.jsx(Xs,{}),e==="operations"&&n.jsx(Zs,{}),e==="components"&&n.jsx(Ys,{}),e==="login"&&n.jsx(sl,{})]}),e!=="login"&&n.jsx(ll,{})]})]})}const pl=300,ul=520;function fl(){const[e,r]=q.useState(!0),[t,o]=q.useState(300),[i,s]=q.useState(!1),a=U(y=>y.isDirty),l=U(y=>y.captureBaseline),p=U(y=>y.restoreBaseline),f=Re(U(y=>y.settings.mode)),h=q.useRef(null),x=y=>{y.preventDefault(),h.current={x:y.clientX,w:t};const d=w=>{if(!h.current)return;const k=Math.max(pl,Math.min(ul,h.current.w+(w.clientX-h.current.x)));o(k)},b=()=>{h.current=null,window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",b)};window.addEventListener("mousemove",d),window.addEventListener("mouseup",b)},m=()=>{a()?s(!0):r(!1)},g=()=>{r(!0),l()};return n.jsxs(u.Box,{sx:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",bgcolor:"background.paper"},children:[n.jsx(u.Box,{sx:{flex:1,minHeight:0,display:"flex"},children:n.jsxs(u.Box,{sx:{flex:1,minWidth:0,display:"flex",bgcolor:"background.default",borderTop:"1px solid",borderColor:"divider"},children:[e?n.jsxs(u.Box,{sx:{display:"flex",flexShrink:0},children:[n.jsx(u.Box,{sx:{width:t,flexShrink:0,borderRight:`1px solid ${f.studioBd}`,display:"flex",flexDirection:"column",bgcolor:f.card,overflow:"auto"},children:n.jsx(Ws,{onClose:m})}),n.jsx(u.Box,{onMouseDown:x,sx:{width:5,cursor:"col-resize",flexShrink:0,bgcolor:"divider",opacity:.4,"&:hover":{opacity:1,bgcolor:"primary.main"}}})]}):n.jsx(u.Tooltip,{title:"Open Theme Studio",placement:"right",arrow:!0,children:n.jsx(u.IconButton,{onClick:g,sx:{position:"absolute",left:68,bottom:56,zIndex:10,bgcolor:"primary.main",color:"primary.contrastText",boxShadow:4,"&:hover":{bgcolor:"primary.dark"}},children:n.jsx(ss,{})})}),n.jsx(dl,{})]})}),n.jsxs(u.Dialog,{open:i,onClose:()=>s(!1),PaperProps:{sx:{borderRadius:3,width:300,p:2.5}},children:[n.jsx(u.Typography,{sx:{fontSize:15,fontWeight:800,mb:.75},children:"Save changes?"}),n.jsx(u.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(u.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[n.jsx(u.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(u.Box,{component:"button",onClick:()=>{p(),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(u.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 hl(e){const r=Cr(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"],p=[e.fontFamily,e.headingFont].filter(Boolean).map(h=>h.replace(/"/g,"").replace(/'/g,"")),f=Array.from(new Set(p)).filter(h=>a.includes(h));if(f.length>0){const h="dynamic-google-fonts";let x=document.getElementById(h);const g=`https://fonts.googleapis.com/css2?${f.map(y=>`family=${y.replace(/ /g,"+")}:wght@300;400;500;600;700;800;900`).join("&")}&display=swap`;x||(x=document.createElement("link"),x.id=h,x.rel="stylesheet",document.head.appendChild(x)),x.href=g}}return On({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=gt;exports.ThemeStudio=fl;exports.buildMuiTheme=hl;exports.useThemeStore=U;
|
|
72
|
+
export default theme;`}function pn(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const Na=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 Va(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})`:$n(r,Na(t))},lighten(r,t){const o=this||e;return o.colorSpace?`color-mix(in ${o.colorSpace}, ${r}, #fff ${pn(t)})`:Jt(r,t)},darken(r,t){const o=this||e;return o.colorSpace?`color-mix(in ${o.colorSpace}, ${r}, #000 ${pn(t)})`:Yt(r,t)}})}function gr(e={},...r){const{breakpoints:t,mixins:o={},spacing:i,palette:s={},transitions:a={},typography:l={},shape:c,colorSpace:u,...h}=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=wr({...s,colorSpace:u}),m=Tn(e);let g=je(m,{mixins:Ha(m.breakpoints,o),palette:x,shadows:Da.slice(),typography:$a(x,l),transitions:za(a),zIndex:{..._a}});if(g=je(g,h),g=r.reduce((y,p)=>je(y,p),g),process.env.NODE_ENV!=="production"){const y=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],p=(b,k)=>{let P;for(P in b){const $=b[P];if(y.includes(P)&&Object.keys($).length>0){if(process.env.NODE_ENV!=="production"){const v=Cr("",P);console.error([`MUI: The \`${k}\` component increases the CSS specificity of the \`${P}\` internal state.`,"You can not override it like this: ",JSON.stringify(b,null,2),"",`Instead, you need to use the '&.${v}' syntax:`,JSON.stringify({root:{[`&.${v}`]:$}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
73
|
+
`))}b[P]={}}}};Object.keys(g.components).forEach(b=>{const k=g.components[b].styleOverrides;k&&b.startsWith("Mui")&&p(k,b)})}return g.unstable_sxConfig={...Ut,...h==null?void 0:h.unstable_sxConfig},g.unstable_sx=function(p){return dt({sx:p,theme:this})},g.toRuntimeSource=Dn,Va(g),g}function Ua(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 Ga=[...Array(25)].map((e,r)=>{if(r===0)return"none";const t=Ua(r);return`linear-gradient(rgba(255 255 255 / ${t}), rgba(255 255 255 / ${t}))`});function Mn(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Fn(e){return e==="dark"?Ga:[]}function Ya(e){const{palette:r={mode:"light"},opacity:t,overlays:o,colorSpace:i,...s}=e,a=wr({...r,colorSpace:i});return{palette:a,opacity:{...Mn(a.mode),...t},overlays:o||Fn(a.mode),...s}}function Ja(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 qa=e=>[...[...Array(25)].map((r,t)=>`--${e?`${e}-`:""}overlays-${t}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Ka=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 qa(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 Xa(e,r){r.forEach(t=>{e[t]||(e[t]={})})}function w(e,r,t){!e[r]&&t&&(e[r]=t)}function xt(e){return typeof e!="string"||!e.startsWith("hsl")?e:Pn(e)}function Pe(e,r){`${r}Channel`in e||(e[`${r}Channel`]=gt(xt(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 Qa(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{}},Za=(e="mui")=>xa(e);function sr(e,r,t,o,i){if(!t)return;t=t===!0?{}:t;const s=i==="dark"?"dark":"light";if(!o){r[i]=Ya({...t,palette:{mode:s,...t==null?void 0:t.palette},colorSpace:e});return}const{palette:a,...l}=gr({...o,palette:{mode:s,...t==null?void 0:t.palette},colorSpace:e});return r[i]={...t,palette:a,opacity:{...Mn(s),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Fn(s)},l}function es(e={},...r){const{colorSchemes:t={light:!0},defaultColorScheme:o,disableCssColorScheme:i=!1,cssVarPrefix:s="mui",nativeColor:a=!1,shouldSkipGeneratingVar:l=Ja,colorSchemeSelector:c=t.light&&t.dark?"media":void 0,rootSelector:u=":root",...h}=e,x=Object.keys(t)[0],m=o||(t.light&&x!=="light"?"light":x),g=Za(s),{[m]:y,light:p,dark:b,...k}=t,P={...k};let $=y;if((m==="dark"&&!("dark"in t)||m==="light"&&!("light"in t))&&($=!0),!$)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${m}\` option is either missing or invalid.`:Ze(21,m));let v;a&&(v="oklch");const C=sr(v,P,$,h,m);p&&!P.light&&sr(v,P,p,void 0,"light"),b&&!P.dark&&sr(v,P,b,void 0,"dark");let R={defaultColorScheme:m,...C,cssVarPrefix:s,colorSchemeSelector:c,rootSelector:u,getCssVar:g,colorSchemes:P,font:{...Ea(C.typography),...C.font},spacing:Qa(h.spacing)};Object.keys(R.colorSchemes).forEach(G=>{const d=R.colorSchemes[G].palette,E=D=>{const z=D.split("-"),V=z[1],K=z[2];return g(D,d[V][K])};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 B(D,z,V){if(v){let K;return D===Je&&(K=`transparent ${((1-V)*100).toFixed(0)}%`),D===ne&&(K=`#000 ${(V*100).toFixed(0)}%`),D===oe&&(K=`#fff ${(V*100).toFixed(0)}%`),`color-mix(in ${v}, ${z}, ${K})`}return D(z,V)}if(Xa(d,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),d.mode==="light"){w(d.Alert,"errorColor",B(ne,a?g("palette-error-light"):d.error.light,.6)),w(d.Alert,"infoColor",B(ne,a?g("palette-info-light"):d.info.light,.6)),w(d.Alert,"successColor",B(ne,a?g("palette-success-light"):d.success.light,.6)),w(d.Alert,"warningColor",B(ne,a?g("palette-warning-light"):d.warning.light,.6)),w(d.Alert,"errorFilledBg",E("palette-error-main")),w(d.Alert,"infoFilledBg",E("palette-info-main")),w(d.Alert,"successFilledBg",E("palette-success-main")),w(d.Alert,"warningFilledBg",E("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",B(oe,a?g("palette-error-light"):d.error.light,.9)),w(d.Alert,"infoStandardBg",B(oe,a?g("palette-info-light"):d.info.light,.9)),w(d.Alert,"successStandardBg",B(oe,a?g("palette-success-light"):d.success.light,.9)),w(d.Alert,"warningStandardBg",B(oe,a?g("palette-warning-light"):d.warning.light,.9)),w(d.Alert,"errorIconColor",E("palette-error-main")),w(d.Alert,"infoIconColor",E("palette-info-main")),w(d.Alert,"successIconColor",E("palette-success-main")),w(d.Alert,"warningIconColor",E("palette-warning-main")),w(d.AppBar,"defaultBg",E("palette-grey-100")),w(d.Avatar,"defaultBg",E("palette-grey-400")),w(d.Button,"inheritContainedBg",E("palette-grey-300")),w(d.Button,"inheritContainedHoverBg",E("palette-grey-A100")),w(d.Chip,"defaultBorder",E("palette-grey-400")),w(d.Chip,"defaultAvatarColor",E("palette-grey-700")),w(d.Chip,"defaultIconColor",E("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",B(oe,a?g("palette-primary-main"):d.primary.main,.62)),w(d.LinearProgress,"secondaryBg",B(oe,a?g("palette-secondary-main"):d.secondary.main,.62)),w(d.LinearProgress,"errorBg",B(oe,a?g("palette-error-main"):d.error.main,.62)),w(d.LinearProgress,"infoBg",B(oe,a?g("palette-info-main"):d.info.main,.62)),w(d.LinearProgress,"successBg",B(oe,a?g("palette-success-main"):d.success.main,.62)),w(d.LinearProgress,"warningBg",B(oe,a?g("palette-warning-light"):d.warning.main,.62)),w(d.Skeleton,"bg",v?B(Je,a?g("palette-text-primary"):d.text.primary,.11):`rgba(${E("palette-text-primaryChannel")} / 0.11)`),w(d.Slider,"primaryTrack",B(oe,a?g("palette-primary-main"):d.primary.main,.62)),w(d.Slider,"secondaryTrack",B(oe,a?g("palette-secondary-main"):d.secondary.main,.62)),w(d.Slider,"errorTrack",B(oe,a?g("palette-error-main"):d.error.main,.62)),w(d.Slider,"infoTrack",B(oe,a?g("palette-info-main"):d.info.main,.62)),w(d.Slider,"successTrack",B(oe,a?g("palette-success-main"):d.success.main,.62)),w(d.Slider,"warningTrack",B(oe,a?g("palette-warning-main"):d.warning.main,.62));const D=v?B(ne,a?g("palette-background-default"):d.background.default,.6825):Rt(d.background.default,.8);w(d.SnackbarContent,"bg",D),w(d.SnackbarContent,"color",Ee(()=>v?hr.text.primary:d.getContrastText(D))),w(d.SpeedDialAction,"fabHoverBg",Rt(d.background.paper,.15)),w(d.StepConnector,"border",E("palette-grey-400")),w(d.StepContent,"border",E("palette-grey-400")),w(d.Switch,"defaultColor",E("palette-common-white")),w(d.Switch,"defaultDisabledColor",E("palette-grey-100")),w(d.Switch,"primaryDisabledColor",B(oe,a?g("palette-primary-main"):d.primary.main,.62)),w(d.Switch,"secondaryDisabledColor",B(oe,a?g("palette-secondary-main"):d.secondary.main,.62)),w(d.Switch,"errorDisabledColor",B(oe,a?g("palette-error-main"):d.error.main,.62)),w(d.Switch,"infoDisabledColor",B(oe,a?g("palette-info-main"):d.info.main,.62)),w(d.Switch,"successDisabledColor",B(oe,a?g("palette-success-main"):d.success.main,.62)),w(d.Switch,"warningDisabledColor",B(oe,a?g("palette-warning-main"):d.warning.main,.62)),w(d.TableCell,"border",B(oe,Je(a?g("palette-divider"):d.divider,1),.88)),w(d.Tooltip,"bg",B(Je,a?g("palette-grey-700"):d.grey[700],.92))}if(d.mode==="dark"){w(d.Alert,"errorColor",B(oe,a?g("palette-error-light"):d.error.light,.6)),w(d.Alert,"infoColor",B(oe,a?g("palette-info-light"):d.info.light,.6)),w(d.Alert,"successColor",B(oe,a?g("palette-success-light"):d.success.light,.6)),w(d.Alert,"warningColor",B(oe,a?g("palette-warning-light"):d.warning.light,.6)),w(d.Alert,"errorFilledBg",E("palette-error-dark")),w(d.Alert,"infoFilledBg",E("palette-info-dark")),w(d.Alert,"successFilledBg",E("palette-success-dark")),w(d.Alert,"warningFilledBg",E("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",B(ne,a?g("palette-error-light"):d.error.light,.9)),w(d.Alert,"infoStandardBg",B(ne,a?g("palette-info-light"):d.info.light,.9)),w(d.Alert,"successStandardBg",B(ne,a?g("palette-success-light"):d.success.light,.9)),w(d.Alert,"warningStandardBg",B(ne,a?g("palette-warning-light"):d.warning.light,.9)),w(d.Alert,"errorIconColor",E("palette-error-main")),w(d.Alert,"infoIconColor",E("palette-info-main")),w(d.Alert,"successIconColor",E("palette-success-main")),w(d.Alert,"warningIconColor",E("palette-warning-main")),w(d.AppBar,"defaultBg",E("palette-grey-900")),w(d.AppBar,"darkBg",E("palette-background-paper")),w(d.AppBar,"darkColor",E("palette-text-primary")),w(d.Avatar,"defaultBg",E("palette-grey-600")),w(d.Button,"inheritContainedBg",E("palette-grey-800")),w(d.Button,"inheritContainedHoverBg",E("palette-grey-700")),w(d.Chip,"defaultBorder",E("palette-grey-700")),w(d.Chip,"defaultAvatarColor",E("palette-grey-300")),w(d.Chip,"defaultIconColor",E("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",B(ne,a?g("palette-primary-main"):d.primary.main,.5)),w(d.LinearProgress,"secondaryBg",B(ne,a?g("palette-secondary-main"):d.secondary.main,.5)),w(d.LinearProgress,"errorBg",B(ne,a?g("palette-error-main"):d.error.main,.5)),w(d.LinearProgress,"infoBg",B(ne,a?g("palette-info-main"):d.info.main,.5)),w(d.LinearProgress,"successBg",B(ne,a?g("palette-success-main"):d.success.main,.5)),w(d.LinearProgress,"warningBg",B(ne,a?g("palette-warning-main"):d.warning.main,.5)),w(d.Skeleton,"bg",v?B(Je,a?g("palette-text-primary"):d.text.primary,.13):`rgba(${E("palette-text-primaryChannel")} / 0.13)`),w(d.Slider,"primaryTrack",B(ne,a?g("palette-primary-main"):d.primary.main,.5)),w(d.Slider,"secondaryTrack",B(ne,a?g("palette-secondary-main"):d.secondary.main,.5)),w(d.Slider,"errorTrack",B(ne,a?g("palette-error-main"):d.error.main,.5)),w(d.Slider,"infoTrack",B(ne,a?g("palette-info-main"):d.info.main,.5)),w(d.Slider,"successTrack",B(ne,a?g("palette-success-main"):d.success.main,.5)),w(d.Slider,"warningTrack",B(ne,a?g("palette-warning-light"):d.warning.main,.5));const D=v?B(oe,a?g("palette-background-default"):d.background.default,.985):Rt(d.background.default,.98);w(d.SnackbarContent,"bg",D),w(d.SnackbarContent,"color",Ee(()=>v?In.text.primary:d.getContrastText(D))),w(d.SpeedDialAction,"fabHoverBg",Rt(d.background.paper,.15)),w(d.StepConnector,"border",E("palette-grey-600")),w(d.StepContent,"border",E("palette-grey-600")),w(d.Switch,"defaultColor",E("palette-grey-300")),w(d.Switch,"defaultDisabledColor",E("palette-grey-600")),w(d.Switch,"primaryDisabledColor",B(ne,a?g("palette-primary-main"):d.primary.main,.55)),w(d.Switch,"secondaryDisabledColor",B(ne,a?g("palette-secondary-main"):d.secondary.main,.55)),w(d.Switch,"errorDisabledColor",B(ne,a?g("palette-error-main"):d.error.main,.55)),w(d.Switch,"infoDisabledColor",B(ne,a?g("palette-info-main"):d.info.main,.55)),w(d.Switch,"successDisabledColor",B(ne,a?g("palette-success-main"):d.success.main,.55)),w(d.Switch,"warningDisabledColor",B(ne,a?g("palette-warning-light"):d.warning.main,.55)),w(d.TableCell,"border",B(ne,Je(a?g("palette-divider"):d.divider,1),.68)),w(d.Tooltip,"bg",B(Je,a?g("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(D=>{const z=d[D];D!=="tonalOffset"&&!a&&z&&typeof z=="object"&&(z.main&&w(d[D],"mainChannel",gt(xt(z.main))),z.light&&w(d[D],"lightChannel",gt(xt(z.light))),z.dark&&w(d[D],"darkChannel",gt(xt(z.dark))),z.contrastText&&w(d[D],"contrastTextChannel",gt(xt(z.contrastText))),D==="text"&&(Pe(d[D],"primary"),Pe(d[D],"secondary")),D==="action"&&(z.active&&Pe(d[D],"active"),z.selected&&Pe(d[D],"selected")))})}),R=r.reduce((G,d)=>je(G,d),R);const M={prefix:s,disableCssColorScheme:i,shouldSkipGeneratingVar:l,getSelector:Ka(R),enableContrastVars:a},{vars:I,generateThemeVars:J,generateStyleSheets:q}=ba(R,M);return R.vars=I,Object.entries(R.colorSchemes[R.defaultColorScheme]).forEach(([G,d])=>{R[G]=d}),R.generateThemeVars=J,R.generateStyleSheets=q,R.generateSpacing=function(){return kn(h.spacing,vr(this))},R.getColorSchemeSelector=va(c),R.spacing=R.generateSpacing(),R.shouldSkipGeneratingVar=l,R.unstable_sxConfig={...Ut,...h==null?void 0:h.unstable_sxConfig},R.unstable_sx=function(d){return dt({sx:d,theme:this})},R.toRuntimeSource=Dn,R}function un(e,r,t){e.colorSchemes&&t&&(e.colorSchemes[r]={...t!==!0&&t,palette:wr({...t===!0?{}:t.palette,mode:r})})}function Wn(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],u={...i,...t?{[l]:{...typeof c!="boolean"&&c,palette:t}}:void 0};if(o===!1){if(!("colorSchemes"in e))return gr(e,...r);let h=t;"palette"in e||u[l]&&(u[l]!==!0?h=u[l].palette:l==="dark"&&(h={mode:"dark"}));const x=gr({...e,palette:h},...r);return x.defaultColorScheme=l,x.colorSchemes=u,x.palette.mode==="light"&&(x.colorSchemes.light={...u.light!==!0&&u.light,palette:x.palette},un(x,"dark",u.dark)),x.palette.mode==="dark"&&(x.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:x.palette},un(x,"light",u.light)),x}return!t&&!("light"in u)&&l==="light"&&(u.light=!0),es({...a,colorSchemes:u,defaultColorScheme:l,...typeof o!="boolean"&&o},...r)}const ts=Wn(),rs="$$material";function ns(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const os=e=>ns(e)&&e!=="classes",is=na({themeId:rs,defaultTheme:ts,rootShouldForwardProp:os}),as=ga;process.env.NODE_ENV!=="production"&&(ee.node,ee.object.isRequired);function ss(e){return ha(e)}function ls(e){return Cr("MuiSvgIcon",e)}Qi("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const ds=e=>{const{color:r,fontSize:t,classes:o}=e,i={root:["root",r!=="inherit"&&`color${et(r)}`,`fontSize${et(t)}`]};return No(i,ls,o)},cs=is("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)}`]]}})(as(({theme:e})=>{var r,t,o,i,s,a,l,c,u,h,x,m,g,y;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:p=>!p.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:((h=(u=e.typography)==null?void 0:u.pxToRem)==null?void 0:h.call(u,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,p])=>p&&p.main).map(([p])=>{var b,k;return{props:{color:p},style:{color:(k=(b=(e.vars??e).palette)==null?void 0:b[p])==null?void 0:k.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:(y=(g=(e.vars??e).palette)==null?void 0:g.action)==null?void 0:y.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Ot=_e.forwardRef(function(r,t){const o=ss({props:r,name:"MuiSvgIcon"}),{children:i,className:s,color:a="inherit",component:l="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:h=!1,titleAccess:x,viewBox:m="0 0 24 24",...g}=o,y=_e.isValidElement(i)&&i.type==="svg",p={...o,color:a,component:l,fontSize:c,instanceFontSize:r.fontSize,inheritViewBox:h,viewBox:m,hasSvgAsChild:y},b={};h||(b.viewBox=m);const k=ds(p);return n.jsxs(cs,{as:l,className:Sn(k.root,s),focusable:"false",color:u,"aria-hidden":x?void 0:!0,role:x?"img":void 0,ref:t,...b,...g,...y&&i.props,ownerState:p,children:[y?i.props.children:i,x?n.jsx("title",{children:x}):null]})});process.env.NODE_ENV!=="production"&&(Ot.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});Ot.muiName="SvgIcon";function ct(e,r){function t(o,i){return n.jsx(Ot,{"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=Ot.muiName,_e.memo(_e.forwardRef(t))}const ps=ct(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"),us=ct(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"),fs=ct(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"),hs=ct(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"),gs=ct(n.jsx("path",{d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded"),fn=e=>{let r;const t=new Set,o=(u,h)=>{const x=typeof u=="function"?u(r):u;if(!Object.is(x,r)){const m=r;r=h??(typeof x!="object"||x===null)?x:Object.assign({},r,x),t.forEach(g=>g(r,m))}},i=()=>r,l={setState:o,getState:i,getInitialState:()=>c,subscribe:u=>(t.add(u),()=>t.delete(u))},c=r=e(o,i,l);return l},xs=(e=>e?fn(e):fn),ms=e=>e;function ys(e,r=ms){const t=U.useSyncExternalStore(e.subscribe,U.useCallback(()=>r(e.getState()),[e,r]),U.useCallback(()=>r(e.getInitialState()),[e,r]));return U.useDebugValue(t),t}const hn=e=>{const r=xs(e),t=o=>ys(r,o);return Object.assign(t,r),t},zn=(e=>e?hn(e):hn);function bs(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 xr=e=>r=>{try{const t=e(r);return t instanceof Promise?t:{then(o){return xr(o)(t)},catch(o){return this}}}catch(t){return{then(o){return this},catch(o){return xr(o)(t)}}}},vs=(e,r)=>(t,o,i)=>{let s={storage:bs(()=>window.localStorage),partialize:b=>b,version:0,merge:(b,k)=>({...k,...b}),...r},a=!1,l=0;const c=new Set,u=new Set;let h=s.storage;if(!h)return e((...b)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),t(...b)},o,i);const x=()=>{const b=s.partialize({...o()});return h.setItem(s.name,{state:b,version:s.version})},m=i.setState;i.setState=(b,k)=>(m(b,k),x());const g=e((...b)=>(t(...b),x()),o,i);i.getInitialState=()=>g;let y;const p=()=>{var b,k;if(!h)return;const P=++l;a=!1,c.forEach(v=>{var C;return v((C=o())!=null?C:g)});const $=((k=s.onRehydrateStorage)==null?void 0:k.call(s,(b=o())!=null?b:g))||void 0;return xr(h.getItem.bind(h))(s.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==s.version){if(s.migrate){const C=s.migrate(v.state,v.version);return C instanceof Promise?C.then(R=>[!0,R]):[!0,C]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,v.state];return[!1,void 0]}).then(v=>{var C;if(P!==l)return;const[R,M]=v;if(y=s.merge(M,(C=o())!=null?C:g),t(y,!0),R)return x()}).then(()=>{P===l&&($==null||$(o(),void 0),y=o(),a=!0,u.forEach(v=>v(y)))}).catch(v=>{P===l&&($==null||$(void 0,v))})};return i.persist={setOptions:b=>{s={...s,...b},b.storage&&(h=b.storage)},clearStorage:()=>{h==null||h.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>p(),hasHydrated:()=>a,onHydrate:b=>(c.add(b),()=>{c.delete(b)}),onFinishHydration:b=>(u.add(b),()=>{u.delete(b)})},s.skipHydration||p(),y||g},Ss=vs,He={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",customFont:"",customHeadFont:"",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 lr(e){const r={...He};if(e&&typeof e=="object")for(const t of Object.keys(He)){const o=e[t];o!==void 0&&typeof o==typeof He[t]&&(r[t]=o)}return r}function Cs(e){if(!e||typeof e!="object")return!1;const r=Object.keys(He);let t=0;for(const o of r){const i=e[o];i!==void 0&&typeof i==typeof He[o]&&t++}return t/r.length>=.5}const N=zn()(Ss((e,r)=>({settings:{...He},savedThemes:[],baseline:$e(He),editingSavedId: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}}),reset:()=>e(()=>({settings:{...He},baseline:$e(He),editingSavedId: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}}),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}}),applySaved:t=>e(()=>{const o={...lr(t.snap),presetId:t.id};return{settings:o,baseline:$e(o),editingSavedId:t.id}}),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})),importTheme:(t,o)=>{const i=r().savedThemes.map(u=>u.name.toLowerCase());let s=t,a=2;for(;i.includes(s.toLowerCase());)s=`${t} ${a++}`;const l=lr(o),c={id:"imp"+Date.now(),name:s,snap:l};return e(u=>{const h={...l,presetId:c.id};return{savedThemes:[...u.savedThemes,c],settings:h,baseline:$e(h),editingSavedId:c.id}}),c}}),{name:"omnieye-theme-studio",merge:(e,r)=>{const t=e??{};return{...r,...t,settings:lr(t.settings)}}}));function Re(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 mr(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 u=(i+s)/2;return a&&(c=a/(1-Math.abs(2*u-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(u*100)]}function se(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 ve(e){try{const[r,t]=mr(e),o=Math.max(t,18);return{50:se(r,Math.max(Math.round(o*.3),10),96),100:se(r,Math.max(Math.round(o*.42),12),91),200:se(r,Math.max(Math.round(o*.55),16),82),300:se(r,Math.max(Math.round(o*.7),20),70),400:se(r,o,60),500:e,600:se(r,Math.min(o+4,100),44),700:se(r,Math.min(o+8,100),36),800:se(r,Math.max(Math.round(o*.92),16),26),900:se(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 dr(e,r){try{const t=l=>{const c=[1,3,5].map(u=>{const h=parseInt(l.slice(u,u+2),16)/255;return h<=.04045?h/12.92:Math.pow((h+.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 de(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=ve(e.primaryHex),t=ve(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:de(e.highlightHex||"#ffd400",.15),highlightBd:de(e.highlightHex||"#ffd400",.34),pContrast:e.contrastMode==="light"?"#ffffff":e.contrastMode==="dark"?"rgba(0,0,0,0.87)":dr(i,"#ffffff")>=2.9?"#ffffff":"rgba(0,0,0,0.87)",pContainer:o?de(e.primaryHex,.26):r[50],onPContainer:o?r[100]:r[800],sMain:s,sContrast:dr(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:de(e.errorHex,o?.22:.13),u=l?e.warningHex:de(e.warningHex,o?.22:.14),h=l?e.infoHex:de(e.infoHex,o?.22:.13),x=l?e.successHex:de(e.successHex,o?.22:.13),m=l?"#ffffff":o?ve(e.errorHex)[300]:e.errorHex,g=l?"#ffffff":o?ve(e.warningHex)[300]:ve(e.warningHex)[700],y=l?"#ffffff":o?ve(e.infoHex)[300]:e.infoHex,p=l?"#ffffff":o?ve(e.successHex)[300]:ve(e.successHex)[700],b=mr(e.primaryHex)[0],k={neutral:[220,6],warm:[32,26],cool:[210,30],brand:[b,42],slate:[214,16],snow:[0,0]},P=k[e.surfaceTint]||k.neutral,$=e.tintIntensity>=0?e.tintIntensity:100,v=[P[0],Math.round(P[1]*$/100)];o?(a.bgDefault=se(v[0],Math.round(v[1]*.7),7),a.paper=se(v[0],Math.round(v[1]*.7),13),a.paper2=se(v[0],Math.round(v[1]*.85),19)):e.surfaceTint==="snow"&&!(e.tintIntensity>0)?(a.bgDefault="#ffffff",a.paper="#ffffff",a.paper2="#ffffff"):(a.bgDefault=se(v[0],Math.round(v[1]*.9),e.surfaceTint==="brand"?92:e.surfaceTint==="cool"?94:96),a.paper=se(v[0],Math.round(v[1]*.4),99),a.paper2=se(v[0],Math.round(v[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},R=C[e.contrast]!==void 0?C[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[R][0],a.textSecondary=M[R][1],a.divider=M[R][2],a.outline=M[R][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?se(v[0],Math.round(v[1]*.9),22):se(v[0],Math.max(Math.round(v[1]*.3),4),100):e.nestedStyle==="bordered"?a.paper2=a.paper:a.paper2=o?se(v[0],Math.round(v[1]*.9),Math.max(3,5)):se(v[0],Math.min(Math.round(v[1]*1.1),60),Math.max(88,94-v[1]*.18));const I=e.btnColorHex||i,J=e.accentGradient?"linear-gradient(135deg,"+I+","+(e.btnColorHex?ve(e.btnColorHex)[700]:r[o?500:700])+")":I,q=e.btnTextHex||(dr(I,"#ffffff")>=2.9?"#ffffff":"rgba(0,0,0,0.87)"),G=e.h1Color||null,d=e.h2Color||null,E=e.h3Color||null,B=e.h4Color||null,D=e.h5Color||null,z=e.h6Color||null,V=[{key:"sm",px:13},{key:"df",px:12},{key:"lg",px:18}],K=V.find(me=>me.key===e.textSize)||V[1],Y=e.baseFontPx>0?e.baseFontPx:K.px,T=e.bodyLineHeight>0?e.bodyLineHeight:1.5,S=e.h1Size>0?e.h1Size:20,L=Math.round(S*1.1),j=S,O=Math.max(Math.round(S*.9),11),A=Math.max(Math.round(S*.8),11),_=Math.max(Math.round(S*.7),10),W=Math.max(Math.round(S*.6),10),H=Math.max(Math.round(S*.5),9),X=Y,Q=Math.round(Y*.92),fe=Math.round(Y*.8),F=Math.round(Y*.72),he=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,qt=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,pt=Z+"px",ut=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)"},Br="1px solid rgba(255,255,255,0.06)";let ft,Ye,Ct;e.cardStyle==="outlined"?(ft="none",Ye="1.5px solid "+a.outline,Ct="none"):e.cardStyle==="soft"?(ft=We[1],Ye=o?Br:"none",Ct=We[1]):(ft=We[8],Ye=o?Br:"none",Ct=We[4]),e.cardShadowPx>=0&&(ft="0 "+Math.round(e.cardShadowPx*.45)+"px "+e.cardShadowPx+"px rgba(16,24,40,"+(o?.55:.16)+")");let jt="transparent",Rr="1px solid "+a.divider,Kt="none";e.cardHeader==="plain"?Rr="none":e.cardHeader==="tinted"?jt=a.pContainer:e.cardHeader==="accent"&&(Kt="inset 3px 0 0 "+i),e.headerStrength>=0&&(Kt="inset "+Math.round(e.headerStrength*.06)+"px 0 0 "+i,jt=de(e.primaryHex,(o?.14:.08)*(e.headerStrength/100))),e.cardHdrHex&&(jt=e.cardHdrHex);const Ln=o?"none":We[4],Nn=o?"1px solid "+a.divider:"none",Vn=e.nestedStyle==="bordered"?"1.5px solid "+a.outline:"1px solid "+a.divider,Un=e.nestedDepth>0?"inset 3px 0 0 "+de(e.primaryHex,.55)+", 0 "+Math.round(e.nestedDepth*.4)+"px "+e.nestedDepth+"px rgba(16,24,40,"+(o?.42:.1)+")":"none",Gn=(e.appName||"").trim().split(/\s+/).slice(0,2).map(me=>me[0]||"").join("").toUpperCase()||"AP",Yn=!!(e.logoMode==="image"&&e.logoUrl),Jn=!!e.loginImage,Er=me=>{const be=me||"Roboto";return be.includes(" ")&&!be.startsWith('"')&&!be.startsWith("'")?`"${be}"`:be},qn=Er(e.headingFont||e.fontFamily),Kn=Er(e.fontFamily),ye=mr(e.primaryHex)[0],xe=(me,be)=>se((me%360+360)%360,62,o?60:46),Hr={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:[se(ye,55,o?40:78),se(ye,60,o?50:64),i,se(ye,70,o?70:38),se(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)]},Xn=Hr[e.chartScheme]||Hr.brand,Qn=[r[600],t[600],se((ye+42)%360,55,46),se((ye+205)%360,50,46)],Zn={error:{cb:c,cc:m},success:{cb:x,cc:p},info:{cb:h,cc:y},warning:{cb:u,cc:g}},Xt=e.mapGlass==="light",eo=Xt?"rgba(255,255,255,0.84)":"rgba(15,20,28,0.74)",to=Xt?"#1c2733":"#f3f6fa",ro=Xt?"rgba(0,0,0,0.12)":"rgba(255,255,255,0.18)",no="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%, "+de(i,.22)+", rgba(0,0,0,0) 60%), "+"#0f141c",oo="linear-gradient(135deg,"+i+","+r[700]+")",io="linear-gradient(180deg,"+de(r[900],.12)+","+de(r[900],.55)+")",ao="linear-gradient(135deg,"+r[700]+","+r[900]+")",so="linear-gradient(135deg,"+de(r[900],.55)+","+de(e.primaryHex,.45)+")",Pr={"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"}},lo=Pr[e.notifPosition]||Pr["top-right"],$r=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:u,icc:g,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 "+$r.bar}:wt={boxShadow:"none",border:"1px solid "+a.divider};const co=e.notifCardHex||(o?"#1e1e1e":"#ffffff"),po={compact:"7px",default:"11px",comfortable:"16px"},uo={compact:"6px",default:"12px",comfortable:"22px"},fo={top:"flex-start",middle:"center",bottom:"flex-end"},ho={left:"flex-start",center:"center",right:"flex-end"},go={plain:"transparent",tinted:a.paper2,accent:a.highlightSoft},xo={rowPy:po[e.tableDensity]||"11px",cellPx:uo[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:go[e.tableHeaderStyle]||a.paper2,cellAI:fo[e.tableCellAlignV]||"center",cellJC:ho[e.tableCellAlignH]||"flex-start",stripeBg:o?"rgba(255,255,255,0.035)":"rgba(0,0,0,0.028)",statusMap:{Delivered:{sb:x,sc:p},Processing:{sb:a.pContainer,sc:o?a.pLight:a.pDark},Pending:{sb:u,sc:g},Shipped:{sb:h,sc:y}},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}))},mo={sm:"Small",df:"Default",lg:"Large"},yo={compact:"Compact",default:"Default",comfortable:"Comfortable"},bo={outlined:"Outlined",soft:"Soft",floating:"Floating"},vo={sharp:"Sharp",rounded:"Rounded",round:"Round"},So=[{key:"sidebar",label:"Sidebar",desc:"Full drawer",ic:"▤"},{key:"rail",label:"Rail",desc:"Icons only",ic:"▥"},{key:"topbar",label:"Top Bar",desc:"Horizontal",ic:"▦"}],Co=e.fontFamily+" · "+(mo[e.textSize]||"Default"),jo=(vo[e.radiusPreset]||"Custom")+" · "+(yo[e.density]||"Default")+" · "+(bo[e.cardStyle]||"Soft"),wo=[{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"})),ko=So.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})),To=e.sidebarWidth,Bo=e.appBarH>0?e.appBarH:56,Ro=e.appBarH>0?e.appBarH+"px":"Auto (56px)";return{pal:r,spal:t,isDark:o,pMain:i,sMain:s,t:a,errSoft:c,warnSoft:u,infoSoft:h,sucSoft:x,errTxt:m,warnTxt:g,infoTxt:y,sucTxt:p,sevMap:Zn,accentBg:J,btnText:q,hc1:G,hc2:d,hc3:E,hc4:B,hc5:D,hc6:z,base:Y,bodyLH:T,h1base:S,tDisplay:L,tH1:j,tH2:O,tTitle:A,tH4:_,tH5:W,tH6:H,tBody:X,tBodySm:Q,tCaption:fe,tOverline:F,wH1:he,wH2:he,wH3:he,wH4:he,wH5:he,wH6:he,headLH:Oe,bodyWeightEff:De,bwEmph:Ve,pad:qt,padSm:Me,gap:St,rowPy:Ge,screenPad:Fe,r:Z,rad:pt,radSm:ut,SH:We,cardShadow:ft,cardBorder:Ye,btnShadow:Ct,cardHdrBg:jt,cardHdrBorder:Rr,cardHdrAccent:Kt,appbarShadow:Ln,appbarBorder:Nn,nestBorder:Vn,nestShadow:Un,iconInitials:Gn,hasLogo:Yn,hasLoginImage:Jn,headFam:qn,bodyFam:Kn,chartHue:ye,chartPalette:Xn,avatarColors:Qn,overlaySurface:eo,onOverlay:to,overlayBorder:ro,mediaBg:no,loginBrandGrad:oo,loginScrimGrad:io,loginCenteredGrad:ao,loginScrimGradC:so,npos:lo,nacc:$r,toastDeco:wt,toastBg:co,btnCase:e.btnCase!=="none"?"uppercase":"none",table:xo,typeSummary:Co,shapeSummary:jo,settingsCats:wo,navSettingsChips:ko,sidebarWidth:To,appBarHEff:Bo,appBarHLabel:Ro}}function js({icon:e,title:r,info:t,open:o,dimmed:i,onToggle:s,onPreviewMenu:a,children:l}){const c=N(k=>k.settings),u=c.mode==="dark",h=c.primaryHex||"#1565c0",x=Re(c.mode),m=ve(h),g=kr(c),y=o?u?de(h,.22):de(h,.1):"transparent",p=o?u?m[200]:m[700]:x.text,b=o?h:x.chevron;return n.jsxs(f.Box,{sx:{background:y,opacity:i?.1:1,transform:o?"translateY(-2px)":"none",transition:"opacity .22s ease, transform .22s ease",borderBottom:`1px solid ${x.divider}`,overflow:"hidden"},children:[n.jsxs(f.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(f.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(f.Box,{sx:{flex:1,minWidth:0},children:n.jsx(f.Box,{sx:{fontSize:`${g.tH5}px`,fontWeight:g.wH5,fontFamily:`${g.headFam},sans-serif`,lineHeight:1.25,color:p,letterSpacing:"-.2px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r})}),a&&n.jsx(f.Box,{component:"span",title:"Change preview screen",onClick:k=>{k.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(f.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(f.Box,{sx:{width:20,height:20,borderRadius:"6px",display:"grid",placeItems:"center",fontSize:"9px",color:b,flexShrink:0,transition:"background .18s, border-color .18s"},children:n.jsx(f.Box,{component:"span",sx:{display:"block",lineHeight:1,transform:o?"rotate(180deg)":"none",transition:"transform .2s"},children:"▼"})})]}),n.jsx(f.Collapse,{in:o,unmountOnExit:!0,timeout:280,children:n.jsx(f.Box,{sx:{p:"2px 13px 12px",borderTop:`1px solid ${x.divider}`},children:l})})]})}function Te(){const e=N(r=>r.settings);return U.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)||"#1565c0",s=N(m=>m.settings.highlightHex)||"#ffd400",a=N(m=>m.settings.bodyWeight)||400,l=o==="dark",c=Math.min(900,a+200),u=Te(),h=l?"#e6edf3":"#1c2127",x=l?"#cdd4de":"#5a6573";return n.jsx(f.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 g=m.key===r,y=n.jsx(f.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:`${u.tBodySm}px`,fontFamily:`${u.bodyFam},sans-serif`,fontWeight:g?c:a,letterSpacing:0,textTransform:"none",whiteSpace:"normal",wordBreak:"break-word",lineHeight:1.15,textAlign:"center",color:g?h:x,opacity:g?1:.3,bgcolor:g?de(s,l?.26:.18):"transparent",borderBottom:g?`3px solid ${i}`:"2px solid transparent",transition:"color .16s ease, background .16s ease, border-color .16s ease, opacity .16s ease","&:hover":g?{bgcolor:de(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(f.Tooltip,{title:m.info,arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:y},m.key):y})})}const yr=[{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 ws(){var S,L;const[e,r]=U.useState("presets"),t=N(j=>j.settings),o=t.mode==="dark",i=Re(t.mode),s=t.highlightHex||"#ffd400",a=de(s,o?.3:.18),l=o?"#e6edf3":"#1c2127",c=o?"rgba(255,255,255,0.82)":"#2c333d",u=N(j=>j.savedThemes),h=N(j=>j.applyPreset),x=N(j=>j.applySaved),m=N(j=>j.saveTheme),g=N(j=>j.updateSaved),y=N(j=>j.renameSaved),p=N(j=>j.deleteSaved),b=N(j=>j.importTheme),k=N(j=>j.set),P=N(j=>j.isDirty),$=N(j=>j.editingSavedId),v=u.find(j=>j.id===$),C=(j,O)=>{const A=new Blob([JSON.stringify({name:j,snap:O},null,2)],{type:"application/json"}),_=URL.createObjectURL(A),W=document.createElement("a");W.href=_,W.download=`${j.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}.theme.json`,W.click(),URL.revokeObjectURL(_)},[R,M]=U.useState("");U.useEffect(()=>{if(!R)return;const j=setTimeout(()=>M(""),5e3);return()=>clearTimeout(j)},[R]);const I=j=>{var _;const O=(_=j.target.files)==null?void 0:_[0];if(!O)return;const A=new FileReader;A.onload=()=>{try{const W=JSON.parse(A.result),H=W.snap??W;if(!Cs(H)){M("Invalid theme file. The selected file is not a valid Theme Studio export.");return}M(""),b(W.name||"Imported Theme",H)}catch{M("Invalid theme file. The selected file is not a valid Theme Studio export.")}},A.readAsText(O),j.target.value=""},[J,q]=U.useState(null),[G,d]=U.useState(!1),[E,B]=U.useState(""),[D,z]=U.useState(null),[V,K]=U.useState(null),Y=((S=yr.find(j=>j.id===t.presetId))==null?void 0:S.name)||((L=u.find(j=>j.id===t.presetId))==null?void 0:L.name)||"Custom Theme",T=(j,O)=>{const A=j.trim();return A?u.some(_=>_.name.toLowerCase()===A.toLowerCase()&&_.id!==O)?"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(f.Box,{sx:{p:"12px 2px 2px"},children:[e==="presets"&&n.jsx(f.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"9px"},children:yr.map(j=>{const O=t.presetId===j.id;return n.jsxs(f.Box,{onClick:()=>h(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 ${O?s:o?"#363d48":"#e3e8ee"}`,bgcolor:O?a:o?"#262b34":"#ffffff",transition:"all .14s ease"},children:[n.jsxs(f.Box,{sx:{display:"flex",flexDirection:"column",gap:"2px",flexShrink:0},children:[n.jsx(f.Box,{sx:{width:20,height:11,borderRadius:"3px",bgcolor:j.snap.primaryHex}}),n.jsx(f.Box,{sx:{width:20,height:7,borderRadius:"2px",bgcolor:j.snap.secondaryHex}})]}),n.jsx(f.Box,{component:"span",sx:{fontSize:"11px",fontWeight:600,color:O?l:c,lineHeight:1.3},children:j.name})]},j.id)})}),e==="saved"&&n.jsxs(f.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[u.length===0&&n.jsx(f.Typography,{variant:"caption",sx:{color:"text.secondary",py:2,textAlign:"center"},children:"No saved themes yet."}),n.jsx(f.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:.9},children:u.map(j=>{const O=t.presetId===j.id;return n.jsxs(f.Box,{onClick:()=>x(j),title:"Apply this saved theme",sx:{display:"flex",flexDirection:"column",gap:.9,p:"9px 10px",borderRadius:"11px",cursor:"pointer",border:`1px solid ${O?s:o?"#363d48":"#e3e8ee"}`,bgcolor:O?a:o?"#262b34":"#ffffff",transition:"all .14s ease"},children:[n.jsxs(f.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[n.jsxs(f.Box,{sx:{display:"flex",flexDirection:"column",gap:"2px",flexShrink:0},children:[n.jsx(f.Box,{sx:{width:20,height:11,borderRadius:"3px",bgcolor:j.snap.primaryHex}}),n.jsx(f.Box,{sx:{width:20,height:7,borderRadius:"2px",bgcolor:j.snap.secondaryHex}})]}),n.jsx(f.Box,{component:"span",sx:{flex:1,minWidth:0,fontSize:"11px",fontWeight:600,color:O?l:c,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:j.name})]}),n.jsx(f.Box,{sx:{display:"flex",justifyContent:"flex-end"},children:n.jsx(f.Box,{component:"span",onClick:A=>{A.stopPropagation(),q({el:A.currentTarget,id:j.id})},sx:{cursor:"pointer",color:i.muted,px:.5},children:"⋮"})})]},j.id)})}),R&&n.jsxs(f.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(f.Box,{component:"span",sx:{fontWeight:900,fontSize:15,lineHeight:1.4},children:"!"}),n.jsxs(f.Box,{sx:{fontSize:12.5,lineHeight:1.4},children:[n.jsx(f.Box,{sx:{fontWeight:700},children:"Invalid theme file."}),"The selected file is not a valid Theme Studio export."]})]}),n.jsxs(f.Box,{sx:{display:"flex",gap:1,mt:1},children:[n.jsxs(f.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:I})]}),n.jsx(f.Button,{size:"small",variant:"outlined",onClick:()=>C(Y,t),sx:{flex:1,textTransform:"none"},children:"⤓ Download"}),n.jsx(f.Button,{size:"small",variant:"contained",disabled:!P(),onClick:()=>{B(v?v.name:""),d(!0)},sx:{flex:1,textTransform:"none"},children:"+ Save"})]})]}),e==="mode"&&n.jsx(f.Box,{sx:{display:"flex",gap:1},children:["light","dark"].map(j=>n.jsx(f.Button,{onClick:()=>k({mode:j}),variant:t.mode===j?"contained":"outlined",sx:{flex:1,textTransform:"capitalize"},children:j},j))})]}),n.jsxs(f.Menu,{open:!!J,anchorEl:J==null?void 0:J.el,onClose:()=>q(null),children:[n.jsx(f.MenuItem,{onClick:()=>{const j=u.find(O=>O.id===J.id);x(j),q(null)},children:"✏️ Edit"}),n.jsx(f.MenuItem,{onClick:()=>{const j=u.find(O=>O.id===J.id);z({id:j.id,name:j.name}),q(null)},children:"✎ Rename"}),n.jsx(f.MenuItem,{onClick:()=>{const j=u.find(O=>O.id===J.id);K({id:j.id,name:j.name}),q(null)},children:"🗑 Delete"}),n.jsx(f.MenuItem,{onClick:()=>{const j=u.find(O=>O.id===J.id);C(j.name,j.snap),q(null)},children:"⤓ Download"})]}),n.jsxs(f.Dialog,{open:G,onClose:()=>d(!1),children:[n.jsx(f.DialogTitle,{children:v?`Save changes to “${v.name}”`:"Save theme"}),n.jsx(f.DialogContent,{children:n.jsx(f.TextField,{autoFocus:!0,fullWidth:!0,size:"small",label:"Theme name",value:E,onChange:j=>B(j.target.value),error:!!T(E,v==null?void 0:v.id),helperText:T(E,v==null?void 0:v.id),sx:{mt:1}})}),n.jsxs(f.DialogActions,{children:[n.jsx(f.Button,{onClick:()=>d(!1),children:"Cancel"}),v&&n.jsx(f.Button,{variant:"contained",disabled:!!T(E,v.id),onClick:()=>{g(v.id,E.trim(),t),d(!1)},children:"Update"}),n.jsx(f.Button,{variant:v?"outlined":"contained",disabled:!!T(E),onClick:()=>{m(E.trim()),d(!1)},children:v?"Save as New":"Save"})]})]}),n.jsxs(f.Dialog,{open:!!D,onClose:()=>z(null),children:[n.jsx(f.DialogTitle,{children:"Rename theme"}),n.jsx(f.DialogContent,{children:n.jsx(f.TextField,{autoFocus:!0,fullWidth:!0,size:"small",label:"New name",value:(D==null?void 0:D.name)??"",onChange:j=>z(O=>O&&{...O,name:j.target.value}),error:!!(D&&T(D.name,D.id)),helperText:D?T(D.name,D.id):"",sx:{mt:1}})}),n.jsxs(f.DialogActions,{children:[n.jsx(f.Button,{onClick:()=>z(null),children:"Cancel"}),n.jsx(f.Button,{variant:"contained",disabled:!!(D&&T(D.name,D.id)),onClick:()=>{y(D.id,D.name.trim()),z(null)},children:"Rename"})]})]}),n.jsxs(f.Dialog,{open:!!V,onClose:()=>K(null),children:[n.jsx(f.DialogTitle,{children:"Delete theme"}),n.jsx(f.DialogContent,{children:n.jsxs(f.Typography,{variant:"body2",children:["Delete “",V==null?void 0:V.name,"”? This cannot be undone."]})}),n.jsxs(f.DialogActions,{children:[n.jsx(f.Button,{onClick:()=>K(null),children:"Cancel"}),n.jsx(f.Button,{color:"error",variant:"contained",onClick:()=>{p(V.id),K(null)},children:"Delete"})]})]})]})}function ks({tip:e,sk:r}){return n.jsx(f.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=Te();return n.jsxs(f.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(ks,{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(f.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(f.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 Ts=/^#[0-9a-fA-F]{6}$/;function Bs({value:e,onCommit:r}){const[t,o]=U.useState(!1),[i,s]=U.useState(e),[a,l]=U.useState("");U.useEffect(()=>{t||s(e)},[e,t]);const c=u=>{const h=u.trim();return Ts.test(h)?(l(""),r(h),!0):(l("Enter a valid hex colour, e.g. #1565c0"),!1)};return t?n.jsx(f.InputBase,{autoFocus:!0,value:i,title:a||void 0,onChange:u=>{s(u.target.value),l("")},onBlur:()=>{c(i)||s(e),o(!1)},onKeyDown:u=>{u.key==="Enter"&&c(i)&&o(!1),u.key==="Escape"&&(s(e),l(""),o(!1))},sx:{color:a?"#ffcdd2":"#fff",fontSize:"12.5px",fontWeight:700,width:100,position:"relative",zIndex:1}}):n.jsxs(f.Box,{component:"span",title:a||void 0,onClick:()=>{s(e),o(!0)},sx:{color:a?"#ffcdd2":"rgba(255,255,255,.85)",fontSize:"12.5px",fontWeight:700,cursor:"text",position:"relative",zIndex:1},children:[e," · tap to change"]})}function Rs(){const[e,r]=U.useState("brand"),t=N(p=>p.settings),o=N(p=>p.set),i=Re(t.mode),s=Te(),a={fontSize:"11.5px",color:i.body,fontWeight:600},l={fontSize:`${s.tBodySm}px`,color:i.body,fontWeight:s.bodyWeightEff,fontFamily:`${s.bodyFam},sans-serif`,lineHeight:s.bodyLH},c=t.primaryHex||"#1565c0",u=ve(c),h=[50,100,200,300,400,500,600,700,800,900].map(p=>u[p]),x=p=>o({...p,presetId:"custom"}),m=[{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"}],g=[{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(f.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(f.Box,{sx:{p:"12px 2px 2px",display:"flex",flexDirection:"column",gap:"11px"},children:[e==="brand"&&n.jsxs(f.Box,{sx:{display:"flex",flexDirection:"column",gap:"11px"},children:[n.jsxs(f.Box,{children:[n.jsx(qe,{sk:i,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(f.Box,{sx:{position:"relative",height:46,borderRadius:"11px",background:c,overflow:"hidden",display:"flex",alignItems:"center",px:"14px",boxShadow:`0 3px 10px ${c}44`},children:[n.jsx(Bs,{value:c,onCommit:p=>x({primaryHex:p})}),n.jsx(f.Box,{component:"input",type:"color",value:c,onChange:p=>x({primaryHex:p.target.value}),sx:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer",border:"none",p:0}})]}),n.jsx(f.Box,{sx:{display:"flex",gap:"2px",borderRadius:"7px",overflow:"hidden",height:14,mt:"7px"},children:h.map((p,b)=>n.jsx(f.Box,{sx:{flex:1,background:p}},b))})]}),n.jsxs(f.Box,{children:[n.jsx(qe,{sk:i,tip:"Secondary accent — secondary/outlined buttons, switches & toggles, selected chips, and the second data series in charts.",children:"Secondary / Accent"}),n.jsx(f.Box,{sx:{position:"relative",height:34,borderRadius:"9px",background:t.secondaryHex,overflow:"hidden"},children:n.jsx(f.Box,{component:"input",type:"color",value:t.secondaryHex,onChange:p=>x({secondaryHex:p.target.value}),sx:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer",border:"none",p:0}})})]}),n.jsxs(f.Box,{children:[n.jsx(qe,{sk:i,tip:"Accent colour used to draw attention — highlight panels, featured badges, callouts. Defaults to the brand colour.",children:"Highlight Colour"}),n.jsx(f.Box,{sx:{position:"relative",height:34,borderRadius:"8px",background:t.highlightHex||"#ffd400",overflow:"hidden",border:`1px solid ${i.insetBd}`},children:n.jsx(f.Box,{component:"input",type:"color",value:t.highlightHex||"#ffd400",onChange:p=>x({highlightHex:p.target.value}),sx:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer",border:"none",p:0}})})]})]}),e==="text"&&n.jsxs(f.Box,{sx:{display:"flex",flexDirection:"column",gap:"11px"},children:[n.jsx(qe,{sk:i,children:"Heading Text Colors"}),n.jsx(f.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"9px"},children:m.map(p=>n.jsxs(f.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(st,{sk:i,border:!0,value:t[p.key]||"#1c2127",onChange:b=>o({[p.key]:b})}),n.jsx(f.Box,{component:"span",sx:l,children:p.label})]},p.key))}),n.jsx(qe,{sk:i,children:"Body Text Colors"}),n.jsxs(f.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"7px"},children:[n.jsxs(f.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(st,{sk:i,border:!0,value:t.textPrimaryHex||"#1c2127",onChange:p=>o({textPrimaryHex:p})}),n.jsx(f.Box,{component:"span",sx:a,title:"Main body text colour.",children:"Primary Text"})]}),n.jsxs(f.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(st,{sk:i,border:!0,value:t.textSecondaryHex||"#5a6573",onChange:p=>o({textSecondaryHex:p})}),n.jsx(f.Box,{component:"span",sx:a,title:"Muted text colour.",children:"Secondary Text"})]}),n.jsxs(f.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(st,{sk:i,border:!0,value:t.dividerHex||"#e3e8ee",onChange:p=>o({dividerHex:p})}),n.jsx(f.Box,{component:"span",sx:a,title:"Divider / border colour.",children:"Divider"})]})]})]}),e==="status"&&n.jsxs(f.Box,{sx:{display:"flex",flexDirection:"column",gap:"7px"},children:[n.jsxs(f.Box,{children:[n.jsx(qe,{sk:i,tip:"Success, warning, error & info colours — used for alerts, status pills, toasts and validation states.",children:"Status Colors"}),n.jsx(f.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"7px"},children:g.map(p=>n.jsxs(f.Box,{sx:{display:"flex",alignItems:"center",gap:"8px",background:i.card,border:`1px solid ${i.insetBd}`,borderRadius:"9px",px:"9px",py:"7px"},children:[n.jsx(st,{sk:i,w:22,h:22,r:6,value:t[p.key],onChange:b=>o({[p.key]:b})}),n.jsx(f.Box,{component:"span",sx:a,children:p.label})]},p.key))})]}),n.jsxs(f.Box,{children:[n.jsx(qe,{sk:i,tip:"Override the auto-generated surface colours. Leave on Auto to follow the surface tint & mode.",children:"Surfaces"}),n.jsx(f.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"7px"},children:y.map(p=>{const b=!!t[p.key];return n.jsxs(f.Box,{sx:{display:"flex",alignItems:"center",gap:"8px",background:i.card,border:`1px solid ${i.insetBd}`,borderRadius:"9px",px:"9px",py:"5px"},children:[n.jsx(st,{sk:i,w:22,h:22,r:6,border:!0,value:t[p.key]||p.fb,onChange:k=>o({[p.key]:k})}),n.jsx(f.Box,{component:"span",sx:{...a,flex:1},children:p.label}),b&&n.jsx(f.Box,{component:"button",title:"Reset to Auto",onClick:()=>o({[p.key]:""}),sx:{background:"transparent",border:`1px solid ${i.insetBd}`,borderRadius:"6px",color:i.muted,fontSize:"10px",fontWeight:700,px:"7px",py:"3px",cursor:"pointer"},children:"Auto"})]},p.key)})})]})]})]})]})}function ge(e){const{label:r,info:t,value:o,effective:i,min:s,max:a,step:l=1,unit:c="",autoLabel:u,autoValue:h=0,softMin:x,softMax:m,floorValue:g,floorReset:y,floorMessage:p,extra:b,onChange:k}=e,P=Re(N(V=>V.settings.mode)),$=Te(),v=`${$.bodyFam},sans-serif`,[C,R]=U.useState(!1),[M,I]=U.useState(String(i)),[J,q]=U.useState(""),G=U.useRef(void 0);U.useEffect(()=>{C||I(String(i))},[i,C]),U.useEffect(()=>()=>clearTimeout(G.current),[]);const d=V=>{clearTimeout(G.current),q(V),V&&(G.current=setTimeout(()=>q(""),3e3))},E=V=>x!=null&&V<x?`Below ${x}${c} may break the UI`:m!=null&&V>m?`Above ${m}${c} may break the UI`:"",B=()=>{d(p??`Minimum is ${y}${c} — reset`),k(y),I(String(y))},D=V=>{const K=parseFloat(V);if(isNaN(K)){d("Enter a number"),I(String(i));return}if(g!=null&&y!=null&&K<=g){B();return}const Y=Math.min(a,Math.max(s,K));d(Y!==K?`Must be between ${s}${c} and ${a}${c} — clamped to ${Y}${c}`:E(Y)),I(String(Y)),k(Y)},z=o===h&&u?u:`${i}${c}`;return n.jsxs(f.Box,{sx:{mb:1.5},children:[n.jsxs(f.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:"8px"},children:[n.jsxs(f.Typography,{sx:{fontSize:`${$.tBodySm}px`,fontWeight:$.bwEmph,fontFamily:v,lineHeight:$.bodyLH,color:P.label2,display:"flex",alignItems:"center",gap:"5px"},children:[r,t&&n.jsx(f.Tooltip,{title:t,arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(f.Box,{component:"span",sx:{width:13,height:13,borderRadius:"50%",border:`1.1px solid ${P.chevron}`,color:P.chevron,fontSize:8,fontWeight:800,fontStyle:"italic",fontFamily:"Georgia, serif",display:"inline-grid",placeItems:"center",cursor:"help"},children:"i"})})]}),n.jsxs(f.Box,{sx:{display:"flex",alignItems:"center",gap:"5px",flexShrink:0},children:[C?n.jsx(f.InputBase,{autoFocus:!0,value:M,onChange:V=>I(V.target.value),onBlur:()=>{D(M),R(!1)},onKeyDown:V=>{V.key==="Enter"&&(D(M),R(!1)),V.key==="Escape"&&R(!1)},sx:{width:56,fontSize:`${$.tBodySm}px`,fontWeight:700,fontFamily:v,border:"1.5px solid",borderColor:"primary.main",borderRadius:"6px",px:"6px",py:"3px","& input":{p:0,textAlign:"center"}}}):n.jsxs(f.Box,{component:"button",onClick:()=>{I(String(i)),R(!0)},sx:{display:"inline-flex",alignItems:"center",gap:"5px",fontFamily:v,fontSize:`${$.tBodySm}px`,fontWeight:800,color:P.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"})]})]}),b]})]}),n.jsx(f.Box,{component:"input",type:"range",min:s,max:a,step:l,value:i,onChange:V=>{const K=parseFloat(V.target.value);if(g!=null&&y!=null&&K<=g){B();return}d(E(K)),k(K)},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)"}}}),J&&n.jsxs(f.Box,{sx:{display:"inline-flex",alignItems:"center",gap:"6px",mt:"8px",px:"10px",py:"6px",borderRadius:"8px",bgcolor:$.warnSoft,border:`1px solid ${$.warnTxt}`,color:$.warnTxt,fontSize:12,fontWeight:600},children:[n.jsx(f.Box,{component:"span",sx:{fontSize:13,lineHeight:1},children:"⚠"}),J]})]})}const Es=[{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"}],Hs=[{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(h=>h.settings.mode),s=N(h=>h.settings.primaryHex)||"#1565c0",a=N(h=>h.settings.highlightHex)||"#ffd400",l=i==="dark",c=ve(s),u=de(a,l?.3:.18);return n.jsx(f.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?u:l?"#262b34":"#ffffff",transition:"all .14s ease","&:hover":t?{}:{borderColor:l?"#4a5361":"#c9d0d9"}},children:n.jsx(f.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 Ps=["woff2","woff","ttf","otf"],$s=10*1024*1024;function gn({label:e,current:r,onLoad:t}){const o=Re(N(l=>l.settings.mode)),[i,s]=U.useState(""),a=l=>{var g,y;const c=(g=l.target.files)==null?void 0:g[0];if(!c)return;const u=((y=c.name.split(".").pop())==null?void 0:y.toLowerCase())||"";if(!Ps.includes(u)){s("Unsupported file type — use .woff2, .woff, .ttf or .otf");return}if(c.size>$s){s("File too large — max 10MB");return}s("");const h=c.name.replace(/\.[^.]+$/,""),x=URL.createObjectURL(c),m=document.createElement("style");m.textContent=`@font-face{font-family:'${h}';src:url('${x}');font-display:swap;}`,document.head.appendChild(m),t(h,x)};return n.jsxs(f.Box,{sx:{mt:1.5},children:[n.jsxs(f.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,textAlign:"center"},children:["⬆ ",e,n.jsx(f.Box,{component:"span",sx:{color:o.muted},children:".woff2 / .ttf / .otf"}),n.jsx("input",{type:"file",accept:".woff2,.woff,.ttf,.otf",onChange:a,style:{display:"none"}})]}),i&&n.jsxs(f.Box,{sx:{mt:.9,display:"flex",alignItems:"center",gap:.9,bgcolor:"error.main",borderRadius:2,px:1.4,py:.9,color:"error.contrastText"},children:[n.jsx(f.Box,{component:"span",sx:{fontWeight:900,fontSize:12},children:"✕"}),n.jsx(f.Box,{component:"span",sx:{fontSize:11.5},children:i})]}),r&&!i&&n.jsxs(f.Box,{sx:{mt:.9,display:"flex",alignItems:"center",gap:.9,bgcolor:"success.main",borderRadius:2,px:1.4,py:.9,color:"success.contrastText"},children:[n.jsx(f.Box,{component:"span",sx:{fontWeight:900,fontSize:12},children:"✓"}),n.jsxs(f.Box,{component:"span",sx:{fontSize:11.5},children:["Loaded: ",n.jsx("b",{children:r})]})]})]})}const As={compact:1.15,default:1.25,airy:1.414};function Is(){const e=N(u=>u.settings),r=N(u=>u.set),t=Re(e.mode),[o,i]=U.useState(!1),s=e.scaleRatioCustom>0?e.scaleRatioCustom:As[e.scaleRatio]??1.25,[a,l]=U.useState(s.toFixed(2));U.useEffect(()=>{o||l(s.toFixed(2))},[s,o]);const c=()=>{const u=parseFloat(a);isNaN(u)||r({scaleRatioCustom:u}),i(!1)};return o?n.jsx(f.InputBase,{autoFocus:!0,value:a,onChange:u=>l(u.target.value),onBlur:c,onKeyDown:u=>{u.key==="Enter"&&c(),u.key==="Escape"&&i(!1)},sx:{width:56,fontSize:"11.5px",fontWeight:700,border:"1.5px solid",borderColor:"primary.main",borderRadius:"6px",px:"6px",py:"3px","& input":{p:0,textAlign:"center"}}}):n.jsx(f.Box,{component:"button",title:"Configure scale ratio — each heading is the one above ÷ this value",onClick:()=>{l(s.toFixed(2)),i(!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","&: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 Os(){const[e,r]=U.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(f.Box,{sx:{p:"12px 2px 2px"},children:[e==="bodyFont"&&n.jsxs(n.Fragment,{children:[n.jsxs(f.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:"10px"},children:[Es.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.customFont&&n.jsx(Et,{label:t.customFont,sub:"Custom",fam:t.customFont,active:t.fontFamily===t.customFont,onClick:()=>o({fontFamily:t.customFont})})]}),n.jsx(gn,{label:"Upload custom font",current:t.customFont,onLoad:i=>o({customFont:i,fontFamily:i})})]}),e==="headFont"&&n.jsxs(n.Fragment,{children:[n.jsxs(f.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:"10px"},children:[Hs.map(i=>n.jsx(Et,{label:i.label,fam:i.key,active:t.headingFont===i.key,onClick:()=>o({headingFont:i.key})},i.key)),t.customHeadFont&&n.jsx(Et,{label:t.customHeadFont,sub:"Custom",fam:t.customHeadFont,active:t.headingFont===t.customHeadFont,onClick:()=>o({headingFont:t.customHeadFont})})]}),n.jsx(gn,{label:"Upload heading font",current:t.customHeadFont,onLoad:i=>o({customHeadFont:i,headingFont:i})})]}),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(Is,{}),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 Ce({options:e,value:r,columns:t=3,onChange:o}){const i=N(k=>k.settings.mode),s=N(k=>k.settings.primaryHex)||"#1565c0",a=N(k=>k.settings.highlightHex)||"#ffd400",l=N(k=>k.settings.bodyWeight)||400,c=i==="dark",u=ve(s),h=Math.min(900,l+200),x=de(a,c?.3:.18),m=c?u[400]:s,g=c?u[200]:u[700],y=c?"#262b34":"#ffffff",p=c?"#363d48":"#e3e8ee",b=c?"#aeb6c0":"#5a6573";return n.jsx(f.Box,{sx:{display:"grid",gridTemplateColumns:`repeat(${t}, 1fr)`,gap:"6px"},children:e.map(k=>{const P=k.key===r,$=n.jsx(f.Box,{onClick:()=>o(k.key),sx:{py:"9px",px:"4px",borderRadius:"10px",textAlign:"center",cursor:"pointer",userSelect:"none",fontSize:"11px",fontWeight:P?h:l,border:`1px solid ${P?m:p}`,bgcolor:P?x:y,color:P?g:b,transition:"color .14s ease, background .14s ease, border-color .14s ease","&:hover":P?{}:{borderColor:c?"#4a5361":"#c9d0d9"}},children:k.label},k.key);return k.info?n.jsx(f.Tooltip,{title:k.info,arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:$},k.key):$})})}const Ht={outlined:0,soft:6,floating:24},Ds={plain:0,tinted:40,accent:60},Ms={bordered:0,recessed:6,lighter:4};function Fs(){const[e,r]=U.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:Ds[t.cardHeader]??45,a=t.nestedDepth>=0?t.nestedDepth:Ms[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(f.Box,{sx:{p:"12px 2px 2px"},children:[e==="style"&&n.jsxs(n.Fragment,{children:[n.jsx(Ce,{value:t.cardStyle,onChange:c=>{const u=c;o({cardStyle:u,cardShadowPx:Ht[u]})},options:[{key:"outlined",label:"Outlined"},{key:"soft",label:"Soft"},{key:"floating",label:"Floating"}]}),n.jsx(f.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(Ce,{value:t.cardHeader,onChange:c=>o({cardHeader:c}),options:[{key:"plain",label:"Plain"},{key:"tinted",label:"Tinted"},{key:"accent",label:"Accent"}]}),n.jsx(f.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}%)`,onChange:c=>o({headerStrength:c})})})]}),e==="nested"&&n.jsxs(n.Fragment,{children:[n.jsx(Ce,{value:t.nestedStyle,onChange:c=>o({nestedStyle:c}),options:[{key:"recessed",label:"Recessed"},{key:"lighter",label:"Lighter"},{key:"bordered",label:"Bordered"}]}),n.jsx(f.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(Ce,{value:t.surfaceTint,onChange:c=>o({surfaceTint:c}),options:[{key:"snow",label:"None"},{key:"neutral",label:"Low"},{key:"brand",label:"High"}]}),n.jsx(f.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 Ws(){const[e,r]=U.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(f.Box,{sx:{p:"12px 2px 2px"},children:[e==="rows"&&n.jsxs(n.Fragment,{children:[n.jsx(Ce,{value:t.tableDensity,onChange:i=>o({tableDensity:i}),options:[{key:"compact",label:"Compact"},{key:"default",label:"Default"},{key:"comfortable",label:"Comfortable"}]}),n.jsx(f.FormControlLabel,{sx:{mt:1},control:n.jsx(f.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(Ce,{value:t.tableColDensity,onChange:i=>o({tableColDensity:i}),options:[{key:"compact",label:"Compact"},{key:"default",label:"Default"},{key:"comfortable",label:"Comfortable"}]}),n.jsx(f.FormControlLabel,{sx:{mt:1},control:n.jsx(f.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(Ce,{value:t.tableCellAlignH,onChange:i=>o({tableCellAlignH:i}),options:[{key:"left",label:"Left"},{key:"center",label:"Center"},{key:"right",label:"Right"}]}),n.jsx(f.Box,{sx:{mt:1},children:n.jsx(Ce,{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(Ce,{value:t.tableHeaderStyle,onChange:i=>o({tableHeaderStyle:i}),options:[{key:"plain",label:"Plain"},{key:"tinted",label:"Tinted"},{key:"accent",label:"Accent"}]}),n.jsx(f.FormControlLabel,{sx:{mt:1},control:n.jsx(f.Switch,{checked:t.tableStripe,onChange:i=>o({tableStripe:i.target.checked})}),label:"Striped rows"})]})]})]})}const cr={compact:.82,default:1,comfortable:1.16};function zs(){const[e,r]=U.useState("shape"),t=N(c=>c.settings),o=N(c=>c.set),i=Re(t.mode),s=t.densityScale>0?t.densityScale:Math.round((cr[t.density]??1)*100),a=t.cardGapPx>0?t.cardGapPx:Math.round(16*(cr[t.density]??1)),l=t.containerPadPx>0?t.containerPadPx:Math.round(10*(cr[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(f.Box,{sx:{p:"12px 2px 2px"},children:[e==="shape"&&n.jsxs(n.Fragment,{children:[n.jsx(f.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2,textTransform:"uppercase",letterSpacing:".6px",display:"block",mb:.75},children:"Corner Radius"}),n.jsx(Ce,{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(f.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(f.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2,textTransform:"uppercase",letterSpacing:".6px",display:"block",mb:.75,mt:.5},children:"Density"}),n.jsx(Ce,{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(f.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(f.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mt:1},children:[n.jsx(f.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2},children:"Uppercase button labels"}),n.jsx(f.Switch,{size:"small",checked:t.btnCase==="upper",onChange:c=>o({btnCase:c.target.checked?"upper":"none"})})]}),n.jsxs(f.Box,{sx:{mt:1.25},children:[n.jsx(f.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2,textTransform:"uppercase",letterSpacing:".6px",display:"block",mb:.75},children:"Status Chips"}),n.jsx(Ce,{columns:2,value:t.statusBold?"bold":"soft",onChange:c=>o({statusBold:c==="bold"}),options:[{key:"soft",label:"Soft"},{key:"bold",label:"Bold"}]})]})]})]})]})}function _s(){const[e,r]=U.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(f.Box,{sx:{p:"12px 2px 2px"},children:[e==="placement"&&n.jsx(Ce,{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(f.FormControlLabel,{sx:{mt:.5},control:n.jsx(f.Switch,{checked:t.notifBadge,onChange:i=>o({notifBadge:i.target.checked})}),label:"Show unread badge"}),n.jsx(f.FormControlLabel,{sx:{mt:.5,display:"flex"},control:n.jsx(f.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 Ls({label:e,info:r,value:t,fallback:o,onChange:i,onReset:s}){const a=Re(N(h=>h.settings.mode)),[l,c]=U.useState(null),u=t||o;return n.jsxs(f.Box,{sx:{display:"flex",alignItems:"center",gap:1,py:.5},children:[n.jsx(f.Box,{onClick:h=>c(h.currentTarget),sx:{width:22,height:22,borderRadius:1.5,border:`1px solid ${a.insetBd}`,bgcolor:u,cursor:"pointer",flexShrink:0}}),n.jsxs(f.Typography,{variant:"caption",sx:{flex:1,color:a.body,display:"flex",alignItems:"center",gap:.5},children:[e,r&&n.jsx(f.Tooltip,{title:r,arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(f.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(f.Box,{component:"span",onClick:s,title:"Reset to theme default",sx:{fontSize:13,color:a.muted,cursor:"pointer"},children:"↺"}),n.jsx(f.Popover,{open:!!l,anchorEl:l,onClose:()=>c(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},children:n.jsx(f.Box,{sx:{p:1},children:n.jsx("input",{type:"color",value:u,onChange:h=>i(h.target.value),style:{width:160,height:40,border:"none",background:"none"}})})})]})}function Ns({src:e,aspect:r,onCancel:t,onConfirm:o}){const[i,s]=U.useState(1),[a,l]=U.useState({x:0,y:0}),c=U.useRef(null),u=U.useRef(null),h=U.useRef(null),x=U.useRef(null);U.useEffect(()=>{const y=b=>{x.current&&l({x:x.current.ox+(b.clientX-x.current.sx),y:x.current.oy+(b.clientY-x.current.sy)})},p=()=>{x.current=null};return document.addEventListener("pointermove",y),document.addEventListener("pointerup",p),()=>{document.removeEventListener("pointermove",y),document.removeEventListener("pointerup",p)}},[]);const m=y=>{y.preventDefault(),x.current={sx:y.clientX,sy:y.clientY,ox:a.x,oy:a.y}},g=()=>{const y=c.current,p=u.current,b=h.current;if(!y||!p){o(e);return}const k=(b||y).getBoundingClientRect(),P=1e3,$=Math.round(P*r),v=$/k.width,C=document.createElement("canvas");C.width=$,C.height=P;const R=C.getContext("2d");if(!R){o(e);return}const M=p.getBoundingClientRect(),I=(M.left-k.left)*v,J=(M.top-k.top)*v,q=M.width*v,G=M.height*v;try{R.drawImage(p,I,J,q,G),o(C.toDataURL("image/png"))}catch{o(e)}};return Ho.createPortal(n.jsx(f.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(f.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(f.Typography,{sx:{fontSize:14,fontWeight:800,mb:.5},children:"Adjust brand image"}),n.jsx(f.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(f.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:u,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(f.Box,{ref:h,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(f.Box,{sx:{display:"flex",alignItems:"center",gap:1,my:1.5},children:[n.jsx(f.Typography,{sx:{fontSize:12,fontWeight:700,color:"text.secondary"},children:"Zoom"}),n.jsx(f.Slider,{size:"small",min:.3,max:4,step:.02,value:i,onChange:(y,p)=>s(p)})]}),n.jsxs(f.Box,{sx:{display:"flex",gap:1},children:[n.jsx(f.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(f.Box,{component:"button",onClick:g,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 Vs(){const e=N(h=>h.settings),r=N(h=>h.set),t=Re(e.mode),[o,i]=U.useState(null),s=(h,x)=>{var y;const m=(y=h.target.files)==null?void 0:y[0];if(!m)return;const g=new FileReader;g.onload=()=>i({src:g.result,aspect:x==="logoUrl"?3.5:1.55,target:x}),g.readAsDataURL(m),h.target.value=""},a=h=>{o&&(o.target==="logoUrl"?r({logoUrl:h,logoMode:"image"}):r({loginImage:h}),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},u=(h,x)=>n.jsxs(f.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(f.Typography,{variant:"caption",sx:{flex:1,minWidth:0,color:t.body,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h}),n.jsx(f.Box,{component:"button",onClick:x,title:"Remove",sx:{border:"none",background:"transparent",color:t.muted,cursor:"pointer",fontSize:14},children:"✕"})]});return n.jsxs(f.Box,{sx:{display:"flex",flexDirection:"column",gap:1.75},children:[n.jsxs(f.Box,{children:[n.jsx(f.Typography,{variant:"caption",sx:{...l,color:t.label2,display:"block",mb:1},children:"Brand Image"}),n.jsxs(f.Box,{component:"label",sx:c,children:["⬆ Choose image",n.jsx("input",{hidden:!0,type:"file",accept:"image/*",onChange:h=>s(h,"loginImage")})]}),e.loginImage&&u("Uploaded image",()=>r({loginImage:""}))]}),n.jsxs(f.Box,{children:[n.jsx(f.Typography,{variant:"caption",sx:{...l,color:t.label2,display:"block",mb:1},children:"Logo"}),n.jsxs(f.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:h=>s(h,"logoUrl")})]}),e.logoMode==="image"&&e.logoUrl&&u("Uploaded logo",()=>r({logoUrl:"",logoMode:"icon"}))]}),n.jsxs(f.Box,{children:[n.jsx(f.Typography,{variant:"caption",sx:{...l,color:t.label2,display:"block",mb:.5},children:"Panel Colour"}),n.jsx(Ls,{label:"Login panel background",value:e.loginPanelColor,fallback:e.primaryHex,onChange:h=>r({loginPanelColor:h}),onReset:()=>r({loginPanelColor:""})})]}),o&&n.jsx(Ns,{src:o.src,aspect:o.aspect,onCancel:()=>i(null),onConfirm:a})]})}const Us=[{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"}],Gs=[{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=zn(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 Ys({onClose:e}){var Y,T;const r=Ke(S=>S.openSection),t=Ke(S=>S.setOpenSection),o=Ke(S=>S.setPreviewScreen),i=Ke(S=>S.previewScreen),s=Ke(S=>S.previewMenuOpen),a=Ke(S=>S.setPreviewMenuOpen),l=N(S=>S.settings),c=N(S=>S.savedThemes),u=N(S=>S.set),h=N(S=>S.reset),x=Re(l.mode),m=U.useRef("theme"),g=(S,L)=>{const j=r!==S;t(j?S:""),a(!1),j&&m.current!==S&&(o(L),m.current=S)},y=((Y=yr.find(S=>S.id===l.presetId))==null?void 0:Y.name)||((T=c.find(S=>S.id===l.presetId))==null?void 0:T.name)||"Custom Theme",p={fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},b=({children:S})=>n.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",...p,children:S}),k=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"})]}),P=n.jsxs(f.Box,{sx:{display:"flex",gap:"2px",width:14,height:14},children:[n.jsx(f.Box,{sx:{flex:1,background:l.secondaryHex,borderRadius:"2px"}}),n.jsx(f.Box,{sx:{flex:1,background:l.errorHex,borderRadius:"2px"}}),n.jsx(f.Box,{sx:{flex:1,background:l.successHex,borderRadius:"2px"}})]}),$=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"})]}),v=n.jsxs(b,{children:[n.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),n.jsx("path",{d:"M3 9h18"})]}),C=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"})]}),R=n.jsx(b,{children:n.jsx("rect",{x:"4",y:"4",width:"16",height:"16",rx:"4"})}),M=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(f.Box,{sx:{position:"absolute",top:"6px",right:"6px",width:7,height:7,borderRadius:"50%",background:l.primaryHex,border:`1.5px solid ${x.iconTile}`}})]}),I=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"})]}),J=l.mode==="dark",q=S=>S.charAt(0).toUpperCase()+S.slice(1),G={sm:"Small",df:"Default",lg:"Large"},d={sharp:"Sharp",rounded:"Rounded",round:"Round"},E={compact:"Compact",default:"Default",comfortable:"Comfortable"},B={flat:"Flat",outlined:"Outlined",soft:"Soft",raised:"Raised",elevated:"Elevated",floating:"Floating"},D={split:"Split Brand",centered:"Centered Card"},z={"top-center":"Top Center","top-right":"Top Right","bottom-left":"Bottom Left","bottom-right":"Bottom Right"},V={theme:`${y} · ${J?"Dark":"Light"}`,color:"Secondary & status colours",type:`${l.fontFamily} · ${G[l.textSize]??"Default"}`,cards:"Card style, header, nesting & surface tint",tables:"Table row density, dividers, striping & header style — previewed on the Orders screen",shape:`${d[l.radiusPreset]??"Custom"} · ${E[l.density]??"Default"} · ${B[l.cardStyle]??""}`,notif:`${z[l.notifPosition]??""} · ${q(l.notifStyle)}`,login:`${D[l.loginLayout]??""}${l.loginImage?" · image":""}`},K=[{id:"theme",title:"Theme Settings",info:"Presets, saved themes & light/dark mode.",icon:k,screen:"dashboard",body:n.jsx(ws,{})},{id:"color",title:"Colour Settings",info:"Brand, text & status colours.",icon:P,screen:"components",body:n.jsx(Rs,{})},{id:"type",title:"Typography",info:"Fonts, sizes, weight & line-height.",icon:$,screen:"components",body:n.jsx(Os,{})},{id:"cards",title:"Cards",info:"Card style, header, nesting & tint.",icon:v,screen:"dashboard",body:n.jsx(Fs,{})},{id:"tables",title:"Tables",info:"Row/column density, dividers & alignment.",icon:C,screen:"orders",body:n.jsx(Ws,{})},{id:"shape",title:"Surface & Shape",info:"Radius, density, elevation & spacing.",icon:R,screen:"dashboard",body:n.jsx(zs,{})},{id:"notif",title:"Notifications",info:"Toast placement & behaviour.",icon:M,screen:"operations",body:n.jsx(_s,{})},{id:"login",title:"Login Screen",info:"Brand image, logo & panel colour.",icon:I,screen:"login",body:n.jsx(Vs,{})}];return n.jsxs(f.Box,{sx:{display:"flex",flexDirection:"column",bgcolor:x.card},children:[n.jsxs(f.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.1,borderBottom:`1px solid ${x.divider}`,bgcolor:x.card},children:[n.jsxs(f.Box,{sx:{display:"flex",gap:.5,flexShrink:0},children:[n.jsx(f.Box,{sx:{width:13,height:13,borderRadius:"3px",bgcolor:l.primaryHex}}),n.jsx(f.Box,{sx:{width:13,height:13,borderRadius:"3px",bgcolor:l.secondaryHex}})]}),n.jsx(f.Typography,{variant:"caption",sx:{flex:1,minWidth:0,fontWeight:800,color:x.text,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y}),n.jsx(f.Tooltip,{title:"Reset to defaults",arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(f.IconButton,{size:"small",onClick:h,sx:{bgcolor:"action.selected"},children:n.jsx(us,{sx:{fontSize:16}})})}),n.jsx(f.Tooltip,{title:l.mode==="dark"?"Switch to light":"Switch to dark",arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(f.IconButton,{size:"small",onClick:()=>u({mode:l.mode==="dark"?"light":"dark"}),sx:{bgcolor:"action.selected"},children:l.mode==="dark"?n.jsx(hs,{sx:{fontSize:16}}):n.jsx(fs,{sx:{fontSize:16}})})}),e&&n.jsx(f.Tooltip,{title:"Close studio",arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(f.IconButton,{size:"small",onClick:e,sx:{bgcolor:"action.selected"},children:n.jsx(gs,{sx:{fontSize:16}})})})]}),s&&n.jsxs(f.Box,{sx:{borderBottom:"1px solid",borderColor:"divider",borderLeft:"3px solid #eab308",bgcolor:S=>S.palette.mode==="dark"?"rgba(234,179,8,0.14)":"#fef9c3",px:1.6,py:1.5},children:[n.jsx(f.Typography,{sx:{fontSize:10,fontWeight:800,textTransform:"uppercase",letterSpacing:".6px",color:S=>S.palette.mode==="dark"?"#f2cd5c":"#854d0e",mb:1},children:"Previewing Screen"}),n.jsx(f.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:.75},children:Gs.map(S=>{const L=i===S.key;return n.jsx(f.Box,{component:"button",onClick:()=>{i!==S.key&&o(S.key),a(!1)},sx:{px:.75,py:1,borderRadius:2,cursor:"pointer",fontSize:11,fontWeight:L?800:600,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",border:"1.5px solid",borderColor:L?"#d4a915":"#e6dca8",bgcolor:L?"#fde68a":"background.paper",color:L?"#713f12":"text.secondary"},children:S.label},S.key)})})]}),K.map(S=>n.jsx(js,{icon:S.icon,title:S.title,info:V[S.id]??S.info,open:r===S.id,dimmed:r!==""&&r!==S.id,onToggle:()=>g(S.id,S.screen),onPreviewMenu:()=>a(!s),children:S.body},S.id))]})}const Js=ct(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 Tr(e,r,t){const o=U.useRef(null),[i,s]=U.useState(e);return U.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 g=0;for(const b of Array.from(a.children))g+=b.offsetHeight;const y=g/x,p=a.clientHeight;p<=0||y<=0||s(Math.max(r,Math.min(t,Math.floor((p+m)/(y+m)))))};l();const c=requestAnimationFrame(l),u=setTimeout(l,300),h=new ResizeObserver(l);return h.observe(a),()=>{cancelAnimationFrame(c),clearTimeout(u),h.disconnect()}},[r,t]),[o,i]}function _n(e,r,t){const o=U.useRef(null),i=U.useRef(null),[s,a]=U.useState(e);return U.useLayoutEffect(()=>{const l=i.current;if(!l)return;const c=()=>{var p;const m=Array.from(l.children).filter(b=>getComputedStyle(b).position!=="absolute"),g=m.length?m[0].offsetHeight:((p=o.current)==null?void 0:p.offsetHeight)||36,y=l.clientHeight;y<=0||g<=0||a(Math.max(r,Math.min(t,Math.floor(y/g))))};c();const u=requestAnimationFrame(c),h=setTimeout(c,300),x=new ResizeObserver(c);return x.observe(l),()=>{cancelAnimationFrame(u),clearTimeout(h),x.disconnect()}},[r,t]),[o,i,s]}const qs=["Jan","Feb","Mar","Apr","May","Jun"],Ks=[44,60,50,74,88,96],Xs=[24,32,30,42,52,60];function Qs(){const e=Te(),r=N(A=>A.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:c,tH1:u,tH2:h,tTitle:x,tH4:m,wH1:g,headFam:y,headLH:p,accentBg:b,btnText:k,tBodySm:P,bwEmph:$,btnCase:v,bodyWeightEff:C,bodyLH:R,tCaption:M,pMain:I,sMain:J}=e,q=y+",sans-serif",G=r.fontFamily+",sans-serif",d=e.hc1||t.textPrimary,E=e.hc2||t.textPrimary,B=e.hc3||t.textPrimary,D=[{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(A=>({...A,cc:A.up?e.sucTxt:e.errTxt,cb:A.up?e.sucSoft:e.errSoft,arrow:A.up?"▲":"▼"})),z=A=>A==="✓"?{cb:e.sucSoft,cc:e.sucTxt}:A==="!"?{cb:e.warnSoft,cc:e.warnTxt}:A==="+"?{cb:e.infoSoft,cc:e.infoTxt}:{cb:t.pContainer,cc:e.isDark?t.pLight:t.pDark},V=[{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(A=>({...A,...z(A.ic)})),[K,Y]=Tr(5,4,V.length),T=V.slice(0,Y),S=e.cardBorder==="none"?"none":e.cardBorder,L={background:t.paper,border:S,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"},O={fontSize:x,lineHeight:p,fontWeight:g,color:B,fontFamily:q};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:S,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:G,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:u,lineHeight:p,fontWeight:g,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:$,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:b,color:k,fontSize:P,fontWeight:$,textTransform:v,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:{...L,marginBottom:l},children:[n.jsxs("div",{style:j,children:[n.jsx("span",{style:{...O},children:"Performance Overview"}),n.jsx("span",{style:{fontSize:M,color:t.textSecondary,fontWeight:$},children:"This month"})]}),n.jsx("div",{style:{padding:s,display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:l},children:D.map(A=>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:g,fontFamily:q,textTransform:"uppercase",letterSpacing:".6px",marginBottom:8},children:A.label}),n.jsx("div",{style:{fontSize:h,fontWeight:g,color:E,letterSpacing:"-.8px",lineHeight:1,marginBottom:6},children:A.val}),n.jsxs("span",{style:{fontSize:M,fontWeight:$,color:A.cc,background:A.cb,padding:"3px 9px",borderRadius:999},children:[A.arrow," ",A.chg]})]},A.label))})]}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 300px",gap:l,flex:1,minHeight:0},children:[n.jsxs("div",{style:{...L,display:"flex",flexDirection:"column",minHeight:0},children:[n.jsxs("div",{style:j,children:[n.jsx("span",{style:O,children:"Revenue Trend"}),n.jsx("div",{style:{display:"flex",gap:12},children:[["Revenue",I],["Profit",J]].map(([A,_])=>n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5},children:[n.jsx("div",{style:{width:10,height:10,borderRadius:2,background:_}}),n.jsx("span",{style:{fontSize:M,color:t.textSecondary},children:A})]},A))})]}),n.jsx("div",{style:{padding:`${a}px ${s}px`,display:"flex",alignItems:"flex-end",gap:12,flex:1,minHeight:200},children:qs.map((A,_)=>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:Xs[_]+"%",background:J,opacity:.55,borderRadius:`${i} ${i} 0 0`}}),n.jsx("div",{style:{width:"100%",height:Ks[_]+"%",background:I,borderRadius:`${i} ${i} 0 0`}})]}),n.jsx("span",{style:{fontSize:M,color:t.textSecondary},children:A})]},A))})]}),n.jsxs("div",{style:{...L,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:O,children:"Recent Activity"})}),n.jsx("div",{ref:K,style:{padding:a,display:"flex",flexDirection:"column",justifyContent:"space-between",gap:4,flex:1,minHeight:0},children:T.map((A,_)=>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:A.cb,color:A.cc,display:"grid",placeItems:"center",flexShrink:0,fontSize:13,fontWeight:$},children:A.ic}),n.jsxs("div",{style:{flex:1,minWidth:0},children:[n.jsx("div",{style:{fontSize:P,color:t.textPrimary,fontFamily:G,fontWeight:C,lineHeight:R,marginBottom:2},children:A.title}),n.jsx("div",{style:{fontSize:M,color:t.textSecondary,fontFamily:G},children:A.time})]})]},_))})]})]})]})]})}const Zs=[{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"}],pr="100px 1fr 120px 100px 80px 70px";function el(){const e=Te(),r=N(Y=>Y.settings),{t,rad:o,radSm:i,pad:s,padSm:a,screenPad:l,rowPy:c,tH1:u,wH1:h,headFam:x,headLH:m,accentBg:g,btnText:y,btnShadow:p,tBody:b,tBodySm:k,tCaption:P,tOverline:$,bwEmph:v,btnCase:C,bodyWeightEff:R,pMain:M,table:I}=e,J=x+",sans-serif",q=r.fontFamily+",sans-serif",G=e.hc1||t.textPrimary,[d,E,B]=_n(12,3,16),D=Zs.slice(0,B).map((Y,T)=>({...Y,...I.statusMap[Y.status]||{sb:t.divider,sc:t.textSecondary},rowBg:r.tableStripe&&T%2===1?I.stripeBg:"transparent"})),z=e.cardBorder==="none"?"none":e.cardBorder,V=Y=>({fontSize:$,fontWeight:v,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".5px",borderRight:I.colBorder,alignSelf:"stretch",display:"flex",alignItems:I.cellAI,justifyContent:I.cellJC,padding:`${I.rowPy} ${I.cellPx}`}),K={alignSelf:"stretch",display:"flex",alignItems:I.cellAI,justifyContent:I.cellJC,padding:`${I.rowPy} ${I.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:R,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:u,lineHeight:m,fontWeight:h,color:G,letterSpacing:"-.3px",fontFamily:J},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:v,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:g,color:y,fontSize:k,fontWeight:v,textTransform:C,letterSpacing:".4px",boxShadow:p,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:k,color:t.textSecondary},children:"Search orders…"})]}),I.filters.map(Y=>n.jsx("button",{style:{padding:"7px 14px",borderRadius:999,border:"1px solid "+Y.brd,background:Y.bg,color:Y.c,fontSize:P,fontWeight:v,whiteSpace:"nowrap",cursor:"pointer"},children:Y.label},Y.label))]}),n.jsxs("div",{ref:d,style:{display:"grid",gridTemplateColumns:pr,padding:`0 ${s}px`,borderBottom:I.rowBorder,background:I.headBg},children:[["Order ID","Customer","Status","Amount","Date"].map(Y=>n.jsx("div",{style:V(),children:Y},Y)),n.jsx("div",{style:{alignSelf:"stretch",padding:`${I.rowPy} 0`}})]}),n.jsxs("div",{ref:E,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:pr,pointerEvents:"none",zIndex:2},children:[n.jsx("div",{style:{borderRight:I.colBorder}}),n.jsx("div",{style:{borderRight:I.colBorder}}),n.jsx("div",{style:{borderRight:I.colBorder}}),n.jsx("div",{style:{borderRight:I.colBorder}}),n.jsx("div",{style:{borderRight:I.colBorder}}),n.jsx("div",{})]}),D.map(Y=>n.jsxs("div",{style:{display:"grid",gridTemplateColumns:pr,padding:`0 ${s}px`,borderBottom:I.rowBorder,alignItems:"stretch",background:Y.rowBg},children:[n.jsx("div",{style:{...K,fontSize:k,fontWeight:v,color:M,fontFamily:q},children:Y.id}),n.jsx("div",{style:{...K,fontSize:b,color:t.textPrimary,fontWeight:v},children:Y.cust}),n.jsx("div",{style:K,children:n.jsx("span",{style:{padding:"4px 11px",borderRadius:999,fontSize:P,fontWeight:v,background:Y.sb,color:Y.sc,whiteSpace:"nowrap"},children:Y.status})}),n.jsx("div",{style:{...K,fontSize:b,color:t.textPrimary,fontWeight:v},children:Y.amt}),n.jsx("div",{style:{...K,fontSize:k,color:t.textSecondary},children:Y.date}),n.jsx("div",{style:K,children:n.jsx("button",{style:{fontSize:P,color:M,background:t.pContainer,border:"none",fontWeight:v,padding:"5px 11px",borderRadius:i,cursor:"pointer"},children:"View"})})]},Y.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:k,color:t.textSecondary,flex:1},children:["Showing 1–",D.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:g,color:y,fontWeight:v,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 tl(){const e=Te(),r=N(Z=>Z.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:c,tH1:u,tH2:h,tTitle:x,tH4:m,tH5:g,tH6:y,tBody:p,tBodySm:b,tCaption:k,wH1:P,headFam:$,headLH:v,accentBg:C,btnText:R,btnShadow:M,bwEmph:I,btnCase:J,bodyWeightEff:q,bodyLH:G,pMain:d,errSoft:E,errTxt:B,warnSoft:D,warnTxt:z,infoSoft:V,infoTxt:K,sucSoft:Y,sucTxt:T}=e,S=$+",sans-serif",L=r.fontFamily+",sans-serif",j=e.t.highlight,O=e.t.highlightSoft,A=e.t.highlightBd,_=t.pContainer,W=t.onPContainer,H=t.pContrast,X=e.hc1||t.textPrimary,Q=e.hc2||t.textPrimary,fe=e.hc3||t.textPrimary,F=e.hc4||t.textPrimary,he=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:v,fontWeight:P,color:fe,fontFamily:S},qt=[{label:"Dashboard Overview",size:u,w:P,color:X,lh:1.1,ls:"-.5px",name:"H1",border:!0},{label:"Revenue Report",size:h,w:P,color:Q,lh:1.1,ls:"-.4px",name:"H2",border:!0},{label:"Performance Overview",size:x,w:P,color:fe,lh:1.15,name:"H3",border:!0},{label:"Active Users",size:m,w:P,color:F,lh:1.2,name:"H4",border:!0},{label:"Last updated 2m ago",size:g,w:P,color:he,lh:1.25,name:"H5",border:!0},{label:"Status · Live",size:y,w:P,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?O:"transparent",boxShadow:Z?"inset 3px 0 0 "+j:"none"},children:[n.jsx("div",{style:{width:16,height:16,borderRadius:"50%",border:"2px solid "+(Z?j:t.outline),display:"grid",placeItems:"center",flexShrink:0},children:Z&&n.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:j}})}),n.jsx("span",{style:{flex:1,fontSize:b,fontFamily:L,fontWeight:Z?I:q,color:t.textPrimary},children:Z?"Selected item":"Unselected item"}),Z&&n.jsx("span",{style:{fontSize:k,fontFamily:L,fontWeight:I,color:t.textSecondary},children:"Active"})]}),St=(Z,pt,ut)=>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:k,color:Z?d:t.textSecondary,fontWeight:Z?I:void 0},children:pt}),n.jsx("span",{style:{fontSize:p,color:Z?t.textPrimary:t.textSecondary},children:ut})]}),Ge=(Z,pt,ut)=>n.jsx("span",{style:{padding:"5px 13px",borderRadius:999,background:Z,color:pt,fontSize:k,fontWeight:I},children:ut}),Fe=Z=>({padding:"9px 20px",borderRadius:i,fontSize:b,fontWeight:I,textTransform:J,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:L,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:u,lineHeight:v,fontWeight:P,color:X,letterSpacing:"-.3px",fontFamily:S},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:I,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:[qt.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:S,letterSpacing:Z.ls},children:Z.label}),n.jsxs("span",{style:{fontSize:Z.size,color:t.textSecondary,fontWeight:Z.w,whiteSpace:"nowrap",flexShrink:0,fontFamily:S},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:p,lineHeight:G,color:t.textPrimary,fontFamily:L,fontWeight:q},children:"Body text — the quick brown fox jumps over the lazy dog."}),n.jsxs("span",{style:{fontSize:p,color:t.textSecondary,fontWeight:q,whiteSpace:"nowrap",flexShrink:0,fontFamily:L},children:["Body · ",p]})]}),n.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12},children:[n.jsx("span",{style:{fontSize:k,lineHeight:G,color:t.textSecondary,fontFamily:L,fontWeight:q},children:"Caption & helper text style"}),n.jsxs("span",{style:{fontSize:k,color:t.textSecondary,fontWeight:q,whiteSpace:"nowrap",flexShrink:0,fontFamily:L},children:["Caption · ",k]})]})]})]}),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:b,fontWeight:I,color:t.textPrimary,background:O,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:b,fontWeight:I,color:t.textSecondary},children:"Activity"}),n.jsx("div",{style:{flex:1,textAlign:"center",padding:"8px 4px",fontSize:b,fontWeight:I,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:O,border:"1px solid "+A},children:n.jsx("span",{style:{fontSize:k,fontWeight:I,color:j},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:H,fontSize:11,fontWeight:I},children:"✓"}),n.jsx("span",{style:{fontSize:b,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:b,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:b,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:R,boxShadow:M}),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:_,color:W}),children:"Tonal"}),n.jsx("button",{style:Fe({border:"none",background:C,color:R,boxShadow:M,borderRadius:999}),children:"Rounded"}),n.jsx("button",{style:Fe({border:"none",background:E,color:B}),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(_,W,"Primary"),Ge(Y,T,"Success"),Ge(D,z,"Warning"),Ge(V,K,"Info"),Ge(E,B,"Error")]}),n.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:7},children:[n.jsx("span",{style:{fontSize:b,color:t.textPrimary,fontWeight:I},children:"Revenue goal"}),n.jsx("span",{style:{fontSize:b,color:d,fontWeight:I},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 rl=[{label:"Cameras Online",val:"5 / 6"},{label:"Recording",val:"4"},{label:"Motion Alerts",val:"2"},{label:"Storage Used",val:"82%"}],nl=[{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"}],ol=[{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 il(){const e=Te(),r=N(H=>H.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:c,tH1:u,tH2:h,tTitle:x,wH1:m,headFam:g,headLH:y,accentBg:p,btnText:b,btnShadow:k,tBodySm:P,tCaption:$,tOverline:v,bwEmph:C,btnCase:R,bodyWeightEff:M,errSoft:I,errTxt:J,mediaBg:q,overlaySurface:G,overlayBorder:d,onOverlay:E,sevMap:B}=e,D=g+",sans-serif",z=r.fontFamily+",sans-serif",V=e.hc1||t.textPrimary,K=e.hc2||t.textPrimary,Y=e.hc3||t.textPrimary,T=e.cardBorder==="none"?"none":e.cardBorder,S=nl.map(H=>({...H,dotC:H.online?r.successHex:t.textDisabled})),[L,j]=Tr(3,3,16),O=ol.slice(0,j).map(H=>({...H,...B[H.sev]})),A={background:t.paper,border:T,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden"},_={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between"},W={fontSize:x,lineHeight:y,fontWeight:m,color:Y,fontFamily:D};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:T,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:z,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:u,lineHeight:y,fontWeight:m,color:V,letterSpacing:"-.3px",fontFamily:D},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:$,fontWeight:C,color:J,background:I,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:p,color:b,fontSize:P,fontWeight:C,textTransform:R,letterSpacing:".4px",boxShadow:k,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:rl.map(H=>n.jsxs("div",{style:A,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:v,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".6px",fontWeight:C},children:H.label})}),n.jsx("div",{style:{padding:`${a}px ${s}px`},children:n.jsx("div",{style:{fontSize:h,fontWeight:m,color:K,letterSpacing:"-.8px",lineHeight:1},children:H.val})})]},H.label))}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 300px",gap:l,flex:1,minHeight:0},children:[n.jsxs("div",{style:{...A,display:"flex",flexDirection:"column"},children:[n.jsxs("div",{style:_,children:[n.jsx("span",{style:W,children:"Camera Wall"}),n.jsx("span",{style:{fontSize:$,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:S.map(H=>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:$,color:"rgba(255,255,255,.3)",letterSpacing:1},children:H.loc})}),n.jsxs("div",{style:{position:"absolute",top:7,left:7,display:"flex",alignItems:"center",gap:5,background:G,border:"1px solid "+d,borderRadius:999,padding:"2px 8px"},children:[n.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:H.dotC}}),n.jsx("span",{style:{color:E,fontSize:$,fontWeight:700,letterSpacing:".4px"},children:H.name})]}),H.rec&&n.jsxs("div",{style:{position:"absolute",top:7,right:7,display:"flex",alignItems:"center",gap:4,background:G,borderRadius:999,padding:"2px 7px"},children:[n.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:r.errorHex}}),n.jsx("span",{style:{color:E,fontSize:8,fontWeight:800,letterSpacing:".5px"},children:"REC"})]}),H.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:$,fontWeight:600,fontFamily:"monospace"},children:H.time})})]},H.name))})]}),n.jsxs("div",{style:{...A,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:W,children:"Recent Detections"})}),n.jsx("div",{ref:L,style:{padding:a,display:"flex",flexDirection:"column",justifyContent:"space-between",gap:2,flex:1,minHeight:0},children:O.map((H,X)=>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:H.cb,color:H.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:P,color:t.textPrimary,fontWeight:M,lineHeight:1.35},children:H.label}),n.jsxs("div",{style:{fontSize:$,color:t.textSecondary,marginTop:2},children:[H.cam," · ",H.time]})]})]},X))})]})]})]})]})}const al=[{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 sl(){const e=Te(),r=N(W=>W.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:c,tH1:u,tTitle:h,wH1:x,headFam:m,headLH:g,accentBg:y,btnText:p,tBodySm:b,tCaption:k,tOverline:P,bwEmph:$,bodyWeightEff:v,bodyLH:C,errSoft:R,errTxt:M,pMain:I,mediaBg:J,overlaySurface:q,overlayBorder:G,onOverlay:d,sevMap:E}=e,B=m+",sans-serif",D=r.fontFamily+",sans-serif",z=e.hc1||t.textPrimary,V=e.hc3||t.textPrimary,K=e.cardBorder==="none"?"none":e.cardBorder,[Y,T]=Tr(7,4,16),S=al.slice(0,T).map(W=>({...W,...E[W.sev],rowBg:W.unread?de(r.primaryHex,e.isDark?.12:.05):"transparent"})),L=S.filter(W=>W.unread).length,j={display:"flex",flexDirection:"column",minHeight:0,background:t.paper,border:K,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden"},O={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between"},A={fontSize:h,lineHeight:g,fontWeight:x,color:V,fontFamily:B},_={height:30,borderRadius:i,border:"none",background:"rgba(255,255,255,.14)",color:d,fontSize:k,fontWeight:$,cursor:"pointer",fontFamily:"inherit"};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:K,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:D,fontWeight:v,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:u,lineHeight:g,fontWeight:x,color:z,letterSpacing:"-.3px",fontFamily:B},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:$,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:j,children:[n.jsxs("div",{style:O,children:[n.jsx("span",{style:A,children:"Live Map · Street View"}),n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:k,fontWeight:$,color:M,background:R,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:J,display:"flex",alignItems:"center",justifyContent:"center"},children:[n.jsx("span",{style:{fontFamily:"monospace",fontSize:k,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 "+G,borderRadius:999,padding:"6px 12px"},children:n.jsx("span",{style:{color:d,fontSize:k,fontWeight:$},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 "+G,borderRadius:i,padding:5},children:[n.jsx("button",{style:{width:30,height:30,borderRadius:i,border:"none",background:y,color:p,fontSize:16,fontWeight:$,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:$,cursor:"pointer"},children:"−"}),n.jsx("div",{style:{width:1,height:18,background:G,margin:"0 3px"}}),n.jsx("button",{style:{..._,padding:"0 12px"},children:"Layers"}),n.jsx("button",{style:{..._,padding:"0 12px"},children:"◎ Locate"})]})]})]}),n.jsxs("div",{style:j,children:[n.jsxs("div",{style:O,children:[n.jsx("span",{style:A,children:"Notifications"}),n.jsxs("span",{style:{fontSize:P,fontWeight:$,color:t.pContrast,background:I,padding:"2px 9px",borderRadius:999},children:[L," NEW"]})]}),n.jsx("div",{ref:Y,style:{padding:a,display:"flex",flexDirection:"column",gap:2,flex:1,minHeight:0},children:S.map((W,H)=>n.jsxs("div",{style:{display:"flex",gap:11,alignItems:"flex-start",padding:"9px 8px",borderRadius:i,background:W.rowBg},children:[n.jsx("div",{style:{width:26,height:26,borderRadius:i,background:W.cb,color:W.cc,display:"grid",placeItems:"center",flexShrink:0,fontSize:13,fontWeight:$},children:W.ic}),n.jsxs("div",{style:{flex:1,minWidth:0},children:[n.jsx("div",{style:{fontSize:b,color:t.textPrimary,fontWeight:v,lineHeight:C},children:W.label}),n.jsx("div",{style:{fontSize:k,color:t.textSecondary,marginTop:2},children:W.time})]}),W.unread&&n.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:I,flexShrink:0,marginTop:6}})]},H))})]})]})})]})}const ll=[{label:"Reports Generated",val:"248"},{label:"Avg Generation",val:"1.2s"},{label:"Data Points",val:"84.2K"},{label:"Scheduled",val:"12"}],dl=["Jan","Feb","Mar","Apr","May","Jun"],cl=[44,60,50,74,88,96],pl=[24,32,30,42,52,60],ul=[{l:"Reports",h:72},{l:"Cameras",h:92},{l:"Alerts",h:40},{l:"Users",h:58},{l:"Storage",h:80}],fl=[{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"}],xn="1fr 130px 110px 90px 70px";function hl(){const e=Te(),r=N(H=>H.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:c,rowPy:u,tH1:h,tH2:x,tTitle:m,wH1:g,headFam:y,headLH:p,accentBg:b,btnText:k,btnShadow:P,tBody:$,tBodySm:v,tCaption:C,tOverline:R,bwEmph:M,btnCase:I,bodyWeightEff:J,pMain:q,sMain:G,chartPalette:d}=e,E=y+",sans-serif",B=r.fontFamily+",sans-serif",D=e.hc1||t.textPrimary,z=e.hc2||t.textPrimary,V=e.hc3||t.textPrimary,K=e.cardBorder==="none"?"none":e.cardBorder,[Y,T,S]=_n(5,3,16),L=fl.slice(0,S).map(H=>({...H,sb:H.status==="Ready"?e.sucSoft:e.warnSoft,sc:H.status==="Ready"?e.sucTxt:e.warnTxt})),j=ul.map((H,X)=>({...H,c:d[X%d.length]})),O={background:t.paper,border:K,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"},_={fontSize:m,lineHeight:p,fontWeight:g,color:V,fontFamily:E},W={fontSize:R,fontWeight:M,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".5px"};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:K,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:B,fontWeight:J,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:h,lineHeight:p,fontWeight:g,color:D,letterSpacing:"-.3px",fontFamily:E},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:M,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:b,color:k,fontSize:v,fontWeight:M,textTransform:I,letterSpacing:".4px",boxShadow:P,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:ll.map(H=>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:R,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".6px",fontWeight:M},children:H.label})}),n.jsx("div",{style:{padding:`${a}px ${s}px`},children:n.jsx("div",{style:{fontSize:x,fontWeight:g,color:z,letterSpacing:"-.8px",lineHeight:1},children:H.val})})]},H.label))}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 300px",gap:l,marginBottom:l},children:[n.jsxs("div",{style:O,children:[n.jsxs("div",{style:A,children:[n.jsx("span",{style:_,children:"Revenue & Profit Trend"}),n.jsx("span",{style:{fontSize:C,color:t.textSecondary,fontWeight:M},children:"6 months"})]}),n.jsx("div",{style:{padding:s,display:"flex",alignItems:"flex-end",gap:12,height:160},children:dl.map((H,X)=>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:pl[X]+"%",background:G,opacity:.55,borderRadius:`${i} ${i} 0 0`}}),n.jsx("div",{style:{width:"100%",height:cl[X]+"%",background:q,borderRadius:`${i} ${i} 0 0`}})]}),n.jsx("span",{style:{fontSize:C,color:t.textSecondary},children:H})]},H))})]}),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:_,children:"By Module"})}),n.jsx("div",{style:{padding:s,display:"flex",alignItems:"flex-end",gap:10,height:128},children:j.map(H=>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:H.h+"%",background:H.c,borderRadius:`${i} ${i} 0 0`}})},H.l))})]})]}),n.jsxs("div",{style:{...O,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:_,children:"Recent Reports"})}),n.jsxs("div",{ref:Y,style:{display:"grid",gridTemplateColumns:xn,padding:`${u}px ${s}px`,borderBottom:"1px solid "+t.divider,background:t.paper2},children:[["Report","Type","Status","Date"].map(H=>n.jsx("div",{style:W,children:H},H)),n.jsx("div",{})]}),n.jsx("div",{ref:T,style:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:L.map(H=>n.jsxs("div",{style:{display:"grid",gridTemplateColumns:xn,padding:`${u}px ${s}px`,borderBottom:"1px solid "+t.divider,alignItems:"center"},children:[n.jsx("div",{style:{fontSize:$,color:t.textPrimary,fontWeight:M},children:H.name}),n.jsx("div",{style:{fontSize:v,color:t.textSecondary},children:H.type}),n.jsx("div",{children:n.jsx("span",{style:{padding:"4px 11px",borderRadius:999,fontSize:C,fontWeight:M,background:H.sb,color:H.sc,whiteSpace:"nowrap"},children:H.status})}),n.jsx("div",{style:{fontSize:v,color:t.textSecondary},children:H.date}),n.jsx("div",{children:n.jsx("button",{style:{fontSize:C,color:q,background:t.pContainer,border:"none",fontWeight:M,padding:"5px 11px",borderRadius:i,cursor:"pointer"},children:"↓ PDF"})})]},H.name))})]})]})]})}const mn=({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 gl(){const e=Te(),r=N(z=>z.settings),{t,rad:o,radSm:i,pad:s,tH1:a,tBody:l,tBodySm:c,tCaption:u,wH1:h,headLH:x,accentBg:m,btnText:g,btnShadow:y,bwEmph:p,pMain:b,iconInitials:k,hasLoginImage:P,loginCenteredGrad:$,loginScrimGradC:v}=e,C=r.fontFamily+",sans-serif",R=e.hc1||t.textPrimary,M=t.pContrast,I=e.cardBorder==="none"?"none":e.cardBorder,J=r.logoMode==="image"&&!!r.logoUrl,q=e.isDark?t.paper2:"#ffffff",G=r.loginPanelColor||t.bgDefault,d=r.loginImgOpacity>0?r.loginImgOpacity:1,E=P?n.jsx("img",{src:r.loginImage,alt:"",style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",zIndex:0,opacity:d}}):null,B={background:t.paper,border:I,borderRadius:o,boxShadow:e.cardShadow,padding:s,display:"flex",flexDirection:"column",gap:20},D=z=>({position:"relative",background:t.paper2,border:"1.5px solid "+(z?b:t.outline),borderRadius:i});return r.loginLayout==="centered"?n.jsxs("div",{style:{minHeight:560,background:$,display:"flex",alignItems:"center",justifyContent:"center",padding:40,position:"relative",overflow:"hidden",fontFamily:C,borderRadius:o},children:[E,P&&n.jsx("div",{style:{position:"absolute",inset:0,background:v,zIndex:0}}),n.jsxs("div",{style:{position:"relative",zIndex:1,width:"100%",maxWidth:380,background:t.paper,border:I,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:p,letterSpacing:"-1px"},children:k})}),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:g,fontSize:l,fontWeight:p,textTransform:"uppercase",letterSpacing:".5px",boxShadow:y,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:[E,!P&&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(mn,{size:46}),n.jsx("div",{style:{fontSize:14,fontWeight:p,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:G,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:22,padding:"48px 40px"},children:[J?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(mn,{size:20}),n.jsx("span",{style:{fontSize:u,fontWeight:p,color:t.textSecondary,whiteSpace:"nowrap"},children:"No logo uploaded"})]}),n.jsxs("div",{style:{width:"100%",maxWidth:340,...B},children:[n.jsxs("div",{style:{textAlign:"center"},children:[n.jsx("div",{style:{fontSize:a,lineHeight:x,fontWeight:h,color:R,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:u,fontWeight:p,color:t.textPrimary,marginBottom:7},children:"Email Address"}),n.jsxs("div",{style:{...D(!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:u,fontWeight:p,color:t.textPrimary,marginBottom:7},children:"Password"}),n.jsxs("div",{style:{...D(!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:b,display:"grid",placeItems:"center",color:M,fontSize:11,fontWeight:p},children:"✓"}),n.jsx("span",{style:{fontSize:c,color:t.textPrimary},children:"Remember me"})]}),n.jsx("span",{style:{fontSize:c,color:b,fontWeight:p},children:"Forgot password?"})]}),n.jsxs("button",{style:{padding:13,borderRadius:i,border:"none",background:m,color:g,fontSize:l,fontWeight:p,letterSpacing:".3px",boxShadow:y,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:u,color:t.textSecondary},children:["Powered by ",n.jsx("span",{style:{color:b,fontWeight:p},children:r.appName})," © 2026"]})]})]})]})}function xl(){const e=Te(),r=N(y=>y.settings),[t,o]=U.useState(!1);if(t)return null;const{t:i,npos:s,nacc:a,toastDeco:l,toastBg:c,rad:u,radSm:h,tBodySm:x,tCaption:m}=e,g=(r.toastW>0?r.toastW:252)+"px";return n.jsxs("div",{style:{position:"absolute",zIndex:40,width:g,maxWidth:"70%",boxSizing:"border-box",background:c,borderRadius:u,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:h,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:de(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 ml=[75,90,100,125];function yl(){var h;const e=Ke(x=>x.previewScreen),r=N(x=>x.settings.edgePadPx)||0,t=e==="operations"?0:r,[o,i]=U.useState("fit"),s=U.useRef(null),a=U.useRef(null),[l,c]=U.useState(100);U.useLayoutEffect(()=>{const x=s.current,m=a.current;if(!x||!m)return;const g=()=>{const P=getComputedStyle(x),$=(parseFloat(P.paddingTop)||0)+(parseFloat(P.paddingBottom)||0);if(o!=="fit"){const d=o/100;m.style.zoom=String(d);const E=x.clientHeight-$;m.style.minHeight=(E>0?Math.floor(E/d):0)+"px",c(o);return}m.style.zoom="1",m.style.minHeight="0px",m.offsetHeight;const v=(parseFloat(P.paddingLeft)||0)+(parseFloat(P.paddingRight)||0),C=x.clientWidth-v,R=x.clientHeight-$,M=m.scrollWidth,I=m.scrollHeight;if(M<=0||I<=0||C<=0||R<=0)return;const J=Math.min(C/M,R/I,1),q=J<.985?Math.max(.36,J):1;m.style.zoom=String(q);const G=Math.min(C/M,1);m.style.minHeight=Math.floor(R/Math.max(G,.36))+"px",c(Math.round(q*100))};let y=0,p=0;const b=()=>{g(),++p<36&&(y=requestAnimationFrame(b))};b();const k=new ResizeObserver(g);return k.observe(x),k.observe(m),()=>{cancelAnimationFrame(y),k.disconnect()}},[o,t,e]);const u=((h=Us.find(x=>x.key===e))==null?void 0:h.label)??"";return n.jsxs(f.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",bgcolor:"background.default"},children:[n.jsxs(f.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(Js,{sx:{fontSize:22,color:"text.secondary"}}),n.jsxs(f.Typography,{variant:"h5",sx:{flex:1,fontSize:18,fontWeight:700,letterSpacing:"-.2px"},children:["Previewing ",u]}),n.jsxs(f.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(f.MenuItem,{value:"fit",children:["Fit (",l,"%)"]}),ml.map(x=>n.jsxs(f.MenuItem,{value:x,children:[x,"%"]},x))]})]}),n.jsxs(f.Box,{ref:s,sx:{flex:1,overflow:"auto",p:`${t}px`,position:"relative",bgcolor:"background.default"},children:[n.jsxs(f.Box,{ref:a,sx:{width:"100%",display:"flex",flexDirection:"column","& > *":{flex:"1 1 0%",minHeight:0}},children:[e==="dashboard"&&n.jsx(Qs,{}),e==="orders"&&n.jsx(el,{}),e==="reports"&&n.jsx(hl,{}),e==="cameras"&&n.jsx(il,{}),e==="operations"&&n.jsx(sl,{}),e==="components"&&n.jsx(tl,{}),e==="login"&&n.jsx(gl,{})]}),e!=="login"&&n.jsx(xl,{})]})]})}const bl=300,vl=520;function Sl(){const[e,r]=U.useState(!0),[t,o]=U.useState(300),[i,s]=U.useState(!1),a=N(y=>y.isDirty),l=N(y=>y.captureBaseline),c=N(y=>y.restoreBaseline),u=Re(N(y=>y.settings.mode)),h=U.useRef(null),x=y=>{y.preventDefault(),h.current={x:y.clientX,w:t};const p=k=>{if(!h.current)return;const P=Math.max(bl,Math.min(vl,h.current.w+(k.clientX-h.current.x)));o(P)},b=()=>{h.current=null,window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",b)};window.addEventListener("mousemove",p),window.addEventListener("mouseup",b)},m=()=>{a()?s(!0):r(!1)},g=()=>{r(!0),l()};return n.jsxs(f.Box,{sx:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",bgcolor:"background.paper"},children:[n.jsx(f.Box,{sx:{flex:1,minHeight:0,display:"flex"},children:n.jsxs(f.Box,{sx:{flex:1,minWidth:0,display:"flex",bgcolor:"background.default",borderTop:"1px solid",borderColor:"divider"},children:[e?n.jsxs(f.Box,{sx:{display:"flex",flexShrink:0},children:[n.jsx(f.Box,{sx:{width:t,flexShrink:0,borderRight:`1px solid ${u.studioBd}`,display:"flex",flexDirection:"column",bgcolor:u.card,overflow:"auto",scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}},children:n.jsx(Ys,{onClose:m})}),n.jsx(f.Box,{onMouseDown:x,sx:{width:5,cursor:"col-resize",flexShrink:0,bgcolor:"divider",opacity:.4,"&:hover":{opacity:1,bgcolor:"primary.main"}}})]}):n.jsx(f.Tooltip,{title:"Open Theme Studio",placement:"right",arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(f.IconButton,{onClick:g,sx:{position:"absolute",left:68,bottom:56,zIndex:10,bgcolor:"primary.main",color:"primary.contrastText",boxShadow:4,"&:hover":{bgcolor:"primary.dark"}},children:n.jsx(ps,{})})}),n.jsx(yl,{})]})}),n.jsxs(f.Dialog,{open:i,onClose:()=>s(!1),PaperProps:{sx:{borderRadius:3,width:300,p:2.5}},children:[n.jsx(f.Typography,{sx:{fontSize:15,fontWeight:800,mb:.75},children:"Save changes?"}),n.jsx(f.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(f.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[n.jsx(f.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(f.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(f.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 Cl(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(h=>h.replace(/"/g,"").replace(/'/g,"")),u=Array.from(new Set(c)).filter(h=>a.includes(h));if(u.length>0){const h="dynamic-google-fonts";let x=document.getElementById(h);const g=`https://fonts.googleapis.com/css2?${u.map(y=>`family=${y.replace(/ /g,"+")}:wght@300;400;500;600;700;800;900`).join("&")}&display=swap`;x||(x=document.createElement("link"),x.id=h,x.rel="stylesheet",document.head.appendChild(x)),x.href=g}}return Wn({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=He;exports.ThemeStudio=Sl;exports.buildMuiTheme=Cl;exports.useThemeStore=N;
|