1import{s as e}from"./appType-H4Lk86HF.js";import{Vn as t}from"./common-C5mtuLG2.js";import{Ri as n,it as r,zi as i}from"./vendor-BYBdXKh1.js";import{Y as a}from"./ErrorBoxContainer-DHmIt_-p.js";import{t as o}from"./refs-CJhx-Xzs.js";import{i as s,n as c}from"./Form-Cdmh3gw1.js";import{t as l}from"./Input-D0q3cQQ9.js";import{t as u}from"./FormRow-Dj-ZpdNn.js";var d=e(i(),1),f=n(),p=(e,t,n,r)=>{if(Number.isNaN(e))return``;if(typeof e==`number`)return n?String(e).replace(`.`,t):String(Math.trunc(e));let i=t===`.`?`,`:`.`,a=e.split(i).join(``),o=r?`0-9\\${t}`:`0-9\\${t}-`;a=a.replaceAll(RegExp(`[^${o}]`,`g`),``),r||(a=a.replaceAll(/(?!^)-/g,``));let[s=``,...c]=a.split(t);return s+(c.length&&n?t+c.join(``):``)},m=d.forwardRef(({value:e,type:n=`float`,absolute:r=!0,onChange:i,...s},c)=>{let u=a(),m=d.useRef(null),h=t(u.priceFormat.format)===`.`?`.`:`,`,g=p(String(e??``).replace(`.`,h),h,n===`float`,r),_=e=>{let t=p(e.target.value,h,n===`float`,r);i?.(t.replace(h,`.`))};return(0,f.jsx)(l,{...s,onChange:_,value:g,ref:o(c,m),inputMode:`decimal`})});m.displayName=`NumberInput`;var h=(0,d.forwardRef)(({label:e,labelPosition:t,sublabel:n,tooltip:i,description:a,showErrorMessage:o=!0,onErrorIdChange:l,...p},h)=>{let{fieldProps:{rules:g,..._},fieldErrors:{errors:v,errorId:y},form:b}=c(p,h);return(0,d.useEffect)(()=>{l&&l(y)},[y,l]),(0,f.jsx)(u,{errors:v,errorId:y,showErrorMessage:o,label:e,labelFor:_.id,labelPosition:t,sublabel:n,tooltip:i,description:a,rowType:`input`,children:(0,f.jsx)(`fieldset`,{disabled:p.disabled||p.readOnly,children:(0,f.jsx)(r,{control:b.control,name:_.name,rules:g,render:({field:e})=>(0,f.jsx)(m,{...s(_,e)})})})})}),g=e=>{if(typeof e==`number`)return e;if(typeof e!=`string`)return;let t=parseFloat(e);if(!isNaN(t))return t};export{g as n,m as r,h as t}; 2//# sourceMappingURL=FormNumberInput-v_SIH7wF.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.