@accounter/client
Version:
Accounter client application
101 lines (89 loc) • 23.4 kB
JavaScript
import{s as e}from"./dist-BbgEzppd.js";import{a as t,i as n,o as r}from"./utils-BUNz070n.js";import{B as i,M as a,j as o}from"./table-tK8pMUMS.js";import{_ as s,a as c,d as l,i as u,l as d,m as f}from"./index-B8E5XsZe.js";function p(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var m=e=>e,h=(()=>{let e=m;return{configure(t){e=t},generate(t){return e(t)},reset(){e=m}}})(),g={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 _(e,t,n=`Mui`){let r=g[t];return r?`${n}-${r}`:`${h.generate(e)}-${t}`}function v(e,t,n=`Mui`){let r={};return t.forEach(t=>{r[t]=_(e,t,n)}),r}var y={theme:void 0};function b(e){let t,n;return function(r){let i=t;return(i===void 0||r.theme!==n)&&(y.theme=r.theme,i=f(e(y)),t=i,n=r.theme),i}}function x(e,t,n=void 0){let r={};for(let i in e){let a=e[i],o=``,s=!0;for(let e=0;e<a.length;e+=1){let r=a[e];r&&(o+=(s===!0?``:` `)+t(r),s=!1,n&&n[r]&&(o+=` `+n[r]))}r[i]=o}return r}var S=s,C=b,w=d,T=e(r(),1);function E(e){let t=T.useRef(e);return l(()=>{t.current=e}),T.useRef((...e)=>(0,t.current)(...e)).current}var D=E;function O(...e){let t=T.useRef(void 0),n=T.useCallback(t=>{let n=e.map(e=>{if(e==null)return null;if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}});return()=>{n.forEach(e=>e?.())}},e);return T.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var ee=O;function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function te(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,k(e,t)}var A=T.createContext(null);function ne(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function j(e,t){var n=function(e){return t&&(0,T.isValidElement)(e)?t(e):e},r=Object.create(null);return e&&T.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function re(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function M(e,t,n){return n[t]==null?e.props[t]:n[t]}function N(e,t){return j(e.children,function(n){return(0,T.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:M(n,`appear`,e),enter:M(n,`enter`,e),exit:M(n,`exit`,e)})})}function ie(e,t,n){var r=j(e.children),i=re(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if((0,T.isValidElement)(o)){var s=a in t,c=a in r,l=t[a],u=(0,T.isValidElement)(l)&&!l.props.in;c&&(!s||u)?i[a]=(0,T.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:M(o,`exit`,e),enter:M(o,`enter`,e)}):!c&&s&&!u?i[a]=(0,T.cloneElement)(o,{in:!1}):c&&s&&(0,T.isValidElement)(l)&&(i[a]=(0,T.cloneElement)(o,{onExited:n.bind(null,o),in:l.props.in,exit:M(o,`exit`,e),enter:M(o,`enter`,e)}))}}),i}var ae=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},P={component:`div`,childFactory:function(e){return e}},F=function(e){te(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(ne(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?N(e,r):ie(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=j(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=i({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=p(e,[`component`,`childFactory`]),i=this.state.contextValue,a=ae(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?T.createElement(A.Provider,{value:i},a):T.createElement(A.Provider,{value:i},T.createElement(t,r,a))},t}(T.Component);F.propTypes={},F.defaultProps=P;var I={};function L(e,t){let n=T.useRef(I);return n.current===I&&(n.current=e(t)),n}var R=[];function z(e){T.useEffect(e,R)}var oe=class e{static create(){return new e}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear};function B(){let e=L(oe.create).current;return z(e.disposeEffect),e}function se(e){try{return e.matches(`:focus-visible`)}catch{}return!1}function ce(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return T.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}var V={};function le(e){let{nativeButton:t,nativeButtonProp:n,internalNativeButton:r=t,allowInferredHostMismatch:i=!1,disabled:a,type:o,hasFormAction:s=!1,tabIndex:c=0,focusableWhenDisabled:l,stopEventPropagation:u=!1,onBeforeKeyDown:d,onBeforeKeyUp:f}=e,p=T.useRef(null),m=l===!0,h=ce({focusableWhenDisabled:m,disabled:a,isNativeButton:t,tabIndex:c}),g=T.useCallback(()=>{let e=p.current;return e==null?t:e.tagName===`BUTTON`?!0:!!(e.tagName===`A`&&e.href)},[t]),_=T.useMemo(()=>{let e=m?{}:{tabIndex:a?-1:c};return t?(e.type=o===void 0&&!s?`button`:o,m||(e.disabled=a)):(e.role=`button`,!m&&a&&(e[`aria-disabled`]=a)),m?{...e,...h}:e},[a,m,h,s,t,c,o]);return{getButtonProps:T.useCallback((e=V)=>{let{onClick:t,onKeyDown:n,onKeyUp:r,...i}=e,o=e=>{if(u&&e.stopPropagation(),a){e.preventDefault();return}t?.(e)},s=e=>{if(m&&h.onKeyDown(e),!a&&(d?.(e),n?.(e),!(e.target!==e.currentTarget||g()))){if(e.key===` `){e.preventDefault();return}e.key===`Enter`&&(e.preventDefault(),e.currentTarget.click())}},c=e=>{a||(f?.(e),r?.(e),e.target===e.currentTarget&&!g()&&e.key===` `&&!e.defaultPrevented&&e.currentTarget.click())};return{..._,...i,onClick:o,onKeyDown:s,onKeyUp:c}},[_,a,m,h,g,d,f,u]),rootRef:p}}var H=class e{static create(){return new e}static use(){let t=L(e.create).current,[n,r]=T.useState(!1);return t.shouldMount=n,t.setShouldMount=r,T.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=de(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}};function ue(){return H.use()}function de(){let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}var U=n();function fe(e){let{className:n,classes:r,pulsate:i=!1,rippleX:a,rippleY:o,rippleSize:s,in:c,onExited:l,timeout:u}=e,[d,f]=T.useState(!1),p=t(n,r.ripple,r.rippleVisible,i&&r.ripplePulsate),m={width:s,height:s,top:-(s/2)+o,left:-(s/2)+a},h=t(r.child,d&&r.childLeaving,i&&r.childPulsate);return!c&&!d&&f(!0),T.useEffect(()=>{if(!c&&l!=null){let e=setTimeout(l,u);return()=>{clearTimeout(e)}}},[l,c,u]),(0,U.jsx)(`span`,{className:p,style:m,children:(0,U.jsx)(`span`,{className:h})})}var W=v(`MuiTouchRipple`,[`root`,`ripple`,`rippleVisible`,`ripplePulsate`,`child`,`childLeaving`,`childPulsate`]),G=550,pe=a`
0% {
transform: scale(0);
opacity: 0.1;
}
100% {
transform: scale(1);
opacity: 0.3;
}
`,me=a`
0% {
opacity: 1;
}
100% {
opacity: 0;
}
`,he=a`
0% {
transform: scale(1);
}
50% {
transform: scale(0.92);
}
100% {
transform: scale(1);
}
`,ge=c(`span`,{name:`MuiTouchRipple`,slot:`Root`})({overflow:`hidden`,pointerEvents:`none`,position:`absolute`,zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:`inherit`}),_e=c(fe,{name:`MuiTouchRipple`,slot:`Ripple`})`
opacity: 0;
position: absolute;
&.${W.rippleVisible} {
opacity: 0.3;
transform: scale(1);
animation-name: ${pe};
animation-duration: ${G}ms;
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
}
&.${W.ripplePulsate} {
animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
}
& .${W.child} {
opacity: 1;
display: block;
width: 100%;
height: 100%;
border-radius: 50%;
background-color: currentColor;
}
& .${W.childLeaving} {
opacity: 0;
animation-name: ${me};
animation-duration: ${G}ms;
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
}
& .${W.childPulsate} {
position: absolute;
/* @noflip */
left: 0px;
top: 0;
animation-name: ${he};
animation-duration: 2500ms;
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
animation-iteration-count: infinite;
animation-delay: 200ms;
}
`,ve=T.forwardRef(function(e,n){let{center:r=!1,classes:i={},className:a,...o}=u({props:e,name:`MuiTouchRipple`}),[s,c]=T.useState([]),l=T.useRef(0),d=T.useRef(null);T.useEffect(()=>{d.current&&=(d.current(),null)},[s]);let f=T.useRef(!1),p=B(),m=T.useRef(null),h=T.useRef(null),g=T.useCallback(e=>{let{pulsate:n,rippleX:r,rippleY:a,rippleSize:o,cb:s}=e;c(e=>[...e,(0,U.jsx)(_e,{classes:{ripple:t(i.ripple,W.ripple),rippleVisible:t(i.rippleVisible,W.rippleVisible),ripplePulsate:t(i.ripplePulsate,W.ripplePulsate),child:t(i.child,W.child),childLeaving:t(i.childLeaving,W.childLeaving),childPulsate:t(i.childPulsate,W.childPulsate)},timeout:G,pulsate:n,rippleX:r,rippleY:a,rippleSize:o},l.current)]),l.current+=1,d.current=s},[i]),_=T.useCallback((e={},t={},n=()=>{})=>{let{pulsate:i=!1,center:a=r||t.pulsate,fakeElement:o=!1}=t;if(e?.type===`mousedown`&&f.current){f.current=!1;return}e?.type===`touchstart`&&(f.current=!0);let s=o?null:h.current,c=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0},l,u,d;if(a||e===void 0||e.clientX===0&&e.clientY===0||!e.clientX&&!e.touches)l=Math.round(c.width/2),u=Math.round(c.height/2);else{let{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;l=Math.round(t-c.left),u=Math.round(n-c.top)}if(a)d=Math.sqrt((2*c.width**2+c.height**2)/3),d%2==0&&(d+=1);else{let e=Math.max(Math.abs((s?s.clientWidth:0)-l),l)*2+2,t=Math.max(Math.abs((s?s.clientHeight:0)-u),u)*2+2;d=Math.sqrt(e**2+t**2)}e?.touches?m.current===null&&(m.current=()=>{g({pulsate:i,rippleX:l,rippleY:u,rippleSize:d,cb:n})},p.start(80,()=>{m.current&&=(m.current(),null)})):g({pulsate:i,rippleX:l,rippleY:u,rippleSize:d,cb:n})},[r,g,p]),v=T.useCallback(()=>{_({},{pulsate:!0})},[_]),y=T.useCallback((e,t)=>{if(p.clear(),e?.type===`touchend`&&m.current){m.current(),m.current=null,p.start(0,()=>{y(e,t)});return}m.current=null,c(e=>e.length>0?e.slice(1):e),d.current=t},[p]);return T.useImperativeHandle(n,()=>({pulsate:v,start:_,stop:y}),[v,_,y]),(0,U.jsx)(ge,{className:t(W.root,i.root,a),ref:h,...o,children:(0,U.jsx)(F,{component:null,exit:!0,children:s})})});function ye(e){return _(`MuiButtonBase`,e)}var be=v(`MuiButtonBase`,[`root`,`disabled`,`focusVisible`]),xe=e=>{let{disabled:t,focusVisible:n,focusVisibleClassName:r,suppressFocusVisible:i,classes:a}=e,o=x({root:[`root`,t&&`disabled`,n&&!i&&`focusVisible`]},ye,a);return n&&!i&&r&&(o.root+=` ${r}`),o},Se=c(`button`,{name:`MuiButtonBase`,slot:`Root`})({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,position:`relative`,boxSizing:`border-box`,WebkitTapHighlightColor:`transparent`,backgroundColor:`transparent`,outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:`pointer`,userSelect:`none`,verticalAlign:`middle`,MozAppearance:`none`,WebkitAppearance:`none`,textDecoration:`none`,color:`inherit`,"&::-moz-focus-inner":{borderStyle:`none`},[`&.${be.disabled}`]:{pointerEvents:`none`,cursor:`default`},"@media print":{colorAdjust:`exact`}}),K=T.forwardRef(function(e,n){let r=u({props:e,name:`MuiButtonBase`}),{action:i,centerRipple:a=!1,children:o,className:s,component:c=`button`,disabled:l=!1,disableRipple:d=!1,disableTouchRipple:f=!1,focusRipple:p=!1,focusVisibleClassName:m,focusableWhenDisabled:h,suppressFocusVisible:g=!1,internalNativeButton:_,LinkComponent:v=`a`,nativeButton:y,onBlur:b,onClick:x,onContextMenu:S,onDragLeave:C,onFocus:w,onFocusVisible:E,onKeyDown:O,onKeyUp:k,onMouseDown:te,onMouseLeave:A,onMouseUp:ne,onTouchEnd:j,onTouchMove:re,onTouchStart:M,tabIndex:N=0,TouchRippleProps:ie,touchRippleRef:ae,type:P,...F}=r,I=!!(F.href||F.to),L=!!F.formAction,R=c;R===`button`&&I&&(R=v);let z=typeof R==`string`?R===`button`:_??!1,oe=y??z,B=ue(),ce=ee(B.ref,ae),[V,H]=T.useState(!1);(l||g)&&V&&H(!1);let de=D(e=>{p&&!e.repeat&&V&&e.key===` `&&B.stop(e,()=>{B.start(e)})}),fe=D(e=>{p&&e.key===` `&&V&&!e.defaultPrevented&&B.stop(e,()=>{B.pulsate(e)})}),{getButtonProps:W,rootRef:G}=le({nativeButton:oe,nativeButtonProp:y,internalNativeButton:z,allowInferredHostMismatch:I||typeof R==`string`,disabled:l,type:P,hasFormAction:L,tabIndex:N,onBeforeKeyDown:de,onBeforeKeyUp:fe}),{onClick:pe,onKeyDown:me,onKeyUp:he,...ge}=W({onClick:x,onKeyDown:O,onKeyUp:k});T.useImperativeHandle(i,()=>({focusVisible:()=>{H(!0),G.current.focus()}}),[G]);let _e=B.shouldMount&&!d&&!l;T.useEffect(()=>{V&&p&&!d&&B.pulsate()},[d,p,V,B]);let ye=q(B,`start`,te,f),be=q(B,`stop`,S,f),K=q(B,`stop`,C,f),Ce=q(B,`stop`,ne,f),we=q(B,`stop`,e=>{V&&e.preventDefault(),A&&A(e)},f),J=q(B,`start`,M,f),Te=q(B,`stop`,j,f),Y=q(B,`stop`,re,f),X=q(B,`stop`,e=>{se(e.target)||H(!1),b&&b(e)},!1),Z=D(e=>{G.current||=e.currentTarget,!g&&se(e.target)&&(H(!0),E&&E(e)),w&&w(e)}),Q={};I&&(Q.tabIndex=l?-1:N,l&&(Q[`aria-disabled`]=l),Q.type=P);let Ee=ee(n,G),$={...r,centerRipple:a,component:c,disabled:l,disableRipple:d,disableTouchRipple:f,focusRipple:p,suppressFocusVisible:g,tabIndex:N,focusVisible:V},De=xe($);return(0,U.jsxs)(Se,{as:R,className:t(De.root,s),ownerState:$,onBlur:X,onClick:pe,onContextMenu:be,onFocus:Z,onKeyDown:me,onKeyUp:he,onMouseDown:ye,onMouseLeave:we,onMouseUp:Ce,onDragLeave:K,onTouchEnd:Te,onTouchMove:Y,onTouchStart:J,ref:Ee,...I?Q:ge,...F,children:[o,_e?(0,U.jsx)(ve,{ref:ce,center:a,...ie}):null]})});function q(e,t,n,r=!1){return D(i=>(n&&n(i),r||e[t](i),!0))}function Ce(e){return typeof e.main==`string`}function we(e,t=[]){if(!Ce(e))return!1;for(let n of t)if(!e.hasOwnProperty(n)||typeof e[n]!=`string`)return!1;return!0}function J(e=[]){return([,t])=>t&&we(t,e)}function Te(e){return _(`MuiCircularProgress`,e)}v(`MuiCircularProgress`,[`root`,`determinate`,`indeterminate`,`colorPrimary`,`colorSecondary`,`svg`,`track`,`circle`,`circleDisableShrink`]);var Y=44,X=a`
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
`,Z=a`
0% {
stroke-dasharray: 1px, 200px;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 100px, 200px;
stroke-dashoffset: -15px;
}
100% {
stroke-dasharray: 1px, 200px;
stroke-dashoffset: -126px;
}
`,Q=typeof X==`string`?null:o`
animation: ${X} 1.4s linear infinite;
`,Ee=typeof Z==`string`?null:o`
animation: ${Z} 1.4s ease-in-out infinite;
`,$=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return x({root:[`root`,n,`color${S(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,i&&`circleDisableShrink`]},Te,t)},De=c(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${S(n.color)}`]]}})(C(({theme:e})=>({display:`inline-block`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`transform`)}},{props:{variant:`indeterminate`},style:Q||{animation:`${X} 1.4s linear infinite`}},...Object.entries(e.palette).filter(J()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Oe=c(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),ke=c(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,n.disableShrink&&t.circleDisableShrink]}})(C(({theme:e})=>({stroke:`currentColor`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`stroke-dashoffset`)}},{props:{variant:`indeterminate`},style:{strokeDasharray:`80px, 200px`,strokeDashoffset:0}},{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:Ee||{animation:`${Z} 1.4s ease-in-out infinite`}}]}))),Ae=c(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(C(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),je=T.forwardRef(function(e,n){let r=u({props:e,name:`MuiCircularProgress`}),{className:i,color:a=`primary`,disableShrink:o=!1,enableTrackSlot:s=!1,size:c=40,style:l,thickness:d=3.6,value:f=0,variant:p=`indeterminate`,...m}=r,h={...r,color:a,disableShrink:o,size:c,thickness:d,value:f,variant:p,enableTrackSlot:s},g=$(h),_={},v={},y={};if(p===`determinate`){let e=2*Math.PI*((Y-d)/2);_.strokeDasharray=e.toFixed(3),y[`aria-valuenow`]=Math.round(f),_.strokeDashoffset=`${((100-f)/100*e).toFixed(3)}px`,v.transform=`rotate(-90deg)`}return(0,U.jsx)(De,{className:t(g.root,i),style:{width:c,height:c,...v,...l},ownerState:h,ref:n,role:`progressbar`,...y,...m,children:(0,U.jsxs)(Oe,{className:g.svg,ownerState:h,viewBox:`${Y/2} ${Y/2} ${Y} ${Y}`,children:[s?(0,U.jsx)(Ae,{className:g.track,ownerState:h,cx:Y,cy:Y,r:(Y-d)/2,fill:`none`,strokeWidth:d,"aria-hidden":`true`}):null,(0,U.jsx)(ke,{className:g.circle,style:_,ownerState:h,cx:Y,cy:Y,r:(Y-d)/2,fill:`none`,strokeWidth:d})]})})});function Me(e){return _(`MuiIconButton`,e)}var Ne=v(`MuiIconButton`,[`root`,`disabled`,`colorInherit`,`colorPrimary`,`colorSecondary`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`,`edgeStart`,`edgeEnd`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`loading`,`loadingIndicator`,`loadingWrapper`]),Pe=e=>{let{classes:t,disabled:n,color:r,edge:i,size:a,loading:o}=e;return x({root:[`root`,o&&`loading`,n&&`disabled`,r!==`default`&&`color${S(r)}`,i&&`edge${S(i)}`,`size${S(a)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},Me,t)},Fe=c(K,{name:`MuiIconButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!==`default`&&t[`color${S(n.color)}`],n.edge&&t[`edge${S(n.edge)}`],t[`size${S(n.size)}`]]}})(C(({theme:e})=>({textAlign:`center`,flex:`0 0 auto`,fontSize:e.typography.pxToRem(24),padding:8,borderRadius:`50%`,color:(e.vars||e).palette.action.active,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:`var(--IconButton-hoverBg)`,"@media (hover: none)":{backgroundColor:`transparent`}}}},{props:{edge:`start`},style:{marginLeft:-12}},{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:{edge:`end`},style:{marginRight:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}}]})),C(({theme:e})=>({variants:[{props:{color:`inherit`},style:{color:`inherit`}},...Object.entries(e.palette).filter(J()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(J()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:`small`},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:`large`},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${Ne.disabled}`]:{backgroundColor:`transparent`,color:(e.vars||e).palette.action.disabled},[`&.${Ne.loading}`]:{color:`transparent`}}))),Ie=c(`span`,{name:`MuiIconButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:`flex`}}]})),Le=T.forwardRef(function(e,n){let r=u({props:e,name:`MuiIconButton`}),{edge:i=!1,children:a,className:o,color:s=`default`,disabled:c=!1,disableFocusRipple:l=!1,size:d=`medium`,id:f,loading:p=null,loadingIndicator:m,...h}=r,g=w(f),_=m??(0,U.jsx)(je,{"aria-labelledby":g,color:`inherit`,size:16}),v={...r,edge:i,color:s,disabled:c,disableFocusRipple:l,loading:p,loadingIndicator:_,size:d},y=Pe(v);return(0,U.jsxs)(Fe,{id:p?g:f,className:t(y.root,o),centerRipple:!0,internalNativeButton:!0,focusRipple:!l,disabled:c||p,ref:n,...h,ownerState:v,children:[typeof p==`boolean`&&(0,U.jsx)(`span`,{className:y.loadingWrapper,style:{display:`contents`},children:(0,U.jsx)(Ie,{className:y.loadingIndicator,ownerState:v,children:p&&_})}),a]})});function Re(e){return _(`MuiTypography`,e)}v(`MuiTypography`,[`root`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`subtitle1`,`subtitle2`,`body1`,`body2`,`inherit`,`button`,`caption`,`overline`,`alignLeft`,`alignRight`,`alignCenter`,`alignJustify`,`noWrap`,`gutterBottom`]);var ze=e=>{let{align:t,gutterBottom:n,noWrap:r,variant:i,classes:a}=e;return x({root:[`root`,i,e.align!==`inherit`&&`align${S(t)}`,n&&`gutterBottom`,r&&`noWrap`]},Re,a)},Be=c(`span`,{name:`MuiTypography`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!==`inherit`&&t[`align${S(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom]}})(C(({theme:e})=>({margin:0,variants:[{props:{variant:`inherit`},style:{font:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},...Object.entries(e.typography).filter(([e,t])=>e!==`inherit`&&t&&typeof t==`object`).map(([e,t])=>({props:{variant:e},style:t})),...Object.entries(e.palette).filter(J()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,e])=>typeof e==`string`).map(([t])=>({props:{color:`text${S(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:e})=>e.align!==`inherit`,style:{textAlign:`var(--Typography-textAlign)`}},{props:({ownerState:e})=>e.noWrap,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:`0.35em`}}]}))),Ve={h1:`h1`,h2:`h2`,h3:`h3`,h4:`h4`,h5:`h5`,h6:`h6`,subtitle1:`h6`,subtitle2:`h6`,body1:`p`,body2:`p`,inherit:`p`},He=T.forwardRef(function(e,n){let r=u({props:e,name:`MuiTypography`}),{color:i,align:a=`inherit`,className:o,component:s,gutterBottom:c=!1,noWrap:l=!1,variant:d=`body1`,variantMapping:f=Ve,...p}=r,m={...r,align:a,color:i,className:o,component:s,gutterBottom:c,noWrap:l,variant:d,variantMapping:f};return(0,U.jsx)(Be,{as:s||f[d]||Ve[d]||`span`,ref:n,className:t(ze(m).root,o),...p,ownerState:m,style:{...a!==`inherit`&&{"--Typography-textAlign":a},...p.style}})});export{K as a,C as c,v as d,_ as f,J as i,S as l,Le as n,O as o,p,je as r,w as s,He as t,x as u};