nhanh-pure-function 3.0.4 → 3.0.5

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.
@@ -51,7 +51,7 @@ export declare class _Browser_KeyedWindowManager {
51
51
  static closeAll(): void;
52
52
  }
53
53
  /**
54
- * 计算内容可用宽高及边距(考虑设备DPI)
54
+ * 计算纸张内容可用宽高及边距(考虑设备DPI)
55
55
  * 确保:contentWidth + 2*paddingPx = 纸张宽度像素
56
56
  * @param type 纸张类型
57
57
  * @param padding 边距(毫米)
package/dist/index.cjs.js CHANGED
@@ -1,3 +1,3 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".no-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}")),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})();
2
- "use strict";var ft=Object.defineProperty;var rt=n=>{throw TypeError(n)};var pt=(n,e,t)=>e in n?ft(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var C=(n,e,t)=>pt(n,typeof e!="symbol"?e+"":e,t),ot=(n,e,t)=>e.has(n)||rt("Cannot "+t);var u=(n,e,t)=>(ot(n,e,"read from private field"),t?t.call(n):e.get(n)),f=(n,e,t)=>e.has(n)?rt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),m=(n,e,t,i)=>(ot(n,e,"write to private field"),i?i.call(n,t):e.set(n,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function gt(n,e=500){let t,i=!0;function o(r){if(!i)return;t||(t=r);let a=Math.min((r-t)/e,1);n(a),r-t<e&&requestAnimationFrame(o)}return requestAnimationFrame(o),()=>i=!1}function _t(n,e,t,i,o=2){let r=n,a=!1,s=1,c=n,l=e,h=t;const d=()=>{const x=(l-c)/h;return Number(x.toFixed(o))};let p=d();const y=x=>Math.min(Math.max(x,c),l),_=x=>Number(x.toFixed(o)),T=(x,H,V)=>{const U=[];return x>=H&&U.push("最小值必须小于最大值"),V<=0?U.push("分段数必须为正数"):d()==0&&U.push("数值精度过低,致使动画步长为 0"),U},O=(x,H,V)=>{const U=T(x,H,V);return U.length>0?(console.error(`参数更新失败: ${U.join("; ")}`),!1):(c=x,l=H,h=V,p=d(),r=y(r),!0)},X=()=>{a&&(s=r>=l?-1:r<=c?1:s,r=y(r+p*s),i(_(r)),requestAnimationFrame(X))};return{play(x=r){if(r=y(x),T(c,l,h).length)return console.error("配置参数错误",this.getParams());a||(a=!0,X())},pause(){a=!1},getCurrent:()=>_(r),isPlaying:()=>a,updateParams:O,getParams:()=>({min:c,max:l,steps:h,precision:o,stepSize:p})}}function wt(n,e,t,i,o=2){if(t<=0)return console.error("动画步数 必须为正数");const r=d=>Number(d.toFixed(o)),a=e-n,s=r(Math.abs(a)/t);if(s===0)return console.error("数值精度过低,致使动画步长为 0");const c=Math.sign(a);let l=n;const h=()=>{l=r(l+s*c),(c>0?l<e:l>e)?(i(l),requestAnimationFrame(h)):i(e)};h()}function yt(n,e="image/png"){try{let t,i=e;if(n instanceof File)return URL.createObjectURL(n);if(typeof n=="string"){let r=n;const a=r.match(/^data:([^;]*)(;base64)?,(.*)$/i);if(a){if(!a[2])return console.error("无效的数据 URL:缺少 base64 编码声明");if(i=a[1]||i,r=a[3],!r)return console.error("数据 URL 包含空有效负载")}r=r.replace(/[^A-Za-z0-9+/=]/g,"");const s=atob(r);t=new Uint8Array(s.length);for(let c=0;c<s.length;c++)t[c]=s.charCodeAt(c)}else if(n instanceof ArrayBuffer)t=new Uint8Array(n);else if(n instanceof Uint8Array)t=n;else return console.error("不支持的数据类型。应为 Base64 字符串、ArrayBuffer 或 Uint8Array");const o=new Blob([t],{type:i});return URL.createObjectURL(o)}catch(t){return console.error("数据到 ImageURL 的转换失败:",t.message,t.stack||"没有可用的堆栈跟踪"),null}}const xt={".mp3":"audio/mpeg",".mp4":"video/mp4",".m4a":"audio/mp4",".aac":"audio/aac",".ogg":"audio/ogg",".wav":"audio/wav",".flac":"audio/flac",".opus":"audio/opus",".webm":"video/webm",".avi":"video/x-msvideo",".mov":"video/quicktime",".wmv":"video/x-ms-wmv",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".bmp":"image/bmp",".tiff":"image/tiff",".ico":"image/vnd.microsoft.icon",".svg":"image/svg+xml",".webp":"image/webp",".heif":"image/heif",".heic":"image/heic",".json":"application/json",".xml":"application/xml",".html":"text/html",".htm":"text/html",".css":"text/css",".js":"application/javascript",".ts":"application/typescript",".csv":"text/csv",".tsv":"text/tab-separated-values",".txt":"text/plain",".md":"text/markdown",".rtf":"application/rtf",".pdf":"application/pdf",".zip":"application/zip",".rar":"application/x-rar-compressed",".tar":"application/x-tar",".gz":"application/gzip",".7z":"application/x-7z-compressed",".exe":"application/x-msdownload",".apk":"application/vnd.android.package-archive",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".xls":"application/vnd.ms-excel",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".ppt":"application/vnd.ms-powerpoint",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".odt":"application/vnd.oasis.opendocument.text",".ods":"application/vnd.oasis.opendocument.spreadsheet",".odp":"application/vnd.oasis.opendocument.presentation",".jsonld":"application/ld+json",".yaml":"application/x-yaml",".yml":"application/x-yaml",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject",".map":"application/json"},tt={image:[".jpg",".jpeg",".png",".gif",".bmp",".webp",".tiff",".svg",".heif",".heic",".ico",".raw",".jfif",".avif",".png8",".indd",".eps",".ai"],ppt:[".ppt",".pptx",".odp"],word:[".doc",".docx",".odt",".rtf"],excel:[".xls",".xlsx",".ods",".csv",".tsv"],pdf:[".pdf"],text:[".txt",".csv",".md",".json",".yaml",".yml",".log",".ini",".rtf"],audio:[".mp3",".wav",".ogg",".flac",".aac",".wma",".m4a",".alac",".ape",".opus",".amr",".ra",".mid",".midi",".aiff",".pcm",".au",".wavpack",".spx"],video:[".mp4",".avi",".mkv",".mov",".wmv",".flv",".webm",".mpg",".mpeg",".3gp",".vob",".ogv",".m4v",".ts",".rm",".rmvb",".m2ts",".divx",".xvid",".swf",".f4v"],archive:[".zip",".rar",".tar",".gz",".bz2",".xz",".7z",".tar.gz",".tar.bz2",".tar.xz",".tar.lz",".tar.lzma",".cab",".iso",".dmg",".tgz",".apk",".gz2",".tar.zst"],code:[".js",".ts",".py",".java",".cpp",".c",".html",".css",".scss",".less",".sass",".php",".rb",".go",".swift",".rs",".kt",".scala",".lua",".pl",".m",".h",".xml",".json",".yaml",".yml",".toml",".vue",".ejs",".handlebars",".jinja",".dart"],font:[".woff",".woff2",".ttf",".otf",".eot",".svg",".ttc",".fnt",".fon",".otc"],database:[".sql",".sqlite",".db",".mdb",".accdb",".jsonld",".xml",".csv"],markup:[".html",".htm",".xhtml",".xml",".json",".yaml",".yml"],configuration:[".ini",".conf",".cfg",".env",".properties",".json",".toml"],logs:[".log",".err",".trace",".out"],script:[".bash",".sh",".zsh",".bat",".ps1",".vbs",".cmd",".sed",".awk",".php"]},st=["","万","亿","兆","京","垓","秭","穰","沟","涧","正","载","极"],at={Letter:{width:215.9,height:279.4},Legal:{width:215.9,height:355.6},Tabloid:{width:279.4,height:431.8},Ledger:{width:431.8,height:279.4},Executive:{width:184.2,height:266.7},Folio:{width:215.9,height:330.2},Quarto:{width:215,height:275},"Government-Letter":{width:203.2,height:266.7},A0:{width:841,height:1189},A1:{width:594,height:841},A2:{width:420,height:594},A3:{width:297,height:420},A4:{width:210,height:297},A5:{width:148,height:210},A6:{width:105,height:148},A7:{width:74,height:105},A8:{width:52,height:74},A9:{width:37,height:52},A10:{width:26,height:37},B0:{width:1e3,height:1414},B1:{width:707,height:1e3},B2:{width:500,height:707},B3:{width:353,height:500},B4:{width:250,height:353},B5:{width:176,height:250},B6:{width:125,height:176},B7:{width:88,height:125},B8:{width:62,height:88},B9:{width:44,height:62},B10:{width:31,height:44},C0:{width:917,height:1297},C1:{width:648,height:917},C2:{width:458,height:648},C3:{width:324,height:458},C4:{width:229,height:324},C5:{width:162,height:229},C6:{width:114,height:162},C7:{width:81,height:114},C8:{width:57,height:81}};Object.keys(at).map(n=>({value:n,label:n}));function bt(n,e=10){let t=0,i=e;function o(){if(i>0)i--,requestAnimationFrame(o);else{const a=(+new Date-t)/e,s=1e3/a;n(Number(s.toFixed(2)),Number(a.toFixed(2)))}}requestAnimationFrame(()=>{t=+new Date,o()})}function vt(n){const e=()=>Promise.resolve(),t=s=>(console.error(s),Promise.reject(s));function i(){return navigator.clipboard.writeText(n).then(e).catch(t)}function o(){const s=document.createElement("div");s.innerText=n,document.body.appendChild(s);const c=document.createRange();c.selectNodeContents(s);const l=window.getSelection();let h=!1;return l&&(l.removeAllRanges(),l.addRange(c),h=document.execCommand("copy")),document.body.removeChild(s),h?Promise.resolve():Promise.reject()}function r(){const s=document.createElement("textarea");s.value=n,document.body.appendChild(s),s.select(),s.setSelectionRange(0,n.length);let c=!1;return document.activeElement===s&&(c=document.execCommand("Copy",!0)),document.body.removeChild(s),c?Promise.resolve():Promise.reject()}function a(){return o().then(e).catch(()=>{r().then(e).catch(()=>t("复制方式尽皆失效"))})}return navigator.clipboard?i().catch(a):a()}class ct{constructor(){}static add(e,t){this.keys.set(e,t)}static open(e,t,i,o){const r=this.keys.get(e);if(r&&!r.closed)return r.focus(),r;{const a=window.open(t,i,o);if(a)return this.keys.set(e,a),a;console.error("window.open failed: 可能是浏览器阻止了弹出窗口"),this.keys.delete(e)}}static isOpen(e){const t=this.keys.get(e);return t!=null&&t.closed&&this.keys.delete(e),this.keys.has(e)}static getWindow(e){if(this.isOpen(e))return this.keys.get(e)}static close(e){const t=this.keys.get(e);t&&(t.close(),this.keys.delete(e))}static closeAll(){this.keys.forEach((e,t)=>e.close()),this.keys.clear()}}C(ct,"keys",new Map);function Et(n,e){const t=at[n];if(!t)throw new Error(`未知纸张类型: ${n}`);const{width:i,height:o}=t,r=_=>_/25.4,s=typeof window<"u"?window.devicePixelRatio*96:300,c=_=>Math.round(r(_)*s),l=c(i),h=c(o),d=c(e),p=Math.max(0,l-2*d),y=Math.max(0,h-2*d);return{contentWidth:p,contentHeight:y,paddingPx:d,paperWidthPx:l,paperHeightPx:h}}function Mt(n){return n.charAt(0).toUpperCase()+n.slice(1)}function Ct(n,e,t=2){return!Number.isFinite(n)||!Number.isFinite(e)||!Number.isFinite(t)?(console.error("所有参数必须是有限的数字"),""):e===0?(console.error("分母不能为零"),""):t<0?(console.error("小数位数不能为负数"),""):(n/e*100).toFixed(t)+"%"}function Ft(n){const t=n.toString().split("."),i=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,",");return t.length>1?i+"."+t[1]:i}function Lt(n,e){const t={join:!0,suffix:"",decimalPlaces:2},{join:i,suffix:o,decimalPlaces:r}={...t,...e||{}},a=Number(n);if(isNaN(a))return i?`0${o}`:[0,o];const s=Math.abs(a),c=a>=0,l=Math.max(0,Math.floor(Math.log10(s)/4)),h=Math.pow(1e4,l),d=s/h,p=(c?1:-1)*parseFloat(d.toFixed(Math.max(0,r)));return i?`${p}${st[l]}${o}`:[p,st[l]+o]}function Tt(n){const e=["B","KB","MB","GB","TB","PB"];let t=0;for(;n>1024;)n/=1024,t++;return`${Math.round(n*100)/100} ${e[t]}`}function Pt(n,e="YYYY-MM-DD hh:mm:ss",t=!0){const i=new Date(n);if(isNaN(i.getTime()))return console.error("Invalid date"),"";const o={YYYY:r=>r.getFullYear(),MM:r=>r.getMonth()+1,DD:r=>r.getDate(),hh:r=>r.getHours(),mm:r=>r.getMinutes(),ss:r=>r.getSeconds(),ms:r=>r.getMilliseconds()};return e.replace(/YYYY|MM|DD|hh|mm|ss|ms/g,r=>{const a=o[r](i);return t?String(a).padStart(2,"0"):String(a)})}function G(n,e="file"){if(!n||(n=String(n).trim(),n===""))return e;const t=n.split("/");return t[t.length-1].split("?")[0]}function It(n,e){return n=n.replace(/([^a-zA-Z][a-z])/g,t=>t.toUpperCase()),e?n.replace(/[^a-zA-Z]+/g,""):n}function Ut(n,e,t=","){const i=new RegExp(`(^|${t})${e}(${t}|$)`,"g");return n.replace(i,function(o,r,a){return r===a?t:""})}function At(n){return!(n===null||typeof n!="object"||Array.isArray(n))}function lt(n,e=2){if(Array.isArray(n)&&n.length>=e){for(let i=0;i<n.length;i++)if(typeof n[i]!="number"||!Number.isFinite(n[i]))return!1}else return!1;return!0}function St(n,e=1,t=2){if(Array.isArray(n)&&n.length>=e){for(let o=0;o<n.length;o++)if(!lt(n[o],t))return!1}else return!1;return!0}function Dt(n,e,t){return Math.abs(n-e)<=t}function Rt(n,e){let t=!1;const{x:i,y:o}=n,r=e.length;for(let a=0,s=r-1;a<r;s=a++){const c=e[a].x,l=e[a].y,h=e[s].x,d=e[s].y;l>o!=d>o&&i<(h-c)*(o-l)/(d-l)+c&&(t=!t)}return t}function jt(n,e,t,i){const o=Math.min(n[0],e[0]),r=Math.max(n[0],e[0]),a=Math.min(n[1],e[1]),s=Math.max(n[1],e[1]),c=[[o,a],[r,a],[r,s],[o,s]],l=i[1]-t[1],h=t[0]-i[0],d=i[0]*t[1]-t[0]*i[1];if(l===0&&h===0){const[T,O]=t;return T>=o&&T<=r&&O>=a&&O<=s}const p=1e-10;let y=!1,_=!1;for(const[T,O]of c){const X=l*T+h*O+d;if(Math.abs(X)<p||(X>p?y=!0:_=!0,y&&_))return!0}return y&&_}function Z(n){return Object.prototype.toString.call(n).slice(8,-1).toLowerCase()}function Ot(n){return["https:","wss:","ftps:","sftp:","smpts:","smtp+tls:","imap+tls:","pop3+tls:","rdp:","vpn:"].some(t=>n.startsWith(t))}function kt(n){return new Promise((e,t)=>{if(typeof n!="string"||n.trim()===""||!n.includes("://")){t(new Error("Invalid URL: Must be a non-empty string"));return}try{new XMLHttpRequest().open("HEAD",n,!0)}catch(r){t(new Error(`Invalid URL format: ${r.message}`));return}const i=new XMLHttpRequest;i.open("HEAD",n,!0);const o=r=>{t(new Error(`Request failed: ${r.type}`))};i.onreadystatechange=function(){i.readyState===XMLHttpRequest.DONE&&(i.status===0?t(new Error("Network error or CORS blocked")):i.status>=200&&i.status<300?e(!0):t(new Error(`HTTP Error: ${i.status}`)))},i.onerror=o,i.onabort=o,i.ontimeout=o;try{i.send()}catch(r){t(new Error(`Request send failed: ${r.message}`))}})}const P=class P{constructor(){if(new.target===P)throw new Error("请直接使用静态方法,而不是实例化此类")}static check(e,t){if(!e||typeof e!="string")return console.error("Invalid URL provided"),t?!1:"unknown";const i=G(e).toLowerCase();if(t){if(!tt.hasOwnProperty(t))return console.error(`Unknown file type: ${t}`),"unknown";const o=tt[t];return P._checkExtension(i,o)}return P._detectFileType(i)}static parseAddresses(e){return!e||typeof e!="string"?(console.error("Invalid URL provided"),[]):e.split(",").map(t=>{const i=G(t),o=this.check(t);return{url:t,name:i,type:o}})}static matchesMimeType(e,t){if(!t)return!0;if(typeof e!="string"||typeof t!="string")return!1;const i=P._normalizeType(e),o=t.split(",").map(s=>P._normalizeType(s.trim())),[r,a="*"]=i.split("/");return o.some(s=>{const[c,l="*"]=s.split("/");return(c==="*"||r==="*"||c===r)&&(l==="*"||a==="*"||l===a)})}static _normalizeType(e){return e.startsWith(".")&&!e.includes("/")?xt[e.toLowerCase()]||e:e.includes("/")?e:`${e}/*`}static _checkExtension(e,t){return t.some(i=>e.endsWith(i))}static _detectFileType(e){for(const[t,i]of P.cachedEntries)if(i.some(o=>e.endsWith(o)))return t;return"unknown"}};C(P,"cachedEntries",Object.entries(tt));let et=P;function zt(n){if(typeof n!="function")return console.error("非函数:",n);const e=function(t){t.didTimeout||t.timeRemaining()<=0?requestIdleCallback(e):n()};requestIdleCallback(e)}function Nt(n,e){const t=+new Date;return new Promise((i,o)=>{const r=()=>{if(+new Date-t>=e)return o("超时");if(n())return i("完成");requestIdleCallback(r)};r()})}function nt(n,e,t=[],i=+new Date){if(i<+new Date-50){console.error("_MergeObjects 合并异常:疑似死循环");return}const o=Z(n),r=Z(e);if(o!=r)return e;if(o=="object"||o=="array"){if(t.some(([a,s])=>a==n&&s==e))return n;if(t.push([n,e]),o=="object"){for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){const s=e[a],c=n[a],l=nt(c,s,t,i);n[a]=l}return n}else if(o=="array")return e.forEach((a,s)=>{const c=a,l=n[s],h=nt(l,c,t,i);n[s]=h}),n}else return e}function Bt(n=""){return n+"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function ut(n,e){let t;return function(...i){clearTimeout(t),t=setTimeout(()=>{n(...i),t=void 0},e)}}function qt(n,e){let t=-1/0;return function(...i){const o=performance.now();if(o-t>e){t=o;try{n(...i)}catch(r){console.error("Throttled function execution failed:",r)}}}}function $t(n,e,t){if(!n||!e)return n;const i=e.split(".");return i.reduce((o,r,a)=>o.hasOwnProperty(r)?o[r]:a===i.length-1?o[r]=t:o[r]={},n)}function Yt(n,e){if(!n||!e)return n;const t=e.split(".");return t.reduce((i,o,r)=>i.hasOwnProperty(o)?i[o]:r==t.length-1?void 0:{},n)}function Wt(n,e,t){if(!n||!e)return n;const i=e.split(".");return i.reduce((o,r,a)=>(a===i.length-1&&(o[r]=t),o.hasOwnProperty(r)?o[r]:o[r]={}),n)}function Xt(n){return n.map((e,t)=>n.slice(t).concat(n.slice(0,t)))}function Ht(n){const e=window.structuredClone,t=(i,o=new WeakMap)=>{const r=i;if(r===null||typeof r!="object")return r;if(o.has(r))return o.get(r);switch(Z(r)){case"array":{const s=[];o.set(r,s);for(const c of r)s.push(t(c,o));return s}case"object":{if(r===null)return r;const s={};o.set(r,s);for(const c in r)Object.prototype.hasOwnProperty.call(r,c)&&(s[c]=t(r[c],o));return s}case"date":{const s=new Date(r.getTime());return o.set(r,s),s}case"regexp":{const s=r,c=new RegExp(s.source,s.flags);return c.lastIndex=s.lastIndex,o.set(r,c),c}case"map":{const s=new Map;return o.set(r,s),r.forEach((c,l)=>{s.set(t(l,o),t(c,o))}),s}case"set":{const s=new Set;return o.set(r,s),r.forEach(c=>{s.add(t(c,o))}),s}case"arraybuffer":case"dataview":case"int8array":case"uint8array":case"uint8clampedarray":case"int16array":case"uint16array":case"int32array":case"uint32array":case"float32array":case"float64array":case"bigint64array":case"biguint64array":{const s=r,c=s.constructor,l=s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength),h=new c(l,s.byteOffset,s.byteLength/s.BYTES_PER_ELEMENT);return o.set(r,h),h}case"error":{const s=r,c=new s.constructor(s.message);return c.stack=s.stack,c.name=s.name,o.set(r,c),c}case"function":case"promise":case"weakmap":case"weakset":default:return r}};try{return e?e(n):t(n)}catch(i){return console.error("structuredClone error:",i),e&&t(n)}}function Vt(n,e,t=30){if(typeof n!="function")return console.error("第一个参数必须是一个函数。");if(!Array.isArray(e))return console.error("第二个参数必须是一个数组。");let i=[],o=0;const r=(a,s)=>{for(const[c,l]of s)if(a>=c)return l;return"black"};return function(...a){const s=performance.now(),c=n(...a),l=performance.now()-s;i.push(l),i.length>t&&i.shift(),o=i.reduce((p,y)=>p+y,0)/i.length||0;const h=r(l,e),d=r(o,e);return console.log(`%c单次耗时:${l.toFixed(2)}ms
3
- %c平均耗时(${i.length}次):${o.toFixed(2)}ms`,`color: ${h}; padding: 2px 0;`,`color: ${d}; padding: 2px 0;`),c}}function Gt(n){const e=Date.now();let t=performance.now();for(;Date.now()-e<n;){t=Math.sin(t)*1e6,(t>1e6||t<-1e6)&&(t=0);try{const i=t.toString().substring(0,8);history.replaceState(null,"",`#${i}`)}catch{}}return Date.now()-e}function Zt(n){const e=ut(n,100);let t=0,i=0;return function(o){const r=o.target;if(!r||!(r instanceof Element))return;const{scrollTop:a,scrollHeight:s,clientHeight:c,scrollLeft:l,scrollWidth:h,clientWidth:d}=r;function p(){if(t==a)return;const _=t>a;if(t=a,_)return;s-a-c<=1&&e("vertical")}function y(){if(i==l)return;const _=i>l;if(i=l,_)return;h-l-d<=1&&e("horizontal")}p(),y()}}function Kt(n,e,t){const{isClickAllowed:i,uiLibrary:o=["naiveUI","ElementPlus","Element"]}=t||{},r=function(c){const l=[];for(const h in c)Object.hasOwnProperty.call(c,h)&&o.includes(h)&&l.push(...c[h]);return l}({naiveUI:[".v-binder-follower-container",".n-image-preview-container",".n-modal-container"],ElementPlus:[".el-popper"],Element:[".el-popper"]});function a(){e(),document.removeEventListener("mousedown",s)}function s(c){if(i){const d=i(c);if(d)return;if(d===!1)return a()}const l=c.target;if(!(l instanceof Element)||!l.isConnected)return;n.concat(r).some(d=>!!(l!=null&&l.closest(d)))||a()}requestAnimationFrame(()=>document.addEventListener("mousedown",s))}var b,A,S,z,N,F,L,I,B;class Qt{constructor(){f(this,b);f(this,A,!1);f(this,S,{});f(this,z,0);f(this,N,0);f(this,F,0);f(this,L,0);f(this,I);f(this,B)}init(e,t){m(this,b,e),m(this,I,t==null?void 0:t.limit),m(this,B,t==null?void 0:t.dragDom),m(this,S,{mousedown:this.mousedown.bind(this),mousemove:this.mousemove.bind(this),mouseup:this.mouseup.bind(this)}),this.bindOrUnbindEvent("bind")}finish(){this.bindOrUnbindEvent("unbind")}bindOrUnbindEvent(e){const t=e==="bind"?"addEventListener":"removeEventListener";if(!u(this,b))return console.error("No DOM");u(this,b)[t]("mousedown",u(this,S).mousedown),document[t]("mousemove",u(this,S).mousemove),document[t]("mouseup",u(this,S).mouseup)}alterLocation(){if(!u(this,b))return console.error("No DOM");u(this,I)&&(m(this,F,Math.min(u(this,F),u(this,I).max.top)),m(this,F,Math.max(u(this,F),u(this,I).min.top)),m(this,L,Math.min(u(this,L),u(this,I).max.left)),m(this,L,Math.max(u(this,L),u(this,I).min.left))),u(this,b).style.setProperty("--top",u(this,F)+"px"),u(this,b).style.setProperty("--left",u(this,L)+"px")}mousedown(e){if(!u(this,b))return console.error("No DOM");if(u(this,B)&&e.target!=u(this,B))return;document.body.classList.add("no-select"),m(this,A,!0);const t=u(this,b).getBoundingClientRect(),{pageX:i,pageY:o}=e;m(this,z,i),m(this,N,o),m(this,F,t.y),m(this,L,t.x)}mousemove(e){const{pageX:t,pageY:i}=e;u(this,A)&&(m(this,F,u(this,F)+(i-u(this,N))),m(this,L,u(this,L)+(t-u(this,z))),m(this,z,t),m(this,N,i),this.alterLocation())}mouseup(){u(this,A)&&(m(this,A,!1),document.body.classList.remove("no-select"))}}b=new WeakMap,A=new WeakMap,S=new WeakMap,z=new WeakMap,N=new WeakMap,F=new WeakMap,L=new WeakMap,I=new WeakMap,B=new WeakMap;var v,D,R,q,$,E,M,w,Y,W;class Jt{constructor(){f(this,v);f(this,D,!1);f(this,R,{});f(this,q,0);f(this,$,0);f(this,E,0);f(this,M,0);f(this,w);f(this,Y);f(this,W)}init(e,t={}){m(this,v,e),m(this,w,t.limit),m(this,Y,t.update_move),m(this,W,t.update_up),m(this,R,{mousedown:this.mousedown.bind(this),mousemove:this.mousemove.bind(this),mouseup:this.mouseup.bind(this)}),this.bindOrUnbindEvent("bind")}finish(){this.bindOrUnbindEvent("unbind")}bindOrUnbindEvent(e){const t=e==="bind"?"addEventListener":"removeEventListener";if(!u(this,v))return console.error("No DOM");u(this,v)[t]("mousedown",u(this,R).mousedown),document[t]("mousemove",u(this,R).mousemove),document[t]("mouseup",u(this,R).mouseup)}updateValue(){const e={top:u(this,E),left:u(this,M),percentage:{top:0,left:0}};if(u(this,w)){const t=i=>u(this,w)?(e[i]-u(this,w).min[i])/(u(this,w).max[i]-u(this,w).min[i]):0;e.percentage={top:t("top")||0,left:t("left")||0}}return e}alterLocation(){if(!u(this,v))return console.error("No DOM");u(this,w)&&(m(this,E,Math.min(u(this,E),u(this,w).max.top)),m(this,E,Math.max(u(this,E),u(this,w).min.top)),m(this,M,Math.min(u(this,M),u(this,w).max.left)),m(this,M,Math.max(u(this,M),u(this,w).min.left))),u(this,Y)&&u(this,Y).call(this,this.updateValue()),u(this,v).style.setProperty("--top",u(this,E)+"px"),u(this,v).style.setProperty("--left",u(this,M)+"px")}mousedown(e){if(!u(this,v))return console.error("No DOM");document.body.classList.add("no-select"),m(this,D,!0);const t=u(this,v).getBoundingClientRect();m(this,$,t.y),m(this,q,t.x);const{pageX:i,pageY:o}=e;m(this,E,o-u(this,$)),m(this,M,i-u(this,q)),this.alterLocation()}mousemove(e){const{pageX:t,pageY:i}=e;u(this,D)&&(m(this,E,i-u(this,$)),m(this,M,t-u(this,q)),this.alterLocation())}mouseup(){u(this,D)&&(m(this,D,!1),document.body.classList.remove("no-select"),u(this,W)&&u(this,W).call(this,this.updateValue()))}}v=new WeakMap,D=new WeakMap,R=new WeakMap,q=new WeakMap,$=new WeakMap,E=new WeakMap,M=new WeakMap,w=new WeakMap,Y=new WeakMap,W=new WeakMap;function J(n){if(typeof n=="string"){const e=document.querySelector(n);if(!e)throw new Error(`Element "${n}" not found`);return e}else return n||document.documentElement}function ht(n){const e=J(n);return e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():Promise.reject("No Fullscreen API")}function mt(){const n=document;return document.exitFullscreen?document.exitFullscreen():n.mozCancelFullScreen?n.mozCancelFullScreen():n.webkitExitFullscreen?n.webkitExitFullscreen():n.msExitFullscreen?n.msExitFullscreen():Promise.reject("No ExitFullscreen API")}function it(n){const e=J(n),t=document,i=document.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement;return e==i||!n&&window.innerWidth==screen.width&&window.innerHeight==screen.height}function te(n){return n=J(n),function(){it(n)?mt():ht(n)}}function ee(n,e){const t=J(e),i=()=>{n(it(t))};return document.addEventListener("fullscreenchange",i),document.addEventListener("webkitfullscreenchange",i),document.addEventListener("mozfullscreenchange",i),document.addEventListener("MSFullscreenChange",i),i(),()=>{document.removeEventListener("fullscreenchange",i),document.removeEventListener("webkitfullscreenchange",i),document.removeEventListener("mozfullscreenchange",i),document.removeEventListener("MSFullscreenChange",i)}}function ne(n,e){if(typeof n=="number")return n;if(/px/.test(n))return Number(n.replace(/px/,""))||0;const t=document.createElement("div");t.style.width=n,e=e||document.body,e.appendChild(t);const i=t.getBoundingClientRect().width;return e.removeChild(t),i}function ie(n,e){if(!n)return;let t,i;if(typeof e=="string"){const r=document.querySelector(e);if(!r)return;const a=r.getBoundingClientRect();t=a.width,i=a.height}else if(Array.isArray(e))t=e[0],i=e[1];else{const r=e.getBoundingClientRect();t=r.width,i=r.height}const o=t/i;return o>n?[n*i,i]:o<n?[t,t/n]:[t,i]}function re(n,e=5e3){return new Promise((t,i)=>{const o=new Image;o.src=n;const r=setTimeout(()=>{i(new Error("图片加载超时")),o.onload=null,o.onerror=null},e);o.onload=()=>{clearTimeout(r);const a=o.naturalWidth,s=o.naturalHeight,c=a/s;t([o,c])},o.onerror=()=>{clearTimeout(r),i(new Error("图片加载失败"))},o.crossOrigin="Anonymous"})}function oe(n){return new Promise((e,t)=>{fetch(n).then(i=>e(i.text())).catch(i=>{console.error("Error fetching :",i),t(i)})})}function dt(n,e){return new Promise((t,i)=>{try{e=e||G(n,"downloaded_file"),fetch(n).then(o=>(o.ok||i(`文件下载失败,状态码: ${o.status}`),o.blob())).then(o=>{const r=URL.createObjectURL(o),a=document.createElement("a");a.href=r,a.download=decodeURIComponent(e),document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r),t(o)}).catch(i)}catch(o){i(o)}})}function se(n,e,t){if(!t){let r=e.replace(/^[^.]+./,"");r=r==e?"text/plain":"application/"+r,t={type:r}}const i=new Blob(n,t),o=URL.createObjectURL(i);dt(o,e)}const ae=Math.PI/2,K=Math.PI/180,Q=6378137,ce=85.05112878;function le(n,e){const t=Math.max(Math.min(n,180),-180),i=Math.max(Math.min(e,ce),-85.05112878),o=t*K*Q,r=i*K,a=Math.log(Math.tan(Math.PI/4+r/2))*Q;return[o,a]}function ue(n,e){const t=n/Q/K,i=(2*Math.atan(Math.exp(e/Q))-ae)/K;return[t,i]}function he(n,e,t){const[i,o]=n,[r,a]=e,[s,c]=t,l=(s-r)**2+(c-a)**2;if(l===0)return Math.sqrt((i-r)**2+(o-a)**2);let h=((i-r)*(s-r)+(o-a)*(c-a))/l;return h=Math.max(0,Math.min(1,h)),Math.sqrt((i-(r+h*(s-r)))**2+(o-(a+h*(c-a)))**2)}function me(n,e,t,i,o,r=1,a=1){const s=n+t*Math.cos(i)*r,c=e+t*Math.sin(i)*a,l=n+t*Math.cos(o)*r,h=e+t*Math.sin(o)*a;return[[s,c],[l,h]]}function de(n,e,t,i){return Math.hypot(Math.abs(t-n),Math.abs(i-e))}function fe(n,e,t,i){const o=(n+t)/2,r=(e+i)/2;return{x:o,y:r}}function pe(n,e,t,i){const[o,r]=n,[a,s]=e;let c=1/0;if(a!==0){const l=a>0?(t-o)/a:-o/a;l>0&&(c=Math.min(c,l))}if(s!==0){const l=s>0?(i-r)/s:-r/s;l>0&&(c=Math.min(c,l))}return c===1/0?n:[o+a*c,r+s*c]}class k{constructor(e,t){C(this,"resolve");C(this,"reject");this.resolve=e,this.reject=t}run(e){var t,i;return e instanceof Promise?e.then(o=>{var r;return(r=this.resolve)==null||r.call(this),o}).catch(o=>{var r;return(r=this.reject)==null||r.call(this),Promise.reject(o)}):e?(t=this.resolve)==null||t.call(this):(i=this.reject)==null||i.call(this),e}}class ge extends k{constructor(e){super(),this.resolve=e}warning(...e){const t=()=>{var i,o;return(o=(i=j.tips).warning)==null?void 0:o.call(i,...e)};return new k(this.resolve,t)}error(...e){const t=()=>{var i,o;return(o=(i=j.tips).error)==null?void 0:o.call(i,...e)};return new k(this.resolve,t)}}class _e extends k{constructor(e){super(),this.reject=e}info(...e){const t=()=>{var i,o;return(o=(i=j.tips).info)==null?void 0:o.call(i,...e)};return new k(t,this.reject)}success(...e){const t=()=>{var i,o;return(o=(i=j.tips).success)==null?void 0:o.call(i,...e)};return new k(t,this.reject)}}const g=class g{constructor(){if(new.target===g)throw new Error("请直接使用静态方法,而不是实例化此类")}static register(e,t){if(typeof t!="function")return console.error("TipHandler must be a function");g.tips[e]=t}static resolveTip(e){return function(...t){const i=()=>{var o,r;return(r=(o=g.tips)[e])==null?void 0:r.call(o,...t)};return new ge(i)}}static rejectTip(e){return function(...t){const i=()=>{var o,r;return(r=(o=g.tips)[e])==null?void 0:r.call(o,...t)};return new _e(i)}}};C(g,"tips",{info:void 0,success:void 0,warning:void 0,error:void 0}),C(g,"info",g.resolveTip("info")),C(g,"success",g.resolveTip("success")),C(g,"warning",g.rejectTip("warning")),C(g,"error",g.rejectTip("error"));let j=g;exports._Animate_CreateOscillator=_t;exports._Animate_NumericTransition=wt;exports._Animate_Schedule=gt;exports._Blob_ConvertDataToImageUrl=yt;exports._Browser_CalculatePrintableArea=Et;exports._Browser_CopyToClipboard=vt;exports._Browser_GetFrameRate=bt;exports._Browser_KeyedWindowManager=ct;exports._Element_CalculateCanvasSize=ie;exports._Element_CloseOnOutsideClick=Kt;exports._Element_Drag=Qt;exports._Element_EnterFullscreen=ht;exports._Element_ExitFullscreen=mt;exports._Element_Fullscreen=te;exports._Element_FullscreenObserver=ee;exports._Element_GetOtherSizeInPixels=ne;exports._Element_IsFullscreen=it;exports._Element_LoadImage=re;exports._Element_LocalDrag=Jt;exports._Element_ScrollEndListener=Zt;exports._File_CreateAndDownload=se;exports._File_Download=dt;exports._File_Read=oe;exports._Format_CamelCase=It;exports._Format_CapitalizeFirstLetter=Mt;exports._Format_ExcludeSubstring=Ut;exports._Format_FileSize=Tt;exports._Format_HrefName=G;exports._Format_NumberWithCommas=Ft;exports._Format_NumberWithUnit=Lt;exports._Format_Percentage=Ct;exports._Format_Timestamp=Pt;exports._Math_CalculateDistance2D=de;exports._Math_GetArcPoints=me;exports._Math_GetBoundaryIntersection=pe;exports._Math_GetMidpoint=fe;exports._Math_LngLatToPlane=le;exports._Math_PlaneToLngLat=ue;exports._Math_PointToLineDistance=he;exports._Tip=j;exports._Utility_Clone=Ht;exports._Utility_Debounce=ut;exports._Utility_ExecuteWhenIdle=zt;exports._Utility_GenerateUUID=Bt;exports._Utility_GetTargetByPath=Yt;exports._Utility_InitTargetByPath=$t;exports._Utility_MergeObjects=nt;exports._Utility_RotateList=Xt;exports._Utility_SetTargetByPath=Wt;exports._Utility_Sleep=Gt;exports._Utility_Throttle=qt;exports._Utility_TimeConsumption=Vt;exports._Utility_WaitForCondition=Nt;exports._Valid_CheckConnectionWithXHR=kt;exports._Valid_DataType=Z;exports._Valid_DoesInfiniteLineIntersectRectangle=jt;exports._Valid_FileTypeChecker=et;exports._Valid_Is2DNumberArray=St;exports._Valid_IsInMargin=Dt;exports._Valid_IsNumberArray=lt;exports._Valid_IsObject=At;exports._Valid_IsPointInPolygon=Rt;exports._Valid_IsSecureContext=Ot;
2
+ "use strict";var pt=Object.defineProperty;var st=n=>{throw TypeError(n)};var gt=(n,e,t)=>e in n?pt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var F=(n,e,t)=>gt(n,typeof e!="symbol"?e+"":e,t),at=(n,e,t)=>e.has(n)||st("Cannot "+t);var u=(n,e,t)=>(at(n,e,"read from private field"),t?t.call(n):e.get(n)),f=(n,e,t)=>e.has(n)?st("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),m=(n,e,t,i)=>(at(n,e,"write to private field"),i?i.call(n,t):e.set(n,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ct={".mp3":"audio/mpeg",".mp4":"video/mp4",".m4a":"audio/mp4",".aac":"audio/aac",".ogg":"audio/ogg",".wav":"audio/wav",".flac":"audio/flac",".opus":"audio/opus",".webm":"video/webm",".avi":"video/x-msvideo",".mov":"video/quicktime",".wmv":"video/x-ms-wmv",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".bmp":"image/bmp",".tiff":"image/tiff",".ico":"image/vnd.microsoft.icon",".svg":"image/svg+xml",".webp":"image/webp",".heif":"image/heif",".heic":"image/heic",".json":"application/json",".xml":"application/xml",".html":"text/html",".htm":"text/html",".css":"text/css",".js":"application/javascript",".ts":"application/typescript",".csv":"text/csv",".tsv":"text/tab-separated-values",".txt":"text/plain",".md":"text/markdown",".rtf":"application/rtf",".pdf":"application/pdf",".zip":"application/zip",".rar":"application/x-rar-compressed",".tar":"application/x-tar",".gz":"application/gzip",".7z":"application/x-7z-compressed",".exe":"application/x-msdownload",".apk":"application/vnd.android.package-archive",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".xls":"application/vnd.ms-excel",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".ppt":"application/vnd.ms-powerpoint",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".odt":"application/vnd.oasis.opendocument.text",".ods":"application/vnd.oasis.opendocument.spreadsheet",".odp":"application/vnd.oasis.opendocument.presentation",".jsonld":"application/ld+json",".yaml":"application/x-yaml",".yml":"application/x-yaml",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject",".map":"application/json"},G={image:[".jpg",".jpeg",".png",".gif",".bmp",".webp",".tiff",".svg",".heif",".heic",".ico",".raw",".jfif",".avif",".png8",".indd",".eps",".ai"],ppt:[".ppt",".pptx",".odp"],word:[".doc",".docx",".odt",".rtf"],excel:[".xls",".xlsx",".ods",".csv",".tsv"],pdf:[".pdf"],text:[".txt",".csv",".md",".json",".yaml",".yml",".log",".ini",".rtf"],audio:[".mp3",".wav",".ogg",".flac",".aac",".wma",".m4a",".alac",".ape",".opus",".amr",".ra",".mid",".midi",".aiff",".pcm",".au",".wavpack",".spx"],video:[".mp4",".avi",".mkv",".mov",".wmv",".flv",".webm",".mpg",".mpeg",".3gp",".vob",".ogv",".m4v",".ts",".rm",".rmvb",".m2ts",".divx",".xvid",".swf",".f4v"],archive:[".zip",".rar",".tar",".gz",".bz2",".xz",".7z",".tar.gz",".tar.bz2",".tar.xz",".tar.lz",".tar.lzma",".cab",".iso",".dmg",".tgz",".apk",".gz2",".tar.zst"],code:[".js",".ts",".py",".java",".cpp",".c",".html",".css",".scss",".less",".sass",".php",".rb",".go",".swift",".rs",".kt",".scala",".lua",".pl",".m",".h",".xml",".json",".yaml",".yml",".toml",".vue",".ejs",".handlebars",".jinja",".dart"],font:[".woff",".woff2",".ttf",".otf",".eot",".svg",".ttc",".fnt",".fon",".otc"],database:[".sql",".sqlite",".db",".mdb",".accdb",".jsonld",".xml",".csv"],markup:[".html",".htm",".xhtml",".xml",".json",".yaml",".yml"],configuration:[".ini",".conf",".cfg",".env",".properties",".json",".toml"],logs:[".log",".err",".trace",".out"],script:[".bash",".sh",".zsh",".bat",".ps1",".vbs",".cmd",".sed",".awk",".php"]},et=["","万","亿","兆","京","垓","秭","穰","沟","涧","正","载","极"],_t=["_self","_blank","_parent","_top"],rt={Letter:{width:215.9,height:279.4},Legal:{width:215.9,height:355.6},Tabloid:{width:279.4,height:431.8},Ledger:{width:431.8,height:279.4},Executive:{width:184.2,height:266.7},Folio:{width:215.9,height:330.2},Quarto:{width:215,height:275},"Government-Letter":{width:203.2,height:266.7},A0:{width:841,height:1189},A1:{width:594,height:841},A2:{width:420,height:594},A3:{width:297,height:420},A4:{width:210,height:297},A5:{width:148,height:210},A6:{width:105,height:148},A7:{width:74,height:105},A8:{width:52,height:74},A9:{width:37,height:52},A10:{width:26,height:37},B0:{width:1e3,height:1414},B1:{width:707,height:1e3},B2:{width:500,height:707},B3:{width:353,height:500},B4:{width:250,height:353},B5:{width:176,height:250},B6:{width:125,height:176},B7:{width:88,height:125},B8:{width:62,height:88},B9:{width:44,height:62},B10:{width:31,height:44},C0:{width:917,height:1297},C1:{width:648,height:917},C2:{width:458,height:648},C3:{width:324,height:458},C4:{width:229,height:324},C5:{width:162,height:229},C6:{width:114,height:162},C7:{width:81,height:114},C8:{width:57,height:81}},wt=Object.keys(rt).map(n=>({value:n,label:n}));function yt(n,e=500){let t,i=!0;function o(r){if(!i)return;t||(t=r);let a=Math.min((r-t)/e,1);n(a),r-t<e&&requestAnimationFrame(o)}return requestAnimationFrame(o),()=>i=!1}function xt(n,e,t,i,o=2){let r=n,a=!1,s=1,c=n,l=e,h=t;const d=()=>{const x=(l-c)/h;return Number(x.toFixed(o))};let p=d();const y=x=>Math.min(Math.max(x,c),l),_=x=>Number(x.toFixed(o)),I=(x,H,V)=>{const S=[];return x>=H&&S.push("最小值必须小于最大值"),V<=0?S.push("分段数必须为正数"):d()==0&&S.push("数值精度过低,致使动画步长为 0"),S},j=(x,H,V)=>{const S=I(x,H,V);return S.length>0?(console.error(`参数更新失败: ${S.join("; ")}`),!1):(c=x,l=H,h=V,p=d(),r=y(r),!0)},X=()=>{a&&(s=r>=l?-1:r<=c?1:s,r=y(r+p*s),i(_(r)),requestAnimationFrame(X))};return{play(x=r){if(r=y(x),I(c,l,h).length)return console.error("配置参数错误",this.getParams());a||(a=!0,X())},pause(){a=!1},getCurrent:()=>_(r),isPlaying:()=>a,updateParams:j,getParams:()=>({min:c,max:l,steps:h,precision:o,stepSize:p})}}function bt(n,e,t,i,o=2){if(t<=0)return console.error("动画步数 必须为正数");const r=d=>Number(d.toFixed(o)),a=e-n,s=r(Math.abs(a)/t);if(s===0)return console.error("数值精度过低,致使动画步长为 0");const c=Math.sign(a);let l=n;const h=()=>{l=r(l+s*c),(c>0?l<e:l>e)?(i(l),requestAnimationFrame(h)):i(e)};h()}function vt(n,e="image/png"){try{let t,i=e;if(n instanceof File)return URL.createObjectURL(n);if(typeof n=="string"){let r=n;const a=r.match(/^data:([^;]*)(;base64)?,(.*)$/i);if(a){if(!a[2])return console.error("无效的数据 URL:缺少 base64 编码声明");if(i=a[1]||i,r=a[3],!r)return console.error("数据 URL 包含空有效负载")}r=r.replace(/[^A-Za-z0-9+/=]/g,"");const s=atob(r);t=new Uint8Array(s.length);for(let c=0;c<s.length;c++)t[c]=s.charCodeAt(c)}else if(n instanceof ArrayBuffer)t=new Uint8Array(n);else if(n instanceof Uint8Array)t=n;else return console.error("不支持的数据类型。应为 Base64 字符串、ArrayBuffer 或 Uint8Array");const o=new Blob([t],{type:i});return URL.createObjectURL(o)}catch(t){return console.error("数据到 ImageURL 的转换失败:",t.message,t.stack||"没有可用的堆栈跟踪"),null}}function Et(n,e=10){let t=0,i=e;function o(){if(i>0)i--,requestAnimationFrame(o);else{const a=(+new Date-t)/e,s=1e3/a;n(Number(s.toFixed(2)),Number(a.toFixed(2)))}}requestAnimationFrame(()=>{t=+new Date,o()})}function Mt(n){const e=()=>Promise.resolve(),t=s=>(console.error(s),Promise.reject(s));function i(){return navigator.clipboard.writeText(n).then(e).catch(t)}function o(){const s=document.createElement("div");s.innerText=n,document.body.appendChild(s);const c=document.createRange();c.selectNodeContents(s);const l=window.getSelection();let h=!1;return l&&(l.removeAllRanges(),l.addRange(c),h=document.execCommand("copy")),document.body.removeChild(s),h?Promise.resolve():Promise.reject()}function r(){const s=document.createElement("textarea");s.value=n,document.body.appendChild(s),s.select(),s.setSelectionRange(0,n.length);let c=!1;return document.activeElement===s&&(c=document.execCommand("Copy",!0)),document.body.removeChild(s),c?Promise.resolve():Promise.reject()}function a(){return o().then(e).catch(()=>{r().then(e).catch(()=>t("复制方式尽皆失效"))})}return navigator.clipboard?i().catch(a):a()}class lt{constructor(){}static add(e,t){this.keys.set(e,t)}static open(e,t,i,o){const r=this.keys.get(e);if(r&&!r.closed)return r.focus(),r;{const a=window.open(t,i,o);if(a)return this.keys.set(e,a),a;console.error("window.open failed: 可能是浏览器阻止了弹出窗口"),this.keys.delete(e)}}static isOpen(e){const t=this.keys.get(e);return t!=null&&t.closed&&this.keys.delete(e),this.keys.has(e)}static getWindow(e){if(this.isOpen(e))return this.keys.get(e)}static close(e){const t=this.keys.get(e);t&&(t.close(),this.keys.delete(e))}static closeAll(){this.keys.forEach((e,t)=>e.close()),this.keys.clear()}}F(lt,"keys",new Map);function Ft(n,e){const t=rt[n];if(!t)throw new Error(`未知纸张类型: ${n}`);const{width:i,height:o}=t,r=_=>_/25.4,s=typeof window<"u"?window.devicePixelRatio*96:300,c=_=>Math.round(r(_)*s),l=c(i),h=c(o),d=c(e),p=Math.max(0,l-2*d),y=Math.max(0,h-2*d);return{contentWidth:p,contentHeight:y,paddingPx:d,paperWidthPx:l,paperHeightPx:h}}function Ct(n){return n.charAt(0).toUpperCase()+n.slice(1)}function Tt(n,e,t=2){return!Number.isFinite(n)||!Number.isFinite(e)||!Number.isFinite(t)?(console.error("所有参数必须是有限的数字"),""):e===0?(console.error("分母不能为零"),""):t<0?(console.error("小数位数不能为负数"),""):(n/e*100).toFixed(t)+"%"}function It(n){const t=n.toString().split("."),i=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,",");return t.length>1?i+"."+t[1]:i}function Pt(n,e){const t={join:!0,suffix:"",decimalPlaces:2},{join:i,suffix:o,decimalPlaces:r}={...t,...e||{}},a=Number(n);if(isNaN(a))return i?`0${o}`:[0,o];const s=Math.abs(a),c=a>=0,l=Math.max(0,Math.floor(Math.log10(s)/4)),h=Math.pow(1e4,l),d=s/h,p=(c?1:-1)*parseFloat(d.toFixed(Math.max(0,r)));return i?`${p}${et[l]}${o}`:[p,et[l]+o]}function Lt(n){const e=["B","KB","MB","GB","TB","PB"];let t=0;for(;n>1024;)n/=1024,t++;return`${Math.round(n*100)/100} ${e[t]}`}function St(n,e="YYYY-MM-DD hh:mm:ss",t=!0){const i=new Date(n);if(isNaN(i.getTime()))return console.error("Invalid date"),"";const o={YYYY:r=>r.getFullYear(),MM:r=>r.getMonth()+1,DD:r=>r.getDate(),hh:r=>r.getHours(),mm:r=>r.getMinutes(),ss:r=>r.getSeconds(),ms:r=>r.getMilliseconds()};return e.replace(/YYYY|MM|DD|hh|mm|ss|ms/g,r=>{const a=o[r](i);return t?String(a).padStart(2,"0"):String(a)})}function Z(n,e="file"){if(!n||(n=String(n).trim(),n===""))return e;const t=n.split("/");return t[t.length-1].split("?")[0]}function At(n,e){return n=n.replace(/([^a-zA-Z][a-z])/g,t=>t.toUpperCase()),e?n.replace(/[^a-zA-Z]+/g,""):n}function Ut(n,e,t=","){const i=new RegExp(`(^|${t})${e}(${t}|$)`,"g");return n.replace(i,function(o,r,a){return r===a?t:""})}function Ot(n){return!(n===null||typeof n!="object"||Array.isArray(n))}function ut(n,e=2){if(Array.isArray(n)&&n.length>=e){for(let i=0;i<n.length;i++)if(typeof n[i]!="number"||!Number.isFinite(n[i]))return!1}else return!1;return!0}function Rt(n,e=1,t=2){if(Array.isArray(n)&&n.length>=e){for(let o=0;o<n.length;o++)if(!ut(n[o],t))return!1}else return!1;return!0}function Dt(n,e,t){return Math.abs(n-e)<=t}function jt(n,e){let t=!1;const{x:i,y:o}=n,r=e.length;for(let a=0,s=r-1;a<r;s=a++){const c=e[a].x,l=e[a].y,h=e[s].x,d=e[s].y;l>o!=d>o&&i<(h-c)*(o-l)/(d-l)+c&&(t=!t)}return t}function kt(n,e,t,i){const o=Math.min(n[0],e[0]),r=Math.max(n[0],e[0]),a=Math.min(n[1],e[1]),s=Math.max(n[1],e[1]),c=[[o,a],[r,a],[r,s],[o,s]],l=i[1]-t[1],h=t[0]-i[0],d=i[0]*t[1]-t[0]*i[1];if(l===0&&h===0){const[I,j]=t;return I>=o&&I<=r&&j>=a&&j<=s}const p=1e-10;let y=!1,_=!1;for(const[I,j]of c){const X=l*I+h*j+d;if(Math.abs(X)<p||(X>p?y=!0:_=!0,y&&_))return!0}return y&&_}function K(n){return Object.prototype.toString.call(n).slice(8,-1).toLowerCase()}function Nt(n){return["https:","wss:","ftps:","sftp:","smpts:","smtp+tls:","imap+tls:","pop3+tls:","rdp:","vpn:"].some(t=>n.startsWith(t))}function zt(n){return new Promise((e,t)=>{if(typeof n!="string"||n.trim()===""||!n.includes("://")){t(new Error("Invalid URL: Must be a non-empty string"));return}try{new XMLHttpRequest().open("HEAD",n,!0)}catch(r){t(new Error(`Invalid URL format: ${r.message}`));return}const i=new XMLHttpRequest;i.open("HEAD",n,!0);const o=r=>{t(new Error(`Request failed: ${r.type}`))};i.onreadystatechange=function(){i.readyState===XMLHttpRequest.DONE&&(i.status===0?t(new Error("Network error or CORS blocked")):i.status>=200&&i.status<300?e(!0):t(new Error(`HTTP Error: ${i.status}`)))},i.onerror=o,i.onabort=o,i.ontimeout=o;try{i.send()}catch(r){t(new Error(`Request send failed: ${r.message}`))}})}const P=class P{constructor(){if(new.target===P)throw new Error("请直接使用静态方法,而不是实例化此类")}static check(e,t){if(!e||typeof e!="string")return console.error("Invalid URL provided"),t?!1:"unknown";const i=Z(e).toLowerCase();if(t){if(!G.hasOwnProperty(t))return console.error(`Unknown file type: ${t}`),"unknown";const o=G[t];return P._checkExtension(i,o)}return P._detectFileType(i)}static parseAddresses(e){return!e||typeof e!="string"?(console.error("Invalid URL provided"),[]):e.split(",").map(t=>{const i=Z(t),o=this.check(t);return{url:t,name:i,type:o}})}static matchesMimeType(e,t){if(!t)return!0;if(typeof e!="string"||typeof t!="string")return!1;const i=P._normalizeType(e),o=t.split(",").map(s=>P._normalizeType(s.trim())),[r,a="*"]=i.split("/");return o.some(s=>{const[c,l="*"]=s.split("/");return(c==="*"||r==="*"||c===r)&&(l==="*"||a==="*"||l===a)})}static _normalizeType(e){return e.startsWith(".")&&!e.includes("/")?ct[e.toLowerCase()]||e:e.includes("/")?e:`${e}/*`}static _checkExtension(e,t){return t.some(i=>e.endsWith(i))}static _detectFileType(e){for(const[t,i]of P.cachedEntries)if(i.some(o=>e.endsWith(o)))return t;return"unknown"}};F(P,"cachedEntries",Object.entries(G));let nt=P;function Bt(n){if(typeof n!="function")return console.error("非函数:",n);const e=function(t){t.didTimeout||t.timeRemaining()<=0?requestIdleCallback(e):n()};requestIdleCallback(e)}function qt(n,e){const t=+new Date;return new Promise((i,o)=>{const r=()=>{if(+new Date-t>=e)return o("超时");if(n())return i("完成");requestIdleCallback(r)};r()})}function it(n,e,t=[],i=+new Date){if(i<+new Date-50){console.error("_MergeObjects 合并异常:疑似死循环");return}const o=K(n),r=K(e);if(o!=r)return e;if(o=="object"||o=="array"){if(t.some(([a,s])=>a==n&&s==e))return n;if(t.push([n,e]),o=="object"){for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){const s=e[a],c=n[a],l=it(c,s,t,i);n[a]=l}return n}else if(o=="array")return e.forEach((a,s)=>{const c=a,l=n[s],h=it(l,c,t,i);n[s]=h}),n}else return e}function Wt(n=""){return n+"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function ht(n,e){let t;return function(...i){clearTimeout(t),t=setTimeout(()=>{n(...i),t=void 0},e)}}function $t(n,e){let t=-1/0;return function(...i){const o=performance.now();if(o-t>e){t=o;try{n(...i)}catch(r){console.error("Throttled function execution failed:",r)}}}}function Yt(n,e,t){if(!n||!e)return n;const i=e.split(".");return i.reduce((o,r,a)=>o.hasOwnProperty(r)?o[r]:a===i.length-1?o[r]=t:o[r]={},n)}function Xt(n,e){if(!n||!e)return n;const t=e.split(".");return t.reduce((i,o,r)=>i.hasOwnProperty(o)?i[o]:r==t.length-1?void 0:{},n)}function Ht(n,e,t){if(!n||!e)return n;const i=e.split(".");return i.reduce((o,r,a)=>(a===i.length-1&&(o[r]=t),o.hasOwnProperty(r)?o[r]:o[r]={}),n)}function Vt(n){return n.map((e,t)=>n.slice(t).concat(n.slice(0,t)))}function Gt(n){const e=window.structuredClone,t=(i,o=new WeakMap)=>{const r=i;if(r===null||typeof r!="object")return r;if(o.has(r))return o.get(r);switch(K(r)){case"array":{const s=[];o.set(r,s);for(const c of r)s.push(t(c,o));return s}case"object":{if(r===null)return r;const s={};o.set(r,s);for(const c in r)Object.prototype.hasOwnProperty.call(r,c)&&(s[c]=t(r[c],o));return s}case"date":{const s=new Date(r.getTime());return o.set(r,s),s}case"regexp":{const s=r,c=new RegExp(s.source,s.flags);return c.lastIndex=s.lastIndex,o.set(r,c),c}case"map":{const s=new Map;return o.set(r,s),r.forEach((c,l)=>{s.set(t(l,o),t(c,o))}),s}case"set":{const s=new Set;return o.set(r,s),r.forEach(c=>{s.add(t(c,o))}),s}case"arraybuffer":case"dataview":case"int8array":case"uint8array":case"uint8clampedarray":case"int16array":case"uint16array":case"int32array":case"uint32array":case"float32array":case"float64array":case"bigint64array":case"biguint64array":{const s=r,c=s.constructor,l=s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength),h=new c(l,s.byteOffset,s.byteLength/s.BYTES_PER_ELEMENT);return o.set(r,h),h}case"error":{const s=r,c=new s.constructor(s.message);return c.stack=s.stack,c.name=s.name,o.set(r,c),c}case"function":case"promise":case"weakmap":case"weakset":default:return r}};try{return e?e(n):t(n)}catch(i){return console.error("structuredClone error:",i),e&&t(n)}}function Zt(n,e,t=30){if(typeof n!="function")return console.error("第一个参数必须是一个函数。");if(!Array.isArray(e))return console.error("第二个参数必须是一个数组。");let i=[],o=0;const r=(a,s)=>{for(const[c,l]of s)if(a>=c)return l;return"black"};return function(...a){const s=performance.now(),c=n(...a),l=performance.now()-s;i.push(l),i.length>t&&i.shift(),o=i.reduce((p,y)=>p+y,0)/i.length||0;const h=r(l,e),d=r(o,e);return console.log(`%c单次耗时:${l.toFixed(2)}ms
3
+ %c平均耗时(${i.length}次):${o.toFixed(2)}ms`,`color: ${h}; padding: 2px 0;`,`color: ${d}; padding: 2px 0;`),c}}function Kt(n){const e=Date.now();let t=performance.now();for(;Date.now()-e<n;){t=Math.sin(t)*1e6,(t>1e6||t<-1e6)&&(t=0);try{const i=t.toString().substring(0,8);history.replaceState(null,"",`#${i}`)}catch{}}return Date.now()-e}function Qt(n){const e=ht(n,100);let t=0,i=0;return function(o){const r=o.target;if(!r||!(r instanceof Element))return;const{scrollTop:a,scrollHeight:s,clientHeight:c,scrollLeft:l,scrollWidth:h,clientWidth:d}=r;function p(){if(t==a)return;const _=t>a;if(t=a,_)return;s-a-c<=1&&e("vertical")}function y(){if(i==l)return;const _=i>l;if(i=l,_)return;h-l-d<=1&&e("horizontal")}p(),y()}}function Jt(n,e,t){const{isClickAllowed:i,uiLibrary:o=["naiveUI","ElementPlus","Element"]}=t||{},r=function(c){const l=[];for(const h in c)Object.hasOwnProperty.call(c,h)&&o.includes(h)&&l.push(...c[h]);return l}({naiveUI:[".v-binder-follower-container",".n-image-preview-container",".n-modal-container"],ElementPlus:[".el-popper"],Element:[".el-popper"]});function a(){e(),document.removeEventListener("mousedown",s)}function s(c){if(i){const d=i(c);if(d)return;if(d===!1)return a()}const l=c.target;if(!(l instanceof Element)||!l.isConnected)return;n.concat(r).some(d=>!!(l!=null&&l.closest(d)))||a()}requestAnimationFrame(()=>document.addEventListener("mousedown",s))}var b,A,U,N,z,C,T,L,B;class te{constructor(){f(this,b);f(this,A,!1);f(this,U,{});f(this,N,0);f(this,z,0);f(this,C,0);f(this,T,0);f(this,L);f(this,B)}init(e,t){m(this,b,e),m(this,L,t==null?void 0:t.limit),m(this,B,t==null?void 0:t.dragDom),m(this,U,{mousedown:this.mousedown.bind(this),mousemove:this.mousemove.bind(this),mouseup:this.mouseup.bind(this)}),this.bindOrUnbindEvent("bind")}finish(){this.bindOrUnbindEvent("unbind")}bindOrUnbindEvent(e){const t=e==="bind"?"addEventListener":"removeEventListener";if(!u(this,b))return console.error("No DOM");u(this,b)[t]("mousedown",u(this,U).mousedown),document[t]("mousemove",u(this,U).mousemove),document[t]("mouseup",u(this,U).mouseup)}alterLocation(){if(!u(this,b))return console.error("No DOM");u(this,L)&&(m(this,C,Math.min(u(this,C),u(this,L).max.top)),m(this,C,Math.max(u(this,C),u(this,L).min.top)),m(this,T,Math.min(u(this,T),u(this,L).max.left)),m(this,T,Math.max(u(this,T),u(this,L).min.left))),u(this,b).style.setProperty("--top",u(this,C)+"px"),u(this,b).style.setProperty("--left",u(this,T)+"px")}mousedown(e){if(!u(this,b))return console.error("No DOM");if(u(this,B)&&e.target!=u(this,B))return;document.body.classList.add("no-select"),m(this,A,!0);const t=u(this,b).getBoundingClientRect(),{pageX:i,pageY:o}=e;m(this,N,i),m(this,z,o),m(this,C,t.y),m(this,T,t.x)}mousemove(e){const{pageX:t,pageY:i}=e;u(this,A)&&(m(this,C,u(this,C)+(i-u(this,z))),m(this,T,u(this,T)+(t-u(this,N))),m(this,N,t),m(this,z,i),this.alterLocation())}mouseup(){u(this,A)&&(m(this,A,!1),document.body.classList.remove("no-select"))}}b=new WeakMap,A=new WeakMap,U=new WeakMap,N=new WeakMap,z=new WeakMap,C=new WeakMap,T=new WeakMap,L=new WeakMap,B=new WeakMap;var v,O,R,q,W,E,M,w,$,Y;class ee{constructor(){f(this,v);f(this,O,!1);f(this,R,{});f(this,q,0);f(this,W,0);f(this,E,0);f(this,M,0);f(this,w);f(this,$);f(this,Y)}init(e,t={}){m(this,v,e),m(this,w,t.limit),m(this,$,t.update_move),m(this,Y,t.update_up),m(this,R,{mousedown:this.mousedown.bind(this),mousemove:this.mousemove.bind(this),mouseup:this.mouseup.bind(this)}),this.bindOrUnbindEvent("bind")}finish(){this.bindOrUnbindEvent("unbind")}bindOrUnbindEvent(e){const t=e==="bind"?"addEventListener":"removeEventListener";if(!u(this,v))return console.error("No DOM");u(this,v)[t]("mousedown",u(this,R).mousedown),document[t]("mousemove",u(this,R).mousemove),document[t]("mouseup",u(this,R).mouseup)}updateValue(){const e={top:u(this,E),left:u(this,M),percentage:{top:0,left:0}};if(u(this,w)){const t=i=>u(this,w)?(e[i]-u(this,w).min[i])/(u(this,w).max[i]-u(this,w).min[i]):0;e.percentage={top:t("top")||0,left:t("left")||0}}return e}alterLocation(){if(!u(this,v))return console.error("No DOM");u(this,w)&&(m(this,E,Math.min(u(this,E),u(this,w).max.top)),m(this,E,Math.max(u(this,E),u(this,w).min.top)),m(this,M,Math.min(u(this,M),u(this,w).max.left)),m(this,M,Math.max(u(this,M),u(this,w).min.left))),u(this,$)&&u(this,$).call(this,this.updateValue()),u(this,v).style.setProperty("--top",u(this,E)+"px"),u(this,v).style.setProperty("--left",u(this,M)+"px")}mousedown(e){if(!u(this,v))return console.error("No DOM");document.body.classList.add("no-select"),m(this,O,!0);const t=u(this,v).getBoundingClientRect();m(this,W,t.y),m(this,q,t.x);const{pageX:i,pageY:o}=e;m(this,E,o-u(this,W)),m(this,M,i-u(this,q)),this.alterLocation()}mousemove(e){const{pageX:t,pageY:i}=e;u(this,O)&&(m(this,E,i-u(this,W)),m(this,M,t-u(this,q)),this.alterLocation())}mouseup(){u(this,O)&&(m(this,O,!1),document.body.classList.remove("no-select"),u(this,Y)&&u(this,Y).call(this,this.updateValue()))}}v=new WeakMap,O=new WeakMap,R=new WeakMap,q=new WeakMap,W=new WeakMap,E=new WeakMap,M=new WeakMap,w=new WeakMap,$=new WeakMap,Y=new WeakMap;function tt(n){if(typeof n=="string"){const e=document.querySelector(n);if(!e)throw new Error(`Element "${n}" not found`);return e}else return n||document.documentElement}function mt(n){const e=tt(n);return e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():Promise.reject("No Fullscreen API")}function dt(){const n=document;return document.exitFullscreen?document.exitFullscreen():n.mozCancelFullScreen?n.mozCancelFullScreen():n.webkitExitFullscreen?n.webkitExitFullscreen():n.msExitFullscreen?n.msExitFullscreen():Promise.reject("No ExitFullscreen API")}function ot(n){const e=tt(n),t=document,i=document.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement;return e==i||!n&&window.innerWidth==screen.width&&window.innerHeight==screen.height}function ne(n){return n=tt(n),function(){ot(n)?dt():mt(n)}}function ie(n,e){const t=tt(e),i=()=>{n(ot(t))};return document.addEventListener("fullscreenchange",i),document.addEventListener("webkitfullscreenchange",i),document.addEventListener("mozfullscreenchange",i),document.addEventListener("MSFullscreenChange",i),i(),()=>{document.removeEventListener("fullscreenchange",i),document.removeEventListener("webkitfullscreenchange",i),document.removeEventListener("mozfullscreenchange",i),document.removeEventListener("MSFullscreenChange",i)}}function re(n,e){if(typeof n=="number")return n;if(/px/.test(n))return Number(n.replace(/px/,""))||0;const t=document.createElement("div");t.style.width=n,e=e||document.body,e.appendChild(t);const i=t.getBoundingClientRect().width;return e.removeChild(t),i}function oe(n,e){if(!n)return;let t,i;if(typeof e=="string"){const r=document.querySelector(e);if(!r)return;const a=r.getBoundingClientRect();t=a.width,i=a.height}else if(Array.isArray(e))t=e[0],i=e[1];else{const r=e.getBoundingClientRect();t=r.width,i=r.height}const o=t/i;return o>n?[n*i,i]:o<n?[t,t/n]:[t,i]}function se(n,e=5e3){return new Promise((t,i)=>{const o=new Image;o.src=n;const r=setTimeout(()=>{i(new Error("图片加载超时")),o.onload=null,o.onerror=null},e);o.onload=()=>{clearTimeout(r);const a=o.naturalWidth,s=o.naturalHeight,c=a/s;t([o,c])},o.onerror=()=>{clearTimeout(r),i(new Error("图片加载失败"))},o.crossOrigin="Anonymous"})}function ae(n){return new Promise((e,t)=>{fetch(n).then(i=>e(i.text())).catch(i=>{console.error("Error fetching :",i),t(i)})})}function ft(n,e){return new Promise((t,i)=>{try{e=e||Z(n,"downloaded_file"),fetch(n).then(o=>(o.ok||i(`文件下载失败,状态码: ${o.status}`),o.blob())).then(o=>{const r=URL.createObjectURL(o),a=document.createElement("a");a.href=r,a.download=decodeURIComponent(e),document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r),t(o)}).catch(i)}catch(o){i(o)}})}function ce(n,e,t){if(!t){let r=e.replace(/^[^.]+./,"");r=r==e?"text/plain":"application/"+r,t={type:r}}const i=new Blob(n,t),o=URL.createObjectURL(i);ft(o,e)}const le=Math.PI/2,Q=Math.PI/180,J=6378137,ue=85.05112878;function he(n,e){const t=Math.max(Math.min(n,180),-180),i=Math.max(Math.min(e,ue),-85.05112878),o=t*Q*J,r=i*Q,a=Math.log(Math.tan(Math.PI/4+r/2))*J;return[o,a]}function me(n,e){const t=n/J/Q,i=(2*Math.atan(Math.exp(e/J))-le)/Q;return[t,i]}function de(n,e,t){const[i,o]=n,[r,a]=e,[s,c]=t,l=(s-r)**2+(c-a)**2;if(l===0)return Math.sqrt((i-r)**2+(o-a)**2);let h=((i-r)*(s-r)+(o-a)*(c-a))/l;return h=Math.max(0,Math.min(1,h)),Math.sqrt((i-(r+h*(s-r)))**2+(o-(a+h*(c-a)))**2)}function fe(n,e,t,i,o,r=1,a=1){const s=n+t*Math.cos(i)*r,c=e+t*Math.sin(i)*a,l=n+t*Math.cos(o)*r,h=e+t*Math.sin(o)*a;return[[s,c],[l,h]]}function pe(n,e,t,i){return Math.hypot(Math.abs(t-n),Math.abs(i-e))}function ge(n,e,t,i){const o=(n+t)/2,r=(e+i)/2;return{x:o,y:r}}function _e(n,e,t,i){const[o,r]=n,[a,s]=e;let c=1/0;if(a!==0){const l=a>0?(t-o)/a:-o/a;l>0&&(c=Math.min(c,l))}if(s!==0){const l=s>0?(i-r)/s:-r/s;l>0&&(c=Math.min(c,l))}return c===1/0?n:[o+a*c,r+s*c]}class k{constructor(e,t){F(this,"resolve");F(this,"reject");this.resolve=e,this.reject=t}run(e){var t,i;return e instanceof Promise?e.then(o=>{var r;return(r=this.resolve)==null||r.call(this),o}).catch(o=>{var r;return(r=this.reject)==null||r.call(this),Promise.reject(o)}):e?(t=this.resolve)==null||t.call(this):(i=this.reject)==null||i.call(this),e}}class we extends k{constructor(e){super(),this.resolve=e}warning(...e){const t=()=>{var i,o;return(o=(i=D.tips).warning)==null?void 0:o.call(i,...e)};return new k(this.resolve,t)}error(...e){const t=()=>{var i,o;return(o=(i=D.tips).error)==null?void 0:o.call(i,...e)};return new k(this.resolve,t)}}class ye extends k{constructor(e){super(),this.reject=e}info(...e){const t=()=>{var i,o;return(o=(i=D.tips).info)==null?void 0:o.call(i,...e)};return new k(t,this.reject)}success(...e){const t=()=>{var i,o;return(o=(i=D.tips).success)==null?void 0:o.call(i,...e)};return new k(t,this.reject)}}const g=class g{constructor(){if(new.target===g)throw new Error("请直接使用静态方法,而不是实例化此类")}static register(e,t){if(typeof t!="function")return console.error("TipHandler must be a function");g.tips[e]=t}static resolveTip(e){return function(...t){const i=()=>{var o,r;return(r=(o=g.tips)[e])==null?void 0:r.call(o,...t)};return new we(i)}}static rejectTip(e){return function(...t){const i=()=>{var o,r;return(r=(o=g.tips)[e])==null?void 0:r.call(o,...t)};return new ye(i)}}};F(g,"tips",{info:void 0,success:void 0,warning:void 0,error:void 0}),F(g,"info",g.resolveTip("info")),F(g,"success",g.resolveTip("success")),F(g,"warning",g.rejectTip("warning")),F(g,"error",g.rejectTip("error"));let D=g;exports.EXTENSION_TO_MIME=ct;exports.FILE_EXTENSIONS=G;exports.PAPER_SIZE_DEFINITIONS=rt;exports.PAPER_SIZE_OPTIONS=wt;exports.UNIT_LABELS=et;exports.WINDOW_TARGET=_t;exports._Animate_CreateOscillator=xt;exports._Animate_NumericTransition=bt;exports._Animate_Schedule=yt;exports._Blob_ConvertDataToImageUrl=vt;exports._Browser_CalculatePrintableArea=Ft;exports._Browser_CopyToClipboard=Mt;exports._Browser_GetFrameRate=Et;exports._Browser_KeyedWindowManager=lt;exports._Element_CalculateCanvasSize=oe;exports._Element_CloseOnOutsideClick=Jt;exports._Element_Drag=te;exports._Element_EnterFullscreen=mt;exports._Element_ExitFullscreen=dt;exports._Element_Fullscreen=ne;exports._Element_FullscreenObserver=ie;exports._Element_GetOtherSizeInPixels=re;exports._Element_IsFullscreen=ot;exports._Element_LoadImage=se;exports._Element_LocalDrag=ee;exports._Element_ScrollEndListener=Qt;exports._File_CreateAndDownload=ce;exports._File_Download=ft;exports._File_Read=ae;exports._Format_CamelCase=At;exports._Format_CapitalizeFirstLetter=Ct;exports._Format_ExcludeSubstring=Ut;exports._Format_FileSize=Lt;exports._Format_HrefName=Z;exports._Format_NumberWithCommas=It;exports._Format_NumberWithUnit=Pt;exports._Format_Percentage=Tt;exports._Format_Timestamp=St;exports._Math_CalculateDistance2D=pe;exports._Math_GetArcPoints=fe;exports._Math_GetBoundaryIntersection=_e;exports._Math_GetMidpoint=ge;exports._Math_LngLatToPlane=he;exports._Math_PlaneToLngLat=me;exports._Math_PointToLineDistance=de;exports._Tip=D;exports._Utility_Clone=Gt;exports._Utility_Debounce=ht;exports._Utility_ExecuteWhenIdle=Bt;exports._Utility_GenerateUUID=Wt;exports._Utility_GetTargetByPath=Xt;exports._Utility_InitTargetByPath=Yt;exports._Utility_MergeObjects=it;exports._Utility_RotateList=Vt;exports._Utility_SetTargetByPath=Ht;exports._Utility_Sleep=Kt;exports._Utility_Throttle=$t;exports._Utility_TimeConsumption=Zt;exports._Utility_WaitForCondition=qt;exports._Valid_CheckConnectionWithXHR=zt;exports._Valid_DataType=K;exports._Valid_DoesInfiniteLineIntersectRectangle=kt;exports._Valid_FileTypeChecker=nt;exports._Valid_Is2DNumberArray=Rt;exports._Valid_IsInMargin=Dt;exports._Valid_IsNumberArray=ut;exports._Valid_IsObject=Ot;exports._Valid_IsPointInPolygon=jt;exports._Valid_IsSecureContext=Nt;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './Constant';
1
2
  export * from './Animate';
2
3
  export * from './Blob';
3
4
  export * from './Browser';
package/dist/index.es.js CHANGED
@@ -6,101 +6,6 @@ var et = (n) => {
6
6
  var lt = (n, e, t) => e in n ? at(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
7
7
  var C = (n, e, t) => lt(n, typeof e != "symbol" ? e + "" : e, t), nt = (n, e, t) => e.has(n) || et("Cannot " + t);
8
8
  var u = (n, e, t) => (nt(n, e, "read from private field"), t ? t.call(n) : e.get(n)), f = (n, e, t) => e.has(n) ? et("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), m = (n, e, t, i) => (nt(n, e, "write to private field"), i ? i.call(n, t) : e.set(n, t), t);
9
- function _t(n, e = 500) {
10
- let t, i = !0;
11
- function o(r) {
12
- if (!i) return;
13
- t || (t = r);
14
- let c = Math.min((r - t) / e, 1);
15
- n(c), r - t < e && requestAnimationFrame(o);
16
- }
17
- return requestAnimationFrame(o), () => i = !1;
18
- }
19
- function Et(n, e, t, i, o = 2) {
20
- let r = n, c = !1, s = 1, a = n, l = e, h = t;
21
- const d = () => {
22
- const v = (l - a) / h;
23
- return Number(v.toFixed(o));
24
- };
25
- let p = d();
26
- const y = (v) => Math.min(Math.max(v, a), l), w = (v) => Number(v.toFixed(o)), P = (v, W, V) => {
27
- const I = [];
28
- return v >= W && I.push("最小值必须小于最大值"), V <= 0 ? I.push("分段数必须为正数") : d() == 0 && I.push("数值精度过低,致使动画步长为 0"), I;
29
- }, k = (v, W, V) => {
30
- const I = P(v, W, V);
31
- return I.length > 0 ? (console.error(`参数更新失败: ${I.join("; ")}`), !1) : (a = v, l = W, h = V, p = d(), r = y(r), !0);
32
- }, H = () => {
33
- c && (s = r >= l ? -1 : r <= a ? 1 : s, r = y(r + p * s), i(w(r)), requestAnimationFrame(H));
34
- };
35
- return {
36
- /** 启动/继续动画 */
37
- play(v = r) {
38
- if (r = y(v), P(a, l, h).length)
39
- return console.error("配置参数错误", this.getParams());
40
- c || (c = !0, H());
41
- },
42
- /** 暂停动画 */
43
- pause() {
44
- c = !1;
45
- },
46
- /** 获取当前值 */
47
- getCurrent: () => w(r),
48
- /** 是否正在运行 */
49
- isPlaying: () => c,
50
- /** 更新参数(不中断动画) */
51
- updateParams: k,
52
- /** 获取当前参数 */
53
- getParams: () => ({ min: a, max: l, steps: h, precision: o, stepSize: p })
54
- };
55
- }
56
- function Mt(n, e, t, i, o = 2) {
57
- if (t <= 0) return console.error("动画步数 必须为正数");
58
- const r = (d) => Number(d.toFixed(o)), c = e - n, s = r(Math.abs(c) / t);
59
- if (s === 0) return console.error("数值精度过低,致使动画步长为 0");
60
- const a = Math.sign(c);
61
- let l = n;
62
- const h = () => {
63
- l = r(l + s * a), (a > 0 ? l < e : l > e) ? (i(l), requestAnimationFrame(h)) : i(e);
64
- };
65
- h();
66
- }
67
- function Ct(n, e = "image/png") {
68
- try {
69
- let t, i = e;
70
- if (n instanceof File)
71
- return URL.createObjectURL(n);
72
- if (typeof n == "string") {
73
- let r = n;
74
- const c = r.match(/^data:([^;]*)(;base64)?,(.*)$/i);
75
- if (c) {
76
- if (!c[2])
77
- return console.error("无效的数据 URL:缺少 base64 编码声明");
78
- if (i = c[1] || i, r = c[3], !r)
79
- return console.error("数据 URL 包含空有效负载");
80
- }
81
- r = r.replace(/[^A-Za-z0-9+/=]/g, "");
82
- const s = atob(r);
83
- t = new Uint8Array(s.length);
84
- for (let a = 0; a < s.length; a++)
85
- t[a] = s.charCodeAt(a);
86
- } else if (n instanceof ArrayBuffer)
87
- t = new Uint8Array(n);
88
- else if (n instanceof Uint8Array)
89
- t = n;
90
- else
91
- return console.error(
92
- "不支持的数据类型。应为 Base64 字符串、ArrayBuffer 或 Uint8Array"
93
- );
94
- const o = new Blob([t], { type: i });
95
- return URL.createObjectURL(o);
96
- } catch (t) {
97
- return console.error(
98
- "数据到 ImageURL 的转换失败:",
99
- t.message,
100
- t.stack || "没有可用的堆栈跟踪"
101
- ), null;
102
- }
103
- }
104
9
  const ut = {
105
10
  ".mp3": "audio/mpeg",
106
11
  ".mp4": "video/mp4",
@@ -357,7 +262,7 @@ const ut = {
357
262
  "正",
358
263
  "载",
359
264
  "极"
360
- ], st = {
265
+ ], _t = ["_self", "_blank", "_parent", "_top"], st = {
361
266
  // 北美标准尺寸 (毫米)
362
267
  Letter: { width: 215.9, height: 279.4 },
363
268
  // 8.5 × 11 英寸
@@ -410,14 +315,108 @@ const ut = {
410
315
  C6: { width: 114, height: 162 },
411
316
  C7: { width: 81, height: 114 },
412
317
  C8: { width: 57, height: 81 }
413
- };
414
- Object.keys(st).map(
318
+ }, Et = Object.keys(st).map(
415
319
  (n) => ({
416
320
  value: n,
417
321
  label: n
418
322
  })
419
323
  );
420
- function Ft(n, e = 10) {
324
+ function Mt(n, e = 500) {
325
+ let t, i = !0;
326
+ function o(r) {
327
+ if (!i) return;
328
+ t || (t = r);
329
+ let c = Math.min((r - t) / e, 1);
330
+ n(c), r - t < e && requestAnimationFrame(o);
331
+ }
332
+ return requestAnimationFrame(o), () => i = !1;
333
+ }
334
+ function Ct(n, e, t, i, o = 2) {
335
+ let r = n, c = !1, s = 1, a = n, l = e, h = t;
336
+ const d = () => {
337
+ const v = (l - a) / h;
338
+ return Number(v.toFixed(o));
339
+ };
340
+ let p = d();
341
+ const y = (v) => Math.min(Math.max(v, a), l), w = (v) => Number(v.toFixed(o)), P = (v, H, G) => {
342
+ const I = [];
343
+ return v >= H && I.push("最小值必须小于最大值"), G <= 0 ? I.push("分段数必须为正数") : d() == 0 && I.push("数值精度过低,致使动画步长为 0"), I;
344
+ }, k = (v, H, G) => {
345
+ const I = P(v, H, G);
346
+ return I.length > 0 ? (console.error(`参数更新失败: ${I.join("; ")}`), !1) : (a = v, l = H, h = G, p = d(), r = y(r), !0);
347
+ }, W = () => {
348
+ c && (s = r >= l ? -1 : r <= a ? 1 : s, r = y(r + p * s), i(w(r)), requestAnimationFrame(W));
349
+ };
350
+ return {
351
+ /** 启动/继续动画 */
352
+ play(v = r) {
353
+ if (r = y(v), P(a, l, h).length)
354
+ return console.error("配置参数错误", this.getParams());
355
+ c || (c = !0, W());
356
+ },
357
+ /** 暂停动画 */
358
+ pause() {
359
+ c = !1;
360
+ },
361
+ /** 获取当前值 */
362
+ getCurrent: () => w(r),
363
+ /** 是否正在运行 */
364
+ isPlaying: () => c,
365
+ /** 更新参数(不中断动画) */
366
+ updateParams: k,
367
+ /** 获取当前参数 */
368
+ getParams: () => ({ min: a, max: l, steps: h, precision: o, stepSize: p })
369
+ };
370
+ }
371
+ function Ft(n, e, t, i, o = 2) {
372
+ if (t <= 0) return console.error("动画步数 必须为正数");
373
+ const r = (d) => Number(d.toFixed(o)), c = e - n, s = r(Math.abs(c) / t);
374
+ if (s === 0) return console.error("数值精度过低,致使动画步长为 0");
375
+ const a = Math.sign(c);
376
+ let l = n;
377
+ const h = () => {
378
+ l = r(l + s * a), (a > 0 ? l < e : l > e) ? (i(l), requestAnimationFrame(h)) : i(e);
379
+ };
380
+ h();
381
+ }
382
+ function Lt(n, e = "image/png") {
383
+ try {
384
+ let t, i = e;
385
+ if (n instanceof File)
386
+ return URL.createObjectURL(n);
387
+ if (typeof n == "string") {
388
+ let r = n;
389
+ const c = r.match(/^data:([^;]*)(;base64)?,(.*)$/i);
390
+ if (c) {
391
+ if (!c[2])
392
+ return console.error("无效的数据 URL:缺少 base64 编码声明");
393
+ if (i = c[1] || i, r = c[3], !r)
394
+ return console.error("数据 URL 包含空有效负载");
395
+ }
396
+ r = r.replace(/[^A-Za-z0-9+/=]/g, "");
397
+ const s = atob(r);
398
+ t = new Uint8Array(s.length);
399
+ for (let a = 0; a < s.length; a++)
400
+ t[a] = s.charCodeAt(a);
401
+ } else if (n instanceof ArrayBuffer)
402
+ t = new Uint8Array(n);
403
+ else if (n instanceof Uint8Array)
404
+ t = n;
405
+ else
406
+ return console.error(
407
+ "不支持的数据类型。应为 Base64 字符串、ArrayBuffer 或 Uint8Array"
408
+ );
409
+ const o = new Blob([t], { type: i });
410
+ return URL.createObjectURL(o);
411
+ } catch (t) {
412
+ return console.error(
413
+ "数据到 ImageURL 的转换失败:",
414
+ t.message,
415
+ t.stack || "没有可用的堆栈跟踪"
416
+ ), null;
417
+ }
418
+ }
419
+ function Pt(n, e = 10) {
421
420
  let t = 0, i = e;
422
421
  function o() {
423
422
  if (i > 0)
@@ -431,7 +430,7 @@ function Ft(n, e = 10) {
431
430
  t = +/* @__PURE__ */ new Date(), o();
432
431
  });
433
432
  }
434
- function Lt(n) {
433
+ function Tt(n) {
435
434
  const e = () => Promise.resolve(), t = (s) => (console.error(s), Promise.reject(s));
436
435
  function i() {
437
436
  return navigator.clipboard.writeText(n).then(e).catch(t);
@@ -519,7 +518,7 @@ class ht {
519
518
  }
520
519
  // 存储键与对应窗口的Map
521
520
  C(ht, "keys", /* @__PURE__ */ new Map());
522
- function Pt(n, e) {
521
+ function At(n, e) {
523
522
  const t = st[n];
524
523
  if (!t) throw new Error(`未知纸张类型: ${n}`);
525
524
  const { width: i, height: o } = t, r = (w) => w / 25.4, s = typeof window < "u" ? window.devicePixelRatio * 96 : 300, a = (w) => Math.round(r(w) * s), l = a(i), h = a(o), d = a(e), p = Math.max(0, l - 2 * d), y = Math.max(0, h - 2 * d);
@@ -536,17 +535,17 @@ function Pt(n, e) {
536
535
  paperHeightPx: h
537
536
  };
538
537
  }
539
- function Tt(n) {
538
+ function It(n) {
540
539
  return n.charAt(0).toUpperCase() + n.slice(1);
541
540
  }
542
- function At(n, e, t = 2) {
541
+ function Rt(n, e, t = 2) {
543
542
  return !Number.isFinite(n) || !Number.isFinite(e) || !Number.isFinite(t) ? (console.error("所有参数必须是有限的数字"), "") : e === 0 ? (console.error("分母不能为零"), "") : t < 0 ? (console.error("小数位数不能为负数"), "") : (n / e * 100).toFixed(t) + "%";
544
543
  }
545
- function It(n) {
544
+ function St(n) {
546
545
  const t = n.toString().split("."), i = t[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
547
546
  return t.length > 1 ? i + "." + t[1] : i;
548
547
  }
549
- function Rt(n, e) {
548
+ function jt(n, e) {
550
549
  const t = {
551
550
  join: !0,
552
551
  suffix: "",
@@ -559,14 +558,14 @@ function Rt(n, e) {
559
558
  const s = Math.abs(c), a = c >= 0, l = Math.max(0, Math.floor(Math.log10(s) / 4)), h = Math.pow(1e4, l), d = s / h, p = (a ? 1 : -1) * parseFloat(d.toFixed(Math.max(0, r)));
560
559
  return i ? `${p}${it[l]}${o}` : [p, it[l] + o];
561
560
  }
562
- function jt(n) {
561
+ function Ut(n) {
563
562
  const e = ["B", "KB", "MB", "GB", "TB", "PB"];
564
563
  let t = 0;
565
564
  for (; n > 1024; )
566
565
  n /= 1024, t++;
567
566
  return `${Math.round(n * 100) / 100} ${e[t]}`;
568
567
  }
569
- function St(n, e = "YYYY-MM-DD hh:mm:ss", t = !0) {
568
+ function kt(n, e = "YYYY-MM-DD hh:mm:ss", t = !0) {
570
569
  const i = new Date(n);
571
570
  if (isNaN(i.getTime()))
572
571
  return console.error("Invalid date"), "";
@@ -590,10 +589,10 @@ function J(n, e = "file") {
590
589
  const t = n.split("/");
591
590
  return t[t.length - 1].split("?")[0];
592
591
  }
593
- function Ut(n, e) {
592
+ function Ot(n, e) {
594
593
  return n = n.replace(/([^a-zA-Z][a-z])/g, (t) => t.toUpperCase()), e ? n.replace(/[^a-zA-Z]+/g, "") : n;
595
594
  }
596
- function kt(n, e, t = ",") {
595
+ function Dt(n, e, t = ",") {
597
596
  const i = new RegExp(
598
597
  `(^|${t})${e}(${t}|$)`,
599
598
  "g"
@@ -602,7 +601,7 @@ function kt(n, e, t = ",") {
602
601
  return r === c ? t : "";
603
602
  });
604
603
  }
605
- function Dt(n) {
604
+ function zt(n) {
606
605
  return !(n === null || typeof n != "object" || Array.isArray(n));
607
606
  }
608
607
  function mt(n, e = 2) {
@@ -612,17 +611,17 @@ function mt(n, e = 2) {
612
611
  } else return !1;
613
612
  return !0;
614
613
  }
615
- function Ot(n, e = 1, t = 2) {
614
+ function Nt(n, e = 1, t = 2) {
616
615
  if (Array.isArray(n) && n.length >= e) {
617
616
  for (let o = 0; o < n.length; o++)
618
617
  if (!mt(n[o], t)) return !1;
619
618
  } else return !1;
620
619
  return !0;
621
620
  }
622
- function zt(n, e, t) {
621
+ function Bt(n, e, t) {
623
622
  return Math.abs(n - e) <= t;
624
623
  }
625
- function Nt(n, e) {
624
+ function qt(n, e) {
626
625
  let t = !1;
627
626
  const { x: i, y: o } = n, r = e.length;
628
627
  for (let c = 0, s = r - 1; c < r; s = c++) {
@@ -631,7 +630,7 @@ function Nt(n, e) {
631
630
  }
632
631
  return t;
633
632
  }
634
- function Bt(n, e, t, i) {
633
+ function $t(n, e, t, i) {
635
634
  const o = Math.min(n[0], e[0]), r = Math.max(n[0], e[0]), c = Math.min(n[1], e[1]), s = Math.max(n[1], e[1]), a = [
636
635
  [o, c],
637
636
  // 左上
@@ -649,8 +648,8 @@ function Bt(n, e, t, i) {
649
648
  const p = 1e-10;
650
649
  let y = !1, w = !1;
651
650
  for (const [P, k] of a) {
652
- const H = l * P + h * k + d;
653
- if (Math.abs(H) < p || (H > p ? y = !0 : w = !0, y && w))
651
+ const W = l * P + h * k + d;
652
+ if (Math.abs(W) < p || (W > p ? y = !0 : w = !0, y && w))
654
653
  return !0;
655
654
  }
656
655
  return y && w;
@@ -658,7 +657,7 @@ function Bt(n, e, t, i) {
658
657
  function tt(n) {
659
658
  return Object.prototype.toString.call(n).slice(8, -1).toLowerCase();
660
659
  }
661
- function qt(n) {
660
+ function Yt(n) {
662
661
  return [
663
662
  "https:",
664
663
  // HTTPS协议,用于安全地浏览网页
@@ -682,7 +681,7 @@ function qt(n) {
682
681
  // VPN协议,用于创建安全的网络连接
683
682
  ].some((t) => n.startsWith(t));
684
683
  }
685
- function $t(n) {
684
+ function Xt(n) {
686
685
  return new Promise((e, t) => {
687
686
  if (typeof n != "string" || n.trim() === "" || !n.includes("://")) {
688
687
  t(new Error("Invalid URL: Must be a non-empty string"));
@@ -790,7 +789,7 @@ const T = class T {
790
789
  // 缓存文件扩展名的条目,以提高性能
791
790
  C(T, "cachedEntries", Object.entries(Q));
792
791
  let rt = T;
793
- function Yt(n) {
792
+ function Wt(n) {
794
793
  if (typeof n != "function")
795
794
  return console.error("非函数:", n);
796
795
  const e = function(t) {
@@ -798,7 +797,7 @@ function Yt(n) {
798
797
  };
799
798
  requestIdleCallback(e);
800
799
  }
801
- function Xt(n, e) {
800
+ function Ht(n, e) {
802
801
  const t = +/* @__PURE__ */ new Date();
803
802
  return new Promise((i, o) => {
804
803
  const r = () => {
@@ -842,7 +841,7 @@ function ot(n, e, t = [], i = +/* @__PURE__ */ new Date()) {
842
841
  }), n;
843
842
  } else return e;
844
843
  }
845
- function Ht(n = "") {
844
+ function Gt(n = "") {
846
845
  return n + "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
847
846
  const t = Math.random() * 16 | 0;
848
847
  return (e === "x" ? t : t & 3 | 8).toString(16);
@@ -856,7 +855,7 @@ function dt(n, e) {
856
855
  }, e);
857
856
  };
858
857
  }
859
- function Wt(n, e) {
858
+ function Vt(n, e) {
860
859
  let t = -1 / 0;
861
860
  return function(...i) {
862
861
  const o = performance.now();
@@ -870,25 +869,25 @@ function Wt(n, e) {
870
869
  }
871
870
  };
872
871
  }
873
- function Vt(n, e, t) {
872
+ function Zt(n, e, t) {
874
873
  if (!n || !e) return n;
875
874
  const i = e.split(".");
876
875
  return i.reduce((o, r, c) => o.hasOwnProperty(r) ? o[r] : c === i.length - 1 ? o[r] = t : o[r] = {}, n);
877
876
  }
878
- function Gt(n, e) {
877
+ function Kt(n, e) {
879
878
  if (!n || !e) return n;
880
879
  const t = e.split(".");
881
880
  return t.reduce((i, o, r) => i.hasOwnProperty(o) ? i[o] : r == t.length - 1 ? void 0 : {}, n);
882
881
  }
883
- function Zt(n, e, t) {
882
+ function Qt(n, e, t) {
884
883
  if (!n || !e) return n;
885
884
  const i = e.split(".");
886
885
  return i.reduce((o, r, c) => (c === i.length - 1 && (o[r] = t), o.hasOwnProperty(r) ? o[r] : o[r] = {}), n);
887
886
  }
888
- function Kt(n) {
887
+ function Jt(n) {
889
888
  return n.map((e, t) => n.slice(t).concat(n.slice(0, t)));
890
889
  }
891
- function Qt(n) {
890
+ function te(n) {
892
891
  const e = window.structuredClone, t = (i, o = /* @__PURE__ */ new WeakMap()) => {
893
892
  const r = i;
894
893
  if (r === null || typeof r != "object")
@@ -978,7 +977,7 @@ function Qt(n) {
978
977
  return console.error("structuredClone error:", i), e && t(n);
979
978
  }
980
979
  }
981
- function Jt(n, e, t = 30) {
980
+ function ee(n, e, t = 30) {
982
981
  if (typeof n != "function")
983
982
  return console.error("第一个参数必须是一个函数。");
984
983
  if (!Array.isArray(e))
@@ -1002,7 +1001,7 @@ function Jt(n, e, t = 30) {
1002
1001
  ), a;
1003
1002
  };
1004
1003
  }
1005
- function te(n) {
1004
+ function ne(n) {
1006
1005
  const e = Date.now();
1007
1006
  let t = performance.now();
1008
1007
  for (; Date.now() - e < n; ) {
@@ -1015,7 +1014,7 @@ function te(n) {
1015
1014
  }
1016
1015
  return Date.now() - e;
1017
1016
  }
1018
- function ee(n) {
1017
+ function ie(n) {
1019
1018
  const e = dt(n, 100);
1020
1019
  let t = 0, i = 0;
1021
1020
  return function(o) {
@@ -1044,7 +1043,7 @@ function ee(n) {
1044
1043
  p(), y();
1045
1044
  };
1046
1045
  }
1047
- function ne(n, e, t) {
1046
+ function re(n, e, t) {
1048
1047
  const { isClickAllowed: i, uiLibrary: o = ["naiveUI", "ElementPlus", "Element"] } = t || {}, r = function(a) {
1049
1048
  const l = [];
1050
1049
  for (const h in a)
@@ -1076,13 +1075,13 @@ function ne(n, e, t) {
1076
1075
  () => document.addEventListener("mousedown", s)
1077
1076
  );
1078
1077
  }
1079
- var b, R, j, O, z, F, L, A, N;
1080
- class ie {
1078
+ var b, R, S, D, z, F, L, A, N;
1079
+ class oe {
1081
1080
  constructor() {
1082
1081
  f(this, b);
1083
1082
  f(this, R, !1);
1084
- f(this, j, {});
1085
- f(this, O, 0);
1083
+ f(this, S, {});
1084
+ f(this, D, 0);
1086
1085
  f(this, z, 0);
1087
1086
  f(this, F, 0);
1088
1087
  f(this, L, 0);
@@ -1090,7 +1089,7 @@ class ie {
1090
1089
  f(this, N);
1091
1090
  }
1092
1091
  init(e, t) {
1093
- m(this, b, e), m(this, A, t == null ? void 0 : t.limit), m(this, N, t == null ? void 0 : t.dragDom), m(this, j, {
1092
+ m(this, b, e), m(this, A, t == null ? void 0 : t.limit), m(this, N, t == null ? void 0 : t.dragDom), m(this, S, {
1094
1093
  mousedown: this.mousedown.bind(this),
1095
1094
  mousemove: this.mousemove.bind(this),
1096
1095
  mouseup: this.mouseup.bind(this)
@@ -1102,7 +1101,7 @@ class ie {
1102
1101
  bindOrUnbindEvent(e) {
1103
1102
  const t = e === "bind" ? "addEventListener" : "removeEventListener";
1104
1103
  if (!u(this, b)) return console.error("No DOM");
1105
- u(this, b)[t]("mousedown", u(this, j).mousedown), document[t]("mousemove", u(this, j).mousemove), document[t]("mouseup", u(this, j).mouseup);
1104
+ u(this, b)[t]("mousedown", u(this, S).mousedown), document[t]("mousemove", u(this, S).mousemove), document[t]("mouseup", u(this, S).mouseup);
1106
1105
  }
1107
1106
  alterLocation() {
1108
1107
  if (!u(this, b)) return console.error("No DOM");
@@ -1113,22 +1112,22 @@ class ie {
1113
1112
  if (u(this, N) && e.target != u(this, N)) return;
1114
1113
  document.body.classList.add("no-select"), m(this, R, !0);
1115
1114
  const t = u(this, b).getBoundingClientRect(), { pageX: i, pageY: o } = e;
1116
- m(this, O, i), m(this, z, o), m(this, F, t.y), m(this, L, t.x);
1115
+ m(this, D, i), m(this, z, o), m(this, F, t.y), m(this, L, t.x);
1117
1116
  }
1118
1117
  mousemove(e) {
1119
1118
  const { pageX: t, pageY: i } = e;
1120
- u(this, R) && (m(this, F, u(this, F) + (i - u(this, z))), m(this, L, u(this, L) + (t - u(this, O))), m(this, O, t), m(this, z, i), this.alterLocation());
1119
+ u(this, R) && (m(this, F, u(this, F) + (i - u(this, z))), m(this, L, u(this, L) + (t - u(this, D))), m(this, D, t), m(this, z, i), this.alterLocation());
1121
1120
  }
1122
1121
  mouseup() {
1123
1122
  u(this, R) && (m(this, R, !1), document.body.classList.remove("no-select"));
1124
1123
  }
1125
1124
  }
1126
- b = new WeakMap(), R = new WeakMap(), j = new WeakMap(), O = new WeakMap(), z = new WeakMap(), F = new WeakMap(), L = new WeakMap(), A = new WeakMap(), N = new WeakMap();
1127
- var _, S, U, B, q, E, M, x, $, Y;
1128
- class re {
1125
+ b = new WeakMap(), R = new WeakMap(), S = new WeakMap(), D = new WeakMap(), z = new WeakMap(), F = new WeakMap(), L = new WeakMap(), A = new WeakMap(), N = new WeakMap();
1126
+ var _, j, U, B, q, E, M, x, $, Y;
1127
+ class se {
1129
1128
  constructor() {
1130
1129
  f(this, _);
1131
- f(this, S, !1);
1130
+ f(this, j, !1);
1132
1131
  f(this, U, {});
1133
1132
  f(this, B, 0);
1134
1133
  f(this, q, 0);
@@ -1174,7 +1173,7 @@ class re {
1174
1173
  }
1175
1174
  mousedown(e) {
1176
1175
  if (!u(this, _)) return console.error("No DOM");
1177
- document.body.classList.add("no-select"), m(this, S, !0);
1176
+ document.body.classList.add("no-select"), m(this, j, !0);
1178
1177
  const t = u(this, _).getBoundingClientRect();
1179
1178
  m(this, q, t.y), m(this, B, t.x);
1180
1179
  const { pageX: i, pageY: o } = e;
@@ -1182,13 +1181,13 @@ class re {
1182
1181
  }
1183
1182
  mousemove(e) {
1184
1183
  const { pageX: t, pageY: i } = e;
1185
- u(this, S) && (m(this, E, i - u(this, q)), m(this, M, t - u(this, B)), this.alterLocation());
1184
+ u(this, j) && (m(this, E, i - u(this, q)), m(this, M, t - u(this, B)), this.alterLocation());
1186
1185
  }
1187
1186
  mouseup() {
1188
- u(this, S) && (m(this, S, !1), document.body.classList.remove("no-select"), u(this, Y) && u(this, Y).call(this, this.updateValue()));
1187
+ u(this, j) && (m(this, j, !1), document.body.classList.remove("no-select"), u(this, Y) && u(this, Y).call(this, this.updateValue()));
1189
1188
  }
1190
1189
  }
1191
- _ = new WeakMap(), S = new WeakMap(), U = new WeakMap(), B = new WeakMap(), q = new WeakMap(), E = new WeakMap(), M = new WeakMap(), x = new WeakMap(), $ = new WeakMap(), Y = new WeakMap();
1190
+ _ = new WeakMap(), j = new WeakMap(), U = new WeakMap(), B = new WeakMap(), q = new WeakMap(), E = new WeakMap(), M = new WeakMap(), x = new WeakMap(), $ = new WeakMap(), Y = new WeakMap();
1192
1191
  function K(n) {
1193
1192
  if (typeof n == "string") {
1194
1193
  const e = document.querySelector(n);
@@ -1209,12 +1208,12 @@ function ct(n) {
1209
1208
  const e = K(n), t = document, i = document.fullscreenElement || t.webkitFullscreenElement || t.mozFullScreenElement || t.msFullscreenElement;
1210
1209
  return e == i || !n && window.innerWidth == screen.width && window.innerHeight == screen.height;
1211
1210
  }
1212
- function oe(n) {
1211
+ function ce(n) {
1213
1212
  return n = K(n), function() {
1214
1213
  ct(n) ? pt() : ft(n);
1215
1214
  };
1216
1215
  }
1217
- function se(n, e) {
1216
+ function ae(n, e) {
1218
1217
  const t = K(e), i = () => {
1219
1218
  n(ct(t));
1220
1219
  };
@@ -1222,7 +1221,7 @@ function se(n, e) {
1222
1221
  document.removeEventListener("fullscreenchange", i), document.removeEventListener("webkitfullscreenchange", i), document.removeEventListener("mozfullscreenchange", i), document.removeEventListener("MSFullscreenChange", i);
1223
1222
  };
1224
1223
  }
1225
- function ce(n, e) {
1224
+ function le(n, e) {
1226
1225
  if (typeof n == "number") return n;
1227
1226
  if (/px/.test(n)) return Number(n.replace(/px/, "")) || 0;
1228
1227
  const t = document.createElement("div");
@@ -1230,7 +1229,7 @@ function ce(n, e) {
1230
1229
  const i = t.getBoundingClientRect().width;
1231
1230
  return e.removeChild(t), i;
1232
1231
  }
1233
- function ae(n, e) {
1232
+ function ue(n, e) {
1234
1233
  if (!n) return;
1235
1234
  let t, i;
1236
1235
  if (typeof e == "string") {
@@ -1247,7 +1246,7 @@ function ae(n, e) {
1247
1246
  const o = t / i;
1248
1247
  return o > n ? [n * i, i] : o < n ? [t, t / n] : [t, i];
1249
1248
  }
1250
- function le(n, e = 5e3) {
1249
+ function he(n, e = 5e3) {
1251
1250
  return new Promise((t, i) => {
1252
1251
  const o = new Image();
1253
1252
  o.src = n;
@@ -1263,7 +1262,7 @@ function le(n, e = 5e3) {
1263
1262
  }, o.crossOrigin = "Anonymous";
1264
1263
  });
1265
1264
  }
1266
- function ue(n) {
1265
+ function me(n) {
1267
1266
  return new Promise((e, t) => {
1268
1267
  fetch(n).then((i) => e(i.text())).catch((i) => {
1269
1268
  console.error("Error fetching :", i), t(i);
@@ -1282,7 +1281,7 @@ function gt(n, e) {
1282
1281
  }
1283
1282
  });
1284
1283
  }
1285
- function he(n, e, t) {
1284
+ function de(n, e, t) {
1286
1285
  if (!t) {
1287
1286
  let r = e.replace(/^[^.]+./, "");
1288
1287
  r = r == e ? "text/plain" : "application/" + r, t = { type: r };
@@ -1290,16 +1289,16 @@ function he(n, e, t) {
1290
1289
  const i = new Blob(n, t), o = URL.createObjectURL(i);
1291
1290
  gt(o, e);
1292
1291
  }
1293
- const wt = Math.PI / 2, G = Math.PI / 180, Z = 6378137, xt = 85.05112878;
1294
- function me(n, e) {
1295
- const t = Math.max(Math.min(n, 180), -180), i = Math.max(Math.min(e, xt), -85.05112878), o = t * G * Z, r = i * G, c = Math.log(Math.tan(Math.PI / 4 + r / 2)) * Z;
1292
+ const wt = Math.PI / 2, V = Math.PI / 180, Z = 6378137, xt = 85.05112878;
1293
+ function fe(n, e) {
1294
+ const t = Math.max(Math.min(n, 180), -180), i = Math.max(Math.min(e, xt), -85.05112878), o = t * V * Z, r = i * V, c = Math.log(Math.tan(Math.PI / 4 + r / 2)) * Z;
1296
1295
  return [o, c];
1297
1296
  }
1298
- function de(n, e) {
1299
- const t = n / Z / G, i = (2 * Math.atan(Math.exp(e / Z)) - wt) / G;
1297
+ function pe(n, e) {
1298
+ const t = n / Z / V, i = (2 * Math.atan(Math.exp(e / Z)) - wt) / V;
1300
1299
  return [t, i];
1301
1300
  }
1302
- function fe(n, e, t) {
1301
+ function ge(n, e, t) {
1303
1302
  const [i, o] = n, [r, c] = e, [s, a] = t, l = (s - r) ** 2 + (a - c) ** 2;
1304
1303
  if (l === 0) return Math.sqrt((i - r) ** 2 + (o - c) ** 2);
1305
1304
  let h = ((i - r) * (s - r) + (o - c) * (a - c)) / l;
@@ -1307,21 +1306,21 @@ function fe(n, e, t) {
1307
1306
  (i - (r + h * (s - r))) ** 2 + (o - (c + h * (a - c))) ** 2
1308
1307
  );
1309
1308
  }
1310
- function pe(n, e, t, i, o, r = 1, c = 1) {
1309
+ function we(n, e, t, i, o, r = 1, c = 1) {
1311
1310
  const s = n + t * Math.cos(i) * r, a = e + t * Math.sin(i) * c, l = n + t * Math.cos(o) * r, h = e + t * Math.sin(o) * c;
1312
1311
  return [
1313
1312
  [s, a],
1314
1313
  [l, h]
1315
1314
  ];
1316
1315
  }
1317
- function ge(n, e, t, i) {
1316
+ function xe(n, e, t, i) {
1318
1317
  return Math.hypot(Math.abs(t - n), Math.abs(i - e));
1319
1318
  }
1320
- function we(n, e, t, i) {
1319
+ function ye(n, e, t, i) {
1321
1320
  const o = (n + t) / 2, r = (e + i) / 2;
1322
1321
  return { x: o, y: r };
1323
1322
  }
1324
- function xe(n, e, t, i) {
1323
+ function ve(n, e, t, i) {
1325
1324
  const [o, r] = n, [c, s] = e;
1326
1325
  let a = 1 / 0;
1327
1326
  if (c !== 0) {
@@ -1334,7 +1333,7 @@ function xe(n, e, t, i) {
1334
1333
  }
1335
1334
  return a === 1 / 0 ? n : [o + c * a, r + s * a];
1336
1335
  }
1337
- class D {
1336
+ class O {
1338
1337
  constructor(e, t) {
1339
1338
  C(this, "resolve");
1340
1339
  C(this, "reject");
@@ -1351,7 +1350,7 @@ class D {
1351
1350
  }) : e ? (t = this.resolve) == null || t.call(this) : (i = this.reject) == null || i.call(this), e;
1352
1351
  }
1353
1352
  }
1354
- class yt extends D {
1353
+ class yt extends O {
1355
1354
  constructor(e) {
1356
1355
  super(), this.resolve = e;
1357
1356
  }
@@ -1360,17 +1359,17 @@ class yt extends D {
1360
1359
  var i, o;
1361
1360
  return (o = (i = X.tips).warning) == null ? void 0 : o.call(i, ...e);
1362
1361
  };
1363
- return new D(this.resolve, t);
1362
+ return new O(this.resolve, t);
1364
1363
  }
1365
1364
  error(...e) {
1366
1365
  const t = () => {
1367
1366
  var i, o;
1368
1367
  return (o = (i = X.tips).error) == null ? void 0 : o.call(i, ...e);
1369
1368
  };
1370
- return new D(this.resolve, t);
1369
+ return new O(this.resolve, t);
1371
1370
  }
1372
1371
  }
1373
- class vt extends D {
1372
+ class vt extends O {
1374
1373
  constructor(e) {
1375
1374
  super(), this.reject = e;
1376
1375
  }
@@ -1379,14 +1378,14 @@ class vt extends D {
1379
1378
  var i, o;
1380
1379
  return (o = (i = X.tips).info) == null ? void 0 : o.call(i, ...e);
1381
1380
  };
1382
- return new D(t, this.reject);
1381
+ return new O(t, this.reject);
1383
1382
  }
1384
1383
  success(...e) {
1385
1384
  const t = () => {
1386
1385
  var i, o;
1387
1386
  return (o = (i = X.tips).success) == null ? void 0 : o.call(i, ...e);
1388
1387
  };
1389
- return new D(t, this.reject);
1388
+ return new O(t, this.reject);
1390
1389
  }
1391
1390
  }
1392
1391
  const g = class g {
@@ -1430,67 +1429,73 @@ C(g, "tips", {
1430
1429
  }), C(g, "info", g.resolveTip("info")), C(g, "success", g.resolveTip("success")), C(g, "warning", g.rejectTip("warning")), C(g, "error", g.rejectTip("error"));
1431
1430
  let X = g;
1432
1431
  export {
1433
- Et as _Animate_CreateOscillator,
1434
- Mt as _Animate_NumericTransition,
1435
- _t as _Animate_Schedule,
1436
- Ct as _Blob_ConvertDataToImageUrl,
1437
- Pt as _Browser_CalculatePrintableArea,
1438
- Lt as _Browser_CopyToClipboard,
1439
- Ft as _Browser_GetFrameRate,
1432
+ ut as EXTENSION_TO_MIME,
1433
+ Q as FILE_EXTENSIONS,
1434
+ st as PAPER_SIZE_DEFINITIONS,
1435
+ Et as PAPER_SIZE_OPTIONS,
1436
+ it as UNIT_LABELS,
1437
+ _t as WINDOW_TARGET,
1438
+ Ct as _Animate_CreateOscillator,
1439
+ Ft as _Animate_NumericTransition,
1440
+ Mt as _Animate_Schedule,
1441
+ Lt as _Blob_ConvertDataToImageUrl,
1442
+ At as _Browser_CalculatePrintableArea,
1443
+ Tt as _Browser_CopyToClipboard,
1444
+ Pt as _Browser_GetFrameRate,
1440
1445
  ht as _Browser_KeyedWindowManager,
1441
- ae as _Element_CalculateCanvasSize,
1442
- ne as _Element_CloseOnOutsideClick,
1443
- ie as _Element_Drag,
1446
+ ue as _Element_CalculateCanvasSize,
1447
+ re as _Element_CloseOnOutsideClick,
1448
+ oe as _Element_Drag,
1444
1449
  ft as _Element_EnterFullscreen,
1445
1450
  pt as _Element_ExitFullscreen,
1446
- oe as _Element_Fullscreen,
1447
- se as _Element_FullscreenObserver,
1448
- ce as _Element_GetOtherSizeInPixels,
1451
+ ce as _Element_Fullscreen,
1452
+ ae as _Element_FullscreenObserver,
1453
+ le as _Element_GetOtherSizeInPixels,
1449
1454
  ct as _Element_IsFullscreen,
1450
- le as _Element_LoadImage,
1451
- re as _Element_LocalDrag,
1452
- ee as _Element_ScrollEndListener,
1453
- he as _File_CreateAndDownload,
1455
+ he as _Element_LoadImage,
1456
+ se as _Element_LocalDrag,
1457
+ ie as _Element_ScrollEndListener,
1458
+ de as _File_CreateAndDownload,
1454
1459
  gt as _File_Download,
1455
- ue as _File_Read,
1456
- Ut as _Format_CamelCase,
1457
- Tt as _Format_CapitalizeFirstLetter,
1458
- kt as _Format_ExcludeSubstring,
1459
- jt as _Format_FileSize,
1460
+ me as _File_Read,
1461
+ Ot as _Format_CamelCase,
1462
+ It as _Format_CapitalizeFirstLetter,
1463
+ Dt as _Format_ExcludeSubstring,
1464
+ Ut as _Format_FileSize,
1460
1465
  J as _Format_HrefName,
1461
- It as _Format_NumberWithCommas,
1462
- Rt as _Format_NumberWithUnit,
1463
- At as _Format_Percentage,
1464
- St as _Format_Timestamp,
1465
- ge as _Math_CalculateDistance2D,
1466
- pe as _Math_GetArcPoints,
1467
- xe as _Math_GetBoundaryIntersection,
1468
- we as _Math_GetMidpoint,
1469
- me as _Math_LngLatToPlane,
1470
- de as _Math_PlaneToLngLat,
1471
- fe as _Math_PointToLineDistance,
1466
+ St as _Format_NumberWithCommas,
1467
+ jt as _Format_NumberWithUnit,
1468
+ Rt as _Format_Percentage,
1469
+ kt as _Format_Timestamp,
1470
+ xe as _Math_CalculateDistance2D,
1471
+ we as _Math_GetArcPoints,
1472
+ ve as _Math_GetBoundaryIntersection,
1473
+ ye as _Math_GetMidpoint,
1474
+ fe as _Math_LngLatToPlane,
1475
+ pe as _Math_PlaneToLngLat,
1476
+ ge as _Math_PointToLineDistance,
1472
1477
  X as _Tip,
1473
- Qt as _Utility_Clone,
1478
+ te as _Utility_Clone,
1474
1479
  dt as _Utility_Debounce,
1475
- Yt as _Utility_ExecuteWhenIdle,
1476
- Ht as _Utility_GenerateUUID,
1477
- Gt as _Utility_GetTargetByPath,
1478
- Vt as _Utility_InitTargetByPath,
1480
+ Wt as _Utility_ExecuteWhenIdle,
1481
+ Gt as _Utility_GenerateUUID,
1482
+ Kt as _Utility_GetTargetByPath,
1483
+ Zt as _Utility_InitTargetByPath,
1479
1484
  ot as _Utility_MergeObjects,
1480
- Kt as _Utility_RotateList,
1481
- Zt as _Utility_SetTargetByPath,
1482
- te as _Utility_Sleep,
1483
- Wt as _Utility_Throttle,
1484
- Jt as _Utility_TimeConsumption,
1485
- Xt as _Utility_WaitForCondition,
1486
- $t as _Valid_CheckConnectionWithXHR,
1485
+ Jt as _Utility_RotateList,
1486
+ Qt as _Utility_SetTargetByPath,
1487
+ ne as _Utility_Sleep,
1488
+ Vt as _Utility_Throttle,
1489
+ ee as _Utility_TimeConsumption,
1490
+ Ht as _Utility_WaitForCondition,
1491
+ Xt as _Valid_CheckConnectionWithXHR,
1487
1492
  tt as _Valid_DataType,
1488
- Bt as _Valid_DoesInfiniteLineIntersectRectangle,
1493
+ $t as _Valid_DoesInfiniteLineIntersectRectangle,
1489
1494
  rt as _Valid_FileTypeChecker,
1490
- Ot as _Valid_Is2DNumberArray,
1491
- zt as _Valid_IsInMargin,
1495
+ Nt as _Valid_Is2DNumberArray,
1496
+ Bt as _Valid_IsInMargin,
1492
1497
  mt as _Valid_IsNumberArray,
1493
- Dt as _Valid_IsObject,
1494
- Nt as _Valid_IsPointInPolygon,
1495
- qt as _Valid_IsSecureContext
1498
+ zt as _Valid_IsObject,
1499
+ qt as _Valid_IsPointInPolygon,
1500
+ Yt as _Valid_IsSecureContext
1496
1501
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nhanh-pure-function",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "description": "纯函数工具",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.es.js",