sculp-js 1.18.2 → 1.19.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.
- package/README.md +83 -6
- package/dist/cjs/{array.js → array.cjs} +10 -2
- package/dist/cjs/{async.js → async.cjs} +8 -2
- package/dist/cjs/{base64.js → base64.cjs} +11 -4
- package/dist/cjs/{clipboard.js → clipboard.cjs} +9 -4
- package/dist/cjs/{cloneDeep.js → cloneDeep.cjs} +6 -2
- package/dist/cjs/{cookie.js → cookie.cjs} +9 -3
- package/dist/cjs/{date.js → date.cjs} +13 -3
- package/dist/cjs/{dom.js → dom.cjs} +16 -5
- package/dist/cjs/{download.js → download.cjs} +12 -4
- package/dist/cjs/{file.js → file.cjs} +9 -3
- package/dist/cjs/{func.js → func.cjs} +10 -2
- package/dist/cjs/{index.js → index.cjs} +63 -31
- package/dist/cjs/{isEqual.js → isEqual.cjs} +6 -2
- package/dist/cjs/{math.js → math.cjs} +10 -2
- package/dist/cjs/{number.js → number.cjs} +16 -7
- package/dist/cjs/{object.js → object.cjs} +19 -5
- package/dist/cjs/{path.js → path.cjs} +7 -2
- package/dist/cjs/{qs.js → qs.cjs} +9 -4
- package/dist/cjs/{random.js → random.cjs} +11 -4
- package/dist/cjs/{string.js → string.cjs} +15 -2
- package/dist/cjs/{tooltip.js → tooltip.cjs} +8 -4
- package/dist/cjs/{tree.js → tree.cjs} +15 -4
- package/dist/cjs/{type.js → type.cjs} +27 -2
- package/dist/cjs/{unicodeToolkit.js → unicodeToolkit.cjs} +6 -2
- package/dist/cjs/{unique.js → unique.cjs} +11 -5
- package/dist/cjs/{url.js → url.cjs} +12 -5
- package/dist/cjs/{validator.js → validator.cjs} +21 -2
- package/dist/cjs/{variable.js → variable.cjs} +11 -3
- package/dist/cjs/{watermark.js → watermark.cjs} +7 -3
- package/dist/esm/{array.js → array.mjs} +9 -2
- package/dist/esm/{async.js → async.mjs} +7 -2
- package/dist/esm/{base64.js → base64.mjs} +10 -4
- package/dist/esm/{clipboard.js → clipboard.mjs} +8 -4
- package/dist/esm/{cloneDeep.js → cloneDeep.mjs} +5 -2
- package/dist/esm/{cookie.js → cookie.mjs} +8 -3
- package/dist/esm/{date.js → date.mjs} +21 -3
- package/dist/esm/{dom.js → dom.mjs} +25 -5
- package/dist/esm/{download.js → download.mjs} +11 -4
- package/dist/esm/{file.js → file.mjs} +8 -3
- package/dist/esm/{func.js → func.mjs} +9 -2
- package/dist/esm/index.mjs +191 -0
- package/dist/esm/{isEqual.js → isEqual.mjs} +5 -2
- package/dist/esm/{math.js → math.mjs} +9 -2
- package/dist/esm/{number.js → number.mjs} +23 -7
- package/dist/esm/{object.js → object.mjs} +16 -2
- package/dist/esm/{path.js → path.mjs} +6 -2
- package/dist/esm/{qs.js → qs.mjs} +8 -4
- package/dist/esm/{random.js → random.mjs} +10 -4
- package/dist/esm/{string.js → string.mjs} +14 -1
- package/dist/esm/{tooltip.js → tooltip.mjs} +7 -4
- package/dist/esm/{tree.js → tree.mjs} +24 -4
- package/dist/esm/{type.js → type.mjs} +27 -2
- package/dist/esm/{unicodeToolkit.js → unicodeToolkit.mjs} +5 -2
- package/dist/esm/{unique.js → unique.mjs} +10 -5
- package/dist/esm/{url.js → url.mjs} +11 -5
- package/dist/esm/{validator.js → validator.mjs} +20 -1
- package/dist/esm/{variable.js → variable.mjs} +10 -3
- package/dist/esm/{watermark.js → watermark.mjs} +6 -3
- package/dist/types/array.d.ts +8 -0
- package/dist/types/async.d.ts +6 -0
- package/dist/types/base64.d.ts +7 -0
- package/dist/types/clipboard.d.ts +5 -1
- package/dist/types/cloneDeep.d.ts +4 -0
- package/dist/types/cookie.d.ts +6 -0
- package/dist/types/date.d.ts +10 -0
- package/dist/types/dom.d.ts +11 -0
- package/dist/types/download.d.ts +8 -1
- package/dist/types/file.d.ts +6 -1
- package/dist/types/func.d.ts +8 -0
- package/dist/types/isEqual.d.ts +4 -0
- package/dist/types/math.d.ts +8 -1
- package/dist/types/number.d.ts +11 -2
- package/dist/types/object.d.ts +13 -0
- package/dist/types/path.d.ts +5 -0
- package/dist/types/qs.d.ts +5 -0
- package/dist/types/random.d.ts +7 -0
- package/dist/types/string.d.ts +13 -0
- package/dist/types/tooltip.d.ts +7 -0
- package/dist/types/tree.d.ts +11 -0
- package/dist/types/type.d.ts +29 -4
- package/dist/types/unicodeToolkit.d.ts +4 -0
- package/dist/types/unique.d.ts +6 -0
- package/dist/types/url.d.ts +7 -0
- package/dist/types/validator.d.ts +19 -0
- package/dist/types/variable.d.ts +8 -0
- package/dist/types/watermark.d.ts +4 -0
- package/dist/umd/index.min.js +2 -2
- package/package.json +92 -120
- package/dist/esm/index.js +0 -130
- package/dist/types/index.d.ts +0 -28
package/dist/umd/index.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* sculp-js v1.
|
|
2
|
+
* sculp-js v1.19.0
|
|
3
3
|
* (c) 2023-present chandq
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).sculpJs={})}(this,(function(e){"use strict";function t(e,t,n=!1){if(n)for(let n=e.length-1;n>=0;n--){const r=t(e[n],n,e);if(!1===r)break}else for(let n=0,r=e.length;n<r;n++){const r=t(e[n],n,e);if(!1===r)break}e=null}const{toString:n,hasOwnProperty:r}=Object.prototype;function o(e,t){return r.call(e,t)}function i(e){return!!p(e)||(!!a(e)||!!h(e)&&o(e,"length"))}function s(e){return n.call(e).slice(8,-1)}const a=e=>"string"==typeof e,c=e=>"boolean"==typeof e,l=e=>"number"==typeof e&&!Number.isNaN(e),u=e=>void 0===e,d=e=>null===e;function f(e){return u(e)||d(e)}const h=e=>"Object"===s(e),p=e=>Array.isArray(e),g=e=>"function"==typeof e,m=e=>Number.isNaN(e),y=e=>"Date"===s(e);function b(e){return!u(NodeList)&&NodeList.prototype.isPrototypeOf(e)}const w=e=>{if(!h(e))return!1;const t=Object.getPrototypeOf(e);return!t||t===Object.prototype};function S(e,t){for(const n in e)if(o(e,n)&&!1===t(e[n],n))break;e=null}function x(e,t){const n={};return S(e,((e,r)=>{t.includes(r)||(n[r]=e)})),e=null,n}const A=(e,t,n)=>{if(u(n))return t;if(s(t)!==s(n))return p(n)?A(e,[],n):h(n)?A(e,{},n):n;if(w(n)){const r=e.get(n);return r||(e.set(n,t),S(n,((n,r)=>{t[r]=A(e,t[r],n)})),t)}if(p(n)){const r=e.get(n);return r||(e.set(n,t),n.forEach(((n,r)=>{t[r]=A(e,t[r],n)})),t)}return n};function E(e,...t){const n=new Map;for(let r=0,o=t.length;r<o;r++){const o=t[r];e=A(n,e,o)}return n.clear(),e}function v(e,t="-"){return e.replace(/^./,(e=>e.toLowerCase())).replace(/[A-Z]/g,(e=>`${t}${e.toLowerCase()}`))}const F="0123456789",C="abcdefghijklmnopqrstuvwxyz",T="ABCDEFGHIJKLMNOPQRSTUVWXYZ",$=/%[%sdo]/g;const R=/\${(.*?)}/g;const N=(e,t)=>{e.split(/\s+/g).forEach(t)};const I=(e,t,n)=>{h(t)?S(t,((t,n)=>{I(e,n,t)})):e.style.setProperty(v(t),n)};function D(e,t=14,n=!0){let r=0;if(console.assert(a(e),`${e} 不是有效的字符串`),a(e)&&e.length>0){const o="getStrWidth1494304949567";let i=document.querySelector(`#${o}`);if(!i){const n=document.createElement("span");n.id=o,n.style.fontSize=t+"px",n.style.whiteSpace="nowrap",n.style.visibility="hidden",n.style.position="absolute",n.style.top="-9999px",n.style.left="-9999px",n.textContent=e,document.body.appendChild(n),i=n}i.textContent=e,r=i.offsetWidth,n&&i.remove()}return r}function j(e){let t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){const n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();const n=window.getSelection(),r=document.createRange();r.selectNodeContents(e),n.removeAllRanges(),n.addRange(r),t=n.toString()}return t}function M(e,t){const{successCallback:n,failCallback:r,container:o=document.body}=f(t)?{}:t;let i=function(e){const t="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";const r=window.pageYOffset||document.documentElement.scrollTop;return n.style.top=`${r}px`,n.setAttribute("readonly",""),n.value=e,n}(e);o.appendChild(i),j(i);try{document.execCommand("copy")&&g(n)&&n()}catch(e){g(r)&&r(e)}finally{o.removeChild(i),i=null,window.getSelection()?.removeAllRanges()}}function P(e,t,n){const r=[],o="expires";if(r.push([e,encodeURIComponent(t)]),l(n)){const e=new Date;e.setTime(e.getTime()+n),r.push([o,e.toUTCString()])}else y(n)&&r.push([o,n.toUTCString()]);r.push(["path","/"]),document.cookie=r.map((e=>{const[t,n]=e;return`${t}=${n}`})).join(";")}const k=e=>y(e)&&!m(e.getTime()),L=e=>{if(!a(e))return;const t=e.replace(/-/g,"/");return new Date(t)},O=e=>{if(!a(e))return;const t=/([+-])(\d\d)(\d\d)$/,n=t.exec(e);if(!n)return;const r=e.replace(t,"Z"),o=new Date(r);if(!k(o))return;const[,i,s,c]=n,l=parseInt(s,10),u=parseInt(c,10),d=(e,t)=>"+"===i?e-t:e+t;return o.setHours(d(o.getHours(),l)),o.setMinutes(d(o.getMinutes(),u)),o};function B(e){const t=new Date(e);if(k(t))return t;const n=L(e);if(k(n))return n;const r=O(e);if(k(r))return r;throw new SyntaxError(`${e.toString()} 不是一个合法的日期描述`)}function U(e){const t=B(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)}const H=e=>{const t=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/").replace(/\.{3,}/g,"..").replace(/\/\.\//g,"/").split("/").map((e=>e.trim())),n=e=>".."===e,r=[];let o=!1;const i=e=>{r.push(e)};return t.forEach((e=>{const t=(e=>"."===e)(e),s=n(e);return o?t?void 0:s?(()=>{if(0===r.length)return;const e=r[r.length-1];n(e)?r.push(".."):r.pop()})():void i(e):(i(e),void(o=!t&&!s))})),r.join("/")},z=(e,...t)=>H([e,...t].join("/"));function W(e){const t=new URLSearchParams(e),n={};for(const[e,r]of t.entries())u(n[e])?n[e]=r:p(n[e])||(n[e]=t.getAll(e));return n}const _=e=>a(e)?e:l(e)?String(e):c(e)?e?"true":"false":y(e)?e.toISOString():null;function q(e,t=_){const n=new URLSearchParams;return S(e,((e,r)=>{if(p(e))e.forEach((e=>{const o=t(e);null!==o&&n.append(r.toString(),o)}));else{const o=t(e);if(null===o)return;n.set(r.toString(),o)}})),n.toString()}const Y=(e,t=!0)=>{let n=null;g(URL)&&t?n=new URL(e):(n=document.createElement("a"),n.href=e);const{protocol:r,username:o,password:i,host:s,port:a,hostname:c,hash:l,search:u,pathname:d}=n,f=z("/",d),h=o&&i?`${o}:${i}`:"",p=u.replace(/^\?/,"");return n=null,{protocol:r,auth:h,username:o,password:i,host:s,port:a,hostname:c,hash:l,search:u,searchParams:W(p),query:p,pathname:f,path:`${f}${u}`,href:e}},G=e=>{const{protocol:t,auth:n,host:r,pathname:o,searchParams:i,hash:s}=e,a=n?`${n}@`:"",c=q(i),l=c?`?${c}`:"";let u=s.replace(/^#/,"");return u=u?"#"+u:"",`${t}//${a}${r}${o}${l}${u}`},V=(e,t)=>{const n=Y(e);return Object.assign(n.searchParams,t),G(n)};function X(e,t,n){let r=document.createElement("a");r.download=t,r.style.display="none",r.href=e,document.body.appendChild(r),r.click(),setTimeout((()=>{document.body.removeChild(r),r=null,g(n)&&n()}))}function K(e,t,n){const r=URL.createObjectURL(e);X(r,t),setTimeout((()=>{URL.revokeObjectURL(r),g(n)&&n()}))}function J(){return!!document.createElement("canvas").getContext}function Z({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r}){let o=n,i=r;return(n>e||r>t)&&(n/r>e/t?(o=e,i=Math.round(e*(r/n))):(i=t,o=Math.round(t*(n/r)))),{width:o,height:i}}function Q(e){return"undefined"!=typeof globalThis?globalThis[e]:"undefined"!=typeof window?window[e]:"undefined"!=typeof global?global[e]:"undefined"!=typeof self?self[e]:void 0}const ee=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),te=`${F}${T}${C}`;const ne=`${F}${T}${C}`,re="undefined"!=typeof BigInt,oe=()=>Q("JSBI"),ie=e=>re?BigInt(e):oe().BigInt(e);function se(e,t=ne){if(t.length<2)throw new Error("进制池长度不能少于 2");if(!re)throw new Error('需要安装 jsbi 模块并将 JSBI 设置为全局变量:\nimport JSBI from "jsbi"; window.JSBI = JSBI;');let n=ie(e);const r=[],{length:o}=t,i=ie(o),s=()=>{const e=Number(((e,t)=>re?e%t:oe().remainder(e,t))(n,i));n=((e,t)=>re?e/t:oe().divide(e,t))(n,i),r.unshift(t[e]),n>0&&s()};return s(),r.join("")}const ae=(e,t,n={ratio:1e3,decimals:0,separator:" "})=>{const{ratio:r=1e3,decimals:o=0,separator:i=" "}=n,{length:s}=t;if(0===s)throw new Error("At least one unit is required");let a=Number(e),c=0;for(;a>=r&&c<s-1;)a/=r,c++;const l=a.toFixed(o),u=t[c];return String(l)+i+u};function ce(e,t){if(f(t))return parseInt(String(e)).toLocaleString();let n=0;return t>0&&(n=t),Number(Number(e).toFixed(n)).toLocaleString("en-US")}let le=0,ue=0;const de=(e=18)=>{const t=Date.now();e=Math.max(e,18),t!==ue&&(ue=t,le=0);const n=`${t}`;let r="";const o=e-5-13;if(o>0){r=`${ee(10**(o-1),10**o-1)}`}const i=((e,t=2)=>String(e).padStart(t,"0"))(le,5);return le++,`${n}${r}${i}`},fe=e=>e[ee(0,e.length-1)];function he(e,t,n){let r=250,o=13;const i=e.children[0];D(t,12)<230?(i.style.maxWidth=D(t,12)+20+50+"px",r=n.clientX+(D(t,12)+50)-document.body.offsetWidth):(i.style.maxWidth="250px",r=n.clientX+230-document.body.offsetWidth),i.innerHTML=t,r>0&&(o-=r),e.style.top=n.clientY+23+"px",e.style.left=n.clientX+o+"px",e.style.maxWidth="250px";const s=e.getBoundingClientRect().top+i.offsetHeight-document.body.offsetHeight;s>0&&(e.style.top=n.clientY-s+"px")}const pe={handleMouseEnter:function({rootContainer:e="#root",title:t,event:n,bgColor:r="#000",color:o="#fff"}){try{const i=a(e)?document.querySelector(e):e;if(!i)throw new Error(`${e} is not valid Html Element or element selector`);let s=null;const c="style-tooltip-inner1494304949567";if(!document.querySelector(`#${c}`)){const e=document.createElement("style");e.type="text/css",e.id=c,e.innerHTML=`\n .tooltip-inner1494304949567 {\n max-width: 250px;\n padding: 3px 8px;\n color: ${o};\n text-decoration: none;\n border-radius: 4px;\n text-align: left;\n background-color: ${r};\n }\n `,document.querySelector("head").appendChild(e)}if(s=document.querySelector("#customTitle1494304949567"),s)he(s,t,n);else{const e=document.createElement("div");e.id="customTitle1494304949567",e.style.cssText="z-index: 99999999; visibility: hidden; position: absolute;",e.innerHTML='<div class="tooltip-inner1494304949567" style="word-wrap: break-word; max-width: 44px;">皮肤</div>',i.appendChild(e),s=document.querySelector("#customTitle1494304949567"),t&&(he(s,t,n),s.style.visibility="visible")}}catch(e){console.error(e.message)}},handleMouseLeave:function(e="#root"){const t=a(e)?document.querySelector(e):e;let n=document.querySelector("#customTitle1494304949567");t&&n&&(t.removeChild(n),n=null)}},ge={keyField:"key",childField:"children",pidField:"pid"},me={childField:"children",nameField:"name",removeEmptyChild:!1,ignoreCase:!0};function ye(e,t,n={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){const{childField:r="children",reverse:o=!1,breadthFirst:i=!1,isDomNode:s=!1}=h(n)?n:{};let a=!1;const c=[],l=(n,o,u=0)=>{for(let d=n.length-1;d>=0&&!a;d--){const f=n[d];if(i)c.push({item:f,index:d,array:n,tree:e,parent:o,level:u});else{const i=t(f,d,n,e,o,u);if(!1===i){a=!0;break}if(!0===i)continue;f&&(s?b(f[r]):Array.isArray(f[r]))&&l(f[r],f,u+1)}}if(i)for(;c.length>0&&!a;){const e=c.shift(),{item:n,index:o,array:i,tree:u,parent:d,level:f}=e,h=t(n,o,i,u,d,f);if(!1===h){a=!0;break}!0!==h&&(n&&(s?b(n[r]):Array.isArray(n[r]))&&l(n[r],n,f+1))}},u=(n,o,l=0)=>{for(let d=0,f=n.length;d<f&&!a;d++){const f=n[d];if(i)c.push({item:f,index:d,array:n,tree:e,parent:o,level:l});else{const i=t(f,d,n,e,o,l);if(!1===i){a=!0;break}if(!0===i)continue;f&&(s?b(f[r]):Array.isArray(f[r]))&&u(f[r],f,l+1)}}if(i)for(;c.length>0&&!a;){const e=c.shift();if(!e)break;const{item:n,index:o,array:i,tree:l,parent:d,level:f}=e,h=t(n,o,i,l,d,f);if(!1===h){a=!0;break}!0!==h&&(n&&(s?b(n[r]):Array.isArray(n[r]))&&u(n[r],n,f+1))}};o?l(e,null,0):u(e,null,0),e=null}const be=(e,t)=>{let n=0;const r=e.toString(),o=t.toString();return void 0!==r.split(".")[1]&&(n+=r.split(".")[1].length),void 0!==o.split(".")[1]&&(n+=o.split(".")[1].length),Number(r.replace(".",""))*Number(o.replace(".",""))/Math.pow(10,n)},we=(e,t)=>{let n=0,r=0,o=0;try{n=e.toString().split(".")[1].length}catch(e){n=0}try{r=t.toString().split(".")[1].length}catch(e){r=0}return o=10**Math.max(n,r),(be(e,o)+be(t,o))/o};const Se="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",xe=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;function Ae(e){let t,n,r,o,i="",s=0;const a=(e=String(e)).length,c=a%3;for(;s<a;){if((n=e.charCodeAt(s++))>255||(r=e.charCodeAt(s++))>255||(o=e.charCodeAt(s++))>255)throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");t=n<<16|r<<8|o,i+=Se.charAt(t>>18&63)+Se.charAt(t>>12&63)+Se.charAt(t>>6&63)+Se.charAt(63&t)}return c?i.slice(0,c-3)+"===".substring(c):i}function Ee(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!xe.test(e))throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");let t,n,r,o="",i=0;for(const s=(e+="==".slice(2-(3&e.length))).length;i<s;)t=Se.indexOf(e.charAt(i++))<<18|Se.indexOf(e.charAt(i++))<<12|(n=Se.indexOf(e.charAt(i++)))<<6|(r=Se.indexOf(e.charAt(i++))),o+=64===n?String.fromCharCode(t>>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return o}const ve=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,Fe=/^(?:(?:\+|00)86)?1\d{10}$/,Ce=/^(1[1-5]|2[1-3]|3[1-7]|4[1-6]|5[0-4]|6[1-5]|7[1]|8[1-2]|9[1])\d{4}(18|19|20)\d{2}[01]\d[0123]\d{4}[\dxX]$/,Te=/^(https?|ftp):\/\/([^\s/$.?#].[^\s]*)$/i,$e=/^https?:\/\/([^\s/$.?#].[^\s]*)$/i,Re=/^(?:(?:\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])$/,Ne=/^(([\da-fA-F]{1,4}:){7}[\da-fA-F]{1,4}|([\da-fA-F]{1,4}:){1,7}:|([\da-fA-F]{1,4}:){1,6}:[\da-fA-F]{1,4}|([\da-fA-F]{1,4}:){1,5}(:[\da-fA-F]{1,4}){1,2}|([\da-fA-F]{1,4}:){1,4}(:[\da-fA-F]{1,4}){1,3}|([\da-fA-F]{1,4}:){1,3}(:[\da-fA-F]{1,4}){1,4}|([\da-fA-F]{1,4}:){1,2}(:[\da-fA-F]{1,4}){1,5}|[\da-fA-F]{1,4}:((:[\da-fA-F]{1,4}){1,6})|:((:[\da-fA-F]{1,4}){1,7}|:)|fe80:(:[\da-fA-F]{0,4}){0,4}%[\da-zA-Z]+|::(ffff(:0{1,4})?:)?((25[0-5]|(2[0-4]|1?\d)?\d)\.){3}(25[0-5]|(2[0-4]|1?\d)?\d)|([\da-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1?\d)?\d)\.){3}(25[0-5]|(2[0-4]|1?\d)?\d))$/i,Ie=/^(-?[1-9]\d*|0)$/,De=e=>Ie.test(e),je=/^-?([1-9]\d*|0)\.\d*[1-9]$/,Me=e=>je.test(e),Pe=/^\d+$/;function ke(e){return[...new Set(e.trim().split(""))].join("")}function Le(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Oe(e,t){return new RegExp(`${Le(e.trim())}\\s*([^${Le(ke(e))}${Le(ke(t))}\\s]*)\\s*${t.trim()}`,"g")}const Be={MAP:"[object Map]",SET:"[object Set]",DATE:"[object Date]",REGEXP:"[object RegExp]",SYMBOL:"[object Symbol]",ARRAY_BUFFER:"[object ArrayBuffer]",DATA_VIEW:"[object DataView]",ARGUMENTS:"[object Arguments]"},{toString:Ue,hasOwnProperty:He}=Object.prototype,ze=e=>Ue.call(e);function We(e,t,n=void 0){if(e===t)return!0;if(e!=e&&t!=t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e.constructor!==t.constructor)return!1;if(n||(n=new WeakMap),n.has(e))return n.get(e)===t;n.set(e,t);const r=ze(e);if(r!==ze(t))return!1;let o=!1;switch(r){case Be.DATE:o=+e==+t;break;case Be.REGEXP:o=""+e==""+t;break;case Be.SYMBOL:o=Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t);break;case Be.ARRAY_BUFFER:o=_e(e,t);break;case Be.DATA_VIEW:s=t,o=(i=e).byteLength===s.byteLength&&i.byteOffset===s.byteOffset&&_e(i.buffer,s.buffer);break;case Be.MAP:o=function(e,t,n){if(e.size!==t.size)return!1;for(const[r,o]of e){const e=t.get(r);if(void 0===e&&!t.has(r))return!1;if(!We(o,e,n))return!1}return!0}(e,t,n);break;case Be.SET:o=function(e,t,n){if(e.size!==t.size)return!1;for(const r of e){if(t.has(r))continue;let e=!1;for(const o of t)if(We(r,o,n)){e=!0;break}if(!e)return!1}return!0}(e,t,n);break;case Be.ARGUMENTS:default:o=Array.isArray(e)||ArrayBuffer.isView(e)?function(e,t,n){const r=e.length;if(r!==t.length)return!1;let o=r;for(;o--;)if(!We(e[o],t[o],n))return!1;return!0}(e,t,n):function(e,t,n){const r=Reflect.ownKeys(e),o=Reflect.ownKeys(t);if(r.length!==o.length)return!1;for(let o=0;o<r.length;o++){const i=r[o];if(!He.call(t,i)||!We(e[i],t[i],n))return!1}return!0}(e,t,n)}var i,s;return o}function _e(e,t){if(e.byteLength!==t.byteLength)return!1;const n=new Uint8Array(e),r=new Uint8Array(t);let o=e.byteLength;for(;o--;)if(n[o]!==r[o])return!1;return!0}e.EMAIL_REGEX=ve,e.HEX_POOL=ne,e.HTTP_URL_REGEX=$e,e.IPV4_REGEX=Re,e.IPV6_REGEX=Ne,e.PHONE_REGEX=Fe,e.STRING_ARABIC_NUMERALS=F,e.STRING_LOWERCASE_ALPHA=C,e.STRING_POOL=te,e.STRING_UPPERCASE_ALPHA=T,e.UNIQUE_NUMBER_SAFE_LENGTH=18,e.URL_REGEX=Te,e.UnicodeToolkit=class{static ENTITY_MAP={"&":"&","<":"<",">":">",'"':""","'":"'"};static NAMED_ENTITIES={""":'"',"&":"&","<":"<",">":">"," ":" ","©":"©","™":"™","®":"®"};static encode(e,t="unicode",n=!1){const r=[];for(const o of e){const e=o.codePointAt(0);"html"===t&&this.ENTITY_MAP[o]?r.push(this.ENTITY_MAP[o]):!n&&e>=32&&e<=126?r.push(o):"unicode"===t?e>65535?r.push(`\\u{${e.toString(16).toUpperCase()}}`):r.push(`\\u${e.toString(16).toUpperCase().padStart(4,"0")}`):r.push(`&#${e};`)}return r.join("")}static decode(e,t=!1){if(!e)return"";let n=e.replace(/\\u(?:\{([0-9a-fA-F]+)\}|([0-9a-fA-F]{4}))/g,((e,t,n)=>String.fromCodePoint(parseInt(t||n,16)))).replace(/&#(x?)([0-9a-fA-F]+);/g,((e,t,n)=>String.fromCodePoint(parseInt(n,t?16:10)))).replace(/&[a-z0-9]+;/gi,(e=>this.NAMED_ENTITIES[e]||e));return t&&(n=n.replace(/\u00A0/g," ")),n}},e.add=we,e.addClass=function(e,t){N(t,(t=>e.classList.add(t)))},e.arrayEach=t,e.arrayEachAsync=async function(e,t,n=!1){if(n)for(let n=e.length-1;n>=0&&!1!==await t(e[n],n);n--);else for(let n=0,r=e.length;n<r&&!1!==await t(e[n],n);n++);},e.arrayInsertBefore=function(e,t,n){if(t===n||t+1===n)return;const[r]=e.splice(t,1),o=n<t?n:n-1;e.splice(o,0,r)},e.arrayLike=i,e.arrayRemove=function(e,n){const r=[],o=n;return t(e,((e,t)=>{o(e,t)&&r.push(t)})),r.forEach(((t,n)=>{e.splice(t-n,1)})),e},e.asyncMap=function(e,t,n=1/0){return new Promise(((r,o)=>{const i=e[Symbol.iterator](),s=Math.min(e.length,n),a=[];let c,l=0,u=0;const d=()=>{if(c)return o(c);const n=i.next();if(n.done)return void(l===e.length&&r(a));const s=u++;t(n.value,s,e).then((e=>{l++,a[s]=e,d()})).catch((e=>{c=e,d()}))};for(let e=0;e<s;e++)d()}))},e.b64decode=function(e){const t=f(Q("atob"))?Ee(e):Q("atob")(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return f(Q("TextDecoder"))?function(e){const t=String.fromCharCode.apply(null,e);return decodeURIComponent(t)}(r):new(Q("TextDecoder"))("utf-8").decode(r)},e.b64encode=function(e){const t=f(Q("TextEncoder"))?function(e){const t=encodeURIComponent(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}(e):(new(Q("TextEncoder"))).encode(e);let n="";const r=t.length;for(let e=0;e<r;e++)n+=String.fromCharCode(t[e]);return f(Q("btoa"))?Ae(n):Q("btoa")(n)},e.calculateDate=function(e,t,n="-"){const r=new Date(e),o=new Date(r.getFullYear(),r.getMonth(),r.getDate()).getTime()+864e5*parseInt(String(t)),i=new Date(o);return i.getFullYear()+n+String(i.getMonth()+1).padStart(2,"0")+"-"+String(i.getDate()).padStart(2,"0")},e.calculateDateTime=function(e,t,n="-",r=":"){const o=new Date(e),i=n,s=r,a=new Date(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds()).getTime()+864e5*parseInt(String(t)),c=new Date(a);return c.getFullYear()+i+String(c.getMonth()+1).padStart(2,"0")+i+String(c.getDate()).padStart(2,"0")+" "+String(c.getHours()).padStart(2,"0")+s+String(c.getMinutes()).padStart(2,"0")+s+String(c.getSeconds()).padStart(2,"0")},e.chooseLocalFile=function(e,t){let n=document.createElement("input");n.setAttribute("id",String(Date.now())),n.setAttribute("type","file"),n.setAttribute("style","visibility:hidden"),n.setAttribute("accept",e),document.body.appendChild(n),n.click(),n.onchange=e=>{t(e.target.files),setTimeout((()=>{document.body.removeChild(n),n=null}))}},e.cloneDeep=function e(t,n=new WeakMap){if(null===t||"object"!=typeof t)return t;if(n.has(t))return n.get(t);if(t instanceof ArrayBuffer){const e=new ArrayBuffer(t.byteLength);return new Uint8Array(e).set(new Uint8Array(t)),n.set(t,e),e}if(ArrayBuffer.isView(t)){return new(0,t.constructor)(e(t.buffer,n),t.byteOffset,t.length)}if(t instanceof Date){const e=new Date(t.getTime());return n.set(t,e),e}if(t instanceof RegExp){const e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,n.set(t,e),e}if(t instanceof Map){const r=new Map;return n.set(t,r),t.forEach(((t,o)=>{r.set(e(o,n),e(t,n))})),r}if(t instanceof Set){const r=new Set;return n.set(t,r),t.forEach((t=>{r.add(e(t,n))})),r}if(Array.isArray(t)){const r=new Array(t.length);n.set(t,r);for(let o=0,i=t.length;o<i;o++)o in t&&(r[o]=e(t[o],n));const o=Object.getOwnPropertyDescriptors(t);for(const t of Reflect.ownKeys(o))Object.defineProperty(r,t,{...o[t],value:e(o[t].value,n)});return r}const r=Object.create(Object.getPrototypeOf(t));n.set(t,r);const o=Object.getOwnPropertyDescriptors(t);for(const t of Reflect.ownKeys(o)){const i=o[t];"value"in i?i.value=e(i.value,n):(i.get&&(i.get=e(i.get,n)),i.set&&(i.set=e(i.set,n))),Object.defineProperty(r,t,i)}return r},e.compressImg=function e(t,n={mime:"image/jpeg",minFileSizeKB:50}){if(!(t instanceof File||t instanceof FileList))throw new Error(`${t} require be File or FileList`);if(!J())throw new Error("Current runtime environment not support Canvas");const{quality:r,mime:o="image/jpeg",maxSize:i,minFileSizeKB:s=50}=h(n)?n:{};let a,c=r;if(r)c=r;else if(t instanceof File){const e=+parseInt((t.size/1024).toFixed(2));c=e<s?1:e<1024?.85:e<5120?.8:.75}return l(i)&&(a=i>=1200?i:1200),t instanceof FileList?Promise.all(Array.from(t).map((t=>e(t,{maxSize:a,mime:o,quality:c})))):t instanceof File?new Promise((e=>{const n=[...t.name.split(".").slice(0,-1),{"image/webp":"webp","image/jpeg":"jpg","image/png":"png"}[o]].join("."),r=+parseInt((t.size/1024).toFixed(2));if(r<s)e({file:t});else{const i=new FileReader;i.onload=({target:{result:i}})=>{const s=new Image;s.onload=()=>{const u=document.createElement("canvas"),d=u.getContext("2d"),f=s.width,h=s.height,{width:p,height:g}=function({sizeKB:e,maxSize:t,originWidth:n,originHeight:r}){let o=n,i=r;if(l(t)){const{width:e,height:s}=Z({maxWidth:t,maxHeight:t,originWidth:n,originHeight:r});o=e,i=s}else if(e<500){const e=1200,t=1200,{width:s,height:a}=Z({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=s,i=a}else if(e<5120){const e=1400,t=1400,{width:s,height:a}=Z({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=s,i=a}else if(e<10240){const e=1600,t=1600,{width:s,height:a}=Z({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=s,i=a}else if(10240<=e){const e=n>15e3?8192:n>1e4?4096:2048,t=r>15e3?8192:r>1e4?4096:2048,{width:s,height:a}=Z({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=s,i=a}return{width:o,height:i}}({sizeKB:r,maxSize:a,originWidth:f,originHeight:h});u.width=p,u.height=g,d.clearRect(0,0,p,g),d.drawImage(s,0,0,p,g);const m=u.toDataURL(o,c),y=atob(m.split(",")[1]);let b=y.length;const w=new Uint8Array(new ArrayBuffer(b));for(;b--;)w[b]=y.charCodeAt(b);const S=new File([w],n,{type:o});e({file:S,bufferArray:w,origin:t,beforeSrc:i,afterSrc:m,beforeKB:r,afterKB:Number((S.size/1024).toFixed(2))})},s.src=i},i.readAsDataURL(t)}})):Promise.resolve(null)},e.cookieDel=e=>P(e,"",-1),e.cookieGet=function(e){const{cookie:t}=document;if(!t)return"";const n=t.split(";");for(let t=0;t<n.length;t++){const r=n[t],[o,i=""]=r.split("=");if(o===e)return decodeURIComponent(i)}return""},e.cookieSet=P,e.copyText=function(e,t){const{successCallback:n,failCallback:r}=f(t)?{}:t;navigator.clipboard?navigator.clipboard.writeText(e).then((()=>{g(n)&&n()})).catch((n=>{M(e,t)})):M(e,t)},e.crossOriginDownload=function(e,t,n){const{successCode:r=200,successCallback:o,failCallback:i}=f(n)?{successCode:200,successCallback:void 0,failCallback:void 0}:n,s=new XMLHttpRequest;s.open("GET",e,!0),s.responseType="blob",s.onload=function(){if(s.status===r)K(s.response,t,o);else if(g(i)){const e=s.status,t=s.getResponseHeader("Content-Type");if(a(t)&&t.includes("application/json")){const t=new FileReader;t.onload=()=>{i({status:e,response:t.result})},t.readAsText(s.response)}else i(s)}},s.onerror=e=>{g(i)&&i({status:0,code:"ERROR_CONNECTION_REFUSED"})},s.send()},e.dateParse=B,e.dateToEnd=function(e){const t=U(e);return t.setDate(t.getDate()+1),B(t.getTime()-1)},e.dateToStart=U,e.debounce=(e,t)=>{let n,r=!1;const o=function(...o){r||(clearTimeout(n),n=setTimeout((()=>{e.call(this,...o)}),t))};return o.cancel=()=>{clearTimeout(n),r=!0},o},e.diffArray=function(e,t,n){const r=e=>{if(n)return n(e);if("string"==typeof e||"number"==typeof e||"symbol"==typeof e)return e;throw new Error("diffArray: getKey is required when item is not a primitive value")},o=new Map,i=new Map;for(const t of e)o.set(r(t),t);for(const e of t)i.set(r(e),e);const s=[],a=[];for(const[e,t]of i)o.has(e)||s.push(t);for(const[e,t]of o)i.has(e)||a.push(t);return{added:s,removed:a}},e.divide=(e,t)=>{let n=0,r=0,o=0,i=0;return void 0!==e.toString().split(".")[1]&&(n=e.toString().split(".")[1].length),void 0!==t.toString().split(".")[1]&&(r=t.toString().split(".")[1].length),o=Number(e.toString().replace(".","")),i=Number(t.toString().replace(".","")),o/i*Math.pow(10,r-n)},e.downloadBlob=K,e.downloadData=function(e,t,n,r){if(n=n.replace(`.${t}`,"")+`.${t}`,"json"===t){K(new Blob([JSON.stringify(e,null,4)]),n)}else{if(!r||!r.length)throw new Error("未传入表头数据");if(!Array.isArray(e))throw new Error("data error! expected array!");const o=r.join(",")+"\n";let i="";e.forEach((e=>{i+=Object.values(e).join(",\t")+",\n"}));X("data:"+{csv:"text/csv",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}[t]+";charset=utf-8,\ufeff"+encodeURIComponent(o+i),n)}},e.downloadHref=X,e.downloadURL=function(e,t){window.open(t?V(e,t):e)},e.escapeRegExp=Le,e.executeInScope=function(e,t={}){const n=Object.keys(t),r=n.map((e=>t[e]));try{return new Function(...n,`return (() => { ${e} })()`)(...r)}catch(e){throw new Error(`代码执行失败: ${e.message}`)}},e.fallbackCopyText=M,e.filterDeep=function(e,t,n={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){const r=[];return ye(e,((...e)=>{t(...e)&&r.push(e[0])}),n),r},e.findDeep=function(e,t,n={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){let r=null;return ye(e,((...e)=>{if(t(...e))return r=e[0],!1}),n),r},e.flatTree=function e(t,n=ge){const{keyField:r="key",childField:i="children",pidField:s="pid"}=h(n)?n:{};let a=[];for(let c=0,l=t.length;c<l;c++){const l=t[c],u={...l,[i]:[]};if(o(u,i)&&delete u[i],a.push(u),l[i]){const t=l[i].map((e=>({...e,[s]:l[r]||e.pid})));a=a.concat(e(t,n))}}return a},e.forEachDeep=ye,e.formatDate=function(e,t="YYYY-MM-DD HH:mm:ss"){const n=B(e);let r,o=t;const i={"Y+":`${n.getFullYear()}`,"y+":`${n.getFullYear()}`,"M+":`${n.getMonth()+1}`,"D+":`${n.getDate()}`,"d+":`${n.getDate()}`,"H+":`${n.getHours()}`,"m+":`${n.getMinutes()}`,"s+":`${n.getSeconds()}`,"S+":`${n.getMilliseconds()}`,"w+":["周日","周一","周二","周三","周四","周五","周六"][n.getDay()]};for(const e in i)r=new RegExp("("+e+")").exec(o),r&&(o=o.replace(r[1],1===r[1].length?i[e]:i[e].padStart(r[1].length,"0")));return o},e.formatMoney=ce,e.formatNumber=ce,e.formatTree=function(e,t=ge){const{keyField:n="key",childField:r="children",pidField:o="pid"}=h(t)?t:{},i=[],s={};for(let t=0,r=e.length;t<r;t++){const r=e[t];s[r[n]]=r}for(let t=0,n=e.length;t<n;t++){const n=e[t],a=s[n[o]];a?(a[r]||(a[r]=[])).push(n):i.push(n)}return e=null,i},e.fuzzySearchTree=function e(t,n,r=me){if(!o(n,"filter")&&!n.keyword)return t;const i=[];for(let s=0,a=t.length;s<a;s++){const a=t[s],c=a[r.childField]&&a[r.childField].length>0?e(a[r.childField]||[],n,r):[];if((o(n,"filter")?n.filter(a):r.ignoreCase?a[r.nameField].toLowerCase().includes(n.keyword.toLowerCase()):a[r.nameField].includes(n.keyword))||c.length>0)if(a[r.childField])if(c.length>0)i.push({...a,[r.childField]:c});else if(r.removeEmptyChild){const{[r.childField]:e,...t}=a;i.push(t)}else i.push({...a,[r.childField]:[]});else{const{[r.childField]:e,...t}=a;i.push(t)}}return i},e.genCanvasWM=function e(t="请勿外传",n){const{rootContainer:r=document.body,width:o="300px",height:i="150px",textAlign:s="center",textBaseline:c="middle",font:l="20px PingFangSC-Medium,PingFang SC",fillStyle:u="rgba(189, 177, 167, .3)",rotate:d=-20,zIndex:h=2147483647,watermarkId:p="__wm"}=f(n)?{}:n,g=a(r)?document.querySelector(r):r;if(!g)throw new Error(`${r} is not valid Html Element or element selector`);const m=document.createElement("canvas");m.setAttribute("width",o),m.setAttribute("height",i);const y=m.getContext("2d");y.textAlign=s,y.textBaseline=c,y.font=l,y.fillStyle=u,y.rotate(Math.PI/180*d),y.fillText(t,parseFloat(o)/4,parseFloat(i)/2);const b=m.toDataURL(),w=document.querySelector(`#${p}`),S=w||document.createElement("div"),x=`opacity: 1 !important; display: block !important; visibility: visible !important; position:absolute; left:0; top:0; width:100%; height:100%; z-index:${h}; pointer-events:none; background-repeat:repeat; background-image:url('${b}')`;S.setAttribute("style",x),S.setAttribute("id",p),S.classList.add("nav-height"),w||(g.style.position="relative",g.appendChild(S));const A=window.MutationObserver||window.WebKitMutationObserver;if(A){let r=new A((function(){let o=document.querySelector(`#${p}`);if(o){const{opacity:i,zIndex:s,display:a,visibility:c}=(e=>{const t=getComputedStyle(e);return{opacity:t.getPropertyValue("opacity"),zIndex:t.getPropertyValue("z-index"),display:t.getPropertyValue("display"),visibility:t.getPropertyValue("visibility")}})(o);(o&&o.getAttribute("style")!==x||!o||"1"!==i||"2147483647"!==s||"block"!==a||"visible"!==c)&&(r.disconnect(),r=null,g.removeChild(o),o=null,e(t,n))}else r.disconnect(),r=null,e(t,n)}));r.observe(g,{attributes:!0,subtree:!0,childList:!0})}},e.getComputedCssVal=function(e,t,n=!0){const r=getComputedStyle(e).getPropertyValue(t)??"";return n?Number(r.replace(/([0-9]*)(.*)/g,"$1")):r},e.getGlobal=Q,e.getStrWidthPx=D,e.getStyle=function(e,t){return getComputedStyle(e).getPropertyValue(t)},e.hasClass=function(e,t){if(-1!==t.indexOf(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},e.humanFileSize=function(e,t={decimals:0,si:!1,separator:" "}){const{decimals:n=0,si:r=!1,separator:o=" ",baseUnit:i,maxUnit:s}=t;let a=r?["B","kB","MB","GB","TB","PB","EB","ZB","YB"]:["Byte","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];if(!f(i)){const e=a.findIndex((e=>e===i));-1!==e&&(a=a.slice(e))}if(!f(s)){const e=a.findIndex((e=>e===s));-1!==e&&a.splice(e+1)}return ae(e,a,{ratio:r?1e3:1024,decimals:n,separator:o})},e.isArray=p,e.isBigInt=e=>"bigint"==typeof e,e.isBoolean=c,e.isDate=y,e.isDigit=e=>Pe.test(e),e.isEmail=e=>ve.test(e),e.isEmpty=function(e){if(f(e)||Number.isNaN(e))return!0;const t=s(e);return i(e)||"Arguments"===t?!e.length:"Set"===t||"Map"===t?!e.size:!Object.keys(e).length},e.isEqual=function(e,t){return We(e,t)},e.isError=e=>"Error"===s(e),e.isFloat=Me,e.isFunction=g,e.isIdNo=e=>{if(!Ce.test(e))return!1;const t=Number(e.slice(6,10)),n=Number(e.slice(10,12)),r=Number(e.slice(12,14)),o=new Date(t,n-1,r);if(!(o.getFullYear()===t&&o.getMonth()+1===n&&o.getDate()===r))return!1;const i=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2];let s=0;for(let t=0;t<17;t++)s+=Number(e.slice(t,t+1))*i[t];return["1","0","X","9","8","7","6","5","4","3","2"][s%11]===e.slice(-1)},e.isInteger=De,e.isIpV4=e=>Re.test(e),e.isIpV6=e=>Ne.test(e),e.isJsonString=function(e){try{const t=JSON.parse(e);return"object"==typeof t&&null!==t&&t}catch(e){return!1}},e.isNaN=m,e.isNodeList=b,e.isNull=d,e.isNullOrUnDef=f,e.isNullish=f,e.isNumber=l,e.isNumerical=e=>De(e)||Me(e),e.isObject=h,e.isPhone=e=>Fe.test(e),e.isPlainObject=w,e.isPrimitive=e=>null===e||"object"!=typeof e,e.isRegExp=e=>"RegExp"===s(e),e.isString=a,e.isSymbol=e=>"symbol"==typeof e,e.isUndefined=u,e.isUrl=(e,t=!1)=>(t?Te:$e).test(e),e.isValidDate=k,e.mapDeep=function(e,t,n={childField:"children",reverse:!1}){const{childField:r="children",reverse:o=!1}=h(n)?n:{};let i=!1;const s=[],a=(n,s,c,l=0)=>{if(o)for(let o=n.length-1;o>=0&&!i;o--){const u=n[o],d=t(u,o,n,e,s,l);if(!1===d){i=!0;break}!0!==d&&(c.push(x(d,[r])),u&&Array.isArray(u[r])?(c[c.length-1][r]=[],a(u[r],u,c[c.length-1][r],l+1)):delete d[r])}else for(let o=0;o<n.length&&!i;o++){const u=n[o],d=t(u,o,n,e,s,l);if(!1===d){i=!0;break}!0!==d&&(c.push(x(d,[r])),u&&Array.isArray(u[r])?(c[c.length-1][r]=[],a(u[r],u,c[c.length-1][r],l+1)):delete d[r])}};return a(e,null,s),e=null,s},e.multiply=be,e.numberAbbr=ae,e.numberToHex=se,e.objectAssign=E,e.objectEach=S,e.objectEachAsync=async function(e,t){for(const n in e)if(o(e,n)&&!1===await t(e[n],n))break},e.objectFill=function(e,t,n){const r=n||((e,t,n)=>void 0===e[n]);return S(t,((n,o)=>{r(e,t,o)&&(e[o]=n)})),e},e.objectGet=function(e,t,n=!1){const r=(t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split(".");let i=e,s=0;for(let e=r.length;s<e-1;++s){const e=r[s];if(l(Number(e))&&Array.isArray(i))i=i[e];else{if(!h(i)||!o(i,e)){if(i=void 0,n)throw new Error("[Object] objectGet path 路径不正确");break}i=i[e]}}return{p:i,k:i?r[s]:void 0,v:i?i[r[s]]:void 0}},e.objectHas=o,e.objectMap=function(e,t){const n={};for(const r in e)o(e,r)&&(n[r]=t(e[r],r));return e=null,n},e.objectMerge=E,e.objectOmit=x,e.objectPick=function(e,t){const n={};return S(e,((e,r)=>{t.includes(r)&&(n[r]=e)})),e=null,n},e.once=e=>{let t,n=!1;return function(...r){return n||(n=!0,t=e.call(this,...r)),t}},e.parseQueryParams=function(e=location.search){const t={};return Array.from(e.matchAll(/[&?]?([^=&]+)=?([^=&]*)/g)).forEach(((e,n)=>{t[e[1]]?"string"==typeof t[e[1]]?t[e[1]]=[t[e[1]],e[2]]:t[e[1]].push(e[2]):t[e[1]]=e[2]})),t},e.parseVarFromString=function(e,t="{",n="}"){return Array.from(e.matchAll(Oe(t,n))).map((e=>f(e)?void 0:e[1]))},e.pathJoin=z,e.pathNormalize=H,e.qsParse=W,e.qsStringify=q,e.randomNumber=ee,e.randomString=(e,t)=>{let n=0,r=te;a(t)?(n=e,r=t):l(e)?n=e:a(e)&&(r=e);let o=Math.max(n,1),i="";const s=r.length-1;if(s<2)throw new Error("字符串池长度不能少于 2");for(;o--;){i+=r[ee(0,s)]}return i},e.randomUuid=function(){if("undefined"==typeof URL||!URL.createObjectURL||"undefined"==typeof Blob){const e="0123456789abcdef",t="xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx";let n="";for(let r=0;r<t.length;r++){const o=ee(0,15);n+="-"==t[r]||"4"==t[r]?t[r]:e[o]}return n}return/[^/]+$/.exec(URL.createObjectURL(new Blob).slice())[0]},e.removeClass=function(e,t){N(t,(t=>e.classList.remove(t)))},e.replaceVarFromString=function(e,t,n="{",r="}"){return e.replace(new RegExp(Oe(n,r)),(function(e,n){return o(t,n)?t[n]:e}))},e.safeAwait=function(e,t){return e.then((e=>[null,e])).catch((e=>{if(t){return[Object.assign({},e,t),void 0]}return[e,void 0]}))},e.searchTreeById=function(e,t,n={childField:"children",keyField:"id"}){const{childField:r="children",keyField:o="id"}=h(n)?n:{},i=(e,t,n)=>e.reduce(((e,s)=>{const a=s[r];return[...e,t?{...s,parentId:t,parent:n}:s,...a&&a.length?i(a,s[o],s):[]]}),[]);return(e=>{let n=e.find((e=>e[o]===t));const{parent:r,parentId:i,...s}=n;let a=[t],c=[s];for(;n&&n.parentId;)a=[n.parentId,...a],c=[n.parent,...c],n=e.find((e=>e[o]===n.parentId));return[a,c]})(i(e))},e.select=j,e.setGlobal=function(e,t){if("undefined"!=typeof globalThis)globalThis[e]=t;else if("undefined"!=typeof window)window[e]=t;else if("undefined"!=typeof global)global[e]=t;else{if("undefined"==typeof self)throw new SyntaxError("当前环境下无法设置全局属性");self[e]=t}},e.setStyle=I,e.stringAssign=(e,t)=>e.replace(R,((e,n)=>((e,t)=>{try{return new Function(`with(arguments[0]){if(arguments[0].${e} === undefined)throw "";return String(arguments[0].${e})}`)(t)}catch(t){throw new SyntaxError(`无法执行表达式:${e}`)}})(n,t))),e.stringCamelCase=function(e,t){let n=e;return t&&(n=e.replace(/^./,(e=>e.toUpperCase()))),n.replace(/[\s_-](.)/g,((e,t)=>t.toUpperCase()))},e.stringEscapeHtml=e=>{const t={"&":"&","<":"<",">":">",'"':"""};return e.replace(/[&<>"]/g,(e=>t[e]))},e.stringFill=(e,t=" ")=>new Array(e).fill(t).join(""),e.stringFormat=function(e,...t){let n=0;return[e.replace($,(e=>{const r=t[n++];switch(e){case"%%":return n--,"%";default:case"%s":return String(r);case"%d":return String(Number(r));case"%o":return JSON.stringify(r)}})),...t.splice(n).map(String)].join(" ")},e.stringKebabCase=v,e.strip=function(e,t=15){return+parseFloat(Number(e).toPrecision(t))},e.subtract=(e,t)=>we(e,-t),e.supportCanvas=J,e.throttle=(e,t,n)=>{let r,o=!1,i=0;const s=function(...s){if(o)return;const a=Date.now(),c=()=>{i=a,e.call(this,...s)};if(0===i)return n?c():void(i=a);i+t-a>0?(clearTimeout(r),r=setTimeout((()=>c()),t)):c()};return s.cancel=()=>{clearTimeout(r),o=!0},s},e.tooltipEvent=pe,e.typeIs=s,e.uniqueNumber=de,e.uniqueString=(e,t)=>{let n=0,r=ne;a(t)?(n=e,r=t):l(e)?n=e:a(e)&&(r=e);let o=se(de(),r),i=n-o.length;if(i<=0)return o;for(;i--;)o+=fe(r);return o},e.uniqueSymbol=ke,e.urlDelParams=(e,t)=>{const n=Y(e);return t.forEach((e=>delete n.searchParams[e])),G(n)},e.urlParse=Y,e.urlSetParams=V,e.urlStringify=G,e.wait=function(e=1){return new Promise((t=>setTimeout(t,e)))},e.weAtob=Ee,e.weBtoa=Ae}));
|
|
6
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).sculpJs={})}(this,(function(e){"use strict";function t(e,t,n=!1){if(n)for(let n=e.length-1;n>=0;n--){const r=t(e[n],n,e);if(!1===r)break}else for(let n=0,r=e.length;n<r;n++){const r=t(e[n],n,e);if(!1===r)break}e=null}async function n(e,t,n=!1){if(n)for(let n=e.length-1;n>=0&&!1!==await t(e[n],n);n--);else for(let n=0,r=e.length;n<r&&!1!==await t(e[n],n);n++);}function r(e,t,n){if(t===n||t+1===n)return;const[r]=e.splice(t,1),o=n<t?n:n-1;e.splice(o,0,r)}function o(e,n){const r=[],o=n;return t(e,((e,t)=>{o(e,t)&&r.push(t)})),r.forEach(((t,n)=>{e.splice(t-n,1)})),e}function i(e,t,n){const r=e=>{if(n)return n(e);if("string"==typeof e||"number"==typeof e||"symbol"==typeof e)return e;throw new Error("diffArray: getKey is required when item is not a primitive value")},o=new Map,i=new Map;for(const t of e)o.set(r(t),t);for(const e of t)i.set(r(e),e);const a=[],s=[];for(const[e,t]of i)o.has(e)||a.push(t);for(const[e,t]of o)i.has(e)||s.push(t);return{added:a,removed:s}}var a={arrayEach:t,arrayEachAsync:n,arrayInsertBefore:r,arrayRemove:o,diffArray:i},s=Object.freeze({__proto__:null,arrayEach:t,arrayEachAsync:n,arrayInsertBefore:r,arrayRemove:o,default:a,diffArray:i});const{toString:l,hasOwnProperty:c}=Object.prototype;function u(e,t){return c.call(e,t)}function d(e){return!!_(e)||(!!p(e)||!!A(e)&&u(e,"length"))}function f(e){return l.call(e).slice(8,-1)}const p=e=>"string"==typeof e,g=e=>"boolean"==typeof e,h=e=>"symbol"==typeof e,m=e=>"bigint"==typeof e,b=e=>"number"==typeof e&&!Number.isNaN(e),y=e=>void 0===e,S=e=>null===e,w=e=>null===e||"object"!=typeof e;function E(e){return y(e)||S(e)}const A=e=>"Object"===f(e),_=e=>Array.isArray(e),x=e=>"function"==typeof e,v=e=>Number.isNaN(e),T=e=>"Date"===f(e),F=e=>"Error"===f(e),C=e=>"RegExp"===f(e);function R(e){try{const t=JSON.parse(e);return"object"==typeof t&&null!==t&&t}catch(e){return!1}}function j(e){if(E(e)||Number.isNaN(e))return!0;const t=f(e);return d(e)||"Arguments"===t?!e.length:"Set"===t||"Map"===t?!e.size:!Object.keys(e).length}function N(e){return!y(NodeList)&&NodeList.prototype.isPrototypeOf(e)}var O={typeIs:f,objectHas:u,arrayLike:d,isString:p,isBoolean:g,isSymbol:h,isBigInt:m,isNumber:b,isUndefined:y,isNull:S,isPrimitive:w,isNullOrUnDef:E,isNullish:E,isObject:A,isArray:_,isFunction:x,isNaN:v,isDate:T,isError:F,isRegExp:C,isJsonString:R,isEmpty:j,isNodeList:N},P=Object.freeze({__proto__:null,arrayLike:d,default:O,isArray:_,isBigInt:m,isBoolean:g,isDate:T,isEmpty:j,isError:F,isFunction:x,isJsonString:R,isNaN:v,isNodeList:N,isNull:S,isNullOrUnDef:E,isNullish:E,isNumber:b,isObject:A,isPrimitive:w,isRegExp:C,isString:p,isSymbol:h,isUndefined:y,objectHas:u,typeIs:f});const I=f,D=e=>{if(!A(e))return!1;const t=Object.getPrototypeOf(e);return!t||t===Object.prototype};function L(e,t){for(const n in e)if(u(e,n)&&!1===t(e[n],n))break;e=null}async function M(e,t){for(const n in e)if(u(e,n)&&!1===await t(e[n],n))break}function U(e,t){const n={};for(const r in e)u(e,r)&&(n[r]=t(e[r],r));return e=null,n}function $(e,t){const n={};return L(e,((e,r)=>{t.includes(r)&&(n[r]=e)})),e=null,n}function k(e,t){const n={};return L(e,((e,r)=>{t.includes(r)||(n[r]=e)})),e=null,n}const z=(e,t,n)=>{if(y(n))return t;if(I(t)!==I(n))return _(n)?z(e,[],n):A(n)?z(e,{},n):n;if(D(n)){const r=e.get(n);return r||(e.set(n,t),L(n,((n,r)=>{t[r]=z(e,t[r],n)})),t)}if(_(n)){const r=e.get(n);return r||(e.set(n,t),n.forEach(((n,r)=>{t[r]=z(e,t[r],n)})),t)}return n};function B(e,...t){const n=new Map;for(let r=0,o=t.length;r<o;r++){const o=t[r];e=z(n,e,o)}return n.clear(),e}function H(e,t,n){const r=n||((e,t,n)=>void 0===e[n]);return L(t,((n,o)=>{r(e,t,o)&&(e[o]=n)})),e}function G(e,t,n=!1){const r=(t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split(".");let o=e,i=0;for(let e=r.length;i<e-1;++i){const e=r[i];if(b(Number(e))&&Array.isArray(o))o=o[e];else{if(!A(o)||!u(o,e)){if(o=void 0,n)throw new Error("[Object] objectGet path 路径不正确");break}o=o[e]}}return{p:o,k:o?r[i]:void 0,v:o?o[r[i]]:void 0}}var q={isPlainObject:D,objectEach:L,objectEachAsync:M,objectMap:U,objectPick:$,objectOmit:k,objectAssign:B,objectMerge:B,objectFill:H,objectGet:G},W=Object.freeze({__proto__:null,default:q,isPlainObject:D,objectAssign:B,objectEach:L,objectEachAsync:M,objectFill:H,objectGet:G,objectMap:U,objectMerge:B,objectOmit:k,objectPick:$});function V(e,t){let n=e;t&&(n=e.replace(/^./,(e=>e.toUpperCase())));return n.replace(/[\s_-](.)/g,((e,t)=>t.toUpperCase()))}function X(e,t="-"){return e.replace(/^./,(e=>e.toLowerCase())).replace(/[A-Z]/g,(e=>`${t}${e.toLowerCase()}`))}const Y="0123456789",K="abcdefghijklmnopqrstuvwxyz",J="ABCDEFGHIJKLMNOPQRSTUVWXYZ",Z=/%[%sdo]/g;function Q(e,...t){let n=0;return[e.replace(Z,(e=>{const r=t[n++];switch(e){case"%%":return n--,"%";default:case"%s":return String(r);case"%d":return String(Number(r));case"%o":return JSON.stringify(r)}})),...t.splice(n).map(String)].join(" ")}const ee=/\${(.*?)}/g,te=(e,t)=>e.replace(ee,((e,n)=>((e,t)=>{try{return new Function(`with(arguments[0]){if(arguments[0].${e} === undefined)throw "";return String(arguments[0].${e})}`)(t)}catch(t){throw new SyntaxError(`无法执行表达式:${e}`)}})(n,t))),ne=e=>{const t={"&":"&","<":"<",">":">",'"':"""};return e.replace(/[&<>"]/g,(e=>t[e]))},re=(e,t=" ")=>new Array(e).fill(t).join("");function oe(e=location.search){const t={};return Array.from(e.matchAll(/[&?]?([^=&]+)=?([^=&]*)/g)).forEach(((e,n)=>{t[e[1]]?"string"==typeof t[e[1]]?t[e[1]]=[t[e[1]],e[2]]:t[e[1]].push(e[2]):t[e[1]]=e[2]})),t}var ie={stringCamelCase:V,stringKebabCase:X,STRING_ARABIC_NUMERALS:Y,STRING_LOWERCASE_ALPHA:K,STRING_UPPERCASE_ALPHA:J,stringFormat:Q,stringAssign:te,stringEscapeHtml:ne,stringFill:re,parseQueryParams:oe},ae=Object.freeze({__proto__:null,STRING_ARABIC_NUMERALS:Y,STRING_LOWERCASE_ALPHA:K,STRING_UPPERCASE_ALPHA:J,default:ie,parseQueryParams:oe,stringAssign:te,stringCamelCase:V,stringEscapeHtml:ne,stringFill:re,stringFormat:Q,stringKebabCase:X});function se(e,t){if(-1!==t.indexOf(" "))throw new Error("className should not contain space.");return e.classList.contains(t)}const le=(e,t)=>{e.split(/\s+/g).forEach(t)};function ce(e,t){le(t,(t=>e.classList.add(t)))}function ue(e,t){le(t,(t=>e.classList.remove(t)))}const de=(e,t,n)=>{A(t)?L(t,((t,n)=>{de(e,n,t)})):e.style.setProperty(X(t),n)};function fe(e,t){return getComputedStyle(e).getPropertyValue(t)}function pe(e,t,n=!0){const r=getComputedStyle(e).getPropertyValue(t)??"";return n?Number(r.replace(/([0-9]*)(.*)/g,"$1")):r}function ge(e,t=14,n=!0){let r=0;if(console.assert(p(e),`${e} 不是有效的字符串`),p(e)&&e.length>0){const o="getStrWidth1494304949567";let i=document.querySelector(`#${o}`);if(!i){const n=document.createElement("span");n.id=o,n.style.fontSize=t+"px",n.style.whiteSpace="nowrap",n.style.visibility="hidden",n.style.position="absolute",n.style.top="-9999px",n.style.left="-9999px",n.textContent=e,document.body.appendChild(n),i=n}i.textContent=e,r=i.offsetWidth,n&&i.remove()}return r}function he(e){let t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){const n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();const n=window.getSelection(),r=document.createRange();r.selectNodeContents(e),n.removeAllRanges(),n.addRange(r),t=n.toString()}return t}var me={hasClass:se,addClass:ce,removeClass:ue,setStyle:de,getStyle:fe,getComputedCssVal:pe,getStrWidthPx:ge,select:he},be=Object.freeze({__proto__:null,addClass:ce,default:me,getComputedCssVal:pe,getStrWidthPx:ge,getStyle:fe,hasClass:se,removeClass:ue,select:he,setStyle:de});function ye(e,t){const{successCallback:n,failCallback:r}=E(t)?{}:t;navigator.clipboard?navigator.clipboard.writeText(e).then((()=>{x(n)&&n()})).catch((n=>{Se(e,t)})):Se(e,t)}function Se(e,t){const{successCallback:n,failCallback:r,container:o=document.body}=E(t)?{}:t;let i=function(e){const t="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";const r=window.pageYOffset||document.documentElement.scrollTop;return n.style.top=`${r}px`,n.setAttribute("readonly",""),n.value=e,n}(e);o.appendChild(i),he(i);try{document.execCommand("copy")&&x(n)&&n()}catch(e){x(r)&&r(e)}finally{o.removeChild(i),i=null,window.getSelection()?.removeAllRanges()}}var we={copyText:ye,fallbackCopyText:Se},Ee=Object.freeze({__proto__:null,copyText:ye,default:we,fallbackCopyText:Se});function Ae(e){const{cookie:t}=document;if(!t)return"";const n=t.split(";");for(let t=0;t<n.length;t++){const r=n[t],[o,i=""]=r.split("=");if(o===e)return decodeURIComponent(i)}return""}function _e(e,t,n){const r=[],o="expires";if(r.push([e,encodeURIComponent(t)]),b(n)){const e=new Date;e.setTime(e.getTime()+n),r.push([o,e.toUTCString()])}else T(n)&&r.push([o,n.toUTCString()]);r.push(["path","/"]),document.cookie=r.map((e=>{const[t,n]=e;return`${t}=${n}`})).join(";")}const xe=e=>_e(e,"",-1);var ve={cookieSet:_e,cookieGet:Ae,cookieDel:xe},Te=Object.freeze({__proto__:null,cookieDel:xe,cookieGet:Ae,cookieSet:_e,default:ve});const Fe=e=>T(e)&&!v(e.getTime()),Ce=e=>{if(!p(e))return;const t=e.replace(/-/g,"/");return new Date(t)},Re=e=>{if(!p(e))return;const t=/([+-])(\d\d)(\d\d)$/,n=t.exec(e);if(!n)return;const r=e.replace(t,"Z"),o=new Date(r);if(!Fe(o))return;const[,i,a,s]=n,l=parseInt(a,10),c=parseInt(s,10),u=(e,t)=>"+"===i?e-t:e+t;return o.setHours(u(o.getHours(),l)),o.setMinutes(u(o.getMinutes(),c)),o};function je(e){const t=new Date(e);if(Fe(t))return t;const n=Ce(e);if(Fe(n))return n;const r=Re(e);if(Fe(r))return r;throw new SyntaxError(`${e.toString()} 不是一个合法的日期描述`)}function Ne(e){const t=je(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)}function Oe(e){const t=Ne(e);return t.setDate(t.getDate()+1),je(t.getTime()-1)}function Pe(e,t="YYYY-MM-DD HH:mm:ss"){const n=je(e);let r,o=t;const i={"Y+":`${n.getFullYear()}`,"y+":`${n.getFullYear()}`,"M+":`${n.getMonth()+1}`,"D+":`${n.getDate()}`,"d+":`${n.getDate()}`,"H+":`${n.getHours()}`,"m+":`${n.getMinutes()}`,"s+":`${n.getSeconds()}`,"S+":`${n.getMilliseconds()}`,"w+":["周日","周一","周二","周三","周四","周五","周六"][n.getDay()]};for(const e in i)r=new RegExp("("+e+")").exec(o),r&&(o=o.replace(r[1],1===r[1].length?i[e]:i[e].padStart(r[1].length,"0")));return o}function Ie(e,t,n="-"){const r=new Date(e),o=new Date(r.getFullYear(),r.getMonth(),r.getDate()).getTime()+864e5*parseInt(String(t)),i=new Date(o);return i.getFullYear()+n+String(i.getMonth()+1).padStart(2,"0")+"-"+String(i.getDate()).padStart(2,"0")}function De(e,t,n="-",r=":"){const o=new Date(e),i=n,a=r,s=new Date(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds()).getTime()+864e5*parseInt(String(t)),l=new Date(s);return l.getFullYear()+i+String(l.getMonth()+1).padStart(2,"0")+i+String(l.getDate()).padStart(2,"0")+" "+String(l.getHours()).padStart(2,"0")+a+String(l.getMinutes()).padStart(2,"0")+a+String(l.getSeconds()).padStart(2,"0")}var Le={isValidDate:Fe,dateParse:je,dateToStart:Ne,dateToEnd:Oe,formatDate:Pe,calculateDate:Ie,calculateDateTime:De},Me=Object.freeze({__proto__:null,calculateDate:Ie,calculateDateTime:De,dateParse:je,dateToEnd:Oe,dateToStart:Ne,default:Le,formatDate:Pe,isValidDate:Fe});const Ue=e=>{const t=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/").replace(/\.{3,}/g,"..").replace(/\/\.\//g,"/").split("/").map((e=>e.trim())),n=e=>".."===e,r=[];let o=!1;const i=e=>{r.push(e)};return t.forEach((e=>{const t=(e=>"."===e)(e),a=n(e);return o?t?void 0:a?(()=>{if(0===r.length)return;const e=r[r.length-1];n(e)?r.push(".."):r.pop()})():void i(e):(i(e),void(o=!t&&!a))})),r.join("/")},$e=(e,...t)=>Ue([e,...t].join("/"));var ke={pathJoin:$e,pathNormalize:Ue},ze=Object.freeze({__proto__:null,default:ke,pathJoin:$e,pathNormalize:Ue});function Be(e){const t=new URLSearchParams(e),n={};for(const[e,r]of t.entries())y(n[e])?n[e]=r:_(n[e])||(n[e]=t.getAll(e));return n}const He=e=>p(e)?e:b(e)?String(e):g(e)?e?"true":"false":T(e)?e.toISOString():null;function Ge(e,t=He){const n=new URLSearchParams;return L(e,((e,r)=>{if(_(e))e.forEach((e=>{const o=t(e);null!==o&&n.append(r.toString(),o)}));else{const o=t(e);if(null===o)return;n.set(r.toString(),o)}})),n.toString()}var qe={qsParse:Be,qsStringify:Ge},We=Object.freeze({__proto__:null,default:qe,qsParse:Be,qsStringify:Ge});const Ve=(e,t=!0)=>{let n=null;x(URL)&&t?n=new URL(e):(n=document.createElement("a"),n.href=e);const{protocol:r,username:o,password:i,host:a,port:s,hostname:l,hash:c,search:u,pathname:d}=n,f=$e("/",d),p=o&&i?`${o}:${i}`:"",g=u.replace(/^\?/,"");return n=null,{protocol:r,auth:p,username:o,password:i,host:a,port:s,hostname:l,hash:c,search:u,searchParams:Be(g),query:g,pathname:f,path:`${f}${u}`,href:e}},Xe=e=>{const{protocol:t,auth:n,host:r,pathname:o,searchParams:i,hash:a}=e,s=n?`${n}@`:"",l=Ge(i),c=l?`?${l}`:"";let u=a.replace(/^#/,"");return u=u?"#"+u:"",`${t}//${s}${r}${o}${c}${u}`},Ye=(e,t)=>{const n=Ve(e);return Object.assign(n.searchParams,t),Xe(n)},Ke=(e,t)=>{const n=Ve(e);return t.forEach((e=>delete n.searchParams[e])),Xe(n)};var Je={urlParse:Ve,urlStringify:Xe,urlSetParams:Ye,urlDelParams:Ke},Ze=Object.freeze({__proto__:null,default:Je,urlDelParams:Ke,urlParse:Ve,urlSetParams:Ye,urlStringify:Xe});function Qe(e,t){window.open(t?Ye(e,t):e)}function et(e,t,n){let r=document.createElement("a");r.download=t,r.style.display="none",r.href=e,document.body.appendChild(r),r.click(),setTimeout((()=>{document.body.removeChild(r),r=null,x(n)&&n()}))}function tt(e,t,n){const r=URL.createObjectURL(e);et(r,t),setTimeout((()=>{URL.revokeObjectURL(r),x(n)&&n()}))}function nt(e,t,n){const{successCode:r=200,successCallback:o,failCallback:i}=E(n)?{successCode:200,successCallback:void 0,failCallback:void 0}:n,a=new XMLHttpRequest;a.open("GET",e,!0),a.responseType="blob",a.onload=function(){if(a.status===r)tt(a.response,t,o);else if(x(i)){const e=a.status,t=a.getResponseHeader("Content-Type");if(p(t)&&t.includes("application/json")){const t=new FileReader;t.onload=()=>{i({status:e,response:t.result})},t.readAsText(a.response)}else i(a)}},a.onerror=e=>{x(i)&&i({status:0,code:"ERROR_CONNECTION_REFUSED"})},a.send()}function rt(e,t,n,r){if(n=n.replace(`.${t}`,"")+`.${t}`,"json"===t){tt(new Blob([JSON.stringify(e,null,4)]),n)}else{if(!r||!r.length)throw new Error("未传入表头数据");if(!Array.isArray(e))throw new Error("data error! expected array!");const o=r.join(",")+"\n";let i="";e.forEach((e=>{i+=Object.values(e).join(",\t")+",\n"}));et("data:"+{csv:"text/csv",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}[t]+";charset=utf-8,\ufeff"+encodeURIComponent(o+i),n)}}var ot={downloadURL:Qe,downloadHref:et,downloadBlob:tt,crossOriginDownload:nt,downloadData:rt},it=Object.freeze({__proto__:null,crossOriginDownload:nt,default:ot,downloadBlob:tt,downloadData:rt,downloadHref:et,downloadURL:Qe});function at(e=1){return new Promise((t=>setTimeout(t,e)))}function st(e,t,n=1/0){return new Promise(((r,o)=>{const i=e[Symbol.iterator](),a=Math.min(e.length,n),s=[];let l,c=0,u=0;const d=()=>{if(l)return o(l);const n=i.next();if(n.done)return void(c===e.length&&r(s));const a=u++;t(n.value,a,e).then((e=>{c++,s[a]=e,d()})).catch((e=>{l=e,d()}))};for(let e=0;e<a;e++)d()}))}function lt(e,t){return e.then((e=>[null,e])).catch((e=>{if(t){return[Object.assign({},e,t),void 0]}return[e,void 0]}))}var ct={wait:at,asyncMap:st,safeAwait:lt},ut=Object.freeze({__proto__:null,asyncMap:st,default:ct,safeAwait:lt,wait:at});function dt(){return!!document.createElement("canvas").getContext}function ft(e,t){let n=document.createElement("input");n.setAttribute("id",String(Date.now())),n.setAttribute("type","file"),n.setAttribute("style","visibility:hidden"),n.setAttribute("accept",e),document.body.appendChild(n),n.click(),n.onchange=e=>{t(e.target.files),setTimeout((()=>{document.body.removeChild(n),n=null}))}}function pt({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r}){let o=n,i=r;return(n>e||r>t)&&(n/r>e/t?(o=e,i=Math.round(e*(r/n))):(i=t,o=Math.round(t*(n/r)))),{width:o,height:i}}function gt(e,t={mime:"image/jpeg",minFileSizeKB:50}){if(!(e instanceof File||e instanceof FileList))throw new Error(`${e} require be File or FileList`);if(!dt())throw new Error("Current runtime environment not support Canvas");const{quality:n,mime:r="image/jpeg",maxSize:o,minFileSizeKB:i=50}=A(t)?t:{};let a,s=n;if(n)s=n;else if(e instanceof File){const t=+parseInt((e.size/1024).toFixed(2));s=t<i?1:t<1024?.85:t<5120?.8:.75}return b(o)&&(a=o>=1200?o:1200),e instanceof FileList?Promise.all(Array.from(e).map((e=>gt(e,{maxSize:a,mime:r,quality:s})))):e instanceof File?new Promise((t=>{const n=[...e.name.split(".").slice(0,-1),{"image/webp":"webp","image/jpeg":"jpg","image/png":"png"}[r]].join("."),o=+parseInt((e.size/1024).toFixed(2));if(o<i)t({file:e});else{const i=new FileReader;i.onload=({target:{result:i}})=>{const l=new Image;l.onload=()=>{const c=document.createElement("canvas"),u=c.getContext("2d"),d=l.width,f=l.height,{width:p,height:g}=function({sizeKB:e,maxSize:t,originWidth:n,originHeight:r}){let o=n,i=r;if(b(t)){const{width:e,height:a}=pt({maxWidth:t,maxHeight:t,originWidth:n,originHeight:r});o=e,i=a}else if(e<500){const e=1200,t=1200,{width:a,height:s}=pt({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=a,i=s}else if(e<5120){const e=1400,t=1400,{width:a,height:s}=pt({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=a,i=s}else if(e<10240){const e=1600,t=1600,{width:a,height:s}=pt({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=a,i=s}else if(10240<=e){const e=n>15e3?8192:n>1e4?4096:2048,t=r>15e3?8192:r>1e4?4096:2048,{width:a,height:s}=pt({maxWidth:e,maxHeight:t,originWidth:n,originHeight:r});o=a,i=s}return{width:o,height:i}}({sizeKB:o,maxSize:a,originWidth:d,originHeight:f});c.width=p,c.height=g,u.clearRect(0,0,p,g),u.drawImage(l,0,0,p,g);const h=c.toDataURL(r,s),m=atob(h.split(",")[1]);let y=m.length;const S=new Uint8Array(new ArrayBuffer(y));for(;y--;)S[y]=m.charCodeAt(y);const w=new File([S],n,{type:r});t({file:w,bufferArray:S,origin:e,beforeSrc:i,afterSrc:h,beforeKB:o,afterKB:Number((w.size/1024).toFixed(2))})},l.src=i},i.readAsDataURL(e)}})):Promise.resolve(null)}var ht={supportCanvas:dt,chooseLocalFile:ft,compressImg:gt},mt=Object.freeze({__proto__:null,chooseLocalFile:ft,compressImg:gt,default:ht,supportCanvas:dt});function bt(e="请勿外传",t){const{rootContainer:n=document.body,width:r="300px",height:o="150px",textAlign:i="center",textBaseline:a="middle",font:s="20px PingFangSC-Medium,PingFang SC",fillStyle:l="rgba(189, 177, 167, .3)",rotate:c=-20,zIndex:u=2147483647,watermarkId:d="__wm"}=E(t)?{}:t,f=p(n)?document.querySelector(n):n;if(!f)throw new Error(`${n} is not valid Html Element or element selector`);const g=document.createElement("canvas");g.setAttribute("width",r),g.setAttribute("height",o);const h=g.getContext("2d");h.textAlign=i,h.textBaseline=a,h.font=s,h.fillStyle=l,h.rotate(Math.PI/180*c),h.fillText(e,parseFloat(r)/4,parseFloat(o)/2);const m=g.toDataURL(),b=document.querySelector(`#${d}`),y=b||document.createElement("div"),S=`opacity: 1 !important; display: block !important; visibility: visible !important; position:absolute; left:0; top:0; width:100%; height:100%; z-index:${u}; pointer-events:none; background-repeat:repeat; background-image:url('${m}')`;y.setAttribute("style",S),y.setAttribute("id",d),y.classList.add("nav-height"),b||(f.style.position="relative",f.appendChild(y));const w=window.MutationObserver||window.WebKitMutationObserver;if(w){let n=new w((function(){let r=document.querySelector(`#${d}`);if(r){const{opacity:o,zIndex:i,display:a,visibility:s}=(e=>{const t=getComputedStyle(e);return{opacity:t.getPropertyValue("opacity"),zIndex:t.getPropertyValue("z-index"),display:t.getPropertyValue("display"),visibility:t.getPropertyValue("visibility")}})(r);(r&&r.getAttribute("style")!==S||!r||"1"!==o||"2147483647"!==i||"block"!==a||"visible"!==s)&&(n.disconnect(),n=null,f.removeChild(r),r=null,bt(e,t))}else n.disconnect(),n=null,bt(e,t)}));n.observe(f,{attributes:!0,subtree:!0,childList:!0})}}var yt={genCanvasWM:bt},St=Object.freeze({__proto__:null,default:yt,genCanvasWM:bt});const wt=(e,t)=>{let n,r=!1;const o=function(...o){r||(clearTimeout(n),n=setTimeout((()=>{e.call(this,...o)}),t))};return o.cancel=()=>{clearTimeout(n),r=!0},o},Et=(e,t,n)=>{let r,o=!1,i=0;const a=function(...a){if(o)return;const s=Date.now(),l=()=>{i=s,e.call(this,...a)};if(0===i)return n?l():void(i=s);i+t-s>0?(clearTimeout(r),r=setTimeout((()=>l()),t)):l()};return a.cancel=()=>{clearTimeout(r),o=!0},a},At=e=>{let t,n=!1;return function(...r){return n||(n=!0,t=e.call(this,...r)),t}};function _t(e,t){if("undefined"!=typeof globalThis)globalThis[e]=t;else if("undefined"!=typeof window)window[e]=t;else if("undefined"!=typeof global)global[e]=t;else{if("undefined"==typeof self)throw new SyntaxError("当前环境下无法设置全局属性");self[e]=t}}function xt(e){return"undefined"!=typeof globalThis?globalThis[e]:"undefined"!=typeof window?window[e]:"undefined"!=typeof global?global[e]:"undefined"!=typeof self?self[e]:void 0}var vt={debounce:wt,throttle:Et,once:At,getGlobal:xt,setGlobal:_t},Tt=Object.freeze({__proto__:null,debounce:wt,default:vt,getGlobal:xt,once:At,setGlobal:_t,throttle:Et});const Ft=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),Ct=`${Y}${J}${K}`,Rt=(e,t)=>{let n=0,r=Ct;p(t)?(n=e,r=t):b(e)?n=e:p(e)&&(r=e);let o=Math.max(n,1),i="";const a=r.length-1;if(a<2)throw new Error("字符串池长度不能少于 2");for(;o--;){i+=r[Ft(0,a)]}return i};function jt(){if("undefined"==typeof URL||!URL.createObjectURL||"undefined"==typeof Blob){const e="0123456789abcdef",t="xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx";let n="";for(let r=0;r<t.length;r++){const o=Ft(0,15);n+="-"==t[r]||"4"==t[r]?t[r]:e[o]}return n}return/[^/]+$/.exec(URL.createObjectURL(new Blob).slice())[0]}var Nt={STRING_POOL:Ct,randomNumber:Ft,randomString:Rt,randomUuid:jt},Ot=Object.freeze({__proto__:null,STRING_POOL:Ct,default:Nt,randomNumber:Ft,randomString:Rt,randomUuid:jt});const Pt=`${Y}${J}${K}`,It="undefined"!=typeof BigInt,Dt=()=>xt("JSBI"),Lt=e=>It?BigInt(e):Dt().BigInt(e);function Mt(e,t=Pt){if(t.length<2)throw new Error("进制池长度不能少于 2");if(!It)throw new Error('需要安装 jsbi 模块并将 JSBI 设置为全局变量:\nimport JSBI from "jsbi"; window.JSBI = JSBI;');let n=Lt(e);const r=[],{length:o}=t,i=Lt(o),a=()=>{const e=Number(((e,t)=>It?e%t:Dt().remainder(e,t))(n,i));n=((e,t)=>It?e/t:Dt().divide(e,t))(n,i),r.unshift(t[e]),n>0&&a()};return a(),r.join("")}const Ut=(e,t,n={ratio:1e3,decimals:0,separator:" "})=>{const{ratio:r=1e3,decimals:o=0,separator:i=" "}=n,{length:a}=t;if(0===a)throw new Error("At least one unit is required");let s=Number(e),l=0;for(;s>=r&&l<a-1;)s/=r,l++;const c=s.toFixed(o),u=t[l];return String(c)+i+u};function $t(e,t={decimals:0,si:!1,separator:" "}){const{decimals:n=0,si:r=!1,separator:o=" ",baseUnit:i,maxUnit:a}=t;let s=r?["B","kB","MB","GB","TB","PB","EB","ZB","YB"]:["Byte","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];if(!E(i)){const e=s.findIndex((e=>e===i));-1!==e&&(s=s.slice(e))}if(!E(a)){const e=s.findIndex((e=>e===a));-1!==e&&s.splice(e+1)}return Ut(e,s,{ratio:r?1e3:1024,decimals:n,separator:o})}function kt(e,t){if(E(t))return parseInt(String(e)).toLocaleString();let n=0;return t>0&&(n=t),Number(Number(e).toFixed(n)).toLocaleString("en-US")}var zt={HEX_POOL:Pt,numberToHex:Mt,numberAbbr:Ut,humanFileSize:$t,formatNumber:kt,formatMoney:kt},Bt=Object.freeze({__proto__:null,HEX_POOL:Pt,default:zt,formatMoney:kt,formatNumber:kt,humanFileSize:$t,numberAbbr:Ut,numberToHex:Mt});let Ht=0,Gt=0;const qt=(e=18)=>{const t=Date.now();e=Math.max(e,18),t!==Gt&&(Gt=t,Ht=0);const n=`${t}`;let r="";const o=e-5-13;if(o>0){r=`${Ft(10**(o-1),10**o-1)}`}const i=((e,t=2)=>String(e).padStart(t,"0"))(Ht,5);return Ht++,`${n}${r}${i}`},Wt=e=>e[Ft(0,e.length-1)],Vt=(e,t)=>{let n=0,r=Pt;p(t)?(n=e,r=t):b(e)?n=e:p(e)&&(r=e);let o=Mt(qt(),r),i=n-o.length;if(i<=0)return o;for(;i--;)o+=Wt(r);return o};var Xt={UNIQUE_NUMBER_SAFE_LENGTH:18,uniqueNumber:qt,uniqueString:Vt},Yt=Object.freeze({__proto__:null,UNIQUE_NUMBER_SAFE_LENGTH:18,default:Xt,uniqueNumber:qt,uniqueString:Vt});function Kt(e,t,n){let r=250,o=13;const i=e.children[0];ge(t,12)<230?(i.style.maxWidth=ge(t,12)+20+50+"px",r=n.clientX+(ge(t,12)+50)-document.body.offsetWidth):(i.style.maxWidth="250px",r=n.clientX+230-document.body.offsetWidth),i.innerHTML=t,r>0&&(o-=r),e.style.top=n.clientY+23+"px",e.style.left=n.clientX+o+"px",e.style.maxWidth="250px";const a=e.getBoundingClientRect().top+i.offsetHeight-document.body.offsetHeight;a>0&&(e.style.top=n.clientY-a+"px")}const Jt={handleMouseEnter:function({rootContainer:e="#root",title:t,event:n,bgColor:r="#000",color:o="#fff"}){try{const i=p(e)?document.querySelector(e):e;if(!i)throw new Error(`${e} is not valid Html Element or element selector`);let a=null;const s="style-tooltip-inner1494304949567";if(!document.querySelector(`#${s}`)){const e=document.createElement("style");e.type="text/css",e.id=s,e.innerHTML=`\n .tooltip-inner1494304949567 {\n max-width: 250px;\n padding: 3px 8px;\n color: ${o};\n text-decoration: none;\n border-radius: 4px;\n text-align: left;\n background-color: ${r};\n }\n `,document.querySelector("head").appendChild(e)}if(a=document.querySelector("#customTitle1494304949567"),a)Kt(a,t,n);else{const e=document.createElement("div");e.id="customTitle1494304949567",e.style.cssText="z-index: 99999999; visibility: hidden; position: absolute;",e.innerHTML='<div class="tooltip-inner1494304949567" style="word-wrap: break-word; max-width: 44px;">皮肤</div>',i.appendChild(e),a=document.querySelector("#customTitle1494304949567"),t&&(Kt(a,t,n),a.style.visibility="visible")}}catch(e){console.error(e.message)}},handleMouseLeave:function(e="#root"){const t=p(e)?document.querySelector(e):e;let n=document.querySelector("#customTitle1494304949567");t&&n&&(t.removeChild(n),n=null)}};var Zt={tooltipEvent:Jt},Qt=Object.freeze({__proto__:null,default:Zt,tooltipEvent:Jt});const en={keyField:"key",childField:"children",pidField:"pid"},tn={childField:"children",nameField:"name",removeEmptyChild:!1,ignoreCase:!0};function nn(e,t,n={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){const{childField:r="children",reverse:o=!1,breadthFirst:i=!1,isDomNode:a=!1}=A(n)?n:{};let s=!1;const l=[],c=(n,o,u=0)=>{for(let d=n.length-1;d>=0&&!s;d--){const f=n[d];if(i)l.push({item:f,index:d,array:n,tree:e,parent:o,level:u});else{const i=t(f,d,n,e,o,u);if(!1===i){s=!0;break}if(!0===i)continue;f&&(a?N(f[r]):Array.isArray(f[r]))&&c(f[r],f,u+1)}}if(i)for(;l.length>0&&!s;){const e=l.shift(),{item:n,index:o,array:i,tree:u,parent:d,level:f}=e,p=t(n,o,i,u,d,f);if(!1===p){s=!0;break}!0!==p&&(n&&(a?N(n[r]):Array.isArray(n[r]))&&c(n[r],n,f+1))}},u=(n,o,c=0)=>{for(let d=0,f=n.length;d<f&&!s;d++){const f=n[d];if(i)l.push({item:f,index:d,array:n,tree:e,parent:o,level:c});else{const i=t(f,d,n,e,o,c);if(!1===i){s=!0;break}if(!0===i)continue;f&&(a?N(f[r]):Array.isArray(f[r]))&&u(f[r],f,c+1)}}if(i)for(;l.length>0&&!s;){const e=l.shift();if(!e)break;const{item:n,index:o,array:i,tree:c,parent:d,level:f}=e,p=t(n,o,i,c,d,f);if(!1===p){s=!0;break}!0!==p&&(n&&(a?N(n[r]):Array.isArray(n[r]))&&u(n[r],n,f+1))}};o?c(e,null,0):u(e,null,0),e=null}function rn(e,t,n={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){let r=null;return nn(e,((...e)=>{if(t(...e))return r=e[0],!1}),n),r}function on(e,t,n={childField:"children",reverse:!1,breadthFirst:!1,isDomNode:!1}){const r=[];return nn(e,((...e)=>{t(...e)&&r.push(e[0])}),n),r}function an(e,t,n={childField:"children",reverse:!1}){const{childField:r="children",reverse:o=!1}=A(n)?n:{};let i=!1;const a=[],s=(n,a,l,c=0)=>{if(o)for(let o=n.length-1;o>=0&&!i;o--){const u=n[o],d=t(u,o,n,e,a,c);if(!1===d){i=!0;break}!0!==d&&(l.push(k(d,[r])),u&&Array.isArray(u[r])?(l[l.length-1][r]=[],s(u[r],u,l[l.length-1][r],c+1)):delete d[r])}else for(let o=0;o<n.length&&!i;o++){const u=n[o],d=t(u,o,n,e,a,c);if(!1===d){i=!0;break}!0!==d&&(l.push(k(d,[r])),u&&Array.isArray(u[r])?(l[l.length-1][r]=[],s(u[r],u,l[l.length-1][r],c+1)):delete d[r])}};return s(e,null,a),e=null,a}function sn(e,t,n={childField:"children",keyField:"id"}){const{childField:r="children",keyField:o="id"}=A(n)?n:{},i=(e,t,n)=>e.reduce(((e,a)=>{const s=a[r];return[...e,t?{...a,parentId:t,parent:n}:a,...s&&s.length?i(s,a[o],a):[]]}),[]);return(e=>{let n=e.find((e=>e[o]===t));const{parent:r,parentId:i,...a}=n;let s=[t],l=[a];for(;n&&n.parentId;)s=[n.parentId,...s],l=[n.parent,...l],n=e.find((e=>e[o]===n.parentId));return[s,l]})(i(e))}function ln(e,t=en){const{keyField:n="key",childField:r="children",pidField:o="pid"}=A(t)?t:{},i=[],a={};for(let t=0,r=e.length;t<r;t++){const r=e[t];a[r[n]]=r}for(let t=0,n=e.length;t<n;t++){const n=e[t],s=a[n[o]];s?(s[r]||(s[r]=[])).push(n):i.push(n)}return e=null,i}function cn(e,t=en){const{keyField:n="key",childField:r="children",pidField:o="pid"}=A(t)?t:{};let i=[];for(let a=0,s=e.length;a<s;a++){const s=e[a],l={...s,[r]:[]};if(u(l,r)&&delete l[r],i.push(l),s[r]){const e=s[r].map((e=>({...e,[o]:s[n]||e.pid})));i=i.concat(cn(e,t))}}return i}function un(e,t,n=tn){if(!u(t,"filter")&&!t.keyword)return e;const r=[];for(let o=0,i=e.length;o<i;o++){const i=e[o],a=i[n.childField]&&i[n.childField].length>0?un(i[n.childField]||[],t,n):[];if((u(t,"filter")?t.filter(i):n.ignoreCase?i[n.nameField].toLowerCase().includes(t.keyword.toLowerCase()):i[n.nameField].includes(t.keyword))||a.length>0)if(i[n.childField])if(a.length>0)r.push({...i,[n.childField]:a});else if(n.removeEmptyChild){const{[n.childField]:e,...t}=i;r.push(t)}else r.push({...i,[n.childField]:[]});else{const{[n.childField]:e,...t}=i;r.push(t)}}return r}var dn={forEachDeep:nn,findDeep:rn,filterDeep:on,mapDeep:an,searchTreeById:sn,formatTree:ln,flatTree:cn,fuzzySearchTree:un},fn=Object.freeze({__proto__:null,default:dn,filterDeep:on,findDeep:rn,flatTree:cn,forEachDeep:nn,formatTree:ln,fuzzySearchTree:un,mapDeep:an,searchTreeById:sn});const pn=(e,t)=>{let n=0;const r=e.toString(),o=t.toString();return void 0!==r.split(".")[1]&&(n+=r.split(".")[1].length),void 0!==o.split(".")[1]&&(n+=o.split(".")[1].length),Number(r.replace(".",""))*Number(o.replace(".",""))/Math.pow(10,n)},gn=(e,t)=>{let n=0,r=0,o=0;try{n=e.toString().split(".")[1].length}catch(e){n=0}try{r=t.toString().split(".")[1].length}catch(e){r=0}return o=10**Math.max(n,r),(pn(e,o)+pn(t,o))/o},hn=(e,t)=>gn(e,-t),mn=(e,t)=>{let n=0,r=0,o=0,i=0;return void 0!==e.toString().split(".")[1]&&(n=e.toString().split(".")[1].length),void 0!==t.toString().split(".")[1]&&(r=t.toString().split(".")[1].length),o=Number(e.toString().replace(".","")),i=Number(t.toString().replace(".","")),o/i*Math.pow(10,r-n)};function bn(e,t=15){return+parseFloat(Number(e).toPrecision(t))}var yn={add:gn,subtract:hn,multiply:pn,divide:mn,strip:bn},Sn=Object.freeze({__proto__:null,add:gn,default:yn,divide:mn,multiply:pn,strip:bn,subtract:hn});const wn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",En=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;function An(e){let t,n,r,o,i="",a=0;const s=(e=String(e)).length,l=s%3;for(;a<s;){if((n=e.charCodeAt(a++))>255||(r=e.charCodeAt(a++))>255||(o=e.charCodeAt(a++))>255)throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");t=n<<16|r<<8|o,i+=wn.charAt(t>>18&63)+wn.charAt(t>>12&63)+wn.charAt(t>>6&63)+wn.charAt(63&t)}return l?i.slice(0,l-3)+"===".substring(l):i}function _n(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!En.test(e))throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");let t,n,r,o="",i=0;for(const a=(e+="==".slice(2-(3&e.length))).length;i<a;)t=wn.indexOf(e.charAt(i++))<<18|wn.indexOf(e.charAt(i++))<<12|(n=wn.indexOf(e.charAt(i++)))<<6|(r=wn.indexOf(e.charAt(i++))),o+=64===n?String.fromCharCode(t>>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return o}function xn(e){const t=E(xt("atob"))?_n(e):xt("atob")(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return E(xt("TextDecoder"))?function(e){const t=String.fromCharCode.apply(null,e);return decodeURIComponent(t)}(r):new(xt("TextDecoder"))("utf-8").decode(r)}function vn(e){const t=E(xt("TextEncoder"))?function(e){const t=encodeURIComponent(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}(e):(new(xt("TextEncoder"))).encode(e);let n="";const r=t.length;for(let e=0;e<r;e++)n+=String.fromCharCode(t[e]);return E(xt("btoa"))?An(n):xt("btoa")(n)}var Tn={weBtoa:An,weAtob:_n,b64decode:xn,b64encode:vn},Fn=Object.freeze({__proto__:null,b64decode:xn,b64encode:vn,default:Tn,weAtob:_n,weBtoa:An});const Cn=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,Rn=e=>Cn.test(e),jn=/^(?:(?:\+|00)86)?1\d{10}$/,Nn=e=>jn.test(e),On=/^(1[1-5]|2[1-3]|3[1-7]|4[1-6]|5[0-4]|6[1-5]|7[1]|8[1-2]|9[1])\d{4}(18|19|20)\d{2}[01]\d[0123]\d{4}[\dxX]$/,Pn=e=>{if(!On.test(e))return!1;const t=Number(e.slice(6,10)),n=Number(e.slice(10,12)),r=Number(e.slice(12,14)),o=new Date(t,n-1,r);if(!(o.getFullYear()===t&&o.getMonth()+1===n&&o.getDate()===r))return!1;const i=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2];let a=0;for(let t=0;t<17;t++)a+=Number(e.slice(t,t+1))*i[t];return["1","0","X","9","8","7","6","5","4","3","2"][a%11]===e.slice(-1)},In=/^(https?|ftp):\/\/([^\s/$.?#].[^\s]*)$/i,Dn=/^https?:\/\/([^\s/$.?#].[^\s]*)$/i,Ln=(e,t=!1)=>(t?In:Dn).test(e),Mn=/^(?:(?:\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])$/,Un=/^(([\da-fA-F]{1,4}:){7}[\da-fA-F]{1,4}|([\da-fA-F]{1,4}:){1,7}:|([\da-fA-F]{1,4}:){1,6}:[\da-fA-F]{1,4}|([\da-fA-F]{1,4}:){1,5}(:[\da-fA-F]{1,4}){1,2}|([\da-fA-F]{1,4}:){1,4}(:[\da-fA-F]{1,4}){1,3}|([\da-fA-F]{1,4}:){1,3}(:[\da-fA-F]{1,4}){1,4}|([\da-fA-F]{1,4}:){1,2}(:[\da-fA-F]{1,4}){1,5}|[\da-fA-F]{1,4}:((:[\da-fA-F]{1,4}){1,6})|:((:[\da-fA-F]{1,4}){1,7}|:)|fe80:(:[\da-fA-F]{0,4}){0,4}%[\da-zA-Z]+|::(ffff(:0{1,4})?:)?((25[0-5]|(2[0-4]|1?\d)?\d)\.){3}(25[0-5]|(2[0-4]|1?\d)?\d)|([\da-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1?\d)?\d)\.){3}(25[0-5]|(2[0-4]|1?\d)?\d))$/i,$n=e=>Mn.test(e),kn=e=>Un.test(e),zn=/^(-?[1-9]\d*|0)$/,Bn=e=>zn.test(e),Hn=/^-?([1-9]\d*|0)\.\d*[1-9]$/,Gn=e=>Hn.test(e),qn=e=>Bn(e)||Gn(e),Wn=/^\d+$/,Vn=e=>Wn.test(e);var Xn={EMAIL_REGEX:Cn,HTTP_URL_REGEX:Dn,IPV4_REGEX:Mn,IPV6_REGEX:Un,PHONE_REGEX:jn,URL_REGEX:In,isDigit:Vn,isEmail:Rn,isFloat:Gn,isIdNo:Pn,isInteger:Bn,isIpV4:$n,isIpV6:kn,isNumerical:qn,isPhone:Nn,isUrl:Ln},Yn=Object.freeze({__proto__:null,EMAIL_REGEX:Cn,HTTP_URL_REGEX:Dn,IPV4_REGEX:Mn,IPV6_REGEX:Un,PHONE_REGEX:jn,URL_REGEX:In,default:Xn,isDigit:Vn,isEmail:Rn,isFloat:Gn,isIdNo:Pn,isInteger:Bn,isIpV4:$n,isIpV6:kn,isNumerical:qn,isPhone:Nn,isUrl:Ln});function Kn(e){return[...new Set(e.trim().split(""))].join("")}function Jn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Zn(e,t){return new RegExp(`${Jn(e.trim())}\\s*([^${Jn(Kn(e))}${Jn(Kn(t))}\\s]*)\\s*${t.trim()}`,"g")}function Qn(e,t="{",n="}"){return Array.from(e.matchAll(Zn(t,n))).map((e=>E(e)?void 0:e[1]))}function er(e,t,n="{",r="}"){return e.replace(new RegExp(Zn(n,r)),(function(e,n){return u(t,n)?t[n]:e}))}function tr(e,t={}){const n=Object.keys(t),r=n.map((e=>t[e]));try{return new Function(...n,`return (() => { ${e} })()`)(...r)}catch(e){throw new Error(`代码执行失败: ${e.message}`)}}var nr={escapeRegExp:Jn,executeInScope:tr,parseVarFromString:Qn,replaceVarFromString:er,uniqueSymbol:Kn},rr=Object.freeze({__proto__:null,default:nr,escapeRegExp:Jn,executeInScope:tr,parseVarFromString:Qn,replaceVarFromString:er,uniqueSymbol:Kn});function or(e,t=new WeakMap){if(null===e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);if(e instanceof ArrayBuffer){const n=new ArrayBuffer(e.byteLength);return new Uint8Array(n).set(new Uint8Array(e)),t.set(e,n),n}if(ArrayBuffer.isView(e)){return new(0,e.constructor)(or(e.buffer,t),e.byteOffset,e.length)}if(e instanceof Date){const n=new Date(e.getTime());return t.set(e,n),n}if(e instanceof RegExp){const n=new RegExp(e.source,e.flags);return n.lastIndex=e.lastIndex,t.set(e,n),n}if(e instanceof Map){const n=new Map;return t.set(e,n),e.forEach(((e,r)=>{n.set(or(r,t),or(e,t))})),n}if(e instanceof Set){const n=new Set;return t.set(e,n),e.forEach((e=>{n.add(or(e,t))})),n}if(Array.isArray(e)){const n=new Array(e.length);t.set(e,n);for(let r=0,o=e.length;r<o;r++)r in e&&(n[r]=or(e[r],t));const r=Object.getOwnPropertyDescriptors(e);for(const e of Reflect.ownKeys(r))Object.defineProperty(n,e,{...r[e],value:or(r[e].value,t)});return n}const n=Object.create(Object.getPrototypeOf(e));t.set(e,n);const r=Object.getOwnPropertyDescriptors(e);for(const e of Reflect.ownKeys(r)){const o=r[e];"value"in o?o.value=or(o.value,t):(o.get&&(o.get=or(o.get,t)),o.set&&(o.set=or(o.set,t))),Object.defineProperty(n,e,o)}return n}var ir={cloneDeep:or},ar=Object.freeze({__proto__:null,cloneDeep:or,default:ir});const sr={MAP:"[object Map]",SET:"[object Set]",DATE:"[object Date]",REGEXP:"[object RegExp]",SYMBOL:"[object Symbol]",ARRAY_BUFFER:"[object ArrayBuffer]",DATA_VIEW:"[object DataView]",ARGUMENTS:"[object Arguments]"},{toString:lr,hasOwnProperty:cr}=Object.prototype,ur=e=>lr.call(e);function dr(e,t){return fr(e,t)}function fr(e,t,n=void 0){if(e===t)return!0;if(e!=e&&t!=t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e.constructor!==t.constructor)return!1;if(n||(n=new WeakMap),n.has(e))return n.get(e)===t;n.set(e,t);const r=ur(e);if(r!==ur(t))return!1;let o=!1;switch(r){case sr.DATE:o=+e==+t;break;case sr.REGEXP:o=""+e==""+t;break;case sr.SYMBOL:o=Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t);break;case sr.ARRAY_BUFFER:o=pr(e,t);break;case sr.DATA_VIEW:a=t,o=(i=e).byteLength===a.byteLength&&i.byteOffset===a.byteOffset&&pr(i.buffer,a.buffer);break;case sr.MAP:o=function(e,t,n){if(e.size!==t.size)return!1;for(const[r,o]of e){const e=t.get(r);if(void 0===e&&!t.has(r))return!1;if(!fr(o,e,n))return!1}return!0}(e,t,n);break;case sr.SET:o=function(e,t,n){if(e.size!==t.size)return!1;for(const r of e){if(t.has(r))continue;let e=!1;for(const o of t)if(fr(r,o,n)){e=!0;break}if(!e)return!1}return!0}(e,t,n);break;case sr.ARGUMENTS:default:o=Array.isArray(e)||ArrayBuffer.isView(e)?function(e,t,n){const r=e.length;if(r!==t.length)return!1;let o=r;for(;o--;)if(!fr(e[o],t[o],n))return!1;return!0}(e,t,n):function(e,t,n){const r=Reflect.ownKeys(e),o=Reflect.ownKeys(t);if(r.length!==o.length)return!1;for(let o=0;o<r.length;o++){const i=r[o];if(!cr.call(t,i)||!fr(e[i],t[i],n))return!1}return!0}(e,t,n)}var i,a;return o}function pr(e,t){if(e.byteLength!==t.byteLength)return!1;const n=new Uint8Array(e),r=new Uint8Array(t);let o=e.byteLength;for(;o--;)if(n[o]!==r[o])return!1;return!0}var gr={isEqual:dr},hr=Object.freeze({__proto__:null,default:gr,isEqual:dr});class mr{static ENTITY_MAP={"&":"&","<":"<",">":">",'"':""","'":"'"};static NAMED_ENTITIES={""":'"',"&":"&","<":"<",">":">"," ":" ","©":"©","™":"™","®":"®"};static encode(e,t="unicode",n=!1){const r=[];for(const o of e){const e=o.codePointAt(0);"html"===t&&this.ENTITY_MAP[o]?r.push(this.ENTITY_MAP[o]):!n&&e>=32&&e<=126?r.push(o):"unicode"===t?e>65535?r.push(`\\u{${e.toString(16).toUpperCase()}}`):r.push(`\\u${e.toString(16).toUpperCase().padStart(4,"0")}`):r.push(`&#${e};`)}return r.join("")}static decode(e,t=!1){if(!e)return"";let n=e.replace(/\\u(?:\{([0-9a-fA-F]+)\}|([0-9a-fA-F]{4}))/g,((e,t,n)=>String.fromCodePoint(parseInt(t||n,16)))).replace(/&#(x?)([0-9a-fA-F]+);/g,((e,t,n)=>String.fromCodePoint(parseInt(n,t?16:10)))).replace(/&[a-z0-9]+;/gi,(e=>this.NAMED_ENTITIES[e]||e));return t&&(n=n.replace(/\u00A0/g," ")),n}}var br={UnicodeToolkit:mr},yr={...s,...Ee,...Te,...Me,...be,...it,...W,...ze,...We,...ae,...P,...Ze,...ut,...mt,...St,...Tt,...Ot,...Bt,...Yt,...Qt,...fn,...Sn,...Fn,...Yn,...rr,...ar,...hr,...Object.freeze({__proto__:null,UnicodeToolkit:mr,default:br})};e.EMAIL_REGEX=Cn,e.HEX_POOL=Pt,e.HTTP_URL_REGEX=Dn,e.IPV4_REGEX=Mn,e.IPV6_REGEX=Un,e.PHONE_REGEX=jn,e.STRING_ARABIC_NUMERALS=Y,e.STRING_LOWERCASE_ALPHA=K,e.STRING_POOL=Ct,e.STRING_UPPERCASE_ALPHA=J,e.UNIQUE_NUMBER_SAFE_LENGTH=18,e.URL_REGEX=In,e.UnicodeToolkit=mr,e.add=gn,e.addClass=ce,e.arrayEach=t,e.arrayEachAsync=n,e.arrayInsertBefore=r,e.arrayLike=d,e.arrayRemove=o,e.asyncMap=st,e.b64decode=xn,e.b64encode=vn,e.calculateDate=Ie,e.calculateDateTime=De,e.chooseLocalFile=ft,e.cloneDeep=or,e.compressImg=gt,e.cookieDel=xe,e.cookieGet=Ae,e.cookieSet=_e,e.copyText=ye,e.crossOriginDownload=nt,e.dateParse=je,e.dateToEnd=Oe,e.dateToStart=Ne,e.debounce=wt,e.default=yr,e.diffArray=i,e.divide=mn,e.downloadBlob=tt,e.downloadData=rt,e.downloadHref=et,e.downloadURL=Qe,e.escapeRegExp=Jn,e.executeInScope=tr,e.fallbackCopyText=Se,e.filterDeep=on,e.findDeep=rn,e.flatTree=cn,e.forEachDeep=nn,e.formatDate=Pe,e.formatMoney=kt,e.formatNumber=kt,e.formatTree=ln,e.fuzzySearchTree=un,e.genCanvasWM=bt,e.getComputedCssVal=pe,e.getGlobal=xt,e.getStrWidthPx=ge,e.getStyle=fe,e.hasClass=se,e.humanFileSize=$t,e.isArray=_,e.isBigInt=m,e.isBoolean=g,e.isDate=T,e.isDigit=Vn,e.isEmail=Rn,e.isEmpty=j,e.isEqual=dr,e.isError=F,e.isFloat=Gn,e.isFunction=x,e.isIdNo=Pn,e.isInteger=Bn,e.isIpV4=$n,e.isIpV6=kn,e.isJsonString=R,e.isNaN=v,e.isNodeList=N,e.isNull=S,e.isNullOrUnDef=E,e.isNullish=E,e.isNumber=b,e.isNumerical=qn,e.isObject=A,e.isPhone=Nn,e.isPlainObject=D,e.isPrimitive=w,e.isRegExp=C,e.isString=p,e.isSymbol=h,e.isUndefined=y,e.isUrl=Ln,e.isValidDate=Fe,e.mapDeep=an,e.multiply=pn,e.numberAbbr=Ut,e.numberToHex=Mt,e.objectAssign=B,e.objectEach=L,e.objectEachAsync=M,e.objectFill=H,e.objectGet=G,e.objectHas=u,e.objectMap=U,e.objectMerge=B,e.objectOmit=k,e.objectPick=$,e.once=At,e.parseQueryParams=oe,e.parseVarFromString=Qn,e.pathJoin=$e,e.pathNormalize=Ue,e.qsParse=Be,e.qsStringify=Ge,e.randomNumber=Ft,e.randomString=Rt,e.randomUuid=jt,e.removeClass=ue,e.replaceVarFromString=er,e.safeAwait=lt,e.searchTreeById=sn,e.select=he,e.setGlobal=_t,e.setStyle=de,e.stringAssign=te,e.stringCamelCase=V,e.stringEscapeHtml=ne,e.stringFill=re,e.stringFormat=Q,e.stringKebabCase=X,e.strip=bn,e.subtract=hn,e.supportCanvas=dt,e.throttle=Et,e.tooltipEvent=Jt,e.typeIs=f,e.uniqueNumber=qt,e.uniqueString=Vt,e.uniqueSymbol=Kn,e.urlDelParams=Ke,e.urlParse=Ve,e.urlSetParams=Ye,e.urlStringify=Xe,e.wait=at,e.weAtob=_n,e.weBtoa=An,Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sculp-js",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.19.0",
|
|
4
4
|
"description": "Utils function library for modern javascript",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prepare": "husky install",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"docs:preview": "node scripts/docs-preview.js",
|
|
22
22
|
"docs:deploy": "npm run docs:gen-api && npm run docs:sync && npm run docs:build"
|
|
23
23
|
},
|
|
24
|
-
"main": "./dist/cjs/index.
|
|
25
|
-
"module": "./dist/esm/index.
|
|
24
|
+
"main": "./dist/cjs/index.cjs",
|
|
25
|
+
"module": "./dist/esm/index.mjs",
|
|
26
26
|
"types": "./dist/types/index.d.ts",
|
|
27
27
|
"browser": "./dist/umd/index.min.js",
|
|
28
28
|
"unpkg": "./dist/umd/index.min.js",
|
|
@@ -117,206 +117,178 @@
|
|
|
117
117
|
},
|
|
118
118
|
"exports": {
|
|
119
119
|
".": {
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"default": "./dist/esm/index.
|
|
124
|
-
"types": "./dist/types/index.d.ts"
|
|
120
|
+
"types": "./dist/types/index.d.ts",
|
|
121
|
+
"import": "./dist/esm/index.mjs",
|
|
122
|
+
"require": "./dist/cjs/index.cjs",
|
|
123
|
+
"default": "./dist/esm/index.mjs"
|
|
125
124
|
},
|
|
125
|
+
"./package.json": "./package.json",
|
|
126
126
|
"./array": {
|
|
127
|
-
"import": "./dist/esm/array.
|
|
128
|
-
"require": "./dist/cjs/array.
|
|
129
|
-
"
|
|
130
|
-
"default": "./dist/esm/array.js",
|
|
127
|
+
"import": "./dist/esm/array.mjs",
|
|
128
|
+
"require": "./dist/cjs/array.cjs",
|
|
129
|
+
"default": "./dist/esm/array.mjs",
|
|
131
130
|
"types": "./dist/types/array.d.ts"
|
|
132
131
|
},
|
|
133
132
|
"./async": {
|
|
134
|
-
"import": "./dist/esm/async.
|
|
135
|
-
"require": "./dist/cjs/async.
|
|
136
|
-
"
|
|
137
|
-
"default": "./dist/esm/async.js",
|
|
133
|
+
"import": "./dist/esm/async.mjs",
|
|
134
|
+
"require": "./dist/cjs/async.cjs",
|
|
135
|
+
"default": "./dist/esm/async.mjs",
|
|
138
136
|
"types": "./dist/types/async.d.ts"
|
|
139
137
|
},
|
|
140
138
|
"./base64": {
|
|
141
|
-
"import": "./dist/esm/base64.
|
|
142
|
-
"require": "./dist/cjs/base64.
|
|
143
|
-
"
|
|
144
|
-
"default": "./dist/esm/base64.js",
|
|
139
|
+
"import": "./dist/esm/base64.mjs",
|
|
140
|
+
"require": "./dist/cjs/base64.cjs",
|
|
141
|
+
"default": "./dist/esm/base64.mjs",
|
|
145
142
|
"types": "./dist/types/base64.d.ts"
|
|
146
143
|
},
|
|
147
144
|
"./clipboard": {
|
|
148
|
-
"import": "./dist/esm/clipboard.
|
|
149
|
-
"require": "./dist/cjs/clipboard.
|
|
150
|
-
"
|
|
151
|
-
"default": "./dist/esm/clipboard.js",
|
|
145
|
+
"import": "./dist/esm/clipboard.mjs",
|
|
146
|
+
"require": "./dist/cjs/clipboard.cjs",
|
|
147
|
+
"default": "./dist/esm/clipboard.mjs",
|
|
152
148
|
"types": "./dist/types/clipboard.d.ts"
|
|
153
149
|
},
|
|
154
150
|
"./cloneDeep": {
|
|
155
|
-
"import": "./dist/esm/cloneDeep.
|
|
156
|
-
"require": "./dist/cjs/cloneDeep.
|
|
157
|
-
"
|
|
158
|
-
"default": "./dist/esm/cloneDeep.js",
|
|
151
|
+
"import": "./dist/esm/cloneDeep.mjs",
|
|
152
|
+
"require": "./dist/cjs/cloneDeep.cjs",
|
|
153
|
+
"default": "./dist/esm/cloneDeep.mjs",
|
|
159
154
|
"types": "./dist/types/cloneDeep.d.ts"
|
|
160
155
|
},
|
|
161
156
|
"./cookie": {
|
|
162
|
-
"import": "./dist/esm/cookie.
|
|
163
|
-
"require": "./dist/cjs/cookie.
|
|
164
|
-
"
|
|
165
|
-
"default": "./dist/esm/cookie.js",
|
|
157
|
+
"import": "./dist/esm/cookie.mjs",
|
|
158
|
+
"require": "./dist/cjs/cookie.cjs",
|
|
159
|
+
"default": "./dist/esm/cookie.mjs",
|
|
166
160
|
"types": "./dist/types/cookie.d.ts"
|
|
167
161
|
},
|
|
168
162
|
"./date": {
|
|
169
|
-
"import": "./dist/esm/date.
|
|
170
|
-
"require": "./dist/cjs/date.
|
|
171
|
-
"
|
|
172
|
-
"default": "./dist/esm/date.js",
|
|
163
|
+
"import": "./dist/esm/date.mjs",
|
|
164
|
+
"require": "./dist/cjs/date.cjs",
|
|
165
|
+
"default": "./dist/esm/date.mjs",
|
|
173
166
|
"types": "./dist/types/date.d.ts"
|
|
174
167
|
},
|
|
175
168
|
"./dom": {
|
|
176
|
-
"import": "./dist/esm/dom.
|
|
177
|
-
"require": "./dist/cjs/dom.
|
|
178
|
-
"
|
|
179
|
-
"default": "./dist/esm/dom.js",
|
|
169
|
+
"import": "./dist/esm/dom.mjs",
|
|
170
|
+
"require": "./dist/cjs/dom.cjs",
|
|
171
|
+
"default": "./dist/esm/dom.mjs",
|
|
180
172
|
"types": "./dist/types/dom.d.ts"
|
|
181
173
|
},
|
|
182
174
|
"./download": {
|
|
183
|
-
"import": "./dist/esm/download.
|
|
184
|
-
"require": "./dist/cjs/download.
|
|
185
|
-
"
|
|
186
|
-
"default": "./dist/esm/download.js",
|
|
175
|
+
"import": "./dist/esm/download.mjs",
|
|
176
|
+
"require": "./dist/cjs/download.cjs",
|
|
177
|
+
"default": "./dist/esm/download.mjs",
|
|
187
178
|
"types": "./dist/types/download.d.ts"
|
|
188
179
|
},
|
|
189
180
|
"./file": {
|
|
190
|
-
"import": "./dist/esm/file.
|
|
191
|
-
"require": "./dist/cjs/file.
|
|
192
|
-
"
|
|
193
|
-
"default": "./dist/esm/file.js",
|
|
181
|
+
"import": "./dist/esm/file.mjs",
|
|
182
|
+
"require": "./dist/cjs/file.cjs",
|
|
183
|
+
"default": "./dist/esm/file.mjs",
|
|
194
184
|
"types": "./dist/types/file.d.ts"
|
|
195
185
|
},
|
|
196
186
|
"./func": {
|
|
197
|
-
"import": "./dist/esm/func.
|
|
198
|
-
"require": "./dist/cjs/func.
|
|
199
|
-
"
|
|
200
|
-
"default": "./dist/esm/func.js",
|
|
187
|
+
"import": "./dist/esm/func.mjs",
|
|
188
|
+
"require": "./dist/cjs/func.cjs",
|
|
189
|
+
"default": "./dist/esm/func.mjs",
|
|
201
190
|
"types": "./dist/types/func.d.ts"
|
|
202
191
|
},
|
|
203
192
|
"./isEqual": {
|
|
204
|
-
"import": "./dist/esm/isEqual.
|
|
205
|
-
"require": "./dist/cjs/isEqual.
|
|
206
|
-
"
|
|
207
|
-
"default": "./dist/esm/isEqual.js",
|
|
193
|
+
"import": "./dist/esm/isEqual.mjs",
|
|
194
|
+
"require": "./dist/cjs/isEqual.cjs",
|
|
195
|
+
"default": "./dist/esm/isEqual.mjs",
|
|
208
196
|
"types": "./dist/types/isEqual.d.ts"
|
|
209
197
|
},
|
|
210
198
|
"./math": {
|
|
211
|
-
"import": "./dist/esm/math.
|
|
212
|
-
"require": "./dist/cjs/math.
|
|
213
|
-
"
|
|
214
|
-
"default": "./dist/esm/math.js",
|
|
199
|
+
"import": "./dist/esm/math.mjs",
|
|
200
|
+
"require": "./dist/cjs/math.cjs",
|
|
201
|
+
"default": "./dist/esm/math.mjs",
|
|
215
202
|
"types": "./dist/types/math.d.ts"
|
|
216
203
|
},
|
|
217
204
|
"./number": {
|
|
218
|
-
"import": "./dist/esm/number.
|
|
219
|
-
"require": "./dist/cjs/number.
|
|
220
|
-
"
|
|
221
|
-
"default": "./dist/esm/number.js",
|
|
205
|
+
"import": "./dist/esm/number.mjs",
|
|
206
|
+
"require": "./dist/cjs/number.cjs",
|
|
207
|
+
"default": "./dist/esm/number.mjs",
|
|
222
208
|
"types": "./dist/types/number.d.ts"
|
|
223
209
|
},
|
|
224
210
|
"./object": {
|
|
225
|
-
"import": "./dist/esm/object.
|
|
226
|
-
"require": "./dist/cjs/object.
|
|
227
|
-
"
|
|
228
|
-
"default": "./dist/esm/object.js",
|
|
211
|
+
"import": "./dist/esm/object.mjs",
|
|
212
|
+
"require": "./dist/cjs/object.cjs",
|
|
213
|
+
"default": "./dist/esm/object.mjs",
|
|
229
214
|
"types": "./dist/types/object.d.ts"
|
|
230
215
|
},
|
|
231
216
|
"./path": {
|
|
232
|
-
"import": "./dist/esm/path.
|
|
233
|
-
"require": "./dist/cjs/path.
|
|
234
|
-
"
|
|
235
|
-
"default": "./dist/esm/path.js",
|
|
217
|
+
"import": "./dist/esm/path.mjs",
|
|
218
|
+
"require": "./dist/cjs/path.cjs",
|
|
219
|
+
"default": "./dist/esm/path.mjs",
|
|
236
220
|
"types": "./dist/types/path.d.ts"
|
|
237
221
|
},
|
|
238
222
|
"./qs": {
|
|
239
|
-
"import": "./dist/esm/qs.
|
|
240
|
-
"require": "./dist/cjs/qs.
|
|
241
|
-
"
|
|
242
|
-
"default": "./dist/esm/qs.js",
|
|
223
|
+
"import": "./dist/esm/qs.mjs",
|
|
224
|
+
"require": "./dist/cjs/qs.cjs",
|
|
225
|
+
"default": "./dist/esm/qs.mjs",
|
|
243
226
|
"types": "./dist/types/qs.d.ts"
|
|
244
227
|
},
|
|
245
228
|
"./random": {
|
|
246
|
-
"import": "./dist/esm/random.
|
|
247
|
-
"require": "./dist/cjs/random.
|
|
248
|
-
"
|
|
249
|
-
"default": "./dist/esm/random.js",
|
|
229
|
+
"import": "./dist/esm/random.mjs",
|
|
230
|
+
"require": "./dist/cjs/random.cjs",
|
|
231
|
+
"default": "./dist/esm/random.mjs",
|
|
250
232
|
"types": "./dist/types/random.d.ts"
|
|
251
233
|
},
|
|
252
234
|
"./string": {
|
|
253
|
-
"import": "./dist/esm/string.
|
|
254
|
-
"require": "./dist/cjs/string.
|
|
255
|
-
"
|
|
256
|
-
"default": "./dist/esm/string.js",
|
|
235
|
+
"import": "./dist/esm/string.mjs",
|
|
236
|
+
"require": "./dist/cjs/string.cjs",
|
|
237
|
+
"default": "./dist/esm/string.mjs",
|
|
257
238
|
"types": "./dist/types/string.d.ts"
|
|
258
239
|
},
|
|
259
240
|
"./tooltip": {
|
|
260
|
-
"import": "./dist/esm/tooltip.
|
|
261
|
-
"require": "./dist/cjs/tooltip.
|
|
262
|
-
"
|
|
263
|
-
"default": "./dist/esm/tooltip.js",
|
|
241
|
+
"import": "./dist/esm/tooltip.mjs",
|
|
242
|
+
"require": "./dist/cjs/tooltip.cjs",
|
|
243
|
+
"default": "./dist/esm/tooltip.mjs",
|
|
264
244
|
"types": "./dist/types/tooltip.d.ts"
|
|
265
245
|
},
|
|
266
246
|
"./tree": {
|
|
267
|
-
"import": "./dist/esm/tree.
|
|
268
|
-
"require": "./dist/cjs/tree.
|
|
269
|
-
"
|
|
270
|
-
"default": "./dist/esm/tree.js",
|
|
247
|
+
"import": "./dist/esm/tree.mjs",
|
|
248
|
+
"require": "./dist/cjs/tree.cjs",
|
|
249
|
+
"default": "./dist/esm/tree.mjs",
|
|
271
250
|
"types": "./dist/types/tree.d.ts"
|
|
272
251
|
},
|
|
273
252
|
"./type": {
|
|
274
|
-
"import": "./dist/esm/type.
|
|
275
|
-
"require": "./dist/cjs/type.
|
|
276
|
-
"
|
|
277
|
-
"default": "./dist/esm/type.js",
|
|
253
|
+
"import": "./dist/esm/type.mjs",
|
|
254
|
+
"require": "./dist/cjs/type.cjs",
|
|
255
|
+
"default": "./dist/esm/type.mjs",
|
|
278
256
|
"types": "./dist/types/type.d.ts"
|
|
279
257
|
},
|
|
280
258
|
"./unique": {
|
|
281
|
-
"import": "./dist/esm/unique.
|
|
282
|
-
"require": "./dist/cjs/unique.
|
|
283
|
-
"
|
|
284
|
-
"default": "./dist/esm/unique.js",
|
|
259
|
+
"import": "./dist/esm/unique.mjs",
|
|
260
|
+
"require": "./dist/cjs/unique.cjs",
|
|
261
|
+
"default": "./dist/esm/unique.mjs",
|
|
285
262
|
"types": "./dist/types/unique.d.ts"
|
|
286
263
|
},
|
|
287
264
|
"./url": {
|
|
288
|
-
"import": "./dist/esm/url.
|
|
289
|
-
"require": "./dist/cjs/url.
|
|
290
|
-
"
|
|
291
|
-
"default": "./dist/esm/url.js",
|
|
265
|
+
"import": "./dist/esm/url.mjs",
|
|
266
|
+
"require": "./dist/cjs/url.cjs",
|
|
267
|
+
"default": "./dist/esm/url.mjs",
|
|
292
268
|
"types": "./dist/types/url.d.ts"
|
|
293
269
|
},
|
|
294
270
|
"./unicodeToolkit": {
|
|
295
|
-
"import": "./dist/esm/unicodeToolkit.
|
|
296
|
-
"require": "./dist/cjs/unicodeToolkit.
|
|
297
|
-
"
|
|
298
|
-
"default": "./dist/esm/unicodeToolkit.js",
|
|
271
|
+
"import": "./dist/esm/unicodeToolkit.mjs",
|
|
272
|
+
"require": "./dist/cjs/unicodeToolkit.cjs",
|
|
273
|
+
"default": "./dist/esm/unicodeToolkit.mjs",
|
|
299
274
|
"types": "./dist/types/unicodeToolkit.d.ts"
|
|
300
275
|
},
|
|
301
276
|
"./validator": {
|
|
302
|
-
"import": "./dist/esm/validator.
|
|
303
|
-
"require": "./dist/cjs/validator.
|
|
304
|
-
"
|
|
305
|
-
"default": "./dist/esm/validator.js",
|
|
277
|
+
"import": "./dist/esm/validator.mjs",
|
|
278
|
+
"require": "./dist/cjs/validator.cjs",
|
|
279
|
+
"default": "./dist/esm/validator.mjs",
|
|
306
280
|
"types": "./dist/types/validator.d.ts"
|
|
307
281
|
},
|
|
308
282
|
"./variable": {
|
|
309
|
-
"import": "./dist/esm/variable.
|
|
310
|
-
"require": "./dist/cjs/variable.
|
|
311
|
-
"
|
|
312
|
-
"default": "./dist/esm/variable.js",
|
|
283
|
+
"import": "./dist/esm/variable.mjs",
|
|
284
|
+
"require": "./dist/cjs/variable.cjs",
|
|
285
|
+
"default": "./dist/esm/variable.mjs",
|
|
313
286
|
"types": "./dist/types/variable.d.ts"
|
|
314
287
|
},
|
|
315
288
|
"./watermark": {
|
|
316
|
-
"import": "./dist/esm/watermark.
|
|
317
|
-
"require": "./dist/cjs/watermark.
|
|
318
|
-
"
|
|
319
|
-
"default": "./dist/esm/watermark.js",
|
|
289
|
+
"import": "./dist/esm/watermark.mjs",
|
|
290
|
+
"require": "./dist/cjs/watermark.cjs",
|
|
291
|
+
"default": "./dist/esm/watermark.mjs",
|
|
320
292
|
"types": "./dist/types/watermark.d.ts"
|
|
321
293
|
}
|
|
322
294
|
},
|