import{w as c}from"./XWfk0Wf1.js";function h(e){var a;if(!(typeof window<"u"))return()=>{};const t=document.createElement("div");t.style="height:10vh;position:absolute;left:0;top:0;width:1px;pointer-events:none;",document.body.appendChild(t);function n(){if(!t)return 0;const{height:i}=t.getBoundingClientRect();return i*10}const o=()=>e(n(),{type:"orientation"});(a=screen.orientation)==null||a.addEventListener("change",o);let s=window.innerWidth;const d=()=>{const{innerWidth:i}=window;s!==i&&(s=i,e(n(),{type:"width"}))};return window.addEventListener("resize",d),navigator.userAgent.match(/Macintosh.*AppleWebKit.*Safari/)&&navigator.maxTouchPoints>1,new ResizeObserver(()=>{e(n(),{type:"height"})}).observe(t),e(n(),{type:"initial"}),()=>{var i;window.removeEventListener("resize",d),(i=screen.orientation)==null||i.removeEventListener("change",o)}}const p=c(0),u=c(0);h((e,{type:r})=>{p.set(e),u.update(t=>r==="orientation"||r==="width"||e>t?e:t)});export{u as m,p as s};