← Back
Editing: index-legacy374.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:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",s=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 p(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,a=Object.create(o.prototype),u=new A(n||[]);return i(a,"_invoke",{value:S(t,r,u)}),a}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 v="suspendedStart",y="suspendedYield",d="executing",m="completed",g={};function w(){}function b(){}function _(){}var x={};f(x,l,(function(){return this}));var j=Object.getPrototypeOf,E=j&&j(j(G([])));E&&E!==o&&a.call(E,l)&&(x=E);var L=_.prototype=w.prototype=Object.create(x);function P(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,l){var c=h(e[o],e,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==t(f)&&a.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,u,l)}),(function(t){n("throw",t,u,l)})):r.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,l)}))}l(c.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===m){if("throw"===a)throw i;return{value:r,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var l=F(u,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var c=h(t,e,n);if("normal"===c.type){if(o=n.done?m:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=m,n.method="throw",n.arg=c.arg)}}}function F(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,F(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' 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=r),e.delegate=null,g):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}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 k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function G(e){if(e||""===e){var n=e[l];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 b.prototype=_,i(L,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:b,configurable:!0}),b.displayName=f(_,s,"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__=_,f(t,s,"GeneratorFunction")),t.prototype=Object.create(L),t},n.awrap=function(t){return{__await:t}},P(O.prototype),f(O.prototype,c,(function(){return this})),n.AsyncIterator=O,n.async=function(t,e,r,o,a){void 0===a&&(a=Promise);var i=new O(p(t,e,r,o),a);return n.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},P(L),f(L,s,"Generator"),f(L,l,(function(){return this})),f(L,"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=G,A.prototype={constructor:A,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(k),!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 l=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)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,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 r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),g}},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;k(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:G(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),g}},n}function r(t,e,r,n,o,a,i){try{var u=t[a](i),l=u.value}catch(t){return void r(t)}u.done?e(l):Promise.resolve(l).then(n,o)}function n(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(t)||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 o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}System.register(["./utils-lib-legacy.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./form-item-legacy.js?v=VERSION_NUMBER","./index-legacy75.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER","./index-legacy104.js?v=VERSION_NUMBER","./index-legacy103.js?v=VERSION_NUMBER","./index.vue_vue_type_script_setup_true_lang-legacy6.js?v=VERSION_NUMBER","./index-legacy130.js?v=VERSION_NUMBER","./validator-legacy.js?v=VERSION_NUMBER","./column-legacy.js?v=VERSION_NUMBER","./index.vue_vue_type_style_index_0_scoped_b3c4124c_lang-legacy.js?v=VERSION_NUMBER","./useStore-legacy4.js?v=VERSION_NUMBER","./site-legacy.js?v=VERSION_NUMBER","./index-legacy131.js?v=VERSION_NUMBER","./index-legacy141.js?v=VERSION_NUMBER","./index-legacy124.js?v=VERSION_NUMBER","./useController-legacy6.js?v=VERSION_NUMBER"],(function(t,o){"use strict";var a,i,u,l,c,s,f,p,h,v,y,d,m,g,w,b,_,x,j,E,L;return{setters:[function(t){a=t.u,i=t.G,u=t.k,l=t.bU,c=t.bg,s=t.bV,f=t.bW},function(t){p=t.c,h=t.r,v=t.t,y=t.g,d=t.e,m=t.ax,g=t.B,w=t.p,b=t.q,_=t.M,x=t.x},function(t){j=t.l},function(t){E=t.a,L=t.o},null,null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){t("default",p({__name:"index",setup:function(t,o){var p,P,O=o.expose,S=h(!1),F=a().panel,T=v(F.value).sitePath,k=y((function(){var t;return T.value?null===(t=T.value+"/")||void 0===t?void 0:t.replace(/\/\//g,"/"):"/www/wwwroot/"})),A=h({webname:"",path:"/www/wwwroot",ftp:!1,ps:"",port:80,ftp_username:"",ftp_password:""}),G=i({data:A.value,options:function(t){return y((function(){return t.value.hasOwnProperty("ftp")||(t.value.ftp=!1),[{type:"custom",render:function(e){return e.value.hasOwnProperty("webname")||(e.value.webname=""),d(c,{label:"绑定域名",prop:"webname"},{default:function(){return[d(m,{ref:"popover",placement:"top-start","popper-class":"green-tips-popover !p-0",title:"",width:"370",visible:S.value,"onUpdate:visible":function(t){return S.value=t},"trigger-keys":[],trigger:"focus"},{default:function(){return d("div",{class:"!p-[12px] bg-[#20a53a] text-white"},[g("如需填写多个域名,请换行填写,每行一个域名,默认为80端口"),d("br",null,null),g("IP地址格式:192.168.1.199"),d("br",null,null),g("泛解析添加方法 *.domain.com"),d("br",null,null),g("如另加端口格式为 www.domain.com:88")])},reference:function(){return d(u,{rows:6,resize:"none",width:"42rem",modelValue:t.value.webname,"onUpdate:modelValue":function(e){return t.value.webname=e},onInput:function(e){var r,n,o;"string"==typeof e&&(t.value.ps=e.split("\n")[0],t.value.path=(null===(r=k.value)||void 0===r?void 0:r.replace(/\/\//g,"/"))+(null===(n=e.split("\n")[0])||void 0===n||null===(n=n.replace(/:/g,"_"))||void 0===n?void 0:n.trim()),t.value.ftp_username=null===(o=e.split("\n")[0])||void 0===o||null===(o=o.toString())||void 0===o?void 0:o.replace(/\W/g,"_").substring(0,16),t.value.ftp_password=l(12))},onFocus:function(){S.value=!0},type:"textarea",placeholder:"如需填写多个域名,请换行填写,每行一个域名,默认为80端口\nIP地址格式:192.168.1.199\n泛解析添加方法 *.domain.com\n如另加端口格式为 www.domain.com:88"},null)}})]}})},key:"webname",rules:{webname:[s({message:"请输入域名",trigger:"blur"}),f()]}},{type:"input",label:"备注",key:"ps",attrs:{placeholder:"请输入备注,可为空",width:"42rem"}},j("根目录","path",{attrs:{width:"42rem",placeholder:"请输入根目录"},rules:[s({message:"请选择路径"})]},(function(){L(t.value.path,(function(e){t.value.path=e}))})),{type:"select",label:"FTP",key:"ftp",options:[{label:"不创建",value:!1},{label:"创建",value:!0}],attrs:{style:"width: 16rem;"}}].concat(n(t.value.ftp?[{type:"custom",render:function(e){return e.value.hasOwnProperty("ftp_username")||(e.value.ftp_username="",e.value.ftp_password=""),d(c,{label:"FTP账号"},{default:function(){return[d("div",{class:"flex items-center mb-[12px]"},[d(c,{prop:"ftp_username"},{default:function(){return[d(u,{placeholder:"创建FTP账号",width:"16rem",modelValue:t.value.ftp_username,"onUpdate:modelValue":function(e){return t.value.ftp_username=e}},null)]}}),d(c,{label:"密码",class:"!mt-0",prop:"ftp_password"},{default:function(){return[d(u,{width:"16rem",placeholder:"FTP密码",modelValue:t.value.ftp_password,"onUpdate:modelValue":function(e){return t.value.ftp_password=e}},null)]}})]),d("span",{class:"text-[#999] text-[1.2rem]"},[g("创建站点的同时,为站点创建一个对应FTP帐户,并且FTP目录指向站点所在目录。")])]}})},rules:{ftp_username:[{validator:function(e,r,n){t.value.ftp?0===r.length?n(new Error("FTP用户名不能为空!")):/^[a-zA-Z0-9_]+$/g.test(r)?r.length<=3?n(new Error("FTP用户名长度错误,不能少于3个字符!")):n():n(new Error("FTP用户名只能包含字母、数字和下划线!")):n()},trigger:["blur","change"]}],ftp_password:[{validator:function(e,r,n){""===r&&t.value.ftp?n(new Error("FTP密码不能为空!")):n()},trigger:["blur","change"]}]}}]:[]))}))},submit:(p=e().mark((function t(r,n){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n();case 2:return t.next=4,E(r.value);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})),P=function(){var t=this,e=arguments;return new Promise((function(n,o){var a=p.apply(t,e);function i(t){r(a,n,o,i,u,"next",t)}function u(t){r(a,n,o,i,u,"throw",t)}i(void 0)}))},function(t,e){return P.apply(this,arguments)})}),I=G.BtForm,N=G.submit;return w((function(){T.value&&Object.assign(A.value,{path:T.value})})),O({onConfirm:N}),function(t,e){return b(),_(x(I),{class:"p-2rem"})}}}))}}}))}();
Save File
Cancel