typeof window<`u`&&window.document&&window.document.createElement;function e(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function t(e,[t,n]){return Math.min(n,Math.max(t,e))}export{e as n,t};