!function(){function t(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t=function(){return i};var r,i={},n=Object.prototype,o=n.hasOwnProperty,p=Object.defineProperty||function(t,r,e){t[r]=e.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",m=a.asyncIterator||"@@asyncIterator",h=a.toStringTag||"@@toStringTag";function c(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{c({},"")}catch(r){c=function(t,r,e){return t[r]=e}}function g(t,r,e,i){var n=r&&r.prototype instanceof y?r:y,o=Object.create(n.prototype),a=new A(i||[]);return p(o,"_invoke",{value:S(t,e,a)}),o}function d(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}i.wrap=g;var f="suspendedStart",x="suspendedYield",s="executing",u="completed",b={};function y(){}function w(){}function v(){}var z={};c(z,l,(function(){return this}));var k=Object.getPrototypeOf,j=k&&k(k(T([])));j&&j!==n&&o.call(j,l)&&(z=j);var L=v.prototype=y.prototype=Object.create(z);function E(t){["next","throw","return"].forEach((function(r){c(t,r,(function(t){return this._invoke(r,t)}))}))}function I(t,r){function i(n,p,a,l){var m=d(t[n],t,p);if("throw"!==m.type){var h=m.arg,c=h.value;return c&&"object"==e(c)&&o.call(c,"__await")?r.resolve(c.__await).then((function(t){i("next",t,a,l)}),(function(t){i("throw",t,a,l)})):r.resolve(c).then((function(t){h.value=t,a(h)}),(function(t){return i("throw",t,a,l)}))}l(m.arg)}var n;p(this,"_invoke",{value:function(t,e){function o(){return new r((function(r,n){i(t,e,r,n)}))}return n=n?n.then(o,o):o()}})}function S(t,e,i){var n=f;return function(o,p){if(n===s)throw new Error("Generator is already running");if(n===u){if("throw"===o)throw p;return{value:r,done:!0}}for(i.method=o,i.arg=p;;){var a=i.delegate;if(a){var l=O(a,i);if(l){if(l===b)continue;return l}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(n===f)throw n=u,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n=s;var m=d(t,e,i);if("normal"===m.type){if(n=i.done?u:x,m.arg===b)continue;return{value:m.arg,done:i.done}}"throw"===m.type&&(n=u,i.method="throw",i.arg=m.arg)}}}function O(t,e){var i=e.method,n=t.iterator[i];if(n===r)return e.delegate=null,"throw"===i&&t.iterator.return&&(e.method="return",e.arg=r,O(t,e),"throw"===e.method)||"return"!==i&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+i+"' method")),b;var o=d(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,b;var p=o.arg;return p?p.done?(e[t.resultName]=p.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,b):p:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,b)}function _(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function N(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function T(t){if(t||""===t){var i=t[l];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,p=function e(){for(;++n=0;--n){var p=this.tryEntries[n],a=p.completion;if("root"===p.tryLoc)return i("end");if(p.tryLoc<=this.prev){var l=o.call(p,"catchLoc"),m=o.call(p,"finallyLoc");if(l&&m){if(this.prev=0;--e){var i=this.tryEntries[e];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),N(e),b}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var i=e.completion;if("throw"===i.type){var n=i.arg;N(e)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,i){return this.delegate={iterator:T(t),resultName:e,nextLoc:i},"next"===this.method&&(this.arg=r),b}},i}function r(t,r,e,i,n,o,p){try{var a=t[o](p),l=a.value}catch(m){return void e(m)}a.done?r(l):Promise.resolve(l).then(i,n)}function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function i(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var i,n,o,p,a=[],l=!0,m=!1;try{if(o=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;l=!1}else for(;!(l=(i=o.call(e)).done)&&(a.push(i.value),a.length!==r);l=!0);}catch(t){m=!0,n=t}finally{try{if(!l&&null!=e.return&&(p=e.return(),Object(p)!==p))return}finally{if(m)throw n}}return a}}(t,r)||o(t,r)||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(t,r){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=o(t))||r&&t&&"number"==typeof t.length){e&&(t=e);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var p,a=!0,l=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){l=!0,p=t},f:function(){try{a||null==e.return||e.return()}finally{if(l)throw p}}}}function o(t,r){if(t){if("string"==typeof t)return p(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?p(t,r):void 0}}function p(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,i=new Array(r);e1&&void 0!==arguments[1])||arguments[1];return t.map((function(t){var e=function(t,r){var e={path:P(t.paths)?t.paths:r?"/".concat(t.paths):t.paths,name:Symbol(t.paths),meta:{hidden:!t.isShow,keepAlive:!!t.isCache,title:t.menuName,perms:t.perms,query:t.params,icon:t.menuIcon,type:t.menuType,activeMenu:t.selected}};switch(t.menuType){case G.CATALOGUE:e.component=r?LAYOUT:RouterView,t.children||(e.component=RouterView);break;case G.MENU:e.component=loadRouteView(t.component)}return e}(t,r);return null!=t.children&&t.children&&t.children.length&&(e.children=M(t.children,!1)),e}))}var U=[{path:"/",name:"App",redirect:"/login",component:E,children:[]},{path:"/admin",name:"Admin",meta:{title:"后台管理"},component:function(){return I((function(){return p.import("./Index-legacy-dc28edea.js")}))},redirect:"/admin/dashboard",children:[{path:"dashboard",name:"首页",meta:{title:"首页",breadcrumb:["后台管理","首页"]},component:function(){return I((function(){return p.import("./Index-legacy-cc764cc1.js")}))}},{path:"setup",name:"参数配置",meta:{title:"参数配置",breadcrumb:["后台管理","参数配置"]},component:function(){return I((function(){return p.import("./Index-legacy-44647e93.js")}))}},{path:"metering",name:"计量系统",meta:{title:"计量系统",breadcrumb:["后台管理","计量系统"]},component:function(){return I((function(){return p.import("./Index-legacy-32cc0dfb.js")}))}},{path:"comm",name:"通信系统",meta:{title:"通信系统",breadcrumb:["后台管理","通信系统"]},component:function(){return I((function(){return p.import("./Index-legacy-dd7ace83.js")}))}},{path:"upgrade",name:"固件升级",meta:{title:"固件升级",breadcrumb:["后台管理","固件升级"]},component:function(){return I((function(){return p.import("./Index-legacy-6fd85de3.js")}))}},{path:"log",name:"事件",meta:{title:"事件",breadcrumb:["后台管理","事件"]},component:function(){return I((function(){return p.import("./Index-legacy-c77c6e0b.js")}))}}]},{path:"/:pathMatch(.*)*",name:"NotFound",meta:{title:"错误页面"},component:function(){return I((function(){return p.import("./NotFound-legacy-2c874b8f.js")}))}},{path:"/login",name:"Login",meta:{title:"登录"},component:function(){return I((function(){return p.import("./Index-legacy-53b0821e.js")}))}}],C=Symbol();var F=o("r",b({history:y(),routes:U})),Y=A.LOGIN;A.INDEX;var q=[A.LOGIN,A.ERROR_403];F.beforeEach(function(){var e,i=(e=t().mark((function r(e,i,n){var o;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return document.title=e.meta.title+" - 正辉电表采集",o=R(),t.next=4,o.getMenu();case 4:if(o.routes,!q.includes(e.path)){t.next=10;break}n(),t.next=27;break;case 10:if(!o.token){t.next=25;break}return t.prev=11,t.next=14,o.getMenu();case 14:o.routes,n(),t.next=23;break;case 19:t.prev=19,t.t0=t.catch(11),N(),n({path:Y,query:{redirect:e.fullPath}});case 23:t.next=27;break;case 25:n({path:Y,query:{redirect:e.fullPath}});case 27:case"end":return t.stop()}}),r,null,[[11,19]])})),function(){var t=this,i=arguments;return new Promise((function(n,o){var p=e.apply(t,i);function a(t){r(p,n,o,a,l,"next",t)}function l(t){r(p,n,o,a,l,"throw",t)}a(void 0)}))});return function(t,r,e){return i.apply(this,arguments)}}()),F.afterEach((function(){}));for(var K=["xlink:href"],D=L(g({__name:"svgIcon",props:{name:{type:String,required:!0},color:{type:String,default:""}},setup:function(t){var r=t,e=d((function(){return"#icon-".concat(r.name)})),i=d((function(){return r.name?"svg-icon icon-".concat(r.name):"svg-icon"}));return function(r,n){return l(),f("svg",s({class:i.value},r.$attrs,{style:{color:t.color}}),[x("use",{"xlink:href":e.value},null,8,K)],16)}}}),[["__scopeId","data-v-8de19606"]]),V=u(E),J=v(),X=0,$=Object.entries(k);X<$.length;X++){var B=i($[X],2),H=B[0],Q=B[1];V.component(H,Q)}V.use(z,{size:"small",zIndex:3e3}),V.use(F),V.use(J),V.component("SvgIcon",D),V.mount("#app")}}}))}();