import{mn as e}from"./_plugin-vue_export-helper-C0lsYS1a.js";import{t}from"./message-Bn2oVZM9.js";import{t as n}from"./message-box-DuFVMV9v.js";const r=(e,n)=>t(e,n),i=(e,t)=>n({title:`提示`,confirmButtonText:`确定`,showCancelButton:!0,cancelButtonText:`取消`,center:!0,...e},t),a=e=>o(e)&&/^1[3-9]\d{9,9}$/.test(e),o=e=>typeof e==`string`,s=e=>o(e)&&/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(e),c=e=>!!e&&/^.{8}-.{4}-.{4}-.{4}-.{12}$/.test(e);let l;(function(e){let t=e.require={required:!0,message:()=>`输入不能为空！`,trigger:`blur`};e.nonNullStr={validator(e,t,n,r,i){typeof t==`string`&&t.length&&!t.trim()?n(Error(`输入不能为空字符串`)):n()},trigger:`change`},e.numberStr={validator(e,t,n,r,i){if(!t){n();return}typeof t==`string`&&!/^\d*$/.test(t)?n(Error(`请输入整数`)):n()},trigger:`change`},e.floatStr={validator(e,t,n,r,i){if(!t){n();return}if(typeof t!=`string`){n();return}let a=Error(`请输入正确格式，如：1.1`);/(^\.)|(\.$)/.test(t)?n(a):/^[\d\.]*$/.test(t)?n():n(a)},trigger:`change`},e.requireChange={required:!0,message:()=>`输入不能为空！`,trigger:`change`},e.requireChangeFactory=e=>({required:!0,message:()=>e,trigger:`change`}),e.phone=[t,{validator(e,t,n,r,i){if(!t){n();return}a(t)?n():n(Error(`格式：1[3-9] + 八位0-9数字`))},trigger:`change`}],e.email=[t,{validator(e,t,n,r,i){if(!t){n();return}s(t)?n():n(Error(`邮箱格式：xx@xx.xx`))},trigger:`change`}],e.date=[{type:`date`,required:!0,message:`请选择日期！`,trigger:`change`}],e.array=[{type:`array`,required:!0,message:`请至少选择一个！`,trigger:`change`}],e.check={validator(e,t,n,r,i){t===void 0?n(Error(`请选择！`)):n()},trigger:`blur`},e.columnLabel={validator(e,t,n,r,i){typeof t==`string`&&t.length?/\s/.test(t)?n(Error(`输入不能包含空格`)):/=/.test(t)?n(Error(`输入不能包含特殊字符：=`)):/\$/.test(t)?n(Error(`输入不能包含特殊字符：$`)):n():n()},trigger:`change`},e.limitHttpProtocol={validator(e,t,n,r,i){typeof t==`string`&&t.length?/^https?:\/\//.test(t)?n():n(Error(`请输入http://或https://开头的网址！`)):n()},trigger:`change`}})(l||={});let u;(function(e){e.trueAndFalse=(e,t,n,r)=>n===``||n===void 0?``:n?`是`:`否`,e.timeStrSplit=(e,t,n,r)=>{let i=typeof n==`string`&&n.split(` `);return i&&i[0]||``},e.timeToDate=(e,t,n,r)=>{if(!n||typeof n!=`number`)return``;let i=new Date(n),a={year:i.getFullYear(),month:i.getMonth()+1,day:i.getDate(),hours:i.getHours(),min:i.getMinutes(),seconds:i.getSeconds()};return`${a.year}-${a.month.toString().padStart(2,`0`)}-${a.day.toString().padStart(2,`0`)}`}})(u||={});const d=e=>typeof e==`string`?e.trim():e;export{r as a,d as i,l as n,i as o,c as r,u as t};