From 24365a28a3128071bf57edb418bf5cb5a85b3bdc Mon Sep 17 00:00:00 2001 From: tombogle Date: Thu, 29 Feb 2024 01:04:56 -0500 Subject: [PATCH] 707: Changed GroupedMenuItemList to take a single props parameter that has includedGroups. Renamed and moved a few types around. Improved/added some comments. --- lib/platform-bible-react/dist/index.cjs | 314 ++++----- lib/platform-bible-react/dist/index.cjs.map | 2 +- lib/platform-bible-react/dist/index.d.ts | 18 +- lib/platform-bible-react/dist/index.js | 599 +++++++++--------- lib/platform-bible-react/dist/index.js.map | 2 +- .../src/components/context-menu.component.tsx | 4 +- .../src/components/grid-menu.component.tsx | 4 +- .../grouped-menu-item-list.component.tsx | 36 +- .../src/components/menu-item.component.tsx | 9 +- .../src/components/toolbar.component.tsx | 6 - .../components/top-level-menu.component.tsx | 11 +- lib/platform-bible-react/src/index.ts | 3 +- .../non-validating-document-combiner.ts | 2 +- lib/platform-bible-utils/tsconfig.json | 5 + src/stories/basics/context-menu.stories.tsx | 4 +- 15 files changed, 517 insertions(+), 502 deletions(-) diff --git a/lib/platform-bible-react/dist/index.cjs b/lib/platform-bible-react/dist/index.cjs index c7ca3bc68c..22d1000b0f 100644 --- a/lib/platform-bible-react/dist/index.cjs +++ b/lib/platform-bible-react/dist/index.cjs @@ -64,7 +64,7 @@ const theme2 = createTheme({ palette: { `))}d[v]={}}}};Object.keys(u.components).forEach(d=>{const b=u.components[d].styleOverrides;b&&d.indexOf("Mui")===0&&f(b,d)})}return u.unstable_sxConfig=w({},_r,a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(f){return jr({sx:f,theme:this})},u}const rp=np(),Lr=rp,Fr="$$material",Hi=e=>wn(e)&&e!=="classes",op=mu({themeId:Fr,defaultTheme:Lr,rootShouldForwardProp:Hi}),ye=op;function fn(){const e=Ui(Lr);return process.env.NODE_ENV!=="production"&&T.useDebugValue(e),e[Fr]||e}function Qe({props:e,name:t}){return bu({props:e,name:t,defaultTheme:Lr,themeId:Fr})}function xr(e,t){return xr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},xr(e,t)}function ip(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,xr(e,t)}const Xo={disabled:!1};var sp=process.env.NODE_ENV!=="production"?s.oneOfType([s.number,s.shape({enter:s.number,exit:s.number,appear:s.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&s.oneOfType([s.string,s.shape({enter:s.string,exit:s.string,active:s.string}),s.shape({enter:s.string,enterDone:s.string,enterActive:s.string,exit:s.string,exitDone:s.string,exitActive:s.string})]);const Wi=ie.createContext(null);var ap=function(t){return t.scrollTop},Xt="unmounted",ct="exited",ut="entering",kt="entered",Er="exiting",et=function(e){ip(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,l=a&&!a.isMounting?r.enter:r.appear,c;return i.appearStatus=null,r.in?l?(c=ct,i.appearStatus=ut):c=kt:r.unmountOnExit||r.mountOnEnter?c=Xt:c=ct,i.state={status:c},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===Xt?{status:ct}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==ut&&a!==kt&&(i=ut):(a===ut||a===kt)&&(i=Er)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,l;return i=a=l=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,l=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:l}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===ut){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:qt.findDOMNode(this);a&&ap(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ct&&this.setState({status:Xt})},n.performEnter=function(o){var i=this,a=this.props.enter,l=this.context?this.context.isMounting:o,c=this.props.nodeRef?[l]:[qt.findDOMNode(this),l],u=c[0],p=c[1],f=this.getTimeouts(),d=l?f.appear:f.enter;if(!o&&!a||Xo.disabled){this.safeSetState({status:kt},function(){i.props.onEntered(u)});return}this.props.onEnter(u,p),this.safeSetState({status:ut},function(){i.props.onEntering(u,p),i.onTransitionEnd(d,function(){i.safeSetState({status:kt},function(){i.props.onEntered(u,p)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),l=this.props.nodeRef?void 0:qt.findDOMNode(this);if(!i||Xo.disabled){this.safeSetState({status:ct},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:Er},function(){o.props.onExiting(l),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:ct},function(){o.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(l){a&&(a=!1,i.nextCallback=null,o(l))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:qt.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!a||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=c[0],p=c[1];this.props.addEndListener(u,p)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===Xt)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var l=ue(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ie.createElement(Wi.Provider,{value:null},typeof a=="function"?a(o,l):ie.cloneElement(ie.Children.only(a),l))},t}(ie.Component);et.contextType=Wi;et.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:s.shape({current:typeof Element>"u"?s.any:function(e,t,n,r,o,i){var a=e[t];return s.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,t,n,r,o,i)}}),children:s.oneOfType([s.func.isRequired,s.element.isRequired]).isRequired,in:s.bool,mountOnEnter:s.bool,unmountOnExit:s.bool,appear:s.bool,enter:s.bool,exit:s.bool,timeout:function(t){var n=sp;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;ie.scrollTop;function An(e,t){var n,r;const{timeout:o,easing:i,style:a={}}=e;return{duration:(n=a.transitionDuration)!=null?n:typeof o=="number"?o:o[t.mode]||0,easing:(r=a.transitionTimingFunction)!=null?r:typeof i=="object"?i[t.mode]:i,delay:a.transitionDelay}}const lp=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Tr(e){return`scale(${e}, ${e**2})`}const cp={entering:{opacity:1,transform:Tr(1)},entered:{opacity:1,transform:"none"}},ar=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Vr=T.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:i,easing:a,in:l,onEnter:c,onEntered:u,onEntering:p,onExit:f,onExited:d,onExiting:b,style:v,timeout:m="auto",TransitionComponent:h=qi}=t,E=ue(t,lp),$=Gt(),y=T.useRef(),x=fn(),g=T.useRef(null),P=Be(g,i.ref,n),S=I=>R=>{if(I){const D=g.current;R===void 0?I(D):I(D,R)}},j=S(p),_=S((I,R)=>{Gi(I);const{duration:D,delay:Q,easing:Z}=An({style:v,timeout:m,easing:a},{mode:"enter"});let O;m==="auto"?(O=x.transitions.getAutoHeightDuration(I.clientHeight),y.current=O):O=D,I.style.transition=[x.transitions.create("opacity",{duration:O,delay:Q}),x.transitions.create("transform",{duration:ar?O:O*.666,delay:Q,easing:Z})].join(","),c&&c(I,R)}),A=S(u),B=S(b),z=S(I=>{const{duration:R,delay:D,easing:Q}=An({style:v,timeout:m,easing:a},{mode:"exit"});let Z;m==="auto"?(Z=x.transitions.getAutoHeightDuration(I.clientHeight),y.current=Z):Z=R,I.style.transition=[x.transitions.create("opacity",{duration:Z,delay:D}),x.transitions.create("transform",{duration:ar?Z:Z*.666,delay:ar?D:D||Z*.333,easing:Q})].join(","),I.style.opacity=0,I.style.transform=Tr(.75),f&&f(I)}),q=S(d),L=I=>{m==="auto"&&$.start(y.current||0,I),r&&r(g.current,I)};return k.jsx(h,w({appear:o,in:l,nodeRef:g,onEnter:_,onEntered:A,onEntering:j,onExit:z,onExited:q,onExiting:B,addEndListener:L,timeout:m==="auto"?null:m},E,{children:(I,R)=>T.cloneElement(i,w({style:w({opacity:0,transform:Tr(.75),visibility:I==="exited"&&!l?"hidden":void 0},cp[I],v,i.props.style),ref:P},R))}))});process.env.NODE_ENV!=="production"&&(Vr.propTypes={addEndListener:s.func,appear:s.bool,children:an.isRequired,easing:s.oneOfType([s.shape({enter:s.string,exit:s.string}),s.string]),in:s.bool,onEnter:s.func,onEntered:s.func,onEntering:s.func,onExit:s.func,onExited:s.func,onExiting:s.func,style:s.object,timeout:s.oneOfType([s.oneOf(["auto"]),s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})])});Vr.muiSupportAuto=!0;const wr=Vr,up=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},Yo=up,pp=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],dp=ye(Bi,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ki=T.forwardRef(function(t,n){var r;const o=zi(),i=Qe({props:t,name:"MuiPopper"}),{anchorEl:a,component:l,components:c,componentsProps:u,container:p,disablePortal:f,keepMounted:d,modifiers:b,open:v,placement:m,popperOptions:h,popperRef:E,transition:$,slots:y,slotProps:x}=i,g=ue(i,pp),P=(r=y==null?void 0:y.root)!=null?r:c==null?void 0:c.Root,S=w({anchorEl:a,container:p,disablePortal:f,keepMounted:d,modifiers:b,open:v,placement:m,popperOptions:h,popperRef:E,transition:$},g);return k.jsx(dp,w({as:l,direction:o==null?void 0:o.direction,slots:{root:P},slotProps:x??u},S,{ref:n}))});process.env.NODE_ENV!=="production"&&(Ki.propTypes={anchorEl:s.oneOfType([Ke,s.object,s.func]),children:s.oneOfType([s.node,s.func]),component:s.elementType,components:s.shape({Root:s.elementType}),componentsProps:s.shape({root:s.oneOfType([s.func,s.object])}),container:s.oneOfType([Ke,s.func]),disablePortal:s.bool,keepMounted:s.bool,modifiers:s.arrayOf(s.shape({data:s.object,effect:s.func,enabled:s.bool,fn:s.func,name:s.any,options:s.object,phase:s.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:s.arrayOf(s.string),requiresIfExists:s.arrayOf(s.string)})),open:s.bool.isRequired,placement:s.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:s.shape({modifiers:s.array,onFirstUpdate:s.func,placement:s.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),strategy:s.oneOf(["absolute","fixed"])}),popperRef:kr,slotProps:s.shape({root:s.oneOfType([s.func,s.object])}),slots:s.shape({root:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),transition:s.bool});const Xi=Ki;function fp(e){return Ue("MuiTooltip",e)}const hp=rt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),nt=hp,mp=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function gp(e){return Math.round(e*1e5)/1e5}const bp=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${Xe(i.split("-")[0])}`],arrow:["arrow"]};return Ze(a,fp,t)},vp=ye(Xi,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(({theme:e,ownerState:t,open:n})=>w({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${nt.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${nt.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${nt.arrow}`]:w({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${nt.arrow}`]:w({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),yp=ye("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Xe(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>w({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:In(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${gp(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${nt.popper}[data-popper-placement*="left"] &`]:w({transformOrigin:"right center"},t.isRtl?w({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):w({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${nt.popper}[data-popper-placement*="right"] &`]:w({transformOrigin:"left center"},t.isRtl?w({marginRight:"14px"},t.touch&&{marginRight:"24px"}):w({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${nt.popper}[data-popper-placement*="top"] &`]:w({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${nt.popper}[data-popper-placement*="bottom"] &`]:w({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),xp=ye("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:In(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let xn=!1;const Jo=new ln;let Ut={x:0,y:0};function En(e,t){return n=>{t&&t(n),e(n)}}const Yi=T.forwardRef(function(t,n){var r,o,i,a,l,c,u,p,f,d,b,v,m,h,E,$,y,x,g;const P=Qe({props:t,name:"MuiTooltip"}),{arrow:S=!1,children:j,components:_={},componentsProps:A={},describeChild:B=!1,disableFocusListener:z=!1,disableHoverListener:q=!1,disableInteractive:L=!1,disableTouchListener:I=!1,enterDelay:R=100,enterNextDelay:D=0,enterTouchDelay:Q=700,followCursor:Z=!1,id:O,leaveDelay:M=0,leaveTouchDelay:V=1500,onClose:K,onOpen:F,open:U,placement:W="bottom",PopperComponent:G,PopperProps:H={},slotProps:X={},slots:Y={},title:ne,TransitionComponent:N=wr,TransitionProps:J}=P,C=ue(P,mp),re=T.isValidElement(j)?j:k.jsx("span",{children:j}),be=fn(),xe=be.direction==="rtl",[me,st]=T.useState(),[Ee,He]=T.useState(null),Pe=T.useRef(!1),We=L||Z,ve=Gt(),vt=Gt(),at=Gt(),jt=Gt(),[hn,Gr]=oa({controlled:U,default:!1,name:"Tooltip",state:"open"});let qe=hn;if(process.env.NODE_ENV!=="production"){const{current:ee}=T.useRef(U!==void 0);T.useEffect(()=>{me&&me.disabled&&!ee&&ne!==""&&me.tagName.toLowerCase()==="button"&&console.error(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join(` `))},[ne,me,ee])}const Gn=ra(O),Dt=T.useRef(),mn=Cn(()=>{Dt.current!==void 0&&(document.body.style.WebkitUserSelect=Dt.current,Dt.current=void 0),jt.clear()});T.useEffect(()=>mn,[mn]);const Kr=ee=>{Jo.clear(),xn=!0,Gr(!0),F&&!qe&&F(ee)},gn=Cn(ee=>{Jo.start(800+M,()=>{xn=!1}),Gr(!1),K&&qe&&K(ee),ve.start(be.transitions.duration.shortest,()=>{Pe.current=!1})}),Kn=ee=>{Pe.current&&ee.type!=="touchstart"||(me&&me.removeAttribute("title"),vt.clear(),at.clear(),R||xn&&D?vt.start(xn?D:R,()=>{Kr(ee)}):Kr(ee))},Xr=ee=>{vt.clear(),at.start(M,()=>{gn(ee)})},{isFocusVisibleRef:Yr,onBlur:ys,onFocus:xs,ref:Es}=ma(),[,Jr]=T.useState(!1),Zr=ee=>{ys(ee),Yr.current===!1&&(Jr(!1),Xr(ee))},Qr=ee=>{me||st(ee.currentTarget),xs(ee),Yr.current===!0&&(Jr(!0),Kn(ee))},eo=ee=>{Pe.current=!0;const Se=re.props;Se.onTouchStart&&Se.onTouchStart(ee)},to=Kn,no=Xr,Ts=ee=>{eo(ee),at.clear(),ve.clear(),mn(),Dt.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",jt.start(Q,()=>{document.body.style.WebkitUserSelect=Dt.current,Kn(ee)})},ws=ee=>{re.props.onTouchEnd&&re.props.onTouchEnd(ee),mn(),at.start(V,()=>{gn(ee)})};T.useEffect(()=>{if(!qe)return;function ee(Se){(Se.key==="Escape"||Se.key==="Esc")&&gn(Se)}return document.addEventListener("keydown",ee),()=>{document.removeEventListener("keydown",ee)}},[gn,qe]);const Os=Be(re.ref,Es,st,n);!ne&&ne!==0&&(qe=!1);const Xn=T.useRef(),ks=ee=>{const Se=re.props;Se.onMouseMove&&Se.onMouseMove(ee),Ut={x:ee.clientX,y:ee.clientY},Xn.current&&Xn.current.update()},Bt={},Yn=typeof ne=="string";B?(Bt.title=!qe&&Yn&&!q?ne:null,Bt["aria-describedby"]=qe?Gn:null):(Bt["aria-label"]=Yn?ne:null,Bt["aria-labelledby"]=qe&&!Yn?Gn:null);const Me=w({},Bt,C,re.props,{className:Ne(C.className,re.props.className),onTouchStart:eo,ref:Os},Z?{onMouseMove:ks}:{});process.env.NODE_ENV!=="production"&&(Me["data-mui-internal-clone-element"]=!0,T.useEffect(()=>{me&&!me.getAttribute("data-mui-internal-clone-element")&&console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.","Please make sure that props are spread on the same element that the ref is applied to."].join(` `))},[me]));const Lt={};I||(Me.onTouchStart=Ts,Me.onTouchEnd=ws),q||(Me.onMouseOver=En(to,Me.onMouseOver),Me.onMouseLeave=En(no,Me.onMouseLeave),We||(Lt.onMouseOver=to,Lt.onMouseLeave=no)),z||(Me.onFocus=En(Qr,Me.onFocus),Me.onBlur=En(Zr,Me.onBlur),We||(Lt.onFocus=Qr,Lt.onBlur=Zr)),process.env.NODE_ENV!=="production"&&re.props.title&&console.error(["MUI: You have provided a `title` prop to the child of .",`Remove this title prop \`${re.props.title}\` or the Tooltip component.`].join(` -`));const Ps=T.useMemo(()=>{var ee;let Se=[{name:"arrow",enabled:!!Ee,options:{element:Ee,padding:4}}];return(ee=H.popperOptions)!=null&&ee.modifiers&&(Se=Se.concat(H.popperOptions.modifiers)),w({},H.popperOptions,{modifiers:Se})},[Ee,H]),Ft=w({},P,{isRtl:xe,arrow:S,disableInteractive:We,placement:W,PopperComponentProp:G,touch:Pe.current}),Jn=bp(Ft),ro=(r=(o=Y.popper)!=null?o:_.Popper)!=null?r:vp,oo=(i=(a=(l=Y.transition)!=null?l:_.Transition)!=null?a:N)!=null?i:wr,io=(c=(u=Y.tooltip)!=null?u:_.Tooltip)!=null?c:yp,so=(p=(f=Y.arrow)!=null?f:_.Arrow)!=null?p:xp,Ss=Kt(ro,w({},H,(d=X.popper)!=null?d:A.popper,{className:Ne(Jn.popper,H==null?void 0:H.className,(b=(v=X.popper)!=null?v:A.popper)==null?void 0:b.className)}),Ft),Cs=Kt(oo,w({},J,(m=X.transition)!=null?m:A.transition),Ft),Rs=Kt(io,w({},(h=X.tooltip)!=null?h:A.tooltip,{className:Ne(Jn.tooltip,(E=($=X.tooltip)!=null?$:A.tooltip)==null?void 0:E.className)}),Ft),Ns=Kt(so,w({},(y=X.arrow)!=null?y:A.arrow,{className:Ne(Jn.arrow,(x=(g=X.arrow)!=null?g:A.arrow)==null?void 0:x.className)}),Ft);return k.jsxs(T.Fragment,{children:[T.cloneElement(re,Me),k.jsx(ro,w({as:G??Xi,placement:W,anchorEl:Z?{getBoundingClientRect:()=>({top:Ut.y,left:Ut.x,right:Ut.x,bottom:Ut.y,width:0,height:0})}:me,popperRef:Xn,open:me?qe:!1,id:Gn,transition:!0},Lt,Ss,{popperOptions:Ps,children:({TransitionProps:ee})=>k.jsx(oo,w({timeout:be.transitions.duration.shorter},ee,Cs,{children:k.jsxs(io,w({},Rs,{children:[ne,S?k.jsx(so,w({},Ns,{ref:He})):null]}))}))}))]})});process.env.NODE_ENV!=="production"&&(Yi.propTypes={arrow:s.bool,children:an.isRequired,classes:s.object,className:s.string,components:s.shape({Arrow:s.elementType,Popper:s.elementType,Tooltip:s.elementType,Transition:s.elementType}),componentsProps:s.shape({arrow:s.object,popper:s.object,tooltip:s.object,transition:s.object}),describeChild:s.bool,disableFocusListener:s.bool,disableHoverListener:s.bool,disableInteractive:s.bool,disableTouchListener:s.bool,enterDelay:s.number,enterNextDelay:s.number,enterTouchDelay:s.number,followCursor:s.bool,id:s.string,leaveDelay:s.number,leaveTouchDelay:s.number,onClose:s.func,onOpen:s.func,open:s.bool,placement:s.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:s.elementType,PopperProps:s.object,slotProps:s.shape({arrow:s.object,popper:s.object,tooltip:s.object,transition:s.object}),slots:s.shape({arrow:s.elementType,popper:s.elementType,tooltip:s.elementType,transition:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),title:s.node,TransitionComponent:s.elementType,TransitionProps:s.object});const Ep=Yi;function Zo(e,t,n){return e?k.jsx(pe.ListItemIcon,{className:`papi-menu-icon-${n?"leading":"trailing"}`,children:k.jsx("img",{src:e,alt:`${n?"Leading":"Trailing"} icon for ${t}`})}):void 0}function Ji(e){const{onClick:t,label:n,tooltip:r,allowForLeadingIcons:o=!0,iconPathBefore:i=void 0,iconPathAfter:a=void 0,hasAutoFocus:l=!1,className:c,isDisabled:u=!1,isDense:p=!0,hasDisabledGutters:f=!1,hasDivider:d=!1,focusVisibleClassName:b,id:v,children:m}=e,h=k.jsx(pe.MenuItem,{sx:{lineHeight:.8},autoFocus:l,className:c,disabled:u,dense:p,disableGutters:f,divider:d,focusVisibleClassName:b,onClick:t,id:v,children:n?k.jsxs(k.Fragment,{children:[Zo(i,n,!0),k.jsx(pe.ListItemText,{primary:n,inset:!i&&o}),Zo(a,n,!1)]}):m});return r?k.jsx(Ep,{title:r,placement:"right",children:k.jsx("div",{children:h})}):h}function Zi(e){return Object.entries(e.groups).map(([n,r])=>({id:n,group:r}))}function Tp(e){const[t,n]=ie.useState(void 0),{parentMenuItem:r,menuDefinition:o}=e,i=c=>{n(c.currentTarget)},a=()=>{n(void 0)},l=()=>{let c=Zi(o).filter(u=>"menuItem"in u.group);if(!(r!=null&&r.id))throw new Error("A valid parent menu item is required for submenus.");return c=c.filter(u=>"menuItem"in u.group&&u.group.menuItem===r.id),zr(e,c)};return k.jsxs(k.Fragment,{children:[k.jsx(pe.MenuItem,{onClick:i,children:r.label}),k.jsx(pe.Menu,{anchorEl:t,open:!!t,onClose:a,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:l()},r.id)]})}const wp=(e,t)=>t.filter(o=>o.group===e).sort((o,i)=>(o.order||0)-(i.order||0));function zr(e,t){const{menuDefinition:n,onClick:r,commandHandler:o}=e,i=((t==null?void 0:t.length)??0)>0?t:Zi(n).filter(d=>!("menuItem"in d.group)),a=Object.values(i).sort((d,b)=>(d.group.order||0)-(b.group.order||0)),l=[];a.forEach(d=>{wp(d.id,n.items).forEach(b=>l.push({item:b,isLastItemInGroup:!1})),l.length>0&&(l[l.length-1].isLastItemInGroup=!0)}),l.length>0&&(l[l.length-1].isLastItemInGroup=!1);const c=l==null?void 0:l.some(d=>"iconPathBefore"in d),u=({item:d,isLastItemInGroup:b})=>({className:"papi-menu-item",label:d.label,tooltip:d.tooltip,iconPathBefore:"iconPathBefore"in d?d.iconPathBefore:void 0,iconPathAfter:"iconPathAfter"in d?d.iconPathAfter:void 0,hasDivider:b,allowForLeadingIcons:c}),[p]=l;if(!p)return k.jsx("div",{});const f=p.item.group;return k.jsx("div",{role:"menu","aria-label":f,children:(()=>{const d=[];return l.forEach((b,v)=>{const{item:m}=b,h=u(b);if("command"in m){const E=m.group+v;d.push(k.jsx(Ji,{onClick:()=>{r==null||r(),o(m)},...h},E))}else d.push(k.jsx(Tp,{parentMenuItem:m,...e},f+m.id))}),d})()},f)}function Qi(e){const{menuDefinition:t,columnId:n}=e;let i=Object.entries(t.groups).map(([a,l])=>({id:a,group:l})).filter(a=>"column"in a.group);return n&&"columns"in t&&t.columns[n]&&(i=i.filter(a=>"column"in a.group&&a.group.column===n)),zr(e,i)}function Op({commandHandler:e,menuDefinition:t,id:n,metadata:r,onClick:o,className:i}){return k.jsxs(pe.Grid,{id:n,item:!0,xs:"auto",role:"menu","aria-label":n,className:`papi-menu-column ${i??""}`,children:[k.jsx("h3",{"aria-label":r.label,className:`papi-menu-column-header ${i??""}`,children:r.label}),k.jsx(pe.List,{id:n,dense:!0,className:i??"",children:k.jsx(Qi,{commandHandler:e,menuDefinition:t,columnId:n,onClick:o})})]})}function es({commandHandler:e,className:t,multiColumnMenu:n,id:r}){const{columns:o}=n,i=ie.useMemo(()=>{const a=new Map;return Object.getOwnPropertyNames(o).forEach(l=>{if(l==="isExtensible")return;const c=l,u=o[c];typeof u=="object"&&typeof u.order=="number"&&!Number.isNaN(u.order)&&a.set(u.order,{id:c,metadata:u})}),Array.from(a.values()).sort((l,c)=>(l.metadata.order||0)-(c.metadata.order||0))},[o]);return k.jsx(pe.Grid,{container:!0,spacing:0,className:`papi-multi-column-menu ${t??""}`,columns:i.length,role:"menu","aria-label":"GridMenu",id:r,children:i.map((a,l)=>k.jsx(Op,{commandHandler:e,menuDefinition:n,...a,className:t},l))})}const ts=T.createContext({});process.env.NODE_ENV!=="production"&&(ts.displayName="ListContext");const kp=ts;function Pp(e){return Ue("MuiList",e)}rt("MuiList",["root","padding","dense","subheader"]);const Sp=["children","className","component","dense","disablePadding","subheader"],Cp=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Ze({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},Pp,t)},Rp=ye("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>w({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),ns=T.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiList"}),{children:o,className:i,component:a="ul",dense:l=!1,disablePadding:c=!1,subheader:u}=r,p=ue(r,Sp),f=T.useMemo(()=>({dense:l}),[l]),d=w({},r,{component:a,dense:l,disablePadding:c}),b=Cp(d);return k.jsx(kp.Provider,{value:f,children:k.jsxs(Rp,w({as:a,className:Ne(b.root,i),ref:n,ownerState:d},p,{children:[u,o]}))})});process.env.NODE_ENV!=="production"&&(ns.propTypes={children:s.node,classes:s.object,className:s.string,component:s.elementType,dense:s.bool,disablePadding:s.bool,subheader:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});const Np=ns,$p=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function lr(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Qo(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function rs(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.indexOf(t.keys.join(""))===0}function Ht(e,t,n,r,o,i){let a=!1,l=o(e,t,t?n:!1);for(;l;){if(l===e.firstChild){if(a)return!1;a=!0}const c=r?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!rs(l,i)||c)l=o(e,l,n);else return l.focus(),!0}return!1}const os=T.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:a,className:l,disabledItemsFocusable:c=!1,disableListWrap:u=!1,onKeyDown:p,variant:f="selectedMenu"}=t,d=ue(t,$p),b=T.useRef(null),v=T.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Rt(()=>{o&&b.current.focus()},[o]),T.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(y,x)=>{const g=!b.current.style.width;if(y.clientHeight{const x=b.current,g=y.key,P=we(x).activeElement;if(g==="ArrowDown")y.preventDefault(),Ht(x,P,u,c,lr);else if(g==="ArrowUp")y.preventDefault(),Ht(x,P,u,c,Qo);else if(g==="Home")y.preventDefault(),Ht(x,null,u,c,lr);else if(g==="End")y.preventDefault(),Ht(x,null,u,c,Qo);else if(g.length===1){const S=v.current,j=g.toLowerCase(),_=performance.now();S.keys.length>0&&(_-S.lastTime>500?(S.keys=[],S.repeating=!0,S.previousKeyMatched=!0):S.repeating&&j!==S.keys[0]&&(S.repeating=!1)),S.lastTime=_,S.keys.push(j);const A=P&&!S.repeating&&rs(P,S);S.previousKeyMatched&&(A||Ht(x,P,!1,c,lr,S))?y.preventDefault():S.previousKeyMatched=!1}p&&p(y)},h=Be(b,n);let E=-1;T.Children.forEach(a,(y,x)=>{if(!T.isValidElement(y)){E===x&&(E+=1,E>=a.length&&(E=-1));return}process.env.NODE_ENV!=="production"&&Sn.isFragment(y)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(` +`));const Ps=T.useMemo(()=>{var ee;let Se=[{name:"arrow",enabled:!!Ee,options:{element:Ee,padding:4}}];return(ee=H.popperOptions)!=null&&ee.modifiers&&(Se=Se.concat(H.popperOptions.modifiers)),w({},H.popperOptions,{modifiers:Se})},[Ee,H]),Ft=w({},P,{isRtl:xe,arrow:S,disableInteractive:We,placement:W,PopperComponentProp:G,touch:Pe.current}),Jn=bp(Ft),ro=(r=(o=Y.popper)!=null?o:_.Popper)!=null?r:vp,oo=(i=(a=(l=Y.transition)!=null?l:_.Transition)!=null?a:N)!=null?i:wr,io=(c=(u=Y.tooltip)!=null?u:_.Tooltip)!=null?c:yp,so=(p=(f=Y.arrow)!=null?f:_.Arrow)!=null?p:xp,Ss=Kt(ro,w({},H,(d=X.popper)!=null?d:A.popper,{className:Ne(Jn.popper,H==null?void 0:H.className,(b=(v=X.popper)!=null?v:A.popper)==null?void 0:b.className)}),Ft),Cs=Kt(oo,w({},J,(m=X.transition)!=null?m:A.transition),Ft),Rs=Kt(io,w({},(h=X.tooltip)!=null?h:A.tooltip,{className:Ne(Jn.tooltip,(E=($=X.tooltip)!=null?$:A.tooltip)==null?void 0:E.className)}),Ft),Ns=Kt(so,w({},(y=X.arrow)!=null?y:A.arrow,{className:Ne(Jn.arrow,(x=(g=X.arrow)!=null?g:A.arrow)==null?void 0:x.className)}),Ft);return k.jsxs(T.Fragment,{children:[T.cloneElement(re,Me),k.jsx(ro,w({as:G??Xi,placement:W,anchorEl:Z?{getBoundingClientRect:()=>({top:Ut.y,left:Ut.x,right:Ut.x,bottom:Ut.y,width:0,height:0})}:me,popperRef:Xn,open:me?qe:!1,id:Gn,transition:!0},Lt,Ss,{popperOptions:Ps,children:({TransitionProps:ee})=>k.jsx(oo,w({timeout:be.transitions.duration.shorter},ee,Cs,{children:k.jsxs(io,w({},Rs,{children:[ne,S?k.jsx(so,w({},Ns,{ref:He})):null]}))}))}))]})});process.env.NODE_ENV!=="production"&&(Yi.propTypes={arrow:s.bool,children:an.isRequired,classes:s.object,className:s.string,components:s.shape({Arrow:s.elementType,Popper:s.elementType,Tooltip:s.elementType,Transition:s.elementType}),componentsProps:s.shape({arrow:s.object,popper:s.object,tooltip:s.object,transition:s.object}),describeChild:s.bool,disableFocusListener:s.bool,disableHoverListener:s.bool,disableInteractive:s.bool,disableTouchListener:s.bool,enterDelay:s.number,enterNextDelay:s.number,enterTouchDelay:s.number,followCursor:s.bool,id:s.string,leaveDelay:s.number,leaveTouchDelay:s.number,onClose:s.func,onOpen:s.func,open:s.bool,placement:s.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:s.elementType,PopperProps:s.object,slotProps:s.shape({arrow:s.object,popper:s.object,tooltip:s.object,transition:s.object}),slots:s.shape({arrow:s.elementType,popper:s.elementType,tooltip:s.elementType,transition:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),title:s.node,TransitionComponent:s.elementType,TransitionProps:s.object});const Ep=Yi;function Zo(e,t,n){return e?k.jsx(pe.ListItemIcon,{className:`papi-menu-icon-${n?"leading":"trailing"}`,children:k.jsx("img",{src:e,alt:`${n?"Leading":"Trailing"} icon for ${t}`})}):void 0}function Ji(e){const{onClick:t,label:n,tooltip:r,allowForLeadingIcons:o=!0,iconPathBefore:i=void 0,iconPathAfter:a=void 0,hasAutoFocus:l=!1,className:c,isDisabled:u=!1,isDense:p=!0,hasDisabledGutters:f=!1,hasDivider:d=!1,focusVisibleClassName:b,id:v,children:m}=e,h=k.jsx(pe.MenuItem,{sx:{lineHeight:.8},autoFocus:l,className:c,disabled:u,dense:p,disableGutters:f,divider:d,focusVisibleClassName:b,onClick:t,id:v,children:n?k.jsxs(k.Fragment,{children:[Zo(i,n,!0),k.jsx(pe.ListItemText,{primary:n,inset:!i&&o}),Zo(a,n,!1)]}):m});return r?k.jsx(Ep,{title:r,placement:"right",children:k.jsx("div",{children:h})}):h}function Zi(e){return Object.entries(e.groups).map(([n,r])=>({id:n,group:r}))}function Tp(e){const[t,n]=ie.useState(void 0),{parentMenuItem:r,menuDefinition:o}=e,i=c=>{n(c.currentTarget)},a=()=>{n(void 0)},l=()=>{let c=Zi(o).filter(u=>"menuItem"in u.group);if(!(r!=null&&r.id))throw new Error("A valid parent menu item is required for submenus.");return c=c.filter(u=>"menuItem"in u.group&&u.group.menuItem===r.id),k.jsx(zr,{...e,includedGroups:c})};return k.jsxs(k.Fragment,{children:[k.jsx(pe.MenuItem,{onClick:i,children:r.label}),k.jsx(pe.Menu,{anchorEl:t,open:!!t,onClose:a,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:l()},r.id)]})}const wp=(e,t)=>t.filter(o=>o.group===e).sort((o,i)=>(o.order||0)-(i.order||0));function zr(e){const{menuDefinition:t,onClick:n,commandHandler:r,includedGroups:o}=e,i=o&&o.length>0?o:Zi(t).filter(d=>!("menuItem"in d.group)),a=Object.values(i).sort((d,b)=>(d.group.order||0)-(b.group.order||0)),l=[];a.forEach(d=>{wp(d.id,t.items).forEach(b=>l.push({item:b,isLastItemInGroup:!1})),l.length>0&&(l[l.length-1].isLastItemInGroup=!0)}),l.length>0&&(l[l.length-1].isLastItemInGroup=!1);const c=l==null?void 0:l.some(d=>"iconPathBefore"in d),u=({item:d,isLastItemInGroup:b})=>({className:"papi-menu-item",label:d.label,tooltip:d.tooltip,iconPathBefore:"iconPathBefore"in d?d.iconPathBefore:void 0,iconPathAfter:"iconPathAfter"in d?d.iconPathAfter:void 0,hasDivider:b,allowForLeadingIcons:c}),[p]=l;if(!p)return k.jsx("div",{});const f=p.item.group;return k.jsx("div",{role:"menu","aria-label":f,children:(()=>{const d=[];return l.forEach((b,v)=>{const{item:m}=b,h=u(b);if("command"in m){const E=m.group+v;d.push(k.jsx(Ji,{onClick:()=>{n==null||n(),r(m)},...h},E))}else d.push(k.jsx(Tp,{parentMenuItem:m,...e},f+m.id))}),d})()},f)}function Qi(e){const{menuDefinition:t,columnId:n}=e;let i=Object.entries(t.groups).map(([a,l])=>({id:a,group:l})).filter(a=>"column"in a.group);return n&&"columns"in t&&t.columns[n]&&(i=i.filter(a=>"column"in a.group&&a.group.column===n)),k.jsx(zr,{...e,includedGroups:i})}function Op({commandHandler:e,menuDefinition:t,id:n,metadata:r,onClick:o,className:i}){return k.jsxs(pe.Grid,{id:n,item:!0,xs:"auto",role:"menu","aria-label":n,className:`papi-menu-column ${i??""}`,children:[k.jsx("h3",{"aria-label":r.label,className:`papi-menu-column-header ${i??""}`,children:r.label}),k.jsx(pe.List,{id:n,dense:!0,className:i??"",children:k.jsx(Qi,{commandHandler:e,menuDefinition:t,columnId:n,onClick:o})})]})}function es({commandHandler:e,className:t,multiColumnMenu:n,id:r}){const{columns:o}=n,i=ie.useMemo(()=>{const a=new Map;return Object.getOwnPropertyNames(o).forEach(l=>{if(l==="isExtensible")return;const c=l,u=o[c];typeof u=="object"&&typeof u.order=="number"&&!Number.isNaN(u.order)&&a.set(u.order,{id:c,metadata:u})}),Array.from(a.values()).sort((l,c)=>(l.metadata.order||0)-(c.metadata.order||0))},[o]);return k.jsx(pe.Grid,{container:!0,spacing:0,className:`papi-multi-column-menu ${t??""}`,columns:i.length,role:"menu","aria-label":"GridMenu",id:r,children:i.map((a,l)=>k.jsx(Op,{commandHandler:e,menuDefinition:n,...a,className:t},l))})}const ts=T.createContext({});process.env.NODE_ENV!=="production"&&(ts.displayName="ListContext");const kp=ts;function Pp(e){return Ue("MuiList",e)}rt("MuiList",["root","padding","dense","subheader"]);const Sp=["children","className","component","dense","disablePadding","subheader"],Cp=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Ze({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},Pp,t)},Rp=ye("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>w({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),ns=T.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiList"}),{children:o,className:i,component:a="ul",dense:l=!1,disablePadding:c=!1,subheader:u}=r,p=ue(r,Sp),f=T.useMemo(()=>({dense:l}),[l]),d=w({},r,{component:a,dense:l,disablePadding:c}),b=Cp(d);return k.jsx(kp.Provider,{value:f,children:k.jsxs(Rp,w({as:a,className:Ne(b.root,i),ref:n,ownerState:d},p,{children:[u,o]}))})});process.env.NODE_ENV!=="production"&&(ns.propTypes={children:s.node,classes:s.object,className:s.string,component:s.elementType,dense:s.bool,disablePadding:s.bool,subheader:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});const Np=ns,$p=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function lr(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Qo(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function rs(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.indexOf(t.keys.join(""))===0}function Ht(e,t,n,r,o,i){let a=!1,l=o(e,t,t?n:!1);for(;l;){if(l===e.firstChild){if(a)return!1;a=!0}const c=r?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!rs(l,i)||c)l=o(e,l,n);else return l.focus(),!0}return!1}const os=T.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:a,className:l,disabledItemsFocusable:c=!1,disableListWrap:u=!1,onKeyDown:p,variant:f="selectedMenu"}=t,d=ue(t,$p),b=T.useRef(null),v=T.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Rt(()=>{o&&b.current.focus()},[o]),T.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(y,x)=>{const g=!b.current.style.width;if(y.clientHeight{const x=b.current,g=y.key,P=we(x).activeElement;if(g==="ArrowDown")y.preventDefault(),Ht(x,P,u,c,lr);else if(g==="ArrowUp")y.preventDefault(),Ht(x,P,u,c,Qo);else if(g==="Home")y.preventDefault(),Ht(x,null,u,c,lr);else if(g==="End")y.preventDefault(),Ht(x,null,u,c,Qo);else if(g.length===1){const S=v.current,j=g.toLowerCase(),_=performance.now();S.keys.length>0&&(_-S.lastTime>500?(S.keys=[],S.repeating=!0,S.previousKeyMatched=!0):S.repeating&&j!==S.keys[0]&&(S.repeating=!1)),S.lastTime=_,S.keys.push(j);const A=P&&!S.repeating&&rs(P,S);S.previousKeyMatched&&(A||Ht(x,P,!1,c,lr,S))?y.preventDefault():S.previousKeyMatched=!1}p&&p(y)},h=Be(b,n);let E=-1;T.Children.forEach(a,(y,x)=>{if(!T.isValidElement(y)){E===x&&(E+=1,E>=a.length&&(E=-1));return}process.env.NODE_ENV!=="production"&&Sn.isFragment(y)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(` `)),y.props.disabled||(f==="selectedMenu"&&y.props.selected||E===-1)&&(E=x),E===x&&(y.props.disabled||y.props.muiSkipListHighlight||y.type.muiSkipListHighlight)&&(E+=1,E>=a.length&&(E=-1))});const $=T.Children.map(a,(y,x)=>{if(x===E){const g={};return i&&(g.autoFocus=!0),y.props.tabIndex===void 0&&f==="selectedMenu"&&(g.tabIndex=0),T.cloneElement(y,g)}return y});return k.jsx(Np,w({role:"menu",ref:h,className:l,onKeyDown:m,tabIndex:o?0:-1},d,{children:$}))});process.env.NODE_ENV!=="production"&&(os.propTypes={autoFocus:s.bool,autoFocusItem:s.bool,children:s.node,className:s.string,disabledItemsFocusable:s.bool,disableListWrap:s.bool,onKeyDown:s.func,variant:s.oneOf(["menu","selectedMenu"])});const Mp=os,Ip=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Ap={entering:{opacity:1},entered:{opacity:1}},is=T.forwardRef(function(t,n){const r=fn(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:l,easing:c,in:u,onEnter:p,onEntered:f,onEntering:d,onExit:b,onExited:v,onExiting:m,style:h,timeout:E=o,TransitionComponent:$=qi}=t,y=ue(t,Ip),x=T.useRef(null),g=Be(x,l.ref,n),P=L=>I=>{if(L){const R=x.current;I===void 0?L(R):L(R,I)}},S=P(d),j=P((L,I)=>{Gi(L);const R=An({style:h,timeout:E,easing:c},{mode:"enter"});L.style.webkitTransition=r.transitions.create("opacity",R),L.style.transition=r.transitions.create("opacity",R),p&&p(L,I)}),_=P(f),A=P(m),B=P(L=>{const I=An({style:h,timeout:E,easing:c},{mode:"exit"});L.style.webkitTransition=r.transitions.create("opacity",I),L.style.transition=r.transitions.create("opacity",I),b&&b(L)}),z=P(v),q=L=>{i&&i(x.current,L)};return k.jsx($,w({appear:a,in:u,nodeRef:x,onEnter:j,onEntered:_,onEntering:S,onExit:B,onExited:z,onExiting:A,addEndListener:q,timeout:E},y,{children:(L,I)=>T.cloneElement(l,w({style:w({opacity:0,visibility:L==="exited"&&!u?"hidden":void 0},Ap[L],h,l.props.style),ref:g},I))}))});process.env.NODE_ENV!=="production"&&(is.propTypes={addEndListener:s.func,appear:s.bool,children:an.isRequired,easing:s.oneOfType([s.shape({enter:s.string,exit:s.string}),s.string]),in:s.bool,onEnter:s.func,onEntered:s.func,onEntering:s.func,onExit:s.func,onExited:s.func,onExiting:s.func,style:s.object,timeout:s.oneOfType([s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})])});const _p=is;function jp(e){return Ue("MuiBackdrop",e)}rt("MuiBackdrop",["root","invisible"]);const Dp=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Bp=e=>{const{classes:t,invisible:n}=e;return Ze({root:["root",n&&"invisible"]},jp,t)},Lp=ye("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>w({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),ss=T.forwardRef(function(t,n){var r,o,i;const a=Qe({props:t,name:"MuiBackdrop"}),{children:l,className:c,component:u="div",components:p={},componentsProps:f={},invisible:d=!1,open:b,slotProps:v={},slots:m={},TransitionComponent:h=_p,transitionDuration:E}=a,$=ue(a,Dp),y=w({},a,{component:u,invisible:d}),x=Bp(y),g=(r=v.root)!=null?r:f.root;return k.jsx(h,w({in:b,timeout:E},$,{children:k.jsx(Lp,w({"aria-hidden":!0},g,{as:(o=(i=m.root)!=null?i:p.Root)!=null?o:u,className:Ne(x.root,c,g==null?void 0:g.className),ownerState:w({},y,g==null?void 0:g.ownerState),classes:x,ref:n,children:l}))}))});process.env.NODE_ENV!=="production"&&(ss.propTypes={children:s.node,classes:s.object,className:s.string,component:s.elementType,components:s.shape({Root:s.elementType}),componentsProps:s.shape({root:s.object}),invisible:s.bool,open:s.bool.isRequired,slotProps:s.shape({root:s.object}),slots:s.shape({root:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),TransitionComponent:s.elementType,transitionDuration:s.oneOfType([s.number,s.shape({appear:s.number,enter:s.number,exit:s.number})])});const Fp=ss;function Vp(e){return Ue("MuiModal",e)}rt("MuiModal",["root","hidden","backdrop"]);const zp=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],Up=e=>{const{open:t,exited:n,classes:r}=e;return Ze({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Vp,r)},Hp=ye("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>w({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),Wp=ye(Fp,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),as=T.forwardRef(function(t,n){var r,o,i,a,l,c;const u=Qe({name:"MuiModal",props:t}),{BackdropComponent:p=Wp,BackdropProps:f,className:d,closeAfterTransition:b=!1,children:v,container:m,component:h,components:E={},componentsProps:$={},disableAutoFocus:y=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:g=!1,disablePortal:P=!1,disableRestoreFocus:S=!1,disableScrollLock:j=!1,hideBackdrop:_=!1,keepMounted:A=!1,onBackdropClick:B,open:z,slotProps:q,slots:L}=u,I=ue(u,zp),R=w({},u,{closeAfterTransition:b,disableAutoFocus:y,disableEnforceFocus:x,disableEscapeKeyDown:g,disablePortal:P,disableRestoreFocus:S,disableScrollLock:j,hideBackdrop:_,keepMounted:A}),{getRootProps:D,getBackdropProps:Q,getTransitionProps:Z,portalRef:O,isTopModal:M,exited:V,hasTransition:K}=Ga(w({},R,{rootRef:n})),F=w({},R,{exited:V}),U=Up(F),W={};if(v.props.tabIndex===void 0&&(W.tabIndex="-1"),K){const{onEnter:J,onExited:C}=Z();W.onEnter=J,W.onExited=C}const G=(r=(o=L==null?void 0:L.root)!=null?o:E.Root)!=null?r:Hp,H=(i=(a=L==null?void 0:L.backdrop)!=null?a:E.Backdrop)!=null?i:p,X=(l=q==null?void 0:q.root)!=null?l:$.root,Y=(c=q==null?void 0:q.backdrop)!=null?c:$.backdrop,ne=ht({elementType:G,externalSlotProps:X,externalForwardedProps:I,getSlotProps:D,additionalProps:{ref:n,as:h},ownerState:F,className:Ne(d,X==null?void 0:X.className,U==null?void 0:U.root,!F.open&&F.exited&&(U==null?void 0:U.hidden))}),N=ht({elementType:H,externalSlotProps:Y,additionalProps:f,getSlotProps:J=>Q(w({},J,{onClick:C=>{B&&B(C),J!=null&&J.onClick&&J.onClick(C)}})),className:Ne(Y==null?void 0:Y.className,f==null?void 0:f.className,U==null?void 0:U.backdrop),ownerState:F});return!A&&!z&&(!K||V)?null:k.jsx(tn,{ref:O,container:m,disablePortal:P,children:k.jsxs(G,w({},ne,{children:[!_&&p?k.jsx(H,w({},N)):null,k.jsx(Rn,{disableEnforceFocus:x,disableAutoFocus:y,disableRestoreFocus:S,isEnabled:M,open:z,children:T.cloneElement(v,W)})]}))})});process.env.NODE_ENV!=="production"&&(as.propTypes={BackdropComponent:s.elementType,BackdropProps:s.object,children:an.isRequired,classes:s.object,className:s.string,closeAfterTransition:s.bool,component:s.elementType,components:s.shape({Backdrop:s.elementType,Root:s.elementType}),componentsProps:s.shape({backdrop:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object])}),container:s.oneOfType([Ke,s.func]),disableAutoFocus:s.bool,disableEnforceFocus:s.bool,disableEscapeKeyDown:s.bool,disablePortal:s.bool,disableRestoreFocus:s.bool,disableScrollLock:s.bool,hideBackdrop:s.bool,keepMounted:s.bool,onBackdropClick:s.func,onClose:s.func,onTransitionEnter:s.func,onTransitionExited:s.func,open:s.bool.isRequired,slotProps:s.shape({backdrop:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object])}),slots:s.shape({backdrop:s.elementType,root:s.elementType}),sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});const qp=as;function Gp(e){return Ue("MuiPaper",e)}rt("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Kp=["className","component","elevation","square","variant"],Xp=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Ze(i,Gp,o)},Yp=ye("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return w({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&w({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${In("#fff",Yo(t.elevation))}, ${In("#fff",Yo(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),ls=T.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiPaper"}),{className:o,component:i="div",elevation:a=1,square:l=!1,variant:c="elevation"}=r,u=ue(r,Kp),p=w({},r,{component:i,elevation:a,square:l,variant:c}),f=Xp(p);return process.env.NODE_ENV!=="production"&&fn().shadows[a]===void 0&&console.error([`MUI: The elevation provided is not available in the theme.`,`Please make sure that \`theme.shadows[${a}]\` is defined.`].join(` `)),k.jsx(Yp,w({as:i,ownerState:p,className:Ne(f.root,o),ref:n},u))});process.env.NODE_ENV!=="production"&&(ls.propTypes={children:s.node,classes:s.object,className:s.string,component:s.elementType,elevation:At(xi,e=>{const{elevation:t,variant:n}=e;return t>0&&n==="outlined"?new Error(`MUI: Combining \`elevation={${t}}\` with \`variant="${n}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`):null}),square:s.bool,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),variant:s.oneOfType([s.oneOf(["elevation","outlined"]),s.string])});const Jp=ls;function Zp(e){return Ue("MuiPopover",e)}rt("MuiPopover",["root","paper"]);const Qp=["onEntering"],ed=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],td=["slotProps"];function ei(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function ti(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function ni(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function kn(e){return typeof e=="function"?e():e}const nd=e=>{const{classes:t}=e;return Ze({root:["root"],paper:["paper"]},Zp,t)},rd=ye(qp,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),cs=ye(Jp,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),us=T.forwardRef(function(t,n){var r,o,i;const a=Qe({props:t,name:"MuiPopover"}),{action:l,anchorEl:c,anchorOrigin:u={vertical:"top",horizontal:"left"},anchorPosition:p,anchorReference:f="anchorEl",children:d,className:b,container:v,elevation:m=8,marginThreshold:h=16,open:E,PaperProps:$={},slots:y,slotProps:x,transformOrigin:g={vertical:"top",horizontal:"left"},TransitionComponent:P=wr,transitionDuration:S="auto",TransitionProps:{onEntering:j}={},disableScrollLock:_=!1}=a,A=ue(a.TransitionProps,Qp),B=ue(a,ed),z=(r=x==null?void 0:x.paper)!=null?r:$,q=T.useRef(),L=Be(q,z.ref),I=w({},a,{anchorOrigin:u,anchorReference:f,elevation:m,marginThreshold:h,externalPaperSlotProps:z,transformOrigin:g,TransitionComponent:P,transitionDuration:S,TransitionProps:A}),R=nd(I),D=T.useCallback(()=>{if(f==="anchorPosition")return process.env.NODE_ENV!=="production"&&(p||console.error('MUI: You need to provide a `anchorPosition` prop when using .')),p;const J=kn(c),C=J&&J.nodeType===1?J:we(q.current).body,re=C.getBoundingClientRect();if(process.env.NODE_ENV!=="production"){const be=C.getBoundingClientRect();process.env.NODE_ENV!=="test"&&be.top===0&&be.left===0&&be.right===0&&be.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(` `))}return{top:re.top+ei(re,u.vertical),left:re.left+ti(re,u.horizontal)}},[c,u.horizontal,u.vertical,p,f]),Q=T.useCallback(J=>({vertical:ei(J,g.vertical),horizontal:ti(J,g.horizontal)}),[g.horizontal,g.vertical]),Z=T.useCallback(J=>{const C={width:J.offsetWidth,height:J.offsetHeight},re=Q(C);if(f==="none")return{top:null,left:null,transformOrigin:ni(re)};const be=D();let xe=be.top-re.vertical,me=be.left-re.horizontal;const st=xe+C.height,Ee=me+C.width,He=en(kn(c)),Pe=He.innerHeight-h,We=He.innerWidth-h;if(h!==null&&xePe){const ve=st-Pe;xe-=ve,re.vertical+=ve}if(process.env.NODE_ENV!=="production"&&C.height>Pe&&C.height&&Pe&&console.error(["MUI: The popover component is too tall.",`Some part of it can not be seen on the screen (${C.height-Pe}px).`,"Please consider adding a `max-height` to improve the user-experience."].join(` @@ -117,70 +117,78 @@ const theme2 = createTheme({ palette: { color: white; text-decoration: underline; } -.papi-switch { - background-color: transparent; +.papi-snackbar { + font-family: Arial, Helvetica, sans-serif; } -.papi-switch.primary { - background-color: #1ea7fd; +.papi-snackbar.primary { + background: #1ea7fd; + color: white; } -.papi-switch.secondary { - background-color: #6fc8ff; +.papi-snackbar.external { + background-color: lightsteelblue; + border-color: white; + border-style: dotted; + padding: 2%; + width: 30%; } -.papi-switch.error { - background-color: #f00; +.papi-snackbar.secondary { + background: transparent; + color: #333; } -.papi-switch.paratext { - background-color: darkgreen; +.papi-snackbar.alert { + background: lightcoral; +} + +.papi-snackbar.paratext { + background: darkgreen; color: greenyellow; } -.papi-switch.paratext.bright { - background-color: greenyellow; +.papi-snackbar.bright { + background: greenyellow; color: darkgreen; } -.papi-checkbox { - background-color: transparent; -} - -.papi-checkbox.error { - color: #f00; +.papi-context-menu-target { + white-space: nowrap; + cursor: context-menu; } -.papi-checkbox.error:hover { - background-color: rgba(255, 0, 0, 0.2); +.papi-context-menu-target * { + white-space: normal; } -.papi-checkbox.paratext { - color: greenyellow; +.papi-context-menu-target:hover { + box-shadow: 0 0 10px rgba(0, 0, 0, 0.07); /* Faint shadowy background */ } -.papi-checkbox-label.paratext { - color: darkgreen; +.papi-context-menu-target.paratext:hover { + box-shadow: 0 0 10px rgba(0, 100, 0, 0.07); /* Faint shadowy background */ } -.papi-checkbox.paratext:hover { - background-color: rgba(0, 100, 0, 0.3); +.papi-context-menu-target.paratext.bright:hover { + box-shadow: 0 0 10px rgba(173, 255, 47, 0.07); /* Faint shadowy background */ } -.papi-checkbox.paratext.bright { - color: darkgreen; +.papi-context-menu.paratext ul { + background-color: rgb(76, 106, 76); + color: rgb(214, 255, 152); } -.papi-checkbox-label.paratext.bright { - background-color: greenyellow; +.papi-context-menu.paratext.bright ul { + color: rgb(76, 106, 76); + background-color: rgb(214, 255, 152); } - -.papi-checkbox.paratext.bright:hover { - background-color: rgba(173, 255, 47, 0.3); +.search-bar-paper { + display: flex; + align-items: center; } -.papi-checkbox.below, -.papi-checkbox.above { - text-align: center; +.search-button { + padding: 10px; } .papi-slider { background-color: transparent; @@ -200,128 +208,102 @@ const theme2 = createTheme({ palette: { background-color: greenyellow; color: darkgreen; } -.search-bar-paper { - display: flex; - align-items: center; -} - -.search-button { - padding: 10px; -} -.papi-icon-button { - border: 0; - border-radius: 3em; - cursor: pointer; +.papi-ref-selector.book { display: inline-block; + vertical-align: middle; } -.papi-icon-button.primary { - background-color: #1ea7fd; - color: white; +.papi-ref-selector.chapter-verse { + width: 75px; } - -.papi-icon-button.secondary { +.papi-switch { background-color: transparent; - color: #333; } -.papi-icon-button.paratext { - background-color: darkgreen; - color: greenyellow; +.papi-switch.primary { + background-color: #1ea7fd; } -.papi-icon-button.paratext.bright { - background-color: greenyellow; - color: darkgreen; +.papi-switch.secondary { + background-color: #6fc8ff; } -.papi-toolbar { - background-color: #eee; - color: black; + +.papi-switch.error { + background-color: #f00; } -.papi-toolbar.paratext { +.papi-switch.paratext { background-color: darkgreen; color: greenyellow; } -.papi-toolbar.paratext.bright { +.papi-switch.paratext.bright { background-color: greenyellow; color: darkgreen; } - -.papi-menu-drawer-paper { - height: fit-content !important; - position: absolute !important; +.papi-checkbox { + background-color: transparent; } -.papi-menu-children { - padding: 10px; - position: relative; -} -.papi-context-menu-target { - white-space: nowrap; - cursor: context-menu; +.papi-checkbox.error { + color: #f00; } -.papi-context-menu-target * { - white-space: normal; +.papi-checkbox.error:hover { + background-color: rgba(255, 0, 0, 0.2); } -.papi-context-menu-target:hover { - box-shadow: 0 0 10px rgba(0, 0, 0, 0.07); /* Faint shadowy background */ +.papi-checkbox.paratext { + color: greenyellow; } -.papi-context-menu-target.paratext:hover { - box-shadow: 0 0 10px rgba(0, 100, 0, 0.07); /* Faint shadowy background */ +.papi-checkbox-label.paratext { + color: darkgreen; } -.papi-context-menu-target.paratext.bright:hover { - box-shadow: 0 0 10px rgba(173, 255, 47, 0.07); /* Faint shadowy background */ +.papi-checkbox.paratext:hover { + background-color: rgba(0, 100, 0, 0.3); } -.papi-context-menu.paratext ul { - background-color: rgb(76, 106, 76); - color: rgb(214, 255, 152); +.papi-checkbox.paratext.bright { + color: darkgreen; } -.papi-context-menu.paratext.bright ul { - color: rgb(76, 106, 76); - background-color: rgb(214, 255, 152); -} -.papi-snackbar { - font-family: Arial, Helvetica, sans-serif; +.papi-checkbox-label.paratext.bright { + background-color: greenyellow; } -.papi-snackbar.primary { - background: #1ea7fd; - color: white; +.papi-checkbox.paratext.bright:hover { + background-color: rgba(173, 255, 47, 0.3); } -.papi-snackbar.external { - background-color: lightsteelblue; - border-color: white; - border-style: dotted; - padding: 2%; - width: 30%; +.papi-checkbox.below, +.papi-checkbox.above { + text-align: center; +} +.papi-toolbar { + background-color: #eee; + color: black; } -.papi-snackbar.secondary { - background: transparent; - color: #333; +.papi-toolbar.paratext { + background-color: darkgreen; + color: greenyellow; } -.papi-snackbar.alert { - background: lightcoral; +.papi-toolbar.paratext.bright { + background-color: greenyellow; + color: darkgreen; } -.papi-snackbar.paratext { - background: darkgreen; - color: greenyellow; +.papi-menu-drawer-paper { + height: fit-content !important; + position: absolute !important; } -.papi-snackbar.bright { - background: greenyellow; - color: darkgreen; +.papi-menu-children { + padding: 10px; + position: relative; } .papi-menu-item { background-color: transparent; @@ -336,47 +318,52 @@ const theme2 = createTheme({ palette: { max-width: 24px; max-height: 24px; } -.papi-multi-column-menu { - background-color: rgb(222, 222, 222); - display: flex; - flex-direction: column; - padding-left: 3px; - padding-right: 3px; +.papi-icon-button { + border: 0; + border-radius: 3em; + cursor: pointer; + display: inline-block; } -.papi-menu-column { - font-size: 11pt; - font-weight: 600; - padding-bottom: 2px; +.papi-icon-button.primary { + background-color: #1ea7fd; + color: white; } -.papi-menu-column ul { - padding-top: 0; +.papi-icon-button.secondary { + background-color: transparent; + color: #333; } -.papi-menu-column-header { - background-color: rgb(181, 181, 181); - padding-left: 24px; - margin-top: 0; - margin-bottom: 0; +.papi-icon-button.paratext { + background-color: darkgreen; + color: greenyellow; } -.papi-multi-column-menu.paratext { - background-color: rgb(76, 106, 76); - color: rgb(214, 255, 152); +.papi-icon-button.paratext.bright { + background-color: greenyellow; + color: darkgreen; +} +.papi-combo-box { + background-color: transparent; } -.papi-multi-column-menu.paratext.bright { - color: rgb(76, 106, 76); - background-color: rgb(214, 255, 152); +.papi-combo-box.fullwidth { + width: 100%; } -.papi-ref-selector.book { - display: inline-block; - vertical-align: middle; + +.papi-combo-box.error { + background-color: #f00; } -.papi-ref-selector.chapter-verse { - width: 75px; +.papi-combo-box.paratext { + background-color: darkgreen; + color: greenyellow; +} + +.papi-combo-box.paratext.bright { + background-color: greenyellow; + color: darkgreen; } @layer rdg.MeasuringCell {.m1l09lto7-0-0-beta-34 { contain: strict; @@ -823,35 +810,48 @@ const theme2 = createTheme({ palette: { } } -.papi-table.paratext { - background-color: darkgreen; - color: greenyellow; +.papi-multi-column-menu { + background-color: rgb(222, 222, 222); + display: flex; + flex-direction: column; + padding-left: 3px; + padding-right: 3px; } -.papi-table.paratext.bright { - color: darkgreen; - background-color: greenyellow; +.papi-menu-column { + font-size: 11pt; + font-weight: 600; + padding-bottom: 2px; } -.papi-combo-box { - background-color: transparent; + +.papi-menu-column ul { + padding-top: 0; } -.papi-combo-box.fullwidth { - width: 100%; +.papi-menu-column-header { + background-color: rgb(181, 181, 181); + padding-left: 24px; + margin-top: 0; + margin-bottom: 0; } -.papi-combo-box.error { - background-color: #f00; +.papi-multi-column-menu.paratext { + background-color: rgb(76, 106, 76); + color: rgb(214, 255, 152); } -.papi-combo-box.paratext { +.papi-multi-column-menu.paratext.bright { + color: rgb(76, 106, 76); + background-color: rgb(214, 255, 152); +} +.papi-table.paratext { background-color: darkgreen; color: greenyellow; } -.papi-combo-box.paratext.bright { - background-color: greenyellow; +.papi-table.paratext.bright { color: darkgreen; + background-color: greenyellow; } `,"top"); //# sourceMappingURL=index.cjs.map diff --git a/lib/platform-bible-react/dist/index.cjs.map b/lib/platform-bible-react/dist/index.cjs.map index 39ef85b1a7..d240ba337c 100644 --- a/lib/platform-bible-react/dist/index.cjs.map +++ b/lib/platform-bible-react/dist/index.cjs.map @@ -1 +1 @@ -{"version":3,"file":"index.cjs","sources":["../src/components/button.component.tsx","../src/components/combo-box.component.tsx","../src/components/chapter-range-selector.component.tsx","../src/components/label-position.model.ts","../src/components/checkbox.component.tsx","../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../../node_modules/@babel/runtime/helpers/esm/extends.js","../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js","../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js","../../../node_modules/prop-types/node_modules/react-is/index.js","../../../node_modules/object-assign/index.js","../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../node_modules/prop-types/lib/has.js","../../../node_modules/prop-types/checkPropTypes.js","../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../node_modules/prop-types/index.js","../../../node_modules/@mui/material/node_modules/clsx/dist/clsx.mjs","../../../node_modules/@mui/utils/chainPropTypes/chainPropTypes.js","../../../node_modules/@mui/utils/deepmerge/deepmerge.js","../../../node_modules/@mui/utils/elementAcceptingRef/elementAcceptingRef.js","../../../node_modules/@mui/utils/elementTypeAcceptingRef/elementTypeAcceptingRef.js","../../../node_modules/@mui/utils/exactProp/exactProp.js","../../../node_modules/@mui/utils/formatMuiErrorMessage/formatMuiErrorMessage.js","../../../node_modules/react-is/cjs/react-is.production.min.js","../../../node_modules/react-is/cjs/react-is.development.js","../../../node_modules/react-is/index.js","../../../node_modules/@mui/utils/getDisplayName/getDisplayName.js","../../../node_modules/@mui/utils/HTMLElementType/HTMLElementType.js","../../../node_modules/@mui/utils/refType/refType.js","../../../node_modules/@mui/utils/capitalize/capitalize.js","../../../node_modules/@mui/utils/createChainedFunction/createChainedFunction.js","../../../node_modules/@mui/utils/debounce/debounce.js","../../../node_modules/@mui/utils/ownerDocument/ownerDocument.js","../../../node_modules/@mui/utils/ownerWindow/ownerWindow.js","../../../node_modules/@mui/utils/setRef/setRef.js","../../../node_modules/@mui/utils/useEnhancedEffect/useEnhancedEffect.js","../../../node_modules/@mui/utils/useId/useId.js","../../../node_modules/@mui/utils/useControlled/useControlled.js","../../../node_modules/@mui/utils/useEventCallback/useEventCallback.js","../../../node_modules/@mui/utils/useForkRef/useForkRef.js","../../../node_modules/@mui/utils/useLazyRef/useLazyRef.js","../../../node_modules/@mui/utils/useOnMount/useOnMount.js","../../../node_modules/@mui/utils/useTimeout/useTimeout.js","../../../node_modules/@mui/utils/useIsFocusVisible/useIsFocusVisible.js","../../../node_modules/@mui/utils/getScrollbarSize/getScrollbarSize.js","../../../node_modules/@mui/utils/integerPropType/integerPropType.js","../../../node_modules/@mui/utils/resolveProps/resolveProps.js","../../../node_modules/@mui/utils/composeClasses/composeClasses.js","../../../node_modules/@mui/utils/ClassNameGenerator/ClassNameGenerator.js","../../../node_modules/@mui/utils/generateUtilityClass/generateUtilityClass.js","../../../node_modules/@mui/utils/generateUtilityClasses/generateUtilityClasses.js","../../../node_modules/@mui/utils/clamp/clamp.js","../../../node_modules/@mui/base/utils/isHostComponent.js","../../../node_modules/@mui/base/utils/appendOwnerState.js","../../../node_modules/@mui/base/utils/ClassNameConfigurator.js","../../../node_modules/@mui/base/utils/extractEventHandlers.js","../../../node_modules/@mui/base/utils/resolveComponentProps.js","../../../node_modules/@mui/base/node_modules/clsx/dist/clsx.mjs","../../../node_modules/@mui/base/utils/omitEventHandlers.js","../../../node_modules/@mui/base/utils/mergeSlotProps.js","../../../node_modules/@mui/base/utils/useSlotProps.js","../../../node_modules/@mui/base/generateUtilityClass/index.js","../../../node_modules/@mui/base/generateUtilityClasses/index.js","../../../node_modules/@mui/base/FocusTrap/FocusTrap.js","../../../node_modules/@mui/base/Portal/Portal.js","../../../node_modules/@mui/base/unstable_useModal/ModalManager.js","../../../node_modules/@mui/base/unstable_useModal/useModal.js","../../../node_modules/@popperjs/core/lib/enums.js","../../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js","../../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js","../../../node_modules/@popperjs/core/lib/utils/math.js","../../../node_modules/@popperjs/core/lib/utils/userAgent.js","../../../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","../../../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/contains.js","../../../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","../../../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","../../../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","../../../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","../../../node_modules/@popperjs/core/lib/utils/within.js","../../../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","../../../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","../../../node_modules/@popperjs/core/lib/utils/expandToHashMap.js","../../../node_modules/@popperjs/core/lib/modifiers/arrow.js","../../../node_modules/@popperjs/core/lib/utils/getVariation.js","../../../node_modules/@popperjs/core/lib/modifiers/computeStyles.js","../../../node_modules/@popperjs/core/lib/modifiers/eventListeners.js","../../../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","../../../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","../../../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","../../../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","../../../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","../../../node_modules/@popperjs/core/lib/utils/rectToClientRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","../../../node_modules/@popperjs/core/lib/utils/computeOffsets.js","../../../node_modules/@popperjs/core/lib/utils/detectOverflow.js","../../../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","../../../node_modules/@popperjs/core/lib/modifiers/flip.js","../../../node_modules/@popperjs/core/lib/modifiers/hide.js","../../../node_modules/@popperjs/core/lib/modifiers/offset.js","../../../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","../../../node_modules/@popperjs/core/lib/utils/getAltAxis.js","../../../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","../../../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","../../../node_modules/@popperjs/core/lib/utils/orderModifiers.js","../../../node_modules/@popperjs/core/lib/utils/debounce.js","../../../node_modules/@popperjs/core/lib/utils/mergeByName.js","../../../node_modules/@popperjs/core/lib/createPopper.js","../../../node_modules/@popperjs/core/lib/popper.js","../../../node_modules/@mui/base/Popper/popperClasses.js","../../../node_modules/@mui/base/Popper/Popper.js","../../../node_modules/@mui/system/esm/createTheme/createBreakpoints.js","../../../node_modules/@mui/system/esm/createTheme/shape.js","../../../node_modules/@mui/system/esm/responsivePropType.js","../../../node_modules/@mui/system/esm/merge.js","../../../node_modules/@mui/system/esm/breakpoints.js","../../../node_modules/@mui/system/esm/style.js","../../../node_modules/@mui/system/esm/memoize.js","../../../node_modules/@mui/system/esm/spacing.js","../../../node_modules/@mui/system/esm/createTheme/createSpacing.js","../../../node_modules/@mui/system/esm/compose.js","../../../node_modules/@mui/system/esm/borders.js","../../../node_modules/@mui/system/esm/cssGrid.js","../../../node_modules/@mui/system/esm/palette.js","../../../node_modules/@mui/system/esm/sizing.js","../../../node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js","../../../node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js","../../../node_modules/@mui/system/esm/createTheme/applyStyles.js","../../../node_modules/@mui/system/esm/createTheme/createTheme.js","../../../node_modules/@mui/system/esm/useThemeWithoutDefault.js","../../../node_modules/@mui/system/esm/useTheme.js","../../../node_modules/@mui/system/esm/createStyled.js","../../../node_modules/@mui/system/esm/useThemeProps/getThemeProps.js","../../../node_modules/@mui/system/esm/useThemeProps/useThemeProps.js","../../../node_modules/@mui/system/esm/colorManipulator.js","../../../node_modules/@mui/material/styles/createMixins.js","../../../node_modules/@mui/material/colors/common.js","../../../node_modules/@mui/material/colors/grey.js","../../../node_modules/@mui/material/colors/purple.js","../../../node_modules/@mui/material/colors/red.js","../../../node_modules/@mui/material/colors/orange.js","../../../node_modules/@mui/material/colors/blue.js","../../../node_modules/@mui/material/colors/lightBlue.js","../../../node_modules/@mui/material/colors/green.js","../../../node_modules/@mui/material/styles/createPalette.js","../../../node_modules/@mui/material/styles/createTypography.js","../../../node_modules/@mui/material/styles/shadows.js","../../../node_modules/@mui/material/styles/createTransitions.js","../../../node_modules/@mui/material/styles/zIndex.js","../../../node_modules/@mui/material/styles/createTheme.js","../../../node_modules/@mui/material/styles/defaultTheme.js","../../../node_modules/@mui/material/styles/identifier.js","../../../node_modules/@mui/material/styles/styled.js","../../../node_modules/@mui/material/styles/useTheme.js","../../../node_modules/@mui/material/styles/useThemeProps.js","../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../../../node_modules/react-transition-group/esm/config.js","../../../node_modules/react-transition-group/esm/utils/PropTypes.js","../../../node_modules/react-transition-group/esm/TransitionGroupContext.js","../../../node_modules/react-transition-group/esm/utils/reflow.js","../../../node_modules/react-transition-group/esm/Transition.js","../../../node_modules/@mui/material/transitions/utils.js","../../../node_modules/@mui/material/Grow/Grow.js","../../../node_modules/@mui/material/styles/getOverlayAlpha.js","../../../node_modules/@mui/material/Popper/Popper.js","../../../node_modules/@mui/material/Tooltip/tooltipClasses.js","../../../node_modules/@mui/material/Tooltip/Tooltip.js","../src/components/menu-item.component.tsx","../src/components/grouped-menu-item-list.component.tsx","../src/components/top-level-menu.component.tsx","../src/components/grid-menu.component.tsx","../../../node_modules/@mui/material/List/ListContext.js","../../../node_modules/@mui/material/List/listClasses.js","../../../node_modules/@mui/material/List/List.js","../../../node_modules/@mui/material/MenuList/MenuList.js","../../../node_modules/@mui/material/Fade/Fade.js","../../../node_modules/@mui/material/Backdrop/backdropClasses.js","../../../node_modules/@mui/material/Backdrop/Backdrop.js","../../../node_modules/@mui/material/Modal/modalClasses.js","../../../node_modules/@mui/material/Modal/Modal.js","../../../node_modules/@mui/material/Paper/paperClasses.js","../../../node_modules/@mui/material/Paper/Paper.js","../../../node_modules/@mui/material/Popover/popoverClasses.js","../../../node_modules/@mui/material/Popover/Popover.js","../../../node_modules/@mui/material/Menu/menuClasses.js","../../../node_modules/@mui/material/Menu/Menu.js","../src/components/context-menu.component.tsx","../src/components/icon-button.component.tsx","../../../node_modules/@sillsdev/scripture/dist/index.es.js","../src/components/text-field.component.tsx","../src/components/ref-selector.component.tsx","../src/components/search-bar.component.tsx","../src/components/slider.component.tsx","../src/components/snackbar.component.tsx","../src/components/switch.component.tsx","../src/components/table.component.tsx","../../../node_modules/@mui/material/SvgIcon/svgIconClasses.js","../../../node_modules/@mui/material/SvgIcon/SvgIcon.js","../../../node_modules/@mui/material/utils/createSvgIcon.js","../../../node_modules/@mui/icons-material/esm/Menu.js","../src/components/toolbar.component.tsx","../src/hooks/use-event.hook.ts","../src/hooks/use-promise.hook.ts","../src/hooks/use-event-async.hook.ts"],"sourcesContent":["import { Button as MuiButton } from '@mui/material';\nimport { MouseEventHandler, PropsWithChildren } from 'react';\nimport './button.component.css';\n\nexport type ButtonProps = PropsWithChildren<{\n /** Optional unique identifier */\n id?: string;\n /**\n * Enabled status of button\n *\n * @default false\n */\n isDisabled?: boolean;\n /** Additional css classes to help with unique styling of the button */\n className?: string;\n /** Optional click handler */\n onClick?: MouseEventHandler;\n /** Optional context menu handler */\n onContextMenu?: MouseEventHandler;\n}>;\n\n/**\n * Button a user can click to do something\n *\n * Thanks to MUI for heavy inspiration and documentation\n * https://mui.com/material-ui/getting-started/overview/\n */\nfunction Button({\n id,\n isDisabled = false,\n className,\n onClick,\n onContextMenu,\n children,\n}: ButtonProps) {\n return (\n \n {children}\n \n );\n}\n\nexport default Button;\n","import {\n Autocomplete as MuiComboBox,\n AutocompleteChangeDetails,\n AutocompleteChangeReason,\n TextField as MuiTextField,\n AutocompleteValue,\n} from '@mui/material';\nimport { FocusEventHandler, SyntheticEvent } from 'react';\nimport './combo-box.component.css';\n\nexport type ComboBoxLabelOption = { label: string };\nexport type ComboBoxOption = string | number | ComboBoxLabelOption;\nexport type ComboBoxValue = AutocompleteValue;\nexport type ComboBoxChangeDetails = AutocompleteChangeDetails;\nexport type ComboBoxChangeReason = AutocompleteChangeReason;\n\nexport type ComboBoxProps = {\n /** Optional unique identifier */\n id?: string;\n /** Text label title for combobox */\n title?: string;\n /**\n * If `true`, the component is disabled.\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * If `true`, the component can be cleared, and will have a button to do so\n *\n * @default true\n */\n isClearable?: boolean;\n /**\n * True when (input related to) switch is erroneous\n *\n * @default false\n */\n hasError?: boolean;\n /**\n * If `true`, the input will take up the full width of its container.\n *\n * @default false\n */\n isFullWidth?: boolean;\n /** Width of the combobox in pixels. Setting this prop overrides the `isFullWidth` prop */\n width?: number;\n /** List of available options for the dropdown menu */\n options?: readonly T[];\n /** Additional css classes to help with unique styling of the combo box */\n className?: string;\n /**\n * The selected value that the combo box currently holds. Must be shallow equal to one of the\n * options entries.\n */\n value?: T;\n /** Triggers when content of textfield is changed */\n onChange?: (\n event: SyntheticEvent,\n value: ComboBoxValue,\n reason?: ComboBoxChangeReason,\n details?: ComboBoxChangeDetails | undefined,\n ) => void;\n /** Triggers when textfield gets focus */\n onFocus?: FocusEventHandler; // Storybook crashes when giving the combo box focus\n /** Triggers when textfield loses focus */\n onBlur?: FocusEventHandler;\n /** Used to determine the string value for a given option. */\n getOptionLabel?: (option: ComboBoxOption) => string;\n};\n\n/**\n * Dropdown selector displaying various options from which to choose\n *\n * Thanks to MUI for heavy inspiration and documentation\n * https://mui.com/material-ui/getting-started/overview/\n */\nfunction ComboBox({\n id,\n title,\n isDisabled = false,\n isClearable = true,\n hasError = false,\n isFullWidth = false,\n width,\n options = [],\n className,\n value,\n onChange,\n onFocus,\n onBlur,\n getOptionLabel,\n}: ComboBoxProps) {\n return (\n \n id={id}\n disablePortal\n disabled={isDisabled}\n disableClearable={!isClearable}\n fullWidth={isFullWidth}\n options={options}\n className={`papi-combo-box ${hasError ? 'error' : ''} ${className ?? ''}`}\n value={value}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n getOptionLabel={getOptionLabel}\n renderInput={(props) => (\n \n )}\n />\n );\n}\n\nexport default ComboBox;\n","import { SyntheticEvent, useMemo } from 'react';\nimport { FormControlLabel } from '@mui/material';\nimport ComboBox from './combo-box.component';\n\nexport type ChapterRangeSelectorProps = {\n startChapter: number;\n endChapter: number;\n handleSelectStartChapter: (chapter: number) => void;\n handleSelectEndChapter: (chapter: number) => void;\n isDisabled?: boolean;\n chapterCount: number;\n};\n\nexport default function ChapterRangeSelector({\n startChapter,\n endChapter,\n handleSelectStartChapter,\n handleSelectEndChapter,\n isDisabled,\n chapterCount,\n}: ChapterRangeSelectorProps) {\n const numberArray = useMemo(\n () => Array.from({ length: chapterCount }, (_, index) => index + 1),\n [chapterCount],\n );\n\n const onChangeStartChapter = (_event: SyntheticEvent, value: number) => {\n handleSelectStartChapter(value);\n if (value > endChapter) {\n handleSelectEndChapter(value);\n }\n };\n\n const onChangeEndChapter = (_event: SyntheticEvent, value: number) => {\n handleSelectEndChapter(value);\n if (value < startChapter) {\n handleSelectStartChapter(value);\n }\n };\n\n return (\n <>\n onChangeStartChapter(e, value as number)}\n className=\"book-selection-chapter\"\n key=\"start chapter\"\n isClearable={false}\n options={numberArray}\n getOptionLabel={(option) => option.toString()}\n value={startChapter}\n isDisabled={isDisabled}\n />\n }\n label=\"Chapters\"\n labelPlacement=\"start\"\n />\n onChangeEndChapter(e, value as number)}\n className=\"book-selection-chapter\"\n key=\"end chapter\"\n isClearable={false}\n options={numberArray}\n getOptionLabel={(option) => option.toString()}\n value={endChapter}\n isDisabled={isDisabled}\n />\n }\n label=\"to\"\n labelPlacement=\"start\"\n />\n \n );\n}\n","enum LabelPosition {\n After = 'after',\n Before = 'before',\n Above = 'above',\n Below = 'below',\n}\n\nexport default LabelPosition;\n","import { FormLabel, Checkbox as MuiCheckbox } from '@mui/material';\nimport { ChangeEvent } from 'react';\nimport './checkbox.component.css';\nimport LabelPosition from './label-position.model';\n\nexport type CheckboxProps = {\n /** Optional unique identifier */\n id?: string;\n /** If `true`, the component is checked. */\n isChecked?: boolean;\n /**\n * If specified, the label that will appear associated with the checkbox.\n *\n * @default '' (no label will be shown)\n */\n labelText?: string;\n /**\n * Indicates the position of the label relative to the checkbox.\n *\n * @default 'after'\n */\n labelPosition?: LabelPosition;\n /**\n * If `true`, the component is in the indeterminate state.\n *\n * @default false\n */\n isIndeterminate?: boolean;\n /** If `true`, the component is checked by default. */\n isDefaultChecked?: boolean;\n /**\n * Enabled status of switch\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * True when (input related to) switch is erroneous\n *\n * @default false\n */\n hasError?: boolean;\n /** Additional css classes to help with unique styling of the switch */\n className?: string;\n /**\n * Callback fired when the state is changed.\n *\n * @param event The event source of the callback. You can pull out the new value by accessing\n * event.target.value (string). You can pull out the new checked state by accessing\n * event.target.checked (boolean).\n */\n onChange?: (event: ChangeEvent) => void;\n};\n\n/* function CheckboxContainer({ labelText? = '', isDisabled : boolean, hasError : boolean, children? }) {\n return (\n \n {children}\n labelText\n \n );\n} */\n\n/** Primary UI component for user interaction */\nfunction Checkbox({\n id,\n isChecked,\n labelText = '',\n labelPosition = LabelPosition.After,\n isIndeterminate = false,\n isDefaultChecked,\n isDisabled = false,\n hasError = false,\n className,\n onChange,\n}: CheckboxProps) {\n const checkBox = (\n \n );\n\n let result;\n\n if (labelText) {\n const preceding =\n labelPosition === LabelPosition.Before || labelPosition === LabelPosition.Above;\n\n const labelSpan = (\n \n {labelText}\n \n );\n\n const labelIsInline =\n labelPosition === LabelPosition.Before || labelPosition === LabelPosition.After;\n\n const label = labelIsInline ? labelSpan :
{labelSpan}
;\n\n const checkBoxElement = labelIsInline ? checkBox :
{checkBox}
;\n\n result = (\n \n {preceding && label}\n {checkBoxElement}\n {!preceding && label}\n \n );\n } else {\n result = checkBox;\n }\n return result;\n}\n\nexport default Checkbox;\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n 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.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t null;\n }\n return function validate(...args) {\n return propType1(...args) || propType2(...args);\n };\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// https://github.com/sindresorhus/is-plain-obj/blob/main/index.js\nexport function isPlainObject(item) {\n if (typeof item !== 'object' || item === null) {\n return false;\n }\n const prototype = Object.getPrototypeOf(item);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);\n}\nfunction deepClone(source) {\n if (!isPlainObject(source)) {\n return source;\n }\n const output = {};\n Object.keys(source).forEach(key => {\n output[key] = deepClone(source[key]);\n });\n return output;\n}\nexport default function deepmerge(target, source, options = {\n clone: true\n}) {\n const output = options.clone ? _extends({}, target) : target;\n if (isPlainObject(target) && isPlainObject(source)) {\n Object.keys(source).forEach(key => {\n // Avoid prototype pollution\n if (key === '__proto__') {\n return;\n }\n if (isPlainObject(source[key]) && key in target && isPlainObject(target[key])) {\n // Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.\n output[key] = deepmerge(target[key], source[key], options);\n } else if (options.clone) {\n output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];\n } else {\n output[key] = source[key];\n }\n });\n }\n return output;\n}","import PropTypes from 'prop-types';\nimport chainPropTypes from '../chainPropTypes';\nfunction isClassComponent(elementType) {\n // elementType.prototype?.isReactComponent\n const {\n prototype = {}\n } = elementType;\n return Boolean(prototype.isReactComponent);\n}\nfunction acceptingRef(props, propName, componentName, location, propFullName) {\n const element = props[propName];\n const safePropName = propFullName || propName;\n if (element == null ||\n // When server-side rendering React doesn't warn either.\n // This is not an accurate check for SSR.\n // This is only in place for Emotion compat.\n // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.\n typeof window === 'undefined') {\n return null;\n }\n let warningHint;\n const elementType = element.type;\n /**\n * Blacklisting instead of whitelisting\n *\n * Blacklisting will miss some components, such as React.Fragment. Those will at least\n * trigger a warning in React.\n * We can't whitelist because there is no safe way to detect React.forwardRef\n * or class components. \"Safe\" means there's no public API.\n *\n */\n if (typeof elementType === 'function' && !isClassComponent(elementType)) {\n warningHint = 'Did you accidentally use a plain function component for an element instead?';\n }\n if (warningHint !== undefined) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an element that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');\n }\n return null;\n}\nconst elementAcceptingRef = chainPropTypes(PropTypes.element, acceptingRef);\nelementAcceptingRef.isRequired = chainPropTypes(PropTypes.element.isRequired, acceptingRef);\nexport default elementAcceptingRef;","import PropTypes from 'prop-types';\nimport chainPropTypes from '../chainPropTypes';\nfunction isClassComponent(elementType) {\n // elementType.prototype?.isReactComponent\n const {\n prototype = {}\n } = elementType;\n return Boolean(prototype.isReactComponent);\n}\nfunction elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {\n const propValue = props[propName];\n const safePropName = propFullName || propName;\n if (propValue == null ||\n // When server-side rendering React doesn't warn either.\n // This is not an accurate check for SSR.\n // This is only in place for emotion compat.\n // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.\n typeof window === 'undefined') {\n return null;\n }\n let warningHint;\n\n /**\n * Blacklisting instead of whitelisting\n *\n * Blacklisting will miss some components, such as React.Fragment. Those will at least\n * trigger a warning in React.\n * We can't whitelist because there is no safe way to detect React.forwardRef\n * or class components. \"Safe\" means there's no public API.\n *\n */\n if (typeof propValue === 'function' && !isClassComponent(propValue)) {\n warningHint = 'Did you accidentally provide a plain function component instead?';\n }\n if (warningHint !== undefined) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an element type that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');\n }\n return null;\n}\nexport default chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef);","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// This module is based on https://github.com/airbnb/prop-types-exact repository.\n// However, in order to reduce the number of dependencies and to remove some extra safe checks\n// the module was forked.\n\nconst specialProperty = 'exact-prop: \\u200b';\nexport default function exactProp(propTypes) {\n if (process.env.NODE_ENV === 'production') {\n return propTypes;\n }\n return _extends({}, propTypes, {\n [specialProperty]: props => {\n const unsupportedProps = Object.keys(props).filter(prop => !propTypes.hasOwnProperty(prop));\n if (unsupportedProps.length > 0) {\n return new Error(`The following props are not supported: ${unsupportedProps.map(prop => `\\`${prop}\\``).join(', ')}. Please remove them.`);\n }\n return null;\n }\n });\n}","/**\n * WARNING: Don't import this directly.\n * Use `MuiError` from `@mui/internal-babel-macros/MuiError.macro` instead.\n * @param {number} code\n */\nexport default function formatMuiErrorMessage(code) {\n // Apply babel-plugin-transform-template-literals in loose mode\n // loose mode is safe if we're concatenating primitives\n // see https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose\n /* eslint-disable prefer-template */\n let url = 'https://mui.com/production-error/?code=' + code;\n for (let i = 1; i < arguments.length; i += 1) {\n // rest params over-transpile for this case\n // eslint-disable-next-line prefer-rest-params\n url += '&args[]=' + encodeURIComponent(arguments[i]);\n }\n return 'Minified MUI error #' + code + '; visit ' + url + ' for the full message.';\n /* eslint-enable prefer-template */\n}","/**\n * @license React\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=Symbol.for(\"react.element\"),c=Symbol.for(\"react.portal\"),d=Symbol.for(\"react.fragment\"),e=Symbol.for(\"react.strict_mode\"),f=Symbol.for(\"react.profiler\"),g=Symbol.for(\"react.provider\"),h=Symbol.for(\"react.context\"),k=Symbol.for(\"react.server_context\"),l=Symbol.for(\"react.forward_ref\"),m=Symbol.for(\"react.suspense\"),n=Symbol.for(\"react.suspense_list\"),p=Symbol.for(\"react.memo\"),q=Symbol.for(\"react.lazy\"),t=Symbol.for(\"react.offscreen\"),u;u=Symbol.for(\"react.module.reference\");\nfunction v(a){if(\"object\"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;\nexports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};\nexports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||\"object\"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;\n","/**\n * @license React\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_SERVER_CONTEXT_TYPE:\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n}\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar SuspenseList = REACT_SUSPENSE_LIST_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false;\nvar hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n}\nfunction isConcurrentMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsConcurrentMode) {\n hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\nfunction isSuspenseList(object) {\n return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;\n}\n\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.SuspenseList = SuspenseList;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isSuspenseList = isSuspenseList;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","import { ForwardRef, Memo } from 'react-is';\n\n// Simplified polyfill for IE11 support\n// https://github.com/JamesMGreene/Function.name/blob/58b314d4a983110c3682f1228f845d39ccca1817/Function.name.js#L3\nconst fnNameMatchRegex = /^\\s*function(?:\\s|\\s*\\/\\*.*\\*\\/\\s*)+([^(\\s/]*)\\s*/;\nexport function getFunctionName(fn) {\n const match = `${fn}`.match(fnNameMatchRegex);\n const name = match && match[1];\n return name || '';\n}\nfunction getFunctionComponentName(Component, fallback = '') {\n return Component.displayName || Component.name || getFunctionName(Component) || fallback;\n}\nfunction getWrappedName(outerType, innerType, wrapperName) {\n const functionName = getFunctionComponentName(innerType);\n return outerType.displayName || (functionName !== '' ? `${wrapperName}(${functionName})` : wrapperName);\n}\n\n/**\n * cherry-pick from\n * https://github.com/facebook/react/blob/769b1f270e1251d9dbdce0fcbd9e92e502d059b8/packages/shared/getComponentName.js\n * originally forked from recompose/getDisplayName with added IE11 support\n */\nexport default function getDisplayName(Component) {\n if (Component == null) {\n return undefined;\n }\n if (typeof Component === 'string') {\n return Component;\n }\n if (typeof Component === 'function') {\n return getFunctionComponentName(Component, 'Component');\n }\n\n // TypeScript can't have components as objects but they exist in the form of `memo` or `Suspense`\n if (typeof Component === 'object') {\n switch (Component.$$typeof) {\n case ForwardRef:\n return getWrappedName(Component, Component.render, 'ForwardRef');\n case Memo:\n return getWrappedName(Component, Component.type, 'memo');\n default:\n return undefined;\n }\n }\n return undefined;\n}","export default function HTMLElementType(props, propName, componentName, location, propFullName) {\n if (process.env.NODE_ENV === 'production') {\n return null;\n }\n const propValue = props[propName];\n const safePropName = propFullName || propName;\n if (propValue == null) {\n return null;\n }\n if (propValue && propValue.nodeType !== 1) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an HTMLElement.`);\n }\n return null;\n}","import PropTypes from 'prop-types';\nconst refType = PropTypes.oneOfType([PropTypes.func, PropTypes.object]);\nexport default refType;","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.\n//\n// A strict capitalization should uppercase the first letter of each word in the sentence.\n// We only handle the first word.\nexport default function capitalize(string) {\n if (typeof string !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: \\`capitalize(string)\\` expects a string argument.` : _formatMuiErrorMessage(7));\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n}","/**\n * Safe chained function.\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n */\nexport default function createChainedFunction(...funcs) {\n return funcs.reduce((acc, func) => {\n if (func == null) {\n return acc;\n }\n return function chainedFunction(...args) {\n acc.apply(this, args);\n func.apply(this, args);\n };\n }, () => {});\n}","// Corresponds to 10 frames at 60 Hz.\n// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.\nexport default function debounce(func, wait = 166) {\n let timeout;\n function debounced(...args) {\n const later = () => {\n // @ts-ignore\n func.apply(this, args);\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n }\n debounced.clear = () => {\n clearTimeout(timeout);\n };\n return debounced;\n}","export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","import ownerDocument from '../ownerDocument';\nexport default function ownerWindow(node) {\n const doc = ownerDocument(node);\n return doc.defaultView || window;\n}","/**\n * TODO v5: consider making it private\n *\n * passes {value} to {ref}\n *\n * WARNING: Be sure to only call this inside a callback that is passed as a ref.\n * Otherwise, make sure to cleanup the previous {ref} if it changes. See\n * https://github.com/mui/material-ui/issues/13539\n *\n * Useful if you want to expose the ref of an inner component to the public API\n * while still using it inside the component.\n * @param ref A ref callback or ref object. If anything falsy, this is a no-op.\n */\nexport default function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}","'use client';\n\nimport * as React from 'react';\n\n/**\n * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.\n * This is useful for effects that are only needed for client-side rendering but not for SSR.\n *\n * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * and confirm it doesn't apply to your use-case.\n */\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nexport default useEnhancedEffect;","'use client';\n\nimport * as React from 'react';\nlet globalId = 0;\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`mui-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\n\n// downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814\nconst maybeReactUseId = React['useId'.toString()];\n/**\n *\n * @example
\n * @param idOverride\n * @returns {string}\n */\nexport default function useId(idOverride) {\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride != null ? idOverride : reactId;\n }\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride);\n}","'use client';\n\n/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nexport default function useControlled({\n controlled,\n default: defaultProp,\n name,\n state = 'value'\n}) {\n // isControlled is ignored in the hook dependency lists as it should never change.\n const {\n current: isControlled\n } = React.useRef(controlled !== undefined);\n const [valueState, setValue] = React.useState(defaultProp);\n const value = isControlled ? controlled : valueState;\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (controlled !== undefined)) {\n console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [state, name, controlled]);\n const {\n current: defaultValue\n } = React.useRef(defaultProp);\n React.useEffect(() => {\n if (!isControlled && defaultValue !== defaultProp) {\n console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n const setValueIfUncontrolled = React.useCallback(newValue => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n return [value, setValueIfUncontrolled];\n}","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from '../useEnhancedEffect';\n\n/**\n * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892\n * See RFC in https://github.com/reactjs/rfcs/pull/220\n */\n\nfunction useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useRef((...args) =>\n // @ts-expect-error hide `this`\n (0, ref.current)(...args)).current;\n}\nexport default useEventCallback;","'use client';\n\nimport * as React from 'react';\nimport setRef from '../setRef';\nexport default function useForkRef(...refs) {\n /**\n * This will create a new function if the refs passed to this hook change and are all defined.\n * This means react will call the old forkRef with `null` and the new forkRef\n * with the ref. Cleanup naturally emerges from this behavior.\n */\n return React.useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return instance => {\n refs.forEach(ref => {\n setRef(ref, instance);\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}","'use client';\n\nimport * as React from 'react';\nconst UNINITIALIZED = {};\n\n/**\n * A React.useRef() that is initialized lazily with a function. Note that it accepts an optional\n * initialization argument, so the initialization function doesn't need to be an inline closure.\n *\n * @usage\n * const ref = useLazyRef(sortColumns, columns)\n */\nexport default function useLazyRef(init, initArg) {\n const ref = React.useRef(UNINITIALIZED);\n if (ref.current === UNINITIALIZED) {\n ref.current = init(initArg);\n }\n return ref;\n}","'use client';\n\nimport * as React from 'react';\nconst EMPTY = [];\n\n/**\n * A React.useEffect equivalent that runs once, when the component is mounted.\n */\nexport default function useOnMount(fn) {\n /* eslint-disable react-hooks/exhaustive-deps */\n React.useEffect(fn, EMPTY);\n /* eslint-enable react-hooks/exhaustive-deps */\n}","'use client';\n\nimport useLazyRef from '../useLazyRef/useLazyRef';\nimport useOnMount from '../useOnMount/useOnMount';\nexport class Timeout {\n constructor() {\n this.currentId = 0;\n this.clear = () => {\n if (this.currentId !== 0) {\n clearTimeout(this.currentId);\n this.currentId = 0;\n }\n };\n this.disposeEffect = () => {\n return this.clear;\n };\n }\n static create() {\n return new Timeout();\n }\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n start(delay, fn) {\n this.clear();\n this.currentId = setTimeout(() => {\n this.currentId = 0;\n fn();\n }, delay);\n }\n}\nexport default function useTimeout() {\n const timeout = useLazyRef(Timeout.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}","'use client';\n\n// based on https://github.com/WICG/focus-visible/blob/v4.1.5/src/focus-visible.js\nimport * as React from 'react';\nimport { Timeout } from '../useTimeout/useTimeout';\nlet hadKeyboardEvent = true;\nlet hadFocusVisibleRecently = false;\nconst hadFocusVisibleRecentlyTimeout = new Timeout();\nconst inputTypesWhitelist = {\n text: true,\n search: true,\n url: true,\n tel: true,\n email: true,\n password: true,\n number: true,\n date: true,\n month: true,\n week: true,\n time: true,\n datetime: true,\n 'datetime-local': true\n};\n\n/**\n * Computes whether the given element should automatically trigger the\n * `focus-visible` class being added, i.e. whether it should always match\n * `:focus-visible` when focused.\n * @param {Element} node\n * @returns {boolean}\n */\nfunction focusTriggersKeyboardModality(node) {\n const {\n type,\n tagName\n } = node;\n if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) {\n return true;\n }\n if (tagName === 'TEXTAREA' && !node.readOnly) {\n return true;\n }\n if (node.isContentEditable) {\n return true;\n }\n return false;\n}\n\n/**\n * Keep track of our keyboard modality state with `hadKeyboardEvent`.\n * If the most recent user interaction was via the keyboard;\n * and the key press did not include a meta, alt/option, or control key;\n * then the modality is keyboard. Otherwise, the modality is not keyboard.\n * @param {KeyboardEvent} event\n */\nfunction handleKeyDown(event) {\n if (event.metaKey || event.altKey || event.ctrlKey) {\n return;\n }\n hadKeyboardEvent = true;\n}\n\n/**\n * If at any point a user clicks with a pointing device, ensure that we change\n * the modality away from keyboard.\n * This avoids the situation where a user presses a key on an already focused\n * element, and then clicks on a different element, focusing it with a\n * pointing device, while we still think we're in keyboard modality.\n */\nfunction handlePointerDown() {\n hadKeyboardEvent = false;\n}\nfunction handleVisibilityChange() {\n if (this.visibilityState === 'hidden') {\n // If the tab becomes active again, the browser will handle calling focus\n // on the element (Safari actually calls it twice).\n // If this tab change caused a blur on an element with focus-visible,\n // re-apply the class when the user switches back to the tab.\n if (hadFocusVisibleRecently) {\n hadKeyboardEvent = true;\n }\n }\n}\nfunction prepare(doc) {\n doc.addEventListener('keydown', handleKeyDown, true);\n doc.addEventListener('mousedown', handlePointerDown, true);\n doc.addEventListener('pointerdown', handlePointerDown, true);\n doc.addEventListener('touchstart', handlePointerDown, true);\n doc.addEventListener('visibilitychange', handleVisibilityChange, true);\n}\nexport function teardown(doc) {\n doc.removeEventListener('keydown', handleKeyDown, true);\n doc.removeEventListener('mousedown', handlePointerDown, true);\n doc.removeEventListener('pointerdown', handlePointerDown, true);\n doc.removeEventListener('touchstart', handlePointerDown, true);\n doc.removeEventListener('visibilitychange', handleVisibilityChange, true);\n}\nfunction isFocusVisible(event) {\n const {\n target\n } = event;\n try {\n return target.matches(':focus-visible');\n } catch (error) {\n // Browsers not implementing :focus-visible will throw a SyntaxError.\n // We use our own heuristic for those browsers.\n // Rethrow might be better if it's not the expected error but do we really\n // want to crash if focus-visible malfunctioned?\n }\n\n // No need for validFocusTarget check. The user does that by attaching it to\n // focusable events only.\n return hadKeyboardEvent || focusTriggersKeyboardModality(target);\n}\nexport default function useIsFocusVisible() {\n const ref = React.useCallback(node => {\n if (node != null) {\n prepare(node.ownerDocument);\n }\n }, []);\n const isFocusVisibleRef = React.useRef(false);\n\n /**\n * Should be called if a blur event is fired\n */\n function handleBlurVisible() {\n // checking against potential state variable does not suffice if we focus and blur synchronously.\n // React wouldn't have time to trigger a re-render so `focusVisible` would be stale.\n // Ideally we would adjust `isFocusVisible(event)` to look at `relatedTarget` for blur events.\n // This doesn't work in IE11 due to https://github.com/facebook/react/issues/3751\n // TODO: check again if React releases their internal changes to focus event handling (https://github.com/facebook/react/pull/19186).\n if (isFocusVisibleRef.current) {\n // To detect a tab/window switch, we look for a blur event followed\n // rapidly by a visibility change.\n // If we don't see a visibility change within 100ms, it's probably a\n // regular focus change.\n hadFocusVisibleRecently = true;\n hadFocusVisibleRecentlyTimeout.start(100, () => {\n hadFocusVisibleRecently = false;\n });\n isFocusVisibleRef.current = false;\n return true;\n }\n return false;\n }\n\n /**\n * Should be called if a blur event is fired\n */\n function handleFocusVisible(event) {\n if (isFocusVisible(event)) {\n isFocusVisibleRef.current = true;\n return true;\n }\n return false;\n }\n return {\n isFocusVisibleRef,\n onFocus: handleFocusVisible,\n onBlur: handleBlurVisible,\n ref\n };\n}","// A change of the browser zoom change the scrollbar size.\n// Credit https://github.com/twbs/bootstrap/blob/488fd8afc535ca3a6ad4dc581f5e89217b6a36ac/js/src/util/scrollbar.js#L14-L18\nexport default function getScrollbarSize(doc) {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = doc.documentElement.clientWidth;\n return Math.abs(window.innerWidth - documentWidth);\n}","export function getTypeByValue(value) {\n const valueType = typeof value;\n switch (valueType) {\n case 'number':\n if (Number.isNaN(value)) {\n return 'NaN';\n }\n if (!Number.isFinite(value)) {\n return 'Infinity';\n }\n if (value !== Math.floor(value)) {\n return 'float';\n }\n return 'number';\n case 'object':\n if (value === null) {\n return 'null';\n }\n return value.constructor.name;\n default:\n return valueType;\n }\n}\n\n// IE 11 support\nfunction ponyfillIsInteger(x) {\n // eslint-disable-next-line no-restricted-globals\n return typeof x === 'number' && isFinite(x) && Math.floor(x) === x;\n}\nconst isInteger = Number.isInteger || ponyfillIsInteger;\nfunction requiredInteger(props, propName, componentName, location) {\n const propValue = props[propName];\n if (propValue == null || !isInteger(propValue)) {\n const propType = getTypeByValue(propValue);\n return new RangeError(`Invalid ${location} \\`${propName}\\` of type \\`${propType}\\` supplied to \\`${componentName}\\`, expected \\`integer\\`.`);\n }\n return null;\n}\nfunction validator(props, propName, ...other) {\n const propValue = props[propName];\n if (propValue === undefined) {\n return null;\n }\n return requiredInteger(props, propName, ...other);\n}\nfunction validatorNoop() {\n return null;\n}\nvalidator.isRequired = requiredInteger;\nvalidatorNoop.isRequired = validatorNoop;\nexport default process.env.NODE_ENV === 'production' ? validatorNoop : validator;","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * Add keys, values of `defaultProps` that does not exist in `props`\n * @param {object} defaultProps\n * @param {object} props\n * @returns {object} resolved props\n */\nexport default function resolveProps(defaultProps, props) {\n const output = _extends({}, props);\n Object.keys(defaultProps).forEach(propName => {\n if (propName.toString().match(/^(components|slots)$/)) {\n output[propName] = _extends({}, defaultProps[propName], output[propName]);\n } else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {\n const defaultSlotProps = defaultProps[propName] || {};\n const slotProps = props[propName];\n output[propName] = {};\n if (!slotProps || !Object.keys(slotProps)) {\n // Reduce the iteration if the slot props is empty\n output[propName] = defaultSlotProps;\n } else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {\n // Reduce the iteration if the default slot props is empty\n output[propName] = slotProps;\n } else {\n output[propName] = _extends({}, slotProps);\n Object.keys(defaultSlotProps).forEach(slotPropName => {\n output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);\n });\n }\n } else if (output[propName] === undefined) {\n output[propName] = defaultProps[propName];\n }\n });\n return output;\n}","export default function composeClasses(slots, getUtilityClass, classes = undefined) {\n const output = {};\n Object.keys(slots).forEach(\n // `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.\n // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208\n slot => {\n output[slot] = slots[slot].reduce((acc, key) => {\n if (key) {\n const utilityClass = getUtilityClass(key);\n if (utilityClass !== '') {\n acc.push(utilityClass);\n }\n if (classes && classes[key]) {\n acc.push(classes[key]);\n }\n }\n return acc;\n }, []).join(' ');\n });\n return output;\n}","const defaultGenerator = componentName => componentName;\nconst createClassNameGenerator = () => {\n let generate = defaultGenerator;\n return {\n configure(generator) {\n generate = generator;\n },\n generate(componentName) {\n return generate(componentName);\n },\n reset() {\n generate = defaultGenerator;\n }\n };\n};\nconst ClassNameGenerator = createClassNameGenerator();\nexport default ClassNameGenerator;","import ClassNameGenerator from '../ClassNameGenerator';\nexport const globalStateClasses = {\n active: 'active',\n checked: 'checked',\n completed: 'completed',\n disabled: 'disabled',\n error: 'error',\n expanded: 'expanded',\n focused: 'focused',\n focusVisible: 'focusVisible',\n open: 'open',\n readOnly: 'readOnly',\n required: 'required',\n selected: 'selected'\n};\nexport default function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {\n const globalStateClass = globalStateClasses[slot];\n return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;\n}\nexport function isGlobalState(slot) {\n return globalStateClasses[slot] !== undefined;\n}","import generateUtilityClass from '../generateUtilityClass';\nexport default function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {\n const result = {};\n slots.forEach(slot => {\n result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);\n });\n return result;\n}","function clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {\n return Math.max(min, Math.min(val, max));\n}\nexport default clamp;","/**\n * Determines if a given element is a DOM element name (i.e. not a React component).\n */\nexport function isHostComponent(element) {\n return typeof element === 'string';\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { isHostComponent } from './isHostComponent';\n\n/**\n * Type of the ownerState based on the type of an element it applies to.\n * This resolves to the provided OwnerState for React components and `undefined` for host components.\n * Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.\n */\n\n/**\n * Appends the ownerState object to the props, merging with the existing one if necessary.\n *\n * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.\n * @param otherProps Props of the element.\n * @param ownerState\n */\nexport function appendOwnerState(elementType, otherProps, ownerState) {\n if (elementType === undefined || isHostComponent(elementType)) {\n return otherProps;\n }\n return _extends({}, otherProps, {\n ownerState: _extends({}, otherProps.ownerState, ownerState)\n });\n}","'use client';\n\nimport * as React from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst defaultContextValue = {\n disableDefaultClasses: false\n};\nconst ClassNameConfiguratorContext = /*#__PURE__*/React.createContext(defaultContextValue);\n/**\n * @ignore - internal hook.\n *\n * Wraps the `generateUtilityClass` function and controls how the classes are generated.\n * Currently it only affects whether the classes are applied or not.\n *\n * @returns Function to be called with the `generateUtilityClass` function specific to a component to generate the classes.\n */\nexport function useClassNamesOverride(generateUtilityClass) {\n const {\n disableDefaultClasses\n } = React.useContext(ClassNameConfiguratorContext);\n return slot => {\n if (disableDefaultClasses) {\n return '';\n }\n return generateUtilityClass(slot);\n };\n}\n\n/**\n * Allows to configure the components within to not apply any built-in classes.\n */\nexport function ClassNameConfigurator(props) {\n const {\n disableDefaultClasses,\n children\n } = props;\n const contextValue = React.useMemo(() => ({\n disableDefaultClasses: disableDefaultClasses != null ? disableDefaultClasses : false\n }), [disableDefaultClasses]);\n return /*#__PURE__*/_jsx(ClassNameConfiguratorContext.Provider, {\n value: contextValue,\n children: children\n });\n}","/**\n * Extracts event handlers from a given object.\n * A prop is considered an event handler if it is a function and its name starts with `on`.\n *\n * @param object An object to extract event handlers from.\n * @param excludeKeys An array of keys to exclude from the returned object.\n */\nexport function extractEventHandlers(object, excludeKeys = []) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}","/**\n * If `componentProps` is a function, calls it with the provided `ownerState`.\n * Otherwise, just returns `componentProps`.\n */\nexport function resolveComponentProps(componentProps, ownerState, slotState) {\n if (typeof componentProps === 'function') {\n return componentProps(ownerState, slotState);\n }\n return componentProps;\n}","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport clsx from 'clsx';\nimport { extractEventHandlers } from './extractEventHandlers';\nimport { omitEventHandlers } from './omitEventHandlers';\n/**\n * Merges the slot component internal props (usually coming from a hook)\n * with the externally provided ones.\n *\n * The merge order is (the latter overrides the former):\n * 1. The internal props (specified as a getter function to work with get*Props hook result)\n * 2. Additional props (specified internally on a Base UI component)\n * 3. External props specified on the owner component. These should only be used on a root slot.\n * 4. External props specified in the `slotProps.*` prop.\n * 5. The `className` prop - combined from all the above.\n * @param parameters\n * @returns\n */\nexport function mergeSlotProps(parameters) {\n const {\n getSlotProps,\n additionalProps,\n externalSlotProps,\n externalForwardedProps,\n className\n } = parameters;\n if (!getSlotProps) {\n // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,\n // so we can simply merge all the props without having to worry about extracting event handlers.\n const joinedClasses = clsx(additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);\n const mergedStyle = _extends({}, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);\n const props = _extends({}, additionalProps, externalForwardedProps, externalSlotProps);\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: undefined\n };\n }\n\n // In this case, getSlotProps is responsible for calling the external event handlers.\n // We don't need to include them in the merged props because of this.\n\n const eventHandlers = extractEventHandlers(_extends({}, externalForwardedProps, externalSlotProps));\n const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);\n const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);\n const internalSlotProps = getSlotProps(eventHandlers);\n\n // The order of classes is important here.\n // Emotion (that we use in libraries consuming Base UI) depends on this order\n // to properly override style. It requires the most important classes to be last\n // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.\n const joinedClasses = clsx(internalSlotProps == null ? void 0 : internalSlotProps.className, additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);\n const mergedStyle = _extends({}, internalSlotProps == null ? void 0 : internalSlotProps.style, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);\n const props = _extends({}, internalSlotProps, additionalProps, otherPropsWithoutEventHandlers, componentsPropsWithoutEventHandlers);\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: internalSlotProps.ref\n };\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"elementType\", \"externalSlotProps\", \"ownerState\", \"skipResolvingSlotProps\"];\nimport { unstable_useForkRef as useForkRef } from '@mui/utils';\nimport { appendOwnerState } from './appendOwnerState';\nimport { mergeSlotProps } from './mergeSlotProps';\nimport { resolveComponentProps } from './resolveComponentProps';\n/**\n * @ignore - do not document.\n * Builds the props to be passed into the slot of an unstyled component.\n * It merges the internal props of the component with the ones supplied by the user, allowing to customize the behavior.\n * If the slot component is not a host component, it also merges in the `ownerState`.\n *\n * @param parameters.getSlotProps - A function that returns the props to be passed to the slot component.\n */\nexport function useSlotProps(parameters) {\n var _parameters$additiona;\n const {\n elementType,\n externalSlotProps,\n ownerState,\n skipResolvingSlotProps = false\n } = parameters,\n rest = _objectWithoutPropertiesLoose(parameters, _excluded);\n const resolvedComponentsProps = skipResolvingSlotProps ? {} : resolveComponentProps(externalSlotProps, ownerState);\n const {\n props: mergedProps,\n internalRef\n } = mergeSlotProps(_extends({}, rest, {\n externalSlotProps: resolvedComponentsProps\n }));\n const ref = useForkRef(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, (_parameters$additiona = parameters.additionalProps) == null ? void 0 : _parameters$additiona.ref);\n const props = appendOwnerState(elementType, _extends({}, mergedProps, {\n ref\n }), ownerState);\n return props;\n}","import { globalStateClasses } from '@mui/utils/generateUtilityClass';\nconst GLOBAL_CLASS_PREFIX = 'base';\nfunction buildStateClass(state) {\n return `${GLOBAL_CLASS_PREFIX}--${state}`;\n}\nfunction buildSlotClass(componentName, slot) {\n return `${GLOBAL_CLASS_PREFIX}-${componentName}-${slot}`;\n}\nexport function generateUtilityClass(componentName, slot) {\n const globalStateClass = globalStateClasses[slot];\n return globalStateClass ? buildStateClass(globalStateClass) : buildSlotClass(componentName, slot);\n}\nexport function isGlobalState(slot) {\n return globalStateClasses[slot] !== undefined;\n}","import { generateUtilityClass } from '../generateUtilityClass';\nexport function generateUtilityClasses(componentName, slots) {\n const result = {};\n slots.forEach(slot => {\n result[slot] = generateUtilityClass(componentName, slot);\n });\n return result;\n}","'use client';\n\n/* eslint-disable consistent-return, jsx-a11y/no-noninteractive-tabindex */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp, elementAcceptingRef, unstable_useForkRef as useForkRef, unstable_ownerDocument as ownerDocument } from '@mui/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n// Inspired by https://github.com/focus-trap/tabbable\nconst candidatesSelector = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable=\"false\"])'].join(',');\nfunction getTabIndex(node) {\n const tabindexAttr = parseInt(node.getAttribute('tabindex') || '', 10);\n if (!Number.isNaN(tabindexAttr)) {\n return tabindexAttr;\n }\n\n // Browsers do not return `tabIndex` correctly for contentEditable nodes;\n // https://bugs.chromium.org/p/chromium/issues/detail?id=661108&q=contenteditable%20tabindex&can=2\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n // in Chrome,
,