diff --git a/core/admin/513.13ef631c.async.js b/core/admin/513.13ef631c.async.js new file mode 100644 index 0000000..31d1cfb --- /dev/null +++ b/core/admin/513.13ef631c.async.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[513],{64619:function(H,R,n){var f=n(75782),h=n(58733),E=n(18518),g=n(82849),P=n(50959),r=n(31950),w=n(72961),V=n(11527),F=["fieldProps","options","radioType","layout","proFieldProps","valueEnum"],D=P.forwardRef(function(c,O){var C=c.fieldProps,T=c.options,L=c.radioType,I=c.layout,m=c.proFieldProps,K=c.valueEnum,_=(0,h.Z)(c,F);return(0,V.jsx)(w.Z,(0,f.Z)((0,f.Z)({valueType:L==="button"?"radioButton":"radio",ref:O,valueEnum:(0,E.h)(K,void 0)},_),{},{fieldProps:(0,f.Z)({options:T,layout:I},C),proFieldProps:m,filedConfig:{customLightMode:!0}}))}),$=P.forwardRef(function(c,O){var C=c.fieldProps,T=c.children;return(0,V.jsx)(g.ZP,(0,f.Z)((0,f.Z)({},C),{},{ref:O,children:T}))}),B=(0,r.G)($,{valuePropName:"checked",ignoreWidth:!0}),M=B;M.Group=D,M.Button=g.ZP.Button,M.displayName="ProFormComponent",R.Z=M},6849:function(H,R,n){var f=n(24572),h=n(91600),E=n(58733),g=n(99932),P=n(78450),r=n(75782),w=n(27693),V=n(55585),F=n(31479),D=n(35276),$=n(88648),B=n(18518),M=n(88938),c=n(89839),O=n(26572),C=n(40870),T=n(95027),L=n(53068),I=n(38365),m=n(50959),K=n(15797),_=n(11527),Z=["onTableChange","maxLength","formItemProps","recordCreatorProps","rowKey","controlled","defaultValue","onChange","editableFormRef"],S=["record","position","creatorButtonText","newRecordType","parentKey","style"],J=m.createContext(void 0);function Y(e){var y=e.children,p=e.record,ee=e.position,ne=e.newRecordType,N=e.parentKey,Q=(0,m.useContext)(J);return m.cloneElement(y,(0,r.Z)((0,r.Z)({},y.props),{},{onClick:function(){var G=(0,P.Z)((0,g.Z)().mark(function ae(re){var X,k,U,W;return(0,g.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,(X=(k=y.props).onClick)===null||X===void 0?void 0:X.call(k,re);case 2:if(W=v.sent,W!==!1){v.next=5;break}return v.abrupt("return");case 5:Q==null||(U=Q.current)===null||U===void 0||U.addEditRecord(p,{position:ee,newRecordType:ne,parentKey:N});case 6:case"end":return v.stop()}},ae)}));function A(ae){return G.apply(this,arguments)}return A}()}))}function _e(e){var y,p,ee=(0,D.YB)(),ne=e.onTableChange,N=e.maxLength,Q=e.formItemProps,G=e.recordCreatorProps,A=e.rowKey,ae=e.controlled,re=e.defaultValue,X=e.onChange,k=e.editableFormRef,U=(0,E.Z)(e,Z),W=(0,$.D)(e.value),q=(0,m.useRef)(),v=(0,m.useRef)();(0,m.useImperativeHandle)(U.actionRef,function(){return q.current});var ce=(0,T.Z)(function(){return e.value||re||[]},{value:e.value,onChange:e.onChange}),ue=(0,h.Z)(ce,2),i=ue[0],me=ue[1],x=m.useMemo(function(){return typeof A=="function"?A:function(u,a){return u[A]||a}},[A]),se=function(a){if(typeof a=="number"&&!e.name){if(a>=i.length)return a;var t=i&&i[a];return x==null?void 0:x(t,a)}if((typeof a=="string"||a>=i.length)&&e.name){var o=i.findIndex(function(l,d){var s;return(x==null||(s=x(l,d))===null||s===void 0?void 0:s.toString())===(a==null?void 0:a.toString())});return o}return a};(0,m.useImperativeHandle)(k,function(){var u=function(o){var l,d;if(o==null)throw new Error("rowIndex is required");var s=se(o),b=[e.name,(l=s==null?void 0:s.toString())!==null&&l!==void 0?l:""].flat(1).filter(Boolean);return(d=v.current)===null||d===void 0?void 0:d.getFieldValue(b)},a=function(){var o,l=[e.name].flat(1).filter(Boolean);if(Array.isArray(l)&&l.length===0){var d,s=(d=v.current)===null||d===void 0?void 0:d.getFieldsValue();return Array.isArray(s)?s:Object.keys(s).map(function(b){return s[b]})}return(o=v.current)===null||o===void 0?void 0:o.getFieldValue(l)};return(0,r.Z)((0,r.Z)({},v.current),{},{getRowData:u,getRowsData:a,setRowData:function(o,l){var d,s,b,le;if(o==null)throw new Error("rowIndex is required");var ie=se(o),Oe=[e.name,(d=ie==null?void 0:ie.toString())!==null&&d!==void 0?d:""].flat(1).filter(Boolean),Ce=((s=v.current)===null||s===void 0||(b=s.getFieldsValue)===null||b===void 0?void 0:b.call(s))||{},Te=(0,I.Z)(Ce,Oe,(0,r.Z)((0,r.Z)({},u(o)),l||{}));return(le=v.current)===null||le===void 0||le.setFieldsValue(Te),!0}})}),(0,m.useEffect)(function(){e.controlled&&i.forEach(function(u,a){var t;(t=v.current)===null||t===void 0||t.setFieldsValue((0,f.Z)({},x(u,a),u))},{})},[i,e.controlled]),(0,m.useEffect)(function(){if(e.name){var u;v.current=e==null||(u=e.editable)===null||u===void 0?void 0:u.form}},[(y=e.editable)===null||y===void 0?void 0:y.form,e.name]);var j=G||{},fe=j.record,te=j.position,Ee=j.creatorButtonText,Pe=j.newRecordType,he=j.parentKey,ge=j.style,De=(0,E.Z)(j,S),ve=te==="top",z=(0,m.useMemo)(function(){return typeof N=="number"&&N<=(i==null?void 0:i.length)?!1:G!==!1&&(0,_.jsx)(Y,{record:(0,B.h)(fe,i==null?void 0:i.length,i)||{},position:te,parentKey:(0,B.h)(he,i==null?void 0:i.length,i),newRecordType:Pe,children:(0,_.jsx)(O.ZP,(0,r.Z)((0,r.Z)({type:"dashed",style:(0,r.Z)({display:"block",margin:"10px 0",width:"100%"},ge),icon:(0,_.jsx)(w.Z,{})},De),{},{children:Ee||ee.getMessage("editableTable.action.add","\u6DFB\u52A0\u4E00\u884C\u6570\u636E")}))})},[G,N,i==null?void 0:i.length]),Me=(0,m.useMemo)(function(){return z?ve?{components:{header:{wrapper:function(a){var t,o=a.className,l=a.children;return(0,_.jsxs)("thead",{className:o,children:[l,(0,_.jsxs)("tr",{style:{position:"relative"},children:[(0,_.jsx)("td",{colSpan:0,style:{visibility:"hidden"},children:z}),(0,_.jsx)("td",{style:{position:"absolute",left:0,width:"100%"},colSpan:(t=U.columns)===null||t===void 0?void 0:t.length,children:z})]})]})}}}}:{tableViewRender:function(a,t){var o,l;return(0,_.jsxs)(_.Fragment,{children:[(o=(l=e.tableViewRender)===null||l===void 0?void 0:l.call(e,a,t))!==null&&o!==void 0?o:t,z]})}}:{}},[ve,z]),oe=(0,r.Z)({},e.editable),Re=(0,M.J)(function(u,a){var t,o,l;if((t=e.editable)===null||t===void 0||(o=t.onValuesChange)===null||o===void 0||o.call(t,u,a),(l=e.onValuesChange)===null||l===void 0||l.call(e,a,u),e.controlled){var d;e==null||(d=e.onChange)===null||d===void 0||d.call(e,a)}});return(e!=null&&e.onValuesChange||(p=e.editable)!==null&&p!==void 0&&p.onValuesChange||e.controlled&&e!==null&&e!==void 0&&e.onChange)&&(oe.onValuesChange=Re),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(J.Provider,{value:q,children:(0,_.jsx)(K.Z,(0,r.Z)((0,r.Z)((0,r.Z)({search:!1,options:!1,pagination:!1,rowKey:A,revalidateOnFocus:!1},U),Me),{},{tableLayout:"fixed",actionRef:q,onChange:ne,editable:(0,r.Z)((0,r.Z)({},oe),{},{formProps:(0,r.Z)({formRef:v},oe.formProps)}),dataSource:i,onDataSourceChange:function(a){if(me(a),e.name&&te==="top"){var t,o=(0,I.Z)({},[e.name].flat(1).filter(Boolean),a);(t=v.current)===null||t===void 0||t.setFieldsValue(o)}}}))}),e.name?(0,_.jsx)(V.Z,{name:[e.name],children:function(a){var t,o,l=(0,L.Z)(a,[e.name].flat(1)),d=l==null?void 0:l.find(function(s,b){return!(0,c.A)(s,W==null?void 0:W[b])});return d&&W&&(e==null||(t=e.editable)===null||t===void 0||(o=t.onValuesChange)===null||o===void 0||o.call(t,d,l)),null}}):null]})}function de(e){var y=F.ZP.useFormInstance();return e.name?(0,_.jsx)(C.Z.Item,(0,r.Z)((0,r.Z)({style:{maxWidth:"100%"}},e==null?void 0:e.formItemProps),{},{name:e.name,children:(0,_.jsx)(_e,(0,r.Z)((0,r.Z)({},e),{},{editable:(0,r.Z)((0,r.Z)({},e.editable),{},{form:y})}))})):(0,_.jsx)(_e,(0,r.Z)({},e))}de.RecordCreator=Y,R.Z=de},25367:function(H,R,n){var f=n(68243),h=n(86981),E=n(11527),g=function(){return(0,E.jsxs)(f.Z,{size:"middle",children:[(0,E.jsx)(h.Z,{size:"small"}),(0,E.jsx)(h.Z,{}),(0,E.jsx)(h.Z,{size:"large"})]})};R.Z=g},34316:function(H,R,n){var f=n(86195),h=n(21362),E=function(){h.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var P=new URL(window.location.href).searchParams,r=P.get("redirect");window.location.pathname!=="/user/login"&&!r&&f.history.replace({pathname:"/user/login"})};R.Z=E},87474:function(H,R,n){var f=n(25359),h=n.n(f),E=n(49811),g=n.n(E),P=n(21362),r=n(86195),w=function(){var V=g()(h()().mark(function F(D){var $,B,M,c,O,C,T,L,I;return h()().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return $=D.values,B=D.loading,M=B===void 0?"\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..":B,c=D.success,O=c===void 0?"\u63D0\u4EA4\u6210\u529F\uFF01":c,C=D.fail,T=C===void 0?"\u63D0\u4EA4\u5931\u8D25":C,L=D.params,I=L===void 0?{}:L,M&&P.ZP.loading(M,2e4),K.abrupt("return",new Promise(function(_){(0,r.request)("/api/storage",{params:I,method:"put",data:$}).then(function(Z){var S;if(P.ZP.destroy(),(Z==null||(S=Z.data)===null||S===void 0?void 0:S.isLogin)==!1){P.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var J=new URL(window.location.href).searchParams,Y=J.get("redirect");window.location.pathname!=="/user/login"&&!Y&&r.history.replace({pathname:"/user/login"});return}Z!=null&&Z.success?O&&P.ZP.success(O,1):T&&P.ZP.warning(T,2),_(Z)})}));case 3:case"end":return K.stop()}},F)}));return function(D){return V.apply(this,arguments)}}();R.Z=w}}]); diff --git a/core/admin/513.85a5f606.async.js b/core/admin/513.85a5f606.async.js deleted file mode 100644 index bd5ca53..0000000 --- a/core/admin/513.85a5f606.async.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[513],{64619:function(G,R,n){var m=n(75782),h=n(58733),E=n(18518),D=n(82849),P=n(50959),a=n(31950),F=n(72961),U=n(11527),W=["fieldProps","options","radioType","layout","proFieldProps","valueEnum"],x=P.forwardRef(function(i,V){var M=i.fieldProps,b=i.options,g=i.radioType,y=i.layout,f=i.proFieldProps,w=i.valueEnum,u=(0,h.Z)(i,W);return(0,U.jsx)(F.Z,(0,m.Z)((0,m.Z)({valueType:g==="button"?"radioButton":"radio",ref:V,valueEnum:(0,E.h)(w,void 0)},u),{},{fieldProps:(0,m.Z)({options:b,layout:y},M),proFieldProps:f,filedConfig:{customLightMode:!0}}))}),j=P.forwardRef(function(i,V){var M=i.fieldProps,b=i.children;return(0,U.jsx)(D.ZP,(0,m.Z)((0,m.Z)({},M),{},{ref:V,children:b}))}),Z=(0,a.G)(j,{valuePropName:"checked",ignoreWidth:!0}),O=Z;O.Group=x,O.Button=D.ZP.Button,O.displayName="ProFormComponent",R.Z=O},6849:function(G,R,n){var m=n(24572),h=n(91600),E=n(58733),D=n(99932),P=n(78450),a=n(75782),F=n(27693),U=n(55585),W=n(31479),x=n(35276),j=n(88648),Z=n(18518),O=n(88938),i=n(89839),V=n(26572),M=n(40870),b=n(95027),g=n(53068),y=n(38365),f=n(50959),w=n(15797),u=n(11527),se=["onTableChange","maxLength","formItemProps","recordCreatorProps","rowKey","controlled","defaultValue","onChange","editableFormRef"],ve=["record","position","creatorButtonText","newRecordType","parentKey","style"],re=f.createContext(void 0);function oe(e){var C=e.children,$=e.record,Q=e.position,X=e.newRecordType,S=e.parentKey,z=(0,f.useContext)(re);return f.cloneElement(C,(0,a.Z)((0,a.Z)({},C.props),{},{onClick:function(){var N=(0,P.Z)((0,D.Z)().mark(function k(q){var H,J,K,L;return(0,D.Z)().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(H=(J=C.props).onClick)===null||H===void 0?void 0:H.call(J,q);case 2:if(L=c.sent,L!==!1){c.next=5;break}return c.abrupt("return");case 5:z==null||(K=z.current)===null||K===void 0||K.addEditRecord($,{position:Q,newRecordType:X,parentKey:S});case 6:case"end":return c.stop()}},k)}));function B(k){return N.apply(this,arguments)}return B}()}))}function le(e){var C,$,Q=(0,x.YB)(),X=e.onTableChange,S=e.maxLength,z=e.formItemProps,N=e.recordCreatorProps,B=e.rowKey,k=e.controlled,q=e.defaultValue,H=e.onChange,J=e.editableFormRef,K=(0,E.Z)(e,se),L=(0,j.D)(e.value),Y=(0,f.useRef)(),c=(0,f.useRef)();(0,f.useImperativeHandle)(K.actionRef,function(){return Y.current});var ce=(0,b.Z)(function(){return e.value||q||[]},{value:e.value,onChange:e.onChange}),_e=(0,h.Z)(ce,2),_=_e[0],fe=_e[1],I=f.useMemo(function(){return typeof B=="function"?B:function(s,t){return s[B]||t}},[B]),de=function(t){if(typeof t=="number"&&!e.name){if(t>=_.length)return t;var r=_&&_[t];return I==null?void 0:I(r,t)}if((typeof t=="string"||t>=_.length)&&e.name){var o=_.findIndex(function(l,d){var v;return(I==null||(v=I(l,d))===null||v===void 0?void 0:v.toString())===(t==null?void 0:t.toString())});return o}return t};(0,f.useImperativeHandle)(J,function(){var s=function(o){var l,d;if(o==null)throw new Error("rowIndex is required");var v=de(o),T=[e.name,(l=v==null?void 0:v.toString())!==null&&l!==void 0?l:""].flat(1).filter(Boolean);return(d=c.current)===null||d===void 0?void 0:d.getFieldValue(T)},t=function(){var o,l=[e.name].flat(1).filter(Boolean);if(Array.isArray(l)&&l.length===0){var d,v=(d=c.current)===null||d===void 0?void 0:d.getFieldsValue();return Array.isArray(v)?v:Object.keys(v).map(function(T){return v[T]})}return(o=c.current)===null||o===void 0?void 0:o.getFieldValue(l)};return(0,a.Z)((0,a.Z)({},c.current),{},{getRowData:s,getRowsData:t,setRowData:function(o,l){var d,v,T,te;if(o==null)throw new Error("rowIndex is required");var ae=de(o),Oe=[e.name,(d=ae==null?void 0:ae.toString())!==null&&d!==void 0?d:""].flat(1).filter(Boolean),Ce=((v=c.current)===null||v===void 0||(T=v.getFieldsValue)===null||T===void 0?void 0:T.call(v))||{},Te=(0,y.Z)(Ce,Oe,(0,a.Z)((0,a.Z)({},s(o)),l||{}));return(te=c.current)===null||te===void 0||te.setFieldsValue(Te),!0}})}),(0,f.useEffect)(function(){e.controlled&&_.forEach(function(s,t){var r;(r=c.current)===null||r===void 0||r.setFieldsValue((0,m.Z)({},I(s,t),s))},{})},[_,e.controlled]),(0,f.useEffect)(function(){if(e.name){var s;c.current=e==null||(s=e.editable)===null||s===void 0?void 0:s.form}},[(C=e.editable)===null||C===void 0?void 0:C.form,e.name]);var A=N||{},me=A.record,ee=A.position,Ee=A.creatorButtonText,Pe=A.newRecordType,he=A.parentKey,ge=A.style,De=(0,E.Z)(A,ve),ue=ee==="top",p=(0,f.useMemo)(function(){return typeof S=="number"&&S<=(_==null?void 0:_.length)?!1:N!==!1&&(0,u.jsx)(oe,{record:(0,Z.h)(me,_==null?void 0:_.length,_)||{},position:ee,parentKey:(0,Z.h)(he,_==null?void 0:_.length,_),newRecordType:Pe,children:(0,u.jsx)(V.ZP,(0,a.Z)((0,a.Z)({type:"dashed",style:(0,a.Z)({display:"block",margin:"10px 0",width:"100%"},ge),icon:(0,u.jsx)(F.Z,{})},De),{},{children:Ee||Q.getMessage("editableTable.action.add","\u6DFB\u52A0\u4E00\u884C\u6570\u636E")}))})},[N,S,_==null?void 0:_.length]),Me=(0,f.useMemo)(function(){return p?ue?{components:{header:{wrapper:function(t){var r,o=t.className,l=t.children;return(0,u.jsxs)("thead",{className:o,children:[l,(0,u.jsxs)("tr",{style:{position:"relative"},children:[(0,u.jsx)("td",{colSpan:0,style:{visibility:"hidden"},children:p}),(0,u.jsx)("td",{style:{position:"absolute",left:0,width:"100%"},colSpan:(r=K.columns)===null||r===void 0?void 0:r.length,children:p})]})]})}}}}:{tableViewRender:function(t,r){var o,l;return(0,u.jsxs)(u.Fragment,{children:[(o=(l=e.tableViewRender)===null||l===void 0?void 0:l.call(e,t,r))!==null&&o!==void 0?o:r,p]})}}:{}},[ue,p]),ne=(0,a.Z)({},e.editable),Re=(0,O.J)(function(s,t){var r,o,l;if((r=e.editable)===null||r===void 0||(o=r.onValuesChange)===null||o===void 0||o.call(r,s,t),(l=e.onValuesChange)===null||l===void 0||l.call(e,t,s),e.controlled){var d;e==null||(d=e.onChange)===null||d===void 0||d.call(e,t)}});return(e!=null&&e.onValuesChange||($=e.editable)!==null&&$!==void 0&&$.onValuesChange||e.controlled&&e!==null&&e!==void 0&&e.onChange)&&(ne.onValuesChange=Re),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(re.Provider,{value:Y,children:(0,u.jsx)(w.Z,(0,a.Z)((0,a.Z)((0,a.Z)({search:!1,options:!1,pagination:!1,rowKey:B,revalidateOnFocus:!1},K),Me),{},{tableLayout:"fixed",actionRef:Y,onChange:X,editable:(0,a.Z)((0,a.Z)({},ne),{},{formProps:(0,a.Z)({formRef:c},ne.formProps)}),dataSource:_,onDataSourceChange:function(t){if(fe(t),e.name&&ee==="top"){var r,o=(0,y.Z)({},[e.name].flat(1).filter(Boolean),t);(r=c.current)===null||r===void 0||r.setFieldsValue(o)}}}))}),e.name?(0,u.jsx)(U.Z,{name:[e.name],children:function(t){var r,o,l=(0,g.Z)(t,[e.name].flat(1)),d=l==null?void 0:l.find(function(v,T){return!(0,i.A)(v,L==null?void 0:L[T])});return d&&L&&(e==null||(r=e.editable)===null||r===void 0||(o=r.onValuesChange)===null||o===void 0||o.call(r,d,l)),null}}):null]})}function ie(e){var C=W.ZP.useFormInstance();return e.name?(0,u.jsx)(M.Z.Item,(0,a.Z)((0,a.Z)({style:{maxWidth:"100%"}},e==null?void 0:e.formItemProps),{},{name:e.name,children:(0,u.jsx)(le,(0,a.Z)((0,a.Z)({},e),{},{editable:(0,a.Z)((0,a.Z)({},e.editable),{},{form:C})}))})):(0,u.jsx)(le,(0,a.Z)({},e))}ie.RecordCreator=oe,R.Z=ie},25367:function(G,R,n){var m=n(68243),h=n(86981),E=n(11527),D=function(){return(0,E.jsxs)(m.Z,{size:"middle",children:[(0,E.jsx)(h.Z,{size:"small"}),(0,E.jsx)(h.Z,{}),(0,E.jsx)(h.Z,{size:"large"})]})};R.Z=D},34316:function(G,R,n){var m=n(86195),h=n(21362),E=function(){h.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var P=new URL(window.location.href).searchParams,a=P.get("redirect");window.location.pathname!=="/user/login"&&!a&&m.history.replace({pathname:"/user/login"})};R.Z=E},87474:function(G,R,n){var m=n(25359),h=n.n(m),E=n(49811),D=n.n(E),P=n(21362),a=n(86195),F=function(){var U=D()(h()().mark(function W(x){var j,Z,O,i=arguments;return h()().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return j=i.length>1&&i[1]!==void 0?i[1]:"\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..",Z=i.length>2&&i[2]!==void 0?i[2]:"\u63D0\u4EA4\u6210\u529F\uFF01",O=i.length>3&&i[3]!==void 0?i[3]:"\u63D0\u4EA4\u5931\u8D25",j&&P.ZP.loading("\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..",2e4),M.abrupt("return",new Promise(function(b){(0,a.request)("/api/storage",{method:"put",data:x}).then(function(g){var y;if(P.ZP.destroy(),(g==null||(y=g.data)===null||y===void 0?void 0:y.isLogin)==!1){P.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var f=new URL(window.location.href).searchParams,w=f.get("redirect");window.location.pathname!=="/user/login"&&!w&&a.history.replace({pathname:"/user/login"});return}g!=null&&g.success?Z&&P.ZP.success(Z,1):O&&P.ZP.warning("\u63D0\u4EA4\u5931\u8D25\uFF01",2),b(g)})}));case 5:case"end":return M.stop()}},W)}));return function(x){return U.apply(this,arguments)}}();R.Z=F}}]); diff --git a/core/admin/index.html b/core/admin/index.html index 687c273..b2b2d56 100644 --- a/core/admin/index.html +++ b/core/admin/index.html @@ -8,6 +8,6 @@
- + \ No newline at end of file diff --git a/core/admin/p__Message__Listen__index.e98ce39a.async.js b/core/admin/p__Message__Listen__index.112d882f.async.js similarity index 57% rename from core/admin/p__Message__Listen__index.e98ce39a.async.js rename to core/admin/p__Message__Listen__index.112d882f.async.js index 20ba519..a34fb59 100644 --- a/core/admin/p__Message__Listen__index.e98ce39a.async.js +++ b/core/admin/p__Message__Listen__index.112d882f.async.js @@ -1 +1 @@ -"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[966],{81734:function(Q,D,e){e.r(D);var B=e(25359),O=e.n(B),I=e(49811),R=e.n(I),T=e(54306),m=e.n(T),x=e(25367),K=e(34316),M=e(87474),U=e(12472),L=e(6849),j=e(64619),f=e(86195),S=e(833),W=e(46370),c=e(50959),s=e(11527),E="listenOnGroups";D.default=function(){var p,Z=(0,c.useState)([]),g=m()(Z,2),G=g[0],$=g[1],J=(0,c.useState)([{id:"empty"}]),h=m()(J,2),d=h[0],v=h[1],N=(0,c.useState)("bottom"),A=m()(N,2),P=A[0],z=A[1],C=(0,f.useRequest)(function(){return(0,f.request)("/api/storage",{params:{keys:[E].join(",")}})}),y=C.data,V=C.error,w=C.loading;if(w)return(0,s.jsx)(x.Z,{});if(V)return(0,K.Z)(),null;if(((p=d[0])===null||p===void 0?void 0:p.id)=="empty"){var b=[],i=Object.keys(y).map(function(n){var a=n.split(".")[1];b.push("nickname."+a);try{n=JSON.parse(y[n])}catch(_){n={}}return n.id=a,n});(0,f.request)("/api/storage",{params:{keys:b.join(",")}}).then(function(n){if(n.data)for(var a in n.data){var _=a.split(".")[1];for(var u in i)if(i[u].id==_)try{var t=JSON.parse(n.data[a]),r=t.v,o=t.p;r&&(i[u].nickname=r,i[u].platform=o)}catch(l){}}v(i)})}var H=[{title:"\u7FA4\u53F7",dataIndex:"id",width:"15%"},{title:"\u7FA4\u79F0",dataIndex:"nickname",width:"15%",readonly:!0},{title:"\u5E73\u53F0",width:"15%",dataIndex:"platform",readonly:!0},{title:"\u5907\u6CE8",dataIndex:"decs",fieldProps:function(a,_){var u=_.rowKey,t=_.rowIndex;return a.getFieldValue([u||"","title"])==="\u4E0D\u597D\u73A9"?{disabled:!0}:t>9?{disabled:!0}:{}}},{title:"\u72B6\u6001",dataIndex:"enable",valueType:"switch",width:"10%",render:function(a,_){var u;return(0,s.jsx)(S.Z,{disabled:!0,defaultChecked:(u=d.find(function(t){return t.id==_.id}))===null||u===void 0?void 0:u.enable})}},{title:"\u64CD\u4F5C",valueType:"option",width:200,render:function(a,_,u,t){return[(0,s.jsx)("a",{onClick:function(){var o;t==null||(o=t.startEditable)===null||o===void 0||o.call(t,_.id)},children:"\u7F16\u8F91"},"editable"),(0,s.jsx)("a",{onClick:function(){v(d.filter(function(l){return l.id!==_.id}));var o={};o[E+"."+_.id]="",(0,M.Z)(o)},children:"\u5220\u9664"},"delete")]}}];return(0,s.jsxs)(U._z,{children:[(0,s.jsx)(W.Z,{style:{marginBottom:"10px"},message:"\u5B89\u5168\u8D77\u89C1\uFF0C\u7FA4\u804A\u6D88\u606F\u9ED8\u8BA4\u4E0D\u4F1A\u88AB\u76D1\u542C\u5904\u7406\uFF0C\u4F60\u53EF\u4EE5\u5728\u8FD9\u91CC\u6DFB\u52A0\u4F60\u60F3\u8981\u63A5\u6536\u5904\u7406\u6D88\u606F\u7684\u7FA4\u804A\uFF0C\u4E5F\u53EF\u4EE5\u76F4\u63A5\u5728\u7FA4\u804A\u4E2D\u4F7F\u7528listen\u548Cunlisten\u5F00\u542F\u548C\u5173\u95ED\u3002",type:"info",closeText:"\u5173\u95ED"}),(0,s.jsx)(L.Z,{rowKey:"id",maxLength:1005,scroll:{x:960},recordCreatorProps:P!=="hidden"?{position:P,record:function(){return{id:""+(Math.random()*1e6).toFixed(0)}}}:!1,loading:!1,toolBarRender:function(){return[(0,s.jsx)(j.Z.Group,{fieldProps:{value:P,onChange:function(_){z(_.target.value)}},options:[{label:"\u6DFB\u52A0\u5230\u9876\u90E8",value:"top"},{label:"\u6DFB\u52A0\u5230\u5E95\u90E8",value:"bottom"},{label:"\u9690\u85CF",value:"hidden"}]},"render")]},columns:H,value:d,onChange:v,editable:{type:"multiple",editableKeys:G,onSave:function(){var n=R()(O()().mark(function _(u,t){var r;return O()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:r={},u!=t.id&&(r[E+"."+u]=""),r[E+"."+t.id]=JSON.stringify(t),(0,M.Z)(r),v(d.map(function(F){return F.id==u?t:F}));case 5:case"end":return l.stop()}},_)}));function a(_,u){return n.apply(this,arguments)}return a}(),onChange:$}})]})}}}]); +"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[966],{81734:function(Q,D,e){e.r(D);var B=e(25359),O=e.n(B),I=e(49811),R=e.n(I),T=e(54306),m=e.n(T),x=e(25367),K=e(34316),M=e(87474),U=e(12472),L=e(6849),j=e(64619),f=e(86195),S=e(833),W=e(46370),c=e(50959),s=e(11527),E="listenOnGroups";D.default=function(){var p,Z=(0,c.useState)([]),g=m()(Z,2),G=g[0],$=g[1],J=(0,c.useState)([{id:"empty"}]),h=m()(J,2),d=h[0],v=h[1],N=(0,c.useState)("bottom"),A=m()(N,2),P=A[0],z=A[1],C=(0,f.useRequest)(function(){return(0,f.request)("/api/storage",{params:{keys:[E].join(",")}})}),y=C.data,V=C.error,w=C.loading;if(w)return(0,s.jsx)(x.Z,{});if(V)return(0,K.Z)(),null;if(((p=d[0])===null||p===void 0?void 0:p.id)=="empty"){var b=[],i=Object.keys(y).map(function(n){var a=n.split(".")[1];b.push("nickname."+a);try{n=JSON.parse(y[n])}catch(_){n={}}return n.id=a,n});(0,f.request)("/api/storage",{params:{keys:b.join(",")}}).then(function(n){if(n.data)for(var a in n.data){var _=a.split(".")[1];for(var u in i)if(i[u].id==_)try{var t=JSON.parse(n.data[a]),r=t.v,o=t.p;r&&(i[u].nickname=r,i[u].platform=o)}catch(l){}}v(i)})}var H=[{title:"\u7FA4\u53F7",dataIndex:"id",width:"15%"},{title:"\u7FA4\u79F0",dataIndex:"nickname",width:"15%",readonly:!0},{title:"\u5E73\u53F0",width:"15%",dataIndex:"platform",readonly:!0},{title:"\u5907\u6CE8",dataIndex:"decs",fieldProps:function(a,_){var u=_.rowKey,t=_.rowIndex;return a.getFieldValue([u||"","title"])==="\u4E0D\u597D\u73A9"?{disabled:!0}:t>9?{disabled:!0}:{}}},{title:"\u72B6\u6001",dataIndex:"enable",valueType:"switch",width:"10%",render:function(a,_){var u;return(0,s.jsx)(S.Z,{disabled:!0,defaultChecked:(u=d.find(function(t){return t.id==_.id}))===null||u===void 0?void 0:u.enable})}},{title:"\u64CD\u4F5C",valueType:"option",width:200,render:function(a,_,u,t){return[(0,s.jsx)("a",{onClick:function(){var o;t==null||(o=t.startEditable)===null||o===void 0||o.call(t,_.id)},children:"\u7F16\u8F91"},"editable"),(0,s.jsx)("a",{onClick:function(){v(d.filter(function(l){return l.id!==_.id}));var o={};o[E+"."+_.id]="",(0,M.Z)({values:o})},children:"\u5220\u9664"},"delete")]}}];return(0,s.jsxs)(U._z,{children:[(0,s.jsx)(W.Z,{style:{marginBottom:"10px"},message:"\u5B89\u5168\u8D77\u89C1\uFF0C\u7FA4\u804A\u6D88\u606F\u9ED8\u8BA4\u4E0D\u4F1A\u88AB\u76D1\u542C\u5904\u7406\uFF0C\u4F60\u53EF\u4EE5\u5728\u8FD9\u91CC\u6DFB\u52A0\u4F60\u60F3\u8981\u63A5\u6536\u5904\u7406\u6D88\u606F\u7684\u7FA4\u804A\uFF0C\u4E5F\u53EF\u4EE5\u76F4\u63A5\u5728\u7FA4\u804A\u4E2D\u4F7F\u7528listen\u548Cunlisten\u5F00\u542F\u548C\u5173\u95ED\u3002",type:"info",closeText:"\u5173\u95ED"}),(0,s.jsx)(L.Z,{rowKey:"id",maxLength:1005,scroll:{x:960},recordCreatorProps:P!=="hidden"?{position:P,record:function(){return{id:""+(Math.random()*1e6).toFixed(0)}}}:!1,loading:!1,toolBarRender:function(){return[(0,s.jsx)(j.Z.Group,{fieldProps:{value:P,onChange:function(_){z(_.target.value)}},options:[{label:"\u6DFB\u52A0\u5230\u9876\u90E8",value:"top"},{label:"\u6DFB\u52A0\u5230\u5E95\u90E8",value:"bottom"},{label:"\u9690\u85CF",value:"hidden"}]},"render")]},columns:H,value:d,onChange:v,editable:{type:"multiple",editableKeys:G,onSave:function(){var n=R()(O()().mark(function _(u,t){var r;return O()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:r={},u!=t.id&&(r[E+"."+u]=""),r[E+"."+t.id]=JSON.stringify(t),(0,M.Z)({values:r}),v(d.map(function(F){return F.id==u?t:F}));case 5:case"end":return l.stop()}},_)}));function a(_,u){return n.apply(this,arguments)}return a}(),onChange:$}})]})}}}]); diff --git a/core/admin/p__Message__Noreply__index.03769b16.async.js b/core/admin/p__Message__Noreply__index.c2b933c9.async.js similarity index 57% rename from core/admin/p__Message__Noreply__index.03769b16.async.js rename to core/admin/p__Message__Noreply__index.c2b933c9.async.js index 1ab3c32..baf4805 100644 --- a/core/admin/p__Message__Noreply__index.03769b16.async.js +++ b/core/admin/p__Message__Noreply__index.c2b933c9.async.js @@ -1 +1 @@ -"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[81],{38146:function(Q,D,e){e.r(D);var B=e(25359),A=e.n(B),R=e(49811),T=e.n(R),I=e(54306),m=e.n(I),x=e(25367),K=e(34316),O=e(87474),U=e(12472),L=e(6849),j=e(64619),f=e(86195),S=e(833),W=e(46370),p=e(50959),l=e(11527),E="noReplyGroups";D.default=function(){var C,Z=(0,p.useState)([]),M=m()(Z,2),G=M[0],$=M[1],J=(0,p.useState)([{id:"empty"}]),g=m()(J,2),d=g[0],v=g[1],N=(0,p.useState)("bottom"),h=m()(N,2),c=h[0],z=h[1],P=(0,f.useRequest)(function(){return(0,f.request)("/api/storage",{params:{keys:[E].join(",")}})}),y=P.data,V=P.error,w=P.loading;if(w)return(0,l.jsx)(x.Z,{});if(V)return(0,K.Z)(),null;if(((C=d[0])===null||C===void 0?void 0:C.id)=="empty"){var F=[],i=Object.keys(y).map(function(_){var a=_.split(".")[1];F.push("nickname."+a);try{_=JSON.parse(y[_])}catch(n){_={}}return _.id=a,_});(0,f.request)("/api/storage",{params:{keys:F.join(",")}}).then(function(_){if(_.data)for(var a in _.data){var n=a.split(".")[1];for(var t in i)if(i[t].id==n)try{var u=JSON.parse(_.data[a]),r=u.v,o=u.p;r&&(i[t].nickname=r,i[t].platform=o)}catch(s){}}v(i)})}var H=[{title:"\u7FA4\u53F7",dataIndex:"id",width:"15%"},{title:"\u7FA4\u79F0",dataIndex:"nickname",width:"15%",readonly:!0},{title:"\u5E73\u53F0",width:"15%",dataIndex:"platform",valueType:"select",readonly:!0},{title:"\u5907\u6CE8",dataIndex:"decs",fieldProps:function(a,n){var t=n.rowKey,u=n.rowIndex;return a.getFieldValue([t||"","title"])==="\u4E0D\u597D\u73A9"?{disabled:!0}:u>9?{disabled:!0}:{}}},{title:"\u72B6\u6001",dataIndex:"enable",valueType:"switch",width:"10%",render:function(a,n){var t;return(0,l.jsx)(S.Z,{disabled:!0,defaultChecked:(t=d.find(function(u){return u.id==n.id}))===null||t===void 0?void 0:t.enable})}},{title:"\u64CD\u4F5C",valueType:"option",width:200,render:function(a,n,t,u){return[(0,l.jsx)("a",{onClick:function(){var o;u==null||(o=u.startEditable)===null||o===void 0||o.call(u,n.id)},children:"\u7F16\u8F91"},"editable"),(0,l.jsx)("a",{onClick:function(){v(d.filter(function(s){return s.id!==n.id}));var o={};o[E+"."+n.id]="",(0,O.Z)(o)},children:"\u5220\u9664"},"delete")]}}];return(0,l.jsxs)(U._z,{children:[(0,l.jsx)(W.Z,{style:{marginBottom:"10px"},message:"\u9ED8\u8BA4\u6D88\u606F\u88AB\u5904\u7406\u662F\u53EF\u4EE5\u505A\u51FA\u56DE\u590D\u7684\uFF0C\u5982\u679C\u4F60\u5E0C\u671B\u673A\u5668\u4EBA\u53EA\u5728\u7FA4\u804A\u4E2D\u76D1\u542C\u6D88\u606F\uFF0C\u62C5\u5FC3\u5728\u7FA4\u91CC\u81EA\u52A8\u53D1\u8A00\u800C\u66B4\u9732\u88AB\u8E22\u5C31\u53EF\u4EE5\u628A\u7FA4\u804A\u52A0\u5165\u5230\u8FD9\u91CC\uFF0C\u4E5F\u53EF\u4EE5\u76F4\u63A5\u5728\u7FA4\u804A\u4E2D\u4F7F\u7528reply\u548Cnoreply\u5F00\u542F\u548C\u5173\u95ED\u3002",type:"info",closeText:"\u5173\u95ED"}),(0,l.jsx)(L.Z,{rowKey:"id",maxLength:1005,scroll:{x:960},recordCreatorProps:c!=="hidden"?{position:c,record:function(){return{id:""+(Math.random()*1e6).toFixed(0)}}}:!1,loading:!1,toolBarRender:function(){return[(0,l.jsx)(j.Z.Group,{fieldProps:{value:c,onChange:function(n){z(n.target.value)}},options:[{label:"\u6DFB\u52A0\u5230\u9876\u90E8",value:"top"},{label:"\u6DFB\u52A0\u5230\u5E95\u90E8",value:"bottom"},{label:"\u9690\u85CF",value:"hidden"}]},"render")]},columns:H,value:d,onChange:v,editable:{type:"multiple",editableKeys:G,onSave:function(){var _=T()(A()().mark(function n(t,u){var r;return A()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:r={},t!=u.id&&(r[E+"."+t]=""),r[E+"."+u.id]=JSON.stringify(u),(0,O.Z)(r),v(d.map(function(b){return b.id==t?u:b}));case 5:case"end":return s.stop()}},n)}));function a(n,t){return _.apply(this,arguments)}return a}(),onChange:$}})]})}}}]); +"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[81],{38146:function(Q,D,e){e.r(D);var B=e(25359),A=e.n(B),R=e(49811),T=e.n(R),I=e(54306),m=e.n(I),x=e(25367),K=e(34316),O=e(87474),U=e(12472),L=e(6849),j=e(64619),f=e(86195),S=e(833),W=e(46370),p=e(50959),l=e(11527),E="noReplyGroups";D.default=function(){var C,Z=(0,p.useState)([]),M=m()(Z,2),G=M[0],$=M[1],J=(0,p.useState)([{id:"empty"}]),g=m()(J,2),d=g[0],v=g[1],N=(0,p.useState)("bottom"),h=m()(N,2),c=h[0],z=h[1],P=(0,f.useRequest)(function(){return(0,f.request)("/api/storage",{params:{keys:[E].join(",")}})}),y=P.data,V=P.error,w=P.loading;if(w)return(0,l.jsx)(x.Z,{});if(V)return(0,K.Z)(),null;if(((C=d[0])===null||C===void 0?void 0:C.id)=="empty"){var F=[],i=Object.keys(y).map(function(_){var a=_.split(".")[1];F.push("nickname."+a);try{_=JSON.parse(y[_])}catch(n){_={}}return _.id=a,_});(0,f.request)("/api/storage",{params:{keys:F.join(",")}}).then(function(_){if(_.data)for(var a in _.data){var n=a.split(".")[1];for(var t in i)if(i[t].id==n)try{var u=JSON.parse(_.data[a]),r=u.v,o=u.p;r&&(i[t].nickname=r,i[t].platform=o)}catch(s){}}v(i)})}var H=[{title:"\u7FA4\u53F7",dataIndex:"id",width:"15%"},{title:"\u7FA4\u79F0",dataIndex:"nickname",width:"15%",readonly:!0},{title:"\u5E73\u53F0",width:"15%",dataIndex:"platform",valueType:"select",readonly:!0},{title:"\u5907\u6CE8",dataIndex:"decs",fieldProps:function(a,n){var t=n.rowKey,u=n.rowIndex;return a.getFieldValue([t||"","title"])==="\u4E0D\u597D\u73A9"?{disabled:!0}:u>9?{disabled:!0}:{}}},{title:"\u72B6\u6001",dataIndex:"enable",valueType:"switch",width:"10%",render:function(a,n){var t;return(0,l.jsx)(S.Z,{disabled:!0,defaultChecked:(t=d.find(function(u){return u.id==n.id}))===null||t===void 0?void 0:t.enable})}},{title:"\u64CD\u4F5C",valueType:"option",width:200,render:function(a,n,t,u){return[(0,l.jsx)("a",{onClick:function(){var o;u==null||(o=u.startEditable)===null||o===void 0||o.call(u,n.id)},children:"\u7F16\u8F91"},"editable"),(0,l.jsx)("a",{onClick:function(){v(d.filter(function(s){return s.id!==n.id}));var o={};o[E+"."+n.id]="",(0,O.Z)({values:o})},children:"\u5220\u9664"},"delete")]}}];return(0,l.jsxs)(U._z,{children:[(0,l.jsx)(W.Z,{style:{marginBottom:"10px"},message:"\u9ED8\u8BA4\u6D88\u606F\u88AB\u5904\u7406\u662F\u53EF\u4EE5\u505A\u51FA\u56DE\u590D\u7684\uFF0C\u5982\u679C\u4F60\u5E0C\u671B\u673A\u5668\u4EBA\u53EA\u5728\u7FA4\u804A\u4E2D\u76D1\u542C\u6D88\u606F\uFF0C\u62C5\u5FC3\u5728\u7FA4\u91CC\u81EA\u52A8\u53D1\u8A00\u800C\u66B4\u9732\u88AB\u8E22\u5C31\u53EF\u4EE5\u628A\u7FA4\u804A\u52A0\u5165\u5230\u8FD9\u91CC\uFF0C\u4E5F\u53EF\u4EE5\u76F4\u63A5\u5728\u7FA4\u804A\u4E2D\u4F7F\u7528reply\u548Cnoreply\u5F00\u542F\u548C\u5173\u95ED\u3002",type:"info",closeText:"\u5173\u95ED"}),(0,l.jsx)(L.Z,{rowKey:"id",maxLength:1005,scroll:{x:960},recordCreatorProps:c!=="hidden"?{position:c,record:function(){return{id:""+(Math.random()*1e6).toFixed(0)}}}:!1,loading:!1,toolBarRender:function(){return[(0,l.jsx)(j.Z.Group,{fieldProps:{value:c,onChange:function(n){z(n.target.value)}},options:[{label:"\u6DFB\u52A0\u5230\u9876\u90E8",value:"top"},{label:"\u6DFB\u52A0\u5230\u5E95\u90E8",value:"bottom"},{label:"\u9690\u85CF",value:"hidden"}]},"render")]},columns:H,value:d,onChange:v,editable:{type:"multiple",editableKeys:G,onSave:function(){var _=T()(A()().mark(function n(t,u){var r;return A()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:r={},t!=u.id&&(r[E+"."+t]=""),r[E+"."+u.id]=JSON.stringify(u),(0,O.Z)({values:r}),v(d.map(function(b){return b.id==t?u:b}));case 5:case"end":return s.stop()}},n)}));function a(n,t){return _.apply(this,arguments)}return a}(),onChange:$}})]})}}}]); diff --git a/core/admin/p__Message__Private__index.abd92429.async.js b/core/admin/p__Message__Private__index.2234b749.async.js similarity index 60% rename from core/admin/p__Message__Private__index.abd92429.async.js rename to core/admin/p__Message__Private__index.2234b749.async.js index d36bb55..bfce5a1 100644 --- a/core/admin/p__Message__Private__index.abd92429.async.js +++ b/core/admin/p__Message__Private__index.2234b749.async.js @@ -1 +1 @@ -"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[538],{29620:function(Q,D,e){e.r(D);var I=e(25359),O=e.n(I),R=e(49811),U=e.n(R),x=e(54306),m=e.n(x),B=e(25367),K=e(34316),M=e(87474),L=e(12472),j=e(6849),S=e(64619),f=e(86195),W=e(833),F=e(46370),c=e(50959),s=e(11527),E="noListenUsers";D.default=function(){var p,Z=(0,c.useState)([]),g=m()(Z,2),G=g[0],$=g[1],J=(0,c.useState)([{id:"empty"}]),h=m()(J,2),d=h[0],v=h[1],N=(0,c.useState)("bottom"),y=m()(N,2),P=y[0],z=y[1],C=(0,f.useRequest)(function(){return(0,f.request)("/api/storage",{params:{keys:[E].join(",")}})}),b=C.data,V=C.error,w=C.loading;if(w)return(0,s.jsx)(B.Z,{});if(V)return(0,K.Z)(),null;if(((p=d[0])===null||p===void 0?void 0:p.id)=="empty"){var A=[],i=Object.keys(b).map(function(n){var u=n.split(".")[1];A.push("nickname."+u);try{n=JSON.parse(b[n])}catch(_){n={}}return n.id=u,n});(0,f.request)("/api/storage",{params:{keys:A.join(",")}}).then(function(n){if(n.data)for(var u in n.data){var _=u.split(".")[1];for(var a in i)if(i[a].id==_)try{var t=JSON.parse(n.data[u]),r=t.v,o=t.p;r&&(i[a].nickname=r,i[a].platform=o)}catch(l){}}v(i)})}var H=[{title:"\u8D26\u53F7",dataIndex:"id",width:"15%"},{title:"\u6635\u79F0",dataIndex:"nickname",width:"15%",readonly:!0},{title:"\u5E73\u53F0",width:"15%",dataIndex:"platform",valueType:"select",readonly:!0},{title:"\u5907\u6CE8",dataIndex:"decs",fieldProps:function(u,_){var a=_.rowKey,t=_.rowIndex;return u.getFieldValue([a||"","title"])==="\u4E0D\u597D\u73A9"?{disabled:!0}:t>9?{disabled:!0}:{}}},{title:"\u72B6\u6001",dataIndex:"enable",valueType:"switch",width:"10%",render:function(u,_){var a;return(0,s.jsx)(W.Z,{disabled:!0,defaultChecked:(a=d.find(function(t){return t.id==_.id}))===null||a===void 0?void 0:a.enable})}},{title:"\u64CD\u4F5C",valueType:"option",width:200,render:function(u,_,a,t){return[(0,s.jsx)("a",{onClick:function(){var o;t==null||(o=t.startEditable)===null||o===void 0||o.call(t,_.id)},children:"\u7F16\u8F91"},"editable"),(0,s.jsx)("a",{onClick:function(){v(d.filter(function(l){return l.id!==_.id}));var o={};o[E+"."+_.id]="",(0,M.Z)(o)},children:"\u5220\u9664"},"delete")]}}];return(0,s.jsxs)(L._z,{children:[(0,s.jsx)(F.Z,{style:{marginBottom:"10px"},message:"\u9ED8\u8BA4\u76D1\u542C\u56DE\u590D\u6240\u6709\u79C1\u804A\uFF0C\u4F7F\u7528unlisten\u53E3\u4EE4\u5C4F\u853D\u79C1\u804A\uFF0Clisten\u53E3\u4EE4\u6062\u590D\u79C1\u804A\u3002\u7528\u6237\u88AB\u5C4F\u853D\u540E\u5C06\u4E0D\u518D\u63A5\u6536\u6709\u5173\u7528\u6237\u7684\u4EFB\u4F55\u6D88\u606F\u3002",type:"info",closeText:"\u5173\u95ED"}),(0,s.jsx)(j.Z,{rowKey:"id",maxLength:1005,scroll:{x:960},recordCreatorProps:P!=="hidden"?{position:P,record:function(){return{id:""+(Math.random()*1e6).toFixed(0)}}}:!1,loading:!1,toolBarRender:function(){return[(0,s.jsx)(S.Z.Group,{fieldProps:{value:P,onChange:function(_){z(_.target.value)}},options:[{label:"\u6DFB\u52A0\u5230\u9876\u90E8",value:"top"},{label:"\u6DFB\u52A0\u5230\u5E95\u90E8",value:"bottom"},{label:"\u9690\u85CF",value:"hidden"}]},"render")]},columns:H,value:d,onChange:v,editable:{type:"multiple",editableKeys:G,onSave:function(){var n=U()(O()().mark(function _(a,t){var r;return O()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:r={},a!=t.id&&(r[E+"."+a]=""),r[E+"."+t.id]=JSON.stringify(t),(0,M.Z)(r),v(d.map(function(T){return T.id==a?t:T}));case 5:case"end":return l.stop()}},_)}));function u(_,a){return n.apply(this,arguments)}return u}(),onChange:$}})]})}}}]); +"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[538],{29620:function(Q,D,e){e.r(D);var I=e(25359),O=e.n(I),R=e(49811),U=e.n(R),x=e(54306),m=e.n(x),B=e(25367),K=e(34316),M=e(87474),L=e(12472),j=e(6849),S=e(64619),f=e(86195),W=e(833),F=e(46370),c=e(50959),s=e(11527),E="noListenUsers";D.default=function(){var p,Z=(0,c.useState)([]),g=m()(Z,2),G=g[0],$=g[1],J=(0,c.useState)([{id:"empty"}]),h=m()(J,2),d=h[0],v=h[1],N=(0,c.useState)("bottom"),y=m()(N,2),P=y[0],z=y[1],C=(0,f.useRequest)(function(){return(0,f.request)("/api/storage",{params:{keys:[E].join(",")}})}),b=C.data,V=C.error,w=C.loading;if(w)return(0,s.jsx)(B.Z,{});if(V)return(0,K.Z)(),null;if(((p=d[0])===null||p===void 0?void 0:p.id)=="empty"){var A=[],i=Object.keys(b).map(function(n){var u=n.split(".")[1];A.push("nickname."+u);try{n=JSON.parse(b[n])}catch(_){n={}}return n.id=u,n});(0,f.request)("/api/storage",{params:{keys:A.join(",")}}).then(function(n){if(n.data)for(var u in n.data){var _=u.split(".")[1];for(var a in i)if(i[a].id==_)try{var t=JSON.parse(n.data[u]),r=t.v,o=t.p;r&&(i[a].nickname=r,i[a].platform=o)}catch(l){}}v(i)})}var H=[{title:"\u8D26\u53F7",dataIndex:"id",width:"15%"},{title:"\u6635\u79F0",dataIndex:"nickname",width:"15%",readonly:!0},{title:"\u5E73\u53F0",width:"15%",dataIndex:"platform",valueType:"select",readonly:!0},{title:"\u5907\u6CE8",dataIndex:"decs",fieldProps:function(u,_){var a=_.rowKey,t=_.rowIndex;return u.getFieldValue([a||"","title"])==="\u4E0D\u597D\u73A9"?{disabled:!0}:t>9?{disabled:!0}:{}}},{title:"\u72B6\u6001",dataIndex:"enable",valueType:"switch",width:"10%",render:function(u,_){var a;return(0,s.jsx)(W.Z,{disabled:!0,defaultChecked:(a=d.find(function(t){return t.id==_.id}))===null||a===void 0?void 0:a.enable})}},{title:"\u64CD\u4F5C",valueType:"option",width:200,render:function(u,_,a,t){return[(0,s.jsx)("a",{onClick:function(){var o;t==null||(o=t.startEditable)===null||o===void 0||o.call(t,_.id)},children:"\u7F16\u8F91"},"editable"),(0,s.jsx)("a",{onClick:function(){v(d.filter(function(l){return l.id!==_.id}));var o={};o[E+"."+_.id]="",(0,M.Z)({values:o})},children:"\u5220\u9664"},"delete")]}}];return(0,s.jsxs)(L._z,{children:[(0,s.jsx)(F.Z,{style:{marginBottom:"10px"},message:"\u9ED8\u8BA4\u76D1\u542C\u56DE\u590D\u6240\u6709\u79C1\u804A\uFF0C\u4F7F\u7528unlisten\u53E3\u4EE4\u5C4F\u853D\u79C1\u804A\uFF0Clisten\u53E3\u4EE4\u6062\u590D\u79C1\u804A\u3002\u7528\u6237\u88AB\u5C4F\u853D\u540E\u5C06\u4E0D\u518D\u63A5\u6536\u6709\u5173\u7528\u6237\u7684\u4EFB\u4F55\u6D88\u606F\u3002",type:"info",closeText:"\u5173\u95ED"}),(0,s.jsx)(j.Z,{rowKey:"id",maxLength:1005,scroll:{x:960},recordCreatorProps:P!=="hidden"?{position:P,record:function(){return{id:""+(Math.random()*1e6).toFixed(0)}}}:!1,loading:!1,toolBarRender:function(){return[(0,s.jsx)(S.Z.Group,{fieldProps:{value:P,onChange:function(_){z(_.target.value)}},options:[{label:"\u6DFB\u52A0\u5230\u9876\u90E8",value:"top"},{label:"\u6DFB\u52A0\u5230\u5E95\u90E8",value:"bottom"},{label:"\u9690\u85CF",value:"hidden"}]},"render")]},columns:H,value:d,onChange:v,editable:{type:"multiple",editableKeys:G,onSave:function(){var n=U()(O()().mark(function _(a,t){var r;return O()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:r={},a!=t.id&&(r[E+"."+a]=""),r[E+"."+t.id]=JSON.stringify(t),(0,M.Z)({values:r}),v(d.map(function(T){return T.id==a?t:T}));case 5:case"end":return l.stop()}},_)}));function u(_,a){return n.apply(this,arguments)}return u}(),onChange:$}})]})}}}]); diff --git a/core/admin/p__Plugin__Publish__index.3b4ea689.async.js b/core/admin/p__Plugin__Publish__index.3b4ea689.async.js deleted file mode 100644 index 98a8725..0000000 --- a/core/admin/p__Plugin__Publish__index.3b4ea689.async.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[737],{34316:function(I,r,_){var d=_(86195),t=_(21362),m=function(){t.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var s=new URL(window.location.href).searchParams,o=s.get("redirect");window.location.pathname!=="/user/login"&&!o&&d.history.replace({pathname:"/user/login"})};r.Z=m},55324:function(I,r,_){_.r(r);var d=_(25359),t=_.n(d),m=_(49811),O=_.n(m),s=_(54306),o=_.n(s),C=_(34316),U=_(87474),g=_(77121),D=_(12472),E=_(78434),M=_.n(E),P=_(86195),n=_(21137),R=_(21362),i=_(68243),c=_(28964),l=_(31255),p=_(26572),T=_(50959),e=_(11527),j=n.Z.Option,K="\u6211\u7684\u63D2\u4EF6\u7F51\u7AD9.com",W="\u52A0\u5BC6\u8BA2\u9605\u94FE\u63A5",b="http://",Z=K,$=function(y){var a=document.createElement("textarea");a.value=y,a.setAttribute("readOnly","true"),document.body.appendChild(a),a.select(),document.execCommand("Copy"),a.className="oInput",a.style.display="none",a.style.opacity="0"},N=function(){var y=(0,T.useState)(W),a=o()(y,2),L=a[0],x=a[1],A=(0,P.useRequest)(function(){return(0,P.request)("/api/storage",{params:{keys:["sillyGirl.plugin_sublink"].join(",")}})}),z=A.data,F=A.error,H=A.loading,G=function(){var f=O()(t()().mark(function u(){var h,B;return t()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,(0,U.Z)({"sillyGirl.plugin_sublink":b+Z},"","","");case 2:h=v.sent,B=h==null?void 0:h.messages["sillyGirl.plugin_sublink"],B&&(x(B),R.ZP.info("\u5DF2\u751F\u6210\u8BA2\u9605\u94FE\u63A5\u3002"));case 5:case"end":return v.stop()}},u)}));return function(){return f.apply(this,arguments)}}();if(H)return(0,e.jsx)(E.Loading,{});if(F)return(0,C.Z)(),null;if(L==W){var S=z["sillyGirl.plugin_sublink"];S&&x(S)}return(0,e.jsxs)(D._z,{children:[(0,e.jsx)(i.Z,{children:(0,e.jsx)(c.Z,{onChange:function(u){Z=u.target.value,G()},addonBefore:(0,e.jsxs)(n.Z,{onSelect:function(u){b=u,G()},defaultValue:b,className:"select-before",children:[(0,e.jsx)(j,{value:"http://",children:"http://"}),(0,e.jsx)(j,{value:"https://",children:"https://"})]}),defaultValue:K})}),(0,e.jsx)("br",{})," ",(0,e.jsx)("br",{}),(0,e.jsxs)(c.Z.Group,{compact:!0,children:[(0,e.jsx)(c.Z,{style:{width:"calc(300px)"},disabled:!0,value:L}),(0,e.jsx)(l.Z,{children:(0,e.jsx)(p.ZP,{onClick:function(){$(L),R.ZP.info("\u590D\u5236\u6210\u529F\u3002",1)},icon:(0,e.jsx)(g.Z,{})})})]})]})};r.default=N},87474:function(I,r,_){var d=_(25359),t=_.n(d),m=_(49811),O=_.n(m),s=_(21362),o=_(86195),C=function(){var U=O()(t()().mark(function g(D){var E,M,P,n=arguments;return t()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return E=n.length>1&&n[1]!==void 0?n[1]:"\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..",M=n.length>2&&n[2]!==void 0?n[2]:"\u63D0\u4EA4\u6210\u529F\uFF01",P=n.length>3&&n[3]!==void 0?n[3]:"\u63D0\u4EA4\u5931\u8D25",E&&s.ZP.loading("\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..",2e4),i.abrupt("return",new Promise(function(c){(0,o.request)("/api/storage",{method:"put",data:D}).then(function(l){var p;if(s.ZP.destroy(),(l==null||(p=l.data)===null||p===void 0?void 0:p.isLogin)==!1){s.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var T=new URL(window.location.href).searchParams,e=T.get("redirect");window.location.pathname!=="/user/login"&&!e&&o.history.replace({pathname:"/user/login"});return}l!=null&&l.success?M&&s.ZP.success(M,1):P&&s.ZP.warning("\u63D0\u4EA4\u5931\u8D25\uFF01",2),c(l)})}));case 5:case"end":return i.stop()}},g)}));return function(D){return U.apply(this,arguments)}}();r.Z=C}}]); diff --git a/core/admin/p__Plugin__Publish__index.a50d97f4.async.js b/core/admin/p__Plugin__Publish__index.a50d97f4.async.js new file mode 100644 index 0000000..c8f8ea0 --- /dev/null +++ b/core/admin/p__Plugin__Publish__index.a50d97f4.async.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[737],{34316:function(W,o,_){var v=_(86195),r=_(21362),c=function(){r.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var s=new URL(window.location.href).searchParams,i=s.get("redirect");window.location.pathname!=="/user/login"&&!i&&v.history.replace({pathname:"/user/login"})};o.Z=c},55324:function(W,o,_){_.r(o);var v=_(25359),r=_.n(v),c=_(49811),f=_.n(c),s=_(54306),i=_.n(s),L=_(34316),A=_(87474),C=_(77121),l=_(12472),p=_(78434),h=_.n(p),u=_(86195),d=_(21137),m=_(21362),O=_(68243),t=_(28964),D=_(31255),U=_(26572),Z=_(50959),e=_(11527),R=d.Z.Option,n="\u6211\u7684\u63D2\u4EF6\u7F51\u7AD9.com",E="\u52A0\u5BC6\u8BA2\u9605\u94FE\u63A5",M="http://",T=n,S=function(B){var a=document.createElement("textarea");a.value=B,a.setAttribute("readOnly","true"),document.body.appendChild(a),a.select(),document.execCommand("Copy"),a.className="oInput",a.style.display="none",a.style.opacity="0"},N=function(){var B=(0,Z.useState)(E),a=i()(B,2),I=a[0],x=a[1],j=(0,u.useRequest)(function(){return(0,u.request)("/api/storage",{params:{keys:["sillyGirl.plugin_sublink"].join(",")}})}),z=j.data,F=j.error,H=j.loading,G=function(){var b=f()(r()().mark(function P(){var y,K;return r()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,(0,A.Z)({values:{"sillyGirl.plugin_sublink":M+T}});case 2:y=g.sent,K=y==null?void 0:y.messages["sillyGirl.plugin_sublink"],K&&(x(K),m.ZP.info("\u5DF2\u751F\u6210\u8BA2\u9605\u94FE\u63A5\u3002"));case 5:case"end":return g.stop()}},P)}));return function(){return b.apply(this,arguments)}}();if(H)return(0,e.jsx)(p.Loading,{});if(F)return(0,L.Z)(),null;if(I==E){var $=z["sillyGirl.plugin_sublink"];$&&x($)}return(0,e.jsxs)(l._z,{children:[(0,e.jsx)(O.Z,{children:(0,e.jsx)(t.Z,{onChange:function(P){T=P.target.value,G()},addonBefore:(0,e.jsxs)(d.Z,{onSelect:function(P){M=P,G()},defaultValue:M,className:"select-before",children:[(0,e.jsx)(R,{value:"http://",children:"http://"}),(0,e.jsx)(R,{value:"https://",children:"https://"})]}),defaultValue:n})}),(0,e.jsx)("br",{})," ",(0,e.jsx)("br",{}),(0,e.jsxs)(t.Z.Group,{compact:!0,children:[(0,e.jsx)(t.Z,{style:{width:"calc(300px)"},disabled:!0,value:I}),(0,e.jsx)(D.Z,{children:(0,e.jsx)(U.ZP,{onClick:function(){S(I),m.ZP.info("\u590D\u5236\u6210\u529F\u3002",1)},icon:(0,e.jsx)(C.Z,{})})})]})]})};o.default=N},87474:function(W,o,_){var v=_(25359),r=_.n(v),c=_(49811),f=_.n(c),s=_(21362),i=_(86195),L=function(){var A=f()(r()().mark(function C(l){var p,h,u,d,m,O,t,D,U;return r()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return p=l.values,h=l.loading,u=h===void 0?"\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..":h,d=l.success,m=d===void 0?"\u63D0\u4EA4\u6210\u529F\uFF01":d,O=l.fail,t=O===void 0?"\u63D0\u4EA4\u5931\u8D25":O,D=l.params,U=D===void 0?{}:D,u&&s.ZP.loading(u,2e4),e.abrupt("return",new Promise(function(R){(0,i.request)("/api/storage",{params:U,method:"put",data:p}).then(function(n){var E;if(s.ZP.destroy(),(n==null||(E=n.data)===null||E===void 0?void 0:E.isLogin)==!1){s.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var M=new URL(window.location.href).searchParams,T=M.get("redirect");window.location.pathname!=="/user/login"&&!T&&i.history.replace({pathname:"/user/login"});return}n!=null&&n.success?m&&s.ZP.success(m,1):t&&s.ZP.warning(t,2),R(n)})}));case 3:case"end":return e.stop()}},C)}));return function(l){return A.apply(this,arguments)}}();o.Z=L}}]); diff --git a/core/admin/p__Plugin__Share__index.02ff4e75.async.js b/core/admin/p__Plugin__Share__index.02ff4e75.async.js deleted file mode 100644 index 8b63df6..0000000 --- a/core/admin/p__Plugin__Share__index.02ff4e75.async.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[96],{83187:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){var _Users_a1_6_Code_sillyPage_node_modules_pnpm_babel_runtime_7_21_0_node_modules_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(54689),_Users_a1_6_Code_sillyPage_node_modules_pnpm_babel_runtime_7_21_0_node_modules_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_Users_a1_6_Code_sillyPage_node_modules_pnpm_babel_runtime_7_21_0_node_modules_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0__),_ant_design_pro_components__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(81308),_ant_design_pro_components__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(48989),antd__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(79112),lodash__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(32699),lodash__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(50959),_submit__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(87474),_umijs_max__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(86195),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(11527);__webpack_exports__.Z=function(props){for(var _props$data$script,content=(_props$data$script=props.data.script)!==null&&_props$data$script!==void 0?_props$data$script:props.editorRef.current?props.editorRef.current.getValue().replace(/\r\n/g,` -`):"",formRef=(0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(),result=[],keys=[],_i=0,_arr=[/@form\s+({[^*]+?}\n)/g,/Form\(([\s\S]+?)\)/g];_i<_arr.length;_i++){var pattern=_arr[_i],matches=content.matchAll(pattern),_iterator=_Users_a1_6_Code_sillyPage_node_modules_pnpm_babel_runtime_7_21_0_node_modules_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0___default()(matches),_step;try{var _loop=function _loop(){var match=_step.value;try{var _a=function(u){for(var a in u)u[a].dataIndex&&(u[a].key=u[a].dataIndex),u[a].key&&keys.push(u[a].key),u[a].required&&!u[a].formItemProps&&(u[a].formItemProps={rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}),u[a].columns&&(u[a].columns=_a(u[a].columns));return u},formObject=eval("(".concat(match[1],")"));(0,lodash__WEBPACK_IMPORTED_MODULE_1__.isArray)(formObject)||(formObject=[formObject]),result=result.concat(formObject),keys=[],result=_a(result)}catch(v){console.log("form\u8868\u5355\u89E3\u6790\u9519\u8BEF",v)}};for(_iterator.s();!(_step=_iterator.n()).done;)_loop()}catch(v){_iterator.e(v)}finally{_iterator.f()}}var dbkey="plugin_debug."+props.data.id;return result.push({key:dbkey,title:"\u8C03\u8BD5\u5F00\u5173",valueType:"switch"}),keys.push(dbkey),(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function(){(0,_umijs_max__WEBPACK_IMPORTED_MODULE_4__.request)("/api/storage",{params:{keys:keys.join(",")}}).then(function(v){if(v&&v.data){var u;for(var a in v.data)v.data[a]=="false"&&(v.data[a]=!1),v.data[a]==""&&delete v.data[a];(u=formRef.current)===null||u===void 0||u.setFieldsValue(v.data)}})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(antd__WEBPACK_IMPORTED_MODULE_6__.Z,{title:"\u53C2\u6570\u914D\u7F6E",open:props.open,onCancel:props.onCancel,onOk:function v(){var u,a=formRef==null||(u=formRef.current)===null||u===void 0?void 0:u.getFieldsValue();(0,_submit__WEBPACK_IMPORTED_MODULE_3__.Z)(a).then(function(B){(B==null?void 0:B.changes[dbkey])==!0&&props.setDebug&&props.setDebug(a[dbkey])}).finally(function(){props.onCancel()})},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_ant_design_pro_components__WEBPACK_IMPORTED_MODULE_7__.A,{formRef,submitter:!1,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_ant_design_pro_components__WEBPACK_IMPORTED_MODULE_8__.Z,{layoutType:"Embed",columns:result})})})}},53385:function(v,u,a){a.r(u),a.d(u,{default:function(){return gt}});var B=a(25359),R=a.n(B),_e=a(49811),q=a.n(_e),Z=a(54306),p=a.n(Z),me=a(83187),fe=a(79112),l=a(50959),V=a(70458),ee=a(21946),X=a(84875),W=a.n(X),O=a(7489),Le=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,r=Object.getOwnPropertySymbols(e);d{var{prefixCls:t,className:o,color:r="blue",dot:d,pending:K=!1,position:F,label:y,children:P}=e,j=Le(e,["prefixCls","className","color","dot","pending","position","label","children"]);const{getPrefixCls:z}=l.useContext(V.E_),h=z("timeline",t),M=W()({[`${h}-item`]:!0,[`${h}-item-pending`]:K},o),x=/blue|red|green|gray/.test(r||"")?void 0:r,D=W()({[`${h}-item-head`]:!0,[`${h}-item-head-custom`]:!!d,[`${h}-item-head-${r}`]:!x});return l.createElement("li",Object.assign({},j,{className:M}),y&&l.createElement("div",{className:`${h}-item-label`},y),l.createElement("div",{className:`${h}-item-tail`}),l.createElement("div",{className:D,style:{borderColor:x,color:x}},d),l.createElement("div",{className:`${h}-item-content`},P))},E=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,r=Object.getOwnPropertySymbols(e);d{var{prefixCls:t,className:o,pending:r=!1,children:d,items:K,rootClassName:F,reverse:y=!1,direction:P,hashId:j,pendingDot:z,mode:h=""}=e,M=E(e,["prefixCls","className","pending","children","items","rootClassName","reverse","direction","hashId","pendingDot","mode"]);const x=(_,L)=>h==="alternate"?_==="right"?`${t}-item-right`:_==="left"?`${t}-item-left`:L%2===0?`${t}-item-left`:`${t}-item-right`:h==="left"?`${t}-item-left`:h==="right"?`${t}-item-right`:_==="right"?`${t}-item-right`:"",D=(0,ee.Z)(K||[]),ie=typeof r=="boolean"?null:r;r&&D.push({pending:!!r,dot:z||l.createElement(O.Z,null),children:ie}),y&&D.reverse();const N=D.length,se=`${t}-item-last`,be=D.filter(_=>!!_).map((_,L)=>{var w;const T=L===N-2?se:"",le=L===N-1?se:"",{className:Se}=_,oe=E(_,["className"]);return l.createElement(te,Object.assign({},oe,{className:W()([Se,!y&&r?T:le,x((w=_==null?void 0:_.position)!==null&&w!==void 0?w:"",L)]),key:(_==null?void 0:_.key)||L}))}),Y=D.some(_=>!!(_!=null&&_.label)),J=W()(t,{[`${t}-pending`]:!!r,[`${t}-reverse`]:!!y,[`${t}-${h}`]:!!h&&!Y,[`${t}-label`]:Y,[`${t}-rtl`]:P==="rtl"},o,F,j);return l.createElement("ul",Object.assign({},M,{className:J}),be)},pe=a(77515);function we(e,t){return e&&Array.isArray(e)?e:(0,pe.Z)(t).map(o=>{var r,d;return Object.assign({children:(d=(r=o==null?void 0:o.props)===null||r===void 0?void 0:r.children)!==null&&d!==void 0?d:""},o.props)})}var Ve=we,Xe=a(97624),Ge=a(74074),Ye=a(49272);const Je=e=>{const{componentCls:t}=e;return{[t]:Object.assign(Object.assign({},(0,Ye.Wf)(e)),{margin:0,padding:0,listStyle:"none",[`${t}-item`]:{position:"relative",margin:0,paddingBottom:e.timeLineItemPaddingBottom,fontSize:e.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:e.timeLineItemHeadSize,insetInlineStart:(e.timeLineItemHeadSize-e.timeLineItemTailWidth)/2,height:`calc(100% - ${e.timeLineItemHeadSize}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px ${e.lineType} ${e.colorSplit}`},"&-pending":{[`${t}-item-head`]:{fontSize:e.fontSizeSM,backgroundColor:"transparent"},[`${t}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:e.timeLineItemHeadSize,height:e.timeLineItemHeadSize,backgroundColor:e.colorBgContainer,border:`${e.timeLineHeadBorderWidth}px ${e.lineType} transparent`,borderRadius:"50%","&-blue":{color:e.colorPrimary,borderColor:e.colorPrimary},"&-red":{color:e.colorError,borderColor:e.colorError},"&-green":{color:e.colorSuccess,borderColor:e.colorSuccess},"&-gray":{color:e.colorTextDisabled,borderColor:e.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:e.timeLineItemHeadSize/2,insetInlineStart:e.timeLineItemHeadSize/2,width:"auto",height:"auto",marginBlockStart:0,paddingBlock:e.timeLineItemCustomHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:-(e.fontSize*e.lineHeight-e.fontSize)+e.lineWidth,marginInlineStart:e.margin+e.timeLineItemHeadSize,marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${t}-item-tail`]:{display:"none"},[`> ${t}-item-content`]:{minHeight:e.controlHeightLG*1.2}}},[`&${t}-alternate, - &${t}-right, - &${t}-label`]:{[`${t}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:`-${e.marginXXS}px`,"&-custom":{marginInlineStart:e.timeLineItemTailWidth/2}},"&-left":{[`${t}-item-content`]:{insetInlineStart:`calc(50% - ${e.marginXXS}px)`,width:`calc(50% - ${e.marginSM}px)`,textAlign:"start"}},"&-right":{[`${t}-item-content`]:{width:`calc(50% - ${e.marginSM}px)`,margin:0,textAlign:"end"}}}},[`&${t}-right`]:{[`${t}-item-right`]:{[`${t}-item-tail, - ${t}-item-head, - ${t}-item-head-custom`]:{insetInlineStart:`calc(100% - ${(e.timeLineItemHeadSize+e.timeLineItemTailWidth)/2}px)`},[`${t}-item-content`]:{width:`calc(100% - ${e.timeLineItemHeadSize+e.marginXS}px)`}}},[`&${t}-pending - ${t}-item-last - ${t}-item-tail`]:{display:"block",height:`calc(100% - ${e.margin}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px dotted ${e.colorSplit}`},[`&${t}-reverse - ${t}-item-last - ${t}-item-tail`]:{display:"none"},[`&${t}-reverse ${t}-item-pending`]:{[`${t}-item-tail`]:{insetBlockStart:e.margin,display:"block",height:`calc(100% - ${e.margin}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px dotted ${e.colorSplit}`},[`${t}-item-content`]:{minHeight:e.controlHeightLG*1.2}},[`&${t}-label`]:{[`${t}-item-label`]:{position:"absolute",insetBlockStart:-(e.fontSize*e.lineHeight-e.fontSize)+e.timeLineItemTailWidth,width:`calc(50% - ${e.marginSM}px)`,textAlign:"end"},[`${t}-item-right`]:{[`${t}-item-label`]:{insetInlineStart:`calc(50% + ${e.marginSM}px)`,width:`calc(50% - ${e.marginSM}px)`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${t}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}};var Qe=(0,Xe.Z)("Timeline",e=>{const t=(0,Ge.TS)(e,{timeLineItemPaddingBottom:e.padding*1.25,timeLineItemHeadSize:10,timeLineItemCustomHeadPaddingVertical:e.paddingXXS,timeLinePaddingInlineEnd:2,timeLineItemTailWidth:e.lineWidthBold,timeLineHeadBorderWidth:e.wireframe?e.lineWidthBold:e.lineWidth*3});return[Je(t)]}),ke=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,r=Object.getOwnPropertySymbols(e);d{const{getPrefixCls:t,direction:o}=l.useContext(V.E_),{prefixCls:r,children:d,items:K}=e,F=ke(e,["prefixCls","children","items"]),y=t("timeline",r),[P,j]=Qe(y),z=Ve(K,d);return P(l.createElement(ge,Object.assign({},F,{prefixCls:y,direction:o,items:z,hashId:j})))};Te.Item=te;var qe=Te,et=qe,i=a(11527),tt=function(e){var t;return(0,i.jsx)(fe.Z,{title:"\u5F02\u5E38\u6536\u96C6 - "+((t=e.data.title)!==null&&t!==void 0?t:""),open:e.id!="",onOk:e.onOk,onCancel:e.onCancel,okButtonProps:{danger:!0},okText:"\u6E05\u7A7A",children:(0,i.jsx)(et,{mode:"alternate",items:e.data.messages})})},ne=a(87474),re=a(45645),at={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"},nt=at,Ae=a(26087),rt=function(t,o){return l.createElement(Ae.Z,(0,re.Z)((0,re.Z)({},t),{},{ref:o,icon:nt}))},it=l.forwardRef(rt),st={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M304 280h56c4.4 0 8-3.6 8-8 0-28.3 5.9-53.2 17.1-73.5 10.6-19.4 26-34.8 45.4-45.4C450.9 142 475.7 136 504 136h16c28.3 0 53.2 5.9 73.5 17.1 19.4 10.6 34.8 26 45.4 45.4C650 218.9 656 243.7 656 272c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-40-8.8-76.7-25.9-108.1a184.31 184.31 0 00-74-74C596.7 72.8 560 64 520 64h-16c-40 0-76.7 8.8-108.1 25.9a184.31 184.31 0 00-74 74C304.8 195.3 296 232 296 272c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M940 512H792V412c76.8 0 139-62.2 139-139 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8a63 63 0 01-63 63H232a63 63 0 01-63-63c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 76.8 62.2 139 139 139v100H84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h148v96c0 6.5.2 13 .7 19.3C164.1 728.6 116 796.7 116 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-44.2 23.9-82.9 59.6-103.7a273 273 0 0022.7 49c24.3 41.5 59 76.2 100.5 100.5S460.5 960 512 960s99.8-13.9 141.3-38.2a281.38 281.38 0 00123.2-149.5A120 120 0 01836 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-79.3-48.1-147.4-116.7-176.7.4-6.4.7-12.8.7-19.3v-96h148c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM716 680c0 36.8-9.7 72-27.8 102.9-17.7 30.3-43 55.6-73.3 73.3C584 874.3 548.8 884 512 884s-72-9.7-102.9-27.8c-30.3-17.7-55.6-43-73.3-73.3A202.75 202.75 0 01308 680V412h408v268z"}}]},name:"bug",theme:"outlined"},lt=st,ot=function(t,o){return l.createElement(Ae.Z,(0,re.Z)((0,re.Z)({},t),{},{ref:o,icon:lt}))},dt=l.forwardRef(ot),ct=a(12472),ut=a(37270),_t=a(50714),he=a(86195),mt=a(44901),ft=a(21137),C=a(4050),I=a(68243),H=a(21362),ve="",gt=function(){var e=(0,l.useState)([]),t=p()(e,2),o=t[0],r=t[1],d=(0,he.useModel)("@@initialState"),K=d.refresh,F=(0,l.useState)({script:"",id:""}),y=p()(F,2),P=y[0],j=y[1],z=(0,l.useState)({id:"",messages:[]}),h=p()(z,2),M=h[0],x=h[1],D=(0,l.useState)([]),ie=p()(D,2),N=ie[0],se=ie[1],be=(0,l.useState)([]),Y=p()(be,2),J=Y[0],_=Y[1],L=(0,l.useState)("tab1"),w=p()(L,2),T=w[0],le=w[1],Se=(0,l.useState)("\u5168\u90E8"),oe=p()(Se,2),pt=oe[0],ht=oe[1],vt=(0,l.useState)(0),Be=p()(vt,2),ye=Be[0],Oe=Be[1],bt=(0,l.useState)(0),Re=p()(bt,2),Ee=Re[0],Ce=Re[1],St=(0,l.useState)(0),Ze=p()(St,2),Pe=Ze[0],Ie=Ze[1],yt=(0,l.useState)({}),We=p()(yt,2),Ot=We[0],Et=We[1],Ct=(0,l.useState)("\u5168\u90E8"),Ke=p()(Ct,2),ze=Ke[0],Pt=Ke[1],It=(0,l.useState)(!1),Ue=p()(It,2),He=Ue[0],xe=Ue[1],xt=(0,l.useState)(""),Fe=p()(xt,2),Dt=Fe[0],$t=Fe[1],Q=(0,l.useRef)(),de=function(c){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,i.jsx)(mt.Z,{count:c,overflowCount:1e4,style:{marginBlockStart:-2,marginInlineStart:4,color:n?"#1890FF":"#999",backgroundColor:n?"#E6F7FF":"#eee"}})};return(0,i.jsxs)(ct._z,{children:[M.id!=""&&(0,i.jsx)(tt,{data:M,onCancel:function(){x({id:"",messages:[]})},onOk:function(){var c={};c["plugin_messages."+M.id]="",(0,ne.Z)(c).finally(function(){x({id:"",messages:[]}),r(o.map(function(n){return n.id==M.id&&(n.messages=[]),n}))})}}),P.script!=""&&(0,i.jsx)(me.Z,{data:P,open:P.script,onCancel:function(){j({script:"",id:""})},setDebug:function(c){o.map(function(n){return n.id==P.id&&(n.debug=c),n})}}),"\u63D2\u4EF6\u6E90\uFF1A",(0,i.jsx)(ft.Z,{title:"\u63D2\u4EF6\u6E90",value:J,options:N,mode:"multiple",onChange:function(c){_(c.map(function($){return{label:$,value:$}})),xe(!0);var n=Q.current;n.reloadAndRest()}}),(0,i.jsx)(ut.Z,{multipleLine:!0,menu:{activeKey:pt,items:Object.entries(Ot).sort(function(f,c){return c[1]-f[1]}).map(function(f){return{key:f[0],label:(0,i.jsxs)("span",{children:[f[0],de(f[1],f[0]==ze)]})}}),onChange:function(c){ht(c),xe(!0),Pt(c);var n=Q.current;n.reloadAndRest()}}}),(0,i.jsx)(_t.Rs,{actionRef:Q,toolbar:{menu:{activeKey:T,items:[{key:"tab1",label:(0,i.jsxs)("span",{children:["\u5DF2\u5B89\u88C5",de(ye,T==="tab1")]})},{key:"tab2",label:(0,i.jsxs)("span",{children:["\u672A\u5B89\u88C5",de(Ee,T==="tab2")]})},{key:"tab3",label:(0,i.jsxs)("span",{children:["\u53EF\u5347\u7EA7",de(Pe,T==="tab3")]})}],onChange:function(c){le(c);var n=Q.current;n.reloadAndRest()}},search:{onSearch:function(c){$t(c);var n=Q.current;n.reloadAndRest()}}},search:{filterType:"light"},rowKey:"name",dataSource:o,request:q()(R()().mark(function f(){var c,n=arguments;return R()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return c=n.length>0&&n[0]!==void 0?n[0]:{},c.activeKey=T,c.origin=J.map(function(s){return s.value}),c.keyword=Dt,c.class=ze,c.mclass=He?"true":"false",ve!=""?c.init=ve:ve="false",m.abrupt("return",(0,he.request)("/api/plugins/list.json",{params:c}).then(function(s){if(He&&xe(!1),s!=null&&s.tab&&le(s.tab),Object.keys(J).length==0)if(N.length!=0)_(N);else{var S,b=Object.keys((S=s==null?void 0:s.origins)!==null&&S!==void 0?S:{}).map(function(De){return{label:De,value:De}});se(b),_(b)}Oe(s.tab1),Ce(s.tab2),Ie(s.tab3),Et(s.classes);var ce=new Date,g=new Date(ce);g.setDate(ce.getDate()-1);var k="\u4ECA\u5929 ",jt="\u6628\u5929 ",Mt=function($e){var je,Tt=(je=s.data[$e].messages)!==null&&je!==void 0?je:[],At=Tt.sort(function(A,U){return U.unix-A.unix}),Bt=At.map(function(A){var U=new Date(A.unix*1e3),Ne=U.toLocaleDateString(),Me=U.toLocaleTimeString("zh-CN",{hour12:!1}),ue;return Ne===ce.toLocaleDateString()?ue=k+Me:Ne===g.toLocaleDateString()?ue=jt+Me:ue=U.getFullYear()+"-"+(U.getMonth()+1).toString().padStart(2,"0")+"-"+U.getDate().toString().padStart(2,"0")+" "+Me,{color:A.class==="warn"?"yellow":"red",label:ue,children:(0,i.jsxs)(i.Fragment,{children:[A.version&&(0,i.jsx)(C.Z,{color:A.version==s.data[$e].version?"cyan":"",children:A.version}),A.content]})}});s.data[$e].messages=Bt};for(var Lt in s.data)Mt(Lt);return s}));case 8:case"end":return m.stop()}},f)})),onDataSourceChange:r,pagination:{defaultPageSize:10,pageSizeOptions:["10","20","50","100"]},showActions:"hover",metas:{avatar:{dataIndex:"icon",search:!1},title:{dataIndex:"title",search:!1},description:{dataIndex:"description",search:!1},subTitle:{render:function(c,n){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(I.Z,{size:0,children:(0,i.jsx)(C.Z,{color:n.identified?"gold":"grey",children:n.organization==""?"\u672A\u8BA4\u8BC1\u6765\u6E90":n.organization},n.organization)}),(0,i.jsx)(I.Z,{size:0,children:(0,i.jsxs)(C.Z,{color:"cyan",children:[n.downloads," \u4E0B\u8F7D"]},"downloads")}),n.module&&(0,i.jsx)(I.Z,{size:0,children:(0,i.jsx)(C.Z,{color:"purple",children:"\u6A21\u5757"},"module")}),n.web&&(0,i.jsx)(I.Z,{size:0,children:(0,i.jsx)(C.Z,{color:"brown",children:"\u7F51\u7EDC\u670D\u52A1"},"web")}),n.encrypt&&(0,i.jsx)(I.Z,{size:0,children:(0,i.jsx)(C.Z,{color:"orange",children:"\u52A0\u5BC6\u811A\u672C"},"encrypt")}),n.status==1&&(0,i.jsx)(I.Z,{size:0,children:(0,i.jsx)("a",{children:(0,i.jsx)(C.Z,{color:"pink",onClick:function(){var m={};m["plugins."+n.id]="install",(0,ne.Z)(m,"\u6B63\u5728\u5B89\u88C5...","","").then(function(s){var S=s==null?void 0:s.errors["plugins."+n.id];if(S){H.ZP.warning(S,2);return}else Ie(Pe-1),H.ZP.success("\u64CD\u4F5C\u6210\u529F\uFF01",1);r(o.map(function(b){return b.id==n.id&&(b.status=2),b}))})},children:"\u5347\u7EA7"},n.status)})}),n.has_form&&(0,i.jsx)(I.Z,{size:0,children:(0,i.jsx)("a",{children:(0,i.jsx)(C.Z,{color:"blue",onClick:function(){var m="plugins."+n.id;(0,he.request)("/api/storage",{params:{keys:[m].join(",")}}).then(function(s){s!=null&&s.data&&s.data[m]&&j({script:s.data[m],id:n.id})})},children:"\u914D\u7F6E"},n.status)})}),n.running&&(0,i.jsx)(I.Z,{size:0,children:(0,i.jsx)(C.Z,{icon:(0,i.jsx)(it,{spin:!0}),color:"processing",children:"\u8FD0\u884C\u4E2D"},"running")}),n.messages.length!=0&&(0,i.jsx)(I.Z,{size:0,children:(0,i.jsx)("a",{children:(0,i.jsxs)(C.Z,{color:"red",onClick:function(){x({id:n.id,messages:n.messages,title:n.title})},children:["\u5F02\u5E38 ",n.messages.length]},"messages")})}),T=="tab1"&&(0,i.jsx)("a",{onClick:function(){var m={};m["plugin_debug."+n.id]=!n.debug,(0,ne.Z)(m,"\u6B63\u5728\u5904\u7406\u8BF7\u6C42...","","").then(function(s){var S=s==null?void 0:s.errors["plugin_debug."+n.id];if(S){H.ZP.warning(S,2);return}else H.ZP.success("\u64CD\u4F5C\u6210\u529F\uFF01",1);r(o.map(function(b){return b.id==n.id&&(b.debug=!b.debug),b}))})},children:(0,i.jsx)(dt,{style:{opacity:n.debug?1:.2}})})]})},search:!1},actions:{render:function(c,n){return[(0,i.jsx)("a",{onClick:q()(R()().mark(function $(){var m,s,S,b;return R()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:m=0,s={},g.t0=n.status,g.next=g.t0===0?5:g.t0===6?8:g.t0===1||g.t0===2?9:12;break;case 5:return m=2,s["plugins."+n.id]="install",g.abrupt("break",12);case 8:return g.abrupt("return");case 9:return m=0,s["plugins."+n.id]="uninstall",g.abrupt("break",12);case 12:return g.next=14,(0,ne.Z)(s,"\u6B63\u5728\u5904\u7406\u8BF7\u6C42...","","");case 14:if(S=g.sent,b=S==null?void 0:S.errors["plugins."+n.id],!b){g.next=21;break}return H.ZP.warning(b,2),g.abrupt("return");case 21:m==0?(Oe(ye-1),Ce(Ee+1),n.status==1&&Ie(Pe-1)):(Oe(ye+1),Ce(Ee-1)),H.ZP.success("\u64CD\u4F5C\u6210\u529F\uFF01",1);case 23:r(o.map(function(k){return k.id==n.id&&(k.status=m),k})),K();case 25:case"end":return g.stop()}},$)})),target:"_blank",rel:"noopener noreferrer",children:n.status==0?"\u5B89\u88C5":n.status==6?"\u539F\u521B":"\u5378\u8F7D"},"link")]},search:!1}}})]})}},87474:function(v,u,a){var B=a(25359),R=a.n(B),_e=a(49811),q=a.n(_e),Z=a(21362),p=a(86195),me=function(){var fe=q()(R()().mark(function l(V){var ee,X,W,O=arguments;return R()().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return ee=O.length>1&&O[1]!==void 0?O[1]:"\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..",X=O.length>2&&O[2]!==void 0?O[2]:"\u63D0\u4EA4\u6210\u529F\uFF01",W=O.length>3&&O[3]!==void 0?O[3]:"\u63D0\u4EA4\u5931\u8D25",ee&&Z.ZP.loading("\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..",2e4),G.abrupt("return",new Promise(function(te){(0,p.request)("/api/storage",{method:"put",data:V}).then(function(E){var ae;if(Z.ZP.destroy(),(E==null||(ae=E.data)===null||ae===void 0?void 0:ae.isLogin)==!1){Z.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var ge=new URL(window.location.href).searchParams,pe=ge.get("redirect");window.location.pathname!=="/user/login"&&!pe&&p.history.replace({pathname:"/user/login"});return}E!=null&&E.success?X&&Z.ZP.success(X,1):W&&Z.ZP.warning("\u63D0\u4EA4\u5931\u8D25\uFF01",2),te(E)})}));case 5:case"end":return G.stop()}},l)}));return function(V){return fe.apply(this,arguments)}}();u.Z=me}}]); diff --git a/core/admin/p__Plugin__Share__index.69ddc986.async.js b/core/admin/p__Plugin__Share__index.69ddc986.async.js new file mode 100644 index 0000000..2cd3682 --- /dev/null +++ b/core/admin/p__Plugin__Share__index.69ddc986.async.js @@ -0,0 +1,10 @@ +"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[96],{83187:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){var _Users_a1_6_Code_sillyPage_node_modules_pnpm_babel_runtime_7_21_0_node_modules_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(54689),_Users_a1_6_Code_sillyPage_node_modules_pnpm_babel_runtime_7_21_0_node_modules_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_Users_a1_6_Code_sillyPage_node_modules_pnpm_babel_runtime_7_21_0_node_modules_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0__),_ant_design_pro_components__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(81308),_ant_design_pro_components__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(48989),antd__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(79112),lodash__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(32699),lodash__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(50959),_submit__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(87474),_umijs_max__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(86195),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(11527);__webpack_exports__.Z=function(props){for(var _props$data$script,content=(_props$data$script=props.data.script)!==null&&_props$data$script!==void 0?_props$data$script:props.editorRef.current?props.editorRef.current.getValue().replace(/\r\n/g,` +`):"",formRef=(0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(),result=[],keys=[],_i=0,_arr=[/@form\s+({[^*]+?}\n)/g,/Form\(([\s\S]+?)\)/g];_i<_arr.length;_i++){var pattern=_arr[_i],matches=content.matchAll(pattern),_iterator=_Users_a1_6_Code_sillyPage_node_modules_pnpm_babel_runtime_7_21_0_node_modules_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0___default()(matches),_step;try{var _loop=function _loop(){var match=_step.value;try{var _a=function(u){for(var a in u)u[a].dataIndex&&(u[a].key=u[a].dataIndex),u[a].key&&keys.push(u[a].key),u[a].required&&!u[a].formItemProps&&(u[a].formItemProps={rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}),u[a].columns&&(u[a].columns=_a(u[a].columns));return u},formObject=eval("(".concat(match[1],")"));(0,lodash__WEBPACK_IMPORTED_MODULE_1__.isArray)(formObject)||(formObject=[formObject]),result=result.concat(formObject),keys=[],result=_a(result)}catch(v){console.log("form\u8868\u5355\u89E3\u6790\u9519\u8BEF",v)}};for(_iterator.s();!(_step=_iterator.n()).done;)_loop()}catch(v){_iterator.e(v)}finally{_iterator.f()}}var dbkey="plugin_debug."+props.data.id;return result.push({key:dbkey,title:"\u8C03\u8BD5\u5F00\u5173",valueType:"switch"}),keys.push(dbkey),(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function(){(0,_umijs_max__WEBPACK_IMPORTED_MODULE_4__.request)("/api/storage",{params:{keys:keys.join(",")}}).then(function(v){if(v&&v.data){var u;for(var a in v.data)v.data[a]=="false"&&(v.data[a]=!1),v.data[a]==""&&delete v.data[a];(u=formRef.current)===null||u===void 0||u.setFieldsValue(v.data)}})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(antd__WEBPACK_IMPORTED_MODULE_6__.Z,{title:"\u53C2\u6570\u914D\u7F6E",open:props.open,onCancel:props.onCancel,onOk:function v(){var u,a=formRef==null||(u=formRef.current)===null||u===void 0?void 0:u.getFieldsValue();(0,_submit__WEBPACK_IMPORTED_MODULE_3__.Z)({values:a,params:{uuid:props.data.id}}).then(function(R){(R==null?void 0:R.changes[dbkey])==!0&&props.setDebug&&props.setDebug(a[dbkey])}).finally(function(){props.onCancel()})},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_ant_design_pro_components__WEBPACK_IMPORTED_MODULE_7__.A,{formRef,submitter:!1,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_ant_design_pro_components__WEBPACK_IMPORTED_MODULE_8__.Z,{layoutType:"Embed",columns:result})})})}},53385:function(v,u,a){a.r(u),a.d(u,{default:function(){return gt}});var R=a(25359),Z=a.n(R),ge=a(49811),ne=a.n(ge),W=a(54306),p=a.n(W),pe=a(83187),he=a(79112),l=a(50959),C=a(70458),re=a(21946),Y=a(84875),j=a.n(Y),J=a(7489),Q=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,r=Object.getOwnPropertySymbols(e);d{var{prefixCls:t,className:o,color:r="blue",dot:d,pending:K=!1,position:V,label:y,children:E}=e,M=Q(e,["prefixCls","className","color","dot","pending","position","label","children"]);const{getPrefixCls:z}=l.useContext(C.E_),h=z("timeline",t),L=j()({[`${h}-item`]:!0,[`${h}-item-pending`]:K},o),x=/blue|red|green|gray/.test(r||"")?void 0:r,$=j()({[`${h}-item-head`]:!0,[`${h}-item-head-custom`]:!!d,[`${h}-item-head-${r}`]:!x});return l.createElement("li",Object.assign({},M,{className:L}),y&&l.createElement("div",{className:`${h}-item-label`},y),l.createElement("div",{className:`${h}-item-tail`}),l.createElement("div",{className:$,style:{borderColor:x,color:x}},d),l.createElement("div",{className:`${h}-item-content`},E))},F=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,r=Object.getOwnPropertySymbols(e);d{var{prefixCls:t,className:o,pending:r=!1,children:d,items:K,rootClassName:V,reverse:y=!1,direction:E,hashId:M,pendingDot:z,mode:h=""}=e,L=F(e,["prefixCls","className","pending","children","items","rootClassName","reverse","direction","hashId","pendingDot","mode"]);const x=(_,T)=>h==="alternate"?_==="right"?`${t}-item-right`:_==="left"?`${t}-item-left`:T%2===0?`${t}-item-left`:`${t}-item-right`:h==="left"?`${t}-item-left`:h==="right"?`${t}-item-right`:_==="right"?`${t}-item-right`:"",$=(0,re.Z)(K||[]),oe=typeof r=="boolean"?null:r;r&&$.push({pending:!!r,dot:z||l.createElement(J.Z,null),children:oe}),y&&$.reverse();const X=$.length,de=`${t}-item-last`,Ce=$.filter(_=>!!_).map((_,T)=>{var G;const A=T===X-2?de:"",ce=T===X-1?de:"",{className:Pe}=_,ue=F(_,["className"]);return l.createElement(H,Object.assign({},ue,{className:j()([Pe,!y&&r?A:ce,x((G=_==null?void 0:_.position)!==null&&G!==void 0?G:"",T)]),key:(_==null?void 0:_.key)||T}))}),q=$.some(_=>!!(_!=null&&_.label)),ee=j()(t,{[`${t}-pending`]:!!r,[`${t}-reverse`]:!!y,[`${t}-${h}`]:!!h&&!q,[`${t}-label`]:q,[`${t}-rtl`]:E==="rtl"},o,V,M);return l.createElement("ul",Object.assign({},L,{className:ee}),Ce)},N=a(77515);function be(e,t){return e&&Array.isArray(e)?e:(0,N.Z)(t).map(o=>{var r,d;return Object.assign({children:(d=(r=o==null?void 0:o.props)===null||r===void 0?void 0:r.children)!==null&&d!==void 0?d:""},o.props)})}var P=be,k=a(97624),Se=a(74074),ye=a(49272);const Je=e=>{const{componentCls:t}=e;return{[t]:Object.assign(Object.assign({},(0,ye.Wf)(e)),{margin:0,padding:0,listStyle:"none",[`${t}-item`]:{position:"relative",margin:0,paddingBottom:e.timeLineItemPaddingBottom,fontSize:e.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:e.timeLineItemHeadSize,insetInlineStart:(e.timeLineItemHeadSize-e.timeLineItemTailWidth)/2,height:`calc(100% - ${e.timeLineItemHeadSize}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px ${e.lineType} ${e.colorSplit}`},"&-pending":{[`${t}-item-head`]:{fontSize:e.fontSizeSM,backgroundColor:"transparent"},[`${t}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:e.timeLineItemHeadSize,height:e.timeLineItemHeadSize,backgroundColor:e.colorBgContainer,border:`${e.timeLineHeadBorderWidth}px ${e.lineType} transparent`,borderRadius:"50%","&-blue":{color:e.colorPrimary,borderColor:e.colorPrimary},"&-red":{color:e.colorError,borderColor:e.colorError},"&-green":{color:e.colorSuccess,borderColor:e.colorSuccess},"&-gray":{color:e.colorTextDisabled,borderColor:e.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:e.timeLineItemHeadSize/2,insetInlineStart:e.timeLineItemHeadSize/2,width:"auto",height:"auto",marginBlockStart:0,paddingBlock:e.timeLineItemCustomHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:-(e.fontSize*e.lineHeight-e.fontSize)+e.lineWidth,marginInlineStart:e.margin+e.timeLineItemHeadSize,marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${t}-item-tail`]:{display:"none"},[`> ${t}-item-content`]:{minHeight:e.controlHeightLG*1.2}}},[`&${t}-alternate, + &${t}-right, + &${t}-label`]:{[`${t}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:`-${e.marginXXS}px`,"&-custom":{marginInlineStart:e.timeLineItemTailWidth/2}},"&-left":{[`${t}-item-content`]:{insetInlineStart:`calc(50% - ${e.marginXXS}px)`,width:`calc(50% - ${e.marginSM}px)`,textAlign:"start"}},"&-right":{[`${t}-item-content`]:{width:`calc(50% - ${e.marginSM}px)`,margin:0,textAlign:"end"}}}},[`&${t}-right`]:{[`${t}-item-right`]:{[`${t}-item-tail, + ${t}-item-head, + ${t}-item-head-custom`]:{insetInlineStart:`calc(100% - ${(e.timeLineItemHeadSize+e.timeLineItemTailWidth)/2}px)`},[`${t}-item-content`]:{width:`calc(100% - ${e.timeLineItemHeadSize+e.marginXS}px)`}}},[`&${t}-pending + ${t}-item-last + ${t}-item-tail`]:{display:"block",height:`calc(100% - ${e.margin}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px dotted ${e.colorSplit}`},[`&${t}-reverse + ${t}-item-last + ${t}-item-tail`]:{display:"none"},[`&${t}-reverse ${t}-item-pending`]:{[`${t}-item-tail`]:{insetBlockStart:e.margin,display:"block",height:`calc(100% - ${e.margin}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px dotted ${e.colorSplit}`},[`${t}-item-content`]:{minHeight:e.controlHeightLG*1.2}},[`&${t}-label`]:{[`${t}-item-label`]:{position:"absolute",insetBlockStart:-(e.fontSize*e.lineHeight-e.fontSize)+e.timeLineItemTailWidth,width:`calc(50% - ${e.marginSM}px)`,textAlign:"end"},[`${t}-item-right`]:{[`${t}-item-label`]:{insetInlineStart:`calc(50% + ${e.marginSM}px)`,width:`calc(50% - ${e.marginSM}px)`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${t}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}};var Qe=(0,k.Z)("Timeline",e=>{const t=(0,Se.TS)(e,{timeLineItemPaddingBottom:e.padding*1.25,timeLineItemHeadSize:10,timeLineItemCustomHeadPaddingVertical:e.paddingXXS,timeLinePaddingInlineEnd:2,timeLineItemTailWidth:e.lineWidthBold,timeLineHeadBorderWidth:e.wireframe?e.lineWidthBold:e.lineWidth*3});return[Je(t)]}),ke=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,r=Object.getOwnPropertySymbols(e);d{const{getPrefixCls:t,direction:o}=l.useContext(C.E_),{prefixCls:r,children:d,items:K}=e,V=ke(e,["prefixCls","children","items"]),y=t("timeline",r),[E,M]=Qe(y),z=P(K,d);return E(l.createElement(Ze,Object.assign({},V,{prefixCls:y,direction:o,items:z,hashId:M})))};We.Item=H;var qe=We,et=qe,i=a(11527),tt=function(e){var t;return(0,i.jsx)(he.Z,{title:"\u5F02\u5E38\u6536\u96C6 - "+((t=e.data.title)!==null&&t!==void 0?t:""),open:e.id!="",onOk:e.onOk,onCancel:e.onCancel,okButtonProps:{danger:!0},okText:"\u6E05\u7A7A",children:(0,i.jsx)(et,{mode:"alternate",items:e.data.messages})})},se=a(87474),le=a(45645),at={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"},nt=at,Ke=a(26087),rt=function(t,o){return l.createElement(Ke.Z,(0,le.Z)((0,le.Z)({},t),{},{ref:o,icon:nt}))},it=l.forwardRef(rt),st={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M304 280h56c4.4 0 8-3.6 8-8 0-28.3 5.9-53.2 17.1-73.5 10.6-19.4 26-34.8 45.4-45.4C450.9 142 475.7 136 504 136h16c28.3 0 53.2 5.9 73.5 17.1 19.4 10.6 34.8 26 45.4 45.4C650 218.9 656 243.7 656 272c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-40-8.8-76.7-25.9-108.1a184.31 184.31 0 00-74-74C596.7 72.8 560 64 520 64h-16c-40 0-76.7 8.8-108.1 25.9a184.31 184.31 0 00-74 74C304.8 195.3 296 232 296 272c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M940 512H792V412c76.8 0 139-62.2 139-139 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8a63 63 0 01-63 63H232a63 63 0 01-63-63c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 76.8 62.2 139 139 139v100H84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h148v96c0 6.5.2 13 .7 19.3C164.1 728.6 116 796.7 116 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-44.2 23.9-82.9 59.6-103.7a273 273 0 0022.7 49c24.3 41.5 59 76.2 100.5 100.5S460.5 960 512 960s99.8-13.9 141.3-38.2a281.38 281.38 0 00123.2-149.5A120 120 0 01836 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-79.3-48.1-147.4-116.7-176.7.4-6.4.7-12.8.7-19.3v-96h148c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM716 680c0 36.8-9.7 72-27.8 102.9-17.7 30.3-43 55.6-73.3 73.3C584 874.3 548.8 884 512 884s-72-9.7-102.9-27.8c-30.3-17.7-55.6-43-73.3-73.3A202.75 202.75 0 01308 680V412h408v268z"}}]},name:"bug",theme:"outlined"},lt=st,ot=function(t,o){return l.createElement(Ke.Z,(0,le.Z)((0,le.Z)({},t),{},{ref:o,icon:lt}))},dt=l.forwardRef(ot),ct=a(12472),ut=a(37270),_t=a(50714),Oe=a(86195),mt=a(44901),ft=a(21137),O=a(4050),I=a(68243),w=a(21362),Ee="",gt=function(){var e=(0,l.useState)([]),t=p()(e,2),o=t[0],r=t[1],d=(0,Oe.useModel)("@@initialState"),K=d.refresh,V=(0,l.useState)({script:"",id:""}),y=p()(V,2),E=y[0],M=y[1],z=(0,l.useState)({id:"",messages:[]}),h=p()(z,2),L=h[0],x=h[1],$=(0,l.useState)([]),oe=p()($,2),X=oe[0],de=oe[1],Ce=(0,l.useState)([]),q=p()(Ce,2),ee=q[0],_=q[1],T=(0,l.useState)("tab1"),G=p()(T,2),A=G[0],ce=G[1],Pe=(0,l.useState)("\u5168\u90E8"),ue=p()(Pe,2),pt=ue[0],ht=ue[1],vt=(0,l.useState)(0),ze=p()(vt,2),Ie=ze[0],xe=ze[1],bt=(0,l.useState)(0),Ue=p()(bt,2),$e=Ue[0],De=Ue[1],St=(0,l.useState)(0),He=p()(St,2),je=He[0],Me=He[1],yt=(0,l.useState)({}),Fe=p()(yt,2),Ot=Fe[0],Et=Fe[1],Ct=(0,l.useState)("\u5168\u90E8"),Ne=p()(Ct,2),we=Ne[0],Pt=Ne[1],It=(0,l.useState)(!1),Ve=p()(It,2),Xe=Ve[0],Le=Ve[1],xt=(0,l.useState)(""),Ge=p()(xt,2),$t=Ge[0],Dt=Ge[1],te=(0,l.useRef)(),_e=function(c){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,i.jsx)(mt.Z,{count:c,overflowCount:1e4,style:{marginBlockStart:-2,marginInlineStart:4,color:n?"#1890FF":"#999",backgroundColor:n?"#E6F7FF":"#eee"}})};return(0,i.jsxs)(ct._z,{children:[L.id!=""&&(0,i.jsx)(tt,{data:L,onCancel:function(){x({id:"",messages:[]})},onOk:function(){var c={};c["plugin_messages."+L.id]="",(0,se.Z)({values:c}).finally(function(){x({id:"",messages:[]}),r(o.map(function(n){return n.id==L.id&&(n.messages=[]),n}))})}}),E.script!=""&&(0,i.jsx)(pe.Z,{data:E,open:E.script,onCancel:function(){M({script:"",id:""})},setDebug:function(c){o.map(function(n){return n.id==E.id&&(n.debug=c),n})}}),"\u63D2\u4EF6\u6E90\uFF1A",(0,i.jsx)(ft.Z,{title:"\u63D2\u4EF6\u6E90",value:ee,options:X,mode:"multiple",onChange:function(c){_(c.map(function(D){return{label:D,value:D}})),Le(!0);var n=te.current;n.reloadAndRest()}}),(0,i.jsx)(ut.Z,{multipleLine:!0,menu:{activeKey:pt,items:Object.entries(Ot).sort(function(f,c){return c[1]-f[1]}).map(function(f){return{key:f[0],label:(0,i.jsxs)("span",{children:[f[0],_e(f[1],f[0]==we)]})}}),onChange:function(c){ht(c),Le(!0),Pt(c);var n=te.current;n.reloadAndRest()}}}),(0,i.jsx)(_t.Rs,{actionRef:te,toolbar:{menu:{activeKey:A,items:[{key:"tab1",label:(0,i.jsxs)("span",{children:["\u5DF2\u5B89\u88C5",_e(Ie,A==="tab1")]})},{key:"tab2",label:(0,i.jsxs)("span",{children:["\u672A\u5B89\u88C5",_e($e,A==="tab2")]})},{key:"tab3",label:(0,i.jsxs)("span",{children:["\u53EF\u5347\u7EA7",_e(je,A==="tab3")]})}],onChange:function(c){ce(c);var n=te.current;n.reloadAndRest()}},search:{onSearch:function(c){Dt(c);var n=te.current;n.reloadAndRest()}}},search:{filterType:"light"},rowKey:"name",dataSource:o,request:ne()(Z()().mark(function f(){var c,n=arguments;return Z()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return c=n.length>0&&n[0]!==void 0?n[0]:{},c.activeKey=A,c.origin=ee.map(function(s){return s.value}),c.keyword=$t,c.class=we,c.mclass=Xe?"true":"false",Ee!=""?c.init=Ee:Ee="false",m.abrupt("return",(0,Oe.request)("/api/plugins/list.json",{params:c}).then(function(s){if(Xe&&Le(!1),s!=null&&s.tab&&ce(s.tab),Object.keys(ee).length==0)if(X.length!=0)_(X);else{var S,b=Object.keys((S=s==null?void 0:s.origins)!==null&&S!==void 0?S:{}).map(function(Te){return{label:Te,value:Te}});de(b),_(b)}xe(s.tab1),De(s.tab2),Me(s.tab3),Et(s.classes);var me=new Date,g=new Date(me);g.setDate(me.getDate()-1);var ae="\u4ECA\u5929 ",jt="\u6628\u5929 ",Mt=function(Ae){var Be,Tt=(Be=s.data[Ae].messages)!==null&&Be!==void 0?Be:[],At=Tt.sort(function(B,U){return U.unix-B.unix}),Bt=At.map(function(B){var U=new Date(B.unix*1e3),Ye=U.toLocaleDateString(),Re=U.toLocaleTimeString("zh-CN",{hour12:!1}),fe;return Ye===me.toLocaleDateString()?fe=ae+Re:Ye===g.toLocaleDateString()?fe=jt+Re:fe=U.getFullYear()+"-"+(U.getMonth()+1).toString().padStart(2,"0")+"-"+U.getDate().toString().padStart(2,"0")+" "+Re,{color:B.class==="warn"?"yellow":"red",label:fe,children:(0,i.jsxs)(i.Fragment,{children:[B.version&&(0,i.jsx)(O.Z,{color:B.version==s.data[Ae].version?"cyan":"",children:B.version}),B.content]})}});s.data[Ae].messages=Bt};for(var Lt in s.data)Mt(Lt);return s}));case 8:case"end":return m.stop()}},f)})),onDataSourceChange:r,pagination:{defaultPageSize:10,pageSizeOptions:["10","20","50","100"]},showActions:"hover",metas:{avatar:{dataIndex:"icon",search:!1},title:{dataIndex:"title",search:!1},description:{dataIndex:"description",search:!1},subTitle:{render:function(c,n){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(I.Z,{size:0,children:(0,i.jsx)(O.Z,{color:n.identified?"gold":"grey",children:n.organization==""?"\u672A\u8BA4\u8BC1\u6765\u6E90":n.organization},n.organization)}),(0,i.jsx)(I.Z,{size:0,children:(0,i.jsxs)(O.Z,{color:"cyan",children:[n.downloads," \u4E0B\u8F7D"]},"downloads")}),n.module&&(0,i.jsx)(I.Z,{size:0,children:(0,i.jsx)(O.Z,{color:"purple",children:"\u6A21\u5757"},"module")}),n.web&&(0,i.jsx)(I.Z,{size:0,children:(0,i.jsx)(O.Z,{color:"brown",children:"\u7F51\u7EDC\u670D\u52A1"},"web")}),n.encrypt&&(0,i.jsx)(I.Z,{size:0,children:(0,i.jsx)(O.Z,{color:"orange",children:"\u52A0\u5BC6\u811A\u672C"},"encrypt")}),n.status==1&&(0,i.jsx)(I.Z,{size:0,children:(0,i.jsx)("a",{children:(0,i.jsx)(O.Z,{color:"pink",onClick:function(){var m={};m["plugins."+n.id]="install",(0,se.Z)({values:m}).then(function(s){var S=s==null?void 0:s.errors["plugins."+n.id];if(S){w.ZP.warning(S,2);return}else Me(je-1),w.ZP.success("\u64CD\u4F5C\u6210\u529F\uFF01",1);r(o.map(function(b){return b.id==n.id&&(b.status=2),b}))})},children:"\u5347\u7EA7"},n.status)})}),n.has_form&&(0,i.jsx)(I.Z,{size:0,children:(0,i.jsx)("a",{children:(0,i.jsx)(O.Z,{color:"blue",onClick:function(){var m="plugins."+n.id;(0,Oe.request)("/api/storage",{params:{keys:[m].join(",")}}).then(function(s){s!=null&&s.data&&s.data[m]&&M({script:s.data[m],id:n.id})})},children:"\u914D\u7F6E"},n.status)})}),n.running&&(0,i.jsx)(I.Z,{size:0,children:(0,i.jsx)(O.Z,{icon:(0,i.jsx)(it,{spin:!0}),color:"processing",children:"\u8FD0\u884C\u4E2D"},"running")}),n.messages.length!=0&&(0,i.jsx)(I.Z,{size:0,children:(0,i.jsx)("a",{children:(0,i.jsxs)(O.Z,{color:"red",onClick:function(){x({id:n.id,messages:n.messages,title:n.title})},children:["\u5F02\u5E38 ",n.messages.length]},"messages")})}),A=="tab1"&&(0,i.jsx)("a",{onClick:function(){var m={};m["plugin_debug."+n.id]=!n.debug,(0,se.Z)({values:m}).then(function(s){var S=s==null?void 0:s.errors["plugin_debug."+n.id];if(S){w.ZP.warning(S,2);return}else w.ZP.success("\u64CD\u4F5C\u6210\u529F\uFF01",1);r(o.map(function(b){return b.id==n.id&&(b.debug=!b.debug),b}))})},children:(0,i.jsx)(dt,{style:{opacity:n.debug?1:.2}})})]})},search:!1},actions:{render:function(c,n){return[(0,i.jsx)("a",{onClick:ne()(Z()().mark(function D(){var m,s,S,b;return Z()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:m=0,s={},g.t0=n.status,g.next=g.t0===0?5:g.t0===6?8:g.t0===1||g.t0===2?9:12;break;case 5:return m=2,s["plugins."+n.id]="install",g.abrupt("break",12);case 8:return g.abrupt("return");case 9:return m=0,s["plugins."+n.id]="uninstall",g.abrupt("break",12);case 12:return g.next=14,(0,se.Z)({values:s});case 14:if(S=g.sent,b=S==null?void 0:S.errors["plugins."+n.id],!b){g.next=21;break}return w.ZP.warning(b,2),g.abrupt("return");case 21:m==0?(xe(Ie-1),De($e+1),n.status==1&&Me(je-1)):(xe(Ie+1),De($e-1)),w.ZP.success("\u64CD\u4F5C\u6210\u529F\uFF01",1);case 23:r(o.map(function(ae){return ae.id==n.id&&(ae.status=m),ae})),K();case 25:case"end":return g.stop()}},D)})),target:"_blank",rel:"noopener noreferrer",children:n.status==0?"\u5B89\u88C5":n.status==6?"\u539F\u521B":"\u5378\u8F7D"},"link")]},search:!1}}})]})}},87474:function(v,u,a){var R=a(25359),Z=a.n(R),ge=a(49811),ne=a.n(ge),W=a(21362),p=a(86195),pe=function(){var he=ne()(Z()().mark(function l(C){var re,Y,j,J,Q,ie,H,F,ve;return Z()().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return re=C.values,Y=C.loading,j=Y===void 0?"\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..":Y,J=C.success,Q=J===void 0?"\u63D0\u4EA4\u6210\u529F\uFF01":J,ie=C.fail,H=ie===void 0?"\u63D0\u4EA4\u5931\u8D25":ie,F=C.params,ve=F===void 0?{}:F,j&&W.ZP.loading(j,2e4),N.abrupt("return",new Promise(function(be){(0,p.request)("/api/storage",{params:ve,method:"put",data:re}).then(function(P){var k;if(W.ZP.destroy(),(P==null||(k=P.data)===null||k===void 0?void 0:k.isLogin)==!1){W.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var Se=new URL(window.location.href).searchParams,ye=Se.get("redirect");window.location.pathname!=="/user/login"&&!ye&&p.history.replace({pathname:"/user/login"});return}P!=null&&P.success?Q&&W.ZP.success(Q,1):H&&W.ZP.warning(H,2),be(P)})}));case 3:case"end":return N.stop()}},l)}));return function(C){return he.apply(this,arguments)}}();u.Z=pe}}]); diff --git a/core/admin/p__Plugin__Subscribe__index.2e369a36.async.js b/core/admin/p__Plugin__Subscribe__index.2e369a36.async.js new file mode 100644 index 0000000..ebf06fc --- /dev/null +++ b/core/admin/p__Plugin__Subscribe__index.2e369a36.async.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[145],{34316:function(C,o,_){var u=_(86195),t=_(21362),d=function(){t.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var e=new URL(window.location.href).searchParams,n=e.get("redirect");window.location.pathname!=="/user/login"&&!n&&u.history.replace({pathname:"/user/login"})};o.Z=d},21503:function(C,o,_){_.r(o);var u=_(34316),t=_(87474),d=_(12472),m=_(78434),e=_.n(m),n=_(86195),D=_(28964),i=_(11527),c=D.Z.TextArea,a="sillyGirl.plugin_subcribe_addresses",f=function(){var s=(0,n.useRequest)(function(){return(0,n.request)("/api/storage",{params:{keys:[a].join(",")}})}),l=s.data,P=s.error,E=s.loading;return E?(0,i.jsx)(m.Loading,{}):P?((0,u.Z)(),null):(0,i.jsxs)(d._z,{children:[(0,i.jsx)(c,{rows:4,onChange:function(v){var g={};g[a]=v.target.value,(0,t.Z)({values:g})},defaultValue:l[a]?l[a]:"",placeholder:"sub://T4EywWN46ztYBhHNdOl6ToiHi7qXH2cnKFZUdP2NlO2dkxtUT8gl82IjCRFQ5Ts1KyGq1tY9M+BYBeHloaIPKoFaB6JJ4YcuHBM+Hj+UmC1k0jCmJ2fG6ZwAaIhwurm8"}),(0,i.jsx)("br",{})]})};o.default=f},87474:function(C,o,_){var u=_(25359),t=_.n(u),d=_(49811),m=_.n(d),e=_(21362),n=_(86195),D=function(){var i=m()(t()().mark(function c(a){var f,p,s,l,P,E,M,v,g;return t()().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return f=a.values,p=a.loading,s=p===void 0?"\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..":p,l=a.success,P=l===void 0?"\u63D0\u4EA4\u6210\u529F\uFF01":l,E=a.fail,M=E===void 0?"\u63D0\u4EA4\u5931\u8D25":E,v=a.params,g=v===void 0?{}:v,s&&e.ZP.loading(s,2e4),O.abrupt("return",new Promise(function(U){(0,n.request)("/api/storage",{params:g,method:"put",data:f}).then(function(r){var h;if(e.ZP.destroy(),(r==null||(h=r.data)===null||h===void 0?void 0:h.isLogin)==!1){e.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var T=new URL(window.location.href).searchParams,L=T.get("redirect");window.location.pathname!=="/user/login"&&!L&&n.history.replace({pathname:"/user/login"});return}r!=null&&r.success?P&&e.ZP.success(P,1):M&&e.ZP.warning(M,2),U(r)})}));case 3:case"end":return O.stop()}},c)}));return function(a){return i.apply(this,arguments)}}();o.Z=D}}]); diff --git a/core/admin/p__Plugin__Subscribe__index.694c5bee.async.js b/core/admin/p__Plugin__Subscribe__index.694c5bee.async.js deleted file mode 100644 index 656bca5..0000000 --- a/core/admin/p__Plugin__Subscribe__index.694c5bee.async.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[145],{34316:function(M,t,_){var m=_(86195),o=_(21362),P=function(){o.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var a=new URL(window.location.href).searchParams,r=a.get("redirect");window.location.pathname!=="/user/login"&&!r&&m.history.replace({pathname:"/user/login"})};t.Z=P},21503:function(M,t,_){_.r(t);var m=_(34316),o=_(87474),P=_(12472),E=_(78434),a=_.n(E),r=_(86195),v=_(28964),i=_(11527),g=v.Z.TextArea,s="sillyGirl.plugin_subcribe_addresses",f=function(){var u=(0,r.useRequest)(function(){return(0,r.request)("/api/storage",{params:{keys:[s].join(",")}})}),e=u.data,O=u.error,l=u.loading;return l?(0,i.jsx)(E.Loading,{}):O?((0,m.Z)(),null):(0,i.jsxs)(P._z,{children:[(0,i.jsx)(g,{rows:4,onChange:function(n){var d={};d[s]=n.target.value,(0,o.Z)(d)},defaultValue:e[s]?e[s]:"",placeholder:"sub://T4EywWN46ztYBhHNdOl6ToiHi7qXH2cnKFZUdP2NlO2dkxtUT8gl82IjCRFQ5Ts1KyGq1tY9M+BYBeHloaIPKoFaB6JJ4YcuHBM+Hj+UmC1k0jCmJ2fG6ZwAaIhwurm8"}),(0,i.jsx)("br",{})]})};t.default=f},87474:function(M,t,_){var m=_(25359),o=_.n(m),P=_(49811),E=_.n(P),a=_(21362),r=_(86195),v=function(){var i=E()(o()().mark(function g(s){var f,c,u,e=arguments;return o()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return f=e.length>1&&e[1]!==void 0?e[1]:"\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..",c=e.length>2&&e[2]!==void 0?e[2]:"\u63D0\u4EA4\u6210\u529F\uFF01",u=e.length>3&&e[3]!==void 0?e[3]:"\u63D0\u4EA4\u5931\u8D25",f&&a.ZP.loading("\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..",2e4),l.abrupt("return",new Promise(function(h){(0,r.request)("/api/storage",{method:"put",data:s}).then(function(n){var d;if(a.ZP.destroy(),(n==null||(d=n.data)===null||d===void 0?void 0:d.isLogin)==!1){a.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var D=new URL(window.location.href).searchParams,p=D.get("redirect");window.location.pathname!=="/user/login"&&!p&&r.history.replace({pathname:"/user/login"});return}n!=null&&n.success?c&&a.ZP.success(c,1):u&&a.ZP.warning("\u63D0\u4EA4\u5931\u8D25\uFF01",2),h(n)})}));case 5:case"end":return l.stop()}},g)}));return function(s){return i.apply(this,arguments)}}();t.Z=v}}]); diff --git a/core/admin/p__Script__index.2bc8fdd4.async.js b/core/admin/p__Script__index.2bc8fdd4.async.js deleted file mode 100644 index db3a274..0000000 --- a/core/admin/p__Script__index.2bc8fdd4.async.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict";var or=Object.defineProperty,ir=Object.defineProperties;var ur=Object.getOwnPropertyDescriptors;var Ve=Object.getOwnPropertySymbols;var cr=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable;var $e=(f,l,o)=>l in f?or(f,l,{enumerable:!0,configurable:!0,writable:!0,value:o}):f[l]=o,N=(f,l)=>{for(var o in l||(l={}))cr.call(l,o)&&$e(f,o,l[o]);if(Ve)for(var o of Ve(l))lr.call(l,o)&&$e(f,o,l[o]);return f},Fe=(f,l)=>ir(f,ur(l));(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[398],{25367:function(f,l,o){var R=o(68243),C=o(86981),L=o(11527),G=function(){return(0,L.jsxs)(R.Z,{size:"middle",children:[(0,L.jsx)(C.Z,{size:"small"}),(0,L.jsx)(C.Z,{}),(0,L.jsx)(C.Z,{size:"large"})]})};l.Z=G},34316:function(f,l,o){var R=o(86195),C=o(21362),L=function(){C.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var T=new URL(window.location.href).searchParams,$=T.get("redirect");window.location.pathname!=="/user/login"&&!$&&R.history.replace({pathname:"/user/login"})};l.Z=L},83187:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){var _Users_a1_6_Code_sillyPage_node_modules_pnpm_babel_runtime_7_21_0_node_modules_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(54689),_Users_a1_6_Code_sillyPage_node_modules_pnpm_babel_runtime_7_21_0_node_modules_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_Users_a1_6_Code_sillyPage_node_modules_pnpm_babel_runtime_7_21_0_node_modules_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0__),_ant_design_pro_components__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(81308),_ant_design_pro_components__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(48989),antd__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(79112),lodash__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(32699),lodash__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(50959),_submit__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(87474),_umijs_max__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(86195),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(11527);__webpack_exports__.Z=function(props){for(var _props$data$script,content=(_props$data$script=props.data.script)!==null&&_props$data$script!==void 0?_props$data$script:props.editorRef.current?props.editorRef.current.getValue().replace(/\r\n/g,` -`):"",formRef=(0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(),result=[],keys=[],_i=0,_arr=[/@form\s+({[^*]+?}\n)/g,/Form\(([\s\S]+?)\)/g];_i<_arr.length;_i++){var pattern=_arr[_i],matches=content.matchAll(pattern),_iterator=_Users_a1_6_Code_sillyPage_node_modules_pnpm_babel_runtime_7_21_0_node_modules_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0___default()(matches),_step;try{var _loop=function _loop(){var match=_step.value;try{var _a=function(l){for(var o in l)l[o].dataIndex&&(l[o].key=l[o].dataIndex),l[o].key&&keys.push(l[o].key),l[o].required&&!l[o].formItemProps&&(l[o].formItemProps={rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}),l[o].columns&&(l[o].columns=_a(l[o].columns));return l},formObject=eval("(".concat(match[1],")"));(0,lodash__WEBPACK_IMPORTED_MODULE_1__.isArray)(formObject)||(formObject=[formObject]),result=result.concat(formObject),keys=[],result=_a(result)}catch(f){console.log("form\u8868\u5355\u89E3\u6790\u9519\u8BEF",f)}};for(_iterator.s();!(_step=_iterator.n()).done;)_loop()}catch(f){_iterator.e(f)}finally{_iterator.f()}}var dbkey="plugin_debug."+props.data.id;return result.push({key:dbkey,title:"\u8C03\u8BD5\u5F00\u5173",valueType:"switch"}),keys.push(dbkey),(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function(){(0,_umijs_max__WEBPACK_IMPORTED_MODULE_4__.request)("/api/storage",{params:{keys:keys.join(",")}}).then(function(f){if(f&&f.data){var l;for(var o in f.data)f.data[o]=="false"&&(f.data[o]=!1),f.data[o]==""&&delete f.data[o];(l=formRef.current)===null||l===void 0||l.setFieldsValue(f.data)}})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(antd__WEBPACK_IMPORTED_MODULE_6__.Z,{title:"\u53C2\u6570\u914D\u7F6E",open:props.open,onCancel:props.onCancel,onOk:function f(){var l,o=formRef==null||(l=formRef.current)===null||l===void 0?void 0:l.getFieldsValue();(0,_submit__WEBPACK_IMPORTED_MODULE_3__.Z)(o).then(function(R){(R==null?void 0:R.changes[dbkey])==!0&&props.setDebug&&props.setDebug(o[dbkey])}).finally(function(){props.onCancel()})},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_ant_design_pro_components__WEBPACK_IMPORTED_MODULE_7__.A,{formRef,submitter:!1,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_ant_design_pro_components__WEBPACK_IMPORTED_MODULE_8__.Z,{layoutType:"Embed",columns:result})})})}},58160:function(f,l,o){o.r(l),o.d(l,{default:function(){return nr}});var R=o(25359),C=o.n(R),L=o(49811),G=o.n(L),T=o(54306),$=o.n(T),Ee=o(25367),Pe=o(34316),fe=o(87474);function pe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function q(e){for(var t=1;t=0)&&(r[a]=e[a]);return r}function I(e,t){if(e==null)return{};var r=ge(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ce(e,t){return Y(e)||Me(e,t)||U(e,t)||be()}function Y(e){if(Array.isArray(e))return e}function Me(e,t){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,i=void 0;try{for(var d=e[Symbol.iterator](),P;!(n=(P=d.next()).done)&&(r.push(P.value),!(t&&r.length===t));n=!0);}catch(h){a=!0,i=h}finally{try{!n&&d.return!=null&&d.return()}finally{if(a)throw i}}return r}}function U(e,t){if(e){if(typeof e=="string")return J(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return J(e,t)}}function J(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?e.apply(this,a):function(){for(var d=arguments.length,P=new Array(d),h=0;h1&&arguments[1]!==void 0?arguments[1]:{};me.initial(e),me.handler(t);var r={current:e},n=ie(nt)(r,t),a=ie(rt)(r),i=ie(me.changes)(e),d=ie(tt)(r);function P(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(S){return S};return me.selector(b),b(r.current)}function h(b){ze(n,a,i,d)(b)}return[P,h]}function tt(e,t){return ue(t)?t(e.current):t}function rt(e,t){return e.current=Le(Le({},e.current),t),t}function nt(e,t,r){return ue(t)?t(e.current):Object.keys(r).forEach(function(n){var a;return(a=t[n])===null||a===void 0?void 0:a.call(t,e.current[n])}),r}var at={create:et},ot=at,it={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs"}},ut=it;function lt(e){return function t(){for(var r=this,n=arguments.length,a=new Array(n),i=0;i=e.length?e.apply(this,a):function(){for(var d=arguments.length,P=new Array(d),h=0;h{n.current=!1}:e,t)}var y=Vt;function le(){}function Q(e,t,r,n){return $t(e,n)||Ft(e,t,r,n)}function $t(e,t){return e.editor.getModel(Be(e,t))}function Ft(e,t,r,n){return e.editor.createModel(t,r,n?Be(e,n):void 0)}function Be(e,t){return e.Uri.parse(t)}function zt({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:a,originalModelPath:i,modifiedModelPath:d,keepCurrentOriginalModel:P=!1,keepCurrentModifiedModel:h=!1,theme:b="light",loading:S="Loading...",options:D={},height:X="100%",width:F="100%",className:ee,wrapperProps:k={},beforeMount:te=le,onMount:z=le}){let[M,H]=(0,c.useState)(!1),[x,O]=(0,c.useState)(!0),E=(0,c.useRef)(null),m=(0,c.useRef)(null),w=(0,c.useRef)(null),p=(0,c.useRef)(z),s=(0,c.useRef)(te),A=(0,c.useRef)(!1);Re(()=>{let u=Ke.init();return u.then(g=>(m.current=g)&&O(!1)).catch(g=>(g==null?void 0:g.type)!=="cancelation"&&console.error("Monaco initialization: error:",g)),()=>E.current?re():u.cancel()}),y(()=>{let u=E.current.getModifiedEditor();u.getOption(m.current.editor.EditorOption.readOnly)?u.setValue(t||""):t!==u.getValue()&&(u.executeEdits("",[{range:u.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),u.pushUndoStop())},[t],M),y(()=>{var u,g;(g=(u=E.current)==null?void 0:u.getModel())==null||g.original.setValue(e||"")},[e],M),y(()=>{let{original:u,modified:g}=E.current.getModel();m.current.editor.setModelLanguage(u,n||r||"text"),m.current.editor.setModelLanguage(g,a||r||"text")},[r,n,a],M),y(()=>{var u;(u=m.current)==null||u.editor.setTheme(b)},[b],M),y(()=>{var u;(u=E.current)==null||u.updateOptions(D)},[D],M);let K=(0,c.useCallback)(()=>{var V;if(!m.current)return;s.current(m.current);let u=Q(m.current,e||"",n||r||"text",i||""),g=Q(m.current,t||"",a||r||"text",d||"");(V=E.current)==null||V.setModel({original:u,modified:g})},[r,t,a,e,n,i,d]),W=(0,c.useCallback)(()=>{var u;!A.current&&w.current&&(E.current=m.current.editor.createDiffEditor(w.current,N({automaticLayout:!0},D)),K(),(u=m.current)==null||u.editor.setTheme(b),H(!0),A.current=!0)},[D,b,K]);(0,c.useEffect)(()=>{M&&p.current(E.current,m.current)},[M]),(0,c.useEffect)(()=>{!x&&!M&&W()},[x,M,W]),y(()=>{if(E.current&&m.current){let u=E.current.getOriginalEditor(),g=Q(m.current,e||"",n||r||"text",i||"");g!==u.getModel()&&u.setModel(g)}},[i],M),y(()=>{if(E.current&&m.current){let u=E.current.getModifiedEditor(),g=Q(m.current,t||"",a||r||"text",d||"");g!==u.getModel()&&u.setModel(g)}},[d],M);function re(){var g,V,ne,_e;let u=(g=E.current)==null?void 0:g.getModel();P||((V=u==null?void 0:u.original)==null||V.dispose()),h||((ne=u==null?void 0:u.modified)==null||ne.dispose()),(_e=E.current)==null||_e.dispose()}return c.createElement(We,{width:F,height:X,isEditorReady:M,loading:S,_ref:w,className:ee,wrapperProps:k})}var Ht=zt,sr=(0,c.memo)(Ht);function _r(){let[e,t]=It(ct.__getMonacoInstance());return Re(()=>{let r;return e||(r=ct.init(),r.then(n=>{t(n)})),()=>r==null?void 0:r.cancel()}),e}var dr=null;function Nt(e){let t=(0,c.useRef)();return(0,c.useEffect)(()=>{t.current=e},[e]),t.current}var Gt=Nt,Oe=new Map;function qt({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:a,path:i,theme:d="light",line:P,loading:h="Loading...",options:b={},overrideServices:S={},saveViewState:D=!0,keepCurrentModel:X=!1,width:F="100%",height:ee="100%",className:k,wrapperProps:te={},beforeMount:z=le,onMount:M=le,onChange:H,onValidate:x=le}){let[O,E]=(0,c.useState)(!1),[m,w]=(0,c.useState)(!0),p=(0,c.useRef)(null),s=(0,c.useRef)(null),A=(0,c.useRef)(null),K=(0,c.useRef)(M),W=(0,c.useRef)(z),re=(0,c.useRef)(),u=(0,c.useRef)(n),g=Gt(i),V=(0,c.useRef)(!1),ne=(0,c.useRef)(!1);Re(()=>{let _=Ke.init();return _.then(v=>(p.current=v)&&w(!1)).catch(v=>(v==null?void 0:v.type)!=="cancelation"&&console.error("Monaco initialization: error:",v)),()=>s.current?ar():_.cancel()}),y(()=>{var v,j,de,ae;let _=Q(p.current,e||n||"",t||a||"",i||r||"");_!==((v=s.current)==null?void 0:v.getModel())&&(D&&Oe.set(g,(j=s.current)==null?void 0:j.saveViewState()),(de=s.current)==null||de.setModel(_),D&&((ae=s.current)==null||ae.restoreViewState(Oe.get(i))))},[i],O),y(()=>{var _;(_=s.current)==null||_.updateOptions(b)},[b],O),y(()=>{!s.current||n===void 0||(s.current.getOption(p.current.editor.EditorOption.readOnly)?s.current.setValue(n):n!==s.current.getValue()&&(ne.current=!0,s.current.executeEdits("",[{range:s.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),s.current.pushUndoStop(),ne.current=!1))},[n],O),y(()=>{var v,j;let _=(v=s.current)==null?void 0:v.getModel();_&&a&&((j=p.current)==null||j.editor.setModelLanguage(_,a))},[a],O),y(()=>{var _;P!==void 0&&((_=s.current)==null||_.revealLine(P))},[P],O),y(()=>{var _;(_=p.current)==null||_.editor.setTheme(d)},[d],O);let _e=(0,c.useCallback)(()=>{var _;if(!(!A.current||!p.current)&&!V.current){W.current(p.current);let v=i||r,j=Q(p.current,n||e||"",t||a||"",v||"");s.current=(_=p.current)==null?void 0:_.editor.create(A.current,N({model:j,automaticLayout:!0},b),S),D&&s.current.restoreViewState(Oe.get(v)),p.current.editor.setTheme(d),E(!0),V.current=!0}},[e,t,r,n,a,i,b,S,D,d]);(0,c.useEffect)(()=>{O&&K.current(s.current,p.current)},[O]),(0,c.useEffect)(()=>{!m&&!O&&_e()},[m,O,_e]),u.current=n,(0,c.useEffect)(()=>{var _,v;O&&H&&((_=re.current)==null||_.dispose(),re.current=(v=s.current)==null?void 0:v.onDidChangeModelContent(j=>{ne.current||H(s.current.getValue(),j)}))},[O,H]),(0,c.useEffect)(()=>{if(O){let _=p.current.editor.onDidChangeMarkers(v=>{var de;let j=(de=s.current.getModel())==null?void 0:de.uri;if(j&&v.find(ae=>ae.path===j.path)){let ae=p.current.editor.getModelMarkers({resource:j});x==null||x(ae)}});return()=>{_==null||_.dispose()}}return()=>{}},[O,x]);function ar(){var _,v;(_=re.current)==null||_.dispose(),X?D&&Oe.set(i,s.current.saveViewState()):(v=s.current.getModel())==null||v.dispose(),s.current.dispose()}return c.createElement(We,{width:F,height:ee,isEditorReady:O,loading:h,_ref:A,className:k,wrapperProps:te})}var Yt=qt,Jt=(0,c.memo)(Yt),Qt=Jt,Xt=o(12472),se=o(86195),Ze=o(26572),er=o(83187),Z=o(11527),ke="???xxxooxox",tr=`/** - * @title \u65E0\u540D\u811A\u672C - */`,rr=function(t){var r,n,a=(0,se.useModel)("@@initialState"),i=a.initialState,d=a.refresh,P=(0,c.useState)(!1),h=$()(P,2),b=h[0],S=h[1],D=(0,c.useState)(ke),X=$()(D,2),F=X[0],ee=X[1],k=(0,c.useRef)(null),te=i==null||(r=i.currentUser)===null||r===void 0?void 0:r.plugins[(i==null||(n=i.currentUser)===null||n===void 0?void 0:n.plugins.length)-1].path,z=te.indexOf(t.id)!=-1,M=(0,se.useRequest)(function(){return z?new Promise(function(w){var p={success:!0};p["plugins."+t.id]="",w(p)}):(0,se.request)("/api/storage",{params:{keys:["plugins."+t.id].join(",")}})}),H=M.data,x=M.error,O=M.loading;if(O)return(0,Z.jsx)(Ee.Z,{});if(x)return(0,Pe.Z)(),null;F==ke&&ee(z?tr:H["plugins."+t.id]);var E=function(){var w=G()(C()().mark(function p(){var s,A,K,W;return C()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return s=k.current?k.current.getValue().replace(/\r\n/g,` -`):F,A={},A["plugins."+t.id]=s,u.next=5,(0,fe.Z)(A);case 5:K=u.sent,W=K==null?void 0:K.messages["plugins."+t.id],W?W=="\u6807\u9898\u53D8\u66F4\u3002"?d():ee(W):z?d():s==""&&(se.history.push(te),d());case 8:case"end":return u.stop()}},p)}));return function(){return w.apply(this,arguments)}}(),m=function(p){p.key==="s"&&(p.ctrlKey||p.metaKey)&&(p.preventDefault(),E())};return(0,Z.jsxs)(Xt._z,{extra:[(0,Z.jsx)(Ze.ZP,{type:"primary",onClick:function(){S(!0)},children:"\u8868\u5355"},"2"),(0,Z.jsx)(Ze.ZP,{type:"primary",onClick:E,children:"\u4FDD\u5B58"},"1")],children:[(0,Z.jsx)("div",{onKeyDown:m,children:(0,Z.jsx)(Qt,{defaultLanguage:"javascript",value:F,height:"1000px",options:{fontSize:12,lineNumbersMinChars:3,folding:!1,glyphMargin:!1},onMount:function(p){k.current=p}})}),b&&(0,Z.jsx)(er.Z,{data:{id:t.id},open:b,onCancel:function(){S(!1)},editorRef:k})]})},nr=function(){var e=(0,se.useParams)();return(0,Z.jsx)(rr,{id:e.id},e.id)}},87474:function(f,l,o){var R=o(25359),C=o.n(R),L=o(49811),G=o.n(L),T=o(21362),$=o(86195),Ee=function(){var Pe=G()(C()().mark(function fe(pe){var oe,q,ge,I=arguments;return C()().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return oe=I.length>1&&I[1]!==void 0?I[1]:"\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..",q=I.length>2&&I[2]!==void 0?I[2]:"\u63D0\u4EA4\u6210\u529F\uFF01",ge=I.length>3&&I[3]!==void 0?I[3]:"\u63D0\u4EA4\u5931\u8D25",oe&&T.ZP.loading("\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..",2e4),Y.abrupt("return",new Promise(function(Me){(0,$.request)("/api/storage",{method:"put",data:pe}).then(function(U){var J;if(T.ZP.destroy(),(U==null||(J=U.data)===null||J===void 0?void 0:J.isLogin)==!1){T.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var be=new URL(window.location.href).searchParams,ye=be.get("redirect");window.location.pathname!=="/user/login"&&!ye&&$.history.replace({pathname:"/user/login"});return}U!=null&&U.success?q&&T.ZP.success(q,1):ge&&T.ZP.warning("\u63D0\u4EA4\u5931\u8D25\uFF01",2),Me(U)})}));case 5:case"end":return Y.stop()}},fe)}));return function(pe){return Pe.apply(this,arguments)}}();l.Z=Ee}}]); diff --git a/core/admin/p__Script__index.55ac683c.async.js b/core/admin/p__Script__index.55ac683c.async.js new file mode 100644 index 0000000..60aebc7 --- /dev/null +++ b/core/admin/p__Script__index.55ac683c.async.js @@ -0,0 +1,15 @@ +"use strict";var or=Object.defineProperty,ir=Object.defineProperties;var ur=Object.getOwnPropertyDescriptors;var Ve=Object.getOwnPropertySymbols;var cr=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable;var Fe=(f,l,o)=>l in f?or(f,l,{enumerable:!0,configurable:!0,writable:!0,value:o}):f[l]=o,G=(f,l)=>{for(var o in l||(l={}))cr.call(l,o)&&Fe(f,o,l[o]);if(Ve)for(var o of Ve(l))lr.call(l,o)&&Fe(f,o,l[o]);return f},ze=(f,l)=>ir(f,ur(l));(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[398],{25367:function(f,l,o){var R=o(68243),C=o(86981),I=o(11527),q=function(){return(0,I.jsxs)(R.Z,{size:"middle",children:[(0,I.jsx)(C.Z,{size:"small"}),(0,I.jsx)(C.Z,{}),(0,I.jsx)(C.Z,{size:"large"})]})};l.Z=q},34316:function(f,l,o){var R=o(86195),C=o(21362),I=function(){C.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var L=new URL(window.location.href).searchParams,V=L.get("redirect");window.location.pathname!=="/user/login"&&!V&&R.history.replace({pathname:"/user/login"})};l.Z=I},83187:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){var _Users_a1_6_Code_sillyPage_node_modules_pnpm_babel_runtime_7_21_0_node_modules_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(54689),_Users_a1_6_Code_sillyPage_node_modules_pnpm_babel_runtime_7_21_0_node_modules_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_Users_a1_6_Code_sillyPage_node_modules_pnpm_babel_runtime_7_21_0_node_modules_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0__),_ant_design_pro_components__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(81308),_ant_design_pro_components__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(48989),antd__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(79112),lodash__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(32699),lodash__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(50959),_submit__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(87474),_umijs_max__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(86195),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(11527);__webpack_exports__.Z=function(props){for(var _props$data$script,content=(_props$data$script=props.data.script)!==null&&_props$data$script!==void 0?_props$data$script:props.editorRef.current?props.editorRef.current.getValue().replace(/\r\n/g,` +`):"",formRef=(0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(),result=[],keys=[],_i=0,_arr=[/@form\s+({[^*]+?}\n)/g,/Form\(([\s\S]+?)\)/g];_i<_arr.length;_i++){var pattern=_arr[_i],matches=content.matchAll(pattern),_iterator=_Users_a1_6_Code_sillyPage_node_modules_pnpm_babel_runtime_7_21_0_node_modules_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0___default()(matches),_step;try{var _loop=function _loop(){var match=_step.value;try{var _a=function(l){for(var o in l)l[o].dataIndex&&(l[o].key=l[o].dataIndex),l[o].key&&keys.push(l[o].key),l[o].required&&!l[o].formItemProps&&(l[o].formItemProps={rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}),l[o].columns&&(l[o].columns=_a(l[o].columns));return l},formObject=eval("(".concat(match[1],")"));(0,lodash__WEBPACK_IMPORTED_MODULE_1__.isArray)(formObject)||(formObject=[formObject]),result=result.concat(formObject),keys=[],result=_a(result)}catch(f){console.log("form\u8868\u5355\u89E3\u6790\u9519\u8BEF",f)}};for(_iterator.s();!(_step=_iterator.n()).done;)_loop()}catch(f){_iterator.e(f)}finally{_iterator.f()}}var dbkey="plugin_debug."+props.data.id;return result.push({key:dbkey,title:"\u8C03\u8BD5\u5F00\u5173",valueType:"switch"}),keys.push(dbkey),(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function(){(0,_umijs_max__WEBPACK_IMPORTED_MODULE_4__.request)("/api/storage",{params:{keys:keys.join(",")}}).then(function(f){if(f&&f.data){var l;for(var o in f.data)f.data[o]=="false"&&(f.data[o]=!1),f.data[o]==""&&delete f.data[o];(l=formRef.current)===null||l===void 0||l.setFieldsValue(f.data)}})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(antd__WEBPACK_IMPORTED_MODULE_6__.Z,{title:"\u53C2\u6570\u914D\u7F6E",open:props.open,onCancel:props.onCancel,onOk:function f(){var l,o=formRef==null||(l=formRef.current)===null||l===void 0?void 0:l.getFieldsValue();(0,_submit__WEBPACK_IMPORTED_MODULE_3__.Z)({values:o,params:{uuid:props.data.id}}).then(function(R){(R==null?void 0:R.changes[dbkey])==!0&&props.setDebug&&props.setDebug(o[dbkey])}).finally(function(){props.onCancel()})},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_ant_design_pro_components__WEBPACK_IMPORTED_MODULE_7__.A,{formRef,submitter:!1,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_ant_design_pro_components__WEBPACK_IMPORTED_MODULE_8__.Z,{layoutType:"Embed",columns:result})})})}},58160:function(f,l,o){o.r(l),o.d(l,{default:function(){return nr}});var R=o(25359),C=o.n(R),I=o(49811),q=o.n(I),L=o(54306),V=o.n(L),je=o(25367),De=o(34316),Pe=o(87474);function W(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Y(e){for(var t=1;t=0)&&(r[a]=e[a]);return r}function ce(e,t){if(e==null)return{};var r=ue(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function le(e,t){return se(e)||_e(e,t)||de(e,t)||Te()}function se(e){if(Array.isArray(e))return e}function _e(e,t){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,i=void 0;try{for(var d=e[Symbol.iterator](),P;!(n=(P=d.next()).done)&&(r.push(P.value),!(t&&r.length===t));n=!0);}catch(h){a=!0,i=h}finally{try{!n&&d.return!=null&&d.return()}finally{if(a)throw i}}return r}}function de(e,t){if(e){if(typeof e=="string")return fe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fe(e,t)}}function fe(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?e.apply(this,a):function(){for(var d=arguments.length,P=new Array(d),h=0;h1&&arguments[1]!==void 0?arguments[1]:{};be.initial(e),be.handler(t);var r={current:e},n=F(nt)(r,t),a=F(rt)(r),i=F(be.changes)(e),d=F(tt)(r);function P(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(U){return U};return be.selector(b),b(r.current)}function h(b){pe(n,a,i,d)(b)}return[P,h]}function tt(e,t){return ve(t)?t(e.current):t}function rt(e,t){return e.current=T(T({},e.current),t),t}function nt(e,t,r){return ve(t)?t(e.current):Object.keys(r).forEach(function(n){var a;return(a=t[n])===null||a===void 0?void 0:a.call(t,e.current[n])}),r}var at={create:et},ot=at,it={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs"}},ut=it;function lt(e){return function t(){for(var r=this,n=arguments.length,a=new Array(n),i=0;i=e.length?e.apply(this,a):function(){for(var d=arguments.length,P=new Array(d),h=0;h{n.current=!1}:e,t)}var y=$t;function me(){}function X(e,t,r,n){return Vt(e,n)||Ft(e,t,r,n)}function Vt(e,t){return e.editor.getModel(Ze(e,t))}function Ft(e,t,r,n){return e.editor.createModel(t,r,n?Ze(e,n):void 0)}function Ze(e,t){return e.Uri.parse(t)}function zt({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:a,originalModelPath:i,modifiedModelPath:d,keepCurrentOriginalModel:P=!1,keepCurrentModifiedModel:h=!1,theme:b="light",loading:U="Loading...",options:D={},height:ee="100%",width:z="100%",className:te,wrapperProps:k={},beforeMount:re=me,onMount:H=me}){let[M,N]=(0,c.useState)(!1),[S,O]=(0,c.useState)(!0),E=(0,c.useRef)(null),m=(0,c.useRef)(null),w=(0,c.useRef)(null),p=(0,c.useRef)(H),s=(0,c.useRef)(re),A=(0,c.useRef)(!1);Le(()=>{let u=We.init();return u.then(v=>(m.current=v)&&O(!1)).catch(v=>(v==null?void 0:v.type)!=="cancelation"&&console.error("Monaco initialization: error:",v)),()=>E.current?ne():u.cancel()}),y(()=>{let u=E.current.getModifiedEditor();u.getOption(m.current.editor.EditorOption.readOnly)?u.setValue(t||""):t!==u.getValue()&&(u.executeEdits("",[{range:u.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),u.pushUndoStop())},[t],M),y(()=>{var u,v;(v=(u=E.current)==null?void 0:u.getModel())==null||v.original.setValue(e||"")},[e],M),y(()=>{let{original:u,modified:v}=E.current.getModel();m.current.editor.setModelLanguage(u,n||r||"text"),m.current.editor.setModelLanguage(v,a||r||"text")},[r,n,a],M),y(()=>{var u;(u=m.current)==null||u.editor.setTheme(b)},[b],M),y(()=>{var u;(u=E.current)==null||u.updateOptions(D)},[D],M);let x=(0,c.useCallback)(()=>{var $;if(!m.current)return;s.current(m.current);let u=X(m.current,e||"",n||r||"text",i||""),v=X(m.current,t||"",a||r||"text",d||"");($=E.current)==null||$.setModel({original:u,modified:v})},[r,t,a,e,n,i,d]),K=(0,c.useCallback)(()=>{var u;!A.current&&w.current&&(E.current=m.current.editor.createDiffEditor(w.current,G({automaticLayout:!0},D)),x(),(u=m.current)==null||u.editor.setTheme(b),N(!0),A.current=!0)},[D,b,x]);(0,c.useEffect)(()=>{M&&p.current(E.current,m.current)},[M]),(0,c.useEffect)(()=>{!S&&!M&&K()},[S,M,K]),y(()=>{if(E.current&&m.current){let u=E.current.getOriginalEditor(),v=X(m.current,e||"",n||r||"text",i||"");v!==u.getModel()&&u.setModel(v)}},[i],M),y(()=>{if(E.current&&m.current){let u=E.current.getModifiedEditor(),v=X(m.current,t||"",a||r||"text",d||"");v!==u.getModel()&&u.setModel(v)}},[d],M);function ne(){var v,$,ae,Oe;let u=(v=E.current)==null?void 0:v.getModel();P||(($=u==null?void 0:u.original)==null||$.dispose()),h||((ae=u==null?void 0:u.modified)==null||ae.dispose()),(Oe=E.current)==null||Oe.dispose()}return c.createElement(Be,{width:z,height:ee,isEditorReady:M,loading:U,_ref:w,className:te,wrapperProps:k})}var Ht=zt,sr=(0,c.memo)(Ht);function _r(){let[e,t]=It(ct.__getMonacoInstance());return Le(()=>{let r;return e||(r=ct.init(),r.then(n=>{t(n)})),()=>r==null?void 0:r.cancel()}),e}var dr=null;function Nt(e){let t=(0,c.useRef)();return(0,c.useEffect)(()=>{t.current=e},[e]),t.current}var Gt=Nt,we=new Map;function qt({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:a,path:i,theme:d="light",line:P,loading:h="Loading...",options:b={},overrideServices:U={},saveViewState:D=!0,keepCurrentModel:ee=!1,width:z="100%",height:te="100%",className:k,wrapperProps:re={},beforeMount:H=me,onMount:M=me,onChange:N,onValidate:S=me}){let[O,E]=(0,c.useState)(!1),[m,w]=(0,c.useState)(!0),p=(0,c.useRef)(null),s=(0,c.useRef)(null),A=(0,c.useRef)(null),x=(0,c.useRef)(M),K=(0,c.useRef)(H),ne=(0,c.useRef)(),u=(0,c.useRef)(n),v=Gt(i),$=(0,c.useRef)(!1),ae=(0,c.useRef)(!1);Le(()=>{let _=We.init();return _.then(g=>(p.current=g)&&w(!1)).catch(g=>(g==null?void 0:g.type)!=="cancelation"&&console.error("Monaco initialization: error:",g)),()=>s.current?ar():_.cancel()}),y(()=>{var g,j,Ee,oe;let _=X(p.current,e||n||"",t||a||"",i||r||"");_!==((g=s.current)==null?void 0:g.getModel())&&(D&&we.set(v,(j=s.current)==null?void 0:j.saveViewState()),(Ee=s.current)==null||Ee.setModel(_),D&&((oe=s.current)==null||oe.restoreViewState(we.get(i))))},[i],O),y(()=>{var _;(_=s.current)==null||_.updateOptions(b)},[b],O),y(()=>{!s.current||n===void 0||(s.current.getOption(p.current.editor.EditorOption.readOnly)?s.current.setValue(n):n!==s.current.getValue()&&(ae.current=!0,s.current.executeEdits("",[{range:s.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),s.current.pushUndoStop(),ae.current=!1))},[n],O),y(()=>{var g,j;let _=(g=s.current)==null?void 0:g.getModel();_&&a&&((j=p.current)==null||j.editor.setModelLanguage(_,a))},[a],O),y(()=>{var _;P!==void 0&&((_=s.current)==null||_.revealLine(P))},[P],O),y(()=>{var _;(_=p.current)==null||_.editor.setTheme(d)},[d],O);let Oe=(0,c.useCallback)(()=>{var _;if(!(!A.current||!p.current)&&!$.current){K.current(p.current);let g=i||r,j=X(p.current,n||e||"",t||a||"",g||"");s.current=(_=p.current)==null?void 0:_.editor.create(A.current,G({model:j,automaticLayout:!0},b),U),D&&s.current.restoreViewState(we.get(g)),p.current.editor.setTheme(d),E(!0),$.current=!0}},[e,t,r,n,a,i,b,U,D,d]);(0,c.useEffect)(()=>{O&&x.current(s.current,p.current)},[O]),(0,c.useEffect)(()=>{!m&&!O&&Oe()},[m,O,Oe]),u.current=n,(0,c.useEffect)(()=>{var _,g;O&&N&&((_=ne.current)==null||_.dispose(),ne.current=(g=s.current)==null?void 0:g.onDidChangeModelContent(j=>{ae.current||N(s.current.getValue(),j)}))},[O,N]),(0,c.useEffect)(()=>{if(O){let _=p.current.editor.onDidChangeMarkers(g=>{var Ee;let j=(Ee=s.current.getModel())==null?void 0:Ee.uri;if(j&&g.find(oe=>oe.path===j.path)){let oe=p.current.editor.getModelMarkers({resource:j});S==null||S(oe)}});return()=>{_==null||_.dispose()}}return()=>{}},[O,S]);function ar(){var _,g;(_=ne.current)==null||_.dispose(),ee?D&&we.set(i,s.current.saveViewState()):(g=s.current.getModel())==null||g.dispose(),s.current.dispose()}return c.createElement(Be,{width:z,height:te,isEditorReady:O,loading:h,_ref:A,className:k,wrapperProps:re})}var Yt=qt,Jt=(0,c.memo)(Yt),Qt=Jt,Xt=o(12472),he=o(86195),ke=o(26572),er=o(83187),Z=o(11527),$e="???xxxooxox",tr=`/** + * @title \u65E0\u540D\u811A\u672C + */`,rr=function(t){var r,n,a=(0,he.useModel)("@@initialState"),i=a.initialState,d=a.refresh,P=(0,c.useState)(!1),h=V()(P,2),b=h[0],U=h[1],D=(0,c.useState)($e),ee=V()(D,2),z=ee[0],te=ee[1],k=(0,c.useRef)(null),re=i==null||(r=i.currentUser)===null||r===void 0?void 0:r.plugins[(i==null||(n=i.currentUser)===null||n===void 0?void 0:n.plugins.length)-1].path,H=re.indexOf(t.id)!=-1,M=(0,he.useRequest)(function(){return H?new Promise(function(w){var p={success:!0};p["plugins."+t.id]="",w(p)}):(0,he.request)("/api/storage",{params:{keys:["plugins."+t.id].join(",")}})}),N=M.data,S=M.error,O=M.loading;if(O)return(0,Z.jsx)(je.Z,{});if(S)return(0,De.Z)(),null;z==$e&&te(H?tr:N["plugins."+t.id]);var E=function(){var w=q()(C()().mark(function p(){var s,A,x,K;return C()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return s=k.current?k.current.getValue().replace(/\r\n/g,` +`):z,A={},A["plugins."+t.id]=s,u.next=5,(0,Pe.Z)({values:A});case 5:x=u.sent,K=x==null?void 0:x.messages["plugins."+t.id],K?K=="\u6807\u9898\u53D8\u66F4\u3002"?d():te(K):H?d():s==""&&(he.history.push(re),d());case 8:case"end":return u.stop()}},p)}));return function(){return w.apply(this,arguments)}}(),m=function(p){p.key==="s"&&(p.ctrlKey||p.metaKey)&&(p.preventDefault(),E())};return(0,Z.jsxs)(Xt._z,{extra:[(0,Z.jsx)(ke.ZP,{type:"primary",onClick:function(){U(!0)},children:"\u8868\u5355"},"2"),(0,Z.jsx)(ke.ZP,{type:"primary",onClick:E,children:"\u4FDD\u5B58"},"1")],children:[(0,Z.jsx)("div",{onKeyDown:m,children:(0,Z.jsx)(Qt,{defaultLanguage:"javascript",value:z,height:"1000px",options:{fontSize:12,lineNumbersMinChars:3,folding:!1,glyphMargin:!1},onMount:function(p){k.current=p}})}),b&&(0,Z.jsx)(er.Z,{data:{id:t.id},open:b,onCancel:function(){U(!1)},editorRef:k})]})},nr=function(){var e=(0,he.useParams)();return(0,Z.jsx)(rr,{id:e.id},e.id)}},87474:function(f,l,o){var R=o(25359),C=o.n(R),I=o(49811),q=o.n(I),L=o(21362),V=o(86195),je=function(){var De=q()(C()().mark(function Pe(W){var ie,Y,ue,ce,le,se,_e,de,fe;return C()().wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return ie=W.values,Y=W.loading,ue=Y===void 0?"\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..":Y,ce=W.success,le=ce===void 0?"\u63D0\u4EA4\u6210\u529F\uFF01":ce,se=W.fail,_e=se===void 0?"\u63D0\u4EA4\u5931\u8D25":se,de=W.params,fe=de===void 0?{}:de,ue&&L.ZP.loading(ue,2e4),J.abrupt("return",new Promise(function(Me){(0,V.request)("/api/storage",{params:fe,method:"put",data:ie}).then(function(T){var pe;if(L.ZP.destroy(),(T==null||(pe=T.data)===null||pe===void 0?void 0:pe.isLogin)==!1){L.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var F=new URL(window.location.href).searchParams,Q=F.get("redirect");window.location.pathname!=="/user/login"&&!Q&&V.history.replace({pathname:"/user/login"});return}T!=null&&T.success?le&&L.ZP.success(le,1):_e&&L.ZP.warning(_e,2),Me(T)})}));case 3:case"end":return J.stop()}},Pe)}));return function(W){return De.apply(this,arguments)}}();l.Z=je}}]); diff --git a/core/admin/p__Storage__index.39955b7e.async.js b/core/admin/p__Storage__index.39955b7e.async.js deleted file mode 100644 index bfe72b9..0000000 --- a/core/admin/p__Storage__index.39955b7e.async.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[354],{6849:function(ce,X,n){var te=n(24572),B=n(91600),q=n(58733),N=n(99932),U=n(78450),a=n(75782),ae=n(27693),re=n(55585),G=n(31479),k=n(35276),ee=n(88648),W=n(18518),R=n(88938),g=n(89839),h=n(26572),S=n(40870),$=n(95027),b=n(53068),p=n(38365),E=n(50959),le=n(15797),d=n(11527),Z=["onTableChange","maxLength","formItemProps","recordCreatorProps","rowKey","controlled","defaultValue","onChange","editableFormRef"],H=["record","position","creatorButtonText","newRecordType","parentKey","style"],A=E.createContext(void 0);function z(e){var m=e.children,L=e.record,I=e.position,Y=e.newRecordType,K=e.parentKey,O=(0,E.useContext)(A);return E.cloneElement(m,(0,a.Z)((0,a.Z)({},m.props),{},{onClick:function(){var y=(0,U.Z)((0,N.Z)().mark(function oe(C){var v,P,M,i;return(0,N.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(v=(P=m.props).onClick)===null||v===void 0?void 0:v.call(P,C);case 2:if(i=t.sent,i!==!1){t.next=5;break}return t.abrupt("return");case 5:O==null||(M=O.current)===null||M===void 0||M.addEditRecord(L,{position:I,newRecordType:Y,parentKey:K});case 6:case"end":return t.stop()}},oe)}));function T(oe){return y.apply(this,arguments)}return T}()}))}function V(e){var m,L,I=(0,k.YB)(),Y=e.onTableChange,K=e.maxLength,O=e.formItemProps,y=e.recordCreatorProps,T=e.rowKey,oe=e.controlled,C=e.defaultValue,v=e.onChange,P=e.editableFormRef,M=(0,q.Z)(e,Z),i=(0,ee.D)(e.value),D=(0,E.useRef)(),t=(0,E.useRef)();(0,E.useImperativeHandle)(M.actionRef,function(){return D.current});var F=(0,$.Z)(function(){return e.value||C||[]},{value:e.value,onChange:e.onChange}),x=(0,B.Z)(F,2),u=x[0],_e=x[1],w=E.useMemo(function(){return typeof T=="function"?T:function(c,r){return c[T]||r}},[T]),ne=function(r){if(typeof r=="number"&&!e.name){if(r>=u.length)return r;var l=u&&u[r];return w==null?void 0:w(l,r)}if((typeof r=="string"||r>=u.length)&&e.name){var o=u.findIndex(function(_,s){var f;return(w==null||(f=w(_,s))===null||f===void 0?void 0:f.toString())===(r==null?void 0:r.toString())});return o}return r};(0,E.useImperativeHandle)(P,function(){var c=function(o){var _,s;if(o==null)throw new Error("rowIndex is required");var f=ne(o),j=[e.name,(_=f==null?void 0:f.toString())!==null&&_!==void 0?_:""].flat(1).filter(Boolean);return(s=t.current)===null||s===void 0?void 0:s.getFieldValue(j)},r=function(){var o,_=[e.name].flat(1).filter(Boolean);if(Array.isArray(_)&&_.length===0){var s,f=(s=t.current)===null||s===void 0?void 0:s.getFieldsValue();return Array.isArray(f)?f:Object.keys(f).map(function(j){return f[j]})}return(o=t.current)===null||o===void 0?void 0:o.getFieldValue(_)};return(0,a.Z)((0,a.Z)({},t.current),{},{getRowData:c,getRowsData:r,setRowData:function(o,_){var s,f,j,se;if(o==null)throw new Error("rowIndex is required");var ve=ne(o),Me=[e.name,(s=ve==null?void 0:ve.toString())!==null&&s!==void 0?s:""].flat(1).filter(Boolean),Re=((f=t.current)===null||f===void 0||(j=f.getFieldsValue)===null||j===void 0?void 0:j.call(f))||{},be=(0,p.Z)(Re,Me,(0,a.Z)((0,a.Z)({},c(o)),_||{}));return(se=t.current)===null||se===void 0||se.setFieldsValue(be),!0}})}),(0,E.useEffect)(function(){e.controlled&&u.forEach(function(c,r){var l;(l=t.current)===null||l===void 0||l.setFieldsValue((0,te.Z)({},w(c,r),c))},{})},[u,e.controlled]),(0,E.useEffect)(function(){if(e.name){var c;t.current=e==null||(c=e.editable)===null||c===void 0?void 0:c.form}},[(m=e.editable)===null||m===void 0?void 0:m.form,e.name]);var Q=y||{},me=Q.record,ue=Q.position,he=Q.creatorButtonText,Ee=Q.newRecordType,Pe=Q.parentKey,ge=Q.style,Ce=(0,q.Z)(Q,H),fe=ue==="top",ie=(0,E.useMemo)(function(){return typeof K=="number"&&K<=(u==null?void 0:u.length)?!1:y!==!1&&(0,d.jsx)(z,{record:(0,W.h)(me,u==null?void 0:u.length,u)||{},position:ue,parentKey:(0,W.h)(Pe,u==null?void 0:u.length,u),newRecordType:Ee,children:(0,d.jsx)(h.ZP,(0,a.Z)((0,a.Z)({type:"dashed",style:(0,a.Z)({display:"block",margin:"10px 0",width:"100%"},ge),icon:(0,d.jsx)(ae.Z,{})},Ce),{},{children:he||I.getMessage("editableTable.action.add","\u6DFB\u52A0\u4E00\u884C\u6570\u636E")}))})},[y,K,u==null?void 0:u.length]),De=(0,E.useMemo)(function(){return ie?fe?{components:{header:{wrapper:function(r){var l,o=r.className,_=r.children;return(0,d.jsxs)("thead",{className:o,children:[_,(0,d.jsxs)("tr",{style:{position:"relative"},children:[(0,d.jsx)("td",{colSpan:0,style:{visibility:"hidden"},children:ie}),(0,d.jsx)("td",{style:{position:"absolute",left:0,width:"100%"},colSpan:(l=M.columns)===null||l===void 0?void 0:l.length,children:ie})]})]})}}}}:{tableViewRender:function(r,l){var o,_;return(0,d.jsxs)(d.Fragment,{children:[(o=(_=e.tableViewRender)===null||_===void 0?void 0:_.call(e,r,l))!==null&&o!==void 0?o:l,ie]})}}:{}},[fe,ie]),de=(0,a.Z)({},e.editable),Oe=(0,R.J)(function(c,r){var l,o,_;if((l=e.editable)===null||l===void 0||(o=l.onValuesChange)===null||o===void 0||o.call(l,c,r),(_=e.onValuesChange)===null||_===void 0||_.call(e,r,c),e.controlled){var s;e==null||(s=e.onChange)===null||s===void 0||s.call(e,r)}});return(e!=null&&e.onValuesChange||(L=e.editable)!==null&&L!==void 0&&L.onValuesChange||e.controlled&&e!==null&&e!==void 0&&e.onChange)&&(de.onValuesChange=Oe),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(A.Provider,{value:D,children:(0,d.jsx)(le.Z,(0,a.Z)((0,a.Z)((0,a.Z)({search:!1,options:!1,pagination:!1,rowKey:T,revalidateOnFocus:!1},M),De),{},{tableLayout:"fixed",actionRef:D,onChange:Y,editable:(0,a.Z)((0,a.Z)({},de),{},{formProps:(0,a.Z)({formRef:t},de.formProps)}),dataSource:u,onDataSourceChange:function(r){if(_e(r),e.name&&ue==="top"){var l,o=(0,p.Z)({},[e.name].flat(1).filter(Boolean),r);(l=t.current)===null||l===void 0||l.setFieldsValue(o)}}}))}),e.name?(0,d.jsx)(re.Z,{name:[e.name],children:function(r){var l,o,_=(0,b.Z)(r,[e.name].flat(1)),s=_==null?void 0:_.find(function(f,j){return!(0,g.A)(f,i==null?void 0:i[j])});return s&&i&&(e==null||(l=e.editable)===null||l===void 0||(o=l.onValuesChange)===null||o===void 0||o.call(l,s,_)),null}}):null]})}function J(e){var m=G.ZP.useFormInstance();return e.name?(0,d.jsx)(S.Z.Item,(0,a.Z)((0,a.Z)({style:{maxWidth:"100%"}},e==null?void 0:e.formItemProps),{},{name:e.name,children:(0,d.jsx)(V,(0,a.Z)((0,a.Z)({},e),{},{editable:(0,a.Z)((0,a.Z)({},e.editable),{},{form:m})}))})):(0,d.jsx)(V,(0,a.Z)({},e))}J.RecordCreator=z,X.Z=J},91551:function(ce,X,n){n.r(X);var te=n(25359),B=n.n(te),q=n(49811),N=n.n(q),U=n(54306),a=n.n(U),ae=n(6849),re=n(12472),G=n(86195),k=n(21137),ee=n(26572),W=n(79112),R=n(50959),g=n(87474),h=n(11527),S=k.Z.Option,$,b=function(Z,H){$&&(clearTimeout($),$=null);var A=function(){(0,G.request)("/api/storage?search="+Z).then(function(V){H(V.data)})};$=setTimeout(A,300)},p=function(Z){var H=(0,R.useState)([]),A=a()(H,2),z=A[0],V=A[1],J=Z.value.split(".")[0],e=(0,R.useState)(!1),m=a()(e,2),L=m[0],I=m[1],Y=(0,R.useState)(""),K=a()(Y,2),O=K[0],y=K[1],T=(0,R.useRef)(),oe=[{title:"\u5E8F\u53F7",dataIndex:"index",width:"5%",readonly:!0},{title:"\u5B58\u50A8\u6876",dataIndex:"bucket",width:"8%"},{title:"\u952E\u540D",dataIndex:"key"},{title:"\u503C",dataIndex:"value",render:function(v){return v.length>100?(0,h.jsx)("a",{onClick:function(){y(v),I(!0)},children:"".concat(v.slice(0,100),"...")}):v},valueType:"textarea"},{title:"\u64CD\u4F5C",valueType:"option",width:"12%",render:function(v,P,M,i){return[(0,h.jsx)("a",{onClick:function(){var t;i==null||(t=i.startEditable)===null||t===void 0||t.call(i,P.id)},children:"\u7F16\u8F91"},"editable"),(0,h.jsx)("a",{onClick:function(){var t,F,x={};x[P.id]="",(0,g.Z)(x),(t=T.current)===null||t===void 0||(F=t.reloadAndRest)===null||F===void 0||F.call(t)},children:"\u5220\u9664"},"delete")]}}];return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(ee.ZP,{type:"primary",onClick:function(){var v;(v=T.current)===null||v===void 0||v.reload()},children:"\u5237\u65B0"}),(0,h.jsx)(W.Z,{title:"",open:L,footer:[],onOk:function(){I(!1)},onCancel:function(){I(!1)},children:O}),(0,h.jsx)(ae.Z,{actionRef:T,request:N()(B()().mark(function C(){var v,P=arguments;return B()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return v=P.length>0&&P[0]!==void 0?P[0]:{},i.abrupt("return",(0,G.request)("/api/storage/list?keys="+[Z.value].join(","),{params:v}).then(function(D){return D.data=D.data.map(function(t){return t.id=t.bucket+"."+t.key,t}),D}));case 2:case"end":return i.stop()}},C)})),showSorterTooltip:!0,pagination:{},rowKey:"id",maxLength:100005,scroll:{x:960},recordCreatorProps:{position:"bottom",record:function(){return{id:J,bucket:J}}},loading:!1,columns:oe,editable:{type:"multiple",editableKeys:z,onSave:function(){var C=N()(B()().mark(function P(M,i){var D,t,F,x,u,_e;return B()().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:D=M==i.bucket,t={},D||(F=i.id.split("."),x=a()(F,2),u=x[0],_e=x[1],(i.bucket!=u||i.key!=_e)&&(t[i.id]="")),t[i.bucket+"."+i.key]=i.value,(0,g.Z)(t);case 5:case"end":return ne.stop()}},P)}));function v(P,M){return C.apply(this,arguments)}return v}(),onChange:V}})]})},E=function(Z){var H=(0,R.useState)([]),A=a()(H,2),z=A[0],V=A[1],J=(0,R.useState)(),e=a()(J,2),m=e[0],L=e[1],I=function(y){b(y,V)},Y=function(y){L(y)},K=z.map(function(O){return(0,h.jsx)(S,{children:O.text},O.value)});return(0,h.jsxs)(re._z,{subTitle:"tips\uFF1A\u5220\u9664\u5B58\u50A8\u6876 empty ?",children:[(0,h.jsx)(k.Z,{showSearch:!0,value:m,placeholder:Z.placeholder,style:Z.style,defaultActiveFirstOption:!1,showArrow:!1,filterOption:!1,onFocus:function(){I("")},onSearch:I,onChange:Y,notFoundContent:null,children:K}),m&&(0,h.jsx)(p,{value:m},m)]})},le=function(){return(0,h.jsx)(E,{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD",style:{width:200,marginBottom:"20px"}})};X.default=le},87474:function(ce,X,n){var te=n(25359),B=n.n(te),q=n(49811),N=n.n(q),U=n(21362),a=n(86195),ae=function(){var re=N()(B()().mark(function G(k){var ee,W,R,g=arguments;return B()().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return ee=g.length>1&&g[1]!==void 0?g[1]:"\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..",W=g.length>2&&g[2]!==void 0?g[2]:"\u63D0\u4EA4\u6210\u529F\uFF01",R=g.length>3&&g[3]!==void 0?g[3]:"\u63D0\u4EA4\u5931\u8D25",ee&&U.ZP.loading("\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..",2e4),S.abrupt("return",new Promise(function($){(0,a.request)("/api/storage",{method:"put",data:k}).then(function(b){var p;if(U.ZP.destroy(),(b==null||(p=b.data)===null||p===void 0?void 0:p.isLogin)==!1){U.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var E=new URL(window.location.href).searchParams,le=E.get("redirect");window.location.pathname!=="/user/login"&&!le&&a.history.replace({pathname:"/user/login"});return}b!=null&&b.success?W&&U.ZP.success(W,1):R&&U.ZP.warning("\u63D0\u4EA4\u5931\u8D25\uFF01",2),$(b)})}));case 5:case"end":return S.stop()}},G)}));return function(k){return re.apply(this,arguments)}}();X.Z=ae}}]); diff --git a/core/admin/p__Storage__index.a02332d9.async.js b/core/admin/p__Storage__index.a02332d9.async.js new file mode 100644 index 0000000..937281d --- /dev/null +++ b/core/admin/p__Storage__index.a02332d9.async.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[354],{6849:function(ce,q,n){var ae=n(24572),Z=n(91600),ee=n(58733),G=n(99932),L=n(78450),a=n(75782),re=n(27693),le=n(55585),k=n(31479),y=n(35276),ne=n(88648),$=n(18518),O=n(88938),p=n(89839),v=n(26572),H=n(40870),K=n(95027),z=n(53068),J=n(38365),P=n(50959),V=n(15797),d=n(11527),E=["onTableChange","maxLength","formItemProps","recordCreatorProps","rowKey","controlled","defaultValue","onChange","editableFormRef"],T=["record","position","creatorButtonText","newRecordType","parentKey","style"],M=P.createContext(void 0);function x(e){var h=e.children,j=e.record,B=e.position,Q=e.newRecordType,U=e.parentKey,R=(0,P.useContext)(M);return P.cloneElement(h,(0,a.Z)((0,a.Z)({},h.props),{},{onClick:function(){var A=(0,L.Z)((0,G.Z)().mark(function oe(C){var c,g,b,i;return(0,G.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(c=(g=h.props).onClick)===null||c===void 0?void 0:c.call(g,C);case 2:if(i=t.sent,i!==!1){t.next=5;break}return t.abrupt("return");case 5:R==null||(b=R.current)===null||b===void 0||b.addEditRecord(j,{position:B,newRecordType:Q,parentKey:U});case 6:case"end":return t.stop()}},oe)}));function I(oe){return A.apply(this,arguments)}return I}()}))}function F(e){var h,j,B=(0,y.YB)(),Q=e.onTableChange,U=e.maxLength,R=e.formItemProps,A=e.recordCreatorProps,I=e.rowKey,oe=e.controlled,C=e.defaultValue,c=e.onChange,g=e.editableFormRef,b=(0,ee.Z)(e,E),i=(0,ne.D)(e.value),D=(0,P.useRef)(),t=(0,P.useRef)();(0,P.useImperativeHandle)(b.actionRef,function(){return D.current});var w=(0,K.Z)(function(){return e.value||C||[]},{value:e.value,onChange:e.onChange}),W=(0,Z.Z)(w,2),u=W[0],_e=W[1],N=P.useMemo(function(){return typeof I=="function"?I:function(f,r){return f[I]||r}},[I]),te=function(r){if(typeof r=="number"&&!e.name){if(r>=u.length)return r;var l=u&&u[r];return N==null?void 0:N(l,r)}if((typeof r=="string"||r>=u.length)&&e.name){var o=u.findIndex(function(_,s){var m;return(N==null||(m=N(_,s))===null||m===void 0?void 0:m.toString())===(r==null?void 0:r.toString())});return o}return r};(0,P.useImperativeHandle)(g,function(){var f=function(o){var _,s;if(o==null)throw new Error("rowIndex is required");var m=te(o),S=[e.name,(_=m==null?void 0:m.toString())!==null&&_!==void 0?_:""].flat(1).filter(Boolean);return(s=t.current)===null||s===void 0?void 0:s.getFieldValue(S)},r=function(){var o,_=[e.name].flat(1).filter(Boolean);if(Array.isArray(_)&&_.length===0){var s,m=(s=t.current)===null||s===void 0?void 0:s.getFieldsValue();return Array.isArray(m)?m:Object.keys(m).map(function(S){return m[S]})}return(o=t.current)===null||o===void 0?void 0:o.getFieldValue(_)};return(0,a.Z)((0,a.Z)({},t.current),{},{getRowData:f,getRowsData:r,setRowData:function(o,_){var s,m,S,se;if(o==null)throw new Error("rowIndex is required");var ve=te(o),Me=[e.name,(s=ve==null?void 0:ve.toString())!==null&&s!==void 0?s:""].flat(1).filter(Boolean),Re=((m=t.current)===null||m===void 0||(S=m.getFieldsValue)===null||S===void 0?void 0:S.call(m))||{},be=(0,J.Z)(Re,Me,(0,a.Z)((0,a.Z)({},f(o)),_||{}));return(se=t.current)===null||se===void 0||se.setFieldsValue(be),!0}})}),(0,P.useEffect)(function(){e.controlled&&u.forEach(function(f,r){var l;(l=t.current)===null||l===void 0||l.setFieldsValue((0,ae.Z)({},N(f,r),f))},{})},[u,e.controlled]),(0,P.useEffect)(function(){if(e.name){var f;t.current=e==null||(f=e.editable)===null||f===void 0?void 0:f.form}},[(h=e.editable)===null||h===void 0?void 0:h.form,e.name]);var X=A||{},me=X.record,ue=X.position,Ee=X.creatorButtonText,he=X.newRecordType,Pe=X.parentKey,ge=X.style,Ce=(0,ee.Z)(X,T),fe=ue==="top",ie=(0,P.useMemo)(function(){return typeof U=="number"&&U<=(u==null?void 0:u.length)?!1:A!==!1&&(0,d.jsx)(x,{record:(0,$.h)(me,u==null?void 0:u.length,u)||{},position:ue,parentKey:(0,$.h)(Pe,u==null?void 0:u.length,u),newRecordType:he,children:(0,d.jsx)(v.ZP,(0,a.Z)((0,a.Z)({type:"dashed",style:(0,a.Z)({display:"block",margin:"10px 0",width:"100%"},ge),icon:(0,d.jsx)(re.Z,{})},Ce),{},{children:Ee||B.getMessage("editableTable.action.add","\u6DFB\u52A0\u4E00\u884C\u6570\u636E")}))})},[A,U,u==null?void 0:u.length]),De=(0,P.useMemo)(function(){return ie?fe?{components:{header:{wrapper:function(r){var l,o=r.className,_=r.children;return(0,d.jsxs)("thead",{className:o,children:[_,(0,d.jsxs)("tr",{style:{position:"relative"},children:[(0,d.jsx)("td",{colSpan:0,style:{visibility:"hidden"},children:ie}),(0,d.jsx)("td",{style:{position:"absolute",left:0,width:"100%"},colSpan:(l=b.columns)===null||l===void 0?void 0:l.length,children:ie})]})]})}}}}:{tableViewRender:function(r,l){var o,_;return(0,d.jsxs)(d.Fragment,{children:[(o=(_=e.tableViewRender)===null||_===void 0?void 0:_.call(e,r,l))!==null&&o!==void 0?o:l,ie]})}}:{}},[fe,ie]),de=(0,a.Z)({},e.editable),Oe=(0,O.J)(function(f,r){var l,o,_;if((l=e.editable)===null||l===void 0||(o=l.onValuesChange)===null||o===void 0||o.call(l,f,r),(_=e.onValuesChange)===null||_===void 0||_.call(e,r,f),e.controlled){var s;e==null||(s=e.onChange)===null||s===void 0||s.call(e,r)}});return(e!=null&&e.onValuesChange||(j=e.editable)!==null&&j!==void 0&&j.onValuesChange||e.controlled&&e!==null&&e!==void 0&&e.onChange)&&(de.onValuesChange=Oe),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(M.Provider,{value:D,children:(0,d.jsx)(V.Z,(0,a.Z)((0,a.Z)((0,a.Z)({search:!1,options:!1,pagination:!1,rowKey:I,revalidateOnFocus:!1},b),De),{},{tableLayout:"fixed",actionRef:D,onChange:Q,editable:(0,a.Z)((0,a.Z)({},de),{},{formProps:(0,a.Z)({formRef:t},de.formProps)}),dataSource:u,onDataSourceChange:function(r){if(_e(r),e.name&&ue==="top"){var l,o=(0,J.Z)({},[e.name].flat(1).filter(Boolean),r);(l=t.current)===null||l===void 0||l.setFieldsValue(o)}}}))}),e.name?(0,d.jsx)(le.Z,{name:[e.name],children:function(r){var l,o,_=(0,z.Z)(r,[e.name].flat(1)),s=_==null?void 0:_.find(function(m,S){return!(0,p.A)(m,i==null?void 0:i[S])});return s&&i&&(e==null||(l=e.editable)===null||l===void 0||(o=l.onValuesChange)===null||o===void 0||o.call(l,s,_)),null}}):null]})}function Y(e){var h=k.ZP.useFormInstance();return e.name?(0,d.jsx)(H.Z.Item,(0,a.Z)((0,a.Z)({style:{maxWidth:"100%"}},e==null?void 0:e.formItemProps),{},{name:e.name,children:(0,d.jsx)(F,(0,a.Z)((0,a.Z)({},e),{},{editable:(0,a.Z)((0,a.Z)({},e.editable),{},{form:h})}))})):(0,d.jsx)(F,(0,a.Z)({},e))}Y.RecordCreator=x,q.Z=Y},91551:function(ce,q,n){n.r(q);var ae=n(25359),Z=n.n(ae),ee=n(49811),G=n.n(ee),L=n(54306),a=n.n(L),re=n(6849),le=n(12472),k=n(86195),y=n(21137),ne=n(26572),$=n(79112),O=n(50959),p=n(87474),v=n(11527),H=y.Z.Option,K,z=function(E,T){K&&(clearTimeout(K),K=null);var M=function(){(0,k.request)("/api/storage?search="+E).then(function(F){T(F.data)})};K=setTimeout(M,300)},J=function(E){var T=(0,O.useState)([]),M=a()(T,2),x=M[0],F=M[1],Y=E.value.split(".")[0],e=(0,O.useState)(!1),h=a()(e,2),j=h[0],B=h[1],Q=(0,O.useState)(""),U=a()(Q,2),R=U[0],A=U[1],I=(0,O.useRef)(),oe=[{title:"\u5E8F\u53F7",dataIndex:"index",width:"5%",readonly:!0},{title:"\u5B58\u50A8\u6876",dataIndex:"bucket",width:"8%"},{title:"\u952E\u540D",dataIndex:"key"},{title:"\u503C",dataIndex:"value",render:function(c){return c.length>100?(0,v.jsx)("a",{onClick:function(){A(c),B(!0)},children:"".concat(c.slice(0,100),"...")}):c},valueType:"textarea"},{title:"\u64CD\u4F5C",valueType:"option",width:"12%",render:function(c,g,b,i){return[(0,v.jsx)("a",{onClick:function(){var t;i==null||(t=i.startEditable)===null||t===void 0||t.call(i,g.id)},children:"\u7F16\u8F91"},"editable"),(0,v.jsx)("a",{onClick:function(){var t,w,W={};W[g.id]="",(0,p.Z)({values:W}),(t=I.current)===null||t===void 0||(w=t.reloadAndRest)===null||w===void 0||w.call(t)},children:"\u5220\u9664"},"delete")]}}];return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(ne.ZP,{type:"primary",onClick:function(){var c;(c=I.current)===null||c===void 0||c.reload()},children:"\u5237\u65B0"}),(0,v.jsx)($.Z,{title:"",open:j,footer:[],onOk:function(){B(!1)},onCancel:function(){B(!1)},children:R}),(0,v.jsx)(re.Z,{actionRef:I,request:G()(Z()().mark(function C(){var c,g=arguments;return Z()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return c=g.length>0&&g[0]!==void 0?g[0]:{},i.abrupt("return",(0,k.request)("/api/storage/list?keys="+[E.value].join(","),{params:c}).then(function(D){return D.data=D.data.map(function(t){return t.id=t.bucket+"."+t.key,t}),D}));case 2:case"end":return i.stop()}},C)})),showSorterTooltip:!0,pagination:{},rowKey:"id",maxLength:100005,scroll:{x:960},recordCreatorProps:{position:"bottom",record:function(){return{id:Y,bucket:Y}}},loading:!1,columns:oe,editable:{type:"multiple",editableKeys:x,onSave:function(){var C=G()(Z()().mark(function g(b,i){var D,t,w,W,u,_e;return Z()().wrap(function(te){for(;;)switch(te.prev=te.next){case 0:D=b==i.bucket,t={},D||(w=i.id.split("."),W=a()(w,2),u=W[0],_e=W[1],(i.bucket!=u||i.key!=_e)&&(t[i.id]="")),t[i.bucket+"."+i.key]=i.value,(0,p.Z)({values:t});case 5:case"end":return te.stop()}},g)}));function c(g,b){return C.apply(this,arguments)}return c}(),onChange:F}})]})},P=function(E){var T=(0,O.useState)([]),M=a()(T,2),x=M[0],F=M[1],Y=(0,O.useState)(),e=a()(Y,2),h=e[0],j=e[1],B=function(A){z(A,F)},Q=function(A){j(A)},U=x.map(function(R){return(0,v.jsx)(H,{children:R.text},R.value)});return(0,v.jsxs)(le._z,{subTitle:"tips\uFF1A\u5220\u9664\u5B58\u50A8\u6876 empty ?",children:[(0,v.jsx)(y.Z,{showSearch:!0,value:h,placeholder:E.placeholder,style:E.style,defaultActiveFirstOption:!1,showArrow:!1,filterOption:!1,onFocus:function(){B("")},onSearch:B,onChange:Q,notFoundContent:null,children:U}),h&&(0,v.jsx)(J,{value:h},h)]})},V=function(){return(0,v.jsx)(P,{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD",style:{width:200,marginBottom:"20px"}})};q.default=V},87474:function(ce,q,n){var ae=n(25359),Z=n.n(ae),ee=n(49811),G=n.n(ee),L=n(21362),a=n(86195),re=function(){var le=G()(Z()().mark(function k(y){var ne,$,O,p,v,H,K,z,J;return Z()().wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return ne=y.values,$=y.loading,O=$===void 0?"\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..":$,p=y.success,v=p===void 0?"\u63D0\u4EA4\u6210\u529F\uFF01":p,H=y.fail,K=H===void 0?"\u63D0\u4EA4\u5931\u8D25":H,z=y.params,J=z===void 0?{}:z,O&&L.ZP.loading(O,2e4),V.abrupt("return",new Promise(function(d){(0,a.request)("/api/storage",{params:J,method:"put",data:ne}).then(function(E){var T;if(L.ZP.destroy(),(E==null||(T=E.data)===null||T===void 0?void 0:T.isLogin)==!1){L.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var M=new URL(window.location.href).searchParams,x=M.get("redirect");window.location.pathname!=="/user/login"&&!x&&a.history.replace({pathname:"/user/login"});return}E!=null&&E.success?v&&L.ZP.success(v,1):K&&L.ZP.warning(K,2),d(E)})}));case 3:case"end":return V.stop()}},k)}));return function(y){return le.apply(this,arguments)}}();q.Z=re}}]); diff --git a/core/admin/umi.f36f16c6.js b/core/admin/umi.c94099e6.js similarity index 99% rename from core/admin/umi.f36f16c6.js rename to core/admin/umi.c94099e6.js index fb7e313..918548a 100644 --- a/core/admin/umi.f36f16c6.js +++ b/core/admin/umi.c94099e6.js @@ -291,6 +291,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(c){return n(c)||i(c)||(0,l.Z)(c)||r()}},34242:function(y,g,e){"use strict";e.d(g,{Z:function(){return i}});var o=e(82604);function n(l,r){if((0,o.Z)(l)!=="object"||l===null)return l;var f=l[Symbol.toPrimitive];if(f!==void 0){var c=f.call(l,r||"default");if((0,o.Z)(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(l)}function i(l){var r=n(l,"string");return(0,o.Z)(r)==="symbol"?r:String(r)}},82604:function(y,g,e){"use strict";e.d(g,{Z:function(){return o}});function o(n){return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},o(n)}},7979:function(y,g,e){"use strict";e.d(g,{Z:function(){return n}});var o=e(45725);function n(i,l){if(i){if(typeof i=="string")return(0,o.Z)(i,l);var r=Object.prototype.toString.call(i).slice(8,-1);if(r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set")return Array.from(i);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return(0,o.Z)(i,l)}}},8681:function(y,g,e){"use strict";e.d(g,{Z:function(){return o}});function o(n,i){(i==null||i>n.length)&&(i=n.length);for(var l=0,r=new Array(i);l=i.length?{done:!0}:{done:!1,value:i[f++]}},e:function(v){throw v},f:c}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var u=!0,d=!1,p;return{s:function(){r=r.call(i)},n:function(){var v=r.next();return u=v.done,v},e:function(v){d=!0,p=v},f:function(){try{!u&&r.return!=null&&r.return()}finally{if(d)throw p}}}}},76614:function(y,g,e){"use strict";e.d(g,{Z:function(){return f}});function o(c){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(d){return d.__proto__||Object.getPrototypeOf(d)},o(c)}function n(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(c){return!1}}var i=e(26143),l=e(60790);function r(c,u){if(u&&((0,i.Z)(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(0,l.Z)(c)}function f(c){var u=n();return function(){var p=o(c),b;if(u){var v=o(this).constructor;b=Reflect.construct(p,arguments,v)}else b=p.apply(this,arguments);return r(this,b)}}},24572:function(y,g,e){"use strict";e.d(g,{Z:function(){return n}});var o=e(1536);function n(i,l,r){return l=(0,o.Z)(l),l in i?Object.defineProperty(i,l,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[l]=r,i}},51163:function(y,g,e){"use strict";e.d(g,{Z:function(){return o}});function o(){return o=Object.assign?Object.assign.bind():function(n){for(var i=1;i=0)&&(r[c]=i[c]);return r}function n(i,l){if(i==null)return{};var r=o(i,l),f,c;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);for(c=0;c=0)&&Object.prototype.propertyIsEnumerable.call(i,f)&&(r[f]=i[f])}return r}},99932:function(y,g,e){"use strict";e.d(g,{Z:function(){return n}});var o=e(26143);function n(){"use strict";n=function(){return i};var i={},l=Object.prototype,r=l.hasOwnProperty,f=Object.defineProperty||function(j,T,x){j[T]=x.value},c=typeof Symbol=="function"?Symbol:{},u=c.iterator||"@@iterator",d=c.asyncIterator||"@@asyncIterator",p=c.toStringTag||"@@toStringTag";function b(j,T,x){return Object.defineProperty(j,T,{value:x,enumerable:!0,configurable:!0,writable:!0}),j[T]}try{b({},"")}catch(j){b=function(x,B,z){return x[B]=z}}function v(j,T,x,B){var z=T&&T.prototype instanceof R?T:R,Z=Object.create(z.prototype),q=new K(B||[]);return f(Z,"_invoke",{value:V(j,x,q)}),Z}function S(j,T,x){try{return{type:"normal",arg:j.call(T,x)}}catch(B){return{type:"throw",arg:B}}}i.wrap=v;var P={};function R(){}function L(){}function $(){}var O={};b(O,u,function(){return this});var N=Object.getPrototypeOf,F=N&&N(N(J([])));F&&F!==l&&r.call(F,u)&&(O=F);var M=$.prototype=R.prototype=Object.create(O);function A(j){["next","throw","return"].forEach(function(T){b(j,T,function(x){return this._invoke(T,x)})})}function D(j,T){function x(z,Z,q,te){var ye=S(j[z],j,Z);if(ye.type!=="throw"){var ce=ye.arg,me=ce.value;return me&&(0,o.Z)(me)=="object"&&r.call(me,"__await")?T.resolve(me.__await).then(function(xe){x("next",xe,q,te)},function(xe){x("throw",xe,q,te)}):T.resolve(me).then(function(xe){ce.value=xe,q(ce)},function(xe){return x("throw",xe,q,te)})}te(ye.arg)}var B;f(this,"_invoke",{value:function(Z,q){function te(){return new T(function(ye,ce){x(Z,q,ye,ce)})}return B=B?B.then(te,te):te()}})}function V(j,T,x){var B="suspendedStart";return function(z,Z){if(B==="executing")throw new Error("Generator is already running");if(B==="completed"){if(z==="throw")throw Z;return X()}for(x.method=z,x.arg=Z;;){var q=x.delegate;if(q){var te=U(q,x);if(te){if(te===P)continue;return te}}if(x.method==="next")x.sent=x._sent=x.arg;else if(x.method==="throw"){if(B==="suspendedStart")throw B="completed",x.arg;x.dispatchException(x.arg)}else x.method==="return"&&x.abrupt("return",x.arg);B="executing";var ye=S(j,T,x);if(ye.type==="normal"){if(B=x.done?"completed":"suspendedYield",ye.arg===P)continue;return{value:ye.arg,done:x.done}}ye.type==="throw"&&(B="completed",x.method="throw",x.arg=ye.arg)}}}function U(j,T){var x=T.method,B=j.iterator[x];if(B===void 0)return T.delegate=null,x==="throw"&&j.iterator.return&&(T.method="return",T.arg=void 0,U(j,T),T.method==="throw")||x!=="return"&&(T.method="throw",T.arg=new TypeError("The iterator does not provide a '"+x+"' method")),P;var z=S(B,j.iterator,T.arg);if(z.type==="throw")return T.method="throw",T.arg=z.arg,T.delegate=null,P;var Z=z.arg;return Z?Z.done?(T[j.resultName]=Z.value,T.next=j.nextLoc,T.method!=="return"&&(T.method="next",T.arg=void 0),T.delegate=null,P):Z:(T.method="throw",T.arg=new TypeError("iterator result is not an object"),T.delegate=null,P)}function Y(j){var T={tryLoc:j[0]};1 in j&&(T.catchLoc=j[1]),2 in j&&(T.finallyLoc=j[2],T.afterLoc=j[3]),this.tryEntries.push(T)}function G(j){var T=j.completion||{};T.type="normal",delete T.arg,j.completion=T}function K(j){this.tryEntries=[{tryLoc:"root"}],j.forEach(Y,this),this.reset(!0)}function J(j){if(j){var T=j[u];if(T)return T.call(j);if(typeof j.next=="function")return j;if(!isNaN(j.length)){var x=-1,B=function z(){for(;++x=0;--z){var Z=this.tryEntries[z],q=Z.completion;if(Z.tryLoc==="root")return B("end");if(Z.tryLoc<=this.prev){var te=r.call(Z,"catchLoc"),ye=r.call(Z,"finallyLoc");if(te&&ye){if(this.prev=0;--B){var z=this.tryEntries[B];if(z.tryLoc<=this.prev&&r.call(z,"finallyLoc")&&this.prev=0;--x){var B=this.tryEntries[x];if(B.finallyLoc===T)return this.complete(B.completion,B.afterLoc),G(B),P}},catch:function(T){for(var x=this.tryEntries.length-1;x>=0;--x){var B=this.tryEntries[x];if(B.tryLoc===T){var z=B.completion;if(z.type==="throw"){var Z=z.arg;G(B)}return Z}}throw new Error("illegal catch attempt")},delegateYield:function(T,x,B){return this.delegate={iterator:J(T),resultName:x,nextLoc:B},this.method==="next"&&(this.arg=void 0),P}},i}},91600:function(y,g,e){"use strict";e.d(g,{Z:function(){return r}});var o=e(20533);function n(f,c){var u=f==null?null:typeof Symbol!="undefined"&&f[Symbol.iterator]||f["@@iterator"];if(u!=null){var d,p,b,v,S=[],P=!0,R=!1;try{if(b=(u=u.call(f)).next,c===0){if(Object(u)!==u)return;P=!1}else for(;!(P=(d=b.call(u)).done)&&(S.push(d.value),S.length!==c);P=!0);}catch(L){R=!0,p=L}finally{try{if(!P&&u.return!=null&&(v=u.return(),Object(v)!==v))return}finally{if(R)throw p}}return S}}var i=e(22266),l=e(71885);function r(f,c){return(0,o.Z)(f)||n(f,c)||(0,i.Z)(f,c)||(0,l.Z)()}},9942:function(y,g,e){"use strict";e.d(g,{Z:function(){return r}});var o=e(20533),n=e(52987),i=e(22266),l=e(71885);function r(f){return(0,o.Z)(f)||(0,n.Z)(f)||(0,i.Z)(f)||(0,l.Z)()}},49544:function(y,g,e){"use strict";e.d(g,{Z:function(){return f}});var o=e(8681);function n(c){if(Array.isArray(c))return(0,o.Z)(c)}var i=e(52987),l=e(22266);function r(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(c){return n(c)||(0,i.Z)(c)||(0,l.Z)(c)||r()}},1536:function(y,g,e){"use strict";e.d(g,{Z:function(){return i}});var o=e(26143);function n(l,r){if((0,o.Z)(l)!=="object"||l===null)return l;var f=l[Symbol.toPrimitive];if(f!==void 0){var c=f.call(l,r||"default");if((0,o.Z)(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(l)}function i(l){var r=n(l,"string");return(0,o.Z)(r)==="symbol"?r:String(r)}},26143:function(y,g,e){"use strict";e.d(g,{Z:function(){return o}});function o(n){return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},o(n)}},22266:function(y,g,e){"use strict";e.d(g,{Z:function(){return n}});var o=e(8681);function n(i,l){if(i){if(typeof i=="string")return(0,o.Z)(i,l);var r=Object.prototype.toString.call(i).slice(8,-1);if(r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set")return Array.from(i);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return(0,o.Z)(i,l)}}},71448:function(y,g,e){"use strict";e.d(g,{Ab:function(){return l},Fr:function(){return r},G$:function(){return i},K$:function(){return d},MS:function(){return o},h5:function(){return f},lK:function(){return R},uj:function(){return n}});var o="-ms-",n="-moz-",i="-webkit-",l="comm",r="rule",f="decl",c="@page",u="@media",d="@import",p="@charset",b="@viewport",v="@supports",S="@document",P="@namespace",R="@keyframes",L="@font-face",$="@counter-style",O="@font-feature-values"},42727:function(y,g,e){"use strict";e.d(g,{MY:function(){return l}});var o=e(71448),n=e(22697),i=e(97765);function l(d){return(0,i.cE)(r("",null,null,null,[""],d=(0,i.un)(d),0,[0],d))}function r(d,p,b,v,S,P,R,L,$){for(var O=0,N=0,F=R,M=0,A=0,D=0,V=1,U=1,Y=1,G=0,K="",J=S,X=P,j=v,T=K;U;)switch(D=G,G=(0,i.lp)()){case 40:if(D!=108&&(0,n.uO)(T,F-1)==58){(0,n.Cw)(T+=(0,n.gx)((0,i.iF)(G),"&","&\f"),"&\f")!=-1&&(Y=-1);break}case 34:case 39:case 91:T+=(0,i.iF)(G);break;case 9:case 10:case 13:case 32:T+=(0,i.Qb)(D);break;case 92:T+=(0,i.kq)((0,i.Ud)()-1,7);continue;case 47:switch((0,i.fj)()){case 42:case 47:(0,n.R3)(c((0,i.q6)((0,i.lp)(),(0,i.Ud)()),p,b),$);break;default:T+="/"}break;case 123*V:L[O++]=(0,n.to)(T)*Y;case 125*V:case 59:case 0:switch(G){case 0:case 125:U=0;case 59+N:A>0&&(0,n.to)(T)-F&&(0,n.R3)(A>32?u(T+";",v,b,F-1):u((0,n.gx)(T," ","")+";",v,b,F-2),$);break;case 59:T+=";";default:if((0,n.R3)(j=f(T,p,b,O,N,S,L,K,J=[],X=[],F),P),G===123)if(N===0)r(T,p,j,j,J,P,F,L,X);else switch(M===99&&(0,n.uO)(T,3)===110?100:M){case 100:case 109:case 115:r(d,j,j,v&&(0,n.R3)(f(d,j,j,0,0,S,L,K,S,J=[],F),X),S,X,F,L,v?J:X);break;default:r(T,j,j,j,[""],X,0,L,X)}}O=N=A=0,V=Y=1,K=T="",F=R;break;case 58:F=1+(0,n.to)(T),A=D;default:if(V<1){if(G==123)--V;else if(G==125&&V++==0&&(0,i.mp)()==125)continue}switch(T+=(0,n.Dp)(G),G*V){case 38:Y=N>0?1:(T+="\f",-1);break;case 44:L[O++]=((0,n.to)(T)-1)*Y,Y=1;break;case 64:(0,i.fj)()===45&&(T+=(0,i.iF)((0,i.lp)())),M=(0,i.fj)(),N=F=(0,n.to)(K=T+=(0,i.QU)((0,i.Ud)())),G++;break;case 45:D===45&&(0,n.to)(T)==2&&(V=0)}}return P}function f(d,p,b,v,S,P,R,L,$,O,N){for(var F=S-1,M=S===0?P:[""],A=(0,n.Ei)(M),D=0,V=0,U=0;D0?M[Y]+" "+G:(0,n.gx)(G,/&\f/g,M[Y])))&&($[U++]=K);return(0,i.dH)(d,p,b,S===0?o.Fr:L,$,O,N)}function c(d,p,b){return(0,i.dH)(d,p,b,o.Ab,(0,n.Dp)((0,i.Tb)()),(0,n.tb)(d,2,-2),0)}function u(d,p,b,v){return(0,i.dH)(d,p,b,o.h5,(0,n.tb)(d,0,v),(0,n.tb)(d,v+1,-1),v)}},90137:function(y,g,e){"use strict";e.d(g,{P:function(){return l},q:function(){return i}});var o=e(71448),n=e(22697);function i(r,f){for(var c="",u=(0,n.Ei)(r),d=0;d0?(0,o.uO)(c,--r):0,i--,f===10&&(i=1,n--),f}function v(){return f=r2||L(f)>3?"":" "}function A(G){for(;v();)switch(L(f)){case 0:append(Y(r-1),G);break;case 2:append(N(f),G);break;default:append(from(f),G)}return G}function D(G,K){for(;--K&&v()&&!(f<48||f>102||f>57&&f<65||f>70&&f<97););return R(G,P()+(K<6&&S()==32&&v()==32))}function V(G){for(;v();)switch(f){case G:return r;case 34:case 39:G!==34&&G!==39&&V(f);break;case 40:G===41&&V(G);break;case 92:v();break}return r}function U(G,K){for(;v()&&G+f!==57;)if(G+f===84&&S()===47)break;return"/*"+R(K,r-1)+"*"+(0,o.Dp)(G===47?G:v())}function Y(G){for(;!L(S());)v();return R(G,r)}},22697:function(y,g,e){"use strict";e.d(g,{$e:function(){return P},Cw:function(){return u},Dp:function(){return n},EQ:function(){return f},Ei:function(){return v},R3:function(){return S},Wn:function(){return o},f0:function(){return i},fy:function(){return r},gx:function(){return c},tb:function(){return p},to:function(){return b},uO:function(){return d},vp:function(){return l}});var o=Math.abs,n=String.fromCharCode,i=Object.assign;function l(R,L){return d(R,0)^45?(((L<<2^d(R,0))<<2^d(R,1))<<2^d(R,2))<<2^d(R,3):0}function r(R){return R.trim()}function f(R,L){return(R=L.exec(R))?R[0]:R}function c(R,L,$){return R.replace(L,$)}function u(R,L){return R.indexOf(L)}function d(R,L){return R.charCodeAt(L)|0}function p(R,L,$){return R.slice(L,$)}function b(R){return R.length}function v(R){return R.length}function S(R,L){return L.push(R),R}function P(R,L){return R.map(L).join("")}},94083:function(y,g,e){"use strict";e.d(g,{J$:function(){return Je},ZP:function(){return _e},kY:function(){return ee}});var o=e(50959),n=e(4322);const i=new WeakMap,l={},r={},f=()=>{},c=f(),u=Object,d=He=>He===c,p=He=>typeof He=="function",b=(He,mt)=>Kp(Kp({},He),mt),v="undefined",S=typeof window!=v,P=typeof document!=v,R=()=>S&&typeof window.requestAnimationFrame!=v,L=(He,mt)=>{const wt=i.get(He);return[()=>He.get(mt)||l,ge=>{if(!d(mt)){const Ve=He.get(mt);mt in r||(r[mt]=Ve),wt[5](mt,b(Ve,ge),Ve||l)}},wt[6],()=>!d(mt)&&mt in r?r[mt]:He.get(mt)||l]},$=new WeakMap;let O=0;const N=He=>{const mt=typeof He,wt=He&&He.constructor,ge=wt==Date;let Ve,Ke;if(u(He)===He&&!ge&&wt!=RegExp){if(Ve=$.get(He),Ve)return Ve;if(Ve=++O+"~",$.set(He,Ve),wt==Array){for(Ve="@",Ke=0;KeF,[A,D]=S&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[f,f],V=()=>{const He=P&&document.visibilityState;return d(He)||He!=="hidden"},U=He=>(P&&document.addEventListener("visibilitychange",He),A("focus",He),()=>{P&&document.removeEventListener("visibilitychange",He),D("focus",He)}),Y=He=>{const mt=()=>{F=!0,He()},wt=()=>{F=!1};return A("online",mt),A("offline",wt),()=>{D("online",mt),D("offline",wt)}},G={isOnline:M,isVisible:V},K={initFocus:U,initReconnect:Y},J=!o.useId,X=!S||"Deno"in window,j=He=>R()?window.requestAnimationFrame(He):setTimeout(He,1),T=X?o.useEffect:o.useLayoutEffect,x=typeof navigator!="undefined"&&navigator.connection,B=!X&&x&&(["slow-2g","2g"].includes(x.effectiveType)||x.saveData),z=He=>{if(p(He))try{He=He()}catch(wt){He=""}const mt=He;return He=typeof He=="string"?He:(Array.isArray(He)?He.length:He)?N(He):"",[He,mt]};let Z=0;const q=()=>++Z,te=0,ye=1,ce=2;var me={__proto__:null,FOCUS_EVENT:te,RECONNECT_EVENT:ye,MUTATE_EVENT:ce};function xe(...He){return Dv(this,null,function*(){const[mt,wt,ge,Ve]=He,Ke=b({populateCache:!0,throwOnError:!0},typeof Ve=="boolean"?{revalidate:Ve}:Ve||{});let pt=Ke.populateCache;const Ot=Ke.rollbackOnError;let Ht=Ke.optimisticData;const un=Ke.revalidate!==!1,Fe=nt=>typeof Ot=="function"?Ot(nt):Ot!==!1,$e=Ke.throwOnError;if(p(wt)){const nt=wt,It=[],Lt=mt.keys();for(let Et=Lt.next();!Et.done;Et=Lt.next()){const cn=Et.value;!cn.startsWith("$inf$")&&nt(mt.get(cn)._k)&&It.push(cn)}return Promise.all(It.map(rt))}return rt(wt);function rt(nt){return Dv(this,null,function*(){const[It]=z(nt);if(!It)return;const[Lt,Et]=L(mt,It),[cn,Fn,Rn]=i.get(mt),In=cn[It],ar=()=>un&&(delete Rn[It],In&&In[0])?In[0](ce).then(()=>Lt().data):Lt().data;if(He.length<3)return ar();let Xn=ge,Mn;const Dn=q();Fn[It]=[Dn,0];const $t=!d(Ht),kt=Lt(),jt=kt.data,Jt=kt._c,pn=d(Jt)?jt:Jt;if($t&&(Ht=p(Ht)?Ht(pn):Ht,Et({data:Ht,_c:pn})),p(Xn))try{Xn=Xn(pn)}catch(bn){Mn=bn}if(Xn&&p(Xn.then))if(Xn=yield Xn.catch(bn=>{Mn=bn}),Dn!==Fn[It][0]){if(Mn)throw Mn;return Xn}else Mn&&$t&&Fe(Mn)&&(pt=!0,Xn=pn,Et({data:Xn,_c:c}));pt&&(Mn||(p(pt)&&(Xn=pt(Xn,pn)),Et({data:Xn,_c:c}))),Fn[It][1]=q();const jn=yield ar();if(Et({_c:c}),Mn){if($e)throw Mn;return}return pt?jn:Xn})}})}const Le=(He,mt)=>{for(const wt in He)He[wt][0]&&He[wt][0](mt)},Be=(He,mt)=>{if(!i.has(He)){const wt=b(K,mt),ge={},Ve=xe.bind(c,He);let Ke=f;const pt={},Ot=(Fe,$e)=>{const rt=pt[Fe]||[];return pt[Fe]=rt,rt.push($e),()=>rt.splice(rt.indexOf($e),1)},Ht=(Fe,$e,rt)=>{He.set(Fe,$e);const nt=pt[Fe];if(nt)for(let It=nt.length;It--;)nt[It]($e,rt)},un=()=>{if(!i.has(He)&&(i.set(He,[ge,{},{},{},Ve,Ht,Ot]),!X)){const Fe=wt.initFocus(setTimeout.bind(c,Le.bind(c,ge,te))),$e=wt.initReconnect(setTimeout.bind(c,Le.bind(c,ge,ye)));Ke=()=>{Fe&&Fe(),$e&&$e(),i.delete(He)}}};return un(),[He,Ve,un,Ke]}return[He,i.get(He)[4]]},Oe=(He,mt,wt,ge,Ve)=>{const Ke=wt.errorRetryCount,pt=Ve.retryCount,Ot=~~((Math.random()+.5)*(1<<(pt<8?pt:8)))*wt.errorRetryInterval;!d(Ke)&&pt>Ke||setTimeout(ge,Ot,Ve)},Re=(He,mt)=>N(He)==N(mt),[st,Ct]=Be(new Map),xt=b({onLoadingSlow:f,onSuccess:f,onError:f,onErrorRetry:Oe,onDiscarded:f,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:B?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:B?5e3:3e3,compare:Re,isPaused:()=>!1,cache:st,mutate:Ct,fallback:{}},G),St=(He,mt)=>{const wt=b(He,mt);if(mt){const{use:ge,fallback:Ve}=He,{use:Ke,fallback:pt}=mt;ge&&Ke&&(wt.use=ge.concat(Ke)),Ve&&pt&&(wt.fallback=b(Ve,pt))}return wt},At=(0,o.createContext)({}),ne=He=>{const{value:mt}=He,wt=(0,o.useContext)(At),ge=p(mt),Ve=(0,o.useMemo)(()=>ge?mt(wt):mt,[ge,wt,mt]),Ke=(0,o.useMemo)(()=>ge?Ve:St(wt,Ve),[ge,wt,Ve]),pt=Ve&&Ve.provider,[Ot]=(0,o.useState)(()=>pt?Be(pt(Ke.cache||st),Ve):c);return Ot&&(Ke.cache=Ot[0],Ke.mutate=Ot[1]),T(()=>{if(Ot)return Ot[2]&&Ot[2](),Ot[3]},[]),(0,o.createElement)(At.Provider,b(He,{value:Ke}))},k=S&&window.__SWR_DEVTOOLS_USE__,E=k?window.__SWR_DEVTOOLS_USE__:[],C=()=>{k&&(window.__SWR_DEVTOOLS_REACT__=o)},Q=He=>p(He[1])?[He[0],He[1],He[2]||{}]:[He[0],null,(He[1]===null?He[2]:He[1])||{}],ee=()=>b(xt,(0,o.useContext)(At)),le=(He,mt)=>{const wt=z(He)[0],[,,,ge]=i.get(st);if(ge[wt])return ge[wt];const Ve=mt(He);return ge[wt]=Ve,Ve},Ee=He=>(mt,wt,ge)=>He(mt,wt&&((...Ke)=>{const pt=z(mt)[0],[,,,Ot]=i.get(st),Ht=Ot[pt];return Ht?(delete Ot[pt],Ht):wt(...Ke)}),ge),oe=E.concat(Ee),be=He=>function(...wt){const ge=ee(),[Ve,Ke,pt]=Q(wt),Ot=St(ge,pt);let Ht=He;const{use:un}=Ot,Fe=(un||[]).concat(oe);for(let $e=Fe.length;$e--;)Ht=Fe[$e](Ht);return Ht(Ve,Ke||Ot.fetcher||null,Ot)},ot=He=>{const mt=useState({})[1],wt=useRef(!1),ge=useRef(He),Ve=useRef({data:!1,error:!1,isValidating:!1}),Ke=useCallback(pt=>{let Ot=!1;const Ht=ge.current;for(const un in pt){const Fe=un;Ht[Fe]!==pt[Fe]&&(Ht[Fe]=pt[Fe],Ve.current[Fe]&&(Ot=!0))}Ot&&!wt.current&&(J?mt({}):React.startTransition(()=>mt({})))},[]);return T(()=>(wt.current=!1,()=>{wt.current=!0})),[ge,Ve.current,Ke]},We=(He,mt,wt)=>{const ge=mt[He]||(mt[He]=[]);return ge.push(wt),()=>{const Ve=ge.indexOf(wt);Ve>=0&&(ge[Ve]=ge[ge.length-1],ge.pop())}},we=(He,mt)=>(...wt)=>{const[ge,Ve,Ke]=Q(wt),pt=(Ke.use||[]).concat(mt);return He(ge,Ve,KC(Kp({},Ke),{use:pt}))};C();const tt={dedupe:!0},ht=(He,mt,wt)=>{const{cache:ge,compare:Ve,suspense:Ke,fallbackData:pt,revalidateOnMount:Ot,revalidateIfStale:Ht,refreshInterval:un,refreshWhenHidden:Fe,refreshWhenOffline:$e,keepPreviousData:rt}=wt,[nt,It,Lt]=i.get(ge),[Et,cn]=z(He),Fn=(0,o.useRef)(!1),Rn=(0,o.useRef)(!1),In=(0,o.useRef)(Et),ar=(0,o.useRef)(mt),Xn=(0,o.useRef)(wt),Mn=()=>Xn.current,Dn=()=>Mn().isVisible()&&Mn().isOnline(),[$t,kt,jt,Jt]=L(ge,Et),pn=(0,o.useRef)({}).current,jn=d(pt)?wt.fallback[Et]:pt,bn=(Jn,qn)=>{let Nr=!0;for(const Rr in pn){const xr=Rr;xr==="data"?Ve(qn[xr],Jn[xr])||d(Jn[xr])&&Ve(qn[xr],Gn)||(Nr=!1):qn[xr]!==Jn[xr]&&(Nr=!1)}return Nr},Bn=(0,o.useMemo)(()=>{const Jn=(()=>!Et||!mt?!1:d(Ot)?Mn().isPaused()||Ke?!1:d(Ht)?!0:Ht:Ot)(),qn=xr=>{const at=b(xr);return delete at._k,Jn?Kp({isValidating:!0,isLoading:!0},at):at};let Nr=qn($t());const Rr=qn(Jt());return[()=>{const xr=qn($t());return bn(xr,Nr)?Nr:Nr=xr},()=>Rr]},[ge,Et]),Qn=(0,n.useSyncExternalStore)((0,o.useCallback)(Jn=>jt(Et,(qn,Nr)=>{bn(Nr,qn)||Jn()}),[ge,Et]),Bn[0],Bn[1]),or=!Fn.current,Sr=nt[Et]&&nt[Et].length>0,Ir=Qn.data,sr=d(Ir)?jn:Ir,lr=Qn.error,Mr=(0,o.useRef)(sr),Gn=rt?d(Ir)?Mr.current:Ir:sr,ba=(()=>Sr&&!d(lr)?!1:or&&!d(Ot)?Ot:Mn().isPaused()?!1:Ke?d(sr)?!1:Ht:d(sr)||Ht)(),Ea=!!(Et&&mt&&or&&ba),Ma=d(Qn.isValidating)?Ea:Qn.isValidating,ja=d(Qn.isLoading)?Ea:Qn.isLoading,va=(0,o.useCallback)(Jn=>Dv(this,null,function*(){const qn=ar.current;if(!Et||!qn||Rn.current||Mn().isPaused())return!1;let Nr,Rr,xr=!0;const at=Jn||{},Xe=!Lt[Et]||!at.dedupe,ct=()=>J?!Rn.current&&Et===In.current&&Fn.current:Et===In.current,lt={isValidating:!1,isLoading:!1},Mt=()=>{kt(lt)},Ye=()=>{const ue=Lt[Et];ue&&ue[1]===Rr&&delete Lt[Et]},he={isValidating:!0};d($t().data)&&(he.isLoading=!0);try{if(Xe&&(kt(he),wt.loadingTimeout&&d($t().data)&&setTimeout(()=>{xr&&ct()&&Mn().onLoadingSlow(Et,wt)},wt.loadingTimeout),Lt[Et]=[qn(cn),q()]),[Nr,Rr]=Lt[Et],Nr=yield Nr,Xe&&setTimeout(Ye,wt.dedupingInterval),!Lt[Et]||Lt[Et][1]!==Rr)return Xe&&ct()&&Mn().onDiscarded(Et),!1;lt.error=c;const ue=It[Et];if(!d(ue)&&(Rr<=ue[0]||Rr<=ue[1]||ue[1]===0))return Mt(),Xe&&ct()&&Mn().onDiscarded(Et),!1;const Pe=$t().data;lt.data=Ve(Pe,Nr)?Pe:Nr,Xe&&ct()&&Mn().onSuccess(Nr,Et,wt)}catch(ue){Ye();const Pe=Mn(),{shouldRetryOnError:pe}=Pe;Pe.isPaused()||(lt.error=ue,Xe&&ct()&&(Pe.onError(ue,Et,Pe),(pe===!0||p(pe)&&pe(ue))&&Dn()&&Pe.onErrorRetry(ue,Et,Pe,va,{retryCount:(at.retryCount||0)+1,dedupe:!0})))}return xr=!1,Mt(),!0}),[Et,ge]),er=(0,o.useCallback)((...Jn)=>xe(ge,In.current,...Jn),[]);if(T(()=>{ar.current=mt,Xn.current=wt,d(Ir)||(Mr.current=Ir)}),T(()=>{if(!Et)return;const Jn=va.bind(c,tt);let qn=0;const Rr=We(Et,nt,xr=>{if(xr==me.FOCUS_EVENT){const at=Date.now();Mn().revalidateOnFocus&&at>qn&&Dn()&&(qn=at+Mn().focusThrottleInterval,Jn())}else if(xr==me.RECONNECT_EVENT)Mn().revalidateOnReconnect&&Dn()&&Jn();else if(xr==me.MUTATE_EVENT)return va()});return Rn.current=!1,In.current=Et,Fn.current=!0,kt({_k:cn}),ba&&(d(sr)||X?Jn():j(Jn)),()=>{Rn.current=!0,Rr()}},[Et]),T(()=>{let Jn;function qn(){const Rr=p(un)?un(sr):un;Rr&&Jn!==-1&&(Jn=setTimeout(Nr,Rr))}function Nr(){!$t().error&&(Fe||Mn().isVisible())&&($e||Mn().isOnline())?va(tt).then(qn):qn()}return qn(),()=>{Jn&&(clearTimeout(Jn),Jn=-1)}},[un,Fe,$e,Et]),(0,o.useDebugValue)(Gn),Ke&&d(sr)&&Et)throw!J&&X?new Error("Fallback data is required when using suspense in SSR."):(ar.current=mt,Xn.current=wt,Rn.current=!1,d(lr)?va(tt):lr);return{mutate:er,get data(){return pn.data=!0,Gn},get error(){return pn.error=!0,lr},get isValidating(){return pn.isValidating=!0,Ma},get isLoading(){return pn.isLoading=!0,ja}}},Je=u.defineProperty(ne,"defaultValue",{value:xt}),Nt=He=>serialize(He)[0];var _e=be(ht)}},Zs={};function fe(y){var g=Zs[y];if(g!==void 0)return g.exports;var e=Zs[y]={id:y,loaded:!1,exports:{}};return bl[y].call(e.exports,e,e.exports,fe),e.loaded=!0,e.exports}fe.m=bl,function(){fe.n=function(y){var g=y&&y.__esModule?function(){return y.default}:function(){return y};return fe.d(g,{a:g}),g}}(),function(){var y=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},g;fe.t=function(e,o){if(o&1&&(e=this(e)),o&8||typeof e=="object"&&e&&(o&4&&e.__esModule||o&16&&typeof e.then=="function"))return e;var n=Object.create(null);fe.r(n);var i={};g=g||[null,y({}),y([]),y(y)];for(var l=o&2&&e;typeof l=="object"&&!~g.indexOf(l);l=y(l))Object.getOwnPropertyNames(l).forEach(function(r){i[r]=function(){return e[r]}});return i.default=function(){return e},fe.d(n,i),n}}(),function(){fe.d=function(y,g){for(var e in g)fe.o(g,e)&&!fe.o(y,e)&&Object.defineProperty(y,e,{enumerable:!0,get:g[e]})}}(),function(){fe.f={},fe.e=function(y){return Promise.all(Object.keys(fe.f).reduce(function(g,e){return fe.f[e](y,g),g},[]))}}(),function(){fe.u=function(y){return""+({81:"p__Message__Noreply__index",96:"p__Plugin__Share__index",145:"p__Plugin__Subscribe__index",185:"p__Welcome",274:"p__Carry__index",294:"p__Basic__index",301:"t__plugin-layout__Layout",354:"p__Storage__index",366:"p__User__Login__index",398:"p__Script__index",402:"p__Reply__index",430:"p__Master__index",538:"p__Message__Private__index",571:"p__404",583:"p__Proxy__index",737:"p__Plugin__Publish__index",785:"p__Task__index",929:"p__Secret__Fenyong__index",966:"p__Message__Listen__index"}[y]||y)+"."+{54:"698cd806",81:"03769b16",96:"02ff4e75",118:"99dbea07",145:"694c5bee",185:"31f51469",273:"3dfaac85",274:"4084fffc",294:"a03f98fd",301:"f972cb61",315:"ca5fa681",354:"39955b7e",361:"a6a74763",366:"79d74ddd",398:"2bc8fdd4",402:"6c9f04e9",430:"fbcdd152",454:"045543df",472:"ccfb3d48",513:"85a5f606",538:"abd92429",571:"7e3f819c",583:"fe3ee7f9",630:"42a3526e",650:"6dec3238",667:"549fbc40",737:"3b4ea689",785:"93ba94ae",797:"abf50122",852:"e34fba04",929:"786bcbc5",964:"43acb396",966:"e98ce39a",989:"2d9cc9ce"}[y]+".async.js"}}(),function(){fe.miniCssF=function(y){return"t__plugin-layout__Layout.74b4118c.chunk.css"}}(),function(){fe.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(y){if(typeof window=="object")return window}}()}(),function(){fe.o=function(y,g){return Object.prototype.hasOwnProperty.call(y,g)}}(),function(){var y={},g="ant-design-pro:";fe.l=function(e,o,n,i){if(y[e]){y[e].push(o);return}var l,r;if(n!==void 0)for(var f=document.getElementsByTagName("script"),c=0;c0&&(0,n.to)(T)-F&&(0,n.R3)(A>32?u(T+";",v,b,F-1):u((0,n.gx)(T," ","")+";",v,b,F-2),$);break;case 59:T+=";";default:if((0,n.R3)(j=f(T,p,b,O,N,S,L,K,J=[],X=[],F),P),G===123)if(N===0)r(T,p,j,j,J,P,F,L,X);else switch(M===99&&(0,n.uO)(T,3)===110?100:M){case 100:case 109:case 115:r(d,j,j,v&&(0,n.R3)(f(d,j,j,0,0,S,L,K,S,J=[],F),X),S,X,F,L,v?J:X);break;default:r(T,j,j,j,[""],X,0,L,X)}}O=N=A=0,V=Y=1,K=T="",F=R;break;case 58:F=1+(0,n.to)(T),A=D;default:if(V<1){if(G==123)--V;else if(G==125&&V++==0&&(0,i.mp)()==125)continue}switch(T+=(0,n.Dp)(G),G*V){case 38:Y=N>0?1:(T+="\f",-1);break;case 44:L[O++]=((0,n.to)(T)-1)*Y,Y=1;break;case 64:(0,i.fj)()===45&&(T+=(0,i.iF)((0,i.lp)())),M=(0,i.fj)(),N=F=(0,n.to)(K=T+=(0,i.QU)((0,i.Ud)())),G++;break;case 45:D===45&&(0,n.to)(T)==2&&(V=0)}}return P}function f(d,p,b,v,S,P,R,L,$,O,N){for(var F=S-1,M=S===0?P:[""],A=(0,n.Ei)(M),D=0,V=0,U=0;D0?M[Y]+" "+G:(0,n.gx)(G,/&\f/g,M[Y])))&&($[U++]=K);return(0,i.dH)(d,p,b,S===0?o.Fr:L,$,O,N)}function c(d,p,b){return(0,i.dH)(d,p,b,o.Ab,(0,n.Dp)((0,i.Tb)()),(0,n.tb)(d,2,-2),0)}function u(d,p,b,v){return(0,i.dH)(d,p,b,o.h5,(0,n.tb)(d,0,v),(0,n.tb)(d,v+1,-1),v)}},90137:function(y,g,e){"use strict";e.d(g,{P:function(){return l},q:function(){return i}});var o=e(71448),n=e(22697);function i(r,f){for(var c="",u=(0,n.Ei)(r),d=0;d0?(0,o.uO)(c,--r):0,i--,f===10&&(i=1,n--),f}function v(){return f=r2||L(f)>3?"":" "}function A(G){for(;v();)switch(L(f)){case 0:append(Y(r-1),G);break;case 2:append(N(f),G);break;default:append(from(f),G)}return G}function D(G,K){for(;--K&&v()&&!(f<48||f>102||f>57&&f<65||f>70&&f<97););return R(G,P()+(K<6&&S()==32&&v()==32))}function V(G){for(;v();)switch(f){case G:return r;case 34:case 39:G!==34&&G!==39&&V(f);break;case 40:G===41&&V(G);break;case 92:v();break}return r}function U(G,K){for(;v()&&G+f!==57;)if(G+f===84&&S()===47)break;return"/*"+R(K,r-1)+"*"+(0,o.Dp)(G===47?G:v())}function Y(G){for(;!L(S());)v();return R(G,r)}},22697:function(y,g,e){"use strict";e.d(g,{$e:function(){return P},Cw:function(){return u},Dp:function(){return n},EQ:function(){return f},Ei:function(){return v},R3:function(){return S},Wn:function(){return o},f0:function(){return i},fy:function(){return r},gx:function(){return c},tb:function(){return p},to:function(){return b},uO:function(){return d},vp:function(){return l}});var o=Math.abs,n=String.fromCharCode,i=Object.assign;function l(R,L){return d(R,0)^45?(((L<<2^d(R,0))<<2^d(R,1))<<2^d(R,2))<<2^d(R,3):0}function r(R){return R.trim()}function f(R,L){return(R=L.exec(R))?R[0]:R}function c(R,L,$){return R.replace(L,$)}function u(R,L){return R.indexOf(L)}function d(R,L){return R.charCodeAt(L)|0}function p(R,L,$){return R.slice(L,$)}function b(R){return R.length}function v(R){return R.length}function S(R,L){return L.push(R),R}function P(R,L){return R.map(L).join("")}},94083:function(y,g,e){"use strict";e.d(g,{J$:function(){return Je},ZP:function(){return _e},kY:function(){return ee}});var o=e(50959),n=e(4322);const i=new WeakMap,l={},r={},f=()=>{},c=f(),u=Object,d=He=>He===c,p=He=>typeof He=="function",b=(He,mt)=>Kp(Kp({},He),mt),v="undefined",S=typeof window!=v,P=typeof document!=v,R=()=>S&&typeof window.requestAnimationFrame!=v,L=(He,mt)=>{const wt=i.get(He);return[()=>He.get(mt)||l,ge=>{if(!d(mt)){const Ve=He.get(mt);mt in r||(r[mt]=Ve),wt[5](mt,b(Ve,ge),Ve||l)}},wt[6],()=>!d(mt)&&mt in r?r[mt]:He.get(mt)||l]},$=new WeakMap;let O=0;const N=He=>{const mt=typeof He,wt=He&&He.constructor,ge=wt==Date;let Ve,Ke;if(u(He)===He&&!ge&&wt!=RegExp){if(Ve=$.get(He),Ve)return Ve;if(Ve=++O+"~",$.set(He,Ve),wt==Array){for(Ve="@",Ke=0;KeF,[A,D]=S&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[f,f],V=()=>{const He=P&&document.visibilityState;return d(He)||He!=="hidden"},U=He=>(P&&document.addEventListener("visibilitychange",He),A("focus",He),()=>{P&&document.removeEventListener("visibilitychange",He),D("focus",He)}),Y=He=>{const mt=()=>{F=!0,He()},wt=()=>{F=!1};return A("online",mt),A("offline",wt),()=>{D("online",mt),D("offline",wt)}},G={isOnline:M,isVisible:V},K={initFocus:U,initReconnect:Y},J=!o.useId,X=!S||"Deno"in window,j=He=>R()?window.requestAnimationFrame(He):setTimeout(He,1),T=X?o.useEffect:o.useLayoutEffect,x=typeof navigator!="undefined"&&navigator.connection,B=!X&&x&&(["slow-2g","2g"].includes(x.effectiveType)||x.saveData),z=He=>{if(p(He))try{He=He()}catch(wt){He=""}const mt=He;return He=typeof He=="string"?He:(Array.isArray(He)?He.length:He)?N(He):"",[He,mt]};let Z=0;const q=()=>++Z,te=0,ye=1,ce=2;var me={__proto__:null,FOCUS_EVENT:te,RECONNECT_EVENT:ye,MUTATE_EVENT:ce};function xe(...He){return Dv(this,null,function*(){const[mt,wt,ge,Ve]=He,Ke=b({populateCache:!0,throwOnError:!0},typeof Ve=="boolean"?{revalidate:Ve}:Ve||{});let pt=Ke.populateCache;const Ot=Ke.rollbackOnError;let Ht=Ke.optimisticData;const un=Ke.revalidate!==!1,Fe=nt=>typeof Ot=="function"?Ot(nt):Ot!==!1,$e=Ke.throwOnError;if(p(wt)){const nt=wt,It=[],Lt=mt.keys();for(let Et=Lt.next();!Et.done;Et=Lt.next()){const cn=Et.value;!cn.startsWith("$inf$")&&nt(mt.get(cn)._k)&&It.push(cn)}return Promise.all(It.map(rt))}return rt(wt);function rt(nt){return Dv(this,null,function*(){const[It]=z(nt);if(!It)return;const[Lt,Et]=L(mt,It),[cn,Fn,Rn]=i.get(mt),In=cn[It],ar=()=>un&&(delete Rn[It],In&&In[0])?In[0](ce).then(()=>Lt().data):Lt().data;if(He.length<3)return ar();let Xn=ge,Mn;const Dn=q();Fn[It]=[Dn,0];const $t=!d(Ht),kt=Lt(),jt=kt.data,Jt=kt._c,pn=d(Jt)?jt:Jt;if($t&&(Ht=p(Ht)?Ht(pn):Ht,Et({data:Ht,_c:pn})),p(Xn))try{Xn=Xn(pn)}catch(bn){Mn=bn}if(Xn&&p(Xn.then))if(Xn=yield Xn.catch(bn=>{Mn=bn}),Dn!==Fn[It][0]){if(Mn)throw Mn;return Xn}else Mn&&$t&&Fe(Mn)&&(pt=!0,Xn=pn,Et({data:Xn,_c:c}));pt&&(Mn||(p(pt)&&(Xn=pt(Xn,pn)),Et({data:Xn,_c:c}))),Fn[It][1]=q();const jn=yield ar();if(Et({_c:c}),Mn){if($e)throw Mn;return}return pt?jn:Xn})}})}const Le=(He,mt)=>{for(const wt in He)He[wt][0]&&He[wt][0](mt)},Be=(He,mt)=>{if(!i.has(He)){const wt=b(K,mt),ge={},Ve=xe.bind(c,He);let Ke=f;const pt={},Ot=(Fe,$e)=>{const rt=pt[Fe]||[];return pt[Fe]=rt,rt.push($e),()=>rt.splice(rt.indexOf($e),1)},Ht=(Fe,$e,rt)=>{He.set(Fe,$e);const nt=pt[Fe];if(nt)for(let It=nt.length;It--;)nt[It]($e,rt)},un=()=>{if(!i.has(He)&&(i.set(He,[ge,{},{},{},Ve,Ht,Ot]),!X)){const Fe=wt.initFocus(setTimeout.bind(c,Le.bind(c,ge,te))),$e=wt.initReconnect(setTimeout.bind(c,Le.bind(c,ge,ye)));Ke=()=>{Fe&&Fe(),$e&&$e(),i.delete(He)}}};return un(),[He,Ve,un,Ke]}return[He,i.get(He)[4]]},Oe=(He,mt,wt,ge,Ve)=>{const Ke=wt.errorRetryCount,pt=Ve.retryCount,Ot=~~((Math.random()+.5)*(1<<(pt<8?pt:8)))*wt.errorRetryInterval;!d(Ke)&&pt>Ke||setTimeout(ge,Ot,Ve)},Re=(He,mt)=>N(He)==N(mt),[st,Ct]=Be(new Map),xt=b({onLoadingSlow:f,onSuccess:f,onError:f,onErrorRetry:Oe,onDiscarded:f,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:B?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:B?5e3:3e3,compare:Re,isPaused:()=>!1,cache:st,mutate:Ct,fallback:{}},G),St=(He,mt)=>{const wt=b(He,mt);if(mt){const{use:ge,fallback:Ve}=He,{use:Ke,fallback:pt}=mt;ge&&Ke&&(wt.use=ge.concat(Ke)),Ve&&pt&&(wt.fallback=b(Ve,pt))}return wt},At=(0,o.createContext)({}),ne=He=>{const{value:mt}=He,wt=(0,o.useContext)(At),ge=p(mt),Ve=(0,o.useMemo)(()=>ge?mt(wt):mt,[ge,wt,mt]),Ke=(0,o.useMemo)(()=>ge?Ve:St(wt,Ve),[ge,wt,Ve]),pt=Ve&&Ve.provider,[Ot]=(0,o.useState)(()=>pt?Be(pt(Ke.cache||st),Ve):c);return Ot&&(Ke.cache=Ot[0],Ke.mutate=Ot[1]),T(()=>{if(Ot)return Ot[2]&&Ot[2](),Ot[3]},[]),(0,o.createElement)(At.Provider,b(He,{value:Ke}))},k=S&&window.__SWR_DEVTOOLS_USE__,E=k?window.__SWR_DEVTOOLS_USE__:[],C=()=>{k&&(window.__SWR_DEVTOOLS_REACT__=o)},Q=He=>p(He[1])?[He[0],He[1],He[2]||{}]:[He[0],null,(He[1]===null?He[2]:He[1])||{}],ee=()=>b(xt,(0,o.useContext)(At)),le=(He,mt)=>{const wt=z(He)[0],[,,,ge]=i.get(st);if(ge[wt])return ge[wt];const Ve=mt(He);return ge[wt]=Ve,Ve},Ee=He=>(mt,wt,ge)=>He(mt,wt&&((...Ke)=>{const pt=z(mt)[0],[,,,Ot]=i.get(st),Ht=Ot[pt];return Ht?(delete Ot[pt],Ht):wt(...Ke)}),ge),oe=E.concat(Ee),be=He=>function(...wt){const ge=ee(),[Ve,Ke,pt]=Q(wt),Ot=St(ge,pt);let Ht=He;const{use:un}=Ot,Fe=(un||[]).concat(oe);for(let $e=Fe.length;$e--;)Ht=Fe[$e](Ht);return Ht(Ve,Ke||Ot.fetcher||null,Ot)},ot=He=>{const mt=useState({})[1],wt=useRef(!1),ge=useRef(He),Ve=useRef({data:!1,error:!1,isValidating:!1}),Ke=useCallback(pt=>{let Ot=!1;const Ht=ge.current;for(const un in pt){const Fe=un;Ht[Fe]!==pt[Fe]&&(Ht[Fe]=pt[Fe],Ve.current[Fe]&&(Ot=!0))}Ot&&!wt.current&&(J?mt({}):React.startTransition(()=>mt({})))},[]);return T(()=>(wt.current=!1,()=>{wt.current=!0})),[ge,Ve.current,Ke]},We=(He,mt,wt)=>{const ge=mt[He]||(mt[He]=[]);return ge.push(wt),()=>{const Ve=ge.indexOf(wt);Ve>=0&&(ge[Ve]=ge[ge.length-1],ge.pop())}},we=(He,mt)=>(...wt)=>{const[ge,Ve,Ke]=Q(wt),pt=(Ke.use||[]).concat(mt);return He(ge,Ve,KC(Kp({},Ke),{use:pt}))};C();const tt={dedupe:!0},ht=(He,mt,wt)=>{const{cache:ge,compare:Ve,suspense:Ke,fallbackData:pt,revalidateOnMount:Ot,revalidateIfStale:Ht,refreshInterval:un,refreshWhenHidden:Fe,refreshWhenOffline:$e,keepPreviousData:rt}=wt,[nt,It,Lt]=i.get(ge),[Et,cn]=z(He),Fn=(0,o.useRef)(!1),Rn=(0,o.useRef)(!1),In=(0,o.useRef)(Et),ar=(0,o.useRef)(mt),Xn=(0,o.useRef)(wt),Mn=()=>Xn.current,Dn=()=>Mn().isVisible()&&Mn().isOnline(),[$t,kt,jt,Jt]=L(ge,Et),pn=(0,o.useRef)({}).current,jn=d(pt)?wt.fallback[Et]:pt,bn=(Jn,qn)=>{let Nr=!0;for(const Rr in pn){const xr=Rr;xr==="data"?Ve(qn[xr],Jn[xr])||d(Jn[xr])&&Ve(qn[xr],Gn)||(Nr=!1):qn[xr]!==Jn[xr]&&(Nr=!1)}return Nr},Bn=(0,o.useMemo)(()=>{const Jn=(()=>!Et||!mt?!1:d(Ot)?Mn().isPaused()||Ke?!1:d(Ht)?!0:Ht:Ot)(),qn=xr=>{const at=b(xr);return delete at._k,Jn?Kp({isValidating:!0,isLoading:!0},at):at};let Nr=qn($t());const Rr=qn(Jt());return[()=>{const xr=qn($t());return bn(xr,Nr)?Nr:Nr=xr},()=>Rr]},[ge,Et]),Qn=(0,n.useSyncExternalStore)((0,o.useCallback)(Jn=>jt(Et,(qn,Nr)=>{bn(Nr,qn)||Jn()}),[ge,Et]),Bn[0],Bn[1]),or=!Fn.current,Sr=nt[Et]&&nt[Et].length>0,Ir=Qn.data,sr=d(Ir)?jn:Ir,lr=Qn.error,Mr=(0,o.useRef)(sr),Gn=rt?d(Ir)?Mr.current:Ir:sr,ba=(()=>Sr&&!d(lr)?!1:or&&!d(Ot)?Ot:Mn().isPaused()?!1:Ke?d(sr)?!1:Ht:d(sr)||Ht)(),Ea=!!(Et&&mt&&or&&ba),Ma=d(Qn.isValidating)?Ea:Qn.isValidating,ja=d(Qn.isLoading)?Ea:Qn.isLoading,va=(0,o.useCallback)(Jn=>Dv(this,null,function*(){const qn=ar.current;if(!Et||!qn||Rn.current||Mn().isPaused())return!1;let Nr,Rr,xr=!0;const at=Jn||{},Xe=!Lt[Et]||!at.dedupe,ct=()=>J?!Rn.current&&Et===In.current&&Fn.current:Et===In.current,lt={isValidating:!1,isLoading:!1},Mt=()=>{kt(lt)},Ye=()=>{const ue=Lt[Et];ue&&ue[1]===Rr&&delete Lt[Et]},he={isValidating:!0};d($t().data)&&(he.isLoading=!0);try{if(Xe&&(kt(he),wt.loadingTimeout&&d($t().data)&&setTimeout(()=>{xr&&ct()&&Mn().onLoadingSlow(Et,wt)},wt.loadingTimeout),Lt[Et]=[qn(cn),q()]),[Nr,Rr]=Lt[Et],Nr=yield Nr,Xe&&setTimeout(Ye,wt.dedupingInterval),!Lt[Et]||Lt[Et][1]!==Rr)return Xe&&ct()&&Mn().onDiscarded(Et),!1;lt.error=c;const ue=It[Et];if(!d(ue)&&(Rr<=ue[0]||Rr<=ue[1]||ue[1]===0))return Mt(),Xe&&ct()&&Mn().onDiscarded(Et),!1;const Pe=$t().data;lt.data=Ve(Pe,Nr)?Pe:Nr,Xe&&ct()&&Mn().onSuccess(Nr,Et,wt)}catch(ue){Ye();const Pe=Mn(),{shouldRetryOnError:pe}=Pe;Pe.isPaused()||(lt.error=ue,Xe&&ct()&&(Pe.onError(ue,Et,Pe),(pe===!0||p(pe)&&pe(ue))&&Dn()&&Pe.onErrorRetry(ue,Et,Pe,va,{retryCount:(at.retryCount||0)+1,dedupe:!0})))}return xr=!1,Mt(),!0}),[Et,ge]),er=(0,o.useCallback)((...Jn)=>xe(ge,In.current,...Jn),[]);if(T(()=>{ar.current=mt,Xn.current=wt,d(Ir)||(Mr.current=Ir)}),T(()=>{if(!Et)return;const Jn=va.bind(c,tt);let qn=0;const Rr=We(Et,nt,xr=>{if(xr==me.FOCUS_EVENT){const at=Date.now();Mn().revalidateOnFocus&&at>qn&&Dn()&&(qn=at+Mn().focusThrottleInterval,Jn())}else if(xr==me.RECONNECT_EVENT)Mn().revalidateOnReconnect&&Dn()&&Jn();else if(xr==me.MUTATE_EVENT)return va()});return Rn.current=!1,In.current=Et,Fn.current=!0,kt({_k:cn}),ba&&(d(sr)||X?Jn():j(Jn)),()=>{Rn.current=!0,Rr()}},[Et]),T(()=>{let Jn;function qn(){const Rr=p(un)?un(sr):un;Rr&&Jn!==-1&&(Jn=setTimeout(Nr,Rr))}function Nr(){!$t().error&&(Fe||Mn().isVisible())&&($e||Mn().isOnline())?va(tt).then(qn):qn()}return qn(),()=>{Jn&&(clearTimeout(Jn),Jn=-1)}},[un,Fe,$e,Et]),(0,o.useDebugValue)(Gn),Ke&&d(sr)&&Et)throw!J&&X?new Error("Fallback data is required when using suspense in SSR."):(ar.current=mt,Xn.current=wt,Rn.current=!1,d(lr)?va(tt):lr);return{mutate:er,get data(){return pn.data=!0,Gn},get error(){return pn.error=!0,lr},get isValidating(){return pn.isValidating=!0,Ma},get isLoading(){return pn.isLoading=!0,ja}}},Je=u.defineProperty(ne,"defaultValue",{value:xt}),Nt=He=>serialize(He)[0];var _e=be(ht)}},Zs={};function fe(y){var g=Zs[y];if(g!==void 0)return g.exports;var e=Zs[y]={id:y,loaded:!1,exports:{}};return bl[y].call(e.exports,e,e.exports,fe),e.loaded=!0,e.exports}fe.m=bl,function(){fe.n=function(y){var g=y&&y.__esModule?function(){return y.default}:function(){return y};return fe.d(g,{a:g}),g}}(),function(){var y=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},g;fe.t=function(e,o){if(o&1&&(e=this(e)),o&8||typeof e=="object"&&e&&(o&4&&e.__esModule||o&16&&typeof e.then=="function"))return e;var n=Object.create(null);fe.r(n);var i={};g=g||[null,y({}),y([]),y(y)];for(var l=o&2&&e;typeof l=="object"&&!~g.indexOf(l);l=y(l))Object.getOwnPropertyNames(l).forEach(function(r){i[r]=function(){return e[r]}});return i.default=function(){return e},fe.d(n,i),n}}(),function(){fe.d=function(y,g){for(var e in g)fe.o(g,e)&&!fe.o(y,e)&&Object.defineProperty(y,e,{enumerable:!0,get:g[e]})}}(),function(){fe.f={},fe.e=function(y){return Promise.all(Object.keys(fe.f).reduce(function(g,e){return fe.f[e](y,g),g},[]))}}(),function(){fe.u=function(y){return""+({81:"p__Message__Noreply__index",96:"p__Plugin__Share__index",145:"p__Plugin__Subscribe__index",185:"p__Welcome",274:"p__Carry__index",294:"p__Basic__index",301:"t__plugin-layout__Layout",354:"p__Storage__index",366:"p__User__Login__index",398:"p__Script__index",402:"p__Reply__index",430:"p__Master__index",538:"p__Message__Private__index",571:"p__404",583:"p__Proxy__index",737:"p__Plugin__Publish__index",785:"p__Task__index",929:"p__Secret__Fenyong__index",966:"p__Message__Listen__index"}[y]||y)+"."+{54:"698cd806",81:"c2b933c9",96:"69ddc986",118:"99dbea07",145:"2e369a36",185:"31f51469",273:"3dfaac85",274:"4084fffc",294:"a03f98fd",301:"f972cb61",315:"ca5fa681",354:"a02332d9",361:"a6a74763",366:"79d74ddd",398:"55ac683c",402:"6c9f04e9",430:"fbcdd152",454:"045543df",472:"ccfb3d48",513:"13ef631c",538:"2234b749",571:"7e3f819c",583:"fe3ee7f9",630:"42a3526e",650:"6dec3238",667:"549fbc40",737:"a50d97f4",785:"93ba94ae",797:"abf50122",852:"e34fba04",929:"786bcbc5",964:"43acb396",966:"112d882f",989:"2d9cc9ce"}[y]+".async.js"}}(),function(){fe.miniCssF=function(y){return"t__plugin-layout__Layout.74b4118c.chunk.css"}}(),function(){fe.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(y){if(typeof window=="object")return window}}()}(),function(){fe.o=function(y,g){return Object.prototype.hasOwnProperty.call(y,g)}}(),function(){var y={},g="ant-design-pro:";fe.l=function(e,o,n,i){if(y[e]){y[e].push(o);return}var l,r;if(n!==void 0)for(var f=document.getElementsByTagName("script"),c=0;c0})),ma=bs({routesById:Cn,routeComponents:jr,parentId:ia.id,loadingComponent:Nn.loadingComponent,reactRouter5Compat:Nn.reactRouter5Compat});return ma.length>0&&(ia.children=ma,ia.routes=ma),ia})}function Js(Nn){var Cn=(0,ko.UO)(),Cr=(0,Pa.Z)((0,Pa.Z)({},Nn),{},{to:(0,ko.Gn)(Nn.to,Cn)});return pr.createElement(ko.Fg,(0,Po.Z)({replace:!0},Cr))}function wa(Nn){var Cn=Nn.route,Cr=Cn.redirect,jr=(0,ys.Z)(Cn,xi),_r=Nn.reactRouter5Compat?mr:Xr;return(0,Pa.Z)({element:Cr?pr.createElement(Js,{to:Cr}):pr.createElement(Si.Provider,{value:{route:Nn.route}},pr.createElement(_r,{loader:pr.memo(Nn.routeComponent),loadingComponent:Nn.loadingComponent||Yr,hasChildren:Nn.hasChildren}))},jr)}function Yr(){return pr.createElement("div",null)}function mr(Nn){var Cn=Xo(),Cr=Cn.route,jr=(0,bi.Ov)(),_r=jr.history,ia=jr.clientRoutes,ma=(0,ko.UO)(),Na={params:ma,isExact:!0,path:Cr.path,url:_r.location.pathname},to=Nn.loader;return pr.createElement(pr.Suspense,{fallback:pr.createElement(Nn.loadingComponent,null)},pr.createElement(to,{location:_r.location,match:Na,history:_r,params:ma,route:Cr,routes:ia},Nn.hasChildren&&pr.createElement(ko.j3,null)))}function Xr(Nn){var Cn=Nn.loader;return pr.createElement(pr.Suspense,{fallback:pr.createElement(Nn.loadingComponent,null)},pr.createElement(Cn,null))}var zr=null;function zo(){return zr}function li(Nn){var Cn=Nn.history,Cr=pr.useState({action:Cn.action,location:Cn.location}),jr=(0,Go.Z)(Cr,2),_r=jr[0],ia=jr[1];return(0,pr.useLayoutEffect)(function(){return Cn.listen(ia)},[Cn]),(0,pr.useLayoutEffect)(function(){function ma(Na){Nn.pluginManager.applyPlugins({key:"onRouteChange",type:"event",args:{routes:Nn.routes,clientRoutes:Nn.clientRoutes,location:Na.location,action:Na.action,basename:Nn.basename,isFirst:Boolean(Na.isFirst)}})}Cn.listen(ma),ma({location:_r.location,action:_r.action,isFirst:!0})},[Cn,Nn.routes,Nn.clientRoutes]),pr.createElement(ko.F0,{navigator:Cn,location:_r.location,basename:Nn.basename},Nn.children)}function vo(){var Nn=(0,bi.Ov)(),Cn=Nn.clientRoutes;return(0,ko.V$)(Cn)}var zi=["innerProvider","i18nProvider","accessProvider","dataflowProvider","outerProvider","rootContainer"],Za=function(Cn,Cr){var jr=Cn.basename||"/",_r=bs({routesById:Cn.routes,routeComponents:Cn.routeComponents,loadingComponent:Cn.loadingComponent,reactRouter5Compat:Cn.reactRouter5Compat});Cn.pluginManager.applyPlugins({key:"patchClientRoutes",type:"event",args:{routes:_r}});for(var ia=pr.createElement(li,{basename:jr,pluginManager:Cn.pluginManager,routes:Cn.routes,clientRoutes:_r,history:Cn.history},Cr),ma=0,Na=zi;ma 2 { - go RemNodePlugin(ss[len(ss)-2]) - } - - } else { - err := os.WriteFile(filename, []byte(new), 0755) - if err != nil { - return &storage.Final{ - Error: err, + { + for _, f := range Functions { + if f.UUID == key { + filename := f.Path + if new == "reload" { //重载 + go f.Reload() + } else if new == "" { + ss := strings.Split(filename, "/") + os.RemoveAll(filepath.Dir(filename)) + // fmt.Println(strings.Join(ss, " ")) + if len(ss) > 2 { + go RemNodePlugin(ss[len(ss)-2]) + } + } else { + err := os.WriteFile(filename, []byte(new), 0755) + if err != nil { + return &storage.Final{ + Error: err, + } } } } diff --git a/core/plugin_parse.go b/core/plugin_parse.go index cb14794..0aed903 100644 --- a/core/plugin_parse.go +++ b/core/plugin_parse.go @@ -6,7 +6,6 @@ import ( "strings" "github.com/cdle/sillyplus/core/common" - "github.com/cdle/sillyplus/core/storage" "github.com/cdle/sillyplus/utils" ) @@ -47,16 +46,16 @@ func pluginParse(script string, uuid string) (*common.Function, []func()) { rule := strings.TrimSpace(res[2]) rule = parseReply3(rule, func(s1, s2 string) { k := s1 + "." + s2 - if _, ok := ks[k]; !ok { - cbs = append(cbs, func() { - storage.Watch(MakeBucket(s1), s2, func(old, new, key string) *storage.Final { - return &storage.Final{ - EndFunc: func() { - plugins.Set(uuid, "reload") - }, - } - }, uuid) - }) + if _, ok := ks[k]; !ok { //已改成表单提交触发 + // cbs = append(cbs, func() { + // storage.Watch(MakeBucket(s1), s2, func(old, new, key string) *storage.Final { + // return &storage.Final{ + // EndFunc: func() { + // plugins.Set(uuid, "reload") + // }, + // } + // }, uuid) + // }) ks[k] = true } })