@gx-design-vue/pro-utils 0.2.0-beta.45 → 0.2.0-beta.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/pro-utils.js CHANGED
@@ -72,10 +72,10 @@ const de = (e) => e == null, pe = (e) => {
72
72
  } : t[n] = e[i][n]);
73
73
  return t;
74
74
  };
75
- let j = 0;
75
+ let T = 0;
76
76
  const U = (e = 21) => {
77
77
  if (typeof window > "u" || !window.crypto)
78
- return (j += 1).toFixed(0);
78
+ return (T += 1).toFixed(0);
79
79
  let t = "";
80
80
  const r = crypto.getRandomValues(new Uint8Array(e));
81
81
  for (; e--; ) {
@@ -366,10 +366,10 @@ function be(e, t, r, n) {
366
366
  }
367
367
  }), i;
368
368
  }
369
- const Te = ({ suffixCls: e, customizePrefixCls: t, isPor: r, className: n }) => {
369
+ const je = ({ suffixCls: e, customizePrefixCls: t, isPor: r, className: n }) => {
370
370
  const i = n || (r ? "gx-pro" : "gx");
371
371
  return t || (e ? `${i}-${e}` : i);
372
- }, je = (e, t) => e ? p(e) ? e.join("-") : e.toString() : `${t || 0}`;
372
+ }, Te = (e, t) => e ? p(e) ? e.join("-") : e.toString() : `${t || 0}`;
373
373
  function Ue(e, { align: t, showIndex: r }) {
374
374
  const n = x(e);
375
375
  if (r && e.length && e.every((i) => i.dataIndex !== "sortIndex")) {
@@ -569,7 +569,7 @@ function m(e, t) {
569
569
  if (!e || e === "data:")
570
570
  return "4";
571
571
  let r = "4";
572
- return T(e) ? e.includes("data:image/") ? r = "png" : e.includes("data:video/") ? r = "mp4" : e.includes("data:audio/") && (r = "mp3") : e instanceof Blob ? (e = String(e), e.includes("image") ? r = "png" : e.includes("video") ? r = "mp4" : e.includes("audio") && (r = "mp3")) : r = E(e).toLowerCase(), w.imageType.includes(r) ? "1" : w.videoType.includes(r) ? "3" : w.audioType.includes(r) ? "2" : "4";
572
+ return j(e) ? e.includes("data:image/") ? r = "png" : e.includes("data:video/") ? r = "mp4" : e.includes("data:audio/") && (r = "mp3") : e instanceof Blob ? (e = String(e), e.includes("image") ? r = "png" : e.includes("video") ? r = "mp4" : e.includes("audio") && (r = "mp3")) : r = E(e).toLowerCase(), w.imageType.includes(r) ? "1" : w.videoType.includes(r) ? "3" : w.audioType.includes(r) ? "2" : "4";
573
573
  }
574
574
  function ce(e) {
575
575
  const { url: t = "", fileType: r = "1" } = e || {};
@@ -577,7 +577,7 @@ function ce(e) {
577
577
  function o() {
578
578
  i = { play: !1, height: 0, size: 0, width: 0, duration: 0 };
579
579
  }
580
- return t instanceof File ? n = URL.createObjectURL(t) : T(t) ? n = t : t instanceof Blob ? n = URL.createObjectURL(t) : (t.includes("https") || t.includes("http")) && (n = t), new Promise((u) => {
580
+ return t instanceof File ? n = URL.createObjectURL(t) : j(t) ? n = t : t instanceof Blob ? n = URL.createObjectURL(t) : (t.includes("https") || t.includes("http")) && (n = t), new Promise((u) => {
581
581
  let c;
582
582
  r === "1" ? (c = document.createElement("img"), c.src = n) : r === "2" ? (c = document.createElement("audio"), c.src = n) : r === "3" && (c = document.createElement("video"), c.src = n), r === "1" ? c.onload = function() {
583
583
  o(), i.play = !0, i.width = c.width || 0, i.height = c.height || 0, u(i), c = null;
@@ -591,7 +591,7 @@ function ce(e) {
591
591
  async function Je(e) {
592
592
  const { url: t = "", currentTime: r, videoSuffix: n = "", vidoeAllowPlay: i = !1 } = e;
593
593
  let o = "", u = n, c = "1", f;
594
- return t instanceof File ? (o = URL.createObjectURL(t), u = E(t.name), c = m(t.name)) : t instanceof Blob ? (o = URL.createObjectURL(t), c = m(t)) : T(t) ? (o = t, c = m(t)) : (t.includes("https") || t.includes("http")) && (o = t, u = E(t), c = m(t)), (u ? w.videoAllowType.includes(u.toLowerCase()) : !1) ? i ? D(o, r) : (f = await ce({
594
+ return t instanceof File ? (o = URL.createObjectURL(t), u = E(t.name), c = m(t.name)) : t instanceof Blob ? (o = URL.createObjectURL(t), c = m(t)) : j(t) ? (o = t, c = m(t)) : (t.includes("https") || t.includes("http")) && (o = t, u = E(t), c = m(t)), (u ? w.videoAllowType.includes(u.toLowerCase()) : !1) ? i ? D(o, r) : (f = await ce({
595
595
  url: o,
596
596
  fileType: c
597
597
  }), f.play ? D(o, r) : new Promise((a) => {
@@ -615,7 +615,7 @@ async function D(e, t = 0) {
615
615
  }));
616
616
  });
617
617
  }
618
- function T(e = "") {
618
+ function j(e = "") {
619
619
  return !!(e && [
620
620
  "data:image/",
621
621
  "data:video/",
@@ -701,7 +701,7 @@ export {
701
701
  ne as compareArray,
702
702
  Ce as compareArraySort,
703
703
  $e as compareArrayTimeSort,
704
- re as compareToMaxTime,
704
+ re as compareTime,
705
705
  Qe as convertValueBoolean,
706
706
  He as dataURLtoBlob,
707
707
  _e as dataURLtoFile,
@@ -709,7 +709,7 @@ export {
709
709
  N as filterEmpty,
710
710
  Me as formatDuraton,
711
711
  L as formatNumber,
712
- je as genColumnKey,
712
+ Te as genColumnKey,
713
713
  D as generateVidoePicture,
714
714
  We as getBase64,
715
715
  ze as getBlobUrl,
@@ -717,7 +717,7 @@ export {
717
717
  oe as getLevelData,
718
718
  Ne as getMaxFloor,
719
719
  ce as getMediaInfos,
720
- Te as getPrefixCls,
720
+ je as getPrefixCls,
721
721
  ie as getRandomNumber,
722
722
  G as getScroll,
723
723
  se as getScrollContainer,
@@ -736,7 +736,7 @@ export {
736
736
  Pe as hanndleEmptyField,
737
737
  J as is,
738
738
  p as isArray,
739
- T as isBase64,
739
+ j as isBase64,
740
740
  $ as isBoolean,
741
741
  Ae as isBrowser,
742
742
  Xe as isDataURLBase64,
@@ -2,4 +2,4 @@
2
2
  * @vue/shared v3.5.11
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
- **/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const ne=e=>{const t=Object.create(null);return r=>t[r]||(t[r]=e(r))},re=/-(\w)/g,ie=ne(e=>e.replace(re,(t,r)=>r?r.toUpperCase():"")),R=function(e,t){var r;if(w||!e||!t)return"";t=ie(t),t==="float"&&(t="cssFloat");try{const n=e.style[t];if(n)return n;const i=(r=document==null?void 0:document.defaultView)==null?void 0:r.getComputedStyle(e,"");return i?i[t]:""}catch{return e.style[t]}},N=(e,t)=>w?void 0:(t==null?R(e,"overflow"):t?R(e,"overflow-y"):R(e,"overflow-x")).match(/(scroll|auto|overlay)/),oe=(e,t)=>{if(w)return;let r=e;for(;r;){if([window,document,document.documentElement].includes(r))return window;if(N(r,t))return r;r=r.parentNode}return r},ue=(e,t)=>{if(w||!e||!t)return!1;const r=e.getBoundingClientRect();let n;return[window,document,document.documentElement,null,void 0].includes(t)?n={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0}:n=t.getBoundingClientRect(),r.top<n.bottom&&r.bottom>n.top&&r.right>n.left&&r.left<n.right};function ce(e){return/\w.(png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e)}const fe=e=>e==null,ae=e=>{if(!e||!e.startsWith("http"))return!1;try{return!!new URL(e)}catch{return!1}},le=(...e)=>{const t={},r=e.length;let n,i=0;for(;i<r;i+=1)for(n in e[i])e[i].hasOwnProperty(n)&&(typeof t[n]=="object"&&typeof e[i][n]=="object"&&t[n]!==void 0&&t[n]!==null&&!Array.isArray(t[n])&&!Array.isArray(e[i][n])?t[n]={...t[n],...e[i][n]}:t[n]=e[i][n]);return t};let P=0;const M=(e=21)=>{if(typeof window>"u"||!window.crypto)return(P+=1).toFixed(0);let t="";const r=crypto.getRandomValues(new Uint8Array(e));for(;e--;){const n=63&r[e];t+=n<36?n.toString(36):n<62?(n-26).toString(36).toUpperCase():n<63?"_":"-"}return t},se=()=>typeof window>"u"?M():window.crypto&&window.crypto.randomUUID&&typeof crypto.randomUUID=="function"?crypto.randomUUID():M();function T(e,t){if(typeof t!="string"&&!Array.isArray(t))return;const r=Array.isArray(t)?t:t.split(":");let n=e;for(let i=0;i<r.length;i++)if(n&&n.hasOwnProperty(r[i]))n=n[r[i]];else return;return n}function V(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function E(e){return typeof e=="boolean"}function m(e){return typeof e=="number"}function y(e){return typeof Array.isArray>"u"?Object.prototype.toString.call(e)==="[object Array]":Array.isArray(e)}function g(e){return e!==null&&V(e,"Object")}function $(e){return typeof e=="string"||e instanceof String}function de(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function ge(e){if(typeof e!="string")return!1;try{const t=JSON.parse(e);return typeof t=="object"&&t!==null}catch{return!1}}function me(){const e=navigator.userAgent||navigator.vendor;return!!(/iPhone/.test(e)||/Android/.test(e)&&/Mobile/.test(e)||/Windows Phone/.test(e)||/Mobile/.test(e)&&!x())}function x(){const e=navigator.userAgent||navigator.vendor;return!!(/iPad/.test(e)||/Macintosh/.test(e)&&"ontouchend"in document||/Android/.test(e)&&!/Mobile/.test(e))}function z(...e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];if(n){if($(n))t.push(n);else if(y(n))for(let i=0;i<n.length;i++){const o=z(n[i]);o&&t.push(o)}else if(g(n))for(const i in n)n[i]&&t.push(i)}}return t.filter(r=>r).join(" ")}let W=e=>setTimeout(e,16),q=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(W=e=>window.requestAnimationFrame(e),q=e=>window.cancelAnimationFrame(e));let H=0;const U=new Map;function _(e){U.delete(e)}function j(e,t=1){H+=1;const r=H;function n(i){if(i===0)_(r),e();else{const o=W(()=>{n(i-1)});U.set(r,o)}}return n(t),r}j.cancel=e=>{const t=U.get(e);return _(t),q(t)};function F(e){return e!=null&&e===e.window}function J(e,t){var i;if(typeof window>"u")return 0;const r=t?"scrollTop":"scrollLeft";let n=0;return F(e)?n=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?n=e.documentElement[r]:e&&(n=e[r]),e&&!F(e)&&typeof n!="number"&&(n=(i=(e.ownerDocument||e).documentElement)==null?void 0:i[r]),n}function ye(e,t,r,n){const i=r-t;return e/=n/2,e<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}function we(e,t={}){const{getContainer:r=()=>window,callback:n,duration:i=450}=t,o=r(),u=J(o,!0),f=Date.now(),a=()=>{const d=Date.now()-f,v=ye(d>i?i:d,u,e,i);F(o)?o.scrollTo(window.pageXOffset,v):o instanceof HTMLDocument||o.constructor.name==="HTMLDocument"?o.documentElement.scrollTop=v:o.scrollTop=v,d<i?j(a):typeof n=="function"&&n()};o&&j(a)}function he(e){let t;const r=i=>()=>{t=null,e(...i)},n=(...i)=>{t==null&&(t=requestAnimationFrame(r(i)))};return n.cancel=()=>cancelAnimationFrame(t),n}const h={videoAllowType:["mp4","webm","ogg"],audioAllowType:["mp3"],imageType:["bmp","png","gif","jpg","jpeg","psd","tif"],videoType:["mp4","swf","rmvb","avi","flv","mpg","rm","mov","asf","3gp","mkv","ts","f4v","webm","m4v","3g2","m3u8"],audioType:["mp3","mpeg","aac","wav","wma","mp2","flac","midi","ra","ape","aac","cda"]};function A(e,t,r,n){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let i,o,u;if(Array.isArray(e)){if(i=e.length,i!=t.length)return!1;for(o=i;o--!==0;)if(!A(e[o],t[o],r,n))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;for(o of e.entries())if(!A(o[1],t.get(o[0]),r,n))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(i=e.length,i!=t.length)return!1;for(o=i;o--!==0;)if(e[o]!==t[o])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&e.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&e.toString)return e.toString()===t.toString();if(u=Object.keys(e),i=u.length,i!==Object.keys(t).length)return!1;for(o=i;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,u[o]))return!1;for(o=i;o--!==0;){const f=u[o];if(!(r!=null&&r.includes(f))&&!(f==="_owner"&&e.$$typeof)&&!A(e[f],t[f],r,n))return n&&console.log(f),!1}return!0}return e!==e&&t!==t}const pe=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Se=()=>process.env.NODE_ENV==="TEST"?!0:typeof window<"u"&&typeof window.document<"u"&&typeof window.matchMedia<"u"&&!pe,ve=e=>{if(e&&e!==!0)return e},Ae=e=>{const t={};if(Object.keys(e||{}).forEach(r=>{e[r]!==void 0&&(t[r]=e[r])}),!(Object.keys(t).length<1))return t},Oe=e=>{const t={};return Object.keys(e||{}).forEach(r=>{var n;Array.isArray(e[r])&&((n=e[r])==null?void 0:n.length)===0||e[r]!==void 0&&(t[r]=e[r])}),t};function C(e){var t;if(!(typeof e!="string"&&!Array.isArray(e)))return Array.isArray(e)?e[e.length-1]:(t=e.split(":"))==null?void 0:t.slice(-1)[0]}function X(e){return e&&(e.type===s.Comment||e.type===s.Fragment&&e.children.length===0||e.type===Text&&e.children.trim()==="")}function be(e,t){var r;return D((r=e[t])==null?void 0:r.call(e))}function D(e=[]){const t=[];return e.forEach(r=>{Array.isArray(r)?t.push(...r):(r==null?void 0:r.type)===s.Fragment?t.push(...D(r.children)):t.push(r)}),t.filter(r=>!X(r))}function L(e,...t){return typeof e=="function"?e==null?void 0:e(...t):e}function Z(e,t,r="default",n){const i=C(r);if(i){let o;const u=T(t,r);return u===!1?o=!1:u===!0?o=e==null?void 0:e[i]:g(u)&&n?s.isVNode(u)?o=u:o=e==null?void 0:e[i]:o=u||(e==null?void 0:e[i]),n?s.isVNode(o)?o:L(o):o}}function Y(e,t,r="default",n){var o,u,f;const i=C(r);if(i){let a;const l=T(t,r);return l===!1?a=!1:l===!0?a=(o=e==null?void 0:e[i])==null?void 0:o.call(e,n):g(l)?s.isVNode(l)?a=l:a=(u=e==null?void 0:e[i])==null?void 0:u.call(e,n):a=l||((f=e==null?void 0:e[i])==null?void 0:f.call(e,n)),s.isVNode(a)?a:L(a,n)}}function Re(e,t,r,n){const i={};return e.forEach(o=>{const u=C(o);if(u){const f=n!=null&&n.render?Y(t,r,o,n==null?void 0:n.params):Z(t,r,o);(E(f)||f)&&(i[u]=f)}}),i}const Te=({suffixCls:e,customizePrefixCls:t,isPor:r,className:n})=>{const i=n||(r?"gx-pro":"gx");return t||(e?`${i}-${e}`:i)},Ee=(e,t)=>e?y(e)?e.join("-"):e.toString():`${t||0}`;function Ue(e,{align:t,showIndex:r}){const n=p(e);if(r&&e.length&&e.every(i=>i.dataIndex!=="sortIndex")){const i=e[0];n.unshift({title:"序号",align:t,fixed:i.fixed,width:60,uuid:k().uuid(15),dataIndex:"sortIndex",key:"sortIndex"})}else n.filter(i=>i.dataIndex!=="sortIndex");return n}function je(e,...t){return typeof e=="function"?e(...t):e}function p(e){return JSON.parse(JSON.stringify(e))}function Fe(e,t){if(g(e)){const{pageSize:r=10,total:n=0}=e;let{current:i=1}=e;return n-t<=r*(i-1)&&(i=i-1),i===0?1:i}return 1}function Ce(e=[],t,r="children"){function n(i,o){return o.map((u,f)=>{const a=`${i}-${f+1}`;return u[r]&&(u[r]=n(a,u[r])),u.sortIndex=a,u})}return p(e).map((i,o)=>{const u=g(t)&&t.current||1,f=g(t)&&t.pageSize||10,a=`${u?(u-1)*f+(o+1):o+1}`;return i[r]&&(i[r]=n(`${a}`,i[r])),i.sortIndex=a,i})}function De(e,t){return y(e)?e==null?void 0:e.filter((r,n)=>{if(m(t))return n<=t-1;if(y(t)&&t.length===2){const i=t[0]-1,o=t[1]?t[1]-1:e.length-1;return n<=o&&n>=i}else if(y(t)&&t.length===1){const i=t[0]-1,o=e.length-1;return n<=o&&n>=i}return!0}):[]}function G(e,t,r,n=0){const i=m(n)&&(n===0||n===1)?n:0,o=e[r],u=t[r];let f=0;return o<u?f=i===0?-1:0:o>u&&(f=i===0?0:-1),f}function Q(e,t,r,n=0){const i=m(n)&&(n===0||n===1)?n:0,o=new Date(e[r]),u=new Date(t[r]);let f=0;return o<u?f=i===0?-1:0:o>u&&(f=i===0?0:-1),f}function Le(e,t,r=0){return e.sort((n,i)=>G(n,i,t,r))}function Be(e,t,r=0){return e.sort((n,i)=>Q(n,i,t,r))}function Ie(e){let t=p(e);const r=new Set(t);return t=Array.from(r),t}function Ne(e,t){const r=["null","undefined"];let n=!0;return e===0?n=!0:r.includes(e)?n=!1:e||(n=!1),n?{value:e,success:n}:{value:t===""?t:t||"-",success:n}}function Pe(e){let t="";if(e>-1){const r=Math.floor(e/3600),n=Math.floor(e/60)%60,i=Number.parseInt(String(e%60));r<10?t="0"+r+":":t=r+":",n<10&&(t+="0"),t+=n+":",i<10&&(t+="0"),t+=i}return t.split(":")[0]==="00"?`${t.split(":")[1]}:${t.split(":")[2]}`:t}function k(){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return{uuid(t,r){const n=e,i=[],o=r||n.length;let u,f;if(t)for(u=0;u<t;u+=1)i[u]=n[Number.parseInt(String(Math.random()*o))];else for(i[8]="-",i[13]="-",i[18]="-",i[23]="-",i[14]="4",u=0;u<36;u+=1)i[u]||(f=Math.random()*16,i[u]=n[u===19?f&&3||8:f]);return i.join("")},uuidFast(){const t=e,r=Array.from({length:36});let n=0,i,o;for(o=0;o<36;o+=1)o===8||o===13||o===18||o===23?r[o]="-":o===14?r[o]="4":(n<=2&&(n=33554432+Math.random()*16777216||0),i=n&&15,n=n>4,r[o]=t[o===19?i&&3||8:i]);return r.join("")},uuidString(){return this.uuidFast().replace(new RegExp("-","g"),"")},uuidCompact(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=Math.random()*16||0;return(t==="x"?r:r&&3||8).toString(16)})}}}function Me(e=[],t="children"){let r=0;function n(i=[],o){i.forEach(u=>{u.floor=o,o>r&&(r=o),u[t]&&u[t].length>0&&n(u[t],o+1)})}return n(e,1),r}function K(e,t="children"){let r=[];return e.forEach(n=>{r.push(n),y(n[t])&&n[t].length>0&&(r=r.concat(K(n[t])))}),r}function Ve(e,t,r,n,i){t=t||"id",r=r||"parentId",n=n||"children",i=i||0;const o=p(e);return o.filter(u=>{const f=o.filter(a=>u[t]===a[r]);return f.length>0?u[n]=f:u[n]=[],u[r]===i})}function $e(e){return URL.createObjectURL(e)}function xe(e){return new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>t(n.result),n.onerror=i=>r(i)})}function ze(e){const t=e.split(","),r=t[0].match(/:(.*?);/)[1],n=atob(t[1]);let i=n.length;const o=new Uint8Array(i);for(;i--;)o[i]=n.charCodeAt(i);return new Blob([o],{type:r})}function We(e,t){const r=e.split(","),n=r[0].match(/:(.*?);/)[1],i=atob(r[1]);let o=i.length;const u=new Uint8Array(o);for(;o--;)u[o]=i.charCodeAt(o);return new File([u],t,{type:n})}function qe(e,t,r){return new window.File([e],t,{type:r})}function ee(e){if(!e||typeof e!="string")return"";const t=e.indexOf("?");return t>0?`${e.substring(0,t)}`:e}function O(e){var n,i,o,u,f;if(!e||typeof e!="string")return"";const t=ee(e),r=t.lastIndexOf(".");return r>0&&((f=(u=`${(o=(i=(n=t==null?void 0:t.substring)==null?void 0:n.call(t,r))==null?void 0:i.split("?"))==null?void 0:o[0]}`)==null?void 0:u.split("."))==null?void 0:f[1])||""}function S(e,t){if(t)return t;if(!e||e==="data:")return"4";let r="4";return b(e)?e.includes("data:image/")?r="png":e.includes("data:video/")?r="mp4":e.includes("data:audio/")&&(r="mp3"):e instanceof Blob?(e=String(e),e.includes("image")?r="png":e.includes("video")?r="mp4":e.includes("audio")&&(r="mp3")):r=O(e).toLowerCase(),h.imageType.includes(r)?"1":h.videoType.includes(r)?"3":h.audioType.includes(r)?"2":"4"}function te(e){const{url:t="",fileType:r="1"}=e||{};let n="",i={play:!1,height:0,size:0,width:0,duration:0};function o(){i={play:!1,height:0,size:0,width:0,duration:0}}return t instanceof File?n=URL.createObjectURL(t):b(t)?n=t:t instanceof Blob?n=URL.createObjectURL(t):(t.includes("https")||t.includes("http"))&&(n=t),new Promise(u=>{let f;r==="1"?(f=document.createElement("img"),f.src=n):r==="2"?(f=document.createElement("audio"),f.src=n):r==="3"&&(f=document.createElement("video"),f.src=n),r==="1"?f.onload=function(){o(),i.play=!0,i.width=f.width||0,i.height=f.height||0,u(i),f=null}:f.oncanplay=function(){o(),i.play=!0,i.width=(f==null?void 0:f.videoWidth)||0,i.height=(f==null?void 0:f.videoHeight)||0,i.duration=(f==null?void 0:f.duration)||0,u(i),f=null},f.onerror=function(){o(),u(i),f=null}})}async function He(e){const{url:t="",currentTime:r,videoSuffix:n="",vidoeAllowPlay:i=!1}=e;let o="",u=n,f="1",a;return t instanceof File?(o=URL.createObjectURL(t),u=O(t.name),f=S(t.name)):t instanceof Blob?(o=URL.createObjectURL(t),f=S(t)):b(t)?(o=t,f=S(t)):(t.includes("https")||t.includes("http"))&&(o=t,u=O(t),f=S(t)),(u?h.videoAllowType.includes(u.toLowerCase()):!1)?i?B(o,r):(a=await te({url:o,fileType:f}),a.play?B(o,r):new Promise(d=>{d("")})):new Promise(d=>{d("")})}async function B(e,t=0){return new Promise(r=>{let n=document.createElement("video");n&&(n.controls=!0,n.muted=!0,n.setAttribute("src",e),n.setAttribute("muted",String(!0)),n.setAttribute("crossorigin","anonymous"),n.setAttribute("autoplay",String(!0)),n.addEventListener("loadeddata",async function(){let i;for(n==null||n.addEventListener("seeked",async function(){i&&i()});t<((n==null?void 0:n.duration)||0);){n&&(n.currentTime=t),await new Promise(v=>i=v);const o=document.createElement("canvas"),u=.8,f=o.getContext("2d"),a=(n==null?void 0:n.videoWidth)||0*u,l=(n==null?void 0:n.videoHeight)||0*u,d=0;o.width=(n==null?void 0:n.videoWidth)||0*u,o.height=(n==null?void 0:n.videoHeight)||0*u,n&&f.drawImage(n,0,0,a+d,l+d),n=null,r(a===0||l===0?"":o.toDataURL("image/png",1))}}))})}function b(e=""){return!!(e&&["data:image/","data:video/","data:audio/"].find(r=>e.includes(r)))}function _e(e){return typeof e=="string"&&/^data:(image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e)}function Je(e,t,r,n=!1){e&&t&&r&&e.addEventListener(t,r,n)}function Xe(e,t,r,n=!1){e&&t&&r&&e.removeEventListener(t,r,n)}function Ze(){return/windows|win32/i.test(navigator.userAgent)}function Ye(e){return E(e)?e:!!e}function I(e,t){const r=`^\\d+(?:\\.\\d{0,${e}})?`,n=new RegExp(r),i=t.toString().match(n);if(i){const o=i[0];if(o.includes(".")){const[u,f]=o.split(".");if(/^0*$/.test(f))return u}return o}return t.toString()}function Ge(e,t){const{toChinese:r=!1,fixed:n=2,min:i=1e4}=t||{},o=m(i)?i:1e4,u=m(n)?n:2,f=r?e<o?"":e<1e8?"万":"亿":e<o?"":e<1e8?"w":"亿";if(!m(e))return{str:`${e}`,number:`${e}`};if(e<o)return{str:`${e}`,number:`${e}`};if(u===0){const l=(e/(e<1e8?1e4:1e8)).toFixed(1).split(".")[0];return{str:`${l}${f}`,number:l,unit:f}}let a;return e<1e8?(a=I(u,e/1e4),{str:a+f,number:a,unit:f}):(a=I(u,e/1e8),{str:a+f,number:a,unit:f})}function Qe(e,t){let r=0;const n=document.querySelector(t.root||"hiddenElement");if(!n)return 0;const i=document.createElement(t.createName||"span");return i.innerHTML=e,(t.cssObject||g(t.cssObject))&&Object.keys(t.cssObject).forEach(o=>{var u,f;(u=t.cssObject)!=null&&u[o]&&(i.style[o]=(f=t.cssObject)==null?void 0:f[o])}),n.append(i),r=i.getBoundingClientRect()[t.type||"width"],n.removeChild(i),r}c.arrayRepeat=Ie,c.arraySlice=De,c.blobToDataURL=qe,c.checkFileType=S,c.classNames=z,c.compareArray=G,c.compareArraySort=Le,c.compareArrayTimeSort=Be,c.compareToMaxTime=Q,c.convertValueBoolean=Ye,c.dataURLtoBlob=ze,c.dataURLtoFile=We,c.deepCopy=p,c.filterEmpty=D,c.formatDuraton=Pe,c.formatNumber=I,c.genColumnKey=Ee,c.generateVidoePicture=B,c.getBase64=xe,c.getBlobUrl=$e,c.getFileSuffix=O,c.getLevelData=K,c.getMaxFloor=Me,c.getMediaInfos=te,c.getPrefixCls=Te,c.getRandomNumber=k,c.getScroll=J,c.getScrollContainer=oe,c.getSlot=Z,c.getSlotVNode=Y,c.getSlotsChildren=be,c.getSlotsProps=Re,c.getSortIndex=Ce,c.getTextWidth=Qe,c.getValueFromObjectByKey=T,c.getVideoCoverPicture=He,c.getVideoFileUrl=ee,c.globalConfig=h,c.handleCurrentPage=Fe,c.handleShowIndex=Ue,c.hanndleEmptyField=Ne,c.is=V,c.isArray=y,c.isBase64=b,c.isBoolean=E,c.isBrowser=Se,c.isDataURLBase64=_e,c.isDeepEqualReact=A,c.isEmptyElement=X,c.isFunction=de,c.isImg=ce,c.isInContainer=ue,c.isJSONStr=ge,c.isMobile=me,c.isNil=fe,c.isNumber=m,c.isObject=g,c.isScroll=N,c.isServer=w,c.isString=$,c.isTablet=x,c.isUrl=ae,c.isWindowsOs=Ze,c.merge=le,c.nanoid=se,c.off=Xe,c.omitBoolean=ve,c.omitUndefined=Ae,c.omitUndefinedAndEmptyArr=Oe,c.on=Je,c.runFunction=je,c.scrollTo=we,c.slotRender=L,c.throttleByAnimationFrame=he,c.toConvertNumberShow=Ge,c.treeData=Ve,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
5
+ **/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const ne=e=>{const t=Object.create(null);return r=>t[r]||(t[r]=e(r))},re=/-(\w)/g,ie=ne(e=>e.replace(re,(t,r)=>r?r.toUpperCase():"")),R=function(e,t){var r;if(w||!e||!t)return"";t=ie(t),t==="float"&&(t="cssFloat");try{const n=e.style[t];if(n)return n;const i=(r=document==null?void 0:document.defaultView)==null?void 0:r.getComputedStyle(e,"");return i?i[t]:""}catch{return e.style[t]}},N=(e,t)=>w?void 0:(t==null?R(e,"overflow"):t?R(e,"overflow-y"):R(e,"overflow-x")).match(/(scroll|auto|overlay)/),oe=(e,t)=>{if(w)return;let r=e;for(;r;){if([window,document,document.documentElement].includes(r))return window;if(N(r,t))return r;r=r.parentNode}return r},ue=(e,t)=>{if(w||!e||!t)return!1;const r=e.getBoundingClientRect();let n;return[window,document,document.documentElement,null,void 0].includes(t)?n={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0}:n=t.getBoundingClientRect(),r.top<n.bottom&&r.bottom>n.top&&r.right>n.left&&r.left<n.right};function ce(e){return/\w.(png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e)}const fe=e=>e==null,ae=e=>{if(!e||!e.startsWith("http"))return!1;try{return!!new URL(e)}catch{return!1}},le=(...e)=>{const t={},r=e.length;let n,i=0;for(;i<r;i+=1)for(n in e[i])e[i].hasOwnProperty(n)&&(typeof t[n]=="object"&&typeof e[i][n]=="object"&&t[n]!==void 0&&t[n]!==null&&!Array.isArray(t[n])&&!Array.isArray(e[i][n])?t[n]={...t[n],...e[i][n]}:t[n]=e[i][n]);return t};let P=0;const M=(e=21)=>{if(typeof window>"u"||!window.crypto)return(P+=1).toFixed(0);let t="";const r=crypto.getRandomValues(new Uint8Array(e));for(;e--;){const n=63&r[e];t+=n<36?n.toString(36):n<62?(n-26).toString(36).toUpperCase():n<63?"_":"-"}return t},se=()=>typeof window>"u"?M():window.crypto&&window.crypto.randomUUID&&typeof crypto.randomUUID=="function"?crypto.randomUUID():M();function E(e,t){if(typeof t!="string"&&!Array.isArray(t))return;const r=Array.isArray(t)?t:t.split(":");let n=e;for(let i=0;i<r.length;i++)if(n&&n.hasOwnProperty(r[i]))n=n[r[i]];else return;return n}function V(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function T(e){return typeof e=="boolean"}function m(e){return typeof e=="number"}function y(e){return typeof Array.isArray>"u"?Object.prototype.toString.call(e)==="[object Array]":Array.isArray(e)}function g(e){return e!==null&&V(e,"Object")}function $(e){return typeof e=="string"||e instanceof String}function de(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function ge(e){if(typeof e!="string")return!1;try{const t=JSON.parse(e);return typeof t=="object"&&t!==null}catch{return!1}}function me(){const e=navigator.userAgent||navigator.vendor;return!!(/iPhone/.test(e)||/Android/.test(e)&&/Mobile/.test(e)||/Windows Phone/.test(e)||/Mobile/.test(e)&&!x())}function x(){const e=navigator.userAgent||navigator.vendor;return!!(/iPad/.test(e)||/Macintosh/.test(e)&&"ontouchend"in document||/Android/.test(e)&&!/Mobile/.test(e))}function z(...e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];if(n){if($(n))t.push(n);else if(y(n))for(let i=0;i<n.length;i++){const o=z(n[i]);o&&t.push(o)}else if(g(n))for(const i in n)n[i]&&t.push(i)}}return t.filter(r=>r).join(" ")}let W=e=>setTimeout(e,16),q=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(W=e=>window.requestAnimationFrame(e),q=e=>window.cancelAnimationFrame(e));let H=0;const U=new Map;function _(e){U.delete(e)}function j(e,t=1){H+=1;const r=H;function n(i){if(i===0)_(r),e();else{const o=W(()=>{n(i-1)});U.set(r,o)}}return n(t),r}j.cancel=e=>{const t=U.get(e);return _(t),q(t)};function F(e){return e!=null&&e===e.window}function J(e,t){var i;if(typeof window>"u")return 0;const r=t?"scrollTop":"scrollLeft";let n=0;return F(e)?n=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?n=e.documentElement[r]:e&&(n=e[r]),e&&!F(e)&&typeof n!="number"&&(n=(i=(e.ownerDocument||e).documentElement)==null?void 0:i[r]),n}function ye(e,t,r,n){const i=r-t;return e/=n/2,e<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}function we(e,t={}){const{getContainer:r=()=>window,callback:n,duration:i=450}=t,o=r(),u=J(o,!0),f=Date.now(),a=()=>{const d=Date.now()-f,v=ye(d>i?i:d,u,e,i);F(o)?o.scrollTo(window.pageXOffset,v):o instanceof HTMLDocument||o.constructor.name==="HTMLDocument"?o.documentElement.scrollTop=v:o.scrollTop=v,d<i?j(a):typeof n=="function"&&n()};o&&j(a)}function he(e){let t;const r=i=>()=>{t=null,e(...i)},n=(...i)=>{t==null&&(t=requestAnimationFrame(r(i)))};return n.cancel=()=>cancelAnimationFrame(t),n}const h={videoAllowType:["mp4","webm","ogg"],audioAllowType:["mp3"],imageType:["bmp","png","gif","jpg","jpeg","psd","tif"],videoType:["mp4","swf","rmvb","avi","flv","mpg","rm","mov","asf","3gp","mkv","ts","f4v","webm","m4v","3g2","m3u8"],audioType:["mp3","mpeg","aac","wav","wma","mp2","flac","midi","ra","ape","aac","cda"]};function A(e,t,r,n){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let i,o,u;if(Array.isArray(e)){if(i=e.length,i!=t.length)return!1;for(o=i;o--!==0;)if(!A(e[o],t[o],r,n))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;for(o of e.entries())if(!A(o[1],t.get(o[0]),r,n))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(i=e.length,i!=t.length)return!1;for(o=i;o--!==0;)if(e[o]!==t[o])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&e.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&e.toString)return e.toString()===t.toString();if(u=Object.keys(e),i=u.length,i!==Object.keys(t).length)return!1;for(o=i;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,u[o]))return!1;for(o=i;o--!==0;){const f=u[o];if(!(r!=null&&r.includes(f))&&!(f==="_owner"&&e.$$typeof)&&!A(e[f],t[f],r,n))return n&&console.log(f),!1}return!0}return e!==e&&t!==t}const pe=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Se=()=>process.env.NODE_ENV==="TEST"?!0:typeof window<"u"&&typeof window.document<"u"&&typeof window.matchMedia<"u"&&!pe,ve=e=>{if(e&&e!==!0)return e},Ae=e=>{const t={};if(Object.keys(e||{}).forEach(r=>{e[r]!==void 0&&(t[r]=e[r])}),!(Object.keys(t).length<1))return t},Oe=e=>{const t={};return Object.keys(e||{}).forEach(r=>{var n;Array.isArray(e[r])&&((n=e[r])==null?void 0:n.length)===0||e[r]!==void 0&&(t[r]=e[r])}),t};function C(e){var t;if(!(typeof e!="string"&&!Array.isArray(e)))return Array.isArray(e)?e[e.length-1]:(t=e.split(":"))==null?void 0:t.slice(-1)[0]}function X(e){return e&&(e.type===s.Comment||e.type===s.Fragment&&e.children.length===0||e.type===Text&&e.children.trim()==="")}function be(e,t){var r;return D((r=e[t])==null?void 0:r.call(e))}function D(e=[]){const t=[];return e.forEach(r=>{Array.isArray(r)?t.push(...r):(r==null?void 0:r.type)===s.Fragment?t.push(...D(r.children)):t.push(r)}),t.filter(r=>!X(r))}function L(e,...t){return typeof e=="function"?e==null?void 0:e(...t):e}function Z(e,t,r="default",n){const i=C(r);if(i){let o;const u=E(t,r);return u===!1?o=!1:u===!0?o=e==null?void 0:e[i]:g(u)&&n?s.isVNode(u)?o=u:o=e==null?void 0:e[i]:o=u||(e==null?void 0:e[i]),n?s.isVNode(o)?o:L(o):o}}function Y(e,t,r="default",n){var o,u,f;const i=C(r);if(i){let a;const l=E(t,r);return l===!1?a=!1:l===!0?a=(o=e==null?void 0:e[i])==null?void 0:o.call(e,n):g(l)?s.isVNode(l)?a=l:a=(u=e==null?void 0:e[i])==null?void 0:u.call(e,n):a=l||((f=e==null?void 0:e[i])==null?void 0:f.call(e,n)),s.isVNode(a)?a:L(a,n)}}function Re(e,t,r,n){const i={};return e.forEach(o=>{const u=C(o);if(u){const f=n!=null&&n.render?Y(t,r,o,n==null?void 0:n.params):Z(t,r,o);(T(f)||f)&&(i[u]=f)}}),i}const Ee=({suffixCls:e,customizePrefixCls:t,isPor:r,className:n})=>{const i=n||(r?"gx-pro":"gx");return t||(e?`${i}-${e}`:i)},Te=(e,t)=>e?y(e)?e.join("-"):e.toString():`${t||0}`;function Ue(e,{align:t,showIndex:r}){const n=p(e);if(r&&e.length&&e.every(i=>i.dataIndex!=="sortIndex")){const i=e[0];n.unshift({title:"序号",align:t,fixed:i.fixed,width:60,uuid:k().uuid(15),dataIndex:"sortIndex",key:"sortIndex"})}else n.filter(i=>i.dataIndex!=="sortIndex");return n}function je(e,...t){return typeof e=="function"?e(...t):e}function p(e){return JSON.parse(JSON.stringify(e))}function Fe(e,t){if(g(e)){const{pageSize:r=10,total:n=0}=e;let{current:i=1}=e;return n-t<=r*(i-1)&&(i=i-1),i===0?1:i}return 1}function Ce(e=[],t,r="children"){function n(i,o){return o.map((u,f)=>{const a=`${i}-${f+1}`;return u[r]&&(u[r]=n(a,u[r])),u.sortIndex=a,u})}return p(e).map((i,o)=>{const u=g(t)&&t.current||1,f=g(t)&&t.pageSize||10,a=`${u?(u-1)*f+(o+1):o+1}`;return i[r]&&(i[r]=n(`${a}`,i[r])),i.sortIndex=a,i})}function De(e,t){return y(e)?e==null?void 0:e.filter((r,n)=>{if(m(t))return n<=t-1;if(y(t)&&t.length===2){const i=t[0]-1,o=t[1]?t[1]-1:e.length-1;return n<=o&&n>=i}else if(y(t)&&t.length===1){const i=t[0]-1,o=e.length-1;return n<=o&&n>=i}return!0}):[]}function G(e,t,r,n=0){const i=m(n)&&(n===0||n===1)?n:0,o=e[r],u=t[r];let f=0;return o<u?f=i===0?-1:0:o>u&&(f=i===0?0:-1),f}function Q(e,t,r,n=0){const i=m(n)&&(n===0||n===1)?n:0,o=new Date(e[r]),u=new Date(t[r]);let f=0;return o<u?f=i===0?-1:0:o>u&&(f=i===0?0:-1),f}function Le(e,t,r=0){return e.sort((n,i)=>G(n,i,t,r))}function Be(e,t,r=0){return e.sort((n,i)=>Q(n,i,t,r))}function Ie(e){let t=p(e);const r=new Set(t);return t=Array.from(r),t}function Ne(e,t){const r=["null","undefined"];let n=!0;return e===0?n=!0:r.includes(e)?n=!1:e||(n=!1),n?{value:e,success:n}:{value:t===""?t:t||"-",success:n}}function Pe(e){let t="";if(e>-1){const r=Math.floor(e/3600),n=Math.floor(e/60)%60,i=Number.parseInt(String(e%60));r<10?t="0"+r+":":t=r+":",n<10&&(t+="0"),t+=n+":",i<10&&(t+="0"),t+=i}return t.split(":")[0]==="00"?`${t.split(":")[1]}:${t.split(":")[2]}`:t}function k(){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return{uuid(t,r){const n=e,i=[],o=r||n.length;let u,f;if(t)for(u=0;u<t;u+=1)i[u]=n[Number.parseInt(String(Math.random()*o))];else for(i[8]="-",i[13]="-",i[18]="-",i[23]="-",i[14]="4",u=0;u<36;u+=1)i[u]||(f=Math.random()*16,i[u]=n[u===19?f&&3||8:f]);return i.join("")},uuidFast(){const t=e,r=Array.from({length:36});let n=0,i,o;for(o=0;o<36;o+=1)o===8||o===13||o===18||o===23?r[o]="-":o===14?r[o]="4":(n<=2&&(n=33554432+Math.random()*16777216||0),i=n&&15,n=n>4,r[o]=t[o===19?i&&3||8:i]);return r.join("")},uuidString(){return this.uuidFast().replace(new RegExp("-","g"),"")},uuidCompact(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=Math.random()*16||0;return(t==="x"?r:r&&3||8).toString(16)})}}}function Me(e=[],t="children"){let r=0;function n(i=[],o){i.forEach(u=>{u.floor=o,o>r&&(r=o),u[t]&&u[t].length>0&&n(u[t],o+1)})}return n(e,1),r}function K(e,t="children"){let r=[];return e.forEach(n=>{r.push(n),y(n[t])&&n[t].length>0&&(r=r.concat(K(n[t])))}),r}function Ve(e,t,r,n,i){t=t||"id",r=r||"parentId",n=n||"children",i=i||0;const o=p(e);return o.filter(u=>{const f=o.filter(a=>u[t]===a[r]);return f.length>0?u[n]=f:u[n]=[],u[r]===i})}function $e(e){return URL.createObjectURL(e)}function xe(e){return new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>t(n.result),n.onerror=i=>r(i)})}function ze(e){const t=e.split(","),r=t[0].match(/:(.*?);/)[1],n=atob(t[1]);let i=n.length;const o=new Uint8Array(i);for(;i--;)o[i]=n.charCodeAt(i);return new Blob([o],{type:r})}function We(e,t){const r=e.split(","),n=r[0].match(/:(.*?);/)[1],i=atob(r[1]);let o=i.length;const u=new Uint8Array(o);for(;o--;)u[o]=i.charCodeAt(o);return new File([u],t,{type:n})}function qe(e,t,r){return new window.File([e],t,{type:r})}function ee(e){if(!e||typeof e!="string")return"";const t=e.indexOf("?");return t>0?`${e.substring(0,t)}`:e}function O(e){var n,i,o,u,f;if(!e||typeof e!="string")return"";const t=ee(e),r=t.lastIndexOf(".");return r>0&&((f=(u=`${(o=(i=(n=t==null?void 0:t.substring)==null?void 0:n.call(t,r))==null?void 0:i.split("?"))==null?void 0:o[0]}`)==null?void 0:u.split("."))==null?void 0:f[1])||""}function S(e,t){if(t)return t;if(!e||e==="data:")return"4";let r="4";return b(e)?e.includes("data:image/")?r="png":e.includes("data:video/")?r="mp4":e.includes("data:audio/")&&(r="mp3"):e instanceof Blob?(e=String(e),e.includes("image")?r="png":e.includes("video")?r="mp4":e.includes("audio")&&(r="mp3")):r=O(e).toLowerCase(),h.imageType.includes(r)?"1":h.videoType.includes(r)?"3":h.audioType.includes(r)?"2":"4"}function te(e){const{url:t="",fileType:r="1"}=e||{};let n="",i={play:!1,height:0,size:0,width:0,duration:0};function o(){i={play:!1,height:0,size:0,width:0,duration:0}}return t instanceof File?n=URL.createObjectURL(t):b(t)?n=t:t instanceof Blob?n=URL.createObjectURL(t):(t.includes("https")||t.includes("http"))&&(n=t),new Promise(u=>{let f;r==="1"?(f=document.createElement("img"),f.src=n):r==="2"?(f=document.createElement("audio"),f.src=n):r==="3"&&(f=document.createElement("video"),f.src=n),r==="1"?f.onload=function(){o(),i.play=!0,i.width=f.width||0,i.height=f.height||0,u(i),f=null}:f.oncanplay=function(){o(),i.play=!0,i.width=(f==null?void 0:f.videoWidth)||0,i.height=(f==null?void 0:f.videoHeight)||0,i.duration=(f==null?void 0:f.duration)||0,u(i),f=null},f.onerror=function(){o(),u(i),f=null}})}async function He(e){const{url:t="",currentTime:r,videoSuffix:n="",vidoeAllowPlay:i=!1}=e;let o="",u=n,f="1",a;return t instanceof File?(o=URL.createObjectURL(t),u=O(t.name),f=S(t.name)):t instanceof Blob?(o=URL.createObjectURL(t),f=S(t)):b(t)?(o=t,f=S(t)):(t.includes("https")||t.includes("http"))&&(o=t,u=O(t),f=S(t)),(u?h.videoAllowType.includes(u.toLowerCase()):!1)?i?B(o,r):(a=await te({url:o,fileType:f}),a.play?B(o,r):new Promise(d=>{d("")})):new Promise(d=>{d("")})}async function B(e,t=0){return new Promise(r=>{let n=document.createElement("video");n&&(n.controls=!0,n.muted=!0,n.setAttribute("src",e),n.setAttribute("muted",String(!0)),n.setAttribute("crossorigin","anonymous"),n.setAttribute("autoplay",String(!0)),n.addEventListener("loadeddata",async function(){let i;for(n==null||n.addEventListener("seeked",async function(){i&&i()});t<((n==null?void 0:n.duration)||0);){n&&(n.currentTime=t),await new Promise(v=>i=v);const o=document.createElement("canvas"),u=.8,f=o.getContext("2d"),a=(n==null?void 0:n.videoWidth)||0*u,l=(n==null?void 0:n.videoHeight)||0*u,d=0;o.width=(n==null?void 0:n.videoWidth)||0*u,o.height=(n==null?void 0:n.videoHeight)||0*u,n&&f.drawImage(n,0,0,a+d,l+d),n=null,r(a===0||l===0?"":o.toDataURL("image/png",1))}}))})}function b(e=""){return!!(e&&["data:image/","data:video/","data:audio/"].find(r=>e.includes(r)))}function _e(e){return typeof e=="string"&&/^data:(image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e)}function Je(e,t,r,n=!1){e&&t&&r&&e.addEventListener(t,r,n)}function Xe(e,t,r,n=!1){e&&t&&r&&e.removeEventListener(t,r,n)}function Ze(){return/windows|win32/i.test(navigator.userAgent)}function Ye(e){return T(e)?e:!!e}function I(e,t){const r=`^\\d+(?:\\.\\d{0,${e}})?`,n=new RegExp(r),i=t.toString().match(n);if(i){const o=i[0];if(o.includes(".")){const[u,f]=o.split(".");if(/^0*$/.test(f))return u}return o}return t.toString()}function Ge(e,t){const{toChinese:r=!1,fixed:n=2,min:i=1e4}=t||{},o=m(i)?i:1e4,u=m(n)?n:2,f=r?e<o?"":e<1e8?"万":"亿":e<o?"":e<1e8?"w":"亿";if(!m(e))return{str:`${e}`,number:`${e}`};if(e<o)return{str:`${e}`,number:`${e}`};if(u===0){const l=(e/(e<1e8?1e4:1e8)).toFixed(1).split(".")[0];return{str:`${l}${f}`,number:l,unit:f}}let a;return e<1e8?(a=I(u,e/1e4),{str:a+f,number:a,unit:f}):(a=I(u,e/1e8),{str:a+f,number:a,unit:f})}function Qe(e,t){let r=0;const n=document.querySelector(t.root||"hiddenElement");if(!n)return 0;const i=document.createElement(t.createName||"span");return i.innerHTML=e,(t.cssObject||g(t.cssObject))&&Object.keys(t.cssObject).forEach(o=>{var u,f;(u=t.cssObject)!=null&&u[o]&&(i.style[o]=(f=t.cssObject)==null?void 0:f[o])}),n.append(i),r=i.getBoundingClientRect()[t.type||"width"],n.removeChild(i),r}c.arrayRepeat=Ie,c.arraySlice=De,c.blobToDataURL=qe,c.checkFileType=S,c.classNames=z,c.compareArray=G,c.compareArraySort=Le,c.compareArrayTimeSort=Be,c.compareTime=Q,c.convertValueBoolean=Ye,c.dataURLtoBlob=ze,c.dataURLtoFile=We,c.deepCopy=p,c.filterEmpty=D,c.formatDuraton=Pe,c.formatNumber=I,c.genColumnKey=Te,c.generateVidoePicture=B,c.getBase64=xe,c.getBlobUrl=$e,c.getFileSuffix=O,c.getLevelData=K,c.getMaxFloor=Me,c.getMediaInfos=te,c.getPrefixCls=Ee,c.getRandomNumber=k,c.getScroll=J,c.getScrollContainer=oe,c.getSlot=Z,c.getSlotVNode=Y,c.getSlotsChildren=be,c.getSlotsProps=Re,c.getSortIndex=Ce,c.getTextWidth=Qe,c.getValueFromObjectByKey=E,c.getVideoCoverPicture=He,c.getVideoFileUrl=ee,c.globalConfig=h,c.handleCurrentPage=Fe,c.handleShowIndex=Ue,c.hanndleEmptyField=Ne,c.is=V,c.isArray=y,c.isBase64=b,c.isBoolean=T,c.isBrowser=Se,c.isDataURLBase64=_e,c.isDeepEqualReact=A,c.isEmptyElement=X,c.isFunction=de,c.isImg=ce,c.isInContainer=ue,c.isJSONStr=ge,c.isMobile=me,c.isNil=fe,c.isNumber=m,c.isObject=g,c.isScroll=N,c.isServer=w,c.isString=$,c.isTablet=x,c.isUrl=ae,c.isWindowsOs=Ze,c.merge=le,c.nanoid=se,c.off=Xe,c.omitBoolean=ve,c.omitUndefined=Ae,c.omitUndefinedAndEmptyArr=Oe,c.on=Je,c.runFunction=je,c.scrollTo=we,c.slotRender=L,c.throttleByAnimationFrame=he,c.toConvertNumberShow=Ge,c.treeData=Ve,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
@@ -14,13 +14,13 @@ export type BasicTablePageConfig = {
14
14
  total?: number;
15
15
  } | boolean;
16
16
  export interface DefaultProColumn {
17
+ key: string;
18
+ dataIndex: string;
19
+ uuid?: string;
17
20
  title?: string;
18
21
  align?: AlignType;
19
22
  fixed?: boolean | 'right' | 'left';
20
- uuid?: string;
21
- key: string;
22
- dataIndex: string;
23
- width?: number;
23
+ width?: number | string;
24
24
  }
25
25
  export type ProColumn<T = undefined> = T extends undefined ? DefaultProColumn : DefaultProColumn & T;
26
26
  export interface MaterialOptions {
@@ -69,7 +69,7 @@ export declare function compareArray<T = RecordType>(obj1: T, obj2: T, key: keyo
69
69
  * @description 这里是给到数组的sort的方法
70
70
  * @description type 0 从小到大 1 从大到小
71
71
  */
72
- export declare function compareToMaxTime<T = RecordType>(obj1: T, obj2: T, key: keyof T, sort?: 0 | 1): number;
72
+ export declare function compareTime<T = RecordType>(obj1: T, obj2: T, key: keyof T, sort?: 0 | 1): number;
73
73
  /**
74
74
  * @Author gx12358
75
75
  * @DateTime 2024/10/27
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gx-design-vue/pro-utils",
3
- "version": "0.2.0-beta.45",
3
+ "version": "0.2.0-beta.47",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "vite build",