xph-crud 0.0.6 → 0.0.8
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 +1482 -1443
- package/dist/index.umd.cjs +9 -9
- package/dist/types/common/src/utils/getValueByPath.d.ts +9 -0
- package/dist/types/common/src/utils/index.d.ts +2 -1
- package/dist/types/common/src/utils/uuid.d.ts +1 -0
- package/dist/types/table/src/types/apiTable.d.ts +16 -0
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(Y,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react"),require("antd"),require("@ant-design/icons"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","antd","@ant-design/icons","react-dom"],d):(Y=typeof globalThis<"u"?globalThis:Y||self,d(Y["xph-crud"]={},Y.React,Y.Antd,Y.AntDesignIcons,Y.ReactDOM))})(this,function(Y,d,F,ve,cn){"use strict";const at=[];for(let e=0;e<=15;e++)at[e]=e.toString(16);function lt(){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+=at[Math.random()*4|8]:e+=at[Math.random()*16|0];return e.replace(/-/g,"")}const zt=(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},ct=(e,t)=>{const r={};for(const[n,o]of Object.entries(e))r[n]=zt(t,o);return r};var un=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ut={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 Lt;function dn(){if(Lt)return Ie;Lt=1;var e=d,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,i={key:!0,ref:!0,__self:!0,__source:!0};function a(s,c,u){var f,h={},g=null,w=null;u!==void 0&&(g=""+u),c.key!==void 0&&(g=""+c.key),c.ref!==void 0&&(w=c.ref);for(f in c)n.call(c,f)&&!i.hasOwnProperty(f)&&(h[f]=c[f]);if(s&&s.defaultProps)for(f in c=s.defaultProps,c)h[f]===void 0&&(h[f]=c[f]);return{$$typeof:t,type:s,key:g,ref:w,props:h,_owner:o.current}}return Ie.Fragment=r,Ie.jsx=a,Ie.jsxs=a,Ie}var ke={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,12 +14,12 @@
|
|
|
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
|
-
`+ie+l}}var ae=!1,
|
|
19
|
-
`),le=
|
|
20
|
-
`),
|
|
21
|
-
`+U[
|
|
17
|
+
*/var Nt;function pn(){return Nt||(Nt=1,process.env.NODE_ENV!=="production"&&function(){var e=d,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),p=Symbol.iterator,T="@@iterator";function P(l){if(l===null||typeof l!="object")return null;var y=p&&l[p]||l[T];return typeof y=="function"?y:null}var k=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function O(l){{for(var y=arguments.length,D=new Array(y>1?y-1:0),N=1;N<y;N++)D[N-1]=arguments[N];B("error",l,D)}}function B(l,y,D){{var N=k.ReactDebugCurrentFrame,G=N.getStackAddendum();G!==""&&(y+="%s",D=D.concat([G]));var Z=D.map(function(V){return String(V)});Z.unshift("Warning: "+y),Function.prototype.apply.call(console[l],console,Z)}}var X=!1,q=!1,J=!1,ne=!1,E=!1,j;j=Symbol.for("react.module.reference");function C(l){return!!(typeof l=="string"||typeof l=="function"||l===n||l===i||E||l===o||l===u||l===f||ne||l===w||X||q||J||typeof l=="object"&&l!==null&&(l.$$typeof===g||l.$$typeof===h||l.$$typeof===a||l.$$typeof===s||l.$$typeof===c||l.$$typeof===j||l.getModuleId!==void 0))}function x(l,y,D){var N=l.displayName;if(N)return N;var G=y.displayName||y.name||"";return G!==""?D+"("+G+")":D}function z(l){return l.displayName||"Context"}function L(l){if(l==null)return null;if(typeof l.tag=="number"&&O("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case s:var y=l;return z(y)+".Consumer";case a:var D=l;return z(D._context)+".Provider";case c:return x(l,l.render,"ForwardRef");case h:var N=l.displayName||null;return N!==null?N:L(l.type)||"Memo";case g:{var G=l,Z=G._payload,V=G._init;try{return L(V(Z))}catch{return null}}}return null}var _=Object.assign,v=0,b,$,S,R,M,A,I;function W(){}W.__reactDisabledLog=!0;function H(){{if(v===0){b=console.log,$=console.info,S=console.warn,R=console.error,M=console.group,A=console.groupCollapsed,I=console.groupEnd;var l={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:l,log:l,warn:l,error:l,group:l,groupCollapsed:l,groupEnd:l})}v++}}function se(){{if(v--,v===0){var l={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:_({},l,{value:b}),info:_({},l,{value:$}),warn:_({},l,{value:S}),error:_({},l,{value:R}),group:_({},l,{value:M}),groupCollapsed:_({},l,{value:A}),groupEnd:_({},l,{value:I})})}v<0&&O("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var de=k.ReactCurrentDispatcher,ie;function me(l,y,D){{if(ie===void 0)try{throw Error()}catch(G){var N=G.stack.trim().match(/\n( *(at )?)/);ie=N&&N[1]||""}return`
|
|
18
|
+
`+ie+l}}var ae=!1,ee;{var pe=typeof WeakMap=="function"?WeakMap:Map;ee=new pe}function _e(l,y){if(!l||ae)return"";{var D=ee.get(l);if(D!==void 0)return D}var N;ae=!0;var G=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Z;Z=de.current,de.current=null,H();try{if(y){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(Se){N=Se}Reflect.construct(l,[],V)}else{try{V.call()}catch(Se){N=Se}l.call(V.prototype)}}else{try{throw Error()}catch(Se){N=Se}l()}}catch(Se){if(Se&&N&&typeof Se.stack=="string"){for(var U=Se.stack.split(`
|
|
19
|
+
`),le=N.stack.split(`
|
|
20
|
+
`),te=U.length-1,re=le.length-1;te>=1&&re>=0&&U[te]!==le[re];)re--;for(;te>=1&&re>=0;te--,re--)if(U[te]!==le[re]){if(te!==1||re!==1)do if(te--,re--,re<0||U[te]!==le[re]){var he=`
|
|
21
|
+
`+U[te].replace(" at new "," at ");return l.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",l.displayName)),typeof l=="function"&&ee.set(l,he),he}while(te>=1&&re>=0);break}}}finally{ae=!1,de.current=Z,se(),Error.prepareStackTrace=G}var Re=l?l.displayName||l.name:"",ln=Re?me(Re):"";return typeof l=="function"&&ee.set(l,ln),ln}function je(l,y,D){return _e(l,!1)}function Ot(l){var y=l.prototype;return!!(y&&y.isReactComponent)}function Ae(l,y,D){if(l==null)return"";if(typeof l=="function")return _e(l,Ot(l));if(typeof l=="string")return me(l);switch(l){case u:return me("Suspense");case f:return me("SuspenseList")}if(typeof l=="object")switch(l.$$typeof){case c:return je(l.render);case h:return Ae(l.type,y,D);case g:{var N=l,G=N._payload,Z=N._init;try{return Ae(Z(G),y,D)}catch{}}}return""}var st=Object.prototype.hasOwnProperty,Xr={},Kr=k.ReactDebugCurrentFrame;function it(l){if(l){var y=l._owner,D=Ae(l.type,l._source,y?y.type:null);Kr.setExtraStackFrame(D)}else Kr.setExtraStackFrame(null)}function Ol(l,y,D,N,G){{var Z=Function.call.bind(st);for(var V in l)if(Z(l,V)){var U=void 0;try{if(typeof l[V]!="function"){var le=Error((N||"React class")+": "+D+" type `"+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof l[V]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw le.name="Invariant Violation",le}U=l[V](y,V,N,D,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(te){U=te}U&&!(U instanceof Error)&&(it(G),O("%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).",N||"React class",D,V,typeof U),it(null)),U instanceof Error&&!(U.message in Xr)&&(Xr[U.message]=!0,it(G),O("Failed %s type: %s",D,U.message),it(null))}}}var Al=Array.isArray;function At(l){return Al(l)}function Ml(l){{var y=typeof Symbol=="function"&&Symbol.toStringTag,D=y&&l[Symbol.toStringTag]||l.constructor.name||"Object";return D}}function Rl(l){try{return Jr(l),!1}catch{return!0}}function Jr(l){return""+l}function Zr(l){if(Rl(l))return O("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ml(l)),Jr(l)}var Ue=k.ReactCurrentOwner,Il={key:!0,ref:!0,__self:!0,__source:!0},Qr,en,Mt;Mt={};function kl(l){if(st.call(l,"ref")){var y=Object.getOwnPropertyDescriptor(l,"ref").get;if(y&&y.isReactWarning)return!1}return l.ref!==void 0}function zl(l){if(st.call(l,"key")){var y=Object.getOwnPropertyDescriptor(l,"key").get;if(y&&y.isReactWarning)return!1}return l.key!==void 0}function Ll(l,y){if(typeof l.ref=="string"&&Ue.current&&y&&Ue.current.stateNode!==y){var D=L(Ue.current.type);Mt[D]||(O('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',L(Ue.current.type),l.ref),Mt[D]=!0)}}function Nl(l,y){{var D=function(){Qr||(Qr=!0,O("%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)",y))};D.isReactWarning=!0,Object.defineProperty(l,"key",{get:D,configurable:!0})}}function Wl(l,y){{var D=function(){en||(en=!0,O("%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)",y))};D.isReactWarning=!0,Object.defineProperty(l,"ref",{get:D,configurable:!0})}}var Bl=function(l,y,D,N,G,Z,V){var U={$$typeof:t,type:l,key:y,ref:D,props:V,_owner:Z};return U._store={},Object.defineProperty(U._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(U,"_self",{configurable:!1,enumerable:!1,writable:!1,value:N}),Object.defineProperty(U,"_source",{configurable:!1,enumerable:!1,writable:!1,value:G}),Object.freeze&&(Object.freeze(U.props),Object.freeze(U)),U};function Hl(l,y,D,N,G){{var Z,V={},U=null,le=null;D!==void 0&&(Zr(D),U=""+D),zl(y)&&(Zr(y.key),U=""+y.key),kl(y)&&(le=y.ref,Ll(y,G));for(Z in y)st.call(y,Z)&&!Il.hasOwnProperty(Z)&&(V[Z]=y[Z]);if(l&&l.defaultProps){var te=l.defaultProps;for(Z in te)V[Z]===void 0&&(V[Z]=te[Z])}if(U||le){var re=typeof l=="function"?l.displayName||l.name||"Unknown":l;U&&Nl(V,re),le&&Wl(V,re)}return Bl(l,U,le,G,N,Ue.current,V)}}var Rt=k.ReactCurrentOwner,tn=k.ReactDebugCurrentFrame;function Me(l){if(l){var y=l._owner,D=Ae(l.type,l._source,y?y.type:null);tn.setExtraStackFrame(D)}else tn.setExtraStackFrame(null)}var It;It=!1;function kt(l){return typeof l=="object"&&l!==null&&l.$$typeof===t}function rn(){{if(Rt.current){var l=L(Rt.current.type);if(l)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+l+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+l+"`."}return""}}function Ul(l){return""}var nn={};function Vl(l){{var y=rn();if(!y){var D=typeof l=="string"?l:l.displayName||l.name;D&&(y=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+D+">.")}return v}}function rn(l,v){{if(!l._store||l._store.validated||l.key!=null)return;l._store.validated=!0;var D=Bl(v);if(tn[D])return;tn[D]=!0;var L="";l&&l._owner&&l._owner!==Mt.current&&(L=" It was passed a child from "+W(l._owner.type)+"."),Me(l),A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',D,L),Me(null)}}function nn(l,v){{if(typeof l!="object")return;if(Ot(l))for(var D=0;D<l.length;D++){var L=l[D];It(L)&&rn(L,v)}else if(It(l))l._store&&(l._store.validated=!0);else if(l){var X=S(l);if(typeof X=="function"&&X!==l.entries)for(var Q=X.call(l),Y;!(Y=Q.next()).done;)It(Y.value)&&rn(Y.value,v)}}}function Ul(l){{var v=l.type;if(v==null||typeof v=="string")return;var D;if(typeof v=="function")D=v.propTypes;else if(typeof v=="object"&&(v.$$typeof===c||v.$$typeof===h))D=v.propTypes;else return;if(D){var L=W(v);El(D,l.props,"prop",L,l)}else if(v.PropTypes!==void 0&&!Rt){Rt=!0;var X=W(v);A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",X||"Unknown")}typeof v.getDefaultProps=="function"&&!v.getDefaultProps.isReactClassApproved&&A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Vl(l){{for(var v=Object.keys(l.props),D=0;D<v.length;D++){var L=v[D];if(L!=="children"&&L!=="key"){Me(l),A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",L),Me(null);break}}l.ref!==null&&(Me(l),A("Invalid attribute `ref` supplied to `React.Fragment`."),Me(null))}}function on(l,v,D,L,X,Q){{var Y=$(l);if(!Y){var U="";(l===void 0||typeof l=="object"&&l!==null&&Object.keys(l).length===0)&&(U+=" 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 le=Hl();le?U+=le:U+=en();var re;l===null?re="null":Ot(l)?re="array":l!==void 0&&l.$$typeof===t?(re="<"+(W(l.type)||"Unknown")+" />",U=" Did you accidentally export a JSX literal instead of a component?"):re=typeof l,A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",re,U)}var ne=Wl(l,v,D,X,Q);if(ne==null)return ne;if(Y){var he=v.children;if(he!==void 0)if(L)if(Ot(he)){for(var Re=0;Re<he.length;Re++)nn(he[Re],l);Object.freeze&&Object.freeze(he)}else A("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 nn(he,l)}return l===n?Vl(ne):Ul(ne),ne}}function Yl(l,v,D){return on(l,v,D,!0)}function ql(l,v,D){return on(l,v,D,!1)}var Gl=ql,Xl=Yl;ke.Fragment=n,ke.jsx=Gl,ke.jsxs=Xl}()),ke}process.env.NODE_ENV==="production"?ct.exports=un():ct.exports=fn();var m=ct.exports,Lt=typeof global=="object"&&global&&global.Object===Object&&global,dn=typeof self=="object"&&self&&self.Object===Object&&self,be=Lt||dn||Function("return this")(),Pe=be.Symbol,Nt=Object.prototype,pn=Nt.hasOwnProperty,hn=Nt.toString,ze=Pe?Pe.toStringTag:void 0;function gn(e){var t=pn.call(e,ze),r=e[ze];try{e[ze]=void 0;var n=!0}catch{}var o=hn.call(e);return n&&(t?e[ze]=r:delete e[ze]),o}var mn=Object.prototype,vn=mn.toString;function bn(e){return vn.call(e)}var yn="[object Null]",_n="[object Undefined]",Wt=Pe?Pe.toStringTag:void 0;function ye(e){return e==null?e===void 0?_n:yn:Wt&&Wt in Object(e)?gn(e):bn(e)}function ge(e){return e!=null&&typeof e=="object"}var wn="[object Symbol]";function ut(e){return typeof e=="symbol"||ge(e)&&ye(e)==wn}function Cn(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 ue=Array.isArray,xn=1/0,Ht=Pe?Pe.prototype:void 0,Bt=Ht?Ht.toString:void 0;function Ut(e){if(typeof e=="string")return e;if(ue(e))return Cn(e,Ut)+"";if(ut(e))return Bt?Bt.call(e):"";var t=e+"";return t=="0"&&1/e==-xn?"-0":t}function fe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Vt(e){return e}var Tn="[object AsyncFunction]",Sn="[object Function]",Pn="[object GeneratorFunction]",Dn="[object Proxy]";function oe(e){if(!fe(e))return!1;var t=ye(e);return t==Sn||t==Pn||t==Tn||t==Dn}var ft=be["__core-js_shared__"],Yt=function(){var e=/[^.]+$/.exec(ft&&ft.keys&&ft.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function $n(e){return!!Yt&&Yt in e}var jn=Function.prototype,En=jn.toString;function Ee(e){if(e!=null){try{return En.call(e)}catch{}try{return e+""}catch{}}return""}var Fn=/[\\^$.*+?()[\]{}|]/g,On=/^\[object .+?Constructor\]$/,An=Function.prototype,Mn=Object.prototype,Rn=An.toString,In=Mn.hasOwnProperty,kn=RegExp("^"+Rn.call(In).replace(Fn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function zn(e){if(!fe(e)||$n(e))return!1;var t=oe(e)?kn:On;return t.test(Ee(e))}function Ln(e,t){return e==null?void 0:e[t]}function Fe(e,t){var r=Ln(e,t);return zn(r)?r:void 0}var dt=Fe(be,"WeakMap"),qt=Object.create,Nn=function(){function e(){}return function(t){if(!fe(t))return{};if(qt)return qt(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Wn(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 Hn(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Bn=800,Un=16,Vn=Date.now;function Yn(e){var t=0,r=0;return function(){var n=Vn(),o=Un-(n-r);if(r=n,o>0){if(++t>=Bn)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function qn(e){return function(){return e}}var Ve=function(){try{var e=Fe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Gn=Ve?function(e,t){return Ve(e,"toString",{configurable:!0,enumerable:!1,value:qn(t),writable:!0})}:Vt,Xn=Yn(Gn),Kn=9007199254740991,Jn=/^(?:0|[1-9]\d*)$/;function pt(e,t){var r=typeof e;return t=t??Kn,!!t&&(r=="number"||r!="symbol"&&Jn.test(e))&&e>-1&&e%1==0&&e<t}function ht(e,t,r){t=="__proto__"&&Ve?Ve(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 Zn=Object.prototype,Qn=Zn.hasOwnProperty;function Gt(e,t,r){var n=e[t];(!(Qn.call(e,t)&&Le(n,r))||r===void 0&&!(t in e))&&ht(e,t,r)}function eo(e,t,r,n){var o=!r;r||(r={});for(var i=-1,a=t.length;++i<a;){var s=t[i],c=void 0;c===void 0&&(c=e[s]),o?ht(r,s,c):Gt(r,s,c)}return r}var Xt=Math.max;function to(e,t,r){return t=Xt(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=Xt(n.length-t,0),a=Array(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),Wn(e,this,s)}}function ro(e,t){return Xn(to(e,t,Vt),e+"")}var no=9007199254740991;function Kt(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=no}function Ye(e){return e!=null&&Kt(e.length)&&!oe(e)}function oo(e,t,r){if(!fe(r))return!1;var n=typeof t;return(n=="number"?Ye(r)&&pt(t,r.length):n=="string"&&t in r)?Le(r[t],e):!1}function so(e){return ro(function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,a&&oo(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,i)}return t})}var io=Object.prototype;function gt(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||io;return e===r}function ao(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var lo="[object Arguments]";function Jt(e){return ge(e)&&ye(e)==lo}var Zt=Object.prototype,co=Zt.hasOwnProperty,uo=Zt.propertyIsEnumerable,mt=Jt(function(){return arguments}())?Jt:function(e){return ge(e)&&co.call(e,"callee")&&!uo.call(e,"callee")};function fo(){return!1}var Qt=typeof q=="object"&&q&&!q.nodeType&&q,er=Qt&&typeof module=="object"&&module&&!module.nodeType&&module,po=er&&er.exports===Qt,tr=po?be.Buffer:void 0,ho=tr?tr.isBuffer:void 0,qe=ho||fo,go="[object Arguments]",mo="[object Array]",vo="[object Boolean]",bo="[object Date]",yo="[object Error]",_o="[object Function]",wo="[object Map]",Co="[object Number]",xo="[object Object]",To="[object RegExp]",So="[object Set]",Po="[object String]",Do="[object WeakMap]",$o="[object ArrayBuffer]",jo="[object DataView]",Eo="[object Float32Array]",Fo="[object Float64Array]",Oo="[object Int8Array]",Ao="[object Int16Array]",Mo="[object Int32Array]",Ro="[object Uint8Array]",Io="[object Uint8ClampedArray]",ko="[object Uint16Array]",zo="[object Uint32Array]",ee={};ee[Eo]=ee[Fo]=ee[Oo]=ee[Ao]=ee[Mo]=ee[Ro]=ee[Io]=ee[ko]=ee[zo]=!0,ee[go]=ee[mo]=ee[$o]=ee[vo]=ee[jo]=ee[bo]=ee[yo]=ee[_o]=ee[wo]=ee[Co]=ee[xo]=ee[To]=ee[So]=ee[Po]=ee[Do]=!1;function Lo(e){return ge(e)&&Kt(e.length)&&!!ee[ye(e)]}function No(e){return function(t){return e(t)}}var rr=typeof q=="object"&&q&&!q.nodeType&&q,Ne=rr&&typeof module=="object"&&module&&!module.nodeType&&module,Wo=Ne&&Ne.exports===rr,vt=Wo&&Lt.process,nr=function(){try{var e=Ne&&Ne.require&&Ne.require("util").types;return e||vt&&vt.binding&&vt.binding("util")}catch{}}(),or=nr&&nr.isTypedArray,bt=or?No(or):Lo,Ho=Object.prototype,Bo=Ho.hasOwnProperty;function sr(e,t){var r=ue(e),n=!r&&mt(e),o=!r&&!n&&qe(e),i=!r&&!n&&!o&&bt(e),a=r||n||o||i,s=a?ao(e.length,String):[],c=s.length;for(var u in e)(t||Bo.call(e,u))&&!(a&&(u=="length"||o&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||pt(u,c)))&&s.push(u);return s}function ir(e,t){return function(r){return e(t(r))}}var Uo=ir(Object.keys,Object),Vo=Object.prototype,Yo=Vo.hasOwnProperty;function qo(e){if(!gt(e))return Uo(e);var t=[];for(var r in Object(e))Yo.call(e,r)&&r!="constructor"&&t.push(r);return t}function Go(e){return Ye(e)?sr(e):qo(e)}function Xo(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Ko=Object.prototype,Jo=Ko.hasOwnProperty;function Zo(e){if(!fe(e))return Xo(e);var t=gt(e),r=[];for(var n in e)n=="constructor"&&(t||!Jo.call(e,n))||r.push(n);return r}function ar(e){return Ye(e)?sr(e,!0):Zo(e)}var Qo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,es=/^\w*$/;function ts(e,t){if(ue(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ut(e)?!0:es.test(e)||!Qo.test(e)||t!=null&&e in Object(t)}var We=Fe(Object,"create");function rs(){this.__data__=We?We(null):{},this.size=0}function ns(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var os="__lodash_hash_undefined__",ss=Object.prototype,is=ss.hasOwnProperty;function as(e){var t=this.__data__;if(We){var r=t[e];return r===os?void 0:r}return is.call(t,e)?t[e]:void 0}var ls=Object.prototype,cs=ls.hasOwnProperty;function us(e){var t=this.__data__;return We?t[e]!==void 0:cs.call(t,e)}var fs="__lodash_hash_undefined__";function ds(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=We&&t===void 0?fs:t,this}function Oe(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])}}Oe.prototype.clear=rs,Oe.prototype.delete=ns,Oe.prototype.get=as,Oe.prototype.has=us,Oe.prototype.set=ds;function ps(){this.__data__=[],this.size=0}function Ge(e,t){for(var r=e.length;r--;)if(Le(e[r][0],t))return r;return-1}var hs=Array.prototype,gs=hs.splice;function ms(e){var t=this.__data__,r=Ge(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():gs.call(t,r,1),--this.size,!0}function vs(e){var t=this.__data__,r=Ge(t,e);return r<0?void 0:t[r][1]}function bs(e){return Ge(this.__data__,e)>-1}function ys(e,t){var r=this.__data__,n=Ge(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function we(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])}}we.prototype.clear=ps,we.prototype.delete=ms,we.prototype.get=vs,we.prototype.has=bs,we.prototype.set=ys;var He=Fe(be,"Map");function _s(){this.size=0,this.__data__={hash:new Oe,map:new(He||we),string:new Oe}}function ws(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Xe(e,t){var r=e.__data__;return ws(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Cs(e){var t=Xe(this,e).delete(e);return this.size-=t?1:0,t}function xs(e){return Xe(this,e).get(e)}function Ts(e){return Xe(this,e).has(e)}function Ss(e,t){var r=Xe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Ce(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])}}Ce.prototype.clear=_s,Ce.prototype.delete=Cs,Ce.prototype.get=xs,Ce.prototype.has=Ts,Ce.prototype.set=Ss;var Ps="Expected a function";function yt(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Ps);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(yt.Cache||Ce),r}yt.Cache=Ce;var Ds=500;function $s(e){var t=yt(e,function(n){return r.size===Ds&&r.clear(),n}),r=t.cache;return t}var js=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Es=/\\(\\)?/g,Fs=$s(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(js,function(r,n,o,i){t.push(o?i.replace(Es,"$1"):n||r)}),t});function Os(e){return e==null?"":Ut(e)}function As(e,t){return ue(e)?e:ts(e,t)?[e]:Fs(Os(e))}var Ms=1/0;function Rs(e){if(typeof e=="string"||ut(e))return e;var t=e+"";return t=="0"&&1/e==-Ms?"-0":t}function Is(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var lr=ir(Object.getPrototypeOf,Object),ks="[object Object]",zs=Function.prototype,Ls=Object.prototype,cr=zs.toString,Ns=Ls.hasOwnProperty,Ws=cr.call(Object);function Hs(e){if(!ge(e)||ye(e)!=ks)return!1;var t=lr(e);if(t===null)return!0;var r=Ns.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&cr.call(r)==Ws}function Bs(){this.__data__=new we,this.size=0}function Us(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Vs(e){return this.__data__.get(e)}function Ys(e){return this.__data__.has(e)}var qs=200;function Gs(e,t){var r=this.__data__;if(r instanceof we){var n=r.__data__;if(!He||n.length<qs-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ce(n)}return r.set(e,t),this.size=r.size,this}function xe(e){var t=this.__data__=new we(e);this.size=t.size}xe.prototype.clear=Bs,xe.prototype.delete=Us,xe.prototype.get=Vs,xe.prototype.has=Ys,xe.prototype.set=Gs;var ur=typeof q=="object"&&q&&!q.nodeType&&q,fr=ur&&typeof module=="object"&&module&&!module.nodeType&&module,Xs=fr&&fr.exports===ur,dr=Xs?be.Buffer:void 0;dr&&dr.allocUnsafe;function Ks(e,t){return e.slice()}function Js(e,t){for(var r=-1,n=e==null?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}function Zs(){return[]}var Qs=Object.prototype,ei=Qs.propertyIsEnumerable,pr=Object.getOwnPropertySymbols,ti=pr?function(e){return e==null?[]:(e=Object(e),Js(pr(e),function(t){return ei.call(e,t)}))}:Zs;function ri(e,t,r){var n=t(e);return ue(e)?n:Is(n,r(e))}function hr(e){return ri(e,Go,ti)}var _t=Fe(be,"DataView"),wt=Fe(be,"Promise"),Ct=Fe(be,"Set"),gr="[object Map]",ni="[object Object]",mr="[object Promise]",vr="[object Set]",br="[object WeakMap]",yr="[object DataView]",oi=Ee(_t),si=Ee(He),ii=Ee(wt),ai=Ee(Ct),li=Ee(dt),De=ye;(_t&&De(new _t(new ArrayBuffer(1)))!=yr||He&&De(new He)!=gr||wt&&De(wt.resolve())!=mr||Ct&&De(new Ct)!=vr||dt&&De(new dt)!=br)&&(De=function(e){var t=ye(e),r=t==ni?e.constructor:void 0,n=r?Ee(r):"";if(n)switch(n){case oi:return yr;case si:return gr;case ii:return mr;case ai:return vr;case li:return br}return t});var Ke=be.Uint8Array;function ci(e){var t=new e.constructor(e.byteLength);return new Ke(t).set(new Ke(e)),t}function ui(e,t){var r=ci(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}function fi(e){return typeof e.constructor=="function"&&!gt(e)?Nn(lr(e)):{}}var di="__lodash_hash_undefined__";function pi(e){return this.__data__.set(e,di),this}function hi(e){return this.__data__.has(e)}function Je(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Ce;++t<r;)this.add(e[t])}Je.prototype.add=Je.prototype.push=pi,Je.prototype.has=hi;function gi(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 mi(e,t){return e.has(t)}var vi=1,bi=2;function _r(e,t,r,n,o,i){var a=r&vi,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var u=i.get(e),f=i.get(t);if(u&&f)return u==t&&f==e;var h=-1,p=!0,w=r&bi?new Je:void 0;for(i.set(e,t),i.set(t,e);++h<s;){var g=e[h],C=t[h];if(n)var S=a?n(C,g,h,t,e,i):n(g,C,h,e,t,i);if(S!==void 0){if(S)continue;p=!1;break}if(w){if(!gi(t,function(R,A){if(!mi(w,A)&&(g===R||o(g,R,r,n,i)))return w.push(A)})){p=!1;break}}else if(!(g===C||o(g,C,r,n,i))){p=!1;break}}return i.delete(e),i.delete(t),p}function yi(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function _i(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var wi=1,Ci=2,xi="[object Boolean]",Ti="[object Date]",Si="[object Error]",Pi="[object Map]",Di="[object Number]",$i="[object RegExp]",ji="[object Set]",Ei="[object String]",Fi="[object Symbol]",Oi="[object ArrayBuffer]",Ai="[object DataView]",wr=Pe?Pe.prototype:void 0,xt=wr?wr.valueOf:void 0;function Mi(e,t,r,n,o,i,a){switch(r){case Ai:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Oi:return!(e.byteLength!=t.byteLength||!i(new Ke(e),new Ke(t)));case xi:case Ti:case Di:return Le(+e,+t);case Si:return e.name==t.name&&e.message==t.message;case $i:case Ei:return e==t+"";case Pi:var s=yi;case ji:var c=n&wi;if(s||(s=_i),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;n|=Ci,a.set(e,t);var f=_r(s(e),s(t),n,o,i,a);return a.delete(e),f;case Fi:if(xt)return xt.call(e)==xt.call(t)}return!1}var Ri=1,Ii=Object.prototype,ki=Ii.hasOwnProperty;function zi(e,t,r,n,o,i){var a=r&Ri,s=hr(e),c=s.length,u=hr(t),f=u.length;if(c!=f&&!a)return!1;for(var h=c;h--;){var p=s[h];if(!(a?p in t:ki.call(t,p)))return!1}var w=i.get(e),g=i.get(t);if(w&&g)return w==t&&g==e;var C=!0;i.set(e,t),i.set(t,e);for(var S=a;++h<c;){p=s[h];var R=e[p],A=t[p];if(n)var V=a?n(A,R,p,t,e,i):n(R,A,p,e,t,i);if(!(V===void 0?R===A||o(R,A,r,n,i):V)){C=!1;break}S||(S=p=="constructor")}if(C&&!S){var K=e.constructor,G=t.constructor;K!=G&&"constructor"in e&&"constructor"in t&&!(typeof K=="function"&&K instanceof K&&typeof G=="function"&&G instanceof G)&&(C=!1)}return i.delete(e),i.delete(t),C}var Li=1,Cr="[object Arguments]",xr="[object Array]",Ze="[object Object]",Ni=Object.prototype,Tr=Ni.hasOwnProperty;function Wi(e,t,r,n,o,i){var a=ue(e),s=ue(t),c=a?xr:De(e),u=s?xr:De(t);c=c==Cr?Ze:c,u=u==Cr?Ze:u;var f=c==Ze,h=u==Ze,p=c==u;if(p&&qe(e)){if(!qe(t))return!1;a=!0,f=!1}if(p&&!f)return i||(i=new xe),a||bt(e)?_r(e,t,r,n,o,i):Mi(e,t,c,r,n,o,i);if(!(r&Li)){var w=f&&Tr.call(e,"__wrapped__"),g=h&&Tr.call(t,"__wrapped__");if(w||g){var C=w?e.value():e,S=g?t.value():t;return i||(i=new xe),o(C,S,r,n,i)}}return p?(i||(i=new xe),zi(e,t,r,n,o,i)):!1}function Sr(e,t,r,n,o){return e===t?!0:e==null||t==null||!ge(e)&&!ge(t)?e!==e&&t!==t:Wi(e,t,r,n,Sr,o)}function Hi(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var c=a[++o];if(r(i[c],c,i)===!1)break}return t}}var Bi=Hi();function Tt(e,t,r){(r!==void 0&&!Le(e[t],r)||r===void 0&&!(t in e))&&ht(e,t,r)}function Ui(e){return ge(e)&&Ye(e)}function St(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Vi(e){return eo(e,ar(e))}function Yi(e,t,r,n,o,i,a){var s=St(e,r),c=St(t,r),u=a.get(c);if(u){Tt(e,r,u);return}var f=i?i(s,c,r+"",e,t,a):void 0,h=f===void 0;if(h){var p=ue(c),w=!p&&qe(c),g=!p&&!w&&bt(c);f=c,p||w||g?ue(s)?f=s:Ui(s)?f=Hn(s):w?(h=!1,f=Ks(c)):g?(h=!1,f=ui(c)):f=[]:Hs(c)||mt(c)?(f=s,mt(s)?f=Vi(s):(!fe(s)||oe(s))&&(f=fi(c))):h=!1}h&&(a.set(c,f),o(f,c,n,i,a),a.delete(c)),Tt(e,r,f)}function Pr(e,t,r,n,o){e!==t&&Bi(t,function(i,a){if(o||(o=new xe),fe(i))Yi(e,t,a,r,Pr,n,o);else{var s=n?n(St(e,a),i,a+"",e,t,o):void 0;s===void 0&&(s=i),Tt(e,a,s)}},ar)}var qi="[object String]";function Dr(e){return typeof e=="string"||!ue(e)&&ge(e)&&ye(e)==qi}var Gi="[object Boolean]";function Pt(e){return e===!0||e===!1||ge(e)&&ye(e)==Gi}function Qe(e,t){return Sr(e,t)}var Xi="[object Number]";function Ki(e){return typeof e=="number"||ge(e)&&ye(e)==Xi}function $r(e){return e==null}function Ji(e){return e===null}var $e=so(function(e,t,r){Pr(e,t,r)});function Zi(e,t,r,n){if(!fe(e))return e;t=As(t,e);for(var o=-1,i=t.length,a=i-1,s=e;s!=null&&++o<i;){var c=Rs(t[o]),u=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(o!=a){var f=s[c];u=void 0,u===void 0&&(u=fe(f)?f:pt(t[o+1])?[]:{})}Gt(s,c,u),s=s[c]}return e}function jr(e,t,r){return e==null?e:Zi(e,t,r)}function Qi(e){const{inherit:t=!0}=e,{extendActionsProps:r}=Ar();return{actionsProps:{...$e($e({items:[],max:10},t?r:{}),e)}}}function Er(e){return"component"in e}function ea(e){return"render"in e}function ta(e){const{type:t,disabled:r,items:n,max:o}=e,i=n.map(s=>{const c={...s};return Er(c)&&(c.componentProps={type:t,disabled:r,...c.componentProps}),c}),a=Ki(o)&&o>=0;return{showActionItems:i.slice(0,a?o:i.length),ellipsisActionItems:i.slice(a?o:i.length)}}const ra=e=>{const{componentProps:t}=e,r=()=>{const{...n}=t;return n};return m.jsx(F.Button,{...r()})},na=e=>{const{componentProps:t}=e,n=(()=>{const{dropDownItems:o,onClick:i,...a}=t;return a})();return m.jsx(F.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(F.Button,{...n,children:[n.children,m.jsx(ve.CaretDownOutlined,{})]})})})},et=new Map;et.set("Button",ra),et.set("Dropdown",na);function Fr(){const{setExtendActionsComp:e}=Ar();return e(et),{renderContent:d.useCallback((r,n)=>{const o=Er(r),i=ea(r);if(o){const a=et.get(r.component);return m.jsx(a,{...r},n)}return i?m.jsx("div",{children:r.render},n):null},[])}}const Or=d.createContext({}),oa=e=>{const{extendProps:t,extendComp:r}=e.value;return m.jsx(Or.Provider,{value:{extendProps:t,extendComp:r},children:e.children})},Be=()=>d.useContext(Or),Ar=()=>{const{extendProps:e,extendComp:t}=Be(),r=n=>{const o=t==null?void 0:t.actions;o&&Object.keys(o).forEach(i=>{n.set(i,o[i])})};return{extendActionsProps:e==null?void 0:e.actions,setExtendActionsComp:r}},{useToken:sa}=F.theme,ia=({items:e,actionsProps:t})=>{const{type:r,disabled:n}=t,{renderContent:o}=Fr(),{token:i}=sa(),a={backgroundColor:i.colorBgElevated,borderRadius:i.borderRadiusLG,boxShadow:i.boxShadowSecondary},s=()=>m.jsx("div",{style:a,children:m.jsx(F.Space,{style:{padding:8},children:e==null?void 0:e.map((c,u)=>o(c,u))})});return m.jsx(F.Dropdown,{disabled:n,menu:{items:[]},dropdownRender:s,trigger:["click"],children:m.jsxs(F.Button,{type:r,children:["更多",m.jsx(ve.CaretDownOutlined,{})]})})},tt=e=>{const{actionsProps:t}=Qi(e),{showActionItems:r,ellipsisActionItems:n}=ta(t),{renderContent:o}=Fr();return t!=null&&t.render?t.render:m.jsxs(d.Fragment,{children:[r==null?void 0:r.map((i,a)=>o(i,a)),n!=null&&n.length?m.jsx(ia,{actionsProps:t,items:n}):null]})};function aa(e){const{okText:t,cancelText:r,onCancel:n,onOk:o,okProps:i,cancelProps:a}=e;return{footerActions:{max:2,items:[{component:"Button",componentProps:{...a,children:r,onClick:n}},{component:"Button",componentProps:{type:"primary",...i,children:t,onClick:o}}]}}}const la=e=>{const{extendDialogProps:t}=ca(),r={width:700,okText:"确定",cancelText:"取消",getPopperContainer:()=>document.body};return{dialogProps:{...$e($e(r,t),e)},baseDialogProps:r}},ca=()=>{const{extendProps:e}=Be();return{extendDialogProps:e==null?void 0:e.dialog}},ua=(e,t)=>{const{onOpen:r,onClose:n}=e;return{open:()=>{t(!0),r&&r()},close:()=>{t(!1),n&&n()}}},fa=(e,t,r,n)=>{const{width:o,height:i}=t,{width:a,height:s}=r,c=a||o,u=s||i,{clientWidth:f,clientHeight:h}=e,p=c?c>f?f:c:0,w=u?u>h?h:u:"unset",g=d.useRef(p),C=d.useRef(w),[S,R]=d.useState(g.current),[A,V]=d.useState(C.current);return{dialogWidth:S,dialogHeight:A,initWidth:g,initHeight:C,curPropsWidth:p,curPropsHeight:w,setDialogSize:({width:G,height:Z})=>{n({width:S,height:A}),G!==void 0&&R(G),Z!==void 0&&V(Z)}}},da=({container:e,setDialogChangeRecord:t})=>{const{clientWidth:r,clientHeight:n}=e,o=Math.floor(r/2),i=Math.floor(n/2),[a,s]=d.useState(o),[c,u]=d.useState(i);return{dialogLeft:a,dialogTop:c,setDialogPosition:({left:h,top:p})=>{t({left:a,top:c}),h!==void 0&&s(h),p!==void 0&&u(p)}}},Mr=({container:e,dialogHeaderRef:t,dialogRef:r,setDialogPosition:n})=>{const o=d.useRef(0),i=d.useRef(0),a=f=>{const h=f.getBoundingClientRect(),p=h.width,w=h.height,g=-.5*p,C=-.5*w;return{translateX:g,translateY:C}},s=d.useCallback(f=>{const{offsetLeft:h,offsetTop:p}=r.current;o.current=f.clientX-h,i.current=f.clientY-p,document.addEventListener("mousemove",c),document.addEventListener("mouseup",u)},[]),c=d.useCallback(f=>{const h=r.current,{translateX:p,translateY:w}=a(h);let g=f.clientX-o.current,C=f.clientY-i.current;const S=-p,R=-w,A=e.scrollWidth-h.offsetWidth-p,V=e.scrollHeight-h.offsetHeight-w;g<S&&(g=S),g>A&&(g=A),C<R&&(C=R),C>V&&(C=V),n({left:g,top:C})},[]),u=d.useCallback(()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u)},[]);return d.useEffect(()=>{const f=t.current;return f.addEventListener("mousedown",s),()=>{f.removeEventListener("mousedown",s)}},[]),{}},pa=({container:e,dialogChangeRecord:t,close:r,setDialogSize:n,setDialogPosition:o})=>{const[i,a]=d.useState(!1),[s,c]=d.useState(!1);return{minimizeVisible:i,maximizeVisible:s,onMinimize:()=>{a(!0)},onMaximize:w=>{if(w==="minimize"&&a(!1),w==="maximize"){const{scrollWidth:g,scrollHeight:C}=e,S=Math.floor(g),R=Math.floor(C),A=Math.floor(g/2),V=Math.floor(C/2);n({width:S,height:R}),o({top:V,left:A}),c(!0)}},onRecovery:()=>{const{top:w,left:g,width:C,height:S}=t.current;n({width:C,height:S}),o({top:w,left:g}),c(!1)},onClose:()=>{a(!1),c(!1),r()}}},ha=({visible:e,container:t,dialogHeight:r,dialogRef:n,dialogHeaderRef:o,dialogFooterRef:i})=>{const[a,s]=d.useState("unset");return d.useEffect(()=>{var c,u,f;if(e){const{clientHeight:w}=t,g=(c=o.current)==null?void 0:c.offsetHeight,C=(u=i.current)==null?void 0:u.offsetHeight;let R=((f=n.current)==null?void 0:f.getBoundingClientRect().height)-g-C-0;const A=w-g-C-0;R>A&&(R=A),s(R)}},[e,r]),{contentMaxHeight:a,setContentMaxHeight:s}},ga=()=>{const[e,t]=d.useState(160),[r,n]=d.useState(60),o=d.useRef(null);return{minimizeTop:r,minimizeLeft:e,minimizeRef:o,setMinimizePosition:({left:a,top:s})=>{a!==void 0&&t(a),s!==void 0&&n(s)}}},ma=({visible:e,dialogRef:t,minimizeRef:r,container:n})=>{const o={xphDialog:"xph--dialog",xphDialogWrapper:"xph--dialog--wrapper",xphMinimizeDialog:"xph--dialog--minimize"},i=(s,c)=>{console.log("触发插入"),s.querySelector(`.${o.xphDialogWrapper}`).style.opacity="unset",s.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(s,u),c.parentNode.removeChild(u)},a=s=>{var f,h;const c=n.querySelectorAll(`.${o.xphDialog}`),u=c[c.length-1];if(((f=t.current)==null?void 0:f.parentNode)!==u&&(i((h=t.current)==null?void 0:h.parentNode,u),s)){const p=s.target;p.tagName==="INPUT"&&p.focus&&p.focus()}};return d.useEffect(()=>{var s,c;return(s=t.current)==null||s.addEventListener("mousedown",a,!1),(c=r.current)==null||c.addEventListener("mousedown",a,!1),()=>{var u,f;(u=t.current)==null||u.removeEventListener("mousedown",a,!1),(f=r.current)==null||f.removeEventListener("mousedown",a,!1)}},[]),d.useEffect(()=>{if(e)a();else{const s=Array.from(n.querySelectorAll(`.${o.xphDialog}`)),c=s.map(p=>p.querySelector(`.${o.xphDialogWrapper}`)).filter(p=>p!==null),u=s.map(p=>p.querySelector(`.${o.xphMinimizeDialog}`)).filter(p=>p!==null),f=c.filter(p=>p.style.display==="flex"),h=u.filter(p=>p.style.display==="flex");if(f.length){i(f[f.length-1].parentNode,s[s.length-1]);return}if(h.length){i(h[h.length-1].parentNode,s[s.length-1]);return}}},[e]),{dialogTopShowClassConfig:o}},va=({visible:e,container:t,initWidth:r,initHeight:n,curPropsWidth:o,curPropsHeight:i,setDialogSize:a,setDialogPosition:s})=>{const{clientWidth:c,clientHeight:u}=t,f=Math.floor(c/2),h=Math.floor(u/2);d.useEffect(()=>{o!==r.current&&(console.log("重新设置了宽度"),a({width:o})),i!==n.current&&(console.log("重新设置了高度"),a({height:i}))},[o,i]),d.useEffect(()=>{o!==r.current&&(console.log("重新设置了左边位置"),s({left:f})),i!==n.current&&(console.log("重新设置了上边位置"),s({top:h}))},[o,i]),d.useEffect(()=>{e||(a({width:r.current,height:n.current}),s({left:f,top:h}))},[e])},ba=()=>{const e=d.useRef({left:0,top:0,width:0,height:0});return{dialogChangeRecord:e,setDialogChangeRecord:({left:r,top:n,width:o,height:i})=>{const{left:a,top:s,width:c,height:u}=e.current;e.current={left:r??a,top:n??s,width:o??c,height:i??u}}}},ya=({visible:e,container:t,dialogRef:r,setDialogSize:n,setDialogPosition:o})=>{const i=d.useCallback(()=>m.jsx("div",{ref:s,style:{position:"absolute",border:"4px dashed #ccc",display:"none"}}),[]),a=d.useRef(null);d.useEffect(()=>{if(e){const y=r.current.offsetWidth,E=r.current.offsetHeight;a.current={width:y,height:E}}else a.current=null},[e]);const s=d.useRef(null),c=d.useRef(),u=d.useRef(!1),[f,h]=d.useState(!1),p=d.useRef(0),w=d.useRef(0),g=(y,E)=>{u.current=!0,h(!0),c.current=E;const{clientX:$,clientY:P}=y;p.current=$,w.current=P;const z=parseFloat(r.current.style.left),W=parseFloat(r.current.style.top),T=r.current.offsetWidth,b=r.current.offsetHeight;s.current.style.display="block",s.current.style.left=`${z-.5*T}px`,s.current.style.top=`${W-.5*b}px`,s.current.style.width=`${T}px`,s.current.style.height=`${b}px`},C=y=>{if(u.current){const{clientX:E,clientY:$}=y,P=E-p.current,z=$-w.current,W=parseFloat(s.current.style.left),T=parseFloat(s.current.style.top),b=s.current.offsetWidth,_=s.current.offsetHeight,j=a.current.width,x=a.current.height,I=t.scrollWidth,M=t.scrollHeight;let O=b,k=_,H=W,B=T;switch(c.current){case"lt":{O=O-P,k=k-z,B=B+z,H=H+P,O<j&&(O=b,H=W),k<x&&(k=_,B=T),H<0&&(H=0,O=b),B<0&&(B=0,k=_);break}case"rt":{O=O+P,k=k-z,B=B+z,H=W,O<j&&(O=b),k<x&&(k=_,B=T),O>I-H&&(O=I-H),B<0&&(B=0,k=_);break}case"rb":{O=O+P,k=k+z,B=T,H=W,O<j&&(O=b),k<x&&(k=_),O>I-H&&(O=I-H),k>M-B&&(k=M-B);break}case"lb":{O=O-P,k=k+z,B=T,H=H+P,O<j&&(O=b,H=W),k<x&&(k=_),H<0&&(H=0,O=b),k>M-B&&(k=M-B);break}}s.current.style.left=`${H}px`,s.current.style.top=`${B}px`,s.current.style.width=`${O}px`,s.current.style.height=`${k}px`,p.current=E,w.current=$}},S=()=>{if(u.current){u.current=!1,h(!1),s.current.style.display="none";const{left:y,top:E,width:$,height:P}=s.current.style,z=parseFloat(y)+.5*parseFloat($),W=parseFloat(E)+.5*parseFloat(P),T=parseFloat($),b=parseFloat(P);console.log(z,W,T,b),o({left:z,top:W}),n({width:T,height:b})}},R=y=>g(y,"lt"),A=y=>g(y,"rt"),V=y=>g(y,"rb"),K=y=>g(y,"lb"),G=d.useCallback(y=>{C(y)},[]),Z=d.useCallback(()=>{S()},[]),N=d.useCallback(()=>{S()},[]);return d.useEffect(()=>(document.body.addEventListener("mousemove",G),document.body.addEventListener("mouseup",Z),document.body.addEventListener("mouseleave",N),()=>{document.body.removeEventListener("mousemove",G),document.body.removeEventListener("mouseup",Z),document.body.removeEventListener("mouseleave",N)}),[]),{resizingState:f,DashedBox:i,onMousedownResizeLt:R,onMousedownResizeRt:A,onMousedownResizeRb:V,onMousedownResizeLb:K}},Dt={"minimize-windows":"_minimize-windows_12u3y_1","minimize-windows-title":"_minimize-windows-title_12u3y_43","minimize-windows-operate":"_minimize-windows-operate_12u3y_55"},_a=({onClick:e})=>m.jsx(F.Button,{type:"link",onClick:e,icon:m.jsx(ve.ShrinkOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),Rr=({onClick:e})=>m.jsx(F.Button,{type:"link",onClick:e,icon:m.jsx(ve.FullscreenOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),wa=({onClick:e})=>m.jsx(F.Button,{type:"link",onClick:e,icon:m.jsx(ve.FullscreenExitOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),Ir=({onClick:e})=>m.jsx(F.Button,{type:"link",onClick:e,icon:m.jsx(ve.CloseOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),{useToken:Ca}=F.theme,xa=d.forwardRef(({title:e,left:t,top:r,visible:n,onMaximize:o,onClosesquare:i,className:a},s)=>{const{token:c}=Ca(),u={borderRadius:c.borderRadiusLG};return m.jsxs("div",{style:{display:n?"flex":"none",left:t,top:r,...u},className:`${Dt["minimize-windows"]} ${a}`,ref:s,children:[m.jsx("div",{className:Dt["minimize-windows-title"],title:e,children:e}),m.jsxs("div",{className:Dt["minimize-windows-operate"],children:[m.jsx(Rr,{onClick:o}),m.jsx(Ir,{onClick:i})]})]})}),ce={"xph-dialog-mask":"_xph-dialog-mask_18f3p_1","xph-dialog-wrapper":"_xph-dialog-wrapper_18f3p_23",dialog__header:"_dialog__header_18f3p_49","dialog__header-btns":"_dialog__header-btns_18f3p_67",dialog__main:"_dialog__main_18f3p_75",dialog__footer:"_dialog__footer_18f3p_89",dialog__resize:"_dialog__resize_18f3p_103","dialog__resize-lt":"_dialog__resize-lt_18f3p_117","dialog__resize-rt":"_dialog__resize-rt_18f3p_129","dialog__resize-rb":"_dialog__resize-rb_18f3p_141","dialog__resize-lb":"_dialog__resize-lb_18f3p_153"},{useToken:Ta}=F.theme,Sa=d.forwardRef((e,t)=>{console.log("render Dialog==============================================");const{token:r}=Ta(),n={borderRadius:r.borderRadiusLG},{children:o,baseDialogProps:i,mask:a}=e,[s,c]=d.useState(!1),{footerActions:u}=aa(e),{title:f,renderFooter:h,renderTitle:p,getPopperContainer:w}=e,{open:g,close:C}=ua(e,c),S=w(),R=d.useRef(null),A=d.useRef(null),V=d.useRef(null),K=d.useRef(null),{dialogChangeRecord:G,setDialogChangeRecord:Z}=ba(),{initWidth:N,initHeight:y,curPropsWidth:E,curPropsHeight:$,dialogWidth:P,dialogHeight:z,setDialogSize:W}=fa(S,i,e,Z),{dialogLeft:T,dialogTop:b,setDialogPosition:_}=da({container:S,setDialogChangeRecord:Z}),{contentMaxHeight:j}=ha({visible:s,container:S,dialogHeight:z,dialogRef:R,dialogHeaderRef:A,dialogFooterRef:K}),{minimizeLeft:x,minimizeTop:I,minimizeRef:M,setMinimizePosition:O}=ga(),{minimizeVisible:k,maximizeVisible:H,onMaximize:B,onMinimize:se,onRecovery:de,onClose:ie}=pa({container:S,dialogChangeRecord:G,close:C,setDialogSize:W,setDialogPosition:_});va({visible:s,container:S,initWidth:N,initHeight:y,curPropsWidth:E,curPropsHeight:$,setDialogSize:W,setDialogPosition:_}),Mr({container:S,dialogHeaderRef:A,dialogRef:R,setDialogPosition:_}),Mr({container:S,dialogHeaderRef:M,dialogRef:M,setDialogPosition:O});const{dialogTopShowClassConfig:ae}=ma({visible:s,container:S,dialogRef:R,minimizeRef:M}),{resizingState:te,DashedBox:pe,onMousedownResizeLt:_e,onMousedownResizeRt:je,onMousedownResizeRb:Ft,onMousedownResizeLb:Ae}=ya({visible:s,container:S,dialogRef:R,setDialogSize:W,setDialogPosition:_});return d.useImperativeHandle(t,()=>({open:g,close:ie})),m.jsxs("div",{className:ae.xphDialog,children:[a?m.jsx("div",{className:ce["xph-dialog-mask"],style:{display:s?"block":"none",width:S.scrollWidth,height:S.scrollHeight}}):null,m.jsx(xa,{visible:k,className:`${ae.xphMinimizeDialog}`,ref:M,left:x,top:I,title:f,onMaximize:()=>B("minimize"),onClosesquare:ie}),m.jsxs("div",{ref:R,className:`${ce["xph-dialog-wrapper"]} ${ae.xphDialogWrapper}`,style:{display:s&&!k?"flex":"none",left:T,top:b,width:P,height:z,opacity:te?.2:"unset",...n},children:[m.jsxs("div",{ref:A,className:ce.dialog__header,children:[m.jsx("div",{children:p?p():f}),m.jsxs("div",{className:ce["dialog__header-btns"],children:[m.jsx(_a,{onClick:se}),H?m.jsx(wa,{onClick:de}):m.jsx(Rr,{onClick:()=>B("maximize")}),m.jsx(Ir,{onClick:ie})]})]}),m.jsx("div",{ref:V,className:ce.dialog__main,style:{maxHeight:j},children:s?o:null}),h?m.jsx("div",{ref:K,children:h()}):m.jsx("div",{ref:K,className:ce.dialog__footer,children:m.jsx(tt,{...u})}),m.jsx("div",{className:`${ce.dialog__resize} ${ce["dialog__resize-lt"]}`,onMouseDown:_e}),m.jsx("div",{className:`${ce.dialog__resize} ${ce["dialog__resize-rt"]}`,onMouseDown:je}),m.jsx("div",{className:`${ce.dialog__resize} ${ce["dialog__resize-rb"]}`,onMouseDown:Ft}),m.jsx("div",{className:`${ce.dialog__resize} ${ce["dialog__resize-lb"]}`,onMouseDown:Ae})]}),m.jsx(pe,{})]})}),Pa=(e,t)=>{const{children:r,...n}=e,{baseDialogProps:o,dialogProps:i}=la(n),{getPopperContainer:a}=i;return console.log("render XphDialog=============================================="),m.jsx(zr,{getPopperContainer:a,children:m.jsx(Sa,{...i,baseDialogProps:o,ref:t,children:r})})},kr=d.forwardRef(Pa),zr=({children:e,getPopperContainer:t})=>{const[r,n]=d.useState(null);return d.useEffect(()=>{const o=t();n(o)},[]),r?an.createPortal(e,r):null};function $t(e){return"component"in e}function jt(e){return"render"in e}function Da(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 $a(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 ja=["DatePicker","MonthPicker","RangePicker","WeekPicker","TimePicker"],Ea=e=>{const{show:t,ifShow:r,required:n,disabled:o,componentProps:i}=e;return!!(oe(t)||oe(r)||oe(n)||oe(o)||oe(i)||jt(e))},Fa=e=>["application/json","application/javascript","text/plain","text/html","text/css"].includes(e)?`${e}; charset=utf-8`:e,Oa=(e,t,r)=>{const n=d.useRef(null),o=d.useRef(null),{handleCollapseChangeFalse:i}=r.current||{},{show:a,ifShow:s}=e;let c=!0,u=!0;if(Pt(a)&&(c=a),Pt(s)&&(u=s),oe(a)){c=a({model:t});const f=$r(n.current)?c:n.current;d.useEffect(()=>{Qe(c,f)||i&&i()},[t])}if(oe(s)){u=s({model:t});const f=$r(o.current)?u:o.current;d.useEffect(()=>{Qe(u,f)||i&&i()},[t])}return n.current=c,o.current=u,{isShow:c,isIfShow:u}},Aa=(e,t)=>{const{collapsible:r,collapseNum:n}=e,[o,i]=d.useState(!!(r&&t>=n));return{itemCollapse:o,setItemCollapse:i}},Ma=({item:e,model:t,isShow:r,componentProps:n})=>{const{rules:o=[],label:i,required:a}=e;let s=o;const c=$t(e),u=c?Da(e.component)+i:"";function f(g,C){const S=g.message||u;return C===void 0||Ji(C)||Array.isArray(C)&&C.length===0||typeof C=="string"&&C.trim()===""||typeof C=="object"&&Reflect.has(C,"checked")&&Reflect.has(C,"halfChecked")&&Array.isArray(C.checked)&&Array.isArray(C.halfChecked)&&C.checked.length===0&&C.halfChecked.length===0?Promise.reject(S):Promise.resolve()}const h=oe(a)?a({model:t}):a;h&&(!s||s.length===0?s=[{required:h,validator:f}]:s.findIndex(C=>Reflect.has(C,"required"))===-1&&s.push({required:h,validator:f}));const p=s.findIndex(g=>Reflect.has(g,"required")&&!Reflect.has(g,"validator"));if(p!==-1){const g=s[p];if(r||(g.required=!1),c){const{component:C}=e;Reflect.has(g,"type")||(g.type=C==="InputNumber"?"number":"string"),g.message=g.message||u,(C.includes("Input")||C.includes("Textarea"))&&(g.whitespace=!0);const S=n.valueFormat;$a(g,C,S)}}const w=s.findIndex(g=>g.max);return w!==-1&&!s[w].validator&&(s[w].message=s[w].message||`字符数应小于${s[w].max}位`),{rules:s}},Ra=(e,t,r)=>{const{disabled:n}=e;let o=!1;const{disabled:i}=t;return oe(i)&&(o=i({model:r})),Pt(i)&&(o=i),{disabled:Reflect.has(t,"disabled")?o:n}},Ia=(e,t)=>{const r={},{componentProps:n={}}=e;return oe(n)&&Object.assign(r,n({model:t})),Object.assign(r,n),{componentProps:r}},ka=(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}))}},La=(e,t)=>{const r=s=>(Object.keys(s).forEach(c=>{Object.defineProperty(s,c,{value:s[c],writable:!1,enumerable:!0,configurable:!1})}),s),n={};e.items.forEach(s=>{n[s.name]=s.initialValue});const o=Ea(t),i=o?F.Form.useWatch(s=>r(s)):null;return{rewritingModel:d.useMemo(()=>i||r(n),[i]),isusewatch:o}},Na=()=>{const e=d.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 d.useEffect(()=>(console.log("ParentComponent is mounted====================================="),()=>{console.log("ParentComponent is unmounted===================================="),e.current=null}),[]),[t,r]};var Lr={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(ln,function(){var r=1e3,n=6e4,o=36e5,i="millisecond",a="second",s="minute",c="hour",u="day",f="week",h="month",p="quarter",w="year",g="date",C="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,A={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(T){var b=["th","st","nd","rd"],_=T%100;return"["+T+(b[(_-20)%10]||b[_]||b[0])+"]"}},V=function(T,b,_){var j=String(T);return!j||j.length>=b?T:""+Array(b+1-j.length).join(_)+T},K={s:V,z:function(T){var b=-T.utcOffset(),_=Math.abs(b),j=Math.floor(_/60),x=_%60;return(b<=0?"+":"-")+V(j,2,"0")+":"+V(x,2,"0")},m:function T(b,_){if(b.date()<_.date())return-T(_,b);var j=12*(_.year()-b.year())+(_.month()-b.month()),x=b.clone().add(j,h),I=_-x<0,M=b.clone().add(j+(I?-1:1),h);return+(-(j+(_-x)/(I?x-M:M-x))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:h,y:w,w:f,d:u,D:g,h:c,m:s,s:a,ms:i,Q:p}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},G="en",Z={};Z[G]=A;var N="$isDayjsObject",y=function(T){return T instanceof z||!(!T||!T[N])},E=function T(b,_,j){var x;if(!b)return G;if(typeof b=="string"){var I=b.toLowerCase();Z[I]&&(x=I),_&&(Z[I]=_,x=I);var M=b.split("-");if(!x&&M.length>1)return T(M[0])}else{var O=b.name;Z[O]=b,x=O}return!j&&x&&(G=x),x||!j&&G},$=function(T,b){if(y(T))return T.clone();var _=typeof b=="object"?b:{};return _.date=T,_.args=arguments,new z(_)},P=K;P.l=E,P.i=y,P.w=function(T,b){return $(T,{locale:b.$L,utc:b.$u,x:b.$x,$offset:b.$offset})};var z=function(){function T(_){this.$L=E(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[N]=!0}var b=T.prototype;return b.parse=function(_){this.$d=function(j){var x=j.date,I=j.utc;if(x===null)return new Date(NaN);if(P.u(x))return new Date;if(x instanceof Date)return new Date(x);if(typeof x=="string"&&!/Z$/i.test(x)){var M=x.match(S);if(M){var O=M[2]-1||0,k=(M[7]||"0").substring(0,3);return I?new Date(Date.UTC(M[1],O,M[3]||1,M[4]||0,M[5]||0,M[6]||0,k)):new Date(M[1],O,M[3]||1,M[4]||0,M[5]||0,M[6]||0,k)}}return new Date(x)}(_),this.init()},b.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},b.$utils=function(){return P},b.isValid=function(){return this.$d.toString()!==C},b.isSame=function(_,j){var x=$(_);return this.startOf(j)<=x&&x<=this.endOf(j)},b.isAfter=function(_,j){return $(_)<this.startOf(j)},b.isBefore=function(_,j){return this.endOf(j)<$(_)},b.$g=function(_,j,x){return P.u(_)?this[j]:this.set(x,_)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(_,j){var x=this,I=!!P.u(j)||j,M=P.p(_),O=function(ae,te){var pe=P.w(x.$u?Date.UTC(x.$y,te,ae):new Date(x.$y,te,ae),x);return I?pe:pe.endOf(u)},k=function(ae,te){return P.w(x.toDate()[ae].apply(x.toDate("s"),(I?[0,0,0,0]:[23,59,59,999]).slice(te)),x)},H=this.$W,B=this.$M,se=this.$D,de="set"+(this.$u?"UTC":"");switch(M){case w:return I?O(1,0):O(31,11);case h:return I?O(1,B):O(0,B+1);case f:var ie=this.$locale().weekStart||0,me=(H<ie?H+7:H)-ie;return O(I?se-me:se+(6-me),B);case u:case g:return k(de+"Hours",0);case c:return k(de+"Minutes",1);case s:return k(de+"Seconds",2);case a:return k(de+"Milliseconds",3);default:return this.clone()}},b.endOf=function(_){return this.startOf(_,!1)},b.$set=function(_,j){var x,I=P.p(_),M="set"+(this.$u?"UTC":""),O=(x={},x[u]=M+"Date",x[g]=M+"Date",x[h]=M+"Month",x[w]=M+"FullYear",x[c]=M+"Hours",x[s]=M+"Minutes",x[a]=M+"Seconds",x[i]=M+"Milliseconds",x)[I],k=I===u?this.$D+(j-this.$W):j;if(I===h||I===w){var H=this.clone().set(g,1);H.$d[O](k),H.init(),this.$d=H.set(g,Math.min(this.$D,H.daysInMonth())).$d}else O&&this.$d[O](k);return this.init(),this},b.set=function(_,j){return this.clone().$set(_,j)},b.get=function(_){return this[P.p(_)]()},b.add=function(_,j){var x,I=this;_=Number(_);var M=P.p(j),O=function(B){var se=$(I);return P.w(se.date(se.date()+Math.round(B*_)),I)};if(M===h)return this.set(h,this.$M+_);if(M===w)return this.set(w,this.$y+_);if(M===u)return O(1);if(M===f)return O(7);var k=(x={},x[s]=n,x[c]=o,x[a]=r,x)[M]||1,H=this.$d.getTime()+_*k;return P.w(H,this)},b.subtract=function(_,j){return this.add(-1*_,j)},b.format=function(_){var j=this,x=this.$locale();if(!this.isValid())return x.invalidDate||C;var I=_||"YYYY-MM-DDTHH:mm:ssZ",M=P.z(this),O=this.$H,k=this.$m,H=this.$M,B=x.weekdays,se=x.months,de=x.meridiem,ie=function(te,pe,_e,je){return te&&(te[pe]||te(j,I))||_e[pe].slice(0,je)},me=function(te){return P.s(O%12||12,te,"0")},ae=de||function(te,pe,_e){var je=te<12?"AM":"PM";return _e?je.toLowerCase():je};return I.replace(R,function(te,pe){return pe||function(_e){switch(_e){case"YY":return String(j.$y).slice(-2);case"YYYY":return P.s(j.$y,4,"0");case"M":return H+1;case"MM":return P.s(H+1,2,"0");case"MMM":return ie(x.monthsShort,H,se,3);case"MMMM":return ie(se,H);case"D":return j.$D;case"DD":return P.s(j.$D,2,"0");case"d":return String(j.$W);case"dd":return ie(x.weekdaysMin,j.$W,B,2);case"ddd":return ie(x.weekdaysShort,j.$W,B,3);case"dddd":return B[j.$W];case"H":return String(O);case"HH":return P.s(O,2,"0");case"h":return me(1);case"hh":return me(2);case"a":return ae(O,k,!0);case"A":return ae(O,k,!1);case"m":return String(k);case"mm":return P.s(k,2,"0");case"s":return String(j.$s);case"ss":return P.s(j.$s,2,"0");case"SSS":return P.s(j.$ms,3,"0");case"Z":return M}return null}(te)||M.replace(":","")})},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(_,j,x){var I,M=this,O=P.p(j),k=$(_),H=(k.utcOffset()-this.utcOffset())*n,B=this-k,se=function(){return P.m(M,k)};switch(O){case w:I=se()/12;break;case h:I=se();break;case p:I=se()/3;break;case f:I=(B-H)/6048e5;break;case u:I=(B-H)/864e5;break;case c:I=B/o;break;case s:I=B/n;break;case a:I=B/r;break;default:I=B}return x?I:P.a(I)},b.daysInMonth=function(){return this.endOf(h).$D},b.$locale=function(){return Z[this.$L]},b.locale=function(_,j){if(!_)return this.$L;var x=this.clone(),I=E(_,j,!0);return I&&(x.$L=I),x},b.clone=function(){return P.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},T}(),W=z.prototype;return $.prototype=W,[["$ms",i],["$s",a],["$m",s],["$H",c],["$W",u],["$M",h],["$y",w],["$D",g]].forEach(function(T){W[T[1]]=function(b){return this.$g(b,T[0],T[1])}}),$.extend=function(T,b){return T.$i||(T(b,z,$),T.$i=!0),$},$.locale=E,$.isDayjs=y,$.unix=function(T){return $(1e3*T)},$.en=Z[G],$.Ls=Z,$.p={},$})})(Lr);var Wa=Lr.exports;const rt=cn(Wa);function Ha(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 i=[];return o.forEach((a,s)=>{jr(i,s,t[a.trim()])}),i.filter(Boolean).length?i:void 0}}}function Ba(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 i={};return o.forEach(a=>{jr(i,a.trim(),t[a.trim()])}),Object.values(i).filter(Boolean).length?i:void 0}}}function Ua(e,t){const r=t.fieldMapToTime;if(!r||!Array.isArray(r))return e;for(const[n,[o,i],a="YYYY-MM-DD"]of r){if(!n||!o||!i)continue;if(!e[n]){Reflect.deleteProperty(e,n);continue}const[s,c]=e[n],[u,f]=Array.isArray(a)?a:[a,a];e[o]=rt(s).format(u),e[i]=rt(c).format(f),Reflect.deleteProperty(e,n)}return e}const Va=(e,t,r)=>{const n=e.filter(a=>a.name);return{handleFormatRenderValues:a=>{const s={},c=[];return n.forEach(u=>{const f=Reflect.has(a,u.name),h=Ha(u.name,a)||Ba(u.name,a);if(f||h){const p=h||a[u.name];if($t(u))if(ja.includes(u.component)){if(ue(p)){const w=[];for(const g of p)w.push(g?rt(g):null);s[u.name]=w}else s[u.name]=p?rt(p):null;c.push(u.name)}else s[u.name]=p,c.push(u.name);jt(u)&&(s[u.name]=p,c.push(u.name))}}),{renderValues:s,validKeys:c}},handleFormatReturnValues:a=>{var c,u,f,h,p;if(!fe(a))return{};const s={};for(const w of Object.entries(a)){let[,g]=w;const[C]=w;if(!C||ue(g)&&g.length===0||oe(g))continue;const{transformDateFunc:S}=t,R=(f=(u=(c=r.current)==null?void 0:c.get(C))==null?void 0:u.current)==null?void 0:f.componentProps,A=R==null?void 0:R.valueFormat;if(fe(g)){const V=g;V.format&&(g=S==null?void 0:S(V,A))}ue(g)&&((h=g[0])!=null&&h.format)&&((p=g[1])!=null&&p.format)&&(g=g.map(V=>S==null?void 0:S(V,A))),Dr(g)&&(g===""?g=void 0:g=g.trim()),s[C]=g}return Ua(s,t)}}},Ya=(e,t,r)=>({getFieldsValue:(...c)=>r(e.getFieldsValue(...c)),setFieldsValue:c=>{const{renderValues:u,validKeys:f}=t(c);e.setFieldsValue(u),e.validateFields(f)},resetFields:async()=>e.resetFields(),validator:async c=>e.validateFields(c).then(u=>r(u)),scrollToField:async(c,u)=>e.scrollToField(c,u)}),qa=e=>{const{extendFormProps:t}=Nr();return{formProps:{...$e($e({collapseNum:5,colon:!1,items:[],labelWrap:!0,transformDateFunc:(o,i)=>{var a;return((a=o==null?void 0:o.format)==null?void 0:a.call(o,i||"YYYY-MM-DD HH:mm:ss"))??o},fieldMapToTime:[]},t),e)}}},nt=e=>{const{immediate:t=!0,params:r,api:n,apiCallback:o,isUseWatch:i}=e,a=d.useRef(!0),s=d.useRef(r),c=()=>{n&&oe(n)&&(r?n(r).then(o):n().then(o),s.current=r)};return d.useEffect(()=>{a.current&&(t&&c(),a.current=!1),!a.current&&i&&(Qe(r,s.current)||t&&c())},[r]),{getApiData:c}},Ga=(e,t)=>{const{collapsible:r,collapseNum:n}=e,o=d.useRef();return{collapsible:r,collapseNum:n,collapseRef:o,onClickCollapseToTrue:()=>{var s;(s=t.current)==null||s.forEach(c=>{if(c.current){const{itemIndex:u}=c.current;u>=n&&r&&c.current.setItemCollapse(!0)}})},onClickCollapseToFalse:()=>{var s;(s=t.current)==null||s.forEach(c=>{if(c.current){const{itemCollapse:u}=c.current;u&&c.current.setItemCollapse(!1)}})}}},Nr=()=>{const{extendProps:e,extendComp:t}=Be(),r=n=>{const o=t==null?void 0:t.form;o&&Object.keys(o).forEach(i=>{n.set(i,o[i])})};return{extendFormProps:e==null?void 0:e.form,setExtendFormComp:r}},Xa=e=>{console.log("render ApiSelect");const{api:t,params:r,immediate:n=!0,isusewatch:o,onDropdownVisibleChange:i}=e,a=o==="true",[s,c]=d.useState([]),{getApiData:u}=nt({api:t,immediate:n,params:r,apiCallback:c,isUseWatch:a}),f=p=>{p&&!n&&u(),i&&i(p)},h=()=>{const{api:p,params:w,immediate:g,isusewatch:C,...S}=e;return S};return m.jsx(F.Select,{...h(),options:s,onDropdownVisibleChange:f})},Ka=e=>{console.log("render ApiTreeSelect");const{api:t,params:r,immediate:n=!0,isusewatch:o,onDropdownVisibleChange:i}=e,a=o==="true",[s,c]=d.useState([]),{getApiData:u}=nt({api:t,immediate:n,params:r,apiCallback:c,isUseWatch:a}),f=p=>{p&&!n&&u(),i&&i(p)},h=()=>{const{api:p,params:w,immediate:g,isusewatch:C,...S}=e;return S};return m.jsx(F.TreeSelect,{...h(),treeData:s,onDropdownVisibleChange:f})},Ja=e=>{console.log("render ApiTransfer");const{api:t,params:r,isusewatch:n}=e,o=n==="true",[i,a]=d.useState([]);nt({api:t,params:r,apiCallback:a,isUseWatch:o});const s=()=>{const{api:c,params:u,isusewatch:f,...h}=e;return h};return m.jsx(F.Transfer,{...s(),dataSource:i})},Za=e=>{console.log("render ApiAutoComplete");const{api:t,params:r,immediate:n=!0,isusewatch:o,onDropdownVisibleChange:i}=e,a=o==="true",[s,c]=d.useState([]),{getApiData:u}=nt({api:t,immediate:n,params:r,apiCallback:c,isUseWatch:a}),f=p=>{p&&!n&&u(),i&&i(p)},h=()=>{const{api:p,params:w,immediate:g,isusewatch:C,...S}=e;return S};return m.jsx(F.AutoComplete,{...h(),options:s,onDropdownVisibleChange:f})},Te={String:"String","String[]":"String[]","File[]":"File[]",FileList:"FileList"},Qa=e=>{console.log("render AutoUpload"),console.log(lt());const t="",{api:r,maxCount:n=1,maxSize:o=2,listType:i="picture-card",openCrop:a=!1,data:s,returnType:c=Te.String,value:u=t,onChange:f}=e,h=d.useRef(!0),p=d.useRef(0),w=d.useRef([]),[g,C]=d.useState([]),S=y=>{w.current=y,C([...y])},R=()=>{const{api:y,maxCount:E,maxSize:$,openCrop:P,beforeUpload:z,fileList:W,returnType:T,...b}=e;return b},A=y=>{const E=y.size/1024/1024<o;E||F.message.error(`文件大小超过:${o}M, 请重试`);const $=w.current.length+p.current<n;return $||F.message.error(`文件数量不能超过${n}个`),E&&$&&p.current++,E&&$&&V(y),F.Upload.LIST_IGNORE},V=y=>{a?(F.message.error("暂时不支持裁剪功能,后续兼容。。。。"),K({file:y})):K({file:y})},K=y=>{r?r({file:y.file,...s}).then(E=>{S([...w.current,...E])}).finally(()=>{p.current--}):(Object.assign(y.file,{status:"done",url:URL.createObjectURL(new Blob([y.file],{type:Fa(y.file.type)}))}),S([...w.current,y.file]),p.current--)},G=y=>{const{file:E,fileList:$}=y,{status:P}=E;switch(P){case"removed":{S([...$]);break}}},Z=y=>{const E=P=>{const z=P.split("/"),W=z[z.length-1],[T]=W.split("?");return T};return{uid:(P=>{const z=w.current.find(W=>W.url===P);return z?z.uid:lt()})(y),name:E(y),url:y,status:"done"}},N=()=>{switch(c){case Te.String:return g.map(y=>y.url).join(",");case Te["String[]"]:return g.map(y=>y.url);case Te["File[]"]:return[...g];case Te.FileList:return[...g]}};return d.useEffect(()=>{const y=N();if(Qe(y,u))return;let E=[];switch(c){case Te.String:{E=(u||"").split(",").filter($=>$).map($=>Z($));break}case Te["String[]"]:{E=(u||[]).map($=>Z($));break}case Te["File[]"]:{E=(u||[]).map($=>$);break}case Te.FileList:{E=(u||[]).map($=>$);break}}S(E)},[u]),d.useEffect(()=>{if(h.current){h.current=!1;return}const y=N();f==null||f(y)},[g]),m.jsx(F.Upload,{listType:i,...R(),fileList:g,beforeUpload:A,onChange:G,children:"上传"})},J=new Map;J.set("Input",F.Input),J.set("ApiSelect",Xa),J.set("Select",F.Select),J.set("InputNumber",F.InputNumber),J.set("ApiTreeSelect",Ka),J.set("TreeSelect",F.TreeSelect),J.set("ApiTransfer",Ja),J.set("Transfer",F.Transfer),J.set("Switch",F.Switch),J.set("Button",F.Button),J.set("Radio",F.Radio),J.set("RadioGroup",F.Radio.Group),J.set("Checkbox",F.Checkbox),J.set("CheckboxGroup",F.Checkbox.Group),J.set("Cascader",F.Cascader),J.set("TimePicker",F.TimePicker),J.set("DatePicker",F.DatePicker),J.set("MonthPicker",F.DatePicker.MonthPicker),J.set("WeekPicker",F.DatePicker.WeekPicker),J.set("RangePicker",F.DatePicker.RangePicker),J.set("InputPassword",F.Input.Password),J.set("InputTextArea",F.Input.TextArea),J.set("ApiAutoComplete",Za),J.set("AutoComplete",F.AutoComplete),J.set("Upload",F.Upload),J.set("AutoUpload",Qa);const Wr={"form-item-force":"_form-item-force_1hsf3_1","form-item-hidden":"_form-item-hidden_1hsf3_9"},el=d.forwardRef(({itemIndex:e,itemProps:t,methods:r,formProps:n,collapseRef:o},i)=>{console.log("render FormItem",t.name);const{rewritingModel:a,isusewatch:s}=La(n,t),{isIfShow:c,isShow:u}=Oa(t,a,o),{colProps:f}=ka(t,n),{componentProps:h}=Ia(t,a),{rules:p}=Ma({item:t,model:a,isShow:u,componentProps:h}),{disabled:w}=Ra(n,t,a),{itemCollapse:g,setItemCollapse:C}=Aa(n,e),{name:S,label:R,wrapperCol:A,labelCol:V,valuePropName:K,initialValue:G,forceRow:Z}=t;d.useImperativeHandle(i,()=>({itemIndex:e,componentProps:h,itemCollapse:g,setItemCollapse:C}));const N=()=>({name:S,label:R,rules:p,wrapperCol:A,labelCol:V,valuePropName:K,initialValue:G}),{setExtendFormComp:y}=Nr();y(J);const E=$t(t),$=jt(t),P=()=>{if(E){const z=J.get(t.component);return m.jsx(z,{...h,disabled:w,isusewatch:s.toString()})}return $?t.render({model:a,name:S,disabled:w,methods:r,componentProps:h}):null};return m.jsxs(d.Fragment,{children:[Z?m.jsx("div",{className:Wr["form-item-force"]}):null,c?m.jsx(F.Col,{...f,className:u&&!g?void 0:Wr["form-item-hidden"],children:m.jsx(F.Form.Item,{...N(),children:P()})}):null]})}),tl={"collapse-wrapper":"_collapse-wrapper_ylm01_1"},rl=d.forwardRef(({collapsible:e,onClickExpand:t,onClickFold:r},n)=>{const[o,i]=d.useState(e),a=d.useMemo(()=>o,[o]),s=()=>{r(),i(!0)},c=()=>{t(),i(!1)};return d.useImperativeHandle(n,()=>({handleCollapseChangeFalse:c})),m.jsx("div",{className:tl["collapse-wrapper"],children:a?m.jsx(F.Button,{onClick:c,type:"link",icon:m.jsx(ve.DownOutlined,{}),children:"展开"}):m.jsx(F.Button,{onClick:s,type:"link",icon:m.jsx(ve.UpOutlined,{}),children:"折叠"})})}),nl={"group-wrapper":"_group-wrapper_g8zqi_1"},ol=({formProps:e})=>{const{renderActions:t}=e;return m.jsx("div",{className:nl["group-wrapper"],children:t==null?void 0:t()})},sl={"xph-form-action":"_xph-form-action_8ws73_1"},il=(e,t)=>{console.log("render Form");const[r]=F.Form.useForm(),{formProps:n}=qa(e),{formItems:o}=za({formProps:n}),i=d.useRef(new Map),{collapsible:a,collapseNum:s,collapseRef:c,onClickCollapseToFalse:u,onClickCollapseToTrue:f}=Ga(n,i),{handleFormatRenderValues:h,handleFormatReturnValues:p}=Va(o,n,i),{setFieldsValue:w,getFieldsValue:g,resetFields:C,validator:S,scrollToField:R}=Ya(r,h,p),A=()=>{const{layout:K,wrapperCol:G,labelCol:Z,colon:N,disabled:y,labelWrap:E,labelAlign:$,scrollToFirstError:P,size:z}=n;return{layout:K,wrapperCol:G,labelCol:Z,colon:N,disabled:y,labelWrap:E,labelAlign:$,scrollToFirstError:P,size:z}},V={setFieldsValue:w,getFieldsValue:g,resetFields:C,validator:S,scrollToField:R};return d.useImperativeHandle(t,()=>({...V})),d.useEffect(()=>(console.log("Form is mounted======================="),n.register&&n.register(V),()=>{console.log("Form is unmounted========================="),i.current.clear()}),[]),m.jsxs(F.Form,{form:r,...A(),children:[m.jsx(F.Row,{children:o.map((K,G)=>(i.current.has(K.name)||i.current.set(K.name,d.createRef()),m.jsx(el,{ref:i.current.get(K.name),itemIndex:G,itemProps:K,formProps:n,methods:V,collapseRef:c},G)))}),m.jsxs("div",{className:sl["xph-form-action"],children:[m.jsx(ol,{formProps:n}),a?m.jsx(rl,{ref:c,collapsible:o.length>s,onClickExpand:u,onClickFold:f}):null]})]})},Et=d.forwardRef(il),al=d.memo(Et),ll=d.forwardRef((e,t)=>{const{renderActions:r,showSearch:n,tableRef:o}=e,[i,a]=d.useState(!1),s=d.useRef(null),c=()=>{const{reloadData:p}=o.current;p()},u=()=>{const{resetData:p}=o.current;p()},f=d.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(F.Button,{type:"primary",icon:m.jsx(ve.SearchOutlined,{}),onClick:c,children:"搜索"}),m.jsx(F.Button,{icon:m.jsx(ve.ReloadOutlined,{}),onClick:u,children:"重置"})]})]}),[n,r]),h=()=>{const{renderActions:p,...w}=e;return{...w,renderActions:f}};return d.useImperativeHandle(t,()=>({setFormLoading:a,...s.current})),m.jsx(F.Spin,{spinning:i,children:m.jsx(al,{ref:s,...h()})})}),cl=d.memo(Et),ul=(e,t)=>{const r=d.useRef(null),n=d.useRef(null),{formProps:o}=e,i=()=>{const{formProps:a,...s}=e;return s};return d.useImperativeHandle(t,()=>({open:(...a)=>{var s;return(s=r.current)==null?void 0:s.open(...a)},close:(...a)=>{var s;return(s=r.current)==null?void 0:s.close(...a)},getFieldsValue:(...a)=>n.current.getFieldsValue(...a),setFieldsValue:(...a)=>n.current.setFieldsValue(...a),resetFields:(...a)=>n.current.resetFields(...a),validator:(...a)=>n.current.validator(...a),scrollToField:(...a)=>n.current.scrollToField(...a)})),m.jsx(kr,{...i(),ref:r,children:m.jsx(cl,{...o,ref:n})})},Hr=d.forwardRef(ul);function fl({searchForm:e}){return{searchFormRef:d.useRef(null),searchFormProps:e}}function dl(e){return"cellFunc"in e}function pl(e){return"children"in e}const{useToken:hl}=F.theme,gl=(e,t,r)=>{const{curComponentProps:n,cellFuncProps:o}=t,{url:i,onClick:a}=n,{token:s}=hl(),c={color:s.colorLink,cursor:"pointer"},u=()=>{if(r.mainClick&&r.mainClick(),a){a();return}if(i){window.open(i,"_blank");return}};return m.jsx(e,{...r,mainClick:u,mainStyle:Object.assign(c,(r==null?void 0:r.mainStyle)||{})})},ml={"cellfunc-actions":"_cellfunc-actions_14drt_1"},Br={link:{Comp:gl},actions:{Comp:(e,t,r)=>{const{curComponentProps:n,cellFuncProps:o}=t;return m.jsx("div",{className:ml["cellfunc-actions"],children:m.jsx(tt,{...n})})}}},vl=(e,t)=>{const{renderPrams:{text:r}}=e;return m.jsx("span",{onClick:t==null?void 0:t.mainClick,style:t==null?void 0:t.mainStyle,children:r})},bl=e=>{const{setExtendTableCellComp:t}=Vr();t(Br);const{dslConfig:r}=e;let n=vl.bind(null,e),o=0;for(;o<r.length;){const i=o++,a=Br[r[i].component];a&&(n=a.Comp.bind(null,n,{curComponentProps:r[i].componentProps||{},cellFuncProps:e}))}return m.jsx(n,{})};function Ur(e){return e.map(t=>{let r={...t};if(dl(r)){const{cellFunc:n,...o}=r;r={...o,render:(...i)=>{const a=oe(n),[s,c,u]=i,f={text:s,record:c,index:u},h=a?n(f):n;return m.jsx(bl,{dslConfig:h,renderPrams:f})}}}return pl(r)&&r.children&&Array.isArray(r.children)&&(r.children=Ur(r.children)),r})}function yl(e){const{columns:t}=e.table,r=Ur(t);return console.log(r),{columns:r}}const _l=e=>{const{extendTableProps:t}=Vr();return{tableProps:{...$e($e({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}},crudFormDialog:void 0,searchForm:{showSearch:!0,items:[]}},t),e)}}};function wl(e){const{pagination:t,autoPagination:r}=e.table,[n,o]=d.useState(t),i=d.useRef(t),a=d.useMemo(()=>n&&(r===!0||r===void 0)||!1,[n]);return{pagination:{model:n,update:c=>{if(!i.current)return;const u={...i.current,...c};o(u),i.current=u},show:a},lastPaginationState:i}}function Cl(e,t){const{api:r,formatDataSource:n,autoPagination:o,onChange:i}=e.table,a=e.onPaginationChange,{pagination:s,lastPaginationState:c}=wl(e),[u,f]=d.useState({loading:!1,dataSource:[],selection:[],backupsDataSource:[]}),h=d.useRef({loading:!1,dataSource:[],selection:[],backupsDataSource:[]}),p={model:u,update:N=>{var E;const y={...h.current,...N};f(y),h.current=y,(E=t.current)==null||E.setFormLoading(y.loading)}},w=async()=>{d.useEffect(()=>{const{autoRequest:N}=e.table,{validator:y}=t.current;N&&y().then(E=>{R({searchFormParams:E})})},[])},g=async({searchFormParams:N,paginationParams:y})=>{const E={...N,current:c.current.current,pageSize:c.current.pageSize,...y};return r(E).then($=>{const{data:P,current:z,total:W}=$;p.update({dataSource:n?n(P):P}),s.update({total:W,current:z})}).finally(()=>{p.update({loading:!1})})},C=async({searchFormParams:N,paginationParams:y})=>{const E={...N};return r(E).then($=>{const P=n?n($):$;p.update({selection:[],dataSource:P}),s.update({current:1,total:$.length})}).finally(()=>{p.update({loading:!1})})},S=async({searchFormParams:N,paginationParams:y})=>{var $;const E={...N};if(y){const{current:P,pageSize:z}=y;s.update({current:P,pageSize:z});const W=(P-1)*z,T=W+z,b=($=h.current.backupsDataSource)==null?void 0:$.slice(W,T);return p.update({loading:!1,selection:[],dataSource:b})}else return r(E).then(P=>{let z=n?n(P):P;const W=[...z],T=0,b=T+c.current.pageSize;z=z.slice(T,b),p.update({selection:[],dataSource:z,backupsDataSource:W}),s.update({current:1,total:P.length})}).finally(()=>{p.update({loading:!1})})},R=async({searchFormParams:N,paginationParams:y})=>{if(p.update({loading:!0,selection:[]}),r)switch(!!c.current){case!0:return o===!0?S({searchFormParams:N,paginationParams:y}):o===!1?C({searchFormParams:N,paginationParams:y}):g({searchFormParams:N,paginationParams:y});case!1:return C({searchFormParams:N,paginationParams:y})}return p.update({loading:!1})};return{table:p,pagination:s,firstGetTableData:w,onPaginationChange:(N,y)=>{const{validator:E}=t.current;E().then($=>{R({searchFormParams:$,paginationParams:{current:N,pageSize:y}})}),a&&a(N,y)},onAllChange:async(...N)=>{const[y,E,$,P]=N,z=[];for(let W=0;W<z.length&&!z[W]();W++);i&&i(E,$,P)},resetData:async()=>{const{resetFields:N,validator:y}=t.current;return N().then(async()=>{const E=await y();return R({searchFormParams:E})})},resetAllData:async()=>{const{resetFields:N,validator:y}=t.current;return N().then(async()=>{const E={};if(c.current){const{pageSize:$}=c.current;o===void 0&&(E.paginationParams={current:1,pageSize:$})}return E.searchFormParams=await y(),R(E)})},reloadData:async()=>{const{validator:N}=t.current;return N().then(y=>R({searchFormParams:y}))}}}const xl=(e,t)=>{const{onRowSelectionChange:r}=e,{rowSelection:n}=e.table,o=()=>{if(Dr(n))return{type:n,onChange:(i,a,s)=>{t.update({selection:a}),r&&r(i,a)}};if(fe(n)){const{onChange:i}=n;return{...n,onChange:(a,s,c)=>{t.update({selection:s}),i&&i(a,s,c),r&&r(a,s)}}}return n};return{rowSelection:o(),getNewRowSelection:o}};function Tl(e,t){const{scroll:r,virtual:n}=e.table,o=d.useRef(null),[i,a]=d.useState(0),[s,c]=d.useState(0);d.useEffect(()=>{const f=()=>{o.current&&(a(o.current.offsetWidth),c(o.current.offsetHeight))};f();const h=new ResizeObserver(f);return o.current&&h.observe(o.current),()=>{h&&o.current&&h.unobserve(o.current)}},[]);const u=d.useMemo(()=>t?n?{x:i,y:s-70,...r}:{x:"max-content",y:s-70,...r}:{x:"max-content",...r},[s]);return{divRef:o,scroll:u}}function Sl(e,t){const{toolbar:r}=e.table;return{getTopToolbarBindProps:()=>{if(oe(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 Vr=()=>{const{extendProps:e,extendComp:t}=Be(),r=n=>{const o=t==null?void 0:t.tableCellFunc;o&&Object.keys(o).forEach(i=>{const a=o[i];n[i]={Comp:a}})};return{extendTableProps:e==null?void 0:e.table,setExtendTableCellComp:r}},Pl=({crudFormDialog:e})=>({crudFormDialogRef:d.useRef(null),crudFormProps:e}),ot={"main-container":"_main-container_1yx5k_1",container__toolbar:"_container__toolbar_1yx5k_13",container__table:"_container__table_1yx5k_27",container__pagination:"_container__pagination_1yx5k_35"},Dl=d.forwardRef(({tableProps:e,searchFormRef:t,fullHeight:r},n)=>{const{columns:o}=yl(e),i=d.useRef(null),{table:a,pagination:s,firstGetTableData:c,onPaginationChange:u,onAllChange:f,resetData:h,resetAllData:p,reloadData:w}=Cl(e,t),{rowSelection:g}=xl(e,a),{divRef:C,scroll:S}=Tl(e,r),{getTopToolbarBindProps:R}=Sl(e,a),A=()=>{const{autoRequest:V,api:K,formatDataSource:G,autoPagination:Z,columns:N,scroll:y,pagination:E,rowSelection:$,onChange:P,...z}=e.table;return z};return c(),d.useImperativeHandle(n,()=>({resetData:h,resetAllData:p,reloadData:w,...i.current})),console.log("render Table"),m.jsxs("div",{className:r?ot["main-container"]:void 0,children:[m.jsx("div",{className:ot.container__toolbar,children:m.jsx(tt,{...R()})}),m.jsx("div",{ref:C,className:r?ot.container__table:void 0,children:m.jsx(F.Table,{ref:i,...A(),loading:a.model.loading,columns:o,dataSource:a.model.dataSource,pagination:!1,rowSelection:g,scroll:S,onChange:f})}),s.show?m.jsx("div",{className:ot.container__pagination,children:m.jsx(F.Pagination,{disabled:a.model.loading,...s.model,onChange:u})}):null]})}),Yr={"xph-table-full-wrapper":"_xph-table-full-wrapper_mdv0g_1","full-wrapper__table":"_full-wrapper__table_mdv0g_13"},$l=(e,t)=>{const{tableProps:r}=_l(e),n=d.useRef(null),{searchFormRef:o,searchFormProps:i}=fl(r),{crudFormDialogRef:a,crudFormProps:s}=Pl(r);let{fullHeight:c}=r.table;const{virtual:u}=r.table;return u&&(c=!0),d.useImperativeHandle(t,()=>({...n.current,...a.current})),m.jsxs("div",{className:c?Yr["xph-table-full-wrapper"]:void 0,children:[m.jsx("div",{children:m.jsx(ll,{ref:o,tableRef:n,...i})}),m.jsx("div",{className:c?Yr["full-wrapper__table"]:void 0,children:m.jsx(Dl,{ref:n,searchFormRef:o,fullHeight:c,tableProps:r})}),s?m.jsx(Hr,{ref:a,...s}):null]})},jl=d.forwardRef($l);q.XphActions=tt,q.XphCrudFormDialog=Hr,q.XphDialog=kr,q.XphExtendCompPropsProvider=oa,q.XphForm=Et,q.XphPortal=zr,q.XphTable=jl,q.buildUUID=lt,q.useXphExtendCompProps=Be,q.useXphForm=Na,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})});
|
|
25
|
+
Check the top-level render call using <`+D+">.")}return y}}function on(l,y){{if(!l._store||l._store.validated||l.key!=null)return;l._store.validated=!0;var D=Vl(y);if(nn[D])return;nn[D]=!0;var N="";l&&l._owner&&l._owner!==Rt.current&&(N=" It was passed a child from "+L(l._owner.type)+"."),Me(l),O('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',D,N),Me(null)}}function sn(l,y){{if(typeof l!="object")return;if(At(l))for(var D=0;D<l.length;D++){var N=l[D];kt(N)&&on(N,y)}else if(kt(l))l._store&&(l._store.validated=!0);else if(l){var G=P(l);if(typeof G=="function"&&G!==l.entries)for(var Z=G.call(l),V;!(V=Z.next()).done;)kt(V.value)&&on(V.value,y)}}}function Yl(l){{var y=l.type;if(y==null||typeof y=="string")return;var D;if(typeof y=="function")D=y.propTypes;else if(typeof y=="object"&&(y.$$typeof===c||y.$$typeof===h))D=y.propTypes;else return;if(D){var N=L(y);Ol(D,l.props,"prop",N,l)}else if(y.PropTypes!==void 0&&!It){It=!0;var G=L(y);O("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",G||"Unknown")}typeof y.getDefaultProps=="function"&&!y.getDefaultProps.isReactClassApproved&&O("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ql(l){{for(var y=Object.keys(l.props),D=0;D<y.length;D++){var N=y[D];if(N!=="children"&&N!=="key"){Me(l),O("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",N),Me(null);break}}l.ref!==null&&(Me(l),O("Invalid attribute `ref` supplied to `React.Fragment`."),Me(null))}}function an(l,y,D,N,G,Z){{var V=C(l);if(!V){var U="";(l===void 0||typeof l=="object"&&l!==null&&Object.keys(l).length===0)&&(U+=" 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 le=Ul();le?U+=le:U+=rn();var te;l===null?te="null":At(l)?te="array":l!==void 0&&l.$$typeof===t?(te="<"+(L(l.type)||"Unknown")+" />",U=" Did you accidentally export a JSX literal instead of a component?"):te=typeof l,O("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",te,U)}var re=Hl(l,y,D,G,Z);if(re==null)return re;if(V){var he=y.children;if(he!==void 0)if(N)if(At(he)){for(var Re=0;Re<he.length;Re++)sn(he[Re],l);Object.freeze&&Object.freeze(he)}else O("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 sn(he,l)}return l===n?ql(re):Yl(re),re}}function Gl(l,y,D){return an(l,y,D,!0)}function Xl(l,y,D){return an(l,y,D,!1)}var Kl=Xl,Jl=Gl;ke.Fragment=n,ke.jsx=Kl,ke.jsxs=Jl}()),ke}process.env.NODE_ENV==="production"?ut.exports=dn():ut.exports=pn();var m=ut.exports,Wt=typeof global=="object"&&global&&global.Object===Object&&global,hn=typeof self=="object"&&self&&self.Object===Object&&self,ye=Wt||hn||Function("return this")(),Pe=ye.Symbol,Bt=Object.prototype,gn=Bt.hasOwnProperty,mn=Bt.toString,ze=Pe?Pe.toStringTag:void 0;function vn(e){var t=gn.call(e,ze),r=e[ze];try{e[ze]=void 0;var n=!0}catch{}var o=mn.call(e);return n&&(t?e[ze]=r:delete e[ze]),o}var yn=Object.prototype,bn=yn.toString;function _n(e){return bn.call(e)}var wn="[object Null]",Cn="[object Undefined]",Ht=Pe?Pe.toStringTag:void 0;function be(e){return e==null?e===void 0?Cn:wn:Ht&&Ht in Object(e)?vn(e):_n(e)}function ge(e){return e!=null&&typeof e=="object"}var xn="[object Symbol]";function ft(e){return typeof e=="symbol"||ge(e)&&be(e)==xn}function Tn(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 ue=Array.isArray,Sn=1/0,Ut=Pe?Pe.prototype:void 0,Vt=Ut?Ut.toString:void 0;function Yt(e){if(typeof e=="string")return e;if(ue(e))return Tn(e,Yt)+"";if(ft(e))return Vt?Vt.call(e):"";var t=e+"";return t=="0"&&1/e==-Sn?"-0":t}function fe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function qt(e){return e}var Pn="[object AsyncFunction]",Dn="[object Function]",$n="[object GeneratorFunction]",jn="[object Proxy]";function oe(e){if(!fe(e))return!1;var t=be(e);return t==Dn||t==$n||t==Pn||t==jn}var dt=ye["__core-js_shared__"],Gt=function(){var e=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function En(e){return!!Gt&&Gt in e}var Fn=Function.prototype,On=Fn.toString;function Ee(e){if(e!=null){try{return On.call(e)}catch{}try{return e+""}catch{}}return""}var An=/[\\^$.*+?()[\]{}|]/g,Mn=/^\[object .+?Constructor\]$/,Rn=Function.prototype,In=Object.prototype,kn=Rn.toString,zn=In.hasOwnProperty,Ln=RegExp("^"+kn.call(zn).replace(An,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Nn(e){if(!fe(e)||En(e))return!1;var t=oe(e)?Ln:Mn;return t.test(Ee(e))}function Wn(e,t){return e==null?void 0:e[t]}function Fe(e,t){var r=Wn(e,t);return Nn(r)?r:void 0}var pt=Fe(ye,"WeakMap"),Xt=Object.create,Bn=function(){function e(){}return function(t){if(!fe(t))return{};if(Xt)return Xt(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Hn(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 Un(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Vn=800,Yn=16,qn=Date.now;function Gn(e){var t=0,r=0;return function(){var n=qn(),o=Yn-(n-r);if(r=n,o>0){if(++t>=Vn)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Xn(e){return function(){return e}}var Ve=function(){try{var e=Fe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Kn=Ve?function(e,t){return Ve(e,"toString",{configurable:!0,enumerable:!1,value:Xn(t),writable:!0})}:qt,Jn=Gn(Kn),Zn=9007199254740991,Qn=/^(?:0|[1-9]\d*)$/;function ht(e,t){var r=typeof e;return t=t??Zn,!!t&&(r=="number"||r!="symbol"&&Qn.test(e))&&e>-1&&e%1==0&&e<t}function gt(e,t,r){t=="__proto__"&&Ve?Ve(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 eo=Object.prototype,to=eo.hasOwnProperty;function Kt(e,t,r){var n=e[t];(!(to.call(e,t)&&Le(n,r))||r===void 0&&!(t in e))&>(e,t,r)}function ro(e,t,r,n){var o=!r;r||(r={});for(var i=-1,a=t.length;++i<a;){var s=t[i],c=void 0;c===void 0&&(c=e[s]),o?gt(r,s,c):Kt(r,s,c)}return r}var Jt=Math.max;function no(e,t,r){return t=Jt(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=Jt(n.length-t,0),a=Array(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),Hn(e,this,s)}}function oo(e,t){return Jn(no(e,t,qt),e+"")}var so=9007199254740991;function Zt(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=so}function Ye(e){return e!=null&&Zt(e.length)&&!oe(e)}function io(e,t,r){if(!fe(r))return!1;var n=typeof t;return(n=="number"?Ye(r)&&ht(t,r.length):n=="string"&&t in r)?Le(r[t],e):!1}function ao(e){return oo(function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,a&&io(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,i)}return t})}var lo=Object.prototype;function mt(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||lo;return e===r}function co(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var uo="[object Arguments]";function Qt(e){return ge(e)&&be(e)==uo}var er=Object.prototype,fo=er.hasOwnProperty,po=er.propertyIsEnumerable,vt=Qt(function(){return arguments}())?Qt:function(e){return ge(e)&&fo.call(e,"callee")&&!po.call(e,"callee")};function ho(){return!1}var tr=typeof Y=="object"&&Y&&!Y.nodeType&&Y,rr=tr&&typeof module=="object"&&module&&!module.nodeType&&module,go=rr&&rr.exports===tr,nr=go?ye.Buffer:void 0,mo=nr?nr.isBuffer:void 0,qe=mo||ho,vo="[object Arguments]",yo="[object Array]",bo="[object Boolean]",_o="[object Date]",wo="[object Error]",Co="[object Function]",xo="[object Map]",To="[object Number]",So="[object Object]",Po="[object RegExp]",Do="[object Set]",$o="[object String]",jo="[object WeakMap]",Eo="[object ArrayBuffer]",Fo="[object DataView]",Oo="[object Float32Array]",Ao="[object Float64Array]",Mo="[object Int8Array]",Ro="[object Int16Array]",Io="[object Int32Array]",ko="[object Uint8Array]",zo="[object Uint8ClampedArray]",Lo="[object Uint16Array]",No="[object Uint32Array]",Q={};Q[Oo]=Q[Ao]=Q[Mo]=Q[Ro]=Q[Io]=Q[ko]=Q[zo]=Q[Lo]=Q[No]=!0,Q[vo]=Q[yo]=Q[Eo]=Q[bo]=Q[Fo]=Q[_o]=Q[wo]=Q[Co]=Q[xo]=Q[To]=Q[So]=Q[Po]=Q[Do]=Q[$o]=Q[jo]=!1;function Wo(e){return ge(e)&&Zt(e.length)&&!!Q[be(e)]}function Bo(e){return function(t){return e(t)}}var or=typeof Y=="object"&&Y&&!Y.nodeType&&Y,Ne=or&&typeof module=="object"&&module&&!module.nodeType&&module,Ho=Ne&&Ne.exports===or,yt=Ho&&Wt.process,sr=function(){try{var e=Ne&&Ne.require&&Ne.require("util").types;return e||yt&&yt.binding&&yt.binding("util")}catch{}}(),ir=sr&&sr.isTypedArray,bt=ir?Bo(ir):Wo,Uo=Object.prototype,Vo=Uo.hasOwnProperty;function ar(e,t){var r=ue(e),n=!r&&vt(e),o=!r&&!n&&qe(e),i=!r&&!n&&!o&&bt(e),a=r||n||o||i,s=a?co(e.length,String):[],c=s.length;for(var u in e)(t||Vo.call(e,u))&&!(a&&(u=="length"||o&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||ht(u,c)))&&s.push(u);return s}function lr(e,t){return function(r){return e(t(r))}}var Yo=lr(Object.keys,Object),qo=Object.prototype,Go=qo.hasOwnProperty;function Xo(e){if(!mt(e))return Yo(e);var t=[];for(var r in Object(e))Go.call(e,r)&&r!="constructor"&&t.push(r);return t}function Ko(e){return Ye(e)?ar(e):Xo(e)}function Jo(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Zo=Object.prototype,Qo=Zo.hasOwnProperty;function es(e){if(!fe(e))return Jo(e);var t=mt(e),r=[];for(var n in e)n=="constructor"&&(t||!Qo.call(e,n))||r.push(n);return r}function cr(e){return Ye(e)?ar(e,!0):es(e)}var ts=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rs=/^\w*$/;function ns(e,t){if(ue(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ft(e)?!0:rs.test(e)||!ts.test(e)||t!=null&&e in Object(t)}var We=Fe(Object,"create");function os(){this.__data__=We?We(null):{},this.size=0}function ss(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var is="__lodash_hash_undefined__",as=Object.prototype,ls=as.hasOwnProperty;function cs(e){var t=this.__data__;if(We){var r=t[e];return r===is?void 0:r}return ls.call(t,e)?t[e]:void 0}var us=Object.prototype,fs=us.hasOwnProperty;function ds(e){var t=this.__data__;return We?t[e]!==void 0:fs.call(t,e)}var ps="__lodash_hash_undefined__";function hs(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=We&&t===void 0?ps:t,this}function Oe(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])}}Oe.prototype.clear=os,Oe.prototype.delete=ss,Oe.prototype.get=cs,Oe.prototype.has=ds,Oe.prototype.set=hs;function gs(){this.__data__=[],this.size=0}function Ge(e,t){for(var r=e.length;r--;)if(Le(e[r][0],t))return r;return-1}var ms=Array.prototype,vs=ms.splice;function ys(e){var t=this.__data__,r=Ge(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():vs.call(t,r,1),--this.size,!0}function bs(e){var t=this.__data__,r=Ge(t,e);return r<0?void 0:t[r][1]}function _s(e){return Ge(this.__data__,e)>-1}function ws(e,t){var r=this.__data__,n=Ge(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function we(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])}}we.prototype.clear=gs,we.prototype.delete=ys,we.prototype.get=bs,we.prototype.has=_s,we.prototype.set=ws;var Be=Fe(ye,"Map");function Cs(){this.size=0,this.__data__={hash:new Oe,map:new(Be||we),string:new Oe}}function xs(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Xe(e,t){var r=e.__data__;return xs(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Ts(e){var t=Xe(this,e).delete(e);return this.size-=t?1:0,t}function Ss(e){return Xe(this,e).get(e)}function Ps(e){return Xe(this,e).has(e)}function Ds(e,t){var r=Xe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Ce(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])}}Ce.prototype.clear=Cs,Ce.prototype.delete=Ts,Ce.prototype.get=Ss,Ce.prototype.has=Ps,Ce.prototype.set=Ds;var $s="Expected a function";function _t(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError($s);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(_t.Cache||Ce),r}_t.Cache=Ce;var js=500;function Es(e){var t=_t(e,function(n){return r.size===js&&r.clear(),n}),r=t.cache;return t}var Fs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Os=/\\(\\)?/g,As=Es(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Fs,function(r,n,o,i){t.push(o?i.replace(Os,"$1"):n||r)}),t});function Ms(e){return e==null?"":Yt(e)}function Rs(e,t){return ue(e)?e:ns(e,t)?[e]:As(Ms(e))}var Is=1/0;function ks(e){if(typeof e=="string"||ft(e))return e;var t=e+"";return t=="0"&&1/e==-Is?"-0":t}function zs(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var ur=lr(Object.getPrototypeOf,Object),Ls="[object Object]",Ns=Function.prototype,Ws=Object.prototype,fr=Ns.toString,Bs=Ws.hasOwnProperty,Hs=fr.call(Object);function Us(e){if(!ge(e)||be(e)!=Ls)return!1;var t=ur(e);if(t===null)return!0;var r=Bs.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&fr.call(r)==Hs}function Vs(){this.__data__=new we,this.size=0}function Ys(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function qs(e){return this.__data__.get(e)}function Gs(e){return this.__data__.has(e)}var Xs=200;function Ks(e,t){var r=this.__data__;if(r instanceof we){var n=r.__data__;if(!Be||n.length<Xs-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ce(n)}return r.set(e,t),this.size=r.size,this}function xe(e){var t=this.__data__=new we(e);this.size=t.size}xe.prototype.clear=Vs,xe.prototype.delete=Ys,xe.prototype.get=qs,xe.prototype.has=Gs,xe.prototype.set=Ks;var dr=typeof Y=="object"&&Y&&!Y.nodeType&&Y,pr=dr&&typeof module=="object"&&module&&!module.nodeType&&module,Js=pr&&pr.exports===dr,hr=Js?ye.Buffer:void 0;hr&&hr.allocUnsafe;function Zs(e,t){return e.slice()}function Qs(e,t){for(var r=-1,n=e==null?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}function ei(){return[]}var ti=Object.prototype,ri=ti.propertyIsEnumerable,gr=Object.getOwnPropertySymbols,ni=gr?function(e){return e==null?[]:(e=Object(e),Qs(gr(e),function(t){return ri.call(e,t)}))}:ei;function oi(e,t,r){var n=t(e);return ue(e)?n:zs(n,r(e))}function mr(e){return oi(e,Ko,ni)}var wt=Fe(ye,"DataView"),Ct=Fe(ye,"Promise"),xt=Fe(ye,"Set"),vr="[object Map]",si="[object Object]",yr="[object Promise]",br="[object Set]",_r="[object WeakMap]",wr="[object DataView]",ii=Ee(wt),ai=Ee(Be),li=Ee(Ct),ci=Ee(xt),ui=Ee(pt),De=be;(wt&&De(new wt(new ArrayBuffer(1)))!=wr||Be&&De(new Be)!=vr||Ct&&De(Ct.resolve())!=yr||xt&&De(new xt)!=br||pt&&De(new pt)!=_r)&&(De=function(e){var t=be(e),r=t==si?e.constructor:void 0,n=r?Ee(r):"";if(n)switch(n){case ii:return wr;case ai:return vr;case li:return yr;case ci:return br;case ui:return _r}return t});var Ke=ye.Uint8Array;function fi(e){var t=new e.constructor(e.byteLength);return new Ke(t).set(new Ke(e)),t}function di(e,t){var r=fi(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}function pi(e){return typeof e.constructor=="function"&&!mt(e)?Bn(ur(e)):{}}var hi="__lodash_hash_undefined__";function gi(e){return this.__data__.set(e,hi),this}function mi(e){return this.__data__.has(e)}function Je(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Ce;++t<r;)this.add(e[t])}Je.prototype.add=Je.prototype.push=gi,Je.prototype.has=mi;function vi(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 yi(e,t){return e.has(t)}var bi=1,_i=2;function Cr(e,t,r,n,o,i){var a=r&bi,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var u=i.get(e),f=i.get(t);if(u&&f)return u==t&&f==e;var h=-1,g=!0,w=r&_i?new Je:void 0;for(i.set(e,t),i.set(t,e);++h<s;){var p=e[h],T=t[h];if(n)var P=a?n(T,p,h,t,e,i):n(p,T,h,e,t,i);if(P!==void 0){if(P)continue;g=!1;break}if(w){if(!vi(t,function(k,O){if(!yi(w,O)&&(p===k||o(p,k,r,n,i)))return w.push(O)})){g=!1;break}}else if(!(p===T||o(p,T,r,n,i))){g=!1;break}}return i.delete(e),i.delete(t),g}function wi(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function Ci(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var xi=1,Ti=2,Si="[object Boolean]",Pi="[object Date]",Di="[object Error]",$i="[object Map]",ji="[object Number]",Ei="[object RegExp]",Fi="[object Set]",Oi="[object String]",Ai="[object Symbol]",Mi="[object ArrayBuffer]",Ri="[object DataView]",xr=Pe?Pe.prototype:void 0,Tt=xr?xr.valueOf:void 0;function Ii(e,t,r,n,o,i,a){switch(r){case Ri:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Mi:return!(e.byteLength!=t.byteLength||!i(new Ke(e),new Ke(t)));case Si:case Pi:case ji:return Le(+e,+t);case Di:return e.name==t.name&&e.message==t.message;case Ei:case Oi:return e==t+"";case $i:var s=wi;case Fi:var c=nξif(s||(s=Ci),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;n|=Ti,a.set(e,t);var f=Cr(s(e),s(t),n,o,i,a);return a.delete(e),f;case Ai:if(Tt)return Tt.call(e)==Tt.call(t)}return!1}var ki=1,zi=Object.prototype,Li=zi.hasOwnProperty;function Ni(e,t,r,n,o,i){var a=r&ki,s=mr(e),c=s.length,u=mr(t),f=u.length;if(c!=f&&!a)return!1;for(var h=c;h--;){var g=s[h];if(!(a?g in t:Li.call(t,g)))return!1}var w=i.get(e),p=i.get(t);if(w&&p)return w==t&&p==e;var T=!0;i.set(e,t),i.set(t,e);for(var P=a;++h<c;){g=s[h];var k=e[g],O=t[g];if(n)var B=a?n(O,k,g,t,e,i):n(k,O,g,e,t,i);if(!(B===void 0?k===O||o(k,O,r,n,i):B)){T=!1;break}P||(P=g=="constructor")}if(T&&!P){var X=e.constructor,q=t.constructor;X!=q&&"constructor"in e&&"constructor"in t&&!(typeof X=="function"&&X instanceof X&&typeof q=="function"&&q instanceof q)&&(T=!1)}return i.delete(e),i.delete(t),T}var Wi=1,Tr="[object Arguments]",Sr="[object Array]",Ze="[object Object]",Bi=Object.prototype,Pr=Bi.hasOwnProperty;function Hi(e,t,r,n,o,i){var a=ue(e),s=ue(t),c=a?Sr:De(e),u=s?Sr:De(t);c=c==Tr?Ze:c,u=u==Tr?Ze:u;var f=c==Ze,h=u==Ze,g=c==u;if(g&&qe(e)){if(!qe(t))return!1;a=!0,f=!1}if(g&&!f)return i||(i=new xe),a||bt(e)?Cr(e,t,r,n,o,i):Ii(e,t,c,r,n,o,i);if(!(r&Wi)){var w=f&&Pr.call(e,"__wrapped__"),p=h&&Pr.call(t,"__wrapped__");if(w||p){var T=w?e.value():e,P=p?t.value():t;return i||(i=new xe),o(T,P,r,n,i)}}return g?(i||(i=new xe),Ni(e,t,r,n,o,i)):!1}function Dr(e,t,r,n,o){return e===t?!0:e==null||t==null||!ge(e)&&!ge(t)?e!==e&&t!==t:Hi(e,t,r,n,Dr,o)}function Ui(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var c=a[++o];if(r(i[c],c,i)===!1)break}return t}}var Vi=Ui();function St(e,t,r){(r!==void 0&&!Le(e[t],r)||r===void 0&&!(t in e))&>(e,t,r)}function Yi(e){return ge(e)&&Ye(e)}function Pt(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function qi(e){return ro(e,cr(e))}function Gi(e,t,r,n,o,i,a){var s=Pt(e,r),c=Pt(t,r),u=a.get(c);if(u){St(e,r,u);return}var f=i?i(s,c,r+"",e,t,a):void 0,h=f===void 0;if(h){var g=ue(c),w=!g&&qe(c),p=!g&&!w&&bt(c);f=c,g||w||p?ue(s)?f=s:Yi(s)?f=Un(s):w?(h=!1,f=Zs(c)):p?(h=!1,f=di(c)):f=[]:Us(c)||vt(c)?(f=s,vt(s)?f=qi(s):(!fe(s)||oe(s))&&(f=pi(c))):h=!1}h&&(a.set(c,f),o(f,c,n,i,a),a.delete(c)),St(e,r,f)}function $r(e,t,r,n,o){e!==t&&Vi(t,function(i,a){if(o||(o=new xe),fe(i))Gi(e,t,a,r,$r,n,o);else{var s=n?n(Pt(e,a),i,a+"",e,t,o):void 0;s===void 0&&(s=i),St(e,a,s)}},cr)}var Xi="[object String]";function jr(e){return typeof e=="string"||!ue(e)&&ge(e)&&be(e)==Xi}var Ki="[object Boolean]";function Dt(e){return e===!0||e===!1||ge(e)&&be(e)==Ki}function Qe(e,t){return Dr(e,t)}var Ji="[object Number]";function Zi(e){return typeof e=="number"||ge(e)&&be(e)==Ji}function Er(e){return e==null}function Qi(e){return e===null}var $e=ao(function(e,t,r){$r(e,t,r)});function ea(e,t,r,n){if(!fe(e))return e;t=Rs(t,e);for(var o=-1,i=t.length,a=i-1,s=e;s!=null&&++o<i;){var c=ks(t[o]),u=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(o!=a){var f=s[c];u=void 0,u===void 0&&(u=fe(f)?f:ht(t[o+1])?[]:{})}Kt(s,c,u),s=s[c]}return e}function Fr(e,t,r){return e==null?e:ea(e,t,r)}function ta(e){const{inherit:t=!0}=e,{extendActionsProps:r}=Rr();return{actionsProps:{...$e($e({items:[],max:10},t?r:{}),e)}}}function Or(e){return"component"in e}function ra(e){return"render"in e}function na(e){const{type:t,disabled:r,items:n,max:o}=e,i=n.map(s=>{const c={...s};return Or(c)&&(c.componentProps={type:t,disabled:r,...c.componentProps}),c}),a=Zi(o)&&o>=0;return{showActionItems:i.slice(0,a?o:i.length),ellipsisActionItems:i.slice(a?o:i.length)}}const oa=e=>{const{componentProps:t}=e,r=()=>{const{...n}=t;return n};return m.jsx(F.Button,{...r()})},sa=e=>{const{componentProps:t}=e,n=(()=>{const{dropDownItems:o,onClick:i,...a}=t;return a})();return m.jsx(F.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(F.Button,{...n,children:[n.children,m.jsx(ve.CaretDownOutlined,{})]})})})},et=new Map;et.set("Button",oa),et.set("Dropdown",sa);function Ar(){const{setExtendActionsComp:e}=Rr();return e(et),{renderContent:d.useCallback((r,n)=>{const o=Or(r),i=ra(r);if(o){const a=et.get(r.component);return m.jsx(a,{...r},n)}return i?m.jsx("div",{children:r.render},n):null},[])}}const Mr=d.createContext({}),ia=e=>{const{extendProps:t,extendComp:r}=e.value;return m.jsx(Mr.Provider,{value:{extendProps:t,extendComp:r},children:e.children})},He=()=>d.useContext(Mr),Rr=()=>{const{extendProps:e,extendComp:t}=He(),r=n=>{const o=t==null?void 0:t.actions;o&&Object.keys(o).forEach(i=>{n.set(i,o[i])})};return{extendActionsProps:e==null?void 0:e.actions,setExtendActionsComp:r}},{useToken:aa}=F.theme,la=({items:e,actionsProps:t})=>{const{type:r,disabled:n}=t,{renderContent:o}=Ar(),{token:i}=aa(),a={backgroundColor:i.colorBgElevated,borderRadius:i.borderRadiusLG,boxShadow:i.boxShadowSecondary},s=()=>m.jsx("div",{style:a,children:m.jsx(F.Space,{style:{padding:8},children:e==null?void 0:e.map((c,u)=>o(c,u))})});return m.jsx(F.Dropdown,{disabled:n,menu:{items:[]},dropdownRender:s,trigger:["click"],children:m.jsxs(F.Button,{type:r,children:["更多",m.jsx(ve.CaretDownOutlined,{})]})})},tt=e=>{const{actionsProps:t}=ta(e),{showActionItems:r,ellipsisActionItems:n}=na(t),{renderContent:o}=Ar();return t!=null&&t.render?t.render:m.jsxs(d.Fragment,{children:[r==null?void 0:r.map((i,a)=>o(i,a)),n!=null&&n.length?m.jsx(la,{actionsProps:t,items:n}):null]})};function ca(e){const{okText:t,cancelText:r,onCancel:n,onOk:o,okProps:i,cancelProps:a}=e;return{footerActions:{max:2,items:[{component:"Button",componentProps:{...a,children:r,onClick:n}},{component:"Button",componentProps:{type:"primary",...i,children:t,onClick:o}}]}}}const ua=e=>{const{extendDialogProps:t}=fa(),r={width:700,okText:"确定",cancelText:"取消",getPopperContainer:()=>document.body};return{dialogProps:{...$e($e(r,t),e)},baseDialogProps:r}},fa=()=>{const{extendProps:e}=He();return{extendDialogProps:e==null?void 0:e.dialog}},da=(e,t)=>{const{onOpen:r,onClose:n}=e;return{open:()=>{t(!0),r&&r()},close:()=>{t(!1),n&&n()}}},pa=(e,t,r,n)=>{const{width:o,height:i}=t,{width:a,height:s}=r,c=a||o,u=s||i,{clientWidth:f,clientHeight:h}=e,g=c?c>f?f:c:0,w=u?u>h?h:u:"unset",p=d.useRef(g),T=d.useRef(w),[P,k]=d.useState(p.current),[O,B]=d.useState(T.current);return{dialogWidth:P,dialogHeight:O,initWidth:p,initHeight:T,curPropsWidth:g,curPropsHeight:w,setDialogSize:({width:q,height:J})=>{n({width:P,height:O}),q!==void 0&&k(q),J!==void 0&&B(J)}}},ha=({container:e,setDialogChangeRecord:t})=>{const{clientWidth:r,clientHeight:n}=e,o=Math.floor(r/2),i=Math.floor(n/2),[a,s]=d.useState(o),[c,u]=d.useState(i);return{dialogLeft:a,dialogTop:c,setDialogPosition:({left:h,top:g})=>{t({left:a,top:c}),h!==void 0&&s(h),g!==void 0&&u(g)}}},Ir=({container:e,dialogHeaderRef:t,dialogRef:r,setDialogPosition:n})=>{const o=d.useRef(0),i=d.useRef(0),a=f=>{const h=f.getBoundingClientRect(),g=h.width,w=h.height,p=-.5*g,T=-.5*w;return{translateX:p,translateY:T}},s=d.useCallback(f=>{const{offsetLeft:h,offsetTop:g}=r.current;o.current=f.clientX-h,i.current=f.clientY-g,document.addEventListener("mousemove",c),document.addEventListener("mouseup",u)},[]),c=d.useCallback(f=>{const h=r.current,{translateX:g,translateY:w}=a(h);let p=f.clientX-o.current,T=f.clientY-i.current;const P=-g,k=-w,O=e.scrollWidth-h.offsetWidth-g,B=e.scrollHeight-h.offsetHeight-w;p<P&&(p=P),p>O&&(p=O),T<k&&(T=k),T>B&&(T=B),n({left:p,top:T})},[]),u=d.useCallback(()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u)},[]);return d.useEffect(()=>{const f=t.current;return f.addEventListener("mousedown",s),()=>{f.removeEventListener("mousedown",s)}},[]),{}},ga=({container:e,dialogChangeRecord:t,close:r,setDialogSize:n,setDialogPosition:o})=>{const[i,a]=d.useState(!1),[s,c]=d.useState(!1);return{minimizeVisible:i,maximizeVisible:s,onMinimize:()=>{a(!0)},onMaximize:w=>{if(w==="minimize"&&a(!1),w==="maximize"){const{scrollWidth:p,scrollHeight:T}=e,P=Math.floor(p),k=Math.floor(T),O=Math.floor(p/2),B=Math.floor(T/2);n({width:P,height:k}),o({top:B,left:O}),c(!0)}},onRecovery:()=>{const{top:w,left:p,width:T,height:P}=t.current;n({width:T,height:P}),o({top:w,left:p}),c(!1)},onClose:()=>{a(!1),c(!1),r()}}},ma=({visible:e,container:t,dialogHeight:r,dialogRef:n,dialogHeaderRef:o,dialogFooterRef:i})=>{const[a,s]=d.useState("unset");return d.useEffect(()=>{var c,u,f;if(e){const{clientHeight:w}=t,p=(c=o.current)==null?void 0:c.offsetHeight,T=(u=i.current)==null?void 0:u.offsetHeight;let k=((f=n.current)==null?void 0:f.getBoundingClientRect().height)-p-T-0;const O=w-p-T-0;k>O&&(k=O),s(k)}},[e,r]),{contentMaxHeight:a,setContentMaxHeight:s}},va=()=>{const[e,t]=d.useState(160),[r,n]=d.useState(60),o=d.useRef(null);return{minimizeTop:r,minimizeLeft:e,minimizeRef:o,setMinimizePosition:({left:a,top:s})=>{a!==void 0&&t(a),s!==void 0&&n(s)}}},ya=({visible:e,dialogRef:t,minimizeRef:r,container:n})=>{const o={xphDialog:"xph--dialog",xphDialogWrapper:"xph--dialog--wrapper",xphMinimizeDialog:"xph--dialog--minimize"},i=(s,c)=>{console.log("触发插入"),s.querySelector(`.${o.xphDialogWrapper}`).style.opacity="unset",s.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(s,u),c.parentNode.removeChild(u)},a=s=>{var f,h;const c=n.querySelectorAll(`.${o.xphDialog}`),u=c[c.length-1];if(((f=t.current)==null?void 0:f.parentNode)!==u&&(i((h=t.current)==null?void 0:h.parentNode,u),s)){const g=s.target;g.tagName==="INPUT"&&g.focus&&g.focus()}};return d.useEffect(()=>{var s,c;return(s=t.current)==null||s.addEventListener("mousedown",a,!1),(c=r.current)==null||c.addEventListener("mousedown",a,!1),()=>{var u,f;(u=t.current)==null||u.removeEventListener("mousedown",a,!1),(f=r.current)==null||f.removeEventListener("mousedown",a,!1)}},[]),d.useEffect(()=>{if(e)a();else{const s=Array.from(n.querySelectorAll(`.${o.xphDialog}`)),c=s.map(g=>g.querySelector(`.${o.xphDialogWrapper}`)).filter(g=>g!==null),u=s.map(g=>g.querySelector(`.${o.xphMinimizeDialog}`)).filter(g=>g!==null),f=c.filter(g=>g.style.display==="flex"),h=u.filter(g=>g.style.display==="flex");if(f.length){i(f[f.length-1].parentNode,s[s.length-1]);return}if(h.length){i(h[h.length-1].parentNode,s[s.length-1]);return}}},[e]),{dialogTopShowClassConfig:o}},ba=({visible:e,container:t,initWidth:r,initHeight:n,curPropsWidth:o,curPropsHeight:i,setDialogSize:a,setDialogPosition:s})=>{const{clientWidth:c,clientHeight:u}=t,f=Math.floor(c/2),h=Math.floor(u/2);d.useEffect(()=>{o!==r.current&&(console.log("重新设置了宽度"),a({width:o})),i!==n.current&&(console.log("重新设置了高度"),a({height:i}))},[o,i]),d.useEffect(()=>{o!==r.current&&(console.log("重新设置了左边位置"),s({left:f})),i!==n.current&&(console.log("重新设置了上边位置"),s({top:h}))},[o,i]),d.useEffect(()=>{e||(a({width:r.current,height:n.current}),s({left:f,top:h}))},[e])},_a=()=>{const e=d.useRef({left:0,top:0,width:0,height:0});return{dialogChangeRecord:e,setDialogChangeRecord:({left:r,top:n,width:o,height:i})=>{const{left:a,top:s,width:c,height:u}=e.current;e.current={left:r??a,top:n??s,width:o??c,height:i??u}}}},wa=({visible:e,container:t,dialogRef:r,setDialogSize:n,setDialogPosition:o})=>{const i=d.useCallback(()=>m.jsx("div",{ref:s,style:{position:"absolute",border:"4px dashed #ccc",display:"none"}}),[]),a=d.useRef(null);d.useEffect(()=>{if(e){const E=r.current.offsetWidth,j=r.current.offsetHeight;a.current={width:E,height:j}}else a.current=null},[e]);const s=d.useRef(null),c=d.useRef(),u=d.useRef(!1),[f,h]=d.useState(!1),g=d.useRef(0),w=d.useRef(0),p=(E,j)=>{u.current=!0,h(!0),c.current=j;const{clientX:C,clientY:x}=E;g.current=C,w.current=x;const z=parseFloat(r.current.style.left),L=parseFloat(r.current.style.top),_=r.current.offsetWidth,v=r.current.offsetHeight;s.current.style.display="block",s.current.style.left=`${z-.5*_}px`,s.current.style.top=`${L-.5*v}px`,s.current.style.width=`${_}px`,s.current.style.height=`${v}px`},T=E=>{if(u.current){const{clientX:j,clientY:C}=E,x=j-g.current,z=C-w.current,L=parseFloat(s.current.style.left),_=parseFloat(s.current.style.top),v=s.current.offsetWidth,b=s.current.offsetHeight,$=a.current.width,S=a.current.height,R=t.scrollWidth,M=t.scrollHeight;let A=v,I=b,W=L,H=_;switch(c.current){case"lt":{A=A-x,I=I-z,H=H+z,W=W+x,A<$&&(A=v,W=L),I<S&&(I=b,H=_),W<0&&(W=0,A=v),H<0&&(H=0,I=b);break}case"rt":{A=A+x,I=I-z,H=H+z,W=L,A<$&&(A=v),I<S&&(I=b,H=_),A>R-W&&(A=R-W),H<0&&(H=0,I=b);break}case"rb":{A=A+x,I=I+z,H=_,W=L,A<$&&(A=v),I<S&&(I=b),A>R-W&&(A=R-W),I>M-H&&(I=M-H);break}case"lb":{A=A-x,I=I+z,H=_,W=W+x,A<$&&(A=v,W=L),I<S&&(I=b),W<0&&(W=0,A=v),I>M-H&&(I=M-H);break}}s.current.style.left=`${W}px`,s.current.style.top=`${H}px`,s.current.style.width=`${A}px`,s.current.style.height=`${I}px`,g.current=j,w.current=C}},P=()=>{if(u.current){u.current=!1,h(!1),s.current.style.display="none";const{left:E,top:j,width:C,height:x}=s.current.style,z=parseFloat(E)+.5*parseFloat(C),L=parseFloat(j)+.5*parseFloat(x),_=parseFloat(C),v=parseFloat(x);console.log(z,L,_,v),o({left:z,top:L}),n({width:_,height:v})}},k=E=>p(E,"lt"),O=E=>p(E,"rt"),B=E=>p(E,"rb"),X=E=>p(E,"lb"),q=d.useCallback(E=>{T(E)},[]),J=d.useCallback(()=>{P()},[]),ne=d.useCallback(()=>{P()},[]);return d.useEffect(()=>(document.body.addEventListener("mousemove",q),document.body.addEventListener("mouseup",J),document.body.addEventListener("mouseleave",ne),()=>{document.body.removeEventListener("mousemove",q),document.body.removeEventListener("mouseup",J),document.body.removeEventListener("mouseleave",ne)}),[]),{resizingState:f,DashedBox:i,onMousedownResizeLt:k,onMousedownResizeRt:O,onMousedownResizeRb:B,onMousedownResizeLb:X}},$t={"minimize-windows":"_minimize-windows_12u3y_1","minimize-windows-title":"_minimize-windows-title_12u3y_43","minimize-windows-operate":"_minimize-windows-operate_12u3y_55"},Ca=({onClick:e})=>m.jsx(F.Button,{type:"link",onClick:e,icon:m.jsx(ve.ShrinkOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),kr=({onClick:e})=>m.jsx(F.Button,{type:"link",onClick:e,icon:m.jsx(ve.FullscreenOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),xa=({onClick:e})=>m.jsx(F.Button,{type:"link",onClick:e,icon:m.jsx(ve.FullscreenExitOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),zr=({onClick:e})=>m.jsx(F.Button,{type:"link",onClick:e,icon:m.jsx(ve.CloseOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),{useToken:Ta}=F.theme,Sa=d.forwardRef(({title:e,left:t,top:r,visible:n,onMaximize:o,onClosesquare:i,className:a},s)=>{const{token:c}=Ta(),u={borderRadius:c.borderRadiusLG};return m.jsxs("div",{style:{display:n?"flex":"none",left:t,top:r,...u},className:`${$t["minimize-windows"]} ${a}`,ref:s,children:[m.jsx("div",{className:$t["minimize-windows-title"],title:e,children:e}),m.jsxs("div",{className:$t["minimize-windows-operate"],children:[m.jsx(kr,{onClick:o}),m.jsx(zr,{onClick:i})]})]})}),ce={"xph-dialog-mask":"_xph-dialog-mask_18f3p_1","xph-dialog-wrapper":"_xph-dialog-wrapper_18f3p_23",dialog__header:"_dialog__header_18f3p_49","dialog__header-btns":"_dialog__header-btns_18f3p_67",dialog__main:"_dialog__main_18f3p_75",dialog__footer:"_dialog__footer_18f3p_89",dialog__resize:"_dialog__resize_18f3p_103","dialog__resize-lt":"_dialog__resize-lt_18f3p_117","dialog__resize-rt":"_dialog__resize-rt_18f3p_129","dialog__resize-rb":"_dialog__resize-rb_18f3p_141","dialog__resize-lb":"_dialog__resize-lb_18f3p_153"},{useToken:Pa}=F.theme,Da=d.forwardRef((e,t)=>{console.log("render Dialog==============================================");const{token:r}=Pa(),n={borderRadius:r.borderRadiusLG},{children:o,baseDialogProps:i,mask:a}=e,[s,c]=d.useState(!1),{footerActions:u}=ca(e),{title:f,renderFooter:h,renderTitle:g,getPopperContainer:w}=e,{open:p,close:T}=da(e,c),P=w(),k=d.useRef(null),O=d.useRef(null),B=d.useRef(null),X=d.useRef(null),{dialogChangeRecord:q,setDialogChangeRecord:J}=_a(),{initWidth:ne,initHeight:E,curPropsWidth:j,curPropsHeight:C,dialogWidth:x,dialogHeight:z,setDialogSize:L}=pa(P,i,e,J),{dialogLeft:_,dialogTop:v,setDialogPosition:b}=ha({container:P,setDialogChangeRecord:J}),{contentMaxHeight:$}=ma({visible:s,container:P,dialogHeight:z,dialogRef:k,dialogHeaderRef:O,dialogFooterRef:X}),{minimizeLeft:S,minimizeTop:R,minimizeRef:M,setMinimizePosition:A}=va(),{minimizeVisible:I,maximizeVisible:W,onMaximize:H,onMinimize:se,onRecovery:de,onClose:ie}=ga({container:P,dialogChangeRecord:q,close:T,setDialogSize:L,setDialogPosition:b});ba({visible:s,container:P,initWidth:ne,initHeight:E,curPropsWidth:j,curPropsHeight:C,setDialogSize:L,setDialogPosition:b}),Ir({container:P,dialogHeaderRef:O,dialogRef:k,setDialogPosition:b}),Ir({container:P,dialogHeaderRef:M,dialogRef:M,setDialogPosition:A});const{dialogTopShowClassConfig:ae}=ya({visible:s,container:P,dialogRef:k,minimizeRef:M}),{resizingState:ee,DashedBox:pe,onMousedownResizeLt:_e,onMousedownResizeRt:je,onMousedownResizeRb:Ot,onMousedownResizeLb:Ae}=wa({visible:s,container:P,dialogRef:k,setDialogSize:L,setDialogPosition:b});return d.useImperativeHandle(t,()=>({open:p,close:ie})),m.jsxs("div",{className:ae.xphDialog,children:[a?m.jsx("div",{className:ce["xph-dialog-mask"],style:{display:s?"block":"none",width:P.scrollWidth,height:P.scrollHeight}}):null,m.jsx(Sa,{visible:I,className:`${ae.xphMinimizeDialog}`,ref:M,left:S,top:R,title:f,onMaximize:()=>H("minimize"),onClosesquare:ie}),m.jsxs("div",{ref:k,className:`${ce["xph-dialog-wrapper"]} ${ae.xphDialogWrapper}`,style:{display:s&&!I?"flex":"none",left:_,top:v,width:x,height:z,opacity:ee?.2:"unset",...n},children:[m.jsxs("div",{ref:O,className:ce.dialog__header,children:[m.jsx("div",{children:g?g():f}),m.jsxs("div",{className:ce["dialog__header-btns"],children:[m.jsx(Ca,{onClick:se}),W?m.jsx(xa,{onClick:de}):m.jsx(kr,{onClick:()=>H("maximize")}),m.jsx(zr,{onClick:ie})]})]}),m.jsx("div",{ref:B,className:ce.dialog__main,style:{maxHeight:$},children:s?o:null}),h?m.jsx("div",{ref:X,children:h()}):m.jsx("div",{ref:X,className:ce.dialog__footer,children:m.jsx(tt,{...u})}),m.jsx("div",{className:`${ce.dialog__resize} ${ce["dialog__resize-lt"]}`,onMouseDown:_e}),m.jsx("div",{className:`${ce.dialog__resize} ${ce["dialog__resize-rt"]}`,onMouseDown:je}),m.jsx("div",{className:`${ce.dialog__resize} ${ce["dialog__resize-rb"]}`,onMouseDown:Ot}),m.jsx("div",{className:`${ce.dialog__resize} ${ce["dialog__resize-lb"]}`,onMouseDown:Ae})]}),m.jsx(pe,{})]})}),$a=(e,t)=>{const{children:r,...n}=e,{baseDialogProps:o,dialogProps:i}=ua(n),{getPopperContainer:a}=i;return console.log("render XphDialog=============================================="),m.jsx(Nr,{getPopperContainer:a,children:m.jsx(Da,{...i,baseDialogProps:o,ref:t,children:r})})},Lr=d.forwardRef($a),Nr=({children:e,getPopperContainer:t})=>{const[r,n]=d.useState(null);return d.useEffect(()=>{const o=t();n(o)},[]),r?cn.createPortal(e,r):null};function jt(e){return"component"in e}function Et(e){return"render"in e}function ja(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 Ea(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 Fa=["DatePicker","MonthPicker","RangePicker","WeekPicker","TimePicker"],Oa=e=>{const{show:t,ifShow:r,required:n,disabled:o,componentProps:i}=e;return!!(oe(t)||oe(r)||oe(n)||oe(o)||oe(i)||Et(e))},Aa=e=>["application/json","application/javascript","text/plain","text/html","text/css"].includes(e)?`${e}; charset=utf-8`:e,Ma=(e,t,r)=>{const n=d.useRef(null),o=d.useRef(null),{handleCollapseChangeFalse:i}=r.current||{},{show:a,ifShow:s}=e;let c=!0,u=!0;if(Dt(a)&&(c=a),Dt(s)&&(u=s),oe(a)){c=a({model:t});const f=Er(n.current)?c:n.current;d.useEffect(()=>{Qe(c,f)||i&&i()},[t])}if(oe(s)){u=s({model:t});const f=Er(o.current)?u:o.current;d.useEffect(()=>{Qe(u,f)||i&&i()},[t])}return n.current=c,o.current=u,{isShow:c,isIfShow:u}},Ra=(e,t)=>{const{collapsible:r,collapseNum:n}=e,[o,i]=d.useState(!!(r&&t>=n));return{itemCollapse:o,setItemCollapse:i}},Ia=({item:e,model:t,isShow:r,componentProps:n})=>{const{rules:o=[],label:i,required:a}=e;let s=o;const c=jt(e),u=c?ja(e.component)+i:"";function f(p,T){const P=p.message||u;return T===void 0||Qi(T)||Array.isArray(T)&&T.length===0||typeof T=="string"&&T.trim()===""||typeof T=="object"&&Reflect.has(T,"checked")&&Reflect.has(T,"halfChecked")&&Array.isArray(T.checked)&&Array.isArray(T.halfChecked)&&T.checked.length===0&&T.halfChecked.length===0?Promise.reject(P):Promise.resolve()}const h=oe(a)?a({model:t}):a;h&&(!s||s.length===0?s=[{required:h,validator:f}]:s.findIndex(T=>Reflect.has(T,"required"))===-1&&s.push({required:h,validator:f}));const g=s.findIndex(p=>Reflect.has(p,"required")&&!Reflect.has(p,"validator"));if(g!==-1){const p=s[g];if(r||(p.required=!1),c){const{component:T}=e;Reflect.has(p,"type")||(p.type=T==="InputNumber"?"number":"string"),p.message=p.message||u,(T.includes("Input")||T.includes("Textarea"))&&(p.whitespace=!0);const P=n.valueFormat;Ea(p,T,P)}}const w=s.findIndex(p=>p.max);return w!==-1&&!s[w].validator&&(s[w].message=s[w].message||`字符数应小于${s[w].max}位`),{rules:s}},ka=(e,t,r)=>{const{disabled:n}=e;let o=!1;const{disabled:i}=t;return oe(i)&&(o=i({model:r})),Dt(i)&&(o=i),{disabled:Reflect.has(t,"disabled")?o:n}},za=(e,t)=>{const r={},{componentProps:n={}}=e;return oe(n)&&Object.assign(r,n({model:t})),Object.assign(r,n),{componentProps:r}},La=(e,t)=>{const{colProps:r={}}=e,{colProps:n={span:24}}=t;return{colProps:{...n,...r}}},Na=({formProps:e})=>{const{items:t}=e;return{formItems:t.map(n=>({...n}))}},Wa=(e,t)=>{const r=s=>(Object.keys(s).forEach(c=>{Object.defineProperty(s,c,{value:s[c],writable:!1,enumerable:!0,configurable:!1})}),s),n={};e.items.forEach(s=>{n[s.name]=s.initialValue});const o=Oa(t),i=o?F.Form.useWatch(s=>r(s)):null;return{rewritingModel:d.useMemo(()=>i||r(n),[i]),isusewatch:o}},Ba=()=>{const e=d.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 d.useEffect(()=>(console.log("ParentComponent is mounted====================================="),()=>{console.log("ParentComponent is unmounted===================================="),e.current=null}),[]),[t,r]};var Wr={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(un,function(){var r=1e3,n=6e4,o=36e5,i="millisecond",a="second",s="minute",c="hour",u="day",f="week",h="month",g="quarter",w="year",p="date",T="Invalid Date",P=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,k=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,O={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_){var v=["th","st","nd","rd"],b=_%100;return"["+_+(v[(b-20)%10]||v[b]||v[0])+"]"}},B=function(_,v,b){var $=String(_);return!$||$.length>=v?_:""+Array(v+1-$.length).join(b)+_},X={s:B,z:function(_){var v=-_.utcOffset(),b=Math.abs(v),$=Math.floor(b/60),S=b%60;return(v<=0?"+":"-")+B($,2,"0")+":"+B(S,2,"0")},m:function _(v,b){if(v.date()<b.date())return-_(b,v);var $=12*(b.year()-v.year())+(b.month()-v.month()),S=v.clone().add($,h),R=b-S<0,M=v.clone().add($+(R?-1:1),h);return+(-($+(b-S)/(R?S-M:M-S))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:h,y:w,w:f,d:u,D:p,h:c,m:s,s:a,ms:i,Q:g}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},q="en",J={};J[q]=O;var ne="$isDayjsObject",E=function(_){return _ instanceof z||!(!_||!_[ne])},j=function _(v,b,$){var S;if(!v)return q;if(typeof v=="string"){var R=v.toLowerCase();J[R]&&(S=R),b&&(J[R]=b,S=R);var M=v.split("-");if(!S&&M.length>1)return _(M[0])}else{var A=v.name;J[A]=v,S=A}return!$&&S&&(q=S),S||!$&&q},C=function(_,v){if(E(_))return _.clone();var b=typeof v=="object"?v:{};return b.date=_,b.args=arguments,new z(b)},x=X;x.l=j,x.i=E,x.w=function(_,v){return C(_,{locale:v.$L,utc:v.$u,x:v.$x,$offset:v.$offset})};var z=function(){function _(b){this.$L=j(b.locale,null,!0),this.parse(b),this.$x=this.$x||b.x||{},this[ne]=!0}var v=_.prototype;return v.parse=function(b){this.$d=function($){var S=$.date,R=$.utc;if(S===null)return new Date(NaN);if(x.u(S))return new Date;if(S instanceof Date)return new Date(S);if(typeof S=="string"&&!/Z$/i.test(S)){var M=S.match(P);if(M){var A=M[2]-1||0,I=(M[7]||"0").substring(0,3);return R?new Date(Date.UTC(M[1],A,M[3]||1,M[4]||0,M[5]||0,M[6]||0,I)):new Date(M[1],A,M[3]||1,M[4]||0,M[5]||0,M[6]||0,I)}}return new Date(S)}(b),this.init()},v.init=function(){var b=this.$d;this.$y=b.getFullYear(),this.$M=b.getMonth(),this.$D=b.getDate(),this.$W=b.getDay(),this.$H=b.getHours(),this.$m=b.getMinutes(),this.$s=b.getSeconds(),this.$ms=b.getMilliseconds()},v.$utils=function(){return x},v.isValid=function(){return this.$d.toString()!==T},v.isSame=function(b,$){var S=C(b);return this.startOf($)<=S&&S<=this.endOf($)},v.isAfter=function(b,$){return C(b)<this.startOf($)},v.isBefore=function(b,$){return this.endOf($)<C(b)},v.$g=function(b,$,S){return x.u(b)?this[$]:this.set(S,b)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(b,$){var S=this,R=!!x.u($)||$,M=x.p(b),A=function(ae,ee){var pe=x.w(S.$u?Date.UTC(S.$y,ee,ae):new Date(S.$y,ee,ae),S);return R?pe:pe.endOf(u)},I=function(ae,ee){return x.w(S.toDate()[ae].apply(S.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(ee)),S)},W=this.$W,H=this.$M,se=this.$D,de="set"+(this.$u?"UTC":"");switch(M){case w:return R?A(1,0):A(31,11);case h:return R?A(1,H):A(0,H+1);case f:var ie=this.$locale().weekStart||0,me=(W<ie?W+7:W)-ie;return A(R?se-me:se+(6-me),H);case u:case p:return I(de+"Hours",0);case c:return I(de+"Minutes",1);case s:return I(de+"Seconds",2);case a:return I(de+"Milliseconds",3);default:return this.clone()}},v.endOf=function(b){return this.startOf(b,!1)},v.$set=function(b,$){var S,R=x.p(b),M="set"+(this.$u?"UTC":""),A=(S={},S[u]=M+"Date",S[p]=M+"Date",S[h]=M+"Month",S[w]=M+"FullYear",S[c]=M+"Hours",S[s]=M+"Minutes",S[a]=M+"Seconds",S[i]=M+"Milliseconds",S)[R],I=R===u?this.$D+($-this.$W):$;if(R===h||R===w){var W=this.clone().set(p,1);W.$d[A](I),W.init(),this.$d=W.set(p,Math.min(this.$D,W.daysInMonth())).$d}else A&&this.$d[A](I);return this.init(),this},v.set=function(b,$){return this.clone().$set(b,$)},v.get=function(b){return this[x.p(b)]()},v.add=function(b,$){var S,R=this;b=Number(b);var M=x.p($),A=function(H){var se=C(R);return x.w(se.date(se.date()+Math.round(H*b)),R)};if(M===h)return this.set(h,this.$M+b);if(M===w)return this.set(w,this.$y+b);if(M===u)return A(1);if(M===f)return A(7);var I=(S={},S[s]=n,S[c]=o,S[a]=r,S)[M]||1,W=this.$d.getTime()+b*I;return x.w(W,this)},v.subtract=function(b,$){return this.add(-1*b,$)},v.format=function(b){var $=this,S=this.$locale();if(!this.isValid())return S.invalidDate||T;var R=b||"YYYY-MM-DDTHH:mm:ssZ",M=x.z(this),A=this.$H,I=this.$m,W=this.$M,H=S.weekdays,se=S.months,de=S.meridiem,ie=function(ee,pe,_e,je){return ee&&(ee[pe]||ee($,R))||_e[pe].slice(0,je)},me=function(ee){return x.s(A%12||12,ee,"0")},ae=de||function(ee,pe,_e){var je=ee<12?"AM":"PM";return _e?je.toLowerCase():je};return R.replace(k,function(ee,pe){return pe||function(_e){switch(_e){case"YY":return String($.$y).slice(-2);case"YYYY":return x.s($.$y,4,"0");case"M":return W+1;case"MM":return x.s(W+1,2,"0");case"MMM":return ie(S.monthsShort,W,se,3);case"MMMM":return ie(se,W);case"D":return $.$D;case"DD":return x.s($.$D,2,"0");case"d":return String($.$W);case"dd":return ie(S.weekdaysMin,$.$W,H,2);case"ddd":return ie(S.weekdaysShort,$.$W,H,3);case"dddd":return H[$.$W];case"H":return String(A);case"HH":return x.s(A,2,"0");case"h":return me(1);case"hh":return me(2);case"a":return ae(A,I,!0);case"A":return ae(A,I,!1);case"m":return String(I);case"mm":return x.s(I,2,"0");case"s":return String($.$s);case"ss":return x.s($.$s,2,"0");case"SSS":return x.s($.$ms,3,"0");case"Z":return M}return null}(ee)||M.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(b,$,S){var R,M=this,A=x.p($),I=C(b),W=(I.utcOffset()-this.utcOffset())*n,H=this-I,se=function(){return x.m(M,I)};switch(A){case w:R=se()/12;break;case h:R=se();break;case g:R=se()/3;break;case f:R=(H-W)/6048e5;break;case u:R=(H-W)/864e5;break;case c:R=H/o;break;case s:R=H/n;break;case a:R=H/r;break;default:R=H}return S?R:x.a(R)},v.daysInMonth=function(){return this.endOf(h).$D},v.$locale=function(){return J[this.$L]},v.locale=function(b,$){if(!b)return this.$L;var S=this.clone(),R=j(b,$,!0);return R&&(S.$L=R),S},v.clone=function(){return x.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},_}(),L=z.prototype;return C.prototype=L,[["$ms",i],["$s",a],["$m",s],["$H",c],["$W",u],["$M",h],["$y",w],["$D",p]].forEach(function(_){L[_[1]]=function(v){return this.$g(v,_[0],_[1])}}),C.extend=function(_,v){return _.$i||(_(v,z,C),_.$i=!0),C},C.locale=j,C.isDayjs=E,C.unix=function(_){return C(1e3*_)},C.en=J[q],C.Ls=J,C.p={},C})})(Wr);var Ha=Wr.exports;const rt=fn(Ha);function Ua(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 i=[];return o.forEach((a,s)=>{Fr(i,s,t[a.trim()])}),i.filter(Boolean).length?i:void 0}}}function Va(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 i={};return o.forEach(a=>{Fr(i,a.trim(),t[a.trim()])}),Object.values(i).filter(Boolean).length?i:void 0}}}function Ya(e,t){const r=t.fieldMapToTime;if(!r||!Array.isArray(r))return e;for(const[n,[o,i],a="YYYY-MM-DD"]of r){if(!n||!o||!i)continue;if(!e[n]){Reflect.deleteProperty(e,n);continue}const[s,c]=e[n],[u,f]=Array.isArray(a)?a:[a,a];e[o]=rt(s).format(u),e[i]=rt(c).format(f),Reflect.deleteProperty(e,n)}return e}const qa=(e,t,r)=>{const n=e.filter(a=>a.name);return{handleFormatRenderValues:a=>{const s={},c=[];return n.forEach(u=>{const f=Reflect.has(a,u.name),h=Ua(u.name,a)||Va(u.name,a);if(f||h){const g=h||a[u.name];if(jt(u))if(Fa.includes(u.component)){if(ue(g)){const w=[];for(const p of g)w.push(p?rt(p):null);s[u.name]=w}else s[u.name]=g?rt(g):null;c.push(u.name)}else s[u.name]=g,c.push(u.name);Et(u)&&(s[u.name]=g,c.push(u.name))}}),{renderValues:s,validKeys:c}},handleFormatReturnValues:a=>{var c,u,f,h,g;if(!fe(a))return{};const s={};for(const w of Object.entries(a)){let[,p]=w;const[T]=w;if(!T||ue(p)&&p.length===0||oe(p))continue;const{transformDateFunc:P}=t,k=(f=(u=(c=r.current)==null?void 0:c.get(T))==null?void 0:u.current)==null?void 0:f.componentProps,O=k==null?void 0:k.valueFormat;if(fe(p)){const B=p;B.format&&(p=P==null?void 0:P(B,O))}ue(p)&&((h=p[0])!=null&&h.format)&&((g=p[1])!=null&&g.format)&&(p=p.map(B=>P==null?void 0:P(B,O))),jr(p)&&(p===""?p=void 0:p=p.trim()),s[T]=p}return Ya(s,t)}}},Ga=(e,t,r)=>({getFieldsValue:(...c)=>r(e.getFieldsValue(...c)),setFieldsValue:c=>{const{renderValues:u,validKeys:f}=t(c);e.setFieldsValue(u),e.validateFields(f)},resetFields:async()=>e.resetFields(),validator:async c=>e.validateFields(c).then(u=>r(u)),scrollToField:async(c,u)=>e.scrollToField(c,u)}),Xa=e=>{const{extendFormProps:t}=Br();return{formProps:{...$e($e({collapseNum:5,colon:!1,items:[],labelWrap:!0,transformDateFunc:(o,i)=>{var a;return((a=o==null?void 0:o.format)==null?void 0:a.call(o,i||"YYYY-MM-DD HH:mm:ss"))??o},fieldMapToTime:[]},t),e)}}},nt=e=>{const{immediate:t=!0,params:r,api:n,apiCallback:o,isUseWatch:i}=e,a=d.useRef(!0),s=d.useRef(r),c=()=>{n&&oe(n)&&(r?n(r).then(o):n().then(o),s.current=r)};return d.useEffect(()=>{a.current&&(t&&c(),a.current=!1),!a.current&&i&&(Qe(r,s.current)||t&&c())},[r]),{getApiData:c}},Ka=(e,t)=>{const{collapsible:r,collapseNum:n}=e,o=d.useRef();return{collapsible:r,collapseNum:n,collapseRef:o,onClickCollapseToTrue:()=>{var s;(s=t.current)==null||s.forEach(c=>{if(c.current){const{itemIndex:u}=c.current;u>=n&&r&&c.current.setItemCollapse(!0)}})},onClickCollapseToFalse:()=>{var s;(s=t.current)==null||s.forEach(c=>{if(c.current){const{itemCollapse:u}=c.current;u&&c.current.setItemCollapse(!1)}})}}},Br=()=>{const{extendProps:e,extendComp:t}=He(),r=n=>{const o=t==null?void 0:t.form;o&&Object.keys(o).forEach(i=>{n.set(i,o[i])})};return{extendFormProps:e==null?void 0:e.form,setExtendFormComp:r}},Ja=e=>{console.log("render ApiSelect");const{api:t,params:r,immediate:n=!0,isusewatch:o,onDropdownVisibleChange:i}=e,a=o==="true",[s,c]=d.useState([]),{getApiData:u}=nt({api:t,immediate:n,params:r,apiCallback:c,isUseWatch:a}),f=g=>{g&&!n&&u(),i&&i(g)},h=()=>{const{api:g,params:w,immediate:p,isusewatch:T,...P}=e;return P};return m.jsx(F.Select,{...h(),options:s,onDropdownVisibleChange:f})},Za=e=>{console.log("render ApiTreeSelect");const{api:t,params:r,immediate:n=!0,isusewatch:o,onDropdownVisibleChange:i}=e,a=o==="true",[s,c]=d.useState([]),{getApiData:u}=nt({api:t,immediate:n,params:r,apiCallback:c,isUseWatch:a}),f=g=>{g&&!n&&u(),i&&i(g)},h=()=>{const{api:g,params:w,immediate:p,isusewatch:T,...P}=e;return P};return m.jsx(F.TreeSelect,{...h(),treeData:s,onDropdownVisibleChange:f})},Qa=e=>{console.log("render ApiTransfer");const{api:t,params:r,isusewatch:n}=e,o=n==="true",[i,a]=d.useState([]);nt({api:t,params:r,apiCallback:a,isUseWatch:o});const s=()=>{const{api:c,params:u,isusewatch:f,...h}=e;return h};return m.jsx(F.Transfer,{...s(),dataSource:i})},el=e=>{console.log("render ApiAutoComplete");const{api:t,params:r,immediate:n=!0,isusewatch:o,onDropdownVisibleChange:i}=e,a=o==="true",[s,c]=d.useState([]),{getApiData:u}=nt({api:t,immediate:n,params:r,apiCallback:c,isUseWatch:a}),f=g=>{g&&!n&&u(),i&&i(g)},h=()=>{const{api:g,params:w,immediate:p,isusewatch:T,...P}=e;return P};return m.jsx(F.AutoComplete,{...h(),options:s,onDropdownVisibleChange:f})},Te={String:"String","String[]":"String[]","File[]":"File[]",FileList:"FileList"},tl=e=>{console.log("render AutoUpload"),console.log(lt());const t="",{api:r,maxCount:n=1,maxSize:o=2,listType:i="picture-card",openCrop:a=!1,data:s,returnType:c=Te.String,value:u=t,onChange:f}=e,h=d.useRef(!0),g=d.useRef(0),w=d.useRef([]),[p,T]=d.useState([]),P=E=>{w.current=E,T([...E])},k=()=>{const{api:E,maxCount:j,maxSize:C,openCrop:x,beforeUpload:z,fileList:L,returnType:_,...v}=e;return v},O=E=>{const j=E.size/1024/1024<o;j||F.message.error(`文件大小超过:${o}M, 请重试`);const C=w.current.length+g.current<n;return C||F.message.error(`文件数量不能超过${n}个`),j&&C&&g.current++,j&&C&&B(E),F.Upload.LIST_IGNORE},B=E=>{a?(F.message.error("暂时不支持裁剪功能,后续兼容。。。。"),X({file:E})):X({file:E})},X=E=>{r?r({file:E.file,...s}).then(j=>{P([...w.current,...j])}).finally(()=>{g.current--}):(Object.assign(E.file,{status:"done",url:URL.createObjectURL(new Blob([E.file],{type:Aa(E.file.type)}))}),P([...w.current,E.file]),g.current--)},q=E=>{const{file:j,fileList:C}=E,{status:x}=j;switch(x){case"removed":{P([...C]);break}}},J=E=>{const j=x=>{const z=x.split("/"),L=z[z.length-1],[_]=L.split("?");return _};return{uid:(x=>{const z=w.current.find(L=>L.url===x);return z?z.uid:lt()})(E),name:j(E),url:E,status:"done"}},ne=()=>{switch(c){case Te.String:return p.map(E=>E.url).join(",");case Te["String[]"]:return p.map(E=>E.url);case Te["File[]"]:return[...p];case Te.FileList:return[...p]}};return d.useEffect(()=>{const E=ne();if(Qe(E,u))return;let j=[];switch(c){case Te.String:{j=(u||"").split(",").filter(C=>C).map(C=>J(C));break}case Te["String[]"]:{j=(u||[]).map(C=>J(C));break}case Te["File[]"]:{j=(u||[]).map(C=>C);break}case Te.FileList:{j=(u||[]).map(C=>C);break}}P(j)},[u]),d.useEffect(()=>{if(h.current){h.current=!1;return}const E=ne();f==null||f(E)},[p]),m.jsx(F.Upload,{listType:i,...k(),fileList:p,beforeUpload:O,onChange:q,children:"上传"})},K=new Map;K.set("Input",F.Input),K.set("ApiSelect",Ja),K.set("Select",F.Select),K.set("InputNumber",F.InputNumber),K.set("ApiTreeSelect",Za),K.set("TreeSelect",F.TreeSelect),K.set("ApiTransfer",Qa),K.set("Transfer",F.Transfer),K.set("Switch",F.Switch),K.set("Button",F.Button),K.set("Radio",F.Radio),K.set("RadioGroup",F.Radio.Group),K.set("Checkbox",F.Checkbox),K.set("CheckboxGroup",F.Checkbox.Group),K.set("Cascader",F.Cascader),K.set("TimePicker",F.TimePicker),K.set("DatePicker",F.DatePicker),K.set("MonthPicker",F.DatePicker.MonthPicker),K.set("WeekPicker",F.DatePicker.WeekPicker),K.set("RangePicker",F.DatePicker.RangePicker),K.set("InputPassword",F.Input.Password),K.set("InputTextArea",F.Input.TextArea),K.set("ApiAutoComplete",el),K.set("AutoComplete",F.AutoComplete),K.set("Upload",F.Upload),K.set("AutoUpload",tl);const Hr={"form-item-force":"_form-item-force_1hsf3_1","form-item-hidden":"_form-item-hidden_1hsf3_9"},rl=d.forwardRef(({itemIndex:e,itemProps:t,methods:r,formProps:n,collapseRef:o},i)=>{console.log("render FormItem",t.name);const{rewritingModel:a,isusewatch:s}=Wa(n,t),{isIfShow:c,isShow:u}=Ma(t,a,o),{colProps:f}=La(t,n),{componentProps:h}=za(t,a),{rules:g}=Ia({item:t,model:a,isShow:u,componentProps:h}),{disabled:w}=ka(n,t,a),{itemCollapse:p,setItemCollapse:T}=Ra(n,e),{name:P,label:k,wrapperCol:O,labelCol:B,valuePropName:X,initialValue:q,forceRow:J}=t;d.useImperativeHandle(i,()=>({itemIndex:e,componentProps:h,itemCollapse:p,setItemCollapse:T}));const ne=()=>({name:P,label:k,rules:g,wrapperCol:O,labelCol:B,valuePropName:X,initialValue:q}),{setExtendFormComp:E}=Br();E(K);const j=jt(t),C=Et(t),x=()=>{if(j){const z=K.get(t.component);return m.jsx(z,{...h,disabled:w,isusewatch:s.toString()})}return C?t.render({model:a,name:P,disabled:w,methods:r,componentProps:h}):null};return m.jsxs(d.Fragment,{children:[J?m.jsx("div",{className:Hr["form-item-force"]}):null,c?m.jsx(F.Col,{...f,className:u&&!p?void 0:Hr["form-item-hidden"],children:m.jsx(F.Form.Item,{...ne(),children:x()})}):null]})}),nl={"collapse-wrapper":"_collapse-wrapper_ylm01_1"},ol=d.forwardRef(({collapsible:e,onClickExpand:t,onClickFold:r},n)=>{const[o,i]=d.useState(e),a=d.useMemo(()=>o,[o]),s=()=>{r(),i(!0)},c=()=>{t(),i(!1)};return d.useImperativeHandle(n,()=>({handleCollapseChangeFalse:c})),m.jsx("div",{className:nl["collapse-wrapper"],children:a?m.jsx(F.Button,{onClick:c,type:"link",icon:m.jsx(ve.DownOutlined,{}),children:"展开"}):m.jsx(F.Button,{onClick:s,type:"link",icon:m.jsx(ve.UpOutlined,{}),children:"折叠"})})}),sl={"group-wrapper":"_group-wrapper_g8zqi_1"},il=({formProps:e})=>{const{renderActions:t}=e;return m.jsx("div",{className:sl["group-wrapper"],children:t==null?void 0:t()})},al={"xph-form-action":"_xph-form-action_8ws73_1"},ll=(e,t)=>{console.log("render Form");const[r]=F.Form.useForm(),{formProps:n}=Xa(e),{formItems:o}=Na({formProps:n}),i=d.useRef(new Map),{collapsible:a,collapseNum:s,collapseRef:c,onClickCollapseToFalse:u,onClickCollapseToTrue:f}=Ka(n,i),{handleFormatRenderValues:h,handleFormatReturnValues:g}=qa(o,n,i),{setFieldsValue:w,getFieldsValue:p,resetFields:T,validator:P,scrollToField:k}=Ga(r,h,g),O=()=>{const{layout:X,wrapperCol:q,labelCol:J,colon:ne,disabled:E,labelWrap:j,labelAlign:C,scrollToFirstError:x,size:z}=n;return{layout:X,wrapperCol:q,labelCol:J,colon:ne,disabled:E,labelWrap:j,labelAlign:C,scrollToFirstError:x,size:z}},B={setFieldsValue:w,getFieldsValue:p,resetFields:T,validator:P,scrollToField:k};return d.useImperativeHandle(t,()=>({...B})),d.useEffect(()=>(console.log("Form is mounted======================="),n.register&&n.register(B),()=>{console.log("Form is unmounted========================="),i.current.clear()}),[]),m.jsxs(F.Form,{form:r,...O(),children:[m.jsx(F.Row,{children:o.map((X,q)=>(i.current.has(X.name)||i.current.set(X.name,d.createRef()),m.jsx(rl,{ref:i.current.get(X.name),itemIndex:q,itemProps:X,formProps:n,methods:B,collapseRef:c},q)))}),m.jsxs("div",{className:al["xph-form-action"],children:[m.jsx(il,{formProps:n}),a?m.jsx(ol,{ref:c,collapsible:o.length>s,onClickExpand:u,onClickFold:f}):null]})]})},Ft=d.forwardRef(ll),cl=d.memo(Ft),ul=d.forwardRef((e,t)=>{const{renderActions:r,showSearch:n,tableRef:o}=e,[i,a]=d.useState(!1),s=d.useRef(null),c=()=>{const{reloadData:g}=o.current;g()},u=()=>{const{resetData:g}=o.current;g()},f=d.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(F.Button,{type:"primary",icon:m.jsx(ve.SearchOutlined,{}),onClick:c,children:"搜索"}),m.jsx(F.Button,{icon:m.jsx(ve.ReloadOutlined,{}),onClick:u,children:"重置"})]})]}),[n,r]),h=()=>{const{renderActions:g,...w}=e;return{...w,renderActions:f}};return d.useImperativeHandle(t,()=>({setFormLoading:a,...s.current})),m.jsx(F.Spin,{spinning:i,children:m.jsx(cl,{ref:s,...h()})})}),fl=d.memo(Ft),dl=(e,t)=>{const r=d.useRef(null),n=d.useRef(null),{formProps:o}=e,i=()=>{const{formProps:a,...s}=e;return s};return d.useImperativeHandle(t,()=>({open:(...a)=>{var s;return(s=r.current)==null?void 0:s.open(...a)},close:(...a)=>{var s;return(s=r.current)==null?void 0:s.close(...a)},getFieldsValue:(...a)=>n.current.getFieldsValue(...a),setFieldsValue:(...a)=>n.current.setFieldsValue(...a),resetFields:(...a)=>n.current.resetFields(...a),validator:(...a)=>n.current.validator(...a),scrollToField:(...a)=>n.current.scrollToField(...a)})),m.jsx(Lr,{...i(),ref:r,children:m.jsx(fl,{...o,ref:n})})},Ur=d.forwardRef(dl);function pl({searchForm:e}){return{searchFormRef:d.useRef(null),searchFormProps:e}}function hl(e){return"cellFunc"in e}function gl(e){return"children"in e}const{useToken:ml}=F.theme,vl=(e,t,r)=>{const{curComponentProps:n,cellFuncProps:o}=t,{url:i,onClick:a}=n,{token:s}=ml(),c={color:s.colorLink,cursor:"pointer"},u=()=>{if(r.mainClick&&r.mainClick(),a){a();return}if(i){window.open(i,"_blank");return}};return m.jsx(e,{...r,mainClick:u,mainStyle:Object.assign(c,(r==null?void 0:r.mainStyle)||{})})},yl={"cellfunc-actions":"_cellfunc-actions_14drt_1"},Vr={link:{Comp:vl},actions:{Comp:(e,t,r)=>{const{curComponentProps:n,cellFuncProps:o}=t;return m.jsx("div",{className:yl["cellfunc-actions"],children:m.jsx(tt,{...n})})}}},bl=(e,t)=>{const{renderPrams:{text:r}}=e;return m.jsx("span",{onClick:t==null?void 0:t.mainClick,style:t==null?void 0:t.mainStyle,children:r})},_l=e=>{const{setExtendTableCellComp:t}=qr();t(Vr);const{dslConfig:r}=e;let n=bl.bind(null,e),o=0;for(;o<r.length;){const i=o++,a=Vr[r[i].component];a&&(n=a.Comp.bind(null,n,{curComponentProps:r[i].componentProps||{},cellFuncProps:e}))}return m.jsx(n,{})};function Yr(e){return e.map(t=>{let r={...t};if(hl(r)){const{cellFunc:n,...o}=r;r={...o,render:(...i)=>{const a=oe(n),[s,c,u]=i,f={text:s,record:c,index:u},h=a?n(f):n;return m.jsx(_l,{dslConfig:h,renderPrams:f})}}}return gl(r)&&r.children&&Array.isArray(r.children)&&(r.children=Yr(r.children)),r})}function wl(e){const{columns:t}=e.table,r=Yr(t);return console.log(r),{columns:r}}const Cl=e=>{const{extendTableProps:t}=qr();return{tableProps:{...$e($e({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:{showSearch:!0,items:[]}},t),e)}}};function xl(e){const{pagination:t,autoPagination:r}=e.table,[n,o]=d.useState(t),i=d.useRef(t),a=d.useMemo(()=>n&&(r===!0||r===void 0)||!1,[n]);return{pagination:{model:n,update:c=>{if(!i.current)return;const u={...i.current,...c};o(u),i.current=u},show:a},lastPaginationState:i}}function Tl(e,t){const{api:r,formatDataSource:n,autoPagination:o,onChange:i,requestFields:a,responseFields:s}=e.table,c=e.onPaginationChange,{pagination:u,lastPaginationState:f}=xl(e),[h,g]=d.useState({loading:!1,dataSource:[],selection:[],backupsDataSource:[]}),w=d.useRef({loading:!1,dataSource:[],selection:[],backupsDataSource:[]}),p={model:h,update:j=>{var x;const C={...w.current,...j};g(C),w.current=C,(x=t.current)==null||x.setFormLoading(C.loading)}},T=async()=>{d.useEffect(()=>{const{autoRequest:j}=e.table,{validator:C}=t.current;j&&C().then(x=>{B({searchFormParams:x})})},[])},P=async({searchFormParams:j,paginationParams:C})=>{const x={...j,[`${a.current}`]:f.current.current,[`${a.pageSize}`]:f.current.pageSize,...C?{[`${a.current}`]:C.current,[`${a.pageSize}`]:C.pageSize}:{}};return r(x).then(z=>{const{current:L,list:_,total:v}=ct(s,z);p.update({dataSource:n?n(_):_}),u.update({total:v,current:L})}).finally(()=>{p.update({loading:!1})})},k=async({searchFormParams:j,paginationParams:C})=>{const x={...j};return r(x).then(z=>{const{list:L}=ct(s,z),_=n?n(L):L;p.update({selection:[],dataSource:_}),u.update({current:1,total:L.length})}).finally(()=>{p.update({loading:!1})})},O=async({searchFormParams:j,paginationParams:C})=>{var z;const x={...j};if(C){const{current:L,pageSize:_}=C;u.update({current:L,pageSize:_});const v=(L-1)*_,b=v+_,$=(z=w.current.backupsDataSource)==null?void 0:z.slice(v,b);return p.update({loading:!1,selection:[],dataSource:$})}else return r(x).then(L=>{let _=n?n(L):L;const v=[..._],b=0,$=b+f.current.pageSize;_=_.slice(b,$),p.update({selection:[],dataSource:_,backupsDataSource:v}),u.update({current:1,total:L.length})}).finally(()=>{p.update({loading:!1})})},B=async({searchFormParams:j,paginationParams:C})=>{if(p.update({loading:!0,selection:[]}),r)switch(!!f.current){case!0:return o===!0?O({searchFormParams:j,paginationParams:C}):o===!1?k({searchFormParams:j,paginationParams:C}):P({searchFormParams:j,paginationParams:C});case!1:return k({searchFormParams:j,paginationParams:C})}return p.update({loading:!1})};return{table:p,pagination:u,firstGetTableData:T,onPaginationChange:(j,C)=>{const{validator:x}=t.current;x().then(z=>{B({searchFormParams:z,paginationParams:{current:j,pageSize:C}})}),c&&c(j,C)},onAllChange:async(...j)=>{const[C,x,z,L]=j,_=[];for(let v=0;v<_.length&&!_[v]();v++);i&&i(x,z,L)},resetData:async()=>{const{resetFields:j,validator:C}=t.current;return j().then(async()=>{const x=await C();return B({searchFormParams:x})})},resetAllData:async()=>{const{resetFields:j,validator:C}=t.current;return j().then(async()=>{const x={};if(f.current){const{pageSize:z}=f.current;o===void 0&&(x.paginationParams={current:1,pageSize:z})}return x.searchFormParams=await C(),B(x)})},reloadData:async()=>{const{validator:j}=t.current;return j().then(C=>B({searchFormParams:C}))}}}const Sl=(e,t)=>{const{onRowSelectionChange:r}=e,{rowSelection:n}=e.table,o=()=>{if(jr(n))return{type:n,onChange:(i,a,s)=>{t.update({selection:a}),r&&r(i,a)}};if(fe(n)){const{onChange:i}=n;return{...n,onChange:(a,s,c)=>{t.update({selection:s}),i&&i(a,s,c),r&&r(a,s)}}}return n};return{rowSelection:o(),getNewRowSelection:o}};function Pl(e,t){const{scroll:r,virtual:n}=e.table,o=d.useRef(null),[i,a]=d.useState(0),[s,c]=d.useState(0);d.useEffect(()=>{const f=()=>{o.current&&(a(o.current.offsetWidth),c(o.current.offsetHeight))};f();const h=new ResizeObserver(f);return o.current&&h.observe(o.current),()=>{h&&o.current&&h.unobserve(o.current)}},[]);const u=d.useMemo(()=>t?n?{x:i,y:s-70,...r}:{x:"max-content",y:s-70,...r}:{x:"max-content",...r},[s]);return{divRef:o,scroll:u}}function Dl(e,t){const{toolbar:r}=e.table;return{getTopToolbarBindProps:()=>{if(oe(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 qr=()=>{const{extendProps:e,extendComp:t}=He(),r=n=>{const o=t==null?void 0:t.tableCellFunc;o&&Object.keys(o).forEach(i=>{const a=o[i];n[i]={Comp:a}})};return{extendTableProps:e==null?void 0:e.table,setExtendTableCellComp:r}},$l=({crudFormDialog:e})=>({crudFormDialogRef:d.useRef(null),crudFormProps:e}),ot={"main-container":"_main-container_1yx5k_1",container__toolbar:"_container__toolbar_1yx5k_13",container__table:"_container__table_1yx5k_27",container__pagination:"_container__pagination_1yx5k_35"},jl=d.forwardRef(({tableProps:e,searchFormRef:t,fullHeight:r},n)=>{const{columns:o}=wl(e),i=d.useRef(null),{table:a,pagination:s,firstGetTableData:c,onPaginationChange:u,onAllChange:f,resetData:h,resetAllData:g,reloadData:w}=Tl(e,t),{rowSelection:p}=Sl(e,a),{divRef:T,scroll:P}=Pl(e,r),{getTopToolbarBindProps:k}=Dl(e,a),O=()=>{const{autoRequest:B,api:X,formatDataSource:q,autoPagination:J,columns:ne,scroll:E,pagination:j,rowSelection:C,onChange:x,...z}=e.table;return z};return c(),d.useImperativeHandle(n,()=>({resetData:h,resetAllData:g,reloadData:w,...i.current})),console.log("render Table"),m.jsxs("div",{className:r?ot["main-container"]:void 0,children:[m.jsx("div",{className:ot.container__toolbar,children:m.jsx(tt,{...k()})}),m.jsx("div",{ref:T,className:r?ot.container__table:void 0,children:m.jsx(F.Table,{ref:i,...O(),loading:a.model.loading,columns:o,dataSource:a.model.dataSource,pagination:!1,rowSelection:p,scroll:P,onChange:f})}),s.show?m.jsx("div",{className:ot.container__pagination,children:m.jsx(F.Pagination,{disabled:a.model.loading,...s.model,onChange:u})}):null]})}),Gr={"xph-table-full-wrapper":"_xph-table-full-wrapper_mdv0g_1","full-wrapper__table":"_full-wrapper__table_mdv0g_13"},El=(e,t)=>{const{tableProps:r}=Cl(e),n=d.useRef(null),{searchFormRef:o,searchFormProps:i}=pl(r),{crudFormDialogRef:a,crudFormProps:s}=$l(r);let{fullHeight:c}=r.table;const{virtual:u}=r.table;return u&&(c=!0),d.useImperativeHandle(t,()=>({...n.current,...a.current})),m.jsxs("div",{className:c?Gr["xph-table-full-wrapper"]:void 0,children:[m.jsx("div",{children:m.jsx(ul,{ref:o,tableRef:n,...i})}),m.jsx("div",{className:c?Gr["full-wrapper__table"]:void 0,children:m.jsx(jl,{ref:n,searchFormRef:o,fullHeight:c,tableProps:r})}),s?m.jsx(Ur,{ref:a,...s}):null]})},Fl=d.forwardRef(El);Y.XphActions=tt,Y.XphCrudFormDialog=Ur,Y.XphDialog=Lr,Y.XphExtendCompPropsProvider=ia,Y.XphForm=Ft,Y.XphPortal=Nr,Y.XphTable=Fl,Y.buildUUID=lt,Y.getValueByPath=zt,Y.getValuesByPathObj=ct,Y.useXphExtendCompProps=He,Y.useXphForm=Ba,Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const getValueByPath: (obj: Record<string, any>, path: string) => any;
|
|
2
|
+
/**
|
|
3
|
+
* @description 通过属性为包含.的字符串的对象从值对象中获取值
|
|
4
|
+
* @param fields = { current: 'data.current', pageSize: 'data.pageSize' }
|
|
5
|
+
* @param values = { data: { current: 1, pageSize: 10 } }
|
|
6
|
+
* @returns = { current: 1, pageSize: 10 }
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
export declare const getValuesByPathObj: (fields: Record<string, string>, values: Record<string, any>) => Record<string, any>;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './uuid';
|
|
2
|
+
export * from './getValueByPath';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function buildUUID(): string;
|
|
@@ -29,6 +29,22 @@ export type TApiTableProps<T = TDataSourceItem, J extends TXphExtendComponentPro
|
|
|
29
29
|
fullHeight?: boolean;
|
|
30
30
|
/** 顶部操作栏配置,函数时可以传递参数,参数是什么由调用方决定 */
|
|
31
31
|
toolbar?: IXphActionsProps<L> | ((e: IFunctionToolbarParams<T>) => IXphActionsProps<L>);
|
|
32
|
+
/** 分页请求参数中传递到接口的属性名 */
|
|
33
|
+
requestFields?: {
|
|
34
|
+
/** 当前页 */
|
|
35
|
+
current?: string;
|
|
36
|
+
/** 当前页大小 */
|
|
37
|
+
pageSize?: string;
|
|
38
|
+
};
|
|
39
|
+
/** 响应结果中获取数据的属性名 */
|
|
40
|
+
responseFields?: {
|
|
41
|
+
/** 当前页 */
|
|
42
|
+
current?: string;
|
|
43
|
+
/** 列表 */
|
|
44
|
+
list?: string;
|
|
45
|
+
/** 所有页总数 */
|
|
46
|
+
total?: string;
|
|
47
|
+
};
|
|
32
48
|
/** 排序、筛选变化时触发 */
|
|
33
49
|
onChange?: (filters: any, sorter: any, extra: any) => void;
|
|
34
50
|
} & Omit<TableProps<T>,
|