minutool 1.0.13 → 1.0.14
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.
- package/dist/index.d.ts +4 -4
- package/dist/minutool.js +490 -485
- package/dist/minutool.js.map +1 -1
- package/dist/minutool.umd.cjs +5 -5
- package/dist/minutool.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/minutool.umd.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(function(o,v){typeof exports=="object"&&typeof module<"u"?v(exports):typeof define=="function"&&define.amd?define(["exports"],v):(o=typeof globalThis<"u"?globalThis:o||self,v(o.Minutool={}))})(this,function(o){"use strict";const v=(e,t)=>{let n=[];for(let i in e)n.push(e[i][t]);return n},xe=(e,t)=>{for(let n in e)if(e[n]===t)return n;return null},Re=(e,t)=>{let n=new Map;return e.filter((i,a)=>{let r=t?t(i,a):i;if(!n.has(r))return n.set(r,!0),!0})},Ie=(e,t,n)=>{if(!e||!e.length)return e;let i={};if(e.forEach(r=>{let u=r[t];i[u]||(i[u]=[]),i[u].push(r)}),!n)return i;let a={};for(let r in i)a[r]=i[r][0];return a},He=e=>Object.keys(e).sort().reduce(function(t,n){return t[n]=e[n],t},{}),ke=(e,t)=>{let n=e.length;if(t<1||!n)return[];if(t>n)return[e];let i=[],a=Math.floor(n/t),r=n%t;for(let u=1;u<=a;u++)i.push(e.splice(0,t));return r&&i.push(e.splice(0,r)),i},Le=e=>{let t=-1;for(let n=e.length-1;n>=0;n--)if(e[n]){t=n;break}return e.slice(0,t+1)};function Q(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}const Fe=(e,t=0)=>{if(!e||typeof e!="string")return t;const n=parseFloat(e);return isNaN(n)?t:n},Pe=e=>(e+"").replace(/\\(.?)/g,function(t,n){switch(n){case"\\":return"\\";case"0":return"\0";case"":return"";default:return n}}),Ue=(e,t,n="...")=>{let i=/[^\x00-\xff]/g;if(e.replace(i,"mm").length<=t)return e;let a=Math.floor(t/2);for(let r=a;r<e.length;r++)if(e.substr(0,r).replace(i,"mm").length>=t)return e.substr(0,r)+n;return e},Ye=(e,t)=>{const n=Object.keys(t),i=Object.values(t);return new Function(...n,`return \`${e}\`;`)(...i)};function Be(e){return e.replace(/[-_](.)/g,(t,n)=>n.toUpperCase())}function $e(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function qe(e,t,n="..."){return e.length<=t?e:e.slice(0,t)+n}const S=e=>(e+"").replace(/([\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g,"\\$1"),X=e=>{let t="",n=0,i=0,a=0,r=0;for(;n<e.length;)i=e.charCodeAt(n),i<128?(t+=String.fromCharCode(i),n++):i>191&&i<224?(a=e.charCodeAt(n+1),t+=String.fromCharCode((i&31)<<6|a&63),n+=2):(a=e.charCodeAt(n+1),r=e.charCodeAt(n+2),t+=String.fromCharCode((i&15)<<12|(a&63)<<6|r&63),n+=3);return t},x=e=>{e=e.replace(/\r\n/g,"n");let t="";for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);i<128?t+=String.fromCharCode(i):i>127&&i<2048?(t+=String.fromCharCode(i>>6|192),t+=String.fromCharCode(i&63|128)):(t+=String.fromCharCode(i>>12|224),t+=String.fromCharCode(i>>6&63|128),t+=String.fromCharCode(i&63|128))}return t},je=e=>{let t=0,n=e.length,i=-1;for(let a=0;a<n;a++)i=e.charCodeAt(a),i>=0&&i<=128?t+=1:t+=3;return t},Ge="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890",Z=(e=6,t=Ge)=>{let n="";for(let i=0;i<e;i++){let a=Math.round(Math.random()*(t.length-1));n+=t.substring(a,a+1)}return n},We=(e=1,t=8)=>{let n=[];const i="bcdfghjklmnpqrstvwxyz",a="aeiou";for(;e-- >0;){let r="";for(let u=0;u<t;u=u+3)r+=i[Math.floor(Math.random()*i.length)],r+=a[Math.floor(Math.random()*a.length)],r+=i[Math.floor(Math.random()*i.length)];n.push(r)}return n},Ke=(e,t=!1)=>{let n=[];return e.replace(/[-_\s+]/g," ").split(" ").forEach((i,a)=>{n.push(a===0&&!t?i:Q(i))}),n.join("")},R=0,I=1,ee=2,ze=(e,t="",n=R)=>{if(t.length){let i=new RegExp("^["+S(t)+"]+"),a=new RegExp("["+S(t)+"]+$");return n===I?e.replace(i,""):n===ee?e.replace(a,""):e.replace(i,"").replace(a,"")}else return n===R?e.trim():n===I?e.trimStart():e.trimEnd()},Je=(e,t)=>{let n=[];for(let i=0;i<e.length;i+=t)n.push(e.slice(i,i+t));return n},Ve=e=>/[\u4e00-\u9fa5]/.test(e),E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Qe=e=>{let t="",n,i,a,r,u,l,c,s=0;for(e=e.replace(/\+\+[++^A-Za-z0-9+/=]/g,"");s<e.length;)r=E.indexOf(e.charAt(s++)),u=E.indexOf(e.charAt(s++)),l=E.indexOf(e.charAt(s++)),c=E.indexOf(e.charAt(s++)),n=r<<2|u>>4,i=(u&15)<<4|l>>2,a=(l&3)<<6|c,t=t+String.fromCharCode(n),l!==64&&(t=t+String.fromCharCode(i)),c!==64&&(t=t+String.fromCharCode(a));return t=X(t),t},Xe=e=>x(e).replace("+","-").replace("/","_"),Ze=e=>{let t="",n,i,a,r,u,l,c,s=0;for(e=x(e);s<e.length;)n=e.charCodeAt(s++),i=e.charCodeAt(s++),a=e.charCodeAt(s++),r=n>>2,u=(n&3)<<4|i>>4,l=(i&15)<<2|a>>6,c=a&63,isNaN(i)?l=c=64:isNaN(a)&&(c=64),t=t+E.charAt(r)+E.charAt(u)+E.charAt(l)+E.charAt(c);return t},te=async e=>await et(e),et=e=>new Promise((t,n)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(i.result),i.onerror=a=>n(a)}),ne=e=>{if(e.requestFullscreen)return e.requestFullscreen();if(e.webkitRequestFullScreen)return e.webkitRequestFullScreen();throw e.mozRequestFullScreen&&e.mozRequestFullScreen(),e.msRequestFullScreen&&e.msRequestFullScreen(),"Browser no allow full screen"},ie=()=>document.exitFullscreen(),tt=e=>new Promise((t,n)=>{ae()?ie().then(t).catch(n):ne(e).then(t).catch(n)}),ae=()=>!!document.fullscreenElement,nt=e=>{const t=navigator.language||navigator.userLanguage;if(e.includes(t))return t;const n=t.split("-")[0],i=e.find(a=>a.startsWith(n));return i||e[0]},it=()=>navigator.userAgent.toLowerCase().indexOf("firefox")>-1,at=(e,t,n,i="/",a)=>{let r="";if(n){let l=new Date;l.setTime(Date.now()+n*24*60*60*1e3),r="; expires="+l.toUTCString()}let u=e+"="+(t||"")+r+"; path="+i;a&&(u+="; domain="+a),document.cookie=u},ot=e=>{let t=e+"=",n=document.cookie.split(";");for(let i=0;i<n.length;i++){let a=n[i];for(;a.charAt(0)===" ";)a=a.substring(1,a.length);if(a.indexOf(t)===0)return a.substring(t.length,a.length)}return null},N=(e,t="/",n)=>{let i=e+"=; Path="+t+"; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";n&&(i+=" Domain="+n+";"),document.cookie=i},rt=(e,t)=>{const n=(t||(location==null?void 0:location.hostname)).split(".");for(;n.length>1;)N(e,"/",n.join(".")),N(e,"/","."+n.join(".")),n.shift();N(e)};let lt=0;const oe=(e="")=>"guid_"+(e||Z(6))+ ++lt,ct=(e,t)=>{let n,i,a=0;return function(){let r=+new Date;n=this,i=arguments,r-a>t&&(e.apply(n,i),a=r)}},st=(e,t)=>{let n,i,a=0,r=!1;return function(){if(r)return;let u=+new Date;n=this,i=arguments;let l=t-(u-a);l<=0?(e.apply(n,i),a=u):(r=!0,setTimeout(()=>{e.apply(n,i),r=!1,a=u},l))}},pt=(e,t)=>{let n;return function(){let i=this,a=arguments;clearTimeout(n),n=setTimeout(function(){e.apply(i,a)},t)}},ut=e=>e&&typeof e=="object"&&e.then&&typeof e.then=="function",dt=e=>{let t=!1;try{JSON.parse(e),t=!0}catch{}return t},ft=e=>e&&typeof e=="object"&&!Array.isArray(e),mt=e=>e?Object.prototype.toString.call(e)==="[object Function]"||typeof e=="function"||e instanceof Function:!1,re=e=>typeof e!="string"||e.trim()===""?!1:/^(https?:\/\/|\/\/|\/|\.\.?\/*)/i.test(e),ht=e=>{let t=!1;try{JSON.parse(e),t=!0}catch{}return t},gt=()=>{let e=new Error().stack;console.log(e)},Et=(1+Math.sqrt(5))/2-1,H=96,wt=(e,t=H)=>e/25.4*t,Tt=e=>Math.round(e*56.6929),At=e=>e*2.83464566929,bt=e=>e/2.83464566929,yt=(e,t=H)=>25.4*e/t,Mt=(e,t,n)=>Math.min(Math.max(e,t),n),g=(e,t,n,i=!0)=>i?e>=t&&e<=n:e>t&&e<n,vt=(e,t)=>Math.floor(Math.random()*(t+1-e))+e,_t=(e,t=2)=>{let n=Math.pow(10,t);return Math.round(e*n)/n},St=(...e)=>{let t=0;return e.forEach(n=>{if(typeof n=="number"&&!isNaN(n)){const i=n.toString().split(".")[1];i&&(t=Math.max(t,i.length))}}),t},Nt=e=>(e=Math.abs(Number(e)),e===0?1:Math.floor(Math.log10(e))+1),Ct=e=>{b(e).style.display="none"},Ot=e=>{b(e).style.display=""},Dt=e=>{let t=b(e);return t&&t.parentNode&&t.parentNode.removeChild(t)},k="disabled",le=(e,t="")=>L(e,t,!1),ce=(e,t="")=>L(e,t,!0),L=(e,t="",n=null)=>{let i=b(e),a=n===null?!i.classList.contains(k):!n;a&&pe(`.${k} {pointer-event:none !important;}`,"__element_lock_style__"),i.classList.toggle(k,a),i[a?"setAttribute":"removeAttribute"]("disabled","disabled"),i[a?"setAttribute":"removeAttribute"]("data-disabled","disabled"),t&&i.classList.toggle(t,a)},xt=(e,t,n)=>{e=b(e);let i=!1;e.addEventListener("mouseenter",()=>{i||(i=!0,t&&t())}),e.addEventListener("mouseleave",()=>{i&&(i=!1,n&&n())})},Rt=(e,t)=>{le(e),t(()=>{ce(e)})},It=e=>e.parentNode?Array.prototype.indexOf.call(e.parentNode.children,e):-1,F=(e,t=document)=>{if(typeof e=="string")return e=e.trim(),e.indexOf(":scope")!==0&&(e=":scope "+e),Array.from(t.querySelectorAll(e));if(Array.isArray(e)){let n=[];return e.forEach(i=>{n.push(...F(i))}),n}else return NodeList.prototype.isPrototypeOf(e)||HTMLCollection.prototype.isPrototypeOf(e)?Array.from(e):e instanceof HTMLElement?[e]:e},b=(e,t=document)=>typeof e=="string"?t.querySelector(e):e,Ht=e=>{let t=document.getElementsByTagName("*"),n=[];for(n=[];e&&e.nodeType===1;e=e.parentNode)if(e.hasAttribute("id")){let i=0;for(let a=0;a<t.length&&(t[a].hasAttribute("id")&&t[a].id===e.id&&i++,!(i>1));a++);if(i===1)return n.unshift('id("'+e.getAttribute("id")+'")'),n.join("/");n.unshift(e.localName.toLowerCase()+'[@id="'+e.getAttribute("id")+'"]')}else if(e.hasAttribute("class"))n.unshift(e.localName.toLowerCase()+'[@class="'+e.getAttribute("class")+'"]');else{let i,a;for(i=1,a=e.previousSibling;a;a=a.previousSibling)a.localName===e.localName&&i++;n.unshift(e.localName.toLowerCase()+"["+i+"]")}return n.length?"/"+n.join("/"):null},kt=(e,t,n=!0)=>{const i="ON_DOM_TREE_CHANGE_BIND_"+oe();let a=()=>{F(`input:not([${i}]), textarea:not([${i}]), select:not([${i}])`,e).forEach(r=>{r.setAttribute(i,"1"),r.addEventListener("change",t)})};se(e,{attributes:!0,subtree:!0,childList:!0},()=>{n&&a(),t()},10),n&&a()},se=(e,t,n,i=10)=>{let a=0,r=!1,u=new MutationObserver(()=>{if(r)return;let l=i-(Date.now()-a);l>0?(r=!0,setTimeout(()=>{r=!1,a=Date.now(),n(u)},l)):(a=Date.now(),n(u))});u.observe(e,t)},Lt=(e,t={left:0,top:0,width:window.innerWidth,height:window.innerHeight})=>{let n={left:e.left,top:e.top};return e.width>t.width||e.height>t.height||(e.width+e.left>t.width+t.left&&(n.left=e.left-(e.width+e.left-(t.width+t.left))),e.height+e.top>t.height+t.top&&(n.top=e.top-(e.height+e.top-(t.height+t.top))),e.left<t.left&&(n.left=t.left),e.top<t.top&&(n.top=t.top)),n},Ft=(e,t)=>e.left<=t.left?e.left+e.width>=t.left&&(g(t.top,e.top,e.top+e.height)||g(t.top+t.height,e.top,e.top+e.height)||t.top>=e.top&&t.height>=e.height):t.left+t.width>=e.left&&(g(e.top,t.top,t.top+t.height)||g(e.top+e.height,t.top,t.top+t.height)||e.top>=t.top&&e.height>=t.height),Pt=e=>e?!!(e.tabIndex>=0||e instanceof HTMLAnchorElement&&e.href||e instanceof HTMLButtonElement&&!e.disabled||e instanceof HTMLInputElement&&!e.disabled||e instanceof HTMLTextAreaElement&&!e.disabled):!1;let w={};const Ut=(e,t=!1)=>(!t&&e in w||(w[e]=new Promise((n,i)=>{let a=document.createElement("link");a.rel="stylesheet",a.href=e,a.onload=()=>{n()},a.onerror=()=>{i()},document.head.append(a)})),w[e]),Yt=(e,t=!1)=>(!t&&e in w||(w[e]=new Promise((n,i)=>{let a=document.createElement("script");a.src=e,a.onload=()=>{n()},a.onerror=()=>{i()},document.head.append(a)})),w[e]),Bt=e=>{let t=e.style.visibility,n=e.style.display,i,a;return e.style.visibility="hidden",e.style.display="block",i=e.clientWidth,a=e.clientHeight,e.style.visibility=t,e.style.display=n,{width:i,height:a}},pe=(e,t="",n=document)=>{if(t&&n.querySelector(`#${t}`))return n.querySelector(`#${t}`);let i=n.createElement("style");return n.head.appendChild(i),i.innerHTML=e,t&&(i.id=t),i},$t=(e,t)=>g(e.top,t.top,t.top+t.height)&&g(e.left,t.left,t.left+t.width)&&g(e.top+e.height,t.top,t.top+t.height)&&g(e.left+e.width,t.left,t.left+t.width),qt=e=>Math.pow(10,-e),jt=(e,t)=>{try{return new URL(e,t).href}catch{return e}},Gt=(e,t=null)=>{let n=document.createElement("template");e=e.trim(),n.innerHTML=e;let i=[];return t?n.content.childNodes.forEach(a=>{i.push(t.appendChild(a))}):i=Array.from(n.content.childNodes),i.length===1?i[0]:i},ue=(e,t=!1)=>{if(!e)throw new Error("el is null");const n=e.getBoundingClientRect();if(t&&!n.height){const i=e.style.visibility,a=e.style.display;e.style.visibility="hidden",e.style.display="block";const r=ue(e);return e.style.visibility=i,e.style.display=a,r}return{top:n.top,left:n.left,right:n.right,bottom:n.bottom,width:n.width,height:n.height}},Wt=e=>{let t={};for(let n in e){const i=e[n];i!=null&&(t[`--${n}`]=`${i}`)}return t},P=new EventTarget,Kt=new Map,U=new Map;let zt=0;const Jt="__MINUTOOL_SYM_EVENT__";function Y(e){if(!U.has(e)){const t=`${Jt}${++zt}`;U.set(e,t),Kt.set(t,e)}return U.get(e)}const Vt=(e,t)=>{P.addEventListener(typeof e=="symbol"?Y(e):e,t)},Qt=(e,t)=>{P.removeEventListener(typeof e=="symbol"?Y(e):e,t)},Xt=(e,t=null)=>{P.dispatchEvent(new CustomEvent(typeof e=="symbol"?Y(e):e,{detail:t}))},Zt=e=>e.replace(/[\\/:*?"<>|]/g,"_").replace(/[\0-\x1F]/g,"_").replace(/\s+/g," ").replace(/^\.+/,"").replace(/\.+$/,"").trim(),B=e=>new Promise((t,n)=>{const i=new FileReader;i.onload=()=>t(i.result),i.onerror=a=>n(a),i.readAsDataURL(e)}),de={},$=(e,t=null)=>t!==null?(de[e]=t,null):de[e]||null,en=async e=>{if(!e)return null;if(typeof e=="string"&&e.startsWith("data:"))return e;try{if(typeof e=="string"&&re(e)){const t=await fetch(e);if(!t.ok)throw new Error(`Fetch failed: ${t.status}`);const n=await t.blob();return await B(n)}return e instanceof Blob?await B(e):null}catch(t){return console.warn("file2Base64DataURL failed:",t),null}},tn=(e,t)=>{const n=document.createElement("a");n.rel="noopener noreferrer",n.href=e,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)},q=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","CANVAS","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","NOSCRIPT","OL","P","PRE","SECTION","TABLE","TFOOT","UL","VIDEO"],nn=["A","ABBR","ACRONYM","B","BDO","BIG","BUTTON","CITE","CODE","DFN","EM","I","KBD","LABEL","MAP","OBJECT","OUTPUT","Q","S","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","TT","U","VAR"].concat(...q),an=["AREA","BASE","BR","COL","EMBED","HR","IMG","INPUT","LINK","META","PARAM","SOURCE","TRACK","WBR"],fe=["STYLE","COMMENT","SELECT","OPTION","SCRIPT","TITLE","HEAD","BUTTON","META","LINK","PARAM","SOURCE"],on=e=>(fe.forEach(n=>{e=e.replace(new RegExp(n,"ig"),"")}),e=e.replace(/[\r|\n]/g,""),e=e.replace(/<(\w+)([^>]*)>/g,function(n,i,a){return q.includes(i.toUpperCase())?`
|
|
2
|
-
`:""}),e=e.replace(/<\/(\w+)([^>]*)>/g,function(n,i,a){return""}),e=e.replace(/<[^>]+>/g,""),[[/ /gi," "],[/</gi,"<"],[/>/gi,">"],[/"/gi,'"'],[/'/gi,"'"]].forEach(([n,i])=>{e=e.replace(n,i)}),e=e.replace(/&#(\d+);/,function(n,i){return String.fromCharCode(parseInt(i))}),e=e.replace(/&/gi,"&"),e=e.trim(),e),
|
|
3
|
-
`),
|
|
4
|
-
`);if(i.length<2)return n;let a="<table>";return i.forEach((
|
|
5
|
-
`,(""+e).replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">").replace(/\r\n/g,t).replace(/[\r\n]/g,t)),fn=(e,t)=>{let n=e.split("");return t=t||0,n.map(i=>`&#${t?"x"+i.charCodeAt(0).toString(16):i.charCodeAt(0)};`).join("")},mn=(e,t,n='<span class="matched">%s</span>')=>t?e.replace(new RegExp(S(t),"ig"),i=>n.replace("%s",i)):e,hn=e=>{if(!e.src)return null;if(e.src.indexOf("data:")===0)return e.src;let t=document.createElement("canvas");t.width=e.width,t.height=e.height;let n=t.getContext("2d");return n?(n.drawImage(e,0,0,e.width,e.height),t.toDataURL("image/png")):null},gn=(e,t=!1)=>new Promise((n,i)=>{if(t){const r=$(e);if(r)return n(r)}let a=new XMLHttpRequest;a.open("GET",e,!0),a.responseType="blob",a.onload=function(){if(this.status===200){let r=this.response;te(r).then(u=>{t&&$(e,u),n(u)}).catch(u=>{i(u)})}},a.onerror=function(){i("Error:"+this.statusText)},a.onabort=function(){i("Request abort")},a.send()}),T=(e,t)=>{let n=(e&65535)+(t&65535);return(e>>16)+(t>>16)+(n>>16)<<16|n&65535},En=(e,t)=>e<<t|e>>>32-t,C=(e,t,n,i,a,r)=>T(En(T(T(t,e),T(i,r)),a),n),d=(e,t,n,i,a,r,u)=>C(t&n|~t&i,e,t,a,r,u),f=(e,t,n,i,a,r,u)=>C(t&i|n&~i,e,t,a,r,u),m=(e,t,n,i,a,r,u)=>C(t^n^i,e,t,a,r,u),h=(e,t,n,i,a,r,u)=>C(n^(t|~i),e,t,a,r,u),O=(e,t)=>{e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;let n,i,a,r,u,l=1732584193,c=-271733879,s=-1732584194,p=271733878;for(n=0;n<e.length;n+=16)i=l,a=c,r=s,u=p,l=d(l,c,s,p,e[n],7,-680876936),p=d(p,l,c,s,e[n+1],12,-389564586),s=d(s,p,l,c,e[n+2],17,606105819),c=d(c,s,p,l,e[n+3],22,-1044525330),l=d(l,c,s,p,e[n+4],7,-176418897),p=d(p,l,c,s,e[n+5],12,1200080426),s=d(s,p,l,c,e[n+6],17,-1473231341),c=d(c,s,p,l,e[n+7],22,-45705983),l=d(l,c,s,p,e[n+8],7,1770035416),p=d(p,l,c,s,e[n+9],12,-1958414417),s=d(s,p,l,c,e[n+10],17,-42063),c=d(c,s,p,l,e[n+11],22,-1990404162),l=d(l,c,s,p,e[n+12],7,1804603682),p=d(p,l,c,s,e[n+13],12,-40341101),s=d(s,p,l,c,e[n+14],17,-1502002290),c=d(c,s,p,l,e[n+15],22,1236535329),l=f(l,c,s,p,e[n+1],5,-165796510),p=f(p,l,c,s,e[n+6],9,-1069501632),s=f(s,p,l,c,e[n+11],14,643717713),c=f(c,s,p,l,e[n],20,-373897302),l=f(l,c,s,p,e[n+5],5,-701558691),p=f(p,l,c,s,e[n+10],9,38016083),s=f(s,p,l,c,e[n+15],14,-660478335),c=f(c,s,p,l,e[n+4],20,-405537848),l=f(l,c,s,p,e[n+9],5,568446438),p=f(p,l,c,s,e[n+14],9,-1019803690),s=f(s,p,l,c,e[n+3],14,-187363961),c=f(c,s,p,l,e[n+8],20,1163531501),l=f(l,c,s,p,e[n+13],5,-1444681467),p=f(p,l,c,s,e[n+2],9,-51403784),s=f(s,p,l,c,e[n+7],14,1735328473),c=f(c,s,p,l,e[n+12],20,-1926607734),l=m(l,c,s,p,e[n+5],4,-378558),p=m(p,l,c,s,e[n+8],11,-2022574463),s=m(s,p,l,c,e[n+11],16,1839030562),c=m(c,s,p,l,e[n+14],23,-35309556),l=m(l,c,s,p,e[n+1],4,-1530992060),p=m(p,l,c,s,e[n+4],11,1272893353),s=m(s,p,l,c,e[n+7],16,-155497632),c=m(c,s,p,l,e[n+10],23,-1094730640),l=m(l,c,s,p,e[n+13],4,681279174),p=m(p,l,c,s,e[n],11,-358537222),s=m(s,p,l,c,e[n+3],16,-722521979),c=m(c,s,p,l,e[n+6],23,76029189),l=m(l,c,s,p,e[n+9],4,-640364487),p=m(p,l,c,s,e[n+12],11,-421815835),s=m(s,p,l,c,e[n+15],16,530742520),c=m(c,s,p,l,e[n+2],23,-995338651),l=h(l,c,s,p,e[n],6,-198630844),p=h(p,l,c,s,e[n+7],10,1126891415),s=h(s,p,l,c,e[n+14],15,-1416354905),c=h(c,s,p,l,e[n+5],21,-57434055),l=h(l,c,s,p,e[n+12],6,1700485571),p=h(p,l,c,s,e[n+3],10,-1894986606),s=h(s,p,l,c,e[n+10],15,-1051523),c=h(c,s,p,l,e[n+1],21,-2054922799),l=h(l,c,s,p,e[n+8],6,1873313359),p=h(p,l,c,s,e[n+15],10,-30611744),s=h(s,p,l,c,e[n+6],15,-1560198380),c=h(c,s,p,l,e[n+13],21,1309151649),l=h(l,c,s,p,e[n+4],6,-145523070),p=h(p,l,c,s,e[n+11],10,-1120210379),s=h(s,p,l,c,e[n+2],15,718787259),c=h(c,s,p,l,e[n+9],21,-343485551),l=T(l,i),c=T(c,a),s=T(s,r),p=T(p,u);return[l,c,s,p]},he=e=>{let t,n="",i=e.length*32;for(t=0;t<i;t+=8)n+=String.fromCharCode(e[t>>5]>>>t%32&255);return n},G=e=>{let t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;let i=e.length*8;for(t=0;t<i;t+=8)n[t>>5]|=(e.charCodeAt(t/8)&255)<<t%32;return n},wn=e=>he(O(G(e),e.length*8)),Tn=(e,t)=>{let n,i=G(e),a=[],r=[],u;for(a[15]=r[15]=void 0,i.length>16&&(i=O(i,e.length*8)),n=0;n<16;n+=1)a[n]=i[n]^909522486,r[n]=i[n]^1549556828;return u=O(a.concat(G(t)),512+t.length*8),he(O(r.concat(u),640))},ge=e=>{let t="0123456789abcdef",n="",i,a;for(a=0;a<e.length;a+=1)i=e.charCodeAt(a),n+=t.charAt(i>>>4&15)+t.charAt(i&15);return n},W=e=>unescape(encodeURIComponent(e)),Ee=e=>wn(W(e)),An=e=>ge(Ee(e)),we=(e,t)=>Tn(W(e),W(t)),bn=(e,t)=>ge(we(e,t)),yn=(e,t,n)=>t?n?we(t,e):bn(t,e):n?Ee(e):An(e),Mn="application/octet-stream",y="application/json",Te="application/x-www-form-urlencoded",Ae="multipart/form-data",vn="text/plain",_n="text/html",Sn={323:"text/h323",accdb:"application/msaccess",accde:"application/msaccess",accdt:"application/msaccess",acx:"application/internet-property-stream",ai:"application/postscript",aif:"audio/x-aiff",aifc:"audio/aiff",aiff:"audio/aiff",application:"application/x-ms-application",art:"image/x-jg",asf:"video/x-ms-asf",asm:"text/plain",asr:"video/x-ms-asf",asx:"video/x-ms-asf",atom:"application/atom+xml",au:"audio/basic",avi:"video/x-msvideo",axs:"application/olescript",bas:"text/plain",bcpio:"application/x-bcpio",bmp:"image/bmp",c:"text/plain",calx:"application/vnd.ms-office.calx",cat:"application/vnd.ms-pki.seccat",cdf:"application/x-cdf",class:"application/x-java-applet",clp:"application/x-msclip",cmx:"image/x-cmx",cnf:"text/plain",cod:"image/cis-cod",cpio:"application/x-cpio",cpp:"text/plain",crd:"application/x-mscardfile",crl:"application/pkix-crl",crt:"application/x-x509-ca-cert",csh:"application/x-csh",css:"text/css",dcr:"application/x-director",der:"application/x-x509-ca-cert",dib:"image/bmp",dir:"application/x-director",disco:"text/xml",dll:"application/x-msdownload","dll.config":"text/xml",dlm:"text/dlm",doc:"application/msword",docm:"application/vnd.ms-word.document.macroEnabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroEnabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",dtd:"text/xml",dvi:"application/x-dvi",dwf:"drawing/x-dwf",dxr:"application/x-director",eml:"message/rfc822",eps:"application/postscript",etx:"text/x-setext",evy:"application/envoy","exe.config":"text/xml",fdf:"application/vnd.fdf",fif:"application/fractals",flr:"x-world/x-vrml",flv:"video/x-flv",gif:"image/gif",gtar:"application/x-gtar",gz:"application/x-gzip",h:"text/plain",hdf:"application/x-hdf",hdml:"text/x-hdml",hhc:"application/x-oleobject",hlp:"application/winhlp",hqx:"application/mac-binhex40",hta:"application/hta",htc:"text/x-component",htm:"text/html",html:"text/html",htt:"text/webviewhtml",hxt:"text/html",ico:"image/x-icon",ief:"image/ief",iii:"application/x-iphone",ins:"application/x-internet-signup",isp:"application/x-internet-signup",IVF:"video/x-ivf",jar:"application/java-archive",jck:"application/liquidmotion",jcz:"application/liquidmotion",jfif:"image/pjpeg",jpe:"image/jpeg",jpeg:"image/jpeg",jpg:"image/jpeg",js:"application/x-javascript",jsx:"text/jscript",latex:"application/x-latex",lit:"application/x-ms-reader",lsf:"video/x-la-asf",lsx:"video/x-la-asf",m13:"application/x-msmediaview",m14:"application/x-msmediaview",m1v:"video/mpeg",m3u:"audio/x-mpegurl",man:"application/x-troff-man",manifest:"application/x-ms-manifest",map:"text/plain",mdb:"application/x-msaccess",me:"application/x-troff-me",mht:"message/rfc822",mhtml:"message/rfc822",mid:"audio/mid",midi:"audio/mid",mmf:"application/x-smaf",mno:"text/xml",mny:"application/x-msmoney",mov:"video/quicktime",movie:"video/x-sgi-movie",mp2:"video/mpeg",mp3:"audio/mpeg",mpa:"video/mpeg",mpe:"video/mpeg",mpeg:"video/mpeg",mpg:"video/mpeg",mpp:"application/vnd.ms-project",mpv2:"video/mpeg",ms:"application/x-troff-ms",mvb:"application/x-msmediaview",mvc:"application/x-miva-compiled",nc:"application/x-netcdf",nsc:"video/x-ms-asf",nws:"message/rfc822",oda:"application/oda",odc:"text/x-ms-odc",ods:"application/oleobject",one:"application/onenote",onea:"application/onenote",onetoc:"application/onenote",onetoc2:"application/onenote",onetmp:"application/onenote",onepkg:"application/onenote",osdx:"application/opensearchdescription+xml",p10:"application/pkcs10",p12:"application/x-pkcs12",p7b:"application/x-pkcs7-certificates",p7c:"application/pkcs7-mime",p7m:"application/pkcs7-mime",p7r:"application/x-pkcs7-certreqresp",p7s:"application/pkcs7-signature",pbm:"image/x-portable-bitmap",pdf:"application/pdf",pfx:"application/x-pkcs12",pgm:"image/x-portable-graymap",pko:"application/vnd.ms-pki.pko",pma:"application/x-perfmon",pmc:"application/x-perfmon",pml:"application/x-perfmon",pmr:"application/x-perfmon",pmw:"application/x-perfmon",png:"image/png",pnm:"image/x-portable-anymap",pnz:"image/png",pot:"application/vnd.ms-powerpoint",potm:"application/vnd.ms-powerpoint.template.macroEnabled.12",potx:"application/vnd.openxmlformats-officedocument.presentationml.template",ppam:"application/vnd.ms-powerpoint.addin.macroEnabled.12",ppm:"image/x-portable-pixmap",pps:"application/vnd.ms-powerpoint",ppsm:"application/vnd.ms-powerpoint.slideshow.macroEnabled.12",ppsx:"application/vnd.openxmlformats-officedocument.presentationml.slideshow",ppt:"application/vnd.ms-powerpoint",pptm:"application/vnd.ms-powerpoint.presentation.macroEnabled.12",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",prf:"application/pics-rules",ps:"application/postscript",pub:"application/x-mspublisher",qt:"video/quicktime",qtl:"application/x-quicktimeplayer",ra:"audio/x-pn-realaudio",ram:"audio/x-pn-realaudio",ras:"image/x-cmu-raster",rf:"image/vnd.rn-realflash",rgb:"image/x-rgb",rm:"application/vnd.rn-realmedia",rmi:"audio/mid",roff:"application/x-troff",rpm:"audio/x-pn-realaudio-plugin",rtf:"application/rtf",rtx:"text/richtext",scd:"application/x-msschedule",sct:"text/scriptlet",setpay:"application/set-payment-initiation",setreg:"application/set-registration-initiation",sgml:"text/sgml",sh:"application/x-sh",shar:"application/x-shar",sit:"application/x-stuffit",sldm:"application/vnd.ms-powerpoint.slide.macroEnabled.12",sldx:"application/vnd.openxmlformats-officedocument.presentationml.slide",smd:"audio/x-smd",smx:"audio/x-smd",smz:"audio/x-smd",snd:"audio/basic",spc:"application/x-pkcs7-certificates",spl:"application/futuresplash",src:"application/x-wais-source",ssm:"application/streamingmedia",sst:"application/vnd.ms-pki.certstore",stl:"application/vnd.ms-pki.stl",sv4cpio:"application/x-sv4cpio",sv4crc:"application/x-sv4crc",svg:"image/svg+xml",swf:"application/x-shockwave-flash",t:"application/x-troff",tar:"application/x-tar",tcl:"application/x-tcl",tex:"application/x-tex",texi:"application/x-texinfo",texinfo:"application/x-texinfo",tgz:"application/x-compressed",thmx:"application/vnd.ms-officetheme",tif:"image/tiff",tiff:"image/tiff",tr:"application/x-troff",trm:"application/x-msterminal",tsv:"text/tab-separated-values",txt:"text/plain",uls:"text/iuls",ustar:"application/x-ustar",vbs:"text/vbscript",vcf:"text/x-vcard",vcs:"text/plain",vdx:"application/vnd.ms-visio.viewer",vml:"text/xml",vsd:"application/vnd.visio",vss:"application/vnd.visio",vst:"application/vnd.visio",vsto:"application/x-ms-vsto",vsw:"application/vnd.visio",vsx:"application/vnd.visio",vtx:"application/vnd.visio",wav:"audio/wav",wax:"audio/x-ms-wax",wbmp:"image/vnd.wap.wbmp",wcm:"application/vnd.ms-works",wdb:"application/vnd.ms-works",wks:"application/vnd.ms-works",wm:"video/x-ms-wm",wma:"audio/x-ms-wma",wmd:"application/x-ms-wmd",wmf:"application/x-msmetafile",wml:"text/vnd.wap.wml",wmlc:"application/vnd.wap.wmlc",wmls:"text/vnd.wap.wmlscript",wmlsc:"application/vnd.wap.wmlscriptc",wmp:"video/x-ms-wmp",wmv:"video/x-ms-wmv",wmx:"video/x-ms-wmx",wmz:"application/x-ms-wmz",wps:"application/vnd.ms-works",wri:"application/x-mswrite",wrl:"x-world/x-vrml",wrz:"x-world/x-vrml",wsdl:"text/xml",wvx:"video/x-ms-wvx",x:"application/directx",xaf:"x-world/x-vrml",xaml:"application/xaml+xml",xap:"application/x-silverlight-app",xbap:"application/x-ms-xbap",xbm:"image/x-xbitmap",xdr:"text/plain",xht:"application/xhtml+xml",xhtml:"application/xhtml+xml",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroEnabled.12",xlc:"application/vnd.ms-excel",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroEnabled.12",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroEnabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",xml:"text/xml",xof:"x-world/x-vrml",xpm:"image/x-xpixmap",xps:"application/vnd.ms-xpsdocument",xsd:"text/xml",xsf:"text/xml",xsl:"text/xml",xslt:"text/xml",xwd:"image/x-xwindowdump",z:"application/x-compress",zip:"application/x-zip-compressed"},K=e=>{const t={};return e.replace(/^\?/,"").split("&").forEach(n=>{const[i,a]=n.split("=");i&&(t[decodeURIComponent(i)]=decodeURIComponent(a||""))}),t},be=(e,t)=>{const[n,i]=e.split("?"),r={...i?K(i):{},...t},u=z(r);return`${n}?${u}`},z=e=>{if(typeof e>"u"||typeof e!="object")return e;let t=[];for(let n in e)if(e.hasOwnProperty(n)){if(e[n]===null)continue;typeof e[n]=="object"&&e[n].length?e[n].forEach(i=>{t.push(encodeURI(n+"="+i))}):typeof e[n]=="object"||t.push(encodeURI(n+"="+e[n]))}return t.join("&")},ye=(e,t={},n=0)=>{const i=new AbortController;let a=null;n&&(a=setTimeout(()=>i.abort(),n));const r=()=>{a!==null&&(clearTimeout(a),a=null)},u=c=>{const s=c,p=s.then.bind(s),li=s.catch.bind(s),ci=s.finally.bind(s);return s.then=function(A,si){return u(p(A,si))},s.catch=function(A){return u(li(A))},s.finally=function(A){return u(ci(A))},s.abort=A=>{r(),i.abort(A||"Request aborted by user")},s},l=fetch(e,{...t,signal:i.signal}).then(c=>(r(),c)).catch(c=>{throw r(),c});return u(l)},Nn=(e,t,n)=>{if(t==null)return;const i=e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase();n.set(i,String(t))},Cn=e=>["method","headers","body","mode","credentials","cache","redirect","referrer","referrerPolicy","integrity","keepalive","signal","window"].includes(e),D=(e,t=null,n)=>{let{timeout:i,delay:a,...r}=n;r=r||{},r.method=r.method||"GET";const u=r.method.toUpperCase()==="GET",l=new Headers(r.headers||{});for(let c in r)Cn(c)||Nn(c,r[c],l);return u&&t&&(e=be(e,typeof t=="string"?K(t):t),t=null),ye(e,{headers:l,body:u?void 0:On(t,l.get("content-type")||void 0),...r},i).then(c=>{if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);return a&&a>0?new Promise(s=>{setTimeout(()=>s(c),a)}):c})},Me=e=>typeof e=="string"||e instanceof FormData||e instanceof URLSearchParams||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e),On=(e,t)=>{if(Me(e)||typeof e!="object")return e;switch(t==null?void 0:t.toLowerCase()){case y:return JSON.stringify(e);case Te:case Ae:default:return z(e)}},Dn=(e,t=null,n={})=>D(e,t,{...n,ContentType:y,Accept:y}).then(i=>i.json()),xn=(e,t=null,n={})=>D(e,t,{...n,method:"POST",ContentType:y,Accept:y}).then(i=>i.json()),Rn=(e,t,n=null,i={})=>{const a=new FormData;if(Object.keys(t).forEach(r=>{a.append(r,t[r],t[r].name)}),n)for(let r in n)n.hasOwnProperty(r)&&a.append(r,n[r]);return D(e,a,{...i,method:"POST"}).then(r=>r.json())};function J(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array)return e.map(t=>J(t));if(e instanceof Object){const t={};for(const n in e)e.hasOwnProperty(n)&&(t[n]=J(e[n]));return t}return e}function In(e){return Object.keys(e).length===0}const Hn=(e,t)=>{let n={};for(let i in e)t[i]!==void 0?n[t[i]]=e[i]:n[i]=e[i];return n};function kn(e,t,n){const i=t.split(".");let a=e;for(const r of i){if(a==null)return n;a=a[r]}return a!==void 0?a:n}function Ln(e,t,n){const i=t.split("."),a=i.pop();let r=e;for(const u of i)(!(u in r)||typeof r[u]!="object")&&(r[u]={}),r=r[u];r[a]=n}function ve(e,...t){for(const n of t)for(const i in n)if(n.hasOwnProperty(i)){const a=n[i],r=e[i];a&&typeof a=="object"&&!Array.isArray(a)&&r&&typeof r=="object"&&!Array.isArray(r)?e[i]=ve(r,a):e[i]=a}return e}const _e=(e,t=!1)=>{for(const n in e)e[n]===null?delete e[n]:t&&typeof e[n]=="object"&&_e(e[n],!0);return e},Fn=new Date().getFullYear(),Pn=new Date().getMonth()+1,Un=new Date().getDate(),Yn=60*1e3,Bn=60*60*1e3,M=24*60*60*1e3,$n=7*M,qn=30*M,jn=31*M,Gn=365*M,Wn=366*M,Kn=0,zn=1,Jn=2,Vn=3,Qn=4,Xn=5,Zn=6,Se=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ne=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Ce=["January","February","March","April","May","June","July","August","September","October","November","December"],Oe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ei=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],ti=["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],ni=["日","一","二","三","四","五","六"],ii=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],ai=(e,t,n)=>{let i=()=>{if(t&&t(e),e-- >0){setTimeout(i,1e3);return}n&&n()};i()},oi=e=>{if(!e||e<10)return"刚刚";e=Math.floor(e/1e3);const t=Math.floor(e/3600),n=Math.floor(e%3600/60),i=e%60;let a="";return t>0&&(a+=t+"小时"),(n>0||t>0)&&(a+=n+"分钟"),a+=i+"秒前",a},De={d:e=>{let t=e.getDate();return(t<10?"0":"")+t},D:e=>Ne[e.getDay()],j:e=>e.getDate(),l:e=>Se[e.getDay()],N:e=>{let t=e.getDay();return t===0?7:t},S:e=>{let t=e.getDate();return t%10===1&&t!==11?"st":t%10===2&&t!==12?"nd":t%10===3&&t!==13?"rd":"th"},w:e=>e.getDay(),z:e=>{let t=new Date(e.getFullYear(),0,1);return Math.ceil((e.getTime()-t.getTime())/864e5)},W:e=>{let t=new Date(e.valueOf()),n=(e.getDay()+6)%7;t.setDate(t.getDate()-n+3);let i=t.valueOf();t.setMonth(0,1),t.getDay()!==4&&t.setMonth(0,1+(4-t.getDay()+7)%7);let a=1+Math.ceil((i-t.getTime())/6048e5);return a<10?"0"+a:a},F:e=>Ce[e.getMonth()],m:e=>{let t=e.getMonth();return(t<9?"0":"")+(t+1)},M:e=>Oe[e.getMonth()],n:e=>e.getMonth()+1,t:e=>{let t=e.getFullYear(),n=e.getMonth()+1;return n===12&&(t=t++,n=0),new Date(t,n,0).getDate()},L:e=>{let t=e.getFullYear();return t%400===0||t%100!==0&&t%4===0},o:e=>{let t=new Date(e.valueOf());return t.setDate(t.getDate()-(e.getDay()+6)%7+3),t.getFullYear()},Y:e=>e.getFullYear(),y:e=>(""+e.getFullYear()).substr(2),a:e=>e.getHours()<12?"am":"pm",A:e=>e.getHours()<12?"AM":"PM",B:e=>Math.floor(((e.getUTCHours()+1)%24+e.getUTCMinutes()/60+e.getUTCSeconds()/3600)*1e3/24),g:e=>e.getHours()%12||12,G:e=>e.getHours(),h:e=>{let t=e.getHours();return((t%12||12)<10?"0":"")+(t%12||12)},H:e=>{let t=e.getHours();return(t<10?"0":"")+t},i:e=>{let t=e.getMinutes();return(t<10?"0":"")+t},s:e=>{let t=e.getSeconds();return(t<10?"0":"")+t},v:e=>{let t=e.getMilliseconds();return(t<10?"00":t<100?"0":"")+t},e:e=>Intl.DateTimeFormat().resolvedOptions().timeZone,I:e=>{let t=null;for(let n=0;n<12;++n){let a=new Date(e.getFullYear(),n,1).getTimezoneOffset();if(t===null)t=a;else if(a<t){t=a;break}else if(a>t)break}return e.getTimezoneOffset()===t?1:0},O:e=>{let t=e.getTimezoneOffset();return(-t<0?"-":"+")+(Math.abs(t/60)<10?"0":"")+Math.floor(Math.abs(t/60))+(Math.abs(t%60)===0?"00":(Math.abs(t%60)<10?"0":"")+Math.abs(t%60))},P:e=>{let t=e.getTimezoneOffset();return(-t<0?"-":"+")+(Math.abs(t/60)<10?"0":"")+Math.floor(Math.abs(t/60))+":"+(Math.abs(t%60)===0?"00":(Math.abs(t%60)<10?"0":"")+Math.abs(t%60))},T:e=>{let t=e.toLocaleTimeString(navigator.language,{timeZoneName:"short"}).split(" ");return t[t.length-1]},Z:e=>-e.getTimezoneOffset()*60,c:e=>V("Y-m-d\\TH:i:sP",e),r:e=>e.toString(),U:e=>Math.floor(e.getTime()/1e3)},V=function(e,t=null){let n=null;return typeof t=="object"&&t!==null?n=t:n=new Date(t||Date.now()),e.replace(/(\\?)(.)/g,function(i,a,r){return a===""&&De[r]?String(De[r](n)):r})},ri=e=>V("W",e);o.BLOCK_TAGS=q,o.Base64Encode=Ze,o.DATE_NOW=Un,o.DAY_FRIDAY=Xn,o.DAY_MONDAY=zn,o.DAY_SATURDAY=Zn,o.DAY_SUNDAY=Kn,o.DAY_THURSDAY=Qn,o.DAY_TUESDAY=Jn,o.DAY_WEDNESDAY=Vn,o.GOLDEN_RATIO=Et,o.MIME_BINARY_DEFAULT=Mn,o.MIME_EXTENSION_MAP=Sn,o.MIME_FORM=Te,o.MIME_HTML=_n,o.MIME_JSON=y,o.MIME_MULTIPART=Ae,o.MIME_TEXT=vn,o.MONTH_NAMES_CN=ei,o.MONTH_NAMES_EN=Ce,o.MONTH_NAMES_SHORT_CN=ti,o.MONTH_NAMES_SHORT_EN=Oe,o.MONTH_NOW=Pn,o.ONE_DAY=M,o.ONE_HOUR=Bn,o.ONE_MINUTE=Yn,o.ONE_MONTH30=qn,o.ONE_MONTH31=jn,o.ONE_WEEK=$n,o.ONE_YEAR365=Gn,o.ONE_YEAR366=Wn,o.PAIR_TAGS=nn,o.REMOVABLE_TAGS=fe,o.SELF_CLOSING_TAGS=an,o.STAND_DPI=H,o.TRIM_BOTH=R,o.TRIM_LEFT=I,o.TRIM_RIGHT=ee,o.WEEK_DAY_NAMES_CN=ii,o.WEEK_DAY_NAMES_EN=Se,o.WEEK_DAY_NAMES_SHORT_CN=ni,o.WEEK_DAY_NAMES_SHORT_EN=Ne,o.YEAR_NOW=Fn,o.abortableFetch=ye,o.arrayChunk=ke,o.arrayColumn=v,o.arrayDistinct=Re,o.arrayGroup=Ie,o.arrayIndex=xe,o.arraySortByKey=He,o.arrayTrimTail=Le,o.base64Decode=Qe,o.base64UrlSafeEncode=Xe,o.between=g,o.blobToBase64=te,o.blobToDataUri=B,o.buildHtmlHidden=pn,o.buildStyleVars=Wt,o.camelCase=Be,o.capitalize=Q,o.cleanNull=_e,o.countDown=ai,o.createDomByHtml=Gt,o.cssSelectorEscape=ln,o.cutString=Ue,o.debounce=pt,o.decodeHTMLEntities=sn,o.deepClone=J,o.deleteCookie=N,o.deleteCookieAllPaths=rt,o.detectLanguage=nt,o.detectedPrecision=St,o.digitCount=Nt,o.disabled=le,o.dispatchEvent=Xt,o.downloadFile=tn,o.enabled=ce,o.enterFullScreen=ne,o.entityToString=cn,o.escapeAttr=j,o.escapeHtml=me,o.exitFullScreen=ie,o.extract=Ye,o.fileToBase64DataUri=en,o.findAll=F,o.findOne=b,o.fixBaseUrl=jt,o.floatVal=Fe,o.formatDate=V,o.getBoundingClientRect=ue,o.getCookie=ot,o.getDomDimension=Bt,o.getJson=Dn,o.getNodeXPath=Ht,o.getUTF8StrLen=je,o.getWeekNumber=ri,o.guid=oe,o.hide=Ct,o.highlightText=mn,o.html2Text=on,o.imgToBase64=hn,o.insertStyleSheet=pe,o.isBodyInit=Me,o.isChinese=Ve,o.isEmptyObject=In,o.isFirefox=it,o.isFocusable=Pt,o.isFunction=mt,o.isInFullScreen=ae,o.isJSON=ht,o.isJson=dt,o.isObject=ft,o.isPromise=ut,o.isUrl=re,o.kebabCase=$e,o.keepRectInContainer=Lt,o.limit=Mt,o.loadCss=Ut,o.loadScript=Yt,o.lockElementInteraction=Rt,o.markdown2Html=dn,o.md5=yn,o.mmToPt=At,o.mmToPx=wt,o.mmToTwip=Tt,o.msToHMS=oi,o.mutationEffective=se,o.nodeIndex=It,o.objToQuery=z,o.objectGet=kn,o.objectKeyMapping=Hn,o.objectMerge=ve,o.objectSet=Ln,o.offEvent=Qt,o.onDomTreeChange=kt,o.onEvent=Vt,o.onHover=xt,o.postFiles=Rn,o.postJson=xn,o.precisionToStep=qt,o.printStack=gt,o.ptToMm=bt,o.pxToMm=yt,o.queryReplace=be,o.queryToObj=K,o.randomInt=vt,o.randomString=Z,o.randomWords=We,o.rectAssoc=Ft,o.rectInLayout=$t,o.regQuote=S,o.remove=Dt,o.request=D,o.round=_t,o.sanitizeFileName=Zt,o.setCookie=at,o.show=Ot,o.srcToBase64=gn,o.strChunk=Je,o.strToPascalCase=Ke,o.stringToEntity=fn,o.stripSlashes=Pe,o.text2Html=rn,o.throttle=ct,o.throttleEffect=st,o.toggleDisabled=L,o.toggleFullScreen=tt,o.trim=ze,o.truncate=qe,o.unescapeHtml=un,o.urlB64DataCache=$,o.utf8Decode=X,o.utf8Encode=x,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(o,v){typeof exports=="object"&&typeof module<"u"?v(exports):typeof define=="function"&&define.amd?define(["exports"],v):(o=typeof globalThis<"u"?globalThis:o||self,v(o.Minutool={}))})(this,function(o){"use strict";const v=(e,t)=>{let n=[];for(let i in e)n.push(e[i][t]);return n},Re=(e,t)=>{for(let n in e)if(e[n]===t)return n;return null},Ie=(e,t)=>{let n=new Map;return e.filter((i,a)=>{let l=t?t(i,a):i;if(!n.has(l))return n.set(l,!0),!0})},He=(e,t,n)=>{if(!e||!e.length)return e;let i={};if(e.forEach(l=>{let u=l[t];i[u]||(i[u]=[]),i[u].push(l)}),!n)return i;let a={};for(let l in i)a[l]=i[l][0];return a},ke=e=>Object.keys(e).sort().reduce(function(t,n){return t[n]=e[n],t},{}),Le=(e,t)=>{let n=e.length;if(t<1||!n)return[];if(t>n)return[e];let i=[],a=Math.floor(n/t),l=n%t;for(let u=1;u<=a;u++)i.push(e.splice(0,t));return l&&i.push(e.splice(0,l)),i},Fe=e=>{let t=-1;for(let n=e.length-1;n>=0;n--)if(e[n]){t=n;break}return e.slice(0,t+1)};function Q(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}const Pe=(e,t=0)=>{if(!e||typeof e!="string")return t;const n=parseFloat(e);return isNaN(n)?t:n},Ue=e=>(e+"").replace(/\\(.?)/g,function(t,n){switch(n){case"\\":return"\\";case"0":return"\0";case"":return"";default:return n}}),Ye=(e,t,n="...")=>{let i=/[^\x00-\xff]/g;if(e.replace(i,"mm").length<=t)return e;let a=Math.floor(t/2);for(let l=a;l<e.length;l++)if(e.substr(0,l).replace(i,"mm").length>=t)return e.substr(0,l)+n;return e},Be=(e,t)=>{const n=Object.keys(t),i=Object.values(t);return new Function(...n,`return \`${e}\`;`)(...i)};function $e(e){return e.replace(/[-_](.)/g,(t,n)=>n.toUpperCase())}function qe(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function je(e,t,n="..."){return e.length<=t?e:e.slice(0,t)+n}const S=e=>(e+"").replace(/([\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g,"\\$1"),X=e=>{let t="",n=0,i=0,a=0,l=0;for(;n<e.length;)i=e.charCodeAt(n),i<128?(t+=String.fromCharCode(i),n++):i>191&&i<224?(a=e.charCodeAt(n+1),t+=String.fromCharCode((i&31)<<6|a&63),n+=2):(a=e.charCodeAt(n+1),l=e.charCodeAt(n+2),t+=String.fromCharCode((i&15)<<12|(a&63)<<6|l&63),n+=3);return t},x=e=>{e=e.replace(/\r\n/g,"n");let t="";for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);i<128?t+=String.fromCharCode(i):i>127&&i<2048?(t+=String.fromCharCode(i>>6|192),t+=String.fromCharCode(i&63|128)):(t+=String.fromCharCode(i>>12|224),t+=String.fromCharCode(i>>6&63|128),t+=String.fromCharCode(i&63|128))}return t},Ge=e=>{let t=0,n=e.length,i=-1;for(let a=0;a<n;a++)i=e.charCodeAt(a),i>=0&&i<=128?t+=1:t+=3;return t},We="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890",Z=(e=6,t=We)=>{let n="";for(let i=0;i<e;i++){let a=Math.round(Math.random()*(t.length-1));n+=t.substring(a,a+1)}return n},Ke=(e=1,t=8)=>{let n=[];const i="bcdfghjklmnpqrstvwxyz",a="aeiou";for(;e-- >0;){let l="";for(let u=0;u<t;u=u+3)l+=i[Math.floor(Math.random()*i.length)],l+=a[Math.floor(Math.random()*a.length)],l+=i[Math.floor(Math.random()*i.length)];n.push(l)}return n},ze=(e,t=!1)=>{let n=[];return e.replace(/[-_\s+]/g," ").split(" ").forEach((i,a)=>{n.push(a===0&&!t?i:Q(i))}),n.join("")},R=0,I=1,ee=2,Je=(e,t="",n=R)=>{if(t.length){let i=new RegExp("^["+S(t)+"]+"),a=new RegExp("["+S(t)+"]+$");return n===I?e.replace(i,""):n===ee?e.replace(a,""):e.replace(i,"").replace(a,"")}else return n===R?e.trim():n===I?e.trimStart():e.trimEnd()},Ve=(e,t)=>{let n=[];for(let i=0;i<e.length;i+=t)n.push(e.slice(i,i+t));return n},Qe=e=>/[\u4e00-\u9fa5]/.test(e),E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Xe=e=>{let t="",n,i,a,l,u,r,s,c=0;for(e=e.replace(/\+\+[++^A-Za-z0-9+/=]/g,"");c<e.length;)l=E.indexOf(e.charAt(c++)),u=E.indexOf(e.charAt(c++)),r=E.indexOf(e.charAt(c++)),s=E.indexOf(e.charAt(c++)),n=l<<2|u>>4,i=(u&15)<<4|r>>2,a=(r&3)<<6|s,t=t+String.fromCharCode(n),r!==64&&(t=t+String.fromCharCode(i)),s!==64&&(t=t+String.fromCharCode(a));return t=X(t),t},Ze=e=>x(e).replace("+","-").replace("/","_"),et=e=>{let t="",n,i,a,l,u,r,s,c=0;for(e=x(e);c<e.length;)n=e.charCodeAt(c++),i=e.charCodeAt(c++),a=e.charCodeAt(c++),l=n>>2,u=(n&3)<<4|i>>4,r=(i&15)<<2|a>>6,s=a&63,isNaN(i)?r=s=64:isNaN(a)&&(s=64),t=t+E.charAt(l)+E.charAt(u)+E.charAt(r)+E.charAt(s);return t},te=async e=>await tt(e),tt=e=>new Promise((t,n)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(i.result),i.onerror=a=>n(a)}),ne=e=>{if(e.requestFullscreen)return e.requestFullscreen();if(e.webkitRequestFullScreen)return e.webkitRequestFullScreen();throw e.mozRequestFullScreen&&e.mozRequestFullScreen(),e.msRequestFullScreen&&e.msRequestFullScreen(),"Browser no allow full screen"},ie=()=>document.exitFullscreen(),nt=e=>new Promise((t,n)=>{ae()?ie().then(t).catch(n):ne(e).then(t).catch(n)}),ae=()=>!!document.fullscreenElement,it=e=>{const t=navigator.language||navigator.userLanguage;if(e.includes(t))return t;const n=t.split("-")[0],i=e.find(a=>a.startsWith(n));return i||e[0]},at=()=>navigator.userAgent.toLowerCase().indexOf("firefox")>-1,ot=(e,t,n,i="/",a)=>{let l="";if(n){let r=new Date;r.setTime(Date.now()+n*24*60*60*1e3),l="; expires="+r.toUTCString()}let u=e+"="+(t||"")+l+"; path="+i;a&&(u+="; domain="+a),document.cookie=u},rt=e=>{let t=e+"=",n=document.cookie.split(";");for(let i=0;i<n.length;i++){let a=n[i];for(;a.charAt(0)===" ";)a=a.substring(1,a.length);if(a.indexOf(t)===0)return a.substring(t.length,a.length)}return null},N=(e,t="/",n)=>{let i=e+"=; Path="+t+"; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";n&&(i+=" Domain="+n+";"),document.cookie=i},lt=(e,t)=>{const n=(t||(location==null?void 0:location.hostname)).split(".");for(;n.length>1;)N(e,"/",n.join(".")),N(e,"/","."+n.join(".")),n.shift();N(e)};let ct=0;const oe=(e="")=>"guid_"+(e||Z(6))+ ++ct,st=(e,t)=>{let n,i,a=0;return function(){let l=+new Date;n=this,i=arguments,l-a>t&&(e.apply(n,i),a=l)}},pt=(e,t)=>{let n,i,a=0,l=!1;return function(){if(l)return;let u=+new Date;n=this,i=arguments;let r=t-(u-a);r<=0?(e.apply(n,i),a=u):(l=!0,setTimeout(()=>{e.apply(n,i),l=!1,a=u},r))}},ut=(e,t)=>{let n;return function(){let i=this,a=arguments;clearTimeout(n),n=setTimeout(function(){e.apply(i,a)},t)}},dt=e=>e&&typeof e=="object"&&e.then&&typeof e.then=="function",ft=e=>{let t=!1;try{JSON.parse(e),t=!0}catch{}return t},mt=e=>e&&typeof e=="object"&&!Array.isArray(e),ht=e=>e?Object.prototype.toString.call(e)==="[object Function]"||typeof e=="function"||e instanceof Function:!1,re=e=>typeof e!="string"||e.trim()===""?!1:/^(https?:\/\/|\/\/|\/|\.\.?\/*)/i.test(e),gt=e=>{let t=!1;try{JSON.parse(e),t=!0}catch{}return t},Et=()=>{let e=new Error().stack;console.log(e)},wt=(1+Math.sqrt(5))/2-1,H=96,Tt=(e,t=H)=>e/25.4*t,At=e=>Math.round(e*56.6929),bt=e=>e*2.83464566929,yt=e=>e/2.83464566929,Mt=(e,t=H)=>25.4*e/t,vt=(e,t,n)=>Math.min(Math.max(e,t),n),g=(e,t,n,i=!0)=>i?e>=t&&e<=n:e>t&&e<n,_t=(e,t)=>Math.floor(Math.random()*(t+1-e))+e,St=(e,t=2)=>{let n=Math.pow(10,t);return Math.round(e*n)/n},Nt=(...e)=>{let t=0;return e.forEach(n=>{if(typeof n=="number"&&!isNaN(n)){const i=n.toString().split(".")[1];i&&(t=Math.max(t,i.length))}}),t},Ct=e=>(e=Math.abs(Number(e)),e===0?1:Math.floor(Math.log10(e))+1),Ot=e=>{b(e).style.display="none"},Dt=e=>{b(e).style.display=""},xt=e=>{let t=b(e);return t&&t.parentNode&&t.parentNode.removeChild(t)},k="disabled",le=(e,t="")=>L(e,t,!1),ce=(e,t="")=>L(e,t,!0),L=(e,t="",n=null)=>{let i=b(e),a=n===null?!i.classList.contains(k):!n;a&&pe(`.${k} {pointer-event:none !important;}`,"__element_lock_style__"),i.classList.toggle(k,a),i[a?"setAttribute":"removeAttribute"]("disabled","disabled"),i[a?"setAttribute":"removeAttribute"]("data-disabled","disabled"),t&&i.classList.toggle(t,a)},Rt=(e,t,n)=>{e=b(e);let i=!1;e.addEventListener("mouseenter",()=>{i||(i=!0,t&&t())}),e.addEventListener("mouseleave",()=>{i&&(i=!1,n&&n())})},It=(e,t)=>{le(e),t(()=>{ce(e)})},Ht=e=>e.parentNode?Array.prototype.indexOf.call(e.parentNode.children,e):-1,F=(e,t=document)=>{if(typeof e=="string")return e=e.trim(),e.indexOf(":scope")!==0&&(e=":scope "+e),Array.from(t.querySelectorAll(e));if(Array.isArray(e)){let n=[];return e.forEach(i=>{n.push(...F(i))}),n}else return NodeList.prototype.isPrototypeOf(e)||HTMLCollection.prototype.isPrototypeOf(e)?Array.from(e):e instanceof HTMLElement?[e]:e},b=(e,t=document)=>typeof e=="string"?t.querySelector(e):e,kt=e=>{let t=document.getElementsByTagName("*"),n=[];for(n=[];e&&e.nodeType===1;e=e.parentNode)if(e.hasAttribute("id")){let i=0;for(let a=0;a<t.length&&(t[a].hasAttribute("id")&&t[a].id===e.id&&i++,!(i>1));a++);if(i===1)return n.unshift('id("'+e.getAttribute("id")+'")'),n.join("/");n.unshift(e.localName.toLowerCase()+'[@id="'+e.getAttribute("id")+'"]')}else if(e.hasAttribute("class"))n.unshift(e.localName.toLowerCase()+'[@class="'+e.getAttribute("class")+'"]');else{let i,a;for(i=1,a=e.previousSibling;a;a=a.previousSibling)a.localName===e.localName&&i++;n.unshift(e.localName.toLowerCase()+"["+i+"]")}return n.length?"/"+n.join("/"):null},Lt=(e,t,n=!0)=>{const i="ON_DOM_TREE_CHANGE_BIND_"+oe();let a=()=>{F(`input:not([${i}]), textarea:not([${i}]), select:not([${i}])`,e).forEach(l=>{l.setAttribute(i,"1"),l.addEventListener("change",t)})};se(e,{attributes:!0,subtree:!0,childList:!0},()=>{n&&a(),t()},10),n&&a()},se=(e,t,n,i=10)=>{let a=0,l=!1,u=new MutationObserver(()=>{if(l)return;let r=i-(Date.now()-a);r>0?(l=!0,setTimeout(()=>{l=!1,a=Date.now(),n(u)},r)):(a=Date.now(),n(u))});u.observe(e,t)},Ft=(e,t={left:0,top:0,width:window.innerWidth,height:window.innerHeight})=>{let n={left:e.left,top:e.top};return e.width>t.width||e.height>t.height||(e.width+e.left>t.width+t.left&&(n.left=e.left-(e.width+e.left-(t.width+t.left))),e.height+e.top>t.height+t.top&&(n.top=e.top-(e.height+e.top-(t.height+t.top))),e.left<t.left&&(n.left=t.left),e.top<t.top&&(n.top=t.top)),n},Pt=(e,t)=>e.left<=t.left?e.left+e.width>=t.left&&(g(t.top,e.top,e.top+e.height)||g(t.top+t.height,e.top,e.top+e.height)||t.top>=e.top&&t.height>=e.height):t.left+t.width>=e.left&&(g(e.top,t.top,t.top+t.height)||g(e.top+e.height,t.top,t.top+t.height)||e.top>=t.top&&e.height>=t.height),Ut=e=>e?!!(e.tabIndex>=0||e instanceof HTMLAnchorElement&&e.href||e instanceof HTMLButtonElement&&!e.disabled||e instanceof HTMLInputElement&&!e.disabled||e instanceof HTMLTextAreaElement&&!e.disabled):!1;let w={};const Yt=(e,t=!1)=>(!t&&e in w||(w[e]=new Promise((n,i)=>{let a=document.createElement("link");a.rel="stylesheet",a.href=e,a.onload=()=>{n()},a.onerror=()=>{i()},document.head.append(a)})),w[e]),Bt=(e,t=!1)=>(!t&&e in w||(w[e]=new Promise((n,i)=>{let a=document.createElement("script");a.src=e,a.onload=()=>{n()},a.onerror=()=>{i()},document.head.append(a)})),w[e]),$t=e=>{let t=e.style.visibility,n=e.style.display,i,a;return e.style.visibility="hidden",e.style.display="block",i=e.clientWidth,a=e.clientHeight,e.style.visibility=t,e.style.display=n,{width:i,height:a}},pe=(e,t="",n=document)=>{if(t&&n.querySelector(`#${t}`))return n.querySelector(`#${t}`);let i=n.createElement("style");return n.head.appendChild(i),i.innerHTML=e,t&&(i.id=t),i},qt=(e,t)=>g(e.top,t.top,t.top+t.height)&&g(e.left,t.left,t.left+t.width)&&g(e.top+e.height,t.top,t.top+t.height)&&g(e.left+e.width,t.left,t.left+t.width),jt=e=>Math.pow(10,-e),Gt=(e,t)=>{try{return new URL(e,t).href}catch{return e}},Wt=(e,t=null)=>{let n=document.createElement("template");e=e.trim(),n.innerHTML=e;let i=[];return t?n.content.childNodes.forEach(a=>{i.push(t.appendChild(a))}):i=Array.from(n.content.childNodes),i.length===1?i[0]:i},ue=(e,t=!1)=>{if(!e)throw new Error("el is null");const n=e.getBoundingClientRect();if(t&&!n.height){const i=e.style.visibility,a=e.style.display;e.style.visibility="hidden",e.style.display="block";const l=ue(e);return e.style.visibility=i,e.style.display=a,l}return{top:n.top,left:n.left,right:n.right,bottom:n.bottom,width:n.width,height:n.height}},Kt=e=>{let t={};for(let n in e){const i=e[n];i!=null&&(t[`--${n}`]=`${i}`)}return t},P=new EventTarget,zt=new Map,U=new Map;let Jt=0;const Vt="__MINUTOOL_SYM_EVENT__";function Y(e){if(!U.has(e)){const t=`${Vt}${++Jt}`;U.set(e,t),zt.set(t,e)}return U.get(e)}const Qt=(e,t)=>{P.addEventListener(typeof e=="symbol"?Y(e):e,t)},Xt=(e,t)=>{P.removeEventListener(typeof e=="symbol"?Y(e):e,t)},Zt=(e,t=null)=>{P.dispatchEvent(new CustomEvent(typeof e=="symbol"?Y(e):e,{detail:t}))},en=e=>e.replace(/[\\/:*?"<>|]/g,"_").replace(/[\0-\x1F]/g,"_").replace(/\s+/g," ").replace(/^\.+/,"").replace(/\.+$/,"").trim(),B=e=>new Promise((t,n)=>{const i=new FileReader;i.onload=()=>t(i.result),i.onerror=a=>n(a),i.readAsDataURL(e)}),de={},$=(e,t=null)=>t!==null?(de[e]=t,null):de[e]||null,tn=async e=>{if(!e)return null;if(typeof e=="string"&&e.startsWith("data:"))return e;try{if(typeof e=="string"&&re(e)){const t=await fetch(e);if(!t.ok)throw new Error(`Fetch failed: ${t.status}`);const n=await t.blob();return await B(n)}return e instanceof Blob?await B(e):null}catch(t){return console.warn("file2Base64DataURL failed:",t),null}},nn=(e,t)=>{const n=document.createElement("a");n.rel="noopener noreferrer",n.href=e,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)},q=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","CANVAS","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","NOSCRIPT","OL","P","PRE","SECTION","TABLE","TFOOT","UL","VIDEO"],an=["A","ABBR","ACRONYM","B","BDO","BIG","BUTTON","CITE","CODE","DFN","EM","I","KBD","LABEL","MAP","OBJECT","OUTPUT","Q","S","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","TT","U","VAR"].concat(...q),on=["AREA","BASE","BR","COL","EMBED","HR","IMG","INPUT","LINK","META","PARAM","SOURCE","TRACK","WBR"],fe=["STYLE","COMMENT","SELECT","OPTION","SCRIPT","TITLE","HEAD","BUTTON","META","LINK","PARAM","SOURCE"],rn=e=>(fe.forEach(n=>{e=e.replace(new RegExp(n,"ig"),"")}),e=e.replace(/[\r|\n]/g,""),e=e.replace(/<(\w+)([^>]*)>/g,function(n,i,a){return q.includes(i.toUpperCase())?`
|
|
2
|
+
`:""}),e=e.replace(/<\/(\w+)([^>]*)>/g,function(n,i,a){return""}),e=e.replace(/<[^>]+>/g,""),[[/ /gi," "],[/</gi,"<"],[/>/gi,">"],[/"/gi,'"'],[/'/gi,"'"]].forEach(([n,i])=>{e=e.replace(n,i)}),e=e.replace(/&#(\d+);/,function(n,i){return String.fromCharCode(parseInt(i))}),e=e.replace(/&/gi,"&"),e=e.trim(),e),ln=e=>me(e,0,!1).replace(/\n/g,"<br/>"),cn=e=>window.CSS&&CSS.escape?CSS.escape(e):e.replace(/[!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~]/g,"\\$&"),sn=e=>{let t=e.split(";");return t.pop(),t.map(n=>String.fromCharCode(n[2]==="x"?parseInt(n.slice(3),16):parseInt(n.slice(2)))).join("")};let _;const pn=e=>(_||(_=document.createElement("div")),e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),_.innerHTML=e,e=_.textContent||"",_.textContent="",e),un=e=>{let t="";for(let n in e){let i=e[n]===null?"":e[n];t+=`<input type="hidden" name="${j(n)}" value="${j(i)}"/>`}return t},me=(e,t=2,n=!0)=>{let i=String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");return n&&(i=i.replace(/[\r\n]/g,"<br/>")),t&&(i=i.replace(/\t/g," ".repeat(t))),i=i.replace(/\s/g," "),i},dn=e=>String(e).replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/ /g," ").replace(/&/g,"&").replace(/<br.*>/,`
|
|
3
|
+
`),fn=e=>{if(!e)return"";let t=e;return t=t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),t=t.replace(/^###### (.*$)/gim,"<h6>$1</h6>"),t=t.replace(/^##### (.*$)/gim,"<h5>$1</h5>"),t=t.replace(/^#### (.*$)/gim,"<h4>$1</h4>"),t=t.replace(/^### (.*$)/gim,"<h3>$1</h3>"),t=t.replace(/^## (.*$)/gim,"<h2>$1</h2>"),t=t.replace(/^# (.*$)/gim,"<h1>$1</h1>"),t=t.replace(/\*\*(.*?)\*\*/gim,"<strong>$1</strong>"),t=t.replace(/\*(.*?)\*/gim,"<em>$1</em>"),t=t.replace(/`(.*?)`/gim,"<code>$1</code>"),t=t.replace(/!\[(.*?)\]\((.*?)\)/gim,'<img src="$2" alt="$1" />'),t=t.replace(/\[(.*?)\]\((.*?)\)/gim,'<a href="$2" target="_blank">$1</a>'),t=t.replace(/((\|.*\|\n)+)/g,n=>{const i=n.trim().split(`
|
|
4
|
+
`);if(i.length<2)return n;let a="<table>";return i.forEach((l,u)=>{const r=l.split("|").slice(1,-1);if(/^\s*-+\s*$/.test(r[0]))return;const s=u===0?"th":"td";a+="<tr>",r.forEach(c=>{a+=`<${s}>${c.trim()}</${s}>`}),a+="</tr>"}),a+="</table>",a}),t=t.replace(/^\s*-\s+(.*)/gim,"<li>$1</li>"),t=t.replace(/(<li>.*<\/li>)/gims,"<ul>$1</ul>"),t=t.replace(/\n/g,"<br />"),t.trim()},j=(e,t="")=>(t=t?" ":`
|
|
5
|
+
`,(""+e).replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">").replace(/\r\n/g,t).replace(/[\r\n]/g,t)),mn=(e,t)=>{let n=e.split("");return t=t||0,n.map(i=>`&#${t?"x"+i.charCodeAt(0).toString(16):i.charCodeAt(0)};`).join("")},hn=(e,t,n='<span class="matched">%s</span>')=>t?e.replace(new RegExp(S(t),"ig"),i=>n.replace("%s",i)):e,gn=e=>{if(!e.src)return null;if(e.src.indexOf("data:")===0)return e.src;let t=document.createElement("canvas");t.width=e.width,t.height=e.height;let n=t.getContext("2d");return n?(n.drawImage(e,0,0,e.width,e.height),t.toDataURL("image/png")):null},En=(e,t=!1)=>new Promise((n,i)=>{if(t){const l=$(e);if(l)return n(l)}let a=new XMLHttpRequest;a.open("GET",e,!0),a.responseType="blob",a.onload=function(){if(this.status===200){let l=this.response;te(l).then(u=>{t&&$(e,u),n(u)}).catch(u=>{i(u)})}},a.onerror=function(){i("Error:"+this.statusText)},a.onabort=function(){i("Request abort")},a.send()}),T=(e,t)=>{let n=(e&65535)+(t&65535);return(e>>16)+(t>>16)+(n>>16)<<16|n&65535},wn=(e,t)=>e<<t|e>>>32-t,C=(e,t,n,i,a,l)=>T(wn(T(T(t,e),T(i,l)),a),n),d=(e,t,n,i,a,l,u)=>C(t&n|~t&i,e,t,a,l,u),f=(e,t,n,i,a,l,u)=>C(t&i|n&~i,e,t,a,l,u),m=(e,t,n,i,a,l,u)=>C(t^n^i,e,t,a,l,u),h=(e,t,n,i,a,l,u)=>C(n^(t|~i),e,t,a,l,u),O=(e,t)=>{e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;let n,i,a,l,u,r=1732584193,s=-271733879,c=-1732584194,p=271733878;for(n=0;n<e.length;n+=16)i=r,a=s,l=c,u=p,r=d(r,s,c,p,e[n],7,-680876936),p=d(p,r,s,c,e[n+1],12,-389564586),c=d(c,p,r,s,e[n+2],17,606105819),s=d(s,c,p,r,e[n+3],22,-1044525330),r=d(r,s,c,p,e[n+4],7,-176418897),p=d(p,r,s,c,e[n+5],12,1200080426),c=d(c,p,r,s,e[n+6],17,-1473231341),s=d(s,c,p,r,e[n+7],22,-45705983),r=d(r,s,c,p,e[n+8],7,1770035416),p=d(p,r,s,c,e[n+9],12,-1958414417),c=d(c,p,r,s,e[n+10],17,-42063),s=d(s,c,p,r,e[n+11],22,-1990404162),r=d(r,s,c,p,e[n+12],7,1804603682),p=d(p,r,s,c,e[n+13],12,-40341101),c=d(c,p,r,s,e[n+14],17,-1502002290),s=d(s,c,p,r,e[n+15],22,1236535329),r=f(r,s,c,p,e[n+1],5,-165796510),p=f(p,r,s,c,e[n+6],9,-1069501632),c=f(c,p,r,s,e[n+11],14,643717713),s=f(s,c,p,r,e[n],20,-373897302),r=f(r,s,c,p,e[n+5],5,-701558691),p=f(p,r,s,c,e[n+10],9,38016083),c=f(c,p,r,s,e[n+15],14,-660478335),s=f(s,c,p,r,e[n+4],20,-405537848),r=f(r,s,c,p,e[n+9],5,568446438),p=f(p,r,s,c,e[n+14],9,-1019803690),c=f(c,p,r,s,e[n+3],14,-187363961),s=f(s,c,p,r,e[n+8],20,1163531501),r=f(r,s,c,p,e[n+13],5,-1444681467),p=f(p,r,s,c,e[n+2],9,-51403784),c=f(c,p,r,s,e[n+7],14,1735328473),s=f(s,c,p,r,e[n+12],20,-1926607734),r=m(r,s,c,p,e[n+5],4,-378558),p=m(p,r,s,c,e[n+8],11,-2022574463),c=m(c,p,r,s,e[n+11],16,1839030562),s=m(s,c,p,r,e[n+14],23,-35309556),r=m(r,s,c,p,e[n+1],4,-1530992060),p=m(p,r,s,c,e[n+4],11,1272893353),c=m(c,p,r,s,e[n+7],16,-155497632),s=m(s,c,p,r,e[n+10],23,-1094730640),r=m(r,s,c,p,e[n+13],4,681279174),p=m(p,r,s,c,e[n],11,-358537222),c=m(c,p,r,s,e[n+3],16,-722521979),s=m(s,c,p,r,e[n+6],23,76029189),r=m(r,s,c,p,e[n+9],4,-640364487),p=m(p,r,s,c,e[n+12],11,-421815835),c=m(c,p,r,s,e[n+15],16,530742520),s=m(s,c,p,r,e[n+2],23,-995338651),r=h(r,s,c,p,e[n],6,-198630844),p=h(p,r,s,c,e[n+7],10,1126891415),c=h(c,p,r,s,e[n+14],15,-1416354905),s=h(s,c,p,r,e[n+5],21,-57434055),r=h(r,s,c,p,e[n+12],6,1700485571),p=h(p,r,s,c,e[n+3],10,-1894986606),c=h(c,p,r,s,e[n+10],15,-1051523),s=h(s,c,p,r,e[n+1],21,-2054922799),r=h(r,s,c,p,e[n+8],6,1873313359),p=h(p,r,s,c,e[n+15],10,-30611744),c=h(c,p,r,s,e[n+6],15,-1560198380),s=h(s,c,p,r,e[n+13],21,1309151649),r=h(r,s,c,p,e[n+4],6,-145523070),p=h(p,r,s,c,e[n+11],10,-1120210379),c=h(c,p,r,s,e[n+2],15,718787259),s=h(s,c,p,r,e[n+9],21,-343485551),r=T(r,i),s=T(s,a),c=T(c,l),p=T(p,u);return[r,s,c,p]},he=e=>{let t,n="",i=e.length*32;for(t=0;t<i;t+=8)n+=String.fromCharCode(e[t>>5]>>>t%32&255);return n},G=e=>{let t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;let i=e.length*8;for(t=0;t<i;t+=8)n[t>>5]|=(e.charCodeAt(t/8)&255)<<t%32;return n},Tn=e=>he(O(G(e),e.length*8)),An=(e,t)=>{let n,i=G(e),a=[],l=[],u;for(a[15]=l[15]=void 0,i.length>16&&(i=O(i,e.length*8)),n=0;n<16;n+=1)a[n]=i[n]^909522486,l[n]=i[n]^1549556828;return u=O(a.concat(G(t)),512+t.length*8),he(O(l.concat(u),640))},ge=e=>{let t="0123456789abcdef",n="",i,a;for(a=0;a<e.length;a+=1)i=e.charCodeAt(a),n+=t.charAt(i>>>4&15)+t.charAt(i&15);return n},W=e=>unescape(encodeURIComponent(e)),Ee=e=>Tn(W(e)),bn=e=>ge(Ee(e)),we=(e,t)=>An(W(e),W(t)),yn=(e,t)=>ge(we(e,t)),Mn=(e,t,n)=>t?n?we(t,e):yn(t,e):n?Ee(e):bn(e),vn="application/octet-stream",y="application/json",Te="application/x-www-form-urlencoded",Ae="multipart/form-data",_n="text/plain",Sn="text/html",Nn={323:"text/h323",accdb:"application/msaccess",accde:"application/msaccess",accdt:"application/msaccess",acx:"application/internet-property-stream",ai:"application/postscript",aif:"audio/x-aiff",aifc:"audio/aiff",aiff:"audio/aiff",application:"application/x-ms-application",art:"image/x-jg",asf:"video/x-ms-asf",asm:"text/plain",asr:"video/x-ms-asf",asx:"video/x-ms-asf",atom:"application/atom+xml",au:"audio/basic",avi:"video/x-msvideo",axs:"application/olescript",bas:"text/plain",bcpio:"application/x-bcpio",bmp:"image/bmp",c:"text/plain",calx:"application/vnd.ms-office.calx",cat:"application/vnd.ms-pki.seccat",cdf:"application/x-cdf",class:"application/x-java-applet",clp:"application/x-msclip",cmx:"image/x-cmx",cnf:"text/plain",cod:"image/cis-cod",cpio:"application/x-cpio",cpp:"text/plain",crd:"application/x-mscardfile",crl:"application/pkix-crl",crt:"application/x-x509-ca-cert",csh:"application/x-csh",css:"text/css",dcr:"application/x-director",der:"application/x-x509-ca-cert",dib:"image/bmp",dir:"application/x-director",disco:"text/xml",dll:"application/x-msdownload","dll.config":"text/xml",dlm:"text/dlm",doc:"application/msword",docm:"application/vnd.ms-word.document.macroEnabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroEnabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",dtd:"text/xml",dvi:"application/x-dvi",dwf:"drawing/x-dwf",dxr:"application/x-director",eml:"message/rfc822",eps:"application/postscript",etx:"text/x-setext",evy:"application/envoy","exe.config":"text/xml",fdf:"application/vnd.fdf",fif:"application/fractals",flr:"x-world/x-vrml",flv:"video/x-flv",gif:"image/gif",gtar:"application/x-gtar",gz:"application/x-gzip",h:"text/plain",hdf:"application/x-hdf",hdml:"text/x-hdml",hhc:"application/x-oleobject",hlp:"application/winhlp",hqx:"application/mac-binhex40",hta:"application/hta",htc:"text/x-component",htm:"text/html",html:"text/html",htt:"text/webviewhtml",hxt:"text/html",ico:"image/x-icon",ief:"image/ief",iii:"application/x-iphone",ins:"application/x-internet-signup",isp:"application/x-internet-signup",IVF:"video/x-ivf",jar:"application/java-archive",jck:"application/liquidmotion",jcz:"application/liquidmotion",jfif:"image/pjpeg",jpe:"image/jpeg",jpeg:"image/jpeg",jpg:"image/jpeg",js:"application/x-javascript",jsx:"text/jscript",latex:"application/x-latex",lit:"application/x-ms-reader",lsf:"video/x-la-asf",lsx:"video/x-la-asf",m13:"application/x-msmediaview",m14:"application/x-msmediaview",m1v:"video/mpeg",m3u:"audio/x-mpegurl",man:"application/x-troff-man",manifest:"application/x-ms-manifest",map:"text/plain",mdb:"application/x-msaccess",me:"application/x-troff-me",mht:"message/rfc822",mhtml:"message/rfc822",mid:"audio/mid",midi:"audio/mid",mmf:"application/x-smaf",mno:"text/xml",mny:"application/x-msmoney",mov:"video/quicktime",movie:"video/x-sgi-movie",mp2:"video/mpeg",mp3:"audio/mpeg",mpa:"video/mpeg",mpe:"video/mpeg",mpeg:"video/mpeg",mpg:"video/mpeg",mpp:"application/vnd.ms-project",mpv2:"video/mpeg",ms:"application/x-troff-ms",mvb:"application/x-msmediaview",mvc:"application/x-miva-compiled",nc:"application/x-netcdf",nsc:"video/x-ms-asf",nws:"message/rfc822",oda:"application/oda",odc:"text/x-ms-odc",ods:"application/oleobject",one:"application/onenote",onea:"application/onenote",onetoc:"application/onenote",onetoc2:"application/onenote",onetmp:"application/onenote",onepkg:"application/onenote",osdx:"application/opensearchdescription+xml",p10:"application/pkcs10",p12:"application/x-pkcs12",p7b:"application/x-pkcs7-certificates",p7c:"application/pkcs7-mime",p7m:"application/pkcs7-mime",p7r:"application/x-pkcs7-certreqresp",p7s:"application/pkcs7-signature",pbm:"image/x-portable-bitmap",pdf:"application/pdf",pfx:"application/x-pkcs12",pgm:"image/x-portable-graymap",pko:"application/vnd.ms-pki.pko",pma:"application/x-perfmon",pmc:"application/x-perfmon",pml:"application/x-perfmon",pmr:"application/x-perfmon",pmw:"application/x-perfmon",png:"image/png",pnm:"image/x-portable-anymap",pnz:"image/png",pot:"application/vnd.ms-powerpoint",potm:"application/vnd.ms-powerpoint.template.macroEnabled.12",potx:"application/vnd.openxmlformats-officedocument.presentationml.template",ppam:"application/vnd.ms-powerpoint.addin.macroEnabled.12",ppm:"image/x-portable-pixmap",pps:"application/vnd.ms-powerpoint",ppsm:"application/vnd.ms-powerpoint.slideshow.macroEnabled.12",ppsx:"application/vnd.openxmlformats-officedocument.presentationml.slideshow",ppt:"application/vnd.ms-powerpoint",pptm:"application/vnd.ms-powerpoint.presentation.macroEnabled.12",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",prf:"application/pics-rules",ps:"application/postscript",pub:"application/x-mspublisher",qt:"video/quicktime",qtl:"application/x-quicktimeplayer",ra:"audio/x-pn-realaudio",ram:"audio/x-pn-realaudio",ras:"image/x-cmu-raster",rf:"image/vnd.rn-realflash",rgb:"image/x-rgb",rm:"application/vnd.rn-realmedia",rmi:"audio/mid",roff:"application/x-troff",rpm:"audio/x-pn-realaudio-plugin",rtf:"application/rtf",rtx:"text/richtext",scd:"application/x-msschedule",sct:"text/scriptlet",setpay:"application/set-payment-initiation",setreg:"application/set-registration-initiation",sgml:"text/sgml",sh:"application/x-sh",shar:"application/x-shar",sit:"application/x-stuffit",sldm:"application/vnd.ms-powerpoint.slide.macroEnabled.12",sldx:"application/vnd.openxmlformats-officedocument.presentationml.slide",smd:"audio/x-smd",smx:"audio/x-smd",smz:"audio/x-smd",snd:"audio/basic",spc:"application/x-pkcs7-certificates",spl:"application/futuresplash",src:"application/x-wais-source",ssm:"application/streamingmedia",sst:"application/vnd.ms-pki.certstore",stl:"application/vnd.ms-pki.stl",sv4cpio:"application/x-sv4cpio",sv4crc:"application/x-sv4crc",svg:"image/svg+xml",swf:"application/x-shockwave-flash",t:"application/x-troff",tar:"application/x-tar",tcl:"application/x-tcl",tex:"application/x-tex",texi:"application/x-texinfo",texinfo:"application/x-texinfo",tgz:"application/x-compressed",thmx:"application/vnd.ms-officetheme",tif:"image/tiff",tiff:"image/tiff",tr:"application/x-troff",trm:"application/x-msterminal",tsv:"text/tab-separated-values",txt:"text/plain",uls:"text/iuls",ustar:"application/x-ustar",vbs:"text/vbscript",vcf:"text/x-vcard",vcs:"text/plain",vdx:"application/vnd.ms-visio.viewer",vml:"text/xml",vsd:"application/vnd.visio",vss:"application/vnd.visio",vst:"application/vnd.visio",vsto:"application/x-ms-vsto",vsw:"application/vnd.visio",vsx:"application/vnd.visio",vtx:"application/vnd.visio",wav:"audio/wav",wax:"audio/x-ms-wax",wbmp:"image/vnd.wap.wbmp",wcm:"application/vnd.ms-works",wdb:"application/vnd.ms-works",wks:"application/vnd.ms-works",wm:"video/x-ms-wm",wma:"audio/x-ms-wma",wmd:"application/x-ms-wmd",wmf:"application/x-msmetafile",wml:"text/vnd.wap.wml",wmlc:"application/vnd.wap.wmlc",wmls:"text/vnd.wap.wmlscript",wmlsc:"application/vnd.wap.wmlscriptc",wmp:"video/x-ms-wmp",wmv:"video/x-ms-wmv",wmx:"video/x-ms-wmx",wmz:"application/x-ms-wmz",wps:"application/vnd.ms-works",wri:"application/x-mswrite",wrl:"x-world/x-vrml",wrz:"x-world/x-vrml",wsdl:"text/xml",wvx:"video/x-ms-wvx",x:"application/directx",xaf:"x-world/x-vrml",xaml:"application/xaml+xml",xap:"application/x-silverlight-app",xbap:"application/x-ms-xbap",xbm:"image/x-xbitmap",xdr:"text/plain",xht:"application/xhtml+xml",xhtml:"application/xhtml+xml",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroEnabled.12",xlc:"application/vnd.ms-excel",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroEnabled.12",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroEnabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",xml:"text/xml",xof:"x-world/x-vrml",xpm:"image/x-xpixmap",xps:"application/vnd.ms-xpsdocument",xsd:"text/xml",xsf:"text/xml",xsl:"text/xml",xslt:"text/xml",xwd:"image/x-xwindowdump",z:"application/x-compress",zip:"application/x-zip-compressed"},K=e=>{const t={};return e.replace(/^\?/,"").split("&").forEach(n=>{const[i,a]=n.split("=");i&&(t[decodeURIComponent(i)]=decodeURIComponent(a||""))}),t},be=(e,t)=>{const[n,i]=e.split("?"),l={...i?K(i):{},...t},u=z(l);return`${n}?${u}`},z=e=>{if(typeof e>"u"||typeof e!="object")return e;let t=[];for(let n in e)if(e.hasOwnProperty(n)){if(e[n]===null)continue;typeof e[n]=="object"&&e[n].length?e[n].forEach(i=>{t.push(encodeURI(n+"="+i))}):typeof e[n]=="object"||t.push(encodeURI(n+"="+e[n]))}return t.join("&")};class ye extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}const Me=(e,t={},n=0)=>{const i=new AbortController;let a=null;n&&(a=setTimeout(()=>i.abort(),n));const l=()=>{a!==null&&(clearTimeout(a),a=null)},u=s=>{const c=s,p=c.then.bind(c),ci=c.catch.bind(c),si=c.finally.bind(c);return c.then=function(A,pi){return u(p(A,pi))},c.catch=function(A){return u(ci(A))},c.finally=function(A){return u(si(A))},c.abort=A=>{l(),i.abort(new ye(A||"request aborted."))},c},r=fetch(e,{...t,signal:i.signal}).then(s=>(l(),s)).catch(s=>{throw l(),s});return u(r)},Cn=(e,t,n)=>{if(t==null)return;const i=e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase();n.set(i,String(t))},On=e=>["method","headers","body","mode","credentials","cache","redirect","referrer","referrerPolicy","integrity","keepalive","signal","window"].includes(e),D=(e,t=null,n)=>{let{timeout:i,...a}=n;a=a||{},a.method=a.method||"GET";const l=a.method.toUpperCase()==="GET",u=new Headers(a.headers||{});for(let r in a)On(r)||Cn(r,a[r],u);return l&&t&&(e=be(e,typeof t=="string"?K(t):t),t=null),Me(e,{headers:u,body:l?void 0:Dn(t,u.get("content-type")||void 0),...a},i).then(r=>{if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return r})},ve=e=>typeof e=="string"||e instanceof FormData||e instanceof URLSearchParams||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e),Dn=(e,t)=>{if(ve(e)||typeof e!="object")return e;switch(t==null?void 0:t.toLowerCase()){case y:return JSON.stringify(e);case Te:case Ae:default:return z(e)}},xn=(e,t=null,n={})=>D(e,t,{...n,ContentType:y,Accept:y}).then(i=>i.json()),Rn=(e,t=null,n={})=>D(e,t,{...n,method:"POST",ContentType:y,Accept:y}).then(i=>i.json()),In=(e,t,n=null,i={})=>{const a=new FormData;if(Object.keys(t).forEach(l=>{a.append(l,t[l],t[l].name)}),n)for(let l in n)n.hasOwnProperty(l)&&a.append(l,n[l]);return D(e,a,{...i,method:"POST"}).then(l=>l.json())};function J(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array)return e.map(t=>J(t));if(e instanceof Object){const t={};for(const n in e)e.hasOwnProperty(n)&&(t[n]=J(e[n]));return t}return e}function Hn(e){return Object.keys(e).length===0}const kn=(e,t)=>{let n={};for(let i in e)t[i]!==void 0?n[t[i]]=e[i]:n[i]=e[i];return n};function Ln(e,t,n){const i=t.split(".");let a=e;for(const l of i){if(a==null)return n;a=a[l]}return a!==void 0?a:n}function Fn(e,t,n){const i=t.split("."),a=i.pop();let l=e;for(const u of i)(!(u in l)||typeof l[u]!="object")&&(l[u]={}),l=l[u];l[a]=n}function _e(e,...t){for(const n of t)for(const i in n)if(n.hasOwnProperty(i)){const a=n[i],l=e[i];a&&typeof a=="object"&&!Array.isArray(a)&&l&&typeof l=="object"&&!Array.isArray(l)?e[i]=_e(l,a):e[i]=a}return e}const Se=(e,t=!1)=>{for(const n in e)e[n]===null?delete e[n]:t&&typeof e[n]=="object"&&Se(e[n],!0);return e},Pn=new Date().getFullYear(),Un=new Date().getMonth()+1,Yn=new Date().getDate(),Bn=60*1e3,$n=60*60*1e3,M=24*60*60*1e3,qn=7*M,jn=30*M,Gn=31*M,Wn=365*M,Kn=366*M,zn=0,Jn=1,Vn=2,Qn=3,Xn=4,Zn=5,ei=6,Ne=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ce=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Oe=["January","February","March","April","May","June","July","August","September","October","November","December"],De=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ti=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],ni=["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],ii=["日","一","二","三","四","五","六"],ai=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],oi=(e,t,n)=>{let i=()=>{if(t&&t(e),e-- >0){setTimeout(i,1e3);return}n&&n()};i()},ri=e=>{if(!e||e<10)return"刚刚";e=Math.floor(e/1e3);const t=Math.floor(e/3600),n=Math.floor(e%3600/60),i=e%60;let a="";return t>0&&(a+=t+"小时"),(n>0||t>0)&&(a+=n+"分钟"),a+=i+"秒前",a},xe={d:e=>{let t=e.getDate();return(t<10?"0":"")+t},D:e=>Ce[e.getDay()],j:e=>e.getDate(),l:e=>Ne[e.getDay()],N:e=>{let t=e.getDay();return t===0?7:t},S:e=>{let t=e.getDate();return t%10===1&&t!==11?"st":t%10===2&&t!==12?"nd":t%10===3&&t!==13?"rd":"th"},w:e=>e.getDay(),z:e=>{let t=new Date(e.getFullYear(),0,1);return Math.ceil((e.getTime()-t.getTime())/864e5)},W:e=>{let t=new Date(e.valueOf()),n=(e.getDay()+6)%7;t.setDate(t.getDate()-n+3);let i=t.valueOf();t.setMonth(0,1),t.getDay()!==4&&t.setMonth(0,1+(4-t.getDay()+7)%7);let a=1+Math.ceil((i-t.getTime())/6048e5);return a<10?"0"+a:a},F:e=>Oe[e.getMonth()],m:e=>{let t=e.getMonth();return(t<9?"0":"")+(t+1)},M:e=>De[e.getMonth()],n:e=>e.getMonth()+1,t:e=>{let t=e.getFullYear(),n=e.getMonth()+1;return n===12&&(t=t++,n=0),new Date(t,n,0).getDate()},L:e=>{let t=e.getFullYear();return t%400===0||t%100!==0&&t%4===0},o:e=>{let t=new Date(e.valueOf());return t.setDate(t.getDate()-(e.getDay()+6)%7+3),t.getFullYear()},Y:e=>e.getFullYear(),y:e=>(""+e.getFullYear()).substr(2),a:e=>e.getHours()<12?"am":"pm",A:e=>e.getHours()<12?"AM":"PM",B:e=>Math.floor(((e.getUTCHours()+1)%24+e.getUTCMinutes()/60+e.getUTCSeconds()/3600)*1e3/24),g:e=>e.getHours()%12||12,G:e=>e.getHours(),h:e=>{let t=e.getHours();return((t%12||12)<10?"0":"")+(t%12||12)},H:e=>{let t=e.getHours();return(t<10?"0":"")+t},i:e=>{let t=e.getMinutes();return(t<10?"0":"")+t},s:e=>{let t=e.getSeconds();return(t<10?"0":"")+t},v:e=>{let t=e.getMilliseconds();return(t<10?"00":t<100?"0":"")+t},e:e=>Intl.DateTimeFormat().resolvedOptions().timeZone,I:e=>{let t=null;for(let n=0;n<12;++n){let a=new Date(e.getFullYear(),n,1).getTimezoneOffset();if(t===null)t=a;else if(a<t){t=a;break}else if(a>t)break}return e.getTimezoneOffset()===t?1:0},O:e=>{let t=e.getTimezoneOffset();return(-t<0?"-":"+")+(Math.abs(t/60)<10?"0":"")+Math.floor(Math.abs(t/60))+(Math.abs(t%60)===0?"00":(Math.abs(t%60)<10?"0":"")+Math.abs(t%60))},P:e=>{let t=e.getTimezoneOffset();return(-t<0?"-":"+")+(Math.abs(t/60)<10?"0":"")+Math.floor(Math.abs(t/60))+":"+(Math.abs(t%60)===0?"00":(Math.abs(t%60)<10?"0":"")+Math.abs(t%60))},T:e=>{let t=e.toLocaleTimeString(navigator.language,{timeZoneName:"short"}).split(" ");return t[t.length-1]},Z:e=>-e.getTimezoneOffset()*60,c:e=>V("Y-m-d\\TH:i:sP",e),r:e=>e.toString(),U:e=>Math.floor(e.getTime()/1e3)},V=function(e,t=null){let n=null;return typeof t=="object"&&t!==null?n=t:n=new Date(t||Date.now()),e.replace(/(\\?)(.)/g,function(i,a,l){return a===""&&xe[l]?String(xe[l](n)):l})},li=e=>V("W",e);o.AbortError=ye,o.BLOCK_TAGS=q,o.Base64Encode=et,o.DATE_NOW=Yn,o.DAY_FRIDAY=Zn,o.DAY_MONDAY=Jn,o.DAY_SATURDAY=ei,o.DAY_SUNDAY=zn,o.DAY_THURSDAY=Xn,o.DAY_TUESDAY=Vn,o.DAY_WEDNESDAY=Qn,o.GOLDEN_RATIO=wt,o.MIME_BINARY_DEFAULT=vn,o.MIME_EXTENSION_MAP=Nn,o.MIME_FORM=Te,o.MIME_HTML=Sn,o.MIME_JSON=y,o.MIME_MULTIPART=Ae,o.MIME_TEXT=_n,o.MONTH_NAMES_CN=ti,o.MONTH_NAMES_EN=Oe,o.MONTH_NAMES_SHORT_CN=ni,o.MONTH_NAMES_SHORT_EN=De,o.MONTH_NOW=Un,o.ONE_DAY=M,o.ONE_HOUR=$n,o.ONE_MINUTE=Bn,o.ONE_MONTH30=jn,o.ONE_MONTH31=Gn,o.ONE_WEEK=qn,o.ONE_YEAR365=Wn,o.ONE_YEAR366=Kn,o.PAIR_TAGS=an,o.REMOVABLE_TAGS=fe,o.SELF_CLOSING_TAGS=on,o.STAND_DPI=H,o.TRIM_BOTH=R,o.TRIM_LEFT=I,o.TRIM_RIGHT=ee,o.WEEK_DAY_NAMES_CN=ai,o.WEEK_DAY_NAMES_EN=Ne,o.WEEK_DAY_NAMES_SHORT_CN=ii,o.WEEK_DAY_NAMES_SHORT_EN=Ce,o.YEAR_NOW=Pn,o.abortableFetch=Me,o.arrayChunk=Le,o.arrayColumn=v,o.arrayDistinct=Ie,o.arrayGroup=He,o.arrayIndex=Re,o.arraySortByKey=ke,o.arrayTrimTail=Fe,o.base64Decode=Xe,o.base64UrlSafeEncode=Ze,o.between=g,o.blobToBase64=te,o.blobToDataUri=B,o.buildHtmlHidden=un,o.buildStyleVars=Kt,o.camelCase=$e,o.capitalize=Q,o.cleanNull=Se,o.countDown=oi,o.createDomByHtml=Wt,o.cssSelectorEscape=cn,o.cutString=Ye,o.debounce=ut,o.decodeHTMLEntities=pn,o.deepClone=J,o.deleteCookie=N,o.deleteCookieAllPaths=lt,o.detectLanguage=it,o.detectedPrecision=Nt,o.digitCount=Ct,o.disabled=le,o.dispatchEvent=Zt,o.downloadFile=nn,o.enabled=ce,o.enterFullScreen=ne,o.entityToString=sn,o.escapeAttr=j,o.escapeHtml=me,o.exitFullScreen=ie,o.extract=Be,o.fileToBase64DataUri=tn,o.findAll=F,o.findOne=b,o.fixBaseUrl=Gt,o.floatVal=Pe,o.formatDate=V,o.getBoundingClientRect=ue,o.getCookie=rt,o.getDomDimension=$t,o.getJson=xn,o.getNodeXPath=kt,o.getUTF8StrLen=Ge,o.getWeekNumber=li,o.guid=oe,o.hide=Ot,o.highlightText=hn,o.html2Text=rn,o.imgToBase64=gn,o.insertStyleSheet=pe,o.isBodyInit=ve,o.isChinese=Qe,o.isEmptyObject=Hn,o.isFirefox=at,o.isFocusable=Ut,o.isFunction=ht,o.isInFullScreen=ae,o.isJSON=gt,o.isJson=ft,o.isObject=mt,o.isPromise=dt,o.isUrl=re,o.kebabCase=qe,o.keepRectInContainer=Ft,o.limit=vt,o.loadCss=Yt,o.loadScript=Bt,o.lockElementInteraction=It,o.markdown2Html=fn,o.md5=Mn,o.mmToPt=bt,o.mmToPx=Tt,o.mmToTwip=At,o.msToHMS=ri,o.mutationEffective=se,o.nodeIndex=Ht,o.objToQuery=z,o.objectGet=Ln,o.objectKeyMapping=kn,o.objectMerge=_e,o.objectSet=Fn,o.offEvent=Xt,o.onDomTreeChange=Lt,o.onEvent=Qt,o.onHover=Rt,o.postFiles=In,o.postJson=Rn,o.precisionToStep=jt,o.printStack=Et,o.ptToMm=yt,o.pxToMm=Mt,o.queryReplace=be,o.queryToObj=K,o.randomInt=_t,o.randomString=Z,o.randomWords=Ke,o.rectAssoc=Pt,o.rectInLayout=qt,o.regQuote=S,o.remove=xt,o.request=D,o.round=St,o.sanitizeFileName=en,o.setCookie=ot,o.show=Dt,o.srcToBase64=En,o.strChunk=Ve,o.strToPascalCase=ze,o.stringToEntity=mn,o.stripSlashes=Ue,o.text2Html=ln,o.throttle=st,o.throttleEffect=pt,o.toggleDisabled=L,o.toggleFullScreen=nt,o.trim=Je,o.truncate=je,o.unescapeHtml=dn,o.urlB64DataCache=$,o.utf8Decode=X,o.utf8Encode=x,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
|
|
6
6
|
//# sourceMappingURL=minutool.umd.cjs.map
|