1 |
- function v(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function y(e){return/[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}/.test(e)}function h(e){const u=(e!=null?e:"").replace(/\\|\/|\"|\'|\<|\>|\{|\}|\[|\]|\:|\^|\$|\!|\~|\`|\|/g,""),r=new RegExp("[`~!@#$^&()=|{}':;',<>/?]");let l="";for(let t=0;t<u.length;t++)l+=u.substr(t,1).replace(r,"");return e.length>l.length}function p(e){let u=!1;const r=["\u591A\u5730","\u53E6\u7ED9","\u7EBF\u4E0B","\u5730\u5740","\u5355\u72EC\u7ED9","\u5185\u90E8\u6C9F\u901A","\u5FAE\u4FE1","\u9489\u9489","\u77ED\u4FE1","\u6587\u4EF6","\u53E6\u5916","\u540E\u9762","\u4EE5\u540E","\u665A\u70B9","\u540E\u8865","\u518D\u7ED9"];for(let t=0;t<r.length;t++){const a=e.includes(r[t]);a&&(u=a)}const l=/^[0-9A-Za-z]*$/;if(l.test(e)&&(u=!0),!u){let t=[],a="";for(let n=0;n<e.length;n++)l.test(e[n])?a+=e[n]:(t.push(a),a=""),n===e.length-1&&(t.push(a),a="");for(let n=0;n<t.length;n++)t[n].length>5&&(u=!0)}return!u}function k(e){return e.replace(/[\b\f\n\r\t\v\\\'\"\?\0]/g,"")!==e}function g(e,u){return(u.find(l=>l.key===e)||{}).value||e}function o(e,u){let r="";for(let l=0;l<e.length;l++)r+=(u.find(t=>t.key===e[l])||{}).value||e[l];return r}function A(e){e=e.replace(" 00:00:00","");const u=[{key:"\u4E00",value:"1"},{key:"\u4E8C",value:"2"},{key:"\u4E09",value:"3"},{key:"\u56DB",value:"4"},{key:"\u4E94",value:"5"},{key:"\u516D",value:"6"},{key:"\u4E03",value:"7"},{key:"\u516B",value:"8"},{key:"\u4E5D",value:"9"}],r=[{key:"0",value:"0"},{key:"\u96F6",value:"0"}].concat(u),l=[{key:"\u5341",value:"10"}].concat(u),t=[{key:"\u5341",value:"1"}];let a=["\u5E74","\u6708","\u65E5"],n=e.replace(/[\r\n]/g,"").replace(/\s/g,""),s="",E="",f="";for(let c=0;c<a.length;c++)n=n.replace(a[c],c==2?"":"-");let i=n.split("-");return i.length!==3?e:(s=o(i[0],r),E=i[1].length>1?o(i[1],r.concat(t)):g(i[1],l),f=i[2].length>1?o(i[2],r.concat(t)):g(i[1],l),`${s+"-"+E+"-"+f}`)}export{y as a,p as b,A as c,k as h,h as i,v};
|