diff --git a/config/src/main/java/com/alibaba/nacos/config/server/remote/ConfigQueryRequestHandler.java b/config/src/main/java/com/alibaba/nacos/config/server/remote/ConfigQueryRequestHandler.java index 063d9ee18a..696748b81b 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/remote/ConfigQueryRequestHandler.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/remote/ConfigQueryRequestHandler.java @@ -23,8 +23,6 @@ import com.alibaba.nacos.api.remote.response.ResponseCode; import com.alibaba.nacos.auth.annotation.Secured; import com.alibaba.nacos.common.utils.NamespaceUtil; -import com.alibaba.nacos.common.utils.StringUtils; -import com.alibaba.nacos.config.server.model.CacheItem; import com.alibaba.nacos.config.server.model.ConfigCacheGray; import com.alibaba.nacos.config.server.model.gray.BetaGrayRule; import com.alibaba.nacos.config.server.model.gray.TagGrayRule; @@ -47,6 +45,7 @@ import org.springframework.stereotype.Component; import java.net.URLEncoder; + import static com.alibaba.nacos.config.server.constant.Constants.ENCODE_UTF8; import static com.alibaba.nacos.config.server.utils.LogUtil.PULL_LOG; import static com.alibaba.nacos.config.server.utils.RequestUtil.CLIENT_APPNAME_HEADER; @@ -84,7 +83,8 @@ public ConfigQueryResponse handle(ConfigQueryRequest request, RequestMeta meta) String requestIpApp = meta.getLabels().get(CLIENT_APPNAME_HEADER); String clientIp = meta.getClientIp(); - ConfigQueryChainRequest chainRequest = ConfigChainRequestExtractorService.getExtractor().extract(request, meta); + ConfigQueryChainRequest chainRequest = ConfigChainRequestExtractorService.getExtractor() + .extract(request, meta); ConfigQueryChainResponse chainResponse = configQueryChainService.handle(chainRequest); if (ResponseCode.FAIL.getCode() == chainResponse.getResultCode()) { @@ -92,7 +92,8 @@ public ConfigQueryResponse handle(ConfigQueryRequest request, RequestMeta meta) } if (chainResponse.getStatus() == ConfigQueryChainResponse.ConfigQueryStatus.CONFIG_NOT_FOUND) { - return handlerConfigNotFound(request.getDataId(), request.getGroup(), request.getTenant(), requestIpApp, clientIp, notify); + return handlerConfigNotFound(request.getDataId(), request.getGroup(), request.getTenant(), requestIpApp, + clientIp, notify); } if (chainResponse.getStatus() == ConfigQueryChainResponse.ConfigQueryStatus.CONFIG_QUERY_CONFLICT) { @@ -129,10 +130,11 @@ public ConfigQueryResponse handle(ConfigQueryRequest request, RequestMeta meta) } String pullEvent = resolvePullEventType(chainResponse, request.getTag()); - LogUtil.PULL_CHECK_LOG.warn("{}|{}|{}|{}", groupKey, clientIp, response.getMd5(), TimeUtils.getCurrentTimeStr()); + LogUtil.PULL_CHECK_LOG.warn("{}|{}|{}|{}", groupKey, clientIp, response.getMd5(), + TimeUtils.getCurrentTimeStr()); final long delayed = notify ? -1 : System.currentTimeMillis() - response.getLastModified(); - ConfigTraceService.logPullEvent(dataId, group, tenant, requestIpApp, response.getLastModified(), pullEvent, pullType, - delayed, clientIp, notify, "grpc"); + ConfigTraceService.logPullEvent(dataId, group, tenant, requestIpApp, response.getLastModified(), pullEvent, + pullType, delayed, clientIp, notify, "grpc"); return response; diff --git a/console/src/main/resources/static/index.html b/console/src/main/resources/static/index.html index f1df9f7e19..f6cf7a41f1 100644 --- a/console/src/main/resources/static/index.html +++ b/console/src/main/resources/static/index.html @@ -35,7 +35,7 @@ - +
@@ -56,6 +56,6 @@ - + diff --git a/console/src/main/resources/static/js/main.js b/console/src/main/resources/static/js/main.js index 572cc38d19..7d4cdb0af5 100644 --- a/console/src/main/resources/static/js/main.js +++ b/console/src/main/resources/static/js/main.js @@ -1,4 +1,4 @@ -!function(n){var a={};function r(e){var t;return(a[e]||(t=a[e]={i:e,l:!1,exports:{}},n[e].call(t.exports,t,t.exports,r),t.l=!0,t)).exports}r.m=n,r.c=a,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)r.d(n,a,function(e){return t[e]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=462)}([function(e,t,n){"use strict";e.exports=n(469)},function(e,t,n){"use strict";n.d(t,"b",function(){return T}),n.d(t,"f",function(){return L}),n.d(t,"c",function(){return m}),n.d(t,"d",function(){return a}),n.d(t,"a",function(){return o}),n.d(t,"e",function(){return O});n(47);var t=n(24),c=n.n(t),l=n(76),r=n(94),d=n(62),f=n(32),t=n(111),u=n.n(t),t=n(68),p=n.n(t),h=n(22);function m(){var e=window.location.href,e=(localStorage.removeItem("token"),e.split("#")[0]);console.log("base_url",e),window.location="".concat(e,"#/login")}function a(){var e=window.location.href,e=(localStorage.removeItem("token"),e.split("#")[0]);window.location="".concat(e,"#/register")}function o(e){for(var t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",n="",a=0;a 16.8.0")},p.prototype.validate=function(e,t){this.validateCallback(e,t)},p.prototype.reset=function(e){var t=1","Select");t=l(e,t);return e.onInputUpdate&&(t.onSearch=e.onInputUpdate,t.showSearch=!0),t}}),t.default=a.default.config(r.default,{transform:l,exportNames:["focusInput","handleSearchClear"]}),e.exports=t.default},function(M,e,t){"use strict";t.d(e,"a",function(){return a}),t.d(e,"b",function(){return U});var x=t(0),C=t.n(x),c=C.a.createContext(null);function l(){return n}var n=function(e){e()};var r={notify:function(){},get:function(){return[]}};function T(t,n){var o,i=r;function s(){e.onStateChange&&e.onStateChange()}function a(){var e,a,r;o||(o=n?n.addNestedSub(s):t.subscribe(s),e=l(),r=a=null,i={clear:function(){r=a=null},notify:function(){e(function(){for(var e=a;e;)e.callback(),e=e.next})},get:function(){for(var e=[],t=a;t;)e.push(t),t=t.next;return e},subscribe:function(e){var t=!0,n=r={callback:e,next:null,prev:r};return n.prev?n.prev.next=n:a=n,function(){t&&null!==a&&(t=!1,n.next?n.next.prev=n.prev:r=n.prev,n.prev?n.prev.next=n.next:a=n.next)}}})}var e={addNestedSub:function(e){return a(),i.subscribe(e)},notifyNestedSubs:function(){i.notify()},handleChangeWrapper:s,isSubscribed:function(){return Boolean(o)},trySubscribe:a,tryUnsubscribe:function(){o&&(o(),o=void 0,i.clear(),i=r)},getListeners:function(){return i}};return e}var o="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?x.useLayoutEffect:x.useEffect;var a=function(e){var t=e.store,n=e.context,e=e.children,a=Object(x.useMemo)(function(){var e=T(t);return{store:t,subscription:e}},[t]),r=Object(x.useMemo)(function(){return t.getState()},[t]),n=(o(function(){var e=a.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),r!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}},[a,r]),n||c);return C.a.createElement(n.Provider,{value:a},e)},L=t(41),O=t(56),e=t(107),d=t.n(e),D=t(430),f=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],N=["reactReduxForwardedRef"],P=[],j=[null,null];function Y(e,t){e=e[1];return[t.payload,e+1]}function I(e,t,n){o(function(){return e.apply(void 0,t)},n)}function A(e,t,n,a,r,o,i){e.current=a,t.current=r,n.current=!1,o.current&&(o.current=null,i())}function R(e,a,t,r,o,i,s,l,u,c){var d,f;if(e)return d=!1,f=null,t.onStateChange=e=function(){if(!d){var e,t,n=a.getState();try{e=r(n,o.current)}catch(e){f=t=e}t||(f=null),e===i.current?s.current||u():(i.current=e,l.current=e,s.current=!0,c({type:"STORE_UPDATED",payload:{error:t}}))}},t.trySubscribe(),e(),function(){if(d=!0,t.tryUnsubscribe(),t.onStateChange=null,f)throw f}}var H=function(){return[null,0]};function i(k,e){var e=e=void 0===e?{}:e,t=e.getDisplayName,r=void 0===t?function(e){return"ConnectAdvanced("+e+")"}:t,t=e.methodName,o=void 0===t?"connectAdvanced":t,t=e.renderCountProp,i=void 0===t?void 0:t,t=e.shouldHandleStateChanges,S=void 0===t||t,t=e.storeKey,s=void 0===t?"store":t,t=(e.withRef,e.forwardRef),l=void 0!==t&&t,t=e.context,t=void 0===t?c:t,u=Object(O.a)(e,f),E=t;return function(b){var e=b.displayName||b.name||"Component",t=r(e),w=Object(L.a)({},u,{getDisplayName:r,methodName:o,renderCountProp:i,shouldHandleStateChanges:S,storeKey:s,displayName:t,wrappedComponentName:e,WrappedComponent:b}),e=u.pure;var M=e?x.useMemo:function(e){return e()};function n(n){var e=Object(x.useMemo)(function(){var e=n.reactReduxForwardedRef,t=Object(O.a)(n,N);return[n.context,e,t]},[n]),t=e[0],a=e[1],r=e[2],o=Object(x.useMemo)(function(){return t&&t.Consumer&&Object(D.isContextConsumer)(C.a.createElement(t.Consumer,null))?t:E},[t,E]),i=Object(x.useContext)(o),s=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch),l=(Boolean(i)&&Boolean(i.store),(s?n:i).store),u=Object(x.useMemo)(function(){return k(l.dispatch,w)},[l]),e=Object(x.useMemo)(function(){var e,t;return S?(t=(e=T(l,s?null:i.subscription)).notifyNestedSubs.bind(e),[e,t]):j},[l,s,i]),c=e[0],e=e[1],d=Object(x.useMemo)(function(){return s?i:Object(L.a)({},i,{subscription:c})},[s,i,c]),f=Object(x.useReducer)(Y,P,H),p=f[0][0],f=f[1];if(p&&p.error)throw p.error;var h=Object(x.useRef)(),m=Object(x.useRef)(r),g=Object(x.useRef)(),y=Object(x.useRef)(!1),v=M(function(){return g.current&&r===m.current?g.current:u(l.getState(),r)},[l,p,r]),_=(I(A,[m,h,y,r,v,g,e]),I(R,[S,l,c,u,m,h,y,g,e,f],[l,c,u]),Object(x.useMemo)(function(){return C.a.createElement(b,Object(L.a)({},v,{ref:a}))},[a,b,v]));return Object(x.useMemo)(function(){return S?C.a.createElement(o.Provider,{value:d},_):_},[o,_,d])}var a=e?C.a.memo(n):n;return a.WrappedComponent=b,a.displayName=n.displayName=t,l?((e=C.a.forwardRef(function(e,t){return C.a.createElement(a,Object(L.a)({},e,{reactReduxForwardedRef:t}))})).displayName=t,e.WrappedComponent=b,d()(e,b)):d()(a,b)}}function s(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function m(e,t){if(!s(e,t)){if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(var r=0;re?t.splice(e,t.length-e,n):t.push(n),i({action:"PUSH",location:n,index:e,entries:t}))})},replace:function(e,t){var n=D(e,t,s(),u.location);o.confirmTransitionTo(n,"REPLACE",a,function(e){e&&i({action:"REPLACE",location:u.entries[u.index]=n})})},go:l,goBack:function(){l(-1)},goForward:function(){l(1)},canGo:function(e){return 0<=(e=u.index+e)&&ex',"Tag"),"readonly"!==n&&"interactive"!==n||r.log.warning("Warning: [ shape="+n+" ] is deprecated at [ Tag ]"),"secondary"===a&&r.log.warning("Warning: [ type=secondary ] is deprecated at [ Tag ]"),["count","marked","value","onChange"].forEach(function(e){e in t&&r.log.warning("Warning: [ "+e+" ] is deprecated at [ Tag ]")}),("selected"in t||"defaultSelected"in t)&&r.log.warning("Warning: [ selected|defaultSelected ] is deprecated at [ Tag ], use [ checked|defaultChecked ] at [ Tag.Selectable ] instead of it"),"closed"in t&&r.log.warning("Warning: [ closed ] is deprecated at [ Tag ], use [ onClose ] at [ Tag.Closeable ] instead of it"),"onSelect"in t&&e("onSelect","","Tag"),"afterClose"in t&&r.log.warning("Warning: [ afterClose ] is deprecated at [ Tag ], use [ afterClose ] at [ Tag.Closeable ] instead of it"),t}});o.Group=a.default.config(i.default),o.Selectable=a.default.config(s.default),o.Closable=a.default.config(n.default),o.Closeable=o.Closable,t.default=o,e.exports=t.default},function(e,t,n){"use strict";n(72),n(466)},function(e,t){e=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(e,t){e=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)},function(e,t,n){e.exports=!n(113)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){"use strict";t.__esModule=!0;var a=o(n(358)),r=o(n(545)),n=o(n(546));function o(e){return e&&e.__esModule?e:{default:e}}a.default.Expand=r.default,a.default.OverlayAnimate=n.default,t.default=a.default,e.exports=t.default},function(e,t,n){"use strict";n(43),n(72),n(114),n(115),n(559)},function(e,t,n){"use strict";t.__esModule=!0;var r=p(n(3)),o=p(n(17)),a=p(n(6)),i=p(n(648)),s=p(n(649)),l=p(n(395)),u=p(n(397)),c=p(n(650)),d=p(n(651)),f=p(n(396)),n=p(n(398));function p(e){return e&&e.__esModule?e:{default:e}}i.default.Header=s.default,i.default.Media=u.default,i.default.Divider=c.default,i.default.Content=d.default,i.default.Actions=n.default,i.default.BulletHeader=l.default,i.default.CollaspeContent=f.default,i.default.CollapseContent=f.default,t.default=a.default.config(i.default,{transform:function(e,t){var n,a;return"titlePrefixLine"in e&&(t("titlePrefixLine","showTitleBullet","Card"),a=(n=e).titlePrefixLine,n=(0,o.default)(n,["titlePrefixLine"]),e=(0,r.default)({showTitleBullet:a},n)),"titleBottomLine"in e&&(t("titleBottomLine","showHeadDivider","Card"),n=(a=e).titleBottomLine,a=(0,o.default)(a,["titleBottomLine"]),e=(0,r.default)({showHeadDivider:n},a)),"bodyHeight"in e&&(t("bodyHeight","contentHeight","Card"),a=(n=e).bodyHeight,t=(0,o.default)(n,["bodyHeight"]),e=(0,r.default)({contentHeight:a},t)),e}}),e.exports=t.default},function(e,t,n){"use strict";n.d(t,"b",function(){return s});var a=n(12),r=n(33),o=n(22),i={namespaces:[]},s=function(e){return function(n){return r.a.get("v3/console/core/namespace/list",{params:e}).then(function(e){var t=e.code,e=e.data;n({type:o.b,data:0===t?e:[]})})}};t.a=function(){var e=0this.menuNode.clientHeight&&(this.menuNode.clientHeight+this.menuNode.scrollTop<(e=this.itemNode.offsetTop+this.itemNode.offsetHeight)?this.menuNode.scrollTop=e-this.menuNode.clientHeight:this.itemNode.offsetTope.length)&&(t=e.length);for(var n=0,a=new Array(t);n 16.8.0")},p.prototype.validate=function(e,t){this.validateCallback(e,t)},p.prototype.reset=function(e){var t=1","Select");t=l(e,t);return e.onInputUpdate&&(t.onSearch=e.onInputUpdate,t.showSearch=!0),t}}),t.default=a.default.config(r.default,{transform:l,exportNames:["focusInput","handleSearchClear"]}),e.exports=t.default},function(M,e,t){"use strict";t.d(e,"a",function(){return a}),t.d(e,"b",function(){return U});var x=t(0),C=t.n(x),c=C.a.createContext(null);function l(){return n}var n=function(e){e()};var r={notify:function(){},get:function(){return[]}};function T(t,n){var o,i=r;function s(){e.onStateChange&&e.onStateChange()}function a(){var e,a,r;o||(o=n?n.addNestedSub(s):t.subscribe(s),e=l(),r=a=null,i={clear:function(){r=a=null},notify:function(){e(function(){for(var e=a;e;)e.callback(),e=e.next})},get:function(){for(var e=[],t=a;t;)e.push(t),t=t.next;return e},subscribe:function(e){var t=!0,n=r={callback:e,next:null,prev:r};return n.prev?n.prev.next=n:a=n,function(){t&&null!==a&&(t=!1,n.next?n.next.prev=n.prev:r=n.prev,n.prev?n.prev.next=n.next:a=n.next)}}})}var e={addNestedSub:function(e){return a(),i.subscribe(e)},notifyNestedSubs:function(){i.notify()},handleChangeWrapper:s,isSubscribed:function(){return Boolean(o)},trySubscribe:a,tryUnsubscribe:function(){o&&(o(),o=void 0,i.clear(),i=r)},getListeners:function(){return i}};return e}var o="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?x.useLayoutEffect:x.useEffect;var a=function(e){var t=e.store,n=e.context,e=e.children,a=Object(x.useMemo)(function(){var e=T(t);return{store:t,subscription:e}},[t]),r=Object(x.useMemo)(function(){return t.getState()},[t]),n=(o(function(){var e=a.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),r!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}},[a,r]),n||c);return C.a.createElement(n.Provider,{value:a},e)},L=t(41),O=t(56),e=t(107),d=t.n(e),D=t(430),f=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],N=["reactReduxForwardedRef"],P=[],j=[null,null];function Y(e,t){e=e[1];return[t.payload,e+1]}function I(e,t,n){o(function(){return e.apply(void 0,t)},n)}function A(e,t,n,a,r,o,i){e.current=a,t.current=r,n.current=!1,o.current&&(o.current=null,i())}function R(e,a,t,r,o,i,s,l,u,c){var d,f;if(e)return d=!1,f=null,t.onStateChange=e=function(){if(!d){var e,t,n=a.getState();try{e=r(n,o.current)}catch(e){f=t=e}t||(f=null),e===i.current?s.current||u():(i.current=e,l.current=e,s.current=!0,c({type:"STORE_UPDATED",payload:{error:t}}))}},t.trySubscribe(),e(),function(){if(d=!0,t.tryUnsubscribe(),t.onStateChange=null,f)throw f}}var H=function(){return[null,0]};function i(k,e){var e=e=void 0===e?{}:e,t=e.getDisplayName,r=void 0===t?function(e){return"ConnectAdvanced("+e+")"}:t,t=e.methodName,o=void 0===t?"connectAdvanced":t,t=e.renderCountProp,i=void 0===t?void 0:t,t=e.shouldHandleStateChanges,S=void 0===t||t,t=e.storeKey,s=void 0===t?"store":t,t=(e.withRef,e.forwardRef),l=void 0!==t&&t,t=e.context,t=void 0===t?c:t,u=Object(O.a)(e,f),E=t;return function(b){var e=b.displayName||b.name||"Component",t=r(e),w=Object(L.a)({},u,{getDisplayName:r,methodName:o,renderCountProp:i,shouldHandleStateChanges:S,storeKey:s,displayName:t,wrappedComponentName:e,WrappedComponent:b}),e=u.pure;var M=e?x.useMemo:function(e){return e()};function n(n){var e=Object(x.useMemo)(function(){var e=n.reactReduxForwardedRef,t=Object(O.a)(n,N);return[n.context,e,t]},[n]),t=e[0],a=e[1],r=e[2],o=Object(x.useMemo)(function(){return t&&t.Consumer&&Object(D.isContextConsumer)(C.a.createElement(t.Consumer,null))?t:E},[t,E]),i=Object(x.useContext)(o),s=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch),l=(Boolean(i)&&Boolean(i.store),(s?n:i).store),u=Object(x.useMemo)(function(){return k(l.dispatch,w)},[l]),e=Object(x.useMemo)(function(){var e,t;return S?(t=(e=T(l,s?null:i.subscription)).notifyNestedSubs.bind(e),[e,t]):j},[l,s,i]),c=e[0],e=e[1],d=Object(x.useMemo)(function(){return s?i:Object(L.a)({},i,{subscription:c})},[s,i,c]),f=Object(x.useReducer)(Y,P,H),p=f[0][0],f=f[1];if(p&&p.error)throw p.error;var h=Object(x.useRef)(),m=Object(x.useRef)(r),g=Object(x.useRef)(),y=Object(x.useRef)(!1),v=M(function(){return g.current&&r===m.current?g.current:u(l.getState(),r)},[l,p,r]),_=(I(A,[m,h,y,r,v,g,e]),I(R,[S,l,c,u,m,h,y,g,e,f],[l,c,u]),Object(x.useMemo)(function(){return C.a.createElement(b,Object(L.a)({},v,{ref:a}))},[a,b,v]));return Object(x.useMemo)(function(){return S?C.a.createElement(o.Provider,{value:d},_):_},[o,_,d])}var a=e?C.a.memo(n):n;return a.WrappedComponent=b,a.displayName=n.displayName=t,l?((e=C.a.forwardRef(function(e,t){return C.a.createElement(a,Object(L.a)({},e,{reactReduxForwardedRef:t}))})).displayName=t,e.WrappedComponent=b,d()(e,b)):d()(a,b)}}function s(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function m(e,t){if(!s(e,t)){if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(var r=0;re?t.splice(e,t.length-e,n):t.push(n),i({action:"PUSH",location:n,index:e,entries:t}))})},replace:function(e,t){var n=D(e,t,s(),u.location);o.confirmTransitionTo(n,"REPLACE",a,function(e){e&&i({action:"REPLACE",location:u.entries[u.index]=n})})},go:l,goBack:function(){l(-1)},goForward:function(){l(1)},canGo:function(e){return 0<=(e=u.index+e)&&ex',"Tag"),"readonly"!==n&&"interactive"!==n||r.log.warning("Warning: [ shape="+n+" ] is deprecated at [ Tag ]"),"secondary"===a&&r.log.warning("Warning: [ type=secondary ] is deprecated at [ Tag ]"),["count","marked","value","onChange"].forEach(function(e){e in t&&r.log.warning("Warning: [ "+e+" ] is deprecated at [ Tag ]")}),("selected"in t||"defaultSelected"in t)&&r.log.warning("Warning: [ selected|defaultSelected ] is deprecated at [ Tag ], use [ checked|defaultChecked ] at [ Tag.Selectable ] instead of it"),"closed"in t&&r.log.warning("Warning: [ closed ] is deprecated at [ Tag ], use [ onClose ] at [ Tag.Closeable ] instead of it"),"onSelect"in t&&e("onSelect","","Tag"),"afterClose"in t&&r.log.warning("Warning: [ afterClose ] is deprecated at [ Tag ], use [ afterClose ] at [ Tag.Closeable ] instead of it"),t}});o.Group=a.default.config(i.default),o.Selectable=a.default.config(s.default),o.Closable=a.default.config(n.default),o.Closeable=o.Closable,t.default=o,e.exports=t.default},function(e,t,n){"use strict";n(72),n(466)},function(e,t){e=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(e,t){e=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)},function(e,t,n){e.exports=!n(113)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){"use strict";t.__esModule=!0;var a=o(n(358)),r=o(n(545)),n=o(n(546));function o(e){return e&&e.__esModule?e:{default:e}}a.default.Expand=r.default,a.default.OverlayAnimate=n.default,t.default=a.default,e.exports=t.default},function(e,t,n){"use strict";n(43),n(72),n(114),n(115),n(559)},function(e,t,n){"use strict";t.__esModule=!0;var r=p(n(3)),o=p(n(17)),a=p(n(6)),i=p(n(648)),s=p(n(649)),l=p(n(395)),u=p(n(397)),c=p(n(650)),d=p(n(651)),f=p(n(396)),n=p(n(398));function p(e){return e&&e.__esModule?e:{default:e}}i.default.Header=s.default,i.default.Media=u.default,i.default.Divider=c.default,i.default.Content=d.default,i.default.Actions=n.default,i.default.BulletHeader=l.default,i.default.CollaspeContent=f.default,i.default.CollapseContent=f.default,t.default=a.default.config(i.default,{transform:function(e,t){var n,a;return"titlePrefixLine"in e&&(t("titlePrefixLine","showTitleBullet","Card"),a=(n=e).titlePrefixLine,n=(0,o.default)(n,["titlePrefixLine"]),e=(0,r.default)({showTitleBullet:a},n)),"titleBottomLine"in e&&(t("titleBottomLine","showHeadDivider","Card"),n=(a=e).titleBottomLine,a=(0,o.default)(a,["titleBottomLine"]),e=(0,r.default)({showHeadDivider:n},a)),"bodyHeight"in e&&(t("bodyHeight","contentHeight","Card"),a=(n=e).bodyHeight,t=(0,o.default)(n,["bodyHeight"]),e=(0,r.default)({contentHeight:a},t)),e}}),e.exports=t.default},function(e,t,n){"use strict";n.d(t,"b",function(){return s});var a=n(12),r=n(33),o=n(22),i={namespaces:[]},s=function(e){return function(n){return r.a.get("v3/console/core/namespace/list",{params:e}).then(function(e){var t=e.code,e=e.data;n({type:o.b,data:0===t?e:[]})})}};t.a=function(){var e=0this.menuNode.clientHeight&&(this.menuNode.clientHeight+this.menuNode.scrollTop<(e=this.itemNode.offsetTop+this.itemNode.offsetHeight)?this.menuNode.scrollTop=e-this.menuNode.clientHeight:this.itemNode.offsetTope.length)&&(t=e.length);for(var n=0,a=new Array(t);n>16&255),o.push(r>>8&255),o.push(255&r)),r=r<<6|a.indexOf(t.charAt(i));return 0==(e=n%4*6)?(o.push(r>>16&255),o.push(r>>8&255),o.push(255&r)):18==e?(o.push(r>>10&255),o.push(r>>2&255)):12==e&&o.push(r>>4&255),new Uint8Array(o)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){for(var t,n="",a=0,r=e.length,o=g,i=0;i>18&63]+o[a>>12&63])+o[a>>6&63]+o[63&a]),a=(a<<8)+e[i];return 0==(t=r%3)?n=(n=n+o[a>>18&63]+o[a>>12&63])+o[a>>6&63]+o[63&a]:2==t?n=(n=n+o[a>>10&63]+o[a>>4&63])+o[a<<2&63]+o[64]:1==t&&(n=(n=n+o[a>>2&63]+o[a<<4&63])+o[64]+o[64]),n}}),V=Object.prototype.hasOwnProperty,K=Object.prototype.toString;var s=new a("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null!==e)for(var t,n,a,r=[],o=e,i=0,s=o.length;i>10),56320+(l-65536&1023)),e.position++}else x(e,"unknown escape sequence");n=a=e.position}else w(u)?(T(e,n,a,!0),P(e,D(e,!1,t)),n=a=e.position):e.position===e.lineStart&&N(e)?x(e,"unexpected end of the document within a double quoted scalar"):(e.position++,a=e.position)}x(e,"unexpected end of the stream within a double quoted scalar")}}function ge(e,t){var n,a,r=e.tag,o=e.anchor,i=[],s=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),a=e.input.charCodeAt(e.position);0!==a&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,x(e,"tab characters must not be used in indentation")),45===a)&&k(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,D(e,!0,-1)&&e.lineIndent<=t)i.push(null),a=e.input.charCodeAt(e.position);else if(n=e.line,j(e,t,Z,!1,!0),i.push(e.result),D(e,!0,-1),a=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==a)x(e,"bad indentation of a sequence entry");else if(e.lineIndentt?f=1:e.lineIndent===t?f=0:e.lineIndentt?f=1:e.lineIndent===t?f=0:e.lineIndentt)&&(y&&(i=e.line,s=e.lineStart,l=e.position),j(e,t,_,!0,r)&&(y?m=e.result:g=e.result),y||(L(e,f,p,h,m,g,i,s,l),h=m=g=null),D(e,!0,-1),u=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==u)x(e,"bad indentation of a mapping entry");else if(e.lineIndentl&&(l=e.lineIndent),w(d))u++;else{if(e.lineIndent=t){i=!0,f=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=l,e.lineIndent=u;break}}i&&(T(e,r,o,!1),P(e,e.line-s),r=o=e.position,i=!1),M(f)||(o=e.position+1),f=e.input.charCodeAt(++e.position)}if(T(e,r,o,!1),e.result)return 1;e.kind=c,e.result=d}}(e,a,v===n)&&(h=!0,null===e.tag)&&(e.tag="?"):(h=!0,null===e.tag&&null===e.anchor||x(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===f&&(h=s&&ge(e,r))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&x(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),l=0,u=e.implicitTypes.length;l"),null!==e.result&&d.kind!==e.kind&&x(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+d.kind+'", not "'+e.kind+'"'),d.resolve(e.result,e.tag)?(e.result=d.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):x(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||h}function ye(e,t){t=t||{};var n=new de(e=0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0))?e.slice(1):e,t),t=e.indexOf("\0");for(-1!==t&&(n.position=t,x(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.positiondocument.F=Object<\/script>"),e.close(),u=e.F;t--;)delete u[l][i[t]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(a[l]=r(e),n=new a,a[l]=null,n[s]=e):n=u(),void 0===t?n:o(n,t)}},function(e,t,n){var a=n(89).f,r=n(90),o=n(100)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,o)&&a(e,o,{configurable:!0,value:t})}},function(e,t,n){t.f=n(100)},function(e,t,n){var a=n(80),r=n(81),o=n(128),i=n(162),s=n(89).f;e.exports=function(e){var t=r.Symbol||(r.Symbol=!o&&a.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:i.f(e)})}},function(e,t,n){"use strict";t.__esModule=!0;var a=c(n(219)),r=c(n(520)),o=c(n(521)),i=c(n(522)),s=c(n(523)),l=c(n(524)),u=c(n(525));function c(e){return e&&e.__esModule?e:{default:e}}n(526),a.default.extend(l.default),a.default.extend(s.default),a.default.extend(r.default),a.default.extend(o.default),a.default.extend(i.default),a.default.extend(u.default),a.default.locale("zh-cn");n=a.default;n.isSelf=a.default.isDayjs,a.default.localeData(),t.default=n,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var v=d(n(3)),o=d(n(4)),i=d(n(7)),a=d(n(8)),r=n(0),_=d(r),s=d(n(5)),l=n(31),b=d(n(19)),u=d(n(44)),w=d(n(26)),M=d(n(83)),c=d(n(6)),k=n(11);function d(e){return e&&e.__esModule?e:{default:e}}function f(){}p=r.Component,(0,a.default)(S,p),S.getDerivedStateFromProps=function(e){return"visible"in e?{visible:e.visible}:{}},S.prototype.render=function(){var e,t=this.props,n=t.prefix,a=(t.pure,t.className),r=t.style,o=t.type,i=t.shape,s=t.size,l=t.title,u=t.children,c=(t.defaultVisible,t.visible,t.iconType),d=t.closeable,f=(t.onClose,t.afterClose),p=t.animation,h=t.rtl,t=t.locale,m=(0,v.default)({},k.obj.pickOthers(Object.keys(S.propTypes),this.props)),g=this.state.visible,y=n+"message",o=(0,b.default)(((e={})[y]=!0,e[n+"message-"+o]=o,e[""+n+i]=i,e[""+n+s]=s,e[n+"title-content"]=!!l,e[n+"only-content"]=!l&&!!u,e[a]=a,e)),i=g?_.default.createElement("div",(0,v.default)({role:"alert",style:r},m,{className:o,dir:h?"rtl":void 0}),d?_.default.createElement("a",{role:"button","aria-label":t.closeAriaLabel,className:y+"-close",onClick:this.onClose},_.default.createElement(w.default,{type:"close"})):null,!1!==c?_.default.createElement(w.default,{className:y+"-symbol "+(!c&&y+"-symbol-icon"),type:c}):null,l?_.default.createElement("div",{className:y+"-title"},l):null,u?_.default.createElement("div",{className:y+"-content"},u):null):null;return p?_.default.createElement(M.default.Expand,{animationAppear:!1,afterLeave:f},i):i},r=n=S,n.propTypes={prefix:s.default.string,pure:s.default.bool,className:s.default.string,style:s.default.object,type:s.default.oneOf(["success","warning","error","notice","help","loading"]),shape:s.default.oneOf(["inline","addon","toast"]),size:s.default.oneOf(["medium","large"]),title:s.default.node,children:s.default.node,defaultVisible:s.default.bool,visible:s.default.bool,iconType:s.default.oneOfType([s.default.string,s.default.bool]),closeable:s.default.bool,onClose:s.default.func,afterClose:s.default.func,animation:s.default.bool,locale:s.default.object,rtl:s.default.bool},n.defaultProps={prefix:"next-",pure:!1,type:"success",shape:"inline",size:"medium",defaultVisible:!0,closeable:!1,onClose:f,afterClose:f,animation:!0,locale:u.default.Message};var p,a=r;function S(){var e,t;(0,o.default)(this,S);for(var n=arguments.length,a=Array(n),r=0;r=n.length?(l=!!(d=h(o,u)))&&"get"in d&&!("originalValue"in d.get)?d.get:o[u]:(l=_(o,u),o[u]),l&&!i&&(g[c]=o)}}return o}},function(e,t,n){"use strict";n=n(625);e.exports=Function.prototype.bind||n},function(e,t,n){"use strict";var a=String.prototype.replace,r=/%20/g,o="RFC1738",i="RFC3986";e.exports={default:i,formatters:{RFC1738:function(e){return a.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:o,RFC3986:i}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var c=l(n(3)),a=l(n(4)),r=l(n(7)),o=l(n(8)),d=n(0),f=l(d),i=l(n(5)),p=l(n(19)),h=l(n(26)),s=n(11),m=l(n(104));function l(e){return e&&e.__esModule?e:{default:e}}var u,g=s.func.bindCtx,y=s.obj.pickOthers,i=(u=d.Component,(0,o.default)(v,u),v.prototype.getSelected=function(){var e=this.props,t=e._key,n=e.root,e=e.selected,a=n.props.selectMode,n=n.state.selectedKeys;return e||!!a&&-1e.length&&e.every(function(e,t){return e===n[t]})},t.isAvailablePos=function(e,t,n){var n=n[t],a=n.type,n=n.disabled;return r(e,t)&&("item"===a&&!n||"submenu"===a)});t.getFirstAvaliablelChildKey=function(t,n){var e=Object.keys(n).find(function(e){return a(t+"-0",e,n)});return e?n[e].key:null},t.getChildSelected=function(e){var t,n=e.selectMode,a=e.selectedKeys,r=e._k2n,e=e._key;return!!r&&(t=(r[e]&&r[e].pos)+"-",!!n)&&a.some(function(e){return r[e]&&0===r[e].pos.indexOf(t)})}},function(e,t,n){"use strict";n(43),n(72),n(654)},function(e,t,n){"use strict";t.__esModule=!0;var g=d(n(17)),y=d(n(3)),a=d(n(4)),r=d(n(7)),o=d(n(8)),i=n(0),v=d(i),s=d(n(5)),_=d(n(19)),l=d(n(83)),u=d(n(26)),b=n(11),c=d(n(44)),n=d(n(6));function d(e){return e&&e.__esModule?e:{default:e}}var f,p=b.func.noop,h=b.func.bindCtx,m=/blue|green|orange|red|turquoise|yellow/,s=(f=i.Component,(0,o.default)(w,f),w.prototype.componentWillUnmount=function(){this.__destroyed=!0},w.prototype.handleClose=function(e){var t=this,n=this.props,a=n.animation,n=n.onClose,r=b.support.animation&&a;!1===n(e,this.tagNode)||this.__destroyed||this.setState({visible:!1},function(){r||t.props.afterClose(t.tagNode)})},w.prototype.handleBodyClick=function(e){var t=this.props,n=t.closable,a=t.closeArea,t=t.onClick,r=e.currentTarget;if(r&&(r===e.target||r.contains(e.target))&&(n&&"tag"===a&&this.handleClose("tag"),"function"==typeof t))return t(e)},w.prototype.handleTailClick=function(e){e&&e.preventDefault(),e&&e.stopPropagation(),this.handleClose("tail")},w.prototype.handleAnimationInit=function(e){this.props.afterAppear(e)},w.prototype.handleAnimationEnd=function(e){this.props.afterClose(e)},w.prototype.renderAnimatedTag=function(e,t){return v.default.createElement(l.default,{animation:t,afterAppear:this.handleAnimationInit,afterLeave:this.handleAnimationEnd},e)},w.prototype.renderTailNode=function(){var e=this.props,t=e.prefix,n=e.closable,e=e.locale;return n?v.default.createElement("span",{className:t+"tag-close-btn",onClick:this.handleTailClick,role:"button","aria-label":e.delete},v.default.createElement(u.default,{type:"close"})):null},w.prototype.isPresetColor=function(){var e=this.props.color;return!!e&&m.test(e)},w.prototype.getTagStyle=function(){var e=this.props,t=e.color,t=void 0===t?"":t,e=e.style,n=this.isPresetColor();return(0,y.default)({},t&&!n?{backgroundColor:t,borderColor:t,color:"#fff"}:null,e)},w.prototype.render=function(){var t=this,e=this.props,n=e.prefix,a=e.type,r=e.size,o=e.color,i=e._shape,s=e.closable,l=e.closeArea,u=e.className,c=e.children,d=e.animation,f=e.disabled,e=e.rtl,p=this.state.visible,h=this.isPresetColor(),m=b.obj.pickOthers(w.propTypes,this.props),m=(m.style,(0,g.default)(m,["style"])),r=(0,_.default)([n+"tag",n+"tag-"+(s?"closable":i),n+"tag-"+r],((i={})[n+"tag-level-"+a]=!o,i[n+"tag-closable"]=s,i[n+"tag-body-pointer"]=s&&"tag"===l,i[n+"tag-"+o]=o&&h&&"primary"===a,i[n+"tag-"+o+"-inverse"]=o&&h&&"normal"===a,i),u),s=this.renderTailNode(),l=p?v.default.createElement("div",(0,y.default)({className:r,onClick:this.handleBodyClick,onKeyDown:this.onKeyDown,tabIndex:f?"":"0",role:"button","aria-disabled":f,disabled:f,dir:e?"rtl":void 0,ref:function(e){return t.tagNode=e},style:this.getTagStyle()},m),v.default.createElement("span",{className:n+"tag-body"},c),s):null;return d&&b.support.animation?this.renderAnimatedTag(l,n+"tag-zoom"):l},o=i=w,i.propTypes={prefix:s.default.string,type:s.default.oneOf(["normal","primary"]),size:s.default.oneOf(["small","medium","large"]),color:s.default.string,animation:s.default.bool,closeArea:s.default.oneOf(["tag","tail"]),closable:s.default.bool,onClose:s.default.func,afterClose:s.default.func,afterAppear:s.default.func,className:s.default.any,children:s.default.node,onClick:s.default.func,_shape:s.default.oneOf(["default","closable","checkable"]),disabled:s.default.bool,rtl:s.default.bool,locale:s.default.object},i.defaultProps={prefix:"next-",type:"normal",size:"medium",closeArea:"tail",animation:!1,onClose:p,afterClose:p,afterAppear:p,onClick:p,_shape:"default",disabled:!1,rtl:!1,locale:c.default.Tag},o);function w(e){(0,a.default)(this,w);var o=(0,r.default)(this,f.call(this,e));return o.onKeyDown=function(e){var t=o.props,n=t.closable,a=t.closeArea,r=t.onClick,t=t.disabled;e.keyCode!==b.KEYCODE.SPACE||t||(e.preventDefault(),e.stopPropagation(),n?o.handleClose(a):"function"==typeof r&&r(e))},o.state={visible:!0},h(o,["handleBodyClick","handleTailClick","handleAnimationInit","handleAnimationEnd","renderTailNode"]),o}s.displayName="Tag",t.default=n.default.config(s),e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var f=r(n(17)),p=r(n(42)),h=r(n(3)),a=(t.isSingle=function(e){return!e||"single"===e},t.isNull=s,t.escapeForReg=o,t.filter=function(e,t){e=o(""+e),e=new RegExp("("+e+")","ig");return e.test(""+t.value)||e.test(""+t.label)},t.loopMap=i,t.parseDataSourceFromChildren=function i(e){var s=1{var t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t},module.exports.TomlError=TomlError;const createDateTime=__webpack_require__(697),createDateTimeFloat=__webpack_require__(698),createDate=__webpack_require__(699),createTime=__webpack_require__(700),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:"\t",[CHAR_n]:"\n",[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(e){return e>=CHAR_0&&e<=CHAR_9}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN}const _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(e,t){if(hasOwnProperty.call(e,t))return 1;"__proto__"===t&&defineProperty(e,"__proto__",descriptor)}const INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_TABLE}const TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return null!==e&&"object"==typeof e&&e[_type]===TABLE}const _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_LIST}const LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return null!==e&&"object"==typeof e&&e[_type]===LIST}let _custom;try{const utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(_){}const _inspect=_custom||"inspect";class BoxedBigInt{constructor(e){try{this.value=global.BigInt.asIntN(64,e)}catch(e){this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return null===this.value}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}}const INTEGER=Symbol("integer");function Integer(e){let t=Number(e);return Object.is(t,-0)&&(t=0),global.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return null!==e&&"object"==typeof e&&e[_type]===INTEGER}const FLOAT=Symbol("float");function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return null!==e&&"object"==typeof e&&e[_type]===FLOAT}function tomlType(e){var t=typeof e;if("object"==t){if(null===e)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return t}function makeParserClass(e){class t extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(e){let t=this.ctx;var n,a=e.key.pop();for(n of e.key){if(hasKey(t,n)&&!isTable(t[n]))throw this.error(new TomlError("Can't redefine existing key"));t=t[n]=t[n]||Table()}if(hasKey(t,a))throw this.error(new TomlError("Can't redefine existing key"));return t[_declared]=!0,isInteger(e.value)||isFloat(e.value)?t[a]=e.value.valueOf():t[a]=e.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(e){return this.state.resultTable?this.state.resultTable.push(e):this.state.resultTable=[e],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){return this.char===CHAR_PERIOD?this.next(this.parseAssignKeywordPostDot):this.char!==CHAR_SP&&this.char!==CTRL_I?this.goto(this.parseAssignEqual):void 0}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(e){return this.returnNow({key:this.state.resultTable,value:e})}parseComment(){do{if(this.char===e.END||this.char===CTRL_J)return this.return();if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharIn("comments")}while(this.nextChar())}parseTableOrList(){if(this.char!==CHAR_LSQB)return this.goto(this.parseTable);this.next(this.parseList)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(!hasKey(this.ctx,e)||isTable(this.ctx[e])&&!this.ctx[e][_declared])return this.ctx=this.ctx[e]=this.ctx[e]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Can't redefine existing key"))}if(this.char!==CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"));if(hasKey(this.ctx,e))if(isTable(this.ctx[e]))this.ctx=this.ctx[e];else{if(!isList(this.ctx[e]))throw this.error(new TomlError("Can't redefine existing key"));this.ctx=this.ctx[e][this.ctx[e].length-1]}else this.ctx=this.ctx[e]=Table();return this.next(this.parseTableNext)}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)||(this.ctx[e]=List()),isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));var t;if(isList(this.ctx[e]))return t=Table(),this.ctx[e].push(t),this.ctx=t,this.next(this.parseListEnd);throw this.error(new TomlError("Can't redefine an existing key"))}if(this.char!==CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"));if(hasKey(this.ctx,e)){if(isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[e]))this.ctx=this.ctx[e][this.ctx[e].length-1];else{if(!isTable(this.ctx[e]))throw this.error(new TomlError("Can't redefine an existing key"));this.ctx=this.ctx[e]}}else this.ctx=this.ctx[e]=Table();return this.next(this.parseListNext)}parseListEnd(e){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(e){return this.returnNow(e)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return"-"===this.state.buf?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(!isAlphaNumHyphen(this.char)){if(0===this.state.buf.length)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.consume(),this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharIn("strings")}while(this.consume(),this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharIn("strings")}while(this.consume(),this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd3):(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd3(){return this.char===CHAR_APOS?(this.state.buf+="'",this.next(this.parseLiteralMultiEnd4)):this.returnNow()}parseLiteralMultiEnd4(){return this.char===CHAR_APOS?(this.state.buf+="'",this.return()):this.returnNow()}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharIn("strings")}while(this.consume(),this.nextChar())}recordEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharIn("strings")}while(this.consume(),this.nextChar())}errorControlCharIn(e){let t="\\u00";return this.char<16&&(t+="0"),t+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in ${e}, use ${t} instead`))}recordMultiEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd3):(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEnd3(){return this.char===CHAR_QUOT?(this.state.buf+='"',this.next(this.parseMultiEnd4)):this.returnNow()}parseMultiEnd4(){return this.char===CHAR_QUOT?(this.state.buf+='"',this.return()):this.returnNow()}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(e){try{var t=parseInt(e,16);if(t>=SURROGATE_FIRST&&t<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(t))}catch(e){throw this.error(TomlError.wrap(e))}}parseSmallUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),4<=this.state.buf.length)return this.return()}parseLargeUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),8<=this.state.buf.length)return this.return()}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(!isDigit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);var e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}this.consume()}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberFloat):isDigit(this.char)?void this.consume():this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS)throw this.error(new TomlError("Unexpected character, expected -, + or digit"));this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent)}parseNumberExponent(){if(!isDigit(this.char))return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf));this.consume()}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberInteger):isDigit(this.char)?(this.consume(),void(4{for(t=String(t);t.length "+o[t]+"\n")+(n+" ");for(let e=0;er&&!o.warned&&(o.warned=!0,(a=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit")).name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=o.length,n=a,console)&&console.warn&&console.warn(n)),e}function f(e,t,n){e={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},t=function(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}.bind(e);return t.listener=n,e.wrapFn=t}function p(e,t,n){e=e._events;if(void 0===e)return[];e=e[t];if(void 0===e)return[];if("function"==typeof e)return n?[e.listener||e]:[e];if(n){for(var a=e,r=new Array(a.length),o=0;o=u,u=(0,D.default)(((u={})[n+"upload-inner"]=!0,u[n+"hidden"]=x,u)),C=this.props.children;return"card"===r&&(r=(0,D.default)(((r={})[n+"upload-card"]=!0,r[n+"disabled"]=l,r)),C=O.default.createElement("div",{className:r},O.default.createElement(P.default,{size:"large",type:"add",className:n+"upload-add-icon"}),O.default.createElement("div",{tabIndex:"0",role:"button",className:n+"upload-text"},C))),b?"function"==typeof w?(b=(0,D.default)(((r={})[n+"form-preview"]=!0,r[o]=!!o,r)),O.default.createElement("div",{style:i,className:b},w(this.state.value,this.props))):t?O.default.createElement(Y.default,{isPreview:!0,listType:t,style:i,className:o,value:this.state.value,onPreview:m}):null:(n=l?N.func.prevent:p,r=N.obj.pickAttrsWith(this.props,"data-"),O.default.createElement("div",(0,T.default)({className:f,style:i},r),O.default.createElement(j.default,(0,T.default)({},e,{name:M,beforeUpload:d,dragable:a,disabled:l||x,className:u,onSelect:this.onSelect,onDrop:this.onDrop,onProgress:this.onProgress,onSuccess:this.onSuccess,onError:this.onError,ref:this.saveUploaderRef}),C),t||g?O.default.createElement(Y.default,{useDataURL:s,fileNameRender:k,actionRender:S,uploader:this,listType:t,value:this.state.value,closable:c,onRemove:n,progressProps:v,onCancel:h,onPreview:m,extraRender:y,rtl:_,previewOnFileName:E}):null))},i=u=h,u.displayName="Upload",u.propTypes=(0,T.default)({},c.default.propTypes,Y.default.propTypes,{prefix:s.default.string.isRequired,action:s.default.string,value:s.default.array,defaultValue:s.default.array,shape:s.default.oneOf(["card"]),listType:s.default.oneOf(["text","image","card"]),list:s.default.any,name:s.default.string,data:s.default.oneOfType([s.default.object,s.default.func]),formatter:s.default.func,limit:s.default.number,timeout:s.default.number,dragable:s.default.bool,closable:s.default.bool,useDataURL:s.default.bool,disabled:s.default.bool,onSelect:s.default.func,onProgress:s.default.func,onChange:s.default.func,onSuccess:s.default.func,afterSelect:s.default.func,onRemove:s.default.func,onError:s.default.func,beforeUpload:s.default.func,onDrop:s.default.func,className:s.default.string,style:s.default.object,children:s.default.node,autoUpload:s.default.bool,request:s.default.func,progressProps:s.default.object,rtl:s.default.bool,isPreview:s.default.bool,renderPreview:s.default.func,fileKeyName:s.default.string,fileNameRender:s.default.func,actionRender:s.default.func,previewOnFileName:s.default.bool}),u.defaultProps=(0,T.default)({},c.default.defaultProps,{prefix:"next-",limit:1/0,autoUpload:!0,closable:!0,onSelect:n,onProgress:n,onChange:n,onSuccess:n,onRemove:n,onError:n,onDrop:n,beforeUpload:n,afterSelect:n,previewOnFileName:!1}),a=function(){var u=this;this.onSelect=function(e){var t,n,a=u.props,r=a.autoUpload,o=a.afterSelect,i=a.onSelect,a=a.limit,s=u.state.value.length+e.length,l=a-u.state.value.length;l<=0||(t=e=e.map(function(e){e=(0,d.fileToObject)(e);return e.state="selected",e}),n=[],ai||s+a.width>o):t<0||e<0||t+a.height>u.height||e+a.width>u.width}function L(e,t,n,a){var r=a.overlayInfo,a=a.containerInfo,n=n.split("");return 1===n.length&&n.push(""),t<0&&(n=[n[0].replace("t","b"),n[1].replace("b","t")]),e<0&&(n=[n[0].replace("l","r"),n[1].replace("r","l")]),t+r.height>a.height&&(n=[n[0].replace("b","t"),n[1].replace("t","b")]),(n=e+r.width>a.width?[n[0].replace("r","l"),n[1].replace("l","r")]:n).join("")}function O(e,t,n){var a=n.overlayInfo,n=n.containerInfo;return(t=t<0?0:t)+a.height>n.height&&(t=n.height-a.height),{left:e=(e=e<0?0:e)+a.width>n.width?n.width-a.width:e,top:t}}function be(e){var r,o,i,s,t,n,a,l,u,c,d,f=e.target,p=e.overlay,h=e.container,m=e.scrollNode,g=e.placement,y=e.placementOffset,y=void 0===y?0:y,v=e.points,v=void 0===v?["tl","bl"]:v,_=e.offset,_=void 0===_?[0,0]:_,b=e.position,b=void 0===b?"absolute":b,w=e.beforePosition,M=e.autoAdjust,M=void 0===M||M,k=e.autoHideScrollOverflow,k=void 0===k||k,e=e.rtl,S="offsetWidth"in(S=p)&&"offsetHeight"in S?{width:S.offsetWidth,height:S.offsetHeight}:{width:(S=S.getBoundingClientRect()).width,height:S.height},E=S.width,S=S.height;return"fixed"===b?(l={config:{placement:void 0,points:void 0},style:{position:b,left:_[0],top:_[1]}},w?w(l,{overlay:{node:p,width:E,height:S}}):l):(l=f.getBoundingClientRect(),r=l.width,o=l.height,i=l.left,s=l.top,t=(l=x(h)).left,l=l.top,u=h.scrollWidth,c=h.scrollHeight,n=h.scrollTop,a=h.scrollLeft,u=(l=C(g,t={targetInfo:{width:r,height:o,left:i,top:s},containerInfo:{left:t,top:l,width:u,height:c,scrollTop:n,scrollLeft:a},overlayInfo:{width:E,height:S},points:v,placementOffset:y,offset:_,container:h,rtl:e})).left,c=l.top,n=l.points,a=function(e){for(var t=e;t;){var n=he(t,"overflow");if(null!=n&&n.match(/auto|scroll|hidden/))return t;t=t.parentNode}return document.documentElement}(h),M&&g&&T(u,c,a,t)&&(g!==(v=L(u,c,g,t))&&(c=T(_=(y=C(v,t)).left,e=y.top,a,t)&&v!==(l=L(_,e,v,t))?(u=(M=O((h=C(g=l,t)).left,h.top,t)).left,M.top):(g=v,u=_,e)),u=(y=O(u,c,t)).left,c=y.top),d={config:{placement:g,points:n},style:{position:b,left:Math.round(u),top:Math.round(c)}},k&&g&&null!=m&&m.length&&m.forEach(function(e){var e=e.getBoundingClientRect(),t=e.top,n=e.left,a=e.width,e=e.height;d.style.display=s+o=e.length?{done:!0}:{done:!1,value:e[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nn.clientHeight&&0 * @license MIT */ -var S=P(706),o=P(707),s=P(708);function n(){return d.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(n()=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function f(e,t){if(d.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;var n=(e="string"!=typeof e?""+e:e).length;if(0===n)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return L(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return O(e).length;default:if(a)return L(e).length;t=(""+t).toLowerCase(),a=!0}}function t(e,t,n){var a,r=!1;if((t=void 0===t||t<0?0:t)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var o=this,i=t,s=n,l=o.length;(!s||s<0||l=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=d.from(t,a)),d.isBuffer(t))return 0===t.length?-1:m(e,t,n,a,r);if("number"==typeof t)return t&=255,d.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?(r?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,n):m(e,[t],n,a,r);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,a,r){var o=1,i=e.length,s=t.length;if(void 0!==a&&("ucs2"===(a=String(a).toLowerCase())||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(e.length<2||t.length<2)return-1;i/=o=2,s/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(r)for(var u=-1,c=n;c>8,r.push(n%256),r.push(a);return r}(t,e.length-n),e,n,a)}function E(e,t,n){n=Math.min(e.length,n);for(var a=[],r=t;r>>10&1023|55296),c=56320|1023&c),a.push(c),r+=d}var f=a,p=f.length;if(p<=v)return String.fromCharCode.apply(String,f);for(var h="",m=0;mt)&&(e+=" ... "),""},d.prototype.compare=function(e,t,n,a,r){if(!d.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=e?e.length:0),void 0===a&&(a=0),void 0===r&&(r=this.length),(t=void 0===t?0:t)<0||n>e.length||a<0||r>this.length)throw new RangeError("out of range index");if(r<=a&&n<=t)return 0;if(r<=a)return-1;if(n<=t)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(a>>>=0),i=(n>>>=0)-(t>>>=0),s=Math.min(o,i),l=this.slice(a,r),u=e.slice(t,n),c=0;cthis.length)throw new RangeError("Attempt to write outside buffer bounds");a=a||"utf8";for(var o,i,s,l=!1;;)switch(a){case"hex":var u=this,c=e,d=t,f=n,p=(d=Number(d)||0,u.length-d);if((!f||p<(f=Number(f)))&&(f=p),(p=c.length)%2!=0)throw new TypeError("Invalid hex string");p/2e.length)throw new RangeError("Index out of range")}function w(e,t,n,a){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r>>8*(a?r:1-r)}function M(e,t,n,a){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r>>8*(a?r:3-r)&255}function k(e,t,n,a){if(n+a>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function x(e,t,n,a,r){return r||k(e,0,n,4),o.write(e,t,n,a,23,4),n+4}function C(e,t,n,a,r){return r||k(e,0,n,8),o.write(e,t,n,a,52,8),n+8}d.prototype.slice=function(e,t){var n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):n>>8):w(this,e,t,!0),t+2},d.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,65535,0),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):w(this,e,t,!1),t+2},d.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},d.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},d.prototype.writeIntLE=function(e,t,n,a){e=+e,t|=0,a||b(this,e,t,n,(a=Math.pow(2,8*n-1))-1,-a);var r=0,o=1,i=0;for(this[t]=255&e;++r>0)-i&255;return t+n},d.prototype.writeIntBE=function(e,t,n,a){e=+e,t|=0,a||b(this,e,t,n,(a=Math.pow(2,8*n-1))-1,-a);var r=n-1,o=1,i=0;for(this[t+r]=255&e;0<=--r&&(o*=256);)e<0&&0===i&&0!==this[t+r+1]&&(i=1),this[t+r]=(e/o>>0)-i&255;return t+n},d.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,1,127,-128),d.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&(e=e<0?255+e+1:e),t+1},d.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):w(this,e,t,!0),t+2},d.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):w(this,e,t,!1),t+2},d.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,2147483647,-2147483648),d.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},d.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},d.prototype.writeFloatLE=function(e,t,n){return x(this,e,t,!0,n)},d.prototype.writeFloatBE=function(e,t,n){return x(this,e,t,!1,n)},d.prototype.writeDoubleLE=function(e,t,n){return C(this,e,t,!0,n)},d.prototype.writeDoubleBE=function(e,t,n){return C(this,e,t,!1,n)},d.prototype.copy=function(e,t,n,a){if(n=n||0,a||0===a||(a=this.length),t>=e.length&&(t=e.length),(a=0=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length);var r,o=(a=e.length-t>>=0,n=void 0===n?this.length:n>>>0,"number"==typeof(e=e||0))for(s=t;s>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function O(e){return S.toByteArray(function(e){var t;if((e=((t=e).trim?t.trim():t.replace(/^\s+|\s+$/g,"")).replace(T,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,n,a){for(var r=0;r=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}.call(this,P(65))},function(e,t,n){"use strict";var o=n(138);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,r=this._writableState&&this._writableState.destroyed;return a||r?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,o.nextTick(i,this,e)):o.nextTick(i,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,o.nextTick(i,n,e)):o.nextTick(i,n,e):t&&t(e)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";var a=n(139).Buffer,r=a.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"==typeof t||a.isEncoding!==r&&r(e))return t||e;throw new Error("Unknown encoding: "+e)}function i(e){var t;switch(this.encoding=o(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=l,t=4;break;case"base64":this.text=d,this.end=f,t=3;break;default:return this.write=p,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=a.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function l(e){var t,n=this.lastTotal-this.lastNeed,a=(t=this,128!=(192&(a=e)[0])?(t.lastNeed=0,"�"):1e.slidesToShow&&(n=e.slideWidth*e.slidesToShow*-1,o=e.slideHeight*e.slidesToShow*-1),e.slideCount%e.slidesToScroll!=0&&(t=e.slideIndex+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow,t=e.rtl?(e.slideIndex>=e.slideCount?e.slideCount-e.slideIndex:e.slideIndex)+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow:t)&&(o=e.slideIndex>e.slideCount?(n=(e.slidesToShow-(e.slideIndex-e.slideCount))*e.slideWidth*-1,(e.slidesToShow-(e.slideIndex-e.slideCount))*e.slideHeight*-1):(n=e.slideCount%e.slidesToScroll*e.slideWidth*-1,e.slideCount%e.slidesToScroll*e.slideHeight*-1))):e.slideCount%e.slidesToScroll!=0&&e.slideIndex+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow&&(n=(e.slidesToShow-e.slideCount%e.slidesToScroll)*e.slideWidth),e.centerMode&&(e.infinite?n+=e.slideWidth*Math.floor(e.slidesToShow/2):n=e.slideWidth*Math.floor(e.slidesToShow/2)),a=e.vertical?e.slideIndex*e.slideHeight*-1+o:e.slideIndex*e.slideWidth*-1+n,!0===e.variableWidth&&(t=void 0,a=(r=e.slideCount<=e.slidesToShow||!1===e.infinite?i.default.findDOMNode(e.trackRef).childNodes[e.slideIndex]:(t=e.slideIndex+e.slidesToShow,i.default.findDOMNode(e.trackRef).childNodes[t]))?-1*r.offsetLeft:0,!0===e.centerMode)&&(r=!1===e.infinite?i.default.findDOMNode(e.trackRef).children[e.slideIndex]:i.default.findDOMNode(e.trackRef).children[e.slideIndex+e.slidesToShow+1])?-1*r.offsetLeft+(e.listWidth-r.offsetWidth)/2:a)}},function(e,t,n){"use strict";t.__esModule=!0;var p=u(n(3)),h=u(n(17)),o=u(n(4)),i=u(n(7)),a=u(n(8)),m=u(n(0)),r=u(n(5)),g=u(n(19)),s=u(n(6)),y=u(n(26)),l=n(11);function u(e){return e&&e.__esModule?e:{default:e}}c=m.default.Component,(0,a.default)(d,c),d.prototype.render=function(){var e=this.props,t=e.title,n=e.children,a=e.className,r=e.isExpanded,o=e.disabled,i=e.style,s=e.prefix,l=e.onClick,u=e.id,e=(0,h.default)(e,["title","children","className","isExpanded","disabled","style","prefix","onClick","id"]),a=(0,g.default)(((c={})[s+"collapse-panel"]=!0,c[s+"collapse-panel-hidden"]=!r,c[s+"collapse-panel-expanded"]=r,c[s+"collapse-panel-disabled"]=o,c[a]=a,c)),c=(0,g.default)(((c={})[s+"collapse-panel-icon"]=!0,c[s+"collapse-panel-icon-expanded"]=r,c)),d=u?u+"-heading":void 0,f=u?u+"-region":void 0;return m.default.createElement("div",(0,p.default)({className:a,style:i,id:u},e),m.default.createElement("div",{id:d,className:s+"collapse-panel-title",onClick:l,onKeyDown:this.onKeyDown,tabIndex:"0","aria-disabled":o,"aria-expanded":r,"aria-controls":f,role:"button"},m.default.createElement(y.default,{type:"arrow-right",className:c,"aria-hidden":"true"}),t),m.default.createElement("div",{className:s+"collapse-panel-content",role:"region",id:f},n))},a=n=d,n.propTypes={prefix:r.default.string,style:r.default.object,children:r.default.any,isExpanded:r.default.bool,disabled:r.default.bool,title:r.default.node,className:r.default.string,onClick:r.default.func,id:r.default.string},n.defaultProps={prefix:"next-",isExpanded:!1,onClick:l.func.noop},n.isNextPanel=!0;var c,r=a;function d(){var e,n;(0,o.default)(this,d);for(var t=arguments.length,a=Array(t),r=0;r\n com.alibaba.nacos\n nacos-client\n ${version}\n \n*/\npackage com.alibaba.nacos.example;\n\nimport java.util.Properties;\nimport java.util.concurrent.Executor;\nimport com.alibaba.nacos.api.NacosFactory;\nimport com.alibaba.nacos.api.config.ConfigService;\nimport com.alibaba.nacos.api.config.listener.Listener;\nimport com.alibaba.nacos.api.exception.NacosException;\n\n/**\n * Config service example\n *\n * @author Nacos\n *\n */\npublic class ConfigExample {\n\n\tpublic static void main(String[] args) throws NacosException, InterruptedException {\n\t\tString serverAddr = "localhost";\n\t\tString dataId = "'.concat(e.dataId,'";\n\t\tString group = "').concat(e.group,'";\n\t\tProperties properties = new Properties();\n\t\tproperties.put(PropertyKeyConst.SERVER_ADDR, serverAddr);\n\t\tConfigService configService = NacosFactory.createConfigService(properties);\n\t\tString content = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\t\tconfigService.addListener(dataId, group, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void receiveConfigInfo(String configInfo) {\n\t\t\t\tSystem.out.println("receive:" + configInfo);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Executor getExecutor() {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\n\t\tboolean isPublishOk = configService.publishConfig(dataId, group, "content");\n\t\tSystem.out.println(isPublishOk);\n\n\t\tThread.sleep(3000);\n\t\tcontent = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\n\t\tboolean isRemoveOk = configService.removeConfig(dataId, group);\n\t\tSystem.out.println(isRemoveOk);\n\t\tThread.sleep(3000);\n\n\t\tcontent = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\t\tThread.sleep(300000);\n\n\t}\n}\n')}},{key:"getNodejsCode",value:function(e){return"TODO"}},{key:"getCppCode",value:function(e){return"TODO"}},{key:"getShellCode",value:function(e){return"TODO"}},{key:"getPythonCode",value:function(e){return'/*\n* Demo for Nacos\n*/\nimport json\nimport socket\n\nimport nacos\n\n\ndef get_host_ip():\n res = socket.gethostbyname(socket.gethostname())\n return res\n\n\ndef load_config(content):\n _config = json.loads(content)\n return _config\n\n\ndef nacos_config_callback(args):\n content = args[\'raw_content\']\n load_config(content)\n\n\nclass NacosClient:\n service_name = None\n service_port = None\n service_group = None\n\n def __init__(self, server_endpoint, namespace_id, username=None, password=None):\n self.client = nacos.NacosClient(server_endpoint,\n namespace=namespace_id,\n username=username,\n password=password)\n self.endpoint = server_endpoint\n self.service_ip = get_host_ip()\n\n def register(self):\n self.client.add_naming_instance(self.service_name,\n self.service_ip,\n self.service_port,\n group_name=self.service_group)\n\n def modify(self, service_name, service_ip=None, service_port=None):\n self.client.modify_naming_instance(service_name,\n service_ip if service_ip else self.service_ip,\n service_port if service_port else self.service_port)\n\n def unregister(self):\n self.client.remove_naming_instance(self.service_name,\n self.service_ip,\n self.service_port)\n\n def set_service(self, service_name, service_ip, service_port, service_group):\n self.service_name = service_name\n self.service_ip = service_ip\n self.service_port = service_port\n self.service_group = service_group\n\n async def beat_callback(self):\n self.client.send_heartbeat(self.service_name,\n self.service_ip,\n self.service_port)\n\n def load_conf(self, data_id, group):\n return self.client.get_config(data_id=data_id, group=group, no_snapshot=True)\n\n def add_conf_watcher(self, data_id, group, callback):\n self.client.add_config_watcher(data_id=data_id, group=group, cb=callback)\n\n\nif __name__ == \'__main__\':\n nacos_config = {\n "nacos_data_id":"test",\n "nacos_server_ip":"127.0.0.1",\n "nacos_namespace":"public",\n "nacos_groupName":"DEFAULT_GROUP",\n "nacos_user":"nacos",\n "nacos_password":"1234567"\n }\n nacos_data_id = nacos_config["nacos_data_id"]\n SERVER_ADDRESSES = nacos_config["nacos_server_ip"]\n NAMESPACE = nacos_config["nacos_namespace"]\n groupName = nacos_config["nacos_groupName"]\n user = nacos_config["nacos_user"]\n password = nacos_config["nacos_password"]\n # todo 将另一个路由对象(通常定义在其他模块或文件中)合并到主应用(app)中。\n # app.include_router(custom_api.router, tags=[\'test\'])\n service_ip = get_host_ip()\n client = NacosClient(SERVER_ADDRESSES, NAMESPACE, user, password)\n client.add_conf_watcher(nacos_data_id, groupName, nacos_config_callback)\n\n # 启动时,强制同步一次配置\n data_stream = client.load_conf(nacos_data_id, groupName)\n json_config = load_config(data_stream)\n'}},{key:"getCSharpCode",value:function(e){return'/*\nDemo for Basic Nacos Opreation\nApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.Extensions.DependencyInjection;\nusing Nacos.V2;\nusing Nacos.V2.DependencyInjection;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nclass Program\n{\n static async Task Main(string[] args)\n {\n string serverAddr = "http://localhost:8848";\n string dataId = "'.concat(e.dataId,'";\n string group = "').concat(e.group,'";\n\n IServiceCollection services = new ServiceCollection();\n\n services.AddNacosV2Config(x =>\n {\n x.ServerAddresses = new List { serverAddr };\n x.Namespace = "cs-test";\n\n // swich to use http or rpc\n x.ConfigUseRpc = true;\n });\n\n IServiceProvider serviceProvider = services.BuildServiceProvider();\n var configSvc = serviceProvider.GetService();\n\n var content = await configSvc.GetConfig(dataId, group, 3000);\n Console.WriteLine(content);\n\n var listener = new ConfigListener();\n\n await configSvc.AddListener(dataId, group, listener);\n\n var isPublishOk = await configSvc.PublishConfig(dataId, group, "content");\n Console.WriteLine(isPublishOk);\n\n await Task.Delay(3000);\n content = await configSvc.GetConfig(dataId, group, 5000);\n Console.WriteLine(content);\n\n var isRemoveOk = await configSvc.RemoveConfig(dataId, group);\n Console.WriteLine(isRemoveOk);\n await Task.Delay(3000);\n\n content = await configSvc.GetConfig(dataId, group, 5000);\n Console.WriteLine(content);\n await Task.Delay(300000);\n }\n\n internal class ConfigListener : IListener\n {\n public void ReceiveConfigInfo(string configInfo)\n {\n Console.WriteLine("receive:" + configInfo);\n }\n }\n}\n\n/*\nRefer to document: https://github.com/nacos-group/nacos-sdk-csharp/tree/dev/samples/MsConfigApp\nDemo for ASP.NET Core Integration\nMsConfigApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.Extensions.Configuration;\nusing Microsoft.Extensions.Hosting;\nusing Serilog;\nusing Serilog.Events;\n\npublic class Program\n{\n public static void Main(string[] args)\n {\n Log.Logger = new LoggerConfiguration()\n .Enrich.FromLogContext()\n .MinimumLevel.Override("Microsoft", LogEventLevel.Warning)\n .MinimumLevel.Override("System", LogEventLevel.Warning)\n .MinimumLevel.Debug()\n .WriteTo.Console()\n .CreateLogger();\n\n try\n {\n Log.ForContext().Information("Application starting...");\n CreateHostBuilder(args, Log.Logger).Build().Run();\n }\n catch (System.Exception ex)\n {\n Log.ForContext().Fatal(ex, "Application start-up failed!!");\n }\n finally\n {\n Log.CloseAndFlush();\n }\n }\n\n public static IHostBuilder CreateHostBuilder(string[] args, Serilog.ILogger logger) =>\n Host.CreateDefaultBuilder(args)\n .ConfigureAppConfiguration((context, builder) =>\n {\n var c = builder.Build();\n builder.AddNacosV2Configuration(c.GetSection("NacosConfig"), logAction: x => x.AddSerilog(logger));\n })\n .ConfigureWebHostDefaults(webBuilder =>\n {\n webBuilder.UseStartup().UseUrls("http://*:8787");\n })\n .UseSerilog();\n}\n ')}},{key:"openDialog",value:function(e){var t=this;this.setState({dialogvisible:!0}),this.record=e,setTimeout(function(){t.getData()})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.codepreview;n&&(n.innerHTML="",this.cm=window.CodeMirror(n,{value:t,mode:e,height:400,width:500,lineNumbers:!0,theme:"xq-light",lint:!0,tabMode:"indent",autoMatchParens:!0,textWrapping:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}))}},{key:"changeTab",value:function(e,t){var n=this;setTimeout(function(){n[e]=!0,n.createCodeMirror("text/javascript",t)})}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e;return x.a.createElement("div",null,x.a.createElement(y.a,{title:e.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:x.a.createElement("div",null),onClose:this.closeDialog.bind(this)},x.a.createElement("div",{style:{height:500}},x.a.createElement(H.a,{tip:e.loading,style:{width:"100%"},visible:this.state.loading},x.a.createElement(L.a,{shape:"text",style:{height:40,paddingBottom:10}},x.a.createElement(O,{title:"Java",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),x.a.createElement(O,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigboot_code)}),x.a.createElement(O,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloud_code)}),x.a.createElement(O,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),x.a.createElement(O,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),x.a.createElement(O,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),x.a.createElement(O,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)}),x.a.createElement(O,{title:"C#",key:7,onClick:this.changeTab.bind(this,"commoneditor7",this.csharpCode)})),x.a.createElement("div",{ref:"codepreview"})))))}}]),n}(x.a.Component)).displayName="ShowCodeing",S=S))||S,S=(t(69),t(40)),S=t.n(S),z=(t(756),S.a.Row),D=S.a.Col,W=(0,n.a.config)(((S=function(e){Object(M.a)(n,e);var t=Object(k.a)(n);function n(e){return Object(_.a)(this,n),(e=t.call(this,e)).state={visible:!1,title:"",content:"",isok:!0,dataId:"",group:""},e}return Object(b.a)(n,[{key:"componentDidMount",value:function(){this.initData()}},{key:"initData",value:function(){var e=this.props.locale;this.setState({title:(void 0===e?{}:e).confManagement})}},{key:"openDialog",value:function(e){this.setState({visible:!0,title:e.title,content:e.content,isok:e.isok,dataId:e.dataId,group:e.group,message:e.message})}},{key:"closeDialog",value:function(){this.setState({visible:!1})}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e,t=x.a.createElement("div",{style:{textAlign:"right"}},x.a.createElement(c.a,{type:"primary",onClick:this.closeDialog.bind(this)},e.determine));return x.a.createElement("div",null,x.a.createElement(y.a,{visible:this.state.visible,footer:t,style:{width:555},onCancel:this.closeDialog.bind(this),onClose:this.closeDialog.bind(this),title:e.deletetitle},x.a.createElement("div",null,x.a.createElement(z,null,x.a.createElement(D,{span:"4",style:{paddingTop:16}},x.a.createElement(m.a,{type:"".concat(this.state.isok?"success":"delete","-filling"),style:{color:this.state.isok?"green":"red"},size:"xl"})),x.a.createElement(D,{span:"20"},x.a.createElement("div",null,x.a.createElement("h3",null,this.state.isok?e.deletedSuccessfully:e.deleteFailed),x.a.createElement("p",null,x.a.createElement("span",{style:{color:"#999",marginRight:5}},"Data ID"),x.a.createElement("span",{style:{color:"#c7254e"}},this.state.dataId)),x.a.createElement("p",null,x.a.createElement("span",{style:{color:"#999",marginRight:5}},"Group"),x.a.createElement("span",{style:{color:"#c7254e"}},this.state.group)),this.state.isok?"":x.a.createElement("p",{style:{color:"red"}},this.state.message)))))))}}]),n}(x.a.Component)).displayName="DeleteDialog",S=S))||S,S=(t(757),t(436)),B=t.n(S),U=(0,n.a.config)(((S=function(e){Object(M.a)(n,e);var t=Object(k.a)(n);function n(){return Object(_.a)(this,n),t.apply(this,arguments)}return Object(b.a)(n,[{key:"render",value:function(){var e=this.props,t=e.data,t=void 0===t?{}:t,n=e.height,e=e.locale,a=void 0===e?{}:e;return x.a.createElement("div",null,"notice"===t.modeType?x.a.createElement("div",{"data-spm-click":"gostr=/aliyun;locaid=notice"},x.a.createElement(B.a,{style:{marginBottom:1\n com.alibaba.nacos\n nacos-client\n ${latest.version}\n \n*/\npackage com.alibaba.nacos.example;\n\nimport java.util.Properties;\n\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingFactory;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.listener.Event;\nimport com.alibaba.nacos.api.naming.listener.EventListener;\nimport com.alibaba.nacos.api.naming.listener.NamingEvent;\n\n/**\n * @author nkorange\n */\npublic class NamingExample {\n\n public static void main(String[] args) throws NacosException {\n\n Properties properties = new Properties();\n properties.setProperty("serverAddr", System.getProperty("serverAddr"));\n properties.setProperty("namespace", System.getProperty("namespace"));\n\n NamingService naming = NamingFactory.createNamingService(properties);\n\n naming.registerInstance("'.concat(this.record.name,'", "11.11.11.11", 8888, "TEST1");\n\n naming.registerInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n System.out.println(naming.getAllInstances("').concat(this.record.name,'"));\n\n naming.deregisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n System.out.println(naming.getAllInstances("').concat(this.record.name,'"));\n\n naming.subscribe("').concat(this.record.name,'", new EventListener() {\n @Override\n public void onEvent(Event event) {\n System.out.println(((NamingEvent)event).getServiceName());\n System.out.println(((NamingEvent)event).getInstances());\n }\n });\n }\n}')}},{key:"getSpringCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example\n* pom.xml\n \n com.alibaba.nacos\n nacos-spring-context\n ${latest.version}\n \n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring\npackage com.alibaba.nacos.example.spring;\n\nimport com.alibaba.nacos.api.annotation.NacosProperties;\nimport com.alibaba.nacos.spring.context.annotation.discovery.EnableNacosDiscovery;\nimport org.springframework.context.annotation.Configuration;\n\n@Configuration\n@EnableNacosDiscovery(globalProperties = @NacosProperties(serverAddr = "127.0.0.1:8848"))\npublic class NacosConfiguration {\n\n}\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring/controller\npackage com.alibaba.nacos.example.spring.controller;\n\nimport com.alibaba.nacos.api.annotation.NacosInjected;\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.pojo.Instance;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\nimport java.util.List;\n\nimport static org.springframework.web.bind.annotation.RequestMethod.GET;\n\n@Controller\n@RequestMapping("discovery")\npublic class DiscoveryController {\n\n @NacosInjected\n private NamingService namingService;\n\n @RequestMapping(value = "/get", method = GET)\n @ResponseBody\n public List get(@RequestParam String serviceName) throws NacosException {\n return namingService.getAllInstances(serviceName);\n }\n}'}},{key:"getSpringBootCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example\n* pom.xml\n \n com.alibaba.boot\n nacos-discovery-spring-boot-starter\n ${latest.version}\n \n*/\n/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/resources\n* application.properties\n nacos.discovery.server-addr=127.0.0.1:8848\n*/\n// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/java/com/alibaba/nacos/example/spring/boot/controller\n\npackage com.alibaba.nacos.example.spring.boot.controller;\n\nimport com.alibaba.nacos.api.annotation.NacosInjected;\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.pojo.Instance;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\nimport java.util.List;\n\nimport static org.springframework.web.bind.annotation.RequestMethod.GET;\n\n@Controller\n@RequestMapping("discovery")\npublic class DiscoveryController {\n\n @NacosInjected\n private NamingService namingService;\n\n @RequestMapping(value = "/get", method = GET)\n @ResponseBody\n public List get(@RequestParam String serviceName) throws NacosException {\n return namingService.getAllInstances(serviceName);\n }\n}'}},{key:"getSpringCloudCode",value:function(e){return"/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/\n* pom.xml\n \n org.springframework.cloud\n spring-cloud-starter-alibaba-nacos-discovery\n ${latest.version}\n \n*/\n\n// nacos-spring-cloud-provider-example\n\n/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-provider-example/src/main/resources\n* application.properties\nserver.port=18080\nspring.application.name=".concat(this.record.name,'\nspring.cloud.nacos.discovery.server-addr=127.0.0.1:8848\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-provider-example/src/main/java/com/alibaba/nacos/example/spring/cloud\npackage com.alibaba.nacos.example.spring.cloud;\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.cloud.client.discovery.EnableDiscoveryClient;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\n\n/**\n * @author xiaojing\n */\n@SpringBootApplication\n@EnableDiscoveryClient\npublic class NacosProviderApplication {\n\n public static void main(String[] args) {\n SpringApplication.run(NacosProviderApplication.class, args);\n}\n\n @RestController\n class EchoController {\n @RequestMapping(value = "/echo/{string}", method = RequestMethod.GET)\n public String echo(@PathVariable String string) {\n return "Hello Nacos Discovery " + string;\n }\n }\n}\n\n// nacos-spring-cloud-consumer-example\n\n/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-consumer-example/src/main/resources\n* application.properties\nspring.application.name=micro-service-oauth2\nspring.cloud.nacos.discovery.server-addr=127.0.0.1:8848\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-consumer-example/src/main/java/com/alibaba/nacos/example/spring/cloud\npackage com.alibaba.nacos.example.spring.cloud;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.cloud.client.discovery.EnableDiscoveryClient;\nimport org.springframework.cloud.client.loadbalancer.LoadBalanced;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\nimport org.springframework.web.client.RestTemplate;\n\n/**\n * @author xiaojing\n */\n@SpringBootApplication\n@EnableDiscoveryClient\npublic class NacosConsumerApplication {\n\n @LoadBalanced\n @Bean\n public RestTemplate restTemplate() {\n return new RestTemplate();\n }\n\n public static void main(String[] args) {\n SpringApplication.run(NacosConsumerApplication.class, args);\n }\n\n @RestController\n public class TestController {\n\n private final RestTemplate restTemplate;\n\n @Autowired\n public TestController(RestTemplate restTemplate) {this.restTemplate = restTemplate;}\n\n @RequestMapping(value = "/echo/{str}", method = RequestMethod.GET)\n public String echo(@PathVariable String str) {\n return restTemplate.getForObject("http://service-provider/echo/" + str, String.class);\n }\n }\n}')}},{key:"getNodejsCode",value:function(e){return"TODO"}},{key:"getCppCode",value:function(e){return"TODO"}},{key:"getShellCode",value:function(e){return"TODO"}},{key:"getPythonCode",value:function(e){return'/*\n* Demo for Nacos\n*/\nimport json\nimport socket\n\nimport nacos\n\n\ndef get_host_ip():\n res = socket.gethostbyname(socket.gethostname())\n return res\n\n\ndef load_config(content):\n _config = json.loads(content)\n return _config\n\n\ndef nacos_config_callback(args):\n content = args[\'raw_content\']\n load_config(content)\n\n\nclass NacosClient:\n service_name = None\n service_port = None\n service_group = None\n\n def __init__(self, server_endpoint, namespace_id, username=None, password=None):\n self.client = nacos.NacosClient(server_endpoint,\n namespace=namespace_id,\n username=username,\n password=password)\n self.endpoint = server_endpoint\n self.service_ip = get_host_ip()\n\n def register(self):\n self.client.add_naming_instance(self.service_name,\n self.service_ip,\n self.service_port,\n group_name=self.service_group)\n\n def modify(self, service_name, service_ip=None, service_port=None):\n self.client.modify_naming_instance(service_name,\n service_ip if service_ip else self.service_ip,\n service_port if service_port else self.service_port)\n\n def unregister(self):\n self.client.remove_naming_instance(self.service_name,\n self.service_ip,\n self.service_port)\n\n def set_service(self, service_name, service_ip, service_port, service_group):\n self.service_name = service_name\n self.service_ip = service_ip\n self.service_port = service_port\n self.service_group = service_group\n\n async def beat_callback(self):\n self.client.send_heartbeat(self.service_name,\n self.service_ip,\n self.service_port)\n\n def load_conf(self, data_id, group):\n return self.client.get_config(data_id=data_id, group=group, no_snapshot=True)\n\n def add_conf_watcher(self, data_id, group, callback):\n self.client.add_config_watcher(data_id=data_id, group=group, cb=callback)\n\n\nif __name__ == \'__main__\':\n nacos_config = {\n "nacos_data_id":"test",\n "nacos_server_ip":"127.0.0.1",\n "nacos_namespace":"public",\n "nacos_groupName":"DEFAULT_GROUP",\n "nacos_user":"nacos",\n "nacos_password":"1234567"\n }\n nacos_data_id = nacos_config["nacos_data_id"]\n SERVER_ADDRESSES = nacos_config["nacos_server_ip"]\n NAMESPACE = nacos_config["nacos_namespace"]\n groupName = nacos_config["nacos_groupName"]\n user = nacos_config["nacos_user"]\n password = nacos_config["nacos_password"]\n # todo 将另一个路由对象(通常定义在其他模块或文件中)合并到主应用(app)中。\n # app.include_router(custom_api.router, tags=[\'test\'])\n service_ip = get_host_ip()\n client = NacosClient(SERVER_ADDRESSES, NAMESPACE, user, password)\n client.add_conf_watcher(nacos_data_id, groupName, nacos_config_callback)\n\n # 启动时,强制同步一次配置\n data_stream = client.load_conf(nacos_data_id, groupName)\n json_config = load_config(data_stream)\n #设定服务\n client.set_service(json_config["service_name"], json_config.get("service_ip", service_ip), service_port, groupName)\n #注册服务\n client.register()\n #下线服务\n client.unregister()\n'}},{key:"getCSharpCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/\nDemo for Basic Nacos Opreation\nApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.Extensions.DependencyInjection;\nusing Nacos.V2;\nusing Nacos.V2.DependencyInjection;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nclass Program\n{\n static async Task Main(string[] args)\n {\n IServiceCollection services = new ServiceCollection();\n\n services.AddNacosV2Naming(x =>\n {\n x.ServerAddresses = new List { "http://localhost:8848/" };\n x.Namespace = "cs-test";\n\n // swich to use http or rpc\n x.NamingUseRpc = true;\n });\n\n IServiceProvider serviceProvider = services.BuildServiceProvider();\n var namingSvc = serviceProvider.GetService();\n\n await namingSvc.RegisterInstance("'.concat(this.record.name,'", "11.11.11.11", 8888, "TEST1");\n\n await namingSvc.RegisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(await namingSvc.GetAllInstances("').concat(this.record.name,'")));\n\n await namingSvc.DeregisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n var listener = new EventListener();\n\n await namingSvc.Subscribe("').concat(this.record.name,'", listener);\n }\n\n internal class EventListener : IEventListener\n {\n public Task OnEvent(IEvent @event)\n {\n Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(@event));\n return Task.CompletedTask;\n }\n }\n}\n\n/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/\nDemo for ASP.NET Core Integration\nApp.csproj\n\n\n \n\n*/\n\n/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/blob/dev/samples/App1/appsettings.json\n* appsettings.json\n{\n "nacos": {\n "ServerAddresses": [ "http://localhost:8848" ],\n "DefaultTimeOut": 15000,\n "Namespace": "cs",\n "ServiceName": "App1",\n "GroupName": "DEFAULT_GROUP",\n "ClusterName": "DEFAULT",\n "Port": 0,\n "Weight": 100,\n "RegisterEnabled": true,\n "InstanceEnabled": true,\n "Ephemeral": true,\n "NamingUseRpc": true,\n "NamingLoadCacheAtStart": ""\n }\n}\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/blob/dev/samples/App1/Startup.cs\nusing Nacos.AspNetCore.V2;\n\npublic class Startup\n{\n public Startup(IConfiguration configuration)\n {\n Configuration = configuration;\n }\n\n public IConfiguration Configuration { get; }\n\n public void ConfigureServices(IServiceCollection services)\n {\n // ....\n services.AddNacosAspNet(Configuration);\n }\n\n public void Configure(IApplicationBuilder app, IWebHostEnvironment env)\n {\n // ....\n }\n}\n ')}},{key:"openDialog",value:function(e){var t=this;this.setState({dialogvisible:!0}),this.record=e,setTimeout(function(){t.getData()})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.codepreview;n&&(n.innerHTML="",this.cm=window.CodeMirror(n,{value:t,mode:e,height:400,width:500,lineNumbers:!0,theme:"xq-light",lint:!0,tabMode:"indent",autoMatchParens:!0,textWrapping:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}),this.cm.setSize("auto","490px"))}},{key:"changeTab",value:function(e,t){var n=this;setTimeout(function(){n[e]=!0,n.createCodeMirror("text/javascript",t)})}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e;return O.a.createElement("div",null,O.a.createElement(o.a,{title:e.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:O.a.createElement("div",null),onClose:this.closeDialog.bind(this)},O.a.createElement("div",{style:{height:500}},O.a.createElement(h.a,{tip:e.loading,style:{width:"100%"},visible:this.state.loading},O.a.createElement(m.a,{shape:"text",style:{height:40,paddingBottom:10}},O.a.createElement(g,{title:"Java",key:0,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),O.a.createElement(g,{title:"Spring",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.springCode)}),O.a.createElement(g,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigbootCode)}),O.a.createElement(g,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloudCode)}),O.a.createElement(g,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),O.a.createElement(g,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),O.a.createElement(g,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),O.a.createElement(g,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)}),O.a.createElement(g,{title:"C#",key:7,onClick:this.changeTab.bind(this,"commoneditor7",this.csharpCode)})),O.a.createElement("div",{ref:"codepreview"})))))}}]),n}(O.a.Component)).displayName="ShowServiceCodeing",f=f))||f,Y=t(51),I=t(146),A=(t(778),t(22)),R=L.a.Item,H=d.a.Row,F=d.a.Col,z=T.a.Column,d=(0,n.a.config)(((f=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e){var a;return Object(s.a)(this,n),(a=t.call(this,e)).getQueryLater=function(){setTimeout(function(){return a.queryServiceList()})},a.showcode=function(){setTimeout(function(){return a.queryServiceList()})},a.setNowNameSpace=function(e,t,n){return a.setState({nowNamespaceName:e,nowNamespaceId:t,nowNamespaceDesc:n})},a.rowColor=function(e){return{className:e.healthyInstanceCount?"":"row-bg-red"}},a.editServiceDialog=O.a.createRef(),a.showcode=O.a.createRef(),a.state={loading:!1,total:0,pageSize:10,currentPage:1,dataSource:[],search:{serviceName:Object(p.b)("serviceNameParam")||"",groupName:Object(p.b)("groupNameParam")||""},hasIpCount:!("false"===localStorage.getItem("hasIpCount"))},a.field=new i.a(Object(l.a)(a)),a}return Object(a.a)(n,[{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"openEditServiceDialog",value:function(){try{this.editServiceDialog.current.getInstance().show(this.state.service)}catch(e){}}},{key:"queryServiceList",value:function(){var n=this,e=this.state,t=e.currentPage,a=e.pageSize,r=e.search,o=e.withInstances,o=void 0!==o&&o,e=e.hasIpCount,e=["hasIpCount=".concat(e),"withInstances=".concat(o),"pageNo=".concat(t),"pageSize=".concat(a),"serviceNameParam=".concat(r.serviceName),"groupNameParam=".concat(r.groupName)];Object(p.f)({serviceNameParam:r.serviceName,groupNameParam:r.groupName}),this.openLoading(),Object(p.e)({url:"v3/console/ns/service/list?".concat(e.join("&")),success:function(e){var e=e.data,e=void 0===e?{}:e,t=e.count,e=e.serviceList;n.setState({dataSource:void 0===e?[]:e,total:void 0===t?0:t,loading:!1})},error:function(){return n.setState({dataSource:[],total:0,currentPage:0,loading:!1})}})}},{key:"showSampleCode",value:function(e){this.showcode.current.getInstance().openDialog(e)}},{key:"querySubscriber",value:function(e){var t=e.name,e=e.groupName,n=this.state.nowNamespaceId;this.props.history.push(Object(D.a)("/subscriberList",{namespace:n,name:t,groupName:e}))}},{key:"handlePageSizeChange",value:function(e){var t=this;this.setState({pageSize:e},function(){return t.queryServiceList()})}},{key:"deleteService",value:function(e){var t=this,n=this.props.locale,n=void 0===n?{}:n,a=n.prompt,n=n.promptDelete;o.a.confirm({title:a,content:n,onOk:function(){Object(p.e)({method:"DELETE",url:"v3/console/ns/service?serviceName=".concat(e.name,"&groupName=").concat(e.groupName),dataType:"json",beforeSend:function(){return t.openLoading()},success:function(e){0!==e.code?r.a.error(e.message||"删除服务失败"):(r.a.success("服务删除成功"),t.queryServiceList())},error:function(e){var t;r.a.error((null==(t=e.data)?void 0:t.responseText)||e.statusText||"请求失败")},complete:function(){return t.closeLoading()}})}})}},{key:"render",value:function(){var a=this,e=this.props.locale,t=void 0===e?{}:e,e=t.pubNoData,n=t.serviceList,r=t.serviceName,o=t.serviceNamePlaceholder,i=t.groupName,s=t.groupNamePlaceholder,l=t.hiddenEmptyService,u=t.query,c=t.create,d=t.operation,f=t.detail,p=t.sampleCode,h=t.deleteAction,m=t.subscriber,g=this.state,y=g.search,v=g.nowNamespaceName,_=g.nowNamespaceId,b=g.nowNamespaceDesc,g=g.hasIpCount,w=this.field,M=w.init,w=w.getValue;return this.init=M,this.getValue=w,O.a.createElement("div",{className:"main-container service-management"},O.a.createElement(Y.a,{title:n,desc:b,namespaceId:_,namespaceName:v,nameSpace:!0}),O.a.createElement(N.a,{setNowNameSpace:this.setNowNameSpace,namespaceCallBack:this.getQueryLater}),O.a.createElement(H,{className:"demo-row",style:{marginBottom:10,padding:0}},O.a.createElement(F,{span:"24"},O.a.createElement(L.a,{inline:!0,field:this.field},O.a.createElement(R,{label:""},O.a.createElement(C.a,{type:"primary",onClick:function(){return a.openEditServiceDialog()}},c)),O.a.createElement(R,{label:r},O.a.createElement(E.a,{placeholder:o,style:{width:200},value:y.serviceName,onChange:function(e){return a.setState({search:Object(x.a)(Object(x.a)({},y),{},{serviceName:e})})},onPressEnter:function(){return a.setState({currentPage:1},function(){return a.queryServiceList()})}})),O.a.createElement(R,{label:i},O.a.createElement(E.a,{placeholder:s,style:{width:200},value:y.groupName,onChange:function(e){return a.setState({search:Object(x.a)(Object(x.a)({},y),{},{groupName:e})})},onPressEnter:function(){return a.setState({currentPage:1},function(){return a.queryServiceList()})}})),O.a.createElement(L.a.Item,{label:"".concat(l)},O.a.createElement(S.a,{checked:g,onChange:function(e){return a.setState({hasIpCount:e,currentPage:1},function(){localStorage.setItem("hasIpCount",e),a.queryServiceList()})}})),O.a.createElement(R,{label:""},O.a.createElement(C.a,{type:"primary",onClick:function(){return a.setState({currentPage:1},function(){return a.queryServiceList()})},style:{marginRight:10}},u))))),O.a.createElement(H,{style:{padding:0}},O.a.createElement(F,{span:"24",style:{padding:0}},O.a.createElement(T.a,{dataSource:this.state.dataSource,locale:{empty:e},rowProps:function(e){return a.rowColor(e)},loading:this.state.loading},O.a.createElement(z,{title:t.columnServiceName,dataIndex:"name"}),O.a.createElement(z,{title:t.groupName,dataIndex:"groupName"}),O.a.createElement(z,{title:t.columnClusterCount,dataIndex:"clusterCount"}),O.a.createElement(z,{title:t.columnIpCount,dataIndex:"ipCount"}),O.a.createElement(z,{title:t.columnHealthyInstanceCount,dataIndex:"healthyInstanceCount"}),O.a.createElement(z,{title:t.columnTriggerFlag,dataIndex:"triggerFlag"}),O.a.createElement(z,{title:d,align:"center",cell:function(e,t,n){return O.a.createElement("div",null,O.a.createElement("a",{onClick:function(){var e=n.name,t=n.groupName;a.props.history.push(Object(D.a)("/serviceDetail",{name:e,groupName:t}))},style:{marginRight:5}},f),O.a.createElement("span",{style:{marginRight:5}},"|"),O.a.createElement("a",{style:{marginRight:5},onClick:function(){return a.showSampleCode(n)}},p),O.a.createElement("span",{style:{marginRight:5}},"|"),O.a.createElement("a",{style:{marginRight:5},onClick:function(){return a.querySubscriber(n)}},m),O.a.createElement("span",{style:{marginRight:5}},"|"),O.a.createElement("a",{onClick:function(){return a.deleteService(n)},style:{marginRight:5}},h))}})))),O.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},O.a.createElement(k.a,{current:this.state.currentPage,pageSizeList:A.f,pageSizePosition:"start",pageSizeSelector:"dropdown",popupProps:{align:"bl tl"},total:this.state.total,pageSize:this.state.pageSize,totalRender:function(e){return O.a.createElement(I.a,{locale:t,total:e})},onPageSizeChange:function(e){return a.handlePageSizeChange(e)},onChange:function(e){return a.setState({currentPage:e},function(){return a.queryServiceList()})}})),O.a.createElement(j,{ref:this.showcode}),O.a.createElement(P.a,{ref:this.editServiceDialog,openLoading:function(){return a.openLoading()},closeLoading:function(){return a.closeLoading()},queryServiceList:function(){return a.setState({currentPage:1},function(){return a.queryServiceList()})}}))}}]),n}(O.a.Component)).displayName="ServiceList",t=f))||t;e.a=d},function(e,t,n){"use strict";n(67);var a=n(46),u=n.n(a),a=(n(35),n(18)),c=n.n(a),a=(n(66),n(21)),d=n.n(a),a=(n(34),n(20)),f=n.n(a),a=(n(93),n(55)),p=n.n(a),a=(n(38),n(2)),h=n.n(a),a=(n(37),n(10)),m=n.n(a),i=n(13),s=n(14),l=n(23),g=n(16),y=n(15),a=(n(27),n(6)),a=n.n(a),r=n(0),v=n.n(r),r=n(30),_=n(45),b=n(53),w=n(32),o=(n(49),n(28)),M=n.n(o),k=(n(168),h.a.Item),S={labelCol:{fixedSpan:4},wrapperCol:{span:19}},E=(0,a.a.config)(((o=function(e){Object(g.a)(o,e);var r=Object(y.a)(o);function o(){var e;Object(i.a)(this,o);for(var t=arguments.length,n=new Array(t),a=0;ao&&v.a.createElement(u.a,{className:"users-pagination",current:i,total:n.totalCount,pageSize:o,onChange:function(e){return t.setState({pageNo:e},function(){return t.getUsers()})}}),v.a.createElement(E,{visible:s,onOk:function(e){return Object(_.c)(e).then(function(e){return t.setState({pageNo:1},function(){return t.getUsers()}),e})},onCancel:function(){return t.colseCreateUser()}}),v.a.createElement(x.a,{visible:l,username:e,onOk:function(e){return Object(_.k)(e).then(function(e){return t.getUsers(),e})},onCancel:function(){return t.setState({passwordResetUser:void 0,passwordResetUserVisible:!1})}}))}}]),n}(v.a.Component)).displayName="UserManagement",n=o))||n)||n;t.a=r},function(e,t,n){"use strict";n(67);var a=n(46),l=n.n(a),a=(n(35),n(18)),u=n.n(a),c=n(32),a=(n(66),n(21)),d=n.n(a),a=(n(34),n(20)),f=n.n(a),a=(n(93),n(55)),p=n.n(a),a=(n(38),n(2)),h=n.n(a),a=(n(37),n(10)),m=n.n(a),i=n(13),s=n(14),g=n(23),y=n(16),v=n(15),a=(n(27),n(6)),a=n.n(a),r=n(0),_=n.n(r),r=n(30),b=n(45),o=n(86),w=n(53),M=(n(49),n(28)),k=n.n(M),M=(n(59),n(29)),S=n.n(M),E=h.a.Item,x=S.a.Option,C={labelCol:{fixedSpan:4},wrapperCol:{span:19}},T=Object(r.b)(function(e){return{namespaces:e.namespace.namespaces}},{getNamespaces:o.b,searchRoles:b.l})(M=(0,a.a.config)(((M=function(e){Object(y.a)(o,e);var r=Object(v.a)(o);function o(){var t;Object(i.a)(this,o);for(var e=arguments.length,n=new Array(e),a=0;ai&&_.a.createElement(l.a,{className:"users-pagination",current:s,total:t.totalCount,pageSize:i,onChange:function(e){return a.setState({pageNo:e},function(){return a.getPermissions()})}}),_.a.createElement(T,{visible:n,onOk:function(e){return Object(b.a)(e).then(function(e){return a.setState({pageNo:1},function(){return a.getPermissions()}),e})},onCancel:function(){return a.colseCreatePermission()}}))}}]),n}(_.a.Component)).displayName="PermissionsManagement",n=M))||n)||n);t.a=r},function(e,t,n){"use strict";n(67);var a=n(46),l=n.n(a),a=(n(35),n(18)),u=n.n(a),a=(n(66),n(21)),c=n.n(a),a=(n(34),n(20)),d=n.n(a),a=(n(93),n(55)),f=n.n(a),a=(n(38),n(2)),p=n.n(a),a=(n(37),n(10)),h=n.n(a),i=n(13),s=n(14),m=n(23),g=n(16),y=n(15),a=(n(27),n(6)),a=n.n(a),r=n(0),v=n.n(r),r=n(30),_=n(45),b=n(53),o=(n(59),n(29)),w=n.n(o),o=(n(49),n(28)),M=n.n(o),k=p.a.Item,S={labelCol:{fixedSpan:4},wrapperCol:{span:19}},E=Object(r.b)(function(e){return{users:e.authority.users}},{searchUsers:_.m})(o=(0,a.a.config)(((o=function(e){Object(g.a)(o,e);var r=Object(y.a)(o);function o(){var t;Object(i.a)(this,o);for(var e=arguments.length,n=new Array(e),a=0;ao&&v.a.createElement(l.a,{className:"users-pagination",current:i,total:t.totalCount,pageSize:o,onChange:function(e){return a.setState({pageNo:e},function(){return a.getRoles()})}}),v.a.createElement(E,{visible:s,onOk:function(e){return Object(_.b)(e).then(function(e){return a.getRoles(),e})},onCancel:function(){return a.colseCreateRole()}}))}}]),n}(v.a.Component)).displayName="RolesManagement",n=o))||n)||n);t.a=r},function(e,t,n){"use strict";n(35);function l(e){var t=void 0===(t=localStorage.token)?"{}":t,t=(Object(_.c)(t)&&JSON.parse(t)||{}).globalAdmin,n=[];return"naming"===e?n.push(b):"config"===e?n.push(w):n.push(w,b),t&&n.push(M),n.push(k),n.push(S),n.push(E),n.filter(function(e){return e})}var a=n(18),u=n.n(a),a=(n(47),n(24)),c=n.n(a),a=(n(43),n(26)),d=n.n(a),r=n(13),o=n(14),i=n(16),s=n(15),a=(n(27),n(6)),a=n.n(a),f=n(12),p=(n(84),n(50)),h=n.n(p),p=n(0),m=n.n(p),p=n(39),g=n(30),y=n(108),v=n(52),_=n(48),b={key:"serviceManagementVirtual",children:[{key:"serviceManagement",url:"/serviceManagement"},{key:"subscriberList",url:"/subscriberList"}]},w={key:"configurationManagementVirtual",children:[{key:"configurationManagement",url:"/configurationManagement"},{key:"historyRollback",url:"/historyRollback"},{key:"listeningToQuery",url:"/listeningToQuery"}]},M={key:"authorityControl",children:[{key:"userList",url:"/userManagement"},{key:"roleManagement",url:"/rolesManagement"},{key:"privilegeManagement",url:"/permissionsManagement"}]},k={key:"namespace",url:"/namespace"},S={key:"clusterManagementVirtual",children:[{key:"clusterManagement",url:"/clusterManagement"}]},E={key:"settingCenter",url:"/settingCenter"},x=(n(386),h.a.SubMenu),C=h.a.Item,p=(n=Object(g.b)(function(e){return Object(f.a)(Object(f.a)({},e.locale),e.base)},{getState:v.e,getNotice:v.d,getGuide:v.c}),g=a.a.config,Object(p.g)(a=n(a=g(((v=function(e){Object(i.a)(n,e);var t=Object(s.a)(n);function n(e){return Object(r.a)(this,n),(e=t.call(this,e)).state={visible:!0},e}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.props.getState(),this.props.getNotice(),this.props.getGuide()}},{key:"goBack",value:function(){this.props.history.goBack()}},{key:"navTo",value:function(e){var t=this.props.location.search,t=new URLSearchParams(t);t.set("namespace",window.nownamespace),t.set("namespaceShowName",window.namespaceShowName),this.props.history.push([e,"?",t.toString()].join(""))}},{key:"isCurrentPath",value:function(e){return e===this.props.location.pathname?"current-path next-selected":void 0}},{key:"defaultOpenKeys",value:function(){for(var t=this,e=l(this.props.functionMode),n=0,a=e.length;nthis.state.pageSize&&S.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},S.a.createElement(v.a,{current:this.state.pageNo,total:a,pageSize:this.state.pageSize,onChange:function(e){return t.setState({pageNo:e},function(){return t.querySubscriberList()})}}))))}}]),n}(S.a.Component)).displayName="SubscriberList",d=n))||d)||d;t.a=f},function(e,t,n){"use strict";n(54);var a=n(36),c=n.n(a),a=(n(67),n(46)),d=n.n(a),a=(n(179),n(78)),f=n.n(a),a=(n(37),n(10)),p=n.n(a),a=(n(34),n(20)),h=n.n(a),a=(n(35),n(18)),r=n.n(a),a=(n(47),n(24)),o=n.n(a),a=(n(49),n(28)),i=n.n(a),s=n(13),l=n(14),u=n(23),m=n(16),g=n(15),a=(n(27),n(6)),a=n.n(a),y=(n(421),n(123)),v=n.n(y),y=(n(66),n(21)),_=n.n(y),y=(n(69),n(40)),y=n.n(y),b=(n(38),n(2)),w=n.n(b),b=n(0),M=n.n(b),k=n(1),b=n(144),S=n.n(b),E=n(51),x=(n(781),w.a.Item),C=y.a.Row,T=y.a.Col,L=_.a.Column,O=v.a.Panel,y=(0,a.a.config)(((b=function(e){Object(m.a)(a,e);var t=Object(g.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).getQueryLater=function(){setTimeout(function(){return n.queryClusterStateList()})},n.setNowNameSpace=function(e,t){return n.setState({nowNamespaceName:e,nowNamespaceId:t})},n.rowColor=function(e){return{className:(e.voteFor,"")}},n.state={loading:!1,total:0,pageSize:10,currentPage:1,keyword:"",dataSource:[]},n.field=new i.a(Object(u.a)(n)),n}return Object(l.a)(a,[{key:"componentDidMount",value:function(){this.getQueryLater()}},{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"queryClusterStateList",value:function(){var n=this,e=this.state,t=e.currentPage,a=e.pageSize,r=e.keyword,e=e.withInstances,e=["withInstances=".concat(void 0!==e&&e),"pageNo=".concat(t),"pageSize=".concat(a),"keyword=".concat(r)];Object(k.e)({url:"v3/console/core/cluster/nodes?".concat(e.join("&")),beforeSend:function(){return n.openLoading()},success:function(){var e=0this.state.pageSize&&M.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},M.a.createElement(d.a,{current:this.state.currentPage,total:this.state.total,pageSize:this.state.pageSize,onChange:function(e){return t.setState({currentPage:e},function(){return t.queryClusterStateList()})}}))))}}]),a}(M.a.Component)).displayName="ClusterNodeList",n=b))||n;t.a=y},function(e,t,n){"use strict";n(34);var a=n(20),i=n.n(a),s=n(13),l=n(14),u=n(16),c=n(15),a=(n(27),n(6)),a=n.n(a),r=n(12),o=(n(114),n(75)),o=n.n(o),d=n(0),f=n.n(d),p=(n(784),n(51)),d=n(87),h=n(148),m=n(149),g=n(30),y=n(22),v=o.a.Group,g=Object(g.b)(function(e){return Object(r.a)({},e.locale)},{changeLanguage:d.a,changeTheme:h.a,changeNameShow:m.a})(o=(0,a.a.config)(((n=function(e){Object(u.a)(o,e);var r=Object(c.a)(o);function o(e){Object(s.a)(this,o),e=r.call(this,e);var t=localStorage.getItem(y.p),n=localStorage.getItem(y.j),a=localStorage.getItem(y.g);return e.state={theme:"dark"===t?"dark":"light",language:"en-US"===a?"en-US":"zh-CN",nameShow:"select"===n?"select":"label"},e}return Object(l.a)(o,[{key:"newTheme",value:function(e){this.setState({theme:e})}},{key:"newLanguage",value:function(e){this.setState({language:e})}},{key:"newNameShow",value:function(e){this.setState({nameShow:e})}},{key:"submit",value:function(){var e=this.props,t=e.changeLanguage,n=e.changeTheme,e=e.changeNameShow,a=this.state.language,r=this.state.theme,o=this.state.nameShow;t(a),n(r),e(o)}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e,t=[{value:"light",label:e.settingLight},{value:"dark",label:e.settingDark}],n=[{value:"select",label:e.settingShowSelect},{value:"label",label:e.settingShowLabel}];return f.a.createElement(f.a.Fragment,null,f.a.createElement(p.a,{title:e.settingTitle}),f.a.createElement("div",{className:"setting-box"},f.a.createElement("div",{className:"text-box"},f.a.createElement("div",{className:"setting-checkbox"},f.a.createElement("div",{className:"setting-span"},e.settingTheme),f.a.createElement(v,{dataSource:t,value:this.state.theme,onChange:this.newTheme.bind(this)})),f.a.createElement("div",{className:"setting-checkbox"},f.a.createElement("div",{className:"setting-span"},e.settingLocale),f.a.createElement(v,{dataSource:[{value:"en-US",label:"English"},{value:"zh-CN",label:"中文"}],value:this.state.language,onChange:this.newLanguage.bind(this)})),f.a.createElement("div",{className:"setting-checkbox"},f.a.createElement("div",{className:"setting-span"},e.settingShow),f.a.createElement(v,{dataSource:n,value:this.state.nameShow,onChange:this.newNameShow.bind(this)}))),f.a.createElement(i.a,{type:"primary",onClick:this.submit.bind(this)},e.settingSubmit)))}}]),o}(f.a.Component)).displayName="SettingCenter",o=n))||o)||o;t.a=g},function(e,t,V){"use strict";V.r(t),function(e){V(54);var t=V(36),a=V.n(t),t=(V(27),V(6)),r=V.n(t),o=V(13),i=V(14),s=V(16),l=V(15),n=V(12),t=V(0),u=V.n(t),t=V(25),t=V.n(t),c=V(125),d=V(429),f=V(440),p=V(30),h=V(39),m=V(73),g=(V(477),V(449)),y=V(22),v=V(450),_=V(451),b=V(443),w=V(452),M=V(453),k=V(444),S=V(454),E=V(455),x=V(456),C=V(457),T=V(458),L=V(441),O=V(445),D=V(442),N=V(459),P=V(460),j=V(446),I=V(447),A=V(448),R=V(438),H=V(461),Y=V(439),F=V(87),z=V(52),W=V(148),B=V(149),e=(V(785),e.hot,localStorage.getItem(y.g)||localStorage.setItem(y.g,"zh-CN"===navigator.language?"zh-CN":"en-US"),Object(c.b)(Object(n.a)(Object(n.a)({},Y.a),{},{routing:d.routerReducer}))),Y=Object(c.d)(e,Object(c.c)(Object(c.a)(f.a),window[y.l]?window[y.l]():function(e){return e})),U=[{path:"/",exact:!0,render:function(){return u.a.createElement(h.a,{to:"/welcome"})}},{path:"/welcome",component:R.a},{path:"/namespace",component:b.a},{path:"/newconfig",component:w.a},{path:"/configsync",component:M.a},{path:"/configdetail",component:k.a},{path:"/configeditor",component:S.a},{path:"/historyDetail",component:E.a},{path:"/configRollback",component:x.a},{path:"/historyRollback",component:C.a},{path:"/listeningToQuery",component:T.a},{path:"/configurationManagement",component:L.a},{path:"/serviceManagement",component:O.a},{path:"/serviceDetail",component:D.a},{path:"/subscriberList",component:N.a},{path:"/clusterManagement",component:P.a},{path:"/userManagement",component:j.a},{path:"/rolesManagement",component:A.a},{path:"/permissionsManagement",component:I.a},{path:"/settingCenter",component:H.a}],e=Object(p.b)(function(e){return Object(n.a)(Object(n.a)({},e.locale),e.base)},{changeLanguage:F.a,getState:z.e,changeTheme:W.a,changeNameShow:B.a})(d=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){return Object(o.a)(this,n),(e=t.call(this,e)).state={shownotice:"none",noticecontent:"",nacosLoading:{}},e}return Object(i.a)(n,[{key:"componentDidMount",value:function(){this.props.getState();var e=localStorage.getItem(y.g),t=localStorage.getItem(y.p),n=localStorage.getItem(y.j);this.props.changeLanguage(e),this.props.changeTheme(t),this.props.changeNameShow(n)}},{key:"router",get:function(){var e=this.props,t=e.loginPageEnabled,e=e.consoleUiEnable;return u.a.createElement(m.a,null,u.a.createElement(h.d,null,t&&"false"===t?null:u.a.createElement(h.b,{path:"/login",component:v.a}),u.a.createElement(h.b,{path:"/register",component:_.a}),u.a.createElement(g.a,null,e&&"true"===e&&U.map(function(e){return u.a.createElement(h.b,Object.assign({key:e.path},e))}))))}},{key:"render",value:function(){var e=this.props,t=e.locale,e=e.loginPageEnabled;return u.a.createElement(a.a,Object.assign({className:"nacos-loading",shape:"flower",tip:"loading...",visible:!e,fullScreen:!0},this.state.nacosLoading),u.a.createElement(r.a,{locale:t},this.router))}}]),n}(u.a.Component))||d;t.a.render(u.a.createElement(p.a,{store:Y},u.a.createElement(e,null)),document.getElementById("root"))}.call(this,V(463)(e))},function(e,t){e.exports=function(e){var t;return e.webpackPolyfill||((t=Object.create(e)).children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1),t}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(I,e,t){"use strict"; +var S=P(706),o=P(707),s=P(708);function n(){return d.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(n()=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function f(e,t){if(d.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;var n=(e="string"!=typeof e?""+e:e).length;if(0===n)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return L(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return O(e).length;default:if(a)return L(e).length;t=(""+t).toLowerCase(),a=!0}}function t(e,t,n){var a,r=!1;if((t=void 0===t||t<0?0:t)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var o=this,i=t,s=n,l=o.length;(!s||s<0||l=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=d.from(t,a)),d.isBuffer(t))return 0===t.length?-1:m(e,t,n,a,r);if("number"==typeof t)return t&=255,d.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?(r?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,n):m(e,[t],n,a,r);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,a,r){var o=1,i=e.length,s=t.length;if(void 0!==a&&("ucs2"===(a=String(a).toLowerCase())||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(e.length<2||t.length<2)return-1;i/=o=2,s/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(r)for(var u=-1,c=n;c>8,r.push(n%256),r.push(a);return r}(t,e.length-n),e,n,a)}function E(e,t,n){n=Math.min(e.length,n);for(var a=[],r=t;r>>10&1023|55296),c=56320|1023&c),a.push(c),r+=d}var f=a,p=f.length;if(p<=v)return String.fromCharCode.apply(String,f);for(var h="",m=0;mt)&&(e+=" ... "),""},d.prototype.compare=function(e,t,n,a,r){if(!d.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=e?e.length:0),void 0===a&&(a=0),void 0===r&&(r=this.length),(t=void 0===t?0:t)<0||n>e.length||a<0||r>this.length)throw new RangeError("out of range index");if(r<=a&&n<=t)return 0;if(r<=a)return-1;if(n<=t)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(a>>>=0),i=(n>>>=0)-(t>>>=0),s=Math.min(o,i),l=this.slice(a,r),u=e.slice(t,n),c=0;cthis.length)throw new RangeError("Attempt to write outside buffer bounds");a=a||"utf8";for(var o,i,s,l=!1;;)switch(a){case"hex":var u=this,c=e,d=t,f=n,p=(d=Number(d)||0,u.length-d);if((!f||p<(f=Number(f)))&&(f=p),(p=c.length)%2!=0)throw new TypeError("Invalid hex string");p/2e.length)throw new RangeError("Index out of range")}function w(e,t,n,a){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r>>8*(a?r:1-r)}function M(e,t,n,a){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r>>8*(a?r:3-r)&255}function k(e,t,n,a){if(n+a>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function x(e,t,n,a,r){return r||k(e,0,n,4),o.write(e,t,n,a,23,4),n+4}function C(e,t,n,a,r){return r||k(e,0,n,8),o.write(e,t,n,a,52,8),n+8}d.prototype.slice=function(e,t){var n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):n>>8):w(this,e,t,!0),t+2},d.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,65535,0),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):w(this,e,t,!1),t+2},d.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},d.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},d.prototype.writeIntLE=function(e,t,n,a){e=+e,t|=0,a||b(this,e,t,n,(a=Math.pow(2,8*n-1))-1,-a);var r=0,o=1,i=0;for(this[t]=255&e;++r>0)-i&255;return t+n},d.prototype.writeIntBE=function(e,t,n,a){e=+e,t|=0,a||b(this,e,t,n,(a=Math.pow(2,8*n-1))-1,-a);var r=n-1,o=1,i=0;for(this[t+r]=255&e;0<=--r&&(o*=256);)e<0&&0===i&&0!==this[t+r+1]&&(i=1),this[t+r]=(e/o>>0)-i&255;return t+n},d.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,1,127,-128),d.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&(e=e<0?255+e+1:e),t+1},d.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):w(this,e,t,!0),t+2},d.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):w(this,e,t,!1),t+2},d.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,2147483647,-2147483648),d.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},d.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||b(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},d.prototype.writeFloatLE=function(e,t,n){return x(this,e,t,!0,n)},d.prototype.writeFloatBE=function(e,t,n){return x(this,e,t,!1,n)},d.prototype.writeDoubleLE=function(e,t,n){return C(this,e,t,!0,n)},d.prototype.writeDoubleBE=function(e,t,n){return C(this,e,t,!1,n)},d.prototype.copy=function(e,t,n,a){if(n=n||0,a||0===a||(a=this.length),t>=e.length&&(t=e.length),(a=0=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length);var r,o=(a=e.length-t>>=0,n=void 0===n?this.length:n>>>0,"number"==typeof(e=e||0))for(s=t;s>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function O(e){return S.toByteArray(function(e){var t;if((e=((t=e).trim?t.trim():t.replace(/^\s+|\s+$/g,"")).replace(T,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,n,a){for(var r=0;r=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}.call(this,P(65))},function(e,t,n){"use strict";var o=n(138);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,r=this._writableState&&this._writableState.destroyed;return a||r?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,o.nextTick(i,this,e)):o.nextTick(i,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,o.nextTick(i,n,e)):o.nextTick(i,n,e):t&&t(e)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";var a=n(139).Buffer,r=a.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"==typeof t||a.isEncoding!==r&&r(e))return t||e;throw new Error("Unknown encoding: "+e)}function i(e){var t;switch(this.encoding=o(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=l,t=4;break;case"base64":this.text=d,this.end=f,t=3;break;default:return this.write=p,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=a.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function l(e){var t,n=this.lastTotal-this.lastNeed,a=(t=this,128!=(192&(a=e)[0])?(t.lastNeed=0,"�"):1e.slidesToShow&&(n=e.slideWidth*e.slidesToShow*-1,o=e.slideHeight*e.slidesToShow*-1),e.slideCount%e.slidesToScroll!=0&&(t=e.slideIndex+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow,t=e.rtl?(e.slideIndex>=e.slideCount?e.slideCount-e.slideIndex:e.slideIndex)+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow:t)&&(o=e.slideIndex>e.slideCount?(n=(e.slidesToShow-(e.slideIndex-e.slideCount))*e.slideWidth*-1,(e.slidesToShow-(e.slideIndex-e.slideCount))*e.slideHeight*-1):(n=e.slideCount%e.slidesToScroll*e.slideWidth*-1,e.slideCount%e.slidesToScroll*e.slideHeight*-1))):e.slideCount%e.slidesToScroll!=0&&e.slideIndex+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow&&(n=(e.slidesToShow-e.slideCount%e.slidesToScroll)*e.slideWidth),e.centerMode&&(e.infinite?n+=e.slideWidth*Math.floor(e.slidesToShow/2):n=e.slideWidth*Math.floor(e.slidesToShow/2)),a=e.vertical?e.slideIndex*e.slideHeight*-1+o:e.slideIndex*e.slideWidth*-1+n,!0===e.variableWidth&&(t=void 0,a=(r=e.slideCount<=e.slidesToShow||!1===e.infinite?i.default.findDOMNode(e.trackRef).childNodes[e.slideIndex]:(t=e.slideIndex+e.slidesToShow,i.default.findDOMNode(e.trackRef).childNodes[t]))?-1*r.offsetLeft:0,!0===e.centerMode)&&(r=!1===e.infinite?i.default.findDOMNode(e.trackRef).children[e.slideIndex]:i.default.findDOMNode(e.trackRef).children[e.slideIndex+e.slidesToShow+1])?-1*r.offsetLeft+(e.listWidth-r.offsetWidth)/2:a)}},function(e,t,n){"use strict";t.__esModule=!0;var p=u(n(3)),h=u(n(17)),o=u(n(4)),i=u(n(7)),a=u(n(8)),m=u(n(0)),r=u(n(5)),g=u(n(19)),s=u(n(6)),y=u(n(26)),l=n(11);function u(e){return e&&e.__esModule?e:{default:e}}c=m.default.Component,(0,a.default)(d,c),d.prototype.render=function(){var e=this.props,t=e.title,n=e.children,a=e.className,r=e.isExpanded,o=e.disabled,i=e.style,s=e.prefix,l=e.onClick,u=e.id,e=(0,h.default)(e,["title","children","className","isExpanded","disabled","style","prefix","onClick","id"]),a=(0,g.default)(((c={})[s+"collapse-panel"]=!0,c[s+"collapse-panel-hidden"]=!r,c[s+"collapse-panel-expanded"]=r,c[s+"collapse-panel-disabled"]=o,c[a]=a,c)),c=(0,g.default)(((c={})[s+"collapse-panel-icon"]=!0,c[s+"collapse-panel-icon-expanded"]=r,c)),d=u?u+"-heading":void 0,f=u?u+"-region":void 0;return m.default.createElement("div",(0,p.default)({className:a,style:i,id:u},e),m.default.createElement("div",{id:d,className:s+"collapse-panel-title",onClick:l,onKeyDown:this.onKeyDown,tabIndex:"0","aria-disabled":o,"aria-expanded":r,"aria-controls":f,role:"button"},m.default.createElement(y.default,{type:"arrow-right",className:c,"aria-hidden":"true"}),t),m.default.createElement("div",{className:s+"collapse-panel-content",role:"region",id:f},n))},a=n=d,n.propTypes={prefix:r.default.string,style:r.default.object,children:r.default.any,isExpanded:r.default.bool,disabled:r.default.bool,title:r.default.node,className:r.default.string,onClick:r.default.func,id:r.default.string},n.defaultProps={prefix:"next-",isExpanded:!1,onClick:l.func.noop},n.isNextPanel=!0;var c,r=a;function d(){var e,n;(0,o.default)(this,d);for(var t=arguments.length,a=Array(t),r=0;r\n com.alibaba.nacos\n nacos-client\n ${version}\n \n*/\npackage com.alibaba.nacos.example;\n\nimport java.util.Properties;\nimport java.util.concurrent.Executor;\nimport com.alibaba.nacos.api.NacosFactory;\nimport com.alibaba.nacos.api.config.ConfigService;\nimport com.alibaba.nacos.api.config.listener.Listener;\nimport com.alibaba.nacos.api.exception.NacosException;\n\n/**\n * Config service example\n *\n * @author Nacos\n *\n */\npublic class ConfigExample {\n\n\tpublic static void main(String[] args) throws NacosException, InterruptedException {\n\t\tString serverAddr = "localhost";\n\t\tString dataId = "'.concat(e.dataId,'";\n\t\tString group = "').concat(e.group,'";\n\t\tProperties properties = new Properties();\n\t\tproperties.put(PropertyKeyConst.SERVER_ADDR, serverAddr);\n\t\tConfigService configService = NacosFactory.createConfigService(properties);\n\t\tString content = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\t\tconfigService.addListener(dataId, group, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void receiveConfigInfo(String configInfo) {\n\t\t\t\tSystem.out.println("receive:" + configInfo);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Executor getExecutor() {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\n\t\tboolean isPublishOk = configService.publishConfig(dataId, group, "content");\n\t\tSystem.out.println(isPublishOk);\n\n\t\tThread.sleep(3000);\n\t\tcontent = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\n\t\tboolean isRemoveOk = configService.removeConfig(dataId, group);\n\t\tSystem.out.println(isRemoveOk);\n\t\tThread.sleep(3000);\n\n\t\tcontent = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\t\tThread.sleep(300000);\n\n\t}\n}\n')}},{key:"getNodejsCode",value:function(e){return"TODO"}},{key:"getCppCode",value:function(e){return"TODO"}},{key:"getShellCode",value:function(e){return"TODO"}},{key:"getPythonCode",value:function(e){return'/*\n* Demo for Nacos\n*/\nimport json\nimport socket\n\nimport nacos\n\n\ndef get_host_ip():\n res = socket.gethostbyname(socket.gethostname())\n return res\n\n\ndef load_config(content):\n _config = json.loads(content)\n return _config\n\n\ndef nacos_config_callback(args):\n content = args[\'raw_content\']\n load_config(content)\n\n\nclass NacosClient:\n service_name = None\n service_port = None\n service_group = None\n\n def __init__(self, server_endpoint, namespace_id, username=None, password=None):\n self.client = nacos.NacosClient(server_endpoint,\n namespace=namespace_id,\n username=username,\n password=password)\n self.endpoint = server_endpoint\n self.service_ip = get_host_ip()\n\n def register(self):\n self.client.add_naming_instance(self.service_name,\n self.service_ip,\n self.service_port,\n group_name=self.service_group)\n\n def modify(self, service_name, service_ip=None, service_port=None):\n self.client.modify_naming_instance(service_name,\n service_ip if service_ip else self.service_ip,\n service_port if service_port else self.service_port)\n\n def unregister(self):\n self.client.remove_naming_instance(self.service_name,\n self.service_ip,\n self.service_port)\n\n def set_service(self, service_name, service_ip, service_port, service_group):\n self.service_name = service_name\n self.service_ip = service_ip\n self.service_port = service_port\n self.service_group = service_group\n\n async def beat_callback(self):\n self.client.send_heartbeat(self.service_name,\n self.service_ip,\n self.service_port)\n\n def load_conf(self, data_id, group):\n return self.client.get_config(data_id=data_id, group=group, no_snapshot=True)\n\n def add_conf_watcher(self, data_id, group, callback):\n self.client.add_config_watcher(data_id=data_id, group=group, cb=callback)\n\n\nif __name__ == \'__main__\':\n nacos_config = {\n "nacos_data_id":"test",\n "nacos_server_ip":"127.0.0.1",\n "nacos_namespace":"public",\n "nacos_groupName":"DEFAULT_GROUP",\n "nacos_user":"nacos",\n "nacos_password":"1234567"\n }\n nacos_data_id = nacos_config["nacos_data_id"]\n SERVER_ADDRESSES = nacos_config["nacos_server_ip"]\n NAMESPACE = nacos_config["nacos_namespace"]\n groupName = nacos_config["nacos_groupName"]\n user = nacos_config["nacos_user"]\n password = nacos_config["nacos_password"]\n # todo 将另一个路由对象(通常定义在其他模块或文件中)合并到主应用(app)中。\n # app.include_router(custom_api.router, tags=[\'test\'])\n service_ip = get_host_ip()\n client = NacosClient(SERVER_ADDRESSES, NAMESPACE, user, password)\n client.add_conf_watcher(nacos_data_id, groupName, nacos_config_callback)\n\n # 启动时,强制同步一次配置\n data_stream = client.load_conf(nacos_data_id, groupName)\n json_config = load_config(data_stream)\n'}},{key:"getCSharpCode",value:function(e){return'/*\nDemo for Basic Nacos Opreation\nApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.Extensions.DependencyInjection;\nusing Nacos.V2;\nusing Nacos.V2.DependencyInjection;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nclass Program\n{\n static async Task Main(string[] args)\n {\n string serverAddr = "http://localhost:8848";\n string dataId = "'.concat(e.dataId,'";\n string group = "').concat(e.group,'";\n\n IServiceCollection services = new ServiceCollection();\n\n services.AddNacosV2Config(x =>\n {\n x.ServerAddresses = new List { serverAddr };\n x.Namespace = "cs-test";\n\n // swich to use http or rpc\n x.ConfigUseRpc = true;\n });\n\n IServiceProvider serviceProvider = services.BuildServiceProvider();\n var configSvc = serviceProvider.GetService();\n\n var content = await configSvc.GetConfig(dataId, group, 3000);\n Console.WriteLine(content);\n\n var listener = new ConfigListener();\n\n await configSvc.AddListener(dataId, group, listener);\n\n var isPublishOk = await configSvc.PublishConfig(dataId, group, "content");\n Console.WriteLine(isPublishOk);\n\n await Task.Delay(3000);\n content = await configSvc.GetConfig(dataId, group, 5000);\n Console.WriteLine(content);\n\n var isRemoveOk = await configSvc.RemoveConfig(dataId, group);\n Console.WriteLine(isRemoveOk);\n await Task.Delay(3000);\n\n content = await configSvc.GetConfig(dataId, group, 5000);\n Console.WriteLine(content);\n await Task.Delay(300000);\n }\n\n internal class ConfigListener : IListener\n {\n public void ReceiveConfigInfo(string configInfo)\n {\n Console.WriteLine("receive:" + configInfo);\n }\n }\n}\n\n/*\nRefer to document: https://github.com/nacos-group/nacos-sdk-csharp/tree/dev/samples/MsConfigApp\nDemo for ASP.NET Core Integration\nMsConfigApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.Extensions.Configuration;\nusing Microsoft.Extensions.Hosting;\nusing Serilog;\nusing Serilog.Events;\n\npublic class Program\n{\n public static void Main(string[] args)\n {\n Log.Logger = new LoggerConfiguration()\n .Enrich.FromLogContext()\n .MinimumLevel.Override("Microsoft", LogEventLevel.Warning)\n .MinimumLevel.Override("System", LogEventLevel.Warning)\n .MinimumLevel.Debug()\n .WriteTo.Console()\n .CreateLogger();\n\n try\n {\n Log.ForContext().Information("Application starting...");\n CreateHostBuilder(args, Log.Logger).Build().Run();\n }\n catch (System.Exception ex)\n {\n Log.ForContext().Fatal(ex, "Application start-up failed!!");\n }\n finally\n {\n Log.CloseAndFlush();\n }\n }\n\n public static IHostBuilder CreateHostBuilder(string[] args, Serilog.ILogger logger) =>\n Host.CreateDefaultBuilder(args)\n .ConfigureAppConfiguration((context, builder) =>\n {\n var c = builder.Build();\n builder.AddNacosV2Configuration(c.GetSection("NacosConfig"), logAction: x => x.AddSerilog(logger));\n })\n .ConfigureWebHostDefaults(webBuilder =>\n {\n webBuilder.UseStartup().UseUrls("http://*:8787");\n })\n .UseSerilog();\n}\n ')}},{key:"openDialog",value:function(e){var t=this;this.setState({dialogvisible:!0}),this.record=e,setTimeout(function(){t.getData()})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.codepreview;n&&(n.innerHTML="",this.cm=window.CodeMirror(n,{value:t,mode:e,height:400,width:500,lineNumbers:!0,theme:"xq-light",lint:!0,tabMode:"indent",autoMatchParens:!0,textWrapping:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}))}},{key:"changeTab",value:function(e,t){var n=this;setTimeout(function(){n[e]=!0,n.createCodeMirror("text/javascript",t)})}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e;return x.a.createElement("div",null,x.a.createElement(y.a,{title:e.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:x.a.createElement("div",null),onClose:this.closeDialog.bind(this)},x.a.createElement("div",{style:{height:500}},x.a.createElement(H.a,{tip:e.loading,style:{width:"100%"},visible:this.state.loading},x.a.createElement(L.a,{shape:"text",style:{height:40,paddingBottom:10}},x.a.createElement(O,{title:"Java",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),x.a.createElement(O,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigboot_code)}),x.a.createElement(O,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloud_code)}),x.a.createElement(O,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),x.a.createElement(O,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),x.a.createElement(O,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),x.a.createElement(O,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)}),x.a.createElement(O,{title:"C#",key:7,onClick:this.changeTab.bind(this,"commoneditor7",this.csharpCode)})),x.a.createElement("div",{ref:"codepreview"})))))}}]),n}(x.a.Component)).displayName="ShowCodeing",S=S))||S,S=(t(69),t(40)),S=t.n(S),z=(t(756),S.a.Row),D=S.a.Col,W=(0,n.a.config)(((S=function(e){Object(M.a)(n,e);var t=Object(k.a)(n);function n(e){return Object(_.a)(this,n),(e=t.call(this,e)).state={visible:!1,title:"",content:"",isok:!0,dataId:"",group:""},e}return Object(b.a)(n,[{key:"componentDidMount",value:function(){this.initData()}},{key:"initData",value:function(){var e=this.props.locale;this.setState({title:(void 0===e?{}:e).confManagement})}},{key:"openDialog",value:function(e){this.setState({visible:!0,title:e.title,content:e.content,isok:e.isok,dataId:e.dataId,group:e.group,message:e.message})}},{key:"closeDialog",value:function(){this.setState({visible:!1})}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e,t=x.a.createElement("div",{style:{textAlign:"right"}},x.a.createElement(c.a,{type:"primary",onClick:this.closeDialog.bind(this)},e.determine));return x.a.createElement("div",null,x.a.createElement(y.a,{visible:this.state.visible,footer:t,style:{width:555},onCancel:this.closeDialog.bind(this),onClose:this.closeDialog.bind(this),title:e.deletetitle},x.a.createElement("div",null,x.a.createElement(z,null,x.a.createElement(D,{span:"4",style:{paddingTop:16}},x.a.createElement(m.a,{type:"".concat(this.state.isok?"success":"delete","-filling"),style:{color:this.state.isok?"green":"red"},size:"xl"})),x.a.createElement(D,{span:"20"},x.a.createElement("div",null,x.a.createElement("h3",null,this.state.isok?e.deletedSuccessfully:e.deleteFailed),x.a.createElement("p",null,x.a.createElement("span",{style:{color:"#999",marginRight:5}},"Data ID"),x.a.createElement("span",{style:{color:"#c7254e"}},this.state.dataId)),x.a.createElement("p",null,x.a.createElement("span",{style:{color:"#999",marginRight:5}},"Group"),x.a.createElement("span",{style:{color:"#c7254e"}},this.state.group)),this.state.isok?"":x.a.createElement("p",{style:{color:"red"}},this.state.message)))))))}}]),n}(x.a.Component)).displayName="DeleteDialog",S=S))||S,S=(t(757),t(436)),B=t.n(S),U=(0,n.a.config)(((S=function(e){Object(M.a)(n,e);var t=Object(k.a)(n);function n(){return Object(_.a)(this,n),t.apply(this,arguments)}return Object(b.a)(n,[{key:"render",value:function(){var e=this.props,t=e.data,t=void 0===t?{}:t,n=e.height,e=e.locale,a=void 0===e?{}:e;return x.a.createElement("div",null,"notice"===t.modeType?x.a.createElement("div",{"data-spm-click":"gostr=/aliyun;locaid=notice"},x.a.createElement(B.a,{style:{marginBottom:1\n com.alibaba.nacos\n nacos-client\n ${latest.version}\n \n*/\npackage com.alibaba.nacos.example;\n\nimport java.util.Properties;\n\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingFactory;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.listener.Event;\nimport com.alibaba.nacos.api.naming.listener.EventListener;\nimport com.alibaba.nacos.api.naming.listener.NamingEvent;\n\n/**\n * @author nkorange\n */\npublic class NamingExample {\n\n public static void main(String[] args) throws NacosException {\n\n Properties properties = new Properties();\n properties.setProperty("serverAddr", System.getProperty("serverAddr"));\n properties.setProperty("namespace", System.getProperty("namespace"));\n\n NamingService naming = NamingFactory.createNamingService(properties);\n\n naming.registerInstance("'.concat(this.record.name,'", "11.11.11.11", 8888, "TEST1");\n\n naming.registerInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n System.out.println(naming.getAllInstances("').concat(this.record.name,'"));\n\n naming.deregisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n System.out.println(naming.getAllInstances("').concat(this.record.name,'"));\n\n naming.subscribe("').concat(this.record.name,'", new EventListener() {\n @Override\n public void onEvent(Event event) {\n System.out.println(((NamingEvent)event).getServiceName());\n System.out.println(((NamingEvent)event).getInstances());\n }\n });\n }\n}')}},{key:"getSpringCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example\n* pom.xml\n \n com.alibaba.nacos\n nacos-spring-context\n ${latest.version}\n \n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring\npackage com.alibaba.nacos.example.spring;\n\nimport com.alibaba.nacos.api.annotation.NacosProperties;\nimport com.alibaba.nacos.spring.context.annotation.discovery.EnableNacosDiscovery;\nimport org.springframework.context.annotation.Configuration;\n\n@Configuration\n@EnableNacosDiscovery(globalProperties = @NacosProperties(serverAddr = "127.0.0.1:8848"))\npublic class NacosConfiguration {\n\n}\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring/controller\npackage com.alibaba.nacos.example.spring.controller;\n\nimport com.alibaba.nacos.api.annotation.NacosInjected;\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.pojo.Instance;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\nimport java.util.List;\n\nimport static org.springframework.web.bind.annotation.RequestMethod.GET;\n\n@Controller\n@RequestMapping("discovery")\npublic class DiscoveryController {\n\n @NacosInjected\n private NamingService namingService;\n\n @RequestMapping(value = "/get", method = GET)\n @ResponseBody\n public List get(@RequestParam String serviceName) throws NacosException {\n return namingService.getAllInstances(serviceName);\n }\n}'}},{key:"getSpringBootCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example\n* pom.xml\n \n com.alibaba.boot\n nacos-discovery-spring-boot-starter\n ${latest.version}\n \n*/\n/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/resources\n* application.properties\n nacos.discovery.server-addr=127.0.0.1:8848\n*/\n// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/java/com/alibaba/nacos/example/spring/boot/controller\n\npackage com.alibaba.nacos.example.spring.boot.controller;\n\nimport com.alibaba.nacos.api.annotation.NacosInjected;\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.pojo.Instance;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\nimport java.util.List;\n\nimport static org.springframework.web.bind.annotation.RequestMethod.GET;\n\n@Controller\n@RequestMapping("discovery")\npublic class DiscoveryController {\n\n @NacosInjected\n private NamingService namingService;\n\n @RequestMapping(value = "/get", method = GET)\n @ResponseBody\n public List get(@RequestParam String serviceName) throws NacosException {\n return namingService.getAllInstances(serviceName);\n }\n}'}},{key:"getSpringCloudCode",value:function(e){return"/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/\n* pom.xml\n \n org.springframework.cloud\n spring-cloud-starter-alibaba-nacos-discovery\n ${latest.version}\n \n*/\n\n// nacos-spring-cloud-provider-example\n\n/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-provider-example/src/main/resources\n* application.properties\nserver.port=18080\nspring.application.name=".concat(this.record.name,'\nspring.cloud.nacos.discovery.server-addr=127.0.0.1:8848\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-provider-example/src/main/java/com/alibaba/nacos/example/spring/cloud\npackage com.alibaba.nacos.example.spring.cloud;\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.cloud.client.discovery.EnableDiscoveryClient;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\n\n/**\n * @author xiaojing\n */\n@SpringBootApplication\n@EnableDiscoveryClient\npublic class NacosProviderApplication {\n\n public static void main(String[] args) {\n SpringApplication.run(NacosProviderApplication.class, args);\n}\n\n @RestController\n class EchoController {\n @RequestMapping(value = "/echo/{string}", method = RequestMethod.GET)\n public String echo(@PathVariable String string) {\n return "Hello Nacos Discovery " + string;\n }\n }\n}\n\n// nacos-spring-cloud-consumer-example\n\n/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-consumer-example/src/main/resources\n* application.properties\nspring.application.name=micro-service-oauth2\nspring.cloud.nacos.discovery.server-addr=127.0.0.1:8848\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-consumer-example/src/main/java/com/alibaba/nacos/example/spring/cloud\npackage com.alibaba.nacos.example.spring.cloud;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.cloud.client.discovery.EnableDiscoveryClient;\nimport org.springframework.cloud.client.loadbalancer.LoadBalanced;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\nimport org.springframework.web.client.RestTemplate;\n\n/**\n * @author xiaojing\n */\n@SpringBootApplication\n@EnableDiscoveryClient\npublic class NacosConsumerApplication {\n\n @LoadBalanced\n @Bean\n public RestTemplate restTemplate() {\n return new RestTemplate();\n }\n\n public static void main(String[] args) {\n SpringApplication.run(NacosConsumerApplication.class, args);\n }\n\n @RestController\n public class TestController {\n\n private final RestTemplate restTemplate;\n\n @Autowired\n public TestController(RestTemplate restTemplate) {this.restTemplate = restTemplate;}\n\n @RequestMapping(value = "/echo/{str}", method = RequestMethod.GET)\n public String echo(@PathVariable String str) {\n return restTemplate.getForObject("http://service-provider/echo/" + str, String.class);\n }\n }\n}')}},{key:"getNodejsCode",value:function(e){return"TODO"}},{key:"getCppCode",value:function(e){return"TODO"}},{key:"getShellCode",value:function(e){return"TODO"}},{key:"getPythonCode",value:function(e){return'/*\n* Demo for Nacos\n*/\nimport json\nimport socket\n\nimport nacos\n\n\ndef get_host_ip():\n res = socket.gethostbyname(socket.gethostname())\n return res\n\n\ndef load_config(content):\n _config = json.loads(content)\n return _config\n\n\ndef nacos_config_callback(args):\n content = args[\'raw_content\']\n load_config(content)\n\n\nclass NacosClient:\n service_name = None\n service_port = None\n service_group = None\n\n def __init__(self, server_endpoint, namespace_id, username=None, password=None):\n self.client = nacos.NacosClient(server_endpoint,\n namespace=namespace_id,\n username=username,\n password=password)\n self.endpoint = server_endpoint\n self.service_ip = get_host_ip()\n\n def register(self):\n self.client.add_naming_instance(self.service_name,\n self.service_ip,\n self.service_port,\n group_name=self.service_group)\n\n def modify(self, service_name, service_ip=None, service_port=None):\n self.client.modify_naming_instance(service_name,\n service_ip if service_ip else self.service_ip,\n service_port if service_port else self.service_port)\n\n def unregister(self):\n self.client.remove_naming_instance(self.service_name,\n self.service_ip,\n self.service_port)\n\n def set_service(self, service_name, service_ip, service_port, service_group):\n self.service_name = service_name\n self.service_ip = service_ip\n self.service_port = service_port\n self.service_group = service_group\n\n async def beat_callback(self):\n self.client.send_heartbeat(self.service_name,\n self.service_ip,\n self.service_port)\n\n def load_conf(self, data_id, group):\n return self.client.get_config(data_id=data_id, group=group, no_snapshot=True)\n\n def add_conf_watcher(self, data_id, group, callback):\n self.client.add_config_watcher(data_id=data_id, group=group, cb=callback)\n\n\nif __name__ == \'__main__\':\n nacos_config = {\n "nacos_data_id":"test",\n "nacos_server_ip":"127.0.0.1",\n "nacos_namespace":"public",\n "nacos_groupName":"DEFAULT_GROUP",\n "nacos_user":"nacos",\n "nacos_password":"1234567"\n }\n nacos_data_id = nacos_config["nacos_data_id"]\n SERVER_ADDRESSES = nacos_config["nacos_server_ip"]\n NAMESPACE = nacos_config["nacos_namespace"]\n groupName = nacos_config["nacos_groupName"]\n user = nacos_config["nacos_user"]\n password = nacos_config["nacos_password"]\n # todo 将另一个路由对象(通常定义在其他模块或文件中)合并到主应用(app)中。\n # app.include_router(custom_api.router, tags=[\'test\'])\n service_ip = get_host_ip()\n client = NacosClient(SERVER_ADDRESSES, NAMESPACE, user, password)\n client.add_conf_watcher(nacos_data_id, groupName, nacos_config_callback)\n\n # 启动时,强制同步一次配置\n data_stream = client.load_conf(nacos_data_id, groupName)\n json_config = load_config(data_stream)\n #设定服务\n client.set_service(json_config["service_name"], json_config.get("service_ip", service_ip), service_port, groupName)\n #注册服务\n client.register()\n #下线服务\n client.unregister()\n'}},{key:"getCSharpCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/\nDemo for Basic Nacos Opreation\nApp.csproj\n\n\n \n\n*/\n\nusing Microsoft.Extensions.DependencyInjection;\nusing Nacos.V2;\nusing Nacos.V2.DependencyInjection;\nusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\n\nclass Program\n{\n static async Task Main(string[] args)\n {\n IServiceCollection services = new ServiceCollection();\n\n services.AddNacosV2Naming(x =>\n {\n x.ServerAddresses = new List { "http://localhost:8848/" };\n x.Namespace = "cs-test";\n\n // swich to use http or rpc\n x.NamingUseRpc = true;\n });\n\n IServiceProvider serviceProvider = services.BuildServiceProvider();\n var namingSvc = serviceProvider.GetService();\n\n await namingSvc.RegisterInstance("'.concat(this.record.name,'", "11.11.11.11", 8888, "TEST1");\n\n await namingSvc.RegisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(await namingSvc.GetAllInstances("').concat(this.record.name,'")));\n\n await namingSvc.DeregisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n var listener = new EventListener();\n\n await namingSvc.Subscribe("').concat(this.record.name,'", listener);\n }\n\n internal class EventListener : IEventListener\n {\n public Task OnEvent(IEvent @event)\n {\n Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(@event));\n return Task.CompletedTask;\n }\n }\n}\n\n/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/\nDemo for ASP.NET Core Integration\nApp.csproj\n\n\n \n\n*/\n\n/* Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/blob/dev/samples/App1/appsettings.json\n* appsettings.json\n{\n "nacos": {\n "ServerAddresses": [ "http://localhost:8848" ],\n "DefaultTimeOut": 15000,\n "Namespace": "cs",\n "ServiceName": "App1",\n "GroupName": "DEFAULT_GROUP",\n "ClusterName": "DEFAULT",\n "Port": 0,\n "Weight": 100,\n "RegisterEnabled": true,\n "InstanceEnabled": true,\n "Ephemeral": true,\n "NamingUseRpc": true,\n "NamingLoadCacheAtStart": ""\n }\n}\n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-sdk-csharp/blob/dev/samples/App1/Startup.cs\nusing Nacos.AspNetCore.V2;\n\npublic class Startup\n{\n public Startup(IConfiguration configuration)\n {\n Configuration = configuration;\n }\n\n public IConfiguration Configuration { get; }\n\n public void ConfigureServices(IServiceCollection services)\n {\n // ....\n services.AddNacosAspNet(Configuration);\n }\n\n public void Configure(IApplicationBuilder app, IWebHostEnvironment env)\n {\n // ....\n }\n}\n ')}},{key:"openDialog",value:function(e){var t=this;this.setState({dialogvisible:!0}),this.record=e,setTimeout(function(){t.getData()})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.codepreview;n&&(n.innerHTML="",this.cm=window.CodeMirror(n,{value:t,mode:e,height:400,width:500,lineNumbers:!0,theme:"xq-light",lint:!0,tabMode:"indent",autoMatchParens:!0,textWrapping:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}),this.cm.setSize("auto","490px"))}},{key:"changeTab",value:function(e,t){var n=this;setTimeout(function(){n[e]=!0,n.createCodeMirror("text/javascript",t)})}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e;return O.a.createElement("div",null,O.a.createElement(o.a,{title:e.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:O.a.createElement("div",null),onClose:this.closeDialog.bind(this)},O.a.createElement("div",{style:{height:500}},O.a.createElement(h.a,{tip:e.loading,style:{width:"100%"},visible:this.state.loading},O.a.createElement(m.a,{shape:"text",style:{height:40,paddingBottom:10}},O.a.createElement(g,{title:"Java",key:0,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),O.a.createElement(g,{title:"Spring",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.springCode)}),O.a.createElement(g,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigbootCode)}),O.a.createElement(g,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloudCode)}),O.a.createElement(g,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),O.a.createElement(g,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),O.a.createElement(g,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),O.a.createElement(g,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)}),O.a.createElement(g,{title:"C#",key:7,onClick:this.changeTab.bind(this,"commoneditor7",this.csharpCode)})),O.a.createElement("div",{ref:"codepreview"})))))}}]),n}(O.a.Component)).displayName="ShowServiceCodeing",f=f))||f,Y=t(51),I=t(146),A=(t(778),t(22)),R=L.a.Item,H=d.a.Row,F=d.a.Col,z=T.a.Column,d=(0,n.a.config)(((f=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e){var a;return Object(s.a)(this,n),(a=t.call(this,e)).getQueryLater=function(){setTimeout(function(){return a.queryServiceList()})},a.showcode=function(){setTimeout(function(){return a.queryServiceList()})},a.setNowNameSpace=function(e,t,n){return a.setState({nowNamespaceName:e,nowNamespaceId:t,nowNamespaceDesc:n})},a.rowColor=function(e){return{className:e.healthyInstanceCount?"":"row-bg-red"}},a.editServiceDialog=O.a.createRef(),a.showcode=O.a.createRef(),a.state={loading:!1,total:0,pageSize:10,currentPage:1,dataSource:[],search:{serviceName:Object(p.b)("serviceNameParam")||"",groupName:Object(p.b)("groupNameParam")||""},hasIpCount:!("false"===localStorage.getItem("hasIpCount"))},a.field=new i.a(Object(l.a)(a)),a}return Object(a.a)(n,[{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"openEditServiceDialog",value:function(){try{this.editServiceDialog.current.getInstance().show(this.state.service)}catch(e){}}},{key:"queryServiceList",value:function(){var n=this,e=this.state,t=e.currentPage,a=e.pageSize,r=e.search,o=e.withInstances,o=void 0!==o&&o,e=e.hasIpCount,e=["hasIpCount=".concat(e),"withInstances=".concat(o),"pageNo=".concat(t),"pageSize=".concat(a),"serviceNameParam=".concat(r.serviceName),"groupNameParam=".concat(r.groupName)];Object(p.f)({serviceNameParam:r.serviceName,groupNameParam:r.groupName}),this.openLoading(),Object(p.e)({url:"v3/console/ns/service/list?".concat(e.join("&")),success:function(e){var e=e.data,e=void 0===e?{}:e,t=e.count,e=e.serviceList;n.setState({dataSource:void 0===e?[]:e,total:void 0===t?0:t,loading:!1})},error:function(){return n.setState({dataSource:[],total:0,currentPage:0,loading:!1})}})}},{key:"showSampleCode",value:function(e){this.showcode.current.getInstance().openDialog(e)}},{key:"querySubscriber",value:function(e){var t=e.name,e=e.groupName,n=this.state.nowNamespaceId;this.props.history.push(Object(D.a)("/subscriberList",{namespace:n,name:t,groupName:e}))}},{key:"handlePageSizeChange",value:function(e){var t=this;this.setState({pageSize:e},function(){return t.queryServiceList()})}},{key:"deleteService",value:function(e){var t=this,n=this.props.locale,n=void 0===n?{}:n,a=n.prompt,n=n.promptDelete;o.a.confirm({title:a,content:n,onOk:function(){Object(p.e)({method:"DELETE",url:"v3/console/ns/service?serviceName=".concat(e.name,"&groupName=").concat(e.groupName),dataType:"json",beforeSend:function(){return t.openLoading()},success:function(e){0!==e.code?r.a.error(e.message||"删除服务失败"):(r.a.success("服务删除成功"),t.queryServiceList())},error:function(e){var t;r.a.error((null==(t=e.data)?void 0:t.responseText)||e.statusText||"请求失败")},complete:function(){return t.closeLoading()}})}})}},{key:"render",value:function(){var a=this,e=this.props.locale,t=void 0===e?{}:e,e=t.pubNoData,n=t.serviceList,r=t.serviceName,o=t.serviceNamePlaceholder,i=t.groupName,s=t.groupNamePlaceholder,l=t.hiddenEmptyService,u=t.query,c=t.create,d=t.operation,f=t.detail,p=t.sampleCode,h=t.deleteAction,m=t.subscriber,g=this.state,y=g.search,v=g.nowNamespaceName,_=g.nowNamespaceId,b=g.nowNamespaceDesc,g=g.hasIpCount,w=this.field,M=w.init,w=w.getValue;return this.init=M,this.getValue=w,O.a.createElement("div",{className:"main-container service-management"},O.a.createElement(Y.a,{title:n,desc:b,namespaceId:_,namespaceName:v,nameSpace:!0}),O.a.createElement(N.a,{setNowNameSpace:this.setNowNameSpace,namespaceCallBack:this.getQueryLater}),O.a.createElement(H,{className:"demo-row",style:{marginBottom:10,padding:0}},O.a.createElement(F,{span:"24"},O.a.createElement(L.a,{inline:!0,field:this.field},O.a.createElement(R,{label:""},O.a.createElement(C.a,{type:"primary",onClick:function(){return a.openEditServiceDialog()}},c)),O.a.createElement(R,{label:r},O.a.createElement(E.a,{placeholder:o,style:{width:200},value:y.serviceName,onChange:function(e){return a.setState({search:Object(x.a)(Object(x.a)({},y),{},{serviceName:e})})},onPressEnter:function(){return a.setState({currentPage:1},function(){return a.queryServiceList()})}})),O.a.createElement(R,{label:i},O.a.createElement(E.a,{placeholder:s,style:{width:200},value:y.groupName,onChange:function(e){return a.setState({search:Object(x.a)(Object(x.a)({},y),{},{groupName:e})})},onPressEnter:function(){return a.setState({currentPage:1},function(){return a.queryServiceList()})}})),O.a.createElement(L.a.Item,{label:"".concat(l)},O.a.createElement(S.a,{checked:g,onChange:function(e){return a.setState({hasIpCount:e,currentPage:1},function(){localStorage.setItem("hasIpCount",e),a.queryServiceList()})}})),O.a.createElement(R,{label:""},O.a.createElement(C.a,{type:"primary",onClick:function(){return a.setState({currentPage:1},function(){return a.queryServiceList()})},style:{marginRight:10}},u))))),O.a.createElement(H,{style:{padding:0}},O.a.createElement(F,{span:"24",style:{padding:0}},O.a.createElement(T.a,{dataSource:this.state.dataSource,locale:{empty:e},rowProps:function(e){return a.rowColor(e)},loading:this.state.loading},O.a.createElement(z,{title:t.columnServiceName,dataIndex:"name"}),O.a.createElement(z,{title:t.groupName,dataIndex:"groupName"}),O.a.createElement(z,{title:t.columnClusterCount,dataIndex:"clusterCount"}),O.a.createElement(z,{title:t.columnIpCount,dataIndex:"ipCount"}),O.a.createElement(z,{title:t.columnHealthyInstanceCount,dataIndex:"healthyInstanceCount"}),O.a.createElement(z,{title:t.columnTriggerFlag,dataIndex:"triggerFlag"}),O.a.createElement(z,{title:d,align:"center",cell:function(e,t,n){return O.a.createElement("div",null,O.a.createElement("a",{onClick:function(){var e=n.name,t=n.groupName;a.props.history.push(Object(D.a)("/serviceDetail",{name:e,groupName:t}))},style:{marginRight:5}},f),O.a.createElement("span",{style:{marginRight:5}},"|"),O.a.createElement("a",{style:{marginRight:5},onClick:function(){return a.showSampleCode(n)}},p),O.a.createElement("span",{style:{marginRight:5}},"|"),O.a.createElement("a",{style:{marginRight:5},onClick:function(){return a.querySubscriber(n)}},m),O.a.createElement("span",{style:{marginRight:5}},"|"),O.a.createElement("a",{onClick:function(){return a.deleteService(n)},style:{marginRight:5}},h))}})))),O.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},O.a.createElement(k.a,{current:this.state.currentPage,pageSizeList:A.f,pageSizePosition:"start",pageSizeSelector:"dropdown",popupProps:{align:"bl tl"},total:this.state.total,pageSize:this.state.pageSize,totalRender:function(e){return O.a.createElement(I.a,{locale:t,total:e})},onPageSizeChange:function(e){return a.handlePageSizeChange(e)},onChange:function(e){return a.setState({currentPage:e},function(){return a.queryServiceList()})}})),O.a.createElement(j,{ref:this.showcode}),O.a.createElement(P.a,{ref:this.editServiceDialog,openLoading:function(){return a.openLoading()},closeLoading:function(){return a.closeLoading()},queryServiceList:function(){return a.setState({currentPage:1},function(){return a.queryServiceList()})}}))}}]),n}(O.a.Component)).displayName="ServiceList",t=f))||t;e.a=d},function(e,t,n){"use strict";n(67);var a=n(47),u=n.n(a),a=(n(35),n(18)),c=n.n(a),a=(n(66),n(21)),d=n.n(a),a=(n(34),n(20)),f=n.n(a),a=(n(93),n(55)),p=n.n(a),a=(n(38),n(2)),h=n.n(a),a=(n(37),n(10)),m=n.n(a),i=n(13),s=n(14),l=n(23),g=n(16),y=n(15),a=(n(27),n(6)),a=n.n(a),r=n(0),v=n.n(r),r=n(30),_=n(45),b=n(53),w=n(32),o=(n(49),n(28)),M=n.n(o),k=(n(168),h.a.Item),S={labelCol:{fixedSpan:4},wrapperCol:{span:19}},E=(0,a.a.config)(((o=function(e){Object(g.a)(o,e);var r=Object(y.a)(o);function o(){var e;Object(i.a)(this,o);for(var t=arguments.length,n=new Array(t),a=0;ao&&v.a.createElement(u.a,{className:"users-pagination",current:i,total:n.totalCount,pageSize:o,onChange:function(e){return t.setState({pageNo:e},function(){return t.getUsers()})}}),v.a.createElement(E,{visible:s,onOk:function(e){return Object(_.d)(e).then(function(e){return t.setState({pageNo:1},function(){return t.getUsers()}),e})},onCancel:function(){return t.colseCreateUser()}}),v.a.createElement(x.a,{visible:l,username:e,onOk:function(e){return Object(_.l)(e).then(function(e){return t.getUsers(),e})},onCancel:function(){return t.setState({passwordResetUser:void 0,passwordResetUserVisible:!1})}}))}}]),n}(v.a.Component)).displayName="UserManagement",n=o))||n)||n;t.a=r},function(e,t,n){"use strict";n(46);var a=n(24),l=n.n(a),a=(n(67),n(47)),u=n.n(a),a=(n(35),n(18)),c=n.n(a),d=n(32),a=(n(66),n(21)),f=n.n(a),a=(n(34),n(20)),p=n.n(a),a=(n(93),n(55)),h=n.n(a),a=(n(38),n(2)),m=n.n(a),a=(n(37),n(10)),g=n.n(a),i=n(13),s=n(14),y=n(23),v=n(16),_=n(15),a=(n(27),n(6)),a=n.n(a),r=n(0),b=n.n(r),r=n(30),w=n(45),o=n(86),M=n(53),k=(n(49),n(28)),S=n.n(k),k=(n(59),n(29)),E=n.n(k),x=m.a.Item,C=E.a.Option,T={labelCol:{fixedSpan:4},wrapperCol:{span:19}},L=Object(r.b)(function(e){return{namespaces:e.namespace.namespaces}},{getNamespaces:o.b,searchRoles:w.m})(k=(0,a.a.config)(((k=function(e){Object(v.a)(o,e);var r=Object(_.a)(o);function o(){var t;Object(i.a)(this,o);for(var e=arguments.length,n=new Array(e),a=0;ai&&b.a.createElement(u.a,{className:"users-pagination",current:s,total:t.totalCount,pageSize:i,onChange:function(e){return a.setState({pageNo:e},function(){return a.getPermissions()})}}),b.a.createElement(L,{visible:n,onOk:function(t){return Object(w.a)(t).then(function(e){e?l.a.error({content:o.checkPermission}):Object(w.b)(t).then(function(e){return a.setState({pageNo:1},function(){return a.getPermissions()}),e})})},onCancel:function(){return a.colseCreatePermission()}}))}}]),n}(b.a.Component)).displayName="PermissionsManagement",n=k))||n)||n);t.a=r},function(e,t,n){"use strict";n(67);var a=n(47),l=n.n(a),a=(n(35),n(18)),u=n.n(a),a=(n(66),n(21)),c=n.n(a),a=(n(34),n(20)),d=n.n(a),a=(n(93),n(55)),f=n.n(a),a=(n(38),n(2)),p=n.n(a),a=(n(37),n(10)),h=n.n(a),i=n(13),s=n(14),m=n(23),g=n(16),y=n(15),a=(n(27),n(6)),a=n.n(a),r=n(0),v=n.n(r),r=n(30),_=n(45),b=n(53),o=(n(59),n(29)),w=n.n(o),o=(n(49),n(28)),M=n.n(o),k=p.a.Item,S={labelCol:{fixedSpan:4},wrapperCol:{span:19}},E=Object(r.b)(function(e){return{users:e.authority.users}},{searchUsers:_.n})(o=(0,a.a.config)(((o=function(e){Object(g.a)(o,e);var r=Object(y.a)(o);function o(){var t;Object(i.a)(this,o);for(var e=arguments.length,n=new Array(e),a=0;ao&&v.a.createElement(l.a,{className:"users-pagination",current:i,total:t.totalCount,pageSize:o,onChange:function(e){return a.setState({pageNo:e},function(){return a.getRoles()})}}),v.a.createElement(E,{visible:s,onOk:function(e){return Object(_.c)(e).then(function(e){return a.getRoles(),e})},onCancel:function(){return a.colseCreateRole()}}))}}]),n}(v.a.Component)).displayName="RolesManagement",n=o))||n)||n);t.a=r},function(e,t,n){"use strict";n(35);function l(e){var t=void 0===(t=localStorage.token)?"{}":t,t=(Object(_.c)(t)&&JSON.parse(t)||{}).globalAdmin,n=[];return"naming"===e?n.push(b):"config"===e?n.push(w):n.push(w,b),t&&n.push(M),n.push(k),n.push(S),n.push(E),n.filter(function(e){return e})}var a=n(18),u=n.n(a),a=(n(46),n(24)),c=n.n(a),a=(n(43),n(26)),d=n.n(a),r=n(13),o=n(14),i=n(16),s=n(15),a=(n(27),n(6)),a=n.n(a),f=n(12),p=(n(84),n(50)),h=n.n(p),p=n(0),m=n.n(p),p=n(39),g=n(30),y=n(108),v=n(52),_=n(48),b={key:"serviceManagementVirtual",children:[{key:"serviceManagement",url:"/serviceManagement"},{key:"subscriberList",url:"/subscriberList"}]},w={key:"configurationManagementVirtual",children:[{key:"configurationManagement",url:"/configurationManagement"},{key:"historyRollback",url:"/historyRollback"},{key:"listeningToQuery",url:"/listeningToQuery"}]},M={key:"authorityControl",children:[{key:"userList",url:"/userManagement"},{key:"roleManagement",url:"/rolesManagement"},{key:"privilegeManagement",url:"/permissionsManagement"}]},k={key:"namespace",url:"/namespace"},S={key:"clusterManagementVirtual",children:[{key:"clusterManagement",url:"/clusterManagement"}]},E={key:"settingCenter",url:"/settingCenter"},x=(n(386),h.a.SubMenu),C=h.a.Item,p=(n=Object(g.b)(function(e){return Object(f.a)(Object(f.a)({},e.locale),e.base)},{getState:v.e,getNotice:v.d,getGuide:v.c}),g=a.a.config,Object(p.g)(a=n(a=g(((v=function(e){Object(i.a)(n,e);var t=Object(s.a)(n);function n(e){return Object(r.a)(this,n),(e=t.call(this,e)).state={visible:!0},e}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.props.getState(),this.props.getNotice(),this.props.getGuide()}},{key:"goBack",value:function(){this.props.history.goBack()}},{key:"navTo",value:function(e){var t=this.props.location.search,t=new URLSearchParams(t);t.set("namespace",window.nownamespace),t.set("namespaceShowName",window.namespaceShowName),this.props.history.push([e,"?",t.toString()].join(""))}},{key:"isCurrentPath",value:function(e){return e===this.props.location.pathname?"current-path next-selected":void 0}},{key:"defaultOpenKeys",value:function(){for(var t=this,e=l(this.props.functionMode),n=0,a=e.length;nthis.state.pageSize&&S.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},S.a.createElement(v.a,{current:this.state.pageNo,total:a,pageSize:this.state.pageSize,onChange:function(e){return t.setState({pageNo:e},function(){return t.querySubscriberList()})}}))))}}]),n}(S.a.Component)).displayName="SubscriberList",d=n))||d)||d;t.a=f},function(e,t,n){"use strict";n(54);var a=n(36),c=n.n(a),a=(n(67),n(47)),d=n.n(a),a=(n(179),n(78)),f=n.n(a),a=(n(37),n(10)),p=n.n(a),a=(n(34),n(20)),h=n.n(a),a=(n(35),n(18)),r=n.n(a),a=(n(46),n(24)),o=n.n(a),a=(n(49),n(28)),i=n.n(a),s=n(13),l=n(14),u=n(23),m=n(16),g=n(15),a=(n(27),n(6)),a=n.n(a),y=(n(421),n(123)),v=n.n(y),y=(n(66),n(21)),_=n.n(y),y=(n(69),n(40)),y=n.n(y),b=(n(38),n(2)),w=n.n(b),b=n(0),M=n.n(b),k=n(1),b=n(144),S=n.n(b),E=n(51),x=(n(781),w.a.Item),C=y.a.Row,T=y.a.Col,L=_.a.Column,O=v.a.Panel,y=(0,a.a.config)(((b=function(e){Object(m.a)(a,e);var t=Object(g.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).getQueryLater=function(){setTimeout(function(){return n.queryClusterStateList()})},n.setNowNameSpace=function(e,t){return n.setState({nowNamespaceName:e,nowNamespaceId:t})},n.rowColor=function(e){return{className:(e.voteFor,"")}},n.state={loading:!1,total:0,pageSize:10,currentPage:1,keyword:"",dataSource:[]},n.field=new i.a(Object(u.a)(n)),n}return Object(l.a)(a,[{key:"componentDidMount",value:function(){this.getQueryLater()}},{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"queryClusterStateList",value:function(){var n=this,e=this.state,t=e.currentPage,a=e.pageSize,r=e.keyword,e=e.withInstances,e=["withInstances=".concat(void 0!==e&&e),"pageNo=".concat(t),"pageSize=".concat(a),"keyword=".concat(r)];Object(k.e)({url:"v3/console/core/cluster/nodes?".concat(e.join("&")),beforeSend:function(){return n.openLoading()},success:function(){var e=0this.state.pageSize&&M.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},M.a.createElement(d.a,{current:this.state.currentPage,total:this.state.total,pageSize:this.state.pageSize,onChange:function(e){return t.setState({currentPage:e},function(){return t.queryClusterStateList()})}}))))}}]),a}(M.a.Component)).displayName="ClusterNodeList",n=b))||n;t.a=y},function(e,t,n){"use strict";n(34);var a=n(20),i=n.n(a),s=n(13),l=n(14),u=n(16),c=n(15),a=(n(27),n(6)),a=n.n(a),r=n(12),o=(n(114),n(75)),o=n.n(o),d=n(0),f=n.n(d),p=(n(784),n(51)),d=n(87),h=n(148),m=n(149),g=n(30),y=n(22),v=o.a.Group,g=Object(g.b)(function(e){return Object(r.a)({},e.locale)},{changeLanguage:d.a,changeTheme:h.a,changeNameShow:m.a})(o=(0,a.a.config)(((n=function(e){Object(u.a)(o,e);var r=Object(c.a)(o);function o(e){Object(s.a)(this,o),e=r.call(this,e);var t=localStorage.getItem(y.p),n=localStorage.getItem(y.j),a=localStorage.getItem(y.g);return e.state={theme:"dark"===t?"dark":"light",language:"en-US"===a?"en-US":"zh-CN",nameShow:"select"===n?"select":"label"},e}return Object(l.a)(o,[{key:"newTheme",value:function(e){this.setState({theme:e})}},{key:"newLanguage",value:function(e){this.setState({language:e})}},{key:"newNameShow",value:function(e){this.setState({nameShow:e})}},{key:"submit",value:function(){var e=this.props,t=e.changeLanguage,n=e.changeTheme,e=e.changeNameShow,a=this.state.language,r=this.state.theme,o=this.state.nameShow;t(a),n(r),e(o)}},{key:"render",value:function(){var e=this.props.locale,e=void 0===e?{}:e,t=[{value:"light",label:e.settingLight},{value:"dark",label:e.settingDark}],n=[{value:"select",label:e.settingShowSelect},{value:"label",label:e.settingShowLabel}];return f.a.createElement(f.a.Fragment,null,f.a.createElement(p.a,{title:e.settingTitle}),f.a.createElement("div",{className:"setting-box"},f.a.createElement("div",{className:"text-box"},f.a.createElement("div",{className:"setting-checkbox"},f.a.createElement("div",{className:"setting-span"},e.settingTheme),f.a.createElement(v,{dataSource:t,value:this.state.theme,onChange:this.newTheme.bind(this)})),f.a.createElement("div",{className:"setting-checkbox"},f.a.createElement("div",{className:"setting-span"},e.settingLocale),f.a.createElement(v,{dataSource:[{value:"en-US",label:"English"},{value:"zh-CN",label:"中文"}],value:this.state.language,onChange:this.newLanguage.bind(this)})),f.a.createElement("div",{className:"setting-checkbox"},f.a.createElement("div",{className:"setting-span"},e.settingShow),f.a.createElement(v,{dataSource:n,value:this.state.nameShow,onChange:this.newNameShow.bind(this)}))),f.a.createElement(i.a,{type:"primary",onClick:this.submit.bind(this)},e.settingSubmit)))}}]),o}(f.a.Component)).displayName="SettingCenter",o=n))||o)||o;t.a=g},function(e,t,V){"use strict";V.r(t),function(e){V(54);var t=V(36),a=V.n(t),t=(V(27),V(6)),r=V.n(t),o=V(13),i=V(14),s=V(16),l=V(15),n=V(12),t=V(0),u=V.n(t),t=V(25),t=V.n(t),c=V(125),d=V(429),f=V(440),p=V(30),h=V(39),m=V(73),g=(V(477),V(449)),y=V(22),v=V(450),_=V(451),b=V(443),w=V(452),M=V(453),k=V(444),S=V(454),E=V(455),x=V(456),C=V(457),T=V(458),L=V(441),O=V(445),D=V(442),N=V(459),P=V(460),j=V(446),I=V(447),A=V(448),R=V(438),H=V(461),Y=V(439),F=V(87),z=V(52),W=V(148),B=V(149),e=(V(785),e.hot,localStorage.getItem(y.g)||localStorage.setItem(y.g,"zh-CN"===navigator.language?"zh-CN":"en-US"),Object(c.b)(Object(n.a)(Object(n.a)({},Y.a),{},{routing:d.routerReducer}))),Y=Object(c.d)(e,Object(c.c)(Object(c.a)(f.a),window[y.l]?window[y.l]():function(e){return e})),U=[{path:"/",exact:!0,render:function(){return u.a.createElement(h.a,{to:"/welcome"})}},{path:"/welcome",component:R.a},{path:"/namespace",component:b.a},{path:"/newconfig",component:w.a},{path:"/configsync",component:M.a},{path:"/configdetail",component:k.a},{path:"/configeditor",component:S.a},{path:"/historyDetail",component:E.a},{path:"/configRollback",component:x.a},{path:"/historyRollback",component:C.a},{path:"/listeningToQuery",component:T.a},{path:"/configurationManagement",component:L.a},{path:"/serviceManagement",component:O.a},{path:"/serviceDetail",component:D.a},{path:"/subscriberList",component:N.a},{path:"/clusterManagement",component:P.a},{path:"/userManagement",component:j.a},{path:"/rolesManagement",component:A.a},{path:"/permissionsManagement",component:I.a},{path:"/settingCenter",component:H.a}],e=Object(p.b)(function(e){return Object(n.a)(Object(n.a)({},e.locale),e.base)},{changeLanguage:F.a,getState:z.e,changeTheme:W.a,changeNameShow:B.a})(d=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){return Object(o.a)(this,n),(e=t.call(this,e)).state={shownotice:"none",noticecontent:"",nacosLoading:{}},e}return Object(i.a)(n,[{key:"componentDidMount",value:function(){this.props.getState();var e=localStorage.getItem(y.g),t=localStorage.getItem(y.p),n=localStorage.getItem(y.j);this.props.changeLanguage(e),this.props.changeTheme(t),this.props.changeNameShow(n)}},{key:"router",get:function(){var e=this.props,t=e.loginPageEnabled,e=e.consoleUiEnable;return u.a.createElement(m.a,null,u.a.createElement(h.d,null,t&&"false"===t?null:u.a.createElement(h.b,{path:"/login",component:v.a}),u.a.createElement(h.b,{path:"/register",component:_.a}),u.a.createElement(g.a,null,e&&"true"===e&&U.map(function(e){return u.a.createElement(h.b,Object.assign({key:e.path},e))}))))}},{key:"render",value:function(){var e=this.props,t=e.locale,e=e.loginPageEnabled;return u.a.createElement(a.a,Object.assign({className:"nacos-loading",shape:"flower",tip:"loading...",visible:!e,fullScreen:!0},this.state.nacosLoading),u.a.createElement(r.a,{locale:t},this.router))}}]),n}(u.a.Component))||d;t.a.render(u.a.createElement(p.a,{store:Y},u.a.createElement(e,null)),document.getElementById("root"))}.call(this,V(463)(e))},function(e,t){e.exports=function(e){var t;return e.webpackPolyfill||((t=Object.create(e)).children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1),t}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(I,e,t){"use strict"; /** @license React v16.14.0 * react.production.min.js *