File: /www/server/panel/BTPanel/static/js/row-reinforce-legacy.js
!function(){function e(t){return e="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},e(t)}function t(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(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 r(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 n(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 o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){u(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function u(t,r,n){return(r=function(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==e(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function a(){/*! 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 u(r,n,o,u){var a=n&&n.prototype instanceof l?n:l,f=Object.create(a.prototype);return i(f,"_invoke",function(r,n,o){var u,a,i,l=0,f=o||[],s=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return u=t,a=0,i=e,p.n=r,c}};function d(r,n){for(a=r,i=n,t=0;!s&&l&&!o&&t<f.length;t++){var o,u=f[t],d=p.p,m=u[2];r>3?(o=m===n)&&(i=u[(a=u[4])?5:(a=3,3)],u[4]=u[5]=e):u[0]<=d&&((o=r<2&&d<u[1])?(a=0,p.v=n,p.n=u[1]):d<m&&(o=r<3||u[0]>n||n>m)&&(u[4]=r,u[5]=n,p.n=m,a=0))}if(o||r>1)return c;throw s=!0,n}return function(o,f,m){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,m),a=f,i=m;(t=a<2?e:i)||!s;){u||(a?a<3?(a>1&&(p.n=-1),d(a,i)):p.n=i:p.v=i);try{if(l=2,u){if(a||(o="next"),t=u[o]){if(!(t=t.call(u,i)))throw TypeError("iterator result is not an object");if(!t.done)return t;i=t.value,a<2&&(a=0)}else 1===a&&(t=u.return)&&t.call(u),a<2&&(i=TypeError("The iterator does not provide a '"+o+"' method"),a=1);u=e}else if((t=(s=p.n<0)?i:r.call(n,p))!==c)break}catch(t){u=e,a=1,i=t}finally{l=1}}return{value:t,done:s}}}(r,o,u),!0),f}var c={};function l(){}function f(){}function s(){}t=Object.getPrototypeOf;var p=[][n]?t(t([][n]())):(i(t={},n,function(){return this}),t),d=s.prototype=l.prototype=Object.create(p);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,i(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return f.prototype=s,i(d,"constructor",s),i(s,"constructor",f),f.displayName="GeneratorFunction",i(s,o,"GeneratorFunction"),i(d),i(d,o,"Generator"),i(d,n,function(){return this}),i(d,"toString",function(){return"[object Generator]"}),(a=function(){return{w:u,m:m}})()}function i(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}i=function(e,t,r,n){function u(t,r){i(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:(u("next",0),u("throw",1),u("return",2))},i(e,t,r,n)}function c(e,t,r,n,o,u,a){try{var i=e[u](a),c=i.value}catch(e){return void r(e)}i.done?t(c):Promise.resolve(c).then(n,o)}function l(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var u=e.apply(t,r);function a(e){c(u,n,o,a,i,"next",e)}function i(e){c(u,n,o,a,i,"throw",e)}a(void 0)})}}System.register(["./utils-lib-legacy.js?v=1777008528","./index-legacy118.js?v=1777008528","./base-lib-legacy.js?v=1777008528","./index-legacy116.js?v=1777008528","./firewall-legacy.js?v=1777008528","./index-legacy3.js?v=1777008528","./__commonjsHelpers__-legacy.js?v=1777008528","./index-legacy119.js?v=1777008528"],function(e,r){"use strict";var n,u,i,c,f,s,p,d,m,y,b,h,v,g,w,_,j,O,S,P,k,x,V,T,A,E,D,G,q,C;return{setters:[function(e){n=e.k,u=e.d3,i=e.cO,c=e.K,f=e.cP},function(e){s=e._},function(e){p=e.c,d=e.V,m=e.r,y=e.e,b=e.o,h=e.I,v=e.j,g=e.k,w=e.v,_=e.x,j=e.J,O=e.p,S=e.Q,P=e.z,k=e.ad,x=e.am,V=e.an,T=e.ab},function(e){A=e._},function(e){E=e.au,D=e.av,G=e.aw},function(e){q=e.g,C=e.w},null,null],execute:function(){var r={class:"px-[1.6rem] py-[1.6rem]"};e("default",p({__name:"row-reinforce",props:{compData:{default:function(){return{}}}},setup:function(e){var p=e.compData.key,F=d(!1),I={a:"追加",i:"只读"},U=d([]),N=m(),R=d(!1),z=m({path:"",chattr:"i",d_mode:""}),H=[{content:"【只读】无法修改、创建、删除文件和目录"},{content:"【追加】只能追加内容,不能删除或修改原有内容"},{content:"【权限】设置文件或目录在受保护状态下的权限(非继承),关闭保护后权限自动还原"},{content:"【如何填写权限】请填写Linux权限代号,如:644、755、600、555等,如果不填写,则使用文件原来的权限"}],J={path:[{required:!0,message:"请输入被保护的文件或路径",trigger:["blur","change"]}],d_mode:[{required:!0,message:"请输入权限",trigger:["blur","change"]}]},K=function(){var e=l(a().m(function e(){return a().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,n({loading:F,request:E({s_key:p}),data:{paths:[Array,U]}});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),L=function(){var e=l(a().m(function e(t){return a().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,n({request:D({s_key:p,path:t.path}),loading:"正在删除保护配置,请稍后...",message:!0});case 1:K();case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),M=function(){C({type:"all",path:"/www/wwwroot",change:function(e){z.value.path=e}})},Q=function(){var e=l(a().m(function e(){return a().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,N.value.validate();case 1:return e.n=2,n({loading:"正在添加保护文件/目录,请稍后...",request:G(o(o({},z.value),{},{s_key:p})),message:!0});case 2:R.value=!1,K(),z.value={path:"",chattr:"i",d_mode:""};case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),$=[{label:"路径",prop:"path",showOverflowTooltip:!0},{label:"模式",prop:"chattr",render:function(e){return I[e.chattr]}},{label:"权限",prop:"s_mode",render:function(e,t){return y("span",null,[e.s_mode+(e.s_mode===e.d_mode?"":" >> "+e.d_mode)])}},{label:"状态",prop:"state",render:function(e){return y("span",{class:"text-".concat(e.state?"primary":"danger")},[e.state?"已保护":"未保护"])}},q([{title:"删除",onClick:L}])];return b(function(){return K()}),function(e,n){var o=P,a=u,l=A,p=k,d=x,m=V,b=i,E=T,D=c,G=s,q=f,C=h("bt-loading");return v(),g("div",r,[y(G,null,{"header-left":w(function(){return[y(o,{type:"primary",onClick:n[0]||(n[0]=function(e){return R.value=!0})},{default:w(function(){return t(n[5]||(n[5]=[_(" 添加保护文件/目录 ",-1)]))}),_:1})]}),content:w(function(){return[j(y(a,{"max-height":"400",column:$,data:O(U)},null,8,["data"]),[[C,O(F)],[C,"正在加载中,请稍后...","title"]])]}),popup:w(function(){return[y(D,{title:"添加保护文件/目录",modelValue:O(R),"onUpdate:modelValue":n[4]||(n[4]=function(e){return S(R)?R.value=e:null}),area:42,onConfirm:Q,showFooter:""},{default:w(function(){return[y(E,{class:"p-2rem",ref_key:"addReinforceFormRef",ref:N,model:O(z),rules:J},{default:w(function(){return[y(p,{label:"路径",prop:"path"},{default:w(function(){return[y(l,{icon:"icon-file_mode",modelValue:O(z).path,"onUpdate:modelValue":n[1]||(n[1]=function(e){return O(z).path=e}),width:"24rem",placeholder:"被保护的文件或路径",onIconClick:M,iconType:"folder"},null,8,["modelValue"])]}),_:1}),y(p,{label:"模式"},{default:w(function(){return[y(m,{modelValue:O(z).chattr,"onUpdate:modelValue":n[2]||(n[2]=function(e){return O(z).chattr=e}),class:"!w-[24rem]"},{default:w(function(){return[y(d,{label:"只读",value:"i"}),y(d,{label:"追加",value:"a"})]}),_:1},8,["modelValue"])]}),_:1}),y(p,{label:"权限",prop:"d_mode"},{default:w(function(){return[y(b,{modelValue:O(z).d_mode,"onUpdate:modelValue":n[3]||(n[3]=function(e){return O(z).d_mode=e}),width:"24rem",placeholder:"请输入权限",clearable:""},null,8,["modelValue"])]}),_:1})]}),_:1},8,["model"])]}),_:1},8,["modelValue"])]}),_:1}),y(q,{options:H,class:"mx-[1.6rem] mt-[1.6rem]"})])}}}))}}})}();