const e=e=>{"requestIdleCallback"in window?window.requestIdleCallback(e):setTimeout(e,32)},t=e=>!!e.shadowRoot&&!!e.attachShadow,a=e=>{const t=e.closest("ion-item");return t?t.querySelector("ion-label"):null},n=(e,a,n,r,i)=>{if(e||t(a)){let e=a.querySelector("input.aux-input");e||((e=a.ownerDocument.createElement("input")).type="hidden",e.classList.add("aux-input"),a.appendChild(e)),e.disabled=i,e.name=n,e.value=r||""}},r=(e,t,a)=>Math.max(e,Math.min(t,a)),i=(e,t)=>{if(!e){const e="ASSERT: "+t;throw console.error(e),new Error(e)}},o=e=>e.timeStamp||Date.now(),s=e=>{if(e){const t=e.changedTouches;if(t&&t.length>0){const e=t[0];return{x:e.clientX,y:e.clientY}}if(void 0!==e.pageX)return{x:e.pageX,y:e.pageY}}return{x:0,y:0}},l=e=>{const t="rtl"===document.dir;switch(e){case"start":return t;case"end":return!t;default:throw new Error(`"${e}" is not a valid value for [side]. Use "start" or "end" instead.`)}},u=(e,t)=>{const a=e._original||e;return{_original:e,emit:c(a.emit.bind(a),t)}},c=(e,t=0)=>{let a;return(...n)=>{clearTimeout(a),a=setTimeout(e,t,...n)}};export{i as a,n as b,c,u as d,r as e,a as f,t as h,l as i,o as n,s as p,e as r};