FIx some for production again

This commit is contained in:
Montech
2026-09-15 17:26:42 +03:30
parent afde44ab8a
commit 3bc97461e0
195 changed files with 258003 additions and 344 deletions
+1
View File
@@ -0,0 +1 @@
const i=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"];function o(r){return r==null||typeof r=="object"&&r!==null&&"value"in r&&(r=r.value,r==null)||typeof r=="object"?"":String(r).replace(/[0-9]/g,t=>i[+t]).replace(/[٠-٩]/g,t=>i[t.charCodeAt(0)-1632])}function f(r){if(r==null||r===""||typeof r=="object"&&r!==null&&"value"in r&&(r=r.value,r==null||r==="")||typeof r=="object")return"";const t=typeof r=="string"?parseFloat(u(r)):r;if(isNaN(t))return o(r);const e=new Intl.NumberFormat("fa-IR").format(t);return o(e)}function u(r){return r==null?"":String(r).replace(/[۰-۹]/g,t=>String(t.charCodeAt(0)-1776)).replace(/[٠-٩]/g,t=>String(t.charCodeAt(0)-1632))}function s(r,t=0){if(r==null||r==="")return t;if(typeof r=="number")return isNaN(r)?t:r;const e=u(r).replace(/[^0-9.-]/g,""),n=Number(e);return isNaN(n)?t:n}export{u as a,f,s as p,o as t};