import{E as u,Gd as x,J as a,R as m,W as h,h as l,ka as p,la as c,ma as z,na as k,sa as d,va as g,xa as f}from"./chunk-JSJB5BKT.js";import{e as b}from"./chunk-SZAW6ZBW.js";var S,M,w=b(()=>{x();z();k();x();S=new g("breakpoint"),M=(()=>{class n{constructor(e){this.sizeTable=["xs","sm","md","lg","xl"],this.breakpoints={xs:0,sm:576,md:768,lg:992,xl:1200},this.currentSize=null,e&&(this.breakpoints=e);let t=this.getViewport();this.sizeListener=new l(t),this.breakpointListener=new l(t.currentSize),u(window,"resize").pipe(c(100),m(100),p(()=>{let r=this.getViewport();this.sizeListener.next(r),this.breakpointListener.next(r.currentSize),this.currentSize=r.currentSize})).subscribe()}getViewport(){let e=window,t=document,r=t.documentElement,o=t.getElementsByTagName("body")[0],i=e.innerWidth||r.clientWidth||o.clientWidth,T=e.innerHeight||r.clientHeight||o.clientHeight,s="xs";return i>=this.breakpoints.sm&&i<this.breakpoints.md?s="sm":i>=this.breakpoints.md&&i<this.breakpoints.lg?s="md":i>=this.breakpoints.lg&&i<this.breakpoints.xl?s="lg":i>=this.breakpoints.xl&&(s="xl"),{width:i,height:T,currentSize:s}}enterExtraSmall(){return this.enter("xs")}leaveExtraSmall(){return this.enter("xs")}greaterThanExtraSmall(e=!1){return this.greaterThan("xs",e)}enterSmall(){return this.enter("sm")}leaveSmall(){return this.enter("sm")}lessThanSmall(e=!1){return this.lessThan("sm",e)}greaterThanSmall(e=!1){return this.greaterThan("sm",e)}enterMedium(){return this.enter("md")}leaveMedium(){return this.enter("md")}lessThanMedium(e=!1){return this.lessThan("md",e)}greaterThanMedium(e=!1){return this.greaterThan("md",e)}enterLarge(){return this.enter("lg")}leaveLarge(){return this.enter("lg")}lessThanLarge(e=!1){return this.lessThan("lg",e)}greaterThanLarge(e=!1){return this.greaterThan("lg",e)}enterExtraLarge(){return this.enter("xl")}leaveExtraLarge(){return this.enter("xl")}lessThanExtraLarge(e=!1){return this.lessThan("xl",e)}enter(e){return this.breakpointListener.pipe(h(),a(t=>t===e))}leave(e){return this.breakpointListener.pipe(h(),a(t=>this.currentSize===e&&t!==e))}lessThan(e,t){return this.breakpointListener.pipe(h(),a(r=>t?this.sizeTable.indexOf(r)<=this.sizeTable.indexOf(e):this.sizeTable.indexOf(r)<this.sizeTable.indexOf(e)))}greaterThan(e,t){return this.breakpointListener.pipe(h(),a(r=>t?this.sizeTable.indexOf(r)>=this.sizeTable.indexOf(e):this.sizeTable.indexOf(r)>this.sizeTable.indexOf(e)))}static{this.\u0275fac=function(t){return new(t||n)(f(S,8))}}static{this.\u0275prov=d({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})()});export{M as a,w as b};
