yq-tools 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ (function(i,N){typeof exports=="object"&&typeof module<"u"?N(exports,require("axios"),require("element-ui")):typeof define=="function"&&define.amd?define(["exports","axios","element-ui"],N):(i=typeof globalThis<"u"?globalThis:i||self,N(i.yq={},i.axios,i.ELEMENT))})(this,function(i,N,A){"use strict";function ut(e){if(typeof e=="object"){for(const t in e)if(typeof e[t]=="object"&&e[t].type==="RECORD"&&e[t].list){const n={},r=e[t].list,o=new Map;for(let c=0;c<r.length;c++)n[r[c].code]=r[c].name,o.set(r[c].name,r[c].code);e[t].data=n,e[t].map=o}}return e}function x(){const e=window.document.location.pathname;return e.substring(0,e.substr(1).indexOf("/")+1)}const q={method:"post",timeout:6e4,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}};function $(e,t){if(console.error('发送AJAX请求到"'+t+'"时出错',e),!e.response)e.code==="ECONNABORTED"||e.message.indexOf("timeout")!==-1?A.MessageBox.alert("请求超时,请检查网络!","错误",{confirmButtonText:"确定",type:"error"}):e.message==="Network Error"?A.MessageBox.alert("网络异常,请刷新页面重试!","错误",{confirmButtonText:"确定",type:"error"}):A.Message.error("ajax请求没有发出或已被取消");else{const n=e.response.status;if(n===404)A.MessageBox.alert("链接["+t+"]不存在!","404错误",{confirmButtonText:"确定",type:"error"});else if(n===500)A.MessageBox.alert("功能异常,请与管理员联系或稍后再试!","服务器错误",{confirmButtonText:"确定",type:"error"});else{const r=e.response.data||e.response.statusText;A.Message.error(typeof r=="string"?r:"请求失败")}}}function ee(e,t){if(!t||!t.prefix||typeof e!="object")return e;const n={};for(const r in e){let o=!0;t.prefixWhite?o=t.prefixWhite.indexOf(r)!==-1:t.prefixBlack&&(o=t.prefixBlack.indexOf(r)===-1),o?n[t.prefix+r]=e[r]:n[r]=e[r]}return n}function lt(e){if(!e||e.indexOf("attachment")===-1)return"";const t=/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(e);return t?decodeURIComponent(t[1].replace(/['"]/g,"")):""}class fe{constructor(){this.instance=N.create(q),this.loadingInstance=null,this.requestCount=0,this.setupInterceptors()}showLoading(t){if(t.loading!==!1&&(this.requestCount++,this.requestCount===1)){const n={lock:!0,text:t.loadingText||"加载中...",spinner:"el-icon-loading"};t.target&&(n.target=t.target),t.background&&(n.background=t.background),this.loadingInstance=A.Loading.service(n)}}hideLoading(){this.requestCount--,this.requestCount===0&&(this.loadingInstance&&this.loadingInstance.close(),this.loadingInstance=null)}setupInterceptors(){this.instance.interceptors.request.use(t=>(this.showLoading(t),t),t=>(this.hideLoading(),Promise.reject(t))),this.instance.interceptors.response.use(t=>(this.hideLoading(),t.data),t=>(this.hideLoading(),Promise.reject(t)))}getCtxPath(){return x()}remoteCall(t,n,r,o){let c=n||{};c=ee(c,o);const a=JSON.stringify(c),s={...q,...o,url:t,data:new URLSearchParams({data:a})};return this.instance(s).then(u=>(r&&r(u),u)).catch(u=>{throw $(u,t),u})}daoCall(t,n,r){r=r||{},r.loading===void 0&&(r.loading=!1);const o=r.contextPath?r.contextPath.indexOf("/")===-1?"/"+r.contextPath:r.contextPath:x();r&&r.prefix&&typeof t=="object"&&t.params&&(t.params=ee(t.params,r));const c=JSON.stringify(t),a=o+"/webcall",s={...q,...r,url:a,data:new URLSearchParams({data:c})};return this.instance(s).then(u=>(window.yq&&window.yq.cfg&&window.yq.cfg.recordSort&&(u=ut(u)),n&&n(u),u)).catch(u=>{throw $(u,a),u})}tableCall(t,n,r,o){n=n||{pageSize:20,pageIndex:1,data:{}},o&&o.prefix&&typeof n=="object"&&n.data&&(n.data=ee(n.data,o)),typeof n.data=="object"&&(n.data=JSON.stringify(n.data));const c={...q,...o,url:t,data:new URLSearchParams(n)};return this.instance(c).then(a=>(r&&r(a),a)).catch(a=>{throw $(a,t),a})}exportCall(t,n,r,o){o=o||{};const c=(o.method||"GET").toUpperCase();o.onStart&&o.onStart();const a={url:t,method:c,responseType:"blob",timeout:o.timeout||6e4};return n&&(c==="GET"?a.params=n:c==="POST"&&(a.data=new URLSearchParams(n),a.headers={"Content-Type":"application/x-www-form-urlencoded"})),N(a).then(s=>{o.onEnd&&o.onEnd();const u=s.headers["content-disposition"],l=lt(u)||o.defaultFilename||"download",m=s.data,f=document.createElement("a");return f.href=window.URL.createObjectURL(m),f.download=l,document.body.appendChild(f),f.click(),document.body.removeChild(f),window.URL.revokeObjectURL(f.href),r&&r(l),l}).catch(s=>{throw o.onEnd&&o.onEnd(),$(s,t),s})}get(t,n,r){const o={...r,url:t,method:"GET",params:n};return this.instance(o).catch(c=>{throw $(c,t),c})}post(t,n,r){r=r||{};const o=r.contentType||"form";let c=n,a={};o==="json"?(c=n,a["Content-Type"]="application/json"):o==="formData"?c=n:(c=new URLSearchParams(n),a["Content-Type"]="application/x-www-form-urlencoded");const s={...r,url:t,method:"POST",data:c,headers:{...a,...r.headers}};return this.instance(s).catch(u=>{throw $(u,t),u})}}const w=new fe;function de(e,t=300,n=!1){let r=null,o;const c=function(...a){if(r&&clearTimeout(r),n){const s=!r;r=setTimeout(()=>{r=null},t),s&&(o=e.apply(this,a))}else r=setTimeout(()=>{e.apply(this,a)},t);return o};return c.cancel=function(){clearTimeout(r),r=null},c}function me(e,t=300,n={}){let r=null,o=0;const{leading:c=!0,trailing:a=!0}=n,s=function(...u){const l=Date.now();!o&&!c&&(o=l);const m=t-(l-o);m<=0||m>t?(r&&(clearTimeout(r),r=null),o=l,e.apply(this,u)):!r&&a&&(r=setTimeout(()=>{o=c?Date.now():0,r=null,e.apply(this,u)},m))};return s.cancel=function(){clearTimeout(r),o=0,r=null},s}function ft(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function dt(e=21){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-";let n="";const r=new Uint8Array(e);if(typeof crypto<"u"&&crypto.getRandomValues)crypto.getRandomValues(r);else for(let o=0;o<e;o++)r[o]=Math.floor(Math.random()*256);for(let o=0;o<e;o++)n+=t[r[o]%64];return n}function ge(e,t=new WeakMap){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e);if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(t.has(e))return t.get(e);const n=Array.isArray(e)?[]:{};t.set(e,n);for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=ge(e[r],t));return n}function te(e,...t){if(!t.length)return e;const n=t.shift();if(ne(e)&&ne(n))for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(ne(n[r])?(e[r]||Object.assign(e,{[r]:{}}),te(e[r],n[r])):Object.assign(e,{[r]:n[r]}));return te(e,...t)}function ne(e){return Object.prototype.toString.call(e)==="[object Object]"}function mt(e,t,n){if(e==null||typeof e!="object")return e;const r=Array.isArray(t)?t:t.replace(/\[(\d+)\]/g,".$1").split(".");let o=e;for(let c=0;c<r.length-1;c++){const a=r[c],s=r[c+1];o[a]==null&&(o[a]=/^\d+$/.test(s)?[]:{}),o=o[a]}return o[r[r.length-1]]=n,e}function gt(e,t){if(e==null)return{};const n={...e};return t.forEach(r=>delete n[r]),n}function ht(e,t){if(e==null)return{};const n={};return t.forEach(r=>{Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}),n}function yt(e,t){if(!Array.isArray(e))return[];if(!t)return[...new Set(e)];const n=new Set;return e.filter(r=>{const o=typeof t=="function"?t(r):r[t];return n.has(o)?!1:(n.add(o),!0)})}function wt(e,t){return Array.isArray(e)?e.reduce((n,r)=>{const o=typeof t=="function"?t(r):r[t];return n[o]||(n[o]=[]),n[o].push(r),n},{}):{}}function pt(e,t=1){if(!Array.isArray(e)||t<1)return[];const n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}function he(e,t=1){return Array.isArray(e)?t<1?e.slice():e.reduce((n,r)=>(Array.isArray(r)&&t>0?n.push(...he(r,t-1)):n.push(r),n),[]):[]}function ye(e){return new Promise(t=>setTimeout(t,e))}async function _t(e,t=3,n=1e3){let r;for(let o=0;o<t;o++)try{return await e()}catch(c){r=c,o<t-1&&await ye(n)}throw r}function Et(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}function St(e=8,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"){let n="";for(let r=0;r<e;r++)n+=t.charAt(Math.floor(Math.random()*t.length));return n}function bt(e){if(!Array.isArray(e))return[];const t=[...e];for(let n=t.length-1;n>0;n--){const r=Math.floor(Math.random()*(n+1));[t[n],t[r]]=[t[r],t[n]]}return t}function M(e,t,n){const r=e.data&&e.data.on||e.componentInstance&&e.componentInstance.$listeners;r&&r[t]&&(typeof r[t]=="function"?r[t](n):Array.isArray(r[t])&&r[t].forEach(o=>o(n)))}function X(e,t){const n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.width="1px",n.style.height="1px",n.style.padding="0",n.style.border="none",n.style.outline="none",n.style.boxShadow="none",n.style.background="transparent",document.body.appendChild(n),n.select(),n.setSelectionRange(0,n.value.length);try{document.execCommand("copy")?M(t,"copy-success"):M(t,"copy-error",new Error("复制失败"))}catch(r){M(t,"copy-error",r)}finally{document.body.removeChild(n)}}const vt={inserted(e,t){try{const n=arguments[2],r=t.value;if(typeof r!="string"){console.warn(`[v-auth] 仅接受字符串,例如 v-auth="'a'"、v-auth="'a;b;'" 或 v-auth="'a,b'"`);return}const o=r.split(/[;,]/).map(a=>a&&a.trim()).filter(Boolean);if(!o.length){console.warn("[v-auth] 缺少权限ID");return}const c=o.join(",");w.remoteCall(`/cc-base/servlet/menu?action=checkRes&ids=${c}`,{},a=>{if(!(a&&a.state===1&&a.data)){console.error("[v-auth] 获取权限失败",a);return}const s=a.data;if(t.arg){const l=/\[(.*?)\]/,m=t.rawName&&t.rawName.match(l);if(m&&m[1]){const f=m[1],d=n&&n.context;d&&(d[f]||(d[f]={}),Array.isArray(s)?s.forEach(function(_){const P=_&&Object.keys(_)[0];P&&_[P]==="Y"&&(d.$set?d.$set(d[f],P,"Y"):d[f][P]="Y")}):s&&typeof s=="object"&&Object.keys(s).forEach(_=>{s[_]==="Y"&&(d.$set?d.$set(d[f],_,"Y"):d[f][_]="Y")}))}return}let u=!1;Array.isArray(s)?u=s.some(l=>{const m=l&&Object.keys(l)[0];return m&&l[m]==="Y"}):s&&typeof s=="object"&&(u=o.some(l=>s[l]==="Y")),!u&&e&&e.parentNode&&e.parentNode.removeChild(e)})}catch(n){console.error("[v-auth] 执行出错:",n)}}},Tt={inserted(e,t){const n=typeof t.value=="function"?t.value:t.value&&t.value.handler,r=typeof t.value=="object"?t.value:{},o=r.wait||300,c=!!r.immediate;if(typeof n!="function"){console.warn("[v-debounce] 需要传入函数或 { handler, wait, immediate } 对象");return}e.__debounce_handler__=de(n,o,c),e.addEventListener("click",e.__debounce_handler__)},unbind(e){e.__debounce_handler__&&(e.removeEventListener("click",e.__debounce_handler__),delete e.__debounce_handler__)}},Mt={inserted(e,t){const n=typeof t.value=="function"?t.value:t.value&&t.value.handler,r=typeof t.value=="object"?t.value:{},o=r.wait||300,c=r.leading!==void 0?r.leading:!0,a=r.trailing!==void 0?r.trailing:!0;if(typeof n!="function"){console.warn("[v-throttle] 需要传入函数或 { handler, wait, leading, trailing } 对象");return}e.__throttle_handler__=me(n,o,{leading:c,trailing:a}),e.addEventListener("click",e.__throttle_handler__)},unbind(e){e.__throttle_handler__&&(e.removeEventListener("click",e.__throttle_handler__),delete e.__throttle_handler__)}},Dt={bind(e,t,n){e.$copyHandler=function(){const r=t.value;if(!r){console.warn("[v-copy] 复制内容不能为空");return}navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(r).then(()=>{M(n,"copy-success")}).catch(o=>{console.error("[v-copy] Clipboard API 失败,使用降级方案",o),X(r,n)}):X(r,n)},e.addEventListener("click",e.$copyHandler)},update(e,t,n){e.$copyHandler&&e.removeEventListener("click",e.$copyHandler),e.$copyHandler=function(){const r=t.value;if(!r){console.warn("[v-copy] 复制内容不能为空");return}navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(r).then(()=>{M(n,"copy-success")}).catch(o=>{console.error("[v-copy] Clipboard API 失败,使用降级方案",o),X(r,n)}):X(r,n)},e.addEventListener("click",e.$copyHandler)},unbind(e){e.$copyHandler&&(e.removeEventListener("click",e.$copyHandler),delete e.$copyHandler)}},Ct={bind(e,t){const n=typeof t.value=="function"?t.value:t.value&&t.value.handler,r=t.value&&t.value.duration||600,o=(t.value&&t.value.preventContextMenu)!==!1;if(typeof n!="function"){console.warn("[v-longpress] 需要传入函数或 { handler, duration } 对象");return}let c=null,a=0,s=0;const u=f=>{f.type==="click"&&f.button!==0||c===null&&(a=f.clientX||f.touches&&f.touches[0]&&f.touches[0].clientX||0,s=f.clientY||f.touches&&f.touches[0]&&f.touches[0].clientY||0,c=setTimeout(()=>{n(f)},r))},l=()=>{c!==null&&(clearTimeout(c),c=null)},m=f=>{const d=f.clientX||f.touches&&f.touches[0]&&f.touches[0].clientX||0,_=f.clientY||f.touches&&f.touches[0]&&f.touches[0].clientY||0;(Math.abs(d-a)>10||Math.abs(_-s)>10)&&l()};e.__longpress_start__=u,e.__longpress_cancel__=l,e.__longpress_move_cancel__=m,e.addEventListener("mousedown",u),e.addEventListener("touchstart",u),e.addEventListener("click",l),e.addEventListener("mouseout",l),e.addEventListener("touchend",l),e.addEventListener("touchcancel",l),e.addEventListener("touchmove",m),o&&(e.__longpress_contextmenu__=f=>f.preventDefault(),e.addEventListener("contextmenu",e.__longpress_contextmenu__))},unbind(e){e.__longpress_start__&&(e.removeEventListener("mousedown",e.__longpress_start__),e.removeEventListener("touchstart",e.__longpress_start__),delete e.__longpress_start__),e.__longpress_cancel__&&(e.removeEventListener("click",e.__longpress_cancel__),e.removeEventListener("mouseout",e.__longpress_cancel__),e.removeEventListener("touchend",e.__longpress_cancel__),e.removeEventListener("touchcancel",e.__longpress_cancel__),delete e.__longpress_cancel__),e.__longpress_move_cancel__&&(e.removeEventListener("touchmove",e.__longpress_move_cancel__),delete e.__longpress_move_cancel__),e.__longpress_contextmenu__&&(e.removeEventListener("contextmenu",e.__longpress_contextmenu__),delete e.__longpress_contextmenu__)}},re={bind(e,t,n){const r=typeof t.value=="object"?t.value:{},o=r.handle,c=r.constraint!==void 0?r.constraint:!0,a=r.axis||"both",s=o?e.querySelector(o):e;if(!s){console.warn("[v-draggable] 未找到拖拽手柄元素");return}o?s.style.cursor="move":e.style.cursor="move";const u=window.getComputedStyle(e).position;if(u!=="absolute"&&u!=="fixed"){const S=e.getBoundingClientRect(),C=e.parentElement?e.parentElement.getBoundingClientRect():{left:0,top:0};e.style.position="absolute",e.style.left||(e.style.left=S.left-C.left+"px"),e.style.top||(e.style.top=S.top-C.top+"px")}let l=!1,m=0,f=0,d=0,_=0;const P=S=>{l=!0,m=S.clientX,f=S.clientY;const C=window.getComputedStyle(e);d=parseFloat(C.left)||0,_=parseFloat(C.top)||0,e.style.userSelect="none",s.style.cursor="move",M(n,"drag-start",{startX:m,startY:f,element:e}),S.preventDefault()},ot=S=>{if(!l)return;const C=S.clientX-m,st=S.clientY-f;let j=d+C,z=_+st;if(a==="x"?z=_:a==="y"&&(j=d),c&&e.parentElement){const at=e.parentElement,Ko=at.clientWidth,xo=at.clientHeight,ec=e.offsetWidth,tc=e.offsetHeight;j=Math.max(0,Math.min(j,Ko-ec)),z=Math.max(0,Math.min(z,xo-tc))}a!=="y"&&(e.style.left=j+"px"),a!=="x"&&(e.style.top=z+"px"),M(n,"drag-move",{x:j,y:z,deltaX:C,deltaY:st,element:e}),S.preventDefault()},ct=S=>{l&&(l=!1,e.style.userSelect="",M(n,"drag-end",{x:e.offsetLeft,y:e.offsetTop,element:e}),S.preventDefault())};s.addEventListener("mousedown",P),document.addEventListener("mousemove",ot),document.addEventListener("mouseup",ct),e.$dragHandlers={handleMouseDown:P,handleMouseMove:ot,handleMouseUp:ct,dragHandle:s}},unbind(e){if(e.$dragHandlers){const{handleMouseDown:t,handleMouseMove:n,handleMouseUp:r,dragHandle:o}=e.$dragHandlers;o.removeEventListener("mousedown",t),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",r),delete e.$dragHandlers}}},At={bind(e,t,n){const r=typeof t.value=="object"?t.value:{},o=r.constraint!==void 0?r.constraint:!1,c=()=>{let l=null;if(n.componentInstance&&n.componentInstance.$attrs&&(l=n.componentInstance.$attrs["custom-class"]),!l&&n.data&&n.data.attrs&&(l=n.data.attrs["custom-class"]),l)return document.querySelector(`.el-dialog.${l}`);const m=document.querySelectorAll(".el-dialog");return m[m.length-1]},a=()=>{setTimeout(()=>{const l=c();if(l&&!l.__dialog_drag_applied){l.__dialog_drag_applied=!0;const f=window.getComputedStyle(l).marginTop;f&&f!=="0px"&&f!=="auto"&&(l.style.marginTop="0",l.style.top=f),re.bind(l,{value:{handle:".el-dialog__header",constraint:o}},n);const d=l.querySelector(".el-dialog__header");d&&(d.style.cursor="move",d.style.userSelect="none")}},50)},s=()=>{const l=c();l&&(delete l.__dialog_drag_applied,l.$dragHandlers&&re.unbind(l))};e._dialogDragHandlers={opened:a,closed:s};const u=n.componentInstance;u&&(u.$on("opened",a),u.$on("closed",s))},unbind(e,t,n){const r=e._dialogDragHandlers;if(r){const o=n.componentInstance;o&&(o.$off("opened",r.opened),o.$off("closed",r.closed)),delete e._dialogDragHandlers}}},p={VUE:"vue",LEGACY:"legacy",STANDALONE:"standalone"};let F=null;function G(){try{return window.top||window}catch{return window}}function W(){if(F)return F;try{const e=G();if(e.__TAB_MANAGER__&&typeof e.__TAB_MANAGER__.openTab=="function")return F=p.VUE,p.VUE;if(e._createPage&&typeof e._createPage=="function")return F=p.LEGACY,p.LEGACY}catch{}return F=p.STANDALONE,p.STANDALONE}function kt(){F=null}function It(e,t,n){let r;if(typeof e=="string")r={url:e,title:t,data:n};else if(typeof e=="object"&&e!==null)r=e;else{console.error("[popup] openTab 参数格式错误");return}const o=W(),c=G();try{if(o===p.VUE)c.__TAB_MANAGER__.openTab(r);else if(o===p.LEGACY)c._createPage(r);else{const a=r.data?`${r.url}${r.url.includes("?")?"&":"?"}${new URLSearchParams(r.data).toString()}`:r.url;window.open(a,"_blank")}typeof r.callback=="function"&&r.callback()}catch(a){console.error("[popup] 打开标签页失败:",a)}}function Ot(e){const t=typeof e=="string"?{id:e}:e;if(!t||!t.id){console.error("[popup] jumpTab 需要提供标签页 ID");return}const n=W(),r=G();try{n===p.VUE?r.__TAB_MANAGER__.jumpTab(t):n===p.LEGACY?r._jumpPage(t):console.warn("[popup] 独立运行模式不支持 jumpTab")}catch(o){console.error("[popup] 跳转标签页失败:",o)}}function Lt(e){const t=typeof e=="string"?{id:e}:e,n=W(),r=G();try{n===p.VUE?r.__TAB_MANAGER__.closeTab(t):n===p.LEGACY?r._removePage(t):window.close()}catch(o){console.error("[popup] 关闭标签页失败:",o)}}function Pt(){try{return window.self!==window.top}catch{return!0}}function Nt(){return W()}function h(e){if(e instanceof Date)return new Date(e);if(typeof e=="number")return new Date(e);if(typeof e=="string"){const t=e.replace(/-/g,"/");return new Date(t)}return new Date}function Y(e,t=2){return String(e).padStart(t,"0")}function k(e,t="YYYY-MM-DD HH:mm:ss"){const n=h(e);if(isNaN(n.getTime()))return"";const r={YYYY:n.getFullYear(),MM:Y(n.getMonth()+1),DD:Y(n.getDate()),HH:Y(n.getHours()),mm:Y(n.getMinutes()),ss:Y(n.getSeconds()),SSS:Y(n.getMilliseconds(),3)};return t.replace(/YYYY|MM|DD|HH|mm|ss|SSS/g,o=>r[o])}function $t(e,t="HH:mm:ss"){return k(e,t)}function Ft(e){const t=h(e);if(isNaN(t.getTime()))return"";const r=new Date().getTime()-t.getTime(),o=Math.floor(r/1e3),c=Math.floor(o/60),a=Math.floor(c/60),s=Math.floor(a/24);return o<60?"刚刚":c<60?`${c}分钟前`:a<24?`${a}小时前`:s===1?"昨天":s<7?`${s}天前`:s<30?`${Math.floor(s/7)}周前`:s<365?`${Math.floor(s/30)}个月前`:k(t,"YYYY-MM-DD")}function Yt(e,t="YYYY-MM-DD"){if(!e)return null;const n=t.match(/YYYY|MM|DD|HH|mm|ss/g)||[],r=t.replace(/YYYY/g,"(\\d{4})").replace(/MM|DD|HH|mm|ss/g,"(\\d{2})"),o=e.match(new RegExp(`^${r}$`));if(!o)return null;const c={YYYY:1970,MM:1,DD:1,HH:0,mm:0,ss:0};return n.forEach((a,s)=>{c[a]=parseInt(o[s+1],10)}),new Date(c.YYYY,c.MM-1,c.DD,c.HH,c.mm,c.ss)}function I(e,t){const n=h(e);return n.setDate(n.getDate()+t),n}function ie(e,t){const n=h(e),r=n.getDate();return n.setMonth(n.getMonth()+t),n.getDate()!==r&&n.setDate(0),n}function we(e,t){return ie(e,t*12)}function Rt(e,t){const n=h(e);return n.setHours(n.getHours()+t),n}function Ut(e,t){const n=h(e);return n.setMinutes(n.getMinutes()+t),n}function Wt(e,t){const n=b(e),r=b(t);return Math.round((n.getTime()-r.getTime())/(1e3*60*60*24))}function Bt(e,t){const n=h(e),r=h(t);return(n.getFullYear()-r.getFullYear())*12+(n.getMonth()-r.getMonth())}function Ht(e){return V(e,new Date)}function jt(e){return V(e,I(new Date,-1))}function zt(e){return V(e,I(new Date,1))}function qt(e){const t=h(e).getDay();return t===0||t===6}function Xt(e){return e%4===0&&e%100!==0||e%400===0}function V(e,t){const n=h(e),r=h(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()}function Gt(e,t){return h(e).getTime()<h(t).getTime()}function Vt(e,t){return h(e).getTime()>h(t).getTime()}function b(e){const t=h(e);return t.setHours(0,0,0,0),t}function O(e){const t=h(e);return t.setHours(23,59,59,999),t}function Zt(e){const t=h(e),n=t.getDay(),r=n===0?-6:1-n;return t.setDate(t.getDate()+r),b(t)}function Jt(e){const t=h(e),n=t.getDay(),r=n===0?0:7-n;return t.setDate(t.getDate()+r),O(t)}function Qt(e){const t=h(e);return t.setDate(1),b(t)}function Kt(e){const t=h(e);return t.setMonth(t.getMonth()+1,0),O(t)}function xt(e,t){return new Date(e,t,0).getDate()}function en(e){const t=h(e),n=new Date(t.getFullYear(),0,1),r=Math.floor((t.getTime()-n.getTime())/(1e3*60*60*24));return Math.ceil((r+n.getDay()+1)/7)}function tn(e){const t=h(e),n=new Date(t.getFullYear(),0,0);return Math.floor((t.getTime()-n.getTime())/(1e3*60*60*24))}function nn(){const e=O(new Date);return{start:b(I(new Date,-6)),end:e}}function rn(){const e=O(new Date);return{start:b(I(new Date,-29)),end:e}}function on(){const e=O(new Date);return{start:b(ie(new Date,-6)),end:e}}function cn(){const e=O(new Date);return{start:b(we(new Date,-1)),end:e}}function sn(){return Date.now()}function an(e="YYYY-MM-DD"){return k(new Date,e)}function un(e="YYYY-MM-DD"){return k(I(new Date,-1),e)}function ln(e="YYYY-MM-DD"){return k(I(new Date,1),e)}function fn(){return new Date().getTimezoneOffset()}function dn(){return Intl.DateTimeFormat().resolvedOptions().timeZone}function pe(e,t){const n=h(e),o=new Intl.DateTimeFormat("en-US",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(n),c=a=>{var s;return((s=o.find(u=>u.type===a))==null?void 0:s.value)||"0"};return new Date(parseInt(c("year")),parseInt(c("month"))-1,parseInt(c("day")),parseInt(c("hour")),parseInt(c("minute")),parseInt(c("second")))}function mn(e,t,n="YYYY-MM-DD HH:mm:ss"){const r=pe(e,t);return k(r,n)}function gn(e){const t=h(e);return new Date(t.getTime()+t.getTimezoneOffset()*6e4)}function hn(e){const t=h(e);return new Date(t.getTime()-t.getTimezoneOffset()*6e4)}function _e(e=window.location.href){if(!e)return"";const t=e.indexOf("?");if(t===-1)return"";const n=e.indexOf("#");return n===-1?e.slice(t+1):e.slice(t+1,n)}function B(e=window.location.href){const t=_e(e);return Se(t)}function yn(e,t=window.location.href){const n=B(t);return n[e]!==void 0?n[e]:null}function wn(e,t,n=window.location.href){return Ee({[e]:t},n)}function Ee(e,t=window.location.href){if(!t)return"";const n=t.indexOf("#"),r=n!==-1?t.slice(n):"",o=n!==-1?t.slice(0,n):t,c=o.indexOf("?"),a=c!==-1?o.slice(0,c):o,u={...B(o),...e},l=oe(u);return l?`${a}?${l}${r}`:`${a}${r}`}function pn(e,t=window.location.href){if(!t)return"";const n=t.indexOf("#"),r=n!==-1?t.slice(n):"",o=n!==-1?t.slice(0,n):t,c=o.indexOf("?"),a=c!==-1?o.slice(0,c):o,s=B(o);delete s[e];const u=oe(s);return u?`${a}?${u}${r}`:`${a}${r}`}function _n(e,t=window.location.href){const n=B(t);return e in n}function oe(e){if(!e||typeof e!="object")return"";const t=[];for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const r=e[n];if(r==null)continue;Array.isArray(r)?r.forEach(o=>{t.push(`${encodeURIComponent(n)}=${encodeURIComponent(o)}`)}):t.push(`${encodeURIComponent(n)}=${encodeURIComponent(r)}`)}return t.join("&")}function Se(e){if(!e)return{};const t=e.startsWith("?")?e.slice(1):e;if(!t)return{};const n={},r=t.split("&");for(const o of r){if(!o)continue;const[c,a=""]=o.split("="),s=decodeURIComponent(c),u=decodeURIComponent(a);s in n?Array.isArray(n[s])?n[s].push(u):n[s]=[n[s],u]:n[s]=u}return n}function be(...e){return e.filter(t=>t).map((t,n)=>{let r=String(t);return n>0&&(r=r.replace(/^\/+/,"")),n<e.length-1&&(r=r.replace(/\/+$/,"")),r}).join("/")}function ce(e){return e?/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e):!1}function En(e){return e?!ce(e):!1}function Sn(e){if(!e)return"";try{return new URL(e).href}catch{return e.replace(/([^:]\/)\/+/g,"$1").replace(/\/+$/,"")}}function bn(e,t){if(!e)return t||"";if(!t)return e;if(ce(t))return t;try{return new URL(t,e).href}catch{return be(e,t)}}function vn(e,t=0){if(!e||!e.getBoundingClientRect)return!1;const n=e.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight,o=window.innerWidth||document.documentElement.clientWidth;if(n.bottom<0||n.top>r||n.right<0||n.left>o)return!1;if(t===0)return!0;const c=Math.min(n.bottom,r)-Math.max(n.top,0),a=Math.min(n.right,o)-Math.max(n.left,0),s=c*a,u=n.height*n.width;return u>0&&s/u>=t}function Tn(e){if(!e||!e.getBoundingClientRect)return!1;const t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;return t.top>=0&&t.left>=0&&t.bottom<=n&&t.right<=r}function Mn(e){if(!e||!e.getBoundingClientRect)return 0;const t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;if(t.bottom<0||t.top>n||t.right<0||t.left>r)return 0;const o=Math.min(t.bottom,n)-Math.max(t.top,0),c=Math.min(t.right,r)-Math.max(t.left,0),a=o*c,s=t.height*t.width;return s>0?a/s:0}function Dn(e,t,n={}){if(!e||typeof t!="function")return null;const r=new IntersectionObserver(o=>{o.forEach(c=>{t({isIntersecting:c.isIntersecting,ratio:c.intersectionRatio,entry:c})})},{threshold:n.threshold||0,rootMargin:n.rootMargin||"0px",root:n.root||null});return r.observe(e),r}function Cn(e=300){if(e<=0){window.scrollTo(0,0);return}const t=window.pageYOffset||document.documentElement.scrollTop,n=performance.now(),r=o=>{const c=o-n,a=Math.min(c/e,1),s=a<.5?2*a*a:1-Math.pow(-2*a+2,2)/2;window.scrollTo(0,t*(1-s)),a<1&&requestAnimationFrame(r)};requestAnimationFrame(r)}function An(e,t=0,n=300){const r=typeof e=="string"?document.querySelector(e):e;if(!r)return;const o=r.getBoundingClientRect().top+window.pageYOffset+t;if(n<=0){window.scrollTo(0,o);return}const c=window.pageYOffset||document.documentElement.scrollTop,a=o-c,s=performance.now(),u=l=>{const m=l-s,f=Math.min(m/n,1),d=f<.5?2*f*f:1-Math.pow(-2*f+2,2)/2;window.scrollTo(0,c+a*d),f<1&&requestAnimationFrame(u)};requestAnimationFrame(u)}function kn(){const e=window.pageYOffset||document.documentElement.scrollTop,t=document.documentElement.scrollHeight-document.documentElement.clientHeight;return t<=0?0:Math.round(e/t*100)}let E={locked:!1,scrollY:0,bodyStyle:{}};function In(){E.locked||(E.scrollY=window.pageYOffset,E.bodyStyle={overflow:document.body.style.overflow,position:document.body.style.position,top:document.body.style.top,width:document.body.style.width},document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${E.scrollY}px`,document.body.style.width="100%",E.locked=!0)}function On(){E.locked&&(document.body.style.overflow=E.bodyStyle.overflow||"",document.body.style.position=E.bodyStyle.position||"",document.body.style.top=E.bodyStyle.top||"",document.body.style.width=E.bodyStyle.width||"",window.scrollTo(0,E.scrollY),E.locked=!1)}function Ln(){const e=document.createElement("div");e.style.cssText="visibility:hidden;overflow:scroll;width:100px;position:absolute;top:-9999px",document.body.appendChild(e);const t=document.createElement("div");t.style.width="100%",e.appendChild(t);const n=e.offsetWidth-t.offsetWidth;return document.body.removeChild(e),n}function ve(e=document.documentElement){return e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen?e.msRequestFullscreen():Promise.reject(new Error("Fullscreen API not supported"))}function Te(){return document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():Promise.reject(new Error("Fullscreen API not supported"))}function Me(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}function Pn(e=document.documentElement){return Me()?Te():ve(e)}const g=typeof navigator<"u"?navigator.userAgent:"";function R(){if(!g)return{name:"unknown",version:""};let e="unknown",t="";return/Edg\/(\d+[\d.]*)/i.test(g)?(e="edge",t=RegExp.$1):/Chrome\/(\d+[\d.]*)/i.test(g)&&!/Edg/i.test(g)?(e="chrome",t=RegExp.$1):/Firefox\/(\d+[\d.]*)/i.test(g)?(e="firefox",t=RegExp.$1):/Safari\/(\d+[\d.]*)/i.test(g)&&!/Chrome/i.test(g)?(e="safari",/Version\/(\d+[\d.]*)/i.test(g)&&(t=RegExp.$1)):/MSIE\s(\d+[\d.]*)/i.test(g)||/Trident.*rv:(\d+[\d.]*)/i.test(g)?(e="ie",t=RegExp.$1):/Opera|OPR\/(\d+[\d.]*)/i.test(g)&&(e="opera",t=RegExp.$1),{name:e,version:t}}function Nn(){return R().name==="chrome"}function $n(){return R().name==="firefox"}function Fn(){return R().name==="safari"}function Yn(){return R().name==="edge"}function Rn(){return R().name==="ie"}function Un(){return/MicroMessenger/i.test(g)}function Wn(){return/MicroMessenger/i.test(g)&&/miniProgram/i.test(g)}function Bn(){return/AlipayClient/i.test(g)}function Hn(){return/DingTalk/i.test(g)}function jn(){return/wxwork/i.test(g)}function U(){if(!g)return{name:"unknown",version:""};let e="unknown",t="";if(/Windows NT (\d+[\d.]*)/i.test(g)){e="windows";const n=RegExp.$1;t={"10.0":"10","6.3":"8.1","6.2":"8","6.1":"7","6.0":"Vista","5.1":"XP"}[n]||n}else/Mac OS X (\d+[._\d]*)/i.test(g)?(e="macos",t=RegExp.$1.replace(/_/g,".")):/Android[\s/]?(\d+[\d.]*)?/i.test(g)?(e="android",t=RegExp.$1||""):/iPhone OS (\d+[_\d]*)/i.test(g)||/iPad.*OS (\d+[_\d]*)/i.test(g)?(e="ios",t=RegExp.$1.replace(/_/g,".")):/Linux/i.test(g)&&(e="linux");return{name:e,version:t}}function zn(){return U().name==="windows"}function De(){return U().name==="macos"}function qn(){return U().name==="linux"}function Xn(){return U().name==="android"}function Gn(){return U().name==="ios"}function Z(){return g?/iPad/i.test(g)||De()&&"ontouchend"in document||/tablet|playbook|silk/i.test(g)?"tablet":/mobile|android|iphone|ipod|blackberry|iemobile|opera mini/i.test(g)?"mobile":"desktop":"desktop"}function Vn(){return Z()==="mobile"}function Zn(){return Z()==="tablet"}function Jn(){return Z()==="desktop"}function Qn(){return typeof window>"u"?!1:"ontouchstart"in window||navigator.maxTouchPoints>0}function Kn(){if(typeof document>"u")return!1;try{const e=document.createElement("canvas");return!!(window.WebGLRenderingContext&&(e.getContext("webgl")||e.getContext("experimental-webgl")))}catch{return!1}}function xn(){return typeof WebSocket<"u"}function er(){try{const e="__test_ls__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch{return!1}}function tr(){try{const e="__test_ss__";return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch{return!1}}function nr(){return typeof indexedDB<"u"}function rr(){return typeof Worker<"u"}function ir(){return"serviceWorker"in navigator}function or(){return"Notification"in window}function cr(){return"geolocation"in navigator}function sr(){return navigator.clipboard&&typeof navigator.clipboard.writeText=="function"}function Ce(){return typeof navigator<"u"?navigator.onLine:!0}function se(){const e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return e?e.effectiveType?e.effectiveType:e.type==="wifi"?"wifi":"unknown":"unknown"}function ar(e){if(typeof e!="function")return()=>{};const t=()=>e({online:!0,type:se()}),n=()=>e({online:!1,type:"unknown"});window.addEventListener("online",t),window.addEventListener("offline",n);const r=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return r&&r.addEventListener("change",()=>{e({online:Ce(),type:se()})}),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}function Ae(){return typeof process<"u"&&process.env?process.env.NODE_ENV==="development":typeof location<"u"?location.hostname==="localhost"||location.hostname==="127.0.0.1"||location.hostname.startsWith("192.168."):!1}function ur(){return typeof process<"u"&&process.env?process.env.NODE_ENV==="production":!Ae()}function lr(){return typeof window>"u"}function fr(){return typeof window<"u"}const ke=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,Ie=/^1[3-9]\d{9}$/,Oe=/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/,Le=/^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/i,Pe=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,Ne=/^[\u4e00-\u9fa5]+$/;function dr(e){return e?ke.test(e):!1}function mr(e){return e?Ie.test(e):!1}function gr(e){return e?/^(?:0\d{2,3}-?)?\d{7,8}(?:-\d{1,4})?$/.test(e):!1}function hr(e){if(!e||!Oe.test(e))return!1;const t=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2],n=["1","0","X","9","8","7","6","5","4","3","2"];let r=0;for(let o=0;o<17;o++)r+=parseInt(e[o])*t[o];return n[r%11]===e[17].toUpperCase()}function yr(e){return e?Le.test(e):!1}function wr(e){return $e(e)||Fe(e)}function $e(e){return e?Pe.test(e):!1}function Fe(e){return e?/^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$/.test(e)||/^([0-9a-fA-F]{1,4}:){1,7}:$/.test(e)||/^([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}$/.test(e)||/^::([0-9a-fA-F]{1,4}:){0,5}[0-9a-fA-F]{1,4}$/.test(e):!1}function pr(e){return e===""||e===null||e===void 0?!1:/^[1-9]\d*$/.test(String(e))}function _r(e){return e===""||e===null||e===void 0?!1:/^-[1-9]\d*$/.test(String(e))}function Er(e){return e===""||e===null||e===void 0?!1:/^-?\d+\.\d+$/.test(String(e))}function Sr(e){return e===""||e===null||e===void 0?!1:/^(?:0|[1-9]\d*)(?:\.\d{1,2})?$/.test(String(e))}function br(e){return e?Ne.test(e):!1}function vr(e){return e?/^[a-zA-Z]+$/.test(e):!1}function Tr(e){return e?/^[a-z]+$/.test(e):!1}function Mr(e){return e?/^[A-Z]+$/.test(e):!1}function Dr(e){return e?/^\d{16,19}$/.test(e.replace(/\s/g,"")):!1}function Cr(e){return e?/^[1-9]\d{5}$/.test(e):!1}function Ar(e){return e?/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/.test(e):!1}function kr(e){if(!e||!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;const t=new Date(e);return!isNaN(t.getTime())}function Ir(e){return e?/^(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d)?$/.test(e):!1}function Or(e,t){return!e||!t?!1:t.test(e)}function Lr(e,t){const n=[];for(const r of t)r.regex.test(e)||n.push(r.message||`${r.name} 校验失败`);return{valid:n.length===0,errors:n}}function ae(e){return e&&e.split(/[/\\]/).pop()||""}function v(e){const n=(typeof e=="string"?e:(e==null?void 0:e.name)||"").match(/\.([^.]+)$/);return n?n[1].toLowerCase():""}function Pr(e){const t=ae(e),n=t.lastIndexOf(".");return n>0?t.slice(0,n):t}function Nr(e){return(e==null?void 0:e.size)||0}function $r(e,t=2){if(e===0)return"0 B";const n=1024,r=["B","KB","MB","GB","TB","PB"],o=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,o)).toFixed(t))+" "+r[o]}const Fr=["jpg","jpeg","png","gif","bmp","webp","svg","ico","tiff","heic","heif"],Yr=["mp4","webm","ogg","avi","mov","wmv","flv","mkv","m4v"],Rr=["mp3","wav","ogg","aac","flac","wma","m4a"],Ur=["pdf"],Wr=["doc","docx"],Br=["xls","xlsx"],Hr=["zip","rar","7z","tar","gz","bz2"];function Ye(e){return Fr.includes(v(e))}function Re(e){return Yr.includes(v(e))}function Ue(e){return Rr.includes(v(e))}function We(e){return Ur.includes(v(e))}function Be(e){return Wr.includes(v(e))}function He(e){return Br.includes(v(e))}function je(e){return Hr.includes(v(e))}function jr(e){return(e==null?void 0:e.type)||""}function zr(e){return Ye(e)?"image":Re(e)?"video":Ue(e)?"audio":We(e)||Be(e)||He(e)?"document":je(e)?"archive":"other"}function ze(e,t="UTF-8"){return new Promise((n,r)=>{const o=new FileReader;o.onload=()=>n(o.result),o.onerror=()=>r(new Error("读取文件失败")),o.readAsText(e,t)})}function J(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>t(r.result),r.onerror=()=>n(new Error("读取文件失败")),r.readAsDataURL(e)})}function qr(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>t(r.result),r.onerror=()=>n(new Error("读取文件失败")),r.readAsArrayBuffer(e)})}async function Xr(e){const t=await ze(e);return JSON.parse(t)}function qe(e,t){const n=document.createElement("a");n.href=e,n.download=t||ae(e),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}function Xe(e,t){const n=URL.createObjectURL(e);qe(n,t),setTimeout(()=>URL.revokeObjectURL(n),100)}function Ge(e,t,n="text/plain"){const r=new Blob([e],{type:n});Xe(r,t)}function Gr(e,t){const n=JSON.stringify(e,null,2);Ge(n,t,"application/json")}function Vr(e,t){let n=e,r=t;if(e.includes(",")){const s=e.split(","),u=s[0].match(/:(.*?);/);r=r||(u?u[1]:"application/octet-stream"),n=s[1]}const o=atob(n),c=new Array(o.length);for(let s=0;s<o.length;s++)c[s]=o.charCodeAt(s);const a=new Uint8Array(c);return new Blob([a],{type:r})}function Zr(e){return J(e)}function Jr(e){return J(e)}async function Qr(e){return(await fetch(e)).blob()}function Kr(e,t){const n=e.split(","),r=n[0].match(/:(.*?);/)[1],o=atob(n[1]);let c=o.length;const a=new Uint8Array(c);for(;c--;)a[c]=o.charCodeAt(c);return new File([a],t,{type:r})}async function Q(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>t(r),r.onerror=()=>n(new Error("图片加载失败")),typeof e=="string"?r.src=e:J(e).then(o=>{r.src=o})})}async function xr(e,t={}){const{quality:n=.8,maxWidth:r,maxHeight:o,type:c="image/jpeg"}=t,a=await Q(e);let{width:s,height:u}=a;r&&s>r&&(u=u*r/s,s=r),o&&u>o&&(s=s*o/u,u=o);const l=document.createElement("canvas");return l.width=s,l.height=u,l.getContext("2d").drawImage(a,0,0,s,u),new Promise(f=>{l.toBlob(d=>f(d),c,n)})}async function ei(e,t,n,r){const o=await Q(e),c=document.createElement("canvas");c.width=t,c.height=n,c.getContext("2d").drawImage(o,0,0,t,n);const s=r||e.type||"image/png";return new Promise(u=>{c.toBlob(l=>u(l),s)})}async function Ve(e){const t=await Q(e);return{width:t.width,height:t.height}}async function ti(e,t,n){const r=await Q(e),o=document.createElement("canvas"),c=o.getContext("2d"),a=t*Math.PI/180,s=Math.abs(Math.sin(a)),u=Math.abs(Math.cos(a));o.width=r.width*u+r.height*s,o.height=r.width*s+r.height*u,c.translate(o.width/2,o.height/2),c.rotate(a),c.drawImage(r,-r.width/2,-r.height/2);const l=n||e.type||"image/png";return new Promise(m=>{o.toBlob(f=>m(f),l)})}function ni(e,t){return e.size<=t}function ri(e,t){if(!t)return!0;const n=Array.isArray(t)?t:t.split(",").map(c=>c.trim()),r="."+v(e),o=e.type;return n.some(c=>{if(c.startsWith("."))return r.toLowerCase()===c.toLowerCase();if(c.endsWith("/*")){const a=c.slice(0,-1);return o.startsWith(a)}return o===c})}async function ii(e,t={}){const{minWidth:n,maxWidth:r,minHeight:o,maxHeight:c,width:a,height:s}=t,u=await Ve(e);return!(a!==void 0&&u.width!==a||s!==void 0&&u.height!==s||n!==void 0&&u.width<n||r!==void 0&&u.width>r||o!==void 0&&u.height<o||c!==void 0&&u.height>c)}function oi(e,t=null){try{const n=localStorage.getItem(e);if(n===null)return t;const r=JSON.parse(n);return r&&r.__expires__&&Date.now()>r.__expires__?(Ze(e),t):r&&r.__value__!==void 0?r.__value__:r}catch{return t}}function ci(e,t,n){try{let r;if(n){const o=n instanceof Date?n.getTime():Date.now()+n;r={__value__:t,__expires__:o}}else r=t;localStorage.setItem(e,JSON.stringify(r))}catch(r){console.warn("LocalStorage setItem failed:",r)}}function Ze(e){try{localStorage.removeItem(e)}catch(t){console.warn("LocalStorage removeItem failed:",t)}}function si(){try{localStorage.clear()}catch(e){console.warn("LocalStorage clear failed:",e)}}function ai(e){try{return localStorage.getItem(e)!==null}catch{return!1}}function ui(){try{return Object.keys(localStorage)}catch{return[]}}function li(e,t=null){try{const n=sessionStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}}function fi(e,t){try{sessionStorage.setItem(e,JSON.stringify(t))}catch(n){console.warn("SessionStorage setItem failed:",n)}}function di(e){try{sessionStorage.removeItem(e)}catch(t){console.warn("SessionStorage removeItem failed:",t)}}function mi(){try{sessionStorage.clear()}catch(e){console.warn("SessionStorage clear failed:",e)}}function gi(e){try{return sessionStorage.getItem(e)!==null}catch{return!1}}function hi(){try{return Object.keys(sessionStorage)}catch{return[]}}function Je(e){if(!e)return null;const t=document.cookie.split(";");for(const n of t){const[r,o]=n.trim().split("=");if(r===e)try{return decodeURIComponent(o)}catch{return o}}return null}function Qe(e,t,n={}){const{expires:r,path:o="/",domain:c,secure:a,sameSite:s}=n;let u=`${e}=${encodeURIComponent(t)}`;if(r){let l;r instanceof Date?l=r:typeof r=="number"&&(l=new Date(Date.now()+r*24*60*60*1e3)),l&&(u+=`; expires=${l.toUTCString()}`)}o&&(u+=`; path=${o}`),c&&(u+=`; domain=${c}`),a&&(u+="; secure"),s&&(u+=`; SameSite=${s}`),document.cookie=u}function yi(e,t={}){Qe(e,"",{...t,expires:new Date(0)})}function wi(e){return Je(e)!==null}function pi(){const e={};return document.cookie.split(";").forEach(t=>{const[n,r]=t.trim().split("=");if(n)try{e[n]=decodeURIComponent(r)}catch{e[n]=r}}),e}function _i(e="local",t=""){const n=e==="session"?sessionStorage:localStorage,r=o=>t?`${t}:${o}`:o;return{get(o,c=null){try{const a=n.getItem(r(o));if(a===null)return c;const s=JSON.parse(a);return s&&s.__expires__&&Date.now()>s.__expires__?(this.remove(o),c):s&&s.__value__!==void 0?s.__value__:s}catch{return c}},set(o,c,a){try{let s;if(a){const u=a instanceof Date?a.getTime():Date.now()+a;s={__value__:c,__expires__:u}}else s=c;n.setItem(r(o),JSON.stringify(s))}catch(s){console.warn("Storage setItem failed:",s)}},remove(o){try{n.removeItem(r(o))}catch(c){console.warn("Storage removeItem failed:",c)}},clear(){try{t?Object.keys(n).forEach(c=>{c.startsWith(`${t}:`)&&n.removeItem(c)}):n.clear()}catch(o){console.warn("Storage clear failed:",o)}},has(o){try{return n.getItem(r(o))!==null}catch{return!1}},keys(){try{const o=Object.keys(n);return t?o.filter(c=>c.startsWith(`${t}:`)).map(c=>c.slice(t.length+1)):o}catch{return[]}}}}function Ei(e="local"){try{const t=e==="session"?sessionStorage:localStorage;let n=0;for(const o in t)t.hasOwnProperty(o)&&(n+=(o.length+t.getItem(o).length)*2);return{used:n,usedFormatted:(o=>o<1024?o+" B":o<1024*1024?(o/1024).toFixed(2)+" KB":(o/(1024*1024)).toFixed(2)+" MB")(n)}}catch{return{used:0,usedFormatted:"0 B"}}}function Si(e="local"){try{if(e==="cookie"){document.cookie="__test__=1";const r=document.cookie.indexOf("__test__")!==-1;return document.cookie="__test__=; expires=Thu, 01 Jan 1970 00:00:00 GMT",r}const t=e==="session"?sessionStorage:localStorage,n="__storage_test__";return t.setItem(n,"test"),t.removeItem(n),!0}catch{return!1}}function bi(e,t){const n=r=>{if(r.storageArea!==localStorage||e&&r.key!==e)return;let o=r.newValue,c=r.oldValue;try{o=JSON.parse(o),o&&o.__value__!==void 0&&(o=o.__value__)}catch{}try{c=JSON.parse(c),c&&c.__value__!==void 0&&(c=c.__value__)}catch{}t(o,c,r.key)};return window.addEventListener("storage",n),()=>{window.removeEventListener("storage",n)}}function Ke(e){if(!e)return"";const t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};return String(e).replace(/[&<>"'`=/]/g,n=>t[n])}function vi(e){if(!e)return"";const t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#x2F;":"/","&#x60;":"`","&#x3D;":"=","&#39;":"'"};return String(e).replace(/&(amp|lt|gt|quot|#x27|#x2F|#x60|#x3D|#39);/g,n=>t[n]||n)}function Ti(e,t={}){if(!e)return"";const{allowedTags:n=["p","br","b","i","u","strong","em","a","ul","ol","li","span","div"],allowedAttrs:r=["href","class","style"]}=t,o=document.createElement("div");o.innerHTML=e;const c=a=>{Array.from(a.children).forEach(u=>{const l=u.tagName.toLowerCase();if(!n.includes(l)){u.outerHTML=Ke(u.textContent);return}Array.from(u.attributes).forEach(f=>{if(r.includes(f.name.toLowerCase())||u.removeAttribute(f.name),f.name.toLowerCase()==="href"){const d=f.value.toLowerCase().trim();(d.startsWith("javascript:")||d.startsWith("data:"))&&u.removeAttribute("href")}if(f.name.toLowerCase()==="style"){const d=f.value.toLowerCase();(d.includes("expression")||d.includes("javascript:"))&&u.removeAttribute("style")}}),c(u)})};return c(o),o.innerHTML}function Mi(e){return e?String(e).replace(/<[^>]*>/g,""):""}function Di(e){return e?String(e).replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/"/g,'\\"').replace(/\x00/g,"\\0").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\x1a/g,"\\Z"):""}function Ci(e){return e?encodeURIComponent(e):""}function Ai(e){if(!e)return"";try{return decodeURIComponent(e)}catch{return e}}function ki(e){if(!e)return!1;try{return new URL(e),!0}catch{return!1}}function xe(e){if(!e)return!1;const t=e.trim().toLowerCase();return!["javascript:","data:","vbscript:"].some(r=>t.startsWith(r))}function Ii(e,t="#"){return e&&xe(e)?e:t}function Oi(e){if(!e)return"";const t=String(e);return t.length<7?t:t.replace(/(\d{3})\d{4}(\d+)/,"$1****$2")}function Li(e){if(!e)return"";const t=String(e);return t.length<8?t:t.replace(/^(.{3})(.*)(.{4})$/,(n,r,o,c)=>r+"*".repeat(o.length)+c)}function Pi(e){if(!e)return"";const t=String(e),n=t.indexOf("@");if(n<1)return t;const r=t.slice(0,n),o=t.slice(n);return r.length<=2?r[0]+"*"+o:r[0]+"*".repeat(Math.min(r.length-2,3))+r.slice(-1)+o}function Ni(e){if(!e)return"";const t=String(e).replace(/\s/g,"");if(t.length<8)return t;const n=t.slice(0,4),r=t.slice(-4),o="*".repeat(t.length-8);return(n+o+r).replace(/(.{4})/g,"$1 ").trim()}function $i(e){if(!e)return"";const t=String(e);return t.length<=1?t:t.length===2?t[0]+"*":t[0]+"*".repeat(t.length-2)+t.slice(-1)}function Fi(e,t=3,n=4,r="*"){if(!e)return"";const o=String(e);if(o.length<=t+n)return o;const c=o.slice(0,t),a=o.slice(-n),s=r.repeat(o.length-t-n);return c+s+a}function Yi(e){const t=[];let n=0;if(!e)return{score:0,level:"weak",tips:["请输入密码"]};const r=e.length;return r<6?t.push("密码长度至少 6 位"):r>=8&&(n+=1,r>=12&&(n+=1)),/[a-z]/.test(e)&&(n+=.5),/[A-Z]/.test(e)&&(n+=.5),/\d/.test(e)&&(n+=1),/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(e)&&(n+=1),!/[a-z]/.test(e)&&!/[A-Z]/.test(e)&&t.push("建议包含字母"),/\d/.test(e)||t.push("建议包含数字"),/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(e)||t.push("建议包含特殊字符"),/(.)\1{2,}/.test(e)&&(n-=1,t.push("避免连续重复字符")),/^(123|abc|qwe|password|admin)/i.test(e)&&(n-=1,t.push("避免使用常见密码")),n=Math.max(0,Math.min(4,Math.floor(n))),{score:n,level:["weak","weak","fair","good","strong"][n],tips:t}}function Ri(e,t={}){const{minLength:n=8,requireLowercase:r=!0,requireUppercase:o=!0,requireNumber:c=!0,requireSpecial:a=!1}=t;return!(!e||e.length<n||r&&!/[a-z]/.test(e)||o&&!/[A-Z]/.test(e)||c&&!/\d/.test(e)||a&&!/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(e))}const Ui=Object.prototype.toString;function T(e){return Ui.call(e)}function Wi(e){return typeof e=="string"}function Bi(e){return typeof e=="number"&&!Number.isNaN(e)}function Hi(e){return typeof e=="boolean"}function ji(e){return e===null}function zi(e){return e===void 0}function qi(e){return e==null}function Xi(e){return typeof e=="symbol"}function Gi(e){return typeof e=="bigint"}function Vi(e){return e!==null&&typeof e=="object"}function ue(e){if(T(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Zi(e){return Array.isArray(e)}function Ji(e){return typeof e=="function"}function Qi(e){return T(e)==="[object Date]"}function Ki(e){return T(e)==="[object RegExp]"}function xi(e){return T(e)==="[object Error]"||e instanceof Error}function eo(e){return T(e)==="[object Map]"}function to(e){return T(e)==="[object Set]"}function no(e){return T(e)==="[object WeakMap]"}function ro(e){return T(e)==="[object WeakSet]"}function et(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"&&typeof e.catch=="function"}function io(e){return Number.isNaN(e)}function oo(e){return Number.isFinite(e)}function co(e){return Number.isInteger(e)}function so(e){return e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"}function ao(e){return e==null?!0:typeof e=="string"?e==="":Array.isArray(e)?e.length===0:e instanceof Map||e instanceof Set?e.size===0:ue(e)?Object.keys(e).length===0:!1}function uo(e){return ue(e)&&Object.keys(e).length===0}function lo(e){return Array.isArray(e)&&e.length===0}function fo(e){return!!(e&&e.nodeType===1)}function mo(e){return e!=null&&e===e.window}function go(e){return!!(e&&e.nodeType===9)}function ho(e){if(e===null)return"null";if(e===void 0)return"undefined";const n=T(e).match(/\[object (\w+)\]/);return n?n[1].toLowerCase():"unknown"}function yo(e){return e===null?"null":Array.isArray(e)?"array":e instanceof Date?"date":e instanceof RegExp?"regexp":e instanceof Map?"map":e instanceof Set?"set":e instanceof Error?"error":et(e)?"promise":typeof e}function tt(e,t){if(!y(e))return"";const n=t!==void 0?e.toFixed(t).split("."):String(e).split(".");return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),n.join(".")}function wo(e,t="¥",n=2){if(!y(e))return"";const r=tt(Math.abs(e),n);return(e<0?"-":"")+t+r}function po(e,t=2,n=!0){return y(e)?(n?e*100:e).toFixed(t)+"%":""}function _o(e,t=2){return y(e)?e.toFixed(t):""}function Eo(e){if(!le(e))return"";const t=Math.abs(e),n=t%100,r=t%10;let o="th";return(n<11||n>13)&&(r===1?o="st":r===2?o="nd":r===3&&(o="rd")),e+o}function y(e){return typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e)}function le(e){return y(e)&&Number.isInteger(e)}function So(e){return y(e)&&!Number.isInteger(e)}function bo(e){return y(e)&&e>0}function vo(e){return y(e)&&e<0}function To(e){return le(e)&&e%2===0}function Mo(e){return le(e)&&e%2!==0}function Do(e,t,n,r=!0){return!y(e)||!y(t)||!y(n)?!1:r?e>=t&&e<=n:e>t&&e<n}function D(e){const t=String(e),n=t.indexOf(".");return n===-1?0:t.length-n-1}function K(e){return Number(String(e).replace(".",""))}function Co(e,t){const n=D(e),r=D(t),o=Math.max(n,r),c=Math.pow(10,o);return(Math.round(e*c)+Math.round(t*c))/c}function Ao(e,t){const n=D(e),r=D(t),o=Math.max(n,r),c=Math.pow(10,o);return(Math.round(e*c)-Math.round(t*c))/c}function H(e,t){const n=D(e),r=D(t),o=K(e),c=K(t);return o*c/Math.pow(10,n+r)}function ko(e,t){if(t===0)return NaN;const n=D(e),r=D(t),o=K(e),c=K(t);return H(o/c,Math.pow(10,r-n))}function nt(e,t=0){if(!y(e))return NaN;const n=Math.pow(10,t);return Math.round(H(e,n))/n}function Io(e,t=0){if(!y(e))return NaN;const n=Math.pow(10,t);return Math.floor(H(e,n))/n}function Oo(e,t=0){if(!y(e))return NaN;const n=Math.pow(10,t);return Math.ceil(H(e,n))/n}function Lo(e,t=2){if(e===0)return"0 B";if(!y(e))return"";const n=1024,r=["B","KB","MB","GB","TB","PB"],o=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,o)).toFixed(t))+" "+r[o]}function Po(e,t=2){return y(e)?nt(e,t).toFixed(t):""}function No(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}function $o(e){return e?e.replace(/\b\w/g,t=>t.toUpperCase()):""}function rt(e){return e?e.replace(/[-_\s]+(.)?/g,(t,n)=>n?n.toUpperCase():"").replace(/^./,t=>t.toLowerCase()):""}function Fo(e){if(!e)return"";const t=rt(e);return t.charAt(0).toUpperCase()+t.slice(1)}function Yo(e){return e?e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase():""}function Ro(e){return e?e.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[\s-]+/g,"_").toLowerCase():""}function L(e){return e==null||e===""}function it(e){return e==null||e.trim()===""}function Uo(e){return L(e)?!1:/^\d+$/.test(e)}function Wo(e){return L(e)?!1:/^[a-zA-Z]+$/.test(e)}function Bo(e){return L(e)?!1:/^[a-zA-Z0-9]+$/.test(e)}function Ho(e){return L(e)?0:e.length}function jo(e){return it(e)?0:e.trim().split(/\s+/).length}function zo(e){return L(e)?0:e.split(/\r\n|\r|\n/).length}function qo(e,t){if(L(e)||L(t))return 0;let n=0,r=0;for(;(r=e.indexOf(t,r))!==-1;)n++,r+=t.length;return n}console.log("%c🚀 yq-tools v1.0.0","font-size: 14px; font-weight: bold; background: linear-gradient(90deg, #0555CE 0%, #339AF0 100%); color: white; padding: 8px 16px; border-radius: 4px;");const Xo=w.get.bind(w),Go=w.post.bind(w),Vo=w.remoteCall.bind(w),Zo=w.daoCall.bind(w),Jo=w.tableCall.bind(w),Qo=w.exportCall.bind(w);i.ENV_TYPE=p,i.Http=fe,i.REGEX_CHINESE=Ne,i.REGEX_EMAIL=ke,i.REGEX_ID_CARD=Oe,i.REGEX_IP=Pe,i.REGEX_PHONE=Ie,i.REGEX_URL=Le,i.add=Co,i.addDays=I,i.addHours=Rt,i.addMinutes=Ut,i.addMonths=ie,i.addYears=we,i.auth=vt,i.base64ToBlob=Vr,i.blobToBase64=Zr,i.bytesToSize=Lo,i.capitalize=No,i.capitalizeWords=$o,i.ceil=Oo,i.checkPasswordStrength=Yi,i.chunk=pt,i.clearLocal=si,i.clearSession=mi,i.closeTab=Lt,i.compressImage=xr,i.convertTimezone=pe,i.copy=Dt,i.countChars=Ho,i.countLines=zo,i.countOccurrences=qo,i.countWords=jo,i.createStorage=_i,i.daoCall=Zo,i.dataURLToFile=Kr,i.debounce=de,i.decodeUrl=Ai,i.deepClone=ge,i.detectEnv=W,i.dialogDrag=At,i.diffDays=Wt,i.diffMonths=Bt,i.divide=ko,i.downloadBlob=Xe,i.downloadFile=qe,i.downloadJSON=Gr,i.downloadText=Ge,i.draggable=re,i.encodeUrl=Ci,i.escapeHtml=Ke,i.escapeSql=Di,i.exitFullscreen=Te,i.exportCall=Qo,i.fileToBase64=Jr,i.flatten=he,i.floor=Io,i.formatCurrency=wo,i.formatDate=k,i.formatDecimal=_o,i.formatFileSize=$r,i.formatInTimezone=mn,i.formatNumber=tt,i.formatOrdinal=Eo,i.formatPercent=po,i.formatRelative=Ft,i.formatTime=$t,i.fromUTC=hn,i.get=Xo,i.getAllCookies=pi,i.getBrowser=R,i.getCookie=Je,i.getCtxPath=x,i.getDayOfYear=tn,i.getDaysInMonth=xt,i.getDevice=Z,i.getEndOfDay=O,i.getEndOfMonth=Kt,i.getEndOfWeek=Jt,i.getEnv=Nt,i.getFileExt=v,i.getFileName=ae,i.getFileNameWithoutExt=Pr,i.getFileSize=Nr,i.getFileType=zr,i.getImageSize=Ve,i.getLast30Days=rn,i.getLast7Days=nn,i.getLastHalfYear=on,i.getLastYear=cn,i.getLocal=oi,i.getLocalKeys=ui,i.getMimeType=jr,i.getNetworkType=se,i.getOS=U,i.getQueryParam=yn,i.getQueryParams=B,i.getQueryString=_e,i.getScrollPercent=kn,i.getScrollbarWidth=Ln,i.getSession=li,i.getSessionKeys=hi,i.getStartOfDay=b,i.getStartOfMonth=Qt,i.getStartOfWeek=Zt,i.getStorageSize=Ei,i.getTimezoneName=dn,i.getTimezoneOffset=fn,i.getType=ho,i.getVisibleRatio=Mn,i.getWeekOfYear=en,i.groupBy=wt,i.hasCookie=wi,i.hasLocal=ai,i.hasQueryParam=_n,i.hasSession=gi,i.http=w,i.inRange=Do,i.isAbsoluteUrl=ce,i.isAfter=Vt,i.isAlipay=Bn,i.isAlpha=Wo,i.isAlphaNumeric=Bo,i.isAndroid=Xn,i.isArray=Zi,i.isAudio=Ue,i.isBankCard=Dr,i.isBefore=Gt,i.isBigInt=Gi,i.isBlank=it,i.isBoolean=Hi,i.isCarNumber=Ar,i.isChinese=br,i.isChrome=Nn,i.isClient=fr,i.isDate=Qi,i.isDateFormat=kr,i.isDecimal=Er,i.isDesktop=Jn,i.isDev=Ae,i.isDingTalk=Hn,i.isDocument=go,i.isEdge=Yn,i.isElement=fo,i.isEmail=dr,i.isEmpty=ao,i.isEmptyArray=lo,i.isEmptyObject=uo,i.isEnglish=vr,i.isError=xi,i.isEven=To,i.isExcel=He,i.isFinite=oo,i.isFirefox=$n,i.isFloat=So,i.isFullscreen=Me,i.isFullyInViewport=Tn,i.isFunction=Ji,i.isIE=Rn,i.isIOS=Gn,i.isIdCard=hr,i.isImage=Ye,i.isInIframe=Pt,i.isInViewport=vn,i.isInteger=co,i.isIp=wr,i.isIpv4=$e,i.isIpv6=Fe,i.isLeapYear=Xt,i.isLinux=qn,i.isLowerCase=Tr,i.isMac=De,i.isMap=eo,i.isMobile=Vn,i.isMoney=Sr,i.isNaN=io,i.isNegative=vo,i.isNegativeInteger=_r,i.isNull=ji,i.isNullOrUndefined=qi,i.isNumber=Bi,i.isNumeric=Uo,i.isObject=Vi,i.isOdd=Mo,i.isOnline=Ce,i.isPDF=We,i.isPhone=mr,i.isPlainObject=ue,i.isPositive=bo,i.isPositiveInteger=pr,i.isPostalCode=Cr,i.isPrimitive=so,i.isProd=ur,i.isPromise=et,i.isRegExp=Ki,i.isRelativeUrl=En,i.isSafari=Fn,i.isSafeUrl=xe,i.isSameDay=V,i.isServer=lr,i.isSet=to,i.isStorageAvailable=Si,i.isString=Wi,i.isStrongPassword=Ri,i.isSymbol=Xi,i.isTablet=Zn,i.isTel=gr,i.isTime=Ir,i.isToday=Ht,i.isTomorrow=zt,i.isTouchDevice=Qn,i.isUndefined=zi,i.isUpperCase=Mr,i.isUrl=yr,i.isValidUrl=ki,i.isVideo=Re,i.isWeakMap=no,i.isWeakSet=ro,i.isWechat=Un,i.isWechatMiniProgram=Wn,i.isWeekend=qt,i.isWindow=mo,i.isWindows=zn,i.isWord=Be,i.isWxWork=jn,i.isYesterday=jt,i.isZip=je,i.joinUrl=be,i.jumpTab=Ot,i.lockScroll=In,i.longpress=Ct,i.mask=Fi,i.maskBankCard=Ni,i.maskEmail=Pi,i.maskIdCard=Li,i.maskName=$i,i.maskPhone=Oi,i.merge=te,i.multiply=H,i.nanoid=dt,i.normalizeUrl=Sn,i.now=sn,i.omit=gt,i.onEnterViewport=Dn,i.onNetworkChange=ar,i.openTab=It,i.parseDate=Yt,i.parseQuery=Se,i.pick=ht,i.post=Go,i.random=Et,i.randomString=St,i.readAsArrayBuffer=qr,i.readAsDataURL=J,i.readAsJSON=Xr,i.readAsText=ze,i.remoteCall=Vo,i.removeCookie=yi,i.removeLocal=Ze,i.removeQueryParam=pn,i.removeSession=di,i.requestFullscreen=ve,i.resetEnvCache=kt,i.resizeImage=ei,i.resolveUrl=bn,i.retry=_t,i.rotateImage=ti,i.round=nt,i.sanitizeHtml=Ti,i.sanitizeUrl=Ii,i.scrollToElement=An,i.scrollToTop=Cn,i.set=mt,i.setCookie=Qe,i.setLocal=ci,i.setQueryParam=wn,i.setQueryParams=Ee,i.setSession=fi,i.shuffle=bt,i.sleep=ye,i.stringifyQuery=oe,i.stripTags=Mi,i.subtract=Ao,i.supportClipboard=sr,i.supportGeolocation=cr,i.supportIndexedDB=nr,i.supportLocalStorage=er,i.supportNotification=or,i.supportServiceWorker=ir,i.supportSessionStorage=tr,i.supportWebGL=Kn,i.supportWebSocket=xn,i.supportWorker=rr,i.tableCall=Jo,i.throttle=me,i.toCamelCase=rt,i.toDate=h,i.toFixed=Po,i.toKebabCase=Yo,i.toPascalCase=Fo,i.toSnakeCase=Ro,i.toUTC=gn,i.today=an,i.toggleFullscreen=Pn,i.tomorrow=ln,i.typeOf=yo,i.unescapeHtml=vi,i.unique=yt,i.unlockScroll=On,i.urlToBlob=Qr,i.uuid=ft,i.vDebounce=Tt,i.vThrottle=Mt,i.validate=Or,i.validateAll=Lr,i.validateFileSize=ni,i.validateFileType=ri,i.validateImageDimensions=ii,i.watchStorage=bi,i.yesterday=un,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "yq-tools",
3
+ "version": "1.0.0",
4
+ "description": "YQ Design 工具库",
5
+ "main": "./dist/yq-tools.umd.js",
6
+ "module": "./dist/yq-tools.es.js",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/yq-tools.es.js",
10
+ "require": "./dist/yq-tools.umd.js"
11
+ }
12
+ },
13
+ "files": [
14
+ "dist"
15
+ ],
16
+ "scripts": {
17
+ "dev": "vite build --watch",
18
+ "build": "vite build"
19
+ },
20
+ "keywords": [
21
+ "utils",
22
+ "tools",
23
+ "javascript"
24
+ ],
25
+ "license": "MIT",
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "dependencies": {
30
+ "axios": "^1.13.2"
31
+ },
32
+ "devDependencies": {
33
+ "element-ui": "^2.15.14",
34
+ "vue": "^2.7.16"
35
+ }
36
+ }