xph-crud 0.3.9 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2254 -1984
- package/dist/index.umd.cjs +10 -10
- package/dist/style.css +1 -1
- package/dist/types/common/src/components/dialog/hooks/dialogScrollEvents.d.ts +2 -0
- package/dist/types/common/src/components/dialog/hooks/useDialogLayer.d.ts +10 -0
- package/dist/types/common/src/components/dialog/hooks/useDialogProps.d.ts +1 -19
- package/dist/types/common/src/components/dialog/hooks/useDialogScrollLock.d.ts +6 -0
- package/dist/types/common/src/components/dialog/hooks/useOnPropsSizeChange.d.ts +4 -4
- package/dist/types/common/src/components/dialog/hooks/usePopperContainerSize.d.ts +3 -2
- package/dist/types/common/src/components/dialog/types/dialog.d.ts +2 -2
- package/package.json +64 -64
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(M,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react"),require("antd"),require("@ant-design/icons"),require("react-dom"),require("dayjs")):typeof define=="function"&&define.amd?define(["exports","react","antd","@ant-design/icons","react-dom","dayjs"],g):(M=typeof globalThis<"u"?globalThis:M||self,g(M["xph-crud"]={},M.React,M.Antd,M.AntDesignIcons,M.ReactDOM,M.Dayjs))})(this,function(M,g,E,ue,Sn,Xe){"use strict";const mt=[];for(let e=0;e<=15;e++)mt[e]=e.toString(16);function Zt(){let e="";for(let t=1;t<=36;t++)t===9||t===14||t===19||t===24?e+="-":t===15?e+=4:t===20?e+=mt[Math.random()*4|8]:e+=mt[Math.random()*16|0];return e.replace(/-/g,"")}const Qt=(e,t)=>{const r=t.split(".").filter(Boolean);let n=e;for(const o of r)if(n[o]!==void 0)n=n[o];else return;return r.length?n:void 0},yt=(e,t)=>{const r={};for(const[n,o]of Object.entries(e))r[n]=Qt(t,o);return r};var bt={exports:{}},Ie={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var er;function Tn(){if(er)return Ie;er=1;var e=g,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(i,l,f){var d,p={},u=null,m=null;f!==void 0&&(u=""+f),l.key!==void 0&&(u=""+l.key),l.ref!==void 0&&(m=l.ref);for(d in l)n.call(l,d)&&!s.hasOwnProperty(d)&&(p[d]=l[d]);if(i&&i.defaultProps)for(d in l=i.defaultProps,l)p[d]===void 0&&(p[d]=l[d]);return{$$typeof:t,type:i,key:u,ref:m,props:p,_owner:o.current}}return Ie.Fragment=r,Ie.jsx=a,Ie.jsxs=a,Ie}var Le={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),J=
|
|
21
|
-
`+
|
|
17
|
+
*/var tr;function Pn(){return tr||(tr=1,process.env.NODE_ENV!=="production"&&function(){var e=g,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),i=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),h=Symbol.iterator,b="@@iterator";function _(c){if(c===null||typeof c!="object")return null;var v=h&&c[h]||c[b];return typeof v=="function"?v:null}var D=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(c){{for(var v=arguments.length,T=new Array(v>1?v-1:0),$=1;$<v;$++)T[$-1]=arguments[$];w("error",c,T)}}function w(c,v,T){{var $=D.ReactDebugCurrentFrame,H=$.getStackAddendum();H!==""&&(v+="%s",T=T.concat([H]));var q=T.map(function(B){return String(B)});q.unshift("Warning: "+v),Function.prototype.apply.call(console[c],console,q)}}var j=!1,F=!1,z=!1,R=!1,C=!1,O;O=Symbol.for("react.module.reference");function P(c){return!!(typeof c=="string"||typeof c=="function"||c===n||c===s||C||c===o||c===f||c===d||R||c===m||j||F||z||typeof c=="object"&&c!==null&&(c.$$typeof===u||c.$$typeof===p||c.$$typeof===a||c.$$typeof===i||c.$$typeof===l||c.$$typeof===O||c.getModuleId!==void 0))}function x(c,v,T){var $=c.displayName;if($)return $;var H=v.displayName||v.name||"";return H!==""?T+"("+H+")":T}function A(c){return c.displayName||"Context"}function k(c){if(c==null)return null;if(typeof c.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case n:return"Fragment";case r:return"Portal";case s:return"Profiler";case o:return"StrictMode";case f:return"Suspense";case d:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case i:var v=c;return A(v)+".Consumer";case a:var T=c;return A(T._context)+".Provider";case l:return x(c,c.render,"ForwardRef");case p:var $=c.displayName||null;return $!==null?$:k(c.type)||"Memo";case u:{var H=c,q=H._payload,B=H._init;try{return k(B(q))}catch{return null}}}return null}var L=Object.assign,I=0,G,ne,oe,be,pe,N,U;function K(){}K.__reactDisabledLog=!0;function X(){{if(I===0){G=console.log,ne=console.info,oe=console.warn,be=console.error,pe=console.group,N=console.groupCollapsed,U=console.groupEnd;var c={configurable:!0,enumerable:!0,value:K,writable:!0};Object.defineProperties(console,{info:c,log:c,warn:c,error:c,group:c,groupCollapsed:c,groupEnd:c})}I++}}function Bt(){{if(I--,I===0){var c={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},c,{value:G}),info:L({},c,{value:ne}),warn:L({},c,{value:oe}),error:L({},c,{value:be}),group:L({},c,{value:pe}),groupCollapsed:L({},c,{value:N}),groupEnd:L({},c,{value:U})})}I<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ae=D.ReactCurrentDispatcher,qe;function Oe(c,v,T){{if(qe===void 0)try{throw Error()}catch(H){var $=H.stack.trim().match(/\n( *(at )?)/);qe=$&&$[1]||""}return`
|
|
18
|
+
`+qe+c}}var _e=!1,Te;{var Ye=typeof WeakMap=="function"?WeakMap:Map;Te=new Ye}function ft(c,v){if(!c||_e)return"";{var T=Te.get(c);if(T!==void 0)return T}var $;_e=!0;var H=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var q;q=Ae.current,Ae.current=null,X();try{if(v){var B=function(){throw Error()};if(Object.defineProperty(B.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(B,[])}catch(se){$=se}Reflect.construct(c,[],B)}else{try{B.call()}catch(se){$=se}c.call(B.prototype)}}else{try{throw Error()}catch(se){$=se}c()}}catch(se){if(se&&$&&typeof se.stack=="string"){for(var W=se.stack.split(`
|
|
19
|
+
`),ee=$.stack.split(`
|
|
20
|
+
`),J=W.length-1,Z=ee.length-1;J>=1&&Z>=0&&W[J]!==ee[Z];)Z--;for(;J>=1&&Z>=0;J--,Z--)if(W[J]!==ee[Z]){if(J!==1||Z!==1)do if(J--,Z--,Z<0||W[J]!==ee[Z]){var ae=`
|
|
21
|
+
`+W[J].replace(" at new "," at ");return c.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",c.displayName)),typeof c=="function"&&Te.set(c,ae),ae}while(J>=1&&Z>=0);break}}}finally{_e=!1,Ae.current=q,Bt(),Error.prepareStackTrace=H}var ze=c?c.displayName||c.name:"",Fe=ze?Oe(ze):"";return typeof c=="function"&&Te.set(c,Fe),Fe}function Nt(c,v,T){return ft(c,!1)}function dt(c){var v=c.prototype;return!!(v&&v.isReactComponent)}function $e(c,v,T){if(c==null)return"";if(typeof c=="function")return ft(c,dt(c));if(typeof c=="string")return Oe(c);switch(c){case f:return Oe("Suspense");case d:return Oe("SuspenseList")}if(typeof c=="object")switch(c.$$typeof){case l:return Nt(c.render);case p:return $e(c.type,v,T);case u:{var $=c,H=$._payload,q=$._init;try{return $e(q(H),v,T)}catch{}}}return""}var Pe=Object.prototype.hasOwnProperty,ke={},pt=D.ReactDebugCurrentFrame;function Me(c){if(c){var v=c._owner,T=$e(c.type,c._source,v?v.type:null);pt.setExtraStackFrame(T)}else pt.setExtraStackFrame(null)}function Ht(c,v,T,$,H){{var q=Function.call.bind(Pe);for(var B in c)if(q(c,B)){var W=void 0;try{if(typeof c[B]!="function"){var ee=Error(($||"React class")+": "+T+" type `"+B+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof c[B]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ee.name="Invariant Violation",ee}W=c[B](v,B,$,T,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(J){W=J}W&&!(W instanceof Error)&&(Me(H),S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",$||"React class",T,B,typeof W),Me(null)),W instanceof Error&&!(W.message in ke)&&(ke[W.message]=!0,Me(H),S("Failed %s type: %s",T,W.message),Me(null))}}}var hn=Array.isArray;function Ee(c){return hn(c)}function Vt(c){{var v=typeof Symbol=="function"&&Symbol.toStringTag,T=v&&c[Symbol.toStringTag]||c.constructor.name||"Object";return T}}function Ut(c){try{return ht(c),!1}catch{return!0}}function ht(c){return""+c}function gt(c){if(Ut(c))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Vt(c)),ht(c)}var je=D.ReactCurrentOwner,qt={key:!0,ref:!0,__self:!0,__source:!0},gn,mn,Yt;Yt={};function cc(c){if(Pe.call(c,"ref")){var v=Object.getOwnPropertyDescriptor(c,"ref").get;if(v&&v.isReactWarning)return!1}return c.ref!==void 0}function uc(c){if(Pe.call(c,"key")){var v=Object.getOwnPropertyDescriptor(c,"key").get;if(v&&v.isReactWarning)return!1}return c.key!==void 0}function fc(c,v){if(typeof c.ref=="string"&&je.current&&v&&je.current.stateNode!==v){var T=k(je.current.type);Yt[T]||(S('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',k(je.current.type),c.ref),Yt[T]=!0)}}function dc(c,v){{var T=function(){gn||(gn=!0,S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",v))};T.isReactWarning=!0,Object.defineProperty(c,"key",{get:T,configurable:!0})}}function pc(c,v){{var T=function(){mn||(mn=!0,S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",v))};T.isReactWarning=!0,Object.defineProperty(c,"ref",{get:T,configurable:!0})}}var hc=function(c,v,T,$,H,q,B){var W={$$typeof:t,type:c,key:v,ref:T,props:B,_owner:q};return W._store={},Object.defineProperty(W._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(W,"_self",{configurable:!1,enumerable:!1,writable:!1,value:$}),Object.defineProperty(W,"_source",{configurable:!1,enumerable:!1,writable:!1,value:H}),Object.freeze&&(Object.freeze(W.props),Object.freeze(W)),W};function gc(c,v,T,$,H){{var q,B={},W=null,ee=null;T!==void 0&&(gt(T),W=""+T),uc(v)&&(gt(v.key),W=""+v.key),cc(v)&&(ee=v.ref,fc(v,H));for(q in v)Pe.call(v,q)&&!qt.hasOwnProperty(q)&&(B[q]=v[q]);if(c&&c.defaultProps){var J=c.defaultProps;for(q in J)B[q]===void 0&&(B[q]=J[q])}if(W||ee){var Z=typeof c=="function"?c.displayName||c.name||"Unknown":c;W&&dc(B,Z),ee&&pc(B,Z)}return hc(c,W,ee,H,$,je.current,B)}}var Xt=D.ReactCurrentOwner,yn=D.ReactDebugCurrentFrame;function Re(c){if(c){var v=c._owner,T=$e(c.type,c._source,v?v.type:null);yn.setExtraStackFrame(T)}else yn.setExtraStackFrame(null)}var Gt;Gt=!1;function Kt(c){return typeof c=="object"&&c!==null&&c.$$typeof===t}function bn(){{if(Xt.current){var c=k(Xt.current.type);if(c)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+c+"`."}return""}}function mc(c){return""}var vn={};function yc(c){{var v=bn();if(!v){var T=typeof c=="string"?c:c.displayName||c.name;T&&(v=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+T+">.")}return v}}function wn(c,v){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var T=yc(v);if(vn[T])return;vn[T]=!0;var $="";c&&c._owner&&c._owner!==Xt.current&&($=" It was passed a child from "+k(c._owner.type)+"."),Re(c),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',T,$),Re(null)}}function _n(c,v){{if(typeof c!="object")return;if(Ee(c))for(var T=0;T<c.length;T++){var $=c[T];Kt($)&&wn($,v)}else if(Kt(c))c._store&&(c._store.validated=!0);else if(c){var H=_(c);if(typeof H=="function"&&H!==c.entries)for(var q=H.call(c),B;!(B=q.next()).done;)Kt(B.value)&&wn(B.value,v)}}}function bc(c){{var v=c.type;if(v==null||typeof v=="string")return;var T;if(typeof v=="function")T=v.propTypes;else if(typeof v=="object"&&(v.$$typeof===l||v.$$typeof===p))T=v.propTypes;else return;if(T){var $=k(v);Ht(T,c.props,"prop",$,c)}else if(v.PropTypes!==void 0&&!Gt){Gt=!0;var H=k(v);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",H||"Unknown")}typeof v.getDefaultProps=="function"&&!v.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function vc(c){{for(var v=Object.keys(c.props),T=0;T<v.length;T++){var $=v[T];if($!=="children"&&$!=="key"){Re(c),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",$),Re(null);break}}c.ref!==null&&(Re(c),S("Invalid attribute `ref` supplied to `React.Fragment`."),Re(null))}}var Cn={};function xn(c,v,T,$,H,q){{var B=P(c);if(!B){var W="";(c===void 0||typeof c=="object"&&c!==null&&Object.keys(c).length===0)&&(W+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ee=mc();ee?W+=ee:W+=bn();var J;c===null?J="null":Ee(c)?J="array":c!==void 0&&c.$$typeof===t?(J="<"+(k(c.type)||"Unknown")+" />",W=" Did you accidentally export a JSX literal instead of a component?"):J=typeof c,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",J,W)}var Z=gc(c,v,T,H,q);if(Z==null)return Z;if(B){var ae=v.children;if(ae!==void 0)if($)if(Ee(ae)){for(var ze=0;ze<ae.length;ze++)_n(ae[ze],c);Object.freeze&&Object.freeze(ae)}else S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else _n(ae,c)}if(Pe.call(v,"key")){var Fe=k(c),se=Object.keys(v).filter(function(Tc){return Tc!=="key"}),Jt=se.length>0?"{key: someKey, "+se.join(": ..., ")+": ...}":"{key: someKey}";if(!Cn[Fe+Jt]){var Sc=se.length>0?"{"+se.join(": ..., ")+": ...}":"{}";S(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,qt,je,fc,je),mn[je+qt]=!0}}return l===n?ic(Z):sc(Z),Z}}function ac(l,b,_){return bn(l,b,_,!0)}function lc(l,b,_){return bn(l,b,_,!1)}var cc=lc,uc=ac;Ie.Fragment=n,Ie.jsx=cc,Ie.jsxs=uc}()),Ie}process.env.NODE_ENV==="production"?bt.exports=yn():bt.exports=_n();var m=bt.exports,Zt=typeof global=="object"&&global&&global.Object===Object&&global,wn=typeof self=="object"&&self&&self.Object===Object&&self,de=Zt||wn||Function("return this")(),_e=de.Symbol,Qt=Object.prototype,Cn=Qt.hasOwnProperty,xn=Qt.toString,ze=_e?_e.toStringTag:void 0;function Tn(e){var t=Cn.call(e,ze),r=e[ze];try{e[ze]=void 0;var n=!0}catch{}var o=xn.call(e);return n&&(t?e[ze]=r:delete e[ze]),o}var Sn=Object.prototype,Pn=Sn.toString;function En(e){return Pn.call(e)}var jn="[object Null]",Fn="[object Undefined]",er=_e?_e.toStringTag:void 0;function pe(e){return e==null?e===void 0?Fn:jn:er&&er in Object(e)?Tn(e):En(e)}function le(e){return e!=null&&typeof e=="object"}var An="[object Symbol]";function vt(e){return typeof e=="symbol"||le(e)&&pe(e)==An}function Dn(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var re=Array.isArray,On=1/0,tr=_e?_e.prototype:void 0,rr=tr?tr.toString:void 0;function nr(e){if(typeof e=="string")return e;if(re(e))return Dn(e,nr)+"";if(vt(e))return rr?rr.call(e):"";var t=e+"";return t=="0"&&1/e==-On?"-0":t}function ie(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function or(e){return e}var $n="[object AsyncFunction]",Rn="[object Function]",kn="[object GeneratorFunction]",Mn="[object Proxy]";function Q(e){if(!ie(e))return!1;var t=pe(e);return t==Rn||t==kn||t==$n||t==Mn}var yt=de["__core-js_shared__"],sr=function(){var e=/[^.]+$/.exec(yt&&yt.keys&&yt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function In(e){return!!sr&&sr in e}var zn=Function.prototype,Ln=zn.toString;function Ce(e){if(e!=null){try{return Ln.call(e)}catch{}try{return e+""}catch{}}return""}var Nn=/[\\^$.*+?()[\]{}|]/g,Wn=/^\[object .+?Constructor\]$/,Hn=Function.prototype,Bn=Object.prototype,Vn=Hn.toString,Un=Bn.hasOwnProperty,Yn=RegExp("^"+Vn.call(Un).replace(Nn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qn(e){if(!ie(e)||In(e))return!1;var t=Q(e)?Yn:Wn;return t.test(Ce(e))}function Gn(e,t){return e==null?void 0:e[t]}function xe(e,t){var r=Gn(e,t);return qn(r)?r:void 0}var _t=xe(de,"WeakMap"),ir=Object.create,Xn=function(){function e(){}return function(t){if(!ie(t))return{};if(ir)return ir(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Kn(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Jn(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Zn=800,Qn=16,eo=Date.now;function to(e){var t=0,r=0;return function(){var n=eo(),o=Qn-(n-r);if(r=n,o>0){if(++t>=Zn)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function ro(e){return function(){return e}}var Xe=function(){try{var e=xe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),no=Xe?function(e,t){return Xe(e,"toString",{configurable:!0,enumerable:!1,value:ro(t),writable:!0})}:or,oo=to(no),so=9007199254740991,io=/^(?:0|[1-9]\d*)$/;function wt(e,t){var r=typeof e;return t=t??so,!!t&&(r=="number"||r!="symbol"&&io.test(e))&&e>-1&&e%1==0&&e<t}function Ct(e,t,r){t=="__proto__"&&Xe?Xe(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Le(e,t){return e===t||e!==e&&t!==t}var ao=Object.prototype,lo=ao.hasOwnProperty;function ar(e,t,r){var n=e[t];(!(lo.call(e,t)&&Le(n,r))||r===void 0&&!(t in e))&&Ct(e,t,r)}function co(e,t,r,n){var o=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var i=t[s],c=void 0;c===void 0&&(c=e[i]),o?Ct(r,i,c):ar(r,i,c)}return r}var lr=Math.max;function uo(e,t,r){return t=lr(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,s=lr(n.length-t,0),a=Array(s);++o<s;)a[o]=n[t+o];o=-1;for(var i=Array(t+1);++o<t;)i[o]=n[o];return i[t]=r(a),Kn(e,this,i)}}function fo(e,t){return oo(uo(e,t,or),e+"")}var po=9007199254740991;function cr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=po}function Ke(e){return e!=null&&cr(e.length)&&!Q(e)}function ho(e,t,r){if(!ie(r))return!1;var n=typeof t;return(n=="number"?Ke(r)&&wt(t,r.length):n=="string"&&t in r)?Le(r[t],e):!1}function go(e){return fo(function(t,r){var n=-1,o=r.length,s=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(o--,s):void 0,a&&ho(r[0],r[1],a)&&(s=o<3?void 0:s,o=1),t=Object(t);++n<o;){var i=r[n];i&&e(t,i,n,s)}return t})}var mo=Object.prototype;function xt(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||mo;return e===r}function bo(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var vo="[object Arguments]";function ur(e){return le(e)&&pe(e)==vo}var fr=Object.prototype,yo=fr.hasOwnProperty,_o=fr.propertyIsEnumerable,Tt=ur(function(){return arguments}())?ur:function(e){return le(e)&&yo.call(e,"callee")&&!_o.call(e,"callee")};function wo(){return!1}var dr=typeof A=="object"&&A&&!A.nodeType&&A,pr=dr&&typeof module=="object"&&module&&!module.nodeType&&module,Co=pr&&pr.exports===dr,hr=Co?de.Buffer:void 0,xo=hr?hr.isBuffer:void 0,Je=xo||wo,To="[object Arguments]",So="[object Array]",Po="[object Boolean]",Eo="[object Date]",jo="[object Error]",Fo="[object Function]",Ao="[object Map]",Do="[object Number]",Oo="[object Object]",$o="[object RegExp]",Ro="[object Set]",ko="[object String]",Mo="[object WeakMap]",Io="[object ArrayBuffer]",zo="[object DataView]",Lo="[object Float32Array]",No="[object Float64Array]",Wo="[object Int8Array]",Ho="[object Int16Array]",Bo="[object Int32Array]",Vo="[object Uint8Array]",Uo="[object Uint8ClampedArray]",Yo="[object Uint16Array]",qo="[object Uint32Array]",U={};U[Lo]=U[No]=U[Wo]=U[Ho]=U[Bo]=U[Vo]=U[Uo]=U[Yo]=U[qo]=!0,U[To]=U[So]=U[Io]=U[Po]=U[zo]=U[Eo]=U[jo]=U[Fo]=U[Ao]=U[Do]=U[Oo]=U[$o]=U[Ro]=U[ko]=U[Mo]=!1;function Go(e){return le(e)&&cr(e.length)&&!!U[pe(e)]}function Xo(e){return function(t){return e(t)}}var gr=typeof A=="object"&&A&&!A.nodeType&&A,Ne=gr&&typeof module=="object"&&module&&!module.nodeType&&module,Ko=Ne&&Ne.exports===gr,St=Ko&&Zt.process,mr=function(){try{var e=Ne&&Ne.require&&Ne.require("util").types;return e||St&&St.binding&&St.binding("util")}catch{}}(),br=mr&&mr.isTypedArray,Pt=br?Xo(br):Go,Jo=Object.prototype,Zo=Jo.hasOwnProperty;function vr(e,t){var r=re(e),n=!r&&Tt(e),o=!r&&!n&&Je(e),s=!r&&!n&&!o&&Pt(e),a=r||n||o||s,i=a?bo(e.length,String):[],c=i.length;for(var u in e)(t||Zo.call(e,u))&&!(a&&(u=="length"||o&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||wt(u,c)))&&i.push(u);return i}function yr(e,t){return function(r){return e(t(r))}}var Qo=yr(Object.keys,Object),es=Object.prototype,ts=es.hasOwnProperty;function rs(e){if(!xt(e))return Qo(e);var t=[];for(var r in Object(e))ts.call(e,r)&&r!="constructor"&&t.push(r);return t}function ns(e){return Ke(e)?vr(e):rs(e)}function os(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var ss=Object.prototype,is=ss.hasOwnProperty;function as(e){if(!ie(e))return os(e);var t=xt(e),r=[];for(var n in e)n=="constructor"&&(t||!is.call(e,n))||r.push(n);return r}function _r(e){return Ke(e)?vr(e,!0):as(e)}var ls=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cs=/^\w*$/;function us(e,t){if(re(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||vt(e)?!0:cs.test(e)||!ls.test(e)||t!=null&&e in Object(t)}var We=xe(Object,"create");function fs(){this.__data__=We?We(null):{},this.size=0}function ds(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ps="__lodash_hash_undefined__",hs=Object.prototype,gs=hs.hasOwnProperty;function ms(e){var t=this.__data__;if(We){var r=t[e];return r===ps?void 0:r}return gs.call(t,e)?t[e]:void 0}var bs=Object.prototype,vs=bs.hasOwnProperty;function ys(e){var t=this.__data__;return We?t[e]!==void 0:vs.call(t,e)}var _s="__lodash_hash_undefined__";function ws(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=We&&t===void 0?_s:t,this}function Te(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Te.prototype.clear=fs,Te.prototype.delete=ds,Te.prototype.get=ms,Te.prototype.has=ys,Te.prototype.set=ws;function Cs(){this.__data__=[],this.size=0}function Ze(e,t){for(var r=e.length;r--;)if(Le(e[r][0],t))return r;return-1}var xs=Array.prototype,Ts=xs.splice;function Ss(e){var t=this.__data__,r=Ze(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Ts.call(t,r,1),--this.size,!0}function Ps(e){var t=this.__data__,r=Ze(t,e);return r<0?void 0:t[r][1]}function Es(e){return Ze(this.__data__,e)>-1}function js(e,t){var r=this.__data__,n=Ze(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function ge(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ge.prototype.clear=Cs,ge.prototype.delete=Ss,ge.prototype.get=Ps,ge.prototype.has=Es,ge.prototype.set=js;var He=xe(de,"Map");function Fs(){this.size=0,this.__data__={hash:new Te,map:new(He||ge),string:new Te}}function As(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Qe(e,t){var r=e.__data__;return As(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Ds(e){var t=Qe(this,e).delete(e);return this.size-=t?1:0,t}function Os(e){return Qe(this,e).get(e)}function $s(e){return Qe(this,e).has(e)}function Rs(e,t){var r=Qe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function me(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}me.prototype.clear=Fs,me.prototype.delete=Ds,me.prototype.get=Os,me.prototype.has=$s,me.prototype.set=Rs;var ks="Expected a function";function Et(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ks);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],s=r.cache;if(s.has(o))return s.get(o);var a=e.apply(this,n);return r.cache=s.set(o,a)||s,a};return r.cache=new(Et.Cache||me),r}Et.Cache=me;var Ms=500;function Is(e){var t=Et(e,function(n){return r.size===Ms&&r.clear(),n}),r=t.cache;return t}var zs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ls=/\\(\\)?/g,Ns=Is(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(zs,function(r,n,o,s){t.push(o?s.replace(Ls,"$1"):n||r)}),t});function Ws(e){return e==null?"":nr(e)}function Hs(e,t){return re(e)?e:us(e,t)?[e]:Ns(Ws(e))}var Bs=1/0;function Vs(e){if(typeof e=="string"||vt(e))return e;var t=e+"";return t=="0"&&1/e==-Bs?"-0":t}function Us(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var wr=yr(Object.getPrototypeOf,Object),Ys="[object Object]",qs=Function.prototype,Gs=Object.prototype,Cr=qs.toString,Xs=Gs.hasOwnProperty,Ks=Cr.call(Object);function Js(e){if(!le(e)||pe(e)!=Ys)return!1;var t=wr(e);if(t===null)return!0;var r=Xs.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Cr.call(r)==Ks}function Zs(){this.__data__=new ge,this.size=0}function Qs(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function ei(e){return this.__data__.get(e)}function ti(e){return this.__data__.has(e)}var ri=200;function ni(e,t){var r=this.__data__;if(r instanceof ge){var n=r.__data__;if(!He||n.length<ri-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new me(n)}return r.set(e,t),this.size=r.size,this}function be(e){var t=this.__data__=new ge(e);this.size=t.size}be.prototype.clear=Zs,be.prototype.delete=Qs,be.prototype.get=ei,be.prototype.has=ti,be.prototype.set=ni;var xr=typeof A=="object"&&A&&!A.nodeType&&A,Tr=xr&&typeof module=="object"&&module&&!module.nodeType&&module,oi=Tr&&Tr.exports===xr,Sr=oi?de.Buffer:void 0;Sr&&Sr.allocUnsafe;function si(e,t){return e.slice()}function ii(e,t){for(var r=-1,n=e==null?0:e.length,o=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[o++]=a)}return s}function ai(){return[]}var li=Object.prototype,ci=li.propertyIsEnumerable,Pr=Object.getOwnPropertySymbols,ui=Pr?function(e){return e==null?[]:(e=Object(e),ii(Pr(e),function(t){return ci.call(e,t)}))}:ai;function fi(e,t,r){var n=t(e);return re(e)?n:Us(n,r(e))}function Er(e){return fi(e,ns,ui)}var jt=xe(de,"DataView"),Ft=xe(de,"Promise"),At=xe(de,"Set"),jr="[object Map]",di="[object Object]",Fr="[object Promise]",Ar="[object Set]",Dr="[object WeakMap]",Or="[object DataView]",pi=Ce(jt),hi=Ce(He),gi=Ce(Ft),mi=Ce(At),bi=Ce(_t),we=pe;(jt&&we(new jt(new ArrayBuffer(1)))!=Or||He&&we(new He)!=jr||Ft&&we(Ft.resolve())!=Fr||At&&we(new At)!=Ar||_t&&we(new _t)!=Dr)&&(we=function(e){var t=pe(e),r=t==di?e.constructor:void 0,n=r?Ce(r):"";if(n)switch(n){case pi:return Or;case hi:return jr;case gi:return Fr;case mi:return Ar;case bi:return Dr}return t});var et=de.Uint8Array;function vi(e){var t=new e.constructor(e.byteLength);return new et(t).set(new et(e)),t}function yi(e,t){var r=vi(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}function _i(e){return typeof e.constructor=="function"&&!xt(e)?Xn(wr(e)):{}}var wi="__lodash_hash_undefined__";function Ci(e){return this.__data__.set(e,wi),this}function xi(e){return this.__data__.has(e)}function tt(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new me;++t<r;)this.add(e[t])}tt.prototype.add=tt.prototype.push=Ci,tt.prototype.has=xi;function Ti(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Si(e,t){return e.has(t)}var Pi=1,Ei=2;function $r(e,t,r,n,o,s){var a=r&Pi,i=e.length,c=t.length;if(i!=c&&!(a&&c>i))return!1;var u=s.get(e),d=s.get(t);if(u&&d)return u==t&&d==e;var g=-1,f=!0,v=r&Ei?new tt:void 0;for(s.set(e,t),s.set(t,e);++g<i;){var h=e[g],y=t[g];if(n)var w=a?n(y,h,g,t,e,s):n(h,y,g,e,t,s);if(w!==void 0){if(w)continue;f=!1;break}if(v){if(!Ti(t,function(F,P){if(!Si(v,P)&&(h===F||o(h,F,r,n,s)))return v.push(P)})){f=!1;break}}else if(!(h===y||o(h,y,r,n,s))){f=!1;break}}return s.delete(e),s.delete(t),f}function ji(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function Fi(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Ai=1,Di=2,Oi="[object Boolean]",$i="[object Date]",Ri="[object Error]",ki="[object Map]",Mi="[object Number]",Ii="[object RegExp]",zi="[object Set]",Li="[object String]",Ni="[object Symbol]",Wi="[object ArrayBuffer]",Hi="[object DataView]",Rr=_e?_e.prototype:void 0,Dt=Rr?Rr.valueOf:void 0;function Bi(e,t,r,n,o,s,a){switch(r){case Hi:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Wi:return!(e.byteLength!=t.byteLength||!s(new et(e),new et(t)));case Oi:case $i:case Mi:return Le(+e,+t);case Ri:return e.name==t.name&&e.message==t.message;case Ii:case Li:return e==t+"";case ki:var i=ji;case zi:var c=n&Ai;if(i||(i=Fi),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;n|=Di,a.set(e,t);var d=$r(i(e),i(t),n,o,s,a);return a.delete(e),d;case Ni:if(Dt)return Dt.call(e)==Dt.call(t)}return!1}var Vi=1,Ui=Object.prototype,Yi=Ui.hasOwnProperty;function qi(e,t,r,n,o,s){var a=r&Vi,i=Er(e),c=i.length,u=Er(t),d=u.length;if(c!=d&&!a)return!1;for(var g=c;g--;){var f=i[g];if(!(a?f in t:Yi.call(t,f)))return!1}var v=s.get(e),h=s.get(t);if(v&&h)return v==t&&h==e;var y=!0;s.set(e,t),s.set(t,e);for(var w=a;++g<c;){f=i[g];var F=e[f],P=t[f];if(n)var D=a?n(P,F,f,t,e,s):n(F,P,f,e,t,s);if(!(D===void 0?F===P||o(F,P,r,n,s):D)){y=!1;break}w||(w=f=="constructor")}if(y&&!w){var k=e.constructor,W=t.constructor;k!=W&&"constructor"in e&&"constructor"in t&&!(typeof k=="function"&&k instanceof k&&typeof W=="function"&&W instanceof W)&&(y=!1)}return s.delete(e),s.delete(t),y}var Gi=1,kr="[object Arguments]",Mr="[object Array]",rt="[object Object]",Xi=Object.prototype,Ir=Xi.hasOwnProperty;function Ki(e,t,r,n,o,s){var a=re(e),i=re(t),c=a?Mr:we(e),u=i?Mr:we(t);c=c==kr?rt:c,u=u==kr?rt:u;var d=c==rt,g=u==rt,f=c==u;if(f&&Je(e)){if(!Je(t))return!1;a=!0,d=!1}if(f&&!d)return s||(s=new be),a||Pt(e)?$r(e,t,r,n,o,s):Bi(e,t,c,r,n,o,s);if(!(r&Gi)){var v=d&&Ir.call(e,"__wrapped__"),h=g&&Ir.call(t,"__wrapped__");if(v||h){var y=v?e.value():e,w=h?t.value():t;return s||(s=new be),o(y,w,r,n,s)}}return f?(s||(s=new be),qi(e,t,r,n,o,s)):!1}function zr(e,t,r,n,o){return e===t?!0:e==null||t==null||!le(e)&&!le(t)?e!==e&&t!==t:Ki(e,t,r,n,zr,o)}function Ji(e){return function(t,r,n){for(var o=-1,s=Object(t),a=n(t),i=a.length;i--;){var c=a[++o];if(r(s[c],c,s)===!1)break}return t}}var Zi=Ji();function Ot(e,t,r){(r!==void 0&&!Le(e[t],r)||r===void 0&&!(t in e))&&Ct(e,t,r)}function Qi(e){return le(e)&&Ke(e)}function $t(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function ea(e){return co(e,_r(e))}function ta(e,t,r,n,o,s,a){var i=$t(e,r),c=$t(t,r),u=a.get(c);if(u){Ot(e,r,u);return}var d=s?s(i,c,r+"",e,t,a):void 0,g=d===void 0;if(g){var f=re(c),v=!f&&Je(c),h=!f&&!v&&Pt(c);d=c,f||v||h?re(i)?d=i:Qi(i)?d=Jn(i):v?(g=!1,d=si(c)):h?(g=!1,d=yi(c)):d=[]:Js(c)||Tt(c)?(d=i,Tt(i)?d=ea(i):(!ie(i)||Q(i))&&(d=_i(c))):g=!1}g&&(a.set(c,d),o(d,c,n,s,a),a.delete(c)),Ot(e,r,d)}function Lr(e,t,r,n,o){e!==t&&Zi(t,function(s,a){if(o||(o=new be),ie(s))ta(e,t,a,r,Lr,n,o);else{var i=n?n($t(e,a),s,a+"",e,t,o):void 0;i===void 0&&(i=s),Ot(e,a,i)}},_r)}var ra="[object String]";function Rt(e){return typeof e=="string"||!re(e)&&le(e)&&pe(e)==ra}var na="[object Boolean]";function nt(e){return e===!0||e===!1||le(e)&&pe(e)==na}function ot(e,t){return zr(e,t)}var oa="[object Number]";function sa(e){return typeof e=="number"||le(e)&&pe(e)==oa}function Nr(e){return e==null}function ia(e){return e===null}var ce=go(function(e,t,r){Lr(e,t,r)});function aa(e,t,r,n){if(!ie(e))return e;t=Hs(t,e);for(var o=-1,s=t.length,a=s-1,i=e;i!=null&&++o<s;){var c=Vs(t[o]),u=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(o!=a){var d=i[c];u=void 0,u===void 0&&(u=ie(d)?d:wt(t[o+1])?[]:{})}ar(i,c,u),i=i[c]}return e}function Wr(e,t,r){return e==null?e:aa(e,t,r)}function la(e){const{inherit:t=!0}=e,{extendActionsProps:r,extendAuthProps:n}=Yr(),s={...ce(ce({items:[],max:10},t?r:{}),e)},a={...ce({auth:()=>!0},t?n:{})};return{actionsProps:s,authProps:a}}function kt(e){return"component"in e}function Hr(e){return"render"in e}function ca(e,t){const{type:r,disabled:n,items:o,max:s}=e,a=g=>{const{auth:f}=g;let v=!1;return f?re(f)?v=f.every(h=>t(h)):v=t(f):v=!0,v},i=g=>{let{ifShow:f=!0}=g;return f=f&&Q(f)?f():f,f&&a(g)},c=g=>{const{component:f,render:v,componentProps:h}=g;if(f)switch(f){case"Dropdown":{const{dropDownItems:y}=h;return!!y.length}default:return!0}return!!v},u=o.map(g=>{const f={...g};if(kt(f)){const v=f.component;switch(f.componentProps={type:r,disabled:n,...f.componentProps},v){case"Dropdown":{f.componentProps.dropDownItems=(f.componentProps.dropDownItems||[]).filter(i);break}}}return f}).filter(i).filter(c),d=sa(s)&&s>=0;return{showActionItems:u.slice(0,d?s:u.length),ellipsisActionItems:u.slice(d?s:u.length)}}const ua=e=>{const{componentProps:t}=e,r=()=>{const{...n}=t;return n};return m.jsx(x.Button,{...r()})},fa=e=>{const{componentProps:t}=e,n=(()=>{const{dropDownItems:o,onClick:s,...a}=t;return a})();return m.jsx(x.Dropdown,{disabled:n.disabled,menu:{items:t==null?void 0:t.dropDownItems,onClick:t==null?void 0:t.onClick},trigger:["click"],children:m.jsx("div",{children:m.jsxs(x.Button,{...n,children:[n.children,m.jsx(fe.CaretDownOutlined,{})]})})})},st=new Map;st.set("Button",ua),st.set("Dropdown",fa);function Br(){const{setExtendActionsComp:e}=Yr();return e(st),{renderContent:p.useCallback((r,n)=>{const o=kt(r),s=Hr(r);if(o){const a=st.get(r.component);return p.createElement(a,{...r,key:n})}return s?m.jsx("div",{children:r.render},n):null},[])}}const Vr=p.createContext({}),da=e=>{const{extendProps:t,extendComp:r}=e.value;return m.jsx(Vr.Provider,{value:{extendProps:t,extendComp:r},children:e.children})},Fe=()=>p.useContext(Vr),Ur=e=>{const[t,r]=p.useState(e),n=p.useRef(null);return p.useEffect(()=>{n.current&&(n.current(),n.current=null)},[t]),[t,s=>new Promise((a,i)=>{r(c=>{const u=typeof s=="function"?s(c):s;return n.current=a,u})})]},Yr=()=>{const{extendProps:e,extendComp:t}=Fe(),r=n=>{const o=t==null?void 0:t.actions;o&&Object.keys(o).forEach(s=>{n.set(s,o[s])})};return{extendAuthProps:e==null?void 0:e.auth,extendActionsProps:e==null?void 0:e.actions,setExtendActionsComp:r}},{useToken:pa}=x.theme,ha=({items:e,actionsProps:t})=>{const{type:r,disabled:n}=t,{renderContent:o}=Br(),{token:s}=pa(),a={backgroundColor:s.colorBgElevated,borderRadius:s.borderRadiusLG,boxShadow:s.boxShadowSecondary},i=()=>m.jsx("div",{style:a,children:m.jsx(x.Space,{style:{padding:8},children:e==null?void 0:e.map((c,u)=>o(c,u))})});return m.jsx(x.Dropdown,{disabled:n,menu:{items:[]},dropdownRender:i,trigger:["click"],children:m.jsxs(x.Button,{type:r,children:["更多",m.jsx(fe.CaretDownOutlined,{})]})})},it=e=>{const{actionsProps:t,authProps:r}=la(e),{auth:n}=r,{showActionItems:o,ellipsisActionItems:s}=ca(t,n),{renderContent:a}=Br();return t!=null&&t.render?t.render:m.jsxs(p.Fragment,{children:[o==null?void 0:o.map((i,c)=>a(i,c)),s!=null&&s.length?m.jsx(ha,{actionsProps:t,items:s}):null]})};function ga(e,t){const{okText:r,cancelText:n,onCancel:o,onOk:s,okProps:a,cancelProps:i}=e;return{footerActions:{disabled:t,max:2,items:[{component:"Button",componentProps:{...i,children:n,onClick:o}},{component:"Button",componentProps:{type:"primary",loading:t,...a,children:r,onClick:s}}]}}}const ma=e=>{const{extendDialogProps:t}=ba(),r={width:700,okText:"确定",cancelText:"取消",getPopperContainer:()=>document.body},n={...ce(ce(r,t),e)};return{dialogProps:{...n,getPopperContainer:()=>{const s=n.getPopperContainer();return n.mask?document.body:s}},baseDialogProps:r}},ba=()=>{const{extendProps:e}=Fe();return{extendDialogProps:e==null?void 0:e.dialog}},va=(e,t,r,n)=>{const{onOpen:o,onClose:s}=t;return{open:async()=>{e||(o&&o(),await r(!0))},close:()=>{r(!1),n(!1),s&&s()}}},ya=({initWidth:e,initHeight:t,setDialogChangeRecord:r})=>{const[n,o]=p.useState(e.current),[s,a]=p.useState(t.current);return{dialogWidth:n,dialogHeight:s,setDialogSize:({width:c,height:u})=>{r({width:n,height:s}),c!==void 0&&o(c),u!==void 0&&a(u)}}},_a=({initLeft:e,initTop:t,setDialogChangeRecord:r})=>{const[n,o]=p.useState(e.current),[s,a]=p.useState(t.current);return{dialogLeft:n,dialogTop:s,setDialogPosition:({left:c,top:u})=>{r({left:n,top:s}),c!==void 0&&o(c),u!==void 0&&a(u)}}},qr=({containerSizeTarget:e,dialogHeaderRef:t,dialogRef:r,setDialogPosition:n})=>{const o=p.useRef(0),s=p.useRef(0),a=d=>{const g=d.getBoundingClientRect(),f=g.width,v=g.height,h=-.5*f,y=-.5*v;return{translateX:h,translateY:y}},i=p.useCallback(d=>{const{offsetLeft:g,offsetTop:f}=r.current;o.current=d.clientX-g,s.current=d.clientY-f,document.addEventListener("mousemove",c),document.addEventListener("mouseup",u)},[]),c=p.useCallback(d=>{const g=r.current,{translateX:f,translateY:v}=a(g);let h=d.clientX-o.current,y=d.clientY-s.current;const w=-f,F=-v,P=e.current.scrollWidth-g.offsetWidth-f,D=e.current.scrollHeight-g.offsetHeight-v;h<w&&(h=w),h>P&&(h=P),y<F&&(y=F),y>D&&(y=D),n({left:h,top:y})},[]),u=p.useCallback(()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u)},[]);return p.useEffect(()=>{const d=t.current;return d.addEventListener("mousedown",i),()=>{d.removeEventListener("mousedown",i)}},[]),{}},wa=({containerSizeTarget:e,dialogChangeRecord:t,close:r,setDialogSize:n,setDialogPosition:o})=>{const[s,a]=p.useState(!1),[i,c]=p.useState(!1);return{minimizeVisible:s,maximizeVisible:i,setMinimizeVisible:a,setMaximizeVisible:c,onMinimize:()=>{a(!0)},onMaximize:v=>{if(v==="minimize"&&a(!1),v==="maximize"){const{scrollWidth:h,scrollHeight:y}=e.current,w=Math.floor(h),F=Math.floor(y),P=Math.floor(h/2),D=Math.floor(y/2);n({width:w,height:F}),o({top:D,left:P}),c(!0)}},onRecovery:()=>{const{top:v,left:h,width:y,height:w}=t.current;n({width:y,height:w}),o({top:v,left:h}),c(!1)},onClose:()=>{a(!1),r()}}},Ca=({visible:e,containerSizeTarget:t,dialogHeight:r,dialogRef:n,dialogHeaderRef:o,dialogFooterRef:s})=>{const{clientHeight:a,scrollHeight:i}=t.current,[c,u]=p.useState(0),[d,g]=p.useState("unset"),f=(v,h)=>{var W,q;const F=(W=o.current)==null?void 0:W.offsetHeight,P=(q=s.current)==null?void 0:q.offsetHeight;let D=v-F-P-0;const k=h-F-P-0;return D>k&&(D=k),D};return p.useEffect(()=>{var v;if(c===a){const h=(v=n.current)==null?void 0:v.getBoundingClientRect().height;g(f(h,a)),u("unset")}},[c]),p.useEffect(()=>{r!=="unset"&&r!==0&&(g(f(r,r>a?i:a)),u("unset"))},[r]),p.useEffect(()=>{e?u(a):(u(0),g("unset"))},[e]),{dialogMaxHeight:c,contentMaxHeight:d}},xa=()=>{const[e,t]=p.useState(160),[r,n]=p.useState(60),o=p.useRef(null);return{minimizeTop:r,minimizeLeft:e,minimizeRef:o,setMinimizePosition:({left:a,top:i})=>{a!==void 0&&t(a),i!==void 0&&n(i)}}},Ta=({visible:e,dialogRef:t,minimizeRef:r,container:n})=>{const o={xphDialog:"xph--dialog",xphDialogWrapper:"xph--dialog--wrapper",xphMinimizeDialog:"xph--dialog--minimize"},s=(i,c)=>{i.querySelector(`.${o.xphDialogWrapper}`).style.opacity="unset",i.querySelector(`.${o.xphMinimizeDialog}`).style.opacity="unset",c.querySelector(`.${o.xphDialogWrapper}`).style.opacity=.7,c.querySelector(`.${o.xphMinimizeDialog}`).style.opacity=.7;const u=document.createElement("div");u.style.visibility="hidden",c.parentNode.insertBefore(u,c.nextSibling),c.parentNode.insertBefore(i,u),c.parentNode.removeChild(u)},a=i=>{var d,g;const c=Array.from(n.querySelectorAll(`.${o.xphDialog}`)).filter(f=>(f==null?void 0:f.parentNode)===n),u=c[c.length-1];if(((d=t.current)==null?void 0:d.parentNode)!==u&&(s((g=t.current)==null?void 0:g.parentNode,u),i)){const f=i.target;f.tagName==="INPUT"&&f.focus&&f.focus()}};return p.useEffect(()=>{var i,c;return(i=t.current)==null||i.addEventListener("mousedown",a,!1),(c=r.current)==null||c.addEventListener("mousedown",a,!1),()=>{var u,d;(u=t.current)==null||u.removeEventListener("mousedown",a,!1),(d=r.current)==null||d.removeEventListener("mousedown",a,!1)}},[]),p.useEffect(()=>{if(e)a();else{const i=Array.from(n.querySelectorAll(`.${o.xphDialog}`)).filter(f=>(f==null?void 0:f.parentNode)===n),c=i.map(f=>f.querySelector(`.${o.xphDialogWrapper}`)).filter(f=>f!==null),u=i.map(f=>f.querySelector(`.${o.xphMinimizeDialog}`)).filter(f=>f!==null),d=c.filter(f=>f.style.display==="flex"),g=u.filter(f=>f.style.display==="flex");if(d.length){s(d[d.length-1].parentNode,i[i.length-1]);return}if(g.length){s(g[g.length-1].parentNode,i[i.length-1]);return}}},[e]),{dialogTopShowClassConfig:o}},Sa=({initWidth:e,initHeight:t,curPropsWidth:r,curPropsHeight:n,setParentInitRecord:o})=>{p.useEffect(()=>{if(r!==e.current){o(s=>s+1);return}if(n!==t.current){o(s=>s+1);return}},[r,n])},Pa=()=>{const e=p.useRef({left:0,top:0,width:0,height:0});return{dialogChangeRecord:e,setDialogChangeRecord:({left:r,top:n,width:o,height:s})=>{const{left:a,top:i,width:c,height:u}=e.current;e.current={left:r??a,top:n??i,width:o??c,height:s??u}}}},Ea=({containerSizeTarget:e,dialogRef:t,minResizeRecord:r,setDialogSize:n,setDialogPosition:o,setMinResizeRecord:s})=>{const a=p.useCallback(()=>m.jsx("div",{ref:i,style:{position:"absolute",border:"4px dashed #ccc",display:"none",zIndex:999}}),[]),i=p.useRef(null),c=p.useRef(),u=p.useRef(!1),[d,g]=p.useState(!1),f=p.useRef(0),v=p.useRef(0),h=(C,I)=>{r.current||s({width:t.current.offsetWidth,height:t.current.offsetHeight}),u.current=!0,g(!0),c.current=I;const{clientX:T,clientY:S}=C;f.current=T,v.current=S;const E=parseFloat(t.current.style.left),O=parseFloat(t.current.style.top),R=t.current.offsetWidth,$=t.current.offsetHeight;i.current.style.display="block",i.current.style.left=`${E-.5*R}px`,i.current.style.top=`${O-.5*$}px`,i.current.style.width=`${R}px`,i.current.style.height=`${$}px`},y=C=>{if(u.current){const{clientX:I,clientY:T}=C,S=I-f.current,E=T-v.current,O=parseFloat(i.current.style.left),R=parseFloat(i.current.style.top),$=i.current.offsetWidth,G=i.current.offsetHeight,ee=r.current.width,se=r.current.height,he=e.current.scrollWidth,ue=e.current.scrollHeight;let H=$,B=G,Y=O,K=R;switch(c.current){case"lt":{H=H-S,B=B-E,K=K+E,Y=Y+S,H<ee&&(H=$,Y=O),B<se&&(B=G,K=R),Y<0&&(Y=0,H=$),K<0&&(K=0,B=G);break}case"rt":{H=H+S,B=B-E,K=K+E,Y=O,H<ee&&(H=$),B<se&&(B=G,K=R),H>he-Y&&(H=he-Y),K<0&&(K=0,B=G);break}case"rb":{H=H+S,B=B+E,K=R,Y=O,H<ee&&(H=$),B<se&&(B=G),H>he-Y&&(H=he-Y),B>ue-K&&(B=ue-K);break}case"lb":{H=H-S,B=B+E,K=R,Y=Y+S,H<ee&&(H=$,Y=O),B<se&&(B=G),Y<0&&(Y=0,H=$),B>ue-K&&(B=ue-K);break}}i.current.style.left=`${Y}px`,i.current.style.top=`${K}px`,i.current.style.width=`${H}px`,i.current.style.height=`${B}px`,f.current=I,v.current=T}},w=()=>{if(u.current){u.current=!1,g(!1),i.current.style.display="none";const{left:C,top:I,width:T,height:S}=i.current.style,E=parseFloat(C)+.5*parseFloat(T),O=parseFloat(I)+.5*parseFloat(S),R=parseFloat(T),$=parseFloat(S);o({left:E,top:O}),n({width:R,height:$})}},F=C=>h(C,"lt"),P=C=>h(C,"rt"),D=C=>h(C,"rb"),k=C=>h(C,"lb"),W=p.useCallback(C=>{y(C)},[]),q=p.useCallback(()=>{w()},[]),X=p.useCallback(()=>{w()},[]);return p.useEffect(()=>(document.body.addEventListener("mousemove",W),document.body.addEventListener("mouseup",q),document.body.addEventListener("mouseleave",X),()=>{document.body.removeEventListener("mousemove",W),document.body.removeEventListener("mouseup",q),document.body.removeEventListener("mouseleave",X)}),[]),{resizingState:d,DashedBox:a,onMousedownResizeLt:F,onMousedownResizeRt:P,onMousedownResizeRb:D,onMousedownResizeLb:k}},ja=({container:e,dialogProps:t,baseDialogProps:r})=>{const[n,o]=p.useState(0),s=()=>{o(C=>C+1)};p.useEffect(()=>(window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s)}),[]);const{containerSizeTarget:a,setContainerSizeTarget:i}=Aa({container:e}),{width:c,height:u}=r,{width:d,height:g}=t,f=d||c,v=g||u,{clientWidth:h,clientHeight:y}=a.current,w=f?f>h?h:f:0,F=v?v>y?y:v:"unset",P=p.useRef(w),D=p.useRef(F),k=C=>{P.current=C.width,D.current=C.height},W=p.useRef(Math.floor(h/2)),q=p.useRef(Math.floor(y/2)),X=C=>{W.current=C.left,q.current=C.top};return p.useEffect(()=>{i(),k({width:w,height:F}),X({left:Math.floor(h/2),top:Math.floor(y/2)})},[n]),{containerSizeTarget:a,parentInitRecord:n,initLeft:W,initTop:q,initWidth:P,initHeight:D,curPropsWidth:w,curPropsHeight:F,setInitPosition:X,setInitSize:k,setParentInitRecord:o}},Fa=()=>{const e=p.useRef(null);return{minResizeRecord:e,setMinResizeRecord:r=>{e.current=r}}},Aa=({container:e})=>{const t=e===document.body,r=p.useRef({clientWidth:t?window.innerWidth:e.clientWidth,clientHeight:t?window.innerHeight:e.clientHeight,scrollWidth:t?window.innerWidth:e.scrollWidth,scrollHeight:t?window.innerHeight:e.scrollHeight});return{containerSizeTarget:r,setContainerSizeTarget:()=>{r.current={clientWidth:t?window.innerWidth:e.clientWidth,clientHeight:t?window.innerHeight:e.clientHeight,scrollWidth:t?window.innerWidth:e.scrollWidth,scrollHeight:t?window.innerHeight:e.scrollHeight}}}},Mt={"minimize-windows":"_minimize-windows_12u3y_1","minimize-windows-title":"_minimize-windows-title_12u3y_43","minimize-windows-operate":"_minimize-windows-operate_12u3y_55"},Da=({onClick:e})=>m.jsx(x.Button,{type:"link",onClick:e,icon:m.jsx(fe.ShrinkOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),Gr=({onClick:e})=>m.jsx(x.Button,{type:"link",onClick:e,icon:m.jsx(fe.FullscreenOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),Oa=({onClick:e})=>m.jsx(x.Button,{type:"link",onClick:e,icon:m.jsx(fe.FullscreenExitOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),Xr=({onClick:e,disabled:t})=>m.jsx(x.Button,{type:"link",onClick:e,disabled:t,icon:m.jsx(fe.CloseOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),{useToken:$a}=x.theme,Ra=p.forwardRef(({title:e,left:t,top:r,visible:n,loading:o,onMaximize:s,onClosesquare:a,className:i},c)=>{const{token:u}=$a(),d={borderRadius:u.borderRadiusLG};return m.jsxs("div",{style:{display:n?"flex":"none",left:t,top:r,...d},className:`${Mt["minimize-windows"]} ${i}`,ref:c,children:[m.jsx("div",{className:Mt["minimize-windows-title"],title:e,children:e}),m.jsxs("div",{className:Mt["minimize-windows-operate"],children:[m.jsx(Gr,{onClick:s}),m.jsx(Xr,{onClick:a,disabled:o})]})]})}),ne={"xph-dialog-mask":"_xph-dialog-mask_o2yvb_1","xph-dialog-wrapper":"_xph-dialog-wrapper_o2yvb_23",dialog__header:"_dialog__header_o2yvb_45","dialog__header-btns":"_dialog__header-btns_o2yvb_63",dialog__main:"_dialog__main_o2yvb_71",dialog__footer:"_dialog__footer_o2yvb_85",dialog__resize:"_dialog__resize_o2yvb_99","dialog__resize-lt":"_dialog__resize-lt_o2yvb_113","dialog__resize-rt":"_dialog__resize-rt_o2yvb_125","dialog__resize-rb":"_dialog__resize-rb_o2yvb_137","dialog__resize-lb":"_dialog__resize-lb_o2yvb_149"},{useToken:ka}=x.theme,Ma=p.forwardRef((e,t)=>{const{token:r}=ka(),n={borderRadius:r.borderRadiusLG},{children:o,baseDialogProps:s,mask:a,title:i,renderFooter:c,renderTitle:u,getPopperContainer:d}=e,g=d(),[f,v]=Ur(!1),[h,y]=p.useState(!1),{open:w,close:F}=va(f,e,v,y),{footerActions:P}=ga(e,h),D=p.useRef(null),k=p.useRef(null),W=p.useRef(null),q=p.useRef(null),{containerSizeTarget:X,parentInitRecord:C,initLeft:I,initTop:T,initWidth:S,initHeight:E,curPropsWidth:O,curPropsHeight:R,setParentInitRecord:$}=ja({container:g,dialogProps:e,baseDialogProps:s}),{dialogChangeRecord:G,setDialogChangeRecord:ee}=Pa(),{dialogWidth:se,dialogHeight:he,setDialogSize:ue}=ya({initWidth:S,initHeight:E,setDialogChangeRecord:ee}),{dialogLeft:H,dialogTop:B,setDialogPosition:Y}=_a({initTop:T,initLeft:I,setDialogChangeRecord:ee}),{dialogMaxHeight:K,contentMaxHeight:zt}=Ca({visible:f,containerSizeTarget:X,dialogHeight:he,dialogRef:D,dialogHeaderRef:k,dialogFooterRef:q}),{minResizeRecord:Be,setMinResizeRecord:Ae}=Fa(),{minimizeLeft:De,minimizeTop:Ve,minimizeRef:ye,setMinimizePosition:ft}=xa(),{minimizeVisible:Ue,maximizeVisible:Lt,setMaximizeVisible:Nt,onMaximize:Se,onMinimize:Pe,onRecovery:dt,onClose:Oe}=wa({containerSizeTarget:X,dialogChangeRecord:G,close:F,setDialogSize:ue,setDialogPosition:Y}),$e=()=>{ue({width:S.current,height:E.current}),Y({left:I.current,top:T.current}),ft({left:160,top:60}),Nt(!1),Ae(null)};p.useEffect(()=>{$e()},[C]),Sa({initWidth:S,initHeight:E,curPropsWidth:O,curPropsHeight:R,setParentInitRecord:$}),qr({containerSizeTarget:X,dialogHeaderRef:k,dialogRef:D,setDialogPosition:Y}),qr({containerSizeTarget:X,dialogHeaderRef:ye,dialogRef:ye,setDialogPosition:ft});const{dialogTopShowClassConfig:Ye}=Ta({visible:f,container:g,dialogRef:D,minimizeRef:ye}),{resizingState:qe,DashedBox:Wt,onMousedownResizeLt:Ht,onMousedownResizeRt:pt,onMousedownResizeRb:ht,onMousedownResizeLb:Ee}=Ea({containerSizeTarget:X,dialogRef:D,minResizeRecord:Be,setDialogSize:ue,setDialogPosition:Y,setMinResizeRecord:Ae});return p.useImperativeHandle(t,()=>({open:w,close:Oe,setLoading:y,getVisible:()=>f})),m.jsxs("div",{className:Ye.xphDialog,children:[a&&f?m.jsx("div",{className:ne["xph-dialog-mask"]}):null,m.jsx(Ra,{visible:Ue,className:`${Ye.xphMinimizeDialog}`,loading:h,ref:ye,left:De,top:Ve,title:i,onMaximize:()=>Se("minimize"),onClosesquare:Oe}),m.jsxs("div",{ref:D,className:`${ne["xph-dialog-wrapper"]} ${Ye.xphDialogWrapper}`,style:{display:f&&!Ue?"flex":"none",left:H,top:B,width:se,height:he,maxHeight:K,opacity:qe?.2:"unset",...n},children:[m.jsxs("div",{ref:k,className:ne.dialog__header,children:[m.jsx("div",{children:u?u():i}),m.jsxs("div",{className:ne["dialog__header-btns"],children:[m.jsx(Da,{onClick:Pe}),Lt?m.jsx(Oa,{onClick:dt}):m.jsx(Gr,{onClick:()=>Se("maximize")}),m.jsx(Xr,{onClick:Oe,disabled:h})]})]}),m.jsx("div",{ref:W,className:ne.dialog__main,style:{maxHeight:zt},children:m.jsx(x.Spin,{spinning:h,children:f?o:null})}),c?m.jsx("div",{ref:q,children:c({loading:h})}):m.jsx("div",{ref:q,className:ne.dialog__footer,children:m.jsx(it,{...P})}),m.jsx("div",{className:`${ne.dialog__resize} ${ne["dialog__resize-lt"]}`,onMouseDown:Ht}),m.jsx("div",{className:`${ne.dialog__resize} ${ne["dialog__resize-rt"]}`,onMouseDown:pt}),m.jsx("div",{className:`${ne.dialog__resize} ${ne["dialog__resize-rb"]}`,onMouseDown:ht}),m.jsx("div",{className:`${ne.dialog__resize} ${ne["dialog__resize-lb"]}`,onMouseDown:Ee})]}),m.jsx(Wt,{})]})}),Ia=(e,t)=>{const{children:r,...n}=e,{baseDialogProps:o,dialogProps:s}=ma(n),{getPopperContainer:a}=s;return m.jsx(Jr,{getPopperContainer:a,children:m.jsx(Ma,{...s,baseDialogProps:o,ref:t,children:r})})},Kr=p.forwardRef(Ia),Jr=({children:e,getPopperContainer:t})=>{const[r,n]=p.useState(null);return p.useEffect(()=>{const o=t();n(o)},[]),r?vn.createPortal(e,r):null};function za(e){const{extendAuthProps:t}=La();return{authProps:{...ce(ce({auth:o=>!1},t),e)}}}const La=()=>{const{extendProps:e}=Fe();return{extendAuthProps:e==null?void 0:e.auth}},Na=e=>{const{children:t,...r}=e,{authProps:n}=za(r),{auth:o,authCode:s}=n;return(()=>{let i=!1;return s&&o&&(re(s)?i=s.every(c=>o(c)):i=o(s)),i})()?t:null};function at(e){return"component"in e}function lt(e){return"render"in e}function Wa(e){return e.includes("Input")||e.includes("Complete")?"请输入":e.includes("Picker")||e.includes("Select")||e.includes("Cascader")||e.includes("Checkbox")||e.includes("Radio")||e.includes("Switch")?"请选择":""}function Ha(e,t,r){["DatePicker","MonthPicker","WeekPicker","TimePicker"].includes(t)?e.type=r?"string":"object":["RangePicker","Upload","CheckboxGroup","TimePicker"].includes(t)?e.type="array":["InputNumber"].includes(t)&&(e.type="number")}const Ba=["DatePicker","MonthPicker","RangePicker","WeekPicker","TimePicker"],Va=e=>{const{show:t,ifShow:r,required:n,disabled:o,componentProps:s}=e;return!!(Q(t)||Q(r)||Q(n)||Q(o)||Q(s)||lt(e))},Ua=e=>["application/json","application/javascript","text/plain","text/html","text/css"].includes(e)?`${e}; charset=utf-8`:e,Ya=(e,t,r)=>{const n=p.useRef(null),o=p.useRef(null),{handleCollapseChangeFalse:s}=r.current||{},{show:a,ifShow:i}=e;let c=!0,u=!0;if(nt(a)&&(c=a),nt(i)&&(u=i),Q(a)){c=a({model:t});const d=Nr(n.current)?c:n.current;p.useEffect(()=>{ot(c,d)||s&&s()},[t])}if(Q(i)){u=i({model:t});const d=Nr(o.current)?u:o.current;p.useEffect(()=>{ot(u,d)||s&&s()},[t])}return n.current=c,o.current=u,{isShow:c,isIfShow:u}},qa=(e,t)=>{const{collapsible:r,collapseNum:n}=e,[o,s]=p.useState(!!(r&&t>=n));return{itemCollapse:o,setItemCollapse:s}},Ga=({item:e,model:t,isShow:r,componentProps:n})=>{const{rules:o=[],label:s,required:a}=e;let i=o;const c=at(e),u=c?Wa(e.component)+s:"";function d(h,y){const w=h.message||u;return y===void 0||ia(y)||Array.isArray(y)&&y.length===0||typeof y=="string"&&y.trim()===""||typeof y=="object"&&Reflect.has(y,"checked")&&Reflect.has(y,"halfChecked")&&Array.isArray(y.checked)&&Array.isArray(y.halfChecked)&&y.checked.length===0&&y.halfChecked.length===0?Promise.reject(w):Promise.resolve()}const g=Q(a)?a({model:t}):a;g&&(!i||i.length===0?i=[{required:g,validator:d}]:i.findIndex(y=>Reflect.has(y,"required"))===-1&&i.push({required:g,validator:d}));const f=i.findIndex(h=>Reflect.has(h,"required")&&!Reflect.has(h,"validator"));if(f!==-1){const h=i[f];if(r||(h.required=!1),c){const{component:y}=e;Reflect.has(h,"type")||(h.type=y==="InputNumber"?"number":"string"),h.message=h.message||u,(y.includes("Input")||y.includes("Textarea"))&&(h.whitespace=!0);const w=n.valueFormat;Ha(h,y,w)}}const v=i.findIndex(h=>h.max);return v!==-1&&!i[v].validator&&(i[v].message=i[v].message||`字符数应小于${i[v].max}位`),{rules:i}},Xa=(e,t,r)=>{const{disabled:n}=e;let o=!1;const{disabled:s}=t;return Q(s)&&(o=s({model:r})),nt(s)&&(o=s),{disabled:Reflect.has(t,"disabled")?o:n}},Ka=(e,t)=>{const r={},{componentProps:n={}}=e;return Q(n)&&Object.assign(r,n({model:t})),Object.assign(r,n),{componentProps:r}},Ja=(e,t)=>{const{colProps:r={}}=e,{colProps:n={span:24}}=t;return{colProps:{...n,...r}}},Za=({formProps:e})=>{const{items:t}=e;return{formItems:t.map(n=>({...n}))}},Qa=(e,t)=>{const r=i=>(Object.keys(i).forEach(c=>{Object.defineProperty(i,c,{value:i[c],writable:!1,enumerable:!0,configurable:!1})}),i),n={};e.items.forEach(i=>{n[i.name]=i.initialValue});const o=Va(t),s=o?x.Form.useWatch(i=>r(i)):null;return{rewritingModel:p.useMemo(()=>s||r(n),[s]),isusewatch:o}},el=()=>{const e=p.useRef(null);function t(n){e.current=n}const r={getFieldsValue:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.getFieldsValue(...n)},setFieldsValue:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.setFieldsValue(...n)},resetFields:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.resetFields(...n)},validator:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.validator(...n)},scrollToField:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.scrollToField(...n)}};return p.useEffect(()=>()=>{e.current=null},[]),[t,r]};function tl(e,t={}){const r=/^\[(.+)\]$/;if(r.test(e)){const n=e.match(r);if(n&&n[1]){const o=n[1].split(",");if(!o.length)return;const s=[];return o.forEach((a,i)=>{Wr(s,i,t[a.trim()])}),s.filter(Boolean).length?s:void 0}}}function rl(e,t={}){const r=/^\{(.+)\}$/;if(r.test(e)){const n=e.match(r);if(n&&n[1]){const o=n[1].split(",");if(!o.length)return;const s={};return o.forEach(a=>{Wr(s,a.trim(),t[a.trim()])}),Object.values(s).filter(Boolean).length?s:void 0}}}function nl(e,t){const r=t.fieldMapToTime;if(!r||!Array.isArray(r))return e;for(const[n,[o,s],a="YYYY-MM-DD"]of r){if(!n||!o||!s)continue;if(!e[n]){Reflect.deleteProperty(e,n);continue}const[i,c]=e[n],[u,d]=Array.isArray(a)?a:[a,a];e[o]=Ge(i).format(u),e[s]=Ge(c).format(d),Reflect.deleteProperty(e,n)}return e}const ol=(e,t,r)=>{const n=e.filter(a=>a.name);return{handleFormatRenderValues:a=>{const i={},c=[];return n.forEach(u=>{const d=Reflect.has(a,u.name),g=tl(u.name,a)||rl(u.name,a);if(d||g){const f=g||a[u.name];if(at(u))if(Ba.includes(u.component)){if(re(f)){const v=[];for(const h of f)v.push(h?Ge(h):null);i[u.name]=v}else i[u.name]=f?Ge(f):null;c.push(u.name)}else i[u.name]=f,c.push(u.name);lt(u)&&(i[u.name]=f,c.push(u.name))}}),{renderValues:i,validKeys:c}},handleFormatReturnValues:a=>{var c,u,d,g,f;if(!ie(a))return{};const i={};for(const v of Object.entries(a)){let[,h]=v;const[y]=v;if(!y||Q(h))continue;const{transformDateFunc:w}=t,F=(d=(u=(c=r.current)==null?void 0:c.get(y))==null?void 0:u.current)==null?void 0:d.componentProps,P=F==null?void 0:F.valueFormat;if(ie(h)){const D=h;D.format&&(h=w==null?void 0:w(D,P))}re(h)&&((g=h[0])!=null&&g.format)&&((f=h[1])!=null&&f.format)&&(h=h.map(D=>w==null?void 0:w(D,P))),Rt(h)&&(h===""?h=void 0:h=h.trim()),i[y]=h}return nl(i,t)}}},sl=(e,t,r)=>({getFieldsValue:(...c)=>r(e.getFieldsValue(...c)),setFieldsValue:c=>{const{renderValues:u,validKeys:d}=t(c);e.setFieldsValue(u),e.validateFields(d)},resetFields:async()=>e.resetFields(),validator:async c=>e.validateFields(c).then(u=>r(u)),scrollToField:async(c,u)=>e.scrollToField(c,u)}),il=e=>{const{extendFormProps:t}=Zr();return{formProps:{...ce(ce({collapseNum:5,colon:!1,items:[],labelWrap:!0,transformDateFunc:(o,s)=>{var a;return((a=o==null?void 0:o.format)==null?void 0:a.call(o,s||"YYYY-MM-DD HH:mm:ss"))??o},fieldMapToTime:[]},t),e)}}},ct=e=>{const{immediate:t=!0,params:r,api:n,apiCallback:o,isUseWatch:s}=e,a=p.useRef(!0),i=p.useRef(r),c=()=>{n&&Q(n)&&(r?n(r).then(o):n().then(o),i.current=r)};return p.useEffect(()=>{a.current&&(t&&c(),a.current=!1),!a.current&&s&&(ot(r,i.current)||t&&c())},[r]),{getApiData:c}},al=(e,t)=>{const{collapsible:r,collapseNum:n}=e,o=p.useRef();return{collapsible:r,collapseNum:n,collapseRef:o,onClickCollapseToTrue:()=>{var i;(i=t.current)==null||i.forEach(c=>{if(c.current){const{itemIndex:u}=c.current;u>=n&&r&&c.current.setItemCollapse(!0)}})},onClickCollapseToFalse:()=>{var i;(i=t.current)==null||i.forEach(c=>{if(c.current){const{itemCollapse:u}=c.current;u&&c.current.setItemCollapse(!1)}})}}},Zr=()=>{const{extendProps:e,extendComp:t}=Fe(),r=n=>{const o=t==null?void 0:t.form;o&&Object.keys(o).forEach(s=>{n.set(s,o[s])})};return{extendFormProps:e==null?void 0:e.form,setExtendFormComp:r}},ll=e=>{const{api:t,params:r,immediate:n=!0,isusewatch:o,onDropdownVisibleChange:s}=e,a=o==="true",[i,c]=p.useState([]),{getApiData:u}=ct({api:t,immediate:n,params:r,apiCallback:c,isUseWatch:a}),d=f=>{f&&!n&&u(),s&&s(f)},g=()=>{const{api:f,params:v,immediate:h,isusewatch:y,...w}=e;return w};return m.jsx(x.Select,{...g(),options:i,onDropdownVisibleChange:d})},cl=e=>{const{api:t,params:r,immediate:n=!0,isusewatch:o,onDropdownVisibleChange:s}=e,a=o==="true",[i,c]=p.useState([]),{getApiData:u}=ct({api:t,immediate:n,params:r,apiCallback:c,isUseWatch:a}),d=f=>{f&&!n&&u(),s&&s(f)},g=()=>{const{api:f,params:v,immediate:h,isusewatch:y,...w}=e;return w};return m.jsx(x.TreeSelect,{...g(),treeData:i,onDropdownVisibleChange:d})},ul=e=>{const{api:t,params:r,isusewatch:n}=e,o=n==="true",[s,a]=p.useState([]);ct({api:t,params:r,apiCallback:a,isUseWatch:o});const i=()=>{const{api:c,params:u,isusewatch:d,...g}=e;return g};return m.jsx(x.Transfer,{...i(),dataSource:s})},fl=e=>{const{api:t,params:r,immediate:n=!0,isusewatch:o,onDropdownVisibleChange:s}=e,a=o==="true",[i,c]=p.useState([]),{getApiData:u}=ct({api:t,immediate:n,params:r,apiCallback:c,isUseWatch:a}),d=f=>{f&&!n&&u(),s&&s(f)},g=()=>{const{api:f,params:v,immediate:h,isusewatch:y,...w}=e;return w};return m.jsx(x.AutoComplete,{...g(),options:i,onDropdownVisibleChange:d})},ve={String:"String","String[]":"String[]","File[]":"File[]",FileList:"FileList"},dl=e=>{const t="",{api:r,maxCount:n=1,maxSize:o=2,listType:s="picture-card",openCrop:a=!1,data:i,returnType:c=ve.String,value:u=t,onChange:d}=e,g=p.useRef(!0),f=p.useRef(0),v=p.useRef([]),[h,y]=p.useState([]),w=C=>{v.current=C,y([...C])},F=()=>{const{api:C,maxCount:I,maxSize:T,openCrop:S,beforeUpload:E,fileList:O,returnType:R,...$}=e;return $},P=C=>{const I=C.size/1024/1024<o;I||x.message.error(`文件大小超过:${o}M, 请重试`);const T=v.current.length+f.current<n;return T||x.message.error(`文件数量不能超过${n}个`),I&&T&&f.current++,I&&T&&D(C),x.Upload.LIST_IGNORE},D=C=>{a?(x.message.error("暂时不支持裁剪功能,后续兼容。。。。"),k({file:C})):k({file:C})},k=C=>{r?r({file:C.file,...i}).then(I=>{w([...v.current,...I])}).finally(()=>{f.current--}):(Object.assign(C.file,{status:"done",url:URL.createObjectURL(new Blob([C.file],{type:Ua(C.file.type)}))}),w([...v.current,C.file]),f.current--)},W=C=>{const{file:I,fileList:T}=C,{status:S}=I;switch(S){case"removed":{w([...T]);break}}},q=C=>{const I=S=>{const E=S.split("/"),O=E[E.length-1],[R]=O.split("?");return R};return{uid:(S=>{const E=v.current.find(O=>O.url===S);return E?E.uid:Gt()})(C),name:I(C),url:C,status:"done"}},X=()=>{switch(c){case ve.String:return h.map(C=>C.url).join(",");case ve["String[]"]:return h.map(C=>C.url);case ve["File[]"]:return[...h];case ve.FileList:return[...h]}};return p.useEffect(()=>{const C=X();if(ot(C,u))return;let I=[];switch(c){case ve.String:{I=(u||"").split(",").filter(T=>T).map(T=>q(T));break}case ve["String[]"]:{I=(u||[]).map(T=>q(T));break}case ve["File[]"]:{I=(u||[]).map(T=>T);break}case ve.FileList:{I=(u||[]).map(T=>T);break}}w(I)},[u]),p.useEffect(()=>{if(g.current){g.current=!1;return}const C=X();d==null||d(C)},[h]),m.jsx(x.Upload,{listType:s,...F(),fileList:h,beforeUpload:P,onChange:W,children:"上传"})},N=new Map;N.set("Input",x.Input),N.set("ApiSelect",ll),N.set("Select",x.Select),N.set("InputNumber",x.InputNumber),N.set("ApiTreeSelect",cl),N.set("TreeSelect",x.TreeSelect),N.set("ApiTransfer",ul),N.set("Transfer",x.Transfer),N.set("Switch",x.Switch),N.set("Button",x.Button),N.set("Radio",x.Radio),N.set("RadioGroup",x.Radio.Group),N.set("Checkbox",x.Checkbox),N.set("CheckboxGroup",x.Checkbox.Group),N.set("Cascader",x.Cascader),N.set("TimePicker",x.TimePicker),N.set("DatePicker",x.DatePicker),N.set("MonthPicker",x.DatePicker.MonthPicker),N.set("WeekPicker",x.DatePicker.WeekPicker),N.set("RangePicker",x.DatePicker.RangePicker),N.set("InputPassword",x.Input.Password),N.set("InputTextArea",x.Input.TextArea),N.set("ApiAutoComplete",fl),N.set("AutoComplete",x.AutoComplete),N.set("Upload",x.Upload),N.set("AutoUpload",dl);const Qr={"form-item-force":"_form-item-force_1hsf3_1","form-item-hidden":"_form-item-hidden_1hsf3_9"},pl=p.forwardRef(({itemIndex:e,itemProps:t,methods:r,formProps:n,collapseRef:o},s)=>{const{rewritingModel:a,isusewatch:i}=Qa(n,t),{isIfShow:c,isShow:u}=Ya(t,a,o),{colProps:d}=Ja(t,n),{componentProps:g}=Ka(t,a),{rules:f}=Ga({item:t,model:a,isShow:u,componentProps:g}),{disabled:v}=Xa(n,t,a),{itemCollapse:h,setItemCollapse:y}=qa(n,e),{name:w,label:F,wrapperCol:P,labelCol:D,valuePropName:k,initialValue:W,forceRow:q}=t;p.useImperativeHandle(s,()=>({itemIndex:e,componentProps:g,itemCollapse:h,setItemCollapse:y}));const X=()=>({name:w,label:F,rules:f,wrapperCol:P,labelCol:D,valuePropName:k,initialValue:W}),{setExtendFormComp:C}=Zr();C(N);const I=at(t),T=lt(t),S=()=>{if(I){const E=N.get(t.component);return m.jsx(E,{...g,disabled:v,isusewatch:i.toString()})}return T?t.render({model:a,name:w,disabled:v,methods:r,componentProps:g}):null};return m.jsxs(p.Fragment,{children:[q?m.jsx("div",{className:Qr["form-item-force"]}):null,c?m.jsx(x.Col,{...d,className:u&&!h?void 0:Qr["form-item-hidden"],children:m.jsx(x.Form.Item,{...X(),children:S()})}):null]})}),hl={"collapse-wrapper":"_collapse-wrapper_ylm01_1"},gl=p.forwardRef(({collapsible:e,onClickExpand:t,onClickFold:r},n)=>{const[o,s]=p.useState(e),a=p.useMemo(()=>o,[o]),i=()=>{r(),s(!0)},c=()=>{t(),s(!1)};return p.useImperativeHandle(n,()=>({handleCollapseChangeFalse:c})),m.jsx("div",{className:hl["collapse-wrapper"],children:a?m.jsx(x.Button,{onClick:c,type:"link",icon:m.jsx(fe.DownOutlined,{}),children:"展开"}):m.jsx(x.Button,{onClick:i,type:"link",icon:m.jsx(fe.UpOutlined,{}),children:"折叠"})})}),ml={"group-wrapper":"_group-wrapper_g8zqi_1"},bl=({formProps:e})=>{const{renderActions:t}=e;return m.jsx("div",{className:ml["group-wrapper"],children:t==null?void 0:t()})},vl={"xph-form-action":"_xph-form-action_8ws73_1"},yl=(e,t)=>{const[r]=x.Form.useForm(),{formProps:n}=il(e),{formItems:o}=Za({formProps:n}),s=p.useRef(new Map),{collapsible:a,collapseNum:i,collapseRef:c,onClickCollapseToFalse:u,onClickCollapseToTrue:d}=al(n,s),{handleFormatRenderValues:g,handleFormatReturnValues:f}=ol(o,n,s),{setFieldsValue:v,getFieldsValue:h,resetFields:y,validator:w,scrollToField:F}=sl(r,g,f),P=()=>{const{layout:k,wrapperCol:W,labelCol:q,colon:X,disabled:C,labelWrap:I,labelAlign:T,scrollToFirstError:S,size:E}=n;return{layout:k,wrapperCol:W,labelCol:q,colon:X,disabled:C,labelWrap:I,labelAlign:T,scrollToFirstError:S,size:E}},D={setFieldsValue:v,getFieldsValue:h,resetFields:y,validator:w,scrollToField:F};return p.useImperativeHandle(t,()=>({...D})),p.useEffect(()=>(n.register&&n.register(D),()=>{s.current.clear()}),[]),m.jsxs(x.Form,{form:r,...P(),children:[m.jsx(x.Row,{children:o.map((k,W)=>(s.current.has(k.name)||s.current.set(k.name,p.createRef()),m.jsx(pl,{ref:s.current.get(k.name),itemIndex:W,itemProps:k,formProps:n,methods:D,collapseRef:c},W)))}),m.jsxs("div",{className:vl["xph-form-action"],children:[m.jsx(bl,{formProps:n}),a?m.jsx(gl,{ref:c,collapsible:o.length>i,onClickExpand:u,onClickFold:d}):null]})]})},It=p.forwardRef(yl),_l=p.memo(It),wl=p.forwardRef((e,t)=>{const{renderActions:r,showSearch:n=!0,tableRef:o}=e,[s,a]=p.useState(!1),i=p.useRef(null),c=()=>{const{reloadData:f}=o.current;f()},u=()=>{const{resetData:f}=o.current;f()},d=p.useCallback(()=>m.jsxs("div",{style:{width:"100%",display:"flex"},children:[m.jsx("div",{style:{flex:1,width:0},children:r==null?void 0:r()}),n&&m.jsxs("div",{style:{display:"flex",gap:"8px"},children:[m.jsx(x.Button,{type:"primary",icon:m.jsx(fe.SearchOutlined,{}),onClick:c,children:"搜索"}),m.jsx(x.Button,{icon:m.jsx(fe.ReloadOutlined,{}),onClick:u,children:"重置"})]})]}),[n,r]),g=()=>{const{renderActions:f,...v}=e;return{...v,renderActions:d}};return p.useImperativeHandle(t,()=>({setFormLoading:a,...i.current})),m.jsx(x.Spin,{spinning:s,children:m.jsx(_l,{ref:i,...g()})})}),Cl=p.memo(It),xl=(e,t)=>{const r=p.useRef(null),n=p.useRef(null),{formProps:o}=e,a=(()=>{const{formProps:d,...g}=e;return g})(),i=p.useRef(null),c=async()=>{const{onOk:d,renderFooter:g}=a;if(!g){const{ok:f,data:v}=i.current;if(f){n.current.validator().then(async h=>{r.current.setLoading(!0),await f({values:n.current.getFieldsValue()}).then(w=>w).finally(()=>{r.current.setLoading(!1)})!==!1&&(r.current.close(),i.current=null)});return}if(d){n.current.validator().then(async h=>{r.current.setLoading(!0),await d({values:h,data:v}).then(w=>w).finally(()=>{r.current.setLoading(!1)})!==!1&&(r.current.close(),i.current=null)});return}r.current.close(),i.current=null}},u=async()=>{const{onCancel:d,renderFooter:g}=a;if(!g){const{cancel:f,data:v}=i.current;if(f){if(await f({values:n.current.getFieldsValue(!0)})===!1)return;r.current.close(),i.current=null;return}if(d){if(await d({values:n.current.getFieldsValue(!0),data:v})===!1)return;r.current.close(),i.current=null;return}r.current.close(),i.current=null}};return p.useImperativeHandle(t,()=>({open:async d=>{if(r.current.getVisible())return;const{renderFooter:f}=a;return!f&&(i.current=d),r.current.open().then(()=>{n.current.setFieldsValue(d.data||{})})},close:(...d)=>r.current.close(...d),setLoading:(...d)=>r.current.setLoading(...d),getVisible:(...d)=>r.current.getVisible(...d),getFieldsValue:(...d)=>n.current.getFieldsValue(...d),setFieldsValue:(...d)=>n.current.setFieldsValue(...d),resetFields:(...d)=>n.current.resetFields(...d),validator:(...d)=>n.current.validator(...d),scrollToField:(...d)=>n.current.scrollToField(...d)})),m.jsx(Kr,{...a,ref:r,onOk:c,onCancel:u,children:m.jsx(Cl,{...o,ref:n})})},en=p.forwardRef(xl);function Tl({searchForm:e}){return{searchFormRef:p.useRef(null),searchFormProps:e}}function tn(e){return"cellFunc"in e}function rn(e){return"children"in e}const{useToken:Sl}=x.theme,Pl=(e,t,r)=>{const{curComponentProps:n,cellFuncProps:o}=t,{url:s,onClick:a}=n,{token:i}=Sl(),c={color:i.colorLink,cursor:"pointer"},u=()=>{if(r.mainClick&&r.mainClick(),a){a();return}if(s){window.open(s,"_blank");return}};return m.jsx(e,{...r,mainClick:u,mainStyle:Object.assign(c,(r==null?void 0:r.mainStyle)||{})})},El={"cellfunc-actions":"_cellfunc-actions_14drt_1"},jl=(e,t,r)=>{const{curComponentProps:n,cellFuncProps:o}=t;return m.jsx("div",{className:El["cellfunc-actions"],children:m.jsx(it,{...n})})},{useToken:Fl}=x.theme,Al={0:{color:"orange",backgroundColor:"unset",border:"1px solid orange"},1:{color:"purple",backgroundColor:"unset",border:"1px solid purple"},2:{color:"blue",backgroundColor:"unset",border:"1px solid blue"},3:{color:"green",backgroundColor:"unset",border:"1px solid green"},4:{color:"red",backgroundColor:"unset",border:"1px solid red"},5:{color:"pink",backgroundColor:"unset",border:"1px solid pink"},6:{color:"cyan",backgroundColor:"unset",border:"1px solid cyan"},7:{color:"magenta",backgroundColor:"unset",border:"1px solid magenta"},8:{color:"yellow",backgroundColor:"unset",border:"1px solid yellow"},9:{color:"teal",backgroundColor:"unset",border:"1px solid teal"},10:{color:"brown",backgroundColor:"unset",border:"1px solid brown"},11:{color:"gray",backgroundColor:"unset",border:"1px solid gray"},12:{color:"olive",backgroundColor:"unset",border:"1px solid olive"},13:{color:"navy",backgroundColor:"unset",border:"1px solid navy"},14:{color:"lime",backgroundColor:"unset",border:"1px solid lime"},15:{color:"maroon",backgroundColor:"unset",border:"1px solid maroon"}},Dl=(e,t,r)=>e.reduce((n,o,s)=>{var u;const a=`${String(t.dataIndex)}${o.value}`,i=(u=o.config)==null?void 0:u.color,c=i?r[i]??{color:i,backgroundColor:"unset",border:`1px solid ${i}`}:Al[s]||{};return n[a]={color:c.color,backgroundColor:c.backgroundColor,border:c.border},n},{}),Ol=(e,t,r)=>{const{curComponentProps:n,cellFuncProps:{renderPrams:{text:o,column:s}}}=t,{token:a}=Fl(),{enums:i}=n,c={primary:{color:a.colorPrimary,backgroundColor:a.colorPrimaryBg,border:`1px solid ${a.colorPrimary}`},success:{color:a.colorSuccess,backgroundColor:a.colorSuccessBg,border:`1px solid ${a.colorSuccess}`},warning:{color:a.colorWarning,backgroundColor:a.colorWarningBg,border:`1px solid ${a.colorWarning}`},info:{color:a.colorInfo,backgroundColor:a.colorInfoBg,border:`1px solid ${a.colorInfo}`},error:{color:a.colorError,backgroundColor:a.colorErrorBg,border:`1px solid ${a.colorError}`}},d=Dl(i,s,c)[`${String(s.dataIndex)}${o}`]||{},g={padding:"0 8px",borderRadius:a.borderRadiusLG,fontSize:a.fontSizeSM,...d},f=()=>{var h;return(h=i.find(y=>y.value===o))==null?void 0:h.label};return m.jsx(e,{...r,mainHandleText:f,mainStyle:Object.assign((r==null?void 0:r.mainStyle)||{},g)})},{useToken:$l}=x.theme,nn={link:{Comp:Pl},actions:{Comp:jl},tag:{Comp:Ol},copy:{Comp:(e,t,r)=>{const{curComponentProps:n,cellFuncProps:{renderPrams:o}}=t,{token:s}=$l(),{text:a,onClick:i,size:c="default"}=n,u={small:16,default:18,large:20},{copy:d}=Ul(),g=()=>{let f=o.text;if(a&&(Q(a)&&(f=a(o.record)),Rt(a)&&(f=a)),i)return i(o.record);d(f)&&x.message.success("复制成功")};return m.jsxs(m.Fragment,{children:[m.jsx("span",{onClick:g,children:m.jsx("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4503",width:u[c],height:u[c],style:{cursor:"pointer",verticalAlign:"text-top"},children:m.jsx("path",{d:"M682.666667 42.666667H85.333333v682.666666h85.333334V128h512V42.666667zM256 213.333333l4.522667 768H896V213.333333H256z m554.666667 682.666667H341.333333V298.666667h469.333334v597.333333z",fill:s.colorLink,"p-id":"4504"})})}),m.jsx(e,{...r})]})}}},Rl=(e,t)=>{var a,i;const{renderPrams:{text:r,column:n}}=e,o=(a=t==null?void 0:t.mainHandleText)==null?void 0:a.call(t),s=nt(n==null?void 0:n.ellipsis)?n==null?void 0:n.ellipsis:(i=n==null?void 0:n.ellipsis)==null?void 0:i.showTitle;return m.jsx("span",{onClick:t==null?void 0:t.mainClick,style:t==null?void 0:t.mainStyle,title:s?`${o??r}`:void 0,children:o??r})},kl=e=>{const{setExtendTableCellComp:t}=sn();t(nn);const{dslConfig:r}=e;let n=Rl.bind(null,e),o=0;for(;o<r.length;){const s=o++,a=nn[r[s].component];a&&(n=a.Comp.bind(null,n,{curComponentProps:r[s].componentProps||{},cellFuncProps:e}))}return m.jsx(n,{})};function on(e){return e.map(t=>{let r={...t};if(tn(r)){const{cellFunc:n,...o}=r;r={...o,render:(...s)=>{const a=Q(n),[i,c,u]=s,d={text:i,record:c,index:u,column:JSON.parse(JSON.stringify(o))},g=a?n(d):n;return m.jsx(kl,{dslConfig:g,renderPrams:d})}}}return rn(r)&&r.children&&Array.isArray(r.children)&&(r.children=on(r.children)),r})}function Ml(e){const{columns:t}=e.table;return{columns:on(t)}}const Il=e=>{const{extendTableProps:t}=sn();return{tableProps:{...ce(ce({table:{columns:[],fullHeight:!1,autoRequest:!0,pagination:{pageSize:20,total:0,showTotal:o=>`共:${o} 条`,current:1,pageSizeOptions:[10,20,50,100],showSizeChanger:!0,showQuickJumper:!0},requestFields:{pageSize:"pageSize",current:"current"},responseFields:{current:"current",list:"data",total:"total"}},crudFormDialog:void 0,searchForm:void 0},t),e)}}};function zl(e){const{pagination:t,autoPagination:r}=e.table,[n,o]=p.useState(t),s=p.useRef(t),a=p.useMemo(()=>n&&(r===!0||r===void 0)||!1,[n]);return{pagination:{model:n,update:c=>{if(!s.current)return;const u={...s.current,...c};o(u),s.current=u},show:a},lastPaginationState:s}}function Ll(e,t){const{api:r,formatDataSource:n,autoPagination:o,onChange:s,requestFields:a,responseFields:i}=e.table,c=e.onPaginationChange,{pagination:u,lastPaginationState:d}=zl(e),[g,f]=p.useState({loading:!1,dataSource:[],selection:[],backupsDataSource:[]}),v=p.useRef({loading:!1,dataSource:[],selection:[],backupsDataSource:[]}),h={model:g,update:T=>{const S={...v.current,...T};f(S),v.current=S,t.current&&t.current.setFormLoading(S.loading)}},y={validator:async()=>({}),resetFields:async()=>{}},w=async()=>{p.useEffect(()=>{const{autoRequest:T}=e.table,{validator:S}=t.current||y;T&&S().then(E=>{k({searchFormParams:E})})},[])},F=async({searchFormParams:T,paginationParams:S})=>{const E={...T,[`${a.current}`]:d.current.current,[`${a.pageSize}`]:d.current.pageSize,...S?{[`${a.current}`]:S.current,[`${a.pageSize}`]:S.pageSize}:{}};return r(E).then(O=>{const{current:R,list:$,total:G}=mt(i,O);h.update({dataSource:n?n($):$}),u.update({total:G,current:R,pageSize:E[`${a.pageSize}`]})}).finally(()=>{h.update({loading:!1})})},P=async({searchFormParams:T,paginationParams:S})=>{const E={...T};return r(E).then(O=>{const{list:R}=mt(i,O),$=n?n(R):R;h.update({selection:[],dataSource:$}),u.update({current:1,total:R.length})}).finally(()=>{h.update({loading:!1})})},D=async({searchFormParams:T,paginationParams:S})=>{var O;const E={...T};if(S){const{current:R,pageSize:$}=S;u.update({current:R,pageSize:$});const G=(R-1)*$,ee=G+$,se=(O=v.current.backupsDataSource)==null?void 0:O.slice(G,ee);return h.update({loading:!1,selection:[],dataSource:se})}else return r(E).then(R=>{let $=n?n(R):R;const G=[...$],ee=0,se=ee+d.current.pageSize;$=$.slice(ee,se),h.update({selection:[],dataSource:$,backupsDataSource:G}),u.update({current:1,total:R.length})}).finally(()=>{h.update({loading:!1})})},k=async({searchFormParams:T,paginationParams:S})=>{if(h.update({loading:!0,selection:[]}),r)switch(!!d.current){case!0:return o===!0?D({searchFormParams:T,paginationParams:S}):o===!1?P({searchFormParams:T,paginationParams:S}):F({searchFormParams:T,paginationParams:S});case!1:return P({searchFormParams:T,paginationParams:S})}return h.update({loading:!1})};return{table:h,pagination:u,firstGetTableData:w,onPaginationChange:(T,S)=>{const{validator:E}=t.current||y;E().then(O=>{k({searchFormParams:O,paginationParams:{current:T,pageSize:S}})}),c&&c(T,S)},onAllChange:async(...T)=>{const[S,E,O,R]=T,$=[];for(let G=0;G<$.length&&!$[G]();G++);s&&s(E,O,R)},resetData:async()=>{const{resetFields:T,validator:S}=t.current||y;return T().then(async()=>{const E=await S();return k({searchFormParams:E})})},resetAllData:async()=>{const{resetFields:T,validator:S}=t.current||y;return T().then(async()=>{const E={};if(d.current){const{pageSize:O}=d.current;o===void 0&&(E.paginationParams={current:1,pageSize:O})}return E.searchFormParams=await S(),k(E)})},reloadData:async()=>{const{validator:T}=t.current||y;return T().then(S=>k({searchFormParams:S}))}}}const Nl=(e,t)=>{const{onRowSelectionChange:r}=e,{rowSelection:n}=e.table,o=()=>{if(Rt(n))return{type:n,onChange:(s,a,i)=>{t.update({selection:a}),r&&r(s,a)}};if(ie(n)){const{onChange:s}=n;return{...n,onChange:(a,i,c)=>{t.update({selection:i}),s&&s(a,i,c),r&&r(a,i)}}}return n};return{rowSelection:o(),getNewRowSelection:o}};function Wl(e,t){const{scroll:r,virtual:n}=e.table,o=p.useRef(null),[s,a]=p.useState(0),[i,c]=p.useState(0),u=()=>{o.current&&(a(o.current.offsetWidth),c(o.current.offsetHeight))};p.useEffect(()=>{const g=new ResizeObserver(u);return o.current&&g.observe(o.current),()=>{g&&o.current&&g.unobserve(o.current)}},[]);const d=p.useMemo(()=>t?n?{x:s,y:i-70,...r}:{y:i-70,...r}:{...r},[i]);return{divRef:o,scroll:d}}function Hl(e,t){const{toolbar:r}=e.table;return{getTopToolbarBindProps:()=>{if(Q(r)){const o=r({loading:t.model.loading,selection:t.model.selection});return{...o,disabled:t.model.loading||o.disabled}}return{...r,disabled:t.model.loading||(r==null?void 0:r.disabled)}}}}const sn=()=>{const{extendProps:e,extendComp:t}=Fe(),r=n=>{const o=t==null?void 0:t.tableCellFunc;o&&Object.keys(o).forEach(s=>{const a=o[s];n[s]={Comp:a}})};return{extendTableProps:e==null?void 0:e.table,setExtendTableCellComp:r}},Bl=({crudFormDialog:e})=>({crudFormDialogRef:p.useRef(null),crudFormProps:e});function Vl(e,{target:t=document.body}={}){const r=document.createElement("textarea"),n=document.activeElement;r.value=e,r.setAttribute("readonly",""),r.style.contain="strict",r.style.position="absolute",r.style.left="-9999px",r.style.fontSize="12pt";const o=document.getSelection();let s;o&&o.rangeCount>0&&(s=o.getRangeAt(0)),t.append(r),r.select(),r.selectionStart=0,r.selectionEnd=e.length;let a=!1;try{a=document.execCommand("copy")}catch(i){throw new Error(i)}return r.remove(),s&&o&&(o.removeAllRanges(),o.addRange(s)),n&&n.focus(),a}function Ul(){function e(t){try{return Vl(t)}catch{return!1}}return{copy:e}}const ut={"main-container":"_main-container_1yx5k_1",container__toolbar:"_container__toolbar_1yx5k_13",container__table:"_container__table_1yx5k_27",container__pagination:"_container__pagination_1yx5k_35"},Yl=p.forwardRef(({tableProps:e,searchFormRef:t,fullHeight:r},n)=>{const{columns:o}=Ml(e),s=p.useRef(null),{table:a,pagination:i,firstGetTableData:c,onPaginationChange:u,onAllChange:d,resetData:g,resetAllData:f,reloadData:v}=Ll(e,t),{rowSelection:h}=Nl(e,a),{divRef:y,scroll:w}=Wl(e,r),{getTopToolbarBindProps:F}=Hl(e,a),P=()=>{const{autoRequest:D,api:k,formatDataSource:W,autoPagination:q,columns:X,scroll:C,pagination:I,rowSelection:T,onChange:S,...E}=e.table;return E};return c(),p.useImperativeHandle(n,()=>({resetData:g,resetAllData:f,reloadData:v,...s.current})),m.jsxs("div",{className:r?ut["main-container"]:void 0,children:[m.jsx("div",{className:ut.container__toolbar,children:m.jsx(it,{...F()})}),m.jsx("div",{ref:y,className:r?ut.container__table:void 0,children:m.jsx(x.Table,{ref:s,...P(),loading:a.model.loading,columns:o,dataSource:a.model.dataSource,pagination:!1,rowSelection:h,scroll:w,onChange:d})}),i.show?m.jsx("div",{className:ut.container__pagination,children:m.jsx(x.Pagination,{disabled:a.model.loading,...i.model,onChange:u})}):null]})}),an={"xph-table-full-wrapper":"_xph-table-full-wrapper_mdv0g_1","full-wrapper__table":"_full-wrapper__table_mdv0g_13"},ql=(e,t)=>{const{tableProps:r}=Il(e),n=p.useRef(null),{searchFormRef:o,searchFormProps:s}=Tl(r),{crudFormDialogRef:a,crudFormProps:i}=Bl(r);let{fullHeight:c}=r.table;const{virtual:u}=r.table;return u&&(c=!0),p.useImperativeHandle(t,()=>({...n.current,...a.current})),m.jsxs("div",{className:c?an["xph-table-full-wrapper"]:void 0,children:[s?m.jsx("div",{children:m.jsx(wl,{ref:o,tableRef:n,...s})}):null,m.jsx("div",{className:c?an["full-wrapper__table"]:void 0,children:m.jsx(Yl,{ref:n,searchFormRef:o,fullHeight:c,tableProps:r})}),i?m.jsx(en,{ref:a,...i}):null]})},Gl=p.forwardRef(ql);A.XphActions=it,A.XphAuth=Na,A.XphCrudFormDialog=en,A.XphDialog=Kr,A.XphExtendCompPropsProvider=da,A.XphForm=It,A.XphPortal=Jr,A.XphTable=Gl,A.buildUUID=Gt,A.getValueByPath=Xt,A.getValuesByPathObj=mt,A.isChildrenColumnProps=rn,A.isComponentActionItemProps=kt,A.isComponentColumnProps=tn,A.isComponentFormItemProps=at,A.isRenderActionItemProps=Hr,A.isRenderFormItemProps=lt,A.useAsyncState=Ur,A.useXphExtendCompProps=Fe,A.useXphForm=el,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
|
|
30
|
+
<%s key={someKey} {...props} />`,Jt,Fe,Sc,Fe),Cn[Fe+Jt]=!0}}return c===n?vc(Z):bc(Z),Z}}function wc(c,v,T){return xn(c,v,T,!0)}function _c(c,v,T){return xn(c,v,T,!1)}var Cc=_c,xc=wc;Le.Fragment=n,Le.jsx=Cc,Le.jsxs=xc}()),Le}process.env.NODE_ENV==="production"?bt.exports=Tn():bt.exports=Pn();var y=bt.exports,rr=typeof global=="object"&&global&&global.Object===Object&&global,En=typeof self=="object"&&self&&self.Object===Object&&self,fe=rr||En||Function("return this")(),ve=fe.Symbol,nr=Object.prototype,jn=nr.hasOwnProperty,Fn=nr.toString,We=ve?ve.toStringTag:void 0;function Dn(e){var t=jn.call(e,We),r=e[We];try{e[We]=void 0;var n=!0}catch{}var o=Fn.call(e);return n&&(t?e[We]=r:delete e[We]),o}var An=Object.prototype,On=An.toString;function $n(e){return On.call(e)}var kn="[object Null]",Mn="[object Undefined]",or=ve?ve.toStringTag:void 0;function de(e){return e==null?e===void 0?Mn:kn:or&&or in Object(e)?Dn(e):$n(e)}function le(e){return e!=null&&typeof e=="object"}var Rn="[object Symbol]";function vt(e){return typeof e=="symbol"||le(e)&&de(e)==Rn}function zn(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var te=Array.isArray,In=1/0,sr=ve?ve.prototype:void 0,ir=sr?sr.toString:void 0;function ar(e){if(typeof e=="string")return e;if(te(e))return zn(e,ar)+"";if(vt(e))return ir?ir.call(e):"";var t=e+"";return t=="0"&&1/e==-In?"-0":t}function ie(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function lr(e){return e}var Ln="[object AsyncFunction]",Wn="[object Function]",Bn="[object GeneratorFunction]",Nn="[object Proxy]";function Q(e){if(!ie(e))return!1;var t=de(e);return t==Wn||t==Bn||t==Ln||t==Nn}var wt=fe["__core-js_shared__"],cr=function(){var e=/[^.]+$/.exec(wt&&wt.keys&&wt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Hn(e){return!!cr&&cr in e}var Vn=Function.prototype,Un=Vn.toString;function Ce(e){if(e!=null){try{return Un.call(e)}catch{}try{return e+""}catch{}}return""}var qn=/[\\^$.*+?()[\]{}|]/g,Yn=/^\[object .+?Constructor\]$/,Xn=Function.prototype,Gn=Object.prototype,Kn=Xn.toString,Jn=Gn.hasOwnProperty,Zn=RegExp("^"+Kn.call(Jn).replace(qn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Qn(e){if(!ie(e)||Hn(e))return!1;var t=Q(e)?Zn:Yn;return t.test(Ce(e))}function eo(e,t){return e==null?void 0:e[t]}function xe(e,t){var r=eo(e,t);return Qn(r)?r:void 0}var _t=xe(fe,"WeakMap"),ur=Object.create,to=function(){function e(){}return function(t){if(!ie(t))return{};if(ur)return ur(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function ro(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function no(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var oo=800,so=16,io=Date.now;function ao(e){var t=0,r=0;return function(){var n=io(),o=so-(n-r);if(r=n,o>0){if(++t>=oo)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function lo(e){return function(){return e}}var Ge=function(){try{var e=xe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),co=Ge?function(e,t){return Ge(e,"toString",{configurable:!0,enumerable:!1,value:lo(t),writable:!0})}:lr,uo=ao(co),fo=9007199254740991,po=/^(?:0|[1-9]\d*)$/;function Ct(e,t){var r=typeof e;return t=t??fo,!!t&&(r=="number"||r!="symbol"&&po.test(e))&&e>-1&&e%1==0&&e<t}function xt(e,t,r){t=="__proto__"&&Ge?Ge(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Be(e,t){return e===t||e!==e&&t!==t}var ho=Object.prototype,go=ho.hasOwnProperty;function fr(e,t,r){var n=e[t];(!(go.call(e,t)&&Be(n,r))||r===void 0&&!(t in e))&&xt(e,t,r)}function mo(e,t,r,n){var o=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var i=t[s],l=void 0;l===void 0&&(l=e[i]),o?xt(r,i,l):fr(r,i,l)}return r}var dr=Math.max;function yo(e,t,r){return t=dr(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,s=dr(n.length-t,0),a=Array(s);++o<s;)a[o]=n[t+o];o=-1;for(var i=Array(t+1);++o<t;)i[o]=n[o];return i[t]=r(a),ro(e,this,i)}}function bo(e,t){return uo(yo(e,t,lr),e+"")}var vo=9007199254740991;function pr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=vo}function Ke(e){return e!=null&&pr(e.length)&&!Q(e)}function wo(e,t,r){if(!ie(r))return!1;var n=typeof t;return(n=="number"?Ke(r)&&Ct(t,r.length):n=="string"&&t in r)?Be(r[t],e):!1}function _o(e){return bo(function(t,r){var n=-1,o=r.length,s=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(o--,s):void 0,a&&wo(r[0],r[1],a)&&(s=o<3?void 0:s,o=1),t=Object(t);++n<o;){var i=r[n];i&&e(t,i,n,s)}return t})}var Co=Object.prototype;function St(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Co;return e===r}function xo(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var So="[object Arguments]";function hr(e){return le(e)&&de(e)==So}var gr=Object.prototype,To=gr.hasOwnProperty,Po=gr.propertyIsEnumerable,Tt=hr(function(){return arguments}())?hr:function(e){return le(e)&&To.call(e,"callee")&&!Po.call(e,"callee")};function Eo(){return!1}var mr=typeof M=="object"&&M&&!M.nodeType&&M,yr=mr&&typeof module=="object"&&module&&!module.nodeType&&module,jo=yr&&yr.exports===mr,br=jo?fe.Buffer:void 0,Fo=br?br.isBuffer:void 0,Je=Fo||Eo,Do="[object Arguments]",Ao="[object Array]",Oo="[object Boolean]",$o="[object Date]",ko="[object Error]",Mo="[object Function]",Ro="[object Map]",zo="[object Number]",Io="[object Object]",Lo="[object RegExp]",Wo="[object Set]",Bo="[object String]",No="[object WeakMap]",Ho="[object ArrayBuffer]",Vo="[object DataView]",Uo="[object Float32Array]",qo="[object Float64Array]",Yo="[object Int8Array]",Xo="[object Int16Array]",Go="[object Int32Array]",Ko="[object Uint8Array]",Jo="[object Uint8ClampedArray]",Zo="[object Uint16Array]",Qo="[object Uint32Array]",Y={};Y[Uo]=Y[qo]=Y[Yo]=Y[Xo]=Y[Go]=Y[Ko]=Y[Jo]=Y[Zo]=Y[Qo]=!0,Y[Do]=Y[Ao]=Y[Ho]=Y[Oo]=Y[Vo]=Y[$o]=Y[ko]=Y[Mo]=Y[Ro]=Y[zo]=Y[Io]=Y[Lo]=Y[Wo]=Y[Bo]=Y[No]=!1;function es(e){return le(e)&&pr(e.length)&&!!Y[de(e)]}function ts(e){return function(t){return e(t)}}var vr=typeof M=="object"&&M&&!M.nodeType&&M,Ne=vr&&typeof module=="object"&&module&&!module.nodeType&&module,rs=Ne&&Ne.exports===vr,Pt=rs&&rr.process,wr=function(){try{var e=Ne&&Ne.require&&Ne.require("util").types;return e||Pt&&Pt.binding&&Pt.binding("util")}catch{}}(),_r=wr&&wr.isTypedArray,Et=_r?ts(_r):es,ns=Object.prototype,os=ns.hasOwnProperty;function Cr(e,t){var r=te(e),n=!r&&Tt(e),o=!r&&!n&&Je(e),s=!r&&!n&&!o&&Et(e),a=r||n||o||s,i=a?xo(e.length,String):[],l=i.length;for(var f in e)(t||os.call(e,f))&&!(a&&(f=="length"||o&&(f=="offset"||f=="parent")||s&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Ct(f,l)))&&i.push(f);return i}function xr(e,t){return function(r){return e(t(r))}}var ss=xr(Object.keys,Object),is=Object.prototype,as=is.hasOwnProperty;function ls(e){if(!St(e))return ss(e);var t=[];for(var r in Object(e))as.call(e,r)&&r!="constructor"&&t.push(r);return t}function cs(e){return Ke(e)?Cr(e):ls(e)}function us(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var fs=Object.prototype,ds=fs.hasOwnProperty;function ps(e){if(!ie(e))return us(e);var t=St(e),r=[];for(var n in e)n=="constructor"&&(t||!ds.call(e,n))||r.push(n);return r}function Sr(e){return Ke(e)?Cr(e,!0):ps(e)}var hs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gs=/^\w*$/;function ms(e,t){if(te(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||vt(e)?!0:gs.test(e)||!hs.test(e)||t!=null&&e in Object(t)}var He=xe(Object,"create");function ys(){this.__data__=He?He(null):{},this.size=0}function bs(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var vs="__lodash_hash_undefined__",ws=Object.prototype,_s=ws.hasOwnProperty;function Cs(e){var t=this.__data__;if(He){var r=t[e];return r===vs?void 0:r}return _s.call(t,e)?t[e]:void 0}var xs=Object.prototype,Ss=xs.hasOwnProperty;function Ts(e){var t=this.__data__;return He?t[e]!==void 0:Ss.call(t,e)}var Ps="__lodash_hash_undefined__";function Es(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=He&&t===void 0?Ps:t,this}function Se(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Se.prototype.clear=ys,Se.prototype.delete=bs,Se.prototype.get=Cs,Se.prototype.has=Ts,Se.prototype.set=Es;function js(){this.__data__=[],this.size=0}function Ze(e,t){for(var r=e.length;r--;)if(Be(e[r][0],t))return r;return-1}var Fs=Array.prototype,Ds=Fs.splice;function As(e){var t=this.__data__,r=Ze(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Ds.call(t,r,1),--this.size,!0}function Os(e){var t=this.__data__,r=Ze(t,e);return r<0?void 0:t[r][1]}function $s(e){return Ze(this.__data__,e)>-1}function ks(e,t){var r=this.__data__,n=Ze(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function he(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}he.prototype.clear=js,he.prototype.delete=As,he.prototype.get=Os,he.prototype.has=$s,he.prototype.set=ks;var Ve=xe(fe,"Map");function Ms(){this.size=0,this.__data__={hash:new Se,map:new(Ve||he),string:new Se}}function Rs(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Qe(e,t){var r=e.__data__;return Rs(t)?r[typeof t=="string"?"string":"hash"]:r.map}function zs(e){var t=Qe(this,e).delete(e);return this.size-=t?1:0,t}function Is(e){return Qe(this,e).get(e)}function Ls(e){return Qe(this,e).has(e)}function Ws(e,t){var r=Qe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function ge(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ge.prototype.clear=Ms,ge.prototype.delete=zs,ge.prototype.get=Is,ge.prototype.has=Ls,ge.prototype.set=Ws;var Bs="Expected a function";function jt(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Bs);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],s=r.cache;if(s.has(o))return s.get(o);var a=e.apply(this,n);return r.cache=s.set(o,a)||s,a};return r.cache=new(jt.Cache||ge),r}jt.Cache=ge;var Ns=500;function Hs(e){var t=jt(e,function(n){return r.size===Ns&&r.clear(),n}),r=t.cache;return t}var Vs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Us=/\\(\\)?/g,qs=Hs(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Vs,function(r,n,o,s){t.push(o?s.replace(Us,"$1"):n||r)}),t});function Ys(e){return e==null?"":ar(e)}function Xs(e,t){return te(e)?e:ms(e,t)?[e]:qs(Ys(e))}var Gs=1/0;function Ks(e){if(typeof e=="string"||vt(e))return e;var t=e+"";return t=="0"&&1/e==-Gs?"-0":t}function Js(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var Tr=xr(Object.getPrototypeOf,Object),Zs="[object Object]",Qs=Function.prototype,ei=Object.prototype,Pr=Qs.toString,ti=ei.hasOwnProperty,ri=Pr.call(Object);function ni(e){if(!le(e)||de(e)!=Zs)return!1;var t=Tr(e);if(t===null)return!0;var r=ti.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Pr.call(r)==ri}function oi(){this.__data__=new he,this.size=0}function si(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function ii(e){return this.__data__.get(e)}function ai(e){return this.__data__.has(e)}var li=200;function ci(e,t){var r=this.__data__;if(r instanceof he){var n=r.__data__;if(!Ve||n.length<li-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new ge(n)}return r.set(e,t),this.size=r.size,this}function me(e){var t=this.__data__=new he(e);this.size=t.size}me.prototype.clear=oi,me.prototype.delete=si,me.prototype.get=ii,me.prototype.has=ai,me.prototype.set=ci;var Er=typeof M=="object"&&M&&!M.nodeType&&M,jr=Er&&typeof module=="object"&&module&&!module.nodeType&&module,ui=jr&&jr.exports===Er,Fr=ui?fe.Buffer:void 0;Fr&&Fr.allocUnsafe;function fi(e,t){return e.slice()}function di(e,t){for(var r=-1,n=e==null?0:e.length,o=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[o++]=a)}return s}function pi(){return[]}var hi=Object.prototype,gi=hi.propertyIsEnumerable,Dr=Object.getOwnPropertySymbols,mi=Dr?function(e){return e==null?[]:(e=Object(e),di(Dr(e),function(t){return gi.call(e,t)}))}:pi;function yi(e,t,r){var n=t(e);return te(e)?n:Js(n,r(e))}function Ar(e){return yi(e,cs,mi)}var Ft=xe(fe,"DataView"),Dt=xe(fe,"Promise"),At=xe(fe,"Set"),Or="[object Map]",bi="[object Object]",$r="[object Promise]",kr="[object Set]",Mr="[object WeakMap]",Rr="[object DataView]",vi=Ce(Ft),wi=Ce(Ve),_i=Ce(Dt),Ci=Ce(At),xi=Ce(_t),we=de;(Ft&&we(new Ft(new ArrayBuffer(1)))!=Rr||Ve&&we(new Ve)!=Or||Dt&&we(Dt.resolve())!=$r||At&&we(new At)!=kr||_t&&we(new _t)!=Mr)&&(we=function(e){var t=de(e),r=t==bi?e.constructor:void 0,n=r?Ce(r):"";if(n)switch(n){case vi:return Rr;case wi:return Or;case _i:return $r;case Ci:return kr;case xi:return Mr}return t});var et=fe.Uint8Array;function Si(e){var t=new e.constructor(e.byteLength);return new et(t).set(new et(e)),t}function Ti(e,t){var r=Si(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}function Pi(e){return typeof e.constructor=="function"&&!St(e)?to(Tr(e)):{}}var Ei="__lodash_hash_undefined__";function ji(e){return this.__data__.set(e,Ei),this}function Fi(e){return this.__data__.has(e)}function tt(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new ge;++t<r;)this.add(e[t])}tt.prototype.add=tt.prototype.push=ji,tt.prototype.has=Fi;function Di(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Ai(e,t){return e.has(t)}var Oi=1,$i=2;function zr(e,t,r,n,o,s){var a=r&Oi,i=e.length,l=t.length;if(i!=l&&!(a&&l>i))return!1;var f=s.get(e),d=s.get(t);if(f&&d)return f==t&&d==e;var p=-1,u=!0,m=r&$i?new tt:void 0;for(s.set(e,t),s.set(t,e);++p<i;){var h=e[p],b=t[p];if(n)var _=a?n(b,h,p,t,e,s):n(h,b,p,e,t,s);if(_!==void 0){if(_)continue;u=!1;break}if(m){if(!Di(t,function(D,S){if(!Ai(m,S)&&(h===D||o(h,D,r,n,s)))return m.push(S)})){u=!1;break}}else if(!(h===b||o(h,b,r,n,s))){u=!1;break}}return s.delete(e),s.delete(t),u}function ki(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function Mi(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Ri=1,zi=2,Ii="[object Boolean]",Li="[object Date]",Wi="[object Error]",Bi="[object Map]",Ni="[object Number]",Hi="[object RegExp]",Vi="[object Set]",Ui="[object String]",qi="[object Symbol]",Yi="[object ArrayBuffer]",Xi="[object DataView]",Ir=ve?ve.prototype:void 0,Ot=Ir?Ir.valueOf:void 0;function Gi(e,t,r,n,o,s,a){switch(r){case Xi:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Yi:return!(e.byteLength!=t.byteLength||!s(new et(e),new et(t)));case Ii:case Li:case Ni:return Be(+e,+t);case Wi:return e.name==t.name&&e.message==t.message;case Hi:case Ui:return e==t+"";case Bi:var i=ki;case Vi:var l=n&Ri;if(i||(i=Mi),e.size!=t.size&&!l)return!1;var f=a.get(e);if(f)return f==t;n|=zi,a.set(e,t);var d=zr(i(e),i(t),n,o,s,a);return a.delete(e),d;case qi:if(Ot)return Ot.call(e)==Ot.call(t)}return!1}var Ki=1,Ji=Object.prototype,Zi=Ji.hasOwnProperty;function Qi(e,t,r,n,o,s){var a=r&Ki,i=Ar(e),l=i.length,f=Ar(t),d=f.length;if(l!=d&&!a)return!1;for(var p=l;p--;){var u=i[p];if(!(a?u in t:Zi.call(t,u)))return!1}var m=s.get(e),h=s.get(t);if(m&&h)return m==t&&h==e;var b=!0;s.set(e,t),s.set(t,e);for(var _=a;++p<l;){u=i[p];var D=e[u],S=t[u];if(n)var w=a?n(S,D,u,t,e,s):n(D,S,u,e,t,s);if(!(w===void 0?D===S||o(D,S,r,n,s):w)){b=!1;break}_||(_=u=="constructor")}if(b&&!_){var j=e.constructor,F=t.constructor;j!=F&&"constructor"in e&&"constructor"in t&&!(typeof j=="function"&&j instanceof j&&typeof F=="function"&&F instanceof F)&&(b=!1)}return s.delete(e),s.delete(t),b}var ea=1,Lr="[object Arguments]",Wr="[object Array]",rt="[object Object]",ta=Object.prototype,Br=ta.hasOwnProperty;function ra(e,t,r,n,o,s){var a=te(e),i=te(t),l=a?Wr:we(e),f=i?Wr:we(t);l=l==Lr?rt:l,f=f==Lr?rt:f;var d=l==rt,p=f==rt,u=l==f;if(u&&Je(e)){if(!Je(t))return!1;a=!0,d=!1}if(u&&!d)return s||(s=new me),a||Et(e)?zr(e,t,r,n,o,s):Gi(e,t,l,r,n,o,s);if(!(r&ea)){var m=d&&Br.call(e,"__wrapped__"),h=p&&Br.call(t,"__wrapped__");if(m||h){var b=m?e.value():e,_=h?t.value():t;return s||(s=new me),o(b,_,r,n,s)}}return u?(s||(s=new me),Qi(e,t,r,n,o,s)):!1}function Nr(e,t,r,n,o){return e===t?!0:e==null||t==null||!le(e)&&!le(t)?e!==e&&t!==t:ra(e,t,r,n,Nr,o)}function na(e){return function(t,r,n){for(var o=-1,s=Object(t),a=n(t),i=a.length;i--;){var l=a[++o];if(r(s[l],l,s)===!1)break}return t}}var oa=na();function $t(e,t,r){(r!==void 0&&!Be(e[t],r)||r===void 0&&!(t in e))&&xt(e,t,r)}function sa(e){return le(e)&&Ke(e)}function kt(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function ia(e){return mo(e,Sr(e))}function aa(e,t,r,n,o,s,a){var i=kt(e,r),l=kt(t,r),f=a.get(l);if(f){$t(e,r,f);return}var d=s?s(i,l,r+"",e,t,a):void 0,p=d===void 0;if(p){var u=te(l),m=!u&&Je(l),h=!u&&!m&&Et(l);d=l,u||m||h?te(i)?d=i:sa(i)?d=no(i):m?(p=!1,d=fi(l)):h?(p=!1,d=Ti(l)):d=[]:ni(l)||Tt(l)?(d=i,Tt(i)?d=ia(i):(!ie(i)||Q(i))&&(d=Pi(l))):p=!1}p&&(a.set(l,d),o(d,l,n,s,a),a.delete(l)),$t(e,r,d)}function Hr(e,t,r,n,o){e!==t&&oa(t,function(s,a){if(o||(o=new me),ie(s))aa(e,t,a,r,Hr,n,o);else{var i=n?n(kt(e,a),s,a+"",e,t,o):void 0;i===void 0&&(i=s),$t(e,a,i)}},Sr)}var la="[object String]";function Mt(e){return typeof e=="string"||!te(e)&&le(e)&&de(e)==la}var ca="[object Boolean]";function nt(e){return e===!0||e===!1||le(e)&&de(e)==ca}function ot(e,t){return Nr(e,t)}var ua="[object Number]";function fa(e){return typeof e=="number"||le(e)&&de(e)==ua}function Vr(e){return e==null}function da(e){return e===null}var ce=_o(function(e,t,r){Hr(e,t,r)});function pa(e,t,r,n){if(!ie(e))return e;t=Xs(t,e);for(var o=-1,s=t.length,a=s-1,i=e;i!=null&&++o<s;){var l=Ks(t[o]),f=r;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(o!=a){var d=i[l];f=void 0,f===void 0&&(f=ie(d)?d:Ct(t[o+1])?[]:{})}fr(i,l,f),i=i[l]}return e}function Ur(e,t,r){return e==null?e:pa(e,t,r)}function ha(e){const{inherit:t=!0}=e,{extendActionsProps:r,extendAuthProps:n}=Kr(),s={...ce(ce({items:[],max:10},t?r:{}),e)},a={...ce({auth:()=>!0},t?n:{})};return{actionsProps:s,authProps:a}}function Rt(e){return"component"in e}function qr(e){return"render"in e}function ga(e,t){const{type:r,disabled:n,items:o,max:s}=e,a=p=>{const{auth:u}=p;let m=!1;return u?te(u)?m=u.every(h=>t(h)):m=t(u):m=!0,m},i=p=>{let{ifShow:u=!0}=p;return u=u&&Q(u)?u():u,u&&a(p)},l=p=>{const{component:u,render:m,componentProps:h}=p;if(u)switch(u){case"Dropdown":{const{dropDownItems:b}=h;return!!b.length}default:return!0}return!!m},f=o.map(p=>{const u={...p};if(Rt(u)){const m=u.component;switch(u.componentProps={type:r,disabled:n,...u.componentProps},m){case"Dropdown":{u.componentProps.dropDownItems=(u.componentProps.dropDownItems||[]).filter(i);break}}}return u}).filter(i).filter(l),d=fa(s)&&s>=0;return{showActionItems:f.slice(0,d?s:f.length),ellipsisActionItems:f.slice(d?s:f.length)}}const ma=e=>{const{componentProps:t}=e,r=()=>{const{...n}=t;return n};return y.jsx(E.Button,{...r()})},ya=e=>{const{componentProps:t}=e,n=(()=>{const{dropDownItems:o,onClick:s,...a}=t;return a})();return y.jsx(E.Dropdown,{disabled:n.disabled,menu:{items:t==null?void 0:t.dropDownItems,onClick:t==null?void 0:t.onClick},trigger:["click"],children:y.jsx("div",{children:y.jsxs(E.Button,{...n,children:[n.children,y.jsx(ue.CaretDownOutlined,{})]})})})},st=new Map;st.set("Button",ma),st.set("Dropdown",ya);function Yr(){const{setExtendActionsComp:e}=Kr();return e(st),{renderContent:g.useCallback((r,n)=>{const o=Rt(r),s=qr(r);if(o){const a=st.get(r.component);return g.createElement(a,{...r,key:n})}return s?y.jsx("div",{children:r.render},n):null},[])}}const Xr=g.createContext({}),ba=e=>{const{extendProps:t,extendComp:r}=e.value;return y.jsx(Xr.Provider,{value:{extendProps:t,extendComp:r},children:e.children})},De=()=>g.useContext(Xr),Gr=e=>{const[t,r]=g.useState(e),n=g.useRef(null);return g.useEffect(()=>{n.current&&(n.current(),n.current=null)},[t]),[t,s=>new Promise((a,i)=>{r(l=>{const f=typeof s=="function"?s(l):s;return n.current=a,f})})]},Kr=()=>{const{extendProps:e,extendComp:t}=De(),r=n=>{const o=t==null?void 0:t.actions;o&&Object.keys(o).forEach(s=>{n.set(s,o[s])})};return{extendAuthProps:e==null?void 0:e.auth,extendActionsProps:e==null?void 0:e.actions,setExtendActionsComp:r}},{useToken:va}=E.theme,wa=({items:e,actionsProps:t})=>{const{type:r,disabled:n}=t,{renderContent:o}=Yr(),{token:s}=va(),a={backgroundColor:s.colorBgElevated,borderRadius:s.borderRadiusLG,boxShadow:s.boxShadowSecondary},i=()=>y.jsx("div",{style:a,children:y.jsx(E.Space,{style:{padding:8},children:e==null?void 0:e.map((l,f)=>o(l,f))})});return y.jsx(E.Dropdown,{disabled:n,menu:{items:[]},dropdownRender:i,trigger:["click"],children:y.jsxs(E.Button,{type:r,children:["更多",y.jsx(ue.CaretDownOutlined,{})]})})},it=e=>{const{actionsProps:t,authProps:r}=ha(e),{auth:n}=r,{showActionItems:o,ellipsisActionItems:s}=ga(t,n),{renderContent:a}=Yr();return t!=null&&t.render?t.render:y.jsxs(g.Fragment,{children:[o==null?void 0:o.map((i,l)=>a(i,l)),s!=null&&s.length?y.jsx(wa,{actionsProps:t,items:s}):null]})};function _a(e,t){const{okText:r,cancelText:n,onCancel:o,onOk:s,okProps:a,cancelProps:i}=e;return{footerActions:{disabled:t,max:2,items:[{component:"Button",componentProps:{...i,children:n,onClick:o}},{component:"Button",componentProps:{type:"primary",loading:t,...a,children:r,onClick:s}}]}}}const Ca=e=>{const{extendDialogProps:t}=xa(),r={width:700,okText:"确定",cancelText:"取消",getPopperContainer:()=>document.body};return{dialogProps:{...ce(ce(r,t),e)},baseDialogProps:r}},xa=()=>{const{extendProps:e}=De();return{extendDialogProps:e==null?void 0:e.dialog}},Sa=(e,t,r,n)=>{const{onOpen:o,onClose:s}=t;return{open:async()=>{e||(o&&o(),await r(!0))},close:()=>{r(!1),n(!1),s&&s()}}},Ta=({initWidth:e,initHeight:t,setDialogChangeRecord:r})=>{const[n,o]=g.useState(e.current),[s,a]=g.useState(t.current);return{dialogWidth:n,dialogHeight:s,setDialogSize:({width:l,height:f})=>{r({width:n,height:s}),l!==void 0&&o(l),f!==void 0&&a(f)}}},Pa=({initLeft:e,initTop:t,setDialogChangeRecord:r})=>{const[n,o]=g.useState(e.current),[s,a]=g.useState(t.current);return{dialogLeft:n,dialogTop:s,setDialogPosition:({left:l,top:f})=>{r({left:n,top:s}),l!==void 0&&o(l),f!==void 0&&a(f)}}},Jr=({containerSizeTarget:e,dialogHeaderRef:t,dialogRef:r,setDialogPosition:n})=>{const o=g.useRef(0),s=g.useRef(0),a=d=>{const p=d.getBoundingClientRect(),u=p.width,m=p.height,h=-.5*u,b=-.5*m;return{translateX:h,translateY:b}},i=g.useCallback(d=>{const{offsetLeft:p,offsetTop:u}=r.current;o.current=d.clientX-p,s.current=d.clientY-u,document.addEventListener("mousemove",l),document.addEventListener("mouseup",f)},[]),l=g.useCallback(d=>{const p=r.current,{translateX:u,translateY:m}=a(p);let h=d.clientX-o.current,b=d.clientY-s.current;const _=-u,D=-m,S=e.current.scrollWidth-p.offsetWidth-u,w=e.current.scrollHeight-p.offsetHeight-m;h<_&&(h=_),h>S&&(h=S),b<D&&(b=D),b>w&&(b=w),n({left:h,top:b})},[]),f=g.useCallback(()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",f)},[]);return g.useEffect(()=>{const d=t.current;return d.addEventListener("mousedown",i),()=>{d.removeEventListener("mousedown",i)}},[]),{}},Ea=({containerSizeTarget:e,dialogChangeRecord:t,close:r,setDialogSize:n,setDialogPosition:o})=>{const[s,a]=g.useState(!1),[i,l]=g.useState(!1);return{minimizeVisible:s,maximizeVisible:i,setMinimizeVisible:a,setMaximizeVisible:l,onMinimize:()=>{a(!0)},onMaximize:m=>{if(m==="minimize"&&a(!1),m==="maximize"){const{scrollWidth:h,scrollHeight:b}=e.current,_=Math.floor(h),D=Math.floor(b),S=Math.floor(h/2),w=Math.floor(b/2);n({width:_,height:D}),o({top:w,left:S}),l(!0)}},onRecovery:()=>{const{top:m,left:h,width:b,height:_}=t.current;n({width:b,height:_}),o({top:m,left:h}),l(!1)},onClose:()=>{a(!1),r()}}},ja=({visible:e,containerSizeTarget:t,dialogHeight:r,dialogRef:n,dialogHeaderRef:o,dialogFooterRef:s})=>{const{clientHeight:a,scrollHeight:i}=t.current,l=typeof r=="number"&&r>a?i:a,[f,d]=g.useState(0),[p,u]=g.useState("unset"),m=g.useCallback((h,b)=>{var z,R;const S=(z=o.current)==null?void 0:z.offsetHeight,w=(R=s.current)==null?void 0:R.offsetHeight;let j=h-S-w-0;const F=b-S-w-0;return j>F&&(j=F),j},[o,s]);return g.useEffect(()=>{var h;if(e&&f===l){const b=(h=n.current)==null?void 0:h.getBoundingClientRect().height;u(m(b,l)),d("unset")}},[e,f,l,n,m]),g.useEffect(()=>{e&&r!=="unset"&&r!==0&&(u(m(r,l)),d("unset"))},[e,r,l,m]),g.useEffect(()=>{e?d(l):(d(0),u("unset"))},[e,l]),{dialogMaxHeight:f,contentMaxHeight:p}},Fa=()=>{const[e,t]=g.useState(160),[r,n]=g.useState(60),o=g.useRef(null);return{minimizeTop:r,minimizeLeft:e,minimizeRef:o,setMinimizePosition:({left:a,top:i})=>{a!==void 0&&t(a),i!==void 0&&n(i)}}},Da=({visible:e,dialogRef:t,minimizeRef:r,container:n})=>{const o={xphDialog:"xph--dialog",xphDialogWrapper:"xph--dialog--wrapper",xphMinimizeDialog:"xph--dialog--minimize"},s=(i,l)=>{i.querySelector(`.${o.xphDialogWrapper}`).style.opacity="unset",i.querySelector(`.${o.xphMinimizeDialog}`).style.opacity="unset",l.querySelector(`.${o.xphDialogWrapper}`).style.opacity=.7,l.querySelector(`.${o.xphMinimizeDialog}`).style.opacity=.7;const f=document.createElement("div");f.style.visibility="hidden",l.parentNode.insertBefore(f,l.nextSibling),l.parentNode.insertBefore(i,f),l.parentNode.removeChild(f)},a=i=>{var d,p;const l=Array.from(n.querySelectorAll(`.${o.xphDialog}`)).filter(u=>(u==null?void 0:u.parentNode)===n),f=l[l.length-1];if(((d=t.current)==null?void 0:d.parentNode)!==f&&(s((p=t.current)==null?void 0:p.parentNode,f),i)){const u=i.target;u.tagName==="INPUT"&&u.focus&&u.focus()}};return g.useEffect(()=>{var i,l;return(i=t.current)==null||i.addEventListener("mousedown",a,!1),(l=r.current)==null||l.addEventListener("mousedown",a,!1),()=>{var f,d;(f=t.current)==null||f.removeEventListener("mousedown",a,!1),(d=r.current)==null||d.removeEventListener("mousedown",a,!1)}},[]),g.useEffect(()=>{if(e)a();else{const i=Array.from(n.querySelectorAll(`.${o.xphDialog}`)).filter(u=>(u==null?void 0:u.parentNode)===n),l=i.map(u=>u.querySelector(`.${o.xphDialogWrapper}`)).filter(u=>u!==null),f=i.map(u=>u.querySelector(`.${o.xphMinimizeDialog}`)).filter(u=>u!==null),d=l.filter(u=>u.style.display==="flex"),p=f.filter(u=>u.style.display==="flex");if(d.length){s(d[d.length-1].parentNode,i[i.length-1]);return}if(p.length){s(p[p.length-1].parentNode,i[i.length-1]);return}}},[e]),{dialogTopShowClassConfig:o}},Aa=({curPropsWidth:e,curPropsHeight:t,setParentInitRecord:r})=>{const n=g.useRef({width:e,height:t});g.useEffect(()=>{const o=n.current;n.current={width:e,height:t},(e!==o.width||t!==o.height)&&r(s=>s+1)},[e,t,r])},Oa=()=>{const e=g.useRef({left:0,top:0,width:0,height:0});return{dialogChangeRecord:e,setDialogChangeRecord:({left:r,top:n,width:o,height:s})=>{const{left:a,top:i,width:l,height:f}=e.current;e.current={left:r??a,top:n??i,width:o??l,height:s??f}}}},$a=({containerSizeTarget:e,dialogRef:t,minResizeRecord:r,setDialogSize:n,setDialogPosition:o,setMinResizeRecord:s})=>{const a=g.useCallback(()=>y.jsx("div",{ref:i,style:{position:"absolute",border:"4px dashed #ccc",display:"none",zIndex:999}}),[]),i=g.useRef(null),l=g.useRef(),f=g.useRef(!1),[d,p]=g.useState(!1),u=g.useRef(0),m=g.useRef(0),h=(C,O)=>{r.current||s({width:t.current.offsetWidth,height:t.current.offsetHeight}),f.current=!0,p(!0),l.current=O;const{clientX:P,clientY:x}=C;u.current=P,m.current=x;const A=parseFloat(t.current.style.left),k=parseFloat(t.current.style.top),L=t.current.offsetWidth,I=t.current.offsetHeight;i.current.style.display="block",i.current.style.left=`${A-.5*L}px`,i.current.style.top=`${k-.5*I}px`,i.current.style.width=`${L}px`,i.current.style.height=`${I}px`},b=C=>{if(f.current){const{clientX:O,clientY:P}=C,x=O-u.current,A=P-m.current,k=parseFloat(i.current.style.left),L=parseFloat(i.current.style.top),I=i.current.offsetWidth,G=i.current.offsetHeight,ne=r.current.width,oe=r.current.height,be=e.current.scrollWidth,pe=e.current.scrollHeight;let N=I,U=G,K=k,X=L;switch(l.current){case"lt":{N=N-x,U=U-A,X=X+A,K=K+x,N<ne&&(N=I,K=k),U<oe&&(U=G,X=L),K<0&&(K=0,N=I),X<0&&(X=0,U=G);break}case"rt":{N=N+x,U=U-A,X=X+A,K=k,N<ne&&(N=I),U<oe&&(U=G,X=L),N>be-K&&(N=be-K),X<0&&(X=0,U=G);break}case"rb":{N=N+x,U=U+A,X=L,K=k,N<ne&&(N=I),U<oe&&(U=G),N>be-K&&(N=be-K),U>pe-X&&(U=pe-X);break}case"lb":{N=N-x,U=U+A,X=L,K=K+x,N<ne&&(N=I,K=k),U<oe&&(U=G),K<0&&(K=0,N=I),U>pe-X&&(U=pe-X);break}}i.current.style.left=`${K}px`,i.current.style.top=`${X}px`,i.current.style.width=`${N}px`,i.current.style.height=`${U}px`,u.current=O,m.current=P}},_=()=>{if(f.current){f.current=!1,p(!1),i.current.style.display="none";const{left:C,top:O,width:P,height:x}=i.current.style,A=parseFloat(C)+.5*parseFloat(P),k=parseFloat(O)+.5*parseFloat(x),L=parseFloat(P),I=parseFloat(x);o({left:A,top:k}),n({width:L,height:I})}},D=C=>h(C,"lt"),S=C=>h(C,"rt"),w=C=>h(C,"rb"),j=C=>h(C,"lb"),F=g.useCallback(C=>{b(C)},[]),z=g.useCallback(()=>{_()},[]),R=g.useCallback(()=>{_()},[]);return g.useEffect(()=>(document.body.addEventListener("mousemove",F),document.body.addEventListener("mouseup",z),document.body.addEventListener("mouseleave",R),()=>{document.body.removeEventListener("mousemove",F),document.body.removeEventListener("mouseup",z),document.body.removeEventListener("mouseleave",R)}),[]),{resizingState:d,DashedBox:a,onMousedownResizeLt:D,onMousedownResizeRt:S,onMousedownResizeRb:w,onMousedownResizeLb:j}},ka=({container:e,dialogProps:t,baseDialogProps:r})=>{const[n,o]=g.useState(0),{containerSizeTarget:s,setContainerSizeTarget:a}=Ra({container:e,mask:t.mask});g.useEffect(()=>{const R=()=>{const O=s.current;a();const P=s.current;O.clientWidth===P.clientWidth&&O.clientHeight===P.clientHeight||o(x=>x+1)};a(),o(O=>O+1),window.addEventListener("resize",R);const C=typeof ResizeObserver>"u"?void 0:new ResizeObserver(R);return C==null||C.observe(e===document.body?document.documentElement:e),()=>{window.removeEventListener("resize",R),C==null||C.disconnect()}},[e,t.mask,s,a]);const{width:i,height:l}=r,{width:f,height:d}=t,p=f||i,u=d||l,{clientWidth:m,clientHeight:h}=s.current,b=p?p>m?m:p:0,_=u?u>h?h:u:"unset",D=g.useRef(b),S=g.useRef(_),w=R=>{D.current=R.width,S.current=R.height},j=g.useRef(Math.floor(m/2)),F=g.useRef(Math.floor(h/2)),z=R=>{j.current=R.left,F.current=R.top};return g.useEffect(()=>{w({width:b,height:_}),z({left:Math.floor(m/2),top:Math.floor(h/2)})},[n,m,h,b,_]),{containerSizeTarget:s,parentInitRecord:n,initLeft:j,initTop:F,initWidth:D,initHeight:S,curPropsWidth:b,curPropsHeight:_,setInitPosition:z,setInitSize:w,setParentInitRecord:o}},Ma=()=>{const e=g.useRef(null);return{minResizeRecord:e,setMinResizeRecord:r=>{e.current=r}}},Ra=({container:e,mask:t})=>{const r=e===document.body,n=g.useCallback(()=>{const a=r?t?document.documentElement.clientWidth:window.innerWidth:e.clientWidth,i=r?t?document.documentElement.clientHeight:window.innerHeight:e.clientHeight;return{clientWidth:a,clientHeight:i,scrollWidth:t||r?a:e.scrollWidth,scrollHeight:t||r?i:e.scrollHeight}},[e,r,t]),o=g.useRef(n()),s=g.useCallback(()=>{o.current=n()},[n]);return{containerSizeTarget:o,setContainerSizeTarget:s}},zt={"minimize-windows":"_minimize-windows_ith81_1","minimize-windows-title":"_minimize-windows-title_ith81_45","minimize-windows-operate":"_minimize-windows-operate_ith81_57"},za=({onClick:e})=>y.jsx(E.Button,{type:"link",onClick:e,icon:y.jsx(ue.ShrinkOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),Zr=({onClick:e})=>y.jsx(E.Button,{type:"link",onClick:e,icon:y.jsx(ue.FullscreenOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),Ia=({onClick:e})=>y.jsx(E.Button,{type:"link",onClick:e,icon:y.jsx(ue.FullscreenExitOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),Qr=({onClick:e,disabled:t})=>y.jsx(E.Button,{type:"link",onClick:e,disabled:t,icon:y.jsx(ue.CloseOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),{useToken:La}=E.theme,Wa=g.forwardRef(({title:e,left:t,top:r,visible:n,loading:o,onMaximize:s,onClosesquare:a,className:i},l)=>{const{token:f}=La(),d={borderRadius:f.borderRadiusLG};return y.jsxs("div",{style:{display:n?"flex":"none",left:t,top:r,...d},className:`${zt["minimize-windows"]} ${i}`,ref:l,children:[y.jsx("div",{className:zt["minimize-windows-title"],title:e,children:e}),y.jsxs("div",{className:zt["minimize-windows-operate"],children:[y.jsx(Zr,{onClick:s}),y.jsx(Qr,{onClick:a,disabled:o})]})]})}),re={"xph-dialog-mask":"_xph-dialog-mask_ntfnq_1","xph-dialog-wrapper":"_xph-dialog-wrapper_ntfnq_19",dialog__header:"_dialog__header_ntfnq_43","dialog__header-btns":"_dialog__header-btns_ntfnq_61",dialog__main:"_dialog__main_ntfnq_69",dialog__footer:"_dialog__footer_ntfnq_83",dialog__resize:"_dialog__resize_ntfnq_97","dialog__resize-lt":"_dialog__resize-lt_ntfnq_111","dialog__resize-rt":"_dialog__resize-rt_ntfnq_123","dialog__resize-rb":"_dialog__resize-rb_ntfnq_135","dialog__resize-lb":"_dialog__resize-lb_ntfnq_147"},Ba=".xph--dialog--wrapper, .xph--dialog--minimize",Na=[".ant-select-dropdown",".ant-picker-dropdown",".ant-dropdown",".ant-cascader-dropdown",".ant-tree-select-dropdown",".ant-popover",".ant-mentions-dropdown",".ant-table-filter-dropdown",'[role="listbox"]','[role="menu"]','[role="tree"]','[role="dialog"]'].join(","),en=e=>e instanceof Element?e:e instanceof Node?e.parentElement:null;function Ha(e){const r=e===document.body?document:e;let n;const o=(p,u,m)=>{const h=en(p);if(!h||!e.contains(h))return!1;const b=h.closest(Ba)||h.closest(Na);if(!b||!e.contains(b))return!1;const _=Math.abs(u)>Math.abs(m),D=_?u:m;if(!D)return!0;for(let S=h;S&&S!==e;S=S.parentElement){const w=window.getComputedStyle(S),j=_?w.overflowX:w.overflowY;if(!/^(auto|scroll|overlay)$/.test(j))continue;const F=_?S.scrollWidth-S.clientWidth:S.scrollHeight-S.clientHeight;if(F<=0)continue;const z=_?S.scrollLeft:S.scrollTop;if(_&&w.direction==="rtl"){if(D>0?z<-.5:z>-F+.5)return!0}else if(D>0?z<F-.5:z>.5)return!0}return!1},s=p=>{p.cancelable&&p.preventDefault()},a=p=>{if(p.ctrlKey||p.defaultPrevented)return;const u=p.shiftKey&&!p.deltaX,m=u?p.deltaY:p.deltaX,h=u?0:p.deltaY;!m&&!h||o(p.target,m,h)||s(p)},i=p=>{const u=p.touches.length===1?p.touches[0]:void 0;n=u?{x:u.clientX,y:u.clientY}:void 0},l=p=>{var _,D;if(p.touches.length!==1){n=void 0;return}const u=p.touches[0],m=n;if(n={x:u.clientX,y:u.clientY},!m||p.defaultPrevented||(((D=(_=e.ownerDocument.defaultView)==null?void 0:_.visualViewport)==null?void 0:D.scale)??1)>1)return;const h=m.x-u.clientX,b=m.y-u.clientY;!h&&!b||o(p.target,h,b)||s(p)},f=()=>{n=void 0},d=p=>{if(p.defaultPrevented||p.altKey||p.metaKey)return;const u=en(p.target);if(u!=null&&u.closest("input, textarea, select")||u instanceof HTMLElement&&u.isContentEditable)return;let m=0,h=0;switch(p.key){case"ArrowLeft":m=-1;break;case"ArrowRight":m=1;break;case"ArrowUp":case"PageUp":case"Home":h=-1;break;case"ArrowDown":case"PageDown":case"End":h=1;break;case" ":case"Spacebar":if(u!=null&&u.closest('button, [role="button"]'))return;h=p.shiftKey?-1:1;break;default:return}o(p.target,m,h)||s(p)};return e.addEventListener("wheel",a,{passive:!1}),e.addEventListener("touchstart",i,{passive:!0}),e.addEventListener("touchmove",l,{passive:!1}),e.addEventListener("touchend",f,{passive:!0}),e.addEventListener("touchcancel",f,{passive:!0}),r.addEventListener("keydown",d),()=>{e.removeEventListener("wheel",a),e.removeEventListener("touchstart",i),e.removeEventListener("touchmove",l),e.removeEventListener("touchend",f),e.removeEventListener("touchcancel",f),r.removeEventListener("keydown",d),n=void 0}}const It=new WeakMap,Va=(e,t)=>{var S;const r=e.ownerDocument,n=e===r.body,o=[],s=[t];let a=!1;if(n&&t!==r.body){const w=getComputedStyle(r.body);if(/auto|scroll|overlay/.test(`${w.overflowX} ${w.overflowY}`)){const j=getComputedStyle(r.documentElement);a=j.overflowX==="visible"&&j.overflowY==="visible"&&j.contain==="none"&&w.contain==="none",a||s.push(r.body)}}const i=s.map(w=>({element:w,left:w.scrollLeft,top:w.scrollTop})),l=(w,j,F)=>{o.push({element:w,property:j,value:w.style.getPropertyValue(j),priority:w.style.getPropertyPriority(j),appliedValue:F}),w.style.setProperty(j,F,"important")},f=getComputedStyle(t);(n?r.defaultView.innerWidth-t.clientWidth:t.offsetWidth-t.clientWidth-parseFloat(f.borderLeftWidth||"0")-parseFloat(f.borderRightWidth||"0"))>0&&!f.getPropertyValue("scrollbar-gutter").includes("stable")&&"scrollbarGutter"in t.style&&l(t,"scrollbar-gutter","stable"),a&&(l(r.body,"overflow-x","visible"),l(r.body,"overflow-y","visible"));const p=(S=r.defaultView)==null?void 0:S.visualViewport,u=()=>((p==null?void 0:p.scale)??1)>1?"auto":"none";s.forEach(w=>{l(w,"overflow-x","hidden"),l(w,"overflow-y","hidden"),l(w,"overscroll-behavior-x",u()),l(w,"overscroll-behavior-y",u()),l(w,"scroll-behavior","auto")});const m=o.filter(w=>w.property.startsWith("overscroll-behavior-")),h=()=>{const w=u();m.forEach(j=>{const{element:F,property:z,appliedValue:R}=j;F.style.getPropertyValue(z)!==R||F.style.getPropertyPriority(z)!=="important"||(F.style.setProperty(z,w,"important"),j.appliedValue=w)})};p==null||p.addEventListener("resize",h);const b=()=>{i.forEach(({element:w,left:j,top:F})=>{const z=Math.max(0,w.scrollWidth-w.clientWidth),R=Math.max(0,w.scrollHeight-w.clientHeight),C=Math.max(-z,Math.min(j,z)),O=Math.max(0,Math.min(F,R));w.scrollLeft!==C&&(w.scrollLeft=C),w.scrollTop!==O&&(w.scrollTop=O)})};b();const _=new Set(s);n&&_.add(r),_.forEach(w=>{w.addEventListener("scroll",b,{passive:!0})});const D=Ha(e);return()=>{p==null||p.removeEventListener("resize",h),D(),_.forEach(F=>{F.removeEventListener("scroll",b)});const w=F=>{const{element:z,property:R,value:C,priority:O,appliedValue:P}=F;z.style.getPropertyValue(R)!==P||z.style.getPropertyPriority(R)!=="important"||(C?z.style.setProperty(R,C,O):z.style.removeProperty(R))},j=o.reverse();j.filter(F=>F.property!=="scroll-behavior").forEach(w),b(),j.filter(F=>F.property==="scroll-behavior").forEach(w)}},Ua=e=>{const t=e.ownerDocument,r=e===t.body?t.scrollingElement||t.documentElement:e;let n=It.get(r);n?n.count+=1:(n={count:1,release:Va(e,r)},It.set(r,n));const o=n;return()=>{o.count-=1,!o.count&&(It.delete(r),o.release())}},qa=({container:e,mask:t,visible:r})=>{g.useLayoutEffect(()=>{if(!(!t||!r))return Ua(e)},[e,t,r])},Lt=new WeakMap,Ya=e=>{let t=Lt.get(e);if(t)t.count+=1;else{if(window.getComputedStyle(e).position!=="static")return()=>{};t={count:1,originalPosition:e.style.getPropertyValue("position"),originalPriority:e.style.getPropertyPriority("position"),appliedPriority:""},e.style.setProperty("position","relative",t.originalPriority),window.getComputedStyle(e).position==="static"&&e.style.setProperty("position","relative","important"),t.appliedPriority=e.style.getPropertyPriority("position"),Lt.set(e,t)}const r=t;return()=>{r.count-=1,!(r.count>0)&&(Lt.delete(e),!(e.style.getPropertyValue("position")!=="relative"||e.style.getPropertyPriority("position")!==r.appliedPriority)&&(r.originalPosition?e.style.setProperty("position",r.originalPosition,r.originalPriority):e.style.removeProperty("position")))}},tn=e=>({left:e.scrollLeft,top:e.scrollTop,width:e.clientWidth,height:e.clientHeight}),Xa=({container:e,mask:t,visible:r})=>{const n=e===document.body,[o,s]=g.useState(()=>tn(e));return g.useLayoutEffect(()=>{if(!n)return Ya(e)},[e,n]),qa({container:e,mask:t,visible:r}),g.useLayoutEffect(()=>{if(!t||n)return;const i=()=>{const f=tn(e);s(d=>d.left===f.left&&d.top===f.top&&d.width===f.width&&d.height===f.height?d:f)};i(),e.addEventListener("scroll",i,{passive:!0});const l=typeof ResizeObserver>"u"?void 0:new ResizeObserver(i);return l==null||l.observe(e),l||window.addEventListener("resize",i),()=>{e.removeEventListener("scroll",i),l==null||l.disconnect(),l||window.removeEventListener("resize",i)}},[e,n,t,r]),{layerStyle:t?{position:n?"fixed":"absolute",...n?{inset:0}:o,zIndex:999,pointerEvents:"none",display:r?void 0:"none"}:void 0}},{useToken:Ga}=E.theme,Ka=g.forwardRef((e,t)=>{const{token:r}=Ga(),n={borderRadius:r.borderRadiusLG},{children:o,baseDialogProps:s,mask:a,title:i,renderFooter:l,renderTitle:f,getPopperContainer:d}=e,p=d(),[u,m]=Gr(!1),[h,b]=g.useState(!1),{layerStyle:_}=Xa({container:p,mask:a,visible:u}),{open:D,close:S}=Sa(u,e,m,b),{footerActions:w}=_a(e,h),j=g.useRef(null),F=g.useRef(null),z=g.useRef(null),R=g.useRef(null),{containerSizeTarget:C,parentInitRecord:O,initLeft:P,initTop:x,initWidth:A,initHeight:k,curPropsWidth:L,curPropsHeight:I,setParentInitRecord:G}=ka({container:p,dialogProps:e,baseDialogProps:s}),{dialogChangeRecord:ne,setDialogChangeRecord:oe}=Oa(),{dialogWidth:be,dialogHeight:pe,setDialogSize:N}=Ta({initWidth:A,initHeight:k,setDialogChangeRecord:oe}),{dialogLeft:U,dialogTop:K,setDialogPosition:X}=Pa({initTop:x,initLeft:P,setDialogChangeRecord:oe}),{minResizeRecord:Bt,setMinResizeRecord:Ae}=Ma(),{minimizeLeft:qe,minimizeTop:Oe,minimizeRef:_e,setMinimizePosition:Te}=Fa(),{minimizeVisible:Ye,maximizeVisible:ft,setMaximizeVisible:Nt,onMaximize:dt,onMinimize:$e,onRecovery:Pe,onClose:ke}=Ea({containerSizeTarget:C,dialogChangeRecord:ne,close:S,setDialogSize:N,setDialogPosition:X}),{dialogMaxHeight:pt,contentMaxHeight:Me}=ja({visible:u&&!Ye,containerSizeTarget:C,dialogHeight:pe,dialogRef:j,dialogHeaderRef:F,dialogFooterRef:R}),Ht=()=>{N({width:A.current,height:k.current}),X({left:P.current,top:x.current}),Te({left:160,top:60}),Nt(!1),Ae(null)};g.useEffect(()=>{Ht()},[O]),Aa({curPropsWidth:L,curPropsHeight:I,setParentInitRecord:G}),Jr({containerSizeTarget:C,dialogHeaderRef:F,dialogRef:j,setDialogPosition:X}),Jr({containerSizeTarget:C,dialogHeaderRef:_e,dialogRef:_e,setDialogPosition:Te});const{dialogTopShowClassConfig:Ee}=Da({visible:u,container:p,dialogRef:j,minimizeRef:_e}),{resizingState:Vt,DashedBox:Ut,onMousedownResizeLt:ht,onMousedownResizeRt:gt,onMousedownResizeRb:je,onMousedownResizeLb:qt}=$a({containerSizeTarget:C,dialogRef:j,minResizeRecord:Bt,setDialogSize:N,setDialogPosition:X,setMinResizeRecord:Ae});return g.useImperativeHandle(t,()=>({open:D,close:ke,setLoading:b,getVisible:()=>u})),y.jsxs("div",{className:Ee.xphDialog,style:_,children:[a&&u?y.jsx("div",{className:re["xph-dialog-mask"]}):null,y.jsx(Wa,{visible:Ye,className:`${Ee.xphMinimizeDialog}`,loading:h,ref:_e,left:qe,top:Oe,title:i,onMaximize:()=>dt("minimize"),onClosesquare:ke}),y.jsxs("div",{ref:j,className:`${re["xph-dialog-wrapper"]} ${Ee.xphDialogWrapper}`,style:{display:u&&!Ye?"flex":"none",left:U,top:K,width:be,height:pe,maxHeight:pt,opacity:Vt?.2:"unset",...n},children:[y.jsxs("div",{ref:F,className:re.dialog__header,children:[y.jsx("div",{children:f?f():i}),y.jsxs("div",{className:re["dialog__header-btns"],children:[y.jsx(za,{onClick:$e}),ft?y.jsx(Ia,{onClick:Pe}):y.jsx(Zr,{onClick:()=>dt("maximize")}),y.jsx(Qr,{onClick:ke,disabled:h})]})]}),y.jsx("div",{ref:z,className:re.dialog__main,style:{maxHeight:Me,overscrollBehavior:a?"contain":void 0},children:y.jsx(E.Spin,{spinning:h,children:u?o:null})}),l?y.jsx("div",{ref:R,children:l({loading:h})}):y.jsx("div",{ref:R,className:re.dialog__footer,children:y.jsx(it,{...w})}),y.jsx("div",{className:`${re.dialog__resize} ${re["dialog__resize-lt"]}`,onMouseDown:ht}),y.jsx("div",{className:`${re.dialog__resize} ${re["dialog__resize-rt"]}`,onMouseDown:gt}),y.jsx("div",{className:`${re.dialog__resize} ${re["dialog__resize-rb"]}`,onMouseDown:je}),y.jsx("div",{className:`${re.dialog__resize} ${re["dialog__resize-lb"]}`,onMouseDown:qt})]}),y.jsx(Ut,{})]})}),Ja=(e,t)=>{const{children:r,...n}=e,{baseDialogProps:o,dialogProps:s}=Ca(n),{getPopperContainer:a}=s;return y.jsx(nn,{getPopperContainer:a,children:y.jsx(Ka,{...s,baseDialogProps:o,ref:t,children:r})})},rn=g.forwardRef(Ja),nn=({children:e,getPopperContainer:t})=>{const[r,n]=g.useState(null);return g.useEffect(()=>{const o=t();n(o)},[]),r?Sn.createPortal(e,r):null};function Za(e){const{extendAuthProps:t}=Qa();return{authProps:{...ce(ce({auth:o=>!1},t),e)}}}const Qa=()=>{const{extendProps:e}=De();return{extendAuthProps:e==null?void 0:e.auth}},el=e=>{const{children:t,...r}=e,{authProps:n}=Za(r),{auth:o,authCode:s}=n;return(()=>{let i=!1;return s&&o&&(te(s)?i=s.every(l=>o(l)):i=o(s)),i})()?t:null};function at(e){return"component"in e}function lt(e){return"render"in e}function tl(e){return e.includes("Input")||e.includes("Complete")?"请输入":e.includes("Picker")||e.includes("Select")||e.includes("Cascader")||e.includes("Checkbox")||e.includes("Radio")||e.includes("Switch")?"请选择":""}function rl(e,t,r){["DatePicker","MonthPicker","WeekPicker","TimePicker"].includes(t)?e.type=r?"string":"object":["RangePicker","Upload","CheckboxGroup","TimePicker"].includes(t)?e.type="array":["InputNumber"].includes(t)&&(e.type="number")}const nl=["DatePicker","MonthPicker","RangePicker","WeekPicker","TimePicker"],ol=e=>{const{show:t,ifShow:r,required:n,disabled:o,componentProps:s}=e;return!!(Q(t)||Q(r)||Q(n)||Q(o)||Q(s)||lt(e))},sl=e=>["application/json","application/javascript","text/plain","text/html","text/css"].includes(e)?`${e}; charset=utf-8`:e,il=(e,t,r)=>{const n=g.useRef(null),o=g.useRef(null),{handleCollapseChangeFalse:s}=r.current||{},{show:a,ifShow:i}=e;let l=!0,f=!0;if(nt(a)&&(l=a),nt(i)&&(f=i),Q(a)){l=a({model:t});const d=Vr(n.current)?l:n.current;g.useEffect(()=>{ot(l,d)||s&&s()},[t])}if(Q(i)){f=i({model:t});const d=Vr(o.current)?f:o.current;g.useEffect(()=>{ot(f,d)||s&&s()},[t])}return n.current=l,o.current=f,{isShow:l,isIfShow:f}},al=(e,t)=>{const{collapsible:r,collapseNum:n}=e,[o,s]=g.useState(!!(r&&t>=n));return{itemCollapse:o,setItemCollapse:s}},ll=({item:e,model:t,isShow:r,componentProps:n})=>{const{rules:o=[],label:s,required:a}=e;let i=o;const l=at(e),f=l?tl(e.component)+s:"";function d(h,b){const _=h.message||f;return b===void 0||da(b)||Array.isArray(b)&&b.length===0||typeof b=="string"&&b.trim()===""||typeof b=="object"&&Reflect.has(b,"checked")&&Reflect.has(b,"halfChecked")&&Array.isArray(b.checked)&&Array.isArray(b.halfChecked)&&b.checked.length===0&&b.halfChecked.length===0?Promise.reject(_):Promise.resolve()}const p=Q(a)?a({model:t}):a;p&&(!i||i.length===0?i=[{required:p,validator:d}]:i.findIndex(b=>Reflect.has(b,"required"))===-1&&i.push({required:p,validator:d}));const u=i.findIndex(h=>Reflect.has(h,"required")&&!Reflect.has(h,"validator"));if(u!==-1){const h=i[u];if(r||(h.required=!1),l){const{component:b}=e;Reflect.has(h,"type")||(h.type=b==="InputNumber"?"number":"string"),h.message=h.message||f,(b.includes("Input")||b.includes("Textarea"))&&(h.whitespace=!0);const _=n.valueFormat;rl(h,b,_)}}const m=i.findIndex(h=>h.max);return m!==-1&&!i[m].validator&&(i[m].message=i[m].message||`字符数应小于${i[m].max}位`),{rules:i}},cl=(e,t,r)=>{const{disabled:n}=e;let o=!1;const{disabled:s}=t;return Q(s)&&(o=s({model:r})),nt(s)&&(o=s),{disabled:Reflect.has(t,"disabled")?o:n}},ul=(e,t)=>{const r={},{componentProps:n={}}=e;return Q(n)&&Object.assign(r,n({model:t})),Object.assign(r,n),{componentProps:r}},fl=(e,t)=>{const{colProps:r={}}=e,{colProps:n={span:24}}=t;return{colProps:{...n,...r}}},dl=({formProps:e})=>{const{items:t}=e;return{formItems:t.map(n=>({...n}))}},pl=(e,t)=>{const r=i=>(Object.keys(i).forEach(l=>{Object.defineProperty(i,l,{value:i[l],writable:!1,enumerable:!0,configurable:!1})}),i),n={};e.items.forEach(i=>{n[i.name]=i.initialValue});const o=ol(t),s=o?E.Form.useWatch(i=>r(i)):null;return{rewritingModel:g.useMemo(()=>s||r(n),[s]),isusewatch:o}},hl=()=>{const e=g.useRef(null);function t(n){e.current=n}const r={getFieldsValue:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.getFieldsValue(...n)},setFieldsValue:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.setFieldsValue(...n)},resetFields:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.resetFields(...n)},validator:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.validator(...n)},scrollToField:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.scrollToField(...n)}};return g.useEffect(()=>()=>{e.current=null},[]),[t,r]};function gl(e,t={}){const r=/^\[(.+)\]$/;if(r.test(e)){const n=e.match(r);if(n&&n[1]){const o=n[1].split(",");if(!o.length)return;const s=[];return o.forEach((a,i)=>{Ur(s,i,t[a.trim()])}),s.filter(Boolean).length?s:void 0}}}function ml(e,t={}){const r=/^\{(.+)\}$/;if(r.test(e)){const n=e.match(r);if(n&&n[1]){const o=n[1].split(",");if(!o.length)return;const s={};return o.forEach(a=>{Ur(s,a.trim(),t[a.trim()])}),Object.values(s).filter(Boolean).length?s:void 0}}}function yl(e,t){const r=t.fieldMapToTime;if(!r||!Array.isArray(r))return e;for(const[n,[o,s],a="YYYY-MM-DD"]of r){if(!n||!o||!s)continue;if(!e[n]){Reflect.deleteProperty(e,n);continue}const[i,l]=e[n],[f,d]=Array.isArray(a)?a:[a,a];e[o]=Xe(i).format(f),e[s]=Xe(l).format(d),Reflect.deleteProperty(e,n)}return e}const bl=(e,t,r)=>{const n=e.filter(a=>a.name);return{handleFormatRenderValues:a=>{const i={},l=[];return n.forEach(f=>{const d=Reflect.has(a,f.name),p=gl(f.name,a)||ml(f.name,a);if(d||p){const u=p||a[f.name];if(at(f))if(nl.includes(f.component)){if(te(u)){const m=[];for(const h of u)m.push(h?Xe(h):null);i[f.name]=m}else i[f.name]=u?Xe(u):null;l.push(f.name)}else i[f.name]=u,l.push(f.name);lt(f)&&(i[f.name]=u,l.push(f.name))}}),{renderValues:i,validKeys:l}},handleFormatReturnValues:a=>{var l,f,d,p,u;if(!ie(a))return{};const i={};for(const m of Object.entries(a)){let[,h]=m;const[b]=m;if(!b||Q(h))continue;const{transformDateFunc:_}=t,D=(d=(f=(l=r.current)==null?void 0:l.get(b))==null?void 0:f.current)==null?void 0:d.componentProps,S=D==null?void 0:D.valueFormat;if(ie(h)){const w=h;w.format&&(h=_==null?void 0:_(w,S))}te(h)&&((p=h[0])!=null&&p.format)&&((u=h[1])!=null&&u.format)&&(h=h.map(w=>_==null?void 0:_(w,S))),Mt(h)&&(h===""?h=void 0:h=h.trim()),i[b]=h}return yl(i,t)}}},vl=(e,t,r)=>({getFieldsValue:(...l)=>r(e.getFieldsValue(...l)),setFieldsValue:l=>{const{renderValues:f,validKeys:d}=t(l);e.setFieldsValue(f),e.validateFields(d)},resetFields:async()=>e.resetFields(),validator:async l=>e.validateFields(l).then(f=>r(f)),scrollToField:async(l,f)=>e.scrollToField(l,f)}),wl=e=>{const{extendFormProps:t}=on();return{formProps:{...ce(ce({collapseNum:5,colon:!1,items:[],labelWrap:!0,transformDateFunc:(o,s)=>{var a;return((a=o==null?void 0:o.format)==null?void 0:a.call(o,s||"YYYY-MM-DD HH:mm:ss"))??o},fieldMapToTime:[]},t),e)}}},ct=e=>{const{immediate:t=!0,params:r,api:n,apiCallback:o,isUseWatch:s}=e,a=g.useRef(!0),i=g.useRef(r),l=()=>{n&&Q(n)&&(r?n(r).then(o):n().then(o),i.current=r)};return g.useEffect(()=>{a.current&&(t&&l(),a.current=!1),!a.current&&s&&(ot(r,i.current)||t&&l())},[r]),{getApiData:l}},_l=(e,t)=>{const{collapsible:r,collapseNum:n}=e,o=g.useRef();return{collapsible:r,collapseNum:n,collapseRef:o,onClickCollapseToTrue:()=>{var i;(i=t.current)==null||i.forEach(l=>{if(l.current){const{itemIndex:f}=l.current;f>=n&&r&&l.current.setItemCollapse(!0)}})},onClickCollapseToFalse:()=>{var i;(i=t.current)==null||i.forEach(l=>{if(l.current){const{itemCollapse:f}=l.current;f&&l.current.setItemCollapse(!1)}})}}},on=()=>{const{extendProps:e,extendComp:t}=De(),r=n=>{const o=t==null?void 0:t.form;o&&Object.keys(o).forEach(s=>{n.set(s,o[s])})};return{extendFormProps:e==null?void 0:e.form,setExtendFormComp:r}},Cl=e=>{const{api:t,params:r,immediate:n=!0,isusewatch:o,onDropdownVisibleChange:s}=e,a=o==="true",[i,l]=g.useState([]),{getApiData:f}=ct({api:t,immediate:n,params:r,apiCallback:l,isUseWatch:a}),d=u=>{u&&!n&&f(),s&&s(u)},p=()=>{const{api:u,params:m,immediate:h,isusewatch:b,..._}=e;return _};return y.jsx(E.Select,{...p(),options:i,onDropdownVisibleChange:d})},xl=e=>{const{api:t,params:r,immediate:n=!0,isusewatch:o,onDropdownVisibleChange:s}=e,a=o==="true",[i,l]=g.useState([]),{getApiData:f}=ct({api:t,immediate:n,params:r,apiCallback:l,isUseWatch:a}),d=u=>{u&&!n&&f(),s&&s(u)},p=()=>{const{api:u,params:m,immediate:h,isusewatch:b,..._}=e;return _};return y.jsx(E.TreeSelect,{...p(),treeData:i,onDropdownVisibleChange:d})},Sl=e=>{const{api:t,params:r,isusewatch:n}=e,o=n==="true",[s,a]=g.useState([]);ct({api:t,params:r,apiCallback:a,isUseWatch:o});const i=()=>{const{api:l,params:f,isusewatch:d,...p}=e;return p};return y.jsx(E.Transfer,{...i(),dataSource:s})},Tl=e=>{const{api:t,params:r,immediate:n=!0,isusewatch:o,onDropdownVisibleChange:s}=e,a=o==="true",[i,l]=g.useState([]),{getApiData:f}=ct({api:t,immediate:n,params:r,apiCallback:l,isUseWatch:a}),d=u=>{u&&!n&&f(),s&&s(u)},p=()=>{const{api:u,params:m,immediate:h,isusewatch:b,..._}=e;return _};return y.jsx(E.AutoComplete,{...p(),options:i,onDropdownVisibleChange:d})},ye={String:"String","String[]":"String[]","File[]":"File[]",FileList:"FileList"},Pl=e=>{const t="",{api:r,maxCount:n=1,maxSize:o=2,listType:s="picture-card",openCrop:a=!1,data:i,returnType:l=ye.String,value:f=t,onChange:d}=e,p=g.useRef(!0),u=g.useRef(0),m=g.useRef([]),[h,b]=g.useState([]),_=C=>{m.current=C,b([...C])},D=()=>{const{api:C,maxCount:O,maxSize:P,openCrop:x,beforeUpload:A,fileList:k,returnType:L,...I}=e;return I},S=C=>{const O=C.size/1024/1024<o;O||E.message.error(`文件大小超过:${o}M, 请重试`);const P=m.current.length+u.current<n;return P||E.message.error(`文件数量不能超过${n}个`),O&&P&&u.current++,O&&P&&w(C),E.Upload.LIST_IGNORE},w=C=>{a?(E.message.error("暂时不支持裁剪功能,后续兼容。。。。"),j({file:C})):j({file:C})},j=C=>{r?r({file:C.file,...i}).then(O=>{_([...m.current,...O])}).finally(()=>{u.current--}):(Object.assign(C.file,{status:"done",url:URL.createObjectURL(new Blob([C.file],{type:sl(C.file.type)}))}),_([...m.current,C.file]),u.current--)},F=C=>{const{file:O,fileList:P}=C,{status:x}=O;switch(x){case"removed":{_([...P]);break}}},z=C=>{const O=x=>{const A=x.split("/"),k=A[A.length-1],[L]=k.split("?");return L};return{uid:(x=>{const A=m.current.find(k=>k.url===x);return A?A.uid:Zt()})(C),name:O(C),url:C,status:"done"}},R=()=>{switch(l){case ye.String:return h.map(C=>C.url).join(",");case ye["String[]"]:return h.map(C=>C.url);case ye["File[]"]:return[...h];case ye.FileList:return[...h]}};return g.useEffect(()=>{const C=R();if(ot(C,f))return;let O=[];switch(l){case ye.String:{O=(f||"").split(",").filter(P=>P).map(P=>z(P));break}case ye["String[]"]:{O=(f||[]).map(P=>z(P));break}case ye["File[]"]:{O=(f||[]).map(P=>P);break}case ye.FileList:{O=(f||[]).map(P=>P);break}}_(O)},[f]),g.useEffect(()=>{if(p.current){p.current=!1;return}const C=R();d==null||d(C)},[h]),y.jsx(E.Upload,{listType:s,...D(),fileList:h,beforeUpload:S,onChange:F,children:"上传"})},V=new Map;V.set("Input",E.Input),V.set("ApiSelect",Cl),V.set("Select",E.Select),V.set("InputNumber",E.InputNumber),V.set("ApiTreeSelect",xl),V.set("TreeSelect",E.TreeSelect),V.set("ApiTransfer",Sl),V.set("Transfer",E.Transfer),V.set("Switch",E.Switch),V.set("Button",E.Button),V.set("Radio",E.Radio),V.set("RadioGroup",E.Radio.Group),V.set("Checkbox",E.Checkbox),V.set("CheckboxGroup",E.Checkbox.Group),V.set("Cascader",E.Cascader),V.set("TimePicker",E.TimePicker),V.set("DatePicker",E.DatePicker),V.set("MonthPicker",E.DatePicker.MonthPicker),V.set("WeekPicker",E.DatePicker.WeekPicker),V.set("RangePicker",E.DatePicker.RangePicker),V.set("InputPassword",E.Input.Password),V.set("InputTextArea",E.Input.TextArea),V.set("ApiAutoComplete",Tl),V.set("AutoComplete",E.AutoComplete),V.set("Upload",E.Upload),V.set("AutoUpload",Pl);const sn={"form-item-force":"_form-item-force_1hsf3_1","form-item-hidden":"_form-item-hidden_1hsf3_9"},El=g.forwardRef(({itemIndex:e,itemProps:t,methods:r,formProps:n,collapseRef:o},s)=>{const{rewritingModel:a,isusewatch:i}=pl(n,t),{isIfShow:l,isShow:f}=il(t,a,o),{colProps:d}=fl(t,n),{componentProps:p}=ul(t,a),{rules:u}=ll({item:t,model:a,isShow:f,componentProps:p}),{disabled:m}=cl(n,t,a),{itemCollapse:h,setItemCollapse:b}=al(n,e),{name:_,label:D,wrapperCol:S,labelCol:w,valuePropName:j,initialValue:F,forceRow:z}=t;g.useImperativeHandle(s,()=>({itemIndex:e,componentProps:p,itemCollapse:h,setItemCollapse:b}));const R=()=>({name:_,label:D,rules:u,wrapperCol:S,labelCol:w,valuePropName:j,initialValue:F}),{setExtendFormComp:C}=on();C(V);const O=at(t),P=lt(t),x=()=>{if(O){const A=V.get(t.component);return y.jsx(A,{...p,disabled:m,isusewatch:i.toString()})}return P?t.render({model:a,name:_,disabled:m,methods:r,componentProps:p}):null};return y.jsxs(g.Fragment,{children:[z?y.jsx("div",{className:sn["form-item-force"]}):null,l?y.jsx(E.Col,{...d,className:f&&!h?void 0:sn["form-item-hidden"],children:y.jsx(E.Form.Item,{...R(),children:x()})}):null]})}),jl={"collapse-wrapper":"_collapse-wrapper_ylm01_1"},Fl=g.forwardRef(({collapsible:e,onClickExpand:t,onClickFold:r},n)=>{const[o,s]=g.useState(e),a=g.useMemo(()=>o,[o]),i=()=>{r(),s(!0)},l=()=>{t(),s(!1)};return g.useImperativeHandle(n,()=>({handleCollapseChangeFalse:l})),y.jsx("div",{className:jl["collapse-wrapper"],children:a?y.jsx(E.Button,{onClick:l,type:"link",icon:y.jsx(ue.DownOutlined,{}),children:"展开"}):y.jsx(E.Button,{onClick:i,type:"link",icon:y.jsx(ue.UpOutlined,{}),children:"折叠"})})}),Dl={"group-wrapper":"_group-wrapper_g8zqi_1"},Al=({formProps:e})=>{const{renderActions:t}=e;return y.jsx("div",{className:Dl["group-wrapper"],children:t==null?void 0:t()})},Ol={"xph-form-action":"_xph-form-action_8ws73_1"},$l=(e,t)=>{const[r]=E.Form.useForm(),{formProps:n}=wl(e),{formItems:o}=dl({formProps:n}),s=g.useRef(new Map),{collapsible:a,collapseNum:i,collapseRef:l,onClickCollapseToFalse:f,onClickCollapseToTrue:d}=_l(n,s),{handleFormatRenderValues:p,handleFormatReturnValues:u}=bl(o,n,s),{setFieldsValue:m,getFieldsValue:h,resetFields:b,validator:_,scrollToField:D}=vl(r,p,u),S=()=>{const{layout:j,wrapperCol:F,labelCol:z,colon:R,disabled:C,labelWrap:O,labelAlign:P,scrollToFirstError:x,size:A}=n;return{layout:j,wrapperCol:F,labelCol:z,colon:R,disabled:C,labelWrap:O,labelAlign:P,scrollToFirstError:x,size:A}},w={setFieldsValue:m,getFieldsValue:h,resetFields:b,validator:_,scrollToField:D};return g.useImperativeHandle(t,()=>({...w})),g.useEffect(()=>(n.register&&n.register(w),()=>{s.current.clear()}),[]),y.jsxs(E.Form,{form:r,...S(),children:[y.jsx(E.Row,{children:o.map((j,F)=>(s.current.has(j.name)||s.current.set(j.name,g.createRef()),y.jsx(El,{ref:s.current.get(j.name),itemIndex:F,itemProps:j,formProps:n,methods:w,collapseRef:l},F)))}),y.jsxs("div",{className:Ol["xph-form-action"],children:[y.jsx(Al,{formProps:n}),a?y.jsx(Fl,{ref:l,collapsible:o.length>i,onClickExpand:f,onClickFold:d}):null]})]})},Wt=g.forwardRef($l),kl=g.memo(Wt),Ml=g.forwardRef((e,t)=>{const{renderActions:r,showSearch:n=!0,tableRef:o}=e,[s,a]=g.useState(!1),i=g.useRef(null),l=()=>{const{reloadData:u}=o.current;u()},f=()=>{const{resetData:u}=o.current;u()},d=g.useCallback(()=>y.jsxs("div",{style:{width:"100%",display:"flex"},children:[y.jsx("div",{style:{flex:1,width:0},children:r==null?void 0:r()}),n&&y.jsxs("div",{style:{display:"flex",gap:"8px"},children:[y.jsx(E.Button,{type:"primary",icon:y.jsx(ue.SearchOutlined,{}),onClick:l,children:"搜索"}),y.jsx(E.Button,{icon:y.jsx(ue.ReloadOutlined,{}),onClick:f,children:"重置"})]})]}),[n,r]),p=()=>{const{renderActions:u,...m}=e;return{...m,renderActions:d}};return g.useImperativeHandle(t,()=>({setFormLoading:a,...i.current})),y.jsx(E.Spin,{spinning:s,children:y.jsx(kl,{ref:i,...p()})})}),Rl=g.memo(Wt),zl=(e,t)=>{const r=g.useRef(null),n=g.useRef(null),{formProps:o}=e,a=(()=>{const{formProps:d,...p}=e;return p})(),i=g.useRef(null),l=async()=>{const{onOk:d,renderFooter:p}=a;if(!p){const{ok:u,data:m}=i.current;if(u){n.current.validator().then(async h=>{r.current.setLoading(!0),await u({values:n.current.getFieldsValue()}).then(_=>_).finally(()=>{r.current.setLoading(!1)})!==!1&&(r.current.close(),i.current=null)});return}if(d){n.current.validator().then(async h=>{r.current.setLoading(!0),await d({values:h,data:m}).then(_=>_).finally(()=>{r.current.setLoading(!1)})!==!1&&(r.current.close(),i.current=null)});return}r.current.close(),i.current=null}},f=async()=>{const{onCancel:d,renderFooter:p}=a;if(!p){const{cancel:u,data:m}=i.current;if(u){if(await u({values:n.current.getFieldsValue(!0)})===!1)return;r.current.close(),i.current=null;return}if(d){if(await d({values:n.current.getFieldsValue(!0),data:m})===!1)return;r.current.close(),i.current=null;return}r.current.close(),i.current=null}};return g.useImperativeHandle(t,()=>({open:async d=>{if(r.current.getVisible())return;const{renderFooter:u}=a;return!u&&(i.current=d),r.current.open().then(()=>{n.current.setFieldsValue(d.data||{})})},close:(...d)=>r.current.close(...d),setLoading:(...d)=>r.current.setLoading(...d),getVisible:(...d)=>r.current.getVisible(...d),getFieldsValue:(...d)=>n.current.getFieldsValue(...d),setFieldsValue:(...d)=>n.current.setFieldsValue(...d),resetFields:(...d)=>n.current.resetFields(...d),validator:(...d)=>n.current.validator(...d),scrollToField:(...d)=>n.current.scrollToField(...d)})),y.jsx(rn,{...a,ref:r,onOk:l,onCancel:f,children:y.jsx(Rl,{...o,ref:n})})},an=g.forwardRef(zl);function Il({searchForm:e}){return{searchFormRef:g.useRef(null),searchFormProps:e}}function ln(e){return"cellFunc"in e}function cn(e){return"children"in e}const{useToken:Ll}=E.theme,Wl=(e,t,r)=>{const{curComponentProps:n,cellFuncProps:o}=t,{url:s,onClick:a}=n,{token:i}=Ll(),l={color:i.colorLink,cursor:"pointer"},f=()=>{if(r.mainClick&&r.mainClick(),a){a();return}if(s){window.open(s,"_blank");return}};return y.jsx(e,{...r,mainClick:f,mainStyle:Object.assign(l,(r==null?void 0:r.mainStyle)||{})})},Bl={"cellfunc-actions":"_cellfunc-actions_14drt_1"},Nl=(e,t,r)=>{const{curComponentProps:n,cellFuncProps:o}=t;return y.jsx("div",{className:Bl["cellfunc-actions"],children:y.jsx(it,{...n})})},{useToken:Hl}=E.theme,Vl={0:{color:"orange",backgroundColor:"unset",border:"1px solid orange"},1:{color:"purple",backgroundColor:"unset",border:"1px solid purple"},2:{color:"blue",backgroundColor:"unset",border:"1px solid blue"},3:{color:"green",backgroundColor:"unset",border:"1px solid green"},4:{color:"red",backgroundColor:"unset",border:"1px solid red"},5:{color:"pink",backgroundColor:"unset",border:"1px solid pink"},6:{color:"cyan",backgroundColor:"unset",border:"1px solid cyan"},7:{color:"magenta",backgroundColor:"unset",border:"1px solid magenta"},8:{color:"yellow",backgroundColor:"unset",border:"1px solid yellow"},9:{color:"teal",backgroundColor:"unset",border:"1px solid teal"},10:{color:"brown",backgroundColor:"unset",border:"1px solid brown"},11:{color:"gray",backgroundColor:"unset",border:"1px solid gray"},12:{color:"olive",backgroundColor:"unset",border:"1px solid olive"},13:{color:"navy",backgroundColor:"unset",border:"1px solid navy"},14:{color:"lime",backgroundColor:"unset",border:"1px solid lime"},15:{color:"maroon",backgroundColor:"unset",border:"1px solid maroon"}},Ul=(e,t,r)=>e.reduce((n,o,s)=>{var f;const a=`${String(t.dataIndex)}${o.value}`,i=(f=o.config)==null?void 0:f.color,l=i?r[i]??{color:i,backgroundColor:"unset",border:`1px solid ${i}`}:Vl[s]||{};return n[a]={color:l.color,backgroundColor:l.backgroundColor,border:l.border},n},{}),ql=(e,t,r)=>{const{curComponentProps:n,cellFuncProps:{renderPrams:{text:o,column:s}}}=t,{token:a}=Hl(),{enums:i}=n,l={primary:{color:a.colorPrimary,backgroundColor:a.colorPrimaryBg,border:`1px solid ${a.colorPrimary}`},success:{color:a.colorSuccess,backgroundColor:a.colorSuccessBg,border:`1px solid ${a.colorSuccess}`},warning:{color:a.colorWarning,backgroundColor:a.colorWarningBg,border:`1px solid ${a.colorWarning}`},info:{color:a.colorInfo,backgroundColor:a.colorInfoBg,border:`1px solid ${a.colorInfo}`},error:{color:a.colorError,backgroundColor:a.colorErrorBg,border:`1px solid ${a.colorError}`}},d=Ul(i,s,l)[`${String(s.dataIndex)}${o}`]||{},p={padding:"0 8px",borderRadius:a.borderRadiusLG,fontSize:a.fontSizeSM,...d},u=()=>{var h;return(h=i.find(b=>b.value===o))==null?void 0:h.label};return y.jsx(e,{...r,mainHandleText:u,mainStyle:Object.assign((r==null?void 0:r.mainStyle)||{},p)})},{useToken:Yl}=E.theme,un={link:{Comp:Wl},actions:{Comp:Nl},tag:{Comp:ql},copy:{Comp:(e,t,r)=>{const{curComponentProps:n,cellFuncProps:{renderPrams:o}}=t,{token:s}=Yl(),{text:a,onClick:i,size:l="default"}=n,f={small:16,default:18,large:20},{copy:d}=sc(),p=()=>{let u=o.text;if(a&&(Q(a)&&(u=a(o.record)),Mt(a)&&(u=a)),i)return i(o.record);d(u)&&E.message.success("复制成功")};return y.jsxs(y.Fragment,{children:[y.jsx("span",{onClick:p,children:y.jsx("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4503",width:f[l],height:f[l],style:{cursor:"pointer",verticalAlign:"text-top"},children:y.jsx("path",{d:"M682.666667 42.666667H85.333333v682.666666h85.333334V128h512V42.666667zM256 213.333333l4.522667 768H896V213.333333H256z m554.666667 682.666667H341.333333V298.666667h469.333334v597.333333z",fill:s.colorLink,"p-id":"4504"})})}),y.jsx(e,{...r})]})}}},Xl=(e,t)=>{var a,i;const{renderPrams:{text:r,column:n}}=e,o=(a=t==null?void 0:t.mainHandleText)==null?void 0:a.call(t),s=nt(n==null?void 0:n.ellipsis)?n==null?void 0:n.ellipsis:(i=n==null?void 0:n.ellipsis)==null?void 0:i.showTitle;return y.jsx("span",{onClick:t==null?void 0:t.mainClick,style:t==null?void 0:t.mainStyle,title:s?`${o??r}`:void 0,children:o??r})},Gl=e=>{const{setExtendTableCellComp:t}=dn();t(un);const{dslConfig:r}=e;let n=Xl.bind(null,e),o=0;for(;o<r.length;){const s=o++,a=un[r[s].component];a&&(n=a.Comp.bind(null,n,{curComponentProps:r[s].componentProps||{},cellFuncProps:e}))}return y.jsx(n,{})};function fn(e){return e.map(t=>{let r={...t};if(ln(r)){const{cellFunc:n,...o}=r;r={...o,render:(...s)=>{const a=Q(n),[i,l,f]=s,d={text:i,record:l,index:f,column:JSON.parse(JSON.stringify(o))},p=a?n(d):n;return y.jsx(Gl,{dslConfig:p,renderPrams:d})}}}return cn(r)&&r.children&&Array.isArray(r.children)&&(r.children=fn(r.children)),r})}function Kl(e){const{columns:t}=e.table;return{columns:fn(t)}}const Jl=e=>{const{extendTableProps:t}=dn();return{tableProps:{...ce(ce({table:{columns:[],fullHeight:!1,autoRequest:!0,pagination:{pageSize:20,total:0,showTotal:o=>`共:${o} 条`,current:1,pageSizeOptions:[10,20,50,100],showSizeChanger:!0,showQuickJumper:!0},requestFields:{pageSize:"pageSize",current:"current"},responseFields:{current:"current",list:"data",total:"total"}},crudFormDialog:void 0,searchForm:void 0},t),e)}}};function Zl(e){const{pagination:t,autoPagination:r}=e.table,[n,o]=g.useState(t),s=g.useRef(t),a=g.useMemo(()=>n&&(r===!0||r===void 0)||!1,[n]);return{pagination:{model:n,update:l=>{if(!s.current)return;const f={...s.current,...l};o(f),s.current=f},show:a},lastPaginationState:s}}function Ql(e,t){const{api:r,formatDataSource:n,autoPagination:o,onChange:s,requestFields:a,responseFields:i}=e.table,l=e.onPaginationChange,{pagination:f,lastPaginationState:d}=Zl(e),[p,u]=g.useState({loading:!1,dataSource:[],selection:[],backupsDataSource:[]}),m=g.useRef({loading:!1,dataSource:[],selection:[],backupsDataSource:[]}),h={model:p,update:P=>{const x={...m.current,...P};u(x),m.current=x,t.current&&t.current.setFormLoading(x.loading)}},b={validator:async()=>({}),resetFields:async()=>{}},_=async()=>{g.useEffect(()=>{const{autoRequest:P}=e.table,{validator:x}=t.current||b;P&&x().then(A=>{j({searchFormParams:A})})},[])},D=async({searchFormParams:P,paginationParams:x})=>{const A={...P,[`${a.current}`]:d.current.current,[`${a.pageSize}`]:d.current.pageSize,...x?{[`${a.current}`]:x.current,[`${a.pageSize}`]:x.pageSize}:{}};return r(A).then(k=>{const{current:L,list:I,total:G}=yt(i,k);h.update({dataSource:n?n(I):I}),f.update({total:G,current:L,pageSize:A[`${a.pageSize}`]})}).finally(()=>{h.update({loading:!1})})},S=async({searchFormParams:P,paginationParams:x})=>{const A={...P};return r(A).then(k=>{const{list:L}=yt(i,k),I=n?n(L):L;h.update({selection:[],dataSource:I}),f.update({current:1,total:L.length})}).finally(()=>{h.update({loading:!1})})},w=async({searchFormParams:P,paginationParams:x})=>{var k;const A={...P};if(x){const{current:L,pageSize:I}=x;f.update({current:L,pageSize:I});const G=(L-1)*I,ne=G+I,oe=(k=m.current.backupsDataSource)==null?void 0:k.slice(G,ne);return h.update({loading:!1,selection:[],dataSource:oe})}else return r(A).then(L=>{let I=n?n(L):L;const G=[...I],ne=0,oe=ne+d.current.pageSize;I=I.slice(ne,oe),h.update({selection:[],dataSource:I,backupsDataSource:G}),f.update({current:1,total:L.length})}).finally(()=>{h.update({loading:!1})})},j=async({searchFormParams:P,paginationParams:x})=>{if(h.update({loading:!0,selection:[]}),r)switch(!!d.current){case!0:return o===!0?w({searchFormParams:P,paginationParams:x}):o===!1?S({searchFormParams:P,paginationParams:x}):D({searchFormParams:P,paginationParams:x});case!1:return S({searchFormParams:P,paginationParams:x})}return h.update({loading:!1})};return{table:h,pagination:f,firstGetTableData:_,onPaginationChange:(P,x)=>{const{validator:A}=t.current||b;A().then(k=>{j({searchFormParams:k,paginationParams:{current:P,pageSize:x}})}),l&&l(P,x)},onAllChange:async(...P)=>{const[x,A,k,L]=P,I=[];for(let G=0;G<I.length&&!I[G]();G++);s&&s(A,k,L)},resetData:async()=>{const{resetFields:P,validator:x}=t.current||b;return P().then(async()=>{const A=await x();return j({searchFormParams:A})})},resetAllData:async()=>{const{resetFields:P,validator:x}=t.current||b;return P().then(async()=>{const A={};if(d.current){const{pageSize:k}=d.current;o===void 0&&(A.paginationParams={current:1,pageSize:k})}return A.searchFormParams=await x(),j(A)})},reloadData:async()=>{const{validator:P}=t.current||b;return P().then(x=>j({searchFormParams:x}))}}}const ec=(e,t)=>{const{onRowSelectionChange:r}=e,{rowSelection:n}=e.table,o=()=>{if(Mt(n))return{type:n,onChange:(s,a,i)=>{t.update({selection:a}),r&&r(s,a)}};if(ie(n)){const{onChange:s}=n;return{...n,onChange:(a,i,l)=>{t.update({selection:i}),s&&s(a,i,l),r&&r(a,i)}}}return n};return{rowSelection:o(),getNewRowSelection:o}},Ue=(e,t)=>Array.from((e==null?void 0:e.children)??[]).find(r=>r.classList.contains(t));function tc(e,t){const{scroll:r,virtual:n,prefixCls:o}=e.table,{getPrefixCls:s}=g.useContext(E.ConfigProvider.ConfigContext),a=s("table",o),i=g.useRef(null),[{width:l,height:f},d]=g.useState({width:1,height:1});g.useLayoutEffect(()=>{const u=i.current;if(!t||!u)return;let m;const h=new Set,b=()=>{const w=u.firstElementChild,j=w==null?void 0:w.getElementsByClassName(a)[0],F=Ue(j,`${a}-container`),z=Ue(F,`${a}-header`),R=Ue(F,`${a}-tbody-virtual`),C=Ue(R,`${a}-tbody-virtual-holder`)??Ue(F,`${a}-body`),O=new Set([u,w,j,z,C].filter(x=>!!x));h.forEach(x=>{O.has(x)||D.unobserve(x)}),O.forEach(x=>{h.has(x)||D.observe(x)}),h.clear(),O.forEach(x=>h.add(x));const P=w&&C?w.offsetHeight-C.offsetHeight:void 0;d(x=>{const A=Math.max(1,u.clientWidth),k=P===void 0?x.height:Math.max(1,u.clientHeight-P);return x.width===A&&x.height===k?x:{width:A,height:k}})},_=()=>{m===void 0&&(m=requestAnimationFrame(()=>{m=void 0,b()}))},D=new ResizeObserver(_),S=new MutationObserver(_);return S.observe(u,{childList:!0,subtree:!0}),b(),()=>{D.disconnect(),S.disconnect(),m!==void 0&&cancelAnimationFrame(m)}},[t,n,a]);const p=g.useMemo(()=>t?n?{x:l,y:f,...r}:{y:f,...r}:{...r},[t,n,l,f,r]);return{divRef:i,scroll:p}}function rc(e,t){const{toolbar:r}=e.table;return{getTopToolbarBindProps:()=>{if(Q(r)){const o=r({loading:t.model.loading,selection:t.model.selection});return{...o,disabled:t.model.loading||o.disabled}}return{...r,disabled:t.model.loading||(r==null?void 0:r.disabled)}}}}const dn=()=>{const{extendProps:e,extendComp:t}=De(),r=n=>{const o=t==null?void 0:t.tableCellFunc;o&&Object.keys(o).forEach(s=>{const a=o[s];n[s]={Comp:a}})};return{extendTableProps:e==null?void 0:e.table,setExtendTableCellComp:r}},nc=({crudFormDialog:e})=>({crudFormDialogRef:g.useRef(null),crudFormProps:e});function oc(e,{target:t=document.body}={}){const r=document.createElement("textarea"),n=document.activeElement;r.value=e,r.setAttribute("readonly",""),r.style.contain="strict",r.style.position="absolute",r.style.left="-9999px",r.style.fontSize="12pt";const o=document.getSelection();let s;o&&o.rangeCount>0&&(s=o.getRangeAt(0)),t.append(r),r.select(),r.selectionStart=0,r.selectionEnd=e.length;let a=!1;try{a=document.execCommand("copy")}catch(i){throw new Error(i)}return r.remove(),s&&o&&(o.removeAllRanges(),o.addRange(s)),n&&n.focus(),a}function sc(){function e(t){try{return oc(t)}catch{return!1}}return{copy:e}}const ut={"main-container":"_main-container_1yx5k_1",container__toolbar:"_container__toolbar_1yx5k_13",container__table:"_container__table_1yx5k_27",container__pagination:"_container__pagination_1yx5k_35"},ic=g.forwardRef(({tableProps:e,searchFormRef:t,fullHeight:r},n)=>{const{columns:o}=Kl(e),s=g.useRef(null),{table:a,pagination:i,firstGetTableData:l,onPaginationChange:f,onAllChange:d,resetData:p,resetAllData:u,reloadData:m}=Ql(e,t),{rowSelection:h}=ec(e,a),{divRef:b,scroll:_}=tc(e,r),{getTopToolbarBindProps:D}=rc(e,a),S=()=>{const{autoRequest:w,api:j,formatDataSource:F,autoPagination:z,columns:R,scroll:C,pagination:O,rowSelection:P,onChange:x,...A}=e.table;return A};return l(),g.useImperativeHandle(n,()=>({resetData:p,resetAllData:u,reloadData:m,...s.current})),y.jsxs("div",{className:r?ut["main-container"]:void 0,children:[y.jsx("div",{className:ut.container__toolbar,children:y.jsx(it,{...D()})}),y.jsx("div",{ref:b,className:r?ut.container__table:void 0,children:y.jsx(E.Table,{ref:s,...S(),loading:a.model.loading,columns:o,dataSource:a.model.dataSource,pagination:!1,rowSelection:h,scroll:_,onChange:d})}),i.show?y.jsx("div",{className:ut.container__pagination,children:y.jsx(E.Pagination,{disabled:a.model.loading,...i.model,onChange:f})}):null]})}),pn={"xph-table-full-wrapper":"_xph-table-full-wrapper_mdv0g_1","full-wrapper__table":"_full-wrapper__table_mdv0g_13"},ac=(e,t)=>{const{tableProps:r}=Jl(e),n=g.useRef(null),{searchFormRef:o,searchFormProps:s}=Il(r),{crudFormDialogRef:a,crudFormProps:i}=nc(r);let{fullHeight:l}=r.table;const{virtual:f}=r.table;return f&&(l=!0),g.useImperativeHandle(t,()=>({...n.current,...a.current})),y.jsxs("div",{className:l?pn["xph-table-full-wrapper"]:void 0,children:[s?y.jsx("div",{children:y.jsx(Ml,{ref:o,tableRef:n,...s})}):null,y.jsx("div",{className:l?pn["full-wrapper__table"]:void 0,children:y.jsx(ic,{ref:n,searchFormRef:o,fullHeight:l,tableProps:r})}),i?y.jsx(an,{ref:a,...i}):null]})},lc=g.forwardRef(ac);M.XphActions=it,M.XphAuth=el,M.XphCrudFormDialog=an,M.XphDialog=rn,M.XphExtendCompPropsProvider=ba,M.XphForm=Wt,M.XphPortal=nn,M.XphTable=lc,M.buildUUID=Zt,M.getValueByPath=Qt,M.getValuesByPathObj=yt,M.isChildrenColumnProps=cn,M.isComponentActionItemProps=Rt,M.isComponentColumnProps=ln,M.isComponentFormItemProps=at,M.isRenderActionItemProps=qr,M.isRenderFormItemProps=lt,M.useAsyncState=Gr,M.useXphExtendCompProps=De,M.useXphForm=hl,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._minimize-
|
|
1
|
+
._minimize-windows_ith81_1{position:absolute;pointer-events:auto;z-index:999;display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;width:250px;transform:translate(-50%,-50%);padding:4px;background-color:#fff;cursor:move;-webkit-user-select:none;user-select:none;border:1px solid rgba(0,0,0,.15);box-shadow:0 -4px 12px #00000026,0 4px 8px #0000001a,0 2px 4px #0000000f}._minimize-windows-title_ith81_45{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._minimize-windows-operate_ith81_57{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}._xph-dialog-mask_ntfnq_1{position:absolute;top:0;right:0;bottom:0;left:0;background-color:#000;opacity:.7;z-index:999;pointer-events:auto}._xph-dialog-wrapper_ntfnq_19{position:absolute;pointer-events:auto;z-index:999;background-color:#fff;transform:translate(-50%,-50%);display:flex;flex-direction:column;overflow:hidden;box-shadow:0 -4px 12px #00000026,0 4px 8px #0000001a,0 2px 4px #0000000f}._dialog__header_ntfnq_43{display:flex;padding:8px;justify-content:space-between;align-items:center;cursor:move;-webkit-user-select:none;user-select:none;border-bottom:1px solid rgba(0,0,0,.15)}._dialog__header-btns_ntfnq_61{display:flex;gap:16px}._dialog__main_ntfnq_69{flex:1;height:0;box-sizing:border-box;padding:16px;overflow-y:auto}._dialog__footer_ntfnq_83{padding:8px;display:flex;justify-content:flex-end;gap:8px}._dialog__resize_ntfnq_97{position:absolute;width:8px;height:8px;-webkit-user-select:none;user-select:none}._dialog__resize-lt_ntfnq_111{top:0;left:0;cursor:nw-resize}._dialog__resize-rt_ntfnq_123{top:0;right:0;cursor:ne-resize}._dialog__resize-rb_ntfnq_135{right:0;bottom:0;cursor:nw-resize}._dialog__resize-lb_ntfnq_147{bottom:0;left:0;cursor:ne-resize}._dialog__main_ntfnq_69::-webkit-scrollbar{width:12px;height:12px}._dialog__main_ntfnq_69::-webkit-scrollbar-track{background:#f1f1f1;border-radius:10px}._dialog__main_ntfnq_69::-webkit-scrollbar-thumb{background:#888;border-radius:10px}._dialog__main_ntfnq_69::-webkit-scrollbar-thumb:hover{background:#555}._dialog__main_ntfnq_69{scrollbar-width:thin;scrollbar-color:#888 #f1f1f1}._form-item-force_1hsf3_1{flex-basis:100%;height:0}._form-item-hidden_1hsf3_9{display:none}._collapse-wrapper_ylm01_1{display:inline-block;margin-right:8px}._group-wrapper_g8zqi_1{display:flex;flex:1;width:0}._xph-form-action_8ws73_1{display:flex;align-items:center;gap:8px}._cellfunc-actions_14drt_1{display:flex;align-items:center;gap:4px;flex-wrap:wrap}._main-container_1yx5k_1{width:100%;height:100%;display:flex;flex-direction:column}._container__toolbar_1yx5k_13{display:flex;gap:8px;margin:4px 0;align-items:center;flex-wrap:wrap}._container__table_1yx5k_27{flex:1;height:0}._container__pagination_1yx5k_35{display:flex;justify-content:flex-end;align-items:center;margin-right:8px}._xph-table-full-wrapper_mdv0g_1{width:100%;height:100%;display:flex;flex-direction:column}._full-wrapper__table_mdv0g_13{flex:1;height:0}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
|
|
3
|
+
declare const useDialogLayer: ({ container, mask, visible, }: {
|
|
4
|
+
container: HTMLElement;
|
|
5
|
+
mask?: boolean | undefined;
|
|
6
|
+
visible: boolean;
|
|
7
|
+
}) => {
|
|
8
|
+
layerStyle: CSSProperties | undefined;
|
|
9
|
+
};
|
|
10
|
+
export default useDialogLayer;
|
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
import { IDialogProps } from '../types';
|
|
2
2
|
|
|
3
3
|
declare const useDialogPorps: (dialogProps: IDialogProps) => {
|
|
4
|
-
dialogProps:
|
|
5
|
-
getPopperContainer: () => HTMLElement;
|
|
6
|
-
width?: number | undefined;
|
|
7
|
-
height?: number | undefined;
|
|
8
|
-
mask?: boolean | undefined;
|
|
9
|
-
title?: string | undefined;
|
|
10
|
-
okProps?: Omit<import('antd').ButtonProps, "children" | "onClick"> | undefined;
|
|
11
|
-
cancelProps?: Omit<import('antd').ButtonProps, "children" | "onClick"> | undefined;
|
|
12
|
-
okText?: string | undefined;
|
|
13
|
-
cancelText?: string | undefined;
|
|
14
|
-
onOk?: ((args: any) => Promise<void>) | undefined;
|
|
15
|
-
onCancel?: ((args: any) => Promise<void>) | undefined;
|
|
16
|
-
renderFooter?: (({ loading }: {
|
|
17
|
-
loading: boolean;
|
|
18
|
-
}) => import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>>) | undefined;
|
|
19
|
-
renderTitle?: (() => import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>>) | undefined;
|
|
20
|
-
onOpen?: (() => void) | undefined;
|
|
21
|
-
onClose?: (() => void) | undefined;
|
|
22
|
-
};
|
|
4
|
+
dialogProps: IDialogProps;
|
|
23
5
|
baseDialogProps: Partial<IDialogProps>;
|
|
24
6
|
};
|
|
25
7
|
export default useDialogPorps;
|