← Back
Editing: index-legacy483.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 r};var n,r={},o=Object.prototype,a=o.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(n){f=function(t,e,n){return t[e]=n}}function p(t,e,n,r){var o=e&&e.prototype instanceof b?e:b,a=Object.create(o.prototype),u=new R(r||[]);return i(a,"_invoke",{value:O(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}r.wrap=p;var v="suspendedStart",m="suspendedYield",y="executing",d="completed",g={};function b(){}function w(){}function x(){}var L={};f(L,c,(function(){return this}));var _=Object.getPrototypeOf,j=_&&_(_(T([])));j&&j!==o&&a.call(j,c)&&(L=j);var k=x.prototype=b.prototype=Object.create(L);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function B(e,n){function r(o,i,u,c){var s=h(e[o],e,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==t(f)&&a.call(f,"__await")?n.resolve(f.__await).then((function(t){r("next",t,u,c)}),(function(t){r("throw",t,u,c)})):n.resolve(f).then((function(t){l.value=t,u(l)}),(function(t){return r("throw",t,u,c)}))}c(s.arg)}var o;i(this,"_invoke",{value:function(t,e){function a(){return new n((function(n,o){r(t,e,n,o)}))}return o=o?o.then(a,a):a()}})}function O(t,e,r){var o=v;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:n,done:!0}}for(r.method=a,r.arg=i;;){var u=r.delegate;if(u){var c=S(u,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===v)throw o=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=y;var s=h(t,e,r);if("normal"===s.type){if(o=r.done?d:m,s.arg===g)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=d,r.method="throw",r.arg=s.arg)}}}function S(t,e){var r=e.method,o=t.iterator[r];if(o===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=n,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var a=h(o,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,g;var i=a.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,g):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function C(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 P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function t(){for(;++o<e.length;)if(a.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=n,t.done=!0,t};return i.next=i}}throw new TypeError(t(e)+" is not iterable")}return w.prototype=x,i(k,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,l,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(k),t},r.awrap=function(t){return{__await:t}},E(B.prototype),f(B.prototype,s,(function(){return this})),r.AsyncIterator=B,r.async=function(t,e,n,o,a){void 0===a&&(a=Promise);var i=new B(p(t,e,n,o),a);return r.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(k),f(k,l,"Generator"),f(k,c,(function(){return this})),f(k,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},r.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&a.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},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 r(r,o){return u.type="throw",u.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),s=a.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},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),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),g}},r}function n(t,e,n,r,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function r(t){return function(){var e=this,r=arguments;return new Promise((function(o,a){var i=t.apply(e,r);function u(t){n(i,o,a,u,c,"next",t)}function c(t){n(i,o,a,u,c,"throw",t)}u(void 0)}))}}System.register(["./utils-lib-legacy.js?v=1765440387","./index-legacy104.js?v=1765440387","./base-lib-legacy.js?v=1765440387","./site-legacy.js?v=1765440387","./useStore-legacy5.js?v=1765440387","./column-legacy.js?v=1765440387","./useController-legacy6.js?v=1765440387","./__commonjsHelpers__-legacy.js?v=1765440387","./useMethod-legacy5.js?v=1765440387","./validator-legacy.js?v=1765440387","./index-legacy105.js?v=1765440387","./useStore-legacy4.js?v=1765440387"],(function(t,n){"use strict";var o,a,i,u,c,s,l,f,p,h,v,m,y,d,g,b,w,x,L,_,j,k,E,B,O,S,C,P,R,T,D;return{setters:[function(t){o=t.aM,a=t.n,i=t.L,u=t.a6,c=t.p,s=t.K,l=t.a7,f=t.a8,p=t.M,h=t.at,v=t.W,m=t.a2},function(t){y=t._},function(t){d=t.j,g=t.r,b=t.s,w=t.c,x=t.q,L=t.v,_=t.e,j=t.A,k=t.x,E=t.y},function(t){B=t.getDirAuth,O=t.getFileDeny,S=t.deleteDirAuth,C=t.delFileDeny},function(t){P=t.u},function(t){R=t.a,T=t.u},function(t){D=t.o},null,null,null,null,null],execute:function(){var N=d("wp-wordpress-security",(function(){return{isRefreshLimitList:g(!1),isRefreshDenyList:g(!1)}})),G=b(P()).localRow,F=function(){var t=r(e().mark((function t(n){var r,o;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,B({id:G.value.id});case 3:return r=t.sent,o=r.data,t.abrupt("return",{data:o[G.value.name],total:0,other:{search_history:[]}});case 8:return t.prev=8,t.t0=t.catch(0),t.abrupt("return",{data:[],total:0,other:{search_history:[]}});case 12:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e){return t.apply(this,arguments)}}(),q=function(){var t=r(e().mark((function t(n){var r,o;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,O({website:G.value.name});case 3:return r=t.sent,o=r.data,t.abrupt("return",{data:o,total:0,other:{search_history:[]}});case 8:return t.prev=8,t.t0=t.catch(0),t.abrupt("return",{data:[],total:0,other:{search_history:[]}});case 12:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e){return t.apply(this,arguments)}}(),A={class:"flex flex-col"},I=w({__name:"limit",setup:function(t){var m,d=b(P()).localRow,g=b(N()).isRefreshLimitList,w=o({options:[{onClick:function(){a({title:"添加限制访问",area:48,component:function(){return i((function(){return n.import("./limit-form-legacy.js?v=1765440387")}),void 0,n.meta.url)},compData:{isEdit:!1,siteId:d.value.id,getList:function(){g.value=!0}},btn:!0})},type:"button",active:!0,label:"添加限制访问"}]}).BtOperation,B=f([{label:"批量删除",value:"delete",event:(m=r(e().mark((function t(n,o,a,i){var u,s;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c({title:"批量删除限制访问规则",content:"批量删除选中的限制访问规则,该操作可能会存在风险,是否继续?"});case 2:return u=p.load("正在删除,请稍后..."),t.prev=3,t.next=6,Promise.all(a.value.map(function(){var t=r(e().mark((function t(n){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,S({id:d.value.id,name:n.name});case 3:if(!t.sent.data.status){t.next=9;break}return t.abrupt("return",{name:n.name,status:!0});case 9:return t.abrupt("return",{name:n.name,status:!1});case 10:t.next=15;break;case 12:return t.prev=12,t.t0=t.catch(0),t.abrupt("return",{name:n.name,status:!1});case 15:case"end":return t.stop()}}),t,null,[[0,12]])})));return function(e){return t.apply(this,arguments)}}()));case 6:s=t.sent,D({resultData:s,resultTitle:"删除限制访问规则"}),g.value=!0,t.next=14;break;case 11:t.prev=11,t.t0=t.catch(3),h(t.t0);case 14:return t.prev=14,u.close(),t.finish(14);case 17:case"end":return t.stop()}}),t,null,[[3,11,14,17]])}))),function(t,e,n,r){return m.apply(this,arguments)})}]),O=u({request:function(t){return F()},columns:[R(),{label:"名称",prop:"name"},{label:"路径",prop:"site_dir"},T([{onClick:function(t){a({title:"添加限制访问",area:48,component:function(){return i((function(){return n.import("./limit-form-legacy.js?v=1765440387")}),void 0,n.meta.url)},compData:{isEdit:!0,siteId:d.value.id,row:t,getList:function(){g.value=!0}},btn:!0})},title:"编辑"},{onClick:function(t){var n;c({title:"删除限制访问规则【".concat(t.name,"】"),content:"删除选中的规则后,访问".concat(t.site_dir,"将不再需要安全验证,是否继续操作?"),icon:"warning-filled",type:"calc",onConfirm:(n=r(e().mark((function n(){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s({loading:"正在删除,请稍后...",request:S({id:d.value.id,name:t.name}),message:!0,success:function(){g.value=!0}});case 2:case"end":return e.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},title:"删除"}])],extension:[l(g),B]}),C=O.BtTable,G=(O.BtPage,O.BtRecommendSearch,O.BtRefresh,O.BtColumn,O.BtBatch);O.BtTableCategory,O.BtErrorMask,O.tableRef,O.classList,O.refresh;return function(t,e){var n=v,r=y;return x(),L("div",null,[_(r,null,{"header-left":j((function(){return[_(k(w))]})),content:j((function(){return[_(k(C))]})),"footer-left":j((function(){return[E("div",A,[_(k(G)),_(n,{options:[{content:"目录设置加密访问后,访问时需要输入账号密码才能访问"},{content:"例如我设置了加密访问 /test/ ,那我访问 http://aaa.com/test/ 时就要输入账号密码才能访问"}],class:"ml-[20px] mt-[20px]"})])]})),_:1})])}}}),M={class:"flex flex-col"},Y=w({__name:"deny",setup:function(t){var m,d=b(P()).localRow,g=b(N()).isRefreshDenyList,w=o({options:[{onClick:function(){a({title:"添加拒绝访问",area:48,component:function(){return i((function(){return n.import("./deny-form-legacy.js?v=1765440387")}),void 0,n.meta.url)},compData:{isEdit:!1,siteName:d.value.name,getList:function(){g.value=!0}},btn:!0})},type:"button",active:!0,label:"添加拒绝访问"}]}).BtOperation,B=f([{label:"删除",value:"delete",event:(m=r(e().mark((function t(n,o,a,i){var u,s;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c({title:"批量删除拒绝访问规则",content:"批量删除选中的拒绝访问规则,该操作可能会存在风险,是否继续?"});case 2:return u=p.load("正在删除,请稍后..."),t.prev=3,t.next=6,Promise.all(a.value.map(function(){var t=r(e().mark((function t(n){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,C({website:d.value.name,deny_name:n.name});case 3:if(!t.sent.data.status){t.next=9;break}return t.abrupt("return",{name:n.name,status:!0});case 9:return t.abrupt("return",{name:n.name,status:!1});case 10:t.next=15;break;case 12:return t.prev=12,t.t0=t.catch(0),t.abrupt("return",{name:n.name,status:!1});case 15:case"end":return t.stop()}}),t,null,[[0,12]])})));return function(e){return t.apply(this,arguments)}}()));case 6:s=t.sent,D({resultData:s,resultTitle:"删除拒绝访问规则"}),g.value=!0,t.next=14;break;case 11:t.prev=11,t.t0=t.catch(3),h(t.t0);case 14:return t.prev=14,u.close(),t.finish(14);case 17:case"end":return t.stop()}}),t,null,[[3,11,14,17]])}))),function(t,e,n,r){return m.apply(this,arguments)})}]),O=u({request:function(t){return q()},columns:[R(),{label:"名称",prop:"name"},{label:"路径",prop:"dir"},T([{onClick:function(t){a({title:"添加拒绝访问",area:48,component:function(){return i((function(){return n.import("./deny-form-legacy.js?v=1765440387")}),void 0,n.meta.url)},compData:{isEdit:!0,siteName:d.value.name,row:t,getList:function(){g.value=!0}},btn:!0})},title:"编辑"},{onClick:function(t){var n;c({title:"删除拒绝访问规则【".concat(t.name,"】"),content:"删除选中的规则后,访问".concat(t.dir,"该保护目录将失去防护,是否继续操作?"),icon:"warning-filled",type:"calc",onConfirm:(n=r(e().mark((function n(){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s({loading:"正在删除,请稍后...",request:C({website:d.value.name,deny_name:t.name}),message:!0,success:function(){g.value=!0}});case 2:case"end":return e.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},title:"删除"}])],extension:[l(g),B]}),S=O.BtTable,G=(O.BtPage,O.BtRecommendSearch,O.BtRefresh,O.BtColumn,O.BtBatch);O.BtTableCategory,O.BtErrorMask,O.tableRef,O.classList,O.refresh;return function(t,e){var n=v,r=y;return x(),L("div",null,[_(r,null,{"header-left":j((function(){return[_(k(w))]})),content:j((function(){return[_(k(S))]})),"footer-left":j((function(){return[E("div",M,[_(k(G)),_(n,{options:[{content:"后缀:禁止访问的文件后缀"},{content:"目录:规则会在这个目录内生效"}],class:"mt-4px"})])]})),_:1})])}}});t("default",w({__name:"index",setup:function(t){var e=g("access"),r=m({type:"card",options:[{name:"access",label:"访问限制",render:function(){return I}},{name:"deny",label:"拒绝访问",render:function(){return Y}},{name:"hotlink",label:"防盗链",render:function(){return i((function(){return n.import("./index-legacy206.js?v=1765440387")}),void 0,n.meta.url)}}],value:e}).BtTabs;return function(t,e){return x(),L("div",null,[_(k(r))])}}}))}}}))}();
Save File
Cancel