@kordar/easyui-tpl 2.0.7 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.css +1 -0
- package/dist/index.umd.cjs +11 -0
- package/dist/index.umd.cjs.map +1 -0
- package/dist/public/en.json +199 -0
- package/dist/public/iconfont.json +93 -0
- package/dist/public/zh_CN.json +209 -0
- package/dist/types/components/BaseLayout.d.ts +3 -0
- package/dist/types/components/LayoutContext.d.ts +10 -0
- package/dist/types/components/LocaleBarItem.d.ts +3 -0
- package/dist/types/components/PaginationPanel.d.ts +4 -0
- package/dist/types/components/RememberMeBox.d.ts +8 -0
- package/dist/types/components/SettingBarItem.d.ts +3 -0
- package/dist/types/components/ThemeSwitch.d.ts +7 -0
- package/dist/types/components/UserBarItem.d.ts +3 -0
- package/dist/types/composable/useAppRedirect.d.ts +1 -0
- package/dist/types/composable/useAppStarter.d.ts +7 -0
- package/dist/types/composable/useLocalTable.d.ts +3 -0
- package/dist/types/composable/useMenuAndTabData.d.ts +43 -0
- package/dist/types/composable/useRefreshKey.d.ts +1 -0
- package/dist/types/composable/useRemoteTable.d.ts +3 -0
- package/dist/types/hoc/withDocHoc.d.ts +4 -0
- package/dist/types/index.d.ts +45 -0
- package/dist/types/init.d.ts +7 -0
- package/dist/types/service/AdminService.d.ts +23 -0
- package/dist/types/service/AuthService.d.ts +13 -0
- package/dist/types/service/ConfigService.d.ts +6 -0
- package/dist/types/service/RbacService.d.ts +80 -0
- package/dist/types/service/ResourceService.d.ts +25 -0
- package/dist/types/util/form.d.ts +8 -0
- package/dist/types/util/helper.d.ts +7 -0
- package/dist/types/util/interface.d.ts +66 -0
- package/dist/types/util/lazy.d.ts +2 -0
- package/dist/types/util/tables.d.ts +5 -0
- package/dist/types/views/admin/assign.d.ts +4 -0
- package/dist/types/views/admin/context.d.ts +3 -0
- package/dist/types/views/admin/form_dlg.d.ts +4 -0
- package/dist/types/views/admin/index.d.ts +3 -0
- package/dist/types/views/admin/search.d.ts +3 -0
- package/dist/types/views/admin/table.d.ts +4 -0
- package/dist/types/views/dict/context.d.ts +3 -0
- package/dist/types/views/dict/dialog.d.ts +5 -0
- package/dist/types/views/dict/form.d.ts +4 -0
- package/dist/types/views/dict/index.d.ts +3 -0
- package/dist/types/views/dict/search.d.ts +3 -0
- package/dist/types/views/dict/table.d.ts +4 -0
- package/dist/types/views/dict-item/context.d.ts +3 -0
- package/dist/types/views/dict-item/dialog.d.ts +4 -0
- package/dist/types/views/dict-item/form.d.ts +4 -0
- package/dist/types/views/dict-item/index.d.ts +3 -0
- package/dist/types/views/dict-item/search.d.ts +3 -0
- package/dist/types/views/dict-item/table.d.ts +4 -0
- package/dist/types/views/home/index.d.ts +2 -0
- package/dist/types/views/icon/context.d.ts +3 -0
- package/dist/types/views/icon/index.d.ts +2 -0
- package/dist/types/views/icon/parseIcons.d.ts +10 -0
- package/dist/types/views/icon/search.d.ts +3 -0
- package/dist/types/views/icon/table.d.ts +4 -0
- package/dist/types/views/language/index.d.ts +3 -0
- package/dist/types/views/login/form.d.ts +3 -0
- package/dist/types/views/login/header.d.ts +9 -0
- package/dist/types/views/login/index.d.ts +3 -0
- package/dist/types/views/page/404.d.ts +2 -0
- package/dist/types/views/permissions/context.d.ts +3 -0
- package/dist/types/views/permissions/fastadd_form_dlg.d.ts +4 -0
- package/dist/types/views/permissions/form_dlg.d.ts +4 -0
- package/dist/types/views/permissions/index.d.ts +3 -0
- package/dist/types/views/permissions/search.d.ts +3 -0
- package/dist/types/views/permissions/table.d.ts +3 -0
- package/dist/types/views/roles/assign.d.ts +4 -0
- package/dist/types/views/roles/context.d.ts +3 -0
- package/dist/types/views/roles/form_dlg.d.ts +4 -0
- package/dist/types/views/roles/index.d.ts +2 -0
- package/dist/types/views/roles/search.d.ts +3 -0
- package/dist/types/views/roles/table.d.ts +4 -0
- package/dist/types/views/router/context.d.ts +3 -0
- package/dist/types/views/router/form_dlg.d.ts +4 -0
- package/dist/types/views/router/index.d.ts +2 -0
- package/dist/types/views/router/search.d.ts +3 -0
- package/dist/types/views/router/table.d.ts +4 -0
- package/dist/types/views/setting/context.d.ts +3 -0
- package/dist/types/views/setting/dialog.d.ts +6 -0
- package/dist/types/views/setting/form.d.ts +4 -0
- package/dist/types/views/setting/index.d.ts +2 -0
- package/dist/types/views/setting/search.d.ts +3 -0
- package/dist/types/views/setting/table.d.ts +4 -0
- package/dist/types/views/srceen/design/container.d.ts +3 -0
- package/dist/types/views/srceen/design/index.d.ts +4 -0
- package/package.json +5 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--main-body-header-padding:5px;--main-body-content-padding:0px 5px 5px 5px;--sidebar-padding:5px 0 5px 5px}.copyright{box-sizing:border-box;color:#999;font-size:12px;text-align:center;width:100%}.sidebar-user{align-items:center;background:var(--color-sidebar-bg);border-top:1px solid var(--color-border);display:flex;gap:8px;justify-content:space-between;padding:10px 12px}.sidebar-user .sidebar-user-l{align-items:center;display:flex;flex:1;gap:8px;min-width:0}.sidebar-user .sidebar-user-l img{border:2px solid var(--color-border-light);border-radius:50%;flex-shrink:0;height:32px;object-fit:cover;width:32px}.sidebar-user .sidebar-user-l .user{color:var(--color-text-primary);font-size:var(--font-size-sm,12px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-user .logout-btn{border-radius:var(--radius-sm,4px);color:var(--color-text-secondary);cursor:pointer;flex-shrink:0;padding:4px;transition:color var(--transition-fast,.15s ease),background-color var(--transition-fast,.15s ease)}.sidebar-user .logout-btn:hover{background-color:var(--color-error-light);color:var(--color-error)}#login_carousel{display:flex;flex-direction:column;height:100vh;position:relative;width:100vw}#login_carousel .video_mask{background-color:rgba(0,0,0,.1);height:100%;left:0;position:absolute;top:0;width:100%;z-index:90}#login_carousel .login-container{display:flex;flex-direction:column;height:100%;justify-content:space-between;position:relative;width:100%;z-index:99}#login_carousel .login{background-color:hsla(0,0%,100%,.95);border-radius:12px;box-shadow:0 8px 32px rgba(0,0,0,.1);overflow-y:auto;padding:30px 40px;position:absolute;right:60px;top:50%;transform:translateY(-50%);width:380px}#login_carousel .copyright{color:#909399;font-size:12px;padding:10px 0;text-align:center;z-index:99}#login_carousel .layer_notice ul li{color:#fff}#login_carousel .login h1{font-size:24px;margin-bottom:20px;text-align:center}#login_carousel .login .remember-me{margin-left:5px;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}#login_carousel .form_code .code{cursor:pointer;position:absolute;right:0;top:1px}#login_carousel .login_btn{width:100%}#login_carousel .grid-demo{border-radius:2px;color:#fff;line-height:50px;padding:10px;text-align:center}#login_carousel .mytitle{font-size:27px;margin-top:50px;text-align:center}#login_carousel .mytext{font-size:16px;margin:20px 0;text-align:center}#login_carousel .textbox-addon{background-color:#fbfbfb;text-align:center}#login_carousel .textbox-icon.iconfont{font-size:20px;height:28px;line-height:28px;text-align:center}#login_carousel .login-form-wrapper{margin:0 auto;max-width:100%}#login_carousel .login-header{margin-bottom:32px;text-align:center}#login_carousel .login-logo{align-items:center;background:linear-gradient(135deg,#667eea,#764ba2);border-radius:50%;color:#fff;display:flex;font-size:24px;font-weight:700;height:56px;justify-content:center;margin:0 auto 20px;width:56px}#login_carousel .login-logo i{font-size:28px}#login_carousel .login-title{color:#303133;font-size:16px;font-weight:500;margin-bottom:6px}#login_carousel .login-subtitle{color:#303133;font-size:20px;font-weight:600;margin-bottom:6px}#login_carousel .login-slogan{color:#909399;font-size:12px;letter-spacing:1px}#login_carousel .form-group{margin-bottom:24px}#login_carousel .form-group-password{margin-bottom:20px}#login_carousel .input-wrapper{position:relative}#login_carousel .input-icon{color:#c0c4cc;font-size:18px;left:14px;position:absolute;top:50%;transform:translateY(-50%);z-index:1}#login_carousel .login-input{background-color:#f5f7fa;border:1px solid #e4e7ed;border-radius:8px;box-sizing:border-box;font-size:15px;outline:none;padding:14px 14px 14px 44px;transition:all .3s;width:100%}#login_carousel .login-input-password{padding:14px 44px}#login_carousel .login-input:focus{background-color:#fff;border-color:#2563eb}#login_carousel .login-input.blur{background-color:#f5f7fa;border-color:#e4e7ed}#login_carousel .password-toggle{color:#c0c4cc;cursor:pointer;font-size:18px;position:absolute;right:14px;top:50%;transform:translateY(-50%);z-index:1}#login_carousel .remember-wrapper{align-items:center;display:flex;justify-content:space-between;margin-bottom:24px}#login_carousel .remember-label{align-items:center;cursor:pointer;display:flex}#login_carousel .remember-checkbox{align-items:center;background-color:#fff;border:2px solid #dcdfe6;border-radius:4px;display:flex;height:18px;justify-content:center;margin-right:10px;transition:all .2s;width:18px}#login_carousel .remember-checkbox.checked{background-color:#2563eb;border-color:#2563eb}#login_carousel .remember-checkbox i{color:#fff;font-size:10px}#login_carousel .remember-text{color:#606266;font-size:14px;font-weight:500}#login_carousel .submit-wrapper{margin-bottom:0}#login_carousel .login-btn{align-items:center;background-color:#2563eb;border:none;border-radius:8px;box-shadow:0 4px 16px rgba(37,99,235,.3);color:#fff;cursor:pointer;display:flex;font-size:16px;font-weight:600;gap:6px;justify-content:center;padding:14px;transition:all .3s;width:100%}#login_carousel .login-btn:hover:not(:disabled){background-color:#1d4ed8;box-shadow:0 6px 20px rgba(37,99,235,.4)}#login_carousel .login-btn:disabled{background-color:#93c5fd;box-shadow:none;cursor:not-allowed}#login_carousel .login-btn i{font-size:16px}#login_carousel .captcha-wrapper{display:flex;gap:10px}#login_carousel .login-input-captcha{flex:1;padding-right:150px}#login_carousel .captcha-image{align-items:center;background:#f5f7fa;border-radius:8px;cursor:pointer;display:flex;height:calc(100% - 4px);justify-content:center;overflow:hidden;position:absolute;right:2px;top:50%;transform:translateY(-50%)}#login_carousel .captcha-image img{height:100%;object-fit:cover;width:120px}#login_carousel .remember-transport-iframe{height:1px;left:-9999px;opacity:.01;overflow:hidden;pointer-events:none;position:absolute;top:0;width:1px}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";function e(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||n(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=n(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return l=e.done,e},e:function(e){c=!0,a=e},f:function(){try{l||null==r.return||r.return()}finally{if(c)throw a}}}}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||n(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function l(r,n,o,i){var l=n&&n.prototype instanceof s?n:s,d=Object.create(l.prototype);return a(d,"_invoke",function(r,n,o){var i,a,l,s=0,d=o||[],u=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,a=0,l=e,f.n=r,c}};function p(r,n){for(a=r,l=n,t=0;!u&&s&&!o&&t<d.length;t++){var o,i=d[t],p=f.p,m=i[2];r>3?(o=m===n)&&(l=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(a=0,f.v=n,f.n=i[1]):p<m&&(o=r<3||i[0]>n||n>m)&&(i[4]=r,i[5]=n,f.n=m,a=0))}if(o||r>1)return c;throw u=!0,n}return function(o,d,m){if(s>1)throw TypeError("Generator is already running");for(u&&1===d&&p(d,m),a=d,l=m;(t=a<2?e:l)||!u;){i||(a?a<3?(a>1&&(f.n=-1),p(a,l)):f.n=l:f.v=l);try{if(s=2,i){if(a||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=e}else if((t=(u=f.n<0)?l:r.call(n,f))!==c)break}catch(t){i=e,a=1,l=t}finally{s=1}}return{value:t,done:u}}}(r,o,i),!0),d}var c={};function s(){}function d(){}function u(){}t=Object.getPrototypeOf;var f=[][n]?t(t([][n]())):(a(t={},n,function(){return this}),t),p=u.prototype=s.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,a(e,o,"GeneratorFunction")),e.prototype=Object.create(p),e}return d.prototype=u,a(p,"constructor",u),a(u,"constructor",d),d.displayName="GeneratorFunction",a(u,o,"GeneratorFunction"),a(p),a(p,o,"Generator"),a(p,n,function(){return this}),a(p,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:m}})()}function a(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}a=function(e,t,r,n){function i(t,r){a(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))},a(e,t,r,n)}function l(e,t,r,n,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){l(i,n,o,a,c,"next",e)}function c(e){l(i,n,o,a,c,"throw",e)}a(void 0)})}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function u(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach(function(t){m(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function m(e,t,r){return(t=h(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e){var t=function(e,t){if("object"!=x(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=x(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==x(t)?t:t+""}function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}var g,v=require("react"),b=require("lodash-es"),y=require("@kordar/easyui"),C=require("@kordar-lib/base"),F=require("@kordar-lib/i18n"),j=require("@kordar-lib/menus"),k=require("@kordar-lib/reducers"),w=require("react-router-dom"),E=require("@kordar-components/react"),D=require("rc-easyui"),A=require("react-i18next"),S="undefined"!=typeof document?document.currentScript:null,T={exports:{}},R={};var B,_,N={};
|
|
2
|
+
/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-runtime.development.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/function L(){return B||(B=1,"production"!==process.env.NODE_ENV&&function(){var e=v,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m=Symbol.iterator;var h=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];!function(e,t,r){var n=h.ReactDebugCurrentFrame,o=n.getStackAddendum();""!==o&&(t+="%s",r=r.concat([o]));var i=r.map(function(e){return String(e)});i.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,i)}("error",e,r)}var b;function y(e){return e.displayName||"Context"}function C(e){if(null==e)return null;if("number"==typeof e.tag&&g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case s:return"Suspense";case d:return"SuspenseList"}if("object"===x(e))switch(e.$$typeof){case l:return y(e)+".Consumer";case a:return y(e._context)+".Provider";case c:return function(e,t,r){var n=e.displayName;if(n)return n;var o=t.displayName||t.name||"";return""!==o?r+"("+o+")":r}(e,e.render,"ForwardRef");case u:var t=e.displayName||null;return null!==t?t:C(e.type)||"Memo";case f:var p=e,m=p._payload,h=p._init;try{return C(h(m))}catch(e){return null}}return null}b=Symbol.for("react.module.reference");var F,j,k,w,E,D,A,S=Object.assign,T=0;function R(){}R.__reactDisabledLog=!0;var B,_=h.ReactCurrentDispatcher;function L(e,t,r){if(void 0===B)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);B=n&&n[1]||""}return"\n"+B+e}var P,I=!1,M="function"==typeof WeakMap?WeakMap:Map;function O(e,t){if(!e||I)return"";var r,n=P.get(e);if(void 0!==n)return n;I=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=_.current,_.current=null,function(){if(0===T){F=console.log,j=console.info,k=console.warn,w=console.error,E=console.group,D=console.groupCollapsed,A=console.groupEnd;var e={configurable:!0,enumerable:!0,value:R,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}T++}();try{if(t){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"===("undefined"==typeof Reflect?"undefined":x(Reflect))&&Reflect.construct){try{Reflect.construct(a,[])}catch(e){r=e}Reflect.construct(e,[],a)}else{try{a.call()}catch(e){r=e}e.call(a.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var l=t.stack.split("\n"),c=r.stack.split("\n"),s=l.length-1,d=c.length-1;s>=1&&d>=0&&l[s]!==c[d];)d--;for(;s>=1&&d>=0;s--,d--)if(l[s]!==c[d]){if(1!==s||1!==d)do{if(s--,--d<0||l[s]!==c[d]){var u="\n"+l[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),"function"==typeof e&&P.set(e,u),u}}while(s>=1&&d>=0);break}}}finally{I=!1,_.current=o,function(){if(0===--T){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:S({},e,{value:F}),info:S({},e,{value:j}),warn:S({},e,{value:k}),error:S({},e,{value:w}),group:S({},e,{value:E}),groupCollapsed:S({},e,{value:D}),groupEnd:S({},e,{value:A})})}T<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var f=e?e.displayName||e.name:"",p=f?L(f):"";return"function"==typeof e&&P.set(e,p),p}function G(e,t,r){if(null==e)return"";if("function"==typeof e)return O(e,!(!(n=e.prototype)||!n.isReactComponent));var n;if("string"==typeof e)return L(e);switch(e){case s:return L("Suspense");case d:return L("SuspenseList")}if("object"===x(e))switch(e.$$typeof){case c:return O(e.render,!1);case u:return G(e.type,t,r);case f:var o=e,i=o._payload,a=o._init;try{return G(a(i),t,r)}catch(e){}}return""}P=new M;var U=Object.prototype.hasOwnProperty,$={},z=h.ReactDebugCurrentFrame;function V(e){if(e){var t=e._owner,r=G(e.type,e._source,t?t.type:null);z.setExtraStackFrame(r)}else z.setExtraStackFrame(null)}var W=Array.isArray;function H(e){return W(e)}function q(e){return""+e}function K(e){if(function(e){try{return q(e),!1}catch(e){return!0}}(e))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),q(e)}var Y,Q,J=h.ReactCurrentOwner,X={key:!0,ref:!0,__self:!0,__source:!0};function Z(e,r,n,o,i){var a,l={},c=null,s=null;for(a in void 0!==n&&(K(n),c=""+n),function(e){if(U.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(r)&&(K(r.key),c=""+r.key),function(e){if(U.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(r)&&(s=r.ref,function(e){"string"==typeof e.ref&&J.current}(r)),r)U.call(r,a)&&!X.hasOwnProperty(a)&&(l[a]=r[a]);if(e&&e.defaultProps){var d=e.defaultProps;for(a in d)void 0===l[a]&&(l[a]=d[a])}if(c||s){var u="function"==typeof e?e.displayName||e.name||"Unknown":e;c&&function(e,t){var r=function(){Y||(Y=!0,g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}(l,u),s&&function(e,t){var r=function(){Q||(Q=!0,g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}(l,u)}return function(e,r,n,o,i,a,l){var c={$$typeof:t,type:e,key:r,ref:n,props:l,_owner:a,_store:{}};return Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(c,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(c,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c}(e,c,s,i,o,J.current,l)}var ee,te=h.ReactCurrentOwner,re=h.ReactDebugCurrentFrame;function ne(e){if(e){var t=e._owner,r=G(e.type,e._source,t?t.type:null);re.setExtraStackFrame(r)}else re.setExtraStackFrame(null)}function oe(e){return"object"===x(e)&&null!==e&&e.$$typeof===t}function ie(){if(te.current){var e=C(te.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}ee=!1;var ae={};function le(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var r=function(e){var t=ie();if(!t){var r="string"==typeof e?e:e.displayName||e.name;r&&(t="\n\nCheck the top-level render call using <"+r+">.")}return t}(t);if(!ae[r]){ae[r]=!0;var n="";e&&e._owner&&e._owner!==te.current&&(n=" It was passed a child from "+C(e._owner.type)+"."),ne(e),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),ne(null)}}}function ce(e,t){if("object"===x(e))if(H(e))for(var r=0;r<e.length;r++){var n=e[r];oe(n)&&le(n,t)}else if(oe(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!==x(e))return null;var t=m&&e[m]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,a=o.call(e);!(i=a.next()).done;)oe(i.value)&&le(i.value,t)}}function se(e){var t,r=e.type;if(null!=r&&"string"!=typeof r){if("function"==typeof r)t=r.propTypes;else{if("object"!==x(r)||r.$$typeof!==c&&r.$$typeof!==u)return;t=r.propTypes}if(t){var n=C(r);!function(e,t,r,n,o){var i=Function.call.bind(U);for(var a in e)if(i(e,a)){var l=void 0;try{if("function"!=typeof e[a]){var c=Error((n||"React class")+": "+r+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+x(e[a])+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}l=e[a](t,a,n,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){l=e}!l||l instanceof Error||(V(o),g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",r,a,x(l)),V(null)),l instanceof Error&&!(l.message in $)&&($[l.message]=!0,V(o),g("Failed %s type: %s",r,l.message),V(null))}}(t,e.props,"prop",n,e)}else if(void 0!==r.PropTypes&&!ee){ee=!0,g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",C(r)||"Unknown")}"function"!=typeof r.getDefaultProps||r.getDefaultProps.isReactClassApproved||g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}var de={};function ue(e,r,m,h,v,y){var F=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===i||e===o||e===s||e===d||e===p||"object"===x(e)&&null!==e&&(e.$$typeof===f||e.$$typeof===u||e.$$typeof===a||e.$$typeof===l||e.$$typeof===c||e.$$typeof===b||void 0!==e.getModuleId)}(e);if(!F){var j="";(void 0===e||"object"===x(e)&&null!==e&&0===Object.keys(e).length)&&(j+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var k;j+=ie(),null===e?k="null":H(e)?k="array":void 0!==e&&e.$$typeof===t?(k="<"+(C(e.type)||"Unknown")+" />",j=" Did you accidentally export a JSX literal instead of a component?"):k=x(e),g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",k,j)}var w=Z(e,r,m,v,y);if(null==w)return w;if(F){var E=r.children;if(void 0!==E)if(h)if(H(E)){for(var D=0;D<E.length;D++)ce(E[D],e);Object.freeze&&Object.freeze(E)}else g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ce(E,e)}if(U.call(r,"key")){var A=C(e),S=Object.keys(r).filter(function(e){return"key"!==e}),T=S.length>0?"{key: someKey, "+S.join(": ..., ")+": ...}":"{key: someKey}";if(!de[A+T])g('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',T,A,S.length>0?"{"+S.join(": ..., ")+": ...}":"{}",A),de[A+T]=!0}return e===n?function(e){for(var t=Object.keys(e.props),r=0;r<t.length;r++){var n=t[r];if("children"!==n&&"key"!==n){ne(e),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),ne(null);break}}null!==e.ref&&(ne(e),g("Invalid attribute `ref` supplied to `React.Fragment`."),ne(null))}(w):se(w),w}var fe=function(e,t,r){return ue(e,t,r,!1)},pe=function(e,t,r){return ue(e,t,r,!0)};N.Fragment=n,N.jsx=fe,N.jsxs=pe}()),N}var P=(_||(_=1,"production"===process.env.NODE_ENV?T.exports=function(){if(g)return R;g=1;var e=v,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(e,r,a){var l,c={},s=null,d=null;for(l in void 0!==a&&(s=""+a),void 0!==r.key&&(s=""+r.key),void 0!==r.ref&&(d=r.ref),r)n.call(r,l)&&!i.hasOwnProperty(l)&&(c[l]=r[l]);if(e&&e.defaultProps)for(l in r=e.defaultProps)void 0===c[l]&&(c[l]=r[l]);return{$$typeof:t,type:e,key:s,ref:d,props:c,_owner:o.current}}return R.Fragment=r,R.jsx=a,R.jsxs=a,R}():T.exports=L()),T.exports);var I,M=function(e){return e.value.replace("T"," ").replace("Z","")},O=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"-",o=b.get(e,t,[]);for(var i in o){var a=o[i];if(a.value==r)return a.label}return n};function G(){return I}new j.MenuService;var U={adminRegister:"admin/register",adminResetPassword:"admin/reset-password",initialize:"init",menus:"menus",langData:"lang-data",adminInfo:"resource/admin/info",loginCaptcha:"login/captcha",loginConfig:"login/config",loginSubmit:"login/submit",rbacRoles:"rbac/roles",rbacAddRole:"rbac/add-role",rbacUpdateRole:"rbac/update-role",rbacDeleteRole:"rbac/delete-role",rbacBatchDeleteRole:"rbac/batch-delete-role",rbacPermissions:"rbac/permissions",rbacAddPermission:"rbac/add-permission",rbacUpdatePermission:"rbac/update-permission",rbacDeletePermission:"rbac/delete-permission",rbacBatchDeletePermission:"rbac/batch-delete-permission",rbacRules:"rbac/rules",rbacAddRule:"rbac/add-rule",rbacDeleteRule:"rbac/delete-rule",rbacGetChildren:"rbac/get-children",rbacAddPermissionChildren:"rbac/add-permission-children",rbacGetRolesByUser:"rbac/get-roles-by-user",rbacAssignItemToUser:"rbac/assign-item-to-user",rbacFastAddPermission:"rbac/fast-add-permission",rbacGetPermissionsByUser:"rbac/get-permissions-by-user"};function $(e){return U[e]}var z=function(){return u(function e(){s(this,e)},[{key:"result",value:function(e,t,r,n,o,i){200===e&&o&&o(r,n)}},{key:"buildQueryString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).filter(function(t){return void 0!==e[t]&&null!==e[t]&&""!==e[t]}).map(function(t){var r=e[t];return Array.isArray(r)?r.map(function(e){return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e))}).join("&"):"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(r))}).join("&")}},{key:"listWithQuery",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.buildQueryString(t),o=n?"resource/".concat(e,"/list?").concat(n):"resource/".concat(e,"/list");return G().post(o,r)}},{key:"list",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return G().post("resource/".concat(e,"/list"),t)}},{key:"listResult",value:(o=c(i().m(function e(t){var r,n,o,a,l,c,s,d=arguments;return i().w(function(e){for(;;)switch(e.n){case 0:return r=d.length>1&&void 0!==d[1]?d[1]:{},n=d.length>2?d[2]:void 0,e.n=1,G().post("resource/".concat(t,"/list"),r);case 1:o=e.v,a=o.code,l=o.message,c=o.data,s=o.count,this.result(a,l,c,s,n);case 2:return e.a(2)}},e,this)})),function(e){return o.apply(this,arguments)})},{key:"configs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return G().post("resource/".concat(e,"/configs"),{data:t})}},{key:"configsResult",value:(n=c(i().m(function e(t){var r,n,o,a,l,c,s=arguments;return i().w(function(e){for(;;)switch(e.n){case 0:return r=s.length>1&&void 0!==s[1]?s[1]:{},n=s.length>2?s[2]:void 0,e.n=1,G().post("resource/".concat(t,"/configs"),r);case 1:o=e.v,a=o.code,l=o.message,c=o.data,this.result(a,l,c,0,n);case 2:return e.a(2)}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"edit",value:function(e,t){return G().post("resource/".concat(e,"/edit"),t)}},{key:"editResult",value:(r=c(i().m(function e(t,r,n){var o,a,l,c;return i().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,G().post("resource/".concat(t,"/edit"),r);case 1:o=e.v,a=o.code,l=o.message,c=o.data,this.result(a,l,c,0,n);case 2:return e.a(2)}},e,this)})),function(e,t,n){return r.apply(this,arguments)})},{key:"add",value:function(e,t){return G().post("resource/".concat(e,"/add"),t)}},{key:"update",value:function(e,t){return G().post("resource/".concat(e,"/update"),t)}},{key:"saveResult",value:(t=c(i().m(function e(t,r,n,o){var a,l,c,s,d,u,f,p;return i().w(function(e){for(;;)switch(e.n){case 0:if(r!==C.FormDataType.CREATE){e.n=2;break}return e.n=1,this.add(t,n);case 1:a=e.v,l=a.code,c=a.message,s=a.data,this.result(l,c,s,0,o),e.n=4;break;case 2:if(r!==C.FormDataType.UPDATE){e.n=4;break}return e.n=3,this.update(t,n);case 3:d=e.v,u=d.code,f=d.message,p=d.data,this.result(u,f,p,0,o);case 4:return e.a(2)}},e,this)})),function(e,r,n,o){return t.apply(this,arguments)})},{key:"del",value:function(e,t){return G().post("resource/".concat(e,"/delete"),{data:t})}},{key:"delResult",value:(e=c(i().m(function e(t,r,n){var o,a,l,c;return i().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,G().post("resource/".concat(t,"/delete"),r);case 1:o=e.v,a=o.code,l=o.message,c=o.data,this.result(a,l,c,0,n);case 2:return e.a(2)}},e,this)})),function(t,r,n){return e.apply(this,arguments)})},{key:"info",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return G().post("resource/".concat(e,"/info"),t)}},{key:"output",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{responseType:"blob"};return G().post("resource/".concat(e,"/download"),t,r)}},{key:"outputOctetStream",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return this.output(e,t,{responseType:"blob"}).then(function(e){var t=new Blob([e.data],{type:"application/octet-stream"}),n=URL.createObjectURL(t),o=document.createElement("a");o.href=n,o.download=r+".xlsx",document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(n)})}},{key:"search",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return G().post("resource/".concat(e,"/").concat(t),r)}},{key:"fetch",value:function(e,t,r,n){return G().post("resource/".concat(e,"/").concat(t),r,n)}}]);var e,t,r,n,o}(),V=new z,W=function(e){return[{type:C.CheckAccessEleType.AND,value:["/resource/"+e+"/add"],key:"add"},{type:C.CheckAccessEleType.AND,value:["/resource/"+e+"/update"],key:"update"},{type:C.CheckAccessEleType.AND,value:["/resource/"+e+"/delete"],key:"delete"},{type:C.CheckAccessEleType.AND,value:["/resource/"+e+"/edit"],key:"edit"},{type:C.CheckAccessEleType.AND,value:["/resource/"+e+"/download"],key:"output"}]},H=function(e,t){return function(r){var n=r.fn,o=r.params,i=r.success,a=r.error;y.$confirm(F.tt("confirm_del_title","Message"),null!=t?t:F.tt("confirm_del_msg","Message"),function(){n(o).then(function(t){var r=t.code;t.message,t.data;200===r?(i&&i(),e.refresh(),y.$toast.success(F.tt("del_success","Message"))):a&&a()})})}},q=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return function(r){y.$confirm(F.tt("confirm_del_title","Message"),null!=t?t:F.tt("confirm_del_msg","Message"),function(){V.delResult(e.name(),r,function(){e.refresh(),y.$toast.success(F.tt("del_success","Message"))}).then()})}};function K(e){return Object.entries(e).map(function(e){var t=r(e,2),n=t[0],o=t[1];return"".concat(o[0],"(").concat(n,")")}).join(",")}function Y(e){var r,n=[],o=new Map,i=t(e);try{for(i.s();!(r=i.n()).done;){var a,l=r.value,c="",s=l.name,d=b.trim(s,"/").split("/");d.length<=2?c=d[0]:d.length>2&&(c=d[0]+"/"+d[1]);var u=o.get(c);null==u&&(u=[]);var f=null!==(a=l.description)&&void 0!==a?a:"";u.push({id:s,text:f+"["+s+"]"}),o.set(c,u)}}catch(e){i.e(e)}finally{i.f()}return o.forEach(function(e,t){n.push({text:t,children:e})}),n}function Q(e,t,r){var n=0;return e.forEach(function(e){if(e.children&&e.children.length>0){var o=Q(e.children,t,r);o>0&&(o===e.children.length?e.checkState="checked":e.checkState="indeterminate")}e.id&&t.has(e.id)&&(r.push(e),n++)}),n}function J(e){var r,n=[],o=new Map,i=t(e);try{for(i.s();!(r=i.n()).done;){var a=r.value,l="",c=a.description,s=void 0,d=b.trim(c,":").split(":");d.length<=2?l=d[0]:d.length>2&&(l=d[0]+":"+d[1]),d.length>=2&&(s=d[1]);var u=o.get(l);null==u&&(u=[]);var f=a.name;u.push({id:f,text:null!=s?s:f}),o.set(l,u)}}catch(e){i.e(e)}finally{i.f()}return o.forEach(function(e,t){n.push({text:t,children:e})}),n}var X=function(e,t){if(!e[t])return[];var r=[],n=e[t];return n instanceof Array?n.forEach(function(e){return r.push({value:e.value,text:e.label})}):Object.keys(n).forEach(function(e,t){return r.push({value:e,text:n[e]})}),r},Z=[];function ee(){return Z.map(function(e){return p(p({},e),{},{className:e.className})})}var te=new(function(){return u(function e(){s(this,e)},[{key:"roles",value:function(){return G().post($("rbacRoles"))}},{key:"addRole",value:function(e){return G().post($("rbacAddRole"),e)}},{key:"updateRole",value:function(e){return G().post($("rbacUpdateRole"),e)}},{key:"deleteRole",value:function(e){return G().post($("rbacDeleteRole"),e)}},{key:"batchDeleteRole",value:function(e){return G().post($("rbacBatchDeleteRole"),e)}},{key:"permissions",value:function(){return G().post($("rbacPermissions"))}},{key:"addPermission",value:function(e){return G().post($("rbacAddPermission"),e)}},{key:"updatePermission",value:function(e){return G().post($("rbacUpdatePermission"),e)}},{key:"deletePermission",value:function(e){return G().post($("rbacDeletePermission"),e)}},{key:"batchDeletePermission",value:function(e){return G().post($("rbacBatchDeletePermission"),e)}},{key:"rules",value:function(){return G().post($("rbacRules"))}},{key:"addRule",value:function(e){return G().post($("rbacAddRule"),e)}},{key:"deleteRule",value:function(e){return G().post($("rbacDeleteRule"),e)}},{key:"getChildren",value:function(e){return G().get($("rbacGetChildren"),e)}},{key:"addPermissionChildren",value:function(e){return G().post($("rbacAddPermissionChildren"),e)}},{key:"getRolesByUser",value:function(e){return G().get($("rbacGetRolesByUser"),{id:e})}},{key:"assignItemToUser",value:function(e){return G().post($("rbacAssignItemToUser"),e)}},{key:"fastAddPermission",value:function(e){return G().post($("rbacFastAddPermission"),e)}},{key:"getPermissionsByUser",value:function(e){return G().get($("rbacGetPermissionsByUser"),{id:e})}}])}()),re=new(function(){return u(function e(){s(this,e)},[{key:"register",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return G().post($("adminRegister"),e)}},{key:"resetPassword",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return G().post($("adminResetPassword"),e)}},{key:"menus",value:function(){return G().post($("menus"),{})}},{key:"info",value:function(e){return G().post($("adminInfo"),{conditions:[{key:"id",value:e}]})}}])}()),ne=new(function(){return u(function e(){s(this,e)},[{key:"initialize",value:function(){return G().post($("initialize"))}},{key:"getLugData",value:function(e){return G().post($("langData"),{locale:e})}}])}()),oe=new(function(){return u(function e(){s(this,e)},[{key:"captcha",value:function(){return G().post($("loginCaptcha"))}},{key:"login",value:(e=c(i().m(function e(t,r,n){var o,a,l;return i().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,G().post($("loginSubmit"),t);case 1:o=e.v,a=o.code,l=o.data,200===a?r(l,a):n(l,a);case 2:return e.a(2)}},e)})),function(t,r,n){return e.apply(this,arguments)})},{key:"configs",value:function(){return G().post($("loginConfig"))}}]);var e}());function ie(e,t,r){if(function(){try{"undefined"==typeof document?require("url").pathToFileURL(__filename).href:S&&"SCRIPT"===S.tagName.toUpperCase()&&S.src||new URL("index.umd.cjs",document.baseURI).href}catch(e){}return!1}()){var n=(new Date).toISOString(),o=void 0===r?"":JSON.stringify(r),i="".concat("[MenuTabLinkage]"," ").concat(n," [").concat(e.toUpperCase(),"] ").concat(t," ").concat(o);switch(e){case"info":console.info(i);break;case"warn":console.warn(i);break;case"error":console.error(i)}}}function ae(n){var o=k.useAppDispatch(),a=w.useNavigate(),l=k.useAppSelector(function(e){return e.app.sidebarCollapsed}),s=k.useAppSelector(function(e){return e.layout}),d=s.tabs,u=s.choices,f=s.choiceId,p=r(v.useState([]),2),m=p[0],h=p[1],g=r(v.useState(),2),b=g[0],C=g[1],F=r(v.useState([]),2),j=F[0],E=F[1],D=r(v.useState([]),2),A=D[0],S=D[1],T=function(e){if(!e)return ie("warn","safeNavigate: empty path, skipped"),!1;try{return a({pathname:e}),ie("info","safeNavigate: ok",{path:e}),!0}catch(t){return ie("error","safeNavigate: failed",{path:e,error:(null==t?void 0:t.message)||String(t)}),!1}},R=function(e){try{var t=n.getItemById(e);return t||ie("warn","safeGetMenuItem: not found in menu service",{id:e}),t}catch(t){return void ie("error","safeGetMenuItem: exception",{id:e,error:(null==t?void 0:t.message)||String(t)})}},B=function(e){try{return n.searchPathIndex(e)}catch(t){return ie("error","safeSearchPathIndex: failed",{id:e,error:(null==t?void 0:t.message)||String(t)}),[]}},_=function(e){if(e&&0!==e.length){var t=e[0],r=m.find(function(e){return e.id===t});r&&r.id!==b&&(C(r.id),ie("info","syncMenuAreaId: updated",{menuAreaId:r.id,fromChain:e}))}},N=v.useMemo(function(){var e,t;try{n.init(y.setSideMenuState(j,u))}catch(e){return ie("error","menuList: menuservice.init failed",{error:(null==e?void 0:e.message)||String(e)}),[]}if(l)return n.menus()||[];var r=null!==(e=null!=b?b:u[0])&&void 0!==e?e:null===(t=n.tabs)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.id,o=n.menusById(r);return[{id:0,text:"",state:"open",children:(null==o?void 0:o.children)||[]}]},[j,l,b,u]),L=v.useMemo(function(){try{return n.init(y.setSideMenuState(j,u)),n.menus()||[]}catch(e){return ie("error","menuAll: menuservice.init failed",{error:(null==e?void 0:e.message)||String(e)}),[]}},[j,l,u]),P=v.useMemo(function(){var e,r=[],o=t(A);try{for(o.s();!(e=o.n()).done;){var i=e.value;i&&null!=i.id&&r.push({id:i.id,path:i.router_name||"",closable:!1,title:i.title||"",selected:i.id==f,type:2})}}catch(e){o.e(e)}finally{o.f()}if(0===j.length)return r;try{n.init(y.setSideMenuState(j,u))}catch(e){return ie("error","menuTabList: menuservice.init failed",{error:(null==e?void 0:e.message)||String(e)}),r}var a,l=t(d);try{for(l.s();!(a=l.n()).done;){var c=a.value,s=R(c);s?r.push({id:s.id,path:s.path||"",closable:!0,title:s.text||"",selected:s.id==f,type:1}):ie("warn","menuTabList: orphan tab id (no matching menu)",{tabId:c})}}catch(e){l.e(e)}finally{l.f()}return r},[j,d,f,A,u]);v.useEffect(function(){if(j.length>0)try{n.init(y.setSideMenuState(j,u)),h(n.tabs||[])}catch(e){ie("error","useEffect init menuArea failed",{error:(null==e?void 0:e.message)||String(e)})}},[j]),v.useEffect(function(){if(0!==j.length){try{n.init(y.setSideMenuState(j,u))}catch(e){return}var e=d.filter(function(e){return n.getItemById(e)}),t=d.filter(function(e){return!n.getItemById(e)});if(0!==t.length){o(k.saveTabs({newTabs:e}));var r=new Set(A.map(function(e){return null==e?void 0:e.id}));if(!(e.some(function(e){return e==f})||r.has(f))){var i=e[e.length-1];if(void 0!==i)o(k.sidebarChoice({id:i,choices:B(i)}));else{var a,l=A.find(function(e){return null!=(null==e?void 0:e.id)});o(k.justSaveChoice({choiceId:null!==(a=null==l?void 0:l.id)&&void 0!==a?a:""}))}}ie("warn","cleanup: removed orphan tab ids",{orphanTabs:t}),ie("info","cleanup: orphan tabs removed",{removed:t.length,remaining:e.length})}}},[j,d,A,f,u]);var I=function(r,n){if(0!==r.size){var i=e(P),a=new Set(e(r).filter(function(e){var t=i.find(function(t){return t.id==e});return!0===(null==t?void 0:t.closable)}));if(0!==a.size){var l,c=!1,s=t(a);try{for(s.s();!(l=s.n()).done;){var d=l.value;o(k.removeTab({id:d})),d==f&&(c=!0)}}catch(e){s.e(e)}finally{s.f()}if(ie("info","closeMultiple: removed tabs",{count:a.size,ids:e(a),currentRemoved:c}),c)if(n&&null!=n.id){var u=n.id,p=B(u);_(p),o(k.sidebarChoice({id:u,choices:p})),n.path&&T(n.path),ie("info","closeMultiple: fallback activated",{id:u})}else o(k.saveChoice({choices:[]})),ie("info","closeMultiple: no fallback tab, cleared selection")}else ie("info","closeMultiple: all candidates are fixed, nothing to close")}};return v.useLayoutEffect(function(){c(i().m(function e(){var t,r,n,o,a,l,c,s,d,u;return i().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,re.menus();case 1:n=e.v,o=n.data,E((null==o?void 0:o.sidebar)||[]),S((null==o?void 0:o.welcome)||[]),ie("info","useLayoutEffect: menus loaded",{sidebarCount:null==o||null===(t=o.sidebar)||void 0===t?void 0:t.length,welcomeCount:null==o||null===(r=o.welcome)||void 0===r?void 0:r.length}),e.n=3;break;case 2:e.p=2,ie("error","useLayoutEffect: failed to load menus",{error:(null==(d=e.v)?void 0:d.message)||String(d)});case 3:if(e.p=3,a=k.Admin.info(),!(l=a.id)){e.n=5;break}return e.n=4,te.getPermissionsByUser(l);case 4:s=e.v,k.Admin.loadPermissions(null!==(c=null==s?void 0:s.data)&&void 0!==c?c:[]);case 5:e.n=7;break;case 6:e.p=6,ie("error","useLayoutEffect: failed to load permissions",{error:(null==(u=e.v)?void 0:u.message)||String(u)});case 7:return e.a(2)}},e,null,[[3,6],[0,2]])}))()},[]),{collapsed:l,menuList:N,menuAll:L,onMenuSelection:function(e){if(e&&null!=e.id){var t=e.id,r=B(t);_(r);try{o(k.sidebarChoice({id:t,choices:r})),ie("info","onMenuSelection: tab activated",{id:t,path:e.path})}catch(e){return void ie("error","onMenuSelection: dispatch sidebarChoice failed",{id:t,error:(null==e?void 0:e.message)||String(e)})}e.path&&T(e.path)}else ie("warn","onMenuSelection: invalid selection",{selection:e})},menuArea:m,setMenuAreaId:C,choiceId:f,menuTabList:P,onTabClosed:function(t){var r,n,i,a;"object"===x(t)&&null!==t&&(r=null!==(n=null!==(i=null==t||null===(a=t.props)||void 0===a?void 0:a.id)&&void 0!==i?i:null==t?void 0:t.id)&&void 0!==n?n:t);if(null!=r){var l=r;ie("info","onTabClosed: closing",{closeId:l});var c=e(P),s=c.findIndex(function(e){return e.id==l});if(-1===s)return ie("warn","onTabClosed: tab not found in current list",{closeId:l}),void o(k.removeTab({id:l}));if(c[s].closable){var d,u=l==f;if(d=s===c.length-1?c[s-1]:c[s+1],o(k.removeTab({id:l})),u)if(d&&null!=d.id){var p=d.id,m=B(p);_(m),o(k.sidebarChoice({id:p,choices:m})),d.path&&T(d.path),ie("info","onTabClosed: switched to next tab",{from:l,to:p})}else o(k.saveChoice({choices:[]})),ie("info","onTabClosed: last tab removed, cleared selection");else ie("info","onTabClosed: non-active tab removed, no navigation needed",{closeId:l})}else ie("warn","onTabClosed: attempted to close fixed tab, blocked",{closeId:l})}else ie("warn","onTabClosed: could not extract tab id",{event:t})},onTabSelected:function(e){if(e&&null!=e.id){var t=e.id,r=B(t);_(r);try{o(k.sidebarChoice({id:t,choices:r})),ie("info","onTabSelected: activated",{id:t,path:e.path})}catch(e){return void ie("error","onTabSelected: dispatch failed",{id:t,error:(null==e?void 0:e.message)||String(e)})}e.path&&T(e.path)}else ie("warn","onTabSelected: invalid selection",{selection:e})},onCloseCurrent:function(e,t){if(!t||e<0||e>=t.length)ie("warn","onCloseCurrent: invalid index",{selectedIndex:e,length:null==t?void 0:t.length});else{var r,n=t[e];if(n&&null!=n.id)if(n.closable)r=e===t.length-1?t[e-1]:t[e+1],I(new Set([n.id]),r);else ie("warn","onCloseCurrent: tab is not closable",{id:n.id});else ie("warn","onCloseCurrent: tab at index is invalid",{selectedIndex:e})}},onCloseLeft:function(e,t){if(!(!t||e<0||e>=t.length)){for(var r=new Set,n=0;n<e;n++){var o;null!==(o=t[n])&&void 0!==o&&o.closable&&r.add(t[n].id)}var i=t[e];I(r,i)}},onCloseRight:function(e,t){if(!(!t||e<0||e>=t.length)){for(var r=new Set,n=e+1;n<t.length;n++){var o;null!==(o=t[n])&&void 0!==o&&o.closable&&r.add(t[n].id)}var i=t[e];I(r,i)}},onCloseOthers:function(e,t){if(!(!t||e<0||e>=t.length)){for(var r=t[e],n=new Set,o=0;o<t.length;o++){var i;o!==e&&null!==(i=t[o])&&void 0!==i&&i.closable&&n.add(t[o].id)}I(n,r)}},onCloseAll:function(e){if(e&&0!==e.length){var r,n=new Set,o=t(e);try{for(o.s();!(r=o.n()).done;){var i=r.value;null!=i&&i.closable&&n.add(i.id)}}catch(e){o.e(e)}finally{o.f()}if(0!==n.size){var a=e.find(function(e){return!e.closable});I(n,a)}}}}}function le(){var e={location:w.useLocation(),history:k.useAppSelector(function(e){return e.app.historyLocation}),isGuest:function(){return k.Admin.isGuest()},saveHistoryLocation:function(e){return k.App.saveHistoryLocation(e)}};return E.useAppRedirect(e)}function ce(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=E.useCheckAccess(null!==(t=e.checkAccessItems)&&void 0!==t?t:[],{AndCan:k.Admin.can,OrCan:k.Admin.orCan,Permissions:k.Admin.permissions}),a=k.useAppSelector(function(e){return e.user.version}),l=r(v.useState({data:[],pageNumber:1,pageSize:null!==(n=e.defaultPageSize)&&void 0!==n?n:20,total:0,loading:!1,border:!1,pageSizes:[10,20,30,40,50],layout:["list","sep","first","prev","links","next","last","sep","refresh","info"],style:{width:"100%",height:"100%"},selectionValues:[]}),2),c=l[0],s=l[1];return E.useLocalTable({value:c,setValue:s,config:e,checkaccess:i,dependency:o,version:a})}function se(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=E.useCheckAccess(null!==(t=e.checkAccessItems)&&void 0!==t?t:[],{AndCan:k.Admin.can,OrCan:k.Admin.orCan,Permissions:k.Admin.permissions}),a=k.useAppSelector(function(e){return e.user.version}),l=r(v.useState({data:[],pageNumber:1,pageSize:null!==(n=e.defaultPageSize)&&void 0!==n?n:20,total:0,loading:!1,border:!1,pageSizes:[10,20,30,40,50],layout:["list","sep","first","prev","links","next","last","sep","refresh","info"],style:{width:"100%",height:"100%"},selectionValues:[]}),2),c=l[0],s=l[1];return E.useTable({value:c,setValue:s,config:e,checkaccess:i,dependency:o,version:a})}var de=function(e){var t=e.ctxState,r=e.ctx;return P.jsx(D.Pagination,{total:null==t?void 0:t.total,pageNumber:null==t?void 0:t.pageNumber,pageSize:null==t?void 0:t.pageSize,layout:null==t?void 0:t.layout,onPageChange:function(e){var t=e.pageNumber,n=e.pageSize;return null==r?void 0:r.pageChange(t,n)},pageList:null==t?void 0:t.pageSizes,showPageRefresh:!1})},ue=function(e){return function(t){return function(n){var o=r(v.useState({}),2),i=o[0],a=o[1],l=r(v.useState({}),2),c=l[0],s=l[1],d=r(v.useState(0),2),u=d[0],f=d[1],m=y.useLocale().locale;return v.useEffect(function(){var t=F.getResourceBundle(m,"Page",e.name);document.title=b.get(t,"title",F.tt("title","App")),a(null!=t?t:{}),e.fetchConfig&&e.fetchConfig().then(function(e){var t=e.data;s(t||{}),f(u+1)})},[m]),P.jsx(v.Fragment,{children:P.jsx(t,p(p({},n),{},{pageConfig:i,fetchConfig:c,fetchVersion:u}))})}}},fe=v.createContext({pageConfig:{},fetchConfig:{}});function pe(e,t){return e.map(function(e){if(!e.children||0===e.children.length)return t.has(e.id)?e:null;var r=pe(e.children,t);return r.length>0?p(p({},e),{},{children:r}):null}).filter(Boolean)}var me=function(e){var t=e.ctx,n=e.record,o=e.pageConfig,a=(e.fetchConfig,e.close),l=r(v.useState(),2),s=l[0],d=l[1],u=r(v.useState([]),2),f=u[0],p=u[1],m=v.useRef(null),h=r(v.useState(!1),2),x=h[0],g=h[1],b=r(v.useState([]),2),C=b[0],j=b[1],k=r(v.useState([]),2),w=k[0],E=k[1],A=v.useRef(null);v.useEffect(function(){null==t||t.setMethod("onSubmit",T),S()},[]);var S=function(){var e=c(i().m(function e(){var t,r,o,a,l,c;return i().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,te.roles();case 1:return t=e.v,r=J(t.data||[]),o=[],e.n=2,te.permissions();case 2:a=e.v,l=Y(a.data||[]),c=[],te.getPermissionsByUser(n.id).then(function(e){var t=e.code,r=e.data;if(200===t){var n=new Set;r&&r.forEach(function(e){n.add(e.name),1==e.item_type?w.push(e.name):f.push(e.name)}),Q(l,n,c),d(l),c.forEach(function(e){m.current.checkNode(e)})}}),te.getRolesByUser(n.id).then(function(e){var t=e.code,n=e.data;if(200===t){var i=new Set;n&&n.forEach(function(e){i.add(e.name),1==e.item_type?w.push(e.name):f.push(e.name)}),Q(r,i,o),j(r),o.forEach(function(e){A.current.checkNode(e)})}});case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),T=function(){te.assignItemToUser({id:n.id,roles:w,permissions:f}).then(function(e){200===e.code&&(y.$toast.success(F.tparam(o,"assign_success","assign permission successfully!")),a())})},R=v.useMemo(function(){return x&&s?pe(s,new Set(f)):s},[s,f,x]);return P.jsxs("div",{style:{display:"grid",gridTemplateColumns:"220px 1fr",gridTemplateRows:"auto 1fr auto",width:"100%",height:"100%",overflow:"hidden"},children:[P.jsx("div",{style:{gridRow:"1 / -1",borderRight:"1px solid #ddd",padding:10,overflow:"auto"},children:P.jsx(D.Tree,{selectLeafOnly:!0,checkbox:!0,data:C,ref:A,onCheckChange:function(e){if(e&&e.length>0){var t=[];e.forEach(function(e){e.id&&t.push(e.id)}),E(t)}}})}),P.jsxs("div",{style:{display:"flex",gap:4},children:[P.jsx(D.TextBox,{style:{flex:1},placeholder:"Searching...",onChange:function(e){m.current.doFilter(e)}},"assign-permission"),P.jsx(D.LinkButton,{iconCls:"icon-filter",selected:x,onClick:function(){return g(function(e){return!e})},children:x?F.tparam(o,"filter_all.text","全部"):F.tparam(o,"filter_selected.text","已选")})]}),P.jsx("div",{style:{padding:10,overflow:"auto",minHeight:0},children:P.jsx(D.Tree,{selectLeafOnly:!0,checkbox:!0,data:R,ref:m,onCheckChange:function(e){if(e&&e.length>0){var t=[];e.forEach(function(e){e.id&&t.push(e.id)}),p(t)}}})}),P.jsxs("div",{className:"dialog-button",children:[P.jsxs(D.LinkButton,{style:{width:80},onClick:T,iconCls:"icon-save",children:[" ",F.tparam(o,"submit.text","Submit")," "]}),P.jsxs(D.LinkButton,{style:{width:80},onClick:a,iconCls:"icon-cancel",children:[" ",F.tparam(o,"close.text","Close")," "]})]})]})},he=function(e){var t=e.value,r=e.props,n=e.close,o=v.useContext(fe),i=o.ctx,a=o.pageConfig,l=o.fetchConfig;return P.jsx(D.Dialog,{title:r.title,bodyCls:"f-column",modal:!0,closed:!0,ref:t.ref,style:{width:"calc(100vw - 30%)",height:"calc(100vh - 100px)"},children:P.jsx(me,p(p({className:"f-full",ctx:i,pageConfig:a,fetchConfig:l},r),{},{close:n}))})},xe=function(e){var t=e.ctx,n=(e.ctxState,e.type,e.record),o=e.pageConfig,i=e.fetchConfig,a=e.close,l=(e.refs,r(E.useFormMData(n).toArray(),2)),c=l[0],s=(l[1],v.useRef(null)),d=function(){s.current.validate(function(e){if(null==e){var r={username:c.username,phone:c.phone,password:"123456",name:c.name,type:parseInt(c.type)};re.register(r).then(function(e){200===e.code&&(y.$toast.success(F.tt("save success","Message")),t.refresh(),a())})}else y.$toast.error(K(e))})};return v.useEffect(function(){null==t||t.setMethod("onSubmit",d)},[t,d]),P.jsxs(D.Form,{ref:s,model:c,labelWidth:120,labelAlign:"left",errorType:"tooltip",rules:{username:{required:!0},phone:{required:!0}},style:{minWidth:500,padding:"20px"},children:[P.jsx(D.FormField,{name:"username",label:F.tfield(o,"username.label","Username")+":",children:P.jsx(D.TextBox,{placeholder:F.tfield(o,"username.placeholder",""),value:c.username})}),P.jsx(D.FormField,{name:"name",label:F.tfield(o,"name.label","Name")+":",children:P.jsx(D.TextBox,{placeholder:F.tfield(o,"name.placeholder",""),value:c.name})}),P.jsx(D.FormField,{name:"phone",label:F.tfield(o,"phone.label","Phone")+":",children:P.jsx(D.TextBox,{placeholder:F.tfield(o,"phone.placeholder",""),value:c.phone})}),P.jsx(D.FormField,{name:"type",label:F.tfield(o,"type.label","Type")+":",children:P.jsx(D.ComboBox,{placeholder:F.tfield(o,"yp.placeholder",""),data:X(i,"admin-type"),value:c.type})})]})},ge=function(e){var t=e.value,r=e.props,n=e.close,o=v.useContext(fe),i=o.ctx,a=o.ctxState,l=o.pageConfig,c=o.fetchConfig,s=o.refs;return P.jsx(D.Dialog,{title:r.title,bodyCls:"f-column form-dlg-body",modal:!0,closed:!0,ref:t.ref,footer:function(){return P.jsxs("div",{className:"admin-form-submit",children:[P.jsx(D.LinkButton,{style:{width:80},onClick:function(){var e;return null==i||null===(e=i.getMethod("onSubmit"))||void 0===e?void 0:e()},iconCls:"icon-save",children:F.tparam(l,"submit.text","Submit")}),P.jsx(D.LinkButton,{style:{width:80},onClick:function(){return null==n?void 0:n()},iconCls:"icon-cancel",children:F.tparam(l,"close.text","Close")})]})},style:{width:"calc(100vw - 50%)",maxHeight:"calc(100vh - 100px))"},children:P.jsx(xe,p(p({className:"f-full",ctx:i,ctxState:a,pageConfig:l,fetchConfig:c},r),{},{close:n,refs:s}))})},ve=function(e){var t=e.ctx,n=e.pageConfig,o=e.fetchConfig,i={username:"",phone:"",status:"",type:""},a=r(v.useState(i),2),l=a[0],c=a[1];return P.jsxs(D.Form,{className:"admin-search-panel",labelWidth:"auto",model:l,labelPosition:"before",children:[P.jsx(D.FormField,{name:"username",label:F.tfield(n,"username.label","Username"),children:P.jsx(D.TextBox,{value:l.username})}),P.jsx(D.FormField,{name:"phone",label:F.tfield(n,"phone.label","Phone"),children:P.jsx(D.TextBox,{value:l.phone})}),P.jsx(D.FormField,{name:"status",label:F.tfield(n,"status.label","Status"),children:P.jsx(D.ComboBox,{data:X(o,"admin-state"),value:l.status})}),P.jsx(D.FormField,{name:"type",label:F.tfield(n,"type.label","Type"),children:P.jsx(D.ComboBox,{data:X(o,"admin-type"),value:l.type})}),P.jsxs(D.FormField,{children:[P.jsx(D.LinkButton,{iconCls:"iconfont icon-search color-deep-sky-blue",onClick:function(){var e={conditions:[{key:"username",value:l.username,type:"LIKE",filter_empty:!0},{key:"phone",value:l.phone,type:"LIKE",filter_empty:!0},{key:"status",value:l.status,type:"EQ",filter_empty:!0},{key:"type",value:l.type,type:"EQ",filter_empty:!0}]};null==t||t.search(e)},style:{marginRight:"5px"},children:F.tparam(n,"search.text","Search")}),P.jsx(D.LinkButton,{iconCls:"iconfont icon-refresh2 color-deep-sky-blue",onClick:function(){c(i),null==t||t.reset()},children:F.tparam(n,"reset.text","Reset")})]})]})},be=y.withCheckGrid(D.DataGrid),ye=function(){var e=v.useContext(fe),t=e.pageConfig,n=e.fetchConfig,o=e.ctx,i=e.ctxState,a=e.refs,l=(e.version,r(v.useState(0),2)),c=l[0],s=l[1];return v.useEffect(function(){s(c+1)},[n]),P.jsx(P.Fragment,{children:P.jsxs(be,{toolbar:function(){var e={record:{username:"",password:""},type:C.FormDataType.CREATE,ctx:o,title:F.tparam(t,"add.text","Create Dict")};return P.jsxs(v.Fragment,{children:[P.jsx("div",{children:P.jsx(ve,{ctx:o,pageConfig:t,fetchConfig:n})}),P.jsxs(y.Toolbar,{children:[P.jsx(D.LinkButton,{plain:!0,className:"k-color-success",iconCls:"iconfont icon-refresh color-green",onClick:function(){return null==o?void 0:o.refresh()},children:F.tparam(t,"refresh.text","Refresh")}),P.jsx(y.Access,{ctx:o,point:"add",children:P.jsx(D.LinkButton,{plain:!0,className:"k-color-success",iconCls:"iconfont icon-add color-dark-green",onClick:function(){return b.invoke(a,"formDataRefDlg.open",e)},children:F.tparam(t,"add.text","Add")})})]})]})},data:null==i?void 0:i.data,loading:null==i?void 0:i.loading,style:null==i?void 0:i.style,idField:"id",selection:null==i?void 0:i.selectionValues,onSelectionChange:function(e){return null==o?void 0:o.tableSelectionChange(e)},ckWidth:50,editMode:"cell",dblclickToEdit:!0,onEditEnd:function(e){var t=e.row,r=e.column,n=e.originalValue,i=r.props.field;if(console.log(t,r,n),t[i]!==n){var a=null==o?void 0:o.name();V.edit(a,{conditions:[{key:"id",value:t.id}],editor:[{key:i,value:t[i],type:"SETVAL"}]}).then(function(e){var t=e.code,r=e.message;200===t?y.$toast.success(F.tt("save_success","Message")):y.$toast.error(r),null==o||o.refresh()})}},children:[P.jsx(D.GridColumn,{field:"id",title:F.tfield(t,"id.label","UserId"),width:"50px"}),P.jsx(D.GridColumn,{field:"username",title:F.tfield(t,"username.label","Username"),width:"80px"}),P.jsx(D.GridColumn,{field:"name",title:F.tfield(t,"name.label","Name"),width:"80px",className:"editable",render:function(e){var t=e.value;return P.jsx("span",{className:"admin-datagrid-cell-editable",children:t})},editable:null==o?void 0:o.can("update"),editor:function(e){var t=e.row;return P.jsx(D.TextBox,{value:t.name})}}),P.jsx(D.GridColumn,{field:"phone",title:F.tfield(t,"phone.label","Phone"),width:"120px",className:"editable",render:function(e){var t=e.value;return P.jsx("span",{className:"admin-datagrid-cell-editable",children:t})},editable:null==o?void 0:o.can("update"),editor:function(e){var t=e.row;return P.jsx(D.TextBox,{value:t.phone})}}),P.jsx(D.GridColumn,{field:"status",title:F.tfield(t,"status.label","Status"),align:"center",width:"80px",className:"editable",render:function(e){var t=e.value;return P.jsx("span",{className:"admin-datagrid-cell-editable",children:O(n,"admin-state",t)})},editable:null==o?void 0:o.can("update"),editor:function(e){var t=e.row;return P.jsx(D.ComboBox,{data:X(n,"admin-state"),value:t.status+""})}}),P.jsx(D.GridColumn,{field:"type",title:F.tfield(t,"type.label","Type"),align:"center",width:"80px",className:"editable",render:function(e){var t=e.value;return P.jsx("span",{className:"admin-datagrid-cell-editable",children:O(n,"admin-type",t)})},editable:null==o?void 0:o.can("update"),editor:function(e){var t=e.row;return P.jsx(D.ComboBox,{data:X(n,"admin-type"),value:t.type+""})}}),P.jsx(D.GridColumn,{field:"version",title:F.tfield(t,"version.label","Version"),width:"60px"}),P.jsx(D.GridColumn,{field:"create_time",title:F.tfield(t,"create_time.label","CreateTime"),width:"150px"}),P.jsx(D.GridColumn,{field:"update_time",title:F.tfield(t,"update_time.label","UpdateTime"),width:"150px"}),P.jsx(D.GridColumnGroup,{frozen:!0,align:"right",width:"100px",children:P.jsx(D.GridHeaderRow,{children:P.jsx(D.GridColumn,{align:"center",render:function(e){e.value;var r=e.row;e.rowIndex;return C.FormDataType.UPDATE,"".concat(F.tparam(t,"update.text","Update: {#name}")).replace("{#name}",r.username),P.jsxs(P.Fragment,{children:[P.jsx(y.Access,{ctx:o,point:"assign",children:P.jsx(D.LinkButton,{plain:!0,onClick:function(){return b.invoke(a,"assigndlg.open",{ctx:o,record:r,title:"".concat(F.tparam(t,"assign_permission.text","Assign Permission: {#name}")).replace("{#name}",r.username)})},iconCls:"iconfont icon-roles color-tomato"})}),P.jsx(y.Access,{ctx:o,point:"delete",children:P.jsx(D.LinkButton,{onClick:function(){return null==o?void 0:o.publish("remove",{conditions:[{key:"id",value:r.id}]})},plain:!0,iconCls:"iconfont icon-del color-red"})})]})},width:"100px"})})})]},c)})},Ce="admin",Fe=[{type:C.CheckAccessEleType.AND,value:["/rbac/roles","/rbac/permissions","/rbac/get-permissions-by-user","/rbac/get-roles-by-user"],key:"assign"}].concat(e(W(Ce))),je=ue({name:"Admin",fetchConfig:function(){return V.configs(Ce)}})(function(t){var r=t.pageConfig,n=t.fetchConfig;Fe=[].concat(e(Fe),e((null==n?void 0:n.checkAccessItems)||[]));var o=se({name:Ce,fetch:function(e){return V.list(Ce,e)},checkAccessItems:Fe,defaultPageSize:30});o.ctx.registerEvent("remove",q(o.ctx));var i=y.useRefDialog(),a=y.useRefDialog();return v.useEffect(function(){o.ctx.search()},[o.version]),P.jsx(fe.Provider,{value:{ctx:o.ctx,ctxState:o.ctxState,pageConfig:r,fetchConfig:n,refs:{formDataRefDlg:i,assigndlg:a}},children:P.jsxs(y.DefaultPanel,{mode:"cover",footer:function(){return P.jsx(de,{ctx:o.ctx,ctxState:o.ctxState})},children:[P.jsx(ge,p({},i)),P.jsx(he,p({},a)),P.jsx(ye,{})]})})}),ke=ue({name:"Home"})(function(e){var t,r,n,o,i,a,l=e.pageConfig,c=y.useLocale(!0).localeOptions,s=k.useAppSelector(function(e){return e.app}),d=k.useAppSelector(function(e){return e.layout}),u=k.useAppSelector(function(e){return e.user});return P.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"10px",padding:"5px",alignItems:"stretch"},children:[P.jsx(y.Card,{title:F.tparam(l,"welcome"),icon:"icon-home1",content:P.jsxs("div",{className:"card__notice",children:[P.jsx("p",{children:F.tparam(l,"welcome.p1")}),P.jsx("p",{children:F.tparam(l,"welcome.p2")})]}),colSpan:3}),P.jsx(y.Card,{title:F.tparam(l,"app_state"),icon:"icon-setting",content:P.jsxs(P.Fragment,{children:[P.jsx(y.CardInfoItem,{label:F.tparam(l,"theme"),value:P.jsx(y.CardTextValue,{children:(null==s?void 0:s.theme)||F.tparam(l,"no_data")})}),P.jsx(y.CardInfoItem,{label:F.tparam(l,"locale"),value:P.jsx(y.CardBadge,{children:(null==c?void 0:c[null==s?void 0:s.locale])||(null==s?void 0:s.locale)||F.tparam(l,"no_data")})}),P.jsx(y.CardInfoItem,{label:F.tparam(l,"sidebar_state"),value:P.jsx(y.CardBadge,{type:null!=s&&s.sidebarCollapsed?"warning":"success",children:null!=s&&s.sidebarCollapsed?F.tparam(l,"collapsed"):F.tparam(l,"expanded")})}),P.jsx(y.CardInfoItem,{label:F.tparam(l,"history_path"),value:P.jsx(y.CardEllipsisText,{children:(null==s||null===(t=s.historyLocation)||void 0===t?void 0:t.pathname)||F.tparam(l,"no_data")}),isLast:!0})]})}),P.jsx(y.Card,{title:F.tparam(l,"user_info"),icon:"icon-user1",content:P.jsxs(P.Fragment,{children:[P.jsx(y.CardInfoItem,{label:F.tparam(l,"username"),value:P.jsx(y.CardTextValue,{children:(null==u||null===(r=u.info)||void 0===r?void 0:r.username)||F.tparam(l,"no_data")})}),P.jsx(y.CardInfoItem,{label:F.tparam(l,"user_id"),value:P.jsx(y.CardTextValue,{children:(null==u||null===(n=u.info)||void 0===n?void 0:n.id)||F.tparam(l,"no_data")})}),P.jsx(y.CardInfoItem,{label:F.tparam(l,"version"),value:P.jsx(y.CardTextValue,{children:(null==u?void 0:u.version)||F.tparam(l,"no_data")})}),P.jsx(y.CardInfoItem,{label:F.tparam(l,"avatar"),value:null!=u&&null!==(o=u.info)&&void 0!==o&&o.avatar?P.jsx("img",{src:u.info.avatar,alt:"",style:{width:"32px",height:"32px",borderRadius:"50%"}}):P.jsx("span",{style:{color:"#9ca3af"},children:F.tparam(l,"no_data")}),isLast:!0})]})}),P.jsx(y.Card,{title:F.tparam(l,"layout_state"),icon:"icon-tabs",content:P.jsxs(P.Fragment,{children:[P.jsx(y.CardInfoItem,{label:F.tparam(l,"tab_count"),value:P.jsxs(y.CardBadge,{children:[(null==d||null===(i=d.tabs)||void 0===i?void 0:i.length)||0,F.tparam(l,"tab_count_unit")]})}),P.jsx(y.CardInfoItem,{label:F.tparam(l,"tab_id"),value:P.jsx(y.CardTextValue,{children:(null==d?void 0:d.choiceId)||F.tparam(l,"no_data")})}),P.jsx(y.CardInfoItem,{label:F.tparam(l,"menu_path"),value:P.jsx(y.CardEllipsisText,{children:(null==d||null===(a=d.choices)||void 0===a?void 0:a.join(F.tparam(l,"path_join")))||F.tparam(l,"no_data")}),isLast:!0})]})})]})}),we=v.createContext({pageConfig:{},fetchConfig:{}}),Ee=function(e){var t=e.ctx,n=e.type,o=e.record,i=e.pageConfig,a=e.fetchConfig,l=e.close,c=e.refs,s=r(E.useFormMData(o).toArray(),2),d=s[0],u=s[1],f=v.useRef(null),p=v.useMemo(function(){var e;return new j.SelectionTree(null==t||null===(e=t.getMethod("getOriginalData"))||void 0===e?void 0:e()).tree(0,function(e){return{id:e.id,text:e.title,children:[]}},{id:0,text:F.tparam(i,"none_parent","None Parent"),children:[]})},[t.config.data]);v.useEffect(function(){t.setMethod("setRouterNameValue",function(e){var t=e.row;e.column;u({router_name:t.name,url:t.url}),b.invoke(c,"routerlistdlg.close")}),t.setMethod("setIconValue",function(e){var t=e.icon;u({icon:t.className}),b.invoke(c,"iconlistdlg.close")})},[]);var m=function(){f.current.validate(function(e){if(null==e){var r={object:{id:parseInt(d.id),title:d.title,router_name:d.router_name,icon:d.icon,active:parseInt(d.active),position:parseInt(d.position),type:parseInt(d.type),sort:parseInt(d.sort),pid:parseInt(d.pid),url:d.url},conditions:[]};n===C.FormDataType.UPDATE&&r.conditions.push({key:"id",value:o.id}),V.saveResult(null==t?void 0:t.name(),n,r,function(){y.$toast.success(F.tt("save_success","Message")),t.refresh(),l()}).then(function(e){})}else y.$toast.error(K(e))})};v.useEffect(function(){t.setMethod("submitForm",m)},[t,m]);return P.jsxs(D.Form,{ref:f,model:d,labelWidth:120,labelAlign:"left",errorType:"tooltip",rules:{title:{required:!0}},style:{minWidth:500,padding:"20px"},children:[P.jsx(D.FormField,{name:"title",label:F.tfield(i,"title.label","Title")+":",children:P.jsx(D.TextBox,{placeholder:F.tfield(i,"title.placeholder",""),value:d.title})}),P.jsx(D.FormField,{name:"router_name",label:F.tfield(i,"router_name.label","Router Name")+":",children:P.jsx(D.TextBox,{placeholder:F.tfield(i,"router_name.placeholder",""),value:d.router_name,addonRight:function(){var e={title:F.tparam(i,"router_title","Router List")};return P.jsx("span",{style:{paddingLeft:"8px"},children:P.jsx("span",{className:"textbox-icon iconfont icon-list2 color-dark-blue",onClick:function(){return b.invoke(c,"routerlistdlg.open",e)}})})}})}),P.jsx(D.FormField,{name:"icon",label:F.tfield(i,"icon.label","Icon")+":",children:P.jsx(D.TextBox,{placeholder:F.tfield(i,"icon.placeholder",""),value:d.icon,addonRight:function(){var e={title:F.tparam(i,"icon_title","Icon List")};return P.jsx("span",{style:{paddingLeft:"8px"},children:P.jsx("span",{className:"textbox-icon iconfont icon-list4 color-dark-blue",onClick:function(){return b.invoke(c,"iconlistdlg.open",e)}})})}})}),P.jsx(D.FormField,{name:"active",label:F.tfield(i,"active.label","Status")+":",children:P.jsx(y.RadioGroupBox,{options:X(a,"switch-state"),name:"switch-state",value:d.active,onChange:function(e,t){u({active:e})}})}),P.jsx(D.FormField,{name:"type",label:F.tfield(i,"type.label","Type")+":",children:P.jsx(y.RadioGroupBox,{options:X(a,"setting-type"),name:"setting-type",value:d.type,onChange:function(e,t){u({type:e})}})}),P.jsx(D.FormField,{name:"position",label:F.tfield(i,"position.label","Position")+":",children:P.jsx(y.RadioGroupBox,{options:X(a,"setting-position"),name:"setting-position",value:d.position,onChange:function(e,t){u({position:e})}})}),P.jsx(D.FormField,{name:"sort",label:F.tfield(i,"sort.label","Sort")+":",children:P.jsx(D.NumberBox,{placeholder:F.tfield(i,"sort.placeholder",""),value:d.sort})}),P.jsx(D.FormField,{name:"pid",label:F.tfield(i,"pid.label","Pid")+":",children:P.jsx(D.ComboTree,{placeholder:F.tfield(i,"pid.placeholder",""),editable:!0,data:p,value:d.pid,onChange:function(e){return u({pid:e})}})})]})},De=v.createContext({pageConfig:{},fetchConfig:{}}),Ae=function(e){var t=e.ctx,n=e.type,o=e.record,i=e.pageConfig,a=e.fetchConfig,l=e.close,c=(e.refs,r(E.useFormMData(o).toArray(),2)),s=c[0],d=c[1],u=v.useRef(null),f=function(){u.current.validate(function(e){if(null==e){var r={object:{name:s.name,url:s.url,type:s.type,data:s.data},conditions:[]};n===C.FormDataType.UPDATE&&(r.conditions.push({key:"name",value:o.name}),r.conditions.push({key:"type",value:o.type})),V.saveResult(null==t?void 0:t.name(),n,r,function(){y.$toast.success(F.tt("save_success","Message")),t.refresh(),l()}).then(function(e){})}else y.$toast.error(K(e))})};return v.useEffect(function(){null==t||t.setMethod("onSubmit",f)},[t,f]),P.jsxs(D.Form,{ref:u,model:s,labelWidth:120,labelAlign:"left",errorType:"tooltip",rules:{name:{required:!0},url:{required:!0},type:{required:!0}},style:{minWidth:500,padding:"20px"},children:[P.jsx(D.FormField,{name:"name",label:F.tfield(i,"name.label","Name")+":",children:P.jsx(D.TextBox,{placeholder:F.tfield(i,"name.placeholder",""),value:s.name})}),P.jsx(D.FormField,{name:"url",label:F.tfield(i,"url.label","Url")+":",children:P.jsx(D.TextBox,{placeholder:F.tfield(i,"url.placeholder",""),value:s.url})}),P.jsx(D.FormField,{name:"type",label:F.tfield(i,"type.label","Type")+":",children:P.jsx(y.RadioGroupBox,{name:"router-type",value:s.type,options:X(a,"router-type"),onChange:function(e,t){d({type:e})}})}),P.jsx(D.FormField,{name:"data",label:F.tfield(i,"data.label","Data")+":",children:P.jsx(D.TextBox,{multiline:!0,style:{height:120,padding:"5px 2px"},placeholder:F.tfield(i,"data.placeholder",""),value:s.data})})]})},Se=function(e){var t=e.value,r=e.props,n=e.close,o=v.useContext(De),i=o.ctx,a=o.pageConfig,l=o.fetchConfig,c=o.refs;return P.jsx(D.Dialog,{title:r.title,bodyCls:"f-column",modal:!0,closed:!0,ref:t.ref,footer:function(){return P.jsxs("div",{className:"admin-form-submit",children:[P.jsx(D.LinkButton,{style:{width:80},onClick:function(){var e;return null==i||null===(e=i.getMethod("onSubmit"))||void 0===e?void 0:e()},iconCls:"icon-save",children:F.tparam(a,"submit.text","Submit")}),P.jsx(D.LinkButton,{style:{width:80},onClick:n,iconCls:"icon-cancel",children:F.tparam(a,"close.text","Close")})]})},style:{width:"calc(100vw - 50%)",maxHeight:"calc(100vh - 100px)"},children:P.jsx(Ae,p(p({className:"f-full",ctx:i,pageConfig:a,fetchConfig:l},r),{},{close:n,refs:c}))})},Te=function(e){var t=e.ctx,n=e.pageConfig,o=e.fetchConfig,i={name:"",type:""},a=r(v.useState(i),2),l=a[0],c=a[1];return P.jsxs(D.Form,{className:"admin-search-panel",model:l,labelWidth:"auto",labelPosition:"before",children:[P.jsx(D.FormField,{name:"name",label:F.tfield(n,"name.label","Name"),children:P.jsx(D.TextBox,{value:l.name})}),P.jsx(D.FormField,{name:"type",label:F.tfield(n,"type.label","Type"),children:P.jsx(D.ComboBox,{data:X(o,"router-type"),value:l.type})}),P.jsxs(D.FormField,{children:[P.jsx(D.LinkButton,{iconCls:"iconfont icon-search color-deep-sky-blue",onClick:function(){var e={conditions:[{key:"name",value:l.name,type:"LIKE"},{key:"type",value:l.type,type:"EQ",filter_empty:!0}]};null==t||t.search(e)},style:{marginRight:"5px"},children:F.tparam(n,"search.text","Search")}),P.jsx(D.LinkButton,{iconCls:"iconfont icon-refresh2 color-deep-sky-blue",onClick:function(){c(p({},i)),null==t||t.reset()},children:F.tparam(n,"reset.text","Reset")})]})]})},Re=function(e){var t=e.selectedRow,n=e.scene,o=v.useContext(De),i=o.pageConfig,a=o.fetchConfig,l=o.ctx,c=o.ctxState,s=o.refs,d=r(v.useState(0),2),u=d[0],f=d[1],p=function(){return P.jsxs(v.Fragment,{children:[P.jsx("div",{children:P.jsx(Te,{ctx:l,pageConfig:i,fetchConfig:a})}),P.jsxs(y.Toolbar,{children:[P.jsx(D.LinkButton,{plain:!0,className:"k-color-success",iconCls:"iconfont icon-refresh color-green",onClick:function(){return null==l?void 0:l.refresh()},children:F.tparam(i,"refresh.text","Refresh")}),P.jsx(y.Access,{ctx:l,point:"add",children:P.jsx(D.LinkButton,{plain:!0,className:"k-color-success",iconCls:"iconfont icon-add color-dark-green",onClick:function(){return b.invoke(s,"formDataRefDlg.open",{type:C.FormDataType.CREATE,ctx:l,record:{name:""},title:F.tparam(i,"add.text","Create Router")})},children:F.tparam(i,"add.text","Add")})})]})]})},m=function(e){e.value;var t=e.row;e.rowIndex;return P.jsxs(P.Fragment,{children:[P.jsx(y.Access,{ctx:l,point:"update",children:P.jsx(D.LinkButton,{plain:!0,onClick:function(){return b.invoke(s,"formDataRefDlg.open",{ctx:l,record:t,type:C.FormDataType.UPDATE,title:"".concat(F.tparam(i,"update.text","Update: {#name}")).replace("{#name}",t.name)})},iconCls:"iconfont icon-edit color-dark-green"})}),P.jsx(y.Access,{ctx:l,point:"delete",children:P.jsx(D.LinkButton,{onClick:function(){return null==l?void 0:l.publish("remove",{conditions:[{key:"name",value:t.name},{key:"type",value:t.type}]})},plain:!0,iconCls:"iconfont icon-del color-red"})})]})};return v.useEffect(function(){f(u+1)},[a]),"setting"===n?P.jsxs(D.DataGrid,{toolbar:p,data:(null==c?void 0:c.data)||[],loading:null==c?void 0:c.loading,style:null==c?void 0:c.style,onCellDblClick:t,children:[P.jsx(D.GridColumn,{field:"name",title:F.tfield(i,"name.label","Name"),render:y.renderTooltip}),P.jsx(D.GridColumn,{field:"url",title:F.tfield(i,"type.label","URL"),align:"center",render:y.renderTooltip}),P.jsx(D.GridColumn,{field:"type",title:F.tfield(i,"type.label","Type"),align:"center",width:"120px",render:function(e){var t=e.value;return O(a,"router-type",t)}}),P.jsx(D.GridColumnGroup,{frozen:!0,align:"right",width:"120px",children:P.jsx(D.GridHeaderRow,{children:P.jsx(D.GridColumn,{align:"center",render:m,width:"120px"})})})]},u):P.jsxs(D.DataGrid,{toolbar:p,data:(null==c?void 0:c.data)||[],loading:null==c?void 0:c.loading,style:null==c?void 0:c.style,children:[P.jsx(D.GridColumn,{field:"name",title:F.tfield(i,"name.label","Name"),render:y.renderTooltip}),P.jsx(D.GridColumn,{field:"url",title:F.tfield(i,"url.label","URL"),align:"left",render:y.renderTooltip}),P.jsx(D.GridColumn,{field:"type",title:F.tfield(i,"type.label","Type"),align:"center",width:"120px",render:function(e){var t=e.value;return O(a,"router-type",t)}}),P.jsx(D.GridColumn,{field:"data",title:F.tfield(i,"data.label","Data")}),P.jsx(D.GridColumn,{field:"create_time",title:F.tfield(i,"create_time.label","CreateTime"),width:"180px"}),P.jsx(D.GridColumn,{field:"update_time",title:F.tfield(i,"update_time.label","UpdateTime"),width:"180px"}),P.jsx(D.GridColumnGroup,{frozen:!0,align:"right",width:"120px",children:P.jsx(D.GridHeaderRow,{children:P.jsx(D.GridColumn,{align:"center",render:m,width:"120px"})})})]},u)},Be="router",_e=[{type:C.CheckAccessEleType.AND,value:["/resource/router/add"],key:"add"},{type:C.CheckAccessEleType.AND,value:["/resource/router/update"],key:"update"},{type:C.CheckAccessEleType.AND,value:["/resource/router/delete"],key:"delete"},{type:C.CheckAccessEleType.AND,value:["/resource/router/edit"],key:"edit"}],Ne=ue({name:"Router",fetchConfig:function(){return V.configs(Be)}})(function(t){var r=t.pageConfig,n=t.fetchConfig,o=t.selectedRow,i=t.scene;_e=[].concat(e(_e),e((null==n?void 0:n.checkAccessItems)||[]));var a=se({name:Be,fetch:function(e){return V.list(Be,e)},checkAccessItems:_e,defaultPageSize:20});v.useEffect(function(){a.ctx.search()},[a.version]),a.ctx.registerEvent("remove",q(a.ctx));var l=y.useRefDialog();return P.jsx(De.Provider,{value:{ctx:a.ctx,ctxState:a.ctxState,pageConfig:r,fetchConfig:n,refs:{formDataRefDlg:l}},children:P.jsxs(y.DefaultPanel,{mode:"cover",footer:function(){return P.jsx(de,{ctx:a.ctx,ctxState:a.ctxState})},children:[P.jsx(Se,p({},l)),P.jsx(Re,{selectedRow:o,scene:i})]})})}),Le=v.createContext({pageConfig:{},fetchConfig:{}}),Pe=function(e){var t=e.ctx,n=e.pageConfig,o=(e.fetchConfig,{name:""}),i=r(v.useState(o),2),a=i[0],l=i[1];return P.jsxs(D.Form,{className:"admin-search-panel",model:a,labelWidth:"auto",labelPosition:"before",children:[P.jsx(D.FormField,{name:"name",label:F.tfield(n,"name.label","Name"),children:P.jsx(D.TextBox,{value:a.name})}),P.jsxs(D.FormField,{children:[P.jsx(D.LinkButton,{iconCls:"iconfont icon-search color-deep-sky-blue",onClick:function(){var e={conditions:[{key:"name",value:a.name,type:"LIKE"}]};null==t||t.search(e)},style:{marginRight:"5px"},children:F.tparam(n,"search.text","Search")}),P.jsx(D.LinkButton,{iconCls:"iconfont icon-refresh2 color-deep-sky-blue",onClick:function(){l(p({},o)),null==t||t.reset()},children:F.tparam(n,"reset.text","Reset")})]})]})},Ie=function(e){var t=e.icon,r=e.onClick;return P.jsxs("div",{className:"icon-card",style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"12px 8px",border:"1px solid #e8e8e8",borderRadius:"4px",cursor:"pointer",transition:"all 0.2s",minHeight:"80px"},onClick:function(){return r(t)},onMouseEnter:function(e){e.currentTarget.style.borderColor="#1890ff",e.currentTarget.style.boxShadow="0 2px 8px rgba(24,144,255,0.2)"},onMouseLeave:function(e){e.currentTarget.style.borderColor="#e8e8e8",e.currentTarget.style.boxShadow="none"},children:[P.jsx("i",{className:"iconfont ".concat(t.className),style:{fontSize:"24px",color:"#333",marginBottom:"6px"}}),P.jsx("span",{style:{fontSize:"11px",color:"#666",wordBreak:"break-all",textAlign:"center"},children:t.name})]})},Me=function(e){var t=e.selectedRow,n=e.scene,o=v.useContext(Le),i=o.pageConfig,a=o.fetchConfig,l=o.ctx,c=o.ctxState,s=(o.refs,r(v.useState(0),2)),d=s[0],u=s[1],f=function(e){"setting"===n&&t&&t(e)};v.useEffect(function(){u(d+1)},[a]);var p=(null==c?void 0:c.data)||[];return P.jsxs("div",{style:{padding:"0",height:"100%",display:"flex",flexDirection:"column"},children:[P.jsx(v.Fragment,{children:P.jsx("div",{style:{display:"flex",gap:"8px",alignItems:"center",marginBottom:"12px"},children:P.jsx(Pe,{ctx:l,pageConfig:i,fetchConfig:a})})}),P.jsx("div",{style:{flex:1,overflow:"auto",padding:"8px"},children:P.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(90px, 1fr))",gap:"8px"},children:p.map(function(e){return P.jsx(Ie,{icon:e,onClick:f},e.name)})})})]},d)},Oe=[],Ge=ue({name:"Icon"})(function(t){var r=t.pageConfig,n=t.fetchConfig,o=t.selectedRow,i=t.scene,a=ce({name:"icon",fetch:function(e){var t,r=ee(),n=r,o=null===(t=e.conditions)||void 0===t||null===(t=t.find(function(e){return"name"===e.key&&"LIKE"===e.type}))||void 0===t?void 0:t.value;return o&&(n=r.filter(function(e){return e.name.toLowerCase().includes(o.toLowerCase())})),Promise.resolve({data:n,total:n.length})},checkAccessItems:Oe=[].concat(e(Oe),e((null==n?void 0:n.checkAccessItems)||[])),defaultPageSize:100});return v.useEffect(function(){a.ctx.search()},[]),P.jsx(Le.Provider,{value:{ctx:a.ctx,ctxState:a.ctxState,pageConfig:r,fetchConfig:n,refs:{}},children:P.jsx(y.DefaultPanel,{mode:"cover",children:P.jsx(Me,{selectedRow:o,scene:i})})})}),Ue=function(e){var t=e.value,r=e.props,n=e.close,o=v.useContext(we),i=o.ctx,a=o.pageConfig,l=o.fetchConfig,c=o.refs;return P.jsx(D.Dialog,{title:r.title,bodyCls:"f-column",modal:!0,closed:!0,ref:t.ref,style:{maxHeight:"calc(100vh - 100px)"},footer:function(){return P.jsxs("div",{className:"admin-form-submit",children:[P.jsx(D.LinkButton,{style:{width:80},onClick:function(){var e;return null==i||null===(e=i.getMethod("submitForm"))||void 0===e?void 0:e()},iconCls:"icon-save",children:F.tparam(a,"submit.text","Submit")}),P.jsx(D.LinkButton,{style:{width:80},onClick:n,iconCls:"icon-cancel",children:F.tparam(a,"close.text","Close")})]})},children:P.jsx(Ee,p(p({className:"f-full",ctx:i,pageConfig:a,fetchConfig:l},r),{},{close:n,refs:c}))})},$e=function(e){var t=e.value,r=e.props,n=v.useContext(we).ctx;return P.jsx(D.Dialog,{title:r.title,bodyCls:"f-column",modal:!0,closed:!0,ref:t.ref,style:{width:"calc(100vw - 40%)",height:"calc(100vh - 100px)"},children:P.jsx(Ne,{selectedRow:function(e){var t,r=e.row,o=e.column;return null==n||null===(t=n.getMethod("setRouterNameValue"))||void 0===t?void 0:t({row:r,column:o})},scene:"setting"})})},ze=function(e){var t=e.value,r=e.props,n=e.close,o=v.useContext(we),i=o.ctx,a=o.pageConfig;return P.jsx(y.DrawerPanel,{title:r.title||F.tparam(a,"icon_title","图标列表"),ref:t.ref,onClose:n,width:"40%",children:P.jsx(Ge,{selectedRow:function(e){var t;return null==i||null===(t=i.getMethod("setIconValue"))||void 0===t?void 0:t({icon:e})},scene:"setting"})})},Ve=function(e){var t=e.ctx,n=e.pageConfig,o=e.fetchConfig,i={position:void 0,active:void 0,title:"",type:void 0},a=r(v.useState(i),2),l=a[0],c=a[1];return P.jsxs(D.Form,{className:"admin-search-panel",model:l,labelWidth:"auto",labelPosition:"before",children:[P.jsx(D.FormField,{name:"title",label:F.tfield(n,"title.label","Title"),children:P.jsx(D.TextBox,{value:l.title})}),P.jsx(D.FormField,{name:"active",label:F.tfield(n,"active.label","Active"),children:P.jsx(D.ComboBox,{data:X(o,"switch-state"),value:l.active})}),P.jsx(D.FormField,{name:"type",label:F.tfield(n,"type.label","Type"),children:P.jsx(D.ComboBox,{data:X(o,"setting-type"),value:l.type})}),P.jsx(D.FormField,{name:"position",label:F.tfield(n,"position.label","Position"),children:P.jsx(D.ComboBox,{data:X(o,"setting-position"),value:l.position})}),P.jsxs(D.FormField,{children:[P.jsx(D.LinkButton,{iconCls:"iconfont icon-search color-deep-sky-blue",onClick:function(){var e={conditions:[{key:"position",value:l.position,type:"="},{key:"type",value:l.type,type:"="},{key:"active",value:l.active,type:"="},{key:"title",value:l.title,type:"LIKE"}]};null==t||t.search(e)},style:{marginRight:"5px"},children:F.tparam(n,"search.text","Search")}),P.jsx(D.LinkButton,{iconCls:"iconfont icon-refresh2 color-deep-sky-blue",onClick:function(){c(p({},i)),null==t||t.reset()},children:F.tparam(n,"reset.text","Reset")})]})]})},We=function(e){var t=e.pageVersion,r=v.useContext(we),n=r.pageConfig,o=r.fetchConfig,i=r.ctx,a=r.ctxState,l=r.refs;return P.jsxs(D.TreeGrid,{toolbar:function(){return function(e,t,r,n){return P.jsxs(v.Fragment,{children:[P.jsx("div",{children:P.jsx(Ve,{ctx:r,pageConfig:e,fetchConfig:t})}),P.jsxs(y.Toolbar,{children:[P.jsx(D.LinkButton,{plain:!0,className:"k-color-success",iconCls:"iconfont icon-refresh color-green",onClick:function(){return null==r?void 0:r.refresh()},children:F.tparam(e,"refresh.text","Refresh")}),P.jsx(y.Access,{ctx:r,point:"add",children:P.jsx(D.LinkButton,{plain:!0,className:"k-color-success",iconCls:"iconfont icon-add color-dark-green",onClick:function(){return b.invoke(n,"formdlg.open",{type:C.FormDataType.CREATE,ctx:r,record:{active:"0",type:"0",router_name:"",sort:0},title:F.tparam(e,"add.text","Create Setting")})},children:F.tparam(e,"add.text","Add")})})]})]})}(n,o,i,l)},data:null==a?void 0:a.data,loading:null==a?void 0:a.loading,style:null==a?void 0:a.style,idField:"id",treeField:"title",children:[P.jsx(D.GridColumn,{field:"title",title:F.tfield(n,"title.label","Title"),width:"220px"}),P.jsx(D.GridColumn,{field:"icon",title:F.tfield(n,"icon.label","Icon"),align:"center",width:"50px",render:function(e){var t=e.value;return P.jsx("span",{className:"iconfont "+t})}}),P.jsx(D.GridColumn,{field:"active",title:F.tfield(n,"active.label","Active"),align:"center",width:"80px",render:function(e){var t=e.value;return O(o,"switch-state",t)}}),P.jsx(D.GridColumn,{field:"position",title:F.tfield(n,"position.label","Position"),align:"center",width:"80px",render:function(e){var t=e.value;return O(o,"setting-position",t)}}),P.jsx(D.GridColumn,{field:"type",title:F.tfield(n,"type.label","Type"),align:"center",width:"120px",render:function(e){var t=e.value;return O(o,"setting-type",t)}}),P.jsx(D.GridColumn,{field:"router_name",title:F.tfield(n,"router_name.label","RouterName"),align:"left",render:y.renderTooltip,width:"180px"}),P.jsx(D.GridColumn,{field:"url",title:F.tfield(n,"url.label","URL"),align:"left",width:"300px"}),P.jsx(D.GridColumn,{field:"sort",title:F.tfield(n,"sort.label","Sort"),align:"left",width:"80px"}),P.jsx(D.GridColumn,{field:"create_time",title:F.tfield(n,"create_time.label","CreateTime"),width:"180px"}),P.jsx(D.GridColumn,{field:"update_time",title:F.tfield(n,"update_time.label","UpdateTime"),width:"180px"}),P.jsx(D.GridColumnGroup,{frozen:!0,align:"right",width:"80px",children:P.jsx(D.GridHeaderRow,{children:P.jsx(D.GridColumn,{align:"center",render:function(e){e.value;var t=e.row;e.rowIndex;return P.jsxs(P.Fragment,{children:[P.jsx(y.Access,{ctx:i,point:"update",children:P.jsx(D.LinkButton,{plain:!0,onClick:function(){return b.invoke(l,"formdlg.open",{ctx:i,record:t,type:C.FormDataType.UPDATE,title:"".concat(F.tparam(n,"update.text","Update: {#name}")).replace("{#name}",t.title)})},iconCls:"iconfont icon-edit color-dark-green"})}),P.jsx(y.Access,{ctx:i,point:"delete",children:P.jsx(D.LinkButton,{onClick:function(){return null==i?void 0:i.publish("remove",{conditions:[{key:"id",value:t.id}]})},plain:!0,iconCls:"iconfont icon-del color-red"})})]})},width:"80px"})})})]},"tree-table-"+t)},He="setting",qe=[{type:C.CheckAccessEleType.AND,value:["/resource/setting/add"],key:"add"},{type:C.CheckAccessEleType.AND,value:["/resource/setting/update"],key:"update"},{type:C.CheckAccessEleType.AND,value:["/resource/setting/delete"],key:"delete"},{type:C.CheckAccessEleType.AND,value:["/resource/setting/edit"],key:"edit"}],Ke=ue({name:"Setting",fetchConfig:function(){return V.configs(He)}})(function(t){var r=t.pageConfig,n=t.fetchConfig,o=t.fetchVersion;qe=[].concat(e(qe),e((null==n?void 0:n.checkAccessItems)||[]));var i=ce({name:He,fetch:function(e){return V.list(He,e)},checkAccessItems:qe,defaultPageSize:10,isTreeData:!0});i.ctx.registerEvent("remove",q(i.ctx));var a=y.useRefDialog(),l=y.useRefDialog(),c=y.useRefDialog();return v.useEffect(function(){i.ctx.search()},[]),P.jsx(we.Provider,{value:{ctx:i.ctx,ctxState:i.ctxState,pageConfig:r,fetchConfig:n,refs:{formdlg:a,routerlistdlg:l,iconlistdlg:c}},children:P.jsxs(y.DefaultPanel,{mode:"cover",footer:function(){return P.jsx(de,{ctx:i.ctx,ctxState:i.ctxState})},children:[P.jsx(Ue,p({},a)),P.jsx($e,p({},l)),P.jsx(ze,p({},c)),P.jsx(We,{pageVersion:o})]})})}),Ye=function(){return{username:"",password:"",remember:!1,captcha:"",token:"",code:""}},Qe=function(e){var t=e.pageConfig,n=e.openRememberMe,o=void 0===n||n,i=e.loginAction,a=void 0===i?"/api/login":i,l=e.rememberAction,c=e.header,s=r(v.useState(Ye),2),d=s[0],u=s[1],f=r(v.useState(!1),2),h=f[0],x=f[1],g=r(v.useState(!1),2),C=g[0],j=g[1],w=k.useAppDispatch(),E=le(),D=v.useRef(null),A=v.useMemo(function(){return"login-remember-transport-".concat(Math.random().toString(36).slice(2))},[]),S=l||b.get(t,"params.remember.action",a),T=function(){oe.captcha().then(function(e){var t=e.data;u(function(e){return p(p({},e),{},{captcha:t.base64,token:t.token,code:""})})})},R=function(e){var t=e.target,r=t.name,n=t.value,o=t.type,i=t.checked,a="checkbox"===o?i:n;u(function(e){return p(p({},e),{},m({},r,a))})};v.useEffect(function(){E.autoRedirect(),T()},[]);return P.jsxs(P.Fragment,{children:[P.jsxs("div",{className:"login-form-wrapper",children:["function"==typeof c?c():c,P.jsxs("form",{ref:D,method:"POST",action:S,autoComplete:"on",target:A,onSubmit:function(e){var r=o&&d.remember;h||(d.username.trim()?d.password?!d.code.trim()&&(y.$toast.error(F.tfield(t,"code.placeholder","请输入验证码")),1):(y.$toast.error(F.tfield(t,"password.placeholder","请输入密码")),1):(y.$toast.error(F.tfield(t,"username.placeholder","请输入用户名")),1))?e.preventDefault():(r||e.preventDefault(),function(e){x(!0);var r={username:d.username.trim(),password:d.password,code:d.code.trim(),token:d.token};oe.login(r,function(r){w(k.login({token:r.token,info:r.user,error:function(){y.$toast.error(b.get(t.params,"tips.loginError"))}})),window.setTimeout(function(){E.autoRedirect()},e?300:0)},function(){x(!1),T()})}(r))},children:[P.jsx("input",{type:"hidden",name:"token",value:d.token}),P.jsx("div",{className:"form-group",children:P.jsxs("div",{className:"input-wrapper",children:[P.jsx("i",{className:"iconfont ".concat(b.get(t,"fields.username.icon","icon-username")," input-icon")}),P.jsx("input",{type:"text",name:"username",id:"login-username",value:d.username,onChange:R,placeholder:F.tfield(t,"username.placeholder","请输入用户名"),autoComplete:"username",className:"login-input"})]})}),P.jsx("div",{className:"form-group-password",children:P.jsxs("div",{className:"input-wrapper",children:[P.jsx("i",{className:"iconfont ".concat(b.get(t,"fields.password.icon","icon-password")," input-icon")}),P.jsx("input",{type:C?"text":"password",name:"password",id:"login-password",value:d.password,onChange:R,placeholder:F.tfield(t,"password.placeholder","请输入密码"),autoComplete:"current-password",className:"login-input login-input-password"}),P.jsx("span",{onClick:function(){j(function(e){return!e})},className:"password-toggle",children:P.jsx("i",{className:"iconfont ".concat(C?"icon-eye-open":"icon-eye-close")})})]})}),P.jsx("div",{className:"form-group",children:P.jsxs("div",{className:"input-wrapper captcha-wrapper",children:[P.jsx("i",{className:"iconfont ".concat(b.get(t,"fields.code.icon","icon-captcha")," input-icon")}),P.jsx("input",{type:"text",name:"code",id:"login-code",value:d.code,onChange:R,placeholder:F.tfield(t,"code.placeholder","验证码"),autoComplete:"off",className:"login-input login-input-captcha"}),d.captcha&&P.jsx("div",{className:"captcha-image",onClick:T,children:P.jsx("img",{src:d.captcha,alt:F.tfield(t,"code.label","验证码")})})]})}),o&&P.jsx("div",{className:"remember-wrapper",children:P.jsxs("label",{className:"remember-label",children:[P.jsx("div",{className:"remember-checkbox ".concat(d.remember?"checked":""),children:d.remember&&P.jsx("i",{className:"iconfont icon-ok2"})}),P.jsx("input",{type:"checkbox",name:"remember",checked:d.remember,onChange:R,style:{display:"none"}}),P.jsx("span",{className:"remember-text",children:F.tparam(t,"remember.text","记住密码")})]})}),P.jsx("div",{className:"submit-wrapper",children:P.jsxs("button",{type:"submit",disabled:h,className:"login-btn",children:[h?F.tparam(t,"submitting.text","登录中..."):F.tparam(t,"submit.text","立即登录"),!h&&P.jsx("i",{className:"iconfont icon-arrow-right"})]})})]})]}),P.jsx("iframe",{name:A,title:"remember-transport",className:"remember-transport-iframe"})]})},Je=ue({name:"Login",fetchConfig:oe.configs})(function(e){var t=e.pageConfig,r=e.fetchConfig,n=e.rules,o=e.openRememberMe,i=e.header,a=e.bgImage;return P.jsx(P.Fragment,{children:P.jsxs("div",{className:"layui-carousel video_mask bg-img",id:"login_carousel",style:a?{background:"url("+a+") center center no-repeat",backgroundSize:"cover"}:r.bg?{background:"url("+r.bg+") center center no-repeat",backgroundSize:"cover"}:{},children:[P.jsx("div",{className:"login-container",children:P.jsx("div",{className:"login",children:P.jsx(Qe,{pageConfig:t,fetchConfig:r,rules:n,openRememberMe:o,header:i})})}),P.jsx("div",{className:"copyright",children:F.tt("copyright_text","App")})]})})}),Xe=v.createContext({pageConfig:{},fetchConfig:{}});function Ze(e,t){return e.map(function(e){if(!e.children||0===e.children.length)return t.has(e.id)?e:null;var r=Ze(e.children,t);return r.length>0?p(p({},e),{},{children:r}):null}).filter(Boolean)}var et=function(t){var n=t.ctx,o=(t.type,t.record),a=t.pageConfig,l=(t.fetchConfig,t.close),s=r(v.useState(),2),d=s[0],u=s[1],f=r(v.useState([]),2),p=f[0],m=f[1],h=v.useRef(null),x=r(v.useState(!1),2),g=x[0],b=x[1],C=r(v.useState([]),2),j=C[0],k=C[1],w=r(v.useState([]),2),E=w[0],A=w[1],S=v.useRef(null);v.useEffect(function(){T()},[]);var T=function(){var e=c(i().m(function e(){var t,r,n,a,l,c,s,d,f,m;return i().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,te.roles();case 1:return t=e.v,r=J(t.data||[]),n=[],e.n=2,te.permissions();case 2:return a=e.v,l=Y(a.data||[]),c=[],e.n=3,te.getChildren({name:o.name});case 3:s=e.v,d=s.code,f=s.data,200===d&&(m=new Set,f&&f.forEach(function(e){m.add(e.name),1==e.item_type?E.push(e.name):p.push(e.name)}),Q(l,m,c),u(l),c.forEach(function(e){h.current.checkNode(e)}),Q(r,m,n),k(r),n.forEach(function(e){S.current.checkNode(e)}));case 4:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),R=function(){te.addPermissionChildren({name:o.name,children:[].concat(e(p),e(E))}).then(function(e){200===e.code&&(y.$toast.success(F.tparam(a,"assign_success","assign permission successfully!")),l())})};v.useEffect(function(){null==n||n.setMethod("onSubmit",R)},[n,R]);var B=v.useMemo(function(){return g&&d?Ze(d,new Set(p)):d},[d,p,g]);return P.jsxs("div",{style:{display:"grid",gridTemplateColumns:"220px 1fr",gridTemplateRows:"auto 1fr auto",width:"100%",height:"100%",overflow:"hidden"},children:[P.jsx("div",{style:{gridRow:"1 / -1",borderRight:"1px solid #ddd",padding:10,overflow:"auto"},children:P.jsx(D.Tree,{selectLeafOnly:!0,checkbox:!0,data:j,ref:S,onCheckChange:function(e){if(e&&e.length>0){var t=[];e.forEach(function(e){e.id&&t.push(e.id)}),A(t)}}})}),P.jsxs("div",{style:{display:"flex",gap:4},children:[P.jsx(D.TextBox,{style:{flex:1},placeholder:"Searching...",onChange:function(e){h.current.doFilter(e)}},"assign-permission"),P.jsx(D.LinkButton,{iconCls:"icon-filter",selected:g,onClick:function(){return b(function(e){return!e})},children:g?F.tparam(a,"filter_all.text","全部"):F.tparam(a,"filter_selected.text","已选")})]}),P.jsx("div",{style:{padding:10,overflow:"auto",minHeight:0},children:P.jsx(D.Tree,{selectLeafOnly:!0,checkbox:!0,data:B,ref:h,onCheckChange:function(e){if(e&&e.length>0){var t=[];e.forEach(function(e){e.id&&t.push(e.id)}),m(t)}}})}),P.jsxs("div",{className:"admin-form-submit",children:[P.jsx(D.LinkButton,{style:{width:80},iconCls:"icon-save",onClick:function(){var e;return null==n||null===(e=n.getMethod("onSubmit"))||void 0===e?void 0:e()},children:F.tparam(a,"submit.text","Submit")}),P.jsx(D.LinkButton,{style:{width:80},iconCls:"icon-cancel",onClick:l,children:F.tparam(a,"close.text","Close")})]})]})},tt=function(e){var t=e.value,r=e.props,n=e.close,o=v.useContext(Xe),i=o.ctx,a=o.pageConfig,l=o.fetchConfig;o.refs;return P.jsx(D.Dialog,{title:r.title,bodyCls:"f-column",modal:!0,closed:!0,ref:t.ref,style:{width:"calc(100vw - 30%)",height:"calc(100vh - 100px)"},children:P.jsx(et,p(p({className:"f-full",ctx:i,pageConfig:a,fetchConfig:l},r),{},{close:n}))})},rt=function(e){var t=e.ctx,n=e.type,o=e.record,i=e.pageConfig,a=(e.fetchConfig,e.close),l=r(E.useFormData(o).toArray(),2),c=l[0],s=(l[1],r(E.useFormData(o).toArray(),1)[0]),d=v.useRef(null),u=function(){d.current.validate(function(e){null==e?(n===C.FormDataType.CREATE&&te.addRole(c).then(function(e){var r=e.code;e.data;200==r&&(y.$toast.success(F.tt("add_role_success","Message","add role successfully!")),t.refresh(),a())}),n===C.FormDataType.UPDATE&&te.updateRole({source_name:s.name,target_name:c.name,description:c.description,rule_name:c.ruleName}).then(function(e){var r=e.code;e.data;200==r&&(y.$toast.success(F.tt("update_role_success","Message","update role successfully!")),t.refresh(),a())})):y.$toast.error(K(e))})};return v.useEffect(function(){null==t||t.setMethod("onSubmit",u)},[t,u]),P.jsxs(D.Form,{ref:d,model:c,labelWidth:120,labelAlign:"left",errorType:"tooltip",rules:{name:{required:!0}},style:{minWidth:500,padding:"20px"},children:[P.jsx(D.FormField,{name:"name",label:F.tfield(i,"name.label","Name")+":",children:P.jsx(D.TextBox,{placeholder:F.tfield(i,"name.placeholder",""),value:c.name})}),P.jsx(D.FormField,{name:"description",label:F.tfield(i,"description.label","Description")+":",children:P.jsx(D.TextBox,{multiline:!0,placeholder:F.tfield(i,"description.placeholder",""),value:c.description,style:{height:"80px",padding:"5px 2px"}})})]})},nt=function(e){var t=e.value,r=e.props,n=e.close,o=v.useContext(Xe),i=o.ctx,a=o.pageConfig,l=o.fetchConfig;o.refs;return P.jsx(D.Dialog,{title:r.title,bodyCls:"f-column",modal:!0,closed:!0,ref:t.ref,footer:function(){return P.jsxs("div",{className:"admin-form-submit",children:[P.jsx(D.LinkButton,{style:{width:80},iconCls:"icon-save",onClick:function(){var e;return null==i||null===(e=i.getMethod("onSubmit"))||void 0===e?void 0:e()},children:F.tparam(a,"submit.text","Submit")}),P.jsx(D.LinkButton,{style:{width:80},iconCls:"icon-cancel",onClick:n,children:F.tparam(a,"close.text","Close")})]})},style:{width:"calc(100vw - 50%)",maxHeight:"calc(100vh - 100px)"},children:P.jsx(rt,p(p({className:"f-full",ctx:i,pageConfig:a,fetchConfig:l},r),{},{close:n}))})},ot=function(e){var t=e.ctx,n=e.pageConfig,o=(e.fetchConfig,{name:"",description:""}),i=r(v.useState(o),2),a=i[0],l=i[1];return P.jsxs(D.Form,{className:"admin-search-panel",model:a,labelWidth:"auto",labelPosition:"before",children:[P.jsx(D.FormField,{name:"name",label:F.tfield(n,"name.label","Name"),children:P.jsx(D.TextBox,{value:a.name})}),P.jsx(D.FormField,{name:"description",label:F.tfield(n,"description.label","Description"),children:P.jsx(D.TextBox,{value:a.description})}),P.jsxs(D.FormField,{children:[P.jsx(D.LinkButton,{iconCls:"iconfont icon-search color-deep-sky-blue",onClick:function(){var e={conditions:[{key:"name",value:a.name,type:"LIKE"},{key:"description",value:a.description,type:"LIKE"}]};null==t||t.search(e)},style:{marginRight:"5px"},children:F.tparam(n,"search.text","Search")}),P.jsx(D.LinkButton,{iconCls:"iconfont icon-refresh2 color-deep-sky-blue",onClick:function(){l(p({},o)),null==t||t.reset()},children:F.tparam(n,"reset.text","Reset")})]})]})},it=y.withCheckGrid(D.DataGrid),at=function(){var e=v.useContext(Xe),t=e.pageConfig,r=e.fetchConfig,n=e.ctx,o=e.ctxState,i=e.refs,a=e.version;return P.jsxs(it,{toolbar:function(){return P.jsxs(v.Fragment,{children:[P.jsx("div",{children:P.jsx(ot,{ctx:n,pageConfig:t,fetchConfig:r})}),P.jsxs(y.Toolbar,{children:[P.jsx(D.LinkButton,{plain:!0,className:"k-color-success",iconCls:"iconfont icon-refresh color-green",onClick:function(){return null==n?void 0:n.refresh()},children:F.tparam(t,"refresh.text","Refresh")}),P.jsx(y.Access,{ctx:n,point:"add",children:P.jsx(D.LinkButton,{plain:!0,className:"k-color-success",iconCls:"iconfont icon-add color-dark-green",onClick:function(){b.invoke(i,"formdlg.open",{type:C.FormDataType.CREATE,ctx:n,record:{name:"",description:"",execute_name:""},title:F.tparam(t,"add.text","Create Role")})},children:F.tparam(t,"add.text","Add")})}),P.jsx(y.Access,{ctx:n,point:"batch-delete",children:P.jsx(D.LinkButton,{plain:!0,className:"k-color-error",iconCls:"iconfont icon-del4 color-red",onClick:function(){var e=null==n?void 0:n.tableSlectionValue();e&&0===e.length?y.$toast.error(F.tt("none_checkbox_warn","Message","Please select the object to operate!")):null==n||n.publish("remove",{fn:te.batchDeleteRole,params:{names:n.tableSlectionValue()}})},children:F.tparam(t,"batch_remove.text","Batch Remove")})})]})]})},data:(null==o?void 0:o.data)||[],loading:null==o?void 0:o.loading,style:null==o?void 0:o.style,idField:"name",selection:null==o?void 0:o.selectionValues,onSelectionChange:function(e){return null==n?void 0:n.tableSelectionChange(e)},ckWidth:50,children:[P.jsx(D.GridColumn,{field:"name",title:F.tfield(t,"name.label","Name"),width:"220px"}),P.jsx(D.GridColumn,{field:"rule_name",title:F.tfield(t,"rule_name.label","RuleName"),align:"left",render:y.renderTooltip,width:"180px"}),P.jsx(D.GridColumn,{field:"description",title:F.tfield(t,"description.label","Description"),align:"left",render:y.renderTooltip,width:"180px"}),P.jsx(D.GridColumn,{field:"create_time",title:F.tfield(t,"create_time.label","CreateTime"),width:"180px",render:M,sortable:!0}),P.jsx(D.GridColumn,{field:"update_time",title:F.tfield(t,"update_time.label","UpdateTime"),width:"180px",render:M}),P.jsx(D.GridColumnGroup,{frozen:!0,align:"right",width:"100px",children:P.jsx(D.GridHeaderRow,{children:P.jsx(D.GridColumn,{align:"center",render:function(e){e.value;var r=e.row;e.rowIndex;return P.jsxs(P.Fragment,{children:[P.jsx(y.Access,{ctx:n,point:"assign-permission",children:P.jsx(D.LinkButton,{plain:!0,onClick:function(){return b.invoke(i,"assigndlg.open",{ctx:n,record:r,title:"".concat(F.tparam(t,"assign_permission.text","Assign Permission: {#name}")).replace("{#name}",r.name)})},iconCls:"iconfont icon-permissions color-tomato"})}),P.jsx(y.Access,{ctx:n,point:"update",children:P.jsx(D.LinkButton,{plain:!0,onClick:function(){return b.invoke(i,"formdlg.open",{ctx:n,record:r,type:C.FormDataType.UPDATE,title:"".concat(F.tparam(t,"update.text","Update: {#name}")).replace("{#name}",r.name)})},iconCls:"iconfont icon-edit color-dark-green"})}),P.jsx(y.Access,{ctx:n,point:"delete",children:P.jsx(D.LinkButton,{onClick:function(){return null==n?void 0:n.publish("remove",{fn:te.deleteRole,params:{name:r.name}})},plain:!0,iconCls:"iconfont icon-del color-red"})})]})},width:"80px"})})})]},a)},lt=[{type:C.CheckAccessEleType.AND,value:["/rbac/permissions","/rbac/add-permission-children","/rbac/get-children"],key:"assign-permission"},{type:C.CheckAccessEleType.AND,value:["/rbac/batch-delete-role"],key:"batch-delete"},{type:C.CheckAccessEleType.AND,value:["/rbac/add-role"],key:"add"},{type:C.CheckAccessEleType.AND,value:["/rbac/update-role"],key:"update"},{type:C.CheckAccessEleType.AND,value:["/rbac/delete-role"],key:"delete"}],ct=ue({name:"Roles"})(function(t){var r=t.pageConfig,n=t.fetchConfig,o=se({name:"roles",fetch:function(e){return te.roles()},checkAccessItems:lt=[].concat(e(lt),e((null==n?void 0:n.checkAccessItems)||[])),defaultPageSize:30,selectionValue:function(e){return e.name}});v.useEffect(function(){o.ctx.search()},[o.version]),o.ctx.registerEvent("remove",H(o.ctx));var i=y.useRefDialog(),a=y.useRefDialog();return P.jsx(Xe.Provider,{value:{version:o.version,ctx:o.ctx,ctxState:o.ctxState,pageConfig:r,fetchConfig:n,refs:{formdlg:i,assigndlg:a}},children:P.jsxs(y.DefaultPanel,{mode:"cover",footer:function(){return P.jsx(de,{ctx:o.ctx,ctxState:o.ctxState})},children:[P.jsx(nt,p({},i)),P.jsx(tt,p({},a)),P.jsx(at,{})]})})}),st=v.createContext({pageConfig:{},fetchConfig:{}}),dt=function(e){var t=e.ctx,n=(e.type,e.record),o=e.pageConfig,i=(e.fetchConfig,e.close),a=r(E.useFormData(n).toArray(),1)[0],l=function(){var e={resource:a.resource,name:a.name};te.fastAddPermission(e).then(function(e){200===e.code&&(y.$toast.success(F.tt("save_success","Message","Save Success!")),t.refresh(),i())})};return v.useEffect(function(){null==t||t.setMethod("onSubmit",l)},[t,l]),P.jsxs(D.Form,{model:a,labelWidth:120,labelAlign:"left",errorType:"tooltip",rules:{name:{required:!0}},style:{minWidth:500,padding:"20px"},children:[P.jsx(D.FormField,{name:"resource",label:F.tfield(o,"fast_add_resource.label","Resource")+":",children:P.jsx(D.TextBox,{placeholder:F.tfield(o,"fast_add_resource.placeholder",""),value:a.resource})}),P.jsx(D.FormField,{name:"name",label:F.tfield(o,"fast_add_name.label","Name")+":",children:P.jsx(D.TextBox,{placeholder:F.tfield(o,"fast_add_name.placeholder",""),value:a.name})})]})},ut=function(e){var t=e.value,r=e.props,n=e.close,o=v.useContext(st),i=o.ctx,a=o.pageConfig,l=o.fetchConfig;o.refs;return P.jsx(D.Dialog,{title:r.title,bodyCls:"f-column",modal:!0,closed:!0,ref:t.ref,footer:function(){return P.jsxs("div",{className:"admin-form-submit",children:[P.jsx(D.LinkButton,{style:{width:80},iconCls:"icon-save",onClick:function(){var e;return null==i||null===(e=i.getMethod("onSubmit"))||void 0===e?void 0:e()},children:F.tparam(a,"submit.text","Submit")}),P.jsx(D.LinkButton,{style:{width:80},iconCls:"icon-cancel",onClick:n,children:F.tparam(a,"close.text","Close")})]})},children:P.jsx(dt,p(p({className:"f-full",ctx:i,pageConfig:a,fetchConfig:l},r),{},{close:n}))})},ft=function(e){var t=e.ctx,n=e.type,o=e.record,i=e.pageConfig,a=(e.fetchConfig,e.close),l=r(v.useState(o),2),c=l[0],s=(l[1],r(E.useFormData(o).toArray(),1)[0]),d=v.useRef(null),u=function(){d.current.validate(function(e){null==e?(n===C.FormDataType.CREATE&&te.addPermission(c).then(function(e){var r=e.code;e.data;200==r&&(t.refresh(),a())}),n===C.FormDataType.UPDATE&&te.updatePermission({source_name:s.name,target_name:c.name,description:c.description,rule_name:c.ruleName}).then(function(e){var r=e.code;e.data;200==r&&(t.refresh(),a())})):y.$toast.error(K(e))})};return v.useEffect(function(){null==t||t.setMethod("onSubmit",u)},[t,u]),P.jsxs(D.Form,{ref:d,model:c,labelWidth:120,labelAlign:"left",errorType:"tooltip",rules:{name:{required:!0}},style:{minWidth:500,padding:"20px"},children:[P.jsx(D.FormField,{name:"name",label:F.tfield(i,"name.label","Name")+":",children:P.jsx(D.TextBox,{placeholder:F.tfield(i,"name.placeholder",""),value:c.name})}),P.jsx(D.FormField,{name:"description",label:F.tfield(i,"description.label","Description")+":",children:P.jsx(D.TextBox,{multiline:!0,placeholder:F.tfield(i,"description.placeholder",""),value:c.description,style:{height:"80px",padding:"5px 2px"}})})]})},pt=function(e){var t=e.value,r=e.props,n=e.close,o=v.useContext(st),i=o.ctx,a=o.pageConfig,l=o.fetchConfig;o.refs;return P.jsx(D.Dialog,{title:r.title,bodyCls:"f-column",modal:!0,closed:!0,ref:t.ref,draggable:!0,resizable:!0,footer:function(){return P.jsxs("div",{className:"admin-form-submit",children:[P.jsx(D.LinkButton,{style:{width:80},iconCls:"icon-save",onClick:function(){var e;return null==i||null===(e=i.getMethod("onSubmit"))||void 0===e?void 0:e()},children:F.tparam(a,"submit.text","Submit")}),P.jsx(D.LinkButton,{style:{width:80},iconCls:"icon-cancel",onClick:n,children:F.tparam(a,"close.text","Close")})]})},children:P.jsx(ft,p(p({className:"f-full",ctx:i,pageConfig:a,fetchConfig:l},r),{},{close:n}))})},mt=function(e){var t=e.ctx,n=e.pageConfig,o=(e.fetchConfig,{name:"",description:""}),i=r(v.useState(o),2),a=i[0],l=i[1];return P.jsxs(D.Form,{className:"admin-search-panel",model:a,labelWidth:"auto",labelPosition:"before",children:[P.jsx(D.FormField,{name:"name",label:F.tfield(n,"name.label","Name"),children:P.jsx(D.TextBox,{value:a.name})}),P.jsx(D.FormField,{name:"description",label:F.tfield(n,"description.label","Description"),children:P.jsx(D.TextBox,{value:a.description})}),P.jsxs(D.FormField,{children:[P.jsx(D.LinkButton,{iconCls:"iconfont icon-search color-deep-sky-blue",onClick:function(){var e={conditions:[{key:"name",value:a.name,type:"LIKE"},{key:"description",value:a.description,type:"LIKE"}]};null==t||t.search(e)},style:{marginRight:"5px"},children:F.tparam(n,"search.text","Search")}),P.jsx(D.LinkButton,{type:"reset",iconCls:"iconfont icon-refresh2 color-deep-sky-blue",onClick:function(){l(p({},o)),null==t||t.reset()},children:F.tparam(n,"reset.text","Reset")})]})]})},ht=y.withCheckGrid(D.DataGrid),xt=function(){var e=v.useContext(st),t=e.pageConfig,r=e.fetchConfig,n=e.ctx,o=e.ctxState,i=e.refs,a=e.version;return P.jsxs(ht,{toolbar:function(){return P.jsxs(v.Fragment,{children:[P.jsx("div",{children:P.jsx(mt,{ctx:n,pageConfig:t,fetchConfig:r})}),P.jsxs(y.Toolbar,{children:[P.jsx(D.LinkButton,{plain:!0,className:"k-color-success",iconCls:"iconfont icon-refresh color-green",onClick:function(){return null==n?void 0:n.refresh()},children:F.tparam(t,"refresh.text","Refresh")}),P.jsx(y.Access,{ctx:n,point:"add",children:P.jsx(D.LinkButton,{plain:!0,className:"k-color-success",iconCls:"l-btn-icon-none iconfont icon-add color-dark-green",onClick:function(){b.invoke(i,"formdlg.open",{type:C.FormDataType.CREATE,ctx:n,record:{name:"",description:"",execute_name:""},title:F.tparam(t,"add.text","Create Role")})},children:F.tparam(t,"add.text","Add")})}),P.jsx(y.Access,{ctx:n,point:"batch-delete",children:P.jsx(D.LinkButton,{plain:!0,className:"k-color-error",iconCls:"iconfont icon-del4 color-red",onClick:function(){var e=null==n?void 0:n.tableSlectionValue();e&&0===e.length?y.$toast.error(F.tt("none_checkbox_warn","Message","Please select the object to operate!")):null==n||n.publish("remove",{fn:te.batchDeletePermission,params:{names:n.tableSlectionValue()}})},children:F.tparam(t,"batch_remove.text","Batch Remove")})}),P.jsx(y.Access,{ctx:n,point:"fast-add-permission",children:P.jsx(D.LinkButton,{plain:!0,className:"k-color-info",iconCls:"iconfont icon-add3 color-golden-rod",onClick:function(){b.invoke(i,"fastadddlg.open",{ctx:n,record:{name:"",resource:""},title:F.tparam(t,"fast_add.text","Fast Add")})},children:F.tparam(t,"fast_add.text","Fast Add")})})]})]})},data:(null==o?void 0:o.data)||[],idField:"name",selection:null==o?void 0:o.selectionValues,onSelectionChange:function(e){return null==n?void 0:n.tableSelectionChange(e)},loading:null==o?void 0:o.loading,style:null==o?void 0:o.style,lazy:!0,ckWidth:50,children:[P.jsx(D.GridColumn,{field:"name",title:F.tfield(t,"name.label","Name"),render:y.renderTooltip}),P.jsx(D.GridColumn,{field:"rule_name",title:F.tfield(t,"rule_name.label","RuleName"),align:"left",render:y.renderTooltip}),P.jsx(D.GridColumn,{field:"description",title:F.tfield(t,"description.label","Description"),align:"left",render:y.renderTooltip}),P.jsx(D.GridColumn,{field:"create_time",title:F.tfield(t,"create_time.label","CreateTime"),width:"180px",render:y.renderTooltip,sortable:!0}),P.jsx(D.GridColumn,{field:"update_time",title:F.tfield(t,"update_time.label","UpdateTime"),width:"180px",render:y.renderTooltip,sortable:!0}),P.jsx(D.GridColumnGroup,{frozen:!0,align:"right",width:"80px",children:P.jsx(D.GridHeaderRow,{children:P.jsx(D.GridColumn,{align:"center",render:function(e){e.value;var r=e.row;e.rowIndex;return P.jsxs(P.Fragment,{children:[P.jsx(y.Access,{ctx:n,point:"update",children:P.jsx(D.LinkButton,{plain:!0,onClick:function(){return b.invoke(i,"formdlg.open",{ctx:n,record:r,type:C.FormDataType.UPDATE,title:"".concat(F.tparam(t,"update.text","Update: {#name}")).replace("{#name}",r.name)})},iconCls:"iconfont icon-edit color-dark-green"})}),P.jsx(y.Access,{ctx:n,point:"delete",children:P.jsx(D.LinkButton,{onClick:function(){return null==n?void 0:n.publish("remove",{fn:te.deletePermission,params:{name:r.name}})},plain:!0,iconCls:"iconfont icon-del color-red"})})]})},width:"80px"})})})]},a)},gt=[{type:C.CheckAccessEleType.AND,value:["/rbac/fast-add-permission"],key:"fast-add-permission"},{type:C.CheckAccessEleType.AND,value:["/rbac/batch-delete-permission"],key:"batch-delete"},{type:C.CheckAccessEleType.AND,value:["/rbac/add-permission"],key:"add"},{type:C.CheckAccessEleType.AND,value:["/rbac/update-permission"],key:"update"},{type:C.CheckAccessEleType.AND,value:["/rbac/delete-permission"],key:"delete"}],vt=ue({name:"Permissions"})(function(t){var r=t.pageConfig,n=t.fetchConfig,o=ce({name:"permissions",fetch:function(e){return te.permissions()},checkAccessItems:gt=[].concat(e(gt),e((null==n?void 0:n.checkAccessItems)||[])),defaultPageSize:50,selectionValue:function(e){return e.name}});v.useEffect(function(){o.ctx.search()},[o.version]);var i=y.useRefDialog(),a=y.useRefDialog();return o.ctx.registerEvent("remove",H(o.ctx)),P.jsx(st.Provider,{value:{version:o.version,ctx:o.ctx,ctxState:o.ctxState,pageConfig:r,fetchConfig:n,refs:{formdlg:i,fastadddlg:a}},children:P.jsxs(y.DefaultPanel,{mode:"cover",footer:function(){return P.jsx(de,{ctx:o.ctx,ctxState:o.ctxState})},children:[P.jsx(pt,p({},i)),P.jsx(ut,p({},a)),P.jsx(xt,{})]})})}),bt=v.createContext({pageConfig:{},fetchConfig:{}}),yt=v.createContext({pageConfig:{},fetchConfig:{}}),Ct=function(e){var t=e.ctx,n=e.pageConfig,o=(e.fetchConfig,{label:"",value:""}),i=r(v.useState(o),2),a=i[0],l=i[1];return P.jsxs(D.Form,{className:"admin-search-panel",model:a,labelWidth:"auto",labelPosition:"before",children:[P.jsx(D.FormField,{name:"label",label:F.tfield(n,"label.label","Label"),children:P.jsx(D.TextBox,{value:a.label})}),P.jsx(D.FormField,{name:"value",label:F.tfield(n,"value.label","Value"),children:P.jsx(D.TextBox,{value:a.value})}),P.jsxs(D.FormField,{children:[P.jsx(D.LinkButton,{iconCls:"iconfont icon-search color-deep-sky-blue",onClick:function(){var e={conditions:[{key:"label",value:a.label,type:"LIKE",filter_empty:!0},{key:"value",value:a.value,type:"=",filter_empty:!0}]};null==t||t.search(e)},style:{marginRight:"5px"},children:F.tparam(n,"search.text","Search")}),P.jsx(D.LinkButton,{iconCls:"iconfont icon-refresh2 color-deep-sky-blue",onClick:function(){l(p({},o)),null==t||t.reset()},children:F.tparam(n,"reset.text","Reset")})]})]})},Ft=function(){var e=v.useContext(yt),t=e.pageConfig,r=e.fetchConfig,n=e.ctx,o=e.ctxState,i=e.refs;return P.jsx(P.Fragment,{children:P.jsxs(D.DataGrid,{toolbar:function(){var e={record:{data:"",label:"",value:"",sort:0},type:C.FormDataType.CREATE,ctx:n,title:F.tparam(t,"add.text","Create Dict")};return P.jsxs(v.Fragment,{children:[P.jsx("div",{children:P.jsx(Ct,{ctx:n,pageConfig:t,fetchConfig:r})}),P.jsxs(y.Toolbar,{children:[P.jsx(D.LinkButton,{plain:!0,className:"k-color-success",iconCls:"iconfont icon-refresh color-green",onClick:function(){return null==n?void 0:n.refresh()},children:F.tparam(t,"refresh.text","Refresh")}),P.jsx(y.Access,{ctx:n,point:"add",children:P.jsx(D.LinkButton,{plain:!0,className:"k-color-success",iconCls:"iconfont icon-add color-dark-green",onClick:function(){return b.invoke(i,"formDataRefDlg.open",e)},children:F.tparam(t,"add.text","Add")})})]})]})},data:null==o?void 0:o.data,loading:null==o?void 0:o.loading,style:null==o?void 0:o.style,children:[P.jsx(D.GridColumn,{field:"label",title:F.tfield(t,"label.label","Label"),width:"160px"}),P.jsx(D.GridColumn,{field:"value",title:F.tfield(t,"value.label","Value"),align:"center",width:"180px"}),P.jsx(D.GridColumn,{field:"sort",title:F.tfield(t,"sort.label","Sort"),align:"center",width:"80px"}),P.jsx(D.GridColumn,{field:"data",title:F.tfield(t,"data.label","Data"),align:"center",width:"180px"}),P.jsx(D.GridColumnGroup,{frozen:!0,align:"right",width:"80px",children:P.jsx(D.GridHeaderRow,{children:P.jsx(D.GridColumn,{align:"center",render:function(e){e.value;var r=e.row,o=(e.rowIndex,{record:r,ctx:n,type:C.FormDataType.UPDATE,title:"".concat(F.tparam(t,"update.text","Update: {#name}")).replace("{#name}",r.label)});return P.jsxs(P.Fragment,{children:[P.jsx(y.Access,{ctx:n,point:"update",children:P.jsx(D.LinkButton,{plain:!0,onClick:function(){return b.invoke(i,"formDataRefDlg.open",o)},iconCls:"iconfont icon-edit color-dark-green"})}),P.jsx(y.Access,{ctx:n,point:"delete",children:P.jsx(D.LinkButton,{onClick:function(){return null==n?void 0:n.publish("remove",{conditions:[{key:"id",value:r.id}],data:{sign:r.sign}})},plain:!0,iconCls:"iconfont icon-del color-red"})})]})},width:"80px"})})})]})})},jt=function(e){var t=e.ctx,n=e.type,o=e.record,i=e.pageConfig,a=(e.fetchConfig,e.close),l=e.refs,c=r(E.useFormData(o).toArray(),1)[0],s=v.useRef(null),d=function(e){s.current.validate(function(r){if(null==r){var i={object:{id:parseInt(c.id),label:c.label,sign:e,value:c.value,data:c.data,sort:parseInt(c.sort)},conditions:[]};n===C.FormDataType.UPDATE&&i.conditions.push({key:"id",value:o.id}),V.saveResult(null==t?void 0:t.name(),n,i,function(){y.$toast.success(F.tt("save_success","Message")),null==t||t.refresh(),a()}).then(function(e){})}else y.$toast.error(K(r))})};v.useEffect(function(){null==t||t.setMethod("onSubmit",function(e){return d(e)})},[t,d]);return P.jsxs(D.Form,{ref:s,model:c,labelWidth:120,labelAlign:"left",errorType:"tooltip",rules:{label:{required:!0},value:{required:!0}},style:{minWidth:500,padding:"20px"},children:[P.jsx(D.FormField,{name:"label",label:F.tfield(i,"label.label","Label")+":",children:P.jsx(D.TextBox,{placeholder:F.tfield(i,"label.placeholder",""),value:c.label})}),P.jsx(D.FormField,{name:"value",label:F.tfield(i,"value.label","Value")+":",children:P.jsx(D.TextBox,{placeholder:F.tfield(i,"value.placeholder",""),value:c.value})}),P.jsx(D.FormField,{name:"sort",label:F.tfield(i,"sort.label","Sort")+":",children:P.jsx(D.NumberBox,{placeholder:F.tfield(i,"sort.placeholder",""),value:c.sort||0})}),P.jsx(D.FormField,{name:"data",label:F.tfield(i,"data.label","Data")+":",children:P.jsx(D.TextBox,{multiline:!0,style:{height:120,padding:"5px 2px"},placeholder:F.tfield(i,"data.placeholder",""),value:c.data,addonRight:function(){return P.jsx("span",{style:{paddingLeft:"8px"},children:P.jsx("span",{className:"textbox-icon iconfont icon-view-001",onClick:function(){var e,t;return null===(e=(t=l.routerDataRefDlg).open)||void 0===e?void 0:e.call(t)}})})}})})]})},kt=function(e){var t=e.value,r=e.props,n=e.close,o=v.useContext(yt),i=o.ctx,a=o.pageConfig,l=o.fetchConfig,c=o.refs;return P.jsx(D.Dialog,{title:r.title,bodyCls:"f-column",modal:!0,closed:!0,ref:t.ref,style:{width:"calc(100vw - 50%)",maxHeight:"calc(100vh - 200px))"},footer:function(){return P.jsxs("div",{className:"admin-form-submit",children:[P.jsx(D.LinkButton,{style:{width:80},onClick:function(){var e;return null==i||null===(e=i.getMethod("onSubmit"))||void 0===e?void 0:e(r.sign)},iconCls:"icon-save",children:F.tparam(a,"submit.text","Submit")}),P.jsx(D.LinkButton,{style:{width:80},onClick:function(){return null==n?void 0:n()},iconCls:"icon-cancel",children:F.tparam(a,"cancel.text","Cancel")})]})},children:P.jsx("div",{className:"f-full",children:P.jsx(jt,p(p({ctx:i,pageConfig:a,fetchConfig:l},r),{},{close:n,refs:c}))})})},wt="dict-item",Et=W(wt),Dt=ue({name:"DictItem",fetchConfig:function(){return V.configs(wt)}})(function(t){var r=t.pageConfig,n=t.fetchConfig,o=t.sign;Et=[].concat(e(Et),e((null==n?void 0:n.checkAccessItems)||[]));var i=se({name:wt,fetch:function(e){return V.list(wt,e)},checkAccessItems:Et,fixedConditions:[{key:"sign",value:o}]},o);i.ctx.registerEvent("remove",q(i.ctx));var a=y.useRefDialog({sign:o});return v.useEffect(function(){i.ctx.search()},[]),P.jsx(yt.Provider,{value:{ctx:i.ctx,ctxState:i.ctxState,pageConfig:r,fetchConfig:n,refs:{formDataRefDlg:a}},children:P.jsxs(y.DefaultPanel,{mode:"cover",footer:function(){return P.jsx(de,{ctx:i.ctx,ctxState:i.ctxState})},children:[P.jsx(kt,p({},a)),P.jsx(Ft,{})]})})}),At=function(e){var t=e.ctx,n=(e.ctxState,e.type),o=e.record,i=e.pageConfig,a=(e.fetchConfig,e.close),l=e.refs,c=r(E.useFormData(o).toArray(),1)[0],s=v.useRef(null),d=function(){s.current.validate(function(e){if(null==e){var r={object:{id:parseInt(c.id),name:c.name,sign:c.sign,remark:c.remark},conditions:[]};n===C.FormDataType.UPDATE&&r.conditions.push({key:"id",value:o.id}),V.saveResult(null==t?void 0:t.name(),n,r,function(){y.$toast.success(F.tt("save_success","Message")),t.refresh(),a()}).then(function(e){})}else y.$toast.error(K(e))})};v.useEffect(function(){null==t||t.setMethod("onSubmit",d)},[t,d]);return P.jsxs(D.Form,{ref:s,model:c,labelWidth:120,labelAlign:"left",errorType:"tooltip",rules:{name:{required:!0},sign:{required:!0}},style:{minWidth:500,padding:"20px"},children:[P.jsx(D.FormField,{name:"name",label:F.tfield(i,"name.label","Name")+":",children:P.jsx(D.TextBox,{placeholder:F.tfield(i,"name.placeholder",""),value:c.name})}),P.jsx(D.FormField,{name:"sign",label:F.tfield(i,"sign.label","Sign")+":",children:P.jsx(D.TextBox,{placeholder:F.tfield(i,"sign.placeholder",""),disabled:n===C.FormDataType.UPDATE,value:c.sign})}),P.jsx(D.FormField,{name:"remark",label:F.tfield(i,"remark.label","Remark")+":",children:P.jsx(D.TextBox,{multiline:!0,style:{height:120,padding:"5px 2px"},placeholder:F.tfield(i,"remark.placeholder",""),value:c.remark,addonRight:function(){return P.jsx("span",{style:{paddingLeft:"8px"},children:P.jsx("span",{className:"textbox-icon iconfont icon-view-001",onClick:function(){var e,t;return null===(e=(t=l.routerDataRefDlg).open)||void 0===e?void 0:e.call(t)}})})}})})]})},St=function(e){var t=e.value,r=e.props,n=(e.close,v.useContext(bt));n.ctx,n.pageConfig,n.fetchConfig,n.refs;return P.jsx(D.Dialog,{title:r.title,bodyCls:"f-column",modal:!0,closed:!0,ref:t.ref,style:{width:"calc(100vw - 50%)",height:"calc(100vh - 200px)"},children:P.jsx(Dt,p({},r))})},Tt=function(e){var t=e.value,r=e.props,n=e.close,o=v.useContext(bt),i=o.ctx,a=o.ctxState,l=o.pageConfig,c=o.fetchConfig,s=o.refs;return P.jsx(D.Dialog,{title:r.title,bodyCls:"f-column",modal:!0,closed:!0,ref:t.ref,footer:function(){return P.jsxs("div",{className:"admin-form-submit",children:[P.jsx(D.LinkButton,{style:{width:80},onClick:function(){var e;return null==i||null===(e=i.getMethod("onSubmit"))||void 0===e?void 0:e()},iconCls:"icon-save",children:F.tparam(l,"submit.text","Submit")}),P.jsx(D.LinkButton,{style:{width:80},onClick:function(){return null==n?void 0:n()},iconCls:"icon-cancel",children:F.tparam(l,"cancel.text","Cancel")})]})},style:{width:"calc(100vw - 50%)",maxHeight:"calc(100vh - 100px)"},children:P.jsx("div",{className:"f-full",children:P.jsx(At,p(p({ctx:i,ctxState:a,pageConfig:l,fetchConfig:c},r),{},{close:n,refs:s}))})})},Rt=function(e){var t=e.ctx,n=e.pageConfig,o=(e.fetchConfig,{name:"",sign:""}),i=r(v.useState(o),2),a=i[0],l=i[1];return P.jsxs(D.Form,{className:"admin-search-panel",labelWidth:"auto",model:a,labelPosition:"before",children:[P.jsx(D.FormField,{name:"name",label:F.tfield(n,"name.label","Name"),children:P.jsx(D.TextBox,{value:a.name})}),P.jsx(D.FormField,{name:"sign",label:F.tfield(n,"sign.label","Sign"),children:P.jsx(D.TextBox,{value:a.sign})}),P.jsxs(D.FormField,{children:[P.jsx(D.LinkButton,{iconCls:"iconfont icon-search color-deep-sky-blue",onClick:function(){var e={conditions:[{key:"name",value:a.name,type:"LIKE",filter_empty:!0},{key:"sign",value:a.sign,type:"LIKE",filter_empty:!0}]};null==t||t.search(e)},style:{marginRight:"5px"},children:F.tparam(n,"search.text","Search")}),P.jsx(D.LinkButton,{iconCls:"iconfont icon-refresh2 color-deep-sky-blue",onClick:function(){l(o),null==t||t.reset()},children:F.tparam(n,"reset.text","Reset")})]})]})},Bt=y.withCheckGrid(D.DataGrid),_t=function(){var e=v.useContext(bt),t=e.pageConfig,r=e.fetchConfig,n=e.ctx,o=e.ctxState,i=e.refs;return P.jsx(P.Fragment,{children:P.jsxs(Bt,{toolbar:function(){var e={record:{sign:"",name:"",remark:""},type:C.FormDataType.CREATE,ctx:n,title:F.tparam(t,"add.text","Create Dict")};return P.jsxs(v.Fragment,{children:[P.jsx("div",{children:P.jsx(Rt,{ctx:n,pageConfig:t,fetchConfig:r})}),P.jsxs(y.Toolbar,{children:[P.jsx(D.LinkButton,{plain:!0,className:"k-color-success",iconCls:"iconfont icon-refresh color-green",onClick:function(){return null==n?void 0:n.refresh()},children:F.tparam(t,"refresh.text","Refresh")}),P.jsx(y.Access,{ctx:n,point:"add",children:P.jsx(D.LinkButton,{plain:!0,className:"k-color-success",iconCls:"iconfont icon-add color-dark-green",onClick:function(){return b.invoke(i,"formDataRefDlg.open",e)},children:F.tparam(t,"add.text","Add")})}),P.jsx(y.Access,{ctx:n,point:"delete",children:P.jsx(D.LinkButton,{plain:!0,className:"k-color-error",iconCls:"iconfont icon-del4 color-red",onClick:function(){var e=null==n?void 0:n.tableSlectionValue();e&&e.length>0?null==n||n.publish("batchRemove",{conditions:[{key:"id",value:n.tableSlectionValue(),type:"IN"}]}):y.$toast.error(F.tt("checkbox_no_empty","Message"))},children:F.tparam(t,"batch_remove.text","Batch Remove")})})]})]})},data:null==o?void 0:o.data,loading:null==o?void 0:o.loading,style:null==o?void 0:o.style,idField:"id",ckWidth:50,selection:null==o?void 0:o.selectionValues,onSelectionChange:function(e){return null==n?void 0:n.tableSelectionChange(e)},children:[P.jsx(D.GridColumn,{field:"name",title:F.tfield(t,"name.label","Name"),width:"160px",render:y.renderTooltip}),P.jsx(D.GridColumn,{field:"sign",title:F.tfield(t,"sign.label","Sign"),width:"150px",render:y.renderTooltip}),P.jsx(D.GridColumn,{field:"remark",title:F.tfield(t,"remark.label","Remark"),width:"180px",render:y.renderTooltip}),P.jsx(D.GridColumn,{field:"create_time",title:F.tfield(t,"create_time.label","CreateTime"),width:"120px"}),P.jsx(D.GridColumn,{field:"update_time",title:F.tfield(t,"update_time.label","UpdateTime"),width:"120px"}),P.jsx(D.GridColumnGroup,{frozen:!0,align:"right",width:"150px",children:P.jsx(D.GridHeaderRow,{children:P.jsx(D.GridColumn,{align:"center",render:function(e){e.value;var r=e.row,o=(e.rowIndex,{record:r,ctx:n,type:C.FormDataType.UPDATE,title:"".concat(F.tparam(t,"update.text","Update: {#name}")).replace("{#name}",r.name)}),a={sign:r.sign,title:F.tparam(t,"item_list.title","Dict Item: {#name}").replace("{#name}",r.name)};return P.jsxs(P.Fragment,{children:[P.jsx(y.Access,{ctx:n,point:"items",children:P.jsx(D.Tooltip,{content:F.tparam(t,"item_list.text","Dict Item"),position:"top",children:P.jsx(D.LinkButton,{onClick:function(){return b.invoke(i,"dictItemDataRefDlg.open",a)},plain:!0,iconCls:"iconfont icon-zidianxiang2 color-dark-cyan"})})}),P.jsx(y.Access,{ctx:n,point:"update",children:P.jsx(D.LinkButton,{plain:!0,onClick:function(){return b.invoke(i,"formDataRefDlg.open",o)},iconCls:"iconfont icon-edit color-dark-green"})}),P.jsx(y.Access,{ctx:n,point:"delete",children:P.jsx(D.LinkButton,{onClick:function(){return null==n?void 0:n.publish("remove",{conditions:[{key:"id",value:r.id}]})},plain:!0,iconCls:"iconfont icon-del color-red"})})]})},width:"150px"})})})]})})},Nt="dict",Lt=[{type:C.CheckAccessEleType.AND,value:["/resource/dict-item/list"],key:"items"}].concat(e(W(Nt))),Pt=ue({name:"Dict",fetchConfig:function(){return V.configs(Nt)}})(function(t){var r=t.pageConfig,n=t.fetchConfig;Lt=[].concat(e(Lt),e((null==n?void 0:n.checkAccessItems)||[]));var o=se({name:Nt,fetch:function(e){return V.list(Nt,e)},checkAccessItems:Lt});o.ctx.registerEvent("remove",q(o.ctx)),o.ctx.registerEvent("batchRemove",q(o.ctx));var i=y.useRefDialog(),a=y.useRefDialog();return v.useEffect(function(){o.ctx.search()},[o.version]),P.jsx(bt.Provider,{value:{ctx:o.ctx,ctxState:o.ctxState,pageConfig:r,fetchConfig:n,refs:{formDataRefDlg:i,dictItemDataRefDlg:a}},children:P.jsxs(y.DefaultPanel,{mode:"cover",footer:function(){return P.jsx(de,{ctx:o.ctx,ctxState:o.ctxState})},children:[P.jsx(Tt,p({},i)),P.jsx(St,p({},a)),P.jsx(_t,{})]})})}),It=ue({name:"404"})(function(e){var t=e.pageConfig,r=(A.useTranslation().t,w.useNavigate());return P.jsx("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",background:"linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%)",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif"},children:P.jsxs("div",{style:{textAlign:"center",padding:"40px 20px",maxWidth:"520px"},children:[P.jsx("div",{style:{fontSize:"120px",fontWeight:800,letterSpacing:"-4px",color:"#2d3748",lineHeight:1,marginBottom:"16px",textShadow:"0 4px 20px rgba(0,0,0,0.08)"},children:"404"}),P.jsx("div",{style:{fontSize:"24px",fontWeight:600,color:"#4a5568",marginBottom:"12px"},children:F.tparam(t,"title")}),P.jsx("p",{style:{fontSize:"15px",color:"#718096",lineHeight:1.6,marginBottom:"32px"},children:F.tparam(t,"description")}),P.jsxs("div",{style:{display:"flex",gap:"12px",justifyContent:"center",flexWrap:"wrap"},children:[P.jsx("button",{onClick:function(){return r("/")},style:{padding:"10px 28px",fontSize:"14px",fontWeight:500,color:"#fff",background:"#2563eb",border:"none",borderRadius:"8px",cursor:"pointer",transition:"all 0.2s ease",boxShadow:"0 4px 14px rgba(37, 99, 235, 0.35)"},onMouseEnter:function(e){e.currentTarget.style.background="#1d4ed8",e.currentTarget.style.transform="translateY(-1px)",e.currentTarget.style.boxShadow="0 6px 18px rgba(37, 99, 235, 0.45)"},onMouseLeave:function(e){e.currentTarget.style.background="#2563eb",e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 4px 14px rgba(37, 99, 235, 0.35)"},children:F.tparam(t,"back.text")}),P.jsx("button",{onClick:function(){return r(-1)},style:{padding:"10px 28px",fontSize:"14px",fontWeight:500,color:"#4a5568",background:"#fff",border:"1px solid #e2e8f0",borderRadius:"8px",cursor:"pointer",transition:"all 0.2s ease"},onMouseEnter:function(e){e.currentTarget.style.borderColor="#cbd5e0",e.currentTarget.style.background="#f7fafc"},onMouseLeave:function(e){e.currentTarget.style.borderColor="#e2e8f0",e.currentTarget.style.background="#fff"},children:F.tparam(t,"back_to_prev.text")})]})]})})}),Mt=function(e){var t=r(v.useState([{id:"demo",name:"test1",data:{width:200,height:100}},{id:"demo",name:"test3",data:{width:400,height:100,top:500,left:200}}]),2);t[0],t[1];return P.jsx("h2",{children:"developing......"})},Ot=v.createContext({}),Gt=function(){var e=y.useLocale(!0),t=e.localeOptions,r=e.changeLocale;return P.jsx(D.MenuButton,{text:"",plain:!0,iconCls:"iconfont icon-language",menu:function(){return P.jsx(D.Menu,{children:Object.keys(t).map(function(e,r){return P.jsx(D.MenuItem,{text:t[e],value:e},r)})})},onMenuItemClick:r})},Ut=function(e){var t=e.className,r=void 0===t?"":t,n=e.style,o=void 0===n?{}:n,i=y.useMainAppDispatch(),a=y.useMainAppSelector(function(e){return e.main.dark}),l=function(e){e?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")};return v.useEffect(function(){l(a)},[a]),P.jsx(D.LinkButton,{iconCls:"iconfont ".concat(a?"icon-baitianmoshi":"icon-heiyemoshi"," header-bar-btn"),plain:!0,className:"k-menu-btn ".concat(r),onClick:function(){var e=!a;i(y.setDark(e)),l(e)},title:a?"切换到浅色模式":"切换到深色模式",style:o})},$t=function(){var e=k.useAppSelector(function(e){return e.user.info}),t=k.useAppDispatch(),r=w.useNavigate();return P.jsx(D.MenuButton,{text:e.username,plain:!0,iconCls:"iconfont icon-user",menu:function(){return P.jsx(D.Menu,{noline:!0,children:P.jsx(D.MenuItem,{iconCls:"iconfont icon-logout2",value:"exit",text:"Exit"})})},onMenuItemClick:function(e){if("exit"==e){var n=F.tt("confirm_logout","Message");y.$confirm(F.tt("confirm_warn","Message"),n,function(){k.Admin.logout(function(){t(k.clearLayoutData()),t(k.saveHistoryLocation({pathname:"/",hash:"",search:""})),r("/login")})})}}})},zt=[{key:"blue",name:"Modern Blue",light:{"--color-primary":"#1677FF","--color-primary-hover":"#4096FF","--color-primary-active":"#0958D9","--color-primary-light":"#E8F3FF","--color-primary-lighter":"#F0F5FF","--color-primary-dark":"#002C8C","--color-primary-foreground":"#FFFFFF","--color-page-bg":"#F5F7FA","--color-surface":"#FFFFFF","--color-surface-raised":"#FFFFFF","--color-surface-subtle":"#FAFBFC","--color-surface-hover":"#F0F5FF","--color-surface-soft":"#F8FAFC","--color-surface-accent":"#EEF4FF","--color-text-primary":"#1F2937","--color-text-secondary":"#6B7280","--color-text-tertiary":"#9CA3AF","--color-text-disabled":"#9CA3AF","--color-text-inverse":"#FFFFFF","--color-text-link":"#1677FF","--color-border":"#E5E7EB","--color-border-light":"#F0F1F3","--color-border-input":"#D0D5DD","--color-border-focus":"#1677FF","--color-border-strong":"#D0E8FF","--color-success":"#52C41A","--color-success-light":"#F0FBF2","--color-success-border":"#B7EB8F","--color-success-dark":"#135200","--color-warning":"#FAAD14","--color-warning-light":"#FFFBE6","--color-warning-border":"#FFE58F","--color-warning-dark":"#AD6800","--color-error":"#F5222D","--color-error-light":"#FFF1F0","--color-error-border":"#FFCCC7","--color-error-dark":"#A8071A","--color-info":"#1677FF","--color-info-light":"#E8F3FF","--color-info-border":"#D0E8FF","--color-info-dark":"#002C8C","--color-sidebar-bg":"#F5F7FA","--color-sidebar-text":"#1F2937","--color-sidebar-hover":"#F0F5FF","--color-sidebar-active":"#E8F3FF","--color-sidebar-active-text":"#1677FF","--color-sidebar-border":"#E5E7EB","--color-header-bg":"#FFFFFF","--color-header-border":"#E5E7EB","--color-header-text":"#1F2937","--color-toolbar-bg":"#FAFBFC","--color-panel-header-start":"#F8FAFC","--color-panel-header-end":"#EEF4FF","--color-table-header-bg":"#FAFBFC","--color-table-header-text":"#1F2937","--color-table-row-hover":"#F0F5FF","--color-table-row-selected":"#E8F3FF","--color-table-border":"#F0F1F3","--color-accordion-header":"#F5F7FA","--color-accordion-header-hover":"#F0F5FF","--color-menu-bg":"#FFFFFF","--color-menu-item-hover":"#F0F5FF","--color-menu-item-active":"#E8F3FF","--color-menu-shadow":"rgba(15, 23, 42, 0.08)","--color-overlay-mask":"rgba(15, 23, 42, 0.16)","--color-calendar-today":"#1677FF","--color-calendar-weekend":"#F5222D","--color-tooltip-bg":"#FFFFFF","--color-tooltip-text":"#1F2937","--color-progress-bg":"#F5F7FA","--color-progress-fill":"#1677FF","--color-switch-off":"#D0D5DD","--color-switch-on":"#1677FF"},dark:{"--color-page-bg":"#0D1117","--color-surface":"#161B22","--color-surface-raised":"#1C2128","--color-surface-subtle":"#1C2128","--color-surface-hover":"#21262D","--color-surface-soft":"#171C23","--color-surface-accent":"#1A2230","--color-text-primary":"#E6EDF3","--color-text-secondary":"#8B949E","--color-text-tertiary":"#484F58","--color-text-disabled":"#484F58","--color-text-inverse":"#0D1117","--color-text-link":"#58A6FF","--color-primary":"#4096FF","--color-primary-hover":"#58A6FF","--color-primary-active":"#388BFD","--color-primary-light":"rgba(64, 150, 255, 0.15)","--color-primary-lighter":"rgba(64, 150, 255, 0.08)","--color-primary-dark":"#79C0FF","--color-primary-foreground":"#FFFFFF","--color-border":"#30363D","--color-border-light":"#21262D","--color-border-input":"#30363D","--color-border-focus":"#4096FF","--color-border-strong":"#484F58","--color-success":"#56D364","--color-success-light":"rgba(86, 211, 100, 0.12)","--color-success-border":"rgba(86, 211, 100, 0.25)","--color-success-dark":"#7EE787","--color-warning":"#D29922","--color-warning-light":"rgba(210, 153, 34, 0.12)","--color-warning-border":"rgba(210, 153, 34, 0.25)","--color-warning-dark":"#E3B341","--color-error":"#F85149","--color-error-light":"#1D1114","--color-error-border":"rgba(248, 81, 73, 0.25)","--color-error-dark":"#FF7B72","--color-info":"#58A6FF","--color-info-light":"rgba(88, 166, 255, 0.12)","--color-info-border":"rgba(88, 166, 255, 0.25)","--color-info-dark":"#79C0FF","--color-sidebar-bg":"#0D1117","--color-sidebar-text":"#C9D1D9","--color-sidebar-hover":"#21262D","--color-sidebar-active":"#1C2839","--color-sidebar-active-text":"#4096FF","--color-sidebar-border":"#30363D","--color-header-bg":"#161B22","--color-header-border":"#30363D","--color-header-text":"#E6EDF3","--color-toolbar-bg":"#161B22","--color-panel-header-start":"#1C2128","--color-panel-header-end":"#171C23","--color-table-header-bg":"#161B22","--color-table-header-text":"#E6EDF3","--color-table-row-hover":"#161B22","--color-table-row-selected":"#1C2839","--color-table-border":"#21262D","--color-accordion-header":"#161B22","--color-accordion-header-hover":"#21262D","--color-menu-bg":"#161B22","--color-menu-item-hover":"#21262D","--color-menu-item-active":"#1C2839","--color-menu-shadow":"rgba(0, 0, 0, 0.4)","--color-overlay-mask":"rgba(0, 0, 0, 0.52)","--color-calendar-today":"#4096FF","--color-calendar-weekend":"#FF7B72","--color-tooltip-bg":"#21262D","--color-tooltip-text":"#E6EDF3","--color-progress-bg":"#21262D","--color-progress-fill":"#4096FF","--color-switch-off":"#484F58","--color-switch-on":"#4096FF"}},{key:"purple",name:"Purple",light:{"--color-primary":"#6D5EFC","--color-primary-hover":"#8578FF","--color-primary-active":"#4F46E5","--color-primary-light":"#EDE9FE","--color-primary-lighter":"#F5F3FF","--color-primary-dark":"#3730A3","--color-primary-foreground":"#FFFFFF","--color-page-bg":"#F5F3FF","--color-surface":"#FFFFFF","--color-surface-raised":"#FFFFFF","--color-surface-subtle":"#FAF9FF","--color-surface-hover":"#EDE9FE","--color-surface-soft":"#F8F7FF","--color-surface-accent":"#EDE9FE","--color-text-primary":"#1F2937","--color-text-secondary":"#6B7280","--color-text-tertiary":"#9CA3AF","--color-text-disabled":"#B9B2FF","--color-text-inverse":"#FFFFFF","--color-text-link":"#6D5EFC","--color-border":"#DDD6FE","--color-border-light":"#EDE9FE","--color-border-input":"#C4B5FD","--color-border-focus":"#6D5EFC","--color-border-strong":"#A78BFA","--color-success":"#22C55E","--color-success-light":"#F0FDF4","--color-success-border":"#86EFAC","--color-success-dark":"#15803D","--color-warning":"#F59E0B","--color-warning-light":"#FFFBEB","--color-warning-border":"#FCD34D","--color-warning-dark":"#B45309","--color-error":"#EF4444","--color-error-light":"#FEF2F2","--color-error-border":"#FCA5A5","--color-error-dark":"#B91C1C","--color-info":"#3B82F6","--color-info-light":"#EFF6FF","--color-info-border":"#93C5FD","--color-info-dark":"#1D4ED8","--color-sidebar-bg":"#F5F3FF","--color-sidebar-text":"#1F2937","--color-sidebar-hover":"#EDE9FE","--color-sidebar-active":"#DDD6FE","--color-sidebar-active-text":"#6D5EFC","--color-sidebar-border":"#DDD6FE","--color-header-bg":"#FFFFFF","--color-header-border":"#DDD6FE","--color-header-text":"#1F2937","--color-toolbar-bg":"#FAF9FF","--color-panel-header-start":"#F8F7FF","--color-panel-header-end":"#EDE9FE","--color-table-header-bg":"#FAF9FF","--color-table-header-text":"#1F2937","--color-table-row-hover":"#EDE9FE","--color-table-row-selected":"#DDD6FE","--color-table-border":"#EDE9FE","--color-accordion-header":"#F5F3FF","--color-accordion-header-hover":"#EDE9FE","--color-menu-bg":"#FFFFFF","--color-menu-item-hover":"#EDE9FE","--color-menu-item-active":"#DDD6FE","--color-menu-shadow":"rgba(109, 94, 252, 0.08)","--color-overlay-mask":"rgba(109, 94, 252, 0.12)","--color-calendar-today":"#6D5EFC","--color-calendar-weekend":"#EF4444","--color-tooltip-bg":"#FFFFFF","--color-tooltip-text":"#1F2937","--color-progress-bg":"#F5F3FF","--color-progress-fill":"#6D5EFC","--color-switch-off":"#C4B5FD","--color-switch-on":"#6D5EFC"},dark:{"--color-page-bg":"#0C0A1A","--color-surface":"#141226","--color-surface-raised":"#1A1730","--color-surface-subtle":"#1A1730","--color-surface-hover":"#22203D","--color-surface-soft":"#161330","--color-surface-accent":"#1E1B3A","--color-text-primary":"#E8E5F5","--color-text-secondary":"#9892B0","--color-text-tertiary":"#5C5775","--color-text-disabled":"#5C5775","--color-text-inverse":"#0C0A1A","--color-text-link":"#A78BFA","--color-primary":"#8578FF","--color-primary-hover":"#A78BFA","--color-primary-active":"#6D5EFC","--color-primary-light":"rgba(133, 120, 255, 0.15)","--color-primary-lighter":"rgba(133, 120, 255, 0.08)","--color-primary-dark":"#C4B5FD","--color-primary-foreground":"#FFFFFF","--color-border":"#2E2A4A","--color-border-light":"#22203D","--color-border-input":"#2E2A4A","--color-border-focus":"#8578FF","--color-border-strong":"#433E66","--color-success":"#4ADE80","--color-success-light":"rgba(74, 222, 128, 0.12)","--color-success-border":"rgba(74, 222, 128, 0.25)","--color-success-dark":"#86EFAC","--color-warning":"#FBBF24","--color-warning-light":"rgba(251, 191, 36, 0.12)","--color-warning-border":"rgba(251, 191, 36, 0.25)","--color-warning-dark":"#FCD34D","--color-error":"#F87171","--color-error-light":"rgba(248, 113, 113, 0.12)","--color-error-border":"rgba(248, 113, 113, 0.25)","--color-error-dark":"#FCA5A5","--color-info":"#60A5FA","--color-info-light":"rgba(96, 165, 250, 0.12)","--color-info-border":"rgba(96, 165, 250, 0.25)","--color-info-dark":"#93C5FD","--color-sidebar-bg":"#0C0A1A","--color-sidebar-text":"#C4BFE0","--color-sidebar-hover":"#22203D","--color-sidebar-active":"#1E1B3A","--color-sidebar-active-text":"#A78BFA","--color-sidebar-border":"#2E2A4A","--color-header-bg":"#141226","--color-header-border":"#2E2A4A","--color-header-text":"#E8E5F5","--color-toolbar-bg":"#141226","--color-panel-header-start":"#1A1730","--color-panel-header-end":"#161330","--color-table-header-bg":"#141226","--color-table-header-text":"#E8E5F5","--color-table-row-hover":"#1A1730","--color-table-row-selected":"#1E1B3A","--color-table-border":"#22203D","--color-accordion-header":"#141226","--color-accordion-header-hover":"#22203D","--color-menu-bg":"#141226","--color-menu-item-hover":"#22203D","--color-menu-item-active":"#1E1B3A","--color-menu-shadow":"rgba(0, 0, 0, 0.4)","--color-overlay-mask":"rgba(0, 0, 0, 0.55)","--color-calendar-today":"#8578FF","--color-calendar-weekend":"#F87171","--color-tooltip-bg":"#22203D","--color-tooltip-text":"#E8E5F5","--color-progress-bg":"#22203D","--color-progress-fill":"#8578FF","--color-switch-off":"#433E66","--color-switch-on":"#8578FF"}},{key:"green",name:"Military Green",light:{"--color-primary":"#4A7C3F","--color-primary-hover":"#5D9B4A","--color-primary-active":"#3A6B2F","--color-primary-light":"#EEF4EB","--color-primary-lighter":"#F6FAF5","--color-primary-dark":"#2D4A25","--color-primary-foreground":"#FFFFFF","--color-page-bg":"#F5F7F4","--color-surface":"#FFFFFF","--color-surface-raised":"#FFFFFF","--color-surface-subtle":"#FAFBFA","--color-surface-hover":"#EEF4EB","--color-surface-soft":"#F8FAF7","--color-surface-accent":"#EEF5EC","--color-text-primary":"#1F2937","--color-text-secondary":"#6B7280","--color-text-tertiary":"#9CA3AF","--color-text-disabled":"#9CA3AF","--color-text-inverse":"#FFFFFF","--color-text-link":"#4A7C3F","--color-border":"#DEE6DB","--color-border-light":"#EEF2EC","--color-border-input":"#CDD5C8","--color-border-focus":"#4A7C3F","--color-border-strong":"#B8CCB0","--color-success":"#52C41A","--color-success-light":"#F0FBF2","--color-success-border":"#B7EB8F","--color-success-dark":"#135200","--color-warning":"#FAAD14","--color-warning-light":"#FFFBE6","--color-warning-border":"#FFE58F","--color-warning-dark":"#AD6800","--color-error":"#F5222D","--color-error-light":"#FFF1F0","--color-error-border":"#FFCCC7","--color-error-dark":"#A8071A","--color-info":"#4A7C3F","--color-info-light":"#EEF4EB","--color-info-border":"#C5DBBF","--color-info-dark":"#2D4A25","--color-sidebar-bg":"#F5F7F4","--color-sidebar-text":"#1F2937","--color-sidebar-hover":"#EEF4EB","--color-sidebar-active":"#E0ECDC","--color-sidebar-active-text":"#4A7C3F","--color-sidebar-border":"#DEE6DB","--color-header-bg":"#FFFFFF","--color-header-border":"#DEE6DB","--color-header-text":"#1F2937","--color-toolbar-bg":"#FAFBFA","--color-panel-header-start":"#F8FAF7","--color-panel-header-end":"#EEF5EC","--color-table-header-bg":"#FAFBFA","--color-table-header-text":"#1F2937","--color-table-row-hover":"#EEF4EB","--color-table-row-selected":"#E0ECDC","--color-table-border":"#EEF2EC","--color-accordion-header":"#F5F7F4","--color-accordion-header-hover":"#EEF4EB","--color-menu-bg":"#FFFFFF","--color-menu-item-hover":"#EEF4EB","--color-menu-item-active":"#E0ECDC","--color-menu-shadow":"rgba(74, 124, 63, 0.08)","--color-overlay-mask":"rgba(74, 124, 63, 0.12)","--color-calendar-today":"#4A7C3F","--color-calendar-weekend":"#F5222D","--color-tooltip-bg":"#FFFFFF","--color-tooltip-text":"#1F2937","--color-progress-bg":"#F5F7F4","--color-progress-fill":"#4A7C3F","--color-switch-off":"#CDD5C8","--color-switch-on":"#4A7C3F"},dark:{"--color-page-bg":"#0E120C","--color-surface":"#171E14","--color-surface-raised":"#1E2619","--color-surface-subtle":"#1E2619","--color-surface-hover":"#232D1F","--color-surface-soft":"#182016","--color-surface-accent":"#1C2919","--color-text-primary":"#E8EDE5","--color-text-secondary":"#8B9A85","--color-text-tertiary":"#4F5C4A","--color-text-disabled":"#4F5C4A","--color-text-inverse":"#0E120C","--color-text-link":"#6AAF55","--color-primary":"#5D9B4A","--color-primary-hover":"#6AAF55","--color-primary-active":"#4E8A3C","--color-primary-light":"rgba(93, 155, 74, 0.15)","--color-primary-lighter":"rgba(93, 155, 74, 0.08)","--color-primary-dark":"#7CCB66","--color-primary-foreground":"#FFFFFF","--color-border":"#2E3829","--color-border-light":"#232D1F","--color-border-input":"#2E3829","--color-border-focus":"#5D9B4A","--color-border-strong":"#46583D","--color-success":"#56D364","--color-success-light":"rgba(86, 211, 100, 0.12)","--color-success-border":"rgba(86, 211, 100, 0.25)","--color-success-dark":"#7EE787","--color-warning":"#D29922","--color-warning-light":"rgba(210, 153, 34, 0.12)","--color-warning-border":"rgba(210, 153, 34, 0.25)","--color-warning-dark":"#E3B341","--color-error":"#F85149","--color-error-light":"#1D1114","--color-error-border":"rgba(248, 81, 73, 0.25)","--color-error-dark":"#FF7B72","--color-info":"#6AAF55","--color-info-light":"rgba(106, 175, 85, 0.12)","--color-info-border":"rgba(106, 175, 85, 0.25)","--color-info-dark":"#7CCB66","--color-sidebar-bg":"#0E120C","--color-sidebar-text":"#CCD4C7","--color-sidebar-hover":"#232D1F","--color-sidebar-active":"#1C2919","--color-sidebar-active-text":"#6AAF55","--color-sidebar-border":"#2E3829","--color-header-bg":"#171E14","--color-header-border":"#2E3829","--color-header-text":"#E8EDE5","--color-toolbar-bg":"#171E14","--color-panel-header-start":"#1E2619","--color-panel-header-end":"#182016","--color-table-header-bg":"#171E14","--color-table-header-text":"#E8EDE5","--color-table-row-hover":"#1E2619","--color-table-row-selected":"#1C2919","--color-table-border":"#232D1F","--color-accordion-header":"#171E14","--color-accordion-header-hover":"#232D1F","--color-menu-bg":"#171E14","--color-menu-item-hover":"#232D1F","--color-menu-item-active":"#1C2919","--color-menu-shadow":"rgba(0, 0, 0, 0.4)","--color-overlay-mask":"rgba(0, 0, 0, 0.55)","--color-calendar-today":"#5D9B4A","--color-calendar-weekend":"#FF7B72","--color-tooltip-bg":"#232D1F","--color-tooltip-text":"#E8EDE5","--color-progress-bg":"#232D1F","--color-progress-fill":"#5D9B4A","--color-switch-off":"#46583D","--color-switch-on":"#5D9B4A"}}],Vt="theme-light-override",Wt="theme-dark-override";function Ht(e){return Object.entries(e).map(function(e){var t=r(e,2),n=t[0],o=t[1];return" ".concat(n,": ").concat(o,";")}).join("\n")}function qt(e){Yt(Vt);var t=document.createElement("style");t.id=Vt,t.textContent=":root {\n".concat(Ht(e),"\n}"),document.head.appendChild(t)}function Kt(e){Yt(Wt);var t=document.createElement("style");t.id=Wt,t.textContent="html.dark {\n".concat(Ht(e),"\n}"),document.head.appendChild(t)}function Yt(e){var t=document.getElementById(e);t&&t.remove()}var Qt=function(){var e=y.useMainAppDispatch(),t=y.useMainAppSelector(function(e){return e.main.settings}),r=(null==t?void 0:t.theme)||"blue",n=v.useRef(null);return v.useEffect(function(){var e=zt.find(function(e){return e.key===r});e&&(qt(e.light),Kt(e.dark))},[]),P.jsxs(P.Fragment,{children:[P.jsx(y.DrawerPanel,{width:"320px",placement:"right",ref:n,title:P.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[P.jsx("div",{style:{fontSize:"18px",fontWeight:600,color:"var(--color-text-primary, #1F2937)"},children:F.tt("theme-title","Setting","Theme")}),P.jsx("div",{style:{fontSize:"12px",color:"var(--color-text-secondary, #6B7280)",marginTop:"4px"},children:F.tt("theme-desc","Setting","Choose a color theme for the interface. Changes apply immediately.")})]}),children:P.jsx("div",{style:{padding:"12px 16px 16px"},children:zt.map(function(t){var n,o=r===t.key,i=[(n=t.light)["--color-primary"]||"",n["--color-surface"]||"",n["--color-page-bg"]||"",n["--color-text-primary"]||""];return P.jsxs("label",{htmlFor:"theme-"+t.key,style:{display:"flex",alignItems:"center",padding:"14px 16px",marginBottom:"12px",borderRadius:"12px",cursor:"pointer",border:o?"1px solid var(--color-primary, #1677FF)":"1px solid var(--color-border, #E5E7EB)",background:o?"var(--color-primary-lighter, #F0F5FF)":"var(--color-surface, #FFFFFF)",transition:"border-color 0.15s, background 0.15s, transform 0.1s",boxShadow:o?"0 2px 8px rgba(22, 119, 255, 0.15)":"0 1px 3px rgba(0, 0, 0, 0.04)",transform:o?"translateY(-1px)":"none"},onMouseEnter:function(e){o||(e.currentTarget.style.borderColor="var(--color-border-input, #D0D5DD)",e.currentTarget.style.background="var(--color-surface-hover, #F0F5FF)")},onMouseLeave:function(e){o||(e.currentTarget.style.borderColor="var(--color-border, #E5E7EB)",e.currentTarget.style.background="var(--color-surface, #FFFFFF)")},children:[P.jsx("div",{style:{marginRight:"12px",flexShrink:0},children:P.jsx(D.RadioButton,{inputId:"theme-"+t.key,value:t.key,groupValue:r,onChange:function(r){return function(t,r){if(r){Yt(Vt),Yt(Wt);var n=zt.find(function(e){return e.key===t});n&&(qt(n.light),Kt(n.dark)),e(y.mergeSettings({theme:t}))}}(t.key,r)}})}),P.jsx("div",{style:{display:"flex",gap:"6px",marginRight:"14px",flexShrink:0},children:i.map(function(e,t){return P.jsx("span",{style:{display:"inline-block",width:"16px",height:"16px",borderRadius:"6px",backgroundColor:e,border:"1px solid rgba(0,0,0,0.08)",boxShadow:"0 1px 2px rgba(0,0,0,0.05)"}},t)})}),P.jsx(D.Label,{htmlFor:"theme-"+t.key,style:{margin:0,fontSize:"14px",fontWeight:o?600:500,color:o?"var(--color-primary, #1677FF)":"var(--color-text-primary, #1F2937)",cursor:"pointer",flex:1},children:F.tt("themes."+t.key,"Setting",t.name)}),o&&P.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"22px",height:"22px",borderRadius:"50%",background:"var(--color-primary, #1677FF)",color:"#fff",fontSize:"12px",fontWeight:700,flexShrink:0,boxShadow:"0 2px 6px rgba(22, 119, 255, 0.3)"},children:"✓"})]},t.key)})})}),P.jsx(D.LinkButton,{iconCls:"icon-more header-bar-btn",plain:!0,className:"k-menu-btn",onClick:function(){n.current.toggle()}})]})},Jt=new j.TabMenuService(0,function(e){return{id:e.id,text:e.title,iconCls:"iconfont "+e.icon,path:e.router_name,pid:e.pid,sort:e.sort,state:e.state,type:e.type}}),Xt={border:!1,plain:!0,scrollable:!0,narrow:!1},Zt={border:!1,animate:!0,multiple:!0,showCollapsedText:!1},er=v.forwardRef(function(e,t){var r=v.useId(),n="remember-".concat(r.replace(/:/g,"")),o=e.align||"right";return P.jsxs("div",{className:"f-full f-row f-vcenter",style:{justifyContent:"right"===o?"flex-end":"flex-start"},children:[P.jsx(D.TextBox,{ref:t,style:{display:"none"}}),P.jsx(D.CheckBox,{inputId:n,checked:e.checked,onChange:e.onChange}),P.jsx(D.Label,{htmlFor:n,className:"remember-me",style:{marginLeft:5,cursor:"pointer",userSelect:"none"},children:e.text||"Remember me"})]})});Object.defineProperty(exports,"renderTooltip",{enumerable:!0,get:function(){return y.renderTooltip}}),Object.defineProperty(exports,"Tooltip",{enumerable:!0,get:function(){return D.Tooltip}}),exports.AdminView=je,exports.AppLayoutContext=Ot,exports.BaseLayout=function(e){w.useNavigate(),k.useAppSelector(function(e){return e.user.info});var t={dispatch:k.useAppDispatch(),useAppSelector:k.useAppSelector},r=ae(Jt),n=r.collapsed,o=r.menuList,i=r.choiceId,a=r.onMenuSelection,l=r.menuArea,c=r.setMenuAreaId,s=r.menuTabList,d=r.onTabClosed,u=r.onTabSelected,f=r.onCloseCurrent,m=r.onCloseLeft,h=r.onCloseRight,x=r.onCloseOthers,g=r.onCloseAll,b=v.useMemo(function(){return l?l.map(function(e){return{id:e.id,text:e.text,iconCls:e.iconCls?"l-btn-icon-none iconfont "+e.iconCls:"",onClick:function(e){return c(e)}}}):[]},[l,c]),C=!n&&b.length>0?P.jsx(y.ResponsiveToolbar,{items:b}):null;return P.jsx(Ot.Provider,{value:t,children:P.jsx(y.FullBodyLayout,p(p({menus:o,title:F.tt("title","App","Admin"),collapsed:n,sidebarCfg:p(p({},Zt),{},{onItemClick:a}),selection:D.treeHelper.findNode(o,"id",i),toggle:function(e){var r;return null===(r=t.dispatch)||void 0===r?void 0:r.call(t,k.setSidebarCollapsed(e))},slots:{barLeft:C,barRight:P.jsx(function(){return P.jsxs(v.Fragment,{children:[P.jsx($t,{}),P.jsx(Gt,{}),P.jsx(Ut,{}),P.jsx(Qt,{})]})},{}),footer:P.jsx(function(){return P.jsx(v.Fragment,{children:e.footer||P.jsx("div",{className:"copyright",children:F.tt("copyright_text","App","Admin")})})},{}),mainHeader:P.jsx(function(){var e={closeCurrent:F.tt("close_current","Tabs"),closeLeft:F.tt("close_left","Tabs"),closeRight:F.tt("close_right","Tabs"),closeOthers:F.tt("close_others","Tabs"),closeAll:F.tt("close_all","Tabs")};return P.jsx(y.TabsPanel,{onTabSelect:u,tabsCfg:Xt,onTabClosed:d,onCloseCurrent:f,onCloseLeft:m,onCloseRight:h,onCloseOthers:x,onCloseAll:g,menuLabels:e,data:s})},{})},onSideMenuSelection:function(){}},e),{},{footerHeight:30,headerHeight:50,children:P.jsx(w.Outlet,{})}))})},exports.DictView=Pt,exports.HomeView=ke,exports.Lazy=function(e){return P.jsx(v.Suspense,{fallback:P.jsx(P.Fragment,{children:"..."}),children:e})},exports.LocaleBarItem=Gt,exports.LoginView=Je,exports.NotFoundView=It,exports.PaginationPanel=de,exports.PermissionsView=vt,exports.RememberMeBox=er,exports.RolesView=ct,exports.RouterView=Ne,exports.ScreenDesign=function(e){e.pageConfig,e.fetchConfig,e.pageVersion;return v.useRef(null),P.jsx(y.DefaultPanel,{mode:"cover",children:P.jsxs(D.Layout,{style:{width:"100%",height:"100%"},children:[P.jsx(D.LayoutPanel,{region:"north",style:{height:50},children:"North Region"}),P.jsx(D.LayoutPanel,{region:"south",style:{height:50},children:"South Region"}),P.jsx(D.LayoutPanel,{region:"west",style:{width:240},children:P.jsx("div",{style:{},children:"West Region"})}),P.jsx(D.LayoutPanel,{region:"east",style:{width:240},children:P.jsx("div",{style:{},children:"East Region"})}),P.jsx(D.LayoutPanel,{region:"center",style:{width:"100%",height:"100%"},children:P.jsx(Mt,{})})]})})},exports.SettingBarItem=Qt,exports.SettingView=Ke,exports.ThemeSwitch=Ut,exports.adminService=re,exports.authService=oe,exports.configService=ne,exports.convertToText=K,exports.ctxPageValue=function(e,t){var r;return(null==e||null===(r=e.getMethod("pgVal"))||void 0===r?void 0:r(t))||{}},exports.ctxPageValueOptions=function(e,t){var r;return(null==e||null===(r=e.getMethod("pgOptions"))||void 0===r?void 0:r(t))||[]},exports.fetchConfigOptions=X,exports.install=function(e){var t,r,n;r=e.request,I||(I=r),n=null!==(t=e.apis)&&void 0!==t?t:{},U=p(p({},U),n)},exports.parseIconList=ee,exports.permissionTree=Y,exports.queryPermissionTress=Q,exports.rbacService=te,exports.registerIcons=function(t){Z=[].concat(e(Z),e(t))},exports.removeEventFn=H,exports.renderDateTime02=M,exports.renderFetchConfigValue=O,exports.renderText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t?P.jsx("span",{className:"iconfont "+t,children:e}):P.jsx("span",{children:e})},exports.renderType=function(){return P.jsx("div",{children:"Type"})},exports.resourceAccessItems=W,exports.resourceRemoveEvent=q,exports.resourceService=V,exports.roleTree=J,exports.setIconList=function(e){Z=e},exports.useAppRedirect=le,exports.useAppStarter=function(){var e=y.useLocale().locale,t=r(v.useState(),2),n=t[0],o=t[1],i=le();return v.useEffect(function(){F.setLanguage(e,function(){o(F.getActivePkg())}),i.autoRedirect()},[]),v.useEffect(function(){o(F.getActivePkg())},[e]),{easyuiLangPkg:n}},exports.useLocalTable=ce,exports.useMenuAndTabData=ae,exports.useTable=se,exports.withDocHoc=ue;
|
|
11
|
+
//# sourceMappingURL=index.umd.cjs.map
|