← Back
Editing: index-legacy272.js
!function(){function t(e){return t="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},t(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return n};var r,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(r){s=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),u=new G(n||[]);return a(i,"_invoke",{value:S(t,r,u)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var y="suspendedStart",d="suspendedYield",v="executing",g="completed",m={};function w(){}function b(){}function _(){}var x={};s(x,c,(function(){return this}));var j=Object.getPrototypeOf,P=j&&j(j(N([])));P&&P!==o&&i.call(P,c)&&(x=P);var O=_.prototype=w.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function L(e,r){function n(o,a,u,c){var l=h(e[o],e,a);if("throw"!==l.type){var f=l.arg,s=f.value;return s&&"object"==t(s)&&i.call(s,"__await")?r.resolve(s.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):r.resolve(s).then((function(t){f.value=t,u(f)}),(function(t){return n("throw",t,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r((function(r,o){n(t,e,r,o)}))}return o=o?o.then(i,i):i()}})}function S(t,e,n){var o=y;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:r,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(t,e,n);if("normal"===l.type){if(o=n.done?g:d,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=g,n.method="throw",n.arg=l.arg)}}}function k(t,e){var n=e.method,o=t.iterator[n];if(o===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,k(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,m;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function N(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o<e.length;)if(i.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return b.prototype=_,a(O,"constructor",{value:_,configurable:!0}),a(_,"constructor",{value:b,configurable:!0}),b.displayName=s(_,f,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,s(t,f,"GeneratorFunction")),t.prototype=Object.create(O),t},n.awrap=function(t){return{__await:t}},E(L.prototype),s(L.prototype,l,(function(){return this})),n.AsyncIterator=L,n.async=function(t,e,r,o,i){void 0===i&&(i=Promise);var a=new L(p(t,e,r,o),i);return n.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(O),s(O,f,"Generator"),s(O,c,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=N,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,o){return u.type="throw",u.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:N(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),m}},n}function r(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function u(t){r(a,o,i,u,c,"next",t)}function c(t){r(a,o,i,u,c,"throw",t)}u(void 0)}))}}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function a(e,r,n){return(r=function(e){var r=function(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==t(r)?r:r+""}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}System.register(["./utils-lib-legacy.js?v=VERSION_NUMBER","./index-legacy103.js?v=VERSION_NUMBER","./index-legacy112.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./index-legacy130.js?v=VERSION_NUMBER","./firewall-legacy.js?v=VERSION_NUMBER","./column-legacy.js?v=VERSION_NUMBER","./useMethod-legacy6.js?v=VERSION_NUMBER","./index.vue_vue_type_script_setup_true_lang-legacy11.js?v=VERSION_NUMBER","./useStore-legacy5.js?v=VERSION_NUMBER","./index.vue_vue_type_script_setup_true_lang-legacy12.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER","./index-legacy104.js?v=VERSION_NUMBER","./validator-legacy.js?v=VERSION_NUMBER","./index.vue_vue_type_style_index_0_scoped_b3c4124c_lang-legacy.js?v=VERSION_NUMBER"],(function(t,r){"use strict";var o,a,u,c,l,f,s,p,h,y,d,v,g,m,w,b,_,x,j,P,O,E,L,S,k,T,A,G,N,F,D,I,q,C,H,U;return{setters:[function(t){o=t.n,a=t.L,u=t.K,c=t.S,l=t.J,f=t.l,s=t.a0,p=t.p},function(t){h=t._},function(t){y=t._},function(t){d=t.c,v=t.r,g=t.k,m=t.p,w=t.G,b=t.q,_=t.v,x=t.x,j=t.M,P=t.A,O=t.e,E=t.C,L=t.B,S=t.P,k=t.H,T=t.D},function(t){A=t._},function(t){G=t.D,N=t.E},function(t){F=t.a},function(t){D=t.r,I=t.e,q=t.f},function(t){C=t._},function(t){H=t.g},function(t){U=t._},null,null,null,null],execute:function(){var V={class:"min-h-[30rem]"};t("default",d({__name:"index",setup:function(t){var d,M=H().refs,Y=M.systemTabActive,B=M.firewallInfo,J=v(),K=v([]),R=v(""),z=v(0),Q=v(!1),W=g({p:1,row:20}),X=function(t,e){o({title:t?"修改端口转发规则":"添加端口转发规则",area:44,component:function(){return a((function(){return r.import("./add-port-transmit-legacy.js?v=VERSION_NUMBER")}),void 0,r.meta.url)},showFooter:!0,compData:i(i({},e),{},{isEdit:t,refreshFn:Z})})},Z=function(){var t=n(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("forward"===Y.value){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,u({loading:Q,request:G({query:R.value}),data:{data:[Array,K],page:c(z)}});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),$=function(t,e){return{operation:e,protocol:t.Protocol.toLowerCase(),S_Address:t.S_Address,S_Port:t.S_Port,T_Address:t.T_Address,T_Port:t.T_Port}},tt=function(){var t=n(e().mark((function t(r){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p({icon:"warning-filled",title:"删除端口转发规则【源端口:"+r.S_Port+" -> 目标端口:"+r.T_Port+"】",content:"删除选中规则后,该源端口将停止转发至目标端口,是否继续操作?"});case 2:return t.next=4,u({loading:"正在删除IP规则,请稍后...",request:N($(r,"remove")),message:!0,success:Z});case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),et=[F(),{label:"协议",prop:"Protocol"},{label:"源端口",prop:"S_Port"},{label:"目标IP",render:function(t){return t.T_Address?t.T_Address:"127.0.0.1"}},{label:"目标端口",prop:"T_Port"},{label:"时间",prop:"addtime",renderHeader:function(){return D("时间","-- : 表示面板数据库中未记录创建时间,规则从系统中直接读取,忽略即可")}},{label:"备注",prop:"brief"},I({editEvent:function(t){X(!0,t)},deleteEvent:tt})],rt=[{label:"删除",value:"delete",event:(d=n(e().mark((function t(r,o){var i;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=function(){var t=n(e().mark((function t(r,n){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,N($(r,"remove"));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),t.next=3,q(r,o,i,{label:"端口",prop:"T_Address"},Z);case 3:case"end":return t.stop()}}),t)}))),function(t,e){return d.apply(this,arguments)})}];return m((function(){return Z()})),function(t,e){var r=A,n=T,o=l,i=f,a=s,u=y,c=h,p=w("bt-loading");return b(),_("div",V,[x(B).init_status?E("",!0):(b(),j(r,{key:0,width:"38rem"},{content:P((function(){return[O(U)]})),_:1})),O(c,null,{"header-left":P((function(){return[O(n,{type:"primary",onClick:e[0]||(e[0]=function(t){return X()})},{default:P((function(){return e[6]||(e[6]=[L(" 添加端口转发 ")])})),_:1}),O(C,{type:"forward",refreshFn:Z})]})),"header-right":P((function(){return[O(o,{class:"!w-[32rem]",modelValue:x(R),"onUpdate:modelValue":e[1]||(e[1]=function(t){return S(R)?R.value=t:null}),onSearch:e[2]||(e[2]=function(t){return Z()}),placeholder:"请输入端口/来源"},null,8,["modelValue"])]})),content:P((function(){return[k(O(i,{ref_key:"portTransmitRef",ref:J,column:et,data:x(K),description:"端口转发列表为空"},null,8,["data"]),[[p,x(Q)],[p,"正在加载端口转发列表,请稍后...","title"]])]})),"footer-left":P((function(){return[O(a,{"table-ref":x(J),options:rt},null,8,["table-ref"])]})),"footer-right":P((function(){return[O(u,{total:x(z),page:x(W).p,"onUpdate:page":e[3]||(e[3]=function(t){return x(W).p=t}),row:x(W).row,"onUpdate:row":e[4]||(e[4]=function(t){return x(W).row=t}),onChange:e[5]||(e[5]=function(t){return Z()}),name:"forward"},null,8,["total","page","row"])]})),_:1})])}}}))}}}))}();
Save File
Cancel