@gx-design-vue/pro-utils 0.0.30 → 0.0.31
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.mjs +28 -28
- package/dist/pro-utils.umd.js +1 -1
- package/package.json +1 -1
package/dist/pro-utils.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as z, ref as j, computed as k, createVNode as a, isVNode as R, Fragment as H } from "vue";
|
|
2
2
|
import { createTypes as _ } from "vue-types";
|
|
3
3
|
import { CloseOutlined as q, DownOutlined as W, InfoCircleOutlined as J } from "@ant-design/icons-vue";
|
|
4
4
|
import { cloneDeep as X } from "lodash-unified";
|
|
@@ -47,11 +47,11 @@ const G = (e) => {
|
|
|
47
47
|
left: 0
|
|
48
48
|
} : i = t.getBoundingClientRect(), n.top < i.bottom && n.bottom > i.top && n.right > i.left && n.left < i.right;
|
|
49
49
|
}, K = Object.prototype.toString;
|
|
50
|
-
function
|
|
50
|
+
function L(e, t) {
|
|
51
51
|
return K.call(e) === `[object ${t}]`;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
return
|
|
53
|
+
function I(e) {
|
|
54
|
+
return L(e, "Boolean");
|
|
55
55
|
}
|
|
56
56
|
function Se(e) {
|
|
57
57
|
return typeof e == "number";
|
|
@@ -60,7 +60,7 @@ function ee(e) {
|
|
|
60
60
|
return typeof Array.isArray > "u" ? Object.prototype.toString.call(e) === "[object Array]" : Array.isArray(e);
|
|
61
61
|
}
|
|
62
62
|
function h(e) {
|
|
63
|
-
return e !== null &&
|
|
63
|
+
return e !== null && L(e, "Object");
|
|
64
64
|
}
|
|
65
65
|
function te(e) {
|
|
66
66
|
return typeof e == "string" || e instanceof String;
|
|
@@ -132,7 +132,7 @@ function Oe(e) {
|
|
|
132
132
|
};
|
|
133
133
|
return i.cancel = () => cancelAnimationFrame(t), i;
|
|
134
134
|
}
|
|
135
|
-
var
|
|
135
|
+
var B = _({
|
|
136
136
|
func: void 0,
|
|
137
137
|
bool: void 0,
|
|
138
138
|
string: void 0,
|
|
@@ -141,7 +141,7 @@ var I = _({
|
|
|
141
141
|
object: void 0,
|
|
142
142
|
integer: void 0
|
|
143
143
|
});
|
|
144
|
-
|
|
144
|
+
B.extend([{
|
|
145
145
|
name: "looseBool",
|
|
146
146
|
getter: !0,
|
|
147
147
|
type: Boolean,
|
|
@@ -156,7 +156,7 @@ I.extend([{
|
|
|
156
156
|
getter: !0,
|
|
157
157
|
type: null
|
|
158
158
|
}]);
|
|
159
|
-
const b =
|
|
159
|
+
const b = B, p = {
|
|
160
160
|
videoAllowType: [
|
|
161
161
|
"mp4",
|
|
162
162
|
"webm",
|
|
@@ -184,7 +184,7 @@ const b = I, p = {
|
|
|
184
184
|
"m3u8"
|
|
185
185
|
],
|
|
186
186
|
audioType: ["mp3", "mpeg", "aac", "wav", "wma", "mp2", "flac", "midi", "ra", "ape", "aac", "cda"]
|
|
187
|
-
},
|
|
187
|
+
}, D = ({ suffixCls: e, customizePrefixCls: t, isPor: n, className: i }) => {
|
|
188
188
|
const r = i || (n ? "gx-pro" : "gx");
|
|
189
189
|
return t || (e ? `${r}-${e}` : r);
|
|
190
190
|
}, Te = (e, t) => e ? Array.isArray(e) ? e.join("-") : e.toString() : `${t}`;
|
|
@@ -208,7 +208,7 @@ function Fe(e, { align: t, showIndex: n }) {
|
|
|
208
208
|
function Ce(e, ...t) {
|
|
209
209
|
return typeof e == "function" ? e(...t) : e;
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function U(e) {
|
|
212
212
|
return JSON.parse(JSON.stringify(e));
|
|
213
213
|
}
|
|
214
214
|
function $e(e, t) {
|
|
@@ -226,7 +226,7 @@ function je(e = [], t, n = "children") {
|
|
|
226
226
|
return l[n] && (l[n] = i(u, l[n])), l.sortIndex = u, l;
|
|
227
227
|
});
|
|
228
228
|
}
|
|
229
|
-
return
|
|
229
|
+
return U(e).map((r, o) => {
|
|
230
230
|
let l = o;
|
|
231
231
|
const c = h(t) && t.current || 1, u = h(t) && t.pageSize || 10;
|
|
232
232
|
return l = c ? (c - 1) * u + (o + 1) : o + 1, r[n] && (r[n] = i(`${l}`, r[n])), r.sortIndex = l, r;
|
|
@@ -238,7 +238,7 @@ function Ee(e, t, n, i) {
|
|
|
238
238
|
return r < o ? l = i === 0 ? -1 : 0 : r > o && (l = i === 0 ? 0 : -1), l;
|
|
239
239
|
}
|
|
240
240
|
function Re(e) {
|
|
241
|
-
let t =
|
|
241
|
+
let t = U(e);
|
|
242
242
|
const n = new Set(t);
|
|
243
243
|
return t = Array.from(n), t;
|
|
244
244
|
}
|
|
@@ -424,7 +424,7 @@ function He(e, t, n, i = !1) {
|
|
|
424
424
|
function _e(e, t, n, i = !1) {
|
|
425
425
|
e && t && n && e.removeEventListener(t, n, i);
|
|
426
426
|
}
|
|
427
|
-
const qe =
|
|
427
|
+
const qe = z({
|
|
428
428
|
props: {
|
|
429
429
|
id: b.string,
|
|
430
430
|
style: b.style,
|
|
@@ -451,10 +451,10 @@ const qe = N({
|
|
|
451
451
|
setup(e, {
|
|
452
452
|
expose: t
|
|
453
453
|
}) {
|
|
454
|
-
const n =
|
|
454
|
+
const n = D({
|
|
455
455
|
suffixCls: "core-field-label",
|
|
456
456
|
isPor: !0
|
|
457
|
-
}), i = j(), r = j(), o =
|
|
457
|
+
}), i = j(), r = j(), o = k(() => e.allowClear || !0);
|
|
458
458
|
t({
|
|
459
459
|
labelRef: i,
|
|
460
460
|
clearRef: r
|
|
@@ -462,7 +462,7 @@ const qe = N({
|
|
|
462
462
|
const l = (u) => e.formatter ? e.formatter(u) : Array.isArray(u) ? u.join(",") : String(u), c = (u, s) => {
|
|
463
463
|
var f, g;
|
|
464
464
|
if (s != null && s !== "" && (!Array.isArray(s) || s.length)) {
|
|
465
|
-
const v =
|
|
465
|
+
const v = R(s), C = u ? a("span", {
|
|
466
466
|
onClick: e.onLabelClick,
|
|
467
467
|
class: `${n}-text`
|
|
468
468
|
}, [u, ": "]) : "", d = v ? "" : l(s);
|
|
@@ -473,9 +473,9 @@ const qe = N({
|
|
|
473
473
|
alignItems: "center"
|
|
474
474
|
}
|
|
475
475
|
}, [C, v ? s : l(s)]);
|
|
476
|
-
const $ = 41,
|
|
477
|
-
const
|
|
478
|
-
return typeof d == "string" && d.length > $ &&
|
|
476
|
+
const $ = 41, P = (() => {
|
|
477
|
+
const M = Array.isArray(s) && s.length > 1, N = "\u9879";
|
|
478
|
+
return typeof d == "string" && d.length > $ && M ? `...${s.length}${N}` : "";
|
|
479
479
|
})();
|
|
480
480
|
return a("span", {
|
|
481
481
|
title: v ? "" : d,
|
|
@@ -487,7 +487,7 @@ const qe = N({
|
|
|
487
487
|
style: {
|
|
488
488
|
paddingInlineStart: 4
|
|
489
489
|
}
|
|
490
|
-
}, [typeof d == "string" ? (g = (f = d == null ? void 0 : d.toString()) == null ? void 0 : f.substr) == null ? void 0 : g.call(f, 0, $) : s]),
|
|
490
|
+
}, [typeof d == "string" ? (g = (f = d == null ? void 0 : d.toString()) == null ? void 0 : f.substr) == null ? void 0 : g.call(f, 0, $) : s]), P]);
|
|
491
491
|
}
|
|
492
492
|
return u || e.placeholder;
|
|
493
493
|
};
|
|
@@ -519,7 +519,7 @@ const qe = N({
|
|
|
519
519
|
const We = (e) => {
|
|
520
520
|
if (!e.tooltip && !e.subTitle)
|
|
521
521
|
return a(H, null, [e.label]);
|
|
522
|
-
const t =
|
|
522
|
+
const t = D({
|
|
523
523
|
suffixCls: "core-label-tip",
|
|
524
524
|
isPor: !0
|
|
525
525
|
}), n = typeof e.tooltip == "string" ? {
|
|
@@ -626,14 +626,14 @@ const fe = typeof process < "u" && process.versions != null && process.versions.
|
|
|
626
626
|
return t;
|
|
627
627
|
}, ae = (e) => e.length === 1 && (String(e[0].type) === String(Symbol("Comment")) || String(e[0].type) === String(Symbol("Fragment")) || String(e[0].type) === String(Symbol()));
|
|
628
628
|
function Ye(e) {
|
|
629
|
-
return ae(e) ? e[0].children : e;
|
|
629
|
+
return ae(e) && R(e[0].children) ? e[0].children : e;
|
|
630
630
|
}
|
|
631
631
|
function Qe(e, t, n = "default") {
|
|
632
|
-
return t[n] === !1 ? !1 :
|
|
632
|
+
return t[n] === !1 ? !1 : I(t[n]) && t[n] ? (e == null ? void 0 : e[n]) || t[n] : t[n] || e[n];
|
|
633
633
|
}
|
|
634
634
|
function de(e, t, n = "default") {
|
|
635
635
|
var i, r;
|
|
636
|
-
return t[n] === !1 ? !1 :
|
|
636
|
+
return t[n] === !1 ? !1 : I(t[n]) && t[n] ? ((i = e == null ? void 0 : e[n]) == null ? void 0 : i.call(e)) || t[n] : t[n] || ((r = e[n]) == null ? void 0 : r.call(e));
|
|
637
637
|
}
|
|
638
638
|
function Ze(e, t, n) {
|
|
639
639
|
const i = {};
|
|
@@ -651,7 +651,7 @@ export {
|
|
|
651
651
|
Ee as compareArray,
|
|
652
652
|
Me as dataURLtoBlob,
|
|
653
653
|
Ne as dataURLtoFile,
|
|
654
|
-
|
|
654
|
+
U as deepCopy,
|
|
655
655
|
Ie as formatDuraton,
|
|
656
656
|
Te as genColumnKey,
|
|
657
657
|
E as generateVidoePicture,
|
|
@@ -661,7 +661,7 @@ export {
|
|
|
661
661
|
ce as getLevelData,
|
|
662
662
|
Be as getMaxFloor,
|
|
663
663
|
se as getMediaInfos,
|
|
664
|
-
|
|
664
|
+
D as getPrefixCls,
|
|
665
665
|
le as getRandomNumber,
|
|
666
666
|
Ye as getRealVNode,
|
|
667
667
|
re as getScroll,
|
|
@@ -675,10 +675,10 @@ export {
|
|
|
675
675
|
$e as handleCurrentPage,
|
|
676
676
|
Fe as handleShowIndex,
|
|
677
677
|
Le as hanndleField,
|
|
678
|
-
|
|
678
|
+
L as is,
|
|
679
679
|
ee as isArray,
|
|
680
680
|
F as isBase64,
|
|
681
|
-
|
|
681
|
+
I as isBoolean,
|
|
682
682
|
Xe as isBrowser,
|
|
683
683
|
A as isDeepEqualReact,
|
|
684
684
|
be as isFunction,
|
package/dist/pro-utils.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(l,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("vue"),require("vue-types"),require("@ant-design/icons-vue"),require("lodash-unified"),require("ant-design-vue")):typeof define=="function"&&define.amd?define(["exports","vue","vue-types","@ant-design/icons-vue","lodash-unified","ant-design-vue"],f):(l=typeof globalThis<"u"?globalThis:l||self,f(l.PorUtils={},l.vue,l.vueTypes,l.iconsVue,l.lodashUnified,l.antDesignVue$1))})(this,function(l,f,X,O,G,Y){"use strict";const qe="",ze="",ke="",He="",_e="",We="",h=typeof window>"u";process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const Q=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Z=/-(\w)/g,K=Q(e=>e.replace(Z,(t,n)=>n?n.toUpperCase():"")),F=function(e,t){var n;if(h||!e||!t)return"";t=K(t),t==="float"&&(t="cssFloat");try{const i=e.style[t];if(i)return i;const r=(n=document==null?void 0:document.defaultView)==null?void 0:n.getComputedStyle(e,"");return r?r[t]:""}catch{return e.style[t]}},I=(e,t)=>h?void 0:(t==null?F(e,"overflow"):t?F(e,"overflow-y"):F(e,"overflow-x")).match(/(scroll|auto|overlay)/),ee=(e,t)=>{if(h)return;let n=e;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(I(n,t))return n;n=n.parentNode}return n},te=(e,t)=>{if(h||!e||!t)return!1;const n=e.getBoundingClientRect();let i;return[window,document,document.documentElement,null,void 0].includes(t)?i={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0}:i=t.getBoundingClientRect(),n.top<i.bottom&&n.bottom>i.top&&n.right>i.left&&n.left<i.right},ne=Object.prototype.toString;function C(e,t){return ne.call(e)===`[object ${t}]`}function R(e){return C(e,"Boolean")}function ie(e){return typeof e=="number"}function U(e){return typeof Array.isArray>"u"?Object.prototype.toString.call(e)==="[object Array]":Array.isArray(e)}function w(e){return e!==null&&C(e,"Object")}function D(e){return typeof e=="string"||e instanceof String}function re(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function E(...e){const t=[];for(let n=0;n<e.length;n++){const i=e[n];if(!!i){if(D(i))t.push(i);else if(U(i))for(let r=0;r<i.length;r++){const o=E(i[r]);o&&t.push(o)}else if(w(i))for(const r in i)i[r]&&t.push(r)}}return t.filter(n=>n).join(" ")}let oe=0;const m={};function b(e,t=1){const n=oe++;let i=t;function r(){i-=1,i<=0?(e(),delete m[n]):m[n]=requestAnimationFrame(r)}return m[n]=requestAnimationFrame(r),n}b.cancel=function(t){t!==void 0&&(cancelAnimationFrame(m[t]),delete m[t])},b.ids=m;function x(e){return e!=null&&e===e.window}function P(e,t){var r;if(typeof window>"u")return 0;const n=t?"scrollTop":"scrollLeft";let i=0;return x(e)?i=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?i=e.documentElement[n]:e&&(i=e[n]),e&&!x(e)&&typeof i!="number"&&(i=(r=(e.ownerDocument||e).documentElement)==null?void 0:r[n]),i}function le(e,t,n,i){const r=n-t;return e/=i/2,e<1?r/2*e*e*e+t:r/2*((e-=2)*e*e+2)+t}function ce(e,t={}){const{getContainer:n=()=>window,callback:i,duration:r=450}=t,o=n(),c=P(o,!0),u=Date.now(),a=()=>{const d=Date.now()-u,y=le(d>r?r:d,c,e,r);x(o)?o.scrollTo(window.pageXOffset,y):o instanceof HTMLDocument||o.constructor.name==="HTMLDocument"?o.documentElement.scrollTop=y:o.scrollTop=y,d<r?b(a):typeof i=="function"&&i()};b(a)}function ue(e){let t;const n=r=>()=>{t=null,e(...r)},i=(...r)=>{t==null&&(t=requestAnimationFrame(n(r)))};return i.cancel=()=>cancelAnimationFrame(t),i}var M=X.createTypes({func:void 0,bool:void 0,string:void 0,number:void 0,array:void 0,object:void 0,integer:void 0});M.extend([{name:"looseBool",getter:!0,type:Boolean,default:void 0},{name:"style",getter:!0,type:[String,Object],default:void 0},{name:"VueNode",getter:!0,type:null}]);const j=M,v={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"]},B=({suffixCls:e,customizePrefixCls:t,isPor:n,className:i})=>{const r=i||(n?"gx-pro":"gx");return t||(e?`${r}-${e}`:r)},ae=(e,t)=>e?Array.isArray(e)?e.join("-"):e.toString():`${t}`;function fe(e,{align:t,showIndex:n}){const i=G.cloneDeep(e);if(n&&e.length&&e.every(r=>r.dataIndex!=="sortIndex")){const r=e[0];i.unshift({title:"\u5E8F\u53F7",align:t,fixed:r.fixed,width:60,uuid:V().uuid(15),dataIndex:"sortIndex",key:"sortIndex"})}else i.filter(r=>r.dataIndex!=="sortIndex");return i}function se(e,...t){return typeof e=="function"?e(...t):e}function L(e){return JSON.parse(JSON.stringify(e))}function de(e,t){if(w(e)){const{pageSize:n=10,total:i=0}=e;let{current:r=1}=e;return i-t<=n*(r-1)&&(r=r-1),r===0?1:r}return 1}function ge(e=[],t,n="children"){function i(r,o){return o.map((c,u)=>{const a=`${r}-${u+1}`;return c[n]&&(c[n]=i(a,c[n])),c.sortIndex=a,c})}return L(e).map((r,o)=>{let c=o;const u=w(t)&&t.current||1,a=w(t)&&t.pageSize||10;return c=u?(u-1)*a+(o+1):o+1,r[n]&&(r[n]=i(`${c}`,r[n])),r.sortIndex=c,r})}function me(e,t,n,i){const r=e[n],o=t[n];let c=0;return r<o?c=i===0?-1:0:r>o&&(c=i===0?0:-1),c}function ye(e){let t=L(e);const n=new Set(t);return t=Array.from(n),t}function he(e,t){const n=["null","undefined"];let i=!0;return e===0?i=!0:n.includes(e)?i=!1:e||(i=!1),i?{value:e,success:i}:{value:t===""?t:t||"-",success:i}}function we(e){let t="";if(e>-1){const n=Math.floor(e/3600),i=Math.floor(e/60)%60,r=parseInt(String(e%60));n<10?t="0"+n+":":t=n+":",i<10&&(t+="0"),t+=i+":",r<10&&(t+="0"),t+=r}return t.split(":")[0]==="00"?`${t.split(":")[1]}:${t.split(":")[2]}`:t}function V(){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return{uuid(t,n){const i=e,r=[],o=n||i.length;let c,u;if(t)for(c=0;c<t;c+=1)r[c]=i[parseInt(String(Math.random()*o))];else for(r[8]="-",r[13]="-",r[18]="-",r[23]="-",r[14]="4",c=0;c<36;c+=1)r[c]||(u=Math.random()*16,r[c]=i[c===19?u&&3||8:u]);return r.join("")},uuidFast(){const t=e,n=new Array(36);let i=0,r,o;for(o=0;o<36;o+=1)o===8||o===13||o===18||o===23?n[o]="-":o===14?n[o]="4":(i<=2&&(i=33554432+Math.random()*16777216||0),r=i&&15,i=i>4,n[o]=t[o===19?r&&3||8:r]);return n.join("")},uuidString(){return this.uuidFast().replace(new RegExp("-","g"),"")},uuidCompact(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=Math.random()*16||0;return(t==="x"?n:n&&3||8).toString(16)})}}}function Se(e=[]){let t=0;function n(i=[],r){i.forEach(o=>{o.floor=r,r>t&&(t=r),o.children&&o.children.length>0&&n(o.children,r+1)})}return n(e,1),t}function q(e,t="children"){let n=[];return e.forEach(i=>{n.push(i),i[t]&&i[t].length>0&&(n=n.concat(q(i[t])))}),n}function be(e,t,n,i,r){t=t||"id",n=n||"parentId",i=i||"children",r=r||0;const o=JSON.parse(JSON.stringify(e));return o.filter(c=>{const u=o.filter(a=>c[t]===a[n||"parentId"]);return u.length>0?c[i||"children"]=u:delete c[i||"children"],c[n||"parentId"]===r})}function ve(e){return URL.createObjectURL(e)}function pe(e){return new Promise((t,n)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(i.result),i.onerror=r=>n(r)})}function Ae(e){const t=e.split(","),n=t[0].match(/:(.*?);/)[1],i=atob(t[1]);let r=i.length;const o=new Uint8Array(r);for(;r--;)o[r]=i.charCodeAt(r);return new Blob([o],{type:n})}function Te(e,t){const n=e.split(","),i=n[0].match(/:(.*?);/)[1],r=atob(n[1]);let o=r.length;const c=new Uint8Array(o);for(;o--;)c[o]=r.charCodeAt(o);return new File([c],t,{type:i})}function Oe(e,t,n){return new window.File([e],t,{type:n})}function z(e=""){const t=e.indexOf("?");return t>0?`${e.substring(0,t)}`:e}function p(e=""){e=z(e);const t=e.lastIndexOf(".");return t>0?`${e.substring(t).split("?")[0]}`.split(".")[1]:""}function S(e,t){if(t)return t;if(!e||e==="data:")return"4";let n="4";return A(e)?e.includes("data:image/")?n="png":e.includes("data:video/")?n="mp4":e.includes("data:audio/")&&(n="mp3"):e instanceof Blob?(e=String(e),e.includes("image")?n="png":e.includes("video")?n="mp4":e.includes("audio")&&(n="mp3")):n=p(e).toLowerCase(),v.imageType.includes(n)?"1":v.videoType.includes(n)?"3":v.audioType.includes(n)?"2":"4"}function k(e){const{url:t="",fileType:n="1"}=e;let i="";return t instanceof File?i=URL.createObjectURL(t):A(t)?i=t:t instanceof Blob?i=URL.createObjectURL(t):(t.includes("https")||t.includes("http"))&&(i=t),new Promise(function(r){let o;n==="1"?(o=document.createElement("img"),o.src=i):n==="2"?(o=document.createElement("audio"),o.src=i):n==="3"&&(o=document.createElement("video"),o.src=i),n==="1"?o.onload=function(){r({play:!0,width:o.width||0,height:o.height||0}),o=null}:o.oncanplay=function(){r({play:!0,duration:o.duration,width:(o==null?void 0:o.videoWidth)||0,height:(o==null?void 0:o.videoHeight)||0}),o=null},o.onerror=function(){r({play:!1}),o=null}})}async function Fe(e){const{url:t="",currentTime:n,videoSuffix:i="",vidoeAllowPlay:r=!1}=e;let o="",c=i,u="1",a;return t instanceof File?(o=URL.createObjectURL(t),c=p(t.name),u=S(t.name)):t instanceof Blob?(o=URL.createObjectURL(t),u=S(t)):A(t)?(o=t,u=S(t)):(t.includes("https")||t.includes("http"))&&(o=t,c=p(t),u=S(t)),(c?v.videoAllowType.includes(c.toLowerCase()):!1)?r?N(o,n):(a=await k({url:o,fileType:u}),a.play?N(o,n):new Promise(function(d){d("")})):new Promise(function(d){d("")})}async function N(e,t){let n=document.createElement("video");n.style.display="none",n.controls=!0,n.muted=!0,t&&(n.currentTime=t),n.setAttribute("src",e),n.setAttribute("muted",String(!0)),n.setAttribute("crossorigin","anonymous"),n.setAttribute("autoplay",String(!0));const i=document.createElement("canvas"),r=.8,o=100,c=i.getContext("2d");return new Promise(function(u){n&&n.addEventListener("canplay",function(){setTimeout(function(){const a=(n==null?void 0:n.videoWidth)||0*r,s=(n==null?void 0:n.videoHeight)||0*r,d=0;i.width=(n==null?void 0:n.videoWidth)||0*r,i.height=(n==null?void 0:n.videoHeight)||0*r,c.drawImage(n,0,0,a+d,s+d),n=null,u(a===0||s===0?"":i.toDataURL("image/png",1))},o)},!1)})}function A(e=""){return!!(e&&["data:image/","data:video/","data:audio/"].find(n=>e.includes(n)))}function Ce(e,t,n,i=!1){e&&t&&n&&e.addEventListener(t,n,i)}function Re(e,t,n,i=!1){e&&t&&n&&e.removeEventListener(t,n,i)}const Je="",xe=f.defineComponent({props:{id:j.string,style:j.style,size:{type:String,default:"middle"},label:Object,placeholder:[Object,String],class:String,ellipsis:Boolean,allowClear:{type:Boolean,default:!0},bordered:Boolean,expanded:Boolean,disabled:Boolean,onClear:Function,onLabelClick:Function,formatter:Function,value:j.any},setup(e,{expose:t}){const n=B({suffixCls:"core-field-label",isPor:!0}),i=f.ref(),r=f.ref(),o=f.computed(()=>e.allowClear||!0);t({labelRef:i,clearRef:r});const c=a=>e.formatter?e.formatter(a):Array.isArray(a)?a.join(","):String(a),u=(a,s)=>{var d,y;if(s!=null&&s!==""&&(!Array.isArray(s)||s.length)){const $=f.isVNode(s),W=a?f.createVNode("span",{onClick:e.onLabelClick,class:`${n}-text`},[a,": "]):"",g=$?"":c(s);if(!e.ellipsis)return f.createVNode("span",{style:{display:"inline-flex",alignItems:"center"}},[W,$?s:c(s)]);const J=41,Pe=(()=>{const Me=Array.isArray(s)&&s.length>1,Ve="\u9879";return typeof g=="string"&&g.length>J&&Me?`...${s.length}${Ve}`:""})();return f.createVNode("span",{title:$?"":g,style:{display:"inline-flex",alignItems:"center"}},[W,f.createVNode("span",{style:{paddingInlineStart:4}},[typeof g=="string"?(y=(d=g==null?void 0:g.toString())==null?void 0:d.substr)==null?void 0:y.call(d,0,J):s]),Pe])}return a||e.placeholder};return()=>f.createVNode("span",{class:{[`${n}`]:!0,[`${n}-${e.size}`]:e.size,[`${n}-active`]:!!e.value||e.value===0,[`${n}-disabled`]:e.disabled,[`${n}-bordered`]:e.bordered,[`${n}-allow-clear`]:o.value,[`${e.class}`]:e.class},style:e.style,ref:i},[u(e.label,e.value),(e.value||e.value===0)&&o.value&&f.createVNode(O.CloseOutlined,{role:"button",title:"\u6E05\u9664",class:[`${n}-icon`,`${n}-close`],onClick:a=>{e.onClear&&!e.disabled&&e.onClear(),a.stopPropagation()},ref:r},null),f.createVNode(O.DownOutlined,{class:[`${n}-icon`,`${n}-arrow`]},null)])}}),Xe="",je=e=>{if(!e.tooltip&&!e.subTitle)return f.createVNode(f.Fragment,null,[e.label]);const t=B({suffixCls:"core-label-tip",isPor:!0}),n=typeof e.tooltip=="string"?{title:e.tooltip}:e.tooltip,i=(n==null?void 0:n.icon)||f.createVNode(O.InfoCircleOutlined,null,null);return f.createVNode("div",{class:t,onMousedown:r=>r.stopPropagation(),onMouseleave:r=>r.stopPropagation(),onMousemove:r=>r.stopPropagation()},[f.createVNode("div",{class:{[`${t}-title`]:!0,[`${t}-title-ellipsis`]:e.ellipsis}},[e.label]),e.subTitle&&f.createVNode("div",{class:`${t}-subtitle`},[e.subTitle]),e.tooltip&&f.createVNode(Y.Tooltip,n,{default:()=>[f.createVNode("span",{class:`${t}-icon`},[i])]})])},Be=(...e)=>{const t={},n=e.length;let i,r=0;for(;r<n;r+=1)for(i in e[r])e[r].hasOwnProperty(i)&&(typeof t[i]=="object"&&typeof e[r][i]=="object"&&t[i]!==void 0&&t[i]!==null&&!Array.isArray(t[i])&&!Array.isArray(e[r][i])?t[i]={...t[i],...e[r][i]}:t[i]=e[r][i]);return t};function T(e,t,n,i){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,o,c;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(o=r;o--!==0;)if(!T(e[o],t[o],n,i))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(!T(o[1],t.get(o[0]),n,i))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(r=e.length,r!=t.length)return!1;for(o=r;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(c=Object.keys(e),r=c.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,c[o]))return!1;for(o=r;o--!==0;){const u=c[o];if(!(n!=null&&n.includes(u))&&!(u==="_owner"&&e.$$typeof)&&!T(e[u],t[u],n,i))return i&&console.log(u),!1}return!0}return e!==e&&t!==t}const Le=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Ne=()=>process.env.NODE_ENV==="TEST"?!0:typeof window<"u"&&typeof window.document<"u"&&typeof window.matchMedia<"u"&&!Le,$e=e=>{if(e&&e!==!0)return e},Ie=e=>{const t={};if(Object.keys(e||{}).forEach(n=>{e[n]!==void 0&&(t[n]=e[n])}),!(Object.keys(t).length<1))return t},H=e=>e.length===1&&(String(e[0].type)===String(Symbol("Comment"))||String(e[0].type)===String(Symbol("Fragment"))||String(e[0].type)===String(Symbol()));function Ue(e){return H(e)?e[0].children:e}function De(e,t,n="default"){return t[n]===!1?!1:R(t[n])&&t[n]?(e==null?void 0:e[n])||t[n]:t[n]||e[n]}function _(e,t,n="default"){var i,r;return t[n]===!1?!1:R(t[n])&&t[n]?((i=e==null?void 0:e[n])==null?void 0:i.call(e))||t[n]:t[n]||((r=e[n])==null?void 0:r.call(e))}function Ee(e,t,n){const i={};return e.forEach(r=>{i[r]=_(t,n,r)}),i}l.FieldLabel=xe,l.LabelIconTip=je,l.arrayRepeat=ye,l.blobToDataURL=Oe,l.checkFileType=S,l.classNames=E,l.compareArray=me,l.dataURLtoBlob=Ae,l.dataURLtoFile=Te,l.deepCopy=L,l.formatDuraton=we,l.genColumnKey=ae,l.generateVidoePicture=N,l.getBase64=pe,l.getBlobUrl=ve,l.getFileSuffix=p,l.getLevelData=q,l.getMaxFloor=Se,l.getMediaInfos=k,l.getPrefixCls=B,l.getRandomNumber=V,l.getRealVNode=Ue,l.getScroll=P,l.getScrollContainer=ee,l.getSlot=De,l.getSlotVNode=_,l.getSlotsProps=Ee,l.getSortIndex=ge,l.getVideoCoverPicture=Fe,l.getVideoFileUrl=z,l.handleCurrentPage=de,l.handleShowIndex=fe,l.hanndleField=he,l.is=C,l.isArray=U,l.isBase64=A,l.isBoolean=R,l.isBrowser=Ne,l.isDeepEqualReact=T,l.isFunction=re,l.isInContainer=te,l.isNumber=ie,l.isObject=w,l.isScroll=I,l.isServer=h,l.isSlotFragment=H,l.isString=D,l.merge=Be,l.off=Re,l.omitBoolean=$e,l.omitUndefined=Ie,l.on=Ce,l.runFunction=se,l.scrollTo=ce,l.throttleByAnimationFrame=ue,l.treeData=be,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(l,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("vue"),require("vue-types"),require("@ant-design/icons-vue"),require("lodash-unified"),require("ant-design-vue")):typeof define=="function"&&define.amd?define(["exports","vue","vue-types","@ant-design/icons-vue","lodash-unified","ant-design-vue"],f):(l=typeof globalThis<"u"?globalThis:l||self,f(l.PorUtils={},l.vue,l.vueTypes,l.iconsVue,l.lodashUnified,l.antDesignVue$1))})(this,function(l,f,X,O,G,Y){"use strict";const qe="",ze="",ke="",He="",_e="",We="",h=typeof window>"u";process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const Q=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Z=/-(\w)/g,K=Q(e=>e.replace(Z,(t,n)=>n?n.toUpperCase():"")),F=function(e,t){var n;if(h||!e||!t)return"";t=K(t),t==="float"&&(t="cssFloat");try{const i=e.style[t];if(i)return i;const r=(n=document==null?void 0:document.defaultView)==null?void 0:n.getComputedStyle(e,"");return r?r[t]:""}catch{return e.style[t]}},I=(e,t)=>h?void 0:(t==null?F(e,"overflow"):t?F(e,"overflow-y"):F(e,"overflow-x")).match(/(scroll|auto|overlay)/),ee=(e,t)=>{if(h)return;let n=e;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(I(n,t))return n;n=n.parentNode}return n},te=(e,t)=>{if(h||!e||!t)return!1;const n=e.getBoundingClientRect();let i;return[window,document,document.documentElement,null,void 0].includes(t)?i={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0}:i=t.getBoundingClientRect(),n.top<i.bottom&&n.bottom>i.top&&n.right>i.left&&n.left<i.right},ne=Object.prototype.toString;function C(e,t){return ne.call(e)===`[object ${t}]`}function R(e){return C(e,"Boolean")}function ie(e){return typeof e=="number"}function U(e){return typeof Array.isArray>"u"?Object.prototype.toString.call(e)==="[object Array]":Array.isArray(e)}function w(e){return e!==null&&C(e,"Object")}function D(e){return typeof e=="string"||e instanceof String}function re(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function E(...e){const t=[];for(let n=0;n<e.length;n++){const i=e[n];if(!!i){if(D(i))t.push(i);else if(U(i))for(let r=0;r<i.length;r++){const o=E(i[r]);o&&t.push(o)}else if(w(i))for(const r in i)i[r]&&t.push(r)}}return t.filter(n=>n).join(" ")}let oe=0;const m={};function b(e,t=1){const n=oe++;let i=t;function r(){i-=1,i<=0?(e(),delete m[n]):m[n]=requestAnimationFrame(r)}return m[n]=requestAnimationFrame(r),n}b.cancel=function(t){t!==void 0&&(cancelAnimationFrame(m[t]),delete m[t])},b.ids=m;function x(e){return e!=null&&e===e.window}function P(e,t){var r;if(typeof window>"u")return 0;const n=t?"scrollTop":"scrollLeft";let i=0;return x(e)?i=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?i=e.documentElement[n]:e&&(i=e[n]),e&&!x(e)&&typeof i!="number"&&(i=(r=(e.ownerDocument||e).documentElement)==null?void 0:r[n]),i}function le(e,t,n,i){const r=n-t;return e/=i/2,e<1?r/2*e*e*e+t:r/2*((e-=2)*e*e+2)+t}function ce(e,t={}){const{getContainer:n=()=>window,callback:i,duration:r=450}=t,o=n(),c=P(o,!0),u=Date.now(),a=()=>{const d=Date.now()-u,y=le(d>r?r:d,c,e,r);x(o)?o.scrollTo(window.pageXOffset,y):o instanceof HTMLDocument||o.constructor.name==="HTMLDocument"?o.documentElement.scrollTop=y:o.scrollTop=y,d<r?b(a):typeof i=="function"&&i()};b(a)}function ue(e){let t;const n=r=>()=>{t=null,e(...r)},i=(...r)=>{t==null&&(t=requestAnimationFrame(n(r)))};return i.cancel=()=>cancelAnimationFrame(t),i}var M=X.createTypes({func:void 0,bool:void 0,string:void 0,number:void 0,array:void 0,object:void 0,integer:void 0});M.extend([{name:"looseBool",getter:!0,type:Boolean,default:void 0},{name:"style",getter:!0,type:[String,Object],default:void 0},{name:"VueNode",getter:!0,type:null}]);const j=M,v={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"]},N=({suffixCls:e,customizePrefixCls:t,isPor:n,className:i})=>{const r=i||(n?"gx-pro":"gx");return t||(e?`${r}-${e}`:r)},ae=(e,t)=>e?Array.isArray(e)?e.join("-"):e.toString():`${t}`;function fe(e,{align:t,showIndex:n}){const i=G.cloneDeep(e);if(n&&e.length&&e.every(r=>r.dataIndex!=="sortIndex")){const r=e[0];i.unshift({title:"\u5E8F\u53F7",align:t,fixed:r.fixed,width:60,uuid:V().uuid(15),dataIndex:"sortIndex",key:"sortIndex"})}else i.filter(r=>r.dataIndex!=="sortIndex");return i}function se(e,...t){return typeof e=="function"?e(...t):e}function B(e){return JSON.parse(JSON.stringify(e))}function de(e,t){if(w(e)){const{pageSize:n=10,total:i=0}=e;let{current:r=1}=e;return i-t<=n*(r-1)&&(r=r-1),r===0?1:r}return 1}function ge(e=[],t,n="children"){function i(r,o){return o.map((c,u)=>{const a=`${r}-${u+1}`;return c[n]&&(c[n]=i(a,c[n])),c.sortIndex=a,c})}return B(e).map((r,o)=>{let c=o;const u=w(t)&&t.current||1,a=w(t)&&t.pageSize||10;return c=u?(u-1)*a+(o+1):o+1,r[n]&&(r[n]=i(`${c}`,r[n])),r.sortIndex=c,r})}function me(e,t,n,i){const r=e[n],o=t[n];let c=0;return r<o?c=i===0?-1:0:r>o&&(c=i===0?0:-1),c}function ye(e){let t=B(e);const n=new Set(t);return t=Array.from(n),t}function he(e,t){const n=["null","undefined"];let i=!0;return e===0?i=!0:n.includes(e)?i=!1:e||(i=!1),i?{value:e,success:i}:{value:t===""?t:t||"-",success:i}}function we(e){let t="";if(e>-1){const n=Math.floor(e/3600),i=Math.floor(e/60)%60,r=parseInt(String(e%60));n<10?t="0"+n+":":t=n+":",i<10&&(t+="0"),t+=i+":",r<10&&(t+="0"),t+=r}return t.split(":")[0]==="00"?`${t.split(":")[1]}:${t.split(":")[2]}`:t}function V(){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return{uuid(t,n){const i=e,r=[],o=n||i.length;let c,u;if(t)for(c=0;c<t;c+=1)r[c]=i[parseInt(String(Math.random()*o))];else for(r[8]="-",r[13]="-",r[18]="-",r[23]="-",r[14]="4",c=0;c<36;c+=1)r[c]||(u=Math.random()*16,r[c]=i[c===19?u&&3||8:u]);return r.join("")},uuidFast(){const t=e,n=new Array(36);let i=0,r,o;for(o=0;o<36;o+=1)o===8||o===13||o===18||o===23?n[o]="-":o===14?n[o]="4":(i<=2&&(i=33554432+Math.random()*16777216||0),r=i&&15,i=i>4,n[o]=t[o===19?r&&3||8:r]);return n.join("")},uuidString(){return this.uuidFast().replace(new RegExp("-","g"),"")},uuidCompact(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=Math.random()*16||0;return(t==="x"?n:n&&3||8).toString(16)})}}}function Se(e=[]){let t=0;function n(i=[],r){i.forEach(o=>{o.floor=r,r>t&&(t=r),o.children&&o.children.length>0&&n(o.children,r+1)})}return n(e,1),t}function q(e,t="children"){let n=[];return e.forEach(i=>{n.push(i),i[t]&&i[t].length>0&&(n=n.concat(q(i[t])))}),n}function be(e,t,n,i,r){t=t||"id",n=n||"parentId",i=i||"children",r=r||0;const o=JSON.parse(JSON.stringify(e));return o.filter(c=>{const u=o.filter(a=>c[t]===a[n||"parentId"]);return u.length>0?c[i||"children"]=u:delete c[i||"children"],c[n||"parentId"]===r})}function ve(e){return URL.createObjectURL(e)}function pe(e){return new Promise((t,n)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(i.result),i.onerror=r=>n(r)})}function Ae(e){const t=e.split(","),n=t[0].match(/:(.*?);/)[1],i=atob(t[1]);let r=i.length;const o=new Uint8Array(r);for(;r--;)o[r]=i.charCodeAt(r);return new Blob([o],{type:n})}function Te(e,t){const n=e.split(","),i=n[0].match(/:(.*?);/)[1],r=atob(n[1]);let o=r.length;const c=new Uint8Array(o);for(;o--;)c[o]=r.charCodeAt(o);return new File([c],t,{type:i})}function Oe(e,t,n){return new window.File([e],t,{type:n})}function z(e=""){const t=e.indexOf("?");return t>0?`${e.substring(0,t)}`:e}function p(e=""){e=z(e);const t=e.lastIndexOf(".");return t>0?`${e.substring(t).split("?")[0]}`.split(".")[1]:""}function S(e,t){if(t)return t;if(!e||e==="data:")return"4";let n="4";return A(e)?e.includes("data:image/")?n="png":e.includes("data:video/")?n="mp4":e.includes("data:audio/")&&(n="mp3"):e instanceof Blob?(e=String(e),e.includes("image")?n="png":e.includes("video")?n="mp4":e.includes("audio")&&(n="mp3")):n=p(e).toLowerCase(),v.imageType.includes(n)?"1":v.videoType.includes(n)?"3":v.audioType.includes(n)?"2":"4"}function k(e){const{url:t="",fileType:n="1"}=e;let i="";return t instanceof File?i=URL.createObjectURL(t):A(t)?i=t:t instanceof Blob?i=URL.createObjectURL(t):(t.includes("https")||t.includes("http"))&&(i=t),new Promise(function(r){let o;n==="1"?(o=document.createElement("img"),o.src=i):n==="2"?(o=document.createElement("audio"),o.src=i):n==="3"&&(o=document.createElement("video"),o.src=i),n==="1"?o.onload=function(){r({play:!0,width:o.width||0,height:o.height||0}),o=null}:o.oncanplay=function(){r({play:!0,duration:o.duration,width:(o==null?void 0:o.videoWidth)||0,height:(o==null?void 0:o.videoHeight)||0}),o=null},o.onerror=function(){r({play:!1}),o=null}})}async function Fe(e){const{url:t="",currentTime:n,videoSuffix:i="",vidoeAllowPlay:r=!1}=e;let o="",c=i,u="1",a;return t instanceof File?(o=URL.createObjectURL(t),c=p(t.name),u=S(t.name)):t instanceof Blob?(o=URL.createObjectURL(t),u=S(t)):A(t)?(o=t,u=S(t)):(t.includes("https")||t.includes("http"))&&(o=t,c=p(t),u=S(t)),(c?v.videoAllowType.includes(c.toLowerCase()):!1)?r?L(o,n):(a=await k({url:o,fileType:u}),a.play?L(o,n):new Promise(function(d){d("")})):new Promise(function(d){d("")})}async function L(e,t){let n=document.createElement("video");n.style.display="none",n.controls=!0,n.muted=!0,t&&(n.currentTime=t),n.setAttribute("src",e),n.setAttribute("muted",String(!0)),n.setAttribute("crossorigin","anonymous"),n.setAttribute("autoplay",String(!0));const i=document.createElement("canvas"),r=.8,o=100,c=i.getContext("2d");return new Promise(function(u){n&&n.addEventListener("canplay",function(){setTimeout(function(){const a=(n==null?void 0:n.videoWidth)||0*r,s=(n==null?void 0:n.videoHeight)||0*r,d=0;i.width=(n==null?void 0:n.videoWidth)||0*r,i.height=(n==null?void 0:n.videoHeight)||0*r,c.drawImage(n,0,0,a+d,s+d),n=null,u(a===0||s===0?"":i.toDataURL("image/png",1))},o)},!1)})}function A(e=""){return!!(e&&["data:image/","data:video/","data:audio/"].find(n=>e.includes(n)))}function Ce(e,t,n,i=!1){e&&t&&n&&e.addEventListener(t,n,i)}function Re(e,t,n,i=!1){e&&t&&n&&e.removeEventListener(t,n,i)}const Je="",xe=f.defineComponent({props:{id:j.string,style:j.style,size:{type:String,default:"middle"},label:Object,placeholder:[Object,String],class:String,ellipsis:Boolean,allowClear:{type:Boolean,default:!0},bordered:Boolean,expanded:Boolean,disabled:Boolean,onClear:Function,onLabelClick:Function,formatter:Function,value:j.any},setup(e,{expose:t}){const n=N({suffixCls:"core-field-label",isPor:!0}),i=f.ref(),r=f.ref(),o=f.computed(()=>e.allowClear||!0);t({labelRef:i,clearRef:r});const c=a=>e.formatter?e.formatter(a):Array.isArray(a)?a.join(","):String(a),u=(a,s)=>{var d,y;if(s!=null&&s!==""&&(!Array.isArray(s)||s.length)){const $=f.isVNode(s),W=a?f.createVNode("span",{onClick:e.onLabelClick,class:`${n}-text`},[a,": "]):"",g=$?"":c(s);if(!e.ellipsis)return f.createVNode("span",{style:{display:"inline-flex",alignItems:"center"}},[W,$?s:c(s)]);const J=41,Pe=(()=>{const Me=Array.isArray(s)&&s.length>1,Ve="\u9879";return typeof g=="string"&&g.length>J&&Me?`...${s.length}${Ve}`:""})();return f.createVNode("span",{title:$?"":g,style:{display:"inline-flex",alignItems:"center"}},[W,f.createVNode("span",{style:{paddingInlineStart:4}},[typeof g=="string"?(y=(d=g==null?void 0:g.toString())==null?void 0:d.substr)==null?void 0:y.call(d,0,J):s]),Pe])}return a||e.placeholder};return()=>f.createVNode("span",{class:{[`${n}`]:!0,[`${n}-${e.size}`]:e.size,[`${n}-active`]:!!e.value||e.value===0,[`${n}-disabled`]:e.disabled,[`${n}-bordered`]:e.bordered,[`${n}-allow-clear`]:o.value,[`${e.class}`]:e.class},style:e.style,ref:i},[u(e.label,e.value),(e.value||e.value===0)&&o.value&&f.createVNode(O.CloseOutlined,{role:"button",title:"\u6E05\u9664",class:[`${n}-icon`,`${n}-close`],onClick:a=>{e.onClear&&!e.disabled&&e.onClear(),a.stopPropagation()},ref:r},null),f.createVNode(O.DownOutlined,{class:[`${n}-icon`,`${n}-arrow`]},null)])}}),Xe="",je=e=>{if(!e.tooltip&&!e.subTitle)return f.createVNode(f.Fragment,null,[e.label]);const t=N({suffixCls:"core-label-tip",isPor:!0}),n=typeof e.tooltip=="string"?{title:e.tooltip}:e.tooltip,i=(n==null?void 0:n.icon)||f.createVNode(O.InfoCircleOutlined,null,null);return f.createVNode("div",{class:t,onMousedown:r=>r.stopPropagation(),onMouseleave:r=>r.stopPropagation(),onMousemove:r=>r.stopPropagation()},[f.createVNode("div",{class:{[`${t}-title`]:!0,[`${t}-title-ellipsis`]:e.ellipsis}},[e.label]),e.subTitle&&f.createVNode("div",{class:`${t}-subtitle`},[e.subTitle]),e.tooltip&&f.createVNode(Y.Tooltip,n,{default:()=>[f.createVNode("span",{class:`${t}-icon`},[i])]})])},Ne=(...e)=>{const t={},n=e.length;let i,r=0;for(;r<n;r+=1)for(i in e[r])e[r].hasOwnProperty(i)&&(typeof t[i]=="object"&&typeof e[r][i]=="object"&&t[i]!==void 0&&t[i]!==null&&!Array.isArray(t[i])&&!Array.isArray(e[r][i])?t[i]={...t[i],...e[r][i]}:t[i]=e[r][i]);return t};function T(e,t,n,i){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,o,c;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(o=r;o--!==0;)if(!T(e[o],t[o],n,i))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(!T(o[1],t.get(o[0]),n,i))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(r=e.length,r!=t.length)return!1;for(o=r;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(c=Object.keys(e),r=c.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,c[o]))return!1;for(o=r;o--!==0;){const u=c[o];if(!(n!=null&&n.includes(u))&&!(u==="_owner"&&e.$$typeof)&&!T(e[u],t[u],n,i))return i&&console.log(u),!1}return!0}return e!==e&&t!==t}const Be=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Le=()=>process.env.NODE_ENV==="TEST"?!0:typeof window<"u"&&typeof window.document<"u"&&typeof window.matchMedia<"u"&&!Be,$e=e=>{if(e&&e!==!0)return e},Ie=e=>{const t={};if(Object.keys(e||{}).forEach(n=>{e[n]!==void 0&&(t[n]=e[n])}),!(Object.keys(t).length<1))return t},H=e=>e.length===1&&(String(e[0].type)===String(Symbol("Comment"))||String(e[0].type)===String(Symbol("Fragment"))||String(e[0].type)===String(Symbol()));function Ue(e){return H(e)&&f.isVNode(e[0].children)?e[0].children:e}function De(e,t,n="default"){return t[n]===!1?!1:R(t[n])&&t[n]?(e==null?void 0:e[n])||t[n]:t[n]||e[n]}function _(e,t,n="default"){var i,r;return t[n]===!1?!1:R(t[n])&&t[n]?((i=e==null?void 0:e[n])==null?void 0:i.call(e))||t[n]:t[n]||((r=e[n])==null?void 0:r.call(e))}function Ee(e,t,n){const i={};return e.forEach(r=>{i[r]=_(t,n,r)}),i}l.FieldLabel=xe,l.LabelIconTip=je,l.arrayRepeat=ye,l.blobToDataURL=Oe,l.checkFileType=S,l.classNames=E,l.compareArray=me,l.dataURLtoBlob=Ae,l.dataURLtoFile=Te,l.deepCopy=B,l.formatDuraton=we,l.genColumnKey=ae,l.generateVidoePicture=L,l.getBase64=pe,l.getBlobUrl=ve,l.getFileSuffix=p,l.getLevelData=q,l.getMaxFloor=Se,l.getMediaInfos=k,l.getPrefixCls=N,l.getRandomNumber=V,l.getRealVNode=Ue,l.getScroll=P,l.getScrollContainer=ee,l.getSlot=De,l.getSlotVNode=_,l.getSlotsProps=Ee,l.getSortIndex=ge,l.getVideoCoverPicture=Fe,l.getVideoFileUrl=z,l.handleCurrentPage=de,l.handleShowIndex=fe,l.hanndleField=he,l.is=C,l.isArray=U,l.isBase64=A,l.isBoolean=R,l.isBrowser=Le,l.isDeepEqualReact=T,l.isFunction=re,l.isInContainer=te,l.isNumber=ie,l.isObject=w,l.isScroll=I,l.isServer=h,l.isSlotFragment=H,l.isString=D,l.merge=Ne,l.off=Re,l.omitBoolean=$e,l.omitUndefined=Ie,l.on=Ce,l.runFunction=se,l.scrollTo=ce,l.throttleByAnimationFrame=ue,l.treeData=be,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|