import{b as a}from"./p-Ba5qjFjW.js";const s=a=>{a&&(a.preventDefault(),a.stopPropagation())},o=a=>a.target,i=(a,s)=>{var o,i;const l=(null===(o=a.nativeInput)||void 0===o?void 0:o.value)||"",r=null===(i=s.target)||void 0===i?void 0:i.selectionStart;return l.slice(0,r)+s.key+l.slice(r+Math.abs(0))},l=a=>{a.nativeInput&&a.nativeInput.blur()},r=(a,o)=>{(a.disabled||a.readonly)&&o.target&&o.target===a.el&&s(o)},t=async s=>{var o;await a(),null===(o=null==s?void 0:s.nativeInput)||void 0===o||o.focus()},n=(a,o)=>{(a.disabled||a.readonly)&&s(o)},e=(a,s)=>{a.disabled||a.readonly||!a.balClick||a.balClick.emit(s)},u=(a,s)=>{a.focused=!0,a.inputValue=a.value,!a.disabled&&a.balFocus&&a.balFocus.emit(s)},v=(a,s,o)=>{a.value=s,a.inputValue=a.value,clearTimeout(o),o=setTimeout((()=>{a.nativeInput&&(a.nativeInput.value=a.value)}))},d=(a,s)=>{a.focused=!1,!a.disabled&&a.balBlur&&a.balBlur.emit(s)},c=a=>{a.value!==a.inputValue&&(a.value=a.inputValue,a.balChange.emit(a.value))},m=a=>(a=>""===a||null==a||Array.isArray(a)&&!a.length||"number"==typeof a&&isNaN(a))(a)?void 0:a,j=(a,s)=>m(a)!==m(s);export{u as a,d as b,t as c,l as d,c as e,e as f,o as g,r as h,n as i,v as j,i as k,j as l,s}