const a=(a,e=[])=>{const i={};return e.forEach((e=>{a.hasAttribute(e)&&(null!==a.getAttribute(e)&&(i[e]=a.getAttribute(e)),a.removeAttribute(e))})),i},e=["role","aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colindextext","aria-colspan","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowindextext","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],i=i=>a(i,e),r=a=>{a.focus()},t=a=>"function"==typeof __zone_symbol__requestAnimationFrame?__zone_symbol__requestAnimationFrame(a):"function"==typeof requestAnimationFrame?requestAnimationFrame(a):setTimeout(a),n=(a,e)=>{a.componentOnReady?a.componentOnReady().then((a=>e(a))):t((()=>e(a)))},o=(a,e=a)=>a.shadowRoot||e,l=(a,e,i,r)=>{var t;if("undefined"!=typeof window){const n=window,o=null===(t=null==n?void 0:n.Ionic)||void 0===t?void 0:t.config;if(o){const t=o.get("_ael");if(t)return t(a,e,i,r);if(o._ael)return o._ael(a,e,i,r)}}return a.addEventListener(e,i,r)},s=(a,e,i)=>Math.max(a,Math.min(e,i)),d=(a,e,i,r)=>{var t;if("undefined"!=typeof window){const n=window,o=null===(t=null==n?void 0:n.Ionic)||void 0===t?void 0:t.config;if(o){const t=o.get("_rel");if(t)return t(a,e,i,r);if(o._rel)return o._rel(a,e,i,r)}}return a.removeEventListener(e,i,r)},u=(a,e)=>{let i;const r=a.getAttribute("aria-labelledby"),t=a.id;let n=null!==r&&""!==r.trim()?r:e+"-lbl",o=null!==r&&""!==r.trim()?document.getElementById(r):c(a);return o?(null===r&&(o.id=n),i=o.textContent,o.setAttribute("aria-hidden","true")):""!==t.trim()&&(o=document.querySelector(`label[for="${t}"]`),o&&(""!==o.id?n=o.id:o.id=n=`${t}-lbl`,i=o.textContent)),{label:o,labelId:n,labelText:i}},c=a=>{const e=a.closest("gasco-item");return e?e.querySelector("gasco-label"):null},m=(a,e,i,r,t)=>{if(a||(n=e).shadowRoot&&n.attachShadow){let a=e.querySelector("input.aux-input");a||(a=e.ownerDocument.createElement("input"),a.type="hidden",a.classList.add("aux-input"),e.appendChild(a)),a.disabled=t,a.name=i,a.value=r||""}var n},b=(a,e)=>{if(!a){const a="ASSERT: "+e;throw console.error(a),new Error(a)}},f=a=>{const e="rtl"===document.dir;switch(a){case"start":return e;case"end":return!e;default:throw new Error(`"${a}" is not a valid value for [side]. Use "start" or "end" instead.`)}},p=(a,e)=>{const i=a._original||a;return{_original:a,emit:v(i.emit.bind(i),e)}},v=(a,e=0)=>{let i;return(...r)=>{clearTimeout(i),i=setTimeout(a,e,...r)}},w=(a,e=0)=>new Promise((i=>{h(a,e,i)})),h=(a,e=0,i)=>{let r,t;const n={passive:!0},o=()=>{r&&r()},l=e=>{void 0!==e&&a!==e.target||(o(),i(e))};return a&&(a.addEventListener("webkitTransitionEnd",l,n),a.addEventListener("transitionend",l,n),t=setTimeout(l,e+500),r=()=>{t&&(clearTimeout(t),t=void 0),a.removeEventListener("webkitTransitionEnd",l,n),a.removeEventListener("transitionend",l,n)}),o};export{l as a,d as b,n as c,s as d,p as e,r as f,o as g,u as h,i,m as j,a as k,f as l,b as m,t as r,w as t}