← Back
Editing: index-legacy386.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(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t=function(){return n};var r,n={},o=Object.prototype,a=o.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",s=l.asyncIterator||"@@asyncIterator",c=l.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(r){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof x?t:x,a=Object.create(o.prototype),l=new N(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}n.wrap=p;var v="suspendedStart",d="suspendedYield",y="executing",g="completed",m={};function x(){}function b(){}function w(){}var _={};f(_,u,(function(){return this}));var k=Object.getPrototypeOf,j=k&&k(k(P([])));j&&j!==o&&a.call(j,u)&&(_=j);var L=w.prototype=x.prototype=Object.create(_);function E(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function O(t,r){function n(o,i,l,u){var s=h(t[o],t,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==e(f)&&a.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,l,u)}),(function(e){n("throw",e,l,u)})):r.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return n("throw",e,l,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(e,t){function a(){return new r((function(r,o){n(e,t,r,o)}))}return o=o?o.then(a,a):a()}})}function S(e,t,n){var o=v;return function(a,i){if(o===y)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 l=n.delegate;if(l){var u=C(l,n);if(u){if(u===m)continue;return u}}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=y;var s=h(e,t,n);if("normal"===s.type){if(o=n.done?g:d,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=g,n.method="throw",n.arg=s.arg)}}}function C(e,t){var n=t.method,o=e.iterator[n];if(o===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=r,C(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=h(o,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,m;var i=a.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,m):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function e(){for(;++o<t.length;)if(a.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=r,e.done=!0,e};return i.next=i}}throw new TypeError(e(t)+" is not iterable")}return b.prototype=w,i(L,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:b,configurable:!0}),b.displayName=f(w,c,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,f(e,c,"GeneratorFunction")),e.prototype=Object.create(L),e},n.awrap=function(e){return{__await:e}},E(O.prototype),f(O.prototype,s,(function(){return this})),n.AsyncIterator=O,n.async=function(e,t,r,o,a){void 0===a&&(a=Promise);var i=new O(p(e,t,r,o),a);return n.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},E(L),f(L,c,"Generator"),f(L,u,(function(){return this})),f(L,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},n.values=P,N.prototype={constructor:N,reset:function(e){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(D),!e)for(var t in this)"t"===t.charAt(0)&&a.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,o){return l.type="throw",l.arg=e,t.next=n,o&&(t.method="next",t.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],l=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),s=a.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){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(e,t){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"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;D(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:P(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),m}},n}function r(e,t,r,n,o,a,i){try{var l=e[a](i),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function n(e){return function(){var t=this,n=arguments;return new Promise((function(o,a){var i=e.apply(t,n);function l(e){r(i,o,a,l,u,"next",e)}function u(e){r(i,o,a,l,u,"throw",e)}l(void 0)}))}}System.register(["./utils-lib-legacy.js?v=VERSION_NUMBER","./index-legacy103.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./site-legacy.js?v=VERSION_NUMBER","./useController-legacy13.js?v=VERSION_NUMBER","./useStore-legacy11.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER","./index-legacy104.js?v=VERSION_NUMBER","./column-legacy.js?v=VERSION_NUMBER","./useStore-legacy12.js?v=VERSION_NUMBER","./useStore-legacy4.js?v=VERSION_NUMBER","./useController-legacy6.js?v=VERSION_NUMBER","./validator-legacy.js?v=VERSION_NUMBER","./useController-legacy5.js?v=VERSION_NUMBER","./useMethod-legacy5.js?v=VERSION_NUMBER","./useController-legacy4.js?v=VERSION_NUMBER","./useStore-legacy10.js?v=VERSION_NUMBER"],(function(e,r){"use strict";var o,a,i,l,u,s,c,f,p,h,v,d,y,g,m,x,b,w,_,k,j,L,E,O,S,C,T,D;return{setters:[function(e){o=e.A,a=e.l,i=e.W,l=e.j,u=e.b},function(e){s=e._},function(e){c=e.c,f=e.s,p=e.r,h=e.e,v=e.p,d=e.q,y=e.v,g=e.B,m=e.y,x=e.z,b=e.x,w=e.A,_=e.F,k=e.a_,j=e.C,L=e.M,E=e.D},function(e){O=e.validateDomain,S=e.authDomainApi,C=e.getOrderDetail},function(e){T=e.l},function(e){D=e.u},null,null,null,null,null,null,null,null,null,null,null],execute:function(){var r={class:"p-[1.5rem]"},N={class:"ml-[.4rem] text-danger"},P={class:"max-h-[38rem] overflow-auto"},G={key:0,class:"flex justify-end"},F={class:"h-full overflow-auto bg-black text-white"},I=["innerHTML"];e("default",c({__name:"index",props:{compData:{type:Object,default:function(){}}},emits:["close"],setup:function(e,c){var M=c.emit,A=f(D()),R=A.activeTabs,H=A.sslIsRefresh,q=A.testIsRefresh,z=A.encryptIsRefresh,U=A.otherIsRefresh,Y=u(),B=e,W=M,X=p({}),J=p([]),K=p(!1),Q=p("");p();var V=p([]),Z=p(!1),$=p(""),ee=p([{text:"解析域名需要一定时间来生效,完成所以上所有解析操作后,请等待1分钟后再点击验证按钮"},{text:""},{text:"若您使用的是宝塔云解析插件,阿里云DNS,DnsPod作为DNS,可使用DNS接口自动解析"}]),te=p([{label:"解析域名",prop:"domain",showOverflowTooltip:!0},{label:"记录值",prop:"auth_value",showOverflowTooltip:!0,render:function(e,t){var r="dns"===X.value.auth_type?e.auth_value:e.file_path;return h("div",{class:"flex items-center"},[h("div",{class:"truncate w-[15rem]"},[r]),h("span",{class:"svgtofont-icon-copy ml-[4px] text-[#666] text-[1.6rem] w-[1.6rem] cursor-pointer",onClick:function(){return o({value:r})}},null)])}},{label:"类型",prop:"type",showOverflowTooltip:!0,render:function(e,t){return"dns"===X.value.auth_type?h("span",null,[e.type]):h("div",{class:"flex items-center"},[h("div",{class:"truncate w-[15rem]"},[e.content]),h("span",{class:"svgtofont-icon-copy ml-[4px] text-[#666] text-[1.6rem] w-[1.6rem] cursor-pointer",onClick:function(){return o({value:e.content})}},null)])}},{label:"必需",prop:"must",width:100}]),re=function(e){var t="";if(void 0===e[1].challenges)t+="<p><span>响应状态:</span>"+e[1].status+"</p>",t+="<p><span>错误类型:</span>"+e[1].type+"</p>",t+="<p><span>错误来源:</span><a class='bt-link' href='https://letsencrypt.org/' target='_blank' rel='noreferrer noopener'>Let's Encrypt官网</a></p>",t+='<div class="flex flex-col">错误代码:<pre class="!text-white !bg-[#333] !inline-block ! ml-[4px] ">'+e[1].detail+"</pre></div>";else if(e[1].challenges[1]||e[1].challenges[0]&&(e[1].challenges[1]=e[1].challenges[0]),"invalid"===e[1].status){for(var r="",n=0;n<J.value.length;n++){var o,a;if(-1!=(null===(o=J.value[n].outerText)||void 0===o?void 0:o.indexOf(e[1].identifier.value))){var i=null===(a=J.value[n].outerText)||void 0===a?void 0:a.split("\t");if((null==i?void 0:i.length)>1){r=i[1];break}}}if(t+="<p><span>验证域名:</span>"+e[1].identifier.value+"</p>","dns"===X.value.type)t+="<p><span>验证解析:</span>"+("_acme-challenge."+e[1].identifier.value)+"</p>",t+="<p><span>验证内容:</span>"+r+"</p>",t+='<div class="flex flex-col">错误代码:<pre class="!text-white !bg-[#333] !inline-block ! ml-[4px] ">'+e[1].challenges[1].error.detail+"</pre></div>";else t+="<p><span>验证URL:</span><a class='bt-link' href='"+("http://"+e[1].identifier.value+"/.well-known/acme-challenge/"+e[1].challenges[0].token)+"' target='_blank' rel='noreferrer noopener'>点击查看</a></p>",t+="<p><span>验证内容:</span>"+e[1].challenges[0].token+"</p>",t+='<div class="flex flex-col">错误代码:<pre class="!text-white !bg-[#333] !inline-block ! ml-[4px] ">'+e[1].challenges[0].error.detail+"</pre></div>";t+="<p><span>验证结果:</span> <a style='color:red;'>验证失败</a></p>"}Y.msg({customClass:"bt-message-error-html",dangerouslyUseHTMLString:!0,icon:"x",message:'<div class="flex items-center justify-center mt-[8px] mb-[20px]"><i class="svgtofont-el-circle-close-filled mr-[8px] text-[#F56C6C] text-[3rem]"></i><a style="color: red;font-size:16px">'+e[0]+'</a></div><div class=" p-[20px] border border-1 border-color-[#dedede] ! rounded-[4px] ! mb-[12px] !leading-[26px] bg-[#f8f8f8]">'+t+"</div>",showClose:!0,duration:0})},ne=function(){var e=n(t().mark((function e(){var r,n,o,a,i;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,K.value=!0,e.next=4,T();case 4:return r=e.sent,e.next=7,O({index:X.value.index});case 7:if(n=e.sent,o=n.data,r._props.onCancel(),K.value=!1,!0!==o.status){e.next=17;break}null===(a=(i={ssl:function(){return H.value=!0},test:function(){return q.value=!0},encrypt:function(){return z.value=!0},other:function(){return U.value=!0}})[R.value])||void 0===a||a.call(i),W("close"),e.next=22;break;case 17:if("string"!=typeof(null==o?void 0:o.msg)){e.next=21;break}return e.abrupt("return",Y.error(o.msg));case 21:re(o);case 22:e.next=27;break;case 24:e.prev=24,e.t0=e.catch(0);case 27:case"end":return e.stop()}}),e,null,[[0,24]])})));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=n(t().mark((function e(r){var n,o,a;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,K.value=!0,e.next=4,T();case 4:return n=e.sent,e.next=7,S({index:X.value.index,domain:r});case 7:if(o=e.sent,a=o.data,n._props.onCancel(),K.value=!1,"valid"!==a.status){e.next=15;break}Y.success("验证成功"),e.next=24;break;case 15:if(!0!==a.status){e.next=19;break}W("close"),e.next=24;break;case 19:if("string"!=typeof(null==a?void 0:a.msg)){e.next=23;break}return e.abrupt("return",Y.error(a.msg));case 23:re(a);case 24:e.next=29;break;case 26:e.prev=26,e.t0=e.catch(0);case 29:case"end":return e.stop()}}),e,null,[[0,26]])})));return function(t){return e.apply(this,arguments)}}(),ae=function(){var e=n(t().mark((function e(r){var n,o,a;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null,e.prev=1,n=Y.load("正在验证证书申请状态,请稍后..."),e.next=5,C({index:r.index});case 5:(o=e.sent).status?(V.value=o.data.auths,o.data.hasOwnProperty("error")?(Z.value=o.data.error,$.value=o.data.error_msg):(Z.value=!1,$.value=""),X.value=r,te.value[1].label="dns"===r.auth_type?"记录值":"文件路径",te.value[1].prop="dns"===r.auth_type?"auth_value":"file_path",te.value[2].label="dns"===r.auth_type?"类型":"文件内容",te.value[2].prop="dns"===r.auth_type?"type":"content",ee.value[1].text="可通过CMD命令来手动验证域名解析是否生效: nslookup -q=txt _acme-challenge.".concat(null===(a=J.value[0])||void 0===a||null===(a=a.domain)||void 0===a?void 0:a.replace("*.",""))):(Y.request(o),W("close")),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1);case 12:return e.prev=12,n&&n.close(),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[1,9,12,15]])})));return function(t){return e.apply(this,arguments)}}();return v((function(){ae(B.compData.row)})),function(e,t){var n=a,o=E,u=s,c=i,f=l;return d(),y("div",r,[t[2]||(t[2]=g(" 请按以下列表做TXT解析: ")),m("span",N,x(b($)),1),h(u,null,{content:w((function(){return[m("div",P,[(d(!0),y(_,null,k(b(V),(function(e,r){return d(),y(_,null,[e.data.length?(d(),y("div",{key:r},[m("span",null,"验证域名:"+x(e.domain),1),h(n,{class:"my-[1rem]",column:b(te),data:e.data},null,8,["column","data"]),b(Z)?(d(),y("div",G,[h(o,{type:"default",onClick:function(t){return oe(e.domain)}},{default:w((function(){return t[0]||(t[0]=[g("验证")])})),_:2},1032,["onClick"])])):j("",!0)])):j("",!0)],64)})),256))])]})),"footer-right":w((function(){return[b(Z)?j("",!0):(d(),L(o,{key:0,type:"primary",onClick:ne},{default:w((function(){return t[1]||(t[1]=[g("验证")])})),_:1}))]})),_:1}),h(c,{list:b(ee),listStyle:"disc",class:"ml-[2rem]"},null,8,["list"]),h(f,{visible:b(K),area:[50,25],"show-close":!1},{default:w((function(){return[m("div",F,[m("pre",{innerHTML:b(Q),class:"whitespace-pre-wrap p-[1rem]"},null,8,I)])]})),_:1},8,["visible"])])}}}))}}}))}();
Save File
Cancel