var m=(_,v,l)=>new Promise((n,r)=>{var F=i=>{try{c(l.next(i))}catch(u){r(u)}},h=i=>{try{c(l.throw(i))}catch(u){r(u)}},c=i=>i.done?n(i.value):Promise.resolve(i.value).then(F,h);c((l=l.apply(_,v)).next())});import{_ as g,d as y,j as k,v as E,i as x,o,c as a,a as e,l as d,F as A,K as S,L as B,p as b,q as N,C as w}from"./index.js?v=5b4be379";const D=_=>(b("data-v-613b66e3"),_=_(),N(),_),$={id:"page",class:"page-container"},I=D(()=>e("div",{class:"notice_info"},[e("li",null," \u52A8\u6001 DNS \uFF08DDNS\uFF09\u8BA9\u60A8\u5373\u4F7F\u5728\u6CA1\u6709\u9759\u6001 IP \u5730\u5740\u7684\u60C5\u51B5\u4E0B\uFF0C\u4ECD\u53EF\u5C06\u670D\u52A1\u5668\u8FDE\u540C\u7ED1\u5B9A\u7684\u57DF\u540D\u6620\u5C04\u81F3\u516C\u7F51\u4E0A\u3002 "),e("li",null," \u5982\u679C\u60A8\u6CA1\u6709\u516C\u7F51 IP \u8BF7\u4F7F\u7528 DDNSTO \uFF0C\u521D\u6B21\u4F7F\u7528 DDNSTO \u9700\u8981\u521D\u59CB\u5316\u914D\u7F6E ")],-1)),P={class:"text-container"},T={class:"text-container_item"},O=D(()=>e("div",{class:"text-container_item_title"},[e("span",null,"DDNSTO\uFF1A")],-1)),q={class:"text-container_item_flex"},G={class:"text-container_item_block"},j=["href"],K={key:0,class:"domain"},L={key:1,class:"domain"},V={class:"text-container_item"},z=D(()=>e("div",{class:"text-container_item_title"},[e("span",null,"myddns_ipv4\uFF1A")],-1)),H={class:"text-container_item_flex"},J={class:"text-container_item_block"},M=["href"],Q={key:1,class:"domain"},R={class:"text-container_item"},U=D(()=>e("div",{class:"text-container_item_title"},[e("span",null,"myddns_ipv6\uFF1A")],-1)),W={class:"text-container_item_flex"},X={class:"text-container_item_block"},Y=["href"],Z={key:1,class:"domain"},tt=y({__name:"index",setup(_){return m(this,null,function*(){let v,l;k({ipv4:"",ipv6:""});const n=k({ddnstoDomain:"",ipv4Domain:"",ipv6Domain:""}),r=k({install:!0,error:null}),F=()=>m(this,null,function*(){yield Promise.all([h()])}),h=()=>m(this,null,function*(){try{const t=yield w.Guide.Ddns.GET(),{result:s,error:p}=t.data;if(p)throw p;s&&(n.ddnstoDomain=s.ddnstoDomain,n.ipv4Domain=s.ipv4Domain,n.ipv6Domain=s.ipv6Domain)}catch(t){console.log(t)}});[v,l]=E(()=>F()),yield v,l();const c=x(()=>n.ddnstoDomain),i=x(()=>{const t=n.ipv4Domain;return t!=null&&t!=""&&t!="Stopped"?{url:`http://${t}`,title:t,ok:!0}:{url:`http://${t}`,title:"\u672A\u914D\u7F6E",ok:!1}}),u=x(()=>{const t=n.ipv6Domain;return t!=null&&t!=""&&t!="Stopped"?{url:`http://${t}`,title:t,ok:!0}:{url:`http://${t}`,title:"\u672A\u914D\u7F6E",ok:!1}}),C=()=>{S({domain:c.value,callback:t=>{}})},f=t=>{B({setup:t,callback:s=>{switch(t){case"ipv4":n.ipv4Domain=s.domain;break;case"ipv6":n.ipv6Domain=s.domain;break}}})};return(t,s)=>(o(),a("div",$,[I,e("div",P,[e("div",T,[O,e("div",q,[e("div",G,[r.install?(o(),a("a",{key:0,href:c.value,target:"_blank",class:"domain"},d(c.value),9,j)):(o(),a(A,{key:1},[r.error?(o(),a("a",K,d(r.error),1)):(o(),a("a",L,"\u672A\u5B89\u88C5"))],64)),e("a",{class:"setting",onClick:s[0]||(s[0]=p=>C())},"\u5FEB\u901F\u914D\u7F6E")])])]),e("div",V,[z,e("div",H,[e("div",J,[i.value.ok?(o(),a("a",{key:0,href:i.value.url,target:"_blank",class:"domain"},d(i.value.title),9,M)):(o(),a("a",Q,d(i.value.title),1)),e("a",{class:"setting",onClick:s[1]||(s[1]=p=>f("ipv4"))},"\u5FEB\u901F\u914D\u7F6E")])])]),e("div",R,[U,e("div",W,[e("div",X,[u.value.ok?(o(),a("a",{key:0,href:u.value.url,target:"_blank",class:"domain"},d(u.value.title),9,Y)):(o(),a("a",Z,d(u.value.title),1)),e("a",{class:"setting",onClick:s[2]||(s[2]=p=>f("ipv6"))},"\u5FEB\u901F\u914D\u7F6E")])])])])]))})}});var it=g(tt,[["__scopeId","data-v-613b66e3"]]);export{it as default};
