import{c as t}from"./p-262ec334.js";import{I as e}from"./p-abd7aeaa.js";class s extends e{constructor(t){super(),this.config=t}evaluate(e){var s;if(!this.isAcceptedInputType(e))throw new Error(`Unexpected type of input: ${typeof e}: ${e}`);const r=isNaN(null===(s=this.config)||void 0===s?void 0:s.maxValue)?Number.MAX_VALUE:this.config.maxValue;return{isValid:t(String(e).replace(/,/g,""))<=r,message:t(String(e).replace(/,/g,""))<=r?"":{key:"The maximum input value is {0}",args:[r]}}}canEvaluate(t,e){return e?this.isAcceptedInputType(t)&&!e.disabled&&e.visible:this.isAcceptedInputType(t)}shouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}isAcceptedInputType(e){return!isNaN(t(e))||/^\s*[-+]?(\d{1,3})(,\d{3})*(\.\d*)?\s*$/.test(e)}}class r extends e{constructor(t){super(),this.config=t}evaluate(e){var s;if(!this.isAcceptedInputType(e))throw new Error(`Unexpected type of input: ${typeof e}: ${e}`);const r=isNaN(null===(s=this.config)||void 0===s?void 0:s.minValue)?0:this.config.minValue;return{isValid:t(String(e).replace(/,/g,""))>=r,message:t(String(e).replace(/,/g,""))>=r?"":{key:"The minimum input value is {0}",args:[r]}}}canEvaluate(t,e){return e?this.isAcceptedInputType(t)&&!e.disabled&&e.visible:this.isAcceptedInputType(t)}shouldShowError(t){return!t.disabled&&t.visible&&(t.touched||t.modified)}isAcceptedInputType(e){return!isNaN(t(e))||/^\s*[-+]?(\d{1,3})(,\d{3})*(\.\d*)?\s*$/.test(e)}}export{r as M,s as a}