"use strict";(self.webpackChunkgrader_labextension=self.webpackChunkgrader_labextension||[]).push([[327],{15327:(e,t,n)=>{n.d(t,{A:()=>d});var r=n(93345),s=n(50173),a=n(37340),u=n(53951);function c(e,t,n,a,u){const[c,i]=r.useState((()=>u&&n?n(e).matches:a?a(e).matches:t));return(0,s.A)((()=>{let t=!0;if(!n)return;const r=n(e),s=()=>{t&&i(r.matches)};return s(),r.addListener(s),()=>{t=!1,r.removeListener(s)}}),[e,n]),c}const i=r.useSyncExternalStore;function o(e,t,n,s,a){const u=r.useCallback((()=>t),[t]),c=r.useMemo((()=>{if(a&&n)return()=>n(e).matches;if(null!==s){const{matches:t}=s(e);return()=>t}return u}),[u,e,s,a,n]),[o,d]=r.useMemo((()=>{if(null===n)return[u,()=>()=>{}];const t=n(e);return[()=>t.matches,e=>(t.addListener(e),()=>{t.removeListener(e)})]}),[u,n,e]);return i(d,o,c)}function d(e,t={}){const n=(0,u.A)(),r="undefined"!=typeof window&&void 0!==window.matchMedia,{defaultMatches:s=!1,matchMedia:d=(r?window.matchMedia:null),ssrMatchMedia:l=null,noSsr:m=!1}=(0,a.A)({name:"MuiUseMediaQuery",props:t,theme:n});let h="function"==typeof e?e(n):e;return h=h.replace(/^@media( ?)/m,""),(void 0!==i?o:c)(h,s,d,l,m)}}}]);