← Back
Editing: index-legacy472.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,a=o.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(r){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof b?e:b,a=Object.create(o.prototype),u=new N(n||[]);return i(a,"_invoke",{value:S(t,r,u)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var v="suspendedStart",y="suspendedYield",d="executing",g="completed",m={};function b(){}function w(){}function x(){}var _={};f(_,c,(function(){return this}));var L=Object.getPrototypeOf,E=L&&L(L(F([])));E&&E!==o&&a.call(E,c)&&(_=E);var j=x.prototype=b.prototype=Object.create(_);function k(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function O(e,r){function n(o,i,u,c){var s=p(e[o],e,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==t(f)&&a.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):r.resolve(f).then((function(t){l.value=t,u(l)}),(function(t){return n("throw",t,u,c)}))}c(s.arg)}var o;i(this,"_invoke",{value:function(t,e){function a(){return new r((function(r,o){n(t,e,r,o)}))}return o=o?o.then(a,a):a()}})}function S(t,e,n){var o=v;return function(a,i){if(o===d)throw Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:r,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=P(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===v)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=p(t,e,n);if("normal"===s.type){if(o=n.done?g:y,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=g,n.method="throw",n.arg=s.arg)}}}function P(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,P(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=p(o,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,m;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=r),e.delegate=null,m):i:(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 G(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function F(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,i=function t(){for(;++o<e.length;)if(a.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return i.next=i}}throw new TypeError(t(e)+" is not iterable")}return w.prototype=x,i(j,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,l,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(j),t},n.awrap=function(t){return{__await:t}},k(O.prototype),f(O.prototype,s,(function(){return this})),n.AsyncIterator=O,n.async=function(t,e,r,o,a){void 0===a&&(a=Promise);var i=new O(h(t,e,r,o),a);return n.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(j),f(j,l,"Generator"),f(j,c,(function(){return this})),f(j,"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=F,N.prototype={constructor:N,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(G),!t)for(var e in this)"t"===e.charAt(0)&&a.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 i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("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 n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.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&&a.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 i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):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),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),G(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;G(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:F(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),m}},n}function r(t,e,r,n,o,a,i){try{var u=t[a](i),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,a){var i=t.apply(e,n);function u(t){r(i,o,a,u,c,"next",t)}function c(t){r(i,o,a,u,c,"throw",t)}u(void 0)}))}}System.register(["./utils-lib-legacy.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./site-legacy.js?v=VERSION_NUMBER","./useStore-legacy4.js?v=VERSION_NUMBER"],(function(t,r){"use strict";var o,a,i,u,c,s,l,f,h,p,v,y,d,g,m,b,w;return{setters:[function(t){o=t.at,a=t.b,i=t.a2,u=t.L,c=t.e},function(t){s=t.r,l=t.o,f=t.c,h=t.k,p=t.Z,v=t.q,y=t.v,d=t.e,g=t.x},function(t){m=t.getProxyConfigFile,b=t.saveProxyConfigFile},function(t){w=t.u}],execute:function(){var x=a(),_=w().siteInfo,L=t("t",s("master")),E=t("f",s("server_block")),j=(t("a",[{label:"server块",value:"server_block"},{label:"HTTP块",value:"http_block"}]),t("h",[{content:"主配置文件不允许修改,如需自定义配置请到上方自定义配置文件中操作"}]),[{content:"保存前请检查输入的配置文件是否正确,错误的配置可能会导致网站访问异常"},{content:"如果您对此配置不熟悉,请勿添加自定义配置"},{isHtml:!0,content:'server块的nginx官方配置文档:<a class="text-primary cursor-pointer" href="https://nginx.org/en/docs/http/ngx_http_core_module.html#server" target="_blank" rel="noreferrer noopener">点击跳转</a>'}]),k=[{content:"保存前请检查输入的配置文件是否正确,错误的配置可能会导致网站访问异常"},{content:"如果您对此配置不熟悉,请勿添加自定义配置"},{isHtml:!0,content:'http块的nginx官方配置文档:<a class="text-primary cursor-pointer" href="https://nginx.org/en/docs/http/ngx_http_core_module.html#http" target="_blank" rel="noreferrer noopener">点击跳转</a>'}],O=t("d",s(j)),S=t("s",s("")),P=t("b",s(!1));t("g",n(e().mark((function t(){var r,n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,P.value=!0,t.next=4,m({site_name:_.value.name});case 4:return r=t.sent,(n=r.data).status?"master"===L.value?S.value=n.data.site_conf:(S.value=n.data[E.value],O.value="server_block"===E.value?j:k):x.error(n.msg),t.abrupt("return",{data:S.value});case 10:return t.prev=10,t.t0=t.catch(0),t.abrupt("return",{data:""});case 14:return t.prev=14,P.value=!1,t.finish(14);case 17:case"end":return t.stop()}}),t,null,[[0,10,14,17]])}))));l((function(){x.error("主配置文件不允许修改,如需自定义配置请到上方自定义配置文件中操作")}),3e3);t("c",n(e().mark((function t(){var r,n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("master"!==L.value){t.next=2;break}return t.abrupt("return",{status:!1,msg:"主配置文件不允许修改,如需自定义配置请到上方自定义配置文件中操作"});case 2:return r=x.load("正在保存内容,请稍候..."),t.prev=3,t.next=6,b({site_name:_.value.name,conf_type:E.value,body:S.value});case 6:n=t.sent,x.msg({dangerouslyUseHTMLString:!0,message:n.msg,type:n.status?"success":"error",duration:n.status?2e3:0,showClose:!n.status}),t.next=14;break;case 10:return t.prev=10,t.t0=t.catch(3),o(t.t0),t.abrupt("return",{status:!1,msg:"保存文件失败"});case 14:return t.prev=14,r.close(),t.finish(14);case 17:case"end":return t.stop()}}),t,null,[[3,10,14,17]])}))));var T=c(f({__name:"index",props:{compData:{default:function(){return{}}}},setup:function(t){var e=h({site_conf:"",http_block:"",server_block:""});p("configList",e),p("tabActive",L);var n=i({type:"card",value:L,options:[{label:"主配置文件",name:"master",lazy:!0,render:function(){return u((function(){return r.import("./files-legacy2.js?v=VERSION_NUMBER")}),void 0,r.meta.url)}},{label:"自定义配置文件",name:"custom",lazy:!0,render:function(){return u((function(){return r.import("./files-legacy2.js?v=VERSION_NUMBER")}),void 0,r.meta.url)}}]}).BtTabs,o=function(t){L.value=t};return function(t,e){return v(),y("div",null,[d(g(n),{onChange:o})])}}}),[["__scopeId","data-v-25f9fcdd"]]),G=Object.freeze(Object.defineProperty({__proto__:null,default:T},Symbol.toStringTag,{value:"Module"}));t("i",G)}}}))}();
Save File
Cancel