xmirror-components 1.0.28-alpha.1 → 1.0.28-alpha.3

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.
@@ -118,4 +118,4 @@ Valid keys: `+JSON.stringify(Object.keys(u),null," "));var v=J(M,D,O,j,$+"."+D,
118
118
  background: var(--color-primary-bg);
119
119
  }
120
120
  }
121
- `,xi=({children:e,tooltipDisabled:r,disabled:n,disabledReason:t,title:i,...a})=>r?e:U.jsx(ge.Tooltip,{title:n&&t||i,...a,children:e}),Ti=(e,r)=>{const{iconButton:n}=P.useContext(cr),{icon:t,tooltipDisabled:i=!1,title:a,hide:o=!1,disabledReason:s,onClick:f=hi,disabled:c,size:d=n.size||"small",style:p={},className:b,loading:g=!1,...h}=e,y=()=>gi(t)?U.jsx(En,{type:t}):t,E=n.render;return t||console.warn("Icon props not found"),U.jsx(E,{...e,children:U.jsx(xi,{tooltipDisabled:i,hide:o,disabled:c,disabledReason:s,title:a,...h,children:U.jsx(Ei,{ref:r,icon:y(),size:d,className:zr(["icon-button",n.className,b]),disabled:c,style:{...n.style,...p},loading:g,onClick:f})})})},Si=P.forwardRef(Ti);var Ri=function(e){return function(r,n){var t=P.useRef(!1);e(function(){return function(){t.current=!1}},[]),e(function(){if(!t.current)t.current=!0;else return r()},n)}},le=function(){return le=Object.assign||function(r){for(var n,t=1,i=arguments.length;t<i;t++){n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])}return r},le.apply(this,arguments)};function Tn(e,r){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(n[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(e);i<t.length;i++)r.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(e,t[i])&&(n[t[i]]=e[t[i]]);return n}function wi(e,r,n,t){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(d){try{c(t.next(d))}catch(p){o(p)}}function f(d){try{c(t.throw(d))}catch(p){o(p)}}function c(d){d.done?a(d.value):i(d.value).then(s,f)}c((t=t.apply(e,r||[])).next())})}function Oi(e,r){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},t,i,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(d){return f([c,d])}}function f(c){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(t=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=r.call(e,n)}catch(d){c=[6,d],i=0}finally{t=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function ee(e,r){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var t=n.call(e),i,a=[],o;try{for(;(r===void 0||r-- >0)&&!(i=t.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=t.return)&&n.call(t)}finally{if(o)throw o.error}}return a}function re(e,r,n){if(n||arguments.length===2)for(var t=0,i=r.length,a;t<i;t++)(a||!(t in r))&&(a||(a=Array.prototype.slice.call(r,0,t)),a[t]=r[t]);return e.concat(a||Array.prototype.slice.call(r))}var ur=function(e){return typeof e=="function"},fr=process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test";function Re(e){fr&&(ur(e)||console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof e)));var r=P.useRef(e);r.current=P.useMemo(function(){return e},[e]);var n=P.useRef(void 0);return n.current||(n.current=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return r.current.apply(this,t)}),n.current}const Ur=Ri(P.useEffect);var Sn=function(e,r){var n=r.manual,t=r.ready,i=t===void 0?!0:t,a=r.defaultParams,o=a===void 0?[]:a,s=r.refreshDeps,f=s===void 0?[]:s,c=r.refreshDepsAction,d=P.useRef(!1);return d.current=!1,Ur(function(){!n&&i&&(d.current=!0,e.run.apply(e,re([],ee(o),!1)))},[i]),Ur(function(){d.current||n||(d.current=!0,c?c():e.refresh())},re([],ee(f),!1)),{onBefore:function(){if(!i)return{stopNow:!0}}}};Sn.onInit=function(e){var r=e.ready,n=r===void 0?!0:r,t=e.manual;return{loading:!t&&n}};function _i(e,r){if(e===r)return!0;for(var n=0;n<e.length;n++)if(!Object.is(e[n],r[n]))return!1;return!0}var Rn=function(e,r){var n=P.useRef({deps:r,obj:void 0,initialized:!1}).current;return(n.initialized===!1||!_i(n.deps,r))&&(n.deps=r,n.obj=e(),n.initialized=!0),n.obj};function wn(e){var r=P.useRef(e);return r.current=e,r}var Qr=function(e){fr&&(ur(e)||console.error("useUnmount expected parameter is a function, got ".concat(typeof e)));var r=wn(e);P.useEffect(function(){return function(){r.current()}},[])},er=new Map,Pi=function(e,r,n){var t=er.get(e);t!=null&&t.timer&&clearTimeout(t.timer);var i=void 0;r>-1&&(i=setTimeout(function(){er.delete(e)},r)),er.set(e,le(le({},n),{timer:i}))},Ci=function(e){return er.get(e)},rr=new Map,Ai=function(e){return rr.get(e)},ji=function(e,r){rr.set(e,r),r.then(function(n){return rr.delete(e),n}).catch(function(){rr.delete(e)})},Te={},Ni=function(e,r){Te[e]&&Te[e].forEach(function(n){return n(r)})},Tr=function(e,r){return Te[e]||(Te[e]=[]),Te[e].push(r),function(){var t=Te[e].indexOf(r);Te[e].splice(t,1)}},ki=function(e,r){var n=r.cacheKey,t=r.cacheTime,i=t===void 0?5*60*1e3:t,a=r.staleTime,o=a===void 0?0:a,s=r.setCache,f=r.getCache,c=P.useRef(void 0),d=P.useRef(void 0),p=function(g,h){s?s(h):Pi(g,i,h),Ni(g,h.data)},b=function(g,h){return h===void 0&&(h=[]),f?f(h):Ci(g)};return Rn(function(){if(n){var g=b(n);g&&Object.hasOwnProperty.call(g,"data")&&(e.state.data=g.data,e.state.params=g.params,(o===-1||Date.now()-g.time<=o)&&(e.state.loading=!1)),c.current=Tr(n,function(h){e.setState({data:h})})}},[]),Qr(function(){var g;(g=c.current)===null||g===void 0||g.call(c)}),n?{onBefore:function(g){var h=b(n,g);return!h||!Object.hasOwnProperty.call(h,"data")?{}:o===-1||Date.now()-h.time<=o?{loading:!1,data:h==null?void 0:h.data,error:void 0,returnNow:!0}:{data:h==null?void 0:h.data,error:void 0}},onRequest:function(g,h){var y=Ai(n);return y&&y!==d.current?{servicePromise:y}:(y=g.apply(void 0,re([],ee(h),!1)),d.current=y,ji(n,y),{servicePromise:y})},onSuccess:function(g,h){var y;n&&((y=c.current)===null||y===void 0||y.call(c),p(n,{data:g,params:h,time:Date.now()}),c.current=Tr(n,function(E){e.setState({data:E})}))},onMutate:function(g){var h;n&&((h=c.current)===null||h===void 0||h.call(c),p(n,{data:g,params:e.state.params,time:Date.now()}),c.current=Tr(n,function(y){e.setState({data:y})}))}}:{}},Sr,Nt;function et(){if(Nt)return Sr;Nt=1;function e(r){var n=typeof r;return r!=null&&(n=="object"||n=="function")}return Sr=e,Sr}var Rr,kt;function $i(){if(kt)return Rr;kt=1;var e=typeof Ge=="object"&&Ge&&Ge.Object===Object&&Ge;return Rr=e,Rr}var wr,$t;function On(){if($t)return wr;$t=1;var e=$i(),r=typeof self=="object"&&self&&self.Object===Object&&self,n=e||r||Function("return this")();return wr=n,wr}var Or,Mt;function Mi(){if(Mt)return Or;Mt=1;var e=On(),r=function(){return e.Date.now()};return Or=r,Or}var _r,It;function Ii(){if(It)return _r;It=1;var e=/\s/;function r(n){for(var t=n.length;t--&&e.test(n.charAt(t)););return t}return _r=r,_r}var Pr,Dt;function Di(){if(Dt)return Pr;Dt=1;var e=Ii(),r=/^\s+/;function n(t){return t&&t.slice(0,e(t)+1).replace(r,"")}return Pr=n,Pr}var Cr,Lt;function _n(){if(Lt)return Cr;Lt=1;var e=On(),r=e.Symbol;return Cr=r,Cr}var Ar,Ft;function Li(){if(Ft)return Ar;Ft=1;var e=_n(),r=Object.prototype,n=r.hasOwnProperty,t=r.toString,i=e?e.toStringTag:void 0;function a(o){var s=n.call(o,i),f=o[i];try{o[i]=void 0;var c=!0}catch{}var d=t.call(o);return c&&(s?o[i]=f:delete o[i]),d}return Ar=a,Ar}var jr,qt;function Fi(){if(qt)return jr;qt=1;var e=Object.prototype,r=e.toString;function n(t){return r.call(t)}return jr=n,jr}var Nr,Yt;function qi(){if(Yt)return Nr;Yt=1;var e=_n(),r=Li(),n=Fi(),t="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(s){return s==null?s===void 0?i:t:a&&a in Object(s)?r(s):n(s)}return Nr=o,Nr}var kr,Wt;function Yi(){if(Wt)return kr;Wt=1;function e(r){return r!=null&&typeof r=="object"}return kr=e,kr}var $r,zt;function Wi(){if(zt)return $r;zt=1;var e=qi(),r=Yi(),n="[object Symbol]";function t(i){return typeof i=="symbol"||r(i)&&e(i)==n}return $r=t,$r}var Mr,Ut;function zi(){if(Ut)return Mr;Ut=1;var e=Di(),r=et(),n=Wi(),t=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function f(c){if(typeof c=="number")return c;if(n(c))return t;if(r(c)){var d=typeof c.valueOf=="function"?c.valueOf():c;c=r(d)?d+"":d}if(typeof c!="string")return c===0?c:+c;c=e(c);var p=a.test(c);return p||o.test(c)?s(c.slice(2),p?2:8):i.test(c)?t:+c}return Mr=f,Mr}var Ir,Gt;function Pn(){if(Gt)return Ir;Gt=1;var e=et(),r=Mi(),n=zi(),t="Expected a function",i=Math.max,a=Math.min;function o(s,f,c){var d,p,b,g,h,y,E=0,S=!1,C=!1,x=!0;if(typeof s!="function")throw new TypeError(t);f=n(f)||0,e(c)&&(S=!!c.leading,C="maxWait"in c,b=C?i(n(c.maxWait)||0,f):b,x="trailing"in c?!!c.trailing:x);function R(G){var V=d,ae=p;return d=p=void 0,E=G,g=s.apply(ae,V),g}function l(G){return E=G,h=setTimeout(B,f),S?R(G):g}function k(G){var V=G-y,ae=G-E,X=f-V;return C?a(X,b-ae):X}function A(G){var V=G-y,ae=G-E;return y===void 0||V>=f||V<0||C&&ae>=b}function B(){var G=r();if(A(G))return ce(G);h=setTimeout(B,k(G))}function ce(G){return h=void 0,x&&d?R(G):(d=p=void 0,g)}function ne(){h!==void 0&&clearTimeout(h),E=0,d=y=p=h=void 0}function Z(){return h===void 0?g:ce(r())}function ue(){var G=r(),V=A(G);if(d=arguments,p=this,y=G,V){if(h===void 0)return l(y);if(C)return clearTimeout(h),h=setTimeout(B,f),R(y)}return h===void 0&&(h=setTimeout(B,f)),g}return ue.cancel=ne,ue.flush=Z,ue}return Ir=o,Ir}var Ui=Pn();const Gi=ar(Ui);var Bi=function(e,r){var n=r.debounceWait,t=r.debounceLeading,i=r.debounceTrailing,a=r.debounceMaxWait,o=P.useRef(void 0),s=P.useMemo(function(){var f={};return t!==void 0&&(f.leading=t),i!==void 0&&(f.trailing=i),a!==void 0&&(f.maxWait=a),f},[t,i,a]);return P.useEffect(function(){if(n){var f=e.runAsync.bind(e);return o.current=Gi(function(c){c()},n,s),e.runAsync=function(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];return new Promise(function(p,b){var g;(g=o.current)===null||g===void 0||g.call(o,function(){f.apply(void 0,re([],ee(c),!1)).then(p).catch(b)})})},function(){var c;(c=o.current)===null||c===void 0||c.cancel(),e.runAsync=f}}},[n,s]),n?{onCancel:function(){var f;(f=o.current)===null||f===void 0||f.cancel()}}:{}},Vi=function(e,r){var n=r.loadingDelay,t=r.ready,i=P.useRef(void 0);if(!n)return{};var a=function(){i.current&&clearTimeout(i.current)};return{onBefore:function(){return a(),t!==!1&&(i.current=setTimeout(function(){e.setState({loading:!0})},n)),{loading:!1}},onFinally:function(){a()},onCancel:function(){a()}}},lr=!!(typeof window<"u"&&window.document&&window.document.createElement);function rt(){return lr?document.visibilityState!=="hidden":!0}var De=[];function Hi(e){return De.push(e),function(){var n=De.indexOf(e);De.splice(n,1)}}if(lr){var Xi=function(){if(rt())for(var e=0;e<De.length;e++){var r=De[e];r()}};window.addEventListener("visibilitychange",Xi,!1)}var Ji=function(e,r){var n=r.pollingInterval,t=r.pollingWhenHidden,i=t===void 0?!0:t,a=r.pollingErrorRetryCount,o=a===void 0?-1:a,s=P.useRef(void 0),f=P.useRef(void 0),c=P.useRef(0),d=function(){var p;s.current&&clearTimeout(s.current),(p=f.current)===null||p===void 0||p.call(f)};return Ur(function(){n||d()},[n]),n?{onBefore:function(){d()},onError:function(){c.current+=1},onSuccess:function(){c.current=0},onFinally:function(){o===-1||o!==-1&&c.current<=o?s.current=setTimeout(function(){!i&&!rt()?f.current=Hi(function(){e.refresh()}):e.refresh()},n):c.current=0},onCancel:function(){d()}}:{}};function Zi(e,r){var n=!1;return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];n||(n=!0,e.apply(void 0,re([],ee(t),!1)),setTimeout(function(){n=!1},r))}}var Ki=function(){return lr&&typeof navigator.onLine<"u"?navigator.onLine:!0},Le=[];function Qi(e){return Le.push(e),function(){var n=Le.indexOf(e);n>-1&&Le.splice(n,1)}}if(lr){var Bt=function(){if(!(!rt()||!Ki()))for(var e=0;e<Le.length;e++){var r=Le[e];r()}};window.addEventListener("visibilitychange",Bt,!1),window.addEventListener("focus",Bt,!1)}var eo=function(e,r){var n=r.refreshOnWindowFocus,t=r.focusTimespan,i=t===void 0?5e3:t,a=P.useRef(void 0),o=function(){var s;(s=a.current)===null||s===void 0||s.call(a)};return P.useEffect(function(){if(n){var s=Zi(e.refresh.bind(e),i);a.current=Qi(function(){s()})}return function(){o()}},[n,i]),Qr(function(){o()}),{}},ro=function(e,r){var n=r.retryInterval,t=r.retryCount,i=P.useRef(void 0),a=P.useRef(0),o=P.useRef(!1);return t?{onBefore:function(){o.current||(a.current=0),o.current=!1,i.current&&clearTimeout(i.current)},onSuccess:function(){a.current=0},onError:function(){if(a.current+=1,t===-1||a.current<=t){var s=n??Math.min(1e3*Math.pow(2,a.current),3e4);i.current=setTimeout(function(){o.current=!0,e.refresh()},s)}else a.current=0},onCancel:function(){a.current=0,i.current&&clearTimeout(i.current)}}:{}},Dr,Vt;function to(){if(Vt)return Dr;Vt=1;var e=Pn(),r=et(),n="Expected a function";function t(i,a,o){var s=!0,f=!0;if(typeof i!="function")throw new TypeError(n);return r(o)&&(s="leading"in o?!!o.leading:s,f="trailing"in o?!!o.trailing:f),e(i,a,{leading:s,maxWait:a,trailing:f})}return Dr=t,Dr}var no=to();const ao=ar(no);var io=function(e,r){var n=r.throttleWait,t=r.throttleLeading,i=r.throttleTrailing,a=P.useRef(void 0),o={};return t!==void 0&&(o.leading=t),i!==void 0&&(o.trailing=i),P.useEffect(function(){if(n){var s=e.runAsync.bind(e);return a.current=ao(function(f){f()},n,o),e.runAsync=function(){for(var f=[],c=0;c<arguments.length;c++)f[c]=arguments[c];return new Promise(function(d,p){var b;(b=a.current)===null||b===void 0||b.call(a,function(){s.apply(void 0,re([],ee(f),!1)).then(d).catch(p)})})},function(){var f;e.runAsync=s,(f=a.current)===null||f===void 0||f.cancel()}}},[n,t,i]),n?{onCancel:function(){var s;(s=a.current)===null||s===void 0||s.cancel()}}:{}},oo=function(e){fr&&(ur(e)||console.error('useMount: parameter `fn` expected to be a function, but got "'.concat(typeof e,'".'))),P.useEffect(function(){e==null||e()},[])},so=function(){var e=ee(P.useState({}),2),r=e[1];return P.useCallback(function(){return r({})},[])},co=function(){function e(r,n,t,i){i===void 0&&(i={}),this.serviceRef=r,this.options=n,this.subscribe=t,this.initState=i,this.count=0,this.state={loading:!1,params:void 0,data:void 0,error:void 0},this.state=le(le(le({},this.state),{loading:!n.manual}),i)}return e.prototype.setState=function(r){r===void 0&&(r={}),this.state=le(le({},this.state),r),this.subscribe()},e.prototype.runPluginHandler=function(r){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var i=this.pluginImpls.map(function(a){var o;return(o=a[r])===null||o===void 0?void 0:o.call.apply(o,re([a],ee(n),!1))}).filter(Boolean);return Object.assign.apply(Object,re([{}],ee(i),!1))},e.prototype.runAsync=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return wi(this,void 0,void 0,function(){var t,i,a,o,s,f,c,d,p,b,g,h,y,E,S,C,x,R,l,k,A;return Oi(this,function(B){switch(B.label){case 0:if(this.count+=1,t=this.count,i=this.runPluginHandler("onBefore",r),a=i.stopNow,o=a===void 0?!1:a,s=i.returnNow,f=s===void 0?!1:s,c=Tn(i,["stopNow","returnNow"]),o)return[2,new Promise(function(){})];if(this.setState(le({loading:!0,params:r},c)),f)return[2,Promise.resolve(c.data)];(y=(h=this.options).onBefore)===null||y===void 0||y.call(h,r),B.label=1;case 1:return B.trys.push([1,3,,4]),d=this.runPluginHandler("onRequest",this.serviceRef.current,r).servicePromise,d||(d=(g=this.serviceRef).current.apply(g,re([],ee(r),!1))),[4,d];case 2:return p=B.sent(),t!==this.count?[2,new Promise(function(){})]:(this.setState({data:p,error:void 0,loading:!1}),(S=(E=this.options).onSuccess)===null||S===void 0||S.call(E,p,r),this.runPluginHandler("onSuccess",p,r),(x=(C=this.options).onFinally)===null||x===void 0||x.call(C,r,p,void 0),t===this.count&&this.runPluginHandler("onFinally",r,p,void 0),[2,p]);case 3:if(b=B.sent(),t!==this.count)return[2,new Promise(function(){})];throw this.setState({error:b,loading:!1}),(l=(R=this.options).onError)===null||l===void 0||l.call(R,b,r),this.runPluginHandler("onError",b,r),(A=(k=this.options).onFinally)===null||A===void 0||A.call(k,r,void 0,b),t===this.count&&this.runPluginHandler("onFinally",r,void 0,b),b;case 4:return[2]}})})},e.prototype.run=function(){for(var r=this,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this.runAsync.apply(this,re([],ee(n),!1)).catch(function(i){r.options.onError||console.error(i)})},e.prototype.cancel=function(){this.count+=1,this.setState({loading:!1}),this.runPluginHandler("onCancel")},e.prototype.refresh=function(){this.run.apply(this,re([],ee(this.state.params||[]),!1))},e.prototype.refreshAsync=function(){return this.runAsync.apply(this,re([],ee(this.state.params||[]),!1))},e.prototype.mutate=function(r){var n=ur(r)?r(this.state.data):r;this.runPluginHandler("onMutate",n),this.setState({data:n})},e}();function uo(e,r,n){r===void 0&&(r={}),n===void 0&&(n=[]);var t=r.manual,i=t===void 0?!1:t,a=r.ready,o=a===void 0?!0:a,s=Tn(r,["manual","ready"]);fr&&r.defaultParams&&!Array.isArray(r.defaultParams)&&console.warn("expected defaultParams is array, got ".concat(typeof r.defaultParams));var f=le({manual:i,ready:o},s),c=wn(e),d=so(),p=Rn(function(){var b=n.map(function(g){var h;return(h=g==null?void 0:g.onInit)===null||h===void 0?void 0:h.call(g,f)}).filter(Boolean);return new co(c,f,d,Object.assign.apply(Object,re([{}],ee(b),!1)))},[]);return p.options=f,p.pluginImpls=n.map(function(b){return b(p,f)}),oo(function(){if(!i&&o){var b=p.state.params||r.defaultParams||[];p.run.apply(p,re([],ee(b),!1))}}),Qr(function(){p.cancel()}),{loading:p.state.loading,data:p.state.data,error:p.state.error,params:p.state.params||[],cancel:Re(p.cancel.bind(p)),refresh:Re(p.refresh.bind(p)),refreshAsync:Re(p.refreshAsync.bind(p)),run:Re(p.run.bind(p)),runAsync:Re(p.runAsync.bind(p)),mutate:Re(p.mutate.bind(p))}}function fo(e,r,n){return uo(e,r,re(re([],ee(n||[]),!1),[Bi,Vi,Ji,eo,io,Sn,ki,ro],!1))}function lo(e,r,n){const t=fo(e,{...r,onError(a,o){var s;((r==null?void 0:r.errorMessage)??!0)&&exports.message.error(a.message),(s=r==null?void 0:r.onError)==null||s.call(r,a,o)}},n),i=t.data&&typeof t.data=="object"&&"data"in t.data?t.data.data:t.data;return{...t,data:i}}exports.App=Za;exports.CheckboxValue=ei;exports.ConfigContext=cr;exports.ConfigProvider=bn;exports.GlobalLoading=hn;exports.IconButton=Si;exports.IconFont=En;exports.SwitchValue=ri;exports.useRequest=lo;
121
+ `,xi=({children:e,tooltipDisabled:r,disabled:n,disabledReason:t,title:i,...a})=>r?e:U.jsx(ge.Tooltip,{title:n&&t||i,...a,children:e}),Ti=P.forwardRef((e,r)=>{const{iconButton:n}=P.useContext(cr),{icon:t,tooltipDisabled:i=!1,title:a,hide:o=!1,disabledReason:s,onClick:f=hi,disabled:c,size:d=n.size||"small",style:p={},className:b,loading:g=!1,...h}=e,y=()=>gi(t)?U.jsx(En,{type:t}):t,E=n.render;return t||console.warn("Icon props not found"),U.jsx(E,{...e,children:U.jsx(xi,{tooltipDisabled:i,hide:o,disabled:c,disabledReason:s,title:a,...h,children:U.jsx(Ei,{ref:r,icon:y(),size:d,className:zr(["icon-button",n.className,b]),disabled:c,style:{...n.style,...p},loading:g,onClick:f})})})});var Si=function(e){return function(r,n){var t=P.useRef(!1);e(function(){return function(){t.current=!1}},[]),e(function(){if(!t.current)t.current=!0;else return r()},n)}},le=function(){return le=Object.assign||function(r){for(var n,t=1,i=arguments.length;t<i;t++){n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])}return r},le.apply(this,arguments)};function Tn(e,r){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(n[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(e);i<t.length;i++)r.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(e,t[i])&&(n[t[i]]=e[t[i]]);return n}function Ri(e,r,n,t){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(d){try{c(t.next(d))}catch(p){o(p)}}function f(d){try{c(t.throw(d))}catch(p){o(p)}}function c(d){d.done?a(d.value):i(d.value).then(s,f)}c((t=t.apply(e,r||[])).next())})}function wi(e,r){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},t,i,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(d){return f([c,d])}}function f(c){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(t=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=r.call(e,n)}catch(d){c=[6,d],i=0}finally{t=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function ee(e,r){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var t=n.call(e),i,a=[],o;try{for(;(r===void 0||r-- >0)&&!(i=t.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=t.return)&&n.call(t)}finally{if(o)throw o.error}}return a}function re(e,r,n){if(n||arguments.length===2)for(var t=0,i=r.length,a;t<i;t++)(a||!(t in r))&&(a||(a=Array.prototype.slice.call(r,0,t)),a[t]=r[t]);return e.concat(a||Array.prototype.slice.call(r))}var ur=function(e){return typeof e=="function"},fr=process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test";function Re(e){fr&&(ur(e)||console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof e)));var r=P.useRef(e);r.current=P.useMemo(function(){return e},[e]);var n=P.useRef(void 0);return n.current||(n.current=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return r.current.apply(this,t)}),n.current}const Ur=Si(P.useEffect);var Sn=function(e,r){var n=r.manual,t=r.ready,i=t===void 0?!0:t,a=r.defaultParams,o=a===void 0?[]:a,s=r.refreshDeps,f=s===void 0?[]:s,c=r.refreshDepsAction,d=P.useRef(!1);return d.current=!1,Ur(function(){!n&&i&&(d.current=!0,e.run.apply(e,re([],ee(o),!1)))},[i]),Ur(function(){d.current||n||(d.current=!0,c?c():e.refresh())},re([],ee(f),!1)),{onBefore:function(){if(!i)return{stopNow:!0}}}};Sn.onInit=function(e){var r=e.ready,n=r===void 0?!0:r,t=e.manual;return{loading:!t&&n}};function Oi(e,r){if(e===r)return!0;for(var n=0;n<e.length;n++)if(!Object.is(e[n],r[n]))return!1;return!0}var Rn=function(e,r){var n=P.useRef({deps:r,obj:void 0,initialized:!1}).current;return(n.initialized===!1||!Oi(n.deps,r))&&(n.deps=r,n.obj=e(),n.initialized=!0),n.obj};function wn(e){var r=P.useRef(e);return r.current=e,r}var Qr=function(e){fr&&(ur(e)||console.error("useUnmount expected parameter is a function, got ".concat(typeof e)));var r=wn(e);P.useEffect(function(){return function(){r.current()}},[])},er=new Map,_i=function(e,r,n){var t=er.get(e);t!=null&&t.timer&&clearTimeout(t.timer);var i=void 0;r>-1&&(i=setTimeout(function(){er.delete(e)},r)),er.set(e,le(le({},n),{timer:i}))},Pi=function(e){return er.get(e)},rr=new Map,Ci=function(e){return rr.get(e)},Ai=function(e,r){rr.set(e,r),r.then(function(n){return rr.delete(e),n}).catch(function(){rr.delete(e)})},Te={},ji=function(e,r){Te[e]&&Te[e].forEach(function(n){return n(r)})},Tr=function(e,r){return Te[e]||(Te[e]=[]),Te[e].push(r),function(){var t=Te[e].indexOf(r);Te[e].splice(t,1)}},Ni=function(e,r){var n=r.cacheKey,t=r.cacheTime,i=t===void 0?5*60*1e3:t,a=r.staleTime,o=a===void 0?0:a,s=r.setCache,f=r.getCache,c=P.useRef(void 0),d=P.useRef(void 0),p=function(g,h){s?s(h):_i(g,i,h),ji(g,h.data)},b=function(g,h){return h===void 0&&(h=[]),f?f(h):Pi(g)};return Rn(function(){if(n){var g=b(n);g&&Object.hasOwnProperty.call(g,"data")&&(e.state.data=g.data,e.state.params=g.params,(o===-1||Date.now()-g.time<=o)&&(e.state.loading=!1)),c.current=Tr(n,function(h){e.setState({data:h})})}},[]),Qr(function(){var g;(g=c.current)===null||g===void 0||g.call(c)}),n?{onBefore:function(g){var h=b(n,g);return!h||!Object.hasOwnProperty.call(h,"data")?{}:o===-1||Date.now()-h.time<=o?{loading:!1,data:h==null?void 0:h.data,error:void 0,returnNow:!0}:{data:h==null?void 0:h.data,error:void 0}},onRequest:function(g,h){var y=Ci(n);return y&&y!==d.current?{servicePromise:y}:(y=g.apply(void 0,re([],ee(h),!1)),d.current=y,Ai(n,y),{servicePromise:y})},onSuccess:function(g,h){var y;n&&((y=c.current)===null||y===void 0||y.call(c),p(n,{data:g,params:h,time:Date.now()}),c.current=Tr(n,function(E){e.setState({data:E})}))},onMutate:function(g){var h;n&&((h=c.current)===null||h===void 0||h.call(c),p(n,{data:g,params:e.state.params,time:Date.now()}),c.current=Tr(n,function(y){e.setState({data:y})}))}}:{}},Sr,Nt;function et(){if(Nt)return Sr;Nt=1;function e(r){var n=typeof r;return r!=null&&(n=="object"||n=="function")}return Sr=e,Sr}var Rr,kt;function ki(){if(kt)return Rr;kt=1;var e=typeof Ge=="object"&&Ge&&Ge.Object===Object&&Ge;return Rr=e,Rr}var wr,$t;function On(){if($t)return wr;$t=1;var e=ki(),r=typeof self=="object"&&self&&self.Object===Object&&self,n=e||r||Function("return this")();return wr=n,wr}var Or,Mt;function $i(){if(Mt)return Or;Mt=1;var e=On(),r=function(){return e.Date.now()};return Or=r,Or}var _r,It;function Mi(){if(It)return _r;It=1;var e=/\s/;function r(n){for(var t=n.length;t--&&e.test(n.charAt(t)););return t}return _r=r,_r}var Pr,Dt;function Ii(){if(Dt)return Pr;Dt=1;var e=Mi(),r=/^\s+/;function n(t){return t&&t.slice(0,e(t)+1).replace(r,"")}return Pr=n,Pr}var Cr,Lt;function _n(){if(Lt)return Cr;Lt=1;var e=On(),r=e.Symbol;return Cr=r,Cr}var Ar,Ft;function Di(){if(Ft)return Ar;Ft=1;var e=_n(),r=Object.prototype,n=r.hasOwnProperty,t=r.toString,i=e?e.toStringTag:void 0;function a(o){var s=n.call(o,i),f=o[i];try{o[i]=void 0;var c=!0}catch{}var d=t.call(o);return c&&(s?o[i]=f:delete o[i]),d}return Ar=a,Ar}var jr,qt;function Li(){if(qt)return jr;qt=1;var e=Object.prototype,r=e.toString;function n(t){return r.call(t)}return jr=n,jr}var Nr,Yt;function Fi(){if(Yt)return Nr;Yt=1;var e=_n(),r=Di(),n=Li(),t="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(s){return s==null?s===void 0?i:t:a&&a in Object(s)?r(s):n(s)}return Nr=o,Nr}var kr,Wt;function qi(){if(Wt)return kr;Wt=1;function e(r){return r!=null&&typeof r=="object"}return kr=e,kr}var $r,zt;function Yi(){if(zt)return $r;zt=1;var e=Fi(),r=qi(),n="[object Symbol]";function t(i){return typeof i=="symbol"||r(i)&&e(i)==n}return $r=t,$r}var Mr,Ut;function Wi(){if(Ut)return Mr;Ut=1;var e=Ii(),r=et(),n=Yi(),t=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function f(c){if(typeof c=="number")return c;if(n(c))return t;if(r(c)){var d=typeof c.valueOf=="function"?c.valueOf():c;c=r(d)?d+"":d}if(typeof c!="string")return c===0?c:+c;c=e(c);var p=a.test(c);return p||o.test(c)?s(c.slice(2),p?2:8):i.test(c)?t:+c}return Mr=f,Mr}var Ir,Gt;function Pn(){if(Gt)return Ir;Gt=1;var e=et(),r=$i(),n=Wi(),t="Expected a function",i=Math.max,a=Math.min;function o(s,f,c){var d,p,b,g,h,y,E=0,S=!1,C=!1,x=!0;if(typeof s!="function")throw new TypeError(t);f=n(f)||0,e(c)&&(S=!!c.leading,C="maxWait"in c,b=C?i(n(c.maxWait)||0,f):b,x="trailing"in c?!!c.trailing:x);function R(G){var V=d,ae=p;return d=p=void 0,E=G,g=s.apply(ae,V),g}function l(G){return E=G,h=setTimeout(B,f),S?R(G):g}function k(G){var V=G-y,ae=G-E,X=f-V;return C?a(X,b-ae):X}function A(G){var V=G-y,ae=G-E;return y===void 0||V>=f||V<0||C&&ae>=b}function B(){var G=r();if(A(G))return ce(G);h=setTimeout(B,k(G))}function ce(G){return h=void 0,x&&d?R(G):(d=p=void 0,g)}function ne(){h!==void 0&&clearTimeout(h),E=0,d=y=p=h=void 0}function Z(){return h===void 0?g:ce(r())}function ue(){var G=r(),V=A(G);if(d=arguments,p=this,y=G,V){if(h===void 0)return l(y);if(C)return clearTimeout(h),h=setTimeout(B,f),R(y)}return h===void 0&&(h=setTimeout(B,f)),g}return ue.cancel=ne,ue.flush=Z,ue}return Ir=o,Ir}var zi=Pn();const Ui=ar(zi);var Gi=function(e,r){var n=r.debounceWait,t=r.debounceLeading,i=r.debounceTrailing,a=r.debounceMaxWait,o=P.useRef(void 0),s=P.useMemo(function(){var f={};return t!==void 0&&(f.leading=t),i!==void 0&&(f.trailing=i),a!==void 0&&(f.maxWait=a),f},[t,i,a]);return P.useEffect(function(){if(n){var f=e.runAsync.bind(e);return o.current=Ui(function(c){c()},n,s),e.runAsync=function(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];return new Promise(function(p,b){var g;(g=o.current)===null||g===void 0||g.call(o,function(){f.apply(void 0,re([],ee(c),!1)).then(p).catch(b)})})},function(){var c;(c=o.current)===null||c===void 0||c.cancel(),e.runAsync=f}}},[n,s]),n?{onCancel:function(){var f;(f=o.current)===null||f===void 0||f.cancel()}}:{}},Bi=function(e,r){var n=r.loadingDelay,t=r.ready,i=P.useRef(void 0);if(!n)return{};var a=function(){i.current&&clearTimeout(i.current)};return{onBefore:function(){return a(),t!==!1&&(i.current=setTimeout(function(){e.setState({loading:!0})},n)),{loading:!1}},onFinally:function(){a()},onCancel:function(){a()}}},lr=!!(typeof window<"u"&&window.document&&window.document.createElement);function rt(){return lr?document.visibilityState!=="hidden":!0}var De=[];function Vi(e){return De.push(e),function(){var n=De.indexOf(e);De.splice(n,1)}}if(lr){var Hi=function(){if(rt())for(var e=0;e<De.length;e++){var r=De[e];r()}};window.addEventListener("visibilitychange",Hi,!1)}var Xi=function(e,r){var n=r.pollingInterval,t=r.pollingWhenHidden,i=t===void 0?!0:t,a=r.pollingErrorRetryCount,o=a===void 0?-1:a,s=P.useRef(void 0),f=P.useRef(void 0),c=P.useRef(0),d=function(){var p;s.current&&clearTimeout(s.current),(p=f.current)===null||p===void 0||p.call(f)};return Ur(function(){n||d()},[n]),n?{onBefore:function(){d()},onError:function(){c.current+=1},onSuccess:function(){c.current=0},onFinally:function(){o===-1||o!==-1&&c.current<=o?s.current=setTimeout(function(){!i&&!rt()?f.current=Vi(function(){e.refresh()}):e.refresh()},n):c.current=0},onCancel:function(){d()}}:{}};function Ji(e,r){var n=!1;return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];n||(n=!0,e.apply(void 0,re([],ee(t),!1)),setTimeout(function(){n=!1},r))}}var Zi=function(){return lr&&typeof navigator.onLine<"u"?navigator.onLine:!0},Le=[];function Ki(e){return Le.push(e),function(){var n=Le.indexOf(e);n>-1&&Le.splice(n,1)}}if(lr){var Bt=function(){if(!(!rt()||!Zi()))for(var e=0;e<Le.length;e++){var r=Le[e];r()}};window.addEventListener("visibilitychange",Bt,!1),window.addEventListener("focus",Bt,!1)}var Qi=function(e,r){var n=r.refreshOnWindowFocus,t=r.focusTimespan,i=t===void 0?5e3:t,a=P.useRef(void 0),o=function(){var s;(s=a.current)===null||s===void 0||s.call(a)};return P.useEffect(function(){if(n){var s=Ji(e.refresh.bind(e),i);a.current=Ki(function(){s()})}return function(){o()}},[n,i]),Qr(function(){o()}),{}},eo=function(e,r){var n=r.retryInterval,t=r.retryCount,i=P.useRef(void 0),a=P.useRef(0),o=P.useRef(!1);return t?{onBefore:function(){o.current||(a.current=0),o.current=!1,i.current&&clearTimeout(i.current)},onSuccess:function(){a.current=0},onError:function(){if(a.current+=1,t===-1||a.current<=t){var s=n??Math.min(1e3*Math.pow(2,a.current),3e4);i.current=setTimeout(function(){o.current=!0,e.refresh()},s)}else a.current=0},onCancel:function(){a.current=0,i.current&&clearTimeout(i.current)}}:{}},Dr,Vt;function ro(){if(Vt)return Dr;Vt=1;var e=Pn(),r=et(),n="Expected a function";function t(i,a,o){var s=!0,f=!0;if(typeof i!="function")throw new TypeError(n);return r(o)&&(s="leading"in o?!!o.leading:s,f="trailing"in o?!!o.trailing:f),e(i,a,{leading:s,maxWait:a,trailing:f})}return Dr=t,Dr}var to=ro();const no=ar(to);var ao=function(e,r){var n=r.throttleWait,t=r.throttleLeading,i=r.throttleTrailing,a=P.useRef(void 0),o={};return t!==void 0&&(o.leading=t),i!==void 0&&(o.trailing=i),P.useEffect(function(){if(n){var s=e.runAsync.bind(e);return a.current=no(function(f){f()},n,o),e.runAsync=function(){for(var f=[],c=0;c<arguments.length;c++)f[c]=arguments[c];return new Promise(function(d,p){var b;(b=a.current)===null||b===void 0||b.call(a,function(){s.apply(void 0,re([],ee(f),!1)).then(d).catch(p)})})},function(){var f;e.runAsync=s,(f=a.current)===null||f===void 0||f.cancel()}}},[n,t,i]),n?{onCancel:function(){var s;(s=a.current)===null||s===void 0||s.cancel()}}:{}},io=function(e){fr&&(ur(e)||console.error('useMount: parameter `fn` expected to be a function, but got "'.concat(typeof e,'".'))),P.useEffect(function(){e==null||e()},[])},oo=function(){var e=ee(P.useState({}),2),r=e[1];return P.useCallback(function(){return r({})},[])},so=function(){function e(r,n,t,i){i===void 0&&(i={}),this.serviceRef=r,this.options=n,this.subscribe=t,this.initState=i,this.count=0,this.state={loading:!1,params:void 0,data:void 0,error:void 0},this.state=le(le(le({},this.state),{loading:!n.manual}),i)}return e.prototype.setState=function(r){r===void 0&&(r={}),this.state=le(le({},this.state),r),this.subscribe()},e.prototype.runPluginHandler=function(r){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var i=this.pluginImpls.map(function(a){var o;return(o=a[r])===null||o===void 0?void 0:o.call.apply(o,re([a],ee(n),!1))}).filter(Boolean);return Object.assign.apply(Object,re([{}],ee(i),!1))},e.prototype.runAsync=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return Ri(this,void 0,void 0,function(){var t,i,a,o,s,f,c,d,p,b,g,h,y,E,S,C,x,R,l,k,A;return wi(this,function(B){switch(B.label){case 0:if(this.count+=1,t=this.count,i=this.runPluginHandler("onBefore",r),a=i.stopNow,o=a===void 0?!1:a,s=i.returnNow,f=s===void 0?!1:s,c=Tn(i,["stopNow","returnNow"]),o)return[2,new Promise(function(){})];if(this.setState(le({loading:!0,params:r},c)),f)return[2,Promise.resolve(c.data)];(y=(h=this.options).onBefore)===null||y===void 0||y.call(h,r),B.label=1;case 1:return B.trys.push([1,3,,4]),d=this.runPluginHandler("onRequest",this.serviceRef.current,r).servicePromise,d||(d=(g=this.serviceRef).current.apply(g,re([],ee(r),!1))),[4,d];case 2:return p=B.sent(),t!==this.count?[2,new Promise(function(){})]:(this.setState({data:p,error:void 0,loading:!1}),(S=(E=this.options).onSuccess)===null||S===void 0||S.call(E,p,r),this.runPluginHandler("onSuccess",p,r),(x=(C=this.options).onFinally)===null||x===void 0||x.call(C,r,p,void 0),t===this.count&&this.runPluginHandler("onFinally",r,p,void 0),[2,p]);case 3:if(b=B.sent(),t!==this.count)return[2,new Promise(function(){})];throw this.setState({error:b,loading:!1}),(l=(R=this.options).onError)===null||l===void 0||l.call(R,b,r),this.runPluginHandler("onError",b,r),(A=(k=this.options).onFinally)===null||A===void 0||A.call(k,r,void 0,b),t===this.count&&this.runPluginHandler("onFinally",r,void 0,b),b;case 4:return[2]}})})},e.prototype.run=function(){for(var r=this,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this.runAsync.apply(this,re([],ee(n),!1)).catch(function(i){r.options.onError||console.error(i)})},e.prototype.cancel=function(){this.count+=1,this.setState({loading:!1}),this.runPluginHandler("onCancel")},e.prototype.refresh=function(){this.run.apply(this,re([],ee(this.state.params||[]),!1))},e.prototype.refreshAsync=function(){return this.runAsync.apply(this,re([],ee(this.state.params||[]),!1))},e.prototype.mutate=function(r){var n=ur(r)?r(this.state.data):r;this.runPluginHandler("onMutate",n),this.setState({data:n})},e}();function co(e,r,n){r===void 0&&(r={}),n===void 0&&(n=[]);var t=r.manual,i=t===void 0?!1:t,a=r.ready,o=a===void 0?!0:a,s=Tn(r,["manual","ready"]);fr&&r.defaultParams&&!Array.isArray(r.defaultParams)&&console.warn("expected defaultParams is array, got ".concat(typeof r.defaultParams));var f=le({manual:i,ready:o},s),c=wn(e),d=oo(),p=Rn(function(){var b=n.map(function(g){var h;return(h=g==null?void 0:g.onInit)===null||h===void 0?void 0:h.call(g,f)}).filter(Boolean);return new so(c,f,d,Object.assign.apply(Object,re([{}],ee(b),!1)))},[]);return p.options=f,p.pluginImpls=n.map(function(b){return b(p,f)}),io(function(){if(!i&&o){var b=p.state.params||r.defaultParams||[];p.run.apply(p,re([],ee(b),!1))}}),Qr(function(){p.cancel()}),{loading:p.state.loading,data:p.state.data,error:p.state.error,params:p.state.params||[],cancel:Re(p.cancel.bind(p)),refresh:Re(p.refresh.bind(p)),refreshAsync:Re(p.refreshAsync.bind(p)),run:Re(p.run.bind(p)),runAsync:Re(p.runAsync.bind(p)),mutate:Re(p.mutate.bind(p))}}function uo(e,r,n){return co(e,r,re(re([],ee(n||[]),!1),[Gi,Bi,Xi,Qi,ao,Sn,Ni,eo],!1))}function fo(e,r,n){const t=uo(e,{...r,onError(a,o){var s;((r==null?void 0:r.errorMessage)??!0)&&exports.message.error(a.message),(s=r==null?void 0:r.onError)==null||s.call(r,a,o)}},n),i=t.data&&typeof t.data=="object"&&"data"in t.data?t.data.data:t.data;return{...t,data:i}}exports.App=Za;exports.CheckboxValue=ei;exports.ConfigContext=cr;exports.ConfigProvider=bn;exports.GlobalLoading=hn;exports.IconButton=Ti;exports.IconFont=En;exports.SwitchValue=ri;exports.useRequest=fo;