(function(n,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],t):(n=typeof globalThis<"u"?globalThis:n||self,t(n.ReactResponsiveness={},n.React))})(this,function(n,t){"use strict";const u={Bootstrap_3:{xs:0,sm:576,lg:992},Bootstrap_4:{xs:0,sm:576,md:768,lg:992,xl:1200},Bootstrap_5:{xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},Bulma:{mobile:0,tablet:769,desktop:1024,widescreen:1216,fullhd:1408},Chakra:{xs:0,sm:480,md:768,lg:992,xl:1280,"2xl":1472},Foundation:{small:0,medium:640,large:1024,xlarge:1200,xxlarge:1440},Ionic:{xs:0,sm:576,md:768,lg:992,xl:1200},Material_Design:{xs:0,sm_8:600,sm_12:905,md:1240,lg:1440},Materialize:{s:0,m:600,l:992,xl:1200},Material_UI:{xs:0,sm:600,md:960,lg:1260,xl:1920},Quasar:{xs:0,sm:600,md:1024,lg:1440,xl:1920},Semantic_UI:{mobile:0,tablet:768,small_monitor:992,large_monitor:1200},Skeleton:{mobile:0,phablet:400,tablet:550,desktop:750,desktop_hd:1e3,desktop_hd_lg:1200},Tailwind_CSS:{xs:0,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},Windi_CSS:{xs:0,sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},f=t.createContext({}),b=()=>t.useContext(f),w=({children:M,breakpoints:r=u.Bootstrap_5})=>{const[g,S]=t.useState(""),p=t.useMemo(()=>Object.entries(r).sort(([,e],[,s])=>(e||0)-(s||0)).reduce((e,[s,o],l,m)=>{var a;return e[s]={min:o?`(min-width: ${o}px)`:"",max:(a=m[l+1])!=null&&a[1]?`(max-width: ${m[l+1][1]-.1}px)`:""},e},{}),[r]),[i,y]=t.useState(Object.assign({},...Object.keys(p).map(e=>({[e]:{min:!1,max:!1,only:!1}}))));t.useLayoutEffect(()=>{typeof window<"u"&&Object.entries(p).forEach(([e,s])=>{const o={min:window.matchMedia(s.min),max:window.matchMedia(s.max)};Object.entries(o).forEach(([l,m])=>{const a=({matches:h})=>y(d=>{var _;if(((_=d[e])==null?void 0:_[l])===h)return d;const{min:x,max:c}={...d[e],[l]:h};return e!==g&&x&&c&&S(e),{...d,[e]:{min:x,max:c,only:x&&c}}});m.addEventListener("change",a),a(m)})})},[r]);const j=e=>{var s;return((s=i[e])==null?void 0:s.min)||!1},O=e=>{var s;return((s=i[e])==null?void 0:s.min)||!1},v=e=>{var s,o;return((s=i[e])==null?void 0:s.min)&&((o=i[e])==null?void 0:o.max)||!1};return t.createElement(f.Provider,{value:{isMin:j,isMax:O,isOnly:v,matches:i,currentInterval:g}},M)};n.Presets=u,n.ResponsivenessProvider=w,n.useResponsiveness=b,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});